Skip to content

APs send out ARP broadcast with anycast IP to mesh (and clients) with local MAC address #1488

Closed
@ecsv

Description

@ecsv

It seems like ARP packets are sent around in the mesh which contain different values for the anycast MAC address. These packets are received by the clients - which are then not able to communicate with their connected AP anymore over IPv4. This is especially problematic when dnsmasq is used as DNS forwarder on the node.


I wanted to ask about this on IRC but it seems hackint thought that I am a spammer. So here the full text

[2018-07-21 19:34:41] <ecsv> I've deployed here the dnsmasq forwarder on all nodes (gluon 2018.1) - but it made quite some problems and ruined my friday. but at least I've noticed an interesting property: problem only happens over ipv4
[2018-07-21 19:34:41] <ecsv> ok, the clients request the DNS records via ipv4 anycast address or via ipv6 anycast address. the problem only happens via ipv4
[2018-07-21 19:34:41] <ecsv> a similar problem can be seen via icmp echo requests. I have roughly a 12% packet loss when pinging the ipv4 anycast address (300x 1s ping) but 0% loss when using the link local anycast address
[2018-07-21 19:34:41] <ecsv> arp-limiter was disabled btw.
[2018-07-21 19:34:41] <ecsv> does anybody else notices the same problem?
[2018-07-22 00:06:54] <ecsv> ok, problem seems to be that from time to time, the client thinks that the anycast ipv4 address is on a completely different device (on the other end of the mesh)
[2018-07-22 00:06:54] <ecsv> and why does he seem to think so? because APs on the other end of of the mesh sends out an ARP broadcast (with the anycast ip address) which asks about some client mac which is not known to it
[2018-07-22 00:06:54] <ecsv> now my client device thinks "hey, cool, why the anycast ipv4 address just changed its mac address. now I have to sent all my traffic to the other one. probing is the cool kids way to handle it"
[2018-07-22 00:06:54] <ecsv> important question now would be: why do APs send out ARP requests with the anycast IP address but not anycast mac address (16:41:95:40:f7:dc) to get the mac address for some clients (maybe because they wanted to sent some DNS replies)
[2018-07-22 00:06:54] <ecsv> and why is this traffic allowed to enter the mesh. the last question can be answered using ebtables. (and the first one is a little harder and I will just ignore it for now)
[2018-07-22 00:06:54] <ecsv> i would say that all ARP traffic from the IPv4 anycast address in any arp ip field should be dropped before entering bat0 in the OUTPUT chain (done in FORWARD but not in OUTPUT chain)
[2018-07-22 00:06:54] <ecsv> and I would say that all traffic from bat0 with  any arp ip field equal to the IPv4 anycast address must be dropped in the ebtables INPUT chain
[2018-07-22 00:06:54] <ecsv> and I would say that all traffic from bat0 with  any arp ip field equal to the IPv4 anycast address must be dropped in the ebtables FORWARD chain
[2018-07-22 00:06:54] <ecsv> neoraider/T_X: would you agree?
[2018-07-22 00:06:54] <ecsv> I have now added following six rules to my local node to work around this problem:
[2018-07-22 00:06:54] <ecsv> ebtables-tiny -I OUTPUT 1 -p ARP --logical-out br-client -o bat0 --arp-ip-src 10.204.32.1 -j DROP 
[2018-07-22 00:06:54] <ecsv> ebtables-tiny -I OUTPUT 1 -p ARP --logical-out br-client -o bat0 --arp-ip-dst 10.204.32.1 -j DROP 
[2018-07-22 00:06:54] <ecsv> ebtables-tiny -I INPUT 1 -p ARP -i bat0 --arp-ip-src 10.204.32.1 -j DROP 
[2018-07-22 00:06:54] <ecsv> ebtables-tiny -I INPUT 1 -p ARP -i bat0 --arp-ip-dst 10.204.32.1 -j DROP 
[2018-07-22 00:06:54] <ecsv> ebtables-tiny -I FORWARD 1 -p ARP -i bat0 --arp-ip-src 10.204.32.1 -j DROP 
[2018-07-22 00:06:54] <ecsv> ebtables-tiny -I FORWARD 1 -p ARP -i bat0 --arp-ip-dst 10.204.32.1 -j DROP 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions