[All About Switches] 12 Interface Configuration Tip 3 - Auto-Negotiation

Created: Jun 10, 2015 15:52:52Latest reply: Jun 10, 2015 17:08:13 3981 1 1 0
 

In the previous episode, General William decided to purchase more Huawei switches. He assigned device installation and commissioning to Captain David.

Captain David has successfully configured port groups and port isolation in the previous two episodes. He is confident that he can complete the task by himself without using General William's tips. Captain David connects devices and powers on the devices. However, some interfaces are in Down state. After failing to solve the problem, Captain David opens the red bag and finds the third tip: rate, duplex mode, and auto-negotiation are key elements for proper communication.

Captain Jack comes to help Captain David. Captain Jack reads the third tip and quickly finds the way to fix the problem. He says, "David, let's rectify the fault step by step. Let me ask you a question. Do you know how to check whether an interface is in Up state?"

Captain David answers, "It's easy. You can run the display this interface command on an interface to view the interface status."

Captain Jack says, "David, you know the right command. I will explain more about the command to you. The display this interface command output is as follows:

<HUAWEI> system-view

[HUAWEI] interface gigabitethernet 1/0/1

[HUAWEI-GigabitEthernet1/0/1] display this interface

GigabitEthernet 0/0/1 current state : UP

Line protocol current state : UP

 

Notice the difference between the current state field and Line protocol current state field in the command output.

1.         The current state field indicates the physical status of the interface and is irrelevant to Layer 3 services and protocols.

2.         The Line protocol current state field indicates the protocol status of the interface and is related to protocols.

3.         For a Layer 2 physical interface, if the current state is Up, the protocol status Line protocol current state is also Up. For example, after a Layer 2 physical interface is correctly connected and interface attributes are correctly configured, both the current state and Line protocol current state fields display Up, indicating that the physical status and protocol status are Up.

4.         For a Layer 3 physical interface, only when the current state is Up and the protocol negotiation succeeds, the Line protocol current state can be Up. For example, after a Layer 3 physical interface is correctly connected and interface attributes are correctly configured, the current state is Up. However, if no IP address is assigned to the interface, the Line protocol current state will still be Down.

Therefore, after connecting devices and before assigning IP addresses, we only need to ensure that the physical status of interfaces is Up, that is, the current state field displays Up."

 "I already know that," says Captain David, "I want to know why the physical status of interfaces is Down."

Captain Jack says, "Now let me tell you the key information. An interface's physical status is Up only when this interface has the same duplex mode and rate as the interface at the other end of the link. How to ensure that? You can use the auto-negotiation mechanism or non-auto negotiation mechanism (forced configuration) to solve the problem."

 

Duplex Mode

Duplex modes are classified into the full-duplex mode and half-duplex mode. In full-duplex mode, an interface can send and receive packets at the same time. In half-duplex mode, an interface can only send or receive packets in a period of time. For example, a wide east-west road allows two carriages to pass through. Carriage A runs from east to west and carriage B runs from west to east. The two carriages can pass through the road at the same time and do not affect each other. In this example, the wide road represents a full-duplex link and carriages A and B represent packet sending and receiving respectively. This example demonstrates the full-duplex mode. Here is another example. A narrow bridge allows only one person to pass through. Two people, Tom and Jim, are on two ends of the bridge and need to pass through the bridge. The two people cannot pass through at the same time and one of them must stop. For example, Tom stops and can pass through the bridge only after Jim passes first. In this example, the narrow bridge represents a half-duplex link and Tom and Jim represent packet sending and receiving respectively. This example demonstrates the half-duplex mode. The full-duplex mode has shorter delay and faster speed than the half-duplex mode. If the half-duplex mode is used, collision occurs and error packets are generated when traffic volume on the link is heavy, degrading the interface performance. Therefore, the half-duplex mode is no longer used.

Interface Rate

The interface rate determines the data transmission bandwidth of an interface. Common interface rates include 100 Mbit/s, 1000 Mbit/s, and 10000 Mbit/s. Interfaces with different rates can successfully communicate when they have the same working rate. For example, a GE interface (1000 Mbit/s) connects to an FE interface (100 Mbit/s). They must work at a rate supported by both of them. Generally, their working rate is 100 Mbit/s. This example shows that the interface rate and interface working rate are different sometimes. Generally, the working rate is lower than the interface rate.

Auto-Negotiation

The auto-negotiation function provides an information exchange method for connected devices. After auto-negotiation is enabled, devices at both ends of a physical link can exchange information and automatically choose the same working parameters, including the duplex mode and rate. In this way, the two devices can work at a maximum rate supported by both of them.

Interfaces on both ends of a link must have the same negotiation mode. If they have different negotiation modes, for example, the local end works in non-auto negotiation mode and the peer end works in auto-negotiation mode, the local interface may be in Up or Down state, but the peer interface is always in Down state. As a result, the local and peer interfaces cannot communicate with each other.

Captain David asks, "How can I check the current working rate, duplex mode, and auto-negotiation mode of an interface?"

Captain Jack answers, "You can run the display this interface command on interfaces on both ends of a link to check their duplex mode, rate, and auto-negotiation mode. You can locate faults based on the fields in the command output, as described in the following table.

