STP生成树

交换网络冗余

image-20200412150851594

上面这个网络交换机之间没有冗余线路,如果发生故障,可能就会导致无法通信

image-20200412151535642

在局域网中,最害怕就是交换机环路,一旦交换机环路,就回产生广播风暴,然后迅速消耗内网设备的性能。

交换机和服务器都会崩溃。

解决思路就是让交换机自己发现内网的环路,然后选择一些线路进行逻辑上的阻塞,这样就不会有环路了。当网络故障的时候,再取消某些线路的阻塞状态,让网络自动恢复正常。

image-20200412152404994

交换机发现环路的思路

  • 首先在一个局域网中选择一台交换机作为root,周期性向外发送携带自己的信息(BPDU桥协议数据单元)
  • 其他交换机收到了之后,会在BPDU中累计开销之后从没收到的接口转发
  • 如果某台交换机发现可以从多个接口收到同一个BPDU,就说明环路了,之后选择路线进行阻塞

生成树

角色判定

  1. 每个广播域选择一个根桥
    1. 每个交换机产生一个桥ID,桥优先级(2字节)+数值最小的MAC地址(6字节)
      1. 桥优先级范围是0~61440
      2. 桥优先级默认是32768
      3. 桥优先级输入的时候,必须是4096的倍数
    2. 将桥ID的信息写入BPDU中
      1. 根桥ID:交换机认为谁是root,就写谁。初始的时候都认为自己的根桥
      2. 路径开销:交换机转发BPDU的时候,会将接口的开销写入
        1. 接口开销是根据IEEE组织规定的对照表设置
        2. 10Gbps 2
        3. 1Gbps 4
        4. 100Mbps 19
        5. 10Mbps 100
      3. 网桥ID:谁转发或者发送的BPDU就写谁的ID,根桥在发出的时候,就写根桥ID
      4. 端口ID:端口优先级(1字节)+端口编号(端口在交换机上的序号)
    3. 初始的时候大家都认为自己是根桥,如果收到其他的BPDU发现根桥ID更小,那就不用自己的,改为转发别人的。
    4. 一段时间之后,广播域所有的交换机都知道根桥是哪台交换机
1
2
3
4
5
Sw4#show int | in bia
Hardware is Ethernet, address is aabb.cc00.4000 (bia aabb.cc00.4000)
Hardware is Ethernet, address is aabb.cc00.4010 (bia aabb.cc00.4010)
Hardware is Ethernet, address is aabb.cc00.4020 (bia aabb.cc00.4020)
Hardware is Ethernet, address is aabb.cc00.4030 (bia aabb.cc00.4030)

image-20200412152940547

  1. 每个非根桥上选择一个根端口
    1. 经过上面的步骤,不是根桥的交换机会根据各个接口收到的BPDU信息判断出根端口
      1. 最低根桥ID(正常情况下,收到的BPDU)
      2. 到根桥的最低路径成本(比较Cost值,越小越优)
      3. 最低的发送者网桥ID(这个比的就是对方的ID)
      4. 最低的发送者端口ID
  2. 每个段选择一个指定端口
    1. 在交换机之间的每个线路上选择一头作为指定端口
      1. 最低根桥ID(正常情况下,收到的BPDU)
      2. 到根桥的最低路径成本(比较Cost值,越小越优)
      3. 最低的发送者网桥ID(这个比的就是对方的ID)
      4. 最低的发送者端口ID
  3. 什么角色都没有的那个接口(也被称为非指定端口)进行阻塞

image-20200412154717559

第一步:

sw1是根桥

第二步:

Sw2的e0/1是根端口

Sw3的e0/1是根端口

第三步:

Sw1的e0/1和e0/2是指定端口

Sw2的e0/2因为最低发送者网桥ID胜出,所以是指定端口

第四步:

Sw3的e0/2没有任何的角色,所以被阻塞,在思科设备中标注角色为Alternate

阻塞的接口

被判断为阻塞的接口会有以下特性:

  • 不会从这个接口发送任何数据
  • 这个接口不会学习任何的MAC地址
  • 这个接口会监听BPDU信息,并且记录下来和其他接口收到的BPDU通过STP计算比较优劣
  • 这个接口记录的BPDU会保存20s时间才会删除,每隔2s收到对方发送的BPDU都会重置20s计时器
  • 如果20s都没有收到任何BPDU,这个接口就会尝试开启

