嘘~ 正在从服务器偷取页面 . . .

交换机端口及常见问题定位(二)


Agenda
1,常用线缆及收发器
2,交换机端口类型
3,常用命令
4,常用诊断工具
5,光口不能UP故障
6,电口为半双工故障
7,端口UP/DOWN故障
8,端口err-disable故障
9,网络排障方法总结
10,Console Port介绍
11,Lenovo TOR 交换机家族

端口类型:

Cisco 交换机
对 Cisco 设备来说,交换机的端口分三种: access、 trunk、三层口(no switchport)

华为交换机
对华为交换机来说,交换机的端口分为 :access、 trunk、 hybrid(杂合端口)

Lenovo ToR交换机
对BNT交换机来说,交换机的端口分为:untagging 和 tagging 端口

access 端口:
1,一个 access 端口只能属于一个 VLAN,它只能转发这个 VLAN 的数据,它是一个端口最后的归宿,
即它不能和所连的端口静态或动态地形成 trunk,那么它就回归为 access
2,Cisco 交换机的端口缺省为 dynamic desirable,或 dynamic auto
3,dynamic desirable:动态可取模式,主动对端协商,也就是通常的Trunk模式优先。在可以和对端
协商成trunk模式时使用trunk模式,不行则改为access模式
4,华为交换机的access 端口等同于Cisco的access 端口

trunk 端口:
1,当一个端口要转发多个 VLAN 的流量,那么这个端口要属于多个 VLAN,对 Cisco 的设备来说,这个
端口的类型要设置为 trunk,也就是当一个端口属于 trunk 类型,那么它属于任何 VLAN
2,对于华为的设备来说, 等同 Cisco 的 trunk。 不同的是缺省情况下,华为的 trunk 只属于
VLAN 1,要想属于哪些 VLAN,要手工加入

untagging 端口:
相同于 Cisco 交换机的 access 口,是端口的缺省模式

tagging 端口:
1,相当于 Cisco 交换机的 trunk 口,不同的是,缺省情况下, trunk 口属于所有的 VLAN,
tagging 口可以属于多个或所有 VLAN,但要手工加入
2,对于刀片交换机,外部端口缺省为 untagging 端口,内部端口缺省为 tagging 端口

hybrid 端口:
华为交换机的特殊端口类型,介于 access 和 trunk 之间即杂合模式,象 trunk 一样可以让多个
VLAN 通过,但又不象 trunk 那样,除了 PVID 的帧外,把其它所有的 VLAN 都要打上 TAG 发去,
hybrid 端口可对这些非PVID VLAN 打 TAG 或不打 TAG

三层口:
交换机的端口既有三层路由功能,也具有二层交换功能。三层交换机端口默认为二层口,如果需要启用
三层功能就需要在此端口输入no switchport命令

常用命令:

show running-config 与 show startup-config //对于配置是否被修改, 或者判断交换机是否运行
正确的配置很有帮助

show logging reverse命令
Mar 5 0:59:04 0.0.0.0 ALERT stg: STG 1, topology change detected
Mar 5 0:59:04 0.0.0.0 ALERT stg: STG 1, new root bridge
Mar 5 0:59:03 0.0.0.0 ALERT system: link up on management port MGT1
Mar 5 0:59:03 0.0.0.0 NOTICE system: SR SFP+ inserted at port EXT1 is Approved
Mar 5 0:59:02 0.0.0.0 NOTICE link: link up on port EXT1
Mar 5 0:59:02 0.0.0.0 NOTICE server: link up on port INTA6
Mar 5 0:59:01 0.0.0.0 NOTICE mgmt: Booting up with compatibility mode.
Mar 5 0:59:01 0.0.0.0 INFO system: booted version 7.8.6 from FLASH image1, active configuration
Mar 5 0:58:52 0.0.0.0 ERROR cfg: Error: CEE is not enabled. Please enable CEE (cee ena) prior toconfiguring the port(s) as Fibre Channel port(s).
Mar 5 0:58:51 0.0.0.0 NOTICE Norm: Init normalization done.
Mar 5 0:58:40 0.0.0.0 NOTICE mgmt: CME A DOWN and CME B UP because Management Module 1 is active
Mar 5 0:58:38 0.0.0.0 NOTICE system: rebooted (power cycle)

