思科CISCO交换机调试,portfast,bpdugard,交换机安全配置

新闻资讯 2023-07-20 阅读 7 来源:扬帆启航

err-disable时的诊断与恢复

前两天有客户打电话来说server不工作,然后我到switch上一看发现连接server的那个端口变为err-disable。这样的情况时有发生,于是觉得有必要总结下便于以后查阅。

常见使用Err-disable的IOS平台

  • Catalyst 2900 / 3500 / 3700系列 (2950,3550,3750 )
  • 三层交换6500

Err-disable 的作用

当switch的操作系统发现某个端口发生错误,系统会把这个端口关闭,并且把LED指示灯变为橘黄色。其目的是保护网络的稳定性不受影响,因为端口错误的起因可能由于环路或者不稳定的线路等

Err-disable 的原因

在Err-disable detection开启的情况下,可能造成端口err-disable的原因如下。

  • Duplex mismatch (双工不匹配)
  • Port channel misconfiguration
  • BPDU guard violation
  • UniDirectional Link Detection (UDLD) condition
  • Late-collision detection
  • Link-flap detection (线路翻动)
  • Security violation
  • Port Aggregation Protocol (PAgP) flap
  • Layer 2 Tunneling Protocol (L2TP) guard
  • DHCP snooping rate-limit
  • Incorrect GBIC / Small Form-Factor Pluggable (SFP) module or cable
  • Address Resolution Protocol (ARP) inspection
  • Inline power

诊断方法:

  • show interface status
  • show errdisable recovery – 如果你开启了errdisable recovery功能
  • show log
  • show etherchannel sum
  • show interface satus err-disable

一般来讲sys log会提示端口在什么时段变为errdisable和什么触发它的。

底层的问题一般为:松动或者过长的线路 、网卡损坏

配置问题:port-channel配置错误造成环路;开启portfast和bpdu guard然后连接了两台交换机; 违反了端口完全

比较特殊的一种: 环路报错

当生成树协议没有成功阻挡一个环路的产生,端口收到它自身发送的keep alive 包的时候,自动进入err-disable

PM-4-ERR_DISABLE: loopback error detected on Gi4/1, putting Gi4/1 in err-disable state

思科解释如下:

  • Keepalives are sent on all interfaces by default in Cisco IOS Software Release 12.1EA-based software. In Cisco IOS Software Release 12.2SE-based software and later, keepalives are not sent by default on fiber and uplink interfaces. For more information, refer to Cisco bug ID CSCea46385

重新激活端口

首先要确保造成端口err-disable的根源的到解决(换卡,换网线,光纤,修改配置等)

方法一:shut,no shut

方法二:errdisable recovery / 开启 timeout选项

  • errdisable recover cause 【选项】
  • errdisable recover interval 【秒数】 – 默认300s
Router#show errdisable recovery ErrDisable Reason Timer Status ----------------- -------------- udld Disabled bpduguard Enabled security-violatio Disabled channel-misconfig Disabled pagp-flap Disabled dtp-flap Disabled link-flap Disabled l2ptguard Disabled psecure-violation Disabled gbic-invalid Disabled dhcp-rate-limit Disabled mac-limit Disabled unicast-flood Disabled arp-inspection Disabled by1/2023年7月20日/in技术分享

最近项目

分类

需要这类方案或设备?

提供选型建议、配置清单与施工报价,支持上门勘查。

立即咨询