端口状态

image-20200412155613240 image-20200412155721262
  • In the blocking state, ports can only receive BPDUs. It may take up to 20 seconds to change from this state;
  • In listening state, switches determine if there are any other paths to the root bridge. the forward delay and lasts for 15 seconds. In the listening state, user data is not being forwarded and MAC addresses are not being learned;
  • In learning state user data is not forwarded, but MAC addresses are learned from any traffic that is seen. The learning state lasts for 15 seconds and is also called the forward delay;
  • In forwarding state user data is forwarded and MAC addresses continue to be learned. BPDUs are still processed;

STP拓扑变更过程

image-20200412160244033
  1. SwitchA挂掉
  2. SwitchB最先检测到拓扑变化,于是产生TCN BPDU并从根端口发送出去(因为根端口是朝着根桥的方向),B将连续发送TCN BPDU直到指定交换机C发送TCN ACK进行确认
  3. SwitchB收到这个TCN BPDU,回送一个TCN ACK进行确认,同时向自己的根端口转发这个TCN BPDU
  4. Root收到这个TCN,回送一个TCN ACK给C
image-20200412160330349
  1. Root收到这个TCN,回送一个TCN ACK给C。
  2. Root修改自己的配置BPDU,以此来通告整个交换网络关于拓扑变更的情况。Root在配置BPDU中设置一段时间的拓扑变更(TC标志),这段时间等于转发延迟+Max. Age,默认35S
image-20200412160400948
  1. 当交换机收到Root发出的这个TC标志置位的配置BPDU,它们使用转发延迟计时器(默认15S)来更新其MAC地址表中的条目。也就是说条目的寿命由原来的300S的默认值变成15S,这样能保证MAC地址条目更快速的刷新。交换机将持续这个过程,直到不再从Root收到TC BPDU消息为止。

STP的各种标准

STP发展到今天,为了解决各种各样的缺陷,出现了不同的标准,不同标准之间一般是不兼容的。

  • CST公共生成树 802.1D
    • 所有的VLAN都共用一颗生成树,所有的流量都是按照一条路线走的
  • PVST+
    • 每个vlan都有各自独立的生成树,可以独立调整阻塞的端口
  • RSTP快速生成树 802.1W
    • 在处理拓扑变更的时候,使用类型字段中定义的提议和同意字段,做到快速的将接口状态变为FWD
    • RSTP本身不对多生成树做调整,所以一般会和其他的标准搭配使用,比如PVRST+
  • MSTP多实例生成树 802.1S
    • 将不同的vlan分配到各自不同的实例中,然后每个实例一个独立的生成树

PVST+

在CST下,所有的VLAN被阻塞的接口都是同一个,这样在网络负载满的情况下,就有线路浪费。

Cisco私有生成树协议PVST+给每个VLAN都使用一个完全不同的生成树,可以自由的调整各自的优先级,做到每个线路都可以被用上。

对于生成树而言,最关键的因素就是桥ID,所以要让不同的VLAN有各自独立的生成树,就必须每台交换机有几个VLAN就有几个桥ID。

桥优先级(2字节)+数值最小的MAC地址(6字节),不可能将一台交换机上所有的MAC都拿来做区分,有时候VLAN号会有几十上百,而交换机接口MAC地址不够。而桥优先级一共有16位,但是用不到这么多。所以将原本CST的桥优先级进行划分。新的桥ID出现

桥优先级(4bit)+系统扩展ID(12bit)+数值最小的MAC地址(48bit)

系统扩展ID其实就是VLAN号

现有的设备,为了兼容CST的标准,在计算优先级的时候,还是会将前2字节作为优先级来显示。

image-20200425093018922

配置vlan10,20,然后vlan10阻塞Sw3的e0/1,vlan20阻塞Sw3的e0/0

