can I make the ping out from n0 go through n1 -> n2 -> n4 -> n5 and return on n5 -> n4 -> n3 -> n1 -> n0?
Yes, you can.
As per the information in your post, n0's IP address is 10.1.5.2. Therefore to alter the return path you will need to change the route for 10.1.5.0 on n4.
Currently it looks like this:
10.1.5.0/24 via 10.1.6.2 dev eth2 What you will need to do is change it to this:
10.1.5.0/24 via 10.1.1.2 dev eth4 The reason being that your current route (10.1.5.0/24 via 10.1.6.2 dev eth2) points to n2, whereas "10.1.1.2 dev eth4" points to n3 as per your diagram.
Therefore my suggested change above says "traffic which hits n4 and has a destination IP address of 10.1.5.0/24 can reach its destination by going through eth4."
In other words, this will result in traffic flowing in the following manner: n5 - n4 - n3 - n1 - n0. In other words, traffic from n5 to n0 will go via n3.
In order for traffic in the opposite direction to take the other route (n0 - n1 - n2 - n4 - n5, in other words, traffic from n0 to n5 will go via n2) you will need to do the following:
Remove this from n1:
10.1.4.0/24 via 10.1.3.3 dev eth3 And add this on n1:
10.1.4.0/24 via 10.1.2.3 dev eth4