William Gemmill
2007-Sep-16 22:04 UTC
Dual Connections with Soekris net4801and Pyramid Linux
I''m trying to connect to two ISPs the connections are as follows: Eth0 IP: 192.168.1.1 Mask: 255.255.255.0 Eth1 IP: 216.167.217.241 Mask: 255.255.255.0 Eth2 IP: 216.167.208.40 Mask: 255.255.255.0 Here are the commands to set things up: #Load modules insmod /lib/modules/2.6.19.2- pyramid.metrix.net/kernel/net/ipv4/multipath_drr.ko insmod /lib/modules/2.6.19.2-pyramid.metrix.net/kernel/net/ipv4/multipath_random.ko insmod /lib/modules/2.6.19.2- pyramid.metrix.net/kernel/net/ipv4/multipath_wrandom.ko insmod /lib/modules/2.6.19.2- pyramid.metrix.net/kernel/net/ipv4/multipath_rr.ko #Source IP routing for Eth2 ip rule add from 216.167.208.40 lookup 2 ip route add 192.168.1.0/24 via 192.168.1.1 table 2 ip route add 0/0 via 216.167.208.1 table 2 #Source IP routing for Eth1 ip rule add from 216.167.217.241 lookup 3 ip route add 192.168.1.0/24 via 192.168.1.1 table 3 ip route add 0/0 via 216.167.217.1 table 3 ip route add default equalize \ nexthop via 216.167.208.1 dev eth2 \ nexthop via 216.167.217.1 dev eth1 #Setup NAT iptables -F -t filter iptables -F -t nat iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE When the ip route add default equalize command is run it adds one default route to the routing table: pyramid:~# route -vn Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 216.167.217.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 216.167.208.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2 0.0.0.0 216.167.208.1 0.0.0.0 UG 0 0 0 eth2 However looking at ip route show both routes are present: pyramid:~# ip route show 216.167.217.0/24 dev eth1 proto kernel scope link src 216.167.217.241 192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.1 216.167.208.0/24 dev eth2 proto kernel scope link src 216.167.208.40 default equalize nexthop via 216.167.208.1 dev eth2 weight 1 nexthop via 216.167.217.1 dev eth1 weight 1 If I change the order of the routes for the ip route equalize command the first route listed there is always show in the routing table. But the route that is not listed by route -vn is always used. I do not understand why a single default gateway is being added. To my understanding no default gateways should be shown by route -vn. I have recompiled the kernel to include CONFIG_NETFILTER_NETLINK Any suggestions? Thanks. _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc