Thursday 21 May 2015

Troubleshoot LAN Switch Network (Cont.)

Troubleshooting Ethernet 10/100Mb Half/Full Duplex Auto-Negotiation

Objectives

This section presents general troubleshooting information and a discussion of techniques to troubleshoot Ethernet auto-negotiation.
  • This section shows how to determine the current behavior of a link. It goes on to show how users can control the behavior, as well as explain situations when auto-negotiation fails.
  • Many different Cisco Catalyst Switches and Cisco Routers support auto-negotiation. This section focuses on auto-negotiation between Catalyst 5000 Switches. The concepts explained here can also be applied to the other types of devices.

Introduction

Auto-negotiation is an optional function of the IEEE 802.3u Fast Ethernet standard that enables devices to automatically exchange information over a link about speed and duplex abilities.
Auto-negotiation is targeted at ports, which are allocated to areas where transient users or devices connect to a network. For example, many companies provide shared offices or cubes for Account Managers and System Engineers to use when they are in the office rather than on the road. Each office or cube has an Ethernet port permanently connected to the network of the office. Because it is not possible to ensure that every user has either a 10Mb, a 100Mb Ethernet, or a 10/100Mb card in their laptop, the switch ports that handle these connections must be able to negotiate their speed and duplex mode. The alternative is able to provide both a 10Mb and a 100Mb port in each office or cube and label them accordingly.
Auto-negotiation must not be used for ports that support network infrastructure devices, such as switches and routers or other non-transient end systems such as servers and printers. Although auto-negotiation for speed and duplex is normally the default behavior on switch ports that are capable of it, ports connected to fixed devices must always be configured for the correct behavior rather than allowed to negotiate it. This eliminates any potential negotiation issues and ensures that you always know exactly how the ports should operate. For example, a 10/100BaseTX Ethernet switch-to-switch link that has been configured for 100Mb Full Duplex only operates at that speed and mode. There is no possibility for the ports to downgrade the link to a slower speed within a port reset or a switch reset. In the event that the ports cannot operate as configured, they must not pass any traffic. On the other hand, a switch-to-switch link that has been allowed to negotiate its behavior can operate at 10Mb Half Duplex. A non-functional link is usually easier to discover than a link, which is operational, but does not operate at the expected speed or mode.
One of the most common causes of performance issues on 10/100Mb Ethernet links is when one port on the link operates at half duplex, while the other port operates at full duplex. This occasionally happens when one or both ports on a link are reset and the auto-negotiation process does not result in both link partners that have the same configuration. It also happens when users reconfigure one side of a link and forget to reconfigure the other side. Many performance-related support calls are avoided if you create a policy that requires ports for all non-transient devices to be configured for their required behavior and enforce the policy with adequate change control measures.

Troubleshooting Ethernet Auto Negotiation Between Network Infrastructure Devices

chapter22-3.gif

Procedures and/or Scenarios

Scenario 1. Cat 5K with Fast Ethernet
chapter22-4.gif
Table 22-2: Auto-Negotiation Connectivity Issues
Possible ProblemSolution
Was the current behavior of the link auto negotiated?1. Use the show port mod_num/port_num command to determine the current behavior of the link. If both link partners (interfaces at either end of the link) indicate have an "a-" prefix on their Duplex and Speed status fields, auto-negotiation was probably successful.
Auto negotiation not supported.2. Issue the show port capabilities mod_num/port_numcommand to verify that your modules support auto negotiation.
Auto negotiation do not work on Catalyst switches.3. Use the set port speed mod_num/port_num auto command on a Catalyst to configure auto negotiation. 4. Try different ports or modules. 5. Try resetting the ports. 6. Try different patch cables. 7. Turn the devices off and back on again.
Auto negotiation do not work on Cisco routers.8. Issue the correct IOS command to enable auto negotiation (if available) 9. Try different interfaces. 10. Try resetting the interfaces. 11. Try different patch cables. 12. Turn the devices off and back on again.

