Linux Route/Loopback Problem - 2 STAs on same machine
alberto alvarez gonzález
alberto_nembra at hotmail.com
Thu Aug 6 13:07:27 EDT 2009
I'm facing a weird setup with multiple TAPs devices in one Linux host. What I have to achieve is
force them to behave like independent isolated network devices.
Lets say we have 2 TAPs devices:
tap1 10.1.1.1/24 default gw 10.1.1.2
tap2 10.1.3.4/24 default gw 10.1.3.1
I've managed to configure routes using 2 additional tables. When pinging any host outside the current machine (ping -I 10.1.1.1 10.1.3.X, X!=4) works perfectly, and the first time
it ask for the gateway's mac address as we hoped.
Using Send-to-self pacth from http://www.ssi.bg/~ja/#loop I do get packets on the right interface (no loopback) when pinging between TAPs
ping -I 10.1.1.1 10.1.3.4.
But the problem here is that it uses destination address to ask for MAC address in the arp resolution, instead of asking for gateway's one. I'm pretty sure this
is due to the local entries in local routing table. How can I avoid local policies for outgoing flows and still mantain kernel's knowledge about local interfaces for incoming packets.
Searching google and this list I've found this very same case in an old post.
There is suggested that deleting local routes in local route table, but then, as I've tested
incoming packets don't know where to go.
Last post in the list about that subject ends with a rate of 90% solved. As it is a quite old post I'm wondering if
a 100% working solution already exists for our problem :-)
Any help or clue would be really helpful, I'm almost desperate here
Entérate de todas las noticias al instante ¡Suscríbete al servicio de Alertas MSN!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the HostAP