tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ARP Address Conflict Detection and dhcpcd arping



Hi Roy,

Roy Marples wrote:
I see the same behaviour in -current which I just fixed and submitted a PR for -9, but -8 (from release to now) is fine and doesn't need a patch here - at least not from the steps listed.

Thanks for having a look at it!

I've tested it again with the same result, please see the attached logs from tcpdump (where i've edited the mac addresses: NetBSD: aa:aa:aa:aa:aa:aa, Linux: bb:bb:bb:bb:bb:bb)

The testing setup was in both attempts:
* NetBSD (8.1_STABLE, built on 6th Jul 2019) wm0 has static address 172.31.255.254/30
* the machines are connected directly with a cable (no switch etc.)
* the Linux machine is offline (and thus the flags field of NetBSD wm0 has value: 0x4<DETACHED>), with attached dhcpcd config amendment
* tcpdump is launched on NetBSD host
* the Linux machine is turned on

Looking at the patch you've attached I guess the culprit is probably that due to the direct connect, the wm0 address is tentative at the moment of the arping (the link goes up and down several times before the arping) and thus not being defended?

r.

interface eth0
arping 172.31.255.254

profile 172.31.255.254
static ip_address=172.31.255.253/30
static routers=172.31.255.254
static domain_name_servers=1.1.1.1
# tcpdump -n -e -i wm0 arp          
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wm0, link-type EN10MB (Ethernet), capture size 262144 bytes
11:54:20.768483 aa:aa:aa:aa:aa:aa > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Request who-has 172.31.255.254 tell 172.31.255.254, length 28
11:55:13.248534 aa:aa:aa:aa:aa:aa > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Request who-has 172.31.255.254 tell 172.31.255.254, length 28
11:55:29.773816 aa:aa:aa:aa:aa:aa > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Request who-has 172.31.255.254 tell 172.31.255.254, length 28
11:55:31.568482 bb:bb:bb:bb:bb:bb > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Request who-has 172.31.255.254 tell 0.0.0.0, length 46
11:55:31.568491 aa:aa:aa:aa:aa:aa > bb:bb:bb:bb:bb:bb, ethertype ARP (0x0806), length 42: Reply 172.31.255.254 is-at aa:aa:aa:aa:aa:aa, length 28
11:55:31.624508 bb:bb:bb:bb:bb:bb > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Request who-has 172.31.255.253 tell 0.0.0.0, length 46
11:55:32.714305 bb:bb:bb:bb:bb:bb > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Request who-has 172.31.255.253 tell 0.0.0.0, length 46
11:55:34.123920 bb:bb:bb:bb:bb:bb > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Request who-has 172.31.255.253 tell 0.0.0.0, length 46
11:55:36.128867 bb:bb:bb:bb:bb:bb > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Request who-has 172.31.255.253 tell 172.31.255.253, length 46
11:55:38.131703 bb:bb:bb:bb:bb:bb > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Request who-has 172.31.255.253 tell 172.31.255.253, length 46
^C
10 packets captured
60 packets received by filter
0 packets dropped by kernel
# tcpdump -n -e -i wm0 arp 
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wm0, link-type EN10MB (Ethernet), capture size 262144 bytes
11:49:07.426975 aa:aa:aa:aa:aa:aa > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Request who-has 172.31.255.254 tell 0.0.0.0, length 28
11:49:08.777750 aa:aa:aa:aa:aa:aa > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Request who-has 172.31.255.254 tell 0.0.0.0, length 28
11:49:10.478730 aa:aa:aa:aa:aa:aa > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Request who-has 172.31.255.254 tell 0.0.0.0, length 28
11:49:12.479888 aa:aa:aa:aa:aa:aa > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Request who-has 172.31.255.254 tell 172.31.255.254, length 28
11:49:14.481028 aa:aa:aa:aa:aa:aa > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Request who-has 172.31.255.254 tell 172.31.255.254, length 28
11:49:59.456875 aa:aa:aa:aa:aa:aa > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Request who-has 172.31.255.254 tell 0.0.0.0, length 28
11:50:01.327950 aa:aa:aa:aa:aa:aa > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Request who-has 172.31.255.254 tell 0.0.0.0, length 28
11:50:03.239048 aa:aa:aa:aa:aa:aa > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Request who-has 172.31.255.254 tell 0.0.0.0, length 28
11:50:05.240209 aa:aa:aa:aa:aa:aa > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Request who-has 172.31.255.254 tell 172.31.255.254, length 28
11:50:07.241349 aa:aa:aa:aa:aa:aa > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Request who-has 172.31.255.254 tell 172.31.255.254, length 28
11:50:14.995805 aa:aa:aa:aa:aa:aa > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Request who-has 172.31.255.254 tell 0.0.0.0, length 28
11:50:15.996609 bb:bb:bb:bb:bb:bb > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Request who-has 172.31.255.254 tell 0.0.0.0, length 46
11:50:17.877281 bb:bb:bb:bb:bb:bb > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Request who-has 172.31.255.254 tell 0.0.0.0, length 46
11:50:19.705381 bb:bb:bb:bb:bb:bb > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Request who-has 172.31.255.254 tell 0.0.0.0, length 46
11:50:26.760871 bb:bb:bb:bb:bb:bb > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Request who-has 169.254.102.34 tell 0.0.0.0, length 46
11:50:28.320559 bb:bb:bb:bb:bb:bb > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Request who-has 169.254.102.34 tell 0.0.0.0, length 46
11:50:29.560242 bb:bb:bb:bb:bb:bb > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Request who-has 169.254.102.34 tell 0.0.0.0, length 46
11:50:31.563360 bb:bb:bb:bb:bb:bb > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Request who-has 169.254.102.34 tell 169.254.102.34, length 46
11:50:33.565459 bb:bb:bb:bb:bb:bb > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Request who-has 169.254.102.34 tell 169.254.102.34, length 46
^C
19 packets captured
57 packets received by filter
0 packets dropped by kernel


Home | Main Index | Thread Index | Old Index