Saturday, December 22, 2018

Linux ip forwarding not working for VLANs

my Linux router has 1 nic (eth0) and it's running in 10.20.0.0/22 subnet. My home computer connected to it through ppp and sits in 192.168.192.0/24 subnet. After setting Linux router to net.ipv4.ip_forward=1 and setting route for 10.20.0.0/22 subnet on my home computer to 192.168.192.101 (Linux router IP on ppp interface), ping to any computer in 10.20.0.0/22 subnet works fine.

Problem accured when I added new vlan (200) on Linux router. I checked it's interface (eth0.200), routes, IP address that it get and sent ping to router located in 200 vlan(10.200.0.1) - everything works fine. But after adding route to 10.200.0.0/22 subnet on my home computer same way I did for 10.20.0.0/22, ping to 10.200.0.1 didn't work. After some research many suggest to switch rp_filter in kernel settings to 0 but it's already set to this value by default on Debian.

I have a suspicion that the problem lies in vlan tagging. eth0, ppp has untagged traffic while everything in eth.200 runs with 200 vlan tag.

Any suggestions what it could be?



No comments:

Post a Comment