[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Multiple IP addresses on one machine, and routing.



Title: Multiple IP addresses on one machine, and routing.

I am having some headaches getting more than one IP address to work properly on a machine.  I can make it work with neither multiple nics or aliased interfaces.

In both cases, connectivity to the same subnet works just fine.   I do not have any connectivity to other subnets, however.

Symptoms:
eth0 is on one subnet, and  eth1 is on another.
When I ping either interface from their respective subnets, all is well.
When I send a ping to eth0 from another subnet, all is well.  The default gateway is located on the same subnet as eth0.

When I send a ping to eth1 from another subnet, I get no response. 
When I send a packet from eth0 to another subnet while sniffing, it leaves eth0 and gets a response, and all is well.
When I send a packet from eth1 to another subnet while sniffing, it leaves -eth0- and recieves a response on eth1.  It does not seem to get the recieved packet internally, however.

Ifconfig output:
eth0      Link encap:Ethernet  HWaddr 00:50:DA:B5:BE:81 
          inet addr:164.229.232.10  Bcast:164.229.232.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:44370390 errors:0 dropped:0 overruns:0 frame:0
          TX packets:45054387 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          Interrupt:11 Base address:0xe000

eth1      Link encap:Ethernet  HWaddr 00:02:B3:2A:C7:A9 
          inet addr:164.229.233.2  Bcast:164.229.233.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:864453 errors:0 dropped:0 overruns:0 frame:0
          TX packets:38706 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          Interrupt:10 Base address:0xe000

Here are some juicy bits of route -C -n

two standard entries for eth0, showing default gateway.
Source          Destination     Gateway         Flags Metric Ref    Use Iface
164.229.232.10  164.229.127.4   164.229.232.1         0      0      757 eth0
164.229.1.50    164.229.232.10  164.229.232.10  l     0      0     2566 lo

After performing a dns lookup from both addresses, i get these relevant entries:

164.229.14.3    164.229.232.10  164.229.232.10  l     0      0      653 lo
164.229.233.1   164.229.233.2   164.229.233.2   il    0      0        0 lo
164.229.233.2   164.229.14.3    164.229.232.1         0      0        1 eth0

164.229.14.3 bound for 164.229.233.2 never appears in the routing table.

I am stumped as to why this does not work, especially considering I have an iptables box at home.  Enabling IP forwarding in /proc/sys/net/ipv4/ip_forward doesnt help anything.  Any ideas?

Ben Lavender
System Administrator, Newsouth Communications
NCTAMS LANT DET NOLA




Reply to: