View Single Post
  #1   (View Single Post)  
Old 6th November 2008
anomie's Avatar
anomie anomie is offline
Local
 
Join Date: Apr 2008
Location: Texas
Posts: 445
Default Two NICs on same subnet

I have a Red Hat Enterprise Linux 4.7 server with two ethernet NICs on the same subnet. (Note that Linux names ethernet cards eth0, eth1,... ethn.)

Code:
# ifconfig | egrep 'eth|inet'
eth0      Link encap:Ethernet  HWaddr 00:22:19:04:EA:7A  
          inet addr:172.16.83.27  Bcast:172.16.83.31  Mask:255.255.255.224
eth3      Link encap:Ethernet  HWaddr 00:15:17:8C:7C:D1  
          inet addr:172.16.83.29  Bcast:172.16.83.31  Mask:255.255.255.224
eth0 (172.16.83.27) has sshd listening on tcp port 22. eth3 (172.16.83.29) has httpd listening on tcp port 443.

Code:
# netstat -ltn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State      
tcp        0      0 172.16.83.27:22             0.0.0.0:*                   LISTEN          
tcp        0      0 172.16.83.29:443            0.0.0.0:*                   LISTEN
I'm noticing some odd behavior: my host-level firewall logging shows that sometimes traffic to 172.16.83.29:443 is coming in on eth3, but other times traffic to 172.16.83.29:443 is coming in on eth0.

Here is my routing table:

Code:
# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
172.16.83.0     0.0.0.0         255.255.255.224 U         0 0          0 eth0
172.16.83.0     0.0.0.0         255.255.255.224 U         0 0          0 eth3
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth3
0.0.0.0         172.16.83.1     0.0.0.0         UG        0 0          0 eth0
I suspect the behavior I'm seeing could be solved by a routing table entry, but I am not confident that I know exactly what that entry should be. I'm willing to experiment a bit (while physically on site, in case I break the networking), but could someone speak to whether this makes sense and/or whether I appear to be barking up the right tree?
__________________
Kill your t.v.
Reply With Quote