- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
05-Layer 2 forwarding commands | 51.54 KB |
Normal Layer 2 forwarding commands
display mac-forwarding statistics
reset mac-forwarding statistics
Fast Layer 2 forwarding commands
display mac-forwarding cache ip
display mac-forwarding cache ip fragment
display mac-forwarding cache ipv6
Layer 2 forwarding commands
Normal Layer 2 forwarding commands
display mac-forwarding statistics
Use display mac-forwarding statistics to display Layer 2 forwarding statistics.
Syntax
display mac-forwarding statistics [ interface interface-type interface-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface interface-type interface-number: Specifies an interface by its type and number. If you do not specify this option, the command displays Layer 2 forwarding statistics on all interfaces.
Examples
# Display Layer 2 forwarding statistics on all interfaces.
<Sysname> display mac-forwarding statistics
Input:
Sum: 888 Unknown Unicast: 0
Broadcast: 0 Multicast: 0
Filtered: 0 STP discarded: 0
Service dropped: 0 Source dropped: 0
Unknown dropped: 0 Learning dropped: 0
Blackhole dropped: 0 Suppress dropped: 0
Source MAC dropped:0
Deliver:
Sum: 111 L2 protocol: 11
Local MAC address: 100
Output:
Sum: 666 Filtered: 0
Blackhole dropped: 0 STP discarded: 0
Service dropped: 0 Dest MAC dropped: 0
# Display Layer 2 forwarding statistics on GigabitEthernet 1/0.
<Sysname> display mac-forwarding statistics interface gigabitethernet 1/0
GigabitEthernet1/0:
Input frames: 100 Output frames:100
Filtered: 0
Table 1 Command output
Field |
Description |
Input |
Inbound Ethernet frame statistics. · Sum—Total number of received Ethernet frames. · Filtered—Number of Ethernet frames filtered out by 802.1Q VLAN inbound filtering rules. · STP discarded—Number of inbound Ethernet frames dropped on the ports blocked by STP. · Service dropped—Number of Ethernet frames dropped by inbound service features. · Source dropped—Number of Ethernet frames dropped because their source MAC addresses are all-zeros, multicast, or broadcast MAC addresses. · Unknown dropped—Number of Ethernet frames dropped because the device is disabled from forwarding frames with unknown source MAC addresses. · Learning dropped—Number of Ethernet frames dropped because the device is disabled from forwarding unknown frames after the number of learned MAC addresses reaches the upper limit. · Suppress dropped—Number of Ethernet frames dropped by storm suppression. · Broadcast—Number of received broadcast Ethernet frames. · Multicast—Number of received multicast Ethernet frames. · Unknown unicast—Number of received unknown unicast Ethernet frames. · Blackhole dropped—Number of Ethernet frames dropped because they are sourced from blackhole MAC addresses. · Source MAC dropped—Number of Ethernet frames dropped by features based on the source MAC addresses. |
Deliver |
Statistics of Ethernet frames delivered to the CPU. · Sum—Total number of Ethernet frames delivered to the CPU. · L2 protocol—Number of Layer 2 protocol Ethernet frames delivered to the CPU. · Local MAC address—Number of Ethernet frames that use the MAC addresses of local Layer 3 VLAN interfaces as the destination MAC addresses. |
Output |
Outbound Ethernet frame statistics. · Sum—Total number of sent Ethernet frames. · Filtered—Number of Ethernet frames filtered out by 802.1Q VLAN outbound filtering rules. · Blackhole dropped—Number of Ethernet frames dropped because they are destined for blackhole MAC addresses. · STP discarded—Number of outbound Ethernet frames dropped on the ports blocked by STP. · Service dropped—Number of Ethernet frames dropped by outbound service features. · Dest MAC dropped—Number of Ethernet frames dropped by features based on the destination MAC addresses. |
GigabitEthernet1/0 |
Layer 2 forwarding statistics on GigabitEthernet 1/0: · Input frames—Number of Ethernet frames received on the interface. · Output frames—Number of Ethernet frames sent out of the interface. · Filtered—Number of Ethernet frames filtered out because they are from other VLANs. |
reset mac-forwarding statistics
Use reset mac-forwarding statistics to clear Layer 2 forwarding statistics.
Syntax
reset mac-forwarding statistics
Views
User view
Predefined user roles
network-admin
network-operator
Examples
# Clear Layer 2 forwarding statistics.
<Sysname> reset mac-forwarding statistics
Fast Layer 2 forwarding commands
display mac-forwarding cache ip
Use display mac-forwarding cache ip to display IPv4 fast forwarding entries.
Syntax
In standalone mode:
display mac-forwarding cache ip [ ip-address ]
In IRF mode:
display mac-forwarding cache ip [ ip-address ] [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
ip-address: Specifies an IPv4 address. If you do not specify an IPv4 address, this command displays all IPv4 fast forwarding entries.
slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays IPv4 fast forwarding entries for all member devices. (In IRF mode.)
Examples
# Display all IPv4 fast forwarding entries.
<Sysname> display mac-forwarding cache ip
Total number of mac-forwarding entries: 2
SIP SPort DIP DPort Pro Input_If Output_If VLAN
1.1.1.2 99 1.1.1.1 2048 1 GE1/0 GE2/0 2
1.1.1.1 98 1.1.1.2 2012 1 GE2/0 GE1/0 2
Table 2 Command output
Description |
|
Total number of mac-forwarding entries |
Total number of IPv4 fast forwarding entries. |
SIP |
Source IPv4 address. |
SPort |
Source port number. |
DIP |
Destination IPv4 address. |
DPort |
Destination port number. |
Pro |
Protocol number. |
Input_If |
Input interface type and number. If no input interface is involved in fast forwarding, this field displays N/A. If no input interface is available, this field displays a hyphen (-). |
Output_If |
Output interface type and number. If no output interface is involved in fast forwarding, this field displays N/A. If no output interface is available, this field displays a hyphen (-). |
VLAN |
VLAN ID. |
display mac-forwarding cache ip fragment
Use display mac-forwarding cache ip fragment to display IPv4 fast forwarding entries for fragments.
Syntax
In standalone mode:
display mac-forwarding cache ip fragment [ ip-address ]
In IRF mode:
display mac-forwarding cache ip fragment [ ip-address ] [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
ip-address: Specifies an IPv4 address. If you do not specify an IPv4 address, this command displays IPv4 fast forwarding entries for all fragments.
slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays IPv4 fast forwarding entries for fragments on all member devices. (In IRF mode.)
Examples
# Display IPv4 fast forwarding entries for all fragments.
<Sysname> display mac-forwarding cache ip fragment
Total number of fragment mac-forwarding entries: 2
SIP SPort DIP DPort Pro Input_If ID VLAN
1.1.1.1 117 1.1.1.2 0 1 GE1/0 2828 1
1.1.1.2 110 1.1.1.1 67 17 GE2/0 2322 1
Table 3 Command output
Field |
Description |
Total number of fragment mac-forwarding entries |
Total number of IPv4 fast forwarding entries for fragments. |
SIP |
Source IPv4 address. |
SPort |
Source port number. |
DIP |
Destination IPv4 address. |
DPort |
Destination port number. |
Pro |
Protocol number. |
Input_If |
Input interface type and number. If no input interface is involved in fast forwarding, this field displays N/A. If no input interface is available, this field displays a hyphen (-). |
ID |
Fragment ID. |
VLAN |
VLAN ID. |
display mac-forwarding cache ipv6
Use display mac-forwarding cache ipv6 to display IPv6 fast forwarding entries.
Syntax
In standalone mode:
display mac-forwarding cache ipv6 [ ipv6-address ]
In IRF mode:
display mac-forwarding cache ipv6 [ ipv6-address ] [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
ipv6-address: Specifies an IPv6 address. If you do not specify an IPv6 address, this command displays all IPv6 fast forwarding entries.
slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays IPv6 fast forwarding entries for all member devices. (In IRF mode.)
Examples
# Display all IPv6 fast forwarding entries.
<Sysname> display mac-forwarding cache ipv6
Total number of IPv6 mac-forwarding items: 1
Src IP: 2002::1 Src port: 129
Dst IP: 2001::1 Dst port: 65535
VLAN ID: 2
Protocol: 2
Input interface: GE2/0
Output interface: GE1/0
Table 4 Command output
Field |
Description |
Total number of IPv6 mac-forwarding items |
Total number of IPv6 fast forwarding entries. |
Src IP |
Source IPv6 address. |
Src port |
Source port number. |
Dst IP |
Destination IPv6 address. |
Dst Port |
Destination port number. |
Protocol |
Protocol number. |
Input interface |
Input interface type and number. If no input interface is involved in fast forwarding, this field displays N/A. If no input interface is available, this field displays a hyphen (-). |
Output interface |
Output interface type and number. If no output interface is involved in fast forwarding, this field displays N/A. If no output interface is available, this field displays a hyphen (-). |