Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
#Setting ARP so it doesn't broadcast
sysctl -w net.ipv4.conf.all.rp_filter=0
sysctl -w net.ipv4.conf.ib0.arp_ignore=1
sysctl -w net.ipv4.conf.ib0.arp_filter=0
sysctl -w net.ipv4.conf.ib0.arp_announce=2
sysctl -w net.ipv4.conf.ib0.rp_filter=0

sysctl -w net.ipv4.conf.ib1.arp_ignore=1
sysctl -w net.ipv4.conf.ib1.arp_filter=0
sysctl -w net.ipv4.conf.ib1.arp_announce=2
sysctl -w net.ipv4.conf.ib1.rp_filter=0

ip neigh flush dev ib0
ip neigh flush dev ib1
 
echo 200 ib0 >> /etc/iproute2/rt_tables
echo 201 ib1 >> /etc/iproute2/rt_tables
 
ip route add 192.168.2.0/24 dev ib1 proto kernel scope link src 192.168.2.2 table ib1
ip route add 192.168.1.0/24 dev ib0 proto kernel scope link src 192.168.1.2 table ib0
ip rule add from 192.168.1.2 table ib0
ip rule add from 192.168.2.2 table ib1
ip route flush cache

# Try to get the system in the following state:
[root@trevis-402 ~]# ip route show table ib1
192.168.2.0/24 dev ib1  proto kernel  scope link  src 192.168.2.2 


[root@trevis-402 ~]# ip route show table ib1
192.168.2.0/24 dev ib1  proto kernel  scope link  src 192.168.2.2 
 
# Also make 

Trouble shooting

Code Block
# if the above setup try the following steps:
#	 Make sure to flush the arp cache from the other nodes, so that there is no confusion with addressing. 
# Look at the rules by:
# ip rule show
# make sure that the rules are in correct priority.
# 0 is the highest prio.
# 0 is always going to be the local routing table, which has all the default local and broadcast routes.
# 32766 is the main routing table. So all other policy routing tables should be higher than this one.