- Table of Contents
-
- 03-Layer 2 Configuration Guide
- 00-Preface
- 01-Ethernet Interface Configuration
- 02-Loopback and Null Interface Configuration
- 03-VLAN Configuration
- 04-MAC Address Table Configuration
- 05-Ethernet Link Aggregation Configuration
- 06-Spanning Tree Configuration
- 07-Layer 2 Forwarding Configuration
- 08-PPPoE Configuration
- 09-FPGA Fast Forwarding Configuration
- 10-QinQ Termination Configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
07-Layer 2 Forwarding Configuration | 43.78 KB |
Configuring Layer 2 forwarding
Configuring normal Layer 2 forwarding
Setting the TCP maximum segment size
Displaying and maintaining normal Layer 2 forwarding
Configuring fast Layer 2 forwarding
Displaying and maintaining fast Layer 2 forwarding
Configuring Layer 2 forwarding
Layer 2 forwarding falls into the following categories:
· Normal
· Fast
Configuring normal Layer 2 forwarding
If the destination MAC address of an incoming packet matches the MAC address of the receiving Layer 3 interface, the device forwards the packet through that interface. If not, the device performs normal Layer 2 forwarding through a Layer 2 interface. The device looks up the MAC address table according to the destination MAC address of the incoming packet, obtains the outgoing interface, and then forwards the packet through the interface.
Normal Layer 2 forwarding is enabled by default. You can only set the TCP maximum segment size for normal Layer 2 forwarding.
Setting the TCP maximum segment size
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Set the TCP maximum segment size. |
mac-forwarding tcp mss value |
By default, the TCP maximum segment size on an AC is 1392 bytes. |
Displaying and maintaining normal Layer 2 forwarding
Task |
Command |
Remarks |
Display normal and inline Layer 2 forwarding statistics. |
display mac-forwarding statistics [ interface interface-type interface-number ] [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Clear all normal and inline Layer 2 forwarding statistics. |
reset mac-forwarding statistics |
Available in user view. |
Configuring fast Layer 2 forwarding
Fast Layer 2 forwarding uses caches to process packets. Based on data flows, fast Layer 2 forwarding can greatly improve forwarding efficiency. In fast Layer 2 forwarding, a data flow is described by source MAC address, destination MAC address, and VLAN ID. After a packet of a data flow is forwarded, its forwarding information is stored as a fast forwarding entry in the cache. The device forwards subsequent packets by searching the fast forwarding table, which is faster and more efficient than looking it up again in the MAC address table.
Configuration procedure
To configure fast Layer 2 forwarding:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enable fast Layer 2 forwarding. |
mac-fast-forwarding |
Optional. Enabled by default. |
3. Set the TCP maximum segment size. |
mac-forwarding tcp mss value |
By default, the TCP maximum segment size on an AC is 1392 bytes. |
Displaying and maintaining fast Layer 2 forwarding
Task |
Command |
Remarks |
Display fast Layer 2 forwarding information. |
display mac-fast-forwarding cache { all | { destination-mac mac-address | source-mac mac-address | vlan vlan-id }* } [ verbose ] [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Clear fast Layer 2 forwarding entries. |
reset mac-fast-forwarding cache { all | { destination-mac mac-address | source-mac mac-address | vlan vlan-id }* } |
Available in user view. |