- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
02-Ethernet interface configuration | 221.59 KB |
Contents
Configuring Ethernet interfaces
Enabling SNMP interface index constancy
Configuring a management Ethernet interface
Configuring common Ethernet interface settings
Ethernet interface naming conventions
Configuring the operating mode for a 10-GE interface
Configuring the framing format for a 10-GE interface operating in WAN mode
Setting the J0 and J1 overhead bytes for a 10-GE interface
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 physical state change suppression on an Ethernet interface
Configuring dampening on an Ethernet interface
Enabling link flapping protection on an interface
Configuring generic flow control on an Ethernet interface
Configuring PFC on an inner interface
Setting the statistics polling interval
Enabling interframe gap and preamble statistics in the traffic statistics
Enabling loopback testing on an Ethernet interface
Configuring interface alarm functions
Displaying the operating status and information of an interface
Shutting down all physical interfaces
Restoring the default settings for an interface
Configuring a Layer 3 Ethernet interface
Enabling Layer 2 forwarding on an interface
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
Display and maintenance commands for an Ethernet interface or subinterface
Configuring Ethernet interfaces
About Ethernet interface
Your device supports the following types of Ethernet interfaces:
· Layer 2 Ethernet interfaces—Physical Ethernet interfaces operating at the data link layer (Layer 2) to switch packets.
· Layer 3 Ethernet interfaces—Physical Ethernet interfaces operating at the network layer (Layer 3) to route packets. You can assign an IP address to a Layer 3 Ethernet interface.
· Layer-configurable Ethernet interfaces—Physical Ethernet interfaces that can be configured to operate in bridge mode as Layer 2 Ethernet interfaces or in route mode as Layer 3 Ethernet interfaces.
· Layer 3 Ethernet subinterfaces—Logical interfaces operating at the network layer. You can assign an IP address to a Layer 3 Ethernet subinterface. To enable a Layer 3 Ethernet interface to transport packets for multiple VLANs, you must create Layer 3 subinterfaces on the Layer 3 Ethernet interface. For information about how a Layer 3 Ethernet subinterface sends and receives VLAN-tagged packets, see Layer 2—LAN Switching Configuration Guide.
Enabling SNMP interface index constancy
About this task
For an application that uses interface indexes for billing, the infterface indexes must be constant. You can enable SNMP interface index constancy to make the insterface indexes not being affected by adding or deleting interfaces, system reboots, and software or hardware changes. With this command configured, indexes of both the existing interfaces and newly created interfaces are constant.
Restrictions and guidelines
Before rebooting the system, execute the save command first. Otherwise, interface indexes on the device might change after the reboot.
Procedure
1. Enter system view.
system-view
2. Enable SNMP interface index constancy.
ifindex-constant enable [ file filename ]
By default, SNMP interface index constancy is disabled.
3. Set the maximum number of constant interface indexes.
ifindex-constant max-number number
By default, the maximum number of constant interface indexes is 131070.
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.
Each MPU on a device has a management Ethernet interface. For management link backup, perform the following tasks:
1. Connect your PC to the management Ethernet interface on the active MPU.
2. Connect the PC to a management Ethernet interface with the same interface number on a standby MPU.
3. The two management Ethernet interfaces operate as follows:
· When the device has multiple management Ethernet interfaces, only the management Ethernet interface on the active MPU processes management traffic.
· When the management Ethernet interface on the active MPU fails, the management Ethernet interface on the standby MPU takes over to process management traffic.
· When the management Ethernet interface on the active MPU recovers, it takes over to process management traffic again.
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 management Ethernet interface.
shutdown
By default, the management Ethernet interface is up.
CAUTION: Executing the shutdown command on an interface will disconnect the link of the interface and interrupt communication. Use this command with caution. |
Configuring common Ethernet interface settings
Ethernet interface naming conventions
The Ethernet interfaces are named in the format of interface type A/B/C. The letters that follow the interface type represent the following elements:
· A—Card slot number.
· B—Subcard slot number. The value is fixed at 0.
· C—Port index.
Configuring the operating mode for a 10-GE interface
About this task
10-GE interfaces support the following operating modes:
· LAN mode—In LAN mode, a 10-GE interface transmits Ethernet packets and provides Ethernet network access.
· WAN mode—In WAN mode, a 10-GE interface transmits SDH frames and provides SDH network access. In this mode, a 10-GE interface supports only point-to-point connections.
Restrictions and guidelines
A 10-GE interface operating in WAN mode encapsulates Ethernet packets in SDH frames. A 10G POS interface encapsulates PPP packets in SDH frames. However, they cannot communicate with each other because they encapsulate different kinds of packets.
Only MIC-XP10L-M cards support this feature.
Procedure
1. Enter system view.
system-view
2. Enter 10-GE interface view.
interface ten-gigabitethernet interface-number
3. Configure the 10-GE interface to operate in LAN or WAN mode.
port-mode { lan | wan }
By default, a 10-GE interface operates in LAN mode.
Configuring the framing format for a 10-GE interface operating in WAN mode
About this task
SDH and SONET are two optical transmission standards. They are made by different organizations. They are similar in substantial contents and major specifications but different in some detailed technical parameters. However, they have different application scopes, and devices from different vendors have different default values. Configure the same framing format as that of the transmission device.
Procedure
1. Enter system view.
system-view
2. Enter 10-GE interface view.
interface ten-gigabitethernet interface-number
3. Configure the 10GE interface to operate in LAN or WAN mode.
port-mode { lan | wan }
By default, an interface operates in WAN mode.
4. Configure the framing format for the 10-GE interface operating in WAN mode.
frame-format sdh
By default, the framing format of a 10-GE interface is SDH.
Setting the J0 and J1 overhead bytes for a 10-GE interface
About this task
The overhead bytes in SDH frames provide the operation and maintenance features such as hierarchical management of the transmission network. J0 and J1 bytes provide internetworking support between devices of different countries, regions, or vendors.
The Regenerator Section Trace byte J0 is usually configured as a section access point identifier. The sending end keeps the connection with the receiving end by sending this byte repeatedly.
The Path Trace byte J1 is usually configured as a high-order path access point identifier. J1 also enables two ends to keep their connection.
To ensure smooth communication, make sure the sending and receiving ends have the same J0 and J1 bytes
To ensure smooth communication, make sure the sending and receiving ends have the same J0 and J1 bytes.
Procedure
1. Enter system view.
system-view
2. Enter 10-GE interface view.
interface ten-gigabitethernet interface-number
3. Configure the 10-GE interface to operate in WAN mode.
port-mode wan
By default, a 10-GE interface operates in LAN mode.
4. Set the J0 and J1 bytes in SDH frames.
flag { j0 | j1 } sdh flag-value
By default, the J0 byte is CR16000.
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.
Follow these restrictions and guidelines when you set the speed for Ethernet interfaces on MIC-XP10L-M cards:
· Only MIC-XP10L-M cards support switching over the speed to 1000 Mbps and 10000 Mbps.
· After the speed auto command is executed on MIC-XP10L-M cards, the speed can be autonegotiated to 10 Mbps, 100 Mbps, 1000 Mbps, or 10000 Mbps.
· MIC-XP10L-M cards support speed switchovers by single port.
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, Ten-GigabitEthernet3/0/1 Interface.
4. Set the duplex mode for the Ethernet interface.
duplex { auto | full | half }
By default:
¡ The duplex mode is full for 10-GE and 100-GE interfaces.
¡ The duplex mode is auto for other Ethernet interfaces.
5. Set the speed for the Ethernet interface.
speed { 10 | 100 | 1000 | 10000 | 100000 | auto }
The default speed setting is auto for a GE interface, and 100000 for a 10-GE or 100-GE interface.
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 deafult, an Ethernet interface is up.
Configuring basic settings of an Ethernet subinterface
About this task
By default, a Layer 3 Ethernet subinterface processes packets for only the VLAN whose ID is 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 executed 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, Ten-GigabitEthernet3/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
Perform this task to set the link mode for interfaces at CLI.
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 3 mode.
CAUTION: After you change the link mode of an Ethernet interface, all commands (except the shutdown command) on the Ethernet interface are restored to their defaults in the new link mode. |
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 you configure the Ethernet interface to deny jumbo frames by using the undo jumboframe enable command, the Ethernet interface discards jumbo frames.
· When you configure the Ethernet interface 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.
MIC-CQ1L-M, MIC-CQ2L-M, and MIC-XP4L-M cards do not support this feature.
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 specified length to pass through all Ethernet interfaces.
If you execute this command multiple times, the most recent configuration takes effect.
Configuring physical state change suppression on an Ethernet interface
About this task
The physical link state of an Ethernet interface is either up or down. Each time the physical link of an interface comes up or goes down, the interface immediately reports the change to the CPU. The CPU then performs the following operations:
· Notifies the upper-layer protocol modules (such as routing and forwarding modules) of the change for guiding packet forwarding.
· Automatically generates traps and logs to inform users to take the correct actions.
To prevent frequent physical link flapping from affecting system performance, configure physical state change suppression. You can configure this feature to suppress only link-down events, only link-up events, or both. If an event of the specified type still exists when the suppression interval expires, the system reports the event to the CPU.
Restrictions and guidelines
As a best practice, do not enable this feature on an interface that has spanning tree protocols enabled.
The link-delay, dampening, and port link-flap protect enable commands are mutually exclusive on an Ethernet interface.
You can configure different suppression intervals for link-up and link-down events.
If you execute the link-delay command multiple times on an interface, the following rules apply:
· You can configure the suppression intervals for link-up and link-down events separately.
· If you configure the suppression interval multiple times for link-up or link-down events, the most recent configuration takes effect.
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface view.
interface interface-type interface-number
3. Configure physical state change suppression.
link-delay { down | up } [ msec ] delay-time
By default, the physical state change suppression time is one second.
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 and port link-flap protect enable commands are mutually exclusive on an Ethernet interface.
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.
As a best practice, do not enable the dampening feature on an interface with MSTP 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.
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.
The dampening and port link-flap protect enable commands are mutually exclusive on an Ethernet interface.
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
By default, link flapping protection is disabled globally.
3. Enter Ethernet interface view.
interface interface-type interface-number
4. Enable link flapping protection on the Ethernet interface.
port link-flap protect enable [ interval interval | threshold threshold ] *
By default, link flapping protection is disabled on an Ethernet interface.
Configuring FEC
About this task
The forward error correction (FEC) feature corrects packet errors to improve transmission quality. It attaches correction information to a packet at the sending end, and corrects error codes generated during transmission at the receiving end based on the correction information. You can set the FEC mode as needed.
Restrictions and guidelines
This feature is supported only on 100-GE interfaces.
Make sure you set the same FEC mode for both interfaces of a link.
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface view.
interface interface-type interface-number
3. Set the FEC mode of the Ethernet interface.
port fec mode { auto | base-r | none | rs-fec }
By default, the FEC mode of an Ethernet interface is autonegotiated.
The base-r keyword is not supported on 100-GE interfaces.
Configuring generic flow control on an Ethernet interface
About this task
To avoid dropping packets on a link, you can enable generic flow control at both ends of the link. When traffic congestion occurs at the receiving end, the receiving end sends a flow control (Pause) frame to ask the sending end to suspend sending packets. Generic flow control includes the following types:
· TxRx-mode generic flow control—Enabled by using the flow-control command. With TxRx-mode generic flow control enabled, an interface can both send and receive flow control frames:
¡ When congestion occurs, the interface sends a flow control frame to its peer.
¡ When the interface receives a flow control frame from its peer, it suspends sending packets to its peer.
· Rx-mode generic flow control—Enabled 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.
To handle unidirectional traffic congestion on a link, configure the flow-control receive enable command at one end and the flow-control command at the other end. To enable both ends of a link to handle traffic congestion, configure the flow-control command at both ends.
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface view.
interface interface-type interface-number
3. Enable generic flow control.
¡ Enable TxRx-mode generic flow control:
flow-control
¡ Enable Rx-mode generic flow control:
flow-control receive enable
By default, generic flow control is disabled on an Ethernet interface.
Configuring PFC on an inner interface
About this task
An inner interface is the inner Ethernet interface through which a card communicates with the device, and is invisible for users.
With PFC enabled on an inner interface, when the traffic from an LPU to a switching fabric module is congested, the inner interface on the switching fabric module sends PFC pause frames to the inner interface on the LPU to notify the LPU to stop sending packets to the switching fabric module. When congestion is eliminated, the inner interface on the switching fabric module notifies the LPU to continue to send packets to the switching fabric module. This rule also applies to the traffic from a switching fabric module to an LPU.
When congestion occurs in the network, the local device notifies the peer to stop sending packets carrying the specified 802.1p priority if all of the following conditions exist:
· Both the local inner interface and the remote inner interface have priority-based flow control (PFC) enabled.
· Both the local inner interface and the remote inner interface have the priority-flow-control inner-port no-drop command configured.
· The specified 802.1p priority is in the 802.1p priority list specified by the dot1p-list argument.
· The local inner interface receives a packet carrying the specified 802.1p priority.
For more information about 802.1p priorities, see ACL and QoS Configuration Guide.
Make sure all interfaces that a data flow passes through have the same PFC configuration.
Table 1 PFC configurations and negotiation results
Local (right) Peer (below) |
enable |
auto |
Default |
enable |
Enabled |
Enabled. |
Disabled |
auto |
Enabled |
· Enabled if negotiation succeeds. · Disabled if negotiation fails. |
Disabled |
Default |
Disabled |
Disabled. |
Disabled |
Restrictions and guidelines
Procedure
1. Enter system view.
system-view
2. Enable PFC on inner interfaces.
priority-flow-control inner-port { auto | enable }
By default, PFC is disabled on inner interfaces.
An inner interface is the inner Ethernet interface through which a card communicates with the device, and is invisible to users.
3. Enable PFC for 802.1p priorities on inner interfaces.
priority-flow-control inner-port no-drop dot1p dot1p-list
By default, PFC is disabled for all 802.1p priorities.
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.
You can use this command in system view or interface view.
· In system view, the command takes effect on all interfaces.
· In interface view, the command takes effect only on the specified interface.
When the statistics polling interval uses the default setting in interface view, the setting in system view takes effect. When the command is executed in both system view and interface view, the setting in interface view takes priority.
Restrictions and guidelines for setting the statistics polling interval
As a best practice, use the default statistics polling interval in system view. A short statistics polling interval in system view might decrease the system performance and result in inaccurate statistics.
Setting the statistics polling interval in system view
1. Enter system view.
system-view
2. Set the statistics polling interval.
flow-interval interval
By default, the statistics polling interval is 300 seconds.
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 on an interface.
Enabling interframe gap and preamble statistics in the traffic statistics
About this task
With the display interface command executed, the Last 300 seconds input rate or Last 300 seconds output rate field in the command output displays the average outbound or inbound traffic rate in the last 300 seconds.
By default, traffic rate = native frame length × packet count per second. Execute the traffic-statistic include-interframe command if you need the total traffic statistics, including the native frame length, interframe gap length and preamble length, for a specific time period. With this command executed, traffic rate = (native frame length + interframe gap length + preamble length) × packet count per second.
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface view.
interface interface-type interface-number
3. Enable interframe gap and preamble statistics in the traffic statistics.
traffic-statistic include-interframe
By default, interframe gap and preamble statistics are enabled in the traffic statistics.
Enabling loopback testing on an Ethernet interface
About this task
Perform this task to determine whether an Ethernet link works correctly. This feature includes internal loopback testing and external loopback testing:
· 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 packets received from the peer device back to the peer device. If the peer 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 }
By default, loopback testing is disabled on an Ethernet interface.
Configuring interface alarm functions
About this task
With the interface alarm functions enabled, when the number of sent or received error packets or the input or output bandwidth usage 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 sent or received error packets or the input or output bandwidth usage 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 error packet 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 | giant | input-buffer-drop | input-error | input-usage | output-buffer-drop | output-error | output-usage | runt ] *
By default, all alarm functions are enabled for interfaces.
Configuring CRC error packet alarm 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 giant packet alarm parameters
1. Enter system view.
system-view
2. Configure global giant packet alarm parameters.
ifmonitor giant 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 giant packets.
3. Enter Ethernet interface view.
interface interface-type interface-number
4. Configure giant packet alarm parameters for the interface.
port ifmonitor giant high-threshold high-value low-threshold low-value interval interval [ shutdown ]
By default, an interface uses the global giant packet alarm parameters.
Configuring runt packet alarm parameters
1. Enter system view.
system-view
2. Configure global runt packet alarm parameters.
ifmonitor runt 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 runt packets.
3. Enter Ethernet interface view.
interface interface-type interface-number
4. Configure runt packet alarm parameters for the interface.
port ifmonitor runt high-threshold high-value low-threshold low-value interval interval [ shutdown ]
By default, an interface uses the global runt packet alarm parameters.
Configuring parameters for input buffer packet loss alarms
1. Enter system view.
system-view
2. Configure global parameters for input buffer packet loss alarms.
ifmonitor input-buffer-drop slot slot-number high-threshold high-value low-threshold low-value interval interval [ shutdown ]
By default, the global upper threshold, lower threshold, and statistics collection and comparison interval for input buffer packet loss alarms are 1000 packets, 100 packets, and 10 seconds, respectively.
3. Enter Ethernet interface view.
interface interface-type interface-number
4. Configure parameters for input buffer packet loss alarms on the interface.
port ifmonitor input-buffer-drop high-threshold high-value low-threshold low-value interval interval [ shutdown ]
By default, an interface uses the global parameters for input buffer packet loss alarms.
Configuring parameters for output buffer packet loss alarms
1. Enter system view.
system-view
2. Configure global parameters for output buffer packet loss alarms.
ifmonitor output-buffer-drop slot slot-number high-threshold high-value low-threshold low-value interval interval [ shutdown ]
By default, the global upper threshold, lower threshold, and statistics collection and comparison interval for output buffer packet loss alarms are 1000 packets, 100 packets, and 10 seconds, respectively.
3. Enter Ethernet interface view.
interface interface-type interface-number
4. Configure parameters for output buffer packet loss alarms on the interface.
port ifmonitor output-buffer-drop high-threshold high-value low-threshold low-value interval interval [ shutdown ]
By default, an interface uses the global parameters for output buffer packet loss alarms.
Enabling card alarm functions
About this task
A card generates an upper-threshold-exceeding alarm for per-card packet loss and enters the alarm state if the following conditions are met:
· The per-card packet loss alarm function is enabled.
· The card was in normal state. Then, the number of packets discarded by the card within the specified interval exceeds the upper threshold.
A card generates a recovery alarm for per-card packet loss and restores to the normal state if the following conditions are met:
· The per-card packet loss alarm function is enabled.
· The card was in alarm state. Then, the number of packets discarded by the card within the specified interval drops below the lower threshold.
Enabling card alarm functions
1. Enter system view.
system-view
2. Enable card alarm functions.
snmp-agent trap enable slot-monitor [ packet-drop ]
By default, card alarm functions are enabled.
Configuring packet loss alarm parameters for all cards
1. Enter system view.
system-view
2. Configure packet loss alarm parameters for all cards.
slot-monitor packet-drop high-threshold high-threshold-value low-threshold low-threshold-value interval interval [ shutdown | reboot ]
By default, the upper threshold, lower threshold, and statistics collection and comparison interval for per-card packet loss alarms are 1000000 packets, 100 packets, and 30 seconds, respectively.
Configuring packet loss alarm parameters for a specific card
1. Enter system view.
system-view
2. Configure packet loss alarm parameters for the specified card.
slot-monitor packet-drop slot slot-number high-threshold high-threshold-value low-threshold low-threshold-value interval interval [ shutdown | reboot ]
By default, the upper threshold, lower threshold, and statistics collection and comparison interval for per-card packet loss alarms are 1000000 packets, 100 packets, and 30 seconds, respectively.
Displaying the operating status and information of an interface
About this task
In interface view, to quickly view the operating status or packet statistics of the interface, execute this command.
For an interface, the output from the display this interface command in interface view is the same as the output from the display interface interface-type interface-number command in any view.
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface view.
interface interface-type interface-number
3. Display the operating status and information of an interface.
display this interface
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, all 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 a Layer 3 Ethernet interface
Enabling Layer 2 forwarding on an interface
About this task
By default, a Layer 3 interface only performs Layer 3 forwarding. This command enables a Layer 3 Ethernet interface to transmit VLAN tagged packets by creating a virtual Layer 2 Ethernet interface for that Layer 3 Ethernet interface. You can configure VLAN settings on the virtual Layer 2 Ethernet interface.
This feature shuts down the data link layer of a Layer 3 Ethernet interface. While the Layer 3 Ethernet interface cannot provide Layer 3 services, its subinterfaces can terminate VLANs and continue to provide Layer 3 services.
Restrictions and guidelines
This feature is not supported on a Layer 3 Ethernet interface that has been assigned to a Layer 3 aggregate interface.
You cannot enable this feature on a main interface whose subinterfaces terminate the outermost VLAN ID 1.
The outermost VLAN IDs terminated by subinterfaces of a main interface cannot contain the PVID of and VLAN IDs permitted by the virtual Layer 2 interface created for the main interface.
On a Layer 3 Ethernet interface with this feature enabled, you cannot perform the following tasks:
· Splitting an interface and switching the interface type.
· Switching the interface mode between bridge and route.
· Assigning an interface to a Layer 3 aggregation group.
Procedure
1. Enter system view.
system-view
2. Enter Layer 3 Ethernet interface view.
interface interface-type interface-number
3. Enable Layer 2 forwarding on the Layer 3 Ethernet interface.
bridge-forwarding enable
By default, Layer 2 forwarding is disabled on a Layer 3 Ethernet interface.
CAUTION: Configuring this feature on a Layer 3 Ethernet interface deletes all physical layer settings (if any) on the interface. Use this command as needed. |
4. Return to system view.
quit
5. Enter virtual Layer 2 Ethernet interface view.
interface virtual-bridge-port interface-number
6. Configure a description for the interface.
description text
By default, the description of an interface is Interface name Interface, for example, Virtual-Bridge-Port3/0/1 Interface.
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 or subinterface affects the fragmentation and reassembly of IP packets on the interface. Typically, you do not need to modify the MTU of an interface.
The mtu size command executed in main interface view takes effect only on the main interface. The mtu size command executed in subinterface view takes effect only on the subinterface.
The mtu size spread command executed in main interface view can modify the MTU for both the main interface and its subinterfaces. However, the MTU separately configured for a subinterface takes priority.
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface or subinterface view.
interface interface-type { interface-number | interface-number.subnumber }
3. Set the MTU.
¡ Separately set the MTU for the Ethernet interface or subinterface.
mtu size
¡ Set the MTU for the main interface and its subinterfaces.
mtu size spread
Subinterfaces do not support this command.
The default setting is 1500 bytes.
Setting the MAC address of an Ethernet interface
About this task
In an active/standby link network, you can configure the same MAC address for access interfaces of the active link and standby link on different devices. Then, when an active/standby link switchover occurs, the packet loss duration is reduced.
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface view.
interface interface-type interface-number
3. Set the MAC address of the Ethernet interface or subinterface.
mac-address mac-address
By default, the MAC address of a Layer 3 Ethernet interface is assigned by the device.
As a best practice, do not set a MAC address in the VRRP-reserved MAC address range for a Layer 3 Ethernet interface.
Changing the interface type
About this task
You can change the interface type between POS and GigabitEthernet.
Only MIC-TCP8L-M cards support this feature.
Restrictions and guidelines
When you change the interface type, the system creates a new-type interface with the same number as the original interface.
Changing a Layer 3 GigabitEthernet interface to a standard POS interface
1. Enter system view.
system-view
2. Enter Layer 3 GigabitEthernet interface view.
interface gigabitethernet interface-number
3. Change the interface to a standard POS interface.
port-type switch pos
CAUTION: After the type of an interface is changed, the system deletes the original interface and creates a new interface that is numbered the same as the original interface. All the other commands are restored to the default on the new interface. |
Changing a standard POS interface to a Layer 3 GigabitEthernet interface
1. Enter system view.
system-view
2. Enter standard POS interface view.
interface pos interface-number
3. Change the interface to a Layer 3 GigabitEthernet interface.
port-type switch gigabitethernet
CAUTION: After the type of an interface is changed, the system deletes the original interface and creates a new interface that is numbered the same as the original interface. All the other commands are restored to the default on the new 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 traffic statistics.
display interface
display counters
The Input and Output fields in the display interface command output display the subinterface traffic statistics.
Display and maintenance commands for an Ethernet interface or subinterface
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 | interface-number.subnumber ] ] [ description ] |
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 ] ] [ description ] |
Display the Ethernet module statistics. |
display ethernet statistics slot slot-number |
Display the SNMP interface index constancy configuration information. |
display ifindex-constant configuration |
Display the interface name-constant interface index mappings. |
display ifindex-constant map [ file filename ] |
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 [ interface-type [ interface-number | interface-number.subnumber ] ] link-info [ down | up ] [ description ] [ main ] [ verbose ] |
Display information about dropped packets on the specified cards. |
display packet-drop slot [ slot-number ] |
Display the physical attributes of an interface. |
display interface [ interface-type [ interface-number ] ] phy-option |
Display information about link flapping protection on an interface. |
display link-flap protection [ interface interface-type [ interface-number ] ] |
Display the link state change statistics of interfaces. |
display link-state-change statistics interface [ interface-type [ interface-number ] |
Display operating status and information of all interfaces except subinterfaces. |
display interface [ interface-type ] [ brief [ description | down ] ] main |
Display information about alarms on the specified card |
display slot-monitor slot slot-number |
Clear interface or subinterface statistics. |
reset counters interface [ interface-type [ interface-number | interface-number.subnumber ] ] |
Clear interface or subinterface statistics on MIB. |
reset counters mib interface [ interface-type [ interface-number | interface-number.subnumber ] ] |
Clear statistics for the specified card and interfaces on it. |
reset counters slot [ slot-number ] |
Clear the Ethernet module statistics. |
reset ethernet statistics [ slot slot-number ] |
Clear the interface name-constant interface index mappings |
reset ifindex-constant map |
Clear the link state change statistics of interfaces. |
reset link-state-change statistics interface [ interface-type [ interface-number ] |