【实验】华三( H3C )交换机配置 IRF( BFD MAD )(用四台交换机做 IRF )

如需注册 @ccie.engineer 、@ccde.engineer 、@ccar.engineer 、@hcie.engineer 、@rhce.engineer 和 @cissp.engineer 邮箱,请点击这里
更多有关于 “ H3C 实验 ” 的文章,请点击这里

实验环境:

操作系统:Windows 7 专业版(当时最新正式版),模拟器:HCL 2.1.1(当时最新版本)

  • 路由器的型号是:H3C MSR36-20
  • 交换机的型号是:H3C S5820V2-54QS-GE
华三( H3C )交换机配置 IRF( BFD MAD )(用四台交换机做 IRF )
华三( H3C )交换机配置 IRF( BFD MAD )(用四台交换机做 IRF )

实验需求:

  • 在 SW1 、SW2 、SW4 和 SW5 之间配置 IRF ,采用 BFD MAD 多冲突检测;
  • BFD_SW 将作为 LACP MAD 的中间设备使用;
  • 为方便做实验,PC 采用路由器来模拟;
  • 最后,要求 PC 能 ping 通 SW3 。

实验步骤:

本实验主要涉及到的命令是:IRF( BFD MAD )和聚合口的配置,如需了解 BFD MAD 检测原理请点击这里

我们先来配置 PC 、SW3 和 BFD_SW :

PC :

sys
hostname PC

int g 0/0
ip address 10.0.30.2 255.255.255.0
shutdown
undo shutdown

int g 0/1
ip address 10.0.10.2 255.255.255.0
shutdown
undo shutdown

int g 0/2
ip address 10.0.20.2 255.255.255.0
shutdown
undo shutdown

int g 5/0
ip address 10.0.40.2 255.255.255.0
shutdown
undo shutdown
SW3 :

sys
hostname SW3

vlan 10
vlan 20
vlan 30
vlan 40

int vlan 10
ip add 10.0.10.1 255.255.255.0

int vlan 20
ip add 10.0.20.1 255.255.255.0

int vlan 30
ip add 10.0.30.1 255.255.255.0

int vlan 40
ip add 10.0.40.1 255.255.255.0

# 配置聚合接口
int bri 10
link-aggregation mode dynamic

# 将相应的物理端口加入到聚合口
int ran g 1/0/1 to g 1/0/4
port link-aggregation group 10

# 在聚合口里面配置 TRUNK 口
int bri 10
port link-type trunk
port trunk permit vlan 1 10 20 30 40
BFD_SW :

sys
hostname BFD_SW
vlan 999
port g 1/0/1 g 1/0/2 g 1/0/3 g 1/0/4

int ran g 1/0/1 to g 1/0/4
shutdown

接着配置 SW4 :

SW4 :

sys
hostname SW4

# 配置 IRF 域编号
irf domain 10

# 配置成员编号
irf member 1 renumber 4
y

# 保存配置并重启设备
save
y

quit
reboot
y

SW4 重启完成后,再接着配置 SW4 :

SW4 :

# 进入 IRF 物理端口视图,并关闭端口
sys
int range ten 4/0/49 to ten 4/0/52
shutdown
quit

# 进入 IRF 端口视图,在 IRF 成员 4 上创建 IRF 逻辑端口 1 和 2
irf-port 4/1
port group interface Ten-GigabitEthernet 4/0/49
port group interface Ten-GigabitEthernet 4/0/50
irf-port 4/2
port group interface Ten-GigabitEthernet 4/0/51
port group interface Ten-GigabitEthernet 4/0/52
quit

# 进入 IRF 物理端口视图,激活端口
int range ten 4/0/49 to ten 4/0/52
undo shutdown
quit

# 配置成员优先级
irf member 4 priority 1

# 激活 IRF 的逻辑端口
irf-port-configuration active

# 保存配置
save
y

y

接着配置 SW5 :

SW5 :

sys
hostname SW5

# 配置 IRF 域编号
irf domain 10

# 配置成员编号
irf member 1 renumber 5
y

# 保存配置并重启设备
save
y

quit
reboot
y

SW5 重启完成后,再接着配置 SW5 :

SW5 :

# 进入 IRF 物理端口视图,并关闭端口
sys
int range ten 5/0/49 to ten 5/0/51
shutdown
quit

