Why Static Routes Need to Be Bi-Directional

asymmetric-routingrouting

I am setting up a testbed for some VMs. These routes need to be static as this is an academic project. (I know that doing this manually is generally a bad idea. Trust me, I have a reason for this.)

I'm running into an issue where my hosts on the far ends cannot ping each other unless the route to and from go through all of the same hosts. Can someone help and explain why this is? Is there any way that I can set it up so that the return route is separate? For example, in the image below, can I make the ping out from n0 go through n1 -> n2 -> n4 -> n5 and return on n5 -> n4 -> n3 -> n1 -> n0?

Here is my network. Everything is a 10.1.y.x address. The links are shown with the last two octets.

              n2
            /     \
           / 2.x   \6.x
   5.x    /         \     4.x
n0 ---- n1           n4 ----- n5
          \         /
           \ 3.x   /1.x
            \     /
              n3 

Here are the routing tables for each, if that makes it clearer. All taken from "ip route":

n0

10.1.4.0/24 via 10.1.5.3 dev eth2 
10.1.5.0/24 dev eth2  proto kernel  scope link  src 10.1.5.2 
10.1.6.0/24 via 10.1.5.3 dev eth2 
10.1.1.0/24 via 10.1.5.3 dev eth2 
10.1.2.0/24 via 10.1.5.3 dev eth2 
10.1.3.0/24 via 10.1.5.3 dev eth2 

n1

10.1.4.0/24 via 10.1.3.3 dev eth3 
10.1.5.0/24 dev eth2  proto kernel  scope link  src 10.1.5.3 
10.1.6.0/24 via 10.1.2.3 dev eth4 
10.1.1.0/24 via 10.1.3.3 dev eth3 
10.1.2.0/24 dev eth4  proto kernel  scope link  src 10.1.2.2 
10.1.3.0/24 dev eth3  proto kernel  scope link  src 10.1.3.2

n2

10.1.4.0/24 via 10.1.6.3 dev eth2 
10.1.5.0/24 via 10.1.2.2 dev eth4 
10.1.6.0/24 dev eth2  proto kernel  scope link  src 10.1.6.2 
10.1.1.0/24 via 10.1.6.3 dev eth2 
10.1.2.0/24 dev eth4  proto kernel  scope link  src 10.1.2.3 
10.1.3.0/24 via 10.1.2.2 dev eth4 

n3

10.1.4.0/24 via 10.1.1.3 dev eth4 
10.1.5.0/24 via 10.1.3.2 dev eth3 
10.1.6.0/24 via 10.1.1.3 dev eth4 
10.1.1.0/24 dev eth4  proto kernel  scope link  src 10.1.1.2 
10.1.2.0/24 via 10.1.3.2 dev eth3 
10.1.3.0/24 dev eth3  proto kernel  scope link  src 10.1.3.3

n4

10.1.4.0/24 dev eth3  proto kernel  scope link  src 10.1.4.2 
10.1.5.0/24 via 10.1.6.2 dev eth2 
10.1.6.0/24 dev eth2  proto kernel  scope link  src 10.1.6.3 
10.1.1.0/24 dev eth4  proto kernel  scope link  src 10.1.1.3 
10.1.2.0/24 via 10.1.6.2 dev eth2 
10.1.3.0/24 via 10.1.1.2 dev eth4

n5

10.1.4.0/24 dev eth2  proto kernel  scope link  src 10.1.4.3 
10.1.5.0/24 via 10.1.4.2 dev eth2 
10.1.6.0/24 via 10.1.4.2 dev eth2 
10.1.2.0/24 via 10.1.4.2 dev eth2 
10.1.3.0/24 via 10.1.4.2 dev eth2

Best Answer

You should remove reverse path filtering on your linux routers (n1 to n4). https://access.redhat.com/solutions/53031

Related Topic