1
2
3
4
5
6
7
8
9
10
11
12
13
14
SW1(config)#vlan 10,20
SW1(config)#int range e0/0 -1
SW1(config-if-range)#sw tr en do
SW1(config-if-range)#sw mo tr
==================================
SW2(config)#vlan 10,20
SW2(config)#int range e0/0 -1
SW2(config-if-range)#sw tr en do
SW2(config-if-range)#sw mo tr
==================================
SW3(config)#vlan 10,20
SW3(config)#int range e0/0 -1
SW3(config-if-range)#sw tr en do
SW3(config-if-range)#sw mo tr

默认情况下,vlan10,20都是阻塞的Sw3的e0/1口

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
SW3#sh spanning-tree
VLAN0010
Spanning tree enabled protocol ieee
Root ID Priority 32778
Address aabb.cc00.1000
Cost 100
Port 1 (Ethernet0/0)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)
Address aabb.cc00.3000
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 15 sec

Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0 Root FWD 100 128.1 P2p
Et0/1 Altn BLK 100 128.2 P2p

VLAN0020
Spanning tree enabled protocol ieee
Root ID Priority 32788
Address aabb.cc00.1000
Cost 100
Port 1 (Ethernet0/0)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32788 (priority 32768 sys-id-ext 20)
Address aabb.cc00.3000
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 15 sec

Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0 Root FWD 100 128.1 P2p
Et0/1 Altn BLK 100 128.2 P2p

配置vlan20的优先级,我们只需要将Sw2配置为vlan20的根桥,这样Sw3的e0/1就变成了根端口

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
SW2(config)#spanning-tree vlan 20 priority 32767
% Bridge Priority must be in increments of 4096.
% Allowed values are:
0 4096 8192 12288 16384 20480 24576 28672
32768 36864 40960 45056 49152 53248 57344 61440
# 优先级只能是4096的倍数,因为二进制中,后12bit都已经让出来了,不能被你修改
SW2(config)#spanning-tree vlan 20 priority 28672
SW2#show spanning-tree
VLAN0020
Spanning tree enabled protocol ieee
Root ID Priority 28692
Address aabb.cc00.2000
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 28692 (priority 28672 sys-id-ext 20)
Address aabb.cc00.2000
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec

Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0 Desg FWD 100 128.1 P2p
Et0/1 Desg FWD 100 128.2 P2p

