Help: complex iproute2

Help: complex iproute2

Post by Joseph Car » Tue, 09 Jan 2001 04:03:57

I am getting ready to embark on a somewhat complex LRP deployment that I
was hoping someone could comment on before I get started.  Here is the
  I have two outside interfaces.  A cable modem (using DHCP) and an IDSL
link.  I have an internal network with some wireless ether mixed in.
Some of the machines on the network use the cable modem to the outside
and some use the IDSL link (defined as gateway at the host).  This is
how I want it.  I am not trying to load balance.
I currently have two separate linux boxes acting as gateway (and masq.)
for each of the outside links.  I would like to take all this routing
and boil it down into a single box.  Most of my concern is with
getting all the routing to work correctly with iproute2 which I have not
done much with.  The following is what I propose:
  The PCMCIA and wireless stuff could wait until I get
everything else working.  It seems that I will need 4 NIC's to
accomplish this (unless aliasing).

eth0 = cable
eth1 = IDSL
eth2 = Lan-cable, incoming LAN traffic default route through eth0
eth3 = Lan-IDSL, incoming LAN traffic default route through eth1

Then use iproute2 to setup four custom routing tables triggered by the
following rules:

ip rule add iff eth0 table eth0_table prio 200
ip rule add iff eth1 table eth1_table prio 201
ip rule add iff eth2 table eth2_table prio 202
ip rule add iff eth3 table eth3_table prio 203

Then the custom tables get populated with the following default routes.
Is the above and below syntax correct???  I have just extrapolated from
the documentation that I could find, and have never seen actual examples
of the "iff" selector that I use above.

ip route add default via dev eth0 table eth0_table
ip route add default via dev eth1 table eth1_table
ip route add default via dev eth0 table eth2_table
ip route add default via dev eth1 table eth3_table

Now, if aliasing would work in the rule statements like below, it would
seem that I could get away with 3 NIC's?
 ip rule add iff eth2:0 table eth2-0_table prio 203
 ip rule add iff eth2:1 table eth2-1_table prio 203

After all that works, I'll deal with:
 ip masq.

I sure hope someone can check my logic and syntax.  The hard stuff is
the routing.  I don't think this would have been possible before
iproute2.  I think the rest of it is just mechanics.

Thanks a bunch,


1. Help: Can't Make a Simple iproute2 Configuration to Work

I've the following rules defined:

0:      from all lookup local
32764:  from all iif eth0 lookup 2
32766:  from all lookup main
32767:  from all lookup 253

and I've the following route set:

default via dev eth0

and I don't want to use the default route with gateway
I did a "ip ro flush cache", but I still can't ping my host.

Did I miss anything? The situation is so simple: I just want all packets
from eth0 goes back thru eth0. I'm a iproute2 newbie, so there must be
something I didn't do right. I know if I add the default route via, it'll work but it defeats my whole purpose: packet goes
back thru the same NIC it came in.

Any help appreciated!

2. Docs to setup and use Cern Httpd_3.0 Server on a Novell LAN.

3. help with iptables and iproute2

4. can an external modem be a winmodem?

5. URGENT help required - iproute2+tc Quality of Service

6. In your face, Roger! MS fights dirty!

7. QoS, Diffserv and port prioritisation with iproute2...HELP!!

8. pls help: umount2: Devices or resource busy

9. iproute2 + tc help

10. IPRoute2 (IP) compile help..?

11. having a hard time with iproute2 -- -help

12. need help on iproute2