- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
02-Ethernet interface configuration | 218.40 KB |
Contents
Configuring Ethernet interfaces
Configuring a management Ethernet interface
Configuring common Ethernet interface settings
Configuring the physical type for a combo interface (single combo interface)
Configuring basic settings of an Ethernet interface
Configuring basic settings of an Ethernet subinterface
Configuring jumbo frame support
Enabling link flapping protection on an interface
Configuring Rx-mode generic flow control on an Ethernet interface
Enabling energy saving features on an Ethernet interface
Setting the statistics polling interval
Enabling subinterface rate statistics collection on an Ethernet interface
Enabling loopback testing on an Ethernet interface
Configuring interface alarm functions
Shutting down all physical interfaces
Restoring the default settings for an interface
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
Enabling packet statistics collection on a Layer 3 Ethernet subinterface
Verifying and maintaining Ethernet interfaces
Displaying the configuration and running status of Ethernet interfaces
Displaying and clearing Ethernet interface statistics
Displaying and clearing Ethernet module statistics
Displaying and clearing physical link state change statistics of interfaces
Configuring Ethernet interfaces
About Ethernet interface
The Switch Series supports Ethernet interfaces, management Ethernet interfaces, Console interfaces, and USB interfaces. For the interface types and the number of interfaces supported by a switch model, see the installation guide.
This chapter describes how to configure management Ethernet interfaces and Ethernet interfaces.
Configuring a management Ethernet interface
About this task
A management interface uses an RJ-45/LC connector. You can connect the interface to a PC for software loading and system debugging, or connect it to a remote NMS for remote system management.
Procedure
1. Enter system view.
system-view
2. Enter management Ethernet interface view.
interface M-GigabitEthernet interface-number
3. (Optional.) Set the interface description.
description text
The default setting is M-GigabitEthernet0/0/0 Interface.
4. (Optional.) Set the duplex mode for the management Ethernet interface.
duplex { auto | full | half }
By default, the duplex mode is auto for a management Ethernet interface.
5. (Optional.)_Set the speed for the management Ethernet interface.
speed { 10 | 100 | 1000 | auto }
By default, the speed is auto for a management Ethernet interface.
6. (Optional.) Shut down the interface.
shutdown
By default, the management Ethernet interface is up.
Configuring common Ethernet interface settings
Configuring the physical type for a combo interface (single combo interface)
About this task
A combo interface is a logical interface that physically comprises one fiber combo port and one copper combo port. The two ports share one forwarding channel and one interface view. As a result, they cannot work simultaneously. When you activate one port, the other port is automatically disabled. In the interface view, you can activate the fiber or copper combo port, and configure other port attributes such as the interface rate and duplex mode.
Prerequisites
Before you configure combo interfaces, complete the following tasks:
· Determine the combo interfaces on your device. Identify the two physical interfaces that belong to each combo interface according to the marks on the device panel.
· Use the display interface command to determine which port (fiber or copper) of each combo interface is active:
¡ If the copper port is active, the output includes "Media type is twisted pair."
¡ If the fiber port is active, the output does not include this information.
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface view.
interface interface-type interface-number
3. Activate the copper combo port or fiber combo port.
combo enable { copper | fiber }
By default, either the copper or fiber port is active.
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.
For information about the bandwidth, description, and shutdown commands, see Interface Command Reference.
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 { 10 | 100 | 1000 | 10000 | auto }
By default, the speed of an Ethernet interface is autonegotiated.
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 Layer 2—LAN Switching 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.
· The shutdown command cannot be configured on an Ethernet interface in a loopback test.
· For information about the bandwidth, description, and shutdown commands, see Interface Command Reference.
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 jumbo frame support
About this task
Jumbo frames are frames larger than a fixed size and are typically received by an Ethernet interface during high-throughput data exchanges, such as file transfers.
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
By default, the device allows jumbo frames within a specific length to pass through. The length of jumbo frames that are allowed to pass through varies by interface. To see the length of jumbo frames that are allowed to pass through on an interface, execute the display interface command to check for the Maximum frame length field.
Enabling link flapping protection on an interface
About this task
Link flapping on an interface changes network topology and increases the system overhead. For example, in an active/standby link scenario, when interface status on the active link changes between UP and DOWN, traffic switches between active and standby links. To solve this problem, configure this feature on the interface.
With this feature enabled on an interface, when the interface goes down, the system enables link flapping detection. During the link flapping detection interval, if the number of detected flaps reaches or exceeds the link flapping detection threshold, the system shuts down the interface.
Restrictions and guidelines
This feature takes effect only if it is configured in both the system view and interface view.
Any of the following operations can enable link flapping protection:
· Execute the link-flap protect enable batch command in system view, and do not configure link flapping protection on interfaces.
· Execute the link-flap protect enable batch command in system view, and execute the port link-flap protect enable command in interface view.
· Execute the link-flap protect enable command in system view, and execute the port link-flap protect enable command in interface view.
To bring up an interface that has been shut down by link flapping protection, execute the undo shutdown command.
In the display interface command output, the Link-Flap DOWN value of the Current state field indicates that the interface has been shut down by link flapping protection.
Procedure
1. Enter system view.
system-view
2. Enable link flapping protection globally.
link-flap protect enable [ batch [ interval interval | threshold threshold ] * ]
By default, link flapping protection is disabled on all interfaces.
3. Enter Ethernet interface view.
interface interface-type interface-number
4. Configure link flapping protection on the Ethernet interface.
port link-flap protect { disable | enable [ interval interval | threshold threshold ] * }
By default, link flapping protection is not configured on an interface, and the global link flapping protection configuration applies on the interface.
Configuring storm suppression
About this task
The storm suppression feature ensures that the size of a particular type of traffic (broadcast, multicast, or unknown unicast traffic) does not exceed the threshold on an interface. When the broadcast, multicast, or unknown unicast traffic on the interface exceeds this threshold, the system discards packets until the traffic drops below this threshold.
Restrictions and guidelines
The configured suppression threshold value in pps or kbps might be converted into a multiple of the step value supported by the chip. As a result, the effective suppression threshold might be different from the configured one. For information about the suppression threshold that takes effect, see the prompt on the device.
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface view.
interface interface-type interface-number
3. Enable broadcast suppression and set the broadcast suppression threshold.
broadcast-suppression { ratio | pps max-pps | kbps max-kbps }
By default, broadcast suppression is disabled.
4. Enable multicast suppression and set the multicast suppression threshold.
multicast-suppression { ratio | pps max-pps | kbps max-kbps }
By default, multicast suppression is disabled.
5. Enable unknown unicast suppression and set the unknown unicast suppression threshold.
unicast-suppression { ratio | pps max-pps | kbps max-kbps }
By default, unknown unicast suppression is disabled.
Configuring Rx-mode generic flow control on an Ethernet interface
About this task
Enable Rx-mode generic flow control by using the flow-control receive enable command. With Rx-mode generic flow control enabled, an interface can receive flow control frames, but it cannot send flow control frames:
· When congestion occurs, the interface cannot send flow control frames to its peer.
· When the interface receives a flow control frame from its peer, it suspends sending packets to its peer.
Restrictions and guidelines
Support for this feature depends on the interface. If an interface supports this feature, the configuration can be deployed successfully without any prompts. If an interface does not support this feature, a prompt message will display when you execute the feature command.
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface view.
interface interface-type interface-number
3. Enable Rx-mode generic flow control.
flow-control receive enable
By default, Rx-mode generic flow control is disabled on an Ethernet interface.
Enabling energy saving features on an Ethernet interface
About this task
This feature provides Energy Efficient Ethernet (EEE) on an Ethernet interface.
The time period depends on the chip specifications and is not configurable.
· When the Ethernet interface comes up, both of the following events occur:
· The device automatically restores power supply to the Ethernet interface.
The Ethernet interface restores to its normal state.
With Energy Efficient Ethernet (EEE) enabled, a link-up interface enters low power state if it has not received any packet for a period of time. The time period depends on the chip specifications and is not configurable. When a packet arrives later, the device automatically restores power supply to the interface and the interface restores to the normal state.
Restrictions and guidelines
Fiber ports do not support this feature.
Configuring EEE on an Ethernet interface
1. Enter system view.
system-view
2. Enter Ethernet interface view.
interface interface-type interface-number
3. Enable EEE on the Ethernet interface.
eee enable
By default, EEE is disabled on an Ethernet interface.
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..
Procedure
1. Enter system view.
system-view
2. Set the statistics polling interval for the Ethernet interface.
flow-interval interval
By default, the statistics polling interval for an Ethernet interface is 300 seconds.
Enabling subinterface rate statistics collection on an Ethernet interface
Restrictions and guidelines
This feature is resource intensive. When you use this feature, make sure you fully understand its impact on system performance.
After you enable subinterface rate statistics collection on an Ethernet interface, the device periodically refreshes the rate statistics on the subinterfaces of this Ethernet interface.
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface view.
interface interface-type interface-number
3. Enable subinterface rate statistics collection on the Ethernet interface.
sub-interface rate-statistic
By default, subinterface rate statistics collection is disabled on an Ethernet interface.
4. (Optional.) View the subinterface rate statistics.
display interface
Enabling loopback testing on an Ethernet interface
About this task
Perform this task to determine whether an Ethernet link works correctly. Loopback testing supports only internal loopback testing. This feature tests the device where the Ethernet interface resides. With internal loopback testing enabled, the Ethernet interface sends outgoing packets back to the local device. If the device fails to receive the packets, the device 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 internal
Configuring interface alarm functions
About this task
With the interface alarm functions enabled, when the number of error packets on an interface in normal state within the specified interval exceeds the upper threshold, the interface generates an upper threshold exceeding alarm and enters the alarm state. When the number of error packets on an interface in the alarm state within the specified interval drops below the lower threshold, the interface generates a recovery alarm and restores to the normal state.
Restrictions and guidelines
You can configure the interface alarm parameters in system view and interface view.
· The configuration in system view takes effect on all interfaces of the specified slot. The configuration in interface view takes effect only on the current interface.
· For an interface, the configuration in interface view takes priority, and the configuration in system view is used only when no configuration is made in interface view.
An interface that is shut down because of error packet alarms cannot automatically recover. To bring up the interface, execute the undo shutdown command on the interface.
Enabling interface alarm functions
1. Enter system view.
system-view
2. Enable alarm functions for the interface monitoring module.
snmp-agent trap enable ifmonitor [ crc-error | input-error | input-usage | output-error | output-usage | rx-pause | sdh-b1-error | sdh-b2-error | sdh-error | tx-pause ] *
By default, all alarm functions are enabled for interfaces.
Configuring CRC error packet parameters
1. Enter system view.
system-view
2. Configure global CRC error packet alarm parameters.
ifmonitor crc-error slot slot-number high-threshold high-value low-threshold low-value interval interval [ shutdown ]
By default, the upper threshold is 1000, the lower threshold is 100, and the statistics collection and comparison interval is 10 seconds for CRC error packets.
3. Enter Ethernet interface view.
interface interface-type interface-number
4. Configure CRC error packet alarm parameters for the interface.
port ifmonitor crc-error [ ratio ] high-threshold high-value low-threshold low-value interval interval [ shutdown ]
By default, an interface uses the global CRC error packet alarm parameters.
Configuring input error packet alarm parameters
1. Enter system view.
system-view
2. Configure global input error packet alarm parameters.
ifmonitor input-error slot slot-number high-threshold high-value low-threshold low-value interval interval [ shutdown ]
By default, the upper threshold is 1000, the lower threshold is 100, and the statistics collection and comparison interval is 10 seconds for input error packets.
3. Enter Ethernet interface view.
interface interface-type interface-number
4. Configure input error packet alarm parameters for the interface.
port ifmonitor input-error high-threshold high-value low-threshold low-value interval interval [ shutdown ]
By default, an interface uses the global input error packet alarm parameters.
Configuring output error packet alarm parameters
1. Enter system view.
system-view
2. Configure global output error packet alarm parameters.
ifmonitor output-error slot slot-number high-threshold high-value low-threshold low-value interval interval [ shutdown ]
By default, the upper threshold is 1000, the lower threshold is 100, and the statistics collection and comparison interval is 10 seconds for output error packets.
3. Enter Ethernet interface view.
interface interface-type interface-number
4. Configure output error packet alarm parameters.
port ifmonitor output-error high-threshold high-value low-threshold low-value interval interval [ shutdown ]
By default, an interface uses the global output error packet alarm parameters.
Configuring input bandwidth usage alarm parameters
1. Enter system view.
system-view
2. Configure global input bandwidth usage alarm parameters.
ifmonitor input-usage slot slot-number high-threshold high-value low-threshold low-value
By default, the upper threshold is 90 and the lower threshold is 80 for input bandwidth usage alarms.
3. Enter Ethernet interface view.
interface interface-type interface-number
4. Configure input bandwidth usage alarm parameters.
port ifmonitor input-usage high-threshold high-value low-threshold low-value
By default, an interface uses the global input bandwidth usage alarm parameters.
Configuring output bandwidth usage alarm parameters
1. Enter system view.
system-view
2. Configure global output bandwidth usage alarm parameters.
ifmonitor output-usage slot slot-number high-threshold high-value low-threshold low-value
By default, the upper threshold is 90 and the lower threshold is 80 for output bandwidth usage alarms.
3. Enter Ethernet interface view.
interface interface-type interface-number
4. Configure output bandwidth usage alarm parameters.
port ifmonitor output-usage high-threshold high-value low-threshold low-value
By default, an interface uses the global output bandwidth usage alarm parameters.
Configuring received pause frame alarm parameters
1. Enter system view.
system-view
2. Configure global received pause frame alarm parameters.
ifmonitor rx-pause slot slot-number high-threshold high-value low-threshold low-value interval interval
By default, the upper threshold is 500, the lower threshold is 100, and the statistics collection and comparison interval is 10 seconds for received pause frames.
3. Enter Ethernet interface view.
interface interface-type interface-number
4. Configure received pause frame alarm parameters.
port ifmonitor rx-pause high-threshold high-value low-threshold low-value interval interval
By default, an interface uses the global received pause frame alarm parameters.
Configuring sent pause frame alarm parameters
1. Enter system view.
system-view
2. Configure global sent pause frame alarm parameters.
ifmonitor tx-pause slot slot-number high-threshold high-value low-threshold low-value interval interval
By default, the upper threshold is 500, the lower threshold is 100, and the statistics collection and comparison interval is 10 seconds for sent pause frames.
3. Enter Ethernet interface view.
interface interface-type interface-number
4. Configure sent pause frame alarm parameters.
port ifmonitor tx-pause high-threshold high-value low-threshold low-value interval interval
By default, an interface uses the global sent pause frame alarm parameters.
Configuring SDH error packet alarm parameters
1. Enter system view.
system-view
2. Configure global SDH error packet alarm parameters.
ifmonitor sdh-error slot slot-number high-threshold high-value low-threshold low-value interval interval [ shutdown ]
By default, the upper threshold is 1000, the lower threshold is 100, and the statistics collection and comparison interval is 10 seconds for SDH error packets.
3. Enter Ethernet interface view.
interface interface-type interface-number
4. Configure SDH error packet alarm parameters for the interface.
port ifmonitor sdh-error high-threshold high-value low-threshold low-value interval interval [ shutdown ]
By default, an interface uses the global SDH error packet alarm parameters.
Configuring SDH-B1 error packet alarm parameters
1. Enter system view.
system-view
2. Configure global SDH-B1 error packet alarm parameters.
ifmonitor sdh-b1-error slot slot-number high-threshold high-value low-threshold low-value interval interval [ shutdown ]
By default, the upper threshold is 1000, the lower threshold is 100, and the statistics collection and comparison interval is 10 seconds for SDH-B1 error packets.
3. Enter Ethernet interface view.
interface interface-type interface-number
4. Configure SDH-B1 error packet alarm parameters for the interface.
port ifmonitor sdh-b1-error high-threshold high-value low-threshold low-value interval interval [ shutdown ]
By default, an interface uses the global SDH-B1 error packet alarm parameters.
Configuring SDH-B2 error packet alarm parameters
1. Enter system view.
system-view
2. Configure global SDH-B2 error packet alarm parameters.
ifmonitor sdh-b2-error slot slot-number high-threshold high-value low-threshold low-value interval interval [ shutdown ]
By default, the upper threshold is 1000, the lower threshold is 100, and the statistics collection and comparison interval is 10 seconds for SDH-B2 error packets.
3. Enter Ethernet interface view.
interface interface-type interface-number
4. Configure SDH-B2 error packet alarm parameters for the interface.
port ifmonitor sdh-b2-error high-threshold high-value low-threshold low-value interval interval [ shutdown ]
By default, an interface uses the global SDH-B2 error packet alarm parameters.
Shutting down all interfaces
About this task
This feature allows you to shut down all interfaces except the management Ethernet interfaces and interfaces excluded from shutdown on a device. For an interface that supports subinterfaces, only the main interface is shut down, and its subinterfaces will not be shut down by this command. However, after the main interface is shutdown, its subinterfaces will go down and cannot forward packets. In this case, if you execute the display this command on an interface that is shut down, the output shows that the shutdown command is automatically generated on the interface.
To bring up an interface shut down by using the shutdown all-interfaces command, you can execute the undo shutdown command in interface view or the undo shutdown all-interfaces command in system view.
Procedure
1. Enter system view.
system-view
2. Shut down all physical interfaces.
shutdown all-interfaces exclude interface-list
By default, physical interfaces are up.
Shutting down all physical interfaces
About this task
This feature allows you to shut down all physical interfaces except the management Ethernet 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.
For information about the default command, see Interface Command Reference.
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 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 configured for an Ethernet interface, and a Layer 3 Ethernet subinterface uses the MAC address of its main interface.
Enabling packet statistics collection on a Layer 3 Ethernet subinterface
About this task
This feature is resource intensive. The system becomes busy and the CPU usage increases when you enable this feature on a large number of Ethernet subinterfaces or set a shorter interval by using the flow-interval command.
Procedure
1. Enter system view.
system-view
2. Enter Layer 3 Ethernet subinterface view.
interface interface-type interface-number.subnumber
3. Enable packet statistics collection on the Layer 3 Ethernet subinterface.
traffic-statistic enable
By default, packet statistics collection is disabled on a Layer 3 Ethernet subinterface.
4. (Optional.) Display the subinterface packet statistics.
display interface
display counters
The Input and Output fields in the display interface command output display the subinterface packet statistics.
Verifying and maintaining Ethernet interfaces
Displaying the configuration and running status of Ethernet interfaces
Perform all display tasks in any view.
· Display the running status and related information of the specified interfaces.
display interface [ interface-type [ interface-number | interface-number.subnumber ] ] [ brief [ description | down ] ]
· Display link flapping protection information on the specified interfaces.
display link-flap protection [ interface interface-type [ interface-number ] ]
· Display PFC information on the specified interfaces.
display priority-flow-control interface [ interface-type [ interface-number ] ]
Displaying and clearing Ethernet interface statistics
Displaying Ethernet interface statistics
Perform all display tasks in any view.
· Display interface traffic statistics.
display counters { inbound | outbound } interface [ interface-type [ interface-number | interface-number.subnumber ] ]
For information about this command, see common interface commands in Interface Command Reference.
· 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 | interface-number.subnumber ] ]
For information about this command, see common interface commands in Interface Command Reference.
Clearing Ethernet interface statistics
Perform all clear tasks in user view.
· Clear Ethernet interface statistics.
reset counters interface [ interface-type [ interface-number | interface-number.subnumber ] ]
For information about this command, see common interface commands in Interface Command Reference.
Displaying and clearing Ethernet module statistics
Displaying Ethernet module statistics
To display the Ethernet module statistics, execute the following command in any view:
display ethernet statistics slot slot-number
Clearing Ethernet module statistics
To clear the Ethernet module statistics, execute the following command in user view:
reset ethernet statistics [ slot slot-number ]
Displaying and clearing physical link state change statistics of interfaces
Displaying physical link state change statistics of interfaces
To display physical link state change statistics of interfaces, execute the following command in any view:
display link-state-change statistics interface [ interface-type [ interface-number ] ]
Clearing physical link state change statistics of interfaces
To clear physical link state change statistics of interfaces, execute the following command in user view:
reset link-state-change statistics interface [ interface-type [ interface-number ] ]