Score:0

ARP Reply is not forwarded to TAP device through Linux Bridge

gl flag

Create two TAP devices, each of which will be read and written by the userland protocol stack. In addition, the two TAP devices are bridged by the Linux Bridge. The script to prepare the environment is as follows.

sudo ip tuntap add dev tap0 mode tap
sudo ip tuntap add dev tap1 mode tap

sudo ip addr add 10.0.0.1/24 dev tap0
sudo ip addr add 10.0.0.2/24 dev tap1

sudo ip link set up tap0
sudo ip link set up tap1

sudo brctl addbr br0
sudo brctl addif br0 tap1
sudo brctl addif br0 tap0
sudo ip link set br0 up

The userland protocol stack has the ability to send and receive ARP. The procedure to generate this problem was as follows.

  1. throw an ARP Request from tap0.
  2. It reaches tap1 via br0 and throws an ARP Reply.
  3. br0 receives the ARP Reply, but it does not reach tap0.

I captured the packets as follows.

vagrant@impish64:~$ sudo tcpdump -i br0 -nv
tcpdump: listening on br0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
13:14:23.103549 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.0.2 tell 10.0.0.1, length 28
13:14:23.104203 ARP, Ethernet (len 6), IPv4 (len 4), Reply 10.0.0.2 is-at 3a:2c:25:5b:e1:40, length 28
vagrant@impish64:~$ sudo tcpdump -i tap0 -nv
tcpdump: listening on tap0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
13:13:40.868761 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.0.2 tell 10.0.0.1, length 28
vagrant@impish64:~$ sudo tcpdump -i tap1 -nv
tcpdump: listening on tap1, link-type EN10MB (Ethernet), snapshot length 262144 bytes
13:12:50.368294 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.0.2 tell 10.0.0.1, length 28
13:12:50.368699 ARP, Ethernet (len 6), IPv4 (len 4), Reply 10.0.0.2 is-at 3a:2c:25:5b:e1:40, length 28

The diagram of this problem is as follows.

diagram

Why doesn't the ARP Reply fly to tap0 with this setting?

A.B avatar
cl flag
A.B
check https://xyproblem.info/
A.B avatar
cl flag
A.B
An interface set as bridge port should *never* receive an IP address. Once set as bridge port, only the bridge self interface (br0) should be allowed to participate in routing. Even without IP address on it it will participate in routing, but addresses on ports cause routing issues. The addresses shouldn't be owned by the system, but only by the "userland protocol stack"s that you forgot to describe.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.