[Xorp-users] Question on supporting multiple routing tables.

Ben Greear greearb at candelatech.com
Tue Aug 21 12:59:45 PDT 2007


Pavlin Radoslavov wrote:

> I continued the testing by connecting eth0 directly with eth1, and
> then used SO_BINDTODEVICE to see whether the UDP packet will be
> actually sent out of interface eth1 to eth0's IP address.
> It turned out that the preceding ARP request out of eth1 is never
> answered by the eth0 interface (probably the kernel recognizes that
> the origin of the ARP is that host itself so the ARP reply is
> suppressed).
> However, after playing a bit I was able to add the ARP entry by
> hand, but it was a bit tricky:
> 
> 1. Added the ARP entry, where xx:xx:xx:xx:xx:xx is the Ethernet
> address of eth0. Note that it must be done before configuring
> the IP address on eth0:
> arp -s 10.0.0.3 xx:xx:xx:xx:xx:xx
> 
> 2. Configure the IP address on eth0:
> ip addr add 10.0.0.3/8 dev eth0

You can also patch the kernel with a patch similar to this
and ARP will resolve as normal once you enable 'sts' for the
interfaces:

http://lists.openwall.net/netdev/2007/06/09/1

> In conclusion, if you are running 2+ virtual routing instances each
> of them with separate forwarding tables in the kernel and a
> allocated corresponding subset of the physical interfaces, then it
> is possible to use SO_BINDTODEVICE to make sure that unicast packets
> transmit by one virtual router are transmit over the physical link
> to another virtual router, but it is tricky (see the above ARP
> hack).

This is what I am trying to do.  I am still working on integrating
Xorp with my app, but should have some progress soon.

Thanks,
Ben

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Xorp-users mailing list