ido / libvma-old

Automatically exported from code.google.com/p/libvma
Other
0 stars 1 forks source link

VMA does not honor multiple routing tables with policy-based routing #17

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Given two local interfaces, mlx0 and mlx1, give them IP addresses in the 
same subnet.
2. Set up the proper routing tables and rules.
3. Write a simple test application; create a TCP socket, bind() it to a 
specific local IP address and try to connect() to an external IP like 8.8.8.8. 
Doing this without loading VMA succeeds. Once you try this with VMA it fails 
finding the gateway for that particular interface and is not able to connect, 
giving errors about not being able to find the destination gateway and 
subsequently saying it can't lookup the neigh for the destination. For the 
record, this fails with SO_BINDTODEVICE as well.

An example of the whole process:

sysctl net.ipv4.conf.all.arp_ignore=1
sysctl net.ipv4.conf.all.arp_announce=2

ip link set dev mlx0 up
ip link set dev mlx1 up

ip addr add dev mlx0 10.0.0.201/24 brd +
ip addr add dev mlx1 10.0.0.202/24 brd +

ip route add 10.0.0.0/24 dev mlx0 proto kernel scope link src 10.0.0.201 table 
10
ip route add 10.0.0.0/24 dev mlx1 proto kernel scope link src 10.0.0.202 table 
20

ip route add default via 10.0.0.254 dev mlx0 table 10
ip route add default via 10.0.0.254 dev mlx1 table 20

ip rule add from 10.0.0.201 pri 10000 lookup 10
ip rule add from 10.0.0.202 pri 10000 lookup 20

What is the expected output? What do you see instead?
The expected output is that VMA will lookup the proper route using the routing 
rules and the proper table (lookup rule for src ip 10.0.0.202 for example, see 
it resides in routing table 20, lookup routing table 20 and find the default gw 
there). Instead, VMA fails to find the proper route because it only looks at 
the main routing table and does not consider routing rules at all.

What version of the product are you using? On what operating system?
libvma v6.6.0, Debian with kernel 3.12-rt

Please provide any additional information below.

Original issue reported on code.google.com by shmu...@gmail.com on 16 Jun 2014 at 11:12

GoogleCodeExporter commented 9 years ago

Original comment by olga.sh...@gmail.com on 17 Jun 2014 at 6:44

GoogleCodeExporter commented 9 years ago
Hi, 

We recently added support for secondary route tables.
Please see here: 
https://code.google.com/p/libvma/source/detail?r=9af1df10f2e23776c252078b156cee0
226caec59

Can you please check if this sovled your issue?

Thanks

Original comment by orkmella...@gmail.com on 27 Jul 2014 at 8:17