Hello, I'm currently testing the multirouting on openbsd 5.2 It works basically but I encounter an issue with ping -I depending on the order the default routes are set.
The context: interface em2: ip 192.168.102.2 gw 192.168.102.1 interface em3: ip 192.168.103.2 gw 192.168.103.1 In 3 separated windows I do a different ping to the same internet host window1: ping 91.121.112.202 window2: ping -I 192.168.102.2 91.121.112.202 window3: ping -I 192.168.103.2 91.121.112.202 The scenario that works for all 3 ping is: pfctl -d sysctl net.inet.ip.multipath=1 route flush route add -mpath default 192.168.103.1 route add -mpath default 192.168.102.1 The scenario that fails for the two ping -I it's the same as above except for the route order: pfctl -d sysctl net.inet.ip.multipath=1 route flushroute add -mpath default 192.168.102.1 route add -mpath default 192.168.103.1 When I do two tcpdump on each interface I see that when it fails the ping -I are just going on the wrong interface even if the routing table indicates the contrary. root@edsbull:~ 41# tcpdump -n -i em2 icmp tcpdump: listening on em2, link-type EN10MB 22:40:33.329554 192.168.103.2 > 91.121.112.202: icmp: echo request 22:40:34.339509 192.168.103.2 > 91.121.112.202: icmp: echo request 22:40:35.349485 192.168.103.2 > 91.121.112.202: icmp: echo request root@edsbull:~ 136# tcpdump -n -i em3 icmp tcpdump: listening on em3, link-type EN10MB 22:41:00.918982 192.168.102.2 > 91.121.112.202: icmp: echo request 22:41:01.928939 192.168.102.2 > 91.121.112.202: icmp: echo request 22:41:02.938915 192.168.102.2 > 91.121.112.202: icmp: echo request root@edsbull:~ 89# netstat -rn Routing tables Internet: Destination Gateway Flags Refs Use Mtu Prio Iface default 192.168.102.1 UGSP 4 592 - 8 em2 default 192.168.103.1 UGSP 1 483 - 8 em3 127.0.0.1 127.0.0.1 UH 0 0 33196 4 lo0 192.168.102/24 link#3 UC 1 0 - 4 em2 192.168.102.1 00:00:e8:12:43:21 UHLc 1 0 - 4 em2 192.168.103/24 link#4 UC 2 0 - 4 em3 192.168.103.1 00:07:cb:22:f8:52 UHLc 1 0 - 4 em3 Do you have any explanation for this routing inversion or a workaround/good practice to have a ping -I always working as intended? Thanks in advance. -- Au revoir, 09 51 84 42 42 Gilles Lamiral. France, Baulon (35580) 06 20 79 76 06