On 24/02/16(Wed) 21:57, Jean-Daniel Dupas wrote: > > Le 24 févr. 2016 à 19:58, Martin Pieuchot <m...@openbsd.org> a écrit : > > > > On 24/02/16(Wed) 18:56, Jean-Daniel Dupas wrote: > >> Hello, > >> > >> On OpenBSD 5.7, I'm using alternative route table to send ping a on > specific > >> route. > >> > >> On a fresh install, I simply do > >> > >>> route -T 1 add default 192.168.1.1 > >>> ping -V 1 8.8.8.8 > >> > >> It works well on 5.7, but I can't managed to get it working on 5.8. > >> > >> On a fresh install of 5.8, doing the same commands result in a "No route > to > >> host" error. > > > > Which command result in this error? ping? Is this regression also > > present in -current? It is close to 5.9 so fixing this bug now makes > > a lot of sense. > > > > What does "route -T1 get 8.8.8.8" returns you? Are the outputs of > > "route -n show" for the table 0 and 1 different between 5.7 and 5.8? > > Could you post them? > > Here is some details. The output of all commands are the same. > The only change is that trying to access the network using the custom table > fails.
The problem is that there's no entry for your gateway, 10.0.0.1, in the table 1 and the kernel no longer link route entries across tables. I'm not sure how to fix this correctly. Does it work if add a cloning route in the table 1? Something like # route -T1 add 10.0.0/24 -cloning -iface 10.0.0.111 > =============== OpenBSD 5.7 > > > # route -n show > Routing tables > > Internet: > Destination Gateway Flags Refs Use Mtu Prio Iface > default 10.0.0.1 UGS 0 0 - 8 em0 > 10.0.0/24 link#1 UC 2 0 - 4 em0 > 10.0.0.1 link#1 UHLc 1 0 - 4 em0 > 10.0.0.105 6c:40:08:ac:a1:5c UHLc 1 48 - 4 em0 > 10.0.0.111 08:00:27:c3:bd:7a UHLl 0 0 - 1 lo0 > 10.0.0.255 link#1 UHLb 0 0 - 1 em0 > 127/8 127.0.0.1 UGRS 0 0 32768 8 lo0 > 127.0.0.1 127.0.0.1 UHl 1 0 32768 1 lo0 > 224/4 127.0.0.1 URS 0 0 32768 8 lo0 > — > > > route -T 1 add default 10.0.0.1 > add net default: gateway 10.0.0.1 > > route -T1 -n show > Routing tables > > Internet: > Destination Gateway Flags Refs Use Mtu Prio Iface > default 10.0.0.1 UGS 0 0 - 8 em0 > > > route -T 1 get 8.8.8.8 > route to: google-public-dns-a.google.com > destination: default > mask: default > gateway: 10.0.0.1 > interface: em0 > if address: 10.0.0.111 > priority: 8 (static) > flags: <UP,GATEWAY,DONE,STATIC> > use mtu expire > 0 0 0 > > > ping -V 1 8.8.8.8 > PING 8.8.8.8 (8.8.8.8): 56 data bytes > 64 bytes from 8.8.8.8: icmp_seq=0 ttl=54 time=42.833 ms > … > > =============== OpenBSD 5.9 (snapshot) > > route -n show > Routing tables > > Internet: > Destination Gateway Flags Refs Use Mtu Prio Iface > default 10.0.0.1 UGS 0 4 - 8 vio0 > 10.0.0/24 10.0.0.110 UC 3 6 - 4 vio0 > 10.0.0.1 b8:26:6c:7f:77:87 UHLc 1 8 - 4 vio0 > 10.0.0.2 b8:c7:5d:ca:9d:fe UHLc 0 3 - 4 vio0 > 10.0.0.105 6c:40:08:ac:a1:5c UHLc 1 8 - 4 vio0 > 10.0.0.110 08:00:27:c3:bd:7a UHLl 0 10 - 1 vio0 > 10.0.0.255 10.0.0.110 UHb 0 2 - 1 vio0 > 127/8 127.0.0.1 UGRS 0 0 32768 8 lo0 > 127.0.0.1 127.0.0.1 UHl 0 5 32768 1 lo0 > 224/4 127.0.0.1 URS 0 0 32768 8 lo0 > > > route -T 1 add default 10.0.0.1 > add net default: gateway 10.0.0.1 > > route -T1 -n show > Routing tables > > Internet: > Destination Gateway Flags Refs Use Mtu Prio Iface > default 10.0.0.1 UGS 0 0 - 8 vio0 > > > route -T 1 get 8.8.8.8 > route to: google-public-dns-a.google.com > destination: default > mask: default > gateway: 10.0.0.1 > interface: vio0 > if address: 10.0.0.111 > priority: 8 (static) > flags: <UP,GATEWAY,DONE,STATIC> > use mtu expire > 4 0 0 > > > ping -V 1 8.8.8.8 > PING 8.8.8.8 (8.8.8.8): 56 data bytes > ping: sendto: No route to host > …