查看Sw3上vlan10,20阻塞接口的状态

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
SW3#show spanning-tree
VLAN0010
Spanning tree enabled protocol ieee
Root ID Priority 32778
Address aabb.cc00.1000
Cost 100
Port 1 (Ethernet0/0)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)
Address aabb.cc00.3000
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec

Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0 Root FWD 100 128.1 P2p
Et0/1 Altn BLK 100 128.2 P2p
VLAN0020
Spanning tree enabled protocol ieee
Root ID Priority 28692
Address aabb.cc00.2000
Cost 100
Port 2 (Ethernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32788 (priority 32768 sys-id-ext 20)
Address aabb.cc00.3000
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec

Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0 Altn BLK 100 128.1 P2p
Et0/1 Root FWD 100 128.2 P2p

可以使用宏命令,让交换机自己去判断当前根桥的优先级,然后降低数值

1
2
3
SW1(config)#spanning-tree vlan 10 root ?
primary Configure this switch as primary root for this spanning tree
secondary Configure switch as secondary root
  • primary
    • 交换机会将优先级调整比现在的根桥还要低8192
  • secondary
    • 交换机会将优先级调整比现在的根桥还要低4096

宏命令是一次性的,判定结束之后,就会生成一条修改优先级的命令

1
2
SW1#sh run | sec span
spanning-tree vlan 10 priority 24576

RSTP

image-20200425101156579

R6和R7作为观察者,配置IP地址,并且可以互相通信

SW4的e0/2接口设置为关闭状态,模拟没有这根线

1
2
3
4
5
6
7
8
9
10
11
12
R6(config)#int e0/0
R6(config-if)#ip add 192.168.67.6 255.255.255.0
R6(config-if)#no sh
R7(config)#int e0/0
R7(config-if)#ip add 192.168.67.7 255.255.255.0
R7(config-if)#no sh
R7#ping 192.168.67.6 repeat 100
Type escape sequence to abort.
Sending 100, 100-byte ICMP Echos to 192.168.67.6, timeout is 2 seconds:
.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 99 percent (99/100), round-trip min/avg/max = 1/1/6 ms

如果在R6和R7正常通信的时候,Sw1和Sw4之间多出来一条线路,会发生如下过程:

  • Sw1会发送BPDU给Sw4,Sw4收到之后会转发给Sw3
  • Sw3会从e0/1 和e0/2都收到同一个根桥的BPDU,根据STP计算,将e0/2阻塞
  • Sw4的e0/2从disable到learning,learning经过15s变为listening,listening经过15s变为forwarding
  • 最终R6和R7恢复了通信,经历了最长30s的中断
1
2
3
4
5
6
7
8
9
10
11
12
13
Sw4(config)#int e0/2
Sw4(config-if)#no sh
R6#ping 192.168.67.7 repeat 10000
Type escape sequence to abort.
Sending 10000, 100-byte ICMP Echos to 192.168.67.7, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!...............!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 98 percent (1417/1432), round-trip min/avg/max = 1/1/7 ms
# 中间出现了15个超时,一个超时2s

如果R6和R7正常的通信的时候,Sw1和Sw4中间的线路断开,会发生如下过程:

  • Sw4的e0/2口断开之后,通信立马中断
  • Sw3的e0/2接口,在20s之后将缓存的BPDU老化,然后进入Lis+LRN+fwd
  • Sw3的e0/2接口最多需要50s才能恢复正常
1
2
3
4
5
6
7
8
9
10
11
12
Sw4(config)#int e0/2
Sw4(config-if)#sh
R6#ping 192.168.67.7 repeat 10000
Type escape sequence to abort.
Sending 10000, 100-byte ICMP Echos to 192.168.67.7, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.........................!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.
Success rate is 98 percent (1288/1314), round-trip min/avg/max = 1/1/10 ms
# 中间出现了25个超时,一个超时2s

经过上述实验,发现PVST和CST的反应速度并不快。所以出现了RSTP

将所有的交换机换成RSTP,在每个交换机上敲如下命令切换

1
Switch(config)#spanning-tree mode rapid-pvst

然后模拟Sw1和Sw4之间新增线路,R6和R7持续通信,发送过程如下:

  • 当Sw1发送BPDU给Sw4之后,Sw4立即将e0/1,e1/1,e0/3进行阻塞,然后回复给Sw1没有环路,然后e0/2变为FWD,不需要经过lis+lrn
  • Sw4在阻塞下联接口的时候,同时也发送了BPDU,然后Sw5收到了,由于Sw5没有下联接口,所以直接给Sw4确认无环路,然后Sw4放开e0/1接口,Sw5也立即将e0/1变为FWD
  • Sw4在阻塞下联接口的时候,同时也发送了BPDU,然后Sw3收到了,Sw3同时也收到了e0/1的BPDU,然后立即判断e0/2被阻塞,完成这个过程
image-20200425103906444

在BPDU的类型字段中有8bit,RSTP重新定义了部分功能,主要体现在第6和1位,指定端口在发出BPDU的时候,会提议下联的交换机阻塞其它接口,然后直接FWD。当下联交换机接受到,并且处理完成,就回Agreement。

MSTP

image-20200425104420923

如果有100个VLAN,那么使用PVST+就需要维护100个生成树,每个生成树都会2s产生一个BPDU,并且拓扑发生变化,那么就有100个TCN和TCACK消息,会让资源消耗加剧。

我们可以将每50个VLAN作为一个分组实例,其实只需要两个生成树,每个生成树承担50个VLAN的流量就行了。

1
2
3
4
5
vlan 1-100
spanning-tree mode mst
spanning-tree mst configuration
instance 1 vlan 1-50
instance 2 vlan 51-100

查看实例中vlan分配情况

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Sw1(config-mst)#spanning-tree mst configuration
Sw1(config-mst)#show pending
Pending MST configuration
Name []
Revision 0 Instances configured 3

Instance Vlans mapped
-------- ---------------------------------------------------------------------
0 101-4094
1 1-50
2 51-100
-------------------------------------------------------------------------------
Sw1#show spanning-tree mst configuration
Name []
Revision 0 Instances configured 3

Instance Vlans mapped
-------- ---------------------------------------------------------------------
0 101-4094
1 1-50
2 51-100
-------------------------------------------------------------------------------

修改不同实例的优先级,其中系统扩展ID就是实例号

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Sw1(config)#spanning-tree mst 1 root primary   
Sw1(config)#spanning-tree mst 2 root secondary
===========================================
Sw2(config)#spanning-tree mst 1 root secondary
Sw2(config)#spanning-tree mst 2 root primary
===========================================
Sw3#sh spanning-tree
MST1
Spanning tree enabled protocol mstp
Root ID Priority 24577
Address aabb.cc00.1000
Cost 2000000
Port 1 (Ethernet0/0)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address aabb.cc00.3000
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0 Root FWD 2000000 128.1 P2p
Et0/1 Altn BLK 2000000 128.2 P2p
MST2
Spanning tree enabled protocol mstp
Root ID Priority 24578
Address aabb.cc00.2000
Cost 2000000
Port 2 (Ethernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32770 (priority 32768 sys-id-ext 2)
Address aabb.cc00.3000
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0 Altn BLK 2000000 128.1 P2p
Et0/1 Root FWD 2000000 128.2 P2p

生成树特性

portfast

正常情况下,交换机接口如果新插入了某台设备,为了防止环路,这个接口会经历LIS-LRN这个过程,也就是会有30s不通。

如果确定某个接口不会接入交换机,接入的都是终端设备,比如墙上插孔,可以将这个接口设置为portfast,一旦接口为portfast那么这个接口就不参与生成树,只要连上,就是FWD。

1
2
3
4
5
6
7
8
9
Switch(config)#int range e0/1-2            
Switch(config-if-range)#spanning-tree portfast
%Warning: portfast should only be enabled on ports connected to a single
host. Connecting hubs, concentrators, switches, bridges, etc... to this
interface when portfast is enabled, can cause temporary bridging loops.
Use with CAUTION

%Portfast will be configured in 2 interfaces due to the range command
but will only have effect when the interfaces are in a non-trunking mode.

portfast是可以配置在trunk上的,正常情况下连接交换机的trunk不可以配置,防止环路,但是如果是服务器,就可以配置portfast,但是一般没必要。

BPDUGuard

BPDUGuard

  • 该接口在收到BPDU报文后,会立即切换到err-disable状态
  • 常搭配portfast特性在接口上一起使用,用于连接主机
  • 可在接口模式上激活,也可在全局模式上配置,两者有所不同

比如公司内网的接口,正常情况下是给你连接PC用的,如果你私自带了交换机路由器,可能会导致公司内网环路,可以配置BPDUGurad在这些portfast接口上

err-disable的状态类似于shutdown,不过是可以自动恢复的,默认恢复时间是300s,在交换机安全策略里面经常使用err-disable来防护内网的攻击,比如检查到arp风暴,比如检测到不正常的DHCP消息。

1
2
Switch(config)#int e0/1
Switch(config-if)#spanning-tree bpduguard enable

BPDUFilter

上面的BPDUGuard是收到BPDU之后,立即将接口err-disable,而BPDUFilter是收到BPDU之后,立即删除portfast特性,来防止环路。

BPDUGuard是比较强硬的,一般用于公司的接入层。BPDUFilter用于数据中心内部网络,接口接入服务器就是portfast,接入交换机,就是stp。

1
2
Switch(config)#int e0/1
Switch(config-if)#spanning-tree bpdufilter enable

RootGuard

一般园区网的根桥都在核心设备上,阻塞都是发生在远离根桥的地方。如果接入层出现了优先级极高的交换机,就可能导致核心设备之间被阻塞,所以需要进行根防护。

配置了RootGuard的接口,在收到了更好根桥ID的BPDU的时候,就将接口变为inconsistent状态,这个状态会阻止这个接口的对应VLAN的流量。

image-20200425113038325

LoopGuard

在光纤通信比较常见,因为LC连接器是由两根线组成的一条线路,其中一根线负责发一根线负责收,断掉任何一根线,就会导致单向通信。

img

单向通信会导致环路。 所以可以在所有的非指定端口上配置LoopGuard,当停止收到BPDU的时候,这个接口就会进入inconsistent状态

目前检查单向链路用的最多的是BFD技术。

评论
加载中,最新评论有1分钟缓存...