Fedora Linux Support Community & Resources Center
Sections ›› Home | Forums | Guidelines | Forum Help | Fedora FAQ | Fedora News 

Go Back   FedoraForum.org > Fedora Support > Networking

Networking Networking with Fedora such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 2008-12-16, 02:56 PM CST
Brad7928 Offline
Registered User
 
Join Date: Dec 2008
Posts: 6
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?
Reply With Quote
  #2  
Old 2008-12-16, 08:12 PM CST
jbkt23 Offline
Registered User
 
Join Date: Mar 2006
Posts: 355
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
Reply With Quote
  #3  
Old 2008-12-16, 08:32 PM CST
Brad7928 Offline
Registered User
 
Join Date: Dec 2008
Posts: 6
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.
Reply With Quote
  #4  
Old 2008-12-17, 06:43 AM CST
jtang613's Avatar
jtang613 Offline
Registered User
 
Join Date: Apr 2004
Location: Ottawa, Canada
Posts: 1,901
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.
Reply With Quote
  #5  
Old 2008-12-17, 06:47 AM CST
aleph's Avatar
aleph Offline
Registered User
 
Join Date: Jul 2007
Location: Beijing, China
Posts: 859
Quote:
Originally Posted by jbkt23 View Post
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.
__________________
Those who can, do. Those who can't, loop.
Reply With Quote
  #6  
Old 2008-12-17, 02:48 PM CST
Brad7928 Offline
Registered User
 
Join Date: Dec 2008
Posts: 6
Quote:
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?
Reply With Quote
  #7  
Old 2008-12-17, 05:40 PM CST
Iron_Mike's Avatar
Iron_Mike Offline
Registered User
 
Join Date: Jul 2005
Location: Bora Bora, French Polynesia
Posts: 3,311
Quote:
Originally Posted by Brad7928 View Post
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; 2008-12-17 at 05:43 PM CST.
Reply With Quote
  #8  
Old 2008-12-17, 06:11 PM CST
Brad7928 Offline
Registered User
 
Join Date: Dec 2008
Posts: 6
Quote:
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.

Quote:
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)
Reply With Quote
  #9  
Old 2008-12-17, 07:06 PM CST
Iron_Mike's Avatar
Iron_Mike Offline
Registered User
 
Join Date: Jul 2005
Location: Bora Bora, French Polynesia
Posts: 3,311
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
Reply With Quote
  #10  
Old 2008-12-17, 07:10 PM CST
Brad7928 Offline
Registered User
 
Join Date: Dec 2008
Posts: 6
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.
Reply With Quote
  #11  
Old 2008-12-18, 11:17 AM CST
jbkt23 Offline
Registered User
 
Join Date: Mar 2006
Posts: 355
They must not have been all hardlinked on my system because I changed each one individually in sequence.
__________________
jbkt23
Reply With Quote
  #12  
Old 2008-12-18, 11:24 AM CST
Simian Man's Avatar
Simian Man Online
Registered User
 
Join Date: Sep 2008
Location: Tallahassee
Age: 25
Posts: 207
Quote:
Originally Posted by jbkt23 View Post
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.
Reply With Quote
  #13  
Old 2008-12-18, 10:48 PM CST
aleph's Avatar
aleph Offline
Registered User
 
Join Date: Jul 2007
Location: Beijing, China
Posts: 859
Quote:
Originally Posted by Simian Man View Post
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...
__________________
Those who can, do. Those who can't, loop.
Reply With Quote
  #14  
Old 2008-12-19, 02:06 PM CST
everestx Offline
Registered User
 
Join Date: Aug 2005
Posts: 24
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; 2008-12-19 at 02:09 PM CST.
Reply With Quote
  #15  
Old 2008-12-19, 02:37 PM CST
aleph's Avatar
aleph Offline
Registered User
 
Join Date: Jul 2007
Location: Beijing, China
Posts: 859
The recent Koji build of system-config-network seems to have corrected the static IP bug.
__________________
Those who can, do. Those who can't, loop.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora 10 | static ip issues forum.query Networking 50 2009-03-21 04:41 PM CDT
Need advice on /etc/hosts for static ISP IP, router, LAN, static LAN IP rshartog Networking 2 2009-02-20 10:24 PM CST
Kickstart with static IP on Fedora 9 moersfel Installation Help 2 2008-10-15 04:39 PM CDT
Fedora 9 static noise OldJohnB Installation Help 1 2008-05-20 05:47 PM CDT
FC2 Overriding static if in favor of dhcp system set for static pkraus109 Networking 2 2004-09-21 10:13 AM CDT

Automatic Translations (Powered by Powered by Google):
Afrikaans Albanian Arabic Belarusian Bulgarian Catalan Chinese Croatian Czech Danish Dutch English Estonian Filipino Finnish French Galician German Greek Hebrew Hindi Hungarian Icelandic Indonesian Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Taiwanese Thai Turkish Ukrainian Vietnamese Yiddish

All times are GMT -7. The time now is 07:43 PM CST.

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
Hosting provided by ThePlanet



All trademarks, and forum posts in this site are property of their respective owner(s).

FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact | Founding Members
Designed By Ewdison Then | Powered by vBulletin ©2000-2009, Jelsoft Enterprises Ltd.
FedoraForum is Powered by Open Source Projects and Products
Languages translations delivered by vBET