<---- template headericclude ----->
Static IP and Fedora 10
FedoraForum.org - Fedora Support Forums and Community
Page 1 of 3 123 LastLast
Results 1 to 15 of 38
  1. #1
    Brad7928 Guest

    Unhappy Static IP and Fedora 10

    I have installed Fedora 10, went to give it a static IP, found it didn't work. It deleted my DNS that i put in and made the subnet the gateway address.

    I followed a few of the fixes such as:

    - Turning Network Manager off
    - Making sure Network is enabled
    - Manually editing the ifcfg-eth0 file

    Still when i boot up i have no internet unless i change it back to DHCP.

    Is there any other fixes for this?

  2. #2
    Join Date
    Mar 2006
    Posts
    1,957
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    There are at least 3 files under /etc/sysconfig that need to be edited to remove the gateway address from the netmask field.
    /etc/sysconfig/networking/devices/ifcfg-eth0
    /etc/sysconfig/networking/profiles/default/ifcfg-eth0
    /etc/sysconfig/network-scripts/ifcfg-eth0
    jbkt23
    Thinkpads Depends on era T23 - X2xx
    AMD & Intel Boxes

  3. #3
    Brad7928 Guest
    Oh i didn't realise there was that many, the only one i changed was /etc/sysconfig/network-scripts/ifcfg-eth0

    I'll change the others tomorrow night and see how it goes. Thanks for the reply.

  4. #4
    Join Date
    Apr 2004
    Location
    Ottawa, Canada
    Posts
    1,930
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, the network scripts are indeed broken in F10. I've temporarily gotten around it by creating a Static NM entry.
    There is no 'CTRL' button on Chuck Norris's computer. Chuck Norris is always in control.

  5. #5
    aleph's Avatar
    aleph is offline Banned (for/from) behaving just like everybody else!
    Join Date
    Jul 2007
    Location
    Nanjing, China
    Posts
    1,332
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jbkt23
    There are at least 3 files under /etc/sysconfig that need to be edited to remove the gateway address from the netmask field.
    /etc/sysconfig/networking/devices/ifcfg-eth0
    /etc/sysconfig/networking/profiles/default/ifcfg-eth0
    /etc/sysconfig/network-scripts/ifcfg-eth0
    They are actually one file hardlinked to three different places. Check it with ls -i and you'll see they have the same inode number. You change one of them and all are changed.
    Code:
    from rlyeh import cthulhu
    cthulhu.fhtagn()

  6. #6
    Brad7928 Guest
    You change one of them and all are changed.
    I did change one, the one in /etc/sysconfig/network-scripts/ifcfg-eth0

    But the problem was still there.

    How would one create a Static NM entry?

  7. #7
    Join Date
    Jul 2005
    Location
    Ft Huachuca, AZ
    Posts
    3,781
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Brad7928
    I have installed Fedora 10, went to give it a static IP, found it didn't work. It deleted my DNS that i put in and made the subnet the gateway address.

    I followed a few of the fixes such as:

    - Turning Network Manager off
    - Making sure Network is enabled
    - Manually editing the ifcfg-eth0 file

    Still when i boot up i have no internet unless i change it back to DHCP.

    Is there any other fixes for this?
    This is correct, EXCEPT you deleted your DNS entries and made the NETMASK the gateway, wont't work!. Your gateway address should be the ip address of the first hop in your network, ie router, cable modem or switch. The primary DNS entry should also be the ip address of the first hop, the secondary could be one of your isp DNS address or opendns ip address.

    If you haven't updated your F10 install, do so, as some of these issues have been corrected with NM...

    Mike
    Last edited by Iron_Mike; 18th December 2008 at 01:43 AM.

  8. #8
    Brad7928 Guest
    This is correct, EXCEPT you deleted your DNS entries and made the NETMASK the gateway, wont't work!.
    I knowif i make the Netmask the gateway it wont work... I said Fedora made my netmask my gateway address after i had entered 255.255.255.0 as my netmask.

    The primary DNS entry should also be the ip address of the first hop, the secondary could be one of your isp DNS address or opendns ip address.
    I have set my DNS's to my ISP name servers, so as long as my Gateway is set right, it should be ok.

    The only trouble i have is with the netmask. I set it up as such,

    IP: 192.168.1.x
    Netmask: 255.255.255.0
    Gateway: 192.168.1.1
    DNS: 202.45.110.240
    DNS: 202.45.110.241

    But when i go back into it after saving and closing, everything is changed to the following:

    IP: 192.168.1.x
    Netmask: 192.168.1.1
    Gateway: 192.168.1.1
    DNS: (blank)
    DNS: (blank)

  9. #9
    Join Date
    Jul 2005
    Location
    Ft Huachuca, AZ
    Posts
    3,781
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When was the last time you updated the install?? Also when you edited your ifcfg-eth0 file did you set:

    USERCTL=yes

    Post a copy of your /etc/sysconfig/network-scripts/ifcfg-eth0

    Mike

  10. #10
    Brad7928 Guest
    I'll have to wait until i get home so i can post the information, and i can't remember off the top of my head what i set USERCTL to.... Thanks for your help.

  11. #11
    Join Date
    Mar 2006
    Posts
    1,957
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    They must not have been all hardlinked on my system because I changed each one individually in sequence.
    jbkt23
    Thinkpads Depends on era T23 - X2xx
    AMD & Intel Boxes

  12. #12
    Join Date
    Sep 2008
    Location
    Tallahassee
    Age
    40
    Posts
    337
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jbkt23
    They must not have been all hardlinked on my system because I changed each one individually in sequence.
    Did you use emacs? Someone told me that emacs makes a new copy of the file if it's hardlinked. Another reason to use vim.

  13. #13
    aleph's Avatar
    aleph is offline Banned (for/from) behaving just like everybody else!
    Join Date
    Jul 2007
    Location
    Nanjing, China
    Posts
    1,332
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Simian Man
    Did you use emacs? Someone told me that emacs makes a new copy of the file if it's hardlinked. Another reason to use vim.
    Hmm, indeed. I just tried something like this
    Code:
    [cong@cmsite zoo]$ touch file1         # Touch an empty file
    [cong@cmsite zoo]$ ln file1 file2      # Hard link another filename to it
    [cong@cmsite zoo]$ ls -i               # See? They have the same inode
    244540 file1  244540 file2
    [cong@cmsite zoo]$ emacs file1         # Make some edit and save the result with C-x C-s
    [cong@cmsite zoo]$ ls -i               # Now look. Emacs saved the changed buffer to another file
    244747 file1  244540 file1~  244540 file2
    [cong@cmsite zoo]$ # now file1 and file2 are not linked to each other
    Maybe this is the intended behavior of Emacs. To work around it, use C-u 0 C-x C-s to save the buffer. In this way Emacs doesn't create the backup file with a "~" appended to its name, and the original hardlink is preserved.

    Don't know whether the OP uses Emacs so I can't say this post is relevant to the topic, but I think I could put it here just in case someone are searching for a solution to the same problem...
    Code:
    from rlyeh import cthulhu
    cthulhu.fhtagn()

  14. #14
    Join Date
    Aug 2005
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is an easy way around this problem on a small, single 256 subnet (which most of us probably have) without manually editing the network scripts. Also, I wouldn't use this method if you are using NetworkManager... I disable NetworkManager when I have static IPs set.

    Using system-config-network
    Select Static IP and leave the subnet and gateway blank
    Move over to the Route Tab
    Create a new static route with the following settings.
    network: 0.0.0.0
    subnet: 0.0.0.0
    route: 192.168.0.1 (or whatever your default route is)

    This in essence creates a default route that normally the subnet and gateway address on the first tab creates. The only difference is that leaving the IP-subnet and Default Gateway blank, you can avoid the bug in the network scripts... Don't forget to set your DNS servers too. Tada.

    Then when this gets fixed you can go back to the normal GUI/TUI config and put in the correct info and you haven't poo'ed your scripts all up for the next update.
    Last edited by everestx; 19th December 2008 at 10:09 PM.

  15. #15
    aleph's Avatar
    aleph is offline Banned (for/from) behaving just like everybody else!
    Join Date
    Jul 2007
    Location
    Nanjing, China
    Posts
    1,332
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The recent Koji build of system-config-network seems to have corrected the static IP bug.
    Code:
    from rlyeh import cthulhu
    cthulhu.fhtagn()

Page 1 of 3 123 LastLast

Similar Threads

  1. Fedora 10 | static ip issues
    By forum.query in forum Servers & Networking
    Replies: 52
    Last Post: 27th January 2010, 10:23 PM
  2. Replies: 2
    Last Post: 21st February 2009, 06:24 AM
  3. Kickstart with static IP on Fedora 9
    By moersfel in forum Installation, Upgrades and Live Media
    Replies: 2
    Last Post: 15th October 2008, 11:39 PM
  4. Fedora 9 static noise
    By OldJohnB in forum Installation, Upgrades and Live Media
    Replies: 1
    Last Post: 21st May 2008, 12:47 AM
  5. FC2 Overriding static if in favor of dhcp system set for static
    By pkraus109 in forum Servers & Networking
    Replies: 2
    Last Post: 21st September 2004, 05:13 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[[template footer(Guest)]]