Field

Description

Follow-up Procedure

Negotiation

Auto-negotiation mode of the interface.

    ENABLE: indicates that the interface works in auto-negotiation mode.

    DISABLE: indicates that the interface works in non-auto negotiation mode.

The two interfaces must work in the same auto-negotiation mode.

You can run the negotiation auto command in the interface view to enable auto-negotiation on the interfaces. If the fault persists, disable auto-negotiation and forcibly set the same rate and duplex mode on the two interfaces.

Speed

Working rate of the interface.

If the rates of the interfaces are different, run the speed command in the interface view to set the same rate on the two interfaces.

Duplex

Duplex mode of the interface.

If the duplex modes of the interfaces are different, run the duplex command in the interface view to set the same duplex mode on the two interfaces.

 

?????ì?.pngTroubleshooting tip: If the physical status of two interfaces on both ends of a link is Down, you can run the shutdown and undo shutdown commands in the interface view on the two interfaces, or run the restart command to restart the interfaces. The interfaces will perform auto-negotiation again. If the physical status of the interface is still Down, you can run the undo negotiation auto command in the interface view to disable auto-negotiation and forcibly set the same rate and duplex mode on the interfaces.

Captain Jack smiles, "David, the problem is easily solved with General William's tip."

Captain David is very happy, "Great, all interfaces are Up. Problem solved!"

 

Captain Jack says, "Wait a minute. I still have something to say. If the negotiated interface rate is not the required value, you can manually set the interface rate as required. Let me explain that based on the following networking diagram.


 

The interfaces connecting the general's tent, soldiers' tent, and logistics tent to the switch all work at a rate of 1000 Mbit/s. The rate of GE1/0/4 connecting the switch to the Internet is also 1000 Mbit/s. If the auto-negotiation rate is not specified on the switch, the rates negotiated by GE1/0/1, GE1/0/2, and GE1/0/3 and their connected interfaces of the three tents are all 1000 Mbit/s. If the three tents concurrently send data at the rate of 1000 Mbit/s, the outbound interface GE1/0/4 may be congested."

Captain David says, "All the interfaces are in auto-negotiation mode and the negotiated rate is the maximum rate supported by the interfaces. The rate of the three inbound interfaces is 1000 Mbit/s. The rate of the outbound interface is also 1000 Mbit/s. The sum of the inbound interface rates (1000 Mbit/s + 1000 Mbit/s + 1000 Mbit/s) is higher than the outbound interface rate (1000 Mbit/s). Congestion occurs on the outbound interface. How can the congestion problem be solved?"

Captain Jack answers, "It's easy. You can set the negotiated rate for interfaces in auto-negotiation mode. You can set the maximum auto-negotiation rate of GE1/0/1, GE1/0/2, and GE1/0/3 to 100 Mbit/s. Although the maximum rate of interfaces in the three tents is 1000 Mbit/s, the negotiated interface rate is only 100 Mbit/s because the negotiated rate is the maximum rate supported by interfaces on both ends of the link. The sum of the inbound interface rates (100 Mbit/s + 100 Mbit/s + 100 Mbit/s) is lower than the outbound interface rate (1000 Mbit/s). In this way, the congestion problem is solved."

The configuration procedure is as follows:

<Huawei> system-view

[Huawei] sysname Switch

[Switch] interface gigabitEthernet 0/0/1

[Switch-GigabitEthernet0/0/1] negotiation auto

[Switch-GigabitEthernet0/0/1] auto speed 100 // Set the maximum auto-negotiation rate of GE1/0/1 to 100 Mbit/s.

[Switch-GigabitEthernet0/0/1] quit

[Switch] interface gigabitEthernet 0/0/2

[Switch-GigabitEthernet0/0/2] port link-type access

[Switch-GigabitEthernet0/0/2] negotiation auto

[Switch-GigabitEthernet0/0/2] auto speed 100 // Set the maximum auto-negotiation rate of GE1/0/2 to 100 Mbit/s.

[Switch-GigabitEthernet0/0/2] quit

[Switch] interface gigabitEthernet 0/0/3

[Switch-GigabitEthernet0/0/3] negotiation auto

[Switch-GigabitEthernet0/0/3] auto speed 100 // Set the maximum auto-negotiation rate of GE1/0/3 to 100 Mbit/s.

[Switch-GigabitEthernet0/0/3] quit

 

Here is the end of all stories about interface configuration. If you want to view highlights in the previous episodes, click the following hyperlinks:

 Interface Configuration Tip 1: Batch Configuration

 Interface Configuration Tip 2: Port Isolation

This article contains more resources

You need to log in to download or view. No account?Register

x
  • x
  • convention:

josesmith     Created Jun 10, 2015 17:08:13 Helpful(0) Helpful(0)

Amazing sharing, using the dialog to explain is really a brilliant idea.
  • x
  • convention:

Reply

Reply
You need to log in to reply to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
If the attachment button is not available, update the Adobe Flash Player to the latest version!

Login and enjoy all the member benefits

Login
Fast reply Scroll to top