[CentOS] Local Host Routing

Tue Jun 2 23:31:11 UTC 2009
Al Sparks <data345 at yahoo.com>

I have, a machine running RHEL ES 4.7 with 2 physical interfaces.

  eth0      Link encap:Ethernet  HWaddr 00:14:22:1C:B4:EA  
            inet addr:10.7.13.61  Bcast:10.7.13.255  Mask:255.255.255.0
            inet6 addr: fe80::214:22ff:fe1c:b4ea/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:590936429 errors:0 dropped:0 overruns:0 frame:0
            TX packets:590246457 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000 
            RX bytes:361946964 (345.1 MiB)  TX bytes:3358327885 (3.1 GiB)
  
  eth1      Link encap:Ethernet  HWaddr 00:14:22:1C:B4:EB  
            inet addr:10.254.214.16  Bcast:10.254.214.255  Mask:255.255.255.0
            inet6 addr: fe80::214:22ff:fe1c:b4eb/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:423509 errors:0 dropped:0 overruns:0 frame:0
            TX packets:19440 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000 
            RX bytes:35948215 (34.2 MiB)  TX bytes:2850651 (2.7 MiB)
  
  lo        Link encap:Local Loopback  
            inet addr:127.0.0.1  Mask:255.0.0.0
            inet6 addr: ::1/128 Scope:Host
            UP LOOPBACK RUNNING  MTU:16436  Metric:1
            RX packets:115612666 errors:0 dropped:0 overruns:0 frame:0
            TX packets:115612666 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:0 
            RX bytes:96931918 (92.4 MiB)  TX bytes:96931918 (92.4 MiB)

By default both interfaces route through the default gateway.

  $ route -n
  Kernel IP routing table
  Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  10.7.13.0       0.0.0.0         255.255.255.0   U     0      0        0 eth0
  10.254.214.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1
  0.0.0.0         10.7.13.1       0.0.0.0         UG    0      0        0 eth0

The LAN, 10.254.214.0/24 that eth1 is a part of, is configured to not
route at all.  (Actually it's a VLAN, if that's germane).  However,
when I remove the route entry with:

   # route del -net 10.254.214.0 netmask 255.255.255.0

I lose connectivity with the nodes on the LAN.  When I do an 
    $ nmap -sP 10.254.214.0/24

the only thing that shows up is
     Host 10.254.214.16 appears to be up
which is the IP address of eth1.

I shouldn't need a routing gateway to reach these devices.  In
addition, even when the routing entry is there (or not) a ping from
eth1
    $ ping -I eth1 10.7.13.1

gives me destination unreachable, so the entry is pointless.  BTW,
    $ ping -I eth0 10.7.13.1

works fine as it should.

I guess it's not a big deal.  If it works don't fix it.  But I'm still curious.
Any ideas?
    === Al