Iproute2 and tunctl interface
Hello everybody's
I recently install the last GNS3 version on my Ubuntu laptop and try to create a lab with 2 cloud.
Each cloud are attach to a tap interface create with tunctl, and connect to a emulate router.
But i have some problem to make default route efficient for each tap interface with iproute2.
Thereafter my configuration:
Code:
echo "Configure interface"
ip a add 192.168.4.2/24 dev tap0
ip l set tap0 up
ip a add 192.168.5.2/24 dev tap1
ip l set tap1 up
echo ""
echo "Activate network route"
ip r add 192.168.4.0/24 dev tap0
ip r add 192.168.5.0/24 dev tap1
echo ""
ip r add default via 192.168.4.1 dev tap0 table lan
ip r add default via 192.168.5.1 dev tap1 table lan_client
echo "Create iptables rules"
iptables -t mangle -A OUTPUT -o tap0 -j MARK --set-mark 1
iptables -t mangle -A OUTPUT -o tap0 -j DSCP --set-dscp-class EF
iptables -t mangle -A OUTPUT -o tap1 -j MARK --set-mark 2
iptables -t mangle -A OUTPUT -o tap1 -j DSCP --set-dscp-class CS7
echo ""
echo "Create ip rule rules"
ip rule add fwmark 1/0xff dev tap0 table 200
ip rule add fwmark 2/0xff dev tap1 table 201
echo ""
But when i try to ping any address who don't figure in my network the packet doesn't go out.
Ps: i edit the rt_tables file correctly with 200 lan and 201 lan_client
If any one have some idea .... ;-)