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

2008-12-16, 02:56 PM CST
|
|
Registered User
|
|
Join Date: Dec 2008
Posts: 6

|
|
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?
|

2008-12-16, 08:12 PM CST
|
|
Registered User
|
|
Join Date: Mar 2006
Posts: 425

|
|
|
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
|

2008-12-16, 08:32 PM CST
|
|
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.
|

2008-12-17, 06:43 AM CST
|
 |
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.
|

2008-12-17, 06:47 AM CST
|
 |
Registered User
|
|
Join Date: Jul 2007
Location: Beijing, China
Posts: 1,024

|
|
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.
__________________
"How easy it is to mistake clear reasoning for correct reasoning!" -- Hayt
|

2008-12-17, 02:48 PM CST
|
|
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?
|

2008-12-17, 05:40 PM CST
|
 |
Registered User
|
|
Join Date: Jul 2005
Location: Bora Bora, French Polynesia
Posts: 3,364

|
|
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; 2008-12-17 at 05:43 PM CST.
|

2008-12-17, 06:11 PM CST
|
|
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)
|

2008-12-17, 07:06 PM CST
|
 |
Registered User
|
|
Join Date: Jul 2005
Location: Bora Bora, French Polynesia
Posts: 3,364

|
|
|
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
|

2008-12-17, 07:10 PM CST
|
|
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.
|

2008-12-18, 11:17 AM CST
|
|
Registered User
|
|
Join Date: Mar 2006
Posts: 425

|
|
|
They must not have been all hardlinked on my system because I changed each one individually in sequence.
__________________
jbkt23
|

2008-12-18, 11:24 AM CST
|
 |
Registered User
|
|
Join Date: Sep 2008
Location: Tallahassee
Age: 25
Posts: 234

|
|
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.
|

2008-12-18, 10:48 PM CST
|
 |
Registered User
|
|
Join Date: Jul 2007
Location: Beijing, China
Posts: 1,024

|
|
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...
__________________
"How easy it is to mistake clear reasoning for correct reasoning!" -- Hayt
|

2008-12-19, 02:06 PM CST
|
|
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.
|

2008-12-19, 02:37 PM CST
|
 |
Registered User
|
|
Join Date: Jul 2007
Location: Beijing, China
Posts: 1,024

|
|
|
The recent Koji build of system-config-network seems to have corrected the static IP bug.
__________________
"How easy it is to mistake clear reasoning for correct reasoning!" -- Hayt
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Automatic Translations (Powered by  ):
All times are GMT -7. The time now is 07:59 AM CST.
|
|
 |
 |
 |
 |
|
|