0

I'm in need of some assistance troubleshooting a policy routing issue.

I have a linux host with multiple VLANs. I'm trying to create a unique routing table for each VLAN and I can ping bidirectionally between the host and the router on VLAN20, however, on the upstream router I'm seeing ARP requests for remote IPs instead of ARP requests for the gateway or traffic being sent to the gateway from the Linux host.

Linux Host VLAN20: 192.168.20.50

Router interface VLAN20: 192.168.20.1

Created the table "vlan20"

$ cat /etc/iproute2/rt_tables

# # reserved values

# 255 local

254 main

253 default

220 vlan20

0 unspec #

#local

1inr.ruhep

Created rule to send all traffic sourced from VLAN20 interface using table vlan20

$ ip rule show

0: from all lookup local

32765: from all iif eth0.20 lookup vlan20

32766: from all lookup main

32767: from all lookup default

routing all traffic to the router vlan20 interface

$ ip route list table vlan20

default via 192.168.20.1 dev eth0.20

testing from linux host

ping 8.8.8.8 -I eth0.20

PING 8.8.8.8 (8.8.8.8) from 192.168.20.50 eth0.20: 56(84) bytes of data. From 192.168.20.50 icmp_seq=1 Destination Host Unreachable

From Router VLAN20 interface

9.568940 arp who-has 8.8.8.8 tell 192.168.20.50

10.565495 arp who-has 8.8.8.8 tell 192.168.20.50

Thanks for your assistance!

0

I guess a clash with the default host route is in question here. Assuming your linux host interface is eth0 and the host network is 10.77.0.0/24, run this command:
$ sudo ip route add 10.77.0.0/24 via 192.168.20.1 dev eth0.20 table vlan20 $ sudo ip rule add to 192.168.20.0/24 lookup vlan20 prio 10000

to avoid the loop you are seeing. I still can not post comments and since my previous answer was deleted (it was really a question not an answer) I would also say that the output of ip -4 addr show and ip route show should had been provided so we can see the netmasks too and the routing details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.