- Table of Contents
- Related Documents
-
| Title | Size | Download |
|---|---|---|
| 02-Ethernet interface configuration | 153.89 KB |
Configuring Ethernet interfaces
Configuration profile support for commands
Configuring common Ethernet interface settings
Configuring basic settings of an Ethernet interface
Configuring basic settings of an Ethernet subinterface
Configuring the link mode of an Ethernet interface
Configuring jumbo frame support
Configuring dampening on an Ethernet interface
Setting the statistics polling interval
Enabling loopback testing on an Ethernet interface
Shutting down all physical interfaces
Restoring the default settings for an interface
Configuring an interface to operate in promiscuous mode
Configuring a Layer 3 Ethernet interface or subinterface
Setting the MTU for an Ethernet interface or subinterface
Setting the MAC address of an Ethernet interface
Configuring an interface to operate in promiscuous mode
Display and maintenance commands
Configuring Ethernet interfaces
About Ethernet interface
This series devices support Ethernet interfaces, Console interfaces, and USB interfaces. For the interface types and the number of interfaces supported by a device model, see the installation guide.
This chapter describes how to configure Ethernet interfaces.
Configuration profile support for commands
For information about the this commands that can be added to a configuration profile, see the command reference. For information about configuration profiles, see configuration file management in Fundamentals Configuration Guide.
Configuring common Ethernet interface settings
Configuring basic settings of an Ethernet interface
About this task
You can configure an Ethernet interface to operate in one of the following duplex modes:
· Full-duplex mode—The interface can send and receive packets simultaneously.
· Half-duplex mode—The interface can only send or receive packets at a given time.
· Autonegotiation mode—The interface negotiates a duplex mode with its peer.
You can set the speed of an Ethernet interface or enable it to automatically negotiate a speed with its peer.
Restrictions and guidelines
The shutdown and loopback commands are mutually exclusive.
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface view.
interface interface-type interface-number
3. Set the description for the Ethernet interface.
description text
The default setting is interface-name Interface. For example, GigabitEthernet1/0/1 Interface.
4. Set the duplex mode for the Ethernet interface.
duplex { auto | full | half }
By default, the duplex mode is auto for Ethernet interfaces.
Fiber ports do not support the half keyword.
5. Set the speed for the Ethernet interface.
speed { 100 | 1000 | 2500 | 10000 | auto }
By default, an interface autonegotiates its speed.
6. Set the expected bandwidth for the Ethernet interface.
bandwidth bandwidth-value
By default, the expected bandwidth (in kbps) is the interface baud rate divided by 1000.
7. Bring up the Ethernet interface.
undo shutdown
By default, an Ethernet interface is up.
Configuring basic settings of an Ethernet subinterface
About this task
By default, a Layer 3 Ethernet subinterface processes packets with the VLAN tag numbered the same as the subinterface number.
Restrictions and guidelines for Ethernet subinterface basic settings
· To transmit and receive packets through an Ethernet subinterface, you must associate it with a VLAN. For more information, see VLAN termination configuration in Network Connectivity Configuration Guide.
· To transmit packets between a local Ethernet subinterface and a remote Ethernet subinterface, configure them with the same subinterface number and VLAN ID.
· Before creating a Layer 3 Ethernet subinterface, do not reserve a resource for the VLAN interface whose interface number is the subinterface number. After you reserve a VLAN interface resource, do not create a Layer 3 Ethernet subinterface whose subinterface number is the VLAN interface number. A Layer 3 Ethernet subinterface uses the VLAN interface resource in processing tagged packets whose VLAN ID matches the subinterface number. For more information about reserving resources for VLAN interfaces, see VLAN configuration in Network Connectivity Configuration Guide.
· The shutdown command cannot be configured on an Ethernet interface in a loopback test.
Procedure
1. Enter system view.
system-view
2. Create an Ethernet subinterface.
interface interface-type interface-number.subnumber
3. Set the description for the Ethernet subinterface.
description text
The default setting is interface-name Interface. For example, GigabitEthernet1/0/1.1 Interface.
4. Set the expected bandwidth for the Ethernet subinterface.
bandwidth bandwidth-value
By default, the expected bandwidth (in kbps) is the interface baud rate divided by 1000.
5. Bring up the Ethernet subinterface.
undo shutdown
By default, an Ethernet subinterface is up.
Configuring the link mode of an Ethernet interface
About this task
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface view.
interface interface-type interface-number
3. Configure the link mode of the Ethernet interface.
port link-mode { bridge | route }
By default, an Ethernet interface operates in Layer 2 mode.
|
CAUTION: Changing the link mode of an Ethernet interface also restores all commands (except shutdown) on the Ethernet interface to their defaults in the new link mode. |
Configuring jumbo frame support
About this task
Jumbo frames are frames larger than a device-specific size and are typically received by an Ethernet interface during high-throughput data exchanges, such as file transfers. For more information, see Interface Command Reference.
The Ethernet interface processes jumbo frames in the following ways:
· When the Ethernet interface is configured to deny jumbo frames (by using the undo jumboframe enable command), the Ethernet interface discards jumbo frames.
· When the Ethernet interface is configured with jumbo frame support, the Ethernet interface performs the following operations:
¡ Processes jumbo frames within the specified length.
¡ Discards jumbo frames that exceed the specified length.
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface view.
interface interface-type interface-number
3. Configure jumbo frame support.
jumboframe enable [ size ]
By default, the device allows jumbo frames within the maximum value of the size argument in bytes to pass through. For more information, see Interface Command Reference.
If you set the size argument multiple times, the most recent configuration takes effect.
Configuring dampening on an Ethernet interface
About this task
The interface dampening feature uses an exponential decay mechanism to prevent excessive interface flapping events from adversely affecting routing protocols and routing tables in the network. Suppressing interface state change events protects the system resources.
If an interface is not dampened, its state changes are reported. For each state change, the system also generates an SNMP trap and log message.
After a flapping interface is dampened, it does not report its state changes to the CPU. For state change events, the interface only generates SNMP trap and log messages.
Parameters
· Penalty—The interface has an initial penalty of 0. When the interface flaps, the penalty increases by 1000 for each down event until the ceiling is reached. It does not increase for up events. When the interface stops flapping, the penalty decreases by half each time the half-life timer expires until the penalty drops to the reuse threshold.
· Ceiling—The penalty stops increasing when it reaches the ceiling.
· Suppress-limit—The accumulated penalty that triggers the device to dampen the interface. In dampened state, the interface does not report its state changes to the CPU. For state change events, the interface only generates SNMP traps and log messages.
· Reuse-limit—When the accumulated penalty decreases to this reuse threshold, the interface is not dampened. Interface state changes are reported to the upper layers. For each state change, the system also generates an SNMP trap and log message.
· Decay—The amount of time (in seconds) after which a penalty is decreased.
· Max-suppress-time—The maximum amount of time the interface can be dampened. If the penalty is still higher than the reuse threshold when this timer expires, the penalty stops increasing for down events. The penalty starts to decrease until it drops below the reuse threshold.
· When configuring the dampening command, follow these rules to set the values mentioned above:
· The ceiling is equal to 2(Max-suppress-time/Decay) × reuse-limit. It is not user configurable.
· The configured suppress limit is lower than or equal to the ceiling.
· The ceiling is lower than or equal to the maximum suppress limit supported.
Figure 1 shows the change rule of the penalty value. The lines t0 and t2 indicate the start time and end time of the suppression, respectively. The period from t0 to t2 indicates the suppression period, t0 to t1 indicates the max-suppress-time, and t1 to t2 indicates the complete decay period.
Figure 1 Change rule of the penalty value
Restrictions and guidelines
The dampening command does not take effect on the administratively down events. When you execute the shutdown command, the penalty restores to 0, and the interface reports the down event to the upper-layer protocols.
· Do not enable the dampening feature on an interface with spanning tree protocols enabled.
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface view.
interface interface-type interface-number
3. Enable dampening on the interface.
dampening [ half-life reuse suppress max-suppress-time ]
By default, interface dampening is disabled on Ethernet interfaces.
Setting the statistics polling interval
About this task
By setting the statistics polling interval, you can collect statistics of packets and analyze packets at the specified interval. Based on the interface traffic statistics, you can take traffic control measures promptly to avoid network congestion and service interruption.
· When network congestion is detected, you can set the statistics polling interval to be smaller than 300 seconds (30 seconds when congestion deteriorates). Then, check traffic distribution on interfaces within a short period of time. For data packets that cause congestion, take traffic control measures.
· When the network bandwidth is sufficient and services are operating normally, you can set the statistics polling interval to be greater than 300 seconds. Once traffic parameter anomalies occur, modify the statistics polling interval promptly so that you can observe the traffic parameter trend in real time.
To display the interface statistics collected in the last statistics polling interval, use the display interface command. To clear the interface statistics, use the reset counters interface command.
Setting the statistics polling interval in Ethernet interface view
1. Enter system view.
system-view
2. Enter Ethernet interface view.
interface interface-type interface-number
3. Set the statistics polling interval for the Ethernet interface.
flow-interval interval
By default, the statistics polling interval is 300 seconds.
Enabling loopback testing on an Ethernet interface
About this task
Perform this task to determine whether an Ethernet link works correctly.
Loopback testing includes the following types:
· Internal loopback testing—Tests the device where the Ethernet interface resides. The Ethernet interface sends outgoing packets back to the local device. If the device fails to receive the packets, the device fails.
· External loopback testing—Tests the inter-device link. The Ethernet interface sends incoming packets back to the remote device. If the remote device fails to receive the packets, the inter-device link fails.
Restrictions and guidelines
· After you enable this feature on an Ethernet interface, the interface does not forward data traffic.
· The shutdown and loopback commands are mutually exclusive.
· After you enable this feature on an Ethernet interface, the Ethernet interface switches to full duplex mode. After you disable this feature, the Ethernet interface restores to its duplex setting.
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface view.
interface interface-type interface-number
3. Enable loopback testing.
loopback{ external | internal }
Shutting down all physical interfaces
About this task
This feature allows you to shut down all physical interfaces on a device. Physical interfaces shut down by using this command are in ADM state.
Restrictions and guidelines
To shut down all physical interfaces or the specified interface, execute the shutdown all-physical-interfaces command in system view or execute the shutdown command in interface view.
To bring up a shutdown interface, execute the undo shutdown all-physical-interfaces command in system view and execute the undo shutdown command in interface view.
Procedure
1. Enter system view.
system-view
2. Shut down all physical interfaces.
shutdown all-physical-interfaces
By default, physical interfaces are up.
Restoring the default settings for an interface
Restrictions and guidelines
|
CAUTION: This feature might interrupt ongoing network services. Make sure you are fully aware of the impacts of this feature when you use it in a live network. |
This feature might fail to restore the default settings for some commands because of command dependencies or system restrictions. You can use the display this command in interface view to check for these commands and perform their undo forms or follow the command reference to restore their default settings. If your restoration attempt still fails, follow the error message to resolve the problem.
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface view or Ethernet subinterface view.
interface interface-type { interface-number | interface-number.subnumber }
3. Restore the default settings for the interface.
default
Configuring an interface to operate in promiscuous mode
About this task
By default, a Layer 3 Ethernet interface does not operate in promiscuous mode. In this case, the interface accepts and processes only packets destined to the MAC address of the interface, and drops packets destined to any other MAC address.
For an interface to snoop all packets received, use this command to configure the interface to operate in promiscuous mode. In this mode, a Layer 3 Ethernet interface does not perform MAC address filtering, and accepts and processes all packets regardless whether they are destined to the MAC address of the interface.
Procedure
1. Enter system view.
system-view
2. Enter Layer 3 Ethernet interface view.
interface interface-type interface-number
3. Configure the interface to operate in promiscuous mode.
port promiscuous-mode
By default, an interface does not operate in promiscuous mode.
Configuring a Layer 3 Ethernet interface or subinterface
Setting the MTU for an Ethernet interface or subinterface
About this task
The maximum transmission unit (MTU) determines the maximum number of bytes in a single IP packet that can be sent. The length of an IP packet refers to the number of bytes starting from the IP header to the payload.
When the IP layer receives an IP data packet to be sent, the IP layer determines the local destination interface of the packet and obtains the MTU of the interface. The IP layer compares the MTU with the length of the data packet to be sent. If the length is greater than the MTU, the IP layer fragments the packet. The length of a fragment can be smaller than or equal to the MTU to ensure that big packets are not lost on the network.
As a best practice, use the default MTU. When the packet length or the packet receiver changes, you can adjust the MTU as needed. When configuring the MTU, follow these restrictions and guidelines:
· If the configured MTU is small but the packet length is large, the following events might occur:
¡ Packets will be dropped when they are forwarded by hardware.
¡ Packets will be fragmented into too many fragments when packets are forwarded through the CPUs, which affects normal data transmission.
· If the configured MTU is too large, the MTU will exceed the receiving capabilities of the receiver or a device along the transmission path. As a result, packets will be fragmented or even dropped, which increases the network transmission load and affects data transmission.
Restrictions and guidelines
The MTU of an Ethernet interface affects the fragmentation and reassembly of IP packets on the interface. Typically, you do not need to modify the MTU of an interface.
Procedure
1. Enter system view.
system-view
2. Enter interface view.
interface interface-type { interface-number | interface-number.subnumber }
3. Set the interface MTU.
mtu size
The default setting is 1500 bytes.
Setting the MAC address of an Ethernet interface
About this task
In a network, when the Layer 3 Ethernet interfaces of different devices have the same MAC address, the devices might fail to communicate correctly. To eliminate the MAC address conflicts, use the mac-address command to modify the MAC addresses of Layer 3 Ethernet interfaces.
Procedure
1. Enter system view.
system-view
2. Enter interface view.
interface interface-type { interface-number }
3. Set the interface MAC address.
mac-address mac-address
By default, no MAC address is set for a Layer 3 Ethernet interface.
Configuring an interface to operate in promiscuous mode
About this task
By default, a Layer 3 Ethernet interface does not operate in promiscuous mode. In this case, the interface accepts and processes only packets destined to the MAC address of the interface, and drops packets destined to any other MAC address.
For an interface to snoop all packets received, use this command to configure the interface to operate in promiscuous mode. In this mode, a Layer 3 Ethernet interface does not perform MAC address filtering, and accepts and processes all packets regardless whether they are destined to the MAC address of the interface.
Hardware and feature compatibility
|
Model |
Product code |
Feature compatibility |
|
|
WX2500X series |
WX2560X WX2580X |
EWP-WX2560X EWP-WX2580X |
Yes |
|
WX2500X-E series |
WX2508X-E |
EWP-WX2508X-E |
Yes |
|
Hardware series |
Model |
Product code |
Feature compatibility |
|
WX2500X-LI series |
WX2510X-LI WX2510X-PWR-LI WX2520X-LI WX2540X-LI WX2550X-LI WX2560X-LI WX2580X-LI |
EWP-WX2510X-LI EWP-WX2510X-PWR-LI EWP-WX2520X-LI EWP-WX2540X-LI EWP-WX2550X-LI EWP-WX2560X-LI EWP-WX2580X-LI |
No: · EWP-WX2510X-LI · EWP-WX2510X-PWR-LI Yes: · EWP-WX2520X-LI · EWP-WX2540X-LI · EWP-WX2550X-LI · EWP-WX2560X-LI · EWP-WX2580X-LI |
|
Hardware series |
Model |
Product code |
License client compatibility |
|
WX2800X series |
WX2812X-PWR WX2860X WX2880X |
EWP-WX2812X-PWR EWP-WX2860X EWP-WX2880X |
No:EWP-WX2812X-PWR Yes: · EWP-WX2860X · EWP-WX2880X |
|
WSG1800X series |
WSG1808X-PWR WSG1808X-PWR WSG1812X-PWR WSG1840X |
EWP-WSG1808X-PWR EWP-WSG1808X-PWR-JP EWP-WSG1812X-PWR EWP-WSG1840X |
No |
Procedure
1. Enter system view.
system-view
2. Enter Layer 3 Ethernet interface view.
interface interface-type interface-number
3. Configure the interface to operate in promiscuous mode.
port promiscuous-mode
By default, an interface does not operate in promiscuous mode.
Display and maintenance commands
Execute display commands in any view and reset commands in user view.
|
Task |
Command |
|
Display interface traffic statistics. |
display counters { inbound | outbound } interface [ interface-type [ interface-number ] ] |
|
Display traffic rate statistics of interfaces in up state over the last statistics polling interval. |
display counters rate { inbound | outbound } interface [ interface-type [ interface-number ] ] |
|
Display the Ethernet module statistics. |
display ethernet statistics |
|
Display the operational and status information of the specified interfaces. |
display interface [ interface-type [ interface-number | interface-number.subnumber ] ] [ brief [ description | down ] ] |
|
Display the status and packet statistics of interfaces. |
display interface link-info [ interface-type [ interface-number | interface-number.subnumber ] ] link-info [ down | up ] [ description ] [ main ] [ verbose ] |
|
Display operating status and information of all interfaces except subinterfaces. |
display interface [ interface-type ] [ brief [ description | down ] ] main |
|
Display information about dropped packets on the specified interfaces. |
display packet-drop { interface [ interface-type [ interface-number ] ] | summary } |
|
Clear interface statistics. |
reset counters interface [ interface-type [ interface-number | interface-number.subnumber ] ] |
|
Clear the interface statistics on MIB. |
reset counters mib interface [ interface-type [ interface-number | interface-number.subnumber ] ] |
|
Clear the Ethernet module statistics. |
reset ethernet statistics |
|
Clear the statistics about dropped packets on the specified interfaces. |
reset packet-drop interface [ interface-type [ interface-number ] ] |


