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

..gw route setup, tieing to the right nic fails



Hi, 

..I though adding routes to interfaces would tie them to the 
relevant interfaces?  What am I doing wrong here?:
gw:~# cat /etc/network/interfaces
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian 
# installation
# (network, broadcast and gateway are optional)
auto eth0 eth1 eth2 eth3
iface eth0 inet static
        address A.B.C.E
        netmask 255.255.255.224
        network A.B.C.D
        broadcast A.B.C.Z
        up route add -net A.B.G.0 netmask 255.255.255.128 gw A.B.C.F
        up route add -net A.B.H.128 netmask 255.255.255.128 gw A.B.C.G

iface eth1 inet static
        address A.B.H.1
        netmask 255.255.255.128
        network A.B.H.0
        broadcast A.B.H.127
        up route add -net 192.168.x.0 netmask 255.255.255.0 gw A.B.C.H
        up route add -net 192.168.y.0 netmask 255.255.255.0 gw A.B.C.H

iface eth2 inet static
        address I.J.K.M
        netmask 255.255.255.224
        network I.J.K.L
        broadcast I.J.K.T

iface eth3 inet static
        address K.L.M.P
        netmask 255.255.255.252
        network K.L.M.N
        broadcast K.L.M.Q
        gateway K.L.M.O
gw:~# route -n
Kernel IP routing table
Destination   Gateway   Genmask         Flags Metric Ref    Use Iface
K.L.M.N       0.0.0.0   255.255.255.252 U     0      0        0 eth3
A.B.C.D       0.0.0.0   255.255.255.224 U     0      0        0 eth0
I.J.K.L       0.0.0.0   255.255.255.224 U     0      0        0 eth2
A.B.H.0       0.0.0.0   255.255.255.128 U     0      0        0 eth1
A.B.H.128     A.B.C.F   255.255.255.128 UG    0      0        0 eth0
A.B.G.0       A.B.C.G   255.255.255.128 UG    0      0        0 eth0
192.168.x.0   A.B.C.H   255.255.255.0   UG    0      0        0 eth0
192.168.y.0   A.B.C.H   255.255.255.0   UG    0      0        0 eth0
0.0.0.0       K.L.M.O   0.0.0.0         UG    0      0        0 eth3
gw:~#

-- 
..med vennlig hilsen = with Kind Regards from Arnt... ;-)
...with a number of polar bear hunters in his ancestry...
  Scenarios always come in sets of three: 
  best case, worst case, and just in case.



Reply to: