My Linux Redhat server has recently been assigned a new IP address. The httpd.conf file was changed so that the virtualhost references the new server, and users appear to be able to connect without problems.
However, I cannot do operations such as ping or ssh while logged into the server. The pings still reference the old IP address. They say 'PING yahoo.com (216.115.108.243) from (old IP address)'.
What do I need to modify to make pings, lynxs, and sshs work correctly?
I noticed that the eth0:1 virtual ethernet still lists the old IP address in Webmin, while the eth0 regular ethernet lists the new IP address. Should I update this as well?
priyadi
01-24-2002, 01:37 PM
Originally posted by NVB
I noticed that the eth0:1 virtual ethernet still lists the old IP address in Webmin, while the eth0 regular ethernet lists the new IP address. Should I update this as well?
You bet. All you need to do is change all references to your old IP address to the new one. The challenge is to find all of them scattered around your filesystem. :)
I have once changed my server IP simply by using search and replace throughout the whole filesystem. But, if you don't have physical access to the machine, it is not a good idea to do that.
T_E_O
01-25-2002, 06:02 AM
If I were you, I'd just issue a 'ifconfig eth0:1 down' to make sure your old ip-address is not working anymore, but your default route might still run through that ip-address, so it's a little risky :)
Can you give me an output of 'ifconfig' and 'route' ?
Can you give me an output of 'ifconfig' and 'route' ?
Here is the output of ifconfig:
eth0 Link encap:Ethernet HWaddr 00:10:DC:AD:5B:0F
inet addr:64.247.26.14 Bcast:64.247.26.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:207078165 errors:0 dropped:0 overruns:0 frame:0
TX packets:250598430 errors:11 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
Interrupt:11 Base address:0xec00
eth0:1 Link encap:Ethernet HWaddr 00:10:DC:AD:5B:0F
inet addr:64.156.2.14 Bcast:64.156.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:11 Base address:0xec00
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:92023 errors:0 dropped:0 overruns:0 frame:0
TX packets:92023 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
Here is the output of route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
lv * 255.255.255.255 UH 0 0 0 eth0
domain.com * 255.255.255.255 UH 0 0 0 eth0
64.156.2.0 * 255.255.255.0 U 0 0 0 eth0
64.247.26.0 * 255.255.255.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 64.247.26.1 0.0.0.0 UG 0 0 0 eth0
default 64.247.26.1 0.0.0.0 UG 0 0 0 eth0
64.156.2.14 is the old dead IP address, 64.247.26.14 is the new one. I recently discovered that sendmail is also failing. I suspect the sendmail problems are also related to the new IP address.
T_E_O
01-25-2002, 12:45 PM
It seems your default route is already running through interface eth0 instead of eth0:1, which is a good thing.
Seems to me you can safely deactivate eth0:1 by running the command 'ifconfig eth0:1 down'.
Anyone got any suggestinos or do you agree that this will probably do the trick ? :)
I updated the eth0:1 IP address in webmin. Now eth0:1 is missing from ifconfig. This probably had the same effect as issuing the down command. Things appear to be functioning correctly. I can ping, ssh, lynx, etc. Thanks for your help.
T_E_O
01-25-2002, 02:42 PM
Happy to hear it worked and that I could help you :)