Network Issues - IP Reverts back to previous setting!
Hello,
I'm running FC6 on an old box (1.8ghz Celly / 512 DDR / Integrated Ethernet), and never had a problem before, until recently, when I modified my network. The box is headless, and all administration is through SSH / Web. I run a number of things on this server (Webserver, Samba, etc) What I did: 1. Change its IP from 10.2.254.3 to 10.2.10.3 2. Changed Subnet from 255.255.240.0 to 255.255.255.0 3. Changed nameserver from 10.2.254.1 to 10.2.10.1 4. Changed gateway from 10.2.254.1 to 10.2.10.1 However these settings NEVER stick. They ALWAYS reset themselves back to 10.2.254.3 for IP, 255.255.240.0 for subnet, and gateway and nameserver also go back to 10.2.254.1. I tried setting up the network using the network set up script "netconfig", and it didn't even change the IP to begin with. So used: Code:
[root@FC6Server ~]# ifconfig eth0 10.2.10.3 netmask 255.255.255.0 Now that I've set it all up, if I simply type Code:
[root@FC6Server ~]# /etc/init.d/network restart Even though I have manually set it, there is a good chance that it will just revert by itself. I have no idea what triggers it even. This is really driving me up the wall :mad:. Why is this happening? |
Just for kicks and grins, could you please post the content of /etc/init.d/network?
|
Sure.
Code:
#! /bin/bash |
Ok, the file you posted is a leeeeetle more complex than the one on my system.
Here's what you do, if you're up to it: Look at all the files which this file references. Then look at all the files those files reference. And so on. Somewhere in there you should find hard-coded the IP addresses (and masks and such) that you no longer want. Change them to be what you do want. Be thorough and complete and accurate. It's a pain, I know. Hope this helps. |
Check these files.
/etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-eth0 Also make sure you don't have a dhcp client running in the background as that can overwrite IP settings. |
the ifconfig command is used to create a IP alias, it means the ip address settings set by it are correct me if i'm wrong people but only temporary so if you restart the system or unplug the network cable for the computer then the settings will revert back, you need to edit the file as sugested above, not sure if its same files for FC cos i dont use FC personally but it will be something like that no doubt
|
I checked both those files, and they have the settings which I set via ifconfig. Everything appears to be working, for the time being.
|
All times are GMT -5. The time now is 01:45 AM. |