LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   IP alias problem (http://www.linuxquestions.org/questions/linux-networking-3/ip-alias-problem-781732/)

bulbous23 01-12-2010 11:33 AM

IP alias problem
 
I'm running ubuntu 9.04 and I have set up 2 ip aliases using the /etc/network/interfaces file http://pastie.org/775037 -- when I ping the main address 10.0.2.16, all works fine, same with the first alias 10.0.2.22 -- but I can't reach the 2nd alias 10.0.2.23 I get the following from ping:

PING 10.0.2.23 (10.0.2.23): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
92 bytes from 10.5.0.1: Destination Host Unreachable
Vr HL TOS Len ID Flg off TTL Pro cks Src Dst
4 5 00 5400 06eb 0 0000 3f 01 5e81 10.5.0.34 10.0.2.23


My machine's IP address is 10.5.0.34

I can't figure out why I can ping 10.0.2.22 but not 10.0.2.23 -- seems like there is probably some kind of routing thing that I'm missing, but I'm confused how it would have gotten set up for 10.0.2.22 but not 10.0.2.23 -- hopefully someone out there has an idea -- or can point me to references where I might be able to learn how to debug routing issues on a network?
Thanks in advance :)

Cheers
Kem

genese 01-12-2010 07:05 PM

traceroute from your machine ?

ping from localhost ?

iptables ?

bulbous23 01-13-2010 11:51 AM

here's my traceroute to a random outside machine:

traceroute to 198.60.22.2 (198.60.22.2), 30 hops max, 60 byte packets
1 * * *
2 68.66.164.21 (68.66.164.21) 1.077 ms 1.131 ms 1.312 ms
3 slkc.firstdigital.com (66.60.100.16) 65.452 ms 65.876 ms 65.912 ms
4 fdt-backbone.slkc.firstdigital.com (69.27.0.14) 5.393 ms 5.729 ms 5.815 ms
5 ge-6-19.car1.SaltLakeCity1.Level3.net (4.53.40.49) 6.028 ms 7.253 ms 7.620 ms
6 ae-11-11.car2.SaltLakeCity1.Level3.net (4.69.133.122) 5.981 ms 7.324 ms 6.858 ms
7 XMISSION-LC.car2.SaltLakeCity1.Level3.net (4.53.42.30) 7.333 ms 5.240 ms 5.464 ms
8 gi-3-15.dcr2.slc.xmission.net (166.70.5.78) 5.523 ms 5.455 ms 5.611 ms
9 * * *
10 * * *


I can ping 10.0.2.23 just fine from the machine itself

I'm not sure how to dump whatever IPTables information you want -- tried iptables-save but it did nothing,
iptables --list returns:
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination


so it looks like no iptables stuff at all to me

genese 01-13-2010 12:33 PM

on both systems : iptables -L -n

traceroute 10.0.2.22

traceroute 10.0.2.23

are they the same ?

investigate the config of 10.5.0.1 (interfaces/subnetting)

bulbous23 01-13-2010 02:58 PM

iptables -L -n gives:
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

on both the machine I'm aliasing, and on the machine I'm unable to connect to it with.


traceroute 10.0.2.22
traceroute to 10.0.2.22 (10.0.2.22), 64 hops max, 52 byte packets
1 10.5.0.1 (10.5.0.1) 1.329 ms 1.081 ms 1.060 ms
2 dev2 (10.0.2.22) 0.812 ms 0.659 ms 0.587 ms
bash-3.2$ traceroute 10.0.2.23
traceroute to 10.0.2.23 (10.0.2.23), 64 hops max, 52 byte packets
1 10.5.0.1 (10.5.0.1) 1.307 ms 0.924 ms 0.741 ms
2 10.5.0.1 (10.5.0.1) 298.955 ms !H 3339.146 ms !H 3339.733 ms !H


I suspected it might have something to do with 10.5.0.1 but I don't have access to that machine, and it doesn't seem likely that it would have any specific configuration for either IP address.

bulbous23 01-13-2010 05:13 PM

solved
 
So, I ended up figuring out what the deal was finally, posting here for future reference & for other people:

the 10.5.0.1 router had a dynamic routing cache. We (me and the network admin) were messing around on it, flushed the cache, and 10.0.2.22 disappeared.

This led us to realize that perhaps that router wasn't sending anything to the 10.0.2.22 & 10.0.2.23 addresses unless it had seen them before.

So in order to make it aware of them, I executed the following commands:

route add -host 198.60.22.2 dev eth0:1
route add -host 198.60.22.22 dev eth0:2
ping 198.60.22.2
ping 198.60.22.22

those commands basically tell the machine to route any outbound traffic to 198.60.22.2 and 198.60.22.22 through device eth0:1 and eth0:2 respectively. The instant there was outbound traffic from those devices, inbound traffic through the 10.5.0.1 router worked.

Thanks for your help genese :)


All times are GMT -5. The time now is 01:13 AM.