show interface命令
Router(config)#show interface link
Alias Port Speed Duplex Flow Ctrl Link Description
——- —- —– ——– ————TX—–RX– —— ————-
INTA6 6 10000 full no no up INTA6
INTB6 20 1G/10G full yes yes down INTB6
EXT1 43 10000 full no no up EXT1
EXT2 44 1G/10G full no no down EXT2
EXT11 53 10000 full no no down EXT11
EXT12 54 10000 full no no down EXT12
EXT13 55 10000 full no no down EXT13
EXT14 56 10000 full no no down EXT14
EXT15 57 Auto full no no down EXT15
EXT16 58 Auto full no no down EXT16
EXT17 59 10000 full no no down EXT17
EXT18 60 10000 full no no down EXT18
EXTM 65 any auto yes yes down EXTM
MGT1 66 1000 full no no up MGT1

show interface命令
Router(config)#show interface port INTA6
Current port INTA6 configuration: enabled, PVID/Native-VLAN 1 //PVID
Description INTA6
ErrDisable recovery enabled
STP: edge, auto link-type, no guard //边缘端口
The Unicast storm control currently turned off
The Multicast storm control currently turned off
The Broadcast storm control currently turned off
802.1p priority: 0
Bandwidth percentage for unicast traffic: global
DSCP remarking for port: disabled
BPDU guard: disabled //BPDU守护
Flood blocking: disabled
L2 Learning: enabled
ACL Port config is empty //访问控制列表
UDLD: disabled, mode normal
OAM: disabled, mode active
EVB Profile: 0
Reflective Relay is configured off
VLANs:1 //Native vlan
Current Port INTA6 Gig link configuration:
speed 1000/10000, mode full duplex, fctl both, auto on
//速率,双工模式,流控制,自协商状态

display interface
display interface GigabitEthernet1/0/5
GigabitEthernet1/0/5 current state : UP //物理端口状态: UP or DOWN
Line protocol current state : UP
Description:
Switch Port, PVID : 1, TPID : 8100(Hex), The Maximum Frame
Length is 9216
IP Sending Frames’ Format is PKTFMT_ETHNT_2, Hardware address is 0000-0a88-15cd
Last physical up time : -
Last physical down time : 2010-04-15 09:19:17
Current system time: 2010-04-19 13:53:58
Port Mode: COMMON FIBER //FIBER or COPPER
Speed : 1000, Loopback: NONE //速率 环回状态
Duplex: FULL, Negotiation: ENABLE //双工状态 自协商状态
Mdi : NORMAL

display transceiver verbose
display transceiver interface GigabitEthernet4/0/11 verbose
GigabitEthernet4/0/11 transceiver information:
-————————————————————
Common information:
Transceiver Type :1000_BASE_SX_SFP //光模块类型
Connector Type :LC //接口类型
Wavelength(nm) :850 //光模块波长
Transfer Distance(m) :500(50um),300(62.5um) //光模块支持光纤的传输距离
Digital Diagnostic Monitoring :YES
Vendor Name :JDSU
Vendor Part Number :PLRXPL-VI-S24-HW
Ordering Name :
-————————————————————
Alarm information: //光模块告警信息
RX loss of signal
RX power low
-————————————————————

收集Log: 将打印出来的log保存成txt文件,可使用Putty,SecureCRT或者xShell等
华为交换机:
display logbuffer //打印log
display cur //打印当前配置

思科交换机:
show log //打印log, //收集syslog需配置syslog服务器
show env //硬件日志(风扇,电源,温度等)

Lenovo ToR交换机:
show logging //打印log
show tech-support //打印当前配置

常用诊断工具

Wireshark抓包分析软件 (经常与交换机的端口镜像相结合)

端口镜像(port-mirror)
1,把一个端口(mirrored-port)的收发数据镜像到另一个端口(Monitor-port),可选择单向收或发,
也可选择双向收发。
2,当在 trouble-shooting 中,在 Monitor-port 上连接安装抓包软件的主机,由此可抓到某个
交换机端口的收发包情况及具体包中的数据,以做进一步深入的分析。

Linux tcpdump

PING 回应: 成功与失败
PING 包根本没有发出去 or 被目的主机拒绝

PING 包发出去了,到达中间路由器,但目的主机不可达

PING 包发出去了, 被中间的路由器所阻挡(由被 ACL 所deny)

包被目的主机收到,但目的主机拒绝了 PING ,当目的主机能够发 ICMP 拒绝信息时 (如 Linux 服务
器上设置: #iptables –I INPUT –p icmp –j REJECT)


文章作者: kclouder
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 kclouder !
  目录