![네트워크 네임스페이스에서 stp가 작동하지 않습니까?](https://linux55.com/image/120890/%EB%84%A4%ED%8A%B8%EC%9B%8C%ED%81%AC%20%EB%84%A4%EC%9E%84%EC%8A%A4%ED%8E%98%EC%9D%B4%EC%8A%A4%EC%97%90%EC%84%9C%20stp%EA%B0%80%20%EC%9E%91%EB%8F%99%ED%95%98%EC%A7%80%20%EC%95%8A%EC%8A%B5%EB%8B%88%EA%B9%8C%3F.png)
netns 내부의 Linux 브리지가 bpdus를 볼 수 있지만 토폴로지를 업데이트할 수 없는 이유는 무엇입니까?
각 네트워크에 브리지가 있는 NS300, NS301이라는 한 쌍의 네트워크를 만들었습니다. br300, br301, 브리지 3031-3130 사이의 첫 번째 veth 링크, 브리지 3031b-3130b 사이의 첫 번째 veth 링크 두 개의 veth 링크.
veth 인터페이스를 netnses로 설정하고, 업그레이드하고, 브리지에 종속시켰으며, veth 링크를 통해 브리지 사이의 STP BPDU를 양방향으로 볼 수 있습니다. 그러나 브리지는 BPDU에 응답하지 않는 것 같습니다. 루트 브리지 선택이 발생하지 않습니다. 각 브리지는 자신을 루트 브리지로 간주합니다.
브리지 사이에 두 번째 veth 링크를 추가함으로써 CPU 호스트 활용률이 100%인 루프를 효과적으로 만들었습니다(한 브리지에는 PC에 대한 물리적 링크가 있음). 브리지의 우선순위와 포트 비용을 사용하는 것은 별로 도움이 되지 않습니다.
두 veth 링크가 모두 비활성화되었습니다.
mikle@LabHost:~$ sudo ip netns show
NS301 (id: 1)
NS300 (id: 0)
mikle@LabHost:~$ sudo ip -n NS300 -br link show type veth
300b@if10 UP 46:03:77:1a:8c:f8 <BROADCAST,MULTICAST,UP,LOWER_UP>
3031@if22 DOWN 4a:db:50:ac:f2:bc <BROADCAST,MULTICAST>
3031b@if24 DOWN 8a:f7:74:8e:57:6a <BROADCAST,MULTICAST>
mikle@LabHost:~$ sudo ip -n NS301 -br link show type veth
301b@if12 UP 9a:1b:d5:c3:6b:07 <BROADCAST,MULTICAST,UP,LOWER_UP>
3130@if23 LOWERLAYERDOWN 6e:e6:83:e3:51:b8 <NO-CARRIER,BROADCAST,MULTICAST,UP>
3130b@if25 LOWERLAYERDOWN 9a:07:48:db:a8:dd <NO-CARRIER,BROADCAST,MULTICAST,UP>
mikle@LabHost:~$ sudo ip netns exec NS300 ip -d link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0 addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
2: br300: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1492 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 46:03:77:1a:8c:f8 brd ff:ff:ff:ff:ff:ff promiscuity 0
bridge forward_delay 3000 hello_time 200 max_age 2000 ageing_time 30000 stp_state 1 priority 4096 vlan_filtering 0 vlan_protocol 802.1Q bridge_id 1000.46:3:77:1a:8c:f8 designated_root 1000.46:3:77:1a:8c:f8 root_port 0 root_path_cost 0 topology_change 0 topology_change_detected 0 hello_timer 0.64 tcn_timer 0.00 topology_change_timer 0.00 gc_timer 86.64 vlan_default_pvid 1 group_fwd_mask 0 group_address 01:80:c2:00:00:00 mcast_snooping 1 mcast_router 1 mcast_query_use_ifaddr 0 mcast_querier 0 mcast_hash_elasticity 4 mcast_hash_max 512 mcast_last_member_count 2 mcast_startup_query_count 2 mcast_last_member_interval 100 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000 mcast_startup_query_interval 3125 nf_call_iptables 0 nf_call_ip6tables 0 nf_call_arptables 0 addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
9: 300b@if10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br300 state UP mode DEFAULT group default qlen 1000
link/ether 46:03:77:1a:8c:f8 brd ff:ff:ff:ff:ff:ff link-netnsid 0 promiscuity 1
veth
bridge_slave state forwarding priority 8 cost 50 hairpin off guard off root_block off fastleave off learning on flood on port_id 0x2001 port_no 0x1 designated_port 8193 designated_cost 0 designated_bridge 1000.46:3:77:1a:8c:f8 designated_root 1000.46:3:77:1a:8c:f8 hold_timer 0.00 message_age_timer 0.00 forward_delay_timer 0.00 topology_change_ack 0 config_pending 0 proxy_arp off proxy_arp_wifi off mcast_router 1 mcast_fast_leave off mcast_flood on addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
16: tun300: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1492 qdisc pfifo_fast master br300 state UNKNOWN mode DEFAULT group default qlen 1000
link/ether 52:6b:30:d6:d5:8f brd ff:ff:ff:ff:ff:ff promiscuity 1
bridge_slave state forwarding priority 32 cost 100 hairpin off guard off root_block off fastleave off learning on flood on port_id 0x8003 port_no 0x3 designated_port 32771 designated_cost 0 designated_bridge 1000.46:3:77:1a:8c:f8 designated_root 1000.46:3:77:1a:8c:f8 hold_timer 0.00 message_age_timer 0.00 forward_delay_timer 0.00 topology_change_ack 0 config_pending 0 proxy_arp off proxy_arp_wifi off mcast_router 1 mcast_fast_leave off mcast_flood on addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
23: 3031@if22: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue master br300 state DOWN mode DEFAULT group default qlen 1000
link/ether 4a:db:50:ac:f2:bc brd ff:ff:ff:ff:ff:ff link-netnsid 1 promiscuity 1
veth
bridge_slave state disabled priority 8 cost 50 hairpin off guard off root_block off fastleave off learning on flood on port_id 0x2002 port_no 0x2 designated_port 8194 designated_cost 0 designated_bridge 1000.46:3:77:1a:8c:f8 designated_root 1000.46:3:77:1a:8c:f8 hold_timer 0.00 message_age_timer 0.00 forward_delay_timer 0.00 topology_change_ack 0 config_pending 0 proxy_arp off proxy_arp_wifi off mcast_router 1 mcast_fast_leave off mcast_flood on addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
25: 3031b@if24: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue master br300 state DOWN mode DEFAULT group default qlen 1000
link/ether 8a:f7:74:8e:57:6a brd ff:ff:ff:ff:ff:ff link-netnsid 1 promiscuity 1
veth
bridge_slave state disabled priority 8 cost 50 hairpin off guard off root_block off fastleave off learning on flood on port_id 0x2004 port_no 0x4 designated_port 8196 designated_cost 0 designated_bridge 1000.46:3:77:1a:8c:f8 designated_root 1000.46:3:77:1a:8c:f8 hold_timer 0.00 message_age_timer 0.00 forward_delay_timer 0.00 topology_change_ack 0 config_pending 0 proxy_arp off proxy_arp_wifi off mcast_router 1 mcast_fast_leave off mcast_flood on addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
mikle@LabHost:~$ sudo ip netns exec NS301 ip -d link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0 addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
2: br301: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1492 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 6e:e6:83:e3:51:b8 brd ff:ff:ff:ff:ff:ff promiscuity 0
bridge forward_delay 3000 hello_time 200 max_age 2000 ageing_time 30000 stp_state 1 priority 32768 vlan_filtering 0 vlan_protocol 802.1Q bridge_id 8000.6e:e6:83:e3:51:b8 designated_root 8000.6e:e6:83:e3:51:b8 root_port 0 root_path_cost 0 topology_change 0 topology_change_detected 0 hello_timer 1.11 tcn_timer 0.00 topology_change_timer 0.00 gc_timer 237.11 vlan_default_pvid 1 group_fwd_mask 0 group_address 01:80:c2:00:00:00 mcast_snooping 1 mcast_router 1 mcast_query_use_ifaddr 0 mcast_querier 0 mcast_hash_elasticity 4 mcast_hash_max 512 mcast_last_member_count 2 mcast_startup_query_count 2 mcast_last_member_interval 100 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000 mcast_startup_query_interval 3125 nf_call_iptables 0 nf_call_ip6tables 0 nf_call_arptables 0 addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
11: 301b@if12: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br301 state UP mode DEFAULT group default qlen 1000
link/ether 9a:1b:d5:c3:6b:07 brd ff:ff:ff:ff:ff:ff link-netnsid 0 promiscuity 1
veth
bridge_slave state forwarding priority 32 cost 2 hairpin off guard off root_block off fastleave off learning on flood on port_id 0x8001 port_no 0x1 designated_port 32769 designated_cost 0 designated_bridge 8000.6e:e6:83:e3:51:b8 designated_root 8000.6e:e6:83:e3:51:b8 hold_timer 0.11 message_age_timer 0.00 forward_delay_timer 0.00 topology_change_ack 0 config_pending 0 proxy_arp off proxy_arp_wifi off mcast_router 1 mcast_fast_leave off mcast_flood on addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
17: tun301: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1492 qdisc pfifo_fast master br301 state UNKNOWN mode DEFAULT group default qlen 1000
link/ether ee:c5:9b:f8:1c:e5 brd ff:ff:ff:ff:ff:ff promiscuity 1
bridge_slave state forwarding priority 32 cost 100 hairpin off guard off root_block off fastleave off learning on flood on port_id 0x8003 port_no 0x3 designated_port 32771 designated_cost 0 designated_bridge 8000.6e:e6:83:e3:51:b8 designated_root 8000.6e:e6:83:e3:51:b8 hold_timer 0.11 message_age_timer 0.00 forward_delay_timer 0.00 topology_change_ack 0 config_pending 0 proxy_arp off proxy_arp_wifi off mcast_router 1 mcast_fast_leave off mcast_flood on addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
22: 3130@if23: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br301 state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
link/ether 6e:e6:83:e3:51:b8 brd ff:ff:ff:ff:ff:ff link-netnsid 1 promiscuity 1
veth
bridge_slave state disabled priority 32 cost 2 hairpin off guard off root_block off fastleave off learning on flood on port_id 0x8002 port_no 0x2 designated_port 32770 designated_cost 0 designated_bridge 8000.6e:e6:83:e3:51:b8 designated_root 8000.6e:e6:83:e3:51:b8 hold_timer 0.00 message_age_timer 0.00 forward_delay_timer 0.00 topology_change_ack 0 config_pending 0 proxy_arp off proxy_arp_wifi off mcast_router 1 mcast_fast_leave off mcast_flood on addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
24: 3130b@if25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br301 state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
link/ether 9a:07:48:db:a8:dd brd ff:ff:ff:ff:ff:ff link-netnsid 1 promiscuity 1
veth
bridge_slave state disabled priority 32 cost 2 hairpin off guard off root_block off fastleave off learning on flood on port_id 0x8004 port_no 0x4 designated_port 32772 designated_cost 0 designated_bridge 8000.6e:e6:83:e3:51:b8 designated_root 8000.6e:e6:83:e3:51:b8 hold_timer 0.00 message_age_timer 0.00 forward_delay_timer 0.00 topology_change_ack 0 config_pending 0 proxy_arp off proxy_arp_wifi off mcast_router 1 mcast_fast_leave off mcast_flood on addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
mikle@LabHost:~$ sudo ip netns exec NS300 brctl show
bridge name bridge id STP enabled interfaces
br300 1000.4603771a8cf8 yes 300b
3031
3031b
tun300
mikle@LabHost:~$ sudo ip netns exec NS300 brctl showstp br300
br300
bridge id 1000.4603771a8cf8
designated root 1000.4603771a8cf8
root port 0 path cost 0
max age 20.00 bridge max age 20.00
hello time 2.00 bridge hello time 2.00
forward delay 30.00 bridge forward delay 30.00
ageing time 300.00
hello timer 0.58 tcn timer 0.00
topology change timer 0.00 gc timer 38.58
flags
300b (1)
port id 2001 state forwarding
designated root 1000.4603771a8cf8 path cost 50
designated bridge 1000.4603771a8cf8 message age timer 0.00
designated port 2001 forward delay timer 0.00
designated cost 0 hold timer 0.00
flags
3031 (2)
port id 2002 state disabled
designated root 1000.4603771a8cf8 path cost 50
designated bridge 1000.4603771a8cf8 message age timer 0.00
designated port 2002 forward delay timer 0.00
designated cost 0 hold timer 0.00
flags
3031b (4)
port id 2004 state disabled
designated root 1000.4603771a8cf8 path cost 50
designated bridge 1000.4603771a8cf8 message age timer 0.00
designated port 2004 forward delay timer 0.00
designated cost 0 hold timer 0.00
flags
tun300 (3)
port id 8003 state forwarding
designated root 1000.4603771a8cf8 path cost 100
designated bridge 1000.4603771a8cf8 message age timer 0.00
designated port 8003 forward delay timer 0.00
designated cost 0 hold timer 0.00
flags
mikle@LabHost:~$ sudo ip netns exec NS300 brctl showmacs br300
port no mac addr is local? ageing timer
<... partially skipped ...>
3 18:9c:5d:1c:12:c7 no 1.09
3 2c:27:d7:be:01:24 no 248.84
1 4e:4d:4a:bb:b1:f7 no 115.99
3 54:7f:ee:1f:bf:bc no 18.33
3 9c:b6:54:7c:dd:0d no 1.77
3 b4:b5:2f:61:d8:a1 no 15.69
3 e4:c7:22:f2:ab:60 no 61.47
mikle@LabHost:~$ sudo ip netns exec NS301 brctl show
bridge name bridge id STP enabled interfaces
br301 8000.6ee683e351b8 yes 301b
3130
3130b
tun301
mikle@LabHost:~$ sudo ip netns exec NS301 brctl showstp br301
br301
bridge id 8000.6ee683e351b8
designated root 8000.6ee683e351b8
root port 0 path cost 0
max age 20.00 bridge max age 20.00
hello time 2.00 bridge hello time 2.00
forward delay 30.00 bridge forward delay 30.00
ageing time 300.00
hello timer 0.00 tcn timer 0.00
topology change timer 0.00 gc timer 155.99
flags
301b (1)
port id 8001 state forwarding
designated root 8000.6ee683e351b8 path cost 2
designated bridge 8000.6ee683e351b8 message age timer 0.00
designated port 8001 forward delay timer 0.00
designated cost 0 hold timer 0.00
flags
3130 (2)
port id 8002 state disabled
designated root 8000.6ee683e351b8 path cost 2
designated bridge 8000.6ee683e351b8 message age timer 0.00
designated port 8002 forward delay timer 0.00
designated cost 0 hold timer 0.00
flags
3130b (4)
port id 8004 state disabled
designated root 8000.6ee683e351b8 path cost 2
designated bridge 8000.6ee683e351b8 message age timer 0.00
designated port 8004 forward delay timer 0.00
designated cost 0 hold timer 0.00
flags
tun301 (3)
port id 8003 state forwarding
designated root 8000.6ee683e351b8 path cost 100
designated bridge 8000.6ee683e351b8 message age timer 0.00
designated port 8003 forward delay timer 0.00
designated cost 0 hold timer 0.00
flags
mikle@LabHost:~$ sudo ip netns exec NS301 brctl showmacs br301 | grep no
port no mac addr is local? ageing timer
1 36:d4:1d:c9:a8:73 no 38.66
3031 veth 링크가 작동 중이고 bpdus가 통과되었으며 루트 브리지가 수렴되지 않았습니다.
mikle@LabHost:~$ sudo ip netns exec NS300 ip link set 3031 up
mikle@LabHost:~$ sudo ip netns exec NS300 brctl showstp br300
br300
bridge id 1000.4603771a8cf8
designated root 1000.4603771a8cf8
root port 0 path cost 0
max age 20.00 bridge max age 20.00
hello time 2.00 bridge hello time 2.00
forward delay 30.00 bridge forward delay 30.00
ageing time 300.00
hello timer 1.50 tcn timer 0.00
topology change timer 0.00 gc timer 89.50
flags
300b (1)
port id 2001 state forwarding
designated root 1000.4603771a8cf8 path cost 50
designated bridge 1000.4603771a8cf8 message age timer 0.00
designated port 2001 forward delay timer 0.00
designated cost 0 hold timer 0.50
flags
3031 (2)
port id 2002 state listening
designated root 1000.4603771a8cf8 path cost 50
designated bridge 1000.4603771a8cf8 message age timer 0.00
designated port 2002 forward delay timer 15.20
designated cost 0 hold timer 0.50
flags
3031b (4)
port id 2004 state disabled
designated root 1000.4603771a8cf8 path cost 50
designated bridge 1000.4603771a8cf8 message age timer 0.00
designated port 2004 forward delay timer 0.00
designated cost 0 hold timer 0.00
flags
======
3031 (2)
port id 2002 state learning
designated root 1000.4603771a8cf8 path cost 50
designated bridge 1000.4603771a8cf8 message age timer 0.00
designated port 2002 forward delay timer 23.54
designated cost 0 hold timer 0.50
flags
sudo ip netns exec NS300 brctl showstp br300
br300
bridge id 1000.4603771a8cf8
designated root 1000.4603771a8cf8
root port 0 path cost 0
max age 20.00 bridge max age 20.00
hello time 2.00 bridge hello time 2.00
forward delay 30.00 bridge forward delay 30.00
ageing time 300.00
hello timer 1.60 tcn timer 0.00
topology change timer 49.85 gc timer 43.60
flags TOPOLOGY_CHANGE TOPOLOGY_CHANGE_DETECTED
300b (1)
port id 2001 state forwarding
designated root 1000.4603771a8cf8 path cost 50
designated bridge 1000.4603771a8cf8 message age timer 0.00
designated port 2001 forward delay timer 0.00
designated cost 0 hold timer 0.60
flags
3031 (2)
port id 2002 state forwarding
designated root 1000.4603771a8cf8 path cost 50
designated bridge 1000.4603771a8cf8 message age timer 0.00
designated port 2002 forward delay timer 0.00
designated cost 0 hold timer 0.60
flags
3031b (4)
port id 2004 state disabled
designated root 1000.4603771a8cf8 path cost 50
designated bridge 1000.4603771a8cf8 message age timer 0.00
designated port 2004 forward delay timer 0.00
designated cost 0 hold timer 0.00
flags
tun300 (3)
port id 8003 state forwarding
designated root 1000.4603771a8cf8 path cost 100
designated bridge 1000.4603771a8cf8 message age timer 0.00
designated port 8003 forward delay timer 0.00
designated cost 0 hold timer 0.60
flags
sudo ip netns exec NS300 brctl showmacs br300 | grep no
port no mac addr is local? ageing timer
<... skippped>
2 6e:e6:83:e3:51:b8 no 0.77
3 9c:b6:54:7c:dd:0d no 22.82
3 b4:b5:2f:61:d8:a1 no 22.93
sudo ip netns exec NS300 tcpdump -i 3031 -e -lv -Q out stp
tcpdump: listening on 3031, link-type EN10MB (Ethernet), capture size 262144 bytes
03:09:26.757635 4a:db:50:ac:f2:bc (oui Unknown) > 01:80:c2:00:00:00 (oui Unknown), 802.3, length 38: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl 0x03: STP 802.1d, Config, Flags [none], bridge-id 1000.46:03:77:1a:8c:f8.2002, length 35
message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 30.00s
root-id 1000.46:03:77:1a:8c:f8, root-pathcost 0
03:09:28.741625 4a:db:50:ac:f2:bc (oui Unknown) > 01:80:c2:00:00:00 (oui Unknown), 802.3, length 38: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl 0x03: STP 802.1d, Config, Flags [none], bridge-id 1000.46:03:77:1a:8c:f8.2002, length 35
message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 30.00s
root-id 1000.46:03:77:1a:8c:f8, root-pathcost 0
sudo ip netns exec NS300 tcpdump -i 3031 -e -lv -Q in stp
tcpdump: listening on 3031, link-type EN10MB (Ethernet), capture size 262144 bytes
03:09:42.757625 6e:e6:83:e3:51:b8 (oui Unknown) > 01:80:c2:00:00:00 (oui Unknown), 802.3, length 38: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl 0x03: STP 802.1d, Config, Flags [none], bridge-id 8000.6e:e6:83:e3:51:b8.8002, length 35
message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 30.00s
root-id 8000.6e:e6:83:e3:51:b8, root-pathcost 0
03:09:44.741627 6e:e6:83:e3:51:b8 (oui Unknown) > 01:80:c2:00:00:00 (oui Unknown), 802.3, length 38: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl 0x03: STP 802.1d, Config, Flags [none], bridge-id 8000.6e:e6:83:e3:51:b8.8002, length 35
message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 30.00s
root-id 8000.6e:e6:83:e3:51:b8, root-pathcost 0
mikle@LabHost:~$ sudo ip netns exec NS301 brctl showstp br301
br301
bridge id 8000.6ee683e351b8
designated root 8000.6ee683e351b8
root port 0 path cost 0
max age 20.00 bridge max age 20.00
hello time 2.00 bridge hello time 2.00
forward delay 30.00 bridge forward delay 30.00
ageing time 300.00
hello timer 0.79 tcn timer 0.00
topology change timer 0.00 gc timer 17.79
flags
3130 (2)
port id 8002 state forwarding
designated root 8000.6ee683e351b8 path cost 2
designated bridge 8000.6ee683e351b8 message age timer 0.00
designated port 8002 forward delay timer 0.00
designated cost 0 hold timer 0.00
flags
3130b (4)
port id 8004 state disabled
designated root 8000.6ee683e351b8 path cost 2
designated bridge 8000.6ee683e351b8 message age timer 0.00
designated port 8004 forward delay timer 0.00
designated cost 0 hold timer 0.00
flags
300301 veth 링크 작동, 100% CPU 로드, arp 순환.
sudo ip -n NS300 link set 3031b up
sudo ip netns exec NS300 brctl showstp br300
br300
bridge id 1000.4603771a8cf8
designated root 1000.4603771a8cf8
root port 0 path cost 0
max age 20.00 bridge max age 20.00
hello time 2.00 bridge hello time 2.00
forward delay 30.00 bridge forward delay 30.00
ageing time 300.00
hello timer 1.34 tcn timer 0.00
topology change timer 0.00 gc timer 53.34
flags
3031 (2)
port id 2002 state forwarding
designated root 1000.4603771a8cf8 path cost 50
designated bridge 1000.4603771a8cf8 message age timer 0.00
designated port 2002 forward delay timer 0.00
designated cost 0 hold timer 0.34
flags
3031b (4)
port id 2004 state listening
designated root 1000.4603771a8cf8 path cost 50
designated bridge 1000.4603771a8cf8 message age timer 0.00
designated port 2004 forward delay timer 4.10
designated cost 0 hold timer 0.34
flags
mikle@LabHost:~$ sudo ip netns exec NS301 brctl showstp br301
br301
bridge id 8000.6ee683e351b8
designated root 8000.6ee683e351b8
root port 0 path cost 0
max age 20.00 bridge max age 20.00
hello time 2.00 bridge hello time 2.00
forward delay 30.00 bridge forward delay 30.00
ageing time 300.00
hello timer 0.32 tcn timer 0.00
topology change timer 37.72 gc timer 6.32
flags TOPOLOGY_CHANGE TOPOLOGY_CHANGE_DETECTED
3130 (2)
port id 8002 state forwarding
designated root 8000.6ee683e351b8 path cost 2
designated bridge 8000.6ee683e351b8 message age timer 0.00
designated port 8002 forward delay timer 0.00
designated cost 0 hold timer 0.00
flags
3130b (4)
port id 8004 state forwarding
designated root 8000.6ee683e351b8 path cost 2
designated bridge 8000.6ee683e351b8 message age timer 0.00
designated port 8004 forward delay timer 0.00
답변1
나 또한 이 문제에 직면하여 세부 사항을 파헤쳐 보았다.
근본 원인은 stp 메시지가 bridge_slaves에서 올바르게 전송되지만 rcv 루틴이 init_ns
166 행으로 제한된다는 것입니다 net/llc/llc_input.c
( linux-source-5.15.0
이것은 내 ubunt jammy dist이지만 모든 dist에 대해 동일합니다).
int llc_rcv(struct sk_buff *skb, struct net_device *dev,
struct packet_type *pt, struct net_device *orig_dev)
{
struct llc_sap *sap;
struct llc_pdu_sn *pdu;
int dest;
int (*rcv)(struct sk_buff *, struct net_device *,
struct packet_type *, struct net_device *);
void (*sta_handler)(struct sk_buff *skb);
void (*sap_handler)(struct llc_sap *sap, struct sk_buff *skb);
if (!net_eq(dev_net(dev), &init_net))
goto drop;
...
}
따라서 이 삭제는 config 및 tcn과 같은 BPDU 메시지 처리를 거부합니다.