<tr><td>琥珀色</td><td>RPS处于待机模式或故障状态(in standby mode or in a fault condition)。按下RPS上的Standby/Active按钮,此时该LED应变成绿色。如未变成绿色,则该RPS风扇可能损坏。请联系思科系统公司。</td></tr>
<tr><td>琥珀色闪烁</td><td>PoE因为故障而关闭。<br>注意:在做网线不合规及加电的设备连接到PoE端口(non-compliant cabling or powered devices are connected to a PoE port)时,都会导致PoE故障。在将思科认证的IP电话、无线接入点或符合IEEE 802.3af规范的设备连接到PoE端口时,只能使用标准规范的做网线方式。必须将导致PoE故障的网线或设备从网络上移除。(Only standard-compliant cabling can be used to connect Cisco prestandard IP phones, wireless access points, or IEEE 802.3af-compliant devices to PoE ports. You must remove the cable or device that cause the PoE fault from the network.)</td></tr>
在对线路故障进行排错时(一层排错),因为可以直接地查看及检查网线,所以通常都是非常容易找到问题的。但是,有些时候线路问题可以是看不见的,所以就不得不完成一个系统性的排错过程,以确保问题确实是在一层当中。一个一般性建议就是在进行复杂步骤之前,先适当地对所有网线进行测试(however, sometimes cabling problems can be invisible, so you will have to engage in a systematic troubleshooting process to make sure the problem is really localised at Layer 1. A general recommendation is to properly test all cabling before engaging in a complex infrastructure implementation)。下面是一些常见的线路问题。
输出的第一部分是该命令打印出的第一行(也就是`[interface] is up`),表示特定接口的物理层状态。输出的第二部分(也就是`line protocol is down`)表明该接口的数据链路层状态。而如该该部分指示`up`,就意味着该接口可发送和接收保持活动信号。**记住交换机端口可能在物理层是起来的,却在数据链路层是宕掉的**,比如,当端口是一个SPAN(Switch)目的端口时,或者本地端口连接到一台CatOS交换机的一个关闭的端口时,都会这样(if this indicates an `"up"`, then it means that the interface can send and receive keepalives. Keep in mind that it is possible for the switch port to indicate that the Physical Layer is up while the Data Link Layer is down, for example, such as when the port is a SPAN destination port(for sniffer traffic) or if the local port is connected to a CatOS(older switch operating system) switch with its port disabled)。
输入队列(the Input queue)表明因为超出最大队列尺寸而丢弃帧的实际数量。而其中的“fushes”列对Catalyst 6000系列交换机上的SPD(selective packet discard, 选择性数据包丢弃, [Selective Packet Discard](pdfs/SelectivePacketDiscard.pdf),[Understanding Selective Packet Discard](http://www.cisco.com/c/en/us/support/docs/routers/12000-series-routers/29920-spd.html))丢弃数据包进行计数。SPD在CPU超负荷时将低优先级的数据包丢弃,从而为高优先级数据包节省下处理能力。`show interfaces`命令输出中的`flushes`计数器随SPD部分而增长,SPD对路由器IP处理队列运用一种选择性数据包丢弃策略(a selective packet drop policy)。因此SPD仅用在进程交换流量上(appliese only to process-switched traffic)。
总的输出丢弃数量(the total output drops)表示由于输出队列充满而丢弃的数据包数量。输出丢弃经常在正将来多个的高带宽入站链路(比如几条千兆以太网链路)的流量,交换到单个的出站低带宽链路(比如一条快速以太网)时见到。输出丢弃的增长,是因为入站和出站带宽不匹配而造成的超出流量将该接口击败造成的(this is often seen when traffic from multiple inbound high-bandwidth links(e.g., GigabitEthernet links) is being switched to a single outbound lower-bandwidth(e.g., a FastEthernet link). The output drops increment because the interface is overwhelmed by the excess traffic due to the speed mismatch between the inbound and outbound bandwidths)。
- **输出错误**(output errors): 该字段提供了阻止数据报最后从接口发出的错误总数(this field provides the total sum of all errors that prevented the final transmission of datagrams out of the interface)。
> **注意:** 根据该命令执行所在平台的不同,上面的输出会略有不同。比如,Catalyst 3650系列交换机还包含了一个`Discarded frames`字段,该字段显示因资源不可用而导致的放弃传输尝试的帧总数(a `Discarded frames` field, which shows the total number of frames whose transmission attempt is abandoned due to insufficient resources)。该字段中出现了较大的数值就典型地表明存在网络壅塞故障(a network congestion issue)。在上面的输出中,应探究一下`RxPortFifoFull drop`帧字段,该字段表示因为入口队列充满而丢弃的接口所接收到的帧总数(the `RxPortFifoFull drop` frame field, which indicates the total number of frames received on an interface that are dropped because the ingress queue is full)。
在重大配置问题下,该故障可能以完全的连通性缺失,包括特定设备端口上连接信号灯不亮的形式出现(with major configuration issues, the issue might manifest as lack of connectivity, including no link lights on the specific device ports)。有时连接灯亮起但仍然没有任何类型的连通性。这显示在网线上有信号,也就是说没有网线问题,而是在端口上的端口问题故障或其它问题。这就要对设备的配置进行问题调查。
而如在企业级环境下运营(if you are operating in an enterprise-level environment),就可能需要使用不同的VLANs对流量进行分段。所有交换机在这方面都必须准确配置,如此一来所有交换机端口都分配到正确的VLAN中。而如直接将配置到使用不同VLAN IDs的端口直接连接,那么就算物理层上显示没有故障,二层上的通讯仍将遭到破坏。
先前的小节中,我们谈到可用用于物理层故障排除的三个命令行命令的使用。本节将给出一些用于对VLAN内倍连通性故障进行鉴别及排错的常见方法(the use of three CLI commands that can be used for troubleshooting Physical Layer issues. this section describes some common approaches to identifying and troubleshooting intra-VLAN connectivitiy issues)。VLAN内部连通性故障的一些相对来讲更为常见的原因,有下面这些。
网络壅塞同样可能引起交换网络中的间隙性连通故障。VLAN超载的第一个表象就是某端口上的接收或发送缓冲过度预订(oversubscribed)。此外,端口上过多的帧丢弃也是网络壅塞的指标。而网络壅塞的常见原因,就是对主干连接的聚合带宽需求估计不足。那么,**壅塞问题就可以通过配置以太网信道或往现有以太网信道中加入更多的端口,得到解决。**同时网络壅塞又是连通性故障的常见原因,同时重要的是要知道**交换机本身可能经历壅塞问题,而交换机本身的壅塞问题有可能会对网络性能产生类似的影响**(a common cause of network congestion is due to underestimating aggregate bandwidth requirements for backbone connections. In such cases, congestion issues can be resolved by configuring EtherChannels or by adding additional ports to existing EtherChannels. While network congestion is a common cause of connectivity issues, it is also important to know that the switch itself can experience congestion issues, which can have a similar impact on network performance)。
**交换机内部壅塞**,有限的交换机带宽可能导致壅塞问题,由此造成的壅塞可能对网络性能造成极为严重的影响。在LAN交换中,带宽是指交换机内部交换线路([the switch fabric](pdfs/the_Definition_of_a_Switch_Fabric-EtherealMind.pdf))的传输能力。因此,如果交换线路的传输能力是`5Gbps`, 而要尝试将`7Gbps`的流量通过交换机传输,结果就是数据包丢失及差强人意的网络性能了。在那些所有端口的聚合传输容量可能超出总的骨干容量的超出预订平台上,这是一个常见的问题(this is a common issue in oversubscribed platforms, where the aggregate capacity of all ports can exceed the totoal backplane capacity)。
在交换LAN中,**硬件故障**也可能引起连通性问题。这类问题的实例包括交换机的坏端口或坏模块。尽管在可能的情况下可以通过查看诸如LEDs等物理指示器来对这类故障进行排错,某些时候这类问题是难于排错及诊断的。在怀疑存在潜在的硬件故障的多数情况下,都应需求技术支持中心(Technical Assistance Centre, TAC)的支持。
相比上面这些问题,软件缺陷(software bugs)就更难于分辨出来,因为软件缺陷引起难于对其进行排错的偏差(deviation)。在怀疑有软件缺陷导致连通性问题时,应该就发现的问题,联系技术支持中心(TAC)。此外,如在控制台或日志中有打印出错误消息,就也可以使用思科提供的一些在线工具,来采取一些替代方法(implement a workaround)或是得到某个已经解决该问题并得到验证的软件版本的建议。
最后,如同其它技术一样,**不正确的配置同样会直接或间接地造成连通性问题**。比如,根桥放置粗劣就会导致慢速用户连通性。而将一台不当配置的交换机直接加入到生产网络,则会导致一些或全部用户的网络连接完全中断(the poor placement of the Root Bridge may result in slow connectivity for users. Directly integrating or adding an incorrectly configured switch into the production network could result in an outright outage for some or all users)。下面的小节对一些常见的VLAN相关故障、其可能的原因,以及为排除这些故障可采取的做法,进行了讲解。
### 动态VLAN通告排错
**Troubleshooting Dynamic VLAN Advertisements**
思科Catalyst交换机使用VLAN中继协议(VLAN Trunk Protocol, VTP)来在交换域中传播VLAN信息(propagate VLAN information dynamically throughout the switched domain)。VTP是一个思科专有的二层报文发送协议,用于管理位处同一VTP域中的交换机上VLANs的添加、删除及重命名。
可用于对中继连通性问题进行排错的命令有好几个。可使用`show interfaces`命令来检查基本的端口运行及管理性状态(you can use the `show interfaces` command to verify basic port operational and administrative status)。此外,可通过在`show interfaces`命令后追加`trunk`或`errors`关键字来进行额外排错和检查。 而命令`show interfaces [name] counters trunk`则可用于查看中继端口上传输和接收到的帧数目。
参考上面的输出,可以反复执行该命令,以确保Tx及Rx栏是持续增长的,并以此完成更多的排错。比如,假设该交换机没有发出任何帧,则该接口就可能并未配置为中继接口,或者其是宕掉的或关闭的(or it might be down or disabled)。而如果Rx栏没有增长,则可能是远端交换机未有正确配置。
用于对可能的二层错误配置进行排错的另一个命令,就是`show interfaces [name] trunk`。该命令的输出包含了中继封装协议及模式、802.1Q的原生VLAN、允许通过中继链路VLANs、VTP域中活动的VLANs,以及被修剪掉的VLANs(the output of `show interfaces [name] trunk` includes the trunking encapsulation protocol and mode, the native VLAN for 802.1Q, the VLANs that are allowed to traverse the trunk, the VLANs that are active in the VTP domain, and the VLANs that are pruned)。**一个VLAN传播的常见问题,就是上游交换机已通过使用接口配置命令`switchport trunk allowed vlan`,被配置为对某些VLANs进行过滤。**命令`show interfaces [name] trunk`的输出如下所示。
```console
Cat-3550-1#show interfaces trunk
Port Mode Encapsulation Status Native vlan
Fa0/12 desirable n-802.1q trunking 1
Fa0/13 desirable n-802.1q trunking 1
Fa0/14 desirable n-isl trunking 1
Fa0/15 desirable n-isl trunking 1
Port Vlans allowed on trunk
Fa0/12 1-4094
Fa0/13 1-4094
Fa0/14 1-4094
Fa0/15 1-4094
Port Vlans allowed and active in management domain
Fa0/12 1-4
Fa0/13 1-4
Fa0/14 1-4
Fa0/15 1-4
Port Vlans in spanning tree forwarding state and not pruned
Fa0/12 1-4
Fa0/13 none
Fa0/14 none
Fa0/15 none
```
**另一个常见中继错误配置故障就是原生VLAN不匹配。**在配置802.1Q中继链路时,中继链路两端的原生VLAN必须匹配;否则该链路便不会工作。如存在原生VLAN不匹配,STP就会将该端口置为端口VLAN ID不一致状态(a port VLAN ID(PVID) inconsistent state),且不会在该链路上进行转发。在此情况下,将有类似于下面的消息在控制台或日志中打印出来。
```console
*Mar 1 03:16:43.935: %SPANTREE-2-RECV_PVID_ERR: Received BPDU with inconsistent peer vlan id 1 on FastEthernet0/11 VLAN2.
*** MD5 digest checksum mismatch on trunk: Fa0/11 ***
*** MD5 digest checksum mismatch on trunk: Fa0/12 ***
...
[Truncated Output]
```
最后,在应用VTP时,**配置修订号可能会造成严重破坏。VTP域中的交换机使用配置修订号来保持对域中最新信息的跟踪**(the configuration revision number can wreak havoc when using VTP. Switches use the configuration revision number to keep track of the most recent information in the VTP domain)。域中所有交换机都将其前一次从一条VTP通告中收听到的配置修订号存储起来,同时在每次接收到新信息时该号码都被增加。而在任何交换机接收到带有高于其自身配置修订号的通告报文时,都将覆写任何存储的VLAN信息,并将其自身存储的VLAN信息与所接收到的通告报文中的信息进行同步。
**VTP修剪在没有本地端口属于某些VLANs时,将那些VLANs从本地交换机的VLAN数据库中移除。**VTP修剪通过消除不必要的广播、多播及通过网络泛洪的那些未知流量,而提升中继链路效率(VTP pruning increases the efficiency of trunks by eliminating unnecessary Broadcast, Multicast, and unknown traffic from being flooded across the network)。
尽管VTP修剪是一项值得部署的特性,但不正确的配置或是部署可能导致端到端连通性的丢失。应仅在客户端/服务器环境中开启(in client/server environments)。在包含透明模式交换机的网络中应用修剪,就可能造成连通性丢失。如网络中有一或多台的交换机处于VTP透明模式,就应该要么对整个VTP域全局关闭修剪,否则就要通过在适当的接口下,使用接口配置命令`switchport trunk pruning vlan`, 以确保到上游的透明模式交换机中继链路上的VLANs都无资格修剪(也就是它们在这些链路上不被修剪,ensure that all VLANs on the trunk link(s) to the upstream transparent mode switch(es) are pruning ineligible, i.e., they are not pruned,using the `switchport trunk pruning vlan` interface configuration command under the applicable interfaces)。
Port Vlans allowed and active in management domain
Fa0/1 1,10,20,30,40,50
Fa0/2 1,10,20,30,40,50,60,70,80,90,254
Port Vlans in spanning tree forwarding state and not pruned
Fa0/1 1,10,20,30,40,50
Fa0/2 1,40,50,60,70,80,90,254
```
同样要检查中继链路上通告的正确VLANs。在中继链路上放行的不适当VLANs可能引起功能缺失或安全问题。也想要确保中继链路两端有着同样的放行VLANs(Inproper VLANs allowed on the link can lead to a lack of functionality or security issues. Also, you want to make sure that the same VLANs are allowed on both ends of a trunk)。
如之前小节所说到的,网络中一台新交换机的加入,可能导致管理域中VLAN信息的丢失(the integration of a new switch into the network can result in a loss of VLAN information in the management domain)。而此VLAN信息丢失又可能导致同一VLAN中设备间连通性的丢失。所以在将新交换机加入到LAN之前,一定要确保其配置修订号被重置到0。
**VTP汇总通告**是由服务器默认每隔5分钟发出的。这些报文类型用于告知邻接交换机当前VTP域名称、配置修订号及VLAN配置状态,及包括时间戳、MD5散列值及子网数目通告等其它VTP信息(VTP summary advertisements are used to tell an adjacent switch of the current VTP domain name, the configuration revision number and the status of the VLAN configuration, as well as other VTP information, which includes the time stamp, the MD5 hash, and the number of subnet advertisements to follow)。而如果服务器上的这些计数器在增长,那么在VTP域中就有不知一台交换机充当或配置为VTP服务器。
当这种情况发生时,交换机就将`Number of config revision errors counter`字段加一,同时不更新其VLANs数据库。而这种情况可能导致一个或多个VLANs中连通性的丢失,因为在该交换机上的VLAN信息没有得到更新。为解决此问题并确保该交换机上的本地数据库保持更新,就要在其中一台服务器交换机上配置一个虚构的VLAN(a dummy vlan),这样就导致对所有交换机本地数据库的覆写,从而允许Sw5也更新其数据库。切记这并不是一种常见现象(this is not a common occurance); 但还是可能发生,因此,这里将这么多也是有必要的。
在交换机接收到一条带有与其计算出的MD5散列值不一致的MD5散列值的通告时,`Number of config digest errors counter`字段就会增长。这是在交换机上配置了不同VTP密码的结果。可使用`show vtp password`命令检查所配置的VTP密码是正确的。同样重要的是记住在密码一致时,硬件或软件的问题或缺陷也会造成VTP数据包的数据错误,从而也会导致这样的错误出现。
最后,字段`VTP pruning statistics`将只在VTP域的VLAN修剪开启时,才会包含非零值。**修剪是在服务器上开启的,同时该配置在该VTP域中得以传播。**在某VTP域的修剪开启时,服务器将接收来自客户端的Join报文(the VTP Join messages)(pruning is enabled on servers and this configuration is propagated throughtout the VTP domain. Servers will receive joins from clients when pruning has been enabled for the VTP domain, [VTP pruning, InformIT](pdfs/VTP-Pruning_InformIT.pdf))。

*VTP Join报文及VTP修剪*
## 第15天问题
1. What is the colour of the system LED under normal system operations?
2. What is the colour of the RPS LED during a fault condition?
3. You can cycle through modes by pressing the Mode button until you reach the mode setting you require. This changes the status of the port LED colours. True or false?
4. What port speed is represented by a blinking green LED?
5. If you want to be sure that you are not dealing with a cabling issue, one of the simplest things to do is to `_______` the cable and run the same tests again.
6. Which command is generally used to troubleshoot Layer 1 issues (besides show interfaces )?
7. The `_______` status is reflected when the connected cable is faulty or when the other end of the cable is not connected to an active port or device (e.g., if a workstation connected to the switch port is powered off).
8. What are runts?
9. The `_______` command can also be used to view interface errors and facilitate Layer 1 troubleshooting.
10. Which command prints a brief status of all active VLANs?
## 第15天答案
1. Green.
2. Amber.
3. True.
4. 1000Mbps.
5. Replace.
6. The `show controllers` command.
7.`notconnect`.
8. Packets that are smaller than the minimum packet size (less than 64 bytes on Ethernet).