Thank you @DavideS and @ederollora for your support.
I used your (@ederollora) arp headers and implemented arp_forward table inside P4 switch. Now,
when I execute iperf3 -s
on host3(10.0.3.3) and execute iperf3 -c 10.0.3.3
on host1, I can see that packet
16:09:37.736109 ARP, Request who-has 10.0.3.3 tell 10.0.1.1, length 42
reaches port1 of switch 1, I forward it to port3, it comes to port3 of switch1 as
16:09:37.736572 ARP, Request who-has 10.0.3.3 tell 10.0.1.1, length 58
.
The packet automatically reaches port3 of switch3 as
16:09:37.744707 ARP, Request who-has 10.0.3.3 tell 10.0.1.1, length 58
,
then I arp_forward
it to port1 of switch3, it reaches there as
16:09:37.745040 ARP, Request who-has 10.0.3.3 tell 10.0.1.1, length 74
.
Finally it reaches the host3. Host3 is sending reply but it doesn’t reach port1 of switch3 somehow.
Host3 :
listening on ens7, link-type EN10MB (Ethernet), capture size 262144 bytes
20:09:32.651431 ARP, Request who-has 10.0.3.3 tell 10.0.1.1, length 74
20:09:32.651456 ARP, Reply 10.0.3.3 is-at 0e:0e:1e:d0:59:85 (oui Unknown), length 28
20:09:33.652963 ARP, Request who-has 10.0.3.3 tell 10.0.1.1, length 74
20:09:33.652973 ARP, Reply 10.0.3.3 is-at 0e:0e:1e:d0:59:85 (oui Unknown), length 28
20:09:34.677334 ARP, Request who-has 10.0.3.3 tell 10.0.1.1, length 74
20:09:34.677342 ARP, Reply 10.0.3.3 is-at 0e:0e:1e:d0:59:85 (oui Unknown), length 28
20:09:35.701361 ARP, Request who-has 10.0.3.3 tell 10.0.1.1, length 74
20:09:35.701366 ARP, Reply 10.0.3.3 is-at 0e:0e:1e:d0:59:85 (oui Unknown), length 28
20:09:36.725329 ARP, Request who-has 10.0.3.3 tell 10.0.1.1, length 74
20:09:36.725337 ARP, Reply 10.0.3.3 is-at 0e:0e:1e:d0:59:85 (oui Unknown), length 28
20:09:37.748862 ARP, Request who-has 10.0.3.3 tell 10.0.1.1, length 74
20:09:37.748884 ARP, Reply 10.0.3.3 is-at 0e:0e:1e:d0:59:85 (oui Unknown), length 28
According to my assumption reply packets should reach port1 of switch3, but it doesn’t. What may be the reason?
My P4 program is : p4_tutorials/pl_basic/arp_pl.p4 at main · nagmat1/p4_tutorials · GitHub
Attaching screenshot as well : First row is switch1, second row switch2, thrid row switch3.