14.5 MAC地址表漂移与检测

1.PC1连通性测试网关(R1),PC3连通性测试PC2查看SW1信息,检测到有MAC地址发生漂移

Feb 14 2023 15:21:53-08:00 SW1 L2IFPPI/4/MFLPVLANALARM:OID 1.3.6.1.4.1.2011.5.25.160.3.7 MAC move detected, VlanId = 100, MacAddress = 00e0-fc92-34b2, Original-Port = GE0/0/24, Flapping port = GE0/0/3. Please check the network accessed to flapping port.
Feb 14 2023 15:27:26-08:00 SW1 L2IFPPI/4/MFLPVLANALARM:OID 1.3.6.1.4.1.2011.5.25.160.3.7 MAC move detected, VlanId = 100, MacAddress = 00e0-fc92-34b2, Original-Port = GE0/0/24, Flapping port = GE0/0/3. Please check the network accessed to flapping port.

2.处理地址漂移方法一:提高SW1连接网关接口MAC地址学习的优先级,默认为0,值越大优先级越高

[SW1-GigabitEthernet0/0/24]mac-learning priority 3

3.PC1连通性测试网关(R1),PC3连通性测试PC2查看SW1信息

PC3>ping 192.168.1.2
Ping 192.168.1.2: 32 data bytes, Press Ctrl_C to break
From 192.168.1.3: Destination host unreachable

PC1>ping 192.168.1.254
Ping 192.168.1.254: 32 data bytes, Press Ctrl_C to break
From 192.168.1.254: bytes=32 seq=1 ttl=255 time=47 ms

[SW1-GigabitEthernet0/0/24]display mac-address 
5489-9849-1fd0 1           -      -      GE0/0/1         dynamic   0/-         
5489-9870-36f9 1           -      -      GE0/0/2         dynamic   0/-         
00e0-fc92-34b2 1           -      -      GE0/0/24        dynamic   0/-     

4.处理地址漂移方法二:全局模式下不允许优先级为0的MAC地址产生漂移

[SW1-GigabitEthernet0/0/24]undo mac-learning priority 
[SW1]undo mac-learning priority 0 allow-flapping 

5.PC1连通性测试网关(R1),PC3连通性测试PC2查看SW1信息

[SW1]display mac-address
5489-9870-36f9 1           -      -      GE0/0/2         dynamic   0/-         
5489-9849-1fd0 1           -      -      GE0/0/1         dynamic   0/-         
00e0-fc92-34b2 1           -      -      GE0/0/24        dynamic   0/-   

6.进入发生漂移端口,配置如果发生漂移就关闭端口

[SW1-GigabitEthernet0/0/3]mac-address flapping trigger error-down

7.PC1连通性测试网关(R1),PC3连通性测试PC2查看SW1信息,查看G0/0/3接口

[SW1]
Feb 14 2023 17:36:55-08:00 SW1 L2IFPPI/4/MFLPVLANALARM:OID 1.3.6.1.4.1.2011.5.25.160.3.7 MAC move detected, VlanId = 1, MacAddress = 00e0-fc92-34b2, Original-Port = GE0/0/24, Flapping port = GE0/0/3. Please check the network accessed to flapping port.
Feb 14 2023 17:36:56-08:00 SW1 %%01ERRDOWN/4/ERRDOWN_DOWNNOTIFY(l)[0]:Notify interface to change status to error-down. (InterfaceName=GigabitEthernet0/0/3, Cause=mac-address-flapping)
Feb 14 2023 17:36:56-08:00 SW1 ERRDOWN/4/ErrordownOccur:OID 1.3.6.1.4.1.2011.5.25.257.2.1 Error-down occured. (Ifindex=8, Ifname=GigabitEthernet0/0/3, Cause=mac-address-flapping)
Feb 14 2023 17:36:57-08:00 SW1 %%01PHY/1/PHY(l)[1]:    GigabitEthernet0/0/3: change status to down

[SW1]display interface brief        
Feb 14 2023 17:37:26-08:00 SW1 L2IFPPI/4/MFLPVLANALARM:OID 1.3.6.1.4.1.2011.5.25.160.3.7 MAC move detected, VlanId = 1, MacAddress = 00e0-fc92-34b2, Original-Port = GE0/0/24, Flapping port = GE0/0/3. Please check the network accessed tdisplay interface brief
PHY: Physical
*down: administratively down
(l): loopback
(s): spoofing
(b): BFD down
(e): ETHOAM down
(dl): DLDP down
(d): Dampening Suppressed
InUti/OutUti: input utility/output utility
Interface                   PHY   Protocol InUti OutUti   inErrors  outErrors
GigabitEthernet0/0/1        up    up          0%     0%          0          0
GigabitEthernet0/0/2        up    up          0%     0%          0          0
GigabitEthernet0/0/3        down  down        0%     0%          0          0

8.删除G0/0/3接口配置,启用端口

[SW1-GigabitEthernet0/0/3]undo  mac-address flapping trigger error-down
Feb 14 2023 17:45:10-08:00 SW1 %%01ERRDOWN/4/ERRDOWN_DOWNRECOVER(l)[2]:Notify interface to recover state from error-down. (InterfaceName=GigabitEthernet0/0/3)
Feb 14 2023 17:45:10-08:00 SW1 ERRDOWN/4/ErrordownRecover:OID 1.3.6.1.4.1.2011.5.25.257.2.2 Error-down recovered. (Ifindex=8, Ifname=GigabitEthernet0/0/3, Cause=mac-address-flapping, RecoverType=manual recovery)
Feb 14 2023 17:45:11-08:00 SW1 %%01PHY/1/PHY(l)[3]:    GigabitEthernet0/0/3: change status to up
Feb 14 2023 17:45:18-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.191.3.1 configurations have been changed. The current change number is 11, the change loop count is 0, and the maximum number of records is 4095.

[SW1-GigabitEthernet0/0/3]q
[SW1]display interface brief                     
PHY: Physical
*down: administratively down
(l): loopback
(s): spoofing
(b): BFD down
(e): ETHOAM down
(dl): DLDP down
(d): Dampening Suppressed
InUti/OutUti: input utility/output utility
Interface                   PHY   Protocol InUti OutUti   inErrors  outErrors
GigabitEthernet0/0/1        up    up          0%     0%          0          0
GigabitEthernet0/0/2        up    up          0%     0%          0          0
GigabitEthernet0/0/3        up    up          0%     0%          0          0
© 版权声明
THE END
喜欢就支持一下吧
点赞13 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称

    请登录后查看评论内容