multi route load sharing mull function when add second table route and its rule
Posted: 2020/06/17 21:32:12
I am trying to configure Multi Routing Load Sharing/ SPLIT on 2 different ISP's. I did this 3 years ago in Centos 5 and Fedora and its works like a charm and I implemented 7 Linux base routers in my country wide offices.
now its time for Centos 7 with kernel 5.6,
kernel source compiled manually with Combine jumbo Patch of http://www.ssi.bg/~ja/#combinations
as well as taking help from https://www.tldp.org/HOWTO/Adv-Routing- ... ilter.html and Christoph Simon guide lines, also etc...
p rule add prio 50 table main
ip route del default table main
ip rule add prio 249 fwmark 2 table satcom
ip route add default via 202.143.113.42 dev eth1 src 202.143.113.41 proto static table satcom
ip route append prohibit default table satcom metric 1 proto static
ip rule add prio 248 fwmark 3 table supernet
ip route add default via 203.130.10.41 dev eth2 src 203.130.10.42 proto static table supernet
ip route append prohibit default table supernet metric 1 proto static
iptables Prerouting mangle source LANPC destination server1 Mark 2
iptables Prerouting mangle source LANPC destination-all Mark 3
all working fine till I add second route and its rule and delete default route.
at this time suddenly all traffic automatically route through 2nd route.
I dont know why and I face this problem first time.
Please help me.
now its time for Centos 7 with kernel 5.6,
kernel source compiled manually with Combine jumbo Patch of http://www.ssi.bg/~ja/#combinations
as well as taking help from https://www.tldp.org/HOWTO/Adv-Routing- ... ilter.html and Christoph Simon guide lines, also etc...
p rule add prio 50 table main
ip route del default table main
ip rule add prio 249 fwmark 2 table satcom
ip route add default via 202.143.113.42 dev eth1 src 202.143.113.41 proto static table satcom
ip route append prohibit default table satcom metric 1 proto static
ip rule add prio 248 fwmark 3 table supernet
ip route add default via 203.130.10.41 dev eth2 src 203.130.10.42 proto static table supernet
ip route append prohibit default table supernet metric 1 proto static
iptables Prerouting mangle source LANPC destination server1 Mark 2
iptables Prerouting mangle source LANPC destination-all Mark 3
all working fine till I add second route and its rule and delete default route.
at this time suddenly all traffic automatically route through 2nd route.
I dont know why and I face this problem first time.
Please help me.