# 进入 IRF 端口视图,在 IRF 成员 5 上创建 IRF 逻辑端口 1 和 2
irf-port 5/1
port group interface Ten-GigabitEthernet 5/0/51
irf-port 5/2
port group interface Ten-GigabitEthernet 5/0/49
port group interface Ten-GigabitEthernet 5/0/50
quit

# 进入 IRF 物理端口视图,激活端口
int range ten 5/0/49 to ten 5/0/51
undo shutdown
quit

# 配置成员优先级
irf member 5 priority 2

# 激活 IRF 的逻辑端口
irf-port-configuration active

# 保存配置
save
y

y

SW4 重启完成后,再接着配置 SW1 :

SW1 :

sys
hostname SW1

# 配置 IRF 域编号
irf domain 10

# 成员编号默认是 1,无需配置,也无需重启

# 进入 IRF 物理端口视图,并关闭端口
int range ten 1/0/49 to ten 1/0/51
shutdown
quit

# 进入 IRF 端口视图,在 IRF 成员 1 上创建 IRF 逻辑端口 1 和 2
irf-port 1/1
port group interface Ten-GigabitEthernet 1/0/49
port group interface Ten-GigabitEthernet 1/0/50
irf-port 1/2
port group interface Ten-GigabitEthernet 1/0/51
quit

# 进入 IRF 物理端口视图,激活端口
int range ten 1/0/49 to ten 1/0/51
undo shutdown
quit

# 配置成员优先级
irf member 1 priority 3

# 激活 IRF 的逻辑端口
irf-port-configuration active

# 保存配置
save
y

SW4 和 SW5 重启完成后,再接着配置 SW2 :

SW2 :

sys
hostname SW2

# 配置 IRF 域编号
irf domain 10

# 配置成员编号
irf member 1 renumber 2
y

# 保存配置并重启设备
save
y

quit
reboot
y

SW2 重启完成后,再接着配置 SW2 :

SW2 :

# 进入 IRF 物理端口视图,并关闭端口
sys
int range ten 2/0/49 to ten 2/0/52
shutdown
quit

# 进入 IRF 端口视图,在 IRF 成员 2 上创建 IRF 逻辑端口 1 和 2
irf-port 2/2
port group interface Ten-GigabitEthernet 2/0/49
port group interface Ten-GigabitEthernet 2/0/50
irf-port 2/1
port group interface Ten-GigabitEthernet 2/0/51
port group interface Ten-GigabitEthernet 2/0/52
quit

# 进入 IRF 物理端口视图,激活端口
int range ten 2/0/49 to ten 2/0/52
undo shutdown
quit

# 配置成员优先级
irf member 2 priority 4

# 最后再激活 Master 的 IRF 的逻辑端口
irf-port-configuration active

# 保存配置
save
y

y

SW1 、SW4 和 SW5 重启完成后,再接着配置 SW2 :

SW2 :

vlan 10
port g 2/0/1

vlan 20
port g 1/0/2

vlan 30
port g 4/0/1

vlan 40
port g 5/0/1

# 配置聚合口
int bri 10
link-aggregation mode dynamic

# 将相应的物理端口加入到聚合口
int ran g 1/0/1 g 2/0/2 g 4/0/2 g 5/0/2
port link-aggregation group 10

# 在聚合口里面配置 TRUNK 口
int bri 10
port link-type trunk
port trunk permit vlan 1 10 20 30 40

BFD MAD 标准配置如下所示。但如果在模拟器上使用下列命令做这个实验,是会出 bug 的。具体表现为网卡流量和 CPU 占用率飙高,且用 display mad verbose 命令查看 MAD status 处于 Faulty 状态,怀疑是模拟器对二层网络的处理有问题,关掉 STP 后不知道哪里出现环路了。

SW2 :

# 配置 BFD MAD

vlan 999
port g 1/0/9 g 2/0/9 g 4/0/9 g 5/0/9

interface Vlan-interface999
 mad bfd enable
 mad ip address 99.99.99.1 255.255.255.0 member 1
 mad ip address 99.99.99.2 255.255.255.0 member 2
 mad ip address 99.99.99.4 255.255.255.0 member 4
 mad ip address 99.99.99.5 255.255.255.0 member 5

int ran g 1/0/9 g 2/0/9 g 4/0/9 g 5/0/9
undo stp enable

再开启 BFD_SW 上的各个接口:

