03-Layer 2 Command Reference

HomeSupportReference GuidesCommand ReferencesH3C WX Series Access Controllers Command References(R3308 R2308)-6W10703-Layer 2 Command Reference
07-Layer 2 Forwarding Commands
Title Size Download
07-Layer 2 Forwarding Commands 76.09 KB

Layer 2 forwarding configuration commands

General Layer 2 forwarding configuration commands

display mac-forwarding statistics

Syntax

display mac-forwarding statistics [ interface interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

interface interface-type interface-number: Displays the statistics of a specified interface.

interface-type: Specifies the interface type.

interface-number: Specifies the interface number.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display mac-forwarding statistics to display Layer 2 forwarding statistics.

If no parameter is specified, Layer 2 forwarding statistics for all interfaces is displayed.

Examples

# Display the Layer 2 forwarding statistics for all interfaces.

<Sysname> display mac-forwarding statistics

Total received:  888

Filtered:111      STP discarded:0

Broadcast:0       Multicast:0

Unknown Unicast:0 Invalid Tag:0

 

Total deliver to up:  111

L2 protocol:11  Local MAC address:100

Blackhole dropped:0

 

Total sent:  666

Filtered:0      STP discarded:0

# Display forwarding statistics of GigabitEthernet 1/0/1.

<Sysname> display mac-forwarding statistics interface GigabitEthernet 1/0/1

GigabitEthernet 1/0/1:

Input frames:100    Input bytes:23

Output frames:100   Output bytes:23

Filtered:0          Invalid Tag:0

Table 1 Command output

Field

Description

Total received

Total number of received Ethernet frames.

Filtered

Number of frames filtered out by 802.1Q Tagged VLAN inbound filtering rules.

STP discarded

Number of Ethernet frames dropped on the ingress ports blocked by STP.

Broadcast

Number of received broadcast frames.

Multicast

Number of received multicast frames.

Unknown unicast

Number of received unknown unicast frames.

Invalid Tag

Number of Ethernet frames dropped because of invalid tags.

At present, Ethernet frames with the VLAN ID as 0 or 0xFFF are dropped.

Total deliver to up

Number of Ethernet frames delivered to upper layer protocols.

L2 protocol

Number of Layer 2 protocol frames delivered to the upper layer.

Local MAC address

Number of Ethernet frames with the destination being the MAC addresses of local Layer 3 interfaces.

Blackhole dropped

Number of frames dropped as they are destined to blackhole MAC addresses.

Total sent

Total number of sent Ethernet frames.

Filtered

Number of frames filtered out by the VLAN egress traffic filtering rule.

STP discarded

Number of Ethernet frames dropped on egress ports blocked by STP.

Input frames

Number of received Ethernet frames on the interface.

Output frames

Number of Ethernet frames sent from the interface.

Input bytes

Number of received bytes on the interface.

Output bytes

Number of bytes sent out of the interface.

Filtered

Number of Ethernet frames filtered out because they are from other VLANs.

 

reset mac-forwarding statistics

Syntax

reset mac-forwarding statistics

View

User view

Default level

2: System level

Parameters

None

Description

Use reset mac-forwarding statistics to clear all Layer 2 forwarding statistics.

Examples

# Clear all Layer 2 forwarding statistics.

<Sysname> reset mac-forwarding statistics

Fast Layer 2 forwarding configuration commands

display mac-fast-forwarding cache

Syntax

display mac-fast-forwarding cache { all | { destination-mac mac-address | source-mac mac-address | vlan vlan-id }* } [ verbose ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

all: Displays all fast Layer 2 forwarding entries.

destination-mac mac-address: Displays the fast Layer 2 forwarding entries of the specified destination MAC address.

source-mac mac-address: Displays the fast Layer 2 forwarding entries of the specified source MAC address.

vlan vlan-id: Displays the fast Layer 2 forwarding entries of the specified VLAN. The VLAN ID ranges 1 to 4094.

verbose: Displays detailed information about fast Layer 2 forwarding.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display mac-fast-forwarding cache to display fast Layer 2 forwarding entries.

If the verbose keyword is specified, the detailed information of the specified or all fast Layer 2 forwarding entries is displayed.

Examples

# Display the brief information of all fast Layer 2 forwarding entries.

<Sysname> display mac-fast-forwarding cache all

-----------------------------------------------------------------------

           Fast Forward Cache Table

-----------------------------------------------------------------------

 Number of entries in the table : 2

-----------------------------------------------------------------------

 Source MAC         Destination MAC     VLAN ID

-----------------------------------------------------------------------

 001B-111D-B192     001B-11B4-F729       1

 001B-11B4-F729     001B-111D-B192       1

-----------------------------------------------------------------------

 

# Display the detailed information about all fast Layer 2 forwarding entries.

<Sysname> display mac-fast-forwarding cache all verbose

-----------------------------------------------------------------------

           Fast Forward Cache Table

-----------------------------------------------------------------------

 Destination MAC       : 001B-11B4-F729

 Source MAC            : 001B-111D-B192

 VLAN ID               : 1

 Destination Interface : WLAN-DBSS3:0

 Source Interface      : WLAN-DBSS3:0

 AP IP                 : 192.168.2.2

 AC IP                 : 192.168.2.110

 NextHop IP            : 192.168.2.2

 OutPut Interface      : GigabitEthernet1/0/2

 Cache Context         : 00238917b590000fe264493d08004500000000000000ff110000c0a

8026ec0a802022fbe2fbe0000000008000000000008020000001b11b4f72900238917b590001b111

db1920000aaaa030000000000

-----------------------------------------------------------------------

 Destination MAC       : 001B-111D-B192

 Source MAC            : 001B-11B4-F729

 VLAN ID               : 1

 Destination Interface : WLAN-DBSS3:0

 Source Interface      : WLAN-DBSS3:0

 AP IP                 : 192.168.2.2

 AC IP                 : 192.168.2.110

 NextHop IP            : 192.168.2.2

 OutPut Interface      : GigabitEthernet1/0/2

 Cache Context         : 00238917b590000fe264493d08004500000000000000ff110000c0a

8026ec0a802022fbe2fbe0000000008000000000008020000001b111db19200238917b590001b11b

4f7290000aaaa030000000000

-----------------------------------------------------------------------

 

# Display the brief information of fast Layer 2 forwarding entries of source MAC address 001B-111D-B192.

<Sysname> display mac-fast-forwarding cache source-mac 001B-111D-B192

-----------------------------------------------------------------------

           Fast Forward Cache Table

-----------------------------------------------------------------------

 Number of entries in the table : 1

-----------------------------------------------------------------------

 Source MAC         Destination MAC     VLAN ID

-----------------------------------------------------------------------

 001B-111D-B192     001B-11B4-F729       1

-----------------------------------------------------------------------

 

# Display the detailed information of fast Layer 2 forwarding entries of source MAC address 001B-111D-B192.

<Sysname> display mac-fast-forwarding cache source-mac 001B-111D-B192 verbose

-----------------------------------------------------------------------

           Fast Forward Cache Table

-----------------------------------------------------------------------

 Destination MAC       : 001B-11B4-F729

 Source MAC            : 001B-111D-B192

 VLAN ID               : 1

 Destination Interface : WLAN-DBSS3:0

 Source Interface      : WLAN-DBSS3:0

 AP IP                 : 192.168.2.2

 AC IP                 : 192.168.2.110

 NextHop IP            : 192.168.2.2

 OutPut Interface      : GigabitEthernet1/0/2

 Cache Context         : 00238917b590000fe264493d08004500000000000000ff110000c0a

8026ec0a802022fbe2fbe0000000008000000000008020000001b11b4f72900238917b590001b111

db1920000aaaa030000000000

-----------------------------------------------------------------------

Table 2 Command output

Field

Description

Source MAC

Source MAC address of a forwarding entry.

Destination MAC

Destination MAC address of a forwarding entry.

VLAN ID

VLAN to which the forwarded packet belongs.

AP IP

IP address of the AP to which the client associates. This field displays "N/A" on a wired client side.

AC IP

IP address of the AC to which the client associates. This field displays "N/A" on a wired client side.

NextHop IP

IP address of the next hop.

OutPut Interface

Physical outgoing interface.

Cache Context

Fast forwarding information.

 

mac-fast-forwarding

Syntax

mac-fast-forwarding

undo mac-fast-forwarding

View

System view

Default level

2: System level

Parameters

None

Description

Use mac-fast-forwarding to enable fast Layer 2 forwarding.

Use undo mac-fast-forwarding to disable fast Layer 2 forwarding.

By default, fast Layer 2 forwarding is enabled.

Examples

# Enable fast Layer 2 forwarding.

<Sysname> system-view

[Sysname] mac-fast-forwarding

reset mac-fast-forwarding cache

Syntax

reset mac-fast-forwarding cache { all | { destination-mac mac-address | source-mac mac-address | vlan vlan-id }* }

View

User view

Default level

2: System level

Parameters

all: Clears all fast Layer 2 forwarding entries.

destination-mac mac-address: Clears the fast Layer 2 forwarding entries of the specified destination MAC address.

source-mac mac-address: Clears the fast Layer 2 forwarding entries of the specified source MAC address.

vlan vlan-id: Clears the fast Layer 2 forwarding entries of the specified VLAN. The VLAN ID ranges 1 to 4094.

Description

Use reset mac-fast-forwarding cache to clear fast Layer 2 forwarding entries.

Examples

# Clear all fast Layer 2 forwarding entries.

<Sysname> reset mac-fast-forwarding cache all

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网