· 7 years ago · Mar 10, 2018, 12:40 AM
1ip route get 192.168.1.1 from 192.168.1.10
2ip route get 192.168.1.1 from 192.168.1.11
3ip route get 192.168.1.1 from 192.168.1.12
4
5ping -c1 192.168.1.10 &
6ping -c1 192.168.1.11 &
7ping -c1 192.168.1.12
8ip neigh show to 192.168.1.10
9ip neigh show to 192.168.1.11
10ip neigh show to 192.168.1.12
11
12echo 1 > /proc/sys/net/ipv4/conf/eth0/arp_filter
13echo 1 > /proc/sys/net/ipv4/conf/eth1/arp_filter
14echo 1 > /proc/sys/net/ipv4/conf/eth2/arp_filter
15
16ip route add 192.168.1.0/24 dev eth0 table 100
17ip route add 192.168.1.0/24 dev eth1 table 101
18ip route add 192.168.1.0/24 dev eth2 table 102
19
20ip rule add from 192.168.1.10 lookup 100
21ip rule add from 192.168.1.11 lookup 101
22ip rule add from 192.168.1.12 lookup 102
23
24arping -c5 -s 192.168.1.10 -D 192.168.1.10 -I eth0 &
25arping -c5 -s 192.168.1.11 -D 192.168.1.11 -I eth1 &
26arping -c5 -s 192.168.1.12 -D 192.168.1.12 -I eth2 &
27
28ip route add default via 192.168.1.1 dev eth0 table 100
29ip route add default via 192.168.1.1 dev eth1 table 101
30ip route add default via 192.168.1.1 dev eth2 table 102