BFD_SW :

sys
int ran g 1/0/1 to g 1/0/4
undo shutdown

那是不是就没法在模拟器上做这个实验了呢?不是的,如下所示,我们可以把 BFD MAD 所用到的接口配置为三层口,然后将 BFD MAD 配置在三层聚合口上:

SW2 :

interface Route-Aggregation1
mad bfd enable
mad ip address 99.99.99.1 255.255.255.0 member 1
mad ip address 99.99.99.2 255.255.255.0 member 2
mad ip address 99.99.99.4 255.255.255.0 member 4
mad ip address 99.99.99.5 255.255.255.0 member 5

int ran g 1/0/9 g 2/0/9 g 4/0/9 g 5/0/9
shutdown
port link-mode route
port link-aggregation group 1
undo shutdown

再开启 BFD_SW 上的各个接口:

BFD_SW :

sys
int ran g 1/0/1 to g 1/0/4
undo shutdown

选举规则:

确定成员设备角色为 Master 或 Slave 的过程称为角色选举。

注:这是 S12500 的角色选举,如果是 S5120 最后一条应该是 MAC 地址小的优先。

角色选举会在拓扑变更的情况下产生,比如 IRF 建立、新设备加入、Master 设备离开或者故障、两个 IRF 合并等。角色选举规则如下:

  1. 当前 Master 优先( IRF 系统形成时,没有 Master 设备,所有加入的设备都认为自己是 Master ,会跳转到第二条规则继续比较);
  2. 成员优先级大的优先;
  3. 系统运行时间长的优先(各设备的系统运行时间信息也是通过 IRF Hello 报文来传递的);
  4. 成员编号小的优先。

从第一条开始判断,如果判断的结果是多个最优,则继续判断下一条,直到找到唯一最优的成员设备才停止比较。此最优成员设备即为 Master ,其它成员设备则均为 Slave 。

在角色选举完成后,IRF 形成,将进入 IRF 管理与维护阶段。

清理配置:

如需清理 H3C 设备的配置,并重做一遍实验,可使用如下命令:

<H3C>reset saved-configuration
The saved configuration file will be erased. Are you sure? [Y/N]:Y
Configuration file in flash: is being cleared.
Please wait ...
MainBoard:
Configuration file is cleared.
<H3C>
<H3C>reboot
Start to check configuration with next startup configuration file, please wait.........DONE!
Current configuration may be lost after the reboot, save current configuration? [Y/N]:N
This command will reboot the device. Continue? [Y/N]:Y
Now rebooting, please wait...

对于 SW2 、SW4 和 SW5 来说,还需要把成员编号修改回来:

# 配置成员编号
sys
irf member 2 renumber 1
y

# 保存配置并重启设备
save
y

quit
reboot
y

测试:

PC 成功 ping 通 SW3 :

[PC]ping 10.0.10.1
Ping 10.0.10.1 (10.0.10.1): 56 data bytes, press CTRL_C to break
56 bytes from 10.0.10.1: icmp_seq=0 ttl=255 time=4.000 ms
56 bytes from 10.0.10.1: icmp_seq=1 ttl=255 time=3.000 ms
56 bytes from 10.0.10.1: icmp_seq=2 ttl=255 time=2.000 ms
56 bytes from 10.0.10.1: icmp_seq=3 ttl=255 time=3.000 ms
56 bytes from 10.0.10.1: icmp_seq=4 ttl=255 time=3.000 ms

--- Ping statistics for 10.0.10.1 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 2.000/3.000/4.000/0.632 ms
[PC]%Jul  4 16:09:37:845 2019 PC PING/6/PING_STATISTICS: Ping statistics for 10.0.10.1: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 2.000/3.000/4.000/0.632 ms.

[PC]ping 10.0.20.1
Ping 10.0.20.1 (10.0.20.1): 56 data bytes, press CTRL_C to break
56 bytes from 10.0.20.1: icmp_seq=0 ttl=255 time=3.000 ms
56 bytes from 10.0.20.1: icmp_seq=1 ttl=255 time=3.000 ms
56 bytes from 10.0.20.1: icmp_seq=2 ttl=255 time=1.000 ms
56 bytes from 10.0.20.1: icmp_seq=3 ttl=255 time=2.000 ms
56 bytes from 10.0.20.1: icmp_seq=4 ttl=255 time=2.000 ms

