Need advice for the bridge tap interface to run stp traffic.
- created the tap interface and bridge
- Have come across stp BPDU is consumed by bridge.
- i'm running the scapy on the host, however i'm not seeing the stp BPDU on the bridge nor on the tapB interface when i run the tcppdump, please advise4.
- My intent is to send/inject stp BPDU via tapA and should receive on tapB or any tap interfaces on that bridge.
- I see packets with tcpdump on tapA, but they do not pass to bridge nor tapB interface.
scapy
Sent 1 packets.
send(Ether(dst="01:80:c2:00:00:00")/LLC()/STP(), iface="tapA")
WARNING: Mac address to reach destination not found. Using broadcast
sendp(Dot3(dst="01:80:c2:00:00:00",src="08:17:35:51:29:2e")/LLC(dsap=0xaa, ssap=0xaa)/SNAP(OUI=0x0c, code=0x010b)/STP(), iface="tapA1", count=1)
Sent 1 packets.
I'm running the tap listener where i open the scokets and recv/read the data on the tap interfaces for tapA and tapB
configuration:
root@santosh-virtualbox:/home/santosh#sudo brctl addbr testbridge
root@santosh-virtualbox:/home/santosh#sudo ip tuntap add mode tap tapA
oot@santosh-virtualbox:/home/santosh#sudo ip tuntap add mode tap tapB
root@santosh-virtualbox:/home/santosh#sudo brctl addif testbridge tapA
root@santosh-virtualbox:/home/santosh#sudo brctl addif testbridge tapB
root@santosh-virtualbox:/home/santosh#sudo brctl show
bridge name bridge id STP enabled interfaces
testbridge 8000.8207f065cdfb no tapA
tapB
root@santosh-virtualbox:/home/santosh#sudo ip addr add 192.168.67.1/24 dev tapA
root@santosh-virtualbox:/home/santosh#sudo ip addr add 192.168.67.2/24 dev tapB
ip link set dev tapA up
ip link set dev tapB up
ip link set dev testbridge up
ifconfig Output.
santosh@santosh-virtualbox:~/linux_source$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:26:cd:de brd ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic noprefixroute enp0s3
valid_lft 85637sec preferred_lft 85637sec
inet6 fe80::f7db:f963:8e15:157e/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:60:7a:a6 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.6/24 brd 192.168.1.255 scope global dynamic noprefixroute enp0s8
valid_lft 234879sec preferred_lft 234879sec
inet6 2401:4900:1f26:12bd:ba44:a1f5:3a20:8b18/64 scope global dynamic noprefixroute
valid_lft 86317sec preferred_lft 86317sec
inet6 fe80::1475:613b:ad77:89ee/64 scope link noprefixroute
valid_lft forever preferred_lft forever
4: testbridge: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether c2:26:1a:8b:d9:d0 brd ff:ff:ff:ff:ff:ff
inet6 fe80::c026:1aff:fe8b:d9d0/64 scope link
valid_lft forever preferred_lft forever
5: tapA: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master testaux state UP group default qlen 1000
link/ether 72:1c:e2:96:9d:d4 brd ff:ff:ff:ff:ff:ff
inet 192.168.67.1/24 scope global tapA
valid_lft forever preferred_lft forever
inet6 fe80::701c:e2ff:fe96:9dd4/64 scope link
valid_lft forever preferred_lft forever
6: tapB: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master testaux state UP group default qlen 1000
link/ether ca:07:2e:eb:c5:12 brd ff:ff:ff:ff:ff:ff
inet 192.168.67.2/24 scope global tapB
valid_lft forever preferred_lft forever
inet6 fe80::c807:2eff:feeb:c512/64 scope link
valid_lft forever preferred_lft forever
Regards,Santosh