Linux router w/3 nics - need help with routing

From: bob (notlinux101_at_yahoo.com)
Date: 10/31/03


Date: 30 Oct 2003 19:07:36 -0800

Howdy

  I am setting up a RedHat 7.3 router on a Dell gmt5100 (i586). When
I boot up the machine the routing table shows (2) entries for eth2.
  How dose this happen? Is there a file somewhere that contains this
information?

  I have been trying to delete the unwanted routing information and
then install the route I want. While I can easily install the route I
want I have not been able to find the magic combo to delete the
unwanted routes for eth2.
  Can someone tell me what form the route del -net 63.225.xxx.0 dev
eth2 command should take.

  I have printed out the route man page and read it too many times.
HELP!

-=-
contains of /etc/sysconfig/network-scripts/ifcfg-eth*

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.1
NETMASK=255.255.255.0
GATEWAY=63.225.xxx.x8

DEVICE=eth1
ONBOOT=yes
IPADDR=63.225.xxx.x6
NETMASK=255.255.255.0

DEVICE=eth2
ONBOOT=yes
IPADDR=63.225.xxx.x7
NETMASK=255.255.255.0

-=-
output of ifconfig
eth0 Link encap:Ethernet HWaddr 00:A0:C9:84:02:36
          inet addr:192.168.0.1 Bcast:192.168.0.255
Mask:255.255.255.0
          UP BROADCAST MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:4 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 b) TX bytes:168 (168.0 b)
          Interrupt:11

eth1 Link encap:Ethernet HWaddr 00:50:BA:54:F8:3D
          inet addr:63.225.xxx.x6 Bcast:63.225.xxx.255
Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 b) TX bytes:960 (960.0 b)
          Interrupt:10 Base address:0x8400

eth2 Link encap:Ethernet HWaddr 00:40:05:59:9F:03
          inet addr:63.225.xxx.x7 Bcast:63.225.xxx.255
Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 b) TX bytes:240 (240.0 b)
          Interrupt:5 Base address:0x240
                                
lo Link encap:Local Loopback
          inet addr:127.0.0.1 Mask:255.0.0.0
          UP LOOPBACK RUNNING MTU:16436 Metric:1
          RX packets:70 errors:0 dropped:0 overruns:0 frame:0
          TX packets:70 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4892 (4.7 Kb) TX bytes:4892 (4.7 Kb)

-=-
output of route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref
Use Iface 63.225.xxx.0 0.0.0.0 255.255.255.0 U 0 0 0
eth2
63.225.xxx.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 63.225.xxx.x8 0.0.0.0 UG 0 0 0 eth1

-=-
containts of /etc/rc.d/rc.local

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
echo 1 > /proc/sys/net/ipv4/conf/eth2
echo 1 > /proc/sys/net/ipv4/conf/all/proxy-arp
echo 1 > /proc/sys/net/ipv4/tcp-syscookies
-==-

using iptables and shorewall 1.4.10a
                                                     
TIA

Bob



Relevant Pages

  • Multihomed Masquerading, routing and iptables
    ... routing table rules set up correctly, ... I am getting traffic leaving eth2 with the source IP header set ... to eth3 and vice versa. ... ip route add to default via 62.252.21.254 dev eth3 table NTL ...
    (comp.os.linux.networking)
  • Re: IP forwarding
    ... The routing table seems to have allocated 'lo' as the device for ... instead of eth2. ... as we see from the output of 'route' command. ...
    (comp.os.linux.networking)
  • Re: Valid Routing Query
    ... The route you describe for a journey from Woking to Slough route ... Exeter, Bristol or Swindon would be much higher than the cost of your ... however based on the online routing ... other maps to allow a complete tracing. ...
    (uk.railway)
  • RE: Fax routing
    ... I understand you could not route your ... Open Server Management ... E-mail incoming routing method" ...
    (microsoft.public.windows.server.sbs)
  • Re: What is the default precedence: local-route, static-route, OSPF-route?
    ... Routing Example #1 ... - EIGRP summary route ... the one with the lowest administrative distance value is ... This administrative distance of a static route can be ...
    (comp.dcom.sys.cisco)