--- Ping statistics for 10.0.20.1 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 1.000/2.200/3.000/0.748 ms
[PC]%Jul  4 16:09:41:295 2019 PC PING/6/PING_STATISTICS: Ping statistics for 10.0.20.1: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 1.000/2.200/3.000/0.748 ms.

[PC]ping 10.0.30.1
Ping 10.0.30.1 (10.0.30.1): 56 data bytes, press CTRL_C to break
56 bytes from 10.0.30.1: icmp_seq=0 ttl=255 time=3.000 ms
56 bytes from 10.0.30.1: icmp_seq=1 ttl=255 time=1.000 ms
56 bytes from 10.0.30.1: icmp_seq=2 ttl=255 time=2.000 ms
56 bytes from 10.0.30.1: icmp_seq=3 ttl=255 time=1.000 ms
56 bytes from 10.0.30.1: icmp_seq=4 ttl=255 time=1.000 ms

--- Ping statistics for 10.0.30.1 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 1.000/1.600/3.000/0.800 ms
[PC]%Jul  4 16:09:44:807 2019 PC PING/6/PING_STATISTICS: Ping statistics for 10.0.30.1: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 1.000/1.600/3.000/0.800 ms.

[PC]ping 10.0.40.1
Ping 10.0.40.1 (10.0.40.1): 56 data bytes, press CTRL_C to break
56 bytes from 10.0.40.1: icmp_seq=0 ttl=255 time=3.000 ms
56 bytes from 10.0.40.1: icmp_seq=1 ttl=255 time=2.000 ms
56 bytes from 10.0.40.1: icmp_seq=2 ttl=255 time=1.000 ms
56 bytes from 10.0.40.1: icmp_seq=3 ttl=255 time=2.000 ms
56 bytes from 10.0.40.1: icmp_seq=4 ttl=255 time=1.000 ms

--- Ping statistics for 10.0.40.1 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 1.000/1.800/3.000/0.748 ms
[PC]%Jul  4 16:09:48:276 2019 PC PING/6/PING_STATISTICS: Ping statistics for 10.0.40.1: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 1.000/1.800/3.000/0.748 ms.

[PC]

让我们来查看一下 IRF 的相关信息:

[SW2]display irf
MemberID    Role    Priority  CPU-Mac         Description
   1        Standby 3         7eb0-50f7-0104  ---
 *+2        Master  4         7eb0-5aa8-0204  ---
   4        Standby 1         8eed-2639-0504  ---
   5        Standby 2         8e05-d716-0704  ---
--------------------------------------------------
 * indicates the device is the master.
 + indicates the device through which the user logs in.

 The bridge MAC of the IRF is: 7eb0-5aa8-0200
 Auto upgrade                : yes
 Mac persistent              : 6 min
 Domain ID                   : 10
[SW2]
[SW2]display irf link
Member 1
 IRF Port  Interface                             Status
 1         Ten-GigabitEthernet1/0/49             UP
           Ten-GigabitEthernet1/0/50             UP
 2         Ten-GigabitEthernet1/0/51             UP
Member 2
 IRF Port  Interface                             Status
 1         Ten-GigabitEthernet2/0/51             UP
           Ten-GigabitEthernet2/0/52             UP
 2         Ten-GigabitEthernet2/0/49             UP
           Ten-GigabitEthernet2/0/50             UP
Member 4
 IRF Port  Interface                             Status
 1         Ten-GigabitEthernet4/0/49             UP
           Ten-GigabitEthernet4/0/50             UP
 2         Ten-GigabitEthernet4/0/51             UP
           Ten-GigabitEthernet4/0/52             UP
Member 5
 IRF Port  Interface                             Status
 1         Ten-GigabitEthernet5/0/51             UP
 2         Ten-GigabitEthernet5/0/49             UP
           Ten-GigabitEthernet5/0/50             UP
[SW2]

如果上面发现 int ten 2/0/50 是 down 的,那就 shutdown 、undo shutdown 一下这个接口。

接下来查看一下 BFD MAD 的相关信息:

