配置内核
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_ROUTE_MULTIPATH=y
配置ip route
ip rule add from 192.168.2.2 lookup 1
ip route add 192.168.1.0/24 via 192.168.1.1 table 1
ip route add 0/0 via 192.168.2.1 table 1
ip rule add from 192.168.3.2 lookup 2
ip route add 192.168.1.0/24 via 192.168.1.1 table 2
ip route add 0/0 via 192.168.3.1 table 2
nexthop via 192.168.2.1 dev eth0
nexthop via 192.168.3.1 dev eth1