Re: ifconfig carpX a.b.c.d -> arpresolve: route contains no arp information
On Mon, Jul 24, 2017 at 02:22:33PM +0200, Martin Pieuchot wrote: > On 21/07/17(Fri) 12:13, Remi Locherer wrote: > > [...] > > Somebody suggested in a private mail to use /32 masks for carp interfaces. > > This fix/workaround helps indeed! > > Good to know! However from my developer's chair there's still a bug. > Nothing should happen to a route attached to vio1 when you modify > something on carp1. > > Could you repeat the "route monitor" steps with a kernel containing the > diff below? here you go: gw1# route monitor got message of size 192 on Mon Jul 24 19:32:43 2017 RTM_DELETE: Delete Route: len 192, priority 3, table 0, ifidx 3, pid: 0, seq 0, errno 0 flags: fmask: use:0 mtu:0expire:0 locks: inits: sockaddrs: 10.0.20.10 08:00:27:6b:9a:c1 08:00:27:7e:f3:d5 10.0.20.2 got message of size 192 on Mon Jul 24 19:32:43 2017 RTM_DELETE: Delete Route: len 192, priority 19, table 0, ifidx 7, pid: 0, seq 0, errno 0 flags: fmask: use:0 mtu:0expire:0 locks: inits: sockaddrs: 10.0.20.0 10.0.20.1 255.255.255.0 00:00:5e:00:01:17 10.0.20.1 got message of size 176 on Mon Jul 24 19:32:43 2017 RTM_DELETE: Delete Route: len 176, priority 1, table 0, ifidx 7, pid: 0, seq 0, errno 0 flags: fmask: use:0 mtu:0expire:0 locks: inits: sockaddrs: 10.0.20.255 10.0.20.1 00:00:5e:00:01:17 10.0.20.1 got message of size 192 on Mon Jul 24 19:32:43 2017 RTM_DELETE: Delete Route: len 192, priority 1, table 0, ifidx 7, pid: 0, seq 0, errno 0 flags: fmask: use:0 mtu:0expire:0 locks: inits: sockaddrs: 10.0.20.1 00:00:5e:00:01:17 00:00:5e:00:01:17 10.0.20.1 got message of size 96 on Mon Jul 24 19:32:43 2017 RTM_DELADDR: address being removed from iface: len 96, metric 0, flags: sockaddrs: 255.255.255.0 00:00:5e:00:01:17 10.0.20.1 10.0.20.255 got message of size 168 on Mon Jul 24 19:32:43 2017 RTM_IFINFO: iface status change: len 168, if# 7, name: carp2, link: invalid, mtu: 1500, flags: got message of size 104 on Mon Jul 24 19:32:43 2017 RTM_NEWADDR: address being added to iface: len 104, metric 0, flags: sockaddrs: 255.255.255.0 00:00:5e:00:01:17 10.0.20.1 default got message of size 192 on Mon Jul 24 19:32:43 2017 RTM_ADD: Add Route: len 192, priority 1, table 0, ifidx 7, pid: 0, seq 0, errno 0 flags: fmask: use:0 mtu:0expire:0 locks: inits: sockaddrs: 10.0.20.1 00:00:5e:00:01:17 00:00:5e:00:01:17 10.0.20.1 got message of size 192 on Mon Jul 24 19:32:43 2017 RTM_ADD: Add Route: len 192, priority 147, table 0, ifidx 7, pid: 0, seq 0, errno 0 flags: fmask: use:0 mtu:0expire:0 locks: inits: sockaddrs: 10.0.20.0 10.0.20.1 255.255.255.0 00:00:5e:00:01:17 10.0.20.1 got message of size 176 on Mon Jul 24 19:32:43 2017 RTM_ADD: Add Route: len 176, priority 129, table 0, ifidx 7, pid: 0, seq 0, errno 0 flags: fmask: use:0 mtu:0expire:0 locks: inits: sockaddrs: 10.0.20.255 10.0.20.1 00:00:5e:00:01:17 10.0.20.1 got message of size 168 on Mon Jul 24 19:32:43 2017 RTM_IFINFO: iface status change: len 168, if# 7, name: carp2, link: backup, mtu: 1500, flags: got message of size 168 on Mon Jul 24 19:32:46 2017 RTM_IFINFO: iface status change: len 168, if# 7, name: carp2, link: master, mtu: 1500, flags:
Re: ifconfig carpX a.b.c.d -> arpresolve: route contains no arp information
On 21/07/17(Fri) 12:13, Remi Locherer wrote: > [...] > Somebody suggested in a private mail to use /32 masks for carp interfaces. > This fix/workaround helps indeed! Good to know! However from my developer's chair there's still a bug. Nothing should happen to a route attached to vio1 when you modify something on carp1. Could you repeat the "route monitor" steps with a kernel containing the diff below? Index: net/route.c === RCS file: /cvs/src/sys/net/route.c,v retrieving revision 1.360 diff -u -p -r1.360 route.c --- net/route.c 24 Jul 2017 09:20:32 - 1.360 +++ net/route.c 24 Jul 2017 12:19:23 - @@ -627,7 +627,7 @@ rtdeletemsg(struct rtentry *rt, struct i { int error; struct rt_addrinfo info; - unsigned intifidx; + struct sockaddr_rtlabel sa_rl; struct sockaddr_in6 sa_mask; KASSERT(rt->rt_ifidx == ifp->if_index); @@ -637,16 +637,18 @@ rtdeletemsg(struct rtentry *rt, struct i * deleted. That will allow the information being reported to * be accurate (and consistent with route_output()). */ - bzero((caddr_t)&info, sizeof(info)); + memset(&info, 0, sizeof(info)); info.rti_info[RTAX_DST] = rt_key(rt); + info.rti_info[RTAX_GATEWAY] = rt->rt_gateway; if (!ISSET(rt->rt_flags, RTF_HOST)) info.rti_info[RTAX_NETMASK] = rt_plen2mask(rt, &sa_mask); - info.rti_info[RTAX_GATEWAY] = rt->rt_gateway; + info.rti_info[RTAX_LABEL] = rtlabel_id2sa(rt->rt_labelid, &sa_rl); info.rti_flags = rt->rt_flags; - ifidx = rt->rt_ifidx; + info.rti_info[RTAX_IFP] = sdltosa(ifp->if_sadl); + info.rti_info[RTAX_IFA] = rt->rt_ifa->ifa_addr; error = rtrequest_delete(&info, rt->rt_priority, ifp, &rt, tableid); KERNEL_LOCK(); - rtm_miss(RTM_DELETE, &info, info.rti_flags, rt->rt_priority, ifidx, + rtm_miss(RTM_DELETE, &info, rt->rt_flags, rt->rt_priority, rt->rt_ifidx, error, tableid); KERNEL_UNLOCK(); if (error == 0)
Re: ifconfig carpX a.b.c.d -> arpresolve: route contains no arp information
On 2017-07-10 17:52, Remi Locherer wrote: Synopsis: ifconfig carpX a.b.c.d -> arpresolve: route contains no arp information Category: kernel Environment: System : OpenBSD 6.1 Details : OpenBSD 6.1 (GENERIC.MP) #20: Sat Apr 1 13:45:56 MDT 2017 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP Architecture: OpenBSD.amd64 Machine : amd64 Description: After reconfiguring an existing carp interface with the same ip the gateway stops forwarding traffic (forwarding to directly connected hosts still works). In /var/log/messages this can be found: Jul 10 12:54:27 gw1 /bsd: arpresolve: 10.0.20.10: route contains no arp information How-To-Repeat: [...] I can reproduce this problem with: - OpenBSD 6.1 -release - OpenBSD 6.1 -stable (all patches applied with syspatch) - OpenBSD 6.1 -current (7.7.2017) With OpenBSD 6.0 3 pings are lost after executing ifconfig and then packages are forwarded again as expected. Fix: unknown. Workaround: route change 10.0.200.0/24 10.0.20.10 Somebody suggested in a private mail to use /32 masks for carp interfaces. This fix/workaround helps indeed!
Re: ifconfig carpX a.b.c.d -> arpresolve: route contains no arp information
On 2017-07-12 11:34, Martin Pieuchot wrote: On 11/07/17(Tue) 13:55, Remi Locherer wrote: On 2017-07-11 13:23, Remi Locherer wrote: > On 2017-07-11 11:32, Martin Pieuchot wrote: > > Hello and thanks for the detailed bug report. > > > > On 10/07/17(Mon) 17:52, Remi Locherer wrote: > > > >Synopsis:ifconfig carpX a.b.c.d -> arpresolve: route contains no arp information > > > >Category:kernel > > > >Environment: > > > System : OpenBSD 6.1 > > > Details : OpenBSD 6.1 (GENERIC.MP) #20: Sat Apr 1 13:45:56 > > > MDT 2017 > > > > > > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP > > > > > > Architecture: OpenBSD.amd64 > > > Machine : amd64 > > > > > > >Description: > > > After reconfiguring an existing carp interface with the same ip > > > the gateway stops forwarding traffic (forwarding to directly > > > connected hosts still works). > > > In /var/log/messages this can be found: > > > > > > Jul 10 12:54:27 gw1 /bsd: arpresolve: 10.0.20.10: route contains > > > no arp information > > > > How does the routing table looks like when you see such message? And > > the ARP table? Somehow a route attached to vio2 is removed from the routing table when you modify carp2. Could you run 'route monitor' then do 'ifconfig carp2 delete'? This should hopefully reproduce the problem and the output of 'route monitor' will give us more infos. This is the output captured on 6.1-stable: gw1# route monitor got message of size 144 on Wed Jul 12 16:02:07 2017 RTM_DELETE: Delete Route: len 144, priority 3, table 0, ifidx 3, pid: 0, seq 0, errno 0 flags: fmask: use:0 mtu:0expire:0 locks: inits: sockaddrs: 10.0.20.10 08:00:27:6b:9a:c1 got message of size 192 on Wed Jul 12 16:02:07 2017 RTM_DELETE: Delete Route: len 192, priority 19, table 0, ifidx 7, pid: 0, seq 0, errno 0 flags: fmask: use:0 mtu:0expire:0 locks: inits: sockaddrs: 10.0.20.0 10.0.20.1 255.255.255.0 00:00:5e:00:01:17 10.0.20.1 got message of size 176 on Wed Jul 12 16:02:07 2017 RTM_DELETE: Delete Route: len 176, priority 1, table 0, ifidx 7, pid: 0, seq 0, errno 0 flags: fmask: use:0 mtu:0expire:0 locks: inits: sockaddrs: 10.0.20.255 10.0.20.1 00:00:5e:00:01:17 10.0.20.1 got message of size 192 on Wed Jul 12 16:02:07 2017 RTM_DELETE: Delete Route: len 192, priority 1, table 0, ifidx 7, pid: 0, seq 0, errno 0 flags: fmask: use:0 mtu:0expire:0 locks: inits: sockaddrs: 10.0.20.1 00:00:5e:00:01:17 00:00:5e:00:01:17 10.0.20.1 got message of size 96 on Wed Jul 12 16:02:07 2017 RTM_DELADDR: address being removed from iface: len 96, metric 0, flags: sockaddrs: 255.255.255.0 00:00:5e:00:01:17 10.0.20.1 10.0.20.255 got message of size 168 on Wed Jul 12 16:02:08 2017 RTM_IFINFO: iface status change: len 168, if# 7, name: carp2, link: invalid, mtu: 1500, flags:
Re: ifconfig carpX a.b.c.d -> arpresolve: route contains no arp information
On 11/07/17(Tue) 13:55, Remi Locherer wrote: > On 2017-07-11 13:23, Remi Locherer wrote: > > On 2017-07-11 11:32, Martin Pieuchot wrote: > > > Hello and thanks for the detailed bug report. > > > > > > On 10/07/17(Mon) 17:52, Remi Locherer wrote: > > > > >Synopsis: ifconfig carpX a.b.c.d -> arpresolve: route contains no > > > > >arp information > > > > >Category: kernel > > > > >Environment: > > > > System : OpenBSD 6.1 > > > > Details : OpenBSD 6.1 (GENERIC.MP) #20: Sat Apr 1 13:45:56 > > > > MDT 2017 > > > > > > > > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP > > > > > > > > Architecture: OpenBSD.amd64 > > > > Machine : amd64 > > > > > > > > >Description: > > > > After reconfiguring an existing carp interface with the same ip > > > > the gateway stops forwarding traffic (forwarding to directly > > > > connected hosts still works). > > > > In /var/log/messages this can be found: > > > > > > > > Jul 10 12:54:27 gw1 /bsd: arpresolve: 10.0.20.10: route contains > > > > no arp information > > > > > > How does the routing table looks like when you see such message? And > > > the ARP table? Somehow a route attached to vio2 is removed from the routing table when you modify carp2. Could you run 'route monitor' then do 'ifconfig carp2 delete'? This should hopefully reproduce the problem and the output of 'route monitor' will give us more infos.
Re: ifconfig carpX a.b.c.d -> arpresolve: route contains no arp information
On 2017-07-11 13:23, Remi Locherer wrote: On 2017-07-11 11:32, Martin Pieuchot wrote: Hello and thanks for the detailed bug report. On 10/07/17(Mon) 17:52, Remi Locherer wrote: >Synopsis: ifconfig carpX a.b.c.d -> arpresolve: route contains no arp information >Category: kernel >Environment: System : OpenBSD 6.1 Details : OpenBSD 6.1 (GENERIC.MP) #20: Sat Apr 1 13:45:56 MDT 2017 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP Architecture: OpenBSD.amd64 Machine : amd64 >Description: After reconfiguring an existing carp interface with the same ip the gateway stops forwarding traffic (forwarding to directly connected hosts still works). In /var/log/messages this can be found: Jul 10 12:54:27 gw1 /bsd: arpresolve: 10.0.20.10: route contains no arp information How does the routing table looks like when you see such message? And the ARP table? gw1# route -nv show -inet Routing tables Internet: DestinationGatewayFlags Refs Use Mtu Prio Iface Label default10.0.2.2 UGS0 22 - 8 vio0 224/4 127.0.0.1 URS00 32768 8 lo0 10.0.2/24 10.0.2.15 UCn10 - 4 vio0 10.0.2.2 52:54:00:12:35:02 UHLch 2 16 - 3 vio0 10.0.2.15 08:00:27:23:af:65 UHLl 04 - 1 vio0 10.0.2.255 10.0.2.15 UHb00 - 1 vio0 10.0.10/24 10.0.10.2 UCn11 - 4 vio1 10.0.10/24 10.0.10.1 UCn00 -19 carp1 10.0.10.1 00:00:5e:00:01:17 UHLl 00 - 1 carp1 10.0.10.2 08:00:27:7d:87:23 UHLl 01 - 1 vio1 10.0.10.10 08:00:27:1e:30:02 UHLc 0 93 - 3 vio1 10.0.10.25510.0.10.2 UHb00 - 1 vio1 10.0.10.25510.0.10.1 UHb00 - 1 carp1 10.0.20/24 10.0.20.2 UCn02 - 4 vio2 10.0.20/24 10.0.20.1 UCn00 -19 carp2 10.0.20.1 00:00:5e:00:01:17 UHLl 00 - 1 carp2 10.0.20.2 08:00:27:7e:f3:d5 UHLl 01 - 1 vio2 10.0.20.25510.0.20.2 UHb00 - 1 vio2 10.0.20.25510.0.20.1 UHb00 - 1 carp2 10.0.200/2410.0.20.10 UGS0 89 - 8 vio2 127/8 127.0.0.1 UGRS 00 32768 8 lo0 127.0.0.1 127.0.0.1 UHhl 12 32768 1 lo0 gw1# arp -an Host Ethernet AddressNetif Expire Flags 10.0.2.2 52:54:00:12:35:02vio0 19m32s 10.0.2.1508:00:27:23:af:65vio0 permanent l 10.0.10.100:00:5e:00:01:17 carp1 permanent l 10.0.10.208:00:27:7d:87:23vio1 permanent l 10.0.10.10 08:00:27:1e:30:02vio1 18m31s 10.0.20.100:00:5e:00:01:17 carp2 permanent l 10.0.20.208:00:27:7e:f3:d5vio2 permanent l gw1# What happen if you destroy carp2 instead of re-adding the same address? Do you see the same problem? Not 100% the same. My ping also stops and the same message is printed to /var/log/mesages. But the gateway does not send "icmp: host 10.0.200.1 unreachable" to 10.0.10.10. I missed something here: In my test setup I have only a single gateway. After destroying carp2 the ip 10.0.20.1 is not configured anywhere. But that ip is the defautl gateway of the test client. That is why I do not see icmp unreachable messages sent by the gw1. The routing and arp table after destroying carp2: gw1# ifconfig carp2 destroy gw1# route -nv show -inet Routing tables Internet: DestinationGatewayFlags Refs Use Mtu Prio Iface Label default10.0.2.2 UGS0 26 - 8 vio0 224/4 127.0.0.1 URS00 32768 8 lo0 10.0.2/24 10.0.2.15 UCn10 - 4 vio0 10.0.2.2 52:54:00:12:35:02 UHLch 2 20 - 3 vio0 10.0.2.15 08:00:27:23:af:65 UHLl 04 - 1 vio0 10.0.2.255 10.0.2.15 UHb00 - 1 vio0 10.0.10/24 10.0.10.2 UCn11 - 4 vio1 10.0.10/24 10.0.10.1 UCn00 -19 carp1 10.0.10.1 00:00:5e:00:01:17 UHLl 00 - 1 carp1 10.0.10.2 08:00:27:7d:87:23 UHLl 01 - 1 vio1 10.0.10.10 08:00:27:1e:30:02
Re: ifconfig carpX a.b.c.d -> arpresolve: route contains no arp information
On 2017-07-11 11:32, Martin Pieuchot wrote: Hello and thanks for the detailed bug report. On 10/07/17(Mon) 17:52, Remi Locherer wrote: >Synopsis: ifconfig carpX a.b.c.d -> arpresolve: route contains no arp information >Category: kernel >Environment: System : OpenBSD 6.1 Details : OpenBSD 6.1 (GENERIC.MP) #20: Sat Apr 1 13:45:56 MDT 2017 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP Architecture: OpenBSD.amd64 Machine : amd64 >Description: After reconfiguring an existing carp interface with the same ip the gateway stops forwarding traffic (forwarding to directly connected hosts still works). In /var/log/messages this can be found: Jul 10 12:54:27 gw1 /bsd: arpresolve: 10.0.20.10: route contains no arp information How does the routing table looks like when you see such message? And the ARP table? gw1# route -nv show -inet Routing tables Internet: DestinationGatewayFlags Refs Use Mtu Prio Iface Label default10.0.2.2 UGS0 22 - 8 vio0 224/4 127.0.0.1 URS00 32768 8 lo0 10.0.2/24 10.0.2.15 UCn10 - 4 vio0 10.0.2.2 52:54:00:12:35:02 UHLch 2 16 - 3 vio0 10.0.2.15 08:00:27:23:af:65 UHLl 04 - 1 vio0 10.0.2.255 10.0.2.15 UHb00 - 1 vio0 10.0.10/24 10.0.10.2 UCn11 - 4 vio1 10.0.10/24 10.0.10.1 UCn00 -19 carp1 10.0.10.1 00:00:5e:00:01:17 UHLl 00 - 1 carp1 10.0.10.2 08:00:27:7d:87:23 UHLl 01 - 1 vio1 10.0.10.10 08:00:27:1e:30:02 UHLc 0 93 - 3 vio1 10.0.10.25510.0.10.2 UHb00 - 1 vio1 10.0.10.25510.0.10.1 UHb00 - 1 carp1 10.0.20/24 10.0.20.2 UCn02 - 4 vio2 10.0.20/24 10.0.20.1 UCn00 -19 carp2 10.0.20.1 00:00:5e:00:01:17 UHLl 00 - 1 carp2 10.0.20.2 08:00:27:7e:f3:d5 UHLl 01 - 1 vio2 10.0.20.25510.0.20.2 UHb00 - 1 vio2 10.0.20.25510.0.20.1 UHb00 - 1 carp2 10.0.200/2410.0.20.10 UGS0 89 - 8 vio2 127/8 127.0.0.1 UGRS 00 32768 8 lo0 127.0.0.1 127.0.0.1 UHhl 12 32768 1 lo0 gw1# arp -an Host Ethernet AddressNetif Expire Flags 10.0.2.2 52:54:00:12:35:02vio0 19m32s 10.0.2.1508:00:27:23:af:65vio0 permanent l 10.0.10.100:00:5e:00:01:17 carp1 permanent l 10.0.10.208:00:27:7d:87:23vio1 permanent l 10.0.10.10 08:00:27:1e:30:02vio1 18m31s 10.0.20.100:00:5e:00:01:17 carp2 permanent l 10.0.20.208:00:27:7e:f3:d5vio2 permanent l gw1# What happen if you destroy carp2 instead of re-adding the same address? Do you see the same problem? Not 100% the same. My ping also stops and the same message is printed to /var/log/mesages. But the gateway does not send "icmp: host 10.0.200.1 unreachable" to 10.0.10.10. The routing and arp table after destroying carp2: gw1# ifconfig carp2 destroy gw1# route -nv show -inet Routing tables Internet: DestinationGatewayFlags Refs Use Mtu Prio Iface Label default10.0.2.2 UGS0 26 - 8 vio0 224/4 127.0.0.1 URS00 32768 8 lo0 10.0.2/24 10.0.2.15 UCn10 - 4 vio0 10.0.2.2 52:54:00:12:35:02 UHLch 2 20 - 3 vio0 10.0.2.15 08:00:27:23:af:65 UHLl 04 - 1 vio0 10.0.2.255 10.0.2.15 UHb00 - 1 vio0 10.0.10/24 10.0.10.2 UCn11 - 4 vio1 10.0.10/24 10.0.10.1 UCn00 -19 carp1 10.0.10.1 00:00:5e:00:01:17 UHLl 00 - 1 carp1 10.0.10.2 08:00:27:7d:87:23 UHLl 01 - 1 vio1 10.0.10.10 08:00:27:1e:30:02 UHLc 0 247 - 3 vio1 10.0.10.25510.0.10.2 UHb00 - 1 vio1 10.0.10.25510.0.10.1 UHb00 - 1 carp1 10.0.20/24 10.0.20.2 UCn08 - 4 vio2 10.0.20.2 08:00:27:7e:f
Re: ifconfig carpX a.b.c.d -> arpresolve: route contains no arp information
Hello and thanks for the detailed bug report. On 10/07/17(Mon) 17:52, Remi Locherer wrote: > >Synopsis:ifconfig carpX a.b.c.d -> arpresolve: route contains no arp > >information > >Category:kernel > >Environment: > System : OpenBSD 6.1 > Details : OpenBSD 6.1 (GENERIC.MP) #20: Sat Apr 1 13:45:56 MDT 2017 > > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP > > Architecture: OpenBSD.amd64 > Machine : amd64 > > >Description: > After reconfiguring an existing carp interface with the same ip the > gateway stops forwarding traffic (forwarding to directly connected hosts > still works). > In /var/log/messages this can be found: > > Jul 10 12:54:27 gw1 /bsd: arpresolve: 10.0.20.10: route contains no arp > information How does the routing table looks like when you see such message? And the ARP table? What happen if you destroy carp2 instead of re-adding the same address? Do you see the same problem?