[SW2]display mad
MAD ARP disabled.
MAD ND disabled.
MAD LACP disabled.
MAD BFD enabled.
[SW2]
[SW2]dis mad verbose
Multi-active recovery state: No
Excluded ports (user-configured):
Excluded ports (system-configured):
  Ten-GigabitEthernet1/0/49
  Ten-GigabitEthernet1/0/50
  Ten-GigabitEthernet1/0/51
  Ten-GigabitEthernet2/0/49
  Ten-GigabitEthernet2/0/50
  Ten-GigabitEthernet2/0/51
  Ten-GigabitEthernet2/0/52
  Ten-GigabitEthernet4/0/49
  Ten-GigabitEthernet4/0/50
  Ten-GigabitEthernet4/0/51
  Ten-GigabitEthernet4/0/52
  Ten-GigabitEthernet5/0/49
  Ten-GigabitEthernet5/0/50
  Ten-GigabitEthernet5/0/51
MAD ARP disabled.
MAD ND disabled.
MAD LACP disabled.
MAD BFD enabled interface: Route-Aggregation1
  MAD status                 : Normal
  Member ID   MAD IP address       Neighbor   MAD status
  1           99.99.99.1/24        2          Normal
  1           99.99.99.1/24        4          Normal
  1           99.99.99.1/24        5          Normal
  2           99.99.99.2/24        1          Normal
  2           99.99.99.2/24        4          Normal
  2           99.99.99.2/24        5          Normal
  4           99.99.99.4/24        1          Normal
  4           99.99.99.4/24        2          Normal
  4           99.99.99.4/24        5          Normal
  5           99.99.99.5/24        1          Normal
  5           99.99.99.5/24        2          Normal
  5           99.99.99.5/24        4          Normal
[SW2]

但如果使用 display bfd session 或 display bfd session verbose 命令查看,会发现 BFD 会话处于 down 状态 :

  • 当 IRF 正常运行时,只有 Master 上配置的 MAD IP 地址生效,Slave 设备上配置的 MAD IP 地址不生效,BFD 会话处于 down 状态;
  • 当 IRF 分裂后会形成多个 IRF ,不同 IRF 中 Master 上配置的 MAD IP 地址均会生效,BFD 会话被激活,此时会检测到多 Active 冲突。
[SW2]dis bfd session
 Total Session Num: 3     Up Session Num: 0     Init Mode: Active

 IPv4 session working in control packet mode:

 LD/RD            SourceAddr      DestAddr        State  Holdtime    Interface
 129/0            99.99.99.2      99.99.99.1      Down   0ms         RAGG1
 130/0            99.99.99.2      99.99.99.4      Down   0ms         RAGG1
 131/0            99.99.99.2      99.99.99.5      Down   0ms         RAGG1
[SW2]
[SW2]dis bfd session verbose
 Total Session Num: 3     Up Session Num: 0     Init Mode: Active

 IPv4 session working in control packet mode:
       Local Discr: 129                  Remote Discr: 0
         Source IP: 99.99.99.2         Destination IP: 99.99.99.1
     Session State: Down                    Interface: Route-Aggregation1
      Min Tx Inter: 400ms                Act Tx Inter: 100ms
      Min Rx Inter: 400ms                Detect Inter: 5000ms
          Rx Count: 0                        Tx Count: 8021
      Connect Type: Direct             Running Up for: 00:00:00
         Hold Time: 0ms                     Auth mode: None
       Detect Mode: Async                        Slot: 2
          Protocol: MAD
           Version: 1
         Diag Info: No Diagnostic

       Local Discr: 130                  Remote Discr: 0
         Source IP: 99.99.99.2         Destination IP: 99.99.99.4
     Session State: Down                    Interface: Route-Aggregation1
      Min Tx Inter: 400ms                Act Tx Inter: 100ms
      Min Rx Inter: 400ms                Detect Inter: 5000ms
          Rx Count: 0                        Tx Count: 8021
      Connect Type: Direct             Running Up for: 00:00:00
         Hold Time: 0ms                     Auth mode: None
       Detect Mode: Async                        Slot: 2
          Protocol: MAD
           Version: 1
         Diag Info: No Diagnostic

       Local Discr: 131                  Remote Discr: 0
         Source IP: 99.99.99.2         Destination IP: 99.99.99.5
     Session State: Down                    Interface: Route-Aggregation1
      Min Tx Inter: 400ms                Act Tx Inter: 100ms
      Min Rx Inter: 400ms                Detect Inter: 5000ms
          Rx Count: 0                        Tx Count: 8021
      Connect Type: Direct             Running Up for: 00:00:00
         Hold Time: 0ms                     Auth mode: None
       Detect Mode: Async                        Slot: 2
          Protocol: MAD
           Version: 1
         Diag Info: No Diagnostic

