Routing rules for eth1 eth0 are not respected [FRWY-LS1012A Board]

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Routing rules for eth1 eth0 are not respected [FRWY-LS1012A Board]

Jump to solution
771 Views
OzTheWizard
Contributor III

So I'm currently using 2x FRWY-LS1012A Board running LSDK 20.12 in set up as shown in figure below.

Multilink hop chart-Page-9.drawio.png

What I want to achieve is being able to ping device from left (Rpi3B) to right (Rpi4B). Routing tables are correctly configured and checked with mininet. I also appended routing rules of each of 4 devices in attachments. Green arrows mark ping actions that pass and red that don't, and they work exactly the same in opposite direction (right to left). 

Problem is I can't do what I want - ping from Rpi3B to Rpi4B (and vice versa). During "ping 192.168.10.150" from Rpi3B I used tcpdump to catch any icmp requests on Host A, and only got them on eth1 of Host A, but they didn't reach eth0 on Host A despite it should according to routing rules ("192.168.18.0/24 dev eth0 proto kernel scope link src 192.168.18.69").

Does anyone know why? Does it have sth to do with PFE? 

0 Kudos
1 Solution
765 Views
OzTheWizard
Contributor III

I'll reply myself as I solved the problem. The problem does noting to do with device or LSDK, it is purely down to routing configuration and IP forwarding.

On Host A first add a routing rule for gateway via which 192.168.10.0 subnet can be reached:

 

sudo ip route add 192.168.10.0/24 via 192.168.18.70

 

On Host B first add a routing rule for gateway via which 192.168.11.0 subnet can be reached:

 

sudo ip route add 192.168.11.0/24 via 192.168.18.69

 

On host A and B enable ip forwarding and set forwarding rule between eth0 and eth1:

echo 1 > /proc/sys/net/ipv4/ip_forward
sudo iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
sudo iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT

 ..and that would be it.

View solution in original post

Tags (1)
0 Kudos
1 Reply
766 Views
OzTheWizard
Contributor III

I'll reply myself as I solved the problem. The problem does noting to do with device or LSDK, it is purely down to routing configuration and IP forwarding.

On Host A first add a routing rule for gateway via which 192.168.10.0 subnet can be reached:

 

sudo ip route add 192.168.10.0/24 via 192.168.18.70

 

On Host B first add a routing rule for gateway via which 192.168.11.0 subnet can be reached:

 

sudo ip route add 192.168.11.0/24 via 192.168.18.69

 

On host A and B enable ip forwarding and set forwarding rule between eth0 and eth1:

echo 1 > /proc/sys/net/ipv4/ip_forward
sudo iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
sudo iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT

 ..and that would be it.

Tags (1)
0 Kudos