Example of Configuring and Troubleshooting Ethernet 10/100Mb Auto-Negotiation

This section of the document walks you through examining the behavior of an 10/100Mb Ethernet port that supports auto-negotiation. It also shows how to make changes to its default behavior and how to restore it to the default behavior.
Tasks that are Performed
  1. Examine the capabilities of the ports.
  2. Configure auto negotiation for port 1/1 on both switches.
  3. Determine if the speed and duplex mode are set to auto-negotiate.
  4. Change the speed on port 1/1 in Switch A to 10Mb.
  5. Understand the meaning of the "a-" prefix on the duplex and speed status fields.
  6. View the duplex status of port 1/1 on Switch B.
  7. Understand the Duplex mismatch error.
  8. Understand the Spanning Tree error messages.
  9. Change the duplex mode to half on port 1/1 on Switch A.
  10. Set the duplex mode and speed of port 1/1 on Switch B.
  11. Restore the default duplex mode and speed to ports 1/1 on both switches.
  12. View the changes of the port status on both switches.

Step-by-Step

Perform these steps:
  1. The show port capabilities 1/1 command displays the capabilities of a Ethernet 10/100BaseTX 1/1 port on Switch A.
    Enter this command for both of the ports you troubleshoot. Both ports must support the speed and duplex capabilities shown if they are supposed to use auto negotiation.
    Switch-A> (enable) show port capabilities 1/1
    Model WS-X5530 Port 1/1 Type 10/100BaseTX
    Duplex half,full
    Speed auto,10,100
  2. Auto negotiation is configured for both speed and duplex mode on port 1/1 of both switches if you enter the set port speed 1/1 auto command (auto is the default for ports that support auto-negotiation).
    Switch-A> (enable) set port speed 1/1 auto
    Port(s) 1/1 speed set to auto detect.
    Switch-A (enable)
    Note: The set port speed {mod_num/port_num} auto command also sets the duplex mode to auto. There is no set port duplex {mod_num/port_num} auto command.
  3. The show port 1/1 command displays the status of ports 1/1 on Switches A and B.
    Switch-A> (enable) show port 1/1
    Port Name Status Vlan Level Duplex Speed Type
    ----- ------------------ ---------- ---------- ------ ------ ----- -----
    1/1 connected 1 normal a-full a-100 10/100BaseTX
    Switch-B> (enable) show port 1/1
    ----- ------------------ ---------- ---------- ------ ------ ----- -----
    Port Name Status Vlan Level Duplex Speed Type
    1/1 connected 1 normal a-full a-100 10/100BaseTX
    Note that most of the normal output from the show port {mod_num/port_num} command has been omitted.
    The "a-" prefixes on the "full" and "100" indicate that this port has not been hard coded (configured) for a specific duplex mode or speed. Therefore it can auto-negotiate its duplex mode and speed if the device it is connected to (its Link Partner) also can auto-negotiate its duplex mode and speed. Also note that the status is "connected" on both ports, which means that a link pulse has been detected from the other port. The status can be "connected" even if duplex has been incorrectly negotiated or misconfigured.
  4. In order to demonstrate what happens when one link partner is auto-negotiating and the other Link Partner is not, the speed on port 1/1 in Switch A is set to 10Mb with the set port speed 1/1 10 command.
    Switch-A> (enable) set port speed 1/1 10
    Port(s) 1/1 speed set to 10Mbps.
    Switch-A> (enable)
    Note: If you hard code the speed on a port, it disables all auto-negotiation functionality on the port for speed and duplex.
    When a port has been configured for a speed, its duplex mode is automatically configured for the mode it had previously negotiated; in this case, full duplex. When you enter the set port speed 1/1 10 command caused the duplex mode on port 1/1 to be configured as if the command set port duplex 1/1 full had also been entered. This is explained next.
  5. Understand the meaning of the "a-" prefix in the Duplex and Speed status fields.
    The absence of the "a-" prefix in the status fields of the output from the show port 1/1 command on Switch A shows that the duplex mode is now configured for "full," and the speed is now configured for "10."
    Switch-A> (enable) show port 1/1
    Port Name Status Vlan Level Duplex Speed Type
    ----- ------------ ---------- ---------- ------ ------ ----- ------------
    1/1 connected 1 normal full 10 10/100BaseTX
  6. The show port 1/1 command on Switch B indicates that the port now operates at half duplex and 10Mb.
    Switch-B> (enable) show port 1/1
    Port Name Status Vlan Level Duplex Speed Type
    ----- ------------ ---------- ---------- ------ ------ ----- ------------
    1/1 connected 1 normal a-half a-10 10/100BaseTX
    This step shows that it is possible for a Link Partner to detect the speed at which the other Link Partner operates, even though the other Link Partner is not configured for auto-negotiation. Sensing the type of electrical signal that is arriving to see if it is 10Mb or 100Mb does this. This is how Switch B determined that port 1/1 should operate at 10Mb.
    It is not possible to detect the correct duplex mode in the same way that the correct speed can be detected. In this case, where the 1/1 port of Switch B is configured for auto-negotiation and the port of Switch A is not, the 1/1 port of Switch B was forced to select the default duplex mode. On Catalyst Ethernet ports, the default mode is auto-negotiate, and if auto-negotiation fails, then half duplex.
    This example also shows that a link can be successfully connected when there is a mismatch in the duplex modes. Port 1/1 on Switch A is configured for full duplex while port 1/1 on Switch B has defaulted to half duplex. In order to avoid this, always configure both Link Partners.
    The "a-" prefix on the Duplex and Speed status fields does not always mean the current behavior was negotiated. Sometimes it only means that the port has not been configured for a speed or duplex mode. The previous output from Switch B shows Duplex as "a-half" and Speed as "a-10" which indicates that the port is operating at 10Mb in half duplex mode. In this example, the link partner on this port (port 1/1 on Switch A) is configured for "full" and "10Mb." It was not possible for port 1/1 on Switch B to have auto-negotiated its current behavior. This proves that the "a-" prefix only indicates a willingness to perform auto-negotiation - not that auto-negotiation actually took place.
  7. Understand the Duplex Mismatch error message.
    This message about a duplex mode mismatch is displayed on Switch A after the speed on port 1/1 was changed to 10Mb. The mismatch was caused by the 1/1 port of Switch B, which default to half duplex because it sensed its Link Partner could no longer perform auto-negotiation.
    %CDP-4-DUPLEXMISMATCH:Full/half duplex mismatch detected o1
    
    It is important to note that this message is created the Cisco Discovery Protocol (CDP), not the 802.3 auto-negotiation protocol. CDP can report problems it discovers, but it typically does not automatically fix them. A duplex mismatch can or cannot result in an error message. Another indication of a duplex mismatch are rapidly increasing FCS and alignment errors on the half duplex side and "runts" on the full duplex port (as seen in a sh port {mod_num/port_num}).
  8. Understand the Spanning Tree messages.
    In addition to the duplex mismatch error message, you can also see these Spanning Tree messages when you change the speed on a link. A discussion of Spanning Tree is beyond the scope of this document; refer the chapter on Spanning Tree for more information on Spanning Tree.
    %PAGP-5-PORTFROMSTP:Port 1/1 left bridge port 1/1
    %PAGP-5-PORTTOSTP:Port 1/1 joined bridge port 1/1
  9. In order to demonstrate what happens when the duplex mode has been configured, the mode on port 1/1 in Switch A is set to half with the set port duplex 1/1 half command.
    Switch-A> (enable) set port duplex 1/1 half
    Port(s) 1/1 set to half-duplex.
    Switch-A> (enable)
    The show port 1/1 command shows the change in the Duplex mode on this port.
    Switch-A> (enable) sh port 1/1
    Port Name Status Vlan Level Duplex Speed Type
    ----- ------------ ---------- ---------- ------ ------ ----- ------------
    1/1 connected 1 normal half 10 10/100BaseTX
    At this point, ports 1/1 on both switches are operating at half duplex. Port 1/1 on Switch B is still configured to auto negotiate, as shown in this output of the show port 1/1 command.
    Switch-B> (enable) show port 1/1
    Port Name Status Vlan Level Duplex Speed Type
    ----- ------------ ---------- ---------- ------ ------ ----- ------------
    1/1 connected 1 normal a-half a-10 10/100BaseTX
    This step shows how to configure the duplex mode on port 1/1 in Switch B to half. This is consistent with the recommended policy to configure both link partners in the same way.
  10. In order to implement the policy to ways configure both link partners for the same behavior, this step now sets the duplex mode to half and speed to 10 on port 1/1 in Switch B.
    Here is the output of entering the set port duplex 1/1 half command on Switch B:
    Switch-B> (enable) set port duplex 1/1 half
    Port 1/1 is in auto-sensing mode.
    Switch-B> (enable)
    The set port duplex 1/1 half command failed because this command is not valid if auto-negotiation is enabled. This also means that this command does not disable auto-negotiation. Auto-negotiation can only be disabled with the set port speed {mod_num/port_num {10 | 100}} command.
    Here is the output of entering the set port speed 1/1 10 command on Switch B:
    Switch-B> (enable) set port speed 1/1 10
    Port(s) 1/1 speed set to 10Mbps.
    Switch-B> (enable)
    Now the set port duplex 1/1 half command on Switch B works:
    Switch-A> (enable) set port duplex 1/1 half
    Port(s) 1/1 set to half-duplex.
    Switch-A> (enable)
    The show port 1/1 command on Switch B shows that the ports is now configured for half duplex and 10Mb.
    Switch-B> (enable) show port 1/1
    Port Name Status Vlan Level Duplex Speed Type
    ----- ------------ ---------- ---------- ------ ------ ----- ------------
    1/1 connected 1 normal half 10 10/100BaseTX
    Note: The set port duplex {mod_num/port_num {half | full }} command is dependent on the set port speed {mod_num/port_num {10 | 100 }} command. In other words, you must set the speed before you can set the duplex mode.
  11. Configure ports 1/1 on both switches to auto negotiate with the set port speed 1/1 auto command.
    Switch-A> (enable) set port speed 1/1 auto
    Port(s) 1/1 speed set to auto detect.
    Switch-A> (enable)
    Note: Once a duplex mode of a port has been configured to something other than auto, the only way to configure the port to auto sense its duplex mode is to issue the set port speed {mod_num/port_num} auto command. There is no set port duplex {mod_num/port_num} auto command. In other words, if you issue the set port speed {mod_num/port_num} auto command, it resets both port speed sensing and duplex mode sensing to auto.
  12. Examine the status of ports 1/1 on both switches with the show port 1/1 command.
    Switch-A> (enable) show port 1/1
    Port Name Status Vlan Level Duplex Speed Type
    ----- ------------ ---------- ---------- ------ ------ ----- ------------
    1/1 connected 1 normal a-full a-100 10/100BaseTX
    Port Name Status Vlan Level Duplex Speed Type
    Switch-B> (enable) show port 1/1 ----- ------------ ---------- ---------- ------ ------ ----- ------------
    1/1 connected 1 normal a-full a-100 10/100BaseTX
    Both ports are now set to their default behavior of auto negotiation. Both ports have negotiated full duplex and 100Mb.

Before You Call the Cisco Systems Technical Support Team

Before you call the Cisco Systems Technical Support Website, make sure you have read through this chapter and completed the actions suggested for your system's problem. Additionally, do these and document the results so that we can better assist you:
  • Capture the output of show version from all of the affected devices.
  • Capture the output of show port mod_num/port_num from all of the affected ports.
  • Capture the output of show port mod_num/port_num capabilities from all of the affected ports.

No comments:

Post a Comment