[SW2]

如下图所示,此时我们直接在 HCL 模拟器里停止掉 SW2 和 SW5 看看:

在 HCL 模拟器里停止掉 SW2 和 SW5
在 HCL 模拟器里停止掉 SW2 和 SW5

很快 SW1 和 SW4 会收到一个警告:

SW1 :

<SW2>%Jul  4 16:29:22:219 2019 SW2 BFD/5/BFD_CHANGE_FSM: Sess[99.99.99.1/99.99.99.4, LD/RD:130/130, Interface:RAGG1, SessType:Ctrl, LinkType:INET], Ver:1, Sta: UP->DOWN, Diag: 1 (Control Detection Time Expired)

SW4 :

<SW2>%Jul  4 16:29:20:739 2019 SW2 BFD/5/BFD_CHANGE_FSM: Sess[99.99.99.4/99.99.99.1, LD/RD:130/130, Interface:RAGG1, SessType:Ctrl, LinkType:INET], Ver:1, Sta: UP->DOWN, Diag: 1 (Control Detection Time Expired)

在 SW1 和 SW4 上看 BFD MAD 的邻居关系全部处于不可用状态:

SW1 :

[SW2]dis mad verbose
Multi-active recovery state: No
Excluded ports (user-configured):
Excluded ports (system-configured):
  Ten-GigabitEthernet1/0/49
  Ten-GigabitEthernet1/0/50
  Ten-GigabitEthernet1/0/51
MAD ARP disabled.
MAD ND disabled.
MAD LACP disabled.
MAD BFD enabled interface: Route-Aggregation1
  MAD status                 : Faulty
  Member ID   MAD IP address       Neighbor   MAD status
  1           99.99.99.1/24        2          Faulty
  1           99.99.99.1/24        4          Faulty
  1           99.99.99.1/24        5          Faulty
[SW2]
[SW2]dis bfd ses
[SW2]dis bfd session
 Total Session Num: 3     Up Session Num: 0     Init Mode: Active

 IPv4 session working in control packet mode:

 LD/RD            SourceAddr      DestAddr        State  Holdtime    Interface
 129/0            99.99.99.1      99.99.99.2      Down   0ms         RAGG1
 130/0            99.99.99.1      99.99.99.4      Down   0ms         RAGG1
 131/0            99.99.99.1      99.99.99.5      Down   0ms         RAGG1
[SW2]
SW4 :

[SW2]dis mad verbose
Multi-active recovery state: Yes
Excluded ports (user-configured):
Excluded ports (system-configured):
  Ten-GigabitEthernet4/0/49
  Ten-GigabitEthernet4/0/50
  Ten-GigabitEthernet4/0/51
  Ten-GigabitEthernet4/0/52
MAD ARP disabled.
MAD ND disabled.
MAD LACP disabled.
MAD BFD enabled interface: Route-Aggregation1
  MAD status                 : Faulty
  Member ID   MAD IP address       Neighbor   MAD status
  4           99.99.99.4/24        1          Faulty
  4           99.99.99.4/24        2          Faulty
  4           99.99.99.4/24        5          Faulty
[SW2]
[SW2]dis bfd session
 Total Session Num: 3     Up Session Num: 0     Init Mode: Active

 IPv4 session working in control packet mode:

 LD/RD            SourceAddr      DestAddr        State  Holdtime    Interface
 129/0            99.99.99.4      99.99.99.2      Down   0ms         RAGG1
 130/0            99.99.99.4      99.99.99.1      Down   0ms         RAGG1
 131/0            99.99.99.4      99.99.99.5      Down   0ms         RAGG1
[SW2]

如果我们查看 SW1 和 SW4 的 IRF 状态的话,会发现他们各自都为 master ,说明 BFD MAD 链路的通信确实有问题了:

SW1 :

[SW2]dis irf
MemberID    Role    Priority  CPU-Mac         Description
 *+1        Master  3         7eb0-50f7-0104  ---
--------------------------------------------------
 * indicates the device is the master.
 + indicates the device through which the user logs in.

 The bridge MAC of the IRF is: 7eb0-5aa8-0200
 Auto upgrade                : yes
 Mac persistent              : 6 min
 Domain ID                   : 10
