Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing IP address to a link 1

Status
Not open for further replies.

Esmerelda

Technical User
Jun 20, 2002
105
US
UNIX box is a CMS system (Call Management) with seven Avaya PBXs dumping data. One of the IP addresses changes. I change the IP address in /etc/ hosts, and make the necessary changes in the PBX. Everything looks great, but, it doesn't work. Perhaps I need to remove and add the link to the routing table? I'm a bit timid.

Thanks..
 
No, I didn't reboot during my testing phase, although the box has been rebooted at least once since my last try (although I had changed back to the old address). I wasn't considering this a major change for the Unix box, since, it is merely a link, and not a NIC card programming change.

Would a reboot rebuild that routing table?

Also, I didn't chmod the /etc/hosts file back to 444.
 
Are you changing the IP Address of a NIC or a machine that it points to? Check your /etc/hosts for any other entries with that IP and your /etc/nsswitch.conf as well.
 
No, I am NOT changing the NIC. Just IP address of one of the PBXs that is linked to it. Yesterday I discovered where the routing table is hidden, and, haven't checked the routing table during any of my failed attempts. I can't find anything that tells me to change the routing table, but, am thinking that I will need to:
route add host xxx.xxx.xxx.xxx (IP address of remote host) xxx.xxx.xxx.xxx (IP address of my NIC - hme0:1
I'm troubled, because there doesn't seem to be any documentation that tells me to do this, and, because, I don't know if I should leave the old route in until I am sure the new one works.

/etc/nsswitch.conf shows everything pointing to files (I don't know what that means).
 
Yep, ping and traceroute both directions work great.
 
Six Avaya IP's are in /etc/hosts all working OK,
and you can "ping IP_7"
so not all bad...

Is IP_7 currently in your /etc/hosts file or have you removed, have you attempted this change more than once,
and are the IP's all on the same sub-net or all totally different?

You shouldn't have to reboot to pick up a new IP in hosts
 
I did that the other week and it broke my connection. Is that the expected behaviour?

All I ask of you
Is make my wildest dreams come true
 
My remote links are all in different cities than my Unix box. I did make the change in /etc/hosts. I commented out the original address, and, added another line for the new address pointing to "switch 2".

I'm afraid of the "route flush" command.

I think I may try it again tonight, but, this time I will look at the routing table, and do a route get xxx.xxx.xxx.xxx (the IP address of the remote host). It probably won't work, but, at least I will know. And, then I may just get brave and add it manually into the routing table. I have a lot of respect for Unix, if you know what I mean.
 
If you do it remotely then yea it would probably break your connection. The reason why is that I think it even removes your default entry. So, if you are on subnet 192.168.1.0 and your machine is on 192.168.2.0 then you will probably be booted off. If you are on the same net though I do not think it effects you.
 
I have seven host connections that are way more critical than my connection, because, I can go to the Unix box and use the console there. I think that route flush may, either bounce, or tear down all seven of my host connections.
 
Good Luck Esmerelda, let us know how it went, maybe a typo in the hosts!
You could try , if it still fails,
"netstat -a|grep your old IP_7"

 
Can you give the output of:

Code:
netstat -r

netstat -rn

That will show your routing table with hostnames mapped and without hostnames mapped.
 
I had to XXX some addresses, but, it still makes sense (it's my switch2 connection, and, .219):

Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
switch4 r3sowwa_1 UH 1 190 hme0
switch2 r3sowwa_1 UH 1 192 hme0
switch6 r3sowwa_1 UH 1 190 hme0
switch5 r3sowwa_1 UH 1 192 hme0
switch7 r3sowwa_1 UH 1 191 hme0
switch1 r3sowwa_1 UH 1 190 hme0
switch3 r3sowwa_1 UH 1 190 hme0
xxx.xxx.127.200 r3sowwa_1 U 1 0 hme0
xxx.xxx.211.176 r3sowwa U 1 385 eri0
224.0.0.0 r3sowwa U 1 0 eri0
default router UG 1 7417

**********************************************************************

Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
xxx.xxx.216.243 xxx.xxx.127.203 UH 1 166 hme0
xxx.xxx.247.219 xxx.xxx.127.203 UH 1 168 hme0
xxx.xxx.196.29 xxx.xxx.127.203 UH 1 166 hme0
xxx.xxx.207.244 xxx.xxx.127.203 UH 1 168 hme0
xxx.xxx.207.247 xxx.xxx.127.203 UH 1 167 hme0
xxx.xxx.211.195 xxx.xxx.127.203 UH 1 166 hme0
xxx.xxx.211.196 xxx.xxx.127.203 UH 1 166 hme0
xxx.xxx.127.200 xxx.xxx.127.203 U 1 0 hme0
xxx.xxx.211.176 xxx.xxx.211.183 U 1 335 eri0
224.0.0.0 xxx.xxx.211.183 U 1 0 eri0
default xxx.xxx.211.177 UG 1 7011
127.0.0.1 127.0.0.1 UH 11 113 lo0
*******************************************************************
r3sowwa# route get 198.239.247.219
route to: switch2
destination: switch2
mask: 255.255.255.255
interface: hme0
flags: <UP,HOST,DONE,STATIC>
recvpipe sendpipe ssthresh rtt,ms rttvar,ms hopcount mtu expire
0 0 0 0 0 0 1500 0
 
Yes, I did retry. It didn't work. I am feeling rather foolish, but, upon further study, I'm guessing that this type of a change will need to be added to the boot script so that it won't be lost on boot. Cerium has given us a quote to do this, but, I have asked to be in conference when the work is done. It will either be something really simple that I am overlooking, or, it will be something that I would not have been able to figure out, anyway.
 
Silly question, I suppose, but, should I touch /etc/hosts?
 
Can't see that would really help. Possibly a reboot mght clear out any problems/ports
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top