[SW2]
[SW2]dis irf link
Member 1
 IRF Port  Interface                             Status
 1         Ten-GigabitEthernet1/0/49             DOWN
           Ten-GigabitEthernet1/0/50             DOWN
 2         Ten-GigabitEthernet1/0/51             DOWN
[SW2]
SW4 :

[SW2]dis irf
MemberID    Role    Priority  CPU-Mac         Description
 *+4        Master  1         8eed-2639-0504  ---
--------------------------------------------------
 * indicates the device is the master.
 + indicates the device through which the user logs in.

 The bridge MAC of the IRF is: 7eb0-5aa8-0200
 Auto upgrade                : yes
 Mac persistent              : 6 min
 Domain ID                   : 10
[SW2]
[SW2]dis irf link
Member 4
 IRF Port  Interface                             Status
 1         Ten-GigabitEthernet4/0/49             DOWN
           Ten-GigabitEthernet4/0/50             DOWN
 2         Ten-GigabitEthernet4/0/51             DOWN
           Ten-GigabitEthernet4/0/52             DOWN
[SW2]

通过上面的配置我们知道,这四台交换机的成员优先级如下所示:

  • SW4 :1
  • SW5 :2
  • SW1 :3
  • SW2 :4

因为 SW2 和 SW5 被停止了,所以理论上应该是 SW1 为 master ,SW4 被管理性关闭。巧的是 PC 上的 VLAN 10 、VLAN 20 、VLAN 30 和 VLAN 40 目前也确实只有 VLAN 20 是可以正常工作的:

[PC]ping 10.0.10.1
Ping 10.0.10.1 (10.0.10.1): 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out

--- Ping statistics for 10.0.10.1 ---
5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss
[PC]%Jul  4 17:05:23:473 2019 PC PING/6/PING_STATISTICS: Ping statistics for 10.0.10.1: 5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss.

[PC]ping 10.0.20.1
Ping 10.0.20.1 (10.0.20.1): 56 data bytes, press CTRL_C to break
56 bytes from 10.0.20.1: icmp_seq=0 ttl=255 time=1.000 ms
56 bytes from 10.0.20.1: icmp_seq=1 ttl=255 time=1.000 ms
56 bytes from 10.0.20.1: icmp_seq=2 ttl=255 time=1.000 ms
56 bytes from 10.0.20.1: icmp_seq=3 ttl=255 time=1.000 ms
56 bytes from 10.0.20.1: icmp_seq=4 ttl=255 time=1.000 ms

--- Ping statistics for 10.0.20.1 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 1.000/1.000/1.000/0.000 ms
[PC]%Jul  4 17:05:27:126 2019 PC PING/6/PING_STATISTICS: Ping statistics for 10.0.20.1: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 1.000/1.000/1.000/0.000 ms.

[PC]ping 10.0.30.1
Ping 10.0.30.1 (10.0.30.1): 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out

--- Ping statistics for 10.0.30.1 ---
5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss
[PC]%Jul  4 17:05:40:544 2019 PC PING/6/PING_STATISTICS: Ping statistics for 10.0.30.1: 5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss.

[PC]ping 10.0.40.1
Ping 10.0.40.1 (10.0.40.1): 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out

--- Ping statistics for 10.0.40.1 ---
5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss
[PC]%Jul  4 17:05:57:240 2019 PC PING/6/PING_STATISTICS: Ping statistics for 10.0.40.1: 5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss.

[PC]

总的来说,目前使用 HCL 模拟器来做这个实验还是有 bug 的。

至此,实验完成。

参考自:

  • http://www.h3c.com/cn/d_200804/603261_30003_0.htm
  • http://www.h3c.com/cn/d_201210/756264_30005_0.htm#_Toc338768553
  • http://www.h3c.com/CN/D_201512/903328_30005_0.htm#_Toc425776060
  • https://zhiliao.h3c.com/questions/dispcont/38517
  • https://www.cnblogs.com/sky5hat/p/10481939.html

 

本文完。如有疑问,欢迎在下方留言;如本文有什么错误,欢迎在下方留言指正,谢谢。

打赏 赞(0)
比特币钱包
以太坊钱包
比特币钱包二维码图片

比特币钱包扫描二维码打赏

以太坊钱包二维码图片

以太坊钱包扫描二维码打赏

Was this article helpful?

Related Articles

Leave A Comment?

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据