Vous êtes sur la page 1sur 691

Quidway NetEngine80E/40E Core Router V300R003

Configuration Guide - LAN Access and MAN Access

Issue Date Part Number

03 2008-09-22 00399146

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Huawei Technologies Co., Ltd. provides customers with comprehensive technical support and service. For any assistance, please contact our local office or company headquarters.

Huawei Technologies Co., Ltd.


Address: Huawei Industrial Base Bantian, Longgang Shenzhen 518129 People's Republic of China http://www.huawei.com support@huawei.com

Website: Email:

Copyright Huawei Technologies Co., Ltd. 2008. All rights reserved. No part of this document may be reproduced or transmitted in any form or by any means without prior written consent of Huawei Technologies Co., Ltd.

Trademarks and Permissions


and other Huawei trademarks are the property of Huawei Technologies Co., Ltd. All other trademarks and trade names mentioned in this document are the property of their respective holders.

Notice
The information in this document is subject to change without notice. Every effort has been made in the preparation of this document to ensure accuracy of the contents, but the statements, information, and recommendations in this document do not constitute a warranty of any kind, express or implied.

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Contents

Contents
About This Document.....................................................................................................................1 1 MAC Address Table Configuration.......................................................................................1-1
1.1 Introduction.....................................................................................................................................................1-2 1.1.1 MAC Address Table Overview..............................................................................................................1-2 1.1.2 MAC Features Supported by the NE80E/40E........................................................................................1-2 1.2 Configuring the MAC Address Table Based on the VLAN and Layer 2 Interface........................................1-2 1.2.1 Establishing the Configuration Task......................................................................................................1-3 1.2.2 Configuring MAC Address Entries........................................................................................................1-3 1.2.3 Configuring MAC Address Entries Based on the Layer 2 VE Interface...............................................1-4 1.2.4 Checking the Configuration...................................................................................................................1-5 1.3 Configuring the MAC Address Table Based on the VSI and Layer 3 Interface.............................................1-6 1.3.1 Establishing the Configuration Task......................................................................................................1-6 1.3.2 Configuring MAC Address Entries........................................................................................................1-7 1.3.3 Configuring MAC Address Entries Based on the VLANIF Interface...................................................1-8 1.3.4 Configuring MAC Address Entries Based on the Layer 3 VE Interface...............................................1-9 1.3.5 Checking the Configuration...................................................................................................................1-9 1.4 Setting the Aging Time of a MAC Address Table........................................................................................1-10 1.4.1 Establishing the Configuration Task....................................................................................................1-10 1.4.2 Setting the Aging Time of a MAC Address Table...............................................................................1-11 1.4.3 Checking the Configuration.................................................................................................................1-11 1.5 Configuration Examples................................................................................................................................1-12 1.5.1 Example for Configuring the MAC Address Table Based on the Interface and VLAN......................1-12 1.5.2 Example for Configuring the MAC Address Table Based on the dot1q Termination Sub-interface and VSI................................................................................................................................................................1-14 1.5.3 Example for Configuring the MAC Address Table Based on the QinQ Termination Sub-interface and VSI................................................................................................................................................................1-16 1.5.4 Example for Configuring the MAC Address Table Based on the VLANIF Interface and VSI...........1-18 1.5.5 Example for Configuring the MAC Address Table Based on the VLAN and Layer 2 VE Interface..1-20 1.5.6 Example for Configuring the MAC Address Table Based on the VSI and Layer 3 VE Interface.......1-22 1.6 Troubleshooting............................................................................................................................................1-24

2 Ethernet Interface Configuration............................................................................................2-1


2.1 Introduction.....................................................................................................................................................2-2 2.1.1 Introduction to Ethernet Interfaces.........................................................................................................2-2 Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. i

Contents

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access 2.1.2 Features of Ethernet Interfaces Supported by the NE80E/40E..............................................................2-2

2.2 Configuring Ethernet Interfaces of the LPU...................................................................................................2-5 2.2.1 Establishing the Configuration Task......................................................................................................2-6 2.2.2 Assigning an IP Address to an Ethernet Interface..................................................................................2-6 2.2.3 Configuring the MTU of an Ethernet Interface......................................................................................2-7 2.2.4 Configuring the Working Mode of an Ethernet Interface......................................................................2-8 2.2.5 Configuring the Speed of an Ethernet Electrical Interface.....................................................................2-9 2.2.6 Configuring the GE/FE Optical/Electrical Interface............................................................................2-10 2.2.7 Creating Ethernet Sub-Interfaces.........................................................................................................2-10 2.2.8 Configuring Overhead Bytes of the 10GE WAN Interface.................................................................2-11 2.2.9 Configuring Flow Control on the GE Interface...................................................................................2-11 2.2.10 Switching the Working Mode of an Ethernet Interface.....................................................................2-12 2.2.11 Checking the Configuration...............................................................................................................2-13 2.3 Configuring Ethernet Interfaces of the SRU.................................................................................................2-14 2.3.1 Establishing the Configuration Task....................................................................................................2-14 2.3.2 Assigning an IP Address to an Ethernet Interface................................................................................2-14 2.3.3 Configuring the Working Mode of an Ethernet Electrical Interface....................................................2-15 2.3.4 Configuring the Speed of an Ethernet Electrical Interface...................................................................2-16 2.3.5 Configuring the Promiscuity Mode......................................................................................................2-16 2.4 Configuring Ethernet Interface Layer 2 Parameters......................................................................................2-17 2.4.1 Establishing the Configuration Task....................................................................................................2-17 2.4.2 Configuring Link Layer Type of an Ethernet Interface.......................................................................2-17 2.4.3 Configuring the 802.1p Priority of an Ethernet Interface....................................................................2-18 2.5 Configuring SmartLink Flush Function........................................................................................................2-19 2.5.1 Establishing Application Environment of Configuration Task............................................................2-19 2.5.2 Enabling a Port to Process SmartLink Flush Packets..........................................................................2-20 2.6 Maintaining Ethernet Interfaces....................................................................................................................2-20 2.6.1 Debugging Ethernet Interfaces.............................................................................................................2-20 2.7 Configuration Examples................................................................................................................................2-21 2.7.1 Example for Configuring a Layer 3 Ethernet Interface........................................................................2-21 2.7.2 Example for Configuring a Layer 2 Ethernet Interface to Join a VLAN.............................................2-23 2.7.3 Example for Configuring VLANs to Communicate Through Ethernet Sub-interfaces.......................2-24 2.7.4 Example for Configuring Equipment to Handle Smartlink Flush Packets..........................................2-24 2.8 Troubleshooting............................................................................................................................................2-27 2.8.1 Pinging the Ethernet Interface Fails.....................................................................................................2-27 2.8.2 Ethernet Interfaces Cannot Receive and Send Packets Normally........................................................2-28 2.8.3 Ethernet Interfaces Discard Packets Severely......................................................................................2-28

3 LACP Configuration..................................................................................................................3-1
3.1 Introduction.....................................................................................................................................................3-2 3.1.1 Introduction to the Eth-Trunk Interface and LACP...............................................................................3-2 3.1.2 Eth-Trunk Interface and LACP Features Supported by the NE80E/40E...............................................3-3 3.2 Creating an Eth-Trunk Interface......................................................................................................................3-6 ii Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Contents

3.2.1 Establishing the Configuration Task......................................................................................................3-6 3.2.2 Creating an Eth-Trunk............................................................................................................................3-7 3.2.3 Adding an Ethernet Interface into an Eth-Trunk....................................................................................3-7 3.2.4 Checking the Configuration...................................................................................................................3-8 3.3 Configuring Layer 2 Attributes for an Eth-Trunk Interface............................................................................3-9 3.3.1 Establishing the Configuration Task......................................................................................................3-9 3.3.2 Configuring Working Mode of an Eth-Trunk Interface.......................................................................3-10 3.3.3 (Optional) Configuring the Lower Threshold of Up Links..................................................................3-10 3.3.4 (Optional) Configuring the Upper Threshold of Up Links..................................................................3-11 3.3.5 (Optional) Configuring an Eth-Trunk Interface to Carry out Load Balancing....................................3-12 3.3.6 (Optional) Configuring the Method of Sending Traps on Eth-Trunk Member Interfaces...................3-12 3.3.7 Checking the Configuration.................................................................................................................3-13 3.4 Configuring Layer 3 Attributes for an Eth-Trunk Interface..........................................................................3-14 3.4.1 Establishing the Configuration Task....................................................................................................3-14 3.4.2 Configuring an IP address for an Eth-Trunk Interface.........................................................................3-15 3.4.3 (Optional) Configuring a MAC Address for the Eth-Trunk Interface.................................................3-15 3.4.4 (Optional) Configuring the Lower Threshold of Up Links..................................................................3-16 3.4.5 (Optional) Configuring Load-balancing Mode for the Eth-Trunk Interface........................................3-16 3.4.6 (Optional) Configuring Weights for Member Links............................................................................3-17 3.4.7 (Optional) Configuring the Method of Sending Traps on Eth-Trunk Member Interfaces...................3-17 3.4.8 Checking the Configuration.................................................................................................................3-18 3.5 Configuring an Eth-Trunk Sub-interface......................................................................................................3-19 3.5.1 Establishing the Configuration Task....................................................................................................3-20 3.5.2 Creating an Eth-Trunk Sub-interface...................................................................................................3-20 3.5.3 Configuring an IP address for an Eth-Trunk Sub-interface.................................................................3-21 3.5.4 (Optical) Configuring the MTU for an Eth-Trunk Sub-interface.........................................................3-22 3.5.5 Configuring the Encapsulation Type for an Eth-Trunk Sub-interface.................................................3-22 3.5.6 OptionalConfiguring the Rate for Sending Gratuitous ARP Packets on an Eth-Trunk Sub-interface .......................................................................................................................................................................3-23 3.5.7 Checking the Configuration.................................................................................................................3-24 3.6 Configuring Link Aggregation in Manual Load Balancing Mode................................................................3-24 3.6.1 Establishing the Configuration Task....................................................................................................3-25 3.6.2 Configuring the Operation Mode of the Eth-Trunk as the Manual Load Balancing Mode.................3-25 3.6.3 Adding Member Interfaces to the Eth-Trunk.......................................................................................3-26 3.6.4 (Optional) Configuring the Manual Load Balancing Mode.................................................................3-27 3.6.5 Checking the Configuration.................................................................................................................3-27 3.7 Configuring Link Aggregation in 1:1 Active/Standby Mode.......................................................................3-28 3.7.1 Establishing the Configuration Task....................................................................................................3-28 3.7.2 Configuring the Operation Mode of the Eth-Trunk as 1:1 Active/Standby Mode...............................3-29 3.7.3 Adding Member Interfaces to the Eth-Trunk and Setting the Primary Interface.................................3-30 3.7.4 Enabling an LAG to Send Flush Packets.............................................................................................3-31 3.7.5 Creating a Control VLAN....................................................................................................................3-32 3.7.6 Enabling an Interface to Receive Packets from the Control VLAN....................................................3-32 Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. iii

Contents

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access 3.7.7 Enabling an Interface to Receive Flush Packets..................................................................................3-33 3.7.8 Checking the Configuration.................................................................................................................3-33

3.8 Configuring Link Aggregation in Static LACP Mode..................................................................................3-34 3.8.1 Establishing the Configuration Task....................................................................................................3-34 3.8.2 Configuring the Operation Mode of the Eth-Trunk as the Static LACP Mode...................................3-35 3.8.3 Adding Member Interfaces to the Eth-Trunk.......................................................................................3-36 3.8.4 (Optional) Setting the LACP Priority of the System............................................................................3-36 3.8.5 (Optional) Setting the Upper Threshold for the Number of Active Interfaces....................................3-37 3.8.6 (Optional) Setting the Lower Threshold for the Number of Active Interfaces....................................3-37 3.8.7 (Optional) Setting the LACP Priority of the Interface.........................................................................3-38 3.8.8 (Optional) Enabling LACP Preemption and Setting the Delay for LACP Preemption.......................3-39 3.8.9 (Optional) Setting the Timeout Period for Receiving LACP Protocol Packets...................................3-39 3.8.10 (Optional) Configuring the Load Balancing Mode............................................................................3-40 3.8.11 (Optional) Configuring the SNMP Alarm..........................................................................................3-41 3.8.12 Checking the Configuration...............................................................................................................3-41 3.9 Maintaining Eth-Trunk Interface...................................................................................................................3-42 3.9.1 Clearing the Statistics of Eth-Trunk Interface......................................................................................3-42 3.9.2 Debugging............................................................................................................................................3-43 3.10 Configuration Examples..............................................................................................................................3-44 3.10.1 Example for Configuring a Layer 2 Eth-Trunk Interface to Allow VLANs to Pass Through...........3-44 3.10.2 Example for Configuring a Layer 3 Eth-Trunk Interface...................................................................3-46 3.10.3 Example for Configuring VLANs to Communicate Through Eth-Trunk Sub-interfaces..................3-49 3.10.4 Example for Configuring Link Aggregation in Manual Load Balancing Mode................................3-53 3.10.5 Example for Configuring Link Aggregation in 1:1 Active/Standby Mode........................................3-55 3.10.6 Example for Configuring Link Aggregation in Static LACP Mode..................................................3-60

4 VLAN Configuration.................................................................................................................4-1
4.1 Introduction.....................................................................................................................................................4-3 4.1.1 VLAN Overview....................................................................................................................................4-3 4.1.2 VLAN Features Supported by the NE80E/40E......................................................................................4-4 4.2 Configuring a VLAN Based on Layer 2 Interface..........................................................................................4-9 4.2.1 Establishing the Configuration Task......................................................................................................4-9 4.2.2 Creating a VLAN.................................................................................................................................4-10 4.2.3 Configuring the Attributes of the Switched Ethernet Interface............................................................4-10 4.2.4 Adding the Switched Ethernet Interface into the VLAN.....................................................................4-11 4.2.5 (Optional) Disabling MAC Address Learning on a VLAN.................................................................4-12 4.2.6 (Optional) Disabling an Interface from Broadcasting Packets to Other Interfaces in a VLAN...........4-13 4.2.7 Checking the Configuration.................................................................................................................4-13 4.3 Configuring VLANIF Interfaces to Support Communication Between VLANs..........................................4-14 4.3.1 Establishing the Configuration Task....................................................................................................4-14 4.3.2 Configuring an IP address for a VLANIF Interface.............................................................................4-14 4.3.3 Checking the Configuration.................................................................................................................4-15 4.4 Configuring Sub-interfaces to Support Communication Between VLANs..................................................4-15 iv Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Contents

4.4.1 Establishing the Configuration Task....................................................................................................4-16 4.4.2 Configuring the VLAN Associated with Sub-interfaces......................................................................4-16 4.4.3 Configuring an IP Address for the Sub-interface.................................................................................4-17 4.4.4 Checking the Configuration.................................................................................................................4-18 4.5 Configuring VLAN Trunk............................................................................................................................4-18 4.5.1 Establishing the Configuration Task....................................................................................................4-18 4.5.2 Specifying the VLANs Supported by a Trunk Interface......................................................................4-20 4.5.3 Specifying the VLANs Supported by a Hybrid Interface....................................................................4-20 4.5.4 Checking the Configuration.................................................................................................................4-21 4.6 Configuring VLAN Aggregation..................................................................................................................4-22 4.6.1 Establishing the Configuration Task....................................................................................................4-22 4.6.2 Configuring Sub-VLANs.....................................................................................................................4-23 4.6.3 Creating a Super-VLAN.......................................................................................................................4-23 4.6.4 Configuring an IP Address for the VLANIF Interface.........................................................................4-24 4.6.5 (Optional) Configuring the Proxy ARP for the Super-VLAN.............................................................4-25 4.6.6 Checking the Configuration.................................................................................................................4-25 4.7 Configuring VLAN Mapping........................................................................................................................4-26 4.7.1 Establishing the Configuration Task....................................................................................................4-26 4.7.2 Configuring Port Type.........................................................................................................................4-27 4.7.3 Configuring the Allowed VLAN on the Port.......................................................................................4-28 4.7.4 Configuring Replacement of Outer VLAN Tag...................................................................................4-28 4.7.5 Checking the Configuration.................................................................................................................4-29 4.8 Configuring VLAN Damping.......................................................................................................................4-29 4.8.1 Establishing the Configuration Task....................................................................................................4-29 4.8.2 Configuring VLAN Damping..............................................................................................................4-30 4.8.3 Checking the Configuration.................................................................................................................4-30 4.9 Configuring Interface Isolation in a VLAN..................................................................................................4-31 4.9.1 Establishing the Configuration Task....................................................................................................4-31 4.9.2 Configuring Interface Isolation in a VLAN.........................................................................................4-32 4.9.3 Enabling ARP Proxy in a VLAN.........................................................................................................4-33 4.10 Configuring the Isolation Based on Interface Groups in a VLAN..............................................................4-33 4.10.1 Establishing the Configuration Task..................................................................................................4-33 4.10.2 Adding an Interface to the Group to Be Isolated................................................................................4-34 4.10.3 Checking the Configuration...............................................................................................................4-34 4.11 Maintaining VLAN.....................................................................................................................................4-35 4.11.1 Clearing the Statistics of VLAN Packets...........................................................................................4-35 4.12 Configuration Examples..............................................................................................................................4-36 4.12.1 Example for Configuring a VLAN Based on Layer 2 Interface........................................................4-36 4.12.2 Example for Configuring VLANs to Communicate Through VLANIF Interfaces...........................4-37 4.12.3 Example for Configuring VLANs to Communicate Through Sub-interfaces...................................4-40 4.12.4 Example for Configuring VLAN and Non-VLAN to Communicate Through Sub-interfaces..........4-42 4.12.5 Example for Configuring VLAN Trunks...........................................................................................4-44 Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. v

Contents

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access 4.12.6 Example for Configuring VLAN Aggregation..................................................................................4-48 4.12.7 Example for Configuring VLAN Mapping........................................................................................4-51 4.12.8 Example for Configuring VLAN Damping.......................................................................................4-55 4.12.9 Example for Configuring Interface Isolation in a VLAN..................................................................4-56 4.12.10 Example for Configuring the Isolation Based on Interface Groups in a VLAN..............................4-58

5 QinQ Configuration..................................................................................................................5-1
5.1 QinQ Overview...............................................................................................................................................5-3 5.1.1 Introduction to QinQ..............................................................................................................................5-3 5.1.2 QinQ Features Supported by the NE80E/40E........................................................................................5-4 5.2 Configuring the QinQ Tunnel Function........................................................................................................5-19 5.2.1 Establishing the Configuration Task....................................................................................................5-19 5.2.2 Creating the Outer VLAN Tag for a Layer 2 Interface........................................................................5-19 5.2.3 Configuring QinQ for a Layer 2 Interface............................................................................................5-20 5.2.4 (Optional) Configuring the Protocol Type for the Outer Tag..............................................................5-20 5.2.5 Checking the Configuration.................................................................................................................5-21 5.3 Configuring Selective QinQ on a Layer 2 Interface......................................................................................5-22 5.3.1 Establishing the Configuration Task....................................................................................................5-22 5.3.2 Creating the Outer VLAN Tag for a QinQ Interface...........................................................................5-22 5.3.3 Configuring Selective QinQ on a Layer 2 Interface.............................................................................5-23 5.3.4 (Optional) Configuring the Protocol Type for the Outer Tag..............................................................5-23 5.3.5 Checking the Configuration.................................................................................................................5-24 5.4 Configuring the Sub-interface for VLAN Tag Termination to Support Proxy ARP....................................5-25 5.4.1 Establishing the Configuration Task....................................................................................................5-25 5.4.2 Configuring the Interface Mode as the User-Termination Mode.........................................................5-26 5.4.3 Configuring the Sub-interface for dot1q VLAN Tag Termination to Support Proxy ARP.................5-26 5.4.4 Configuring the Sub-interface for QinQ VLAN Tag Termination to Support Proxy ARP.................5-27 5.4.5 Checking the Configuration.................................................................................................................5-28 5.5 Configuring the Sub-interface for VLAN Tag Termination to Support VRRP............................................5-29 5.5.1 Establishing the Configuration Task....................................................................................................5-29 5.5.2 Configuring the Interface Mode as the User Termination Mode.........................................................5-30 5.5.3 Configuring the Sub-interface for dot1q VLAN Tag Termination to Support VRRP.........................5-30 5.5.4 Configuring the Sub-interface for QinQ VLAN Tag Termination to Support VRRP.........................5-31 5.5.5 Configuring VRRP...............................................................................................................................5-32 5.5.6 Checking the Configuration.................................................................................................................5-32 5.6 Configuring the Sub-interface for VLAN Tag Termination to Access an L3VPN.......................................5-33 5.6.1 Establishing the Configuration Task....................................................................................................5-33 5.6.2 Configuring the Interface Mode as the User Termination Mode.........................................................5-34 5.6.3 Configuring the Sub-interface for dot1q VLAN Tag Termination to Access an L3VPN...................5-35 5.6.4 Configuring the Sub-interface for QinQ VLAN Tag Termination to Access an L3VPN....................5-35 5.6.5 Configuring L3VPN.............................................................................................................................5-36 5.6.6 Checking the Configuration.................................................................................................................5-36 5.7 Configuring the Sub-interface for VLAN Tag Termination to Access an L2VPN.......................................5-38 vi Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Contents

5.7.1 Establishing the Configuration Task....................................................................................................5-38 5.7.2 Configuring the Interface Mode as the User Termination Mode.........................................................5-39 5.7.3 Configuring the Sub-interface for QinQ VLAN Tag Termination to Access an L2VPN....................5-39 5.7.4 Configuring L2VPN.............................................................................................................................5-40 5.7.5 Checking the Configuration.................................................................................................................5-41 5.8 Configuring the Sub-interface for VLAN Tag Termination to Access a VPLS...........................................5-44 5.8.1 Establishing the Configuration Task....................................................................................................5-44 5.8.2 Configuring the Interface Mode as the User Termination Mode.........................................................5-45 5.8.3 Configuring the Sub-interface for dot1q VLAN Tag Termination to Access a VPLS........................5-45 5.8.4 Configuring the Sub-interface for QinQ VLAN Tag Termination to Access a VPLS........................5-46 5.8.5 Configuring VPLS................................................................................................................................5-47 5.8.6 Checking the Configuration.................................................................................................................5-47 5.9 Configuring the Sub-interface for VLAN Stacking to Access an L2VPN....................................................5-48 5.9.1 Establishing the Configuration Task....................................................................................................5-49 5.9.2 Configuring the Interface Mode as the User Termination Mode.........................................................5-49 5.9.3 Configuring the Ethernet Sub-interface for VLAN Stacking...............................................................5-50 5.9.4 Configuring L2VPN.............................................................................................................................5-50 5.9.5 Checking the Configuration.................................................................................................................5-51 5.10 Configuring the Sub-interface for VLAN Stacking to Access a VPLS......................................................5-54 5.10.1 Establishing the Configuration Task..................................................................................................5-54 5.10.2 Configuring the Interface Mode as the User Termination Mode.......................................................5-55 5.10.3 Configuring the Ethernet Sub-interface for VLAN Stacking.............................................................5-55 5.10.4 Configuring VPLS..............................................................................................................................5-56 5.10.5 Checking the Configuration...............................................................................................................5-56 5.11 Configuring the Sub-interface for QinQ VLAN Tag Termination to Support URPF.................................5-57 5.11.1 Establishing the Configuration Task..................................................................................................5-57 5.11.2 Configuring the Ethernet Interface of the PE.....................................................................................5-58 5.11.3 Configuring the Ethernet Sub-interface of the PE..............................................................................5-58 5.11.4 Configuring URPF on the Sub-interface for QinQ VLAN Tag Termination....................................5-59 5.11.5 Checking the Configuration...............................................................................................................5-59 5.12 Maintaining QinQ.......................................................................................................................................5-60 5.12.1 Clearing QinQ Statistics.....................................................................................................................5-60 5.12.2 Monitoring the Operating Status of the Termination Sub-interface...................................................5-60 5.12.3 Debugging QinQ................................................................................................................................5-61 5.13 Configuration Examples..............................................................................................................................5-61 5.13.1 Example for Configuring the QinQ Tunnel.......................................................................................5-62 5.13.2 Example for Configuring Selective QinQ on a Layer 2 Interface......................................................5-65 5.13.3 Example for Configuring Compatibility of the EType Field in the Outer Tag of QinQ Packets......5-68 5.13.4 Example for Configuring the Sub-interface for dot1q VLAN Tag Termination to Support Proxy ARP .......................................................................................................................................................................5-70 5.13.5 Example for Configuring the Sub-interface for QinQ VLAN Tag Termination to Support Proxy ARP .......................................................................................................................................................................5-72

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

vii

Contents

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access 5.13.6 Example for Configuring the Sub-interface for dot1q VLAN Tag Termination to Support VRRP .......................................................................................................................................................................5-76 5.13.7 Example for Configuring the Sub-interface for QinQ VLAN Tag Termination to Support VRRP .......................................................................................................................................................................5-84 5.13.8 Example for Configuring the Sub-interface for dotlq VLAN Tag Termination and QinQ VLAN Tag Termination to Access an L3VPN................................................................................................................5-95 5.13.9 Example for Configuring the Sub-interface for QinQ VLAN Tag Termination to Access a VLL .....................................................................................................................................................................5-107 5.13.10 Example for Configuring the Sub-interface for dot1q VLAN Tag Termination and QinQ VLAN Tag Termination to Access a VPLS...................................................................................................................5-115 5.13.11 Example for Configuring the Sub-interface for QinQ VLAN Tag Termination to Access a VPLS .....................................................................................................................................................................5-125 5.13.12 Example for Configuring a QinQ Termination Sub-interface to Support the Local Connection .....................................................................................................................................................................5-138 5.13.13 Example for Configuring the Sub-interface for dot1q VLAN Tag Termination to Support the DHCP Relay............................................................................................................................................................5-143 5.13.14 Example for Configuring the Sub-interface for QinQ VLAN Tag Termination to Support the DHCP Relay............................................................................................................................................................5-148 5.13.15 Example for Configuring Dynamic QinQ......................................................................................5-153 5.13.16 Example for Configuring the Sub-interface for VLAN Stacking to Access an L2VPN................5-160 5.13.17 Example for Configuring the Sub-interface for QinQ VLAN Stacking to Access a VPLS..........5-170 5.13.18 Example for Configuring the Sub-interface for QinQ VLAN Tag Termination to Support URPF .....................................................................................................................................................................5-182

6 PBB-TE Configuration...............................................................................................................6-1
6.1 Introduction.....................................................................................................................................................6-2 6.1.1 Overview of PBB-TE.............................................................................................................................6-2 6.1.2 PBB-TE Supported by the NE80E/40E.................................................................................................6-3 6.2 Configuring a PBB-TE Tunnel.......................................................................................................................6-5 6.2.1 Establishing the Configuration Task......................................................................................................6-5 6.2.2 Creating a Virtual MAC Address...........................................................................................................6-6 6.2.3 Creating the Backbone VLAN for a PBB-TE Tunnel............................................................................6-7 6.2.4 Creating a PBB-TE Tunnel....................................................................................................................6-8 6.2.5 (Optional) Configuring Split Horizon of the PBB-TE Tunnel...............................................................6-9 6.2.6 (Optional) Configuring the Priority of the PBB-TE Tunnel..................................................................6-9 6.2.7 Adding the Interface to the Backbone VLAN of the PBB-TE Tunnel on the Transit Node................6-10 6.2.8 Configuring the Static MAC Address Forwarding Function on the Transit Node..............................6-11 6.2.9 Disabling STP on the Interface of the Transit Node............................................................................6-12 6.2.10 Discarding Unknown Unicast and Multicast Packets and Broadcast Packets on the Transit Node .......................................................................................................................................................................6-12 6.2.11 Disabling the VLAN-Based MAC Address Learning Function on the Transit Node........................6-13 6.2.12 Checking the Configuration...............................................................................................................6-14 6.3 Configuring a PBB-TE Protection Group and Protection Switchover..........................................................6-15 6.3.1 Establishing the Configuration Task....................................................................................................6-16 6.3.2 Configuring a PBB-TE Protection Group............................................................................................6-17 6.3.3 Configuring Protection Mode of the Protection Group........................................................................6-17 viii Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Contents

6.3.4 (Optional) Configuring Revertive Mode for Protection Switchover....................................................6-18 6.3.5 (Optional) Configuring Hold-off Time for Protection Switchover......................................................6-19 6.3.6 Enabling Ethernet CFM.......................................................................................................................6-19 6.3.7 Enabling the APS Protocol...................................................................................................................6-20 6.3.8 Checking the Configuration.................................................................................................................6-20 6.4 Configuring a P2P SI.....................................................................................................................................6-21 6.4.1 Establishing the Configuration Task....................................................................................................6-21 6.4.2 Creating a P2P SI.................................................................................................................................6-22 6.4.3 Mapping User Services to the SI..........................................................................................................6-23 6.4.4 Binding the SI to a PBB-TE Tunnel.....................................................................................................6-24 6.4.5 (Optional) Configuring the Priority of the SI.......................................................................................6-24 6.4.6 (Optional) Configuring How the SI Processes Layer 2 Protocol Packets............................................6-25 6.4.7 (Optional) Enabling Service Data to Carry the CRC Flag...................................................................6-25 6.4.8 Activating the SI...................................................................................................................................6-26 6.4.9 (Optional) Enabling the Traffic Statistics Function for the SI.............................................................6-27 6.4.10 Checking the Configuration...............................................................................................................6-27 6.5 Configuring an MP2MP SI...........................................................................................................................6-28 6.5.1 Establishing the Configuration Task....................................................................................................6-28 6.5.2 Configuring an MP2MP SI..................................................................................................................6-29 6.5.3 Mapping User Services to the SI..........................................................................................................6-30 6.5.4 Binding the SI to a PBB-TE Tunnel.....................................................................................................6-31 6.5.5 (Optional) Configuring the Learning of MAC Addresses and the Rule..............................................6-31 6.5.6 (Optional) Discarding Unknown Unicast and Multicast Packets and Broadcast Packets....................6-32 6.5.7 (Optional) Configuring Instance-Based Static MAC Address Forwarding Entries.............................6-33 6.5.8 Activating the SI...................................................................................................................................6-34 6.5.9 (Optional) Configuring How the SI Processes Layer 2 Protocol Packets............................................6-34 6.5.10 Checking the Configuration...............................................................................................................6-35 6.6 Associating Ethernet CFM and the PBB-TE SI............................................................................................6-36 6.6.1 Establishing the Configuration Task....................................................................................................6-36 6.6.2 Enabling Ethernet CFM of the PBB-TE Tunnel..................................................................................6-37 6.6.3 Binding Ethernet CFM to a PBB-TE SI...............................................................................................6-37 6.6.4 Checking the Configuration.................................................................................................................6-38 6.7 Associating EFM OAM with the PBB-TE SI...............................................................................................6-38 6.7.1 Establishing the Configuration Task....................................................................................................6-38 6.7.2 Enabling Ethernet CFM of the PBB-TE Tunnel..................................................................................6-39 6.7.3 Associating EFM OAM with a PBB-TE SI.........................................................................................6-40 6.7.4 Checking the Configuration.................................................................................................................6-41 6.8 Configuration Examples................................................................................................................................6-41 6.8.1 Example for Configuring P2P PBB-TE Tunnels (No Protection Group)............................................6-41 6.8.2 Example for Configuring P2P PBB-TE Tunnels (in a Protection Group)...........................................6-49 6.8.3 Example for Configuring MP2MP PBB-TE Tunnels in Protection Groups........................................6-59 6.8.4 Example for Associating Ethernet CFM with PBB-TE.......................................................................6-73 Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. ix

Contents

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access 6.8.5 Example for Associating EFM OAM with PBB-TE............................................................................6-78

7 MSTP Configuration.................................................................................................................7-1
7.1 Introduction.....................................................................................................................................................7-2 7.1.1 MSTP Overview.....................................................................................................................................7-2 7.1.2 MSTP Features Supported by the NE80E/40E......................................................................................7-4 7.2 Adding a Switch to a Specified MST Region.................................................................................................7-9 7.2.1 Establishing the Configuration Task......................................................................................................7-9 7.2.2 Configuring the MSTP Mode...............................................................................................................7-10 7.2.3 Configuring an MST Region................................................................................................................7-10 7.2.4 Activating MST Region Configuration................................................................................................7-12 7.2.5 (Optional) Configuring the Switch as Primary or Secondary Root Switch.........................................7-12 7.2.6 (Optional) Configuring Priority of the Switch in an MSTI..................................................................7-13 7.2.7 Enabling MSTP....................................................................................................................................7-14 7.2.8 Checking the Configuration.................................................................................................................7-14 7.3 Configuring MSTP Parameters.....................................................................................................................7-15 7.3.1 Establishing the Configuration Task....................................................................................................7-15 7.3.2 Configuring MSTP Network Parameters of the Switch.......................................................................7-16 7.3.3 Configuring MSTP Parameters on an Interface...................................................................................7-17 7.3.4 Transferring the Port to MSTP Mode..................................................................................................7-19 7.3.5 Configuring the Protocol Format of MSTP Packets............................................................................7-20 7.3.6 Checking the Configuration.................................................................................................................7-21 7.4 Configuring MSTP Protection of the Switch................................................................................................7-22 7.4.1 Establishing the Configuration Task....................................................................................................7-22 7.4.2 Configuring BPDU Protection on the Switch......................................................................................7-23 7.4.3 Configuring Root Protection on the Port..............................................................................................7-23 7.4.4 Configuring Loop Protection on the Switch........................................................................................7-24 7.4.5 Checking the Configuration.................................................................................................................7-25 7.5 Maintaining MSTP........................................................................................................................................7-26 7.5.1 Clearing MSTP Statistics.....................................................................................................................7-26 7.5.2 Debugging MSTP.................................................................................................................................7-26 7.6 Configuration Examples................................................................................................................................7-27 7.6.1 Example for Configuring Basic MSTP Functions...............................................................................7-27

8 BPDU Tunnel Configuration...................................................................................................8-1


8.1 Overview.........................................................................................................................................................8-2 8.1.1 Introduction to BPDU............................................................................................................................8-2 8.1.2 BPDU Tunnel Features Supported by the NE80E/40E..........................................................................8-3 8.2 Configuring Interface-based BPDU Tunnels..................................................................................................8-8 8.2.1 Establishing the Configuration Task......................................................................................................8-8 8.2.2 Enabling STP function on the PEs and the CEs.....................................................................................8-9 8.2.3 Adding the Interfaces of the PE Connected with the CE to a Specified VLAN....................................8-9 8.2.4 Configuring Interface-based BPDU Tunnel.........................................................................................8-10 8.2.5 Configuring PE Interfaces Connecting PSNs to Permit Packets with Specified Tags.........................8-11 x Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Contents

8.2.6 Checking the Configuration.................................................................................................................8-12 8.3 Configuring VLAN-based BPDU Tunnels...................................................................................................8-13 8.3.1 Establishing the Configuration Task....................................................................................................8-13 8.3.2 Enabling the STP Function on CEs and PEs........................................................................................8-14 8.3.3 Configuring BPDUs from CEs to PEs to Carry Specified Tags..........................................................8-14 8.3.4 Configuring VLAN-based BPDU Tunnel............................................................................................8-15 8.3.5 Configuring PE Interfaces Connecting PSN to Permit Packets with Specified Tags..........................8-16 8.3.6 Checking the Configuration.................................................................................................................8-17 8.4 Configuring QinQ-based BPDU Tunnels.....................................................................................................8-18 8.4.1 Establishing the Configuration Task....................................................................................................8-19 8.4.2 Enabling the STP Function on CEs and PEs........................................................................................8-19 8.4.3 Configuring the BPDUs from CEs to PEs to Carry the Specified Tags..............................................8-20 8.4.4 Configuring QinQ-based BPDU Tunnel..............................................................................................8-20 8.4.5 Configuring PE Interfaces Connecting PSNs to Permit the Packets with Specified Tags...................8-22 8.4.6 Checking the Configuration.................................................................................................................8-23 8.5 Configuration Examples................................................................................................................................8-24 8.5.1 Example for Configuring Interface-based BPDU Tunnel (Devices of Different Roles).....................8-25 8.5.2 Example for Configuring Interface-based BPDU Tunnel (Devices of the Same Role).......................8-31 8.5.3 Example for Configuring VLAN-based Tunnel of BPDUs.................................................................8-38 8.5.4 Example for Configuring Tunnel of BPDUs Based on QinQ..............................................................8-44

9 RRPP Configuration..................................................................................................................9-1
9.1 Introduction.....................................................................................................................................................9-2 9.1.1 Overview of RRPP.................................................................................................................................9-2 9.1.2 RRPP Features Supported by the NE80E/40E.......................................................................................9-2 9.2 Configuring RRPP Functions..........................................................................................................................9-6 9.2.1 Establishing the Configuration Task......................................................................................................9-7 9.2.2 Creating the RRPP Domain....................................................................................................................9-7 9.2.3 Creating the Control VLAN...................................................................................................................9-8 9.2.4 (Optional) Setting the Values of RRPP Domain Timers........................................................................9-8 9.2.5 Configuring the Ports.............................................................................................................................9-9 9.2.6 Creating the RRPP Ring.......................................................................................................................9-10 9.2.7 Enabling the RRPP Ring......................................................................................................................9-11 9.2.8 Enabling RRPP.....................................................................................................................................9-11 9.2.9 Checking the Configuration.................................................................................................................9-12 9.3 Configuring the Monitoring Interface...........................................................................................................9-13 9.3.1 Establishing the Configuration Task....................................................................................................9-13 9.3.2 Configuring the Monitoring Interface..................................................................................................9-14 9.3.3 Checking the Configuration.................................................................................................................9-15 9.4 Configuring RRPP Snooping........................................................................................................................9-16 9.4.1 Establishing the Configuration Task....................................................................................................9-16 9.4.2 Enabling RRPP Snooping....................................................................................................................9-16 9.4.3 (Optional) Configuring the VSI Associated with the RRPP Snooping................................................9-17 Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. xi

Contents

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access 9.4.4 Checking the Configuration.................................................................................................................9-18

9.5 Maintaining RRPP.........................................................................................................................................9-19 9.5.1 Clearing RRPP Running Information..................................................................................................9-19 9.5.2 Debugging RRPP.................................................................................................................................9-19 9.6 Configuration Examples................................................................................................................................9-20 9.6.1 Example for Configuring a Single RRPP Ring....................................................................................9-20 9.6.2 Example for Configuring a Crossed RRPP Ring.................................................................................9-24 9.6.3 Example for Configuring a Tangent RRPP Ring.................................................................................9-32 9.6.4 Example for Configuring a Crossed RRPP Ring to Connect Dual NPE.............................................9-39 9.6.5 Example for Configuring the RRPP Snooping....................................................................................9-54

10 RPR Configuration.................................................................................................................10-1
10.1 Introduction.................................................................................................................................................10-2 10.1.1 Overview of RPR...............................................................................................................................10-2 10.1.2 RPR Features Supported by the NE80E/40E.....................................................................................10-3 10.2 Configuring Basic RPR Functions..............................................................................................................10-5 10.2.1 Establishing the Configuration Task..................................................................................................10-6 10.2.2 (Optional) Configuring a MAC address for an RPR Logical Interface.............................................10-6 10.2.3 Configuring an IP Address for an RPR Logical Interface..................................................................10-7 10.2.4 Binding a Physical Interface to an RPR Logical Interface.................................................................10-8 10.2.5 Configuring the ARP Mapping Table................................................................................................10-8 10.2.6 (Optional) Configuring the Station Name..........................................................................................10-9 10.2.7 Enabling RPR Stations.......................................................................................................................10-9 10.2.8 Checking the Configuration.............................................................................................................10-10 10.3 Configuring RPR Timers..........................................................................................................................10-12 10.3.1 Establishing the Configuration Task................................................................................................10-12 10.3.2 Configuring the Sending Timer for TP and TC Frames...................................................................10-13 10.3.3 Configuring the Sending Timer for ATD Frames............................................................................10-13 10.3.4 Configuring the Timeout Interval for the Keepalive Timer.............................................................10-14 10.3.5 Configuring the Delay Interval for Reporting a Span Fault.............................................................10-14 10.3.6 Checking the Configuration.............................................................................................................10-15 10.4 Configuring the RPR Protection Mode.....................................................................................................10-15 10.4.1 Establishing the Configuration Task................................................................................................10-16 10.4.2 Configuring the Switching Mode.....................................................................................................10-16 10.4.3 Configuring the Forced Switching...................................................................................................10-16 10.4.4 Configuring the Recovery Mode......................................................................................................10-17 10.4.5 Configuring the Interval for the Station to Recover.........................................................................10-17 10.4.6 Checking the Configuration.............................................................................................................10-18 10.5 Configuring the Attributes of RPR Data Frames......................................................................................10-19 10.5.1 Establishing the Configuration Task................................................................................................10-19 10.5.2 Configuring Permitted Frame Size for the Station...........................................................................10-20 10.5.3 Configuring Flow Statistics Based on Source MAC and Destination MAC...................................10-20 10.5.4 Configuring the Mapping Between EF Class flow and RPR Service Type.....................................10-21 xii Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Contents

10.5.5 Configuring the Static Selection Ring..............................................................................................10-21 10.5.6 Configuring the RPR Encapsulation Format for IS-IS Packets.......................................................10-22 10.5.7 Checking the Configuration.............................................................................................................10-23 10.6 Configuring the RPR Fairness Algorithm.................................................................................................10-23 10.6.1 Establishing the Configuration Task................................................................................................10-23 10.6.2 Configuring Allocable Bandwidth on the Station............................................................................10-24 10.6.3 Configuring Reserved Bandwidth of the Station.............................................................................10-24 10.6.4 Configuring the Link Weight on the Station....................................................................................10-25 10.6.5 Checking the Configuration.............................................................................................................10-25 10.7 Maintaining RPR.......................................................................................................................................10-26 10.7.1 Clearing the Running Information...................................................................................................10-26 10.7.2 Debugging RPR................................................................................................................................10-26 10.8 Configuration Examples............................................................................................................................10-27 10.8.1 Example for Configuring Basic RPR Functions..............................................................................10-27 10.8.2 Example for Configuring Tangent RPR Rings................................................................................10-31 10.8.3 Example for Configuring Intersected RPR Rings............................................................................10-35 10.9 Troubleshooting........................................................................................................................................10-42 10.9.1 RPR Logical Interface Is Down.......................................................................................................10-42 10.9.2 Packet Transmission Faults..............................................................................................................10-43

A Glossary.....................................................................................................................................A-1 B Acronyms and Abbreviations.................................................................................................B-1 Index.................................................................................................................................................i-1

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

xiii

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Figures

Figures
Figure 1-1 Networking diagram of configuring the MAC address table based on the interface and VLAN....1-12 Figure 1-2 Networking diagram of configuring the MAC address table based on the dot1q termination sub-interface and VSI................................................................................................................................................................1-15 Figure 1-3 Networking diagram of configuring the MAC address table based on the VLANIF interface and VSI .............................................................................................................................................................................1-18 Figure 1-4 Networking diagram of configuring the MAC address table based on the VLAN and Layer 2 VE interface...............................................................................................................................................................1-21 Figure 1-5 Networking diagram of configuring the MAC address table based on the VSI and Layer 3 VE interface .............................................................................................................................................................................1-23 Figure 2-1 Typical application of a Layer 2 Ethernet sub-interface (VRRP + TE tunnel)..................................2-3 Figure 2-2 Schematic diagram of the Smart Link in the normal state..................................................................2-4 Figure 2-3 Schematic diagram in which the active Smart link fails.....................................................................2-5 Figure 2-4 Networking diagram of Ethernet interface configuration.................................................................2-22 Figure 2-5 Networking diagram of configuring equipment to process Smart Link packets..............................2-24 Figure 3-1 Determining the active links by the Actor in static LACP mode.......................................................3-3 Figure 3-2 Typical application of the Layer 2 Eth-Trunk interface (Eth-Trunk ring network)...........................3-5 Figure 3-3 Networking diagram of link aggregation in manual load balancing mode......................................3-25 Figure 3-4 Networking diagram of link aggregation in 1:1 active/standby mode.............................................3-29 Figure 3-5 Networking diagram of link aggregation in static LACP mode.......................................................3-34 Figure 3-6 Configuring a Layer 2 Eth-Trunk interface to allow VLAN frames to pass through.......................3-44 Figure 3-7 Networking diagram of configuring a Layer 3 Eth-Trunk interface................................................3-47 Figure 3-8 Networking diagram of configuring VLANs to communicate through Eth-Trunk sub-interfaces .............................................................................................................................................................................3-49 Figure 3-9 Networking diagram of link aggregation in manual load balancing mode......................................3-53 Figure 3-10 Networking diagram of configuring link aggregation in 1:1 active/standby mode........................3-55 Figure 3-11 Networking diagram of link aggregation in static LACP mode.....................................................3-60 Figure 4-1 Networking diagram of the traditional LAN......................................................................................4-3 Figure 4-2 Schematic diagram of the VLAN networking....................................................................................4-4 Figure 4-3 Communication between VLANs through routers.............................................................................4-6 Figure 4-4 Communication between VLANs through VLANIF interfaces.........................................................4-7 Figure 4-5 Networking diagram of configuring trunk interfaces to connect the VLANs between devices.......4-19 Figure 4-6 Networking diagram of configuring hybrid interfaces to connect the VLANs between devices.....4-19 Figure 4-7 Application scenario of VLAN aggregation.....................................................................................4-22 Figure 4-8 Networking diagram of configuring VLAN mapping......................................................................4-27 Figure 4-9 Configuring a VLAN based on Layer 2 interface............................................................................4-36 Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. xv

Figures

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access Figure 4-10 Configuring VLANs based on ports...............................................................................................4-38 Figure 4-11 Configuring VLANs to communicate through a router..................................................................4-40 Figure 4-12 Configuring VLANs to communicate with non-VLAN through a router......................................4-43 Figure 4-13 Configuring VLAN trunks..............................................................................................................4-45 Figure 4-14 Configuring VLAN aggregation.....................................................................................................4-49

Figure 4-15 Networking diagram of configuring VLAN mapping....................................................................4-51 Figure 4-16 Networking diagram of configuring VLAN damping....................................................................4-55 Figure 4-17 Networking diagram of configuring interface isolation in a VLAN.............................................. 4-57 Figure 4-18 Networking diagram of configuring the isolation based on interface groups in a VLAN............. 4-59 Figure 5-1 Intercommunication between Layer 2 LANs on the basis of the traditional IEEE 802.1Q protocol ...............................................................................................................................................................................5-3 Figure 5-2 802.1 encapsulation............................................................................................................................5-4 Figure 5-3 Compatibility of the EType field in the TPID field of the outer tag in the QinQ packet...................5-5 Figure 5-4 Supporting proxy ARP.......................................................................................................................5-5 Figure 5-5 Typical networking diagram of IP address assignation on the sub-interface for QinQ VLAN tag termination as a DHCP server...............................................................................................................................5-6 Figure 5-6 Typical networking diagram of the DHCP relay function on the sub-interface for QinQ VLAN tag termination............................................................................................................................................................5-7 Figure 5-7 Typical networking diagram of VRRP on the sub-interface for QinQ VLAN tag termination.........5-8 Figure 5-8 Typical networking diagram of the access to an L3VPN through the sub-interface for QinQ VLAN tag termination.......................................................................................................................................................... 5-10 Figure 5-9 Typical networking diagram of dynamic QinQ................................................................................5-11 Figure 5-10 Typical networking diagram of the access to a PWE3/VLL network through the sub-interface for QinQ VLAN tag termination ..............................................................................................................................5-12 Figure 5-11 Typical networking diagram of the access to a VPLS through the sub-interface for QinQ VLAN tag termination.......................................................................................................................................................... 5-13 Figure 5-12 Typical networking diagram of the access to VLL/PWE3 through the sub-interface for VLAN stacking .............................................................................................................................................................................5-14 Figure 5-13 Typical networking diagram of the access to VPLS through the sub-interface for VLAN stacking .............................................................................................................................................................................5-15 Figure 5-14 802.1p remark supported by QinQ.................................................................................................5-15 Figure 5-15 Typical networking diagram of 802.1p Remark supported by QinQ.............................................5-16 Figure 5-16 DSCP signaling...............................................................................................................................5-16 Figure 5-17 802.1p and DSCP remark during QinQ termination...................................................................... 5-17 Figure 5-18 MPLS packets.................................................................................................................................5-17 Figure 5-19 802.1p and EXP remark during QinQ termination.........................................................................5-18 Figure 5-20 Typical networking diagram of the QinQ tunnel............................................................................5-63 Figure 5-21 Typical networking diagram of Layer 2 selective QinQ................................................................5-66 Figure 5-22 Networking diagram of configuring the compatibility of the EType field in the outer tag of QinQ packets.................................................................................................................................................................5-69 Figure 5-23 Typical networking diagram of configuring the sub-interface for dot1q VLAN tag termination to support proxy ARP..............................................................................................................................................5-70 Figure 5-24 Typical networking diagram of configuring the sub-interface for QinQ VLAN tag termination to support proxy ARP..............................................................................................................................................5-73

xvi

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Figures

Figure 5-25 Typical networking diagram of configuring the sub-interface for dot1q VLAN tag termination to support VRRP..................................................................................................................................................... 5-77 Figure 5-26 Typical networking diagram of configuring the sub-interface for QinQ VLAN tag termination to support VRRP.....................................................................................................................................................5-85 Figure 5-27 Typical networking diagram of configuring the sub-interface for dot1q VLAN tag termination and QinQ VLAN tag termination to access an L3VPN.............................................................................................5-96 Figure 5-28 Typical networking diagram of configuring the sub-interface for QinQ VLAN tag termination to access a VLL................................................................................................................................................................5-107 Figure 5-29 Typical networking diagram of configuring the sub-interface for dot1q VLAN tag termination and QinQ VLAN tag termination to access VPLS..................................................................................................5-116 Figure 5-30 Typical networking diagram of configuring the sub-interface for QinQ VLAN tag termination to access VPLS.................................................................................................................................................................5-126 Figure 5-31 QinQ termination sub-interface supporting the local switching...................................................5-139 Figure 5-32 Typical networking diagram of configuring the sub-interface for dot1q VLAN tag termination to support the DHCP relay....................................................................................................................................5-144 Figure 5-33 Typical networking diagram of configuring the sub-interface for QinQ VLAN tag termination to support the DHCP relay....................................................................................................................................5-148 Figure 5-34 Networking diagram of dynamic QinQ........................................................................................5-154 Figure 5-35 Typical networking diagram of configuring the sub-interface for VLAN stacking to access an L2VPN ...........................................................................................................................................................................5-161 Figure 5-36 Typical networking diagram of configuring the sub-interface for VLAN stacking to access VPLS ...........................................................................................................................................................................5-171 Figure 5-37 Typical networking diagram of configuring the sub-interface for QinQ VLAN tag termination to support URPF....................................................................................................................................................5-183 Figure 6-1 Configuring a PBB-TE tunnel............................................................................................................6-6 Figure 6-2 Configuring a PBB-TE protection group and protection switchover...............................................6-16 Figure 6-3 Configuring a P2P SI........................................................................................................................6-22 Figure 6-4 Configuring an MP2MP SI...............................................................................................................6-29 Figure 6-5 Networking diagram of P2P PBB-TE tunnel configurations (no protection group)........................6-41 Figure 6-6 Networking diagram for configurations of P2P PBB-TE tunnels in a protection group..................6-50 Figure 6-7 Networking diagram of MP2MP PBB-TE tunnel configurations (in protection groups)................6-60 Figure 6-8 Networking diagram of associating Ethernet CFM with PBB-TE...................................................6-73 Figure 6-9 Networking diagram of associating EFM OAM with PBB-TE.......................................................6-79 Figure 7-1 RSTP diagram.....................................................................................................................................7-3 Figure 7-2 Multiple spanning trees of MSTP.......................................................................................................7-4 Figure 7-3 Basic MSTP concepts.........................................................................................................................7-5 Figure 7-4 Mapping of MSTI and VLAN............................................................................................................7-6 Figure 7-5 Schematic diagram of root port, designated port, alternate port, and backup port.............................7-7 Figure 7-6 Schematic diagram of master port and regional edge port.................................................................7-8 Figure 7-7 Networking diagram of configuring basic MSTP functions.............................................................7-27 Figure 8-1 Basic format of BPDU encapsulation.................................................................................................8-2 Figure 8-2 Transparent transmission of BPDUs in an ISP network.....................................................................8-3 Figure 8-3 Interface-based BPDU tunnels of different user networks.................................................................8-4 Figure 8-4 VLAN-based BPDU tunnel................................................................................................................8-5 Figure 8-5 IEEE 802.1Q encapsulation and QinQ encapsulation.......................................................................8-7 Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. xvii

Figures

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access Figure 8-6 QinQ-based BPDU tunnel..................................................................................................................8-7 Figure 8-7 Networking diagram of interface-based BPDU tunnels (devices of different roles)........................8-25 Figure 8-8 Networking diagram of interface-based BPDU tunnels (device of the same role)..........................8-32

Figure 8-9 Typical networking diagram of configuring VLAN-based transparent transmission of BPDUs .............................................................................................................................................................................8-38 Figure 8-10 Networking diagram of QinQ-based BPDU tunnels......................................................................8-45 Figure 9-1 Application of crossed RRPP rings in the MAN................................................................................9-3 Figure 9-2 Networking diagram of Metro Ethernet RRPP solution.....................................................................9-5 Figure 9-3 Networking diagram of RRPP and VPLS..........................................................................................9-6 Figure 9-4 Networking diagram of the applicable environment of monitoring interfaces.................................9-14 Figure 9-5 Networking diagram of configuring a single RRPP ring.................................................................9-20 Figure 9-6 Networking diagram of a crossed RRPP ring...................................................................................9-24 Figure 9-7 Networking diagram of configuring a tangent RRPP ring...............................................................9-32 Figure 9-8 Networking diagram of configuring the monitoring interface.........................................................9-40 Figure 9-9 Networking diagram of configuring the RRPP snooping.................................................................9-55 Figure 10-1 RPR networking diagram...............................................................................................................10-3 Figure 10-2 Transmitting unicast frames...........................................................................................................10-4 Figure 10-3 RPR ring networking diagram......................................................................................................10-28 Figure 10-4 Networking diagram of configuring tangent RPR rings...............................................................10-31 Figure 10-5 Networking diagram for configuring intersected RPR rings........................................................10-36

xviii

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Tables

Tables
Table 4-1 Comparison between the ports............................................................................................................4-5 Table 8-1 Description of basic formats of fields in BPDU packets.....................................................................8-2

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

xix

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

About This Document

About This Document


Purpose
This manual describes LAN access and MAN access technologies, including principles, configuration steps, and configuration examples of MAC address, Ethernet, LACP, VLAN, QinQ, PBB-TE, MSTP, BPDU tunnel, RRPP and RPR.

Related Versions
The following table lists the product versions related to this document. Product Name Quidway NetEngine80E/40E Version V300R003

Intended Audience
This document is intended for:
l l l l

Commissioning engineer Data configuration engineer Network monitoring engineer System maintenance engineer

Organization
This document is organized as follows. Chapter 1 MAC Address Table Configuration Description This chapter describes the fundamentals of the MAC address table, the configuration procedure and the configuration examples.
1

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

About This Document

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Chapter 2 Ethernet Interface Configuration

Description This chapter describes the significance of the Ethernet network, the most important LAN networking technology and Ethernet interface configurations, along with typical examples. This chapter describes the fundamentals, the configuration procedure and the configuration examples of the Eth-Trunk interface and LACP. This chapter describes in which condition VLAN is used and how to encapsulate an interface with VLAN, along with typical examples. This chapter describes the principle, configuration procedures, and configuration examples of QinQ. This chapter describes the basic concept of PBB-TE, and configuration steps, along with examples. This chapter describes the fundamentals of the MSTP protocol, the configuration procedure and the configuration examples. This chapter describes the basic concept of BPDU Tunnel, and configuration steps, along with examples. This chapter describes the fundamentals of the RRPP protocol, the configuration procedure and the configuration examples. This chapter describes the fundamentals of the RPR protocol, the configuration procedure and the configuration examples. This appendix collates frequently used glossaries in this document. This appendix collates frequently used acronyms and abbreviations in this document.

3 LACP Configuration

4 VLAN Configuration

5 QinQ Configuration 6 PBB-TE Configuration 7 MSTP Configuration

8 BPDU Tunnel Configuration 9 RRPP Configuration

10 RPR Configuration A Glossary B Acronyms and Abbreviations

Conventions
Symbol Conventions
The symbols that may be found in this document are defined as follows. Symbol Description

DANGER
2

Indicates a hazard with a high level of risk, which if not avoided, will result in death or serious injury.

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

About This Document

Symbol

Description Indicates a hazard with a medium or low level of risk, which if not avoided, could result in minor or moderate injury. Indicates a potentially hazardous situation, which if not avoided, could result in equipment damage, data loss, performance degradation, or unexpected results. Indicates a tip that may help you solve a problem or save time. Provides additional information to emphasize or supplement important points of the main text.

WARNING

CAUTION
TIP

NOTE

General Conventions
The general conventions that may be found in this document are defined as follows. Convention Times New Roman Boldface Italic Courier New Description Normal paragraphs are in Times New Roman. Names of files, directories, folders, and users are in boldface. For example, log in as user root. Book titles are in italics. Examples of information displayed on the screen are in Courier New.

Command Conventions
The command conventions that may be found in this document are defined as follows. Convention Boldface Italic [] { x | y | ... } [ x | y | ... ] Description The keywords of a command line are in boldface. Command arguments are in italics. Items (keywords or arguments) in brackets [ ] are optional. Optional items are grouped in braces and separated by vertical bars. One item is selected. Optional items are grouped in brackets and separated by vertical bars. One item is selected or no item is selected.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

About This Document

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Convention { x | y | ... }*

Description Optional items are grouped in braces and separated by vertical bars. A minimum of one item or a maximum of all items can be selected. Optional items are grouped in brackets and separated by vertical bars. Several items or no item can be selected. The parameter before the & sign can be repeated 1 to n times. A line starting with the # sign is comments.

[ x | y | ... ]* &<1-n> #

GUI Conventions
The GUI conventions that may be found in this document are defined as follows. Convention Boldface > Description Buttons, menus, parameters, tabs, window, and dialog titles are in boldface. For example, click OK. Multi-level menus are in boldface and separated by the ">" signs. For example, choose File > Create > Folder.

Keyboard Operations
The keyboard operations that may be found in this document are defined as follows. Format Key Key 1+Key 2 Key 1, Key 2 Description Press the key. For example, press Enter and press Tab. Press the keys concurrently. For example, pressing Ctrl+Alt +A means the three keys should be pressed concurrently. Press the keys in turn. For example, pressing Alt, A means the two keys should be pressed in turn.

Mouse Operations
The mouse operations that may be found in this document are defined as follows. Action Click Description Select and release the primary mouse button without moving the pointer.

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

About This Document

Action Double-click Drag

Description Press the primary mouse button twice continuously and quickly without moving the pointer. Press and hold the primary mouse button and move the pointer to a certain position.

Update History
Updates between document issues are cumulative. Therefore, the latest document issue contains all updates made in previous issues.

Updates in Issue 03 (2008-09-22)


This is the third release.

Updates in Issue 02 (2008-05-08)


This is the second release.

Updates in Issue 01 (2008-02-22)


This is the first release.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

1 MAC Address Table Configuration

MAC Address Table Configuration

About This Chapter


Describes the fundamentals of the MAC address table, the configuration procedure and the configuration examples. 1.1 Introduction Describes the basic concepts of MAC address table. 1.2 Configuring the MAC Address Table Based on the VLAN and Layer 2 Interface This section describes how to configure the MAC address table based on the VLAN and Layer 2 interface. 1.3 Configuring the MAC Address Table Based on the VSI and Layer 3 Interface Describes how to configure the MAC address table based on the VSI and Layer 3 interface and in the VPLS network. 1.4 Setting the Aging Time of a MAC Address Table Describes how to configure the aging time of dynamic MAC address entries. 1.5 Configuration Examples Provides several configuration examples of the MAC address table. 1.6 Troubleshooting Describes how to diagnose and remove the operational fault of a MAC address table.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

1-1

1 MAC Address Table Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

1.1 Introduction
Describes the basic concepts of MAC address table. 1.1.1 MAC Address Table Overview 1.1.2 MAC Features Supported by the NE80E/40E

1.1.1 MAC Address Table Overview


All workstations and servers connected by the Ethernet interfaces of a router have unique MACs (Medium Access Control) addresses. The MAC address table on the device contains the information about the MAC addresses of all the devices connected by this router. MAC address entries are classified into the following types:
l

Dynamic entries Dynamic entries are learned and stored on interface boards. The dynamic entries expire and are lost after hot swapping or interface-board resetting, or router rebooting.

Static entries Static entries are configured by users. They are automatically delivered to each interface board. Static entries do not expire and are not lost after router rebooting, hot swapping, or interface-board resetting.

Blackhole entries Blackhole entries, configured by users, are used to discard frames containing specified MAC address. They are delivered to each interface board. The blackhole entries do not expire and are not lost after router rebooting, hot swapping or interface-board resetting.

1.1.2 MAC Features Supported by the NE80E/40E


For the MAC address learning limit, refer to the Quidway NetEngine80E/40E Router Configuration Guide - Security.

1.2 Configuring the MAC Address Table Based on the VLAN and Layer 2 Interface
This section describes how to configure the MAC address table based on the VLAN and Layer 2 interface. 1.2.1 Establishing the Configuration Task 1.2.2 Configuring MAC Address Entries 1.2.3 Configuring MAC Address Entries Based on the Layer 2 VE Interface 1.2.4 Checking the Configuration
1-2 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

1 MAC Address Table Configuration

1.2.1 Establishing the Configuration Task


Applicable Environment
Generally, a router automatically creates MAC address tables by learning source addresses of the connected devices. Network administrators can manually bind a MAC address and an interface in the table. This can prevent malicious users with counterfeit MAC address from logging in to the local device through other switches. To discard the frames to the specified destination MAC address, configure blackhole entries.

Pre-configuration Tasks
Before configuring the MAC address table based on the VLAN and Layer 2 interface, complete the following tasks:
l l l

Creating a VLAN Ensuring that the Layer 2 ports in the MAC address entries are added to the VLAN Ensuring that the mapping between the VE interface and the PVC of the ATM interface is established if the outbound interface is a VE interface
NOTE

For the configuration of the mapping between the VE interface and the PVC of the ATM interface, refer to the Quidway NetEngine80E/40E Router Configuration Guide - WAN Access.

Data Preparation
To configure the MAC address table based on the VLAN and Layer 2 interface, you need the following data. No. 1 2 3 Data MAC address Port number VLAN ID

1.2.2 Configuring MAC Address Entries


Context
Do as follows on the equipment where the VLAN is created:

Procedure
Step 1 Run:
system-view

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

1-3

1 MAC Address Table Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

The system view is displayed. Step 2 Run:


mac-address static mac-address interface-type interface-number vlan vlan-id [ cevlan ce-vlan ]

MAC address entries are added. Note the following:


l

You can add only unicast MAC addresses rather than multicast MAC addresses and special MAC addresses to a MAC address table. Special MAC addresses are reserved for special usage, such as MAC addresses of special packets. The interface type can be physical interface such as Ethernet interface and GE interface, or logical interface such as Eth-Trunk interface and MAC-Tunnel interface. The interface specified in the mac-address command must be a switched interface, serving as an outbound interface for Layer 2 forwarding. VLANs in the table must be associated with ports. That is, the VLAN contains the port. Alternatively, this interface allows the VLAN to pass through. When ce-vlan is used, it indicates that the interface specified by interface-type interfacenumber is added to the specified VLAN in VLAN mapping mode. The parameter ce-vlan indicates the mapped VLAN ID. When ce-vlan is not used, it indicates that the interface specified by interface-type interfacenumber is added to the specified VLAN in port default, trunk, or VLAN stacking mode. A maximum of 1024 non-dynamic entries can be added.

Step 3 Run:
mac-address blackhole mac-address vlan vlan-id [ ce-vlan ce-vlan ]

The blackhole MAC address entry is configured. ----End

1.2.3 Configuring MAC Address Entries Based on the Layer 2 VE Interface


Context
Do as follows on the router where the VLAN is created:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


mac-address static mac-address virtual-ethernet interface-number atm interfacenumber pvc { pvc-name [ vpi/vci ] | vpi/vci } vlan vlan-id

MAC address entries are added. Note the following:


1-4 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
l

1 MAC Address Table Configuration

You can add only unicast MAC addresses rather than multicast MAC addresses or special MAC addresses to a MAC address table. Special MAC addresses are reserved for special usage, such as MAC addresses of special packets. The VE interface must be a switched interface. In addition, the VE interface must be associated with the VLAN specified by vlan-id. That is, the VLAN contains this VE interface; or this VE interface is added to VLAN by default. The mapping between the VE interface and the PVC of the ATM interface is established, and the VE interface is added to the specified VLAN. A maximum of 1024 non-dynamic entries can be added.

----End

1.2.4 Checking the Configuration


Run the following command to check the previous configuration. Action Check information about MAC address entries. Command display mac-address mac-address { vlan vlan-id | vsi vsiname }display mac-address [ blackhole | static | dynamic slot-id [ vlan vlan-id ] ]

Run the display mac-address command. You can view the information about the MAC address, the outbound interface corresponding to the MAC address, and the MAC address type. For example:
<Quidway> display mac-address MAC address table of slot 1: -------------------------------------------------------------------------------MAC Address VLAN/ PEVLAN CEVLAN Port Type LSP/ VSI/SI MAC-Tunnel -------------------------------------------------------------------------------0011-2233-4455 abc 1 GE1/0/1.10 static 2/0002-0002-0002 2 GE2/0/1 static -------------------------------------------------------------------------------Total matching items on slot 1 displayed = 2 MAC address table of slot 4: -------------------------------------------------------------------------------MAC Address VLAN/ PEVLAN CEVLAN Port Type LSP/ VSI/SI MAC-Tunnel -------------------------------------------------------------------------------0000-c102-0104 200 GE1/0/1 dynamic 0000-c102-0105 200 GE1/0/1 dynamic 0000-c102-0102 200 GE1/0/1 dynamic 0000-c102-0106 200 GE1/0/1 dynamic 0000-c102-0103 200 GE1/0/1 dynamic ------------------------------------------------------------------------------Total matching items on slot 4 displayed = 5

Run the display mac-address summary command to display all the statistics of the MAC address entries. Such as:
<Quidway> display mac-address summary ----------------------------------------------------------Slot Total Blackhole Static Dynamic ----------------------------------------------------------1 6 0 2 4

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

1-5

1 MAC Address Table Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

2 6 0 1 5 ----------------------------------------------------------Total matching items displayed = 1

1.3 Configuring the MAC Address Table Based on the VSI and Layer 3 Interface
Describes how to configure the MAC address table based on the VSI and Layer 3 interface and in the VPLS network. 1.3.1 Establishing the Configuration Task 1.3.2 Configuring MAC Address Entries 1.3.3 Configuring MAC Address Entries Based on the VLANIF Interface 1.3.4 Configuring MAC Address Entries Based on the Layer 3 VE Interface 1.3.5 Checking the Configuration

1.3.1 Establishing the Configuration Task


Applicable Environment
In a Virtual Private LAN Service (VPLS) network, provider edges (PEs) learn MAC addresses. A PE learns the MAC address of the remote PE through the pseudo wire (PW) and learns the MAC address of the customer edge (CE) that directly accesses the PE through the Attachment Circuit (AC). In this manner, the PE automatically establishes the MAC address table. To improve the network security, configure the mapping between the MAC address of the CE and the PE interface in the MAC address table of the PE, that is, the static MAC address entries on the AC side. On the PE, binding a MAC address to an interface can prevent illegal users from accessing the network. To discard the frames to the specified destination MAC address, configure blackhole entries.
NOTE

For concepts and configurations in VPLS, refer to the "VPLS Configuration" in the Quidway NetEngine80E/40E Router Configuration Guide - VPN.

Pre-configuration Tasks
Before configuring the MAC address table based on the virtual switching instance (VSI) and Layer 3 interface, complete the following tasks:
l l

Configuring the VPLS and binding the VSI to the outbound interface Establishing the mapping between the VE interface and the PVC of the ATM interface if the outbound interface is a VE interface Configuring the sub-interface with dot1q termination or QinQ termination or qinq stacking or vlan-type dot1q if the outbound interface is a sub-interface
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

1-6

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
NOTE

1 MAC Address Table Configuration

l l

For the configuration of the mapping between the VE interface and the PVC of the ATM interface, refer to the Quidway NetEngine80E/40E Router Configuration Guide - WAN Access. For the configuration of dot1q termination or QinQ termination or qinq stacking on a sub-interface, refer to QinQ Configuration.

Data Preparation
To configure the MAC address table based on the VSI and Layer 3 interface, you need the following data. No. 1 2 3 4 5 Data VSI name MAC addresses Interface type and number PE VLAN ID CE VLAN ID

1.3.2 Configuring MAC Address Entries


Context
Do as follows on the equipment where the VSI is created:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


mac-address static mac-address interface-type interface-number vsi vsi-name [ pevid pe-vid [ ce-vid ce-vid ] ]

MAC address entries are added. Note the following:


l

You can add only unicast MAC addresses rather than multicast MAC addresses or special MAC addresses to a MAC address table. Special MAC addresses are reserved for special usage, such as MAC addresses of special packets. The interface type can be Ethernet interface, Ethernet sub-interface, GE interface, GE subinterface, Eth-Trunk interface, or Eth-Trunk sub-interface. Ensure that the interface in this command is bound to the VSI specified by vsi-name.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 1-7

Issue 03 (2008-09-22)

1 MAC Address Table Configuration


l

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

When pe-vid is used, the interface specified by interface-type interface-number must be a sub-interface. In addition, this sub-interface must be configured with dot1q terminationor, qinq stacking or vlan-type dot1q and bound to the VSI. When pe-vid and ce-vid are used, the interface specified by interface-type interfacenumber must be a sub-interface. In addition, this sub-interface must be configured with QinQ termination and bound to the VSI. A maximum of 1024 non-dynamic entries can be added.

Step 3 Run:
mac-address blackhole mac-address vsi vsi-name [ pe-vid pe-vid [ ce-vid ce-vid ] ]

The blackhole MAC address entry is configured. ----End

1.3.3 Configuring MAC Address Entries Based on the VLANIF Interface


Context
Do as follows on the equipment where the VSI is created:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


mac-address static mac-address interface-type interface-number vlanif interfacenumber vsi vsi-name

MAC address entries are added. Note the following:


l

You can add only unicast MAC addresses rather than multicast MAC addresses or special MAC addresses to a MAC address table. Special MAC addresses are reserved for special usage, such as MAC addresses of special packets. The interface type can be Ethernet interface, GE interface, or Eth-Trunk interface. The interface specified by interface-type interface-number is added to the VLAN corresponding to the VLANIF interface, and the VLANIF interface is bound to the specified VSI. A maximum of 1024 non-dynamic entries can be added.

l l

Step 3 Run:
mac-address blackhole mac-address { vlan vlan-id [ ce-vlan ce-vlan ] | vsi vsiname [ pe-vid pe-vid [ ce-vid ce-vid ] ] }

The blackhole MAC address entry is configured. ----End


1-8 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

1 MAC Address Table Configuration

1.3.4 Configuring MAC Address Entries Based on the Layer 3 VE Interface


Context
NOTE

MAC address entries based on the VE interface can be configured only on the ATM interfaces of the ATM flexible plug-in card.

Do as follows on the router where the VSI is created:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


mac-address static mac-address virtual-ethernet interface-number atm interfacenumber pvc { pvc-name [ vpi/vci ] | vpi/vci } vsi vsi-name

MAC address entries are added. Note the following:


l

You can add only unicast MAC addresses rather than multicast MAC addresses or special MAC addresses to a MAC address table. Special MAC addresses are reserved for special usage, such as MAC addresses of special packets. Establish the mapping between the VE interface and the PVC of the ATM interface and bind the VE interface to the VSI.

----End

1.3.5 Checking the Configuration


Run the following command to check the previous configuration. Action Check information about MAC address entries. Command display mac-address [ blackhole | mac-address ] display mac-address dynamic [slot-id ] [ vlan vlan-id | vsi vsi-name | source-slot source-slot-id | interface-type interface-number ] display mac-address static [ vlan vlan-id | vsi vsiname ] Display the statistics of MAC address entries. display mac-address summary

Run the display mac-address command. If information about the MAC address, the outbound interface corresponding to the MAC address, and the MAC address type is displayed, it means that the configuration succeeds. For example:
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 1-9

1 MAC Address Table Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

<Quidway> display mac-address MAC address table of slot 1: -------------------------------------------------------------------------------MAC Address VLAN/ PEVLAN CEVLAN Port Type LSP/ VSI/SI MAC-Tunnel -------------------------------------------------------------------------------0011-2233-4455 abc 1 GE1/0/1.10 static 2/0002-0002-0002 2 GE2/0/1 static -------------------------------------------------------------------------------Total matching items on slot 1 displayed = 2 MAC address table of slot 4: -------------------------------------------------------------------------------MAC Address VLAN/ PEVLAN CEVLAN Port Type LSP/ VSI/SI MAC-Tunnel -------------------------------------------------------------------------------0000-c102-0104 200 GE1/0/1 dynamic 0000-c102-0105 200 GE1/0/1 dynamic 0000-c102-0102 200 GE1/0/1 dynamic 0000-c102-0106 200 GE1/0/1 dynamic 0000-c102-0103 200 GE1/0/1 dynamic ------------------------------------------------------------------------------Total matching items on slot 4 displayed = 5

Display the statistics of MAC address entries on each LPU. For example:
<Quidway> display mac-address summary ----------------------------------------------------------Slot Total Blackhole Static Dynamic ----------------------------------------------------------1 6 0 2 4 2 6 0 1 5 -----------------------------------------------------------

1.4 Setting the Aging Time of a MAC Address Table


Describes how to configure the aging time of dynamic MAC address entries. 1.4.1 Establishing the Configuration Task 1.4.2 Setting the Aging Time of a MAC Address Table 1.4.3 Checking the Configuration

1.4.1 Establishing the Configuration Task


Applicable Environment
After the network topology changes, dynamic MAC entries are not automatically updated in time. In this case, user traffic cannot be normally forwarded because the device cannot learn the new MAC address. Thus, you need to configure the aging time of dynamic MAC addresses. When the set aging time expires, dynamic MAC address entries are automatically deleted. The device re-learns MAC addresses to generate a new dynamic MAC address type. The aging time is valid only on dynamic MAC address entries. The configurations in this section are optional.
1-10 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

1 MAC Address Table Configuration

Pre-configuration Tasks
None

Data Preparation
To configure the aging time of a MAC address table, you need the following data. No. 1 Data Aging time

1.4.2 Setting the Aging Time of a MAC Address Table


Context
Do as follows on all the devices:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


mac-address aging-time seconds

The aging time of a MAC address table is set. In a MAC address table, only dynamic entries age. The aging time ranges from 60 to 1000000 seconds. The default is 300 seconds. The aging time 0 means that no MAC address entry is aged. ----End

1.4.3 Checking the Configuration


Run the following command to check the previous configuration. Action Check the aging time of MAC address entries. Command display mac-address aging-time

Run the display mac-address aging-time command. If the aging time of MAC address entries is displayed, it means that the configuration succeeds. For example:
<Quidway> display mac-address aging-time Aging time: 300 seconds

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

1-11

1 MAC Address Table Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

1.5 Configuration Examples


Provides several configuration examples of the MAC address table. 1.5.1 Example for Configuring the MAC Address Table Based on the Interface and VLAN 1.5.2 Example for Configuring the MAC Address Table Based on the dot1q Termination Subinterface and VSI 1.5.3 Example for Configuring the MAC Address Table Based on the QinQ Termination Subinterface and VSI 1.5.4 Example for Configuring the MAC Address Table Based on the VLANIF Interface and VSI 1.5.5 Example for Configuring the MAC Address Table Based on the VLAN and Layer 2 VE Interface 1.5.6 Example for Configuring the MAC Address Table Based on the VSI and Layer 3 VE Interface

1.5.1 Example for Configuring the MAC Address Table Based on the Interface and VLAN
Networking Requirements
As shown in Figure 1-1, GE 1/0/0, GE 1/0/1, GE 2/0/0, and GE 2/0/1 on the router belong to VLAN 2. Set MAC address entries of PC1 on the router as static entries. Set the aging time of dynamic entries to 500 seconds. Figure 1-1 Networking diagram of configuring the MAC address table based on the interface and VLAN

Configuration Roadmap
The configuration roadmap is as follows:
1-12 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

1 MAC Address Table Configuration

1. 2. 3.

Create a VLAN and add an interface to the VLAN. Configure static MAC address entries. Configure the aging time.

Data Preparation
To complete the configuration, you need the following data:
l

MAC address of PC1~PC4: 0011-2233-44aa,0011-2233-44bb,0011-2233-44cc and 0011-2233-44dd VLAN ID The outbound interface that is connected to PC1~PC4 Aging time

l l l

Configuration Procedure
1. Switch GE 1/0/0, GE 1/0/1, GE 2/0/0, and GE 2/0/1 to Layer 2 ports.
<Quidway> system-view [Quidway] sysname Quidway [Quidway] interface gigabitethernet 1/0/0 [Quidway-GigabitEthernet1/0/0] undo shutdown [Quidway-GigabitEthernet1/0/0] portswitch [Quidway-GigabitEthernet1/0/0] quit [Quidway] interface gigabitethernet 1/0/1 [Quidway-GigabitEthernet1/0/1] undo shutdown [Quidway-GigabitEthernet1/0/1] portswitch [Quidway-GigabitEthernet1/0/1] quit [Quidway] interface gigabitethernet 2/0/0 [Quidway-GigabitEthernet2/0/0] undo shutdown [Quidway-GigabitEthernet2/0/0] portswitch [Quidway-GigabitEthernet2/0/0] quit [Quidway] interface gigabitethernet 2/0/1 [Quidway-GigabitEthernet2/0/1] undo shutdown [Quidway-GigabitEthernet2/0/1] portswitch [Quidway-GigabitEthernet2/0/1] quit

2.

Create VLAN 2 and add GE1/0/0, GE1/0/1, GE2/0/0, GE2/0/1 to VLAN 2.


[Quidway] vlan 2 [Quidway-vlan2] port gigabitethernet 1/0/0 1/0/1 2/0/0 2/0/1 [Quidway-vlan2] quit

3.

Configure static MAC address entries.


[Quidway] [Quidway] [Quidway] [Quidway] mac-address mac-address mac-address mac-address static static static static 0011-2233-44aa 0011-2233-44bb 0011-2233-44cc 0011-2233-44dd gigabitethernet gigabitethernet gigabitethernet gigabitethernet 1/0/0 1/0/1 2/0/0 2/0/1 vlan vlan vlan vlan 2 2 2 2

4. 5.

Set the aging time of dynamic entries to 500 seconds.


[Quidway] mac-address aging-time 500

Verify the configuration. # View the static MAC address table.


[Quidway] display mac-address static [Quidway] display mac-address static MAC address table of slot 1: ------------------------------------------------------------------------------MAC Address VLAN/ PEVLAN CEVLAN Port Type LSP/ VSI/SI MAC-Tunnel -------------------------------------------------------------------------------

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

1-13

1 MAC Address Table Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

0011-2233-44dd 2 GE2/0/1 static 2/0011-2233-44cc 2 GE2/0/0 static 2/0011-2233-44bb 2 GE1/0/1 static 1/0011-2233-44aa 2 GE1/0/0 static 1/------------------------------------------------------------------------------Total matching items displayed = 4

# View the aging time of the dynamic MAC address table.


[Quidway] display mac-address aging-time Aging time: 500 seconds

Configuration Files
# sysname Quidway # vlan batch 2 # mac-address aging-time 500 # interface GigabitEthernet1/0/0 undo shutdown portswitch port default vlan 2 mac-address static 0011-2233-44aa # interface GigabitEthernet1/0/1 undo shutdown portswitch port default vlan 2 mac-address static 0011-2233-44bb # interface GigabitEthernet2/0/0 undo shutdown portswitch port default vlan 2 mac-address static 0011-2233-44cc # interface GigabitEthernet2/0/1 undo shutdown portswitch port default vlan 2 mac-address static 0011-2233-44dd # return

GigabitEthernet1/0/0 vlan 2

GigabitEthernet1/0/1 vlan 2

GigabitEthernet2/0/0 vlan 2

GigabitEthernet2/0/1 vlan 2

1.5.2 Example for Configuring the MAC Address Table Based on the dot1q Termination Sub-interface and VSI
Networking Requirements
As shown in Figure 1-2, in a VPLS networking, PEs are connected to CEs through dot1q termination sub-interfaces. On PE1, set the user who accesses PE1 through CE1 and whose MAC address is 0011-2233-4455 as a static MAC entry.

1-14

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

1 MAC Address Table Configuration

Figure 1-2 Networking diagram of configuring the MAC address table based on the dot1q termination sub-interface and VSI

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Configure a VPLS network. Bind the dot1q termination sub-interface to the VSI Configure static MAC address entries.

Data Preparation
To complete the configuration, you need the following data:
l l l

MAC address of the user: 0011-2233-4455 GE 1/0/0.1, an interface on PE1 VSI named abc

Configuration Procedure
This chapter describes only the configuration procedures related to the MAC address table. For the VPLS configuration, refer to the Quidway NetEngine80E/40E Router Configuration Guide - VPN. 1. Create VSIs on PE1.
<PE1> system-view [PE1] vsi abc static [PE1-vsi-abc] pwsignal ldp [PE1-vsi-abc-ldq] vsi-id 1 [PE1-vsi-abc-ldq] quit [PE1-vsi-abc] quit

2.

Configure dot1q termination on GE 1/0/0.1.


[PE1] interface gigabitethernet [PE1-GigabitEthernet1/0/0] undo [PE1-GigabitEthernet1/0/0] mode [PE1-GigabitEthernet1/0/0] quit [PE1] interface gigabitethernet 1/0/0 shutdown user-termination 1/0/0.1

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

1-15

1 MAC Address Table Configuration


[PE1-GigabitEthernet1/0/0.1] [PE1-GigabitEthernet1/0/0.1] [PE1-GigabitEthernet1/0/0.1] [PE1-GigabitEthernet1/0/0.1]

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
undo shutdown control-vid 1 dot1q-termination dot1q termination vid 10 l2 binding vsi abc

3.

Configure the MAC address table based on the dot1q termination sub-interface and VSI.
[PE1-GigabitEthernet1/0/0.1] mac-address static 0011-2233-4455 gigabitethernet 1/0/0.1 vsi abc pe-vid 10

4.

Verify the configuration. # View the static MAC address table.


[PE1] display mac-address static MAC Address VLAN/ PEVLAN CEVLAN Port Type LSP/ VSI/SI MAC-Tunnel ------------------------------------------------------------------------------0011-2233-4455 abc 10 GE1/0/0.1 static 1/Total matching items displayed = 1

Configuration Files
# sysname PE1 # mpls lsr-id 1.1.1.1 mpls # mpls l2vpn # vsi abc static pwsignal ldp vsi-id 1 # interface GigabitEthernet1/0/0 undo shutdown mode user-termination # interface GigabitEthernet1/0/0.1 undo shutdown control-vid 1 dot1q-termination dot1q termination vid 10 l2 binding vsi abc mac-address static 0011-2233-4455 gigabitethernet 1/0/0.1 vsi abc pe-vid 10 # return

1.5.3 Example for Configuring the MAC Address Table Based on the QinQ Termination Sub-interface and VSI
Networking Requirements
As shown in Figure 1-2, in a VPLS networking, PEs are connected to CEs through QinQ termination sub-interfaces. On PE1, set the user who accesses PE1 through CE1 and whose MAC address is 0011-2233-4455 as a static MAC entry.

Configuration Roadmap
The configuration roadmap is as follows:
1-16 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

1 MAC Address Table Configuration

1. 2. 3.

Configure a VPLS network. Bind the QinQ termination sub-interface to the VSI Configure static MAC address entries.

Data Preparation
To complete the configuration, you need the following data:
l l l

MAC address of the user: 0011-2233-4455 GE 1/0/0.1, an interface on PE1 VSI named abc

Configuration Procedure
This chapter describes only the configuration procedures related to the MAC address table. For the VPLS configuration, refer to the Quidway NetEngine80E/40E Router Configuration Guide - VPN. 1. Create a VSI on PE1.
<PE1> system-view [PE1] vsi abc static [PE1-vsi-abc] pwsignal ldp [PE1-vsi-abc-ldq] vsi-id 1 [PE1-vsi-abc-ldq] quit [PE1-vsi-abc] quit

2.

Configure QinQ termination on GE 1/0/0.1.


[PE1] interface gigabitethernet 1/0/0 [PE1-GigabitEthernet1/0/0] undo shutdown [PE1-GigabitEthernet1/0/0] mode user-termination [PE1-GigabitEthernet1/0/0] quit [PE1] interface gigabitethernet 1/0/0.1 [PE1-GigabitEthernet1/0/0.1] undo shutdown [PE1-GigabitEthernet1/0/0.1] control-vid 1 qinq-termination [PE1-GigabitEthernet1/0/0.1] qinq termination pe-vid 10 ce-vid 100 to 200 [PE1-GigabitEthernet1/0/0.1] l2 binding vsi abc

3.

Configure the MAC address table based on the QinQ termination sub-interface and VSI.
[PE1-GigabitEthernet1/0/0.1] mac-address static 0011-2233-4455 gigabitethernet 1/0/0.1 vsi abc pe-vid 10 ce-vid 100

4.

Verify the configuration. # View the static MAC address table.


[PE1] display mac-address static MAC Address VLAN/ PEVLAN CEVLAN Port Type LSP/ VSI/SI MAC-Tunnel ------------------------------------------------------------------------------0011-2233-4455 abc 10 100 GE1/0/0.1 static 1/Total matching items displayed = 1

Configuration Files
# sysname PE1 # mpls lsr-id 1.1.1.1 mpls # mpls l2vpn

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

1-17

1 MAC Address Table Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

# vsi abc static pwsignal ldp vsi-id 1 # interface GigabitEthernet1/0/0 undo shutdown mode user-termination # interface GigabitEthernet1/0/0.1 undo shutdown control-vid 1 qinq-termination qinq termination pe-vid 10 ce-vid 100 to 200 l2 binding vsi abc mac-address static 0011-2233-4455 gigabitethernet 1/0/0.1 vsi abc pe-vid 10 ce-vid 100 # return

1.5.4 Example for Configuring the MAC Address Table Based on the VLANIF Interface and VSI
Networking Requirements
As shown in Figure 1-3, in a VPLS networking, PEs are connected to CEs through a VLANIF interface. On PE1, set the user who accesses PE1 through CE1 and whose MAC address is 0011-2233-4455 as a static MAC entry. Figure 1-3 Networking diagram of configuring the MAC address table based on the VLANIF interface and VSI

Configuration Roadmap
The configuration roadmap is as follows: 1. 2.
1-18

Configure a VPLS network. Configure a VLAN and create a VLANIF interface.


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

1 MAC Address Table Configuration

3. 4.

Bind the VLANIF interface to the VSI. Configure static MAC address entries.

Data Preparation
To complete the configuration, you need the following data:
l l l l l

MAC address of the user: 0011-2233-4455 VLAN ID of 10 GE 1/0/0, an interface in VLAN 10 VLANIF 10, an interface on PE1 VSI named abc

Configuration Procedure
This chapter describes only the configuration procedures related to the MAC address table. For the VPLS configuration, refer to the Quidway NetEngine80E/40E Router Configuration Guide - VPN. 1. Create a VSI on PE1.
<PE1> system-view [PE1] vsi abc static [PE1-vsi-abc] pwsignal ldp [PE1-vsi-abc-ldq] vsi-id 1 [PE1-vsi-abc-ldq] quit [PE1-vsi-abc] quit

2.

Configure a VLANIF interface. # Configure VLAN 10.


[PE1] vlan 10 [PE1-vlan10] quit

# Add GE 1/0/0 to VLAN 10.


[PE1] interface gigabitethernet 1/0/0 [PE1-GigabitEthernet1/0/0] undo shutdown [PE1-GigabitEthernet1/0/0] portswitch [PE1-GigabitEthernet1/0/0] port default vlan 10 [PE1-GigabitEthernet1/0/0] quit

# Create VLANIF 10 and bind it to the VSI.


[PE1] interface vlanif 10 [PE1-Vlanif10] l2 binding vsi abc [PE1-Vlanif10] quit

3. 4.

Configure a MAC address table based on VLANIF 10 and VSI.


[PE1] mac-address static 0011-2233-4455 gigabitethernet 1/0/0 vlanif 10 vsi abc

Verify the configuration. # View the static MAC address table.


[PE1] display mac-address static MAC Address VLAN/ PEVLAN CEVLAN Port Type LSP/ VSI/SI MAC-Tunnel ------------------------------------------------------------------------------0011-2233-4455 abc 10 GE1/0/0 static 1/Total matching items displayed = 1

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

1-19

1 MAC Address Table Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Configuration Files
# sysname PE1 # vlan batch 10 # mpls lsr-id 1.1.1.1 mpls # mpls l2vpn # vsi abc static pwsignal ldp vsi-id 1 # interface Vlanif10 l2 binding vsi abc # interface GigabitEthernet1/0/0 undo shutdown portswitch port default vlan 10 mac-address static 0011-2233-4455 gigabitethernet1/0/0 vlanif 10 vsi abc # return

1.5.5 Example for Configuring the MAC Address Table Based on the VLAN and Layer 2 VE Interface
Networking Requirements
NOTE

MAC address entries based on the VE interface can be configured only on the ATM interfaces of the ATM flexible plug-in card.

As shown in Figure 1-4, the hosts in two Ethernet networks are connected to the Digital Subscriber Line Access Multiplexer (DSLAM) through ADSL routers and access the ATM network through Router C. The specific networking is as follows:
l l l

The VE interface on Route C is added to VLAN 100. Configure an IP address for VLANIF 100 that acts as an IPoEoA gateway. The virtual path identifiers (VPIs) or virtual channel identifiers (VCIs) of the two PVCs through which Router C is connected to the DSLAM are 0/60 and 0/61 respectively. The two PVCs are connected to ADSL Router A and ADSL Router B respectively.

On Router C, to ensure that MAC address entries accessing workstation A in ATM 1483B mode are not dynamically aged, you can set these MAC address entries as static entries.

1-20

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

1 MAC Address Table Configuration

Figure 1-4 Networking diagram of configuring the MAC address table based on the VLAN and Layer 2 VE interface

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. 5. Create a VE interface and switch it to a Layer 2 interface. Create a VLAN and add the VE interface to the VLAN. Enter the ATM interface and create PVCs. Establish the mapping between the PVC and VE interface. Configure static MAC address entries.

Data Preparation
To complete the configuration, you need the following data:
l l l l l l

MAC address of workstation A: 00e0-3344-5566 VLAN ID of 100 VE 1/0/0 ATM 1/0/0 PVC named to_adsl_a VPI/VCI of the PVC network: 0/60

Configuration Procedure
1. Create VE 1/0/0 and switch it to a Layer 2 interface.
<Quidway> system-view [Quidway] sysname RouterC [RouterC] interface Virtual-Ethernet 1/0/0 [RouterC-Virtual-Ethernet1/0/0] undo shutdown [RouterC-Virtual-Ethernet1/0/0] portswitch [RouterC-Virtual-Ethernet1/0/0] quit

2.
Issue 03 (2008-09-22)

Create VLAN 1 and add VE 1/0/0 to VLAN 1.


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 1-21

1 MAC Address Table Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

[RouterC] vlan 100 [RouterC-vlan100] port Virtual-Ethernet 1/0/0 [RouterC-vlan100] quit

3.

Create a PVC and associate the VPI/VCI of 0/60 in the ATM network with VE 1/0/0.
[RouterC] interface atm 1/0/0 [RouterC-Atm1/0/0] undo shutdown [RouterC-Atm1/0/0] pvc to_adsl_a 0/60 [RouterC-atm-pvc-Atm1/0/0-0/60-to_adsl_a] map bridge Virtual-Ethernet 1/0/0 [RouterC-atm-pvc-Atm1/0/0-0/60-to_adsl_a] quit [RouterC-Atm1/0/0] quit

4.

Configure static MAC address entries.


[RouterC] mac-address static 00e0-3344-5566 virtual-ethernet 1/0/0 atm 1/0/0 pvc to_adsl_a 0/60 vlan 100

5.

Verify the configuration. Run the display mac-address static command. If information about MAC address entries is displayed, it means that the configuration succeeds. For example:
<RouterC> display mac-address static MAC Address VLAN/ PEVLAN CEVLAN Port Type LSP/ VSI/SI MAC-Tunnel -------------------------------------------------------------------------------00e0-3344-5566 100 VE1/0/0 static Total matching items displayed = 1

Configuration Files
# sysname RouterC # vlan batch 100 # interface Atm1/0/0 undo shutdown pvc to_adsl_a 0/60 map bridge Virtual-Ethernet1/0/0 # interface Virtual-Ethernet1/0/0 undo shutdown mac-address static 00e0-3344-5566 Virtual-Ethernet1/0/0 Atm1/0/0 pvc 0/60 vlan 100 portswitch port default vlan 100 # return

1.5.6 Example for Configuring the MAC Address Table Based on the VSI and Layer 3 VE Interface
Networking Requirements
NOTE

MAC address entries based on the VE interface can be configured only on the ATM interfaces of the ATM flexible plug-in card.

As shown in Figure 1-5, in the VPLS networking, CEs access PEs in ATM 1483B mode. To ensure that MAC address entries accessing the VPLS networking in ATM 1483B mode are not dynamically aged, you can set these MAC address entries as static entries. Set MAC address entries of PC1 as static entries.
1-22 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

1 MAC Address Table Configuration

Figure 1-5 Networking diagram of configuring the MAC address table based on the VSI and Layer 3 VE interface

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. 5. Configure a VPLS network. Enter the ATM interface and create PVCs. Establish the mapping between the PVC and VE interface. Bind the VE interface to the VSI. Configure static MAC address entries.

Data Preparation
To complete the configuration, you need the following data:
l l l l l l

MAC address of the user: 00e0-3344-5566 VLAN ID of 1 VE 1/0/0 ATM 1/0/0 PVC named pvcname1 VPI/VCI of the PVC network: 1/100

Configuration Procedures
This chapter describes only the configuration procedures related to the MAC address table. For the VPLS configuration, refer to the NE80E/40E Router Configuration Guide - VPN. Take PE1 as an example: 1. Create a VSI.
<Quidway> system-view [Quidway] sysname PE1 [PE1] vsi pvcname1 static

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

1-23

1 MAC Address Table Configuration


[PE1-vsi-pvcname1] pwsignal ldp [PE1-vsi-pvcname1-ldq] vsi-id 1 [PE1-vsi-pvcname1-ldq] quit [PE1-vsi-pvcname1] quit

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

2.

Create a PVC and associate the VPI/VCI of 1/100 in the ATM network with VE 1/0/0.
[PE1] interface atm 1/0/0 [PE1-Atm1/0/0] undo shutdown [PE1-Atm1/0/0] pvc pvcname1 1/100 [PE1-atm-pvc-Atm1/0/0-1/100-pvcname1] map bridge Virtual-Ethernet 1/0/0 [PE1-atm-pvc-Atm1/0/0-1/100-pvcname1] quit [PE1-Atm1/0/0] quit

3.

Configure static MAC address entries.


[PE1] mac-address static 00e0-3344-5566 Virtual-Ethernet 1/0/0 Atm 1/0/0 pvc 1/100 vsi pvcname1

4.

Bind VE 1/0/0 to the VSI.


[PE1] interface Virtual-Ethernet 1/0/0 [PE1-Virtual-Ethernet1/0/0] undo shutdown [PE1-Virtual-Ethernet1/0/0] l2 binding vsi pvcname1 [PE1-Virtual-Ethernet1/0/0] quit

5.

Verify the configuration. Run the display mac-address static command. You can view the information about MAC address entries. For example:
<PE1> display mac-address static MAC Address VLAN/ PEVLAN CEVLAN Port Type LSP/ VSI/SI MACTunnel -------------------------------------------------------------------------------00e0-3344-5566 pvcname1 VE1/0/0 static 3/Total matching items displayed = 1

Configuration Files
# sysname PE1 # mpls lsr-id 1.1.1.1 mpls # mpls l2vpn # vsi pvcname1 static pwsignal ldp vsi-id 1 # interface Atm1/0/0 undo shutdown pvc pvcname1 1/100 map bridge Virtual-Ethernet1/0/0 # interface Virtual-Ethernet1/0/0 undo shutdown mac-address static 00e0-3344-5566 Virtual-Ethernet 1/0/0 Atm 1/0/0 pvc 100/1 vsi pvcname1 l2 binding vsi pvcname1 # return

1.6 Troubleshooting
Describes how to diagnose and remove the operational fault of a MAC address table.
1-24 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

1 MAC Address Table Configuration

Fault Description
Failed to add a MAC address by using the mac-address command.

Fault Analysis
The possible causes can be:
l l l l l

The MAC address is a multicast address. The configured VLAN does not include the current configured port. The VE interface is not associated with the PVC. The configured VSI is not bound to the current configured port. The number of configured non-dynamic entries exceeds 1024.

Troubleshooting
1. 2. Check whether the configured MAC address is a multicast address. Multicast address entries are not allowed in a MAC address table. Use the display vlan vlan-id command to check whether the configured VLAN includes the current configured port. Ensure the configured VLAN includes the current configured port. When the interface configured with a MAC address is a VE interface, enter the corresponding ATM interface view and run the display this command to check whether this ATM interface is associated with the VE interface. When the interface configured with a MAC entry is a Layer 3 interface, run the display this command in the interface view to check whether the interface is bound to the corresponding VSI. Use the display mac-address command to check whether the configured non-dynamic entries exceed 1024. The system allows a maximum of 1024 non-dynamic entries.

3.

4.

5.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

1-25

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

2 Ethernet Interface Configuration

Ethernet Interface Configuration

About This Chapter


Describes the significance of the Ethernet network, the most important LAN networking technology and Ethernet interface configurations, along with typical examples. 2.1 Introduction Describes the concept and classification of the Ethernet interface. 2.2 Configuring Ethernet Interfaces of the LPU Describes how to configure Ethernet interfaces of the LPU 2.3 Configuring Ethernet Interfaces of the SRU Describes how to configure Ethernet interfaces of the SRU. 2.4 Configuring Ethernet Interface Layer 2 Parameters Discribes how to configure Ethernet Interface Layer 2 Parameters 2.5 Configuring SmartLink Flush Function Describes how to configure an Ethernet interface so that it can handle with SmartLink Flush messages. 2.6 Maintaining Ethernet Interfaces Describes how to maintain the Ethernet interface. 2.7 Configuration Examples Provides several configuration examples of the Ethernet interface. 2.8 Troubleshooting Describes how to remove common faults occur on the Ethernet interface.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

2-1

2 Ethernet Interface Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

2.1 Introduction
Describes the concept and classification of the Ethernet interface. 2.1.1 Introduction to Ethernet Interfaces 2.1.2 Features of Ethernet Interfaces Supported by the NE80E/40E

2.1.1 Introduction to Ethernet Interfaces


The Ethernet is one of the most important types of Local Area Network (LAN). The Ethernet is flexible, simple, and easy to be deployed. Therefore, it is the most important LAN networking technology. The LPU of the NE80E/40E supports the Ethernet interfaces such as the 10M/100M/1000M auto-sense Ethernet electrical interface, 100M Ethernet optical interface, GE optical interface, GE/FE optical/electrical interface, 10GE optical interface (LAN), and 10GE optical interface (WAN). SRU supports the 10M/100M/1000M auto-sense Ethernet electrical interface.
l

Traditional Ethernet interface: It complies with 10Base-T specifications, and can work at the speed of 10 Mbit/s. Fast Ethernet (FE) interface: It complies with 100Base-TX specifications and is compatible with 10Base-T specifications. Gigabit Ethernet (GE) interface: It complies with 1000Base-TX specifications, and is compatible with 10Base-T and 100Base-TX specifications.

The GE/FE optical/electrical interface has the following functions:


l

Provides the functions of a GE optical interface by the GE optical module plugged into the interface. Provides the functions of an FE optical interface by the FE optical module plugged into the interface. Provides the functions of a 10M/100M/1000M auto-sensing electrical interface by the electrical module plugged into the interface.

Ethernet electrical interfaces can work in either the full-duplex mode or the half-duplex mode. They support auto-negotiation. In the auto-negotiation mode, they negotiate with other network devices for the most suitable working mode and speed. This simplifies system configuration and management.
NOTE

This chapter explains the configuration of the FE and GE interfaces. The configuration of traditional Ethernet interface is simple and similar to that of the fast Ethernet interface.

2.1.2 Features of Ethernet Interfaces Supported by the NE80E/40E


Ethernet Sub-interface
2-2 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

2 Ethernet Interface Configuration

You can create the sub-interface on an Ethernet main interface. LAN interfaces that can be configured with sub-interfaces include the following types:
l l l

Ethernet interfaces GE interfaces Eth-Trunk interfaces

The NE80E/40E supports the configuration of sub-interfaces on both the Layer 3 Ethernet interface and the Layer 2 Ethernet interface. After Ethernet sub-interfaces are encapsulated with 802.1Q and associated with the VLAN, the VLAN can communicate with devices out of the VLAN through Ethernet sub-interface. An Ethernet sub-interface can associate with a maximum of 64 VLANs. The Ethernet sub-interface is also applied to dot1q termination and QinQ termination mode. For details about the principle, see the chapter "QinQ Configuration" in this manual. Besides the preceding applications, the Layer 2 Ethernet sub-interface can transmit the Layer 2 and Layer 3 services simultaneously on one physical link. As shown in Figure 2-1, the Universal Media Gateway (UMG) is dual-homed to two PEs. PE1 and PE2 run VRRP. A layer 2 link is required between PE1 and PE2 to prevent the route change when the UMG active/standby switchover is performed. At the same time, the TE tunnel is required between PE1 and remote PE3. The active TE tunnel is PE1 P1 PE3 and the standby TE tunnel is PE1 PE2 P2 PE3.A Layer 3 link is required between PE1 and PE2 to configure the Layer 3 service and TE tunnel. When a single physical link exists between PE1 and PE2, The Layer 2 Ethernet sub-interface is applicable. That is, a Layer 2 Ethernet sub-interface can be set up for the implementation of MPLS TE functions. Then, the Layer 2 primary interface can send VRRP packets as usual. Moreover, the route does not change because of the active/standby switchover. Figure 2-1 Typical application of a Layer 2 Ethernet sub-interface (VRRP + TE tunnel)

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

2-3

2 Ethernet Interface Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Handling the SmartLink Flush Packet


The Smart Link is a function supported by non-Huawei switches. The Smart Link adopts dual uplinks or downlinks to realize redundancy backup by active/standby switchover, and the switchover of Layer 2 traffic between the active link and standby link. To ensure that the Smart Link function can take effect on theses non-Huawei switches, Huawei data communication devices must be capable of recognizing and handling SmartLink Flush packets. In Figure 2-2 and Figure 2-3, Router A, Router B, and Router C are Huawei data communication devices, and the Switch is a non-Huawei switch that supports Smart Link function. In Figure 2-2, the ports of Router A, Router B, and Router C are working on Layer 2 and enable SmartLink Flush packets to be processed. Figure 2-2 Schematic diagram of the Smart Link in the normal state

As shown in Figure 2-2, the switch enables the Smart Link function with two uplinks, namely, an active link and a standby link. The active and standby links constitute the Smart Link Group, namely, a backup link group. Normally, the Layer 2 traffic flows to backbone network through active link. The standby link is blocked by Switch and cannot forward the traffic. If the active link fails, the traffic will quickly switch to the standby link, through which the traffic flows to backbone network as shown in Figure 2-3.

2-4

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

2 Ethernet Interface Configuration

Figure 2-3 Schematic diagram in which the active Smart link fails

When the active link fails, the Switch unblocks the standby link and at the same time, sends SmartLink Flush packets to notify other equipments on the network to delete dynamic MAC and ARP entries. The SmartLink Flush packet contains the control VLAN ID and all IDs of the VLANs whose packets are permitted on the Switch port that connects the active link. Through the control VLAN, the SmartLink Flush packets are transmitted in the control VLAN only. All VLAN IDs that are permitted passing the active link port are used to indicate the VLAN whose dynamic MAC and ARP entries need to be deleted. Router B processes SmartLink Flush packets as follows: 1. Compare the control VLAN ID of the port that receives the SmartLink Flush packet with the VLAN ID contained in the SmartLink Flush packet.
l

If they are the same, Router B deletes the dynamic MAC and ARP entries of the VLAN according to VLAN data contained in the SmartLink Flush packet. If they are different, the packet is directly forwarded.

2.

Router B broadcasts SmartLink Flush packets within the control VLAN. After receiving SmartLink Flush packets, Router A and Router C process packets in the same way as Router B. By now, Router A, Router B, and Router C have deleted the dynamic MAC and ARP entries before the active link fails. When the downstream traffic of the backbone network reaches Router C, Router C forwards the Layer 2 traffic to Router B according to the refreshed MAC and ARP entries. On Smart Link networking, after the active link returns to the normal state, to keep the stable traffic, the traffic does not switch back to the active link voluntarily.

2.2 Configuring Ethernet Interfaces of the LPU


Describes how to configure Ethernet interfaces of the LPU 2.2.1 Establishing the Configuration Task 2.2.2 Assigning an IP Address to an Ethernet Interface 2.2.3 Configuring the MTU of an Ethernet Interface
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 2-5

2 Ethernet Interface Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

2.2.4 Configuring the Working Mode of an Ethernet Interface 2.2.5 Configuring the Speed of an Ethernet Electrical Interface 2.2.6 Configuring the GE/FE Optical/Electrical Interface 2.2.7 Creating Ethernet Sub-Interfaces 2.2.8 Configuring Overhead Bytes of the 10GE WAN Interface 2.2.9 Configuring Flow Control on the GE Interface 2.2.10 Switching the Working Mode of an Ethernet Interface 2.2.11 Checking the Configuration

2.2.1 Establishing the Configuration Task


Applicable Environment
To configure the Ethernet to transmit data packets, you must configure Ethernet interfaces. When configuring an Ethernet interface, you must assign an IP address to it. For other parameters, you can use default values. If you have to change them, keep them consistent with the peer device. When a router has the function of the Layer 2 switch and the function is in use, you need to configure the Layer 2 parameters of the Ethernet interface.
NOTE

For the application of the Layer 2 features, refer to "VLAN Configuration" and "MSTP Configuration" in this manual.

Pre-configuration Tasks
None

Data Preparation
To configure an Ethernet interface, you need the following data. No. 1 2 3 Data Interface number IP address and mask of the Ethernet interface MTU of the Ethernet interface

2.2.2 Assigning an IP Address to an Ethernet Interface


2-6 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

2 Ethernet Interface Configuration

Context
For more information about IP address configuration, refer to the Quidway NetEngine80E/ 40E Router Configuration Guide - IP Services. Do as follows on each router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface gigabitethernet interface-number

The Ethernet interface view is displayed. Step 3 Run:


ip address ip-address { mask | mask-length } [ sub ]

The IP address of the Ethernet interface is configured. When you configure two or more IP addresses on an Ethernet interface, the IP address except for the first one can be indicated by the key word sub. ----End

2.2.3 Configuring the MTU of an Ethernet Interface


Context
NOTE

After changing the MTU using the mtu command on a specified interface, you need to restart the interface to validate the newly configured value. To restart the interface, run the shutdown and the undo shutdown commands in succession, or run the restart command in the interface view. If there are sub-interfaces, the shutdown and the undo shutdown commands must be configured at an interval of at least 15 seconds.

Do as follows on each router:

Procedure
l Configuring the IPv4 MTU 1. Run:
system-view

The system view is displayed. 2. Run:


interface gigabitethernet interface-number

The Ethernet interface view is displayed. 3. Run:


mtu mtu

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

2-7

2 Ethernet Interface Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

TheIPv4 MTU of the Ethernet interface is configured. The MTU is expressed in bytes. The MTU range of Ethernet interfaces depends on devices. By default, the MTU is 1500 bytes.

CAUTION
If IPv6 is run on an Ethernet interface and the MTU set by using the mtu command on the interface is smaller than 1280 bytes, IPv6 works abnormally on this interface. To avoid this situation, when IPv6 is run on an Ethernet interface, set the MTU of the interface to a value greater than or equal to 1280. l Configuring the IPv6 MTU 1. Run:
system-view

The system view is displayed. 2. Run:


interface { ethernet | gigabitethernet } interface-number

The Ethernet interface view is displayed. 3. Run:


ipv6 mtu mtu

The IPv6 MTU of the Ethernet interface is configured. The MTU is measured in bytes. The MTU range of Ethernet interfaces depends on physical devices. By default, MTU is 1500 bytes. ----End

Postrequisite
If the MTU is too small whereas the packet size is large, the packet is probably split into many fragments. Thus, the packet may be discarded due to the insufficient QoS queue length. To avoid this situation, lengthen the QoS queue accordingly. The default queue scheduling mechanism is First in First out (FIFO), and the queue length can be changed by using the qos fifo queuelength command in the interface view. For the configuration of a QoS queue, refer to the Quidway NetEngine80E/40E Router Configuration Guide - QoS.

2.2.4 Configuring the Working Mode of an Ethernet Interface


Context
Do as follows on each interface of the router:

Procedure
Step 1 Run:
system-view

2-8

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

2 Ethernet Interface Configuration

The system view is displayed. Step 2 Run:


interface { ethernet | gigabitethernet } interface-number

The Ethernet interface view is displayed. Step 3 Perform the following as required:
l l

Run the duplex { full | half | auto } command to configure the working mode of the interface. Run the negotiation auto command to configure the working mode of the interface to be the auto-negotiation mode.
NOTE

l l

Ethernet optical interfaces can work only in the full-duplex mode. When connected to a Hub, Ethernet electrical interfaces of a router must work in half-duplex mode. When connected to a LAN Switch, the interfaces can work in either full-duplex mode or half-duplex mode only if the mode is consistent with that on the peer device. The speed of 1000 Mbit/s and the half-duplex mode cannot be configured simultaneously on a GE electrical interface. When a GE electrical interface works in auto-negotiation mode and at a rate of 1000 Mbit/s, you cannot set the simplex or duplex mode for the interface or delete the auto-negotiation mode When a GE electrical interface works at a rate of 10 Mbit/s or 100 Mbit/s, you can set the simplex or duplex mode, and auto-negotiation mode for the interface. If the auto-negotiation mode is enabled on the GE optical interface, the two connected ends must enable the auto-negotiation mode.

l l l l

----End

2.2.5 Configuring the Speed of an Ethernet Electrical Interface


Context
The speed of electrical interfaces needs to be set; while that of optical interface need not be set. Do as follows on each router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface gigabitethernet interface-number

The interface view is displayed. Step 3 Run:


speed { 10 | 100 | 1000 | auto }

The speed on the Ethernet interface is configured.


Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 2-9

2 Ethernet Interface Configuration


NOTE

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

By default, GE electrical interfaces work at a rate of 1000 Mbit/s and in auto-negotiation mode. You can manually change the rate if you can ensure that the rate of the local interface is the same as that of the remote interface. When a GE electrical interface works at 10 Mbit/s or 100 Mbit/s, the auto-negotiation mode is deleted.

----End

2.2.6 Configuring the GE/FE Optical/Electrical Interface


Context
Do as follows on each router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface gigabitethernet interface-number

The Ethernet interface view is displayed. Step 3 Run:


port-type { copper | fiber-100 | fiber-1000 }

The interface type is set. Once the SFP module is identified, the system can automatically set the interface type according to the type of the SFP module. No configuration is required. If the SFP module that cannot be identified works well, you need to forcibly set the interface type. ----End

2.2.7 Creating Ethernet Sub-Interfaces


Context
Do as follows on the router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface gigabitethernet interface-number.subinterface-number

A sub-interface is created and the sub-interface view is displayed.


2-10 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

2 Ethernet Interface Configuration

subinterface-number is the number of the Ethernet sub-interface. The value ranges from 1 to 4096. You can create up to 1024 sub-interfaces on one Ethernet interface. Step 3 Run:
enable subinterface statistic

Enable the traffic statistics on the GigabitEthernet sub-interface. ----End

2.2.8 Configuring Overhead Bytes of the 10GE WAN Interface


Context
The 10GE WAN LPU shall adapt SDH/SONET during the packet processing. Therefore, the interface need configure the flag parameters. Do as follows on the routers:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface gigabitethernet interface-number

The 10GE interface view is displayed. Step 3 To configure the overhead bytes of the 10GE WAN interface, choose the following commands as required:
l

Run the flag j0 64byte-or-null-mode [ j0-value ] or the flag j0 { 16byte-mode | 1bytemode } j0-value command to configure the overhead byte j0. Run the flag j1 64byte-or-null-mode [ j1-value ] or the flag j1 { 16byte-mode | 1bytemode } j1-value command to configure the overhead byte j1. Run the flag c2 c2-value command to configure the overhead byte c2 of the 10GE WAN interface.

----End

2.2.9 Configuring Flow Control on the GE Interface


Context
Do as follows on the routers:

Procedure
Step 1 Run:
system-view

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

2-11

2 Ethernet Interface Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

The system view is displayed. Step 2 Run:


interface gigabitethernet interface-number

The GE interface view is displayed. Step 3 Run:


flow-control [ receive | send ]

The flow control function is enabled. By default, flow control is enabled on a GE interface. After flow control is enabled on an interface, the interface sends a Pause frame to notify the peer interface to send traffic at a slower rate, if the received traffic reaches the set threshold (for example, when the traffic rate on a GE interface exceeds 1 Gbit/s). If the peer interface also supports flow control, it sends traffic at a slower rate after receiving the Pause frame so that the local interface can process received frames properly. ----End

2.2.10 Switching the Working Mode of an Ethernet Interface


Context
After a Layer 3 interface switches to the Layer 2 mode, the Layer 3 ID and functions are disabled, and the MAC address is adopted. Do as follows on each router:

Procedure
l Switching the Working Mode of a Specified Ethernet Interface 1. Run:
system-view

The system view is displayed. 2. Run:


interface gigabitethernet interface-number

The specified Ethernet interface is displayed. 3. Run:


portswitch

The Ethernet interface is switched to a Layer 2 interface. l Switching the Working Mode of Ethernet Interfaces in Batch 1. Run:
system-view

The system view is displayed. 2. Run:


portswitch batch interface-type { interface-number1 [ to interfacenumber2 ] } &<1-10>

2-12

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

2 Ethernet Interface Configuration

The working mode of Ethernet interfaces are switched in batch. By default, Ethernet interfaces work in the Layer 3 mode. ----End

2.2.11 Checking the Configuration


Run the following commands to check the previous configuration. Action Check the status of the specified Ethernet interface. Check the brief information about the Ethernet interface. Command display interface gigabitethernet [ interface-number ] [ | { begin | exclude | include } regular-expression ] display interface ethernet brief [ | { begin | include | exclude } regular-expression ]

Run the display interface gigabitethernet command. You can view the MTU, IP address and mask, working speed and mode. For example:
<Quidway> display interface gigabitethernet 2/0/0 GigabitEthernet2/0/0 current state : UP Line protocol current state : UP Description : HUAWEI, Quidway Series, GigabitEthernet2/0/0 Interface, Route Port The Maximum Transmit Unit is 1500 bytes, Hold timer is 10(sec) Internet Address is 1.1.3.1/24 IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc01-0054 Media type: twisted-pair ,Link type: auto negotiation Loopback:none, Maximal BW:1G, Current BW:100M, full-duplex mode, Pause Flowcontrol:Send and Receive Enable Statistics last cleared:never Last 30 seconds input rate: 0 bits/sec, 0 packets/sec Last 30 seconds output rate: 0 bits/sec, 0 packets/sec Input: 0 Bytes, 0 Packets Output: 0 Bytes, 0 Packets Input: Unicast: 0, Multicast: 0 Broadcast: 0, JumboOctets: 0 CRC: 0, Symbol: 0 Overrun: 0 , InRangeLength: 0 LongPacket: 0 , Jabber: 0, Alignment: 0 Fragment: 0, Undersized Frame: 0 RxPause: 0 Output: Unicast: 0, Multicast: 0 Broadcast: 0, JumboOctets: 0 Lost: 0, Overflow: 0, Underrun: 0 TxPause: 0

Running the display interface ethernet brief command, you can view the brief information about the Ethernet interface. The information includes the physical status, auto-negotiation mode, full-duplex mode, interface rate, and the average bandwidth utility in the recent period in the receiving direction and sending direction.
<Quidway> display interface ethernet brief *down: administratively down ^down: standby (l): loopback (b): BFD down InUti/OutUti: input utility/output utility

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

2-13

2 Ethernet Interface Configuration


Interface GigabitEthernet0/0/0 GigabitEthernet2/0/0 GigabitEthernet2/0/1 GigabitEthernet2/0/2 GigabitEthernet3/0/0 GigabitEthernet3/0/1 GigabitEthernet3/0/1.1 GigabitEthernet3/0/2 GigabitEthernet3/0/3 Physical up up up down down down down up down

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
Auto-Neg enable disable disable disable enable enable enable enable enable Duplex Bandwidth half 100M full 1000M full 1000M full 1000M full 1000M full 100M full 100M full 1000M full 1000M InUti 0% 0.01% 0% 0% 0% 0% 0% 0.01% 0% OutUti 0% 0.01% 0% 0% 0% 0% 0% 0.01% 0%

2.3 Configuring Ethernet Interfaces of the SRU


Describes how to configure Ethernet interfaces of the SRU. 2.3.1 Establishing the Configuration Task 2.3.2 Assigning an IP Address to an Ethernet Interface 2.3.3 Configuring the Working Mode of an Ethernet Electrical Interface 2.3.4 Configuring the Speed of an Ethernet Electrical Interface 2.3.5 Configuring the Promiscuity Mode

2.3.1 Establishing the Configuration Task


Applicable Environment
Ethernet interface of the SRU is used to connect the network management station of the system.

Pre-configured Tasks
None

Data Preparation
To configure the Ethernet interface, you need the following data. No. 1 2 Data Ethernet interface number IP address and mask of the Ethernet interface

2.3.2 Assigning an IP Address to an Ethernet Interface


Context
For detailed information about IP address configuration, refer to the Quidway NetEngine80E/ 40E Router Configuration Guide - IP Services. Do as follows on the routers:
2-14 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

2 Ethernet Interface Configuration

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface gigabitethernet interface-number

The GigabitEthernet interface view is displayed. Step 3 Run:


ip address ip-address ip-mask [ sub ]

An IP address is assigned for the interface. Note that the parameter sub is used to configure the second or more IP addresses for the interface. ----End

2.3.3 Configuring the Working Mode of an Ethernet Electrical Interface


Context
Do as follows on the routers:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface gigabitethernet interface-number

The GigabitEthernet interface view is displayed. Step 3 Run


duplex { auto | half | full }

The working mode of the Ethernet electrical interface is configured. The Ethernet electrical interface can work in both full-duplex and half-duplex mode.
NOTE

l l

When connected to a Hub, Ethernet electrical interfaces of the router must work in half-duplex mode. When connected to a LAN Switch, Ethernet electrical interfaces of the routers can work in either fullduplex mode or half-duplex mode only if consistent with the configuration on the peer device.

By default, the auto mode, which is the best half-duplex mode of system auto-negotiation, is adopted. ----End
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 2-15

2 Ethernet Interface Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

2.3.4 Configuring the Speed of an Ethernet Electrical Interface


Context
Do as follows on the routers:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface gigabitethernet interface-number

The GigabitEthernet interface view is displayed. Step 3 Run:


speed { auto | 10 | 100 | 1000 }

The speed on the Ethernet electrical interface is configured. The NE80E/40E Ethernet electrical interface supports three kinds of operating speed: 10Mbit/ s, 100Mbit/s, and 1000Mbit/s. By default, the auto mode, which is the best half-duplex mode of system auto-negotiation, is adopted. You can specify the operating speed of an interface manually. Do keep the rate the same as that of the peer device. ----End

2.3.5 Configuring the Promiscuity Mode


Context
Do as follows on the routers:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface gigabitethernet interface-number

The GigabitEthernet interface view is displayed. Step 3 Run:


promode { on | off }

The Promiscuity Mode is set.


2-16 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

2 Ethernet Interface Configuration

By default, the promiscuity mode of the Ethernet interface on SRU is off. ----End

2.4 Configuring Ethernet Interface Layer 2 Parameters


Discribes how to configure Ethernet Interface Layer 2 Parameters 2.4.1 Establishing the Configuration Task 2.4.2 Configuring Link Layer Type of an Ethernet Interface 2.4.3 Configuring the 802.1p Priority of an Ethernet Interface

2.4.1 Establishing the Configuration Task


Applicable Environment
The Ethernet interfaces provided by the NE80E/40E can work in the following two modes: routed mode (Layer 3 mode) and switched mode (Layer 2 mode).
l

Routed mode: can be configured with the Layer 3 attributes and switched to the Layer 2 mode by commands. By default, the Ethernet interface is in the Layer 3 mode. Switched mode: can be configured with the Layer 2 attributes and switched to the Layer 3 mode by commands.

When the router is used as a Layer 2 switch, Layer 2 parameters are required on Ethernet interface.

Pre-configured Tasks
None

Data Preparation
To configure the Ethernet interface, you need the following data. No. 1 2 Data Ethernet interface number 802.1p priority value of the Ethernet interface

2.4.2 Configuring Link Layer Type of an Ethernet Interface


Context
The Ethernet interface supports four types of links: Access, dot1q-tunnel, Trunk and Hybrid.
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 2-17

2 Ethernet Interface Configuration


l

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Access: In this mode, the interface belongs to only one VLAN and is generally used to connect PCs. dot1q-tunnel: In this mode, the interface is enabled Q-in-Q function. Hybrid: In this mode, the interface can belong to multiple VLANs to receive and send packets of these VLANs. It is used to connect switches or PCs. Trunk: In this mode, the interface can belong to multiple VLANs to receive and send packets of these VLANs. It is used to connect switches.

l l

The difference between the Hybrid interface and the trunk interface lies that, the Hybrid interface allows transmitting untagged packets of multiple VLANs whereas the trunk interface allows that of the default VLAN only. Do as follows on the routers:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface gigabitethernet interface-number

The Ethernet interface view is displayed. Step 3 Run:


portswitch

The Ethernet interface is switched to Layer 2 mode. Step 4 Run:


port link-type { access | hybrid | trunk | dot1q-tunnel }

The interface type is specified. By default, the link type is Hybrid. ----End

2.4.3 Configuring the 802.1p Priority of an Ethernet Interface


Context
In the VLAN Tag, three bits are used to represent the 802.1p precedence, so that the configuration control is implemented. Do as follows on the routers:

Procedure
Step 1 Run:
system-view

The system view is displayed.


2-18 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

2 Ethernet Interface Configuration

Step 2 Run:
interface gigabitethernet interface-number

The Ethernet interface view is displayed. Step 3 Run:


portswitch

The Ethernet interface is switched to Layer 2 mode. Step 4 Run:


port priority priority-value

The 802.1p priority is configured. By default, the 802.1p priority of the interface is 0. ----End

2.5 Configuring SmartLink Flush Function


Describes how to configure an Ethernet interface so that it can handle with SmartLink Flush messages. 2.5.1 Establishing Application Environment of Configuration Task 2.5.2 Enabling a Port to Process SmartLink Flush Packets

2.5.1 Establishing Application Environment of Configuration Task


Some Layer 2 devices on network support the Smart Link function. By default, Huawei data communication devices do not process the SmartLink Flush packets sent by these devices. To ensure the Smart Link function to be enabled on these Layer 2 devices, Huawei data communication devices are required processing SmartLink Flush packets when working with non-Huawei switches supporting the Smart Link function on a network.

Pre-configuration Tasks
Before configuring equipment to process SmartLink Flush packets, complete the following tasks:
l

Ensuring that the physical interfaces on network devices are correctly connected and in the state of Up. Enabling the port that can process SmartLink Flush packets to allow the packet that carries the control VLAN tag passing.

Data Preparation
Before configuring equipment to process SmartLink Flush packets, you need the following data. No. 1
Issue 03 (2008-09-22)

Data Number of the interface that can recognize SmartLink Flush packets
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 2-19

2 Ethernet Interface Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

No. 2

Data Control VLAN ID

2.5.2 Enabling a Port to Process SmartLink Flush Packets


Context
Do as follows on routers that are deployed together with the switch enabled with the Smart Link function.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { ethernet | gigabitethernet } interface-number

The Ethernet interface view is displayed. Step 3 Run:


portswitch

The Ethernet interface is switched to Layer 2 mode. Step 4 Run:


smart-link flush enable control-vlan vlan-id

The Ethernet interface is switched to Layer 2 mode. The Ethernet interface is enabled to process SmartLink Flush packets. If the SmartLink Flush packet carries the control VLAN Tag, vlan-id must accord with the control VLAN ID in the SmartLink Flush packet. Otherwise, the equipment does not process this SmartLink Flush packet. ----End

2.6 Maintaining Ethernet Interfaces


Describes how to maintain the Ethernet interface. 2.6.1 Debugging Ethernet Interfaces

2.6.1 Debugging Ethernet Interfaces


2-20 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

2 Ethernet Interface Configuration

CAUTION
Debugging affects the performance of the system. So, after debugging, run the undo debugging all command to disable it immediately. When a fault occurs on an Ethernet interface, run the following debugging commands in the user view to locate the fault. For the procedure of displaying the debugging information, refer to "Maintenance and Debugging" in the Quidway NetEngine80E/40E Router Configuration Guide - System Management. Action Enable the debugging of the Ethernet interface. Enable the debugging of related process after Ethernet packets are received. Enable the debugging of the Ethernet interface based on the MAC address. Command debugging ethernet packet [ arp | error | ip | ipv6 | isis | l2vpn | mpls | pppoe ] [ verbose ] [ interface interface-type interface-number ] debugging ethernet packet process [ interface interface-type interface-number ]

debugging ethernet packet mac { dest_mac dest-mac | src_mac src_mac }

2.7 Configuration Examples


Provides several configuration examples of the Ethernet interface. 2.7.1 Example for Configuring a Layer 3 Ethernet Interface 2.7.2 Example for Configuring a Layer 2 Ethernet Interface to Join a VLAN 2.7.3 Example for Configuring VLANs to Communicate Through Ethernet Sub-interfaces 2.7.4 Example for Configuring Equipment to Handle Smartlink Flush Packets

2.7.1 Example for Configuring a Layer 3 Ethernet Interface


Networking Requirements
As shown in Figure 2-4, Ethernet interfaces of Router A, Router B, and Router C are connected to the IP network 202.38.165.0/24.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

2-21

2 Ethernet Interface Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Figure 2-4 Networking diagram of Ethernet interface configuration

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. Configure description about each router. Configure IP addresses for interfaces on each router.

Data Preparation
To configure an Ethernet interface, you need the following data:
l l

Interface number IP address of the interface

Configuration Procedure
1. Configure Router A.
<RouterA> system-view [RouterA] interface gigabitethernet 1/0/0 [RouterA-GigabitEthernet1/0/0] undo shutdown [RouterA-GigabitEthernet1/0/0] description RouterA [RouterA-GigabitEthernet1/0/0] ip address 202.38.165.1 255.255.255.0 [RouterA-GigabitEthernet1/0/0] quit

2.

Configure Router B.
<RouterB> system-view [RouterB] interface gigabitethernet 1/0/0 [RouterB-GigabitEthernet1/0/0] undo shutdown [RouterB-GigabitEthernet1/0/0] description RouterB [RouterB-GigabitEthernet1/0/0] ip address 202.38.165.2 255.255.255.0 [RouterB-GigabitEthernet1/0/0] quit

3.

Configure Router C.
<RouterC> system-view [RouterC] interface gigabitethernet 1/0/0 [RouterC-GigabitEthernet1/0/0] undo shutdown [RouterC-GigabitEthernet1/0/0] description RouterC [RouterC-GigabitEthernet1/0/0] ip address 202.38.165.3 255.255.255.0 [RouterC-GigabitEthernet1/0/0] quit

4.

Verify the configuration. After the configuration, using the following methods, you can check whether the interface works normally with the configuration.

2-22

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
l

2 Ethernet Interface Configuration

In the case of small traffic volume, ping Ethernet interfaces of a router from another router. The interfaces are normal if all the ping packets are returned. Check the statistics of a router. The interfaces are normal if the number of received error frames does not change.

Check the interface status of each router. In the normal situation, the physical status and protocol status are Up. Take Router A as an example:
<RouterA> display ip interface brief *down: administratively down !down: FIB overload down (l): loopback (s): spoofing The number of interface that is UP in Physical is 2 The number of interface that is DOWN in Physical is 0 The number of interface that is UP in Protocol is 2 The number of interface that is DOWN in Protocol is 0 Interface IP Address/Mask Physical GigabitEthernet1/0/0 202.38.165.1 up NULL0 unassigned up

Protocol up up(s)

Configuration Files
l

Configuration file of Router A


# sysname RouterA # interface GigabitEthernet1/0/0 undo shutdown ip address 202.38.165.1 255.255.255.0 description RouterA # return

Configuration file of Router B


# sysname RouterB # interface GigabitEthernet1/0/0 undo shutdown ip address 202.38.165.2 255.255.255.0 description RouterB # return

Configuration file of Router C


# sysname RouterC # interface GigabitEthernet1/0/0 undo shutdown ip address 202.38.165.3 255.255.255.0 description RouterC # return

2.7.2 Example for Configuring a Layer 2 Ethernet Interface to Join a VLAN


For details, refer to Example for Configuring a VLAN Based on Layer 2 Portsin the VLAN Configuration.
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 2-23

2 Ethernet Interface Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

2.7.3 Example for Configuring VLANs to Communicate Through Ethernet Sub-interfaces


For details, refer to Example for Configuring VLANs to Communicate Through Subinterfaces in the VLAN Configuration.

2.7.4 Example for Configuring Equipment to Handle Smartlink Flush Packets


Networking Requirements
As shown in Figure 2-5, Router A, Router B, and Router C are Huawei devices and the Switch supports the Smart Link function. The Smart Link is enabled on the Switch. Two uplinks constitute a Smart Link Group, namely, a backup link group. Router A is the active link for the Switch and Router B is the standby link. At last, the data reach the backbone network through Router C. The control VLAN ID of the Switch is 10. It requires the interfaces on Router A, Router B, and Router C to enable to process SmartLink Flush packet. This can help the Switch to realize the switchover between active and standby links. Figure 2-5 Networking diagram of configuring equipment to process Smart Link packets

Configuration Roadmap
The configuration roadmap is as follows:
2-24 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

2 Ethernet Interface Configuration

1. 2.

Change the interface on the router to Layer 2 mode and configure the port to allow packets from VLAN 10 to pass. Enable a Layer 2 port to recognize the SmartLink Flush packet.

Data Preparation
To complete the configuration, you need the following data:
l l

Control VLAN ID Number of the interface on the router

Configuration Procedure
NOTE

The example only provides Huawei routers with the configuration for supporting the SmartLink Flush packets.

1.

Configure the interface on a router # Create VLAN 1 to VLAN 4094 on Router A.


[RouterA] vlan batch 1 to 4094

# Switch the interfaces GE 1/0/0 and GE 2/0/0 on Router A to Layer 2 mode and configure them as VLAN trunk ports that allow all VLAN frames to pass.
[RouterA] interface gigabitethernet 1/0/0 [RouterA-GigabitEthernet1/0/0] undo shutdown [RouterA-GigabitEthernet1/0/0] portswitch [RouterA-GigabitEthernet1/0/0] port link-type trunk [RouterA-GigabitEthernet1/0/0] port trunk allow-pass vlan all [RouterA-GigabitEthernet1/0/0] quit [RouterA] interface gigabitethernet 2/0/0 [RouterA-GigabitEthernet2/0/0] undo shutdown [RouterA-GigabitEthernet2/0/0] portswitch [RouterA-GigabitEthernet2/0/0] port link-type trunk [RouterA-GigabitEthernet2/0/0] port trunk allow-pass vlan all [RouterA-GigabitEthernet2/0/0] quit

# Create VLAN 1 to VLAN 4094 on Router B.


[RouterB] vlan batch 1 to 4094

# Switch GE 1/0/0 and GE 2/0/0 on Router B to Layer 2 mode and configure them as VLAN trunk ports that allow all VLAN frames to pass.
[RouterB] interface gigabitethernet 1/0/0 [RouterB-GigabitEthernet1/0/0] undo shutdown [RouterB-GigabitEthernet1/0/0] portswitch [RouterB-GigabitEthernet1/0/0] port link-type trunk [RouterB-GigabitEthernet1/0/0] port trunk allow-pass vlan all [RouterB-GigabitEthernet1/0/0] quit [RouterB] interface gigabitethernet 2/0/0 [RouterB-GigabitEthernet2/0/0] undo shutdown [RouterB-GigabitEthernet2/0/0] portswitch [RouterB-GigabitEthernet2/0/0] port link-type trunk [RouterB-GigabitEthernet2/0/0] port trunk allow-pass vlan all [RouterB-GigabitEthernet2/0/0] quit

# Create VLAN 1 to VLAN 4094 on Router C.


[RouterC] vlan batch 1 to 4094

# Switch GE 1/0/0 and GE 2/0/0 on Router C to Layer 2 mode and configure them as VLAN trunk ports that allow all VLAN frames to pass.
[RouterC] interface gigabitethernet 1/0/0 [RouterC-GigabitEthernet1/0/0] undo shutdown [RouterC-GigabitEthernet1/0/0] portswitch

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

2-25

2 Ethernet Interface Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

[RouterC-GigabitEthernet1/0/0] port link-type trunk [RouterC-GigabitEthernet1/0/0] port trunk allow-pass vlan all [RouterC-GigabitEthernet1/0/0] quit [RouterC] interface gigabitethernet 2/0/0 [RouterC-GigabitEthernet2/0/0] undo shutdown [RouterC-GigabitEthernet2/0/0] portswitch [RouterC-GigabitEthernet2/0/0] port link-type trunk [RouterC-GigabitEthernet2/0/0] port trunk allow-pass vlan all [RouterC-GigabitEthernet2/0/0] quit

2.

Enable the port to recognize SmartLink Flush packets # Enable GE 1/0/0 and GE 2/0/0 on Router A to recognize SmartLink Flush packets.
[RouterA] interface gigabitethernet 1/0/0 [RouterA-GigabitEthernet1/0/0] smart-link flush enable control-vlan 10 [RouterA-GigabitEthernet1/0/0] quit [RouterA] interface gigabitethernet 2/0/0 [RouterA-GigabitEthernet2/0/0] smart-link flush enable control-vlan 10 [RouterA-GigabitEthernet2/0/0] quit

# Enable GE 1/0/0 and GE 2/0/0 on Router B to recognize SmartLink Flush packets.


[RouterB] interface gigabitethernet 1/0/0 [RouterB-GigabitEthernet1/0/0] smart-link flush enable control-vlan 10 [RouterB-GigabitEthernet1/0/0] quit [RouterB] interface gigabitethernet 2/0/0 [RouterB-GigabitEthernet2/0/0] smart-link flush enable control-vlan 10 [RouterB-GigabitEthernet2/0/0] quit

# Enable GE 1/0/0 and GE 2/0/0 on Router C to recognize SmartLink Flush packets.


[RouterC] interface gigabitethernet 1/0/0 [RouterC-GigabitEthernet1/0/0] smart-link flush enable control-vlan 10 [RouterC-GigabitEthernet1/0/0] quit [RouterC] interface gigabitethernet 2/0/0 [RouterC-GigabitEthernet2/0/0] smart-link flush enable control-vlan 10 [RouterC-GigabitEthernet2/0/0] quit

3.

Verify the configuration. # Run the display this command. You can check whether the smart-link flush enable command is configured and a correct VLAN ID is specified. Take Router A as an example:
[RouterA-GigabitEthernet1/0/0] display this # interface GigabitEthernet1/0/0 undo shutdown portswitch port link-type trunk port trunk allow-pass vlan 1 to 4094 smart-link flush enable control-vlan 10 #return

Configuration Files
l

Configuration file of Router A


# sysname RouterA # vlan batch 1 to 4094 # interface GigabitEthernet1/0/0 undo shutdown portswitch port link-type trunk port trunk allow-pass vlan 1 to 4094 smart-link flush enable control-vlan 10 # interface GigabitEthernet2/0/0 undo shutdown portswitch

2-26

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
port link-type trunk port trunk allow-pass vlan 1 to 4094 smart-link flush enable control-vlan 10 # return l

2 Ethernet Interface Configuration

Configuration file of Router B


# sysname RouterB # vlan batch 1 to 4094 # interface GigabitEthernet1/0/0 undo shutdown portswitch port link-type trunk port trunk allow-pass vlan 1 to 4094 smart-link flush enable control-vlan 10 # interface GigabitEthernet2/0/0 undo shutdown portswitch port link-type trunk port trunk allow-pass vlan 1 to 4094 smart-link flush enable control-vlan 10 # return

Configuration file of Router C


# sysname RouterC # vlan batch 1 to 4094 # interface GigabitEthernet1/0/0 undo shutdown portswitch port link-type trunk port trunk allow-pass vlan 1 to 4094 smart-link flush enable control-vlan 10 # interface GigabitEthernet2/0/0 undo shutdown portswitch port link-type trunk port trunk allow-pass vlan 1 to 4094 smart-link flush enable control-vlan 10 # return

2.8 Troubleshooting
Describes how to remove common faults occur on the Ethernet interface. 2.8.1 Pinging the Ethernet Interface Fails 2.8.2 Ethernet Interfaces Cannot Receive and Send Packets Normally 2.8.3 Ethernet Interfaces Discard Packets Severely

2.8.1 Pinging the Ethernet Interface Fails

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

2-27

2 Ethernet Interface Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Fault Description
Failed to ping an Ethernet interface of a router on PC.

Fault Analysis
The possible causes are:
l l

Link connection is incorrect. IP address or mask of the interface is incorrect.

Troubleshooting
1. Check whether the PC and the router are connected correctly. Check the status of the Link indicator of the Ethernet interface that connects the router and the PC.
l l

If the indicator is on, it indicates correct connection. If the indicator is off, check physical device, such as network card, network cable, and interface module of the router.

2.

Check that the IP address of the PC and that of the Ethernet interface on the router are in the same subnet.

2.8.2 Ethernet Interfaces Cannot Receive and Send Packets Normally


Fault Description
The display of the 100 Mbit/s Ethernet interface on a router shows that no connection is set up. The display of the 10 Mbit/s Ethernet interface on another router shows the connection is set up. However, the Active indicator on the physical layer constantly flashes, and packets cannot be received and sent normally.

Fault Analysis
The possible cause can be that the working speeds of the Ethernet interfaces on the two routers are not consistent. When the unshielded twisted pair is used in the Ethernet network, and at least one of two connected ends supports 100Base-TX, if the working speeds of two ends are not matched, the fault may occur.

Troubleshooting
Check that the working speeds of the two Ethernet interfaces are consistent.

2.8.3 Ethernet Interfaces Discard Packets Severely


2-28 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

2 Ethernet Interface Configuration

Fault Description
When network traffic increases, the router at one end displays severe network conflict, and the router at the other end displays that it receives a great amount of error packets. The two ends discard packets severely.

Fault Analysis
The possible cause can be that working modes of the routers at the two ends are not consistent.

Troubleshooting
Use the display interface ethernet command to check that the working modes of the Ethernet interfaces of two ends are consistent, that is, both of them must work in half-duplex or fullduplex mode.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

2-29

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3 LACP Configuration

3
About This Chapter

LACP Configuration

Describes the fundamentals, the configuration procedures and the configuration examples of Trunk interfaces and LACP. 3.1 Introduction Describes basic concepts of Eth-Trunk Interface. 3.2 Creating an Eth-Trunk Interface Describes how to create an Eth-Trunk interface. 3.3 Configuring Layer 2 Attributes for an Eth-Trunk Interface Describes how to configure an Eth-Trunk interface. 3.4 Configuring Layer 3 Attributes for an Eth-Trunk Interface Describes how to configure a Layer 3 Eth-Trunk interface. 3.5 Configuring an Eth-Trunk Sub-interface Describes how to configure an Eth-Trunk sub-interface. 3.6 Configuring Link Aggregation in Manual Load Balancing Mode Describes how to configure LACP in manual load balancing mode. 3.7 Configuring Link Aggregation in 1:1 Active/Standby Mode Describes how to configure LACP in 1:1 active/standby mode. 3.8 Configuring Link Aggregation in Static LACP Mode Describes how to configure LACP in static mode. 3.9 Maintaining Eth-Trunk Interface Describes how to maintain the Eth-Trunk interface. 3.10 Configuration Examples Provides several configuration examples of Eth-Trunk and IP-Trunk Interface.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

3-1

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3.1 Introduction
Describes basic concepts of Eth-Trunk Interface. 3.1.1 Introduction to the Eth-Trunk Interface and LACP 3.1.2 Eth-Trunk Interface and LACP Features Supported by the NE80E/40E

3.1.1 Introduction to the Eth-Trunk Interface and LACP


Eth-Trunk Interface
Trunk interfaces are classified into Eth-Trunk interfaces and IP-Trunk interfaces. The Eth-Trunk consists of Ethernet links only. For details of IP-Trunk interface configuration, refer to the Quidway NetEngine80E/40E Router configuration Guide - WAN Access. A maximum of 64 trunk interfaces (including Eth-Trunk and IP-Trunk) can be created on a router, and each trunk interface contains up to 16 physical member links. The trunk technology has the following advantages:
l

Increasing bandwidth: The bandwidth of an Eth-Trunk interface is the sum of all the bandwidth of member interfaces. Improving reliability: If a member link fails, the traffic automatically switches to another available links.

An Eth-Trunk interface has the following characteristics:


l l

Supports the features supported by the Ethernet interface. Supports the configured IP addresses, and member trunk interfaces can borrow the IP address. Supports Layer 2 forwarding, MPLS forwarding, and Layer 3 forwarding including unicast and multicast. The Hash algorithm can be used in load balancing by flow. Supports QoS based on physical interfaces and logical interfaces. Supports MPLS and binding VPN instances. Supports hot backup and hot swap. Supports APDP.
NOTE

l l l l

Eth-Trunk sub-interfaces are used between VLANs. For the configuration of Eth-Trunk sub-interfaces, refer to the chapter "VLAN Configuration" in this manual.

LACP
Link aggregation refers to a method of binding a group of physical interfaces as a logical interface to increase the bandwidth. Link aggregation is called multi-interface load balancing group or link aggregation group (LAG). For more information about link aggregation, refer to IEEE802.3ad.
3-2 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3 LACP Configuration

By setting up an LAG between two devices, you can obtain higher bandwidth and greater reliability. The link aggregation provides redundancy protection for communications among devices without upgrading the hardware.
l

Active and Inactive Interfaces The interfaces in the active state that are responsible for forwarding data are active interfaces. On the contrary, the interfaces in the inactive state that do not forward data are inactive interfaces. According to the operation modes, active and inactive interfaces are classified as follows:

Manual load balancing mode: Generally, all member interfaces are active ones unless a fault occurs on these interfaces. 1:1 active/standby mode: Normally, the primary interface is the active interface and the backup interface is the inactive interface. When the primary interface fails, the backup interface is activated and the primary interface becomes the inactive interface. Static LACP mode: The interfaces connected to M links are active interfaces. The active interfaces are responsible for forwarding data. The interfaces connected to N links are inactive interfaces. The inactive interfaces are responsible for backup.

Actor and Partner In static LACP mode, the device with a higher LACP priority at both ends of an LAG is the Actor and the device with a lower LACP priority is the Partner. Differentiating the Actor and the Partner is to keep the active interfaces of devices at both ends the same. If devices at both ends select active interfaces according to the priority of their own interfaces, the active interfaces are different and the active links cannot be set up. Therefore, the Actor is first determined. The Partner selects active interfaces according to the priority of the interfaces of the Actor, as shown in Figure 3-1.

Figure 3-1 Determining the active links by the Actor in static LACP mode
RouterA RouterB

The device with higher system priority

The device with lower system priority The Actor determines the active links

RouterA

RouterB

Control VLAN In 1:1 active/standby mode, the VLAN that sends or receives flush packets is the control VLAN.

3.1.2 Eth-Trunk Interface and LACP Features Supported by the NE80E/40E

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

3-3

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Lower and Upper Threshold for the Number of Up Links


The number of trunk member links in the Up state affects the status and bandwidth of the EthTrunk interface. To maintain stability, you can set the threshold to limit the number of trunk member interfaces in the Up state, and thus to reduce the impact brought about by the status change of member interfaces.
l

Lower threshold for the number of Up links: When the number of Up member links is less than the threshold, the Eth-Trunk interface becomes Down. Upper threshold for the number of Up links: When the number of Up member links reaches the threshold, the increasing of UP member links does not affect the bandwidth of the trunk interface. That is, the bandwidth of the trunk does not increase; however, when member link becomes Down, the bandwidth of the trunk decreases.

Load Balancing
In an Eth-Trunk, member interfaces can balance the traffic after they are set with different weights. Load balancing can be carried out in the following ways:
l

Session-by-session load balancing: The packets with the same source and destination IP addresses or with the same source and destination MAC addresses pass through the same member link. Layer 2 Eth-Trunk interfaces support only session-by-session load balancing based on the source and destination MAC addresses of packets. Layer 3 Eth-Trunk interfaces support only session-by-session load balancing based on the source and destination IP addresses of packets.

Packet-by-packet load balancing: One packet travels on one link and the next packet is sent out on another link. Both Layer 2 and Layer 3 Eth-Trunk interfaces support packet-by-packet load balancing.

Backup
To improve the reliability of an Eth-Trunk interface, you can configure backup interfaces for member interfaces. When one interface in the Eth-Trunk group becomes Down, the traffic rapidly switches to other interfaces in the Eth-Trunk group. That is, other Up interfaces in the Eth-Trunk group function as the auxiliary interfaces.
NOTE

For the trunk whose member interfaces reside on different LPUs, you should create a BFD session to detect the link between member interfaces of the trunk, and use the process_pst command to associate the BFD session with the status of the interface. Otherwise, the traffic may be lost in some situations. For example, the LPU where the member interface of the trunk resides is restarted. For the configuration of BFD, refer to the Quidway NetEngine80E/40E Router Configuration Guide Reliability.

Eth-Trunk Sub-interfaces
Besides on the Eth-Trunk main interface, in the NE80E/40E, sub-interfaces can be created on both the Layer 3 Ethernet interface and the Layer 2 Eth-Trunk interface.
3-4 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3 LACP Configuration

After Eth-Trunk sub-interface is encapsulated with 802.1Q and associated with VLAN, the VLAN can communicate with devices out of VLAN through Eth-Trunk sub-interfaces. The Eth-Trunk sub-interface is also used in dot1q termination and QinQ termination mode. For details about the principle, see the chapter "QinQ Configuration" in this manual. Besides the preceding applications, the Layer 2 Eth-Trunk sub-interface transmits the Layer 2 and Layer 3 services simultaneously along one physical link. As shown in Figure 3-2, the backbone of the MAN is a Layer 2 Eth-Trunk ring network that supports QinQ services. On the Eth-Trunk ring network, each NE80E/40E node is connected to a Layer 2 ring network comprising several switches. The digital subscriber line access multiplexer (DSLAM) devices connect to switches and access the roadband remote access servers (BRASs) through VLAN mapping over the Layer 2 ring network and the Eth-Trunk network. For the successful implementation of the application , the entire Eth-Trunk ring network needs to support Layer 2 functions. At the same time, CEs can access the NE80E/40E and L3VPN services through the TE tunnel. This requires the Layer 2 interfaces of the NE80E/40Es forming an Eth-Trunk ring network can support the TE tunnel of Layer 3 interfaces simultaneously. Then, you can use a Layer-2 Eth-Trunk sub-interface. Thus, the main interface of the Eth-Trunk ring network performs Layer 2 functions and Layer 2 Eth-Trunk sub-interfaces perform MPLS TE functions. Figure 3-2 Typical application of the Layer 2 Eth-Trunk interface (Eth-Trunk ring network)

Manual Load Balancing Mode


In manual load balancing mode, you can manually add member interfaces to an LAG. All interfaces transmit packets. The manual load balancing mode that the NE80E/40E supports is IP, MAC, and Packet-all. IP and MAC are applicable to the flow-based load balancing and Packet-all to the packet-based load balancing.
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 3-5

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Manual 1:1 Active/Standby Mode


In 1:1 active/standby mode, an LAG contains only two member interfaces. One interface is the primary interface and the other is the backup interface. In manual mode, you must manually set up an Eth-Trunk and add an interface to the Eth-Trunk. You must also manually configure member interfaces to be in the active state. The Link Aggregation Control Protocol Date Units (LACPDUs) are not required. The manual load balancing mode is used when the peer device does not support Link Aggregation Control Protocol (LACP).

Static LACP Mode


Static LACP mode refers to a link aggregation method that determines active and inactive interfaces by negotiating parameters through LACPDUs. In static LACP mode, you must manually set up an Eth-Trunk and determine active and inactive interfaces by negotiating parameters through LACPDUs. Static LACP mode is also called M: N mode. In static LACP mode, load balancing and backup are carried out. In an LAG, M links are active to forward data and perform load balancing. In addition, the other N links are inactive. The N links function as backup links and do not forward data. When a link of M links fails, the system selects the link with the highest priority from N backup links to replace the faulty link. At the same time, the link becomes active and starts to forward data.

3.2 Creating an Eth-Trunk Interface


Describes how to create an Eth-Trunk interface. 3.2.1 Establishing the Configuration Task 3.2.2 Creating an Eth-Trunk 3.2.3 Adding an Ethernet Interface into an Eth-Trunk 3.2.4 Checking the Configuration

3.2.1 Establishing the Configuration Task


Applicable Environment
To improve the communication ability of links, bind multiple Ethernet ports to form an EthTrunk interface to increase bandwidth. Eth-Trunk interfaces can realize load balancing. Traffic to the same destination is transported on different member links to avoid congestion. In addition, Eth-Trunk interfaces can improve link reliability. If a member port is Down, traffic is switched to other available ports.

Pre-configuration Tasks
Before creating an Eth-Trunk interface, complete the task of powering on the router or switch and starting it normally
3-6 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3 LACP Configuration

Data Preparation
To create an Eth-Trunk interface, you need the following data. No. 1 2 Data Eth-Trunk ID Type and number of Eth-Trunk member ports

3.2.2 Creating an Eth-Trunk


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface eth-trunk trunk-id

An Eth-Trunk is created. ----End

3.2.3 Adding an Ethernet Interface into an Eth-Trunk


Procedure
l Configuration in the Eth-Trunk Interface View 1. Run:
system-view

The system view is displayed. 2. Run:


interface eth-trunk trunk-id

The Eth-Trunk interface view is displayed. 3. Run the following command as required.
trunkport interface-type { interface-number1 [ to interface-number2 ] } &<1-16>

The member interfaces are added in batches.


trunkport interface-type interface-number1

A member interface is added. When you specify the range of member interfaces, you can add or delete a maximum of 16 member interfaces once. l
Issue 03 (2008-09-22)

Configuration in the Member Interface View


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 3-7

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

1.

Run:
system-view

The system view is displayed. 2. Run:


interface { ethernet | gigabitethernet } interface-number

The view of the interface to be added to the Eth-Trunk is displayed. 3. Run:


eth-trunk trunk-id

The current interface is added into the Eth-Trunk. Before adding member interfaces, note the following:

Ensure the interfaces are not configured with Layer 3 configuration such as IP address, and any services. Member interfaces cannot be configured with automatic negotiation attributes, permanent and static MAC addresses. Member interfaces of an Eth-Trunk cannot be Eth-Trunk. An Ethernet interface can join only one Eth-Trunk interface. To join another EthTrunk interface, the interface must quit from the original Eth-Trunk first. Ethernet interfaces of different interface boards can be added into an Eth-Trunk. For a router, if a member interface is a Layer 2 interface, the interface can be added into an Eth-Trunk only after it is switched to a Layer 3 interface by using the undo portswitch command. Eth-Trunk has two working modes: Layer 2 mode and Layer 3 mode. An Ethernet port can be added into either a Layer 2 Eth-Trunk or a Layer 3 Eth-Trunk. If an Eth-Trunk is created on a local device, the peer device interfaces that are directly connected with the member interfaces must be bound to an Eth-Trunk interface. Otherwise, the two ends cannot communicate.

----End

3.2.4 Checking the Configuration


Run the following command to check the previous configuration. Action Check information about Eth-Trunk member interfaces. Command display trunkmembership eth-trunk trunk-id

Run the display trunkmembership eth-trunk command. If information about usage state of member interfaces, network protocol status, and link status is displayed, it means that the configuration succeeds. For example:
<Quidway> display trunkmembership eth-trunk 0 Trunk ID: 0 used status: VALID TYPE: ethernet Working Mode : Normal

3-8

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3 LACP Configuration

Working State: Normal Number Of Ports in Trunk = 2 Number Of UP Ports in Trunk = 2 operate status: up ip status: not configed link status: up Interface GigabitEthernet1/0/0, valid, selected, operate up, weight=1, standby interface NULL Interface GigabitEthernet1/0/1, valid, selected, operate up, weight=1, standby interface NULL

3.3 Configuring Layer 2 Attributes for an Eth-Trunk Interface


Describes how to configure an Eth-Trunk interface. 3.3.1 Establishing the Configuration Task 3.3.2 Configuring Working Mode of an Eth-Trunk Interface 3.3.3 (Optional) Configuring the Lower Threshold of Up Links 3.3.4 (Optional) Configuring the Upper Threshold of Up Links 3.3.5 (Optional) Configuring an Eth-Trunk Interface to Carry out Load Balancing 3.3.6 (Optional) Configuring the Method of Sending Traps on Eth-Trunk Member Interfaces 3.3.7 Checking the Configuration

3.3.1 Establishing the Configuration Task


Applicable Environment
To add an Eth-Trunk interface into a VLAN, you need to configure Layer 2 attributes for the Eth-Trunk interface. Layer 2 Eth-Trunk interfaces are mainly used in trunk interfaces in VLANs to increase the bandwidth for communication between the VLANs of two devices. The configuration procedures in this section are optional.

Pre-configuration Tasks
Before configuring Layer 2 attributes for an Eth-Trunk interface, complete the task of Creating an Eth-Trunk Interface.

Data Preparation
To configure Layer 2 attributes for an Eth-Trunk interface, you need the following data. No. 1
Issue 03 (2008-09-22)

Data Eth-Trunk ID
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 3-9

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

No. 2 3 4 5

Data Type and number of Eth-Trunk member interfaces Upper and lower threshold of the member links in the Up state Weights of member interfaces Mode of sending trap messages on Eth-Trunk member interfaces

3.3.2 Configuring Working Mode of an Eth-Trunk Interface


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface eth-trunk trunk-id

The Eth-Trunk interface view is displayed. Step 3 Run:


portswitch

The Layer 3 Eth-Trunk interface is converted to a Layer 2 interface. By default, an Eth-Trunk interface operates in Layer 3 mode. After an Eth-Trunk interface is switched to Layer 2 mode, its Layer 3 functions are disabled, and its MAC address is adopted. To add an Eth-Trunk interface into a VLAN, switch the interface from Layer 3 mode to Layer 2 mode. Before the switching, delete all configurations on the interface. Using the undo portswitch command, you can switch a Layer 2 Eth-Trunk interface to Layer 3 mode.
NOTE

l l

The minimum interval for running the portswitch and undo portswitch commands continually is 30 seconds. The working mode of an Eth-Trunk interface does not affect the addition of member interfaces, for example, an Ethernet interface can join either a Layer 2 Eth-Trunk or a Layer 3 Eth-Trunk interface.

----End

3.3.3 (Optional) Configuring the Lower Threshold of Up Links


Procedure
Step 1 Run:
3-10 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
system-view

3 LACP Configuration

The system view is displayed. Step 2 Run:


interface eth-trunk trunk-id

The Eth-Trunk interface view is displayed. Step 3 Run:


portswitch

The Layer 3 Eth-Trunk interface is converted to a Layer 2 interface. Step 4 Run:


least active-linknumber link-number

The lower threshold of member links in the Up state is configured. By default, the lower threshold is 1. That is, an Eth-Trunk remains Up as long as one member interface is Up.
NOTE

l l

The lower threshold of links in the Up state can be configured in both Layer 2 mode and Layer 3 mode. To ensure normal forwarding, it is recommended to configure the same lower threshold for the trunk interfaces on both ends of the same trunk link.

----End

3.3.4 (Optional) Configuring the Upper Threshold of Up Links


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface eth-trunk trunk-id

The Eth-Trunk interface view is displayed. Step 3 Run:


portswitch

The Eth-Trunk interface is switched to Layer 2 mode. Step 4 Run:


max bandwidth-affected-linknumber link-number

The upper threshold of member links in the Up state is configured. By default, the upper threshold is 16.
NOTE

The max bandwidth-affected-linknumber command is valid for Layer 2 Eth-Trunk interfaces only.

----End
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 3-11

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3.3.5 (Optional) Configuring an Eth-Trunk Interface to Carry out Load Balancing


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface eth-trunk trunk-id

The Eth-Trunk interface view is displayed. Step 3 Run:


portswitch

The Eth-Trunk interface is switched to the Layer 2 mode. Step 4 Run:


load-balance { mac | packet-all | ip }

Load balancing is configured on the Eth-Trunk interface.


l

MAC-based load balancing ensures the correctness of packet order but not high bandwidth utilization. Packet-based load balancing ensures high bandwidth utilization but not the correctness of packet order.

By default, load balancing is carried out based on MAC addresses when an Eth-Trunk interface works in Layer 2 mode. ----End

3.3.6 (Optional) Configuring the Method of Sending Traps on EthTrunk Member Interfaces
Context
Do as follows on the devices configured with the Eth-Trunk.

Procedure
Step 1 Run:
system-view

The system view is entered. Step 2 Run:


trunk-member trap in private-mib enable

Traps are sent by the private MIB when the status of Eth-Trunk member interfaces goes Up or Down.
3-12 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3 LACP Configuration

By default, traps are sent by the public MIB when the status of the Eth-Trunk member interfaces goes Up or Down. Traps sent through the public MIB contain no information about the Eth-Trunk interface. To send traps carrying information about Eth-Trunk interfaces,use this command to send traps through private MIBs. ----End

3.3.7 Checking the Configuration


Run the following commands to check the previous configuration. Action Check status information about an EthTrunk interface. Check brief information about the EthTrunk interface, including physical status, protocol status, and bandwidth utilization. Command display interface eth-trunk [ trunk-id ] [ | { begin | exclude | include } regular-expression ] display interface brief [ | { begin | include | exclude } regular-expression ]

Run the display interface eth-trunk command. If information includes IP address, MAC address, and load balancing is displayed, it means the configuration succeeds. For example:
<Quidway> display interface Eth-Trunk 1 Eth-Trunk1 current state : UP Line protocol current state : UP Description : HUAWEI, Quidway Series, Eth-Trunk1 Interface, Switch Port Hash arithmatic : According to MAC The Maximum Transmit Unit is 1500 bytes Internet protocol processing : disabled IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc09-9722 Physical is ETH_TRUNK Last 300 seconds input rate 0 bytes/sec, 0 packets/sec Last 300 seconds output rate 0 bytes/sec, 0 packets/sec Input: 1 packets,3 bytes, 7 unicast,9 broadcast,8 multicasts 10 errors,5 drops,11 unknowprotocol Output: 2 packets,4 bytes, 12 unicast,14 broadcast,13x multicasts 15 errors,6 drops ----------------------------------------------------PortName Status Weight ----------------------------------------------------Ethernet6/0/0 UP 1 ----------------------------------------------------The Number of Ports in Trunk : 1 The Number of UP Ports in Trunk : 1

Run the display interface brief [ | { begin | include | exclude } regular-expression ] command. You can view brief information about Eth-Trunk interface, such as physical status, link protocol status, bandwidth utilization, and error packet number. For example:
<Quidway> display interface brief | begin Eth-Trunk *down: administratively down ^down: standby (l): loopback (s): spoofing

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

3-13

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

(b): BFD down (d): Dampening Suppressed InUti/OutUti: input utility/output utility Interface Physical Protocol Eth-Trunk1 up up GigabitEthernet2/0/1 up up GigabitEthernet3/0/18 up up Eth-Trunk1.1 up up

InUti/OutUti 0% 0% 0% 0% 0% 0% 0% 0%

inErrors/outErrors 0 0 0 0 0 0 0 0

3.4 Configuring Layer 3 Attributes for an Eth-Trunk Interface


Describes how to configure a Layer 3 Eth-Trunk interface. 3.4.1 Establishing the Configuration Task 3.4.2 Configuring an IP address for an Eth-Trunk Interface 3.4.3 (Optional) Configuring a MAC Address for the Eth-Trunk Interface 3.4.4 (Optional) Configuring the Lower Threshold of Up Links 3.4.5 (Optional) Configuring Load-balancing Mode for the Eth-Trunk Interface 3.4.6 (Optional) Configuring Weights for Member Links 3.4.7 (Optional) Configuring the Method of Sending Traps on Eth-Trunk Member Interfaces 3.4.8 Checking the Configuration

3.4.1 Establishing the Configuration Task


Applicable Environment
To use an Eth-Trunk interface as a Layer 3 interface, you need to configure Layer 3 attributes for the Eth-Trunk interface. The configuration procedures in this section are optional.

Pre-configuration Tasks
Before configuring Layer 3 attributes for an Eth-Trunk interface, complete the task of creating an Eth-Trunk interface.

Data Preparation
Before configuring Layer 3 attributes for the Eth-Trunk interface, you need the following data. No. 1 2 3
3-14

Data IP address of the Eth-Trunk interface MAC address of the Eth-Trunk interface Lower threshold of the member links in the Up state
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3 LACP Configuration

No. 4 5

Data Weights of member interfaces Number of the backup Eth-Trunk interface

3.4.2 Configuring an IP address for an Eth-Trunk Interface


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface eth-trunk trunk-id

The Eth-Trunk interface view is displayed. Step 3 Run:


ip address ip-address { mask | mask-length } [ sub ]

The IP address of the Eth-Trunk interface is configured. ----End

3.4.3 (Optional) Configuring a MAC Address for the Eth-Trunk Interface


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface eth-trunk trunk-id

The Eth-Trunk interface view is displayed. Step 3 Run:


mac-address mac-address

The MAC address of the Eth-Trunk interface is configured.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

3-15

3 LACP Configuration
NOTE

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

The mac-address command is valid for Layer 3 Eth-Trunk interfaces only. If a large number of trunk sub-interfaces exist and the MAC address of the trunk is changed, many ARP update packets are sent to the peer. If the peer is configured with CP CAR, you should increase the bandwidth to transmit ARP packets. This avoids the loss of ARP update packets.

----End

3.4.4 (Optional) Configuring the Lower Threshold of Up Links


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface eth-trunk trunk-id

The Eth-Trunk interface view is displayed. Step 3 Run:


least active-linknumber link-number

The lower threshold of member links in the Up state is configured. By default, the lower threshold is 1. That is, an Eth-Trunk remains Up as long as one member interface is Up.
NOTE

l l

The lower threshold of member links in the Up state can be configured in both Layer 2 mode and Layer 3 mode. To ensure normal forwarding, it is recommended to configure the same lower threshold for the trunk interfaces on both ends of the same trunk link.

----End

3.4.5 (Optional) Configuring Load-balancing Mode for the EthTrunk Interface


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface eth-trunk trunk-id

The Eth-Trunk interface view is displayed. Step 3 Run:


load-balance { ip | packet-all }

3-16

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3 LACP Configuration

The load-balancing mode is configured. By default, For a Layer 3 Eth-Trunk interface, load balancing is carried out based on IP addresses.
l

Load balancing based on IP addresses can guarantee the packet order, but cannot improve the bandwidth usage. Packet-by-packet load balancing can improve the bandwidth usage, but cannot guarantee the packet order.

----End

3.4.6 (Optional) Configuring Weights for Member Links


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { gigabitethernet | ethernet } interface-number

The view of the Eth-Trunk member interface is displayed. Step 3 Run:


distribute-weight weight-value

The weight of the interface is configured. For an Eth-Trunk interface, the sum of weights of all its member interfaces cannot be greater than 16. The Eth-Trunk interface implements load balancing based on the weight of each member interface. On an Eth-Trunk interface, the larger the weight of a member interface is, the heavier the traffic on the member link is. By default, the weight of a member port is 1.
NOTE

When an Eth-Trunk bears multicast traffic, if you run the distribute-weight command to change the load balancing weight of a member interface, you need to run the shutdown and undo shutdown commands to restart the member interface so that the configuration can take effect.

----End

3.4.7 (Optional) Configuring the Method of Sending Traps on EthTrunk Member Interfaces
Context
Do as follows on the devices configured with the Eth-Trunk.
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 3-17

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Procedure
Step 1 Run:
system-view

The system view is entered. Step 2 Run:


trunk-member trap in private-mib enable

Traps are sent by the private MIB when the status of Eth-Trunk member interfaces goes Up or Down. By default, traps are sent by the public MIB when the status of the Eth-Trunk member interfaces goes Up or Down. Traps sent through the public MIB contain no information about the Eth-Trunk interface. To send traps carrying information about Eth-Trunk interfaces,use this command to send traps through private MIBs. ----End

3.4.8 Checking the Configuration


Run the following commands to check the previous configuration. Action Check the status of the Eth-Trunk interface. Check information about the EthTrunk member interface. Check the forwarding table of the EthTrunk interface. Command display interface eth-trunk [ trunk-id ] [ | { begin | exclude | include } regular-expression ] display trunkmembership eth-trunk trunk-id display trunkfwdtbl eth-trunk trunk-id [ slot slotid ]

Run the display interface eth-trunk command. If information such as the IP address, MAC address and load-balancing mode is displayed, it means the configuration succeeds. For example:
<Quidway> display interface Eth-Trunk 1 Eth-Trunk1 current state : UP Line protocol current state : UP Description : HUAWEI, Quidway Series, Eth-Trunk1 Interface, Route Port Hash arithmatic : According to IP The Maximum Transmit Unit is 1500 bytes Internet Address is 100.1.1.1/24 IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc09-9722 Physical is ETH_TRUNK Last 300 seconds input rate 0 bytes/sec, 0 packets/sec Last 300 seconds output rate 0 bytes/sec, 0 packets/sec Input: 1 packets,3 bytes, 7 unicast,9 broadcast,8 multicasts 10 errors,5 drops,11 unknowprotocol Output: 2 packets,4 bytes, 12 unicast,14 broadcast,13x multicasts 15 errors,6 drops -----------------------------------------------------

3-18

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
PortName Status Weight ----------------------------------------------------Ethernet6/0/0 UP 1 ----------------------------------------------------The Number of Ports in Trunk : 1 The Number of UP Ports in Trunk : 1

3 LACP Configuration

Run the display trunkmembership eth-trunk command. If the usage status, network protocol status, and link status of the Eth-Trunk member interface are displayed, it means the configuration succeeds. For example:
<Quidway> display trunkmembership eth-trunk 0 Trunk ID: 0 used status: VALID TYPE: ethernet Working Mode : Normal Working State: Normal Number Of Ports in Trunk = 2 Number Of UP Ports in Trunk = 2 operate status: up Interface GigabitEthernet1/0/0, valid,selected,operate up,weight=1,standby interface NULL Interface GigabitEthernet1/0/1, valid,selected,operate up,weight=1,standby interface NULL

Run the display trunkfwdtbl eth-trunk command. If interface numbers of the main Eth-Trunk links and its backup links are displayed, it means the configuration succeeds.
<Quidway> display trunkfwdtbl eth-trunk 1 Show the Trunk Forwarding Table Eth-Trunk1's forwarding table is: MASTER GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0

SLAVE GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/0

3.5 Configuring an Eth-Trunk Sub-interface


Describes how to configure an Eth-Trunk sub-interface. 3.5.1 Establishing the Configuration Task 3.5.2 Creating an Eth-Trunk Sub-interface 3.5.3 Configuring an IP address for an Eth-Trunk Sub-interface 3.5.4 (Optical) Configuring the MTU for an Eth-Trunk Sub-interface 3.5.5 Configuring the Encapsulation Type for an Eth-Trunk Sub-interface 3.5.6 OptionalConfiguring the Rate for Sending Gratuitous ARP Packets on an Eth-Trunk Sub-interface
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 3-19

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3.5.7 Checking the Configuration

3.5.1 Establishing the Configuration Task


Applicable Environment
The NE80E/40E supports sub-interfaces that can be configured on Layer 3 and Layer 2 EthTrunk interfaces.
NOTE

l l

For the application of Eth-Trunk sub-interfaces in a VLAN, see VLAN Configuration. For the application of Eth-Trunk sub-interfaces in QinQ , see QinQ Configuration.

Besides, Layer 2 Eth-Trunk sub-interfaces can be used as follows: When MPLS TE features are required on the devices that are connected through Layer 2 EthTrunk interfaces, MPLS TE cannot be configured on the main interface. Then, you can create a Layer 2 Eth-Trunk sub-interface and configure MPLS TE on the sub-interface. In this way, a physical link can transmit Layer 2 and Layer 3 services at the same time.

Pre-configuration Tasks
Before configuring an Eth-Trunk sub-interface, complete the following task:
l l

Creating an Eth-Trunk interface Connecting physical links between devices correctly

Data Preparation
To configure an Eth-Trunk sub-interface, you need the following data. No. 1 2 3 4 Data Number of the main interface Number of the sub-interface VLAN IDs associated with the sub-interface Rate of sending gratuitous ARP packets

3.5.2 Creating an Eth-Trunk Sub-interface


Procedure
l Creating a Layer 3 Eth-Trunk Sub-interface 1. Run:
system-view

3-20

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3 LACP Configuration

The system view is displayed. 2. Run:


interface eth-trunk interface-number.subinterface-number

A sub-interface is created and the sub-interface view is displayed. The parameter subinterface-number specifies the number of the Eth-Trunk subinterface. The number ranges from 1 to 4094. The value range of the Eth-Trunk subinterface number depends on products. A maximum of 2048 sub-interfaces can be created on an Eth-Trunk main interface. The total number of Eth-Trunk sub-interfaces on the device is 16376. l Creating a Layer 2 Eth-Trunk Sub-interface 1. Run:
system-view

The system view is displayed. 2. Run:


interface eth-trunk trunk-id

An Eth-Trunk is created. 3. Run:


portswitch

The Eth-Trunk interface is switched from Layer 3 to Layer 2 mode. By default, the Eth-Trunk interface works in Layer 3 mode. 4. Run:
interface eth-trunk interface-number.sub-interface-number

The sub-interface of the Layer 2 Eth-Trunk interface is created. The parameter subinterface-number specifies the number of the Eth-Trunk subinterface. The number ranges from 1 to 4094. The value range of the Eth-Trunk subinterface number depends on products. ----End

3.5.3 Configuring an IP address for an Eth-Trunk Sub-interface


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface eth-trunk interface-number.subinterface-number

The specified Eth-Trunk sub-interface view is displayed. Step 3 Run:


ip address ip-address ip-mask [ sub ]

An IP address is configured for the Eth-Trunk sub-interface.


Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 3-21

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

For the configuration of an IP address, refer to the Quidway NetEngine80E/40E Router Configuration Guide - IP Services. When more than one IP address is configured for an Eth-Trunk interface, the keyword sub can be used to indicate other IP addresses rather than the first IP address. ----End

3.5.4 (Optical) Configuring the MTU for an Eth-Trunk Subinterface


Context
NOTE

After changing the MTU by using the mtu command on a specified interface, you need to restart the interface to validate the newly configured value. To restart the interface, run the shutdown and the undo shutdown commands in succession, or run the restart command in the interface view. If the Ethernet interface is configured with a sub-interface, the interval for consecutively running the shutdown and undo shutdown commands on the Ethernet interface must be 15 seconds at least.

Do as follows on the Eth-Trunk sub-interface of the router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface eth-trunk interface-number.subinterface-number

The specified Eth-Trunk sub-interface view is displayed. Step 3 Run:


mtu mtu

The MTU is configured for the Eth-Trunk sub-interface. The MTU is expressed in bytes. The MTU ranges form 46 to 9600. By default, the MTU is 1500 bytes.
NOTE

The Quality of Service (QoS) queue length is limited. If the MTU is too small whereas the packet size is large, the packet is probably split into many fragments. Thus, the packet may be discarded due to the insufficient QoS queue length. To avoid this situation, lengthen the QoS queue accordingly.

----End

3.5.5 Configuring the Encapsulation Type for an Eth-Trunk Subinterface


3-22 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3 LACP Configuration

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface eth-trunk interface-number.subinterface-number

The Eth-Trunk sub-interface view is displayed. Step 3 Run:


vlan-type dot1q vlan-id

The encapsulation type and associated VLAN ID are configured for an Eth-Trunk sub-interface.
NOTE

In the NE80E/40E, an Eth-Trunk sub-interface can be associated with a VLAN.

By default, no encapsulation type or the associated VLAN ID is configured on the sub-interface. For the connectivity of VLANs, the VLAN IDs on interfaces of both ends must be consistent. The VLAN ID set to the Eth-Trunk sub-interface cannot be the same as that set to the Eth-Trunk main interface.
NOTE

For information about the configuration of the dot1q and QinQ termination sub-interfaces, see QinQ configuration.

----End

3.5.6 OptionalConfiguring the Rate for Sending Gratuitous ARP Packets on an Eth-Trunk Sub-interface
Context
Do as follows on eachrouter:

Procedure
Step 1 Run:
system-view

The system interface view is entered. Step 2 Run:


interface eth-trunk trunk-id

The Eth-Trunk interface view is entered. Step 3 Run:


arp send-speed-limit limit

The rate for sending gratuitous ARP packets is limited on the Eth-Trunk sub-interface.
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 3-23

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

By default, the rate is 2000 packets per seconds. To prevent the peer device from discarding ARP packets, the rate for sending gratuitous ARP packets on the Eth-Trunk sub-interface can be configured on the local router. The rate for sending gratuitous ARP packets on the Eth-Trunk sub-interface of the local router must match the receiving ability of the peer. ----End

3.5.7 Checking the Configuration


Run the following command to check the previous configuration. Action Check the status of the Eth-Trunk interface. Command display interface eth-trunk [ trunk-id ] [ | { begin | exclude | include } regular-expression ]

Run the display interface eth-trunk command. If information, such as the IP address and MAC address of the Eth-Trunk sub-interface, is displayed, it means that the configuration succeeds. For example:
<Quidway> display interface eth-trunk 1.1 Eth-Trunk1.1 current state : UP Line protocol current state : UP Description : HUAWEI, Quidway Series, Eth-Trunk1.1 Interface, Route Port Hash arithmetic : According to IP, The Maximum Transmit Unit is 1500 Internet Address is 10.10.10.100/24 IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-3f60-ec00 Encapsulation dot1q Virtual LAN, The number of Vlan is 1, Vlan ID 2 Last 300 seconds input rate 0 bytes/sec, 0 packets/sec Last 300 seconds output rate 0 bytes/sec, 0 packets/sec Input: 0 packets,0 bytes, 0 unicast,0 broadcast,0 multicasts 0 errors,0 drops,0 unknowprotocol Output:0 packets,0 bytes, 0 unicast,0 broadcast,0 multicasts 0 errors,0 drops ----------------------------------------------------PortName Status Weight ----------------------------------------------------Ethernet6/0/0 UP 1 ----------------------------------------------------The Number of Ports in Trunk : 1 The Number of UP Ports in Trunk : 1

3.6 Configuring Link Aggregation in Manual Load Balancing Mode


Describes how to configure LACP in manual load balancing mode. 3.6.1 Establishing the Configuration Task 3.6.2 Configuring the Operation Mode of the Eth-Trunk as the Manual Load Balancing Mode 3.6.3 Adding Member Interfaces to the Eth-Trunk 3.6.4 (Optional) Configuring the Manual Load Balancing Mode
3-24 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3 LACP Configuration

3.6.5 Checking the Configuration

3.6.1 Establishing the Configuration Task


Applicable Environment
When the bandwidth or the reliability of two devices should be increased and one of the two devices does not support LACP, you should create an Eth-Trunk in manual load balancing mode on the router and add multiple member interfaces to increase the bandwidth and reliability of devices. As shown in Figure 3-3, Router A supports LACP, but Router B does not support LACP.
NOTE

In manual load balancing mode, member interfaces with different speeds and duplex modes, and on different boards, can be aggregated to an Eth-Trunk.

Figure 3-3 Networking diagram of link aggregation in manual load balancing mode
RouterA Eth-Trunk 1 Eth-Trunk 1 RouterB

Eth-Trunk

Pre-configuration Tasks
Before configuring an Eth-Trunk in manual load balancing mode, complete the following task:
l

Creating an Eth-Trunk interface.

Data Preparation
To configure an Eth-Trunk in manual load balancing mode, you need the following data. No. 1 2 Data Number of the Eth-Trunk in load balancing mode Type and number of member interfaces

3.6.2 Configuring the Operation Mode of the Eth-Trunk as the Manual Load Balancing Mode

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

3-25

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Context
NOTE

Ensure that an Eth-Trunk does not contain any member interface before you configure the operation mode of the Eth-Trunk; otherwise, the operation mode of the Eth-Trunk cannot be changed. Run the undo ethtrunk trunk-id command in the interface view to delete the existing member interfaces. Both Layer 2 and Layer 3 Eth-Trunk interfaces support the manual load balancing mode.

Do as follows on the routers at both ends:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface eth-trunk trunk-id

The Eth-Trunk interface view is displayed. Step 3 Run:


mode manual load-balance

The operation mode is configured as the manual load balancing mode for the Eth-Trunk. By default, an Eth-Trunk works in manual load balancing mode. ----End

3.6.3 Adding Member Interfaces to the Eth-Trunk


Context
NOTE

Ensure that no configuration exists on an interface when the interface is added to an Eth-Trunk. You can run the display this command to check whether there are configurations on the interface. If there are configurations on the interface, you can reserve only the configurations of shutdown, undo shutdown, and description. Other configurations must be deleted through the command. You can then add the interface to the Eth-Trunk.

Do as follows on the routers at both ends:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface interface-type interface-number

The interface view is displayed. Step 3 Run:


3-26 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
eth-trunk trunk-id

3 LACP Configuration

The interface is added to the Eth-Trunk. If multiple interfaces are added to the same Eth-Trunk, repeat steps 2 to 3. ----End

3.6.4 (Optional) Configuring the Manual Load Balancing Mode


Context
The manual load balancing mode of the local end and that of the peer end can be different because they do not interact with each other.
NOTE

Layer 2 trunk interfaces support the load balancing based on IP addresses, MAC addresses, and packets, but Layer 3 trunk interfaces support the load balancing based on IP addresses and packets only.

Do as follows on the routers at both ends:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface eth-trunk trunk-id

The Eth-Trunk interface view is displayed. Step 3 Run:


load-balance { ip | mac | packet-all }

The manual load balancing mode is configured for the Eth-Trunk. By default, the load balancing of Layer 3 interfaces is based on IP addresses, and the load balancing of Layer 2 interfaces is based on MAC addresses. ----End

3.6.5 Checking the Configuration


Run the following commands to check the previous configuration. Action Check member interfaces of an Eth-Trunk. Check the manual load balancing mode of an Eth-Trunk. Command display trunkmembership eth-trunk trunk-id display eth-trunk [ trunk-id [interface interface-type interface-number ] ]

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

3-27

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Run the display trunkmembership eth-trunk command. You can view whether member interfaces are added to the Eth-Trunk. If the operation mode is displayed as Normal and the status of the interface is Up, it means that the configuration succeeds.
<Quidway> display trunkmembership eth-trunk 1 Trunk ID: 1 used status: VALID TYPE: ethernet Working Mode : Normal Working State: Normal Number Of Ports in Trunk = 2 Number Of UP Ports in Trunk = 2 operate status: up Interface GigabitEthernet1/0/1, valid, selected, operate up, weight=1, backup interface NULL Interface GigabitEthernet1/0/2, valid, selected, operate up, weight=1, backup interface NULL

Run the display eth-trunk command to check the load balancing mode of an Eth-Trunk.
<Quidway> display eth-trunk 1 Eth-Trunk1's state information is: WorkingMode: NORMAL Hash arithmetic: According to flow Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 16 Operate status: down Number Of Up Port In Trunk: 0 -------------------------------------------------------------------------------PortName Status Weight GigabitEthernet2/0/0 Down 1

3.7 Configuring Link Aggregation in 1:1 Active/Standby Mode


Describes how to configure LACP in 1:1 active/standby mode. 3.7.1 Establishing the Configuration Task 3.7.2 Configuring the Operation Mode of the Eth-Trunk as 1:1 Active/Standby Mode 3.7.3 Adding Member Interfaces to the Eth-Trunk and Setting the Primary Interface 3.7.4 Enabling an LAG to Send Flush Packets 3.7.5 Creating a Control VLAN 3.7.6 Enabling an Interface to Receive Packets from the Control VLAN 3.7.7 Enabling an Interface to Receive Flush Packets 3.7.8 Checking the Configuration

3.7.1 Establishing the Configuration Task


Applicable Environment
As shown in Figure 3-4, Router A and Router D are NE80E/40E devices. The transit device can receive flush packets. The reliability of data transmission from Router A to Router D should be implemented through primary and backup links.

3-28

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
NOTE

3 LACP Configuration

For the configuration of SmartLink Flush, refer to the Quidway NetEngine80E/40E Router Configuration Guide LAN Access and MAN Access - Ethernet.

Figure 3-4 Networking diagram of link aggregation in 1:1 active/standby mode


RouterB

RouterA Eth-Trunk 1 Eth-Trunk 1

RouterD

Active links Backup links RouterC

NOTE

In 1:1 active/standby mode, member interfaces of different rates and duplex modes, and on different boards, can be added to an Eth-Trunk.

Pre-configuration Tasks
Before configuring link aggregation in 1:1 active/standby mode, complete the following task:
l

Creating an Eth-Trunk interface

Data Preparation
To configure link aggregation in 1:1 active/standby mode, you need the following data. No. 1 2 3 Data ID of the LAG of Router A and Router D Type and number of the member interface ID of the control VLAN that sends or receives flush packets

3.7.2 Configuring the Operation Mode of the Eth-Trunk as 1:1 Active/Standby Mode

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

3-29

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Context
NOTE

Ensure that an Eth-Trunk does not contain any member interface before you configure the operation mode of the Eth-Trunk; otherwise, the operation mode of the Eth-Trunk cannot be changed. Run the undo ethtrunk trunk-id command in the interface view to delete the existing member interfaces. For details, refer to the chapter "Link Aggregation" in the Command Reference. Layer 2 Eth-Trunk interfaces support the 1:1 active/standby mode, but Layer 3 Eth-Trunk interfaces do not support the 1:1 active/standby mode.

Do as follows on Router A and Router D:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface eth-trunk trunk-id

The Eth-Trunk interface view is displayed. Step 3 Run:


portswitch

The Eth-Trunk interface switches from Layer 3 mode to Layer 2 mode. Step 4 Run:
mode manual backup

The operation mode is configured as manual 1:1 active/standby mode for the Eth-Trunk. By default, an Eth-Trunk works in manual load balancing mode. ----End

3.7.3 Adding Member Interfaces to the Eth-Trunk and Setting the Primary Interface
Context
Do as follows on Router A and Router D:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface interface-type interface-number

The interface view is displayed.


3-30 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3 LACP Configuration

The interface mentioned here is the member interface that need be added to an Eth-Trunk. Step 3 Run:
eth-trunk trunk-id

The interface is added to the Eth-Trunk. In 1:1 active/standby mode, only two interfaces can be added to the same Eth-Trunk.
NOTE

Ensure that no configuration exists on an interface when the interface is added to an Eth-Trunk. You can run the display this command to check whether there are configurations on the interface. If there are configurations on the interface, you can reserve only the configurations of shutdown, undo shutdown, and description. Other configurations, however, must be deleted through the commands. You can then add the interface to the Eth-Trunk.

Step 4 Run:
port-master

The member interface of the Eth-Trunk is specified as the primary interface. By default, the member interface of an Eth-Trunk is the backup interface in 1:1 active/standby mode. Therefore, you need specify only the primary interface. You can specify only one primary interface. ----End

3.7.4 Enabling an LAG to Send Flush Packets


Context
Do as follows on Router A and Router D:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface eth-trunk trunk-id

The Eth-Trunk interface view is displayed. Step 3 Run:


smart-link flush send vlan vlan-id

The LAG is enabled to send flush packets.


NOTE

The VLAN is the control VLAN. After the command is used, when the switchover between master and slave interfaces is performed, flush packets are sent from the new master interface to notify the peer end of aging MAC addresses. In this manner, data transmission interruption that is caused by different MAC addresses can be avoided.

----End
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 3-31

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3.7.5 Creating a Control VLAN


Context
Do as follows on Router B and Router C:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


vlan vlan-id

A VLAN is created and the VLAN view is displayed. The VLAN is used to receive flush packets sent by Router A or Router D, so the ID of the VLAN should be the same as the ID of the VLAN that sends flush packets. ----End

3.7.6 Enabling an Interface to Receive Packets from the Control VLAN


Context
Do as follows on the interfaces connected to primary links and backup links of Router B and Router C:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface interface-type interface-number

The interface view is displayed. Step 3 Run:


portswitch

The Ethernet interface switches from Layer 3 mode to Layer 2 mode. Step 4 Run:
port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] } & <1-10> | all }

The interface is enabled to receive packets from the control VLAN.


3-32 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3 LACP Configuration

The ID of the VLAN that receives flush packets should be the same as the ID of the VLAN that sends flush packets. ----End

3.7.7 Enabling an Interface to Receive Flush Packets


Context
Do as follows on the interfaces connected to primary links and backup links of Router B and Router C:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface interface-type interface-number

The interface view is displayed. Step 3 Run:


smart-link flush enable control-vlan vlan-id

The interface is enabled to recevie flush packets. ----End

3.7.8 Checking the Configuration


Run the following commands to check the previous configuration. Action Check the member interface of an Eth-Trunk. Check the operation mode of the Eth-Trunk, primary interface, and backup interface. Command display trunkmembership eth-trunk trunk-id display eth-trunk [ trunk-id [ interface interface-type interface-number ] ]

Take Router A as an example. Run the display trunkmembership eth-trunk command. If the current operation mode is Backup and if the primary interface GE1/0/1 is Up, it means that the configuration succeeds.
<RouterA> display trunkmembership eth-trunk 1 Trunk ID: 1 used status: VALID TYPE: ethernet Working Mode : Backup-access

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

3-33

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Working State: Slave Number Of Ports in Trunk = 2 Number Of UP Ports in Trunk = 1 operate status: up Interface GigabitEthernet1/0/1, valid, selected, operate up, weight=1, standby interface NULL Interface GigabitEthernet1/0/2, valid, selected, operate down, weight=1, standby interface NULL <RouterA> display eth-trunk 1 Eth-Trunk1's state information is: WorkingMode: BACKUP WorkingState: Master -------------------------------------------------------------------------------PortName Slave/Master GigabitEthernet1/0/1 M GigabitEthernet1/0/2 S

3.8 Configuring Link Aggregation in Static LACP Mode


Describes how to configure LACP in static mode. 3.8.1 Establishing the Configuration Task 3.8.2 Configuring the Operation Mode of the Eth-Trunk as the Static LACP Mode 3.8.3 Adding Member Interfaces to the Eth-Trunk 3.8.4 (Optional) Setting the LACP Priority of the System 3.8.5 (Optional) Setting the Upper Threshold for the Number of Active Interfaces 3.8.6 (Optional) Setting the Lower Threshold for the Number of Active Interfaces 3.8.7 (Optional) Setting the LACP Priority of the Interface 3.8.8 (Optional) Enabling LACP Preemption and Setting the Delay for LACP Preemption 3.8.9 (Optional) Setting the Timeout Period for Receiving LACP Protocol Packets 3.8.10 (Optional) Configuring the Load Balancing Mode 3.8.11 (Optional) Configuring the SNMP Alarm 3.8.12 Checking the Configuration

3.8.1 Establishing the Configuration Task


Applicable Environment
To improve the bandwidth and the reliability of two devices, you should configure the LAG on two directly connected routers. The requirements are as follows:
l

The links between two devices can implement backup. When a fault occurs on some links, the backup links are used to replace the faulty ones to keep data transmission uninterrupted. The active links can carry out load balancing.

Figure 3-5 Networking diagram of link aggregation in static LACP mode


RouterA Eth-Trunk 1 Eth-Trunk Eth-Trunk 1 RouterB Active-links Backup links

3-34

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
NOTE

3 LACP Configuration

In static LACP mode, member interfaces with different speeds and duplex modes, and on different boards, can be aggregated to an Eth-Trunk. Member interfaces of different rates cannot be in the forwarding state at the same time and member interfaces of half duplex mode cannot forward packets.

Pre-configuration Tasks
Before configuring link aggregation in static LACP mode, complete the following task:
l

Creating an Eth-Trunk interface

Data Preparation
To configure link aggregation in static LACP mode, you need the following data. No. 1 2 3 Data Number of the Eth-Trunk Type and number of the member interface Upper threshold for the number of active interfaces

3.8.2 Configuring the Operation Mode of the Eth-Trunk as the Static LACP Mode
Context
NOTE

Ensure that the Eth-Trunk does not contain any member interfaces before you configure the operation mode of the Eth-Trunk; otherwise, the operation mode of the Eth-Trunk cannot be changed. Run the undo ethtrunk trunk-id command in the interface view to delete the existing member interfaces. For details, refer to the chapter "Link Aggregation" in the Command Reference. Both Layer 2 and Layer 3 Eth-Trunk interfaces support the static LACP mode.

Do as follows on the routers at both ends:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface eth-trunk trunk-id

The Eth-Trunk interface view is displayed. Step 3 Run:


mode lacp-static

The operation mode of the Eth-Trunk is configured as the static LACP mode.
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 3-35

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

By default, an Eth-Trunk works in load balancing mode. ----End

3.8.3 Adding Member Interfaces to the Eth-Trunk


Context
Do as follows on routers at both ends:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface interface-type interface-number

The interface view is displayed. Step 3 Run:


eth-trunk trunk-id

The interface is added to the Eth-Trunk.


NOTE

Ensure that no configuration exists on an interface when the interface is added to an Eth-Trunk. You can run the display this command to check whether there are configurations on the interface. If there are configurations on the interface, you can reserve only the configurations of shutdown, undo shutdown, and description. Other configurations, however, must be deleted through the commands. You can then add the interface to the Eth-Trunk. The number of interfaces added to an LAG should not be greater than 16.

----End

3.8.4 (Optional) Setting the LACP Priority of the System


Context
Do as follows on the routers at both ends:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


lacp priority priority

The LACP priority of the system is set.


3-36 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3 LACP Configuration

The lower the LACP priority of the system is, the higher the priority is. The end with a smaller LACP priority of the system functions as the Actor. By default, the LACP priority of the system is 32768. If the LACP priority of the system of one end is set to be lower than 32768, the end can function as the Actor. ----End

3.8.5 (Optional) Setting the Upper Threshold for the Number of Active Interfaces
Context
In static LACP mode, you can control the maximum number M of active interfaces in the EthTrunk by configuring the upper threshold for the number of active interfaces. The remaining member interfaces are backup ones. If the upper threshold is not configured, up to 16 interfaces in the Eth-Trunk can be in active state.
NOTE

The upper threshold for the number of active interfaces of the local router and that of the remote router can be different. If the upper thresholds for the number of active interfaces at both ends are different, take the smaller upper threshold.

Do as follows on the routers at both ends:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface eth-trunk trunk-id

The Eth-Trunk interface view is displayed. Step 3 Run:


max active-linknumber link-number

The upper threshold for the number of active interfaces is set. By default, the upper threshold for the number of active interfaces is 16. ----End

3.8.6 (Optional) Setting the Lower Threshold for the Number of Active Interfaces
Context
In static LACP mode, you can determine the minimum value of the number of active interfaces in the Eth-Trunk by setting the lower threshold for the number of active interfaces. If the number
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 3-37

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

of active interfaces is smaller than the value in static mode, the status of interfaces of the EthTrunk becomes Down.
NOTE

l l

The lower threshold for the number of active interfaces should not be greater than the upper threshold for the number of active interfaces. The lower threshold for the number of active interfaces of the local router and that of the remote router can be different. If the lower thresholds for the number of active interfaces at both ends are different, take the greater lower threshold.

Do as follows on the routers at both ends:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface eth-trunk trunk-id

The Eth-Trunk interface view is displayed. Step 3 Run:


least active-linknumber link-number

The lower threshold for the number of active interfaces is set. By default, the lower threshold for the number of active interfaces is 1. ----End

3.8.7 (Optional) Setting the LACP Priority of the Interface


Context
Do as follows on the routers at both ends:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface interface-type interface-number

The interface view is displayed. Step 3 Run:


lacp priority priority

The LACP priority of the current interface is set.


3-38 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
NOTE

3 LACP Configuration

The LACP priority of the interface indicates the priority when the interface becomes the active interface. The lower the LACP priority of the interface is, the higher the priority is. By default, the LACP priority of an interface is 32768. If both devices of the Eth-Trunk are not configured with the system priority, the Actor is selected according to the system ID. The smaller system ID is preferred.

----End

3.8.8 (Optional) Enabling LACP Preemption and Setting the Delay for LACP Preemption
Context
Do as follows on the routers at both ends:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface eth-trunk trunk-id

The Eth-Trunk view is displayed. Step 3 Run:


lacp preempt enable

The LACP preemption function is enabled on the Eth-Trunk. When the LACP preemption function is enabled, the interface with the highest LACP priority can be an active interface. For example, when an interface with a high priority switches to inactive due to failure and then recovers, the interface can become the active interface again if the LACP preemption function is enabled; the interface cannot become the active interface if the LACP preemption function is disabled. Step 4 Run:
lacp preempt delay delay-time

The delay for LACP preemption on the Eth-Trunk is set. The delay for LACP preemption refers to the period when an inactive interface of the Eth-Trunk in static LACP mode switches to active. If the delay for LACP preemption of a local device is different from that of a remote peer, the system chooses a longer delay for LACP preemption. ----End

3.8.9 (Optional) Setting the Timeout Period for Receiving LACP Protocol Packets
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 3-39

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Context
Do as follows on the routers at both ends:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface eth-trunk trunk-id

The Eth-Trunk view is displayed. Step 3 Run:


lacp timeout { fast | slow }

The timeout period for receiving LACP protocol packets on the Eth-Trunk is set.
NOTE

After the command is configured, the local end informs the remote peer of the timeout for receiving packets through LACP packets. If the timeout is set as fast, the period that the peer sends LACPDUs is 1s. If the timeout is set as slow, the period that the peer sends LACPDUs is 30s. The timeout set at both ends can be different. To facilitate the maintenance, setting the same timeout for LACPDUs is recommended.

----End

3.8.10 (Optional) Configuring the Load Balancing Mode


Context
Do as follows on the routers at both ends:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface eth-trunk trunk-id

The Eth-Trunk view is displayed. Step 3 Run:


load-balance { ip | mac | packet-all }

A manual load balancing mode of the Eth-Trunk is configured. By default, the load balancing of Layer 3 interfaces is based on IP addresses, and the load balancing of Layer 2 interfaces is based on MAC addresses.
3-40 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3 LACP Configuration

The load balancing mode of the local end and that of the peer end can be different because they do not interact with each other.
NOTE

Layer 2 trunk interfaces support the load balancing based on IP addresses, MAC addresses, and packets, but Layer 3 trunk interfaces support the load balancing based on IP addresses and packets only.

----End

3.8.11 (Optional) Configuring the SNMP Alarm


Context
If the SNMP alarm of all Eth-Trunks is enabled, the system sends an alarm to the Network Management System (NMS) server when the following situations occur:
l l

The negotiation of an LAG fails. Partial link lost (PLL): Only some member interfaces of an LAG can work. The system sends the alarm when the number of working interfaces is less than the lower threshold. Total link lost (TLL): If there is no member interfaces in an LAG, the system sends the alarm. After TLL alarm is generated, PLL alarm is suppressed.

Do as follows on the routers at both ends:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


snmp-agent trap enable eth-trunk

The SNMP alarm is enabled on an Eth-Trunk. ----End

3.8.12 Checking the Configuration


Run the following commands to check the previous configuration. Action Check member interfaces of an Eth-Trunk. Check the information about the Eth-Trunk and the active interfaces. Command display trunkmembership eth-trunk trunk-id display eth-trunk [ trunk-id [interface interface-type interface-number ] ]

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

3-41

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Run the display trunkmember eth-trunk command. You can check whether the operation mode, the priority of the system, and the priority of the interface are valid or not, and check the active interfaces selected by the system.
<Quidway> display eth-trunk 1 Eth-Trunk1's state information is: Local: LAG ID: 1 WorkingMode: STATIC Preempt Delay: Disabled Hash arithmetic: According to flow System Priority: 60 System ID: 00e0-fca8-041a Least Active-linknumber: 1 Max active-linknumber: 3 Operate status: up Number Of Up Port In Trunk: 3 -----------------------------------------------------------------------------ActorPortName Status PortType PortPri PortNo PortKey PortState Weight GigabitEthernet6/0/3 Selected 1GE 32768 387 561 11111100 1 GigabitEthernet6/0/4 Selected 1GE 10 388 561 11111100 1 GigabitEthernet6/0/5 Selected 1GE 32768 389 561 11111100 1 GigabitEthernet1/0/0 Unselect 10GE 32768 64 577 11100000 1 GigabitEthernet3/0/0 Unselect 10GE 32768 192 577 11100010 1 Partner: -----------------------------------------------------------------------------PartnerPortName SysPri SystemID PortPri PortNo PortKey PortState GigabitEthernet6/0/3 32768 00e0-fca6-7f85 32768 387 561 11111100 GigabitEthernet6/0/4 32768 00e0-fca6-7f85 32768 388 561 11111100 GigabitEthernet6/0/5 32768 00e0-fca6-7f85 32768 389 561 11111100 GigabitEthernet1/0/0 32768 00e0-fca6-7f85 32768 64 577 11100000 GigabitEthernet3/0/0 0 0000-0000-0000 0 0 0 11100011 <Quidway> display trunkmembership eth-trunk 1 Trunk ID: 1 used status: VALID TYPE: ethernet Working Mode : Static Number Of Ports in Trunk = 3 Number Of UP Ports in Trunk = 2 operate status: up Interface GigabitEthernet1/0/1, valid, selected, operate up, weight=1, backup interface NULL Interface GigabitEthernet1/0/2, valid, selected, operate up, weight=1, backup interface NULL Interface GigabitEthernet1/0/3, valid, selected, operate down, weight=1, backup interface NULL

3.9 Maintaining Eth-Trunk Interface


Describes how to maintain the Eth-Trunk interface. 3.9.1 Clearing the Statistics of Eth-Trunk Interface 3.9.2 Debugging

3.9.1 Clearing the Statistics of Eth-Trunk Interface

3-42

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3 LACP Configuration

CAUTION
Statistics of an Eth-Trunk interface cannot be restored after you clear them. So, confirm the action before you use the command. To clear counter information on an Eth-Trunk interface, run the following reset commands in the user view. Action Clear information of the trunk interface. Clear the statistics of received and sent LACPDUs. Command reset counters interface eth-trunk [ trunk-id ] reset lacp statistics eth-trunk [ trunk-id [ interface interface-type interface-number ] ]

3.9.2 Debugging

CAUTION
Debugging affects the performance of the system. So, after debugging, run the undo debugging all command to disable it immediately. When a fault of the LAG occurs, run the following debugging commands in the user view to locate the fault. For the procedure of enabling the debugging, refer to the chapter "Debugging and Diagnosis" in the Quidway NetEngine80E/40E Router Configuration Guide - Device Management. For the description of the debugging commands, refer to the Quidway NetEngine80E/40E Router Command Reference. Action Enable the debugging of Eth-Trunk errors. Enable the debugging of Eth-Trunk events. Enable the debugging of LACPDUs. Enable the debugging of LACP messages. Enable the debugging of Eth-Trunk messages. Enable the debugging of Eth-Trunk state machines.
Issue 03 (2008-09-22)

Command debugging trunk error [ slot slot-number ] debugging trunk event [ slot slot-number ] debugging trunk lacp-pdu [ slot slot-number ] debugging trunk lagmsg [ slot slot-number ] debugging trunk msg [ slot slot-number ] debugging trunk state-machine [ slot slotnumber ]
3-43

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Action Enable the debugging when the LAG is Up or Down.

Command debugging trunk updown [ slot slot-number ]

3.10 Configuration Examples


Provides several configuration examples of Eth-Trunk and IP-Trunk Interface. 3.10.1 Example for Configuring a Layer 2 Eth-Trunk Interface to Allow VLANs to Pass Through 3.10.2 Example for Configuring a Layer 3 Eth-Trunk Interface 3.10.3 Example for Configuring VLANs to Communicate Through Eth-Trunk Sub-interfaces 3.10.4 Example for Configuring Link Aggregation in Manual Load Balancing Mode 3.10.5 Example for Configuring Link Aggregation in 1:1 Active/Standby Mode 3.10.6 Example for Configuring Link Aggregation in Static LACP Mode

3.10.1 Example for Configuring a Layer 2 Eth-Trunk Interface to Allow VLANs to Pass Through
Networking Requirements
As shown in Figure 3-6, Router A is connected to Router B through Eth-Trunk 1, which is a Layer 2 interface. Configure Eth-Trunk 1 as a trunk interface to allow all VLAN frames between Router A and Router B to pass through. Figure 3-6 Configuring a Layer 2 Eth-Trunk interface to allow VLAN frames to pass through

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4.
3-44

Create an Eth-Trunk interface. Switch the Eth-Trunk interface to a Layer 2 interface. Configure the Eth-Trunk interface as a trunk interface and allow all VLAN frames to pass through. Add Ethernet interfaces to the Eth-Trunk interface.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3 LACP Configuration

Data Preparation
To complete the configuration, you need the following data:
l l

Two Eth-Trunk member interfaces GE 1/0/0 and GE 2/0/0 on Router A Two Eth-Trunk member interfaces GE 1/0/0 and GE 2/0/0 on Router B

Configuration Procedure
1. Configure Router A.
<Quidway> system-view [Quidway] sysname RouterA

# Configure the VLANs allowed on the interface.


[RouterA] interface eth-trunk 1 [RouterA-Eth-Trunk1] portswitch [RouterA-Eth-Trunk1] port link-type trunk [RouterA-Eth-Trunk1] port trunk allow-pass vlan all [RouterA-Eth-Trunk1] quit

# Add GE 1/0/0 and GE 2/0/0 to Eth-Trunk 1.


[RouterA] interface gigabitethernet 1/0/0 [RouterA-GigabitEthernet1/0/0] undo shutdown [RouterA-GigabitEthernet1/0/0] eth-trunk 1 [RouterA-GigabitEthernet1/0/0] quit [RouterA] interface gigabitethernet 2/0/0 [RouterA-GigabitEthernet2/0/0] undo shutdown [RouterA-GigabitEthernet2/0/0] eth-trunk 1 [RouterA-GigabitEthernet2/0/0] quit

2.

Configure Router B.
<Quidway> system-view [Quidway] sysname RouterB

# Create Eth-Trunk 1 and configure the VLANs allowed on the interface.


[RouterB] interface eth-trunk 1 [RouterB-Eth-Trunk1] portswitch [RouterB-Eth-Trunk1] port link-type trunk [RouterB-Eth-Trunk1] port trunk allow-pass vlan all [RouterB-Eth-Trunk1] quit

# Add GE 1/0/0 and GE 2/0/0 to Eth-Trunk 1.


[RouterB] interface gigabitethernet 1/0/0 [RouterB-GigabitEthernet1/0/0] undo shutdown [RouterB-GigabitEthernet1/0/0] eth-trunk 1 [RouterB-GigabitEthernet1/0/0] quit [RouterB] interface gigabitethernet 2/0/0 [RouterB-GigabitEthernet2/0/0] undo shutdown [RouterB-GigabitEthernet2/0/0] eth-trunk 1 [RouterB-GigabitEthernet2/0/0] quit

3.

Verify the configuration. Run the display interface eth-trunk command on Router A or Router B. You can view that the interface status is Up. Take the display of Router A as an example.
<RouterA> display trunkmembership eth-trunk 1 Trunk ID: 1 used status: VALID TYPE: ethernet Working Mode : Normal Working State: Normal Number Of Ports in Trunk = 2 Number Of UP Ports in Trunk = 2 operate status: up

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

3-45

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
Interface Ethernet1/0/0, valid, selected, operate up, weight=1, standby interface NULL Interface Ethernet2/0/0, valid, selected, operate up, weight=1, standby interface NULL

Run the display port vlan command. You can view information about the VLANs allowed on the Eth-Trunk interface. Take Router A as an example.
<RouterA> display port vlan Eth-Trunk 1 Port Link Type PVID Trunk VLAN List -----------------------------------------------------------------------------Eth-Trunk1 trunk 0 1-4094

Configuration Files
l

Configuration file of Router A


# sysname RouterA # interface Eth-Trunk1 portswitch port link-type trunk port trunk allow-pass vlan 1 to 4094 # interface GigabitEthernet1/0/0 undo shutdown eth-trunk 1 # interface GigabitEthernet2/0/0 undo shutdown eth-trunk 1 # return

Configuration file of Router B


# sysname RouterB # interface Eth-Trunk1 portswitch port link-type trunk port trunk allow-pass vlan 1 to 4094 # interface GigabitEthernet1/0/0 undo shutdown eth-trunk 1 # interface GigabitEthernet2/0/0 undo shutdown eth-trunk 1 # return

3.10.2 Example for Configuring a Layer 3 Eth-Trunk Interface


Networking Requirements
As shown in Figure 3-7, an Eth-Trunk interface that is bound from two GE interfaces is created between Router A and Router B.

3-46

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3 LACP Configuration

Figure 3-7 Networking diagram of configuring a Layer 3 Eth-Trunk interface

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. Create an Eth-Trunk interface and configure an IP address for it. Add Ethernet interfaces to the Eth-Trunk interface.

Data Preparation
To complete the configuration, you need the following data:
l l l

Layer 3 GE interface through which Router A is connected to Router B IP address of the Eth-Trunk interface on Router A IP address of the Eth-Trunk interface on Router B

Configuration Procedure
1. Configure Router A.
<Quidway> system-view [Quidway] sysname RouterA

# Create an Eth-Trunk interface and configure an IP address for it.


[RouterA] interface eth-trunk 1 [RouterA-Eth-Trunk1] ip address 100.1.1.1 24 [RouterA-Eth-Trunk1] quit

# Add GE 1/0/0 and GE 2/0/0 to Eth-Trunk 1.


[RouterA] interface gigabitethernet 1/0/0 [RouterA-GigabitEthernet1/0/0] undo shutdown [RouterA-GigabitEthernet1/0/0] eth-trunk 1 [RouterA-GigabitEthernet1/0/0] quit [RouterA] interface gigabitethernet 2/0/0 [RouterA-GigabitEthernet2/0/0] undo shutdown [RouterA-GigabitEthernet2/0/0] eth-trunk 1 [RouterA-GigabitEthernet2/0/0] quit

2.

Configure Router B.
<Quidway> system-view [Quidway] sysname RouterB

# Create an Eth-Trunk interface and configure an IP addresses for it.


[RouterB] interface eth-trunk 1 [RouterB-Eth-Trunk1] ip address 100.1.1.2 24 [RouterB-Eth-Trunk1] quit

# Add GE 1/0/0 and GE 2/0/0 to Eth-Trunk 1.


[RouterB] interface gigabitethernet 1/0/0 [RouterB-GigabitEthernet1/0/0] undo shutdown [RouterB-GigabitEthernet1/0/0] eth-trunk 1 [RouterB-GigabitEthernet1/0/0] quit [RouterB] interface gigabitethernet 2/0/0 [RouterB-GigabitEthernet2/0/0] undo shutdown

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

3-47

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[RouterB-GigabitEthernet2/0/0] eth-trunk 1 [RouterB-GigabitEthernet2/0/0] quit

3.

Verify the configuration. Run the display interface eth-trunk command. You can view that the interface status is Up. Take the display of Router A as an example.
[RouterA] display interface eth-trunk 1 Eth-Trunk1 current state : UP Line protocol current state : UP Description : HUAWEI, Quidway Series, Eth-Trunk1 Interface, Route Port Hash arithmatic : According to IP The Maximum Transmit Unit is 1500 bytes Internet Address is 100.1.1.1/24 IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc09-9722 Physical is ETH_TRUNK Last 300 seconds input rate 0 bytes/sec, 0 packets/sec Last 300 seconds output rate 0 bytes/sec, 0 packets/sec Input: 1 packets,3 bytes, 7 unicast,9 broadcast,8 multicasts 10 errors,5 drops,11 unknowprotocol Output: 2 packets,4 bytes, 12 unicast,14 broadcast,13x multicasts 15 errors,6 drops ----------------------------------------------------PortName Status Weight ----------------------------------------------------GigabitEthernet1/0/0 UP 1 GigabitEthernet2/0/0 UP 1 ----------------------------------------------------The Number of Ports in Trunk : 2 The Number of UP Ports in Trunk : 2

Eth-Trunk interfaces on Router A and Router B can ping through each other.
[RouterA] ping -a 100.1.1.1 100.1.1.2 PING 100.1.1.2: 56 data bytes, press CTRL_C to break Reply from 100.1.1.2: bytes=56 Sequence=1 ttl=255 time=31 Reply from 100.1.1.2: bytes=56 Sequence=2 ttl=255 time=31 Reply from 100.1.1.2: bytes=56 Sequence=3 ttl=255 time=62 Reply from 100.1.1.2: bytes=56 Sequence=4 ttl=255 time=62 Reply from 100.1.1.2: bytes=56 Sequence=5 ttl=255 time=62 --- 100.1.1.2 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 31/49/62 ms ms ms ms ms ms

Configuration Files
l

Configuration file of Router A


# sysname RouterA # interface Eth-Trunk1 ip address 100.1.1.1 255.255.255.0 # interface GigabitEthernet1/0/0 undo shutdown eth-trunk 1 # interface GigabitEthernet2/0/0 undo shutdown eth-trunk 1 # return

3-48

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
l

3 LACP Configuration

Configuration file of Router B


# sysname RouterB # interface Eth-Trunk1 ip address 100.1.1.2 255.255.255.0 # interface GigabitEthernet1/0/0 undo shutdown eth-trunk 1 # interface GigabitEthernet2/0/0 undo shutdown eth-trunk 1 # return

3.10.3 Example for Configuring VLANs to Communicate Through Eth-Trunk Sub-interfaces


Networking Requirements
As shown in Figure 3-8, Router A is connected to Router B through Eth-Trunk 1, and Router B is connected to Router C through Eth-Trunk 2. Configure VLAN 10 on Router A and VLAN 20 on Router C. Create a sub-interface on Router B so that VLAN 10 and VLAN 20 can communicate through the Eth-Trunk sub-interface. Figure 3-8 Networking diagram of configuring VLANs to communicate through Eth-Trunk sub-interfaces

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. On Router B, create an Eth-Trunk sub-interface and configure an IP address for it. Configure the encapsulation mode of each Eth-Trunk sub-interface as 802.1Q and configure the associated VLANs. Configure Eth-Trunk interfaces on Router A and Router C as Layer 2 interfaces and allow VLAN frames to pass through.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 3-49

Issue 03 (2008-09-22)

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Data Preparation
To complete the configuration, you need the following data:
l

Two member interfaces GE 1/0/0 and GE 2/0/0 of a Layer 2 interface Eth-Trunk 1 on Router A Two member interfaces GE 1/0/0 and GE 2/0/0 of a Layer 3 interface Eth-Trunk 1 on Router B Two member interfaces GE 1/0/1 and GE 2/0/1 of a Layer 3 interface Eth-Trunk 2 on Router B Two member interfaces GE 1/0/0 and GE 2/0/0 of a Layer 2 interface Eth-Trunk 2 on Router C VLAN 10 associated with sub-interface Eth-Trunk 1.1 and VLAN 20 associated with EthTrunk 2.1 on Router B IP address 10.110.1.10 of sub-interface Eth-Trunk 1.1 and IP address 10.110.2.10 of subinterface Eth-Trunk 2.1

Configuration Procedure
1. Configure Router A.
<Quidway> system-view [Quidway] sysname RouterA

# Create Eth-Trunk 1 and configure the VLANs allowed on the interface.


[RouterA] interface eth-trunk 1 [RouterA-Eth-Trunk1] portswitch [RouterA-Eth-Trunk1] port link-type trunk [RouterA-Eth-Trunk1] port trunk allow-pass vlan 10 [RouterA-Eth-Trunk1] quit

# Add GE 1/0/0 and GE 2/0/0 to Eth-Trunk 1.


[RouterA] interface gigabitethernet 1/0/0 [RouterA-GigabitEthernet1/0/0] undo shutdown [RouterA-GigabitEthernet1/0/0] eth-trunk 1 [RouterA-GigabitEthernet1/0/0] quit [RouterA] interface gigabitethernet 2/0/0 [RouterA-GigabitEthernet2/0/0] undo shutdown [RouterA-GigabitEthernet2/0/0] eth-trunk 1 [RouterA-GigabitEthernet2/0/0] quit

2.

Configure Router C.
<Quidway> system-view [Quidway] sysname RouterC

# Create Eth-Trunk 2 and configure the VLANs allowed on the interface.


[RouterC] interface eth-trunk 2 [RouterC-Eth-Trunk2] portswitch [RouterC-Eth-Trunk2] port link-type trunk [RouterC-Eth-Trunk2] port trunk allow-pass vlan 20 [RouterC-Eth-Trunk2] quit

# Add GE 2/0/0 and GE 2/0/0 to Eth-Trunk 2.


[RouterC] interface gigabitethernet 1/0/0 [RouterC-GigabitEthernet1/0/0] undo shutdown [RouterC-GigabitEthernet1/0/0] eth-trunk 2 [RouterC-GigabitEthernet1/0/0] quit [RouterC] interface gigabitethernet 2/0/0 [RouterC-GigabitEthernet2/0/0] undo shutdown [RouterC-GigabitEthernet2/0/0] eth-trunk 2 [RouterC-GigabitEthernet2/0/0] quit

3-50

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3 LACP Configuration

3.

Configure Router B.
<Quidway> system-view [Quidway] sysname RouterB

# Create Eth-Trunk 1.
[RouterB] interface eth-trunk 1 [RouterB-Eth-Trunk1] quit

# Add GE 1/0/0 and GE 2/0/0 to Eth-Trunk 1.


[RouterB] interface gigabitethernet 1/0/0 [RouterB-GigabitEthernet1/0/0] undo shutdown [RouterB-GigabitEthernet1/0/0] eth-trunk 1 [RouterB-GigabitEthernet1/0/0] quit [RouterB] interface gigabitethernet 2/0/0 [RouterB-GigabitEthernet2/0/0] undo shutdown [RouterB-GigabitEthernet2/0/0] eth-trunk 1 [RouterB-GigabitEthernet2/0/0] quit

# Create Eth-Trunk 1.1 and configure an IP addresses for it.


[RouterB] interface eth-trunk 1.1 [RouterB-Eth-Trunk1.1] ip address 10.110.1.10 24

# Configure Eth-Trunk 1.1 to be encapsulated with 802.1Q and be associated with VLAN 10.
[RouterB-Eth-Trunk1.1] vlan-type dot1q 10 [RouterB-Eth-Trunk1.1] quit

# Create Eth-Trunk 2.
[RouterB] interface eth-trunk 2 [RouterB-Eth-Trunk2] quit

# Add GE 1/0/1 and GE 2/0/1 to Eth-Trunk 2.


[RouterB] interface gigabitethernet 1/0/1 [RouterB-GigabitEthernet1/0/1] undo shutdown [RouterB-GigabitEthernet1/0/1] eth-trunk 2 [RouterB-GigabitEthernet1/0/1] quit [RouterB] interface gigabitethernet 2/0/1 [RouterB-GigabitEthernet2/0/1] undo shutdown [RouterB-GigabitEthernet2/0/1] eth-trunk 2 [RouterB-GigabitEthernet2/0/1] quit

# Create Eth-Trunk 2.1 and configure an IP addresses for it.


[RouterB] interface eth-trunk 2.1 [RouterB-Eth-Trunk2.1] ip address 10.110.2.10 24

# Configure Eth-Trunk 2.1 to be encapsulated with 802.1Q and be associated with VLAN 20.
[RouterB-Eth-Trunk2.1] vlan-type dot1q 20 [RouterB-Eth-Trunk2.1] quit

4.

Verify the configuration. On the hosts in VLAN 10, configure the IP address of the host to be in the same network segment as the address of Eth-Trunk 1.1 and configure the default gateway address as the IP address 10.110.1.10/24 of Eth-Trunk 1.1. On the host in VLAN 20, configure the IP address of the host to be in the same network segment as the address of Eth-Trunk 2.1 and configure the default gateway address as the IP address 10.110.2.10/24 of Eth-Trunk 2.1. After the configuration, the hosts between VLAN 10 and VLAN 20 can ping through each other.

Configuration Files
l

Configuration file of Router A


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 3-51

Issue 03 (2008-09-22)

3 LACP Configuration
# sysname RouterA # interface Eth-Trunk1 portswitch port link-type trunk port trunk allow-pass vlan 10 # interface GigabitEthernet1/0/0 undo shutdown eth-trunk 1 # interface GigabitEthernet2/0/0 undo shutdown eth-trunk 1 # return l

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Configuration file of Router B


# sysname RouterB # interface Eth-Trunk1 # interface Eth-Trunk1.1 vlan-type dot1q 10 ip address 10.110.1.10 255.255.255.0 # interface Eth-Trunk2 # interface Eth-Trunk2.1 vlan-type dot1q 20 ip address 10.110.2.10 255.255.255.0 # interface GigabitEthernet1/0/0 undo shutdown eth-trunk 1 # interface GigabitEthernet1/0/1 undo shutdown eth-trunk 2 # interface GigabitEthernet2/0/0 undo shutdown eth-trunk 1 # interface GigabitEthernet2/0/1 undo shutdown eth-trunk 2 # return

Configuration file of Router C


# sysname RouterC # interface Eth-Trunk2 portswitch port link-type trunk port trunk allow-pass vlan 20 # interface GigabitEthernet1/0/0 undo shutdown eth-trunk 2 # interface GigabitEthernet2/0/0 undo shutdown eth-trunk 2 # return

3-52

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3 LACP Configuration

3.10.4 Example for Configuring Link Aggregation in Manual Load Balancing Mode
Networking Requirements
As shown in Figure 3-9, Router A and Router B are two NE80E/40Es. The link should be of high reliability and the load balancing of data traffic can be performed between Router A and Router B. Figure 3-9 Networking diagram of link aggregation in manual load balancing mode
RouterA Eth-Trunk 1
GE 1/0/1 GE 1/0/2 GE 1/0/3

Eth-Trunk 1

RouterB

Eth-Trunk

GE 1/0/1 GE 1/0/2 GE 1/0/3

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Create an Eth-Trunk. Add member interfaces to the Eth-Trunk. Check the configuration.
NOTE

After an Eth-Trunk is created, the default operation mode is the manual load balancing mode. By default, you need not configure the Eth-Trunk in manual load balancing mode. If the current operation mode is configured as other modes, use the mode command to change the mode. For details, refer to the chapter "Link Aggregation" in the Command Reference.

Data Preparation
To complete the configuration, you need the following data:
l l

Number of the LAG Type and number of the member interface of the Eth-Trunk

Configuration Procedure
1. Create an Eth-Trunk. # Configure Router A.
<Quidway> system-view [Quidway] sysname RouterA [RouterA] interface eth-trunk 1 [RouterA-Eth-Trunk1] quit

# Configure Router B.
<Quidway> system-view [Quidway] sysname RouterB [RouterB] interface eth-trunk 1 [RouterB-Eth-Trunk1] quit

2.
Issue 03 (2008-09-22)

Add member interfaces to the Eth-Trunk.


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 3-53

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

# Configure Router A.
[RouterA] interface gigabitethernet 1/0/1 [RouterA-Gigabitethernet1/0/1] undo shutdown [RouterA-Gigabitethernet1/0/1] eth-trunk 1 [RouterA-Gigabitethernet1/0/1] quit [RouterA] interface gigabitethernet 1/0/2 [RouterA-Gigabitethernet1/0/2] undo shutdown [RouterA-Gigabitethernet1/0/2] eth-trunk 1 [RouterA-Gigabitethernet1/0/2] quit [RouterA] interface gigabitethernet 1/0/3 [RouterA-Gigabitethernet1/0/3] undo shutdown [RouterA-Gigabitethernet1/0/3] eth-trunk 1 [RouterA-Gigabitethernet1/0/3] quit

# Configure Router B.
[RouterB] interface gigabitethernet 1/0/1 [RouterB-Gigabitethernet1/0/1] undo shutdown [RouterB-Gigabitethernet1/0/1] eth-trunk 1 [RouterB-Gigabitethernet1/0/1] quit [RouterB] interface gigabitethernet 1/0/2 [RouterB-Gigabitethernet1/0/2] undo shutdown [RouterB-Gigabitethernet1/0/2] eth-trunk 1 [RouterB-Gigabitethernet1/0/2] quit [RouterB] interface gigabitethernet 1/0/3 [RouterB-Gigabitethernet1/0/3] undo shutdown [RouterB-Gigabitethernet1/0/3] eth-trunk 1 [RouterB-Gigabitethernet1/0/3] quit

3.

Verify the configuration. Run the display trunkmembership command in any view. You can check whether EthTrunk 1 is created and whether member interfaces are correctly added. Take Router A as an example.
[RouterA] display trunkmembership eth-trunk 1 Trunk ID: 1 used status: VALID TYPE: ethernet Working Mode : Normal Working State: Normal Number Of Ports in Trunk = 3 Number Of UP Ports in Trunk = 3 operate status: up Interface GigabitEthernet1/0/1, valid, selected, operate up, weight=1, backup interface NULL Interface GigabitEthernet1/0/2, valid, selected, operate up, weight=1, backup interface NULL Interface GigabitEthernet1/0/3, valid, selected, operate up, weight=1, backup interface NULL

Configuration Files
l

Configuration file of Router A


# sysname RouterA # interface Eth-Trunk1 # interface GigabitEthernet1/0/1 undo shutdown eth-trunk 1 # interface GigabitEthernet1/0/2 undo shutdown eth-trunk 1 # interface GigabitEthernet1/0/3 undo shutdown

3-54

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
eth-trunk 1 # return l

3 LACP Configuration

Configuration file of Router B


# sysname RouterB # interface Eth-Trunk1 # interface GigabitEthernet1/0/1 undo shutdown eth-trunk 1 # interface GigabitEthernet1/0/2 undo shutdown eth-trunk 1 # interface GigabitEthernet1/0/3 undo shutdown eth-trunk 1 # return

3.10.5 Example for Configuring Link Aggregation in 1:1 Active/ Standby Mode
Networking Requirements
As shown in Figure 3-10, Router A and Router D are NE80E/40Es. The transit device can receive flush packets. The reliability of data transmission from Router A to Router D should be implemented through primary and backup links. Figure 3-10 Networking diagram of configuring link aggregation in 1:1 active/standby mode
RouterB GE 2/0/1 Main interface GE 2/0/2 Eth-Trunk 1 GE 1/0/2 GE 2/0/2 GE 2/0/1 RouterC GE 2/0/3 GE 2/0/3

RouterA GE 1/0/1

Main interface

RouterD GE 1/0/1

Eth-Trunk 1 GE 1/0/2 Active links Backup links

Configuration Roadmap
The configuration roadmap is as follows: Do as follows on the routers that need be configured with link aggregation in 1:1 active/standby mode. 1. Create an Eth-Trunk and configure the operation mode of the Eth-Trunk as the 1:1 active/ standby mode.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 3-55

Issue 03 (2008-09-22)

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

2. 3.

Add member interfaces to the Eth-Trunk and specify the primary interface. Enable interfaces to send flush packets.

Do as follows on the transit node: 1. 2. 3. Create a control VLAN. Enable interfaces to receive packets from the control VLAN. Enable interfaces to receive flush packets.

Data Preparation
To complete the configuration, you need the following data:
l l l

Number of the LAG of Router A and Router D Type and number of the member interface ID of the control VLAN

Configuration Procedure
1. Create an Eth-Trunk numbered 1 and configure the operation mode of the Eth-Trunk as the 1:1 active/standby mode. # Create an Eth-Trunk on Router A and specify the operation mode of the Eth-Trunk as the 1:1 active/standby mode.
<Quidway> system-view [Quidway] sysname RouterA [RouterA] interface eth-trunk 1 [RouterA-Eth-Trunk1] portswitch [RouterA-Eth-Trunk1] mode manual backup [RouterA-Eth-Trunk1] quit

# Create an Eth-Trunk on Router D and specify the operation mode of the Eth-Trunk as the 1:1 active/standby mode.
<Quidway> system-view [Quidway] sysname RouterD [RouterD] interface eth-trunk 1 [RouterD-Eth-Trunk1] portswitch [RouterD-Eth-Trunk1] mode manual backup [RouterD-Eth-Trunk1] quit

2.

Add member interfaces to the Eth-Trunk and specify the primary interface. # On Router A, add GE 1/0/1 and GE 1/0/2 to Eth-Trunk 1 and specify GE 1/0/1 as the primary interface.
[RouterA] interface gigabitethernet 1/0/1 [RouterA-GigabitEthernet1/0/1] undo shutdown [RouterA-GigabitEthernet1/0/1] eth-trunk 1 [RouterA-GigabitEthernet1/0/1] port-master [RouterA-GigabitEthernet1/0/1] quit [RouterA] interface gigabitethernet 1/0/2 [RouterA-GigabitEthernet1/0/2] undo shutdown [RouterA-GigabitEthernet1/0/2] eth-trunk 1 [RouterA-GigabitEthernet1/0/2] quit

# On Router D, add GE 1/0/1 and GE 1/0/2 to Eth-Trunk 1 and specify GE 1/0/1 as the primary interface.
[RouterD] interface gigabitethernet 1/0/1 [RouterD-GigabitEthernet1/0/1] undo shutdown [RouterD-GigabitEthernet1/0/1] eth-trunk 1 [RouterD-GigabitEthernet1/0/1] port-master [RouterD-GigabitEthernet1/0/1] quit

3-56

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[RouterD] interface gigabitethernet 1/0/2 [RouterD-GigabitEthernet1/0/2] undo shutdown [RouterD-GigabitEthernet1/0/2] eth-trunk 1 [RouterD-GigabitEthernet1/0/2] quit

3 LACP Configuration

3.

Enable interfaces to send flush packets. # Enable interfaces to send flush packets on Router A.
[RouterA] interface eth-trunk 1 [RouterA-Eth-Trunk1] smart-link flush send vlan 5 [RouterA-Eth-Trunk1] quit

# Enable interfaces to send flush packets on Router D.


[RouterD] interface eth-trunk 1 [RouterD-Eth-Trunk1] smart-link flush send vlan 5 [RouterD-Eth-Trunk1] quit

4.

Create a control VLAN on the transit node. # Configure Router B.


<Quidway> system-view [Quidway] sysname RouterB [RouterB] vlan 5 [RouterB-vlan5] quit

# Configure Router C.
<Quidway> system-view [Quidway] sysname RouterC [RouterC] vlan 5 [RouterC-vlan5] quit

5.

Enable interfaces of the transit node to receive packets from the control VLAN. # Configure Router B.
[RouterB] interface gigabitethernet 2/0/1 [RouterB-GigabitEthernet2/0/1] undo shutdown [RouterB-GigabitEthernet2/0/1] portswitch [RouterB-GigabitEthernet2/0/1] port trunk allow-pass vlan 5 [RouterB-GigabitEthernet2/0/1] quit [RouterB] interface gigabitethernet 2/0/2 [RouterB-GigabitEthernet2/0/2] undo shutdown [RouterB-GigabitEthernet2/0/2] portswitch [RouterB-GigabitEthernet2/0/2] port trunk allow-pass vlan 5 [RouterB-GigabitEthernet2/0/2] quit [RouterB] interface gigabitethernet 2/0/3 [RouterB-GigabitEthernet2/0/3] undo shutdown [RouterB-GigabitEthernet2/0/3] portswitch [RouterB-GigabitEthernet2/0/3] port trunk allow-pass vlan 5 [RouterB-GigabitEthernet2/0/3] quit

# Configure Router C.
[RouterC] interface gigabitethernet 2/0/1 [RouterC-GigabitEthernet2/0/1] undo shutdown [RouterC-GigabitEthernet2/0/1] portswitch [RouterC-GigabitEthernet2/0/1] port trunk allow-pass vlan 5 [RouterC-GigabitEthernet2/0/1] quit [RouterC] interface gigabitethernet 2/0/2 [RouterC-GigabitEthernet2/0/2] undo shutdown [RouterC-GigabitEthernet2/0/2] portswitch [RouterC-GigabitEthernet2/0/2] port trunk allow-pass vlan 5 [RouterC-GigabitEthernet2/0/2] quit [RouterC] interface gigabitethernet 2/0/3 [RouterC-GigabitEthernet2/0/3] undo shutdown [RouterC-GigabitEthernet2/0/3] portswitch [RouterC-GigabitEthernet2/0/3] port trunk allow-pass vlan 5 [RouterC-GigabitEthernet2/0/3] quit

6.

Enable interfaces of the transit node to receive flush packets. # Configure Router B.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

3-57

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[RouterB] interface gigabitethernet 2/0/1 [RouterB-GigabitEthernet2/0/1] smart-link flush enable control-vlan 5 [RouterB-GigabitEthernet2/0/1] quit [RouterB] interface gigabitethernet 2/0/2 [RouterB-GigabitEthernet2/0/2] smart-link flush enable control-vlan 5 [RouterB-GigabitEthernet2/0/2] quit [RouterB] interface gigabitethernet 2/0/3 [RouterB-GigabitEthernet2/0/3] smart-link flush enable control-vlan 5 [RouterB-GigabitEthernet2/0/3] quit

# Configure Router C.
[RouterC] interface gigabitethernet 2/0/1 [RouterC-GigabitEthernet2/0/1] smart-link flush enable control-vlan 5 [RouterC-GigabitEthernet2/0/1] quit [RouterC] interface gigabitethernet 2/0/2 [RouterC-GigabitEthernet2/0/2] smart-link flush enable control-vlan 5 [RouterC-GigabitEthernet2/0/2] quit [RouterC] interface gigabitethernet 2/0/3 [RouterC-GigabitEthernet2/0/3] smart-link flush enable control-vlan 5 [RouterC-GigabitEthernet2/0/3] quit

7.

Verify the configuration. # Check information about the LAG on the routers that are configured with link aggregation in 1:1 active/standby mode. Take Router A as an example. If the configuration is correct, you can view information about the operation mode, primary interface, and backup interface.
[RouterA] display eth-trunk 1 Eth-Trunk1's state information is: WorkingMode: BACKUP WorkingState: Master ------------------------------------------------------------------------------PortName Slave/Master GigabitEthernet1/0/1 M GigabitEthernet1/0/2 S

# Check the configuration on the interface of the transit node. Take GE 2/0/1 of Router B as an example.
[RouterB-GigabitEthernet2/0/1] display current-configuration interface gigabitethernet 2/0/1 port trunk allow-pass vlan 5 smart-link flush enable control-vlan 5

Configuration Files
l

Configuration file of Router A


# sysname RouterA # interface Eth-Trunk1 portswitch mode manual backup smart-link flush send vlan 5 # interface GigabitEthernet1/0/1 undo shutdown eth-trunk 1 port-master # interface GigabitEthernet1/0/2 undo shutdown eth-trunk 1 # return

Configuration file of Router B


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

3-58

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
# sysname RouterB # vlan batch 5 # interface GigabitEthernet2/0/1 undo shutdown portswitch port trunk allow-pass vlan 5 smart-link flush enable control-vlan 5 # interface GigabitEthernet2/0/2 undo shutdown portswitch port trunk allow-pass vlan 5 smart-link flush enable control-vlan 5 # interface GigabitEthernet2/0/3 undo shutdown portswitch port trunk allow-pass vlan 5 smart-link flush enable control-vlan 5 # return l

3 LACP Configuration

Configuration file of Router C


# sysname RouterC # vlan batch 5 # interface GigabitEthernet2/0/1 undo shutdown portswitch port trunk allow-pass vlan 5 smart-link flush enable control-vlan 5 # interface GigabitEthernet2/0/2 undo shutdown portswitch port trunk allow-pass vlan 5 smart-link flush enable control-vlan 5 # interface GigabitEthernet2/0/3 undo shutdown portswitch port trunk allow-pass vlan 5 smart-link flush enable control-vlan 5 # return

Configuration file of Router D


# sysname RouterD # interface Eth-Trunk1 portswitch mode manual backup smart-link flush send vlan 5 # interface GigabitEthernet1/0/1 undo shutdown eth-trunk 1 port-master # interface GigabitEthernet1/0/2 undo shutdown eth-trunk 1 #

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

3-59

3 LACP Configuration
return

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3.10.6 Example for Configuring Link Aggregation in Static LACP Mode


Networking Requirements
To improve the bandwidth and the reliability of two devices, configure the LAG on two directlyconnected routers. As shown in Figure 3-11, the requirements are as follows:
l l

Two active links can implement load balancing. One link between two devices can carry out backup. When a fault occurs on a link of active links, the backup link replaces the faulty link to keep the reliability of data transmission. The preemption function is configured. When the faulty interface is recovered, this interface can become the active interface again.

Figure 3-11 Networking diagram of link aggregation in static LACP mode


RouterA Eth-Trunk 1
GE 1/0/1 GE 1/0/2 GE 1/0/3

Eth-Trunk 1 RouterB

Eth-Trunk

GE 1/0/1 GE 1/0/2 GE 1/0/3

Active-links Backup links

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. 5. 6. 7. Create an Eth-Trunk on the router and configure the Eth-Trunk in static LACP mode. Add member interfaces to the Eth-Trunk. Configure the system priority and determine the Actor. Configure the upper threshold for the number of active interfaces. Configure the priority of the interface and determine the active link. Configure LACP preemption and set the delay for LACP preemption. Verify the configuration.

Data Preparation
To complete the configuration, you need the following data:
l l l l l

Number of the LAG of the routers at both ends System priority of Router A Upper threshold for the number of the active interfaces LACP priority of the active interface Delay for LACP preemption

Configuration Procedure
1. Create an Eth-Trunk numbered 1 and configure the operation mode of the Eth-Trunk as the static LACP mode.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

3-60

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3 LACP Configuration

# Configure Router A.
<RouterA> system-view [RouterA] interface eth-trunk 1 [RouterA-Eth-Trunk1] mode lacp-static [RouterA-Eth-Trunk1] quit

# Configure Router B.
<RouterB> system-view [RouterB] interface eth-trunk 1 [RouterB-Eth-Trunk1] mode lacp-static [RouterB-Eth-Trunk1] quit

2.

Add member interfaces to the Eth-Trunk. # Configure Router A.


[RouterA] interface gigabitethernet 1/0/1 [RouterA-Gigabitethernet1/0/1] undo shutdown [RouterA-Gigabitethernet1/0/1] eth-trunk 1 [RouterA-Gigabitethernet1/0/1] quit [RouterA] interface gigabitethernet 1/0/2 [RouterA-Gigabitethernet1/0/2] undo shutdown [RouterA-Gigabitethernet1/0/2] eth-trunk 1 [RouterA-Gigabitethernet1/0/2] quit [RouterA] interface gigabitethernet 1/0/3 [RouterA-Gigabitethernet1/0/3] undo shutdown [RouterA-Gigabitethernet1/0/3] eth-trunk 1 [RouterA-Gigabitethernet1/0/3] quit

# Configure Router B.
[RouterB] interface gigabitethernet 1/0/1 [RouterB-Gigabitethernet1/0/1] undo shutdown [RouterB-Gigabitethernet1/0/1] eth-trunk 1 [RouterB-Gigabitethernet1/0/1] quit [RouterB] interface gigabitethernet 1/0/2 [RouterB-Gigabitethernet1/0/2] undo shutdown [RouterB-Gigabitethernet1/0/2] eth-trunk 1 [RouterB-Gigabitethernet1/0/2] quit [RouterB] interface gigabitethernet 1/0/3 [RouterB-Gigabitethernet1/0/3] undo shutdown [RouterB-Gigabitethernet1/0/3] eth-trunk 1 [RouterB-Gigabitethernet1/0/3] quit

3. 4.

Set the system priority on Router A to 100 and make Router A as the LACP Actor. [RouterA] lacp priority 100 Set the upper threshold M for the number of active interfaces on Router A to 2.
[RouterA] interface eth-trunk 1 [RouterA-Eth-Trunk1] max active-linknumber 2
NOTE

Router A functions as the Actor and Router B need not set the upper threshold.

5.

Set priorities of the interfaces and determine active links. # Configure Router A.
[RouterA] interface gigabitethernet [RouterA-Gigabitethernet1/0/1] lacp [RouterA-Gigabitethernet1/0/1] quit [RouterA] interface gigabitethernet [RouterA-Gigabitethernet1/0/2] lacp [RouterA-Gigabitethernet1/0/2] quit [RouterA] interface gigabitethernet [RouterA-Gigabitethernet1/0/3] lacp [RouterA-Gigabitethernet1/0/3] quit 1/0/1 priority 100 1/0/2 priority 100 1/0/3 priority 150

# Configure Router B.
[RouterB] interface gigabitethernet 1/0/1 [RouterB-Gigabitethernet1/0/1] lacp priority 100

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

3-61

3 LACP Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[RouterB-Gigabitethernet1/0/1] quit [RouterB] interface gigabitethernet [RouterB-Gigabitethernet1/0/2] lacp [RouterB-Gigabitethernet1/0/2] quit [RouterB] interface gigabitethernet [RouterB-Gigabitethernet1/0/3] lacp [RouterB-Gigabitethernet1/0/3] quit

1/0/2 priority 100 1/0/3 priority 150

6.

Configure LACP preemption and set the delay for LACP preemption. # Configure Router A.
[RouterA] interface eth-trunk 1 [RouterA-Eth-Trunk1] lacp preempt enable [RouterA-Eth-Trunk1] lacp preempt delay 20

# Configure Router B.
[RouterB] interface eth-trunk 1 [RouterB-Eth-Trunk1] lacp preempt enable [RouterB-Eth-Trunk1] lacp preempt delay 20

7.

Verify the configuration. # Check information about the Eth-Trunk of the routers and check whether the negotiation succeeds or fails on the link.
[RouterA] display eth-trunk 1 Eth-Trunk1's state information is: Local: LAG ID: 1 WorkingMode: STATIC Preempt Delay: 20 Hash arithmetic: According to flow System Priority: 100 System ID: 00e0-fca8-0417 Least Active-linknumber: 1 Max active-linknumber: 2 Operate status: up Number Of Up Port In Trunk: 2 ---------------------------------------------------------------------------------------ActorPortName Status PortType PortPri PortNo PortKey PortState Weight GigabitEthernet1/0/1 Selected 1GE 100 6145 2865 11111100 1 GigabitEthernet1/0/2 Selected 1GE 100 6146 2865 11111100 1 GigabitEthernet1/0/3 Unselect 1GE 150 6147 2865 11100000 1 Partner: -------------------------------------------------------------------------------PartnerPortName SysPri SystemID PortPri PortNo PortKey PortState GigabitEthernet1/0/1 32768 00e0-fca6-7f85 32768 6145 2609 11111100 GigabitEthernet1/0/2 32768 00e0-fca6-7f85 32768 6146 2609 11111100 GigabitEthernet1/0/3 32768 00e0-fca6-7f85 32768 6147 2609 11110000 <RouterB> display eth-trunk 1 Eth-Trunk1's state information is: Local: LAG ID: 1 WorkingMode: STATIC Preempt Delay: 20 Hash arithmetic: According to flow System Priority: 32768 System ID: 00e0-fca6-7f85 Least Active-linknumber: 1 Max active-linknumber: 16 Operate status: up Number Of Up Port In Trunk: 2 -------------------------------------------------------------------------------------------ActorPortName Status PortType PortPri PortNo PortKey PortState Weight GigabitEthernet1/0/1 Selected 1GE 32768 6145 2609 11111100 1 GigabitEthernet1/0/2 Selected 1GE 32768 6146 2609 11111100 1 GigabitEthernet1/0/3 Unselect 1GE 32768 6147 2609 11100000 1

3-62

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
Partner:

3 LACP Configuration

-----------------------------------------------------------------------------PartnerPortName SysPri SystemID PortPri PortNo PortKey PortState GigabitEthernet1/0/1 32768 00e0-fca8-0417 100 6145 2865 11111100 GigabitEthernet1/0/2 32768 00e0-fca8-0417 100 6146 2865 11111100 GigabitEthernet1/0/3 32768 00e0-fca8-0417 150 6147 2865 11110000

The preceding information shows that the system priority of Router A is 100 and it is higher than the system priority of Router B. GE 1/0/1 and GE 1/0/2 of the Eth-Trunk become active interfaces and they are in the Selected state. GE 1/0/3 is in the Unselected state. The load balancing can be implemented on two links and the backup can be carried out on one link.

Configuration Files
l

Configuration file of Router A


# sysname RouterA # lacp priority 100 # interface Eth-Trunk1 mode lacp-static max active-linknumber 2 lacp preempt enable lacp preempt delay 20 # interface GigabitEthernet1/0/1 undo shutdown eth-trunk 1 lacp priority 100 # interface GigabitEthernet1/0/2 undo shutdown eth-trunk 1 lacp priority 100 # interface GigabitEthernet1/0/3 undo shutdown eth-trunk 1 lacp priority 150 # return

Configuration file of Router B


# sysname RouterB # interface Eth-Trunk1 mode lacp-static lacp preempt enable lacp preempt delay 20 # interface GigabitEthernet1/0/1 undo shutdown eth-trunk 1 lacp priority 100 # interface GigabitEthernet1/0/2 undo shutdown eth-trunk 1 lacp priority 100 # interface GigabitEthernet1/0/3 undo shutdown eth-trunk 1 lacp priority 150

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

3-63

3 LACP Configuration
# return

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3-64

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

4
About This Chapter

VLAN Configuration

Describes in which condition VLAN is used and how to encapsulate an interface with VLAN, along with typical examples. 4.1 Introduction This section describes basic concepts of VLAN and VLAN features supported by the NE80E/ 40E. 4.2 Configuring a VLAN Based on Layer 2 Interface This section describes how to configure VLANs based on Layer 2 interface. 4.3 Configuring VLANIF Interfaces to Support Communication Between VLANs Describes how to configure VLANs to communicate through VLANIF interfaces. 4.4 Configuring Sub-interfaces to Support Communication Between VLANs Describes how to configure VLANs to communicate through Layer 3 interfaces. 4.5 Configuring VLAN Trunk Describes how to configure different switches in the same VLAN to communicate. 4.6 Configuring VLAN Aggregation Describes how to solve the problem that multiple VLANs occupy excessive IP addresses. 4.7 Configuring VLAN Mapping This section describes how to configure different VLANs to communicate through VLAN mapping. 4.8 Configuring VLAN Damping Describes how to configure the VLAN damping function. 4.9 Configuring Interface Isolation in a VLAN Describes how to confiugre the interface isolation in a VLAN. 4.10 Configuring the Isolation Based on Interface Groups in a VLAN Describrs how to confiugre the isolation based on interface groups in a VLAN. 4.11 Maintaining VLAN This section describes how to clear the statistics of VLAN packets and debug VLANs.
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-1

4 VLAN Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4.12 Configuration Examples Provides several examples of VLAN networking.

4-2

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

4.1 Introduction
This section describes basic concepts of VLAN and VLAN features supported by the NE80E/ 40E. 4.1.1 VLAN Overview 4.1.2 VLAN Features Supported by the NE80E/40E

4.1.1 VLAN Overview


Traditional LAN
As shown in Figure 4-1, the traditional LAN is based on the bus structure. Figure 4-1 Networking diagram of the traditional LAN

The traditional LAN has the following two defects:


l l

If more than one node tries to send messages at the same time, conflicts occur. The information from any node is sent to all the other nodes. Thus, information security cannot be guaranteed.

After the emergence of the hub, another physical topology, star topology appears. The communication is still carried out on the shared media. The defect of conflict still exists. With the increase of computers in the network, the collision is more and the network efficiency is less. This kind network forms a collision area. The Ethernet network adopts the Carrier Sense Multiple Access/Collision Detect (CSMA/CD) to detect the collision. The collision is, however, not removed radically. The Ethernet network is also a broadcast network. If a large number of computers send information at the same time, the broadcast traffic consumes a great deal of bandwidth. In summary, the traditional network is faced with two defects:
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-3

4 VLAN Configuration
l l

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Collision area Broadcast area

In addition, the traditional network cannot ensure information security.

VLAN
The Virtual Local Area Network (VLAN) divides the special users logically without considering their physical locations. By using the virtual workgroup, VLAN isolates the broadcast areas within a LAN. VLAN is similar to the traditional LAN in function and operation. With the VLAN technology, a LAN is divided into several logical "LANs" (VLANs), with each VLAN being a broadcast area. In each VLAN, the hosts can communicate with each other just as they are in a LAN; however, the VLANs cannot interact with each other directly. Therefore, broadcast packets are restricted in one VLAN. Besides partitioning broadcast areas, the VLAN has more complex network applications. For example, a building is rent by different enterprise clients and they want to build their own LANs, and so the total cost of the LANs is high. If all the clients share the same LAN, the information security cannot be guaranteed. Through VLAN, different clients can share a LAN, and information security is guaranteed at the same time. As shown in Figure 4-2, the network is a typical VLAN application. Three switches are placed at different sites, such as different floors in a building. Each switch is connected with three PCs. The PCs belong to three different VLANs, which are enclosed by dashed blocks, such as different enterprise clients. Figure 4-2 Schematic diagram of the VLAN networking

4.1.2 VLAN Features Supported by the NE80E/40E


4-4 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

Port-based VLAN
NE80E/40E supports port-based VLAN. After the 802.1Q standard defines VLAN frames, the ports of some devices can identify VLAN frames while others cannot. According to their ability of identifying VLAN frames, the ports can be classified into four types:
l l l l

Access ports Trunk ports Hybrid ports QinQ ports

Table 4-1 shows the differences of the former three ports. Table 4-1 Comparison between the ports Type Access port Trunk port Identification Ability Identifies only Ethernet frames instead of VLAN frames. Identifies VLAN frames and allows frames from multiple VLANs to pass through. Identifies common Ethernet frames and VLAN frames, and allows frames form multiple VLANs to pass through. Frame with Tag Permits frames with a tag to pass the port. Permits a frame either with a tag or without a tag to pass. Purpose Connects a switch and a host directly. Connects switches. Connects a switch and a network with switches and PCs.

Hybrid port

QinQ ports are used by the QinQ protocol. QinQ ports provided by the NE80E/40E can add double tags to the frame. That is, a QinQ port adds a new tag before the existing one. Thus, the port can support 4094 x 4094 VLANs. The core idea of the QinQ protocol is to assign only one public network VLAN ID to each user. User packets with tags are inserted forcibly with the assigned VLAN ID before entering the backbone network of the Internet Service Provider (ISP). Packets can go through the backbone network with the new VLAN ID. When these packets arrive at the PE device at the other side of the backbone network, the newly assigned public network VLAN ID is stripped off and thus original user packets are sent to the CE device. It is called the QinQ protocol, since packets that pass through the backbone network have two 802.1q tag headers, one public network tag and one private network tag.
NOTE

l l

CE: specifies customer edge devices, which have interfaces directly connected with the Service Provider (SP). PE: specifies provider edge devices, which are directly connected with CE devices.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

4-5

4 VLAN Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

VLAN Broadcast Attribute


When an interface of a VLAN receives a broadcast packet or a unicast packet, which has no corresponding destination MAC address in the MAC address table, this interface broadcasts this packet to other interfaces in the VLAN. If static MAC address entries are configured, or malicious broadcast packets need to be prevented for the network security, you can forbid the packets broadcast in the VLAN.

Disabling MAC Address Learning on VLANs


When a static MAC address table is configured, you can disable MAC address learning on VLANs to improve the network security. When enabling MAC address learning on VLANs, you can do as follows to ensure the forwarding efficiency: 1. 2. Restrict the number of MAC addresses in the MAC address table. Set the actions when the number of MAC addresses exceeds the upper threshold, such as the keyword discard, forward, or alarm(send alarms to the NMS).

Communication Between VLANs


After a LAN is divided into VLANs, the PCs in a VLAN cannot directly communicate on Layer 2 with the PCs in another VLAN. For the communication between VLANs, you need to implement IP routing between VLANs. There are two implementations.
NOTE

Most equipment supports only one of the following modes.


l

Adopting routers Generally, Ethernet interfaces of routers (routed Ethernet interface) and Ethernet interfaces of switches (switched Ethernet interface) are connected to construct a LAN, as shown in Figure 4-3. Figure 4-3 Communication between VLANs through routers

4-6

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

In Figure 4-3, the PCs attached to the switch belong to two VLANs, namely VLAN 2 and VLAN 3. To realize the communication between VLAN 2 and VLAN 3, you need to:

On the router, create two sub-interfaces on the Ethernet interface, which is connected with the switch. Configure 802.1Q encapsulation and IP addresses on the two sub-interfaces. Change the type of the Ethernet port on the switch that is connected with the router to trunk or Hybrid and allow frames of VLAN 2 and VLAN 3 to pass.

For the detailed configuration, see Example for Configuring VLANs to Communicate Through Sub-interfaces.
l

Configuring VLANIF Interfaces on Switches If a switch supports IP routing features, the communication between VLANs can be achieved without routers. As shown in Figure 4-4, the PCs attached to the switch belong to two VLANs, namely VLAN 2 and VLAN 3. You can create two VLANIF interfaces on the switch and configure IP addresses for them. Then, the switch generates routes for these two VLAN segments to realize the communication between VLAN 2 and VLAN 3. Figure 4-4 Communication between VLANs through VLANIF interfaces

NOTE

After configuring a VLAN, you can create VLAN Interfaces through the interface vlanif command. VLANIF interfaces are virtual interfaces with Layer 3 attributes.

VLAN Trunk
On the switch, a common port can belong to only one VLAN. It can identify and transmit only the packets of the VLAN to which it belongs. When the ports on a switch belong to different VLANs, the ports are required to identify and transmit the packets of multiple VLANs. Similar problem also exists between switches and routers. A link that can identify and transmit the packets of multiple VLANs is called a trunk.
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-7

4 VLAN Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

A trunk has the following functions:


l

Relay function A trunk can transparently transmit VLAN packets to the connected switches and routers, and thus expand VLAN.

Trunk function On a trunk, packets of multiple VLANs can be transmitted.

IEEE 802.1Q defines the protocol that implements the trunk. The protocol identifies VLAN through the VLAN tag. A trunk is a point-to-point link between two routers. On the router, the ports that connect the trunk are called the trunk ports. One trunk can transmit data flow of multiple VLANs and allow a VLAN to expand from one router to another router.

VLAN Aggregation
To achieve communication between VLANs on switches, you need to configure an IP address for each VLANIF interface to realize IP routing. When many VLANs are involved, a great number of IP addresses are occupied. VLAN aggregation can solve the problem of excessive resources occupation. In VLAN aggregation, multiple VLANs are aggregated into a super-VLAN. Member VLANs of a super-VLAN are called sub-VLANs. You can create a VLANIF interface for a super-VLAN. Then, you can configure an IP address only for this interface rather than configuring IP addresses for each sub-VLAN. All sub-VLANs share the same IP network segment, and thus the IP address utilization is improved.

VLAN Mapping
The NE80E/40E also provides the VLAN mapping function. After the mappings of more than two VLAN IDs are configured on a port,
l

When sending a local VLAN frame to the outside VLAN, the port replaces the VLAN tag of the frame with the VLAN tag of the outside VLAN. When receiving an outside VLAN frame, the port replaces the VLAN tag of the frame with the VLAN tag of the local VLAN.

Thus, different VLANs can communicate with each other. The devices in two VLANs can communicate with each other by adopting the VLAN mapping only if the IP addresses of the devices are on the same network segment.

VLAN Damping
VLAN damping can properly delay to inform VLANIF interfaces that the interface is Down. Thus, it can suppress unnecessary route flapping. For VLANIF interfaces, after the status of all ports turns Down, the status of VLANIF interface turns Down. The change of VLANIF interface status can lead to re-convergence of routes in the whole network. The VLAN damping function can suppress route flapping resulted from VLANIF interface change.
4-8 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

When enabled with the damping function, a VLANIF interface is informed after the set suppression time that the status of the last interface in the Up state in the VLAN becomes Down. If an interface in the VLAN becomes Up within the suppression time, the VLANIF interface keeps Up.

Port Isolation in a VLAN


The NE80E/40E supports port isolation in a VLAN. One or a group of ports can be isolated in the VLAN. For port-based isolation in a VLAN, the isolated ports cannot communicate with each other at the data link layer. For communication, ARP proxy in the VLAN must be configured for the isolated ports. In this way, traffic in the VLAN can be monitored at the network layer. For the isolation based on port groups in a VLAN, you can isolate the packets between port groups by adding ports to different port groups. The ports in an isolated port group can communicate with each other and with the ports that are not added to an isolated port group. The isolation based on port groups supports the flexible planning of a VLAN and is mainly applied on the RRPP network. A VLAN involves multiple RRPP rings. The ports on different RRPP rings can be added to different port groups to avoid the broadcast storm.

4.2 Configuring a VLAN Based on Layer 2 Interface


This section describes how to configure VLANs based on Layer 2 interface. 4.2.1 Establishing the Configuration Task 4.2.2 Creating a VLAN 4.2.3 Configuring the Attributes of the Switched Ethernet Interface 4.2.4 Adding the Switched Ethernet Interface into the VLAN 4.2.5 (Optional) Disabling MAC Address Learning on a VLAN 4.2.6 (Optional) Disabling an Interface from Broadcasting Packets to Other Interfaces in a VLAN 4.2.7 Checking the Configuration

4.2.1 Establishing the Configuration Task


Applicable Environment
The NE80E/40E router developed by Huawei provide two types of Ethernet interface boards:
l

Switched Ethernet interface board: provides the switched Ethernet interface. It possesses the Layer 2 attributes and cannot be switched to the Layer 3 mode (routed mode). Routed Ethernet interface board: provides the routed Ethernet interface. It can be configured with the Layer 3 attributes and switched to the Layer 2 mode (switched mode) by commands.

Only a switched Ethernet interface can be added into a VLAN. The NE80E/40E supports the VLAN classification based on ports and provides the following attributes:
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-9

4 VLAN Configuration
l l

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Broadcast attribute Prohibiting the MAC address learning of a VLAN

Pre-configuration Tasks
Before configuring a VLAN based on Layer 2 interfaces, complete the following task:
l

Connecting the interface, setting the physical parameters of the interface, and ensuring that the status of the physical layer of the interface is Up

Data Preparation
To configure a VLAN based on Layer 2 interfaces, you need the following data. No. 1 2 3 Data VLAN ID Interface number of the Ethernet interface that is added into the VLAN Type and priority of the Ethernet interface

4.2.2 Creating a VLAN


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


vlan vlan-id

The VLAN is created and the VLAN view is displayed. The VLAN ID is an integer ranging from 1 to 4094. When you create a VLAN, if the VLAN already exists, you can enter its view directly. To create VLANs in batch, you can use the vlan batch command. Then use the vlan vlan-id command to enter the corresponding VLAN command view. ----End

4.2.3 Configuring the Attributes of the Switched Ethernet Interface


Procedure
Step 1 Run:
system-view

4-10

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

The system view is displayed. Step 2 Run:


interface { ethernet | gigabitethernet | eth-trunk | virtual-ethernet } interfacenumber

The specified Ethernet interface view is displayed. Step 3 Run:


portswitch

The port is configured as a switched port. If IP addresses on Ethernet, Eth-Trunk, GE or VE interfaces are borrowed, the portswitch command is unavailable on these interfaces. If there are any Layer 3 configurations on Ethernet, GE, Eth-Trunk or VE interface, this command does no take effect. To ensure that the portswitch command takes effect, clear all Layer 3 configurations on the interface. Step 4 (Optional) Run:
port link-type { access | dot1q-tunnel | hybrid | trunk }

The type of the port is configured.


l

If the switched Ethernet port is connected with a PC directly, the port must be configured as an access or a hybrid interface. If the switched Ethernet port is connected with an Ethernet port of another switch, the port must be configured as a trunk or a hybrid port.
NOTE

Trunk ports do not support the port default vlan command.

By default, the interface type is hybrid. Step 5 (Optional) Run:


port priority priority-value

The priority of the port is configured. The packets received on a port with a higher priority are forwarded preferentially. priority-value ranges from 0 to 7. The greater the value is, the higher the priority is. ----End

4.2.4 Adding the Switched Ethernet Interface into the VLAN


Context
NOTE

Trunk ports cannot be configured with default VLAN. Trunk ports cannot be added to a VLAN through the method described in this section.

There are two ways to add a switched Ethernet interface into a VLAN.

Procedure
l
Issue 03 (2008-09-22)

Configuring the Default VLAN of the Port in the Ethernet Interface View
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-11

4 VLAN Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

1.

Run:
system-view

The system view is displayed. 2. Run:


interface { ethernet | gigabitethernet | eth-trunk } interface-number

The specified Ethernet interface view is displayed. The interface added to a VLAN must be a switched interface. 3. Run:
port default vlan vlan-id

The default VLAN to which the port belongs is configured. l Specifying the Ports that the VLAN Includes in the VLAN View 1. Run:
system-view

The system view is displayed. 2. Run:


vlan vlan-id

The VLAN is created and the VLAN view is displayed. 3. Run:


port interface-type { interface-number1 [ to interface-number2 ] } &<1-10>

The ports contained in the VLAN are specified. The port added to a VLAN must be a switched port. When inputting a group of ports, ensure that the ports have correct formats. The port number behind the key word to must be greater than that before to. Besides, the types of ports in the range must be the same and the ports must exist. At a time, you can input up to ten port ranges with the key word to. ----End

4.2.5 (Optional) Disabling MAC Address Learning on a VLAN


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


vlan vlan-id

The VLAN is created and the VLAN view is displayed. Step 3 Run:
mac-address learning disable

The MAC address learning is disabled in the VLAN.


4-12 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

By default, the MAC address learning is enabled. To forbid new users to access the specified VLAN, you can use the mac-address learning disable command. ----End

4.2.6 (Optional) Disabling an Interface from Broadcasting Packets to Other Interfaces in a VLAN
Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


vlan vlan-id

The VLAN is created and the VLAN view is displayed. Step 3 Run:
broadcast disable

The interface is disabled from broadcasting packets to other interfaces in the VLAN. By default, the VLAN broadcast is enabled and an interface can broadcast packets to other ports in the VLAN.
NOTE

To suppress the Layer 2 broadcast traffic in a VLAN, run the broadcast-suppression threshold command in the Ethernet interface view to set the threshold for the broadcast traffic on a Layer 2 Ethernet interface.

----End

4.2.7 Checking the Configuration


Run the following command to check the previous configuration. Action Check the VLAN information. Command display vlan [ vlan-id [ statistics | verbose] ]

Run the display vlan command. You can view whether the broadcast attribute is enabled, the status of the VLAN, whether the MAC address learning is enabled. For example:
<Quidway> display vlan 2 verbose VLAN ID : 2 VLAN Type : Common Description : VLAN 0002 Status : Enable Broadcast : Enable MAC learning : Enable Statistics : Disable

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

4-13

4 VLAN Configuration
---------------Untagged Port: Eth-Trunk1

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Eth-Trunk2

4.3 Configuring VLANIF Interfaces to Support Communication Between VLANs


Describes how to configure VLANs to communicate through VLANIF interfaces. 4.3.1 Establishing the Configuration Task 4.3.2 Configuring an IP address for a VLANIF Interface 4.3.3 Checking the Configuration

4.3.1 Establishing the Configuration Task


Applicable Environment
As shown in Figure 4-4, you can create VLANIF interfaces on the router to enable the hosts in a VLAN to communicate with the hosts outside the local VLAN.

Pre-configuration Tasks
Before configuring VLANIF interfaces to support communication between VLANs, complete the following tasks:
l

Connecting the interface, setting the physical parameters of the interface, and ensuring that the status of the physical layer of the interface is Up Configuring a VLAN Based on Layer 2 Interfaces

Data Preparation
To configure VLANIF interfaces to support communication between VLANs, you need the following data. No. 1 2 Data VLAN ID IP address and subnet mask of the VLANIF interface

4.3.2 Configuring an IP address for a VLANIF Interface


Procedure
Step 1 Run:
system-view

4-14

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

The system view is displayed. Step 2 Run:


interface vlanif vlan-id

The VLANIF interface is created. The VLAN must exist before the VLANIF interface is created. Step 3 Run:
ip address ip-address { mask | mask-length } [ sub ]

The IP address of the VLANIF interface is configured. IP addresses of different VLANIF interfaces should be on different network segments, and so reachable routes are available among different VLAN users. After a VLANIF interface is created, you can configure IP features on the VLANIF interface. The configuration is similar to that of other routed Ethernet interfaces. ----End

4.3.3 Checking the Configuration


Run the following command to check the previous configuration. Action Check information about the VLANIF interface. Command display interface vlanif [ vlan-id ] [ | { begin | exclude | include } regular-expression ]

Run the display interface vlanif command. You can view the information such as the physical status, link protocol status, IP address, and mask of the VLANIF interface. For example:
<Quidway> display interface Vlanif 10 Vlanif10 current state : UP Line protocol current state : UP Description : HUAWEI, Quidway Series, Vlanif10 Interface, Route Port The Maximum Transmit Unit is 1500 bytes Internet Address is 10.110.10.11/24 IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-ab74-7700 Physical is VLANIF Last 300 seconds input rate 0 bits/sec, 0 packets/sec Last 300 seconds output rate 0 bits/sec, 0 packets/sec Input: 0 packets,0 bytes, 0 unicast,0 broadcast,0 multicasts 0 errors,0 drops,0 unknowprotocol Output:0 packets,0 bytes, 0 unicast,0 broadcast,0 multicasts 0 errors,0 drops

4.4 Configuring Sub-interfaces to Support Communication Between VLANs


Describes how to configure VLANs to communicate through Layer 3 interfaces.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

4-15

4 VLAN Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4.4.1 Establishing the Configuration Task 4.4.2 Configuring the VLAN Associated with Sub-interfaces 4.4.3 Configuring an IP Address for the Sub-interface 4.4.4 Checking the Configuration

4.4.1 Establishing the Configuration Task


Applicable Environment
As shown in Figure 4-3, this section describes how to configure VLANs to communicate through routers. To implement communication between the hosts in a VLAN and the hosts outside this VLAN, you need to create sub-interfaces on the Ethernet interface through which the router is connected to the switch and encapsulate these sub-interfaces with 802.1Q.

Pre-configuration Tasks
Before configuring sub-interfaces to support communication between VLANs, complete the following tasks:
l

Connecting the interface, setting the physical parameters of the interface, and ensuring that the status of the physical layer of the interface is Up Configuring a VLAN Based on Layer 2 Interfaces

Data Preparation
To encapsulate VLAN on an sub-interface, you need the following data. No. 1 2 3 Data Interface number of the Ethernet interface and sub-interface IP address and mask of the sub-interface ID range of the VLAN to which the interface belongs

4.4.2 Configuring the VLAN Associated with Sub-interfaces


Context
Do as follows on the routers, which belong to different VLANs that need to communicate:

Procedure
Step 1 Run:
system-view

4-16

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

The system view is displayed. Step 2 Run:


interface { ethernet | gigabitethernet | eth-trunk} interface-number.subinterfacenumber

The sub-interface view is displayed. The sub-interface type can be Ethernet sub-interface, GE sub-interface, or Eth-Trunk subinterface. Step 3 Run:
vlan-type dot1q vlan-id

The encapsulation type and VLAN ID of the Eth-Trunk sub-interface are configured. By default, a sub-interface is not encapsulated with 802.1Q and is not associated with any VLAN. To ensure the VLAN connectivity, the IDs of VLANs associated with the sub-interfaces at both ends must be consistent. ----End

4.4.3 Configuring an IP Address for the Sub-interface


Context

CAUTION
When sub-interfaces exist, if you use the shutdown command and the undo shutdown command on the main interface in succession, the two commands should be used at an interval of at least 15 seconds. Do as follows on the routers, which belong to different VLANs that need to communicate:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { ethernet | gigabitethernet | eth-trunk} interface-number.subinterfacenumber

The sub-interface is created and the sub-interface view is displayed. The sub-interface type can be Ethernet sub-interface, GE sub-interface, or Eth-Trunk subinterface. Step 3 Run:
ip address ip-address { mask | mask-length } [ sub ]

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

4-17

4 VLAN Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

The IP address of the sub-interface is configured. ----End

4.4.4 Checking the Configuration


Run the following command to check the previous configuration. Action Check the VLAN packet statistics of a specified sub-interface. Command display vlan statistics { vid vlan-id | interface { ethernet | gigabitethernet } interfacenumber.subinterface-number } *

Run the display vlan statistics command. You can view the the number of received or transmitted packets, and the number of received and transmitted error packets. For example:
<Quidway> display vlan statistics interface gigabitethernet2/0/0.1 VLAN packet statistics: 0 Packets received, 0 bytes 0 Packets transmitted, 0 bytes 0 Received error ,0 Transmitted error

4.5 Configuring VLAN Trunk


Describes how to configure different switches in the same VLAN to communicate. 4.5.1 Establishing the Configuration Task 4.5.2 Specifying the VLANs Supported by a Trunk Interface 4.5.3 Specifying the VLANs Supported by a Hybrid Interface 4.5.4 Checking the Configuration

4.5.1 Establishing the Configuration Task


Applicable Environment
If a VLAN contains multiple Ethernet switches, to realize the interconnection between users of the same VLAN on different switches, configure the interfaces that connect different switches as trunk interfaces or hybrid interfaces. As shown in Figure 4-5, if two routers are directly connected, a cross-device VLAN can be created by configuring the two connected interfaces as trunk interfaces.

4-18

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

Figure 4-5 Networking diagram of configuring trunk interfaces to connect the VLANs between devices

As shown in Figure 4-5, if two routers reside in the same network segment, a cross-device VLAN can be created by configuring the interfaces through which two routers and two servers are directly connected as hybrid interfaces. Figure 4-6 Networking diagram of configuring hybrid interfaces to connect the VLANs between devices

Trunk interfaces or hybrid interfaces through which an Ethernet switch is connected to other Ethernet switches must be Layer 2 Ethernet interfaces. Trunk interfaces can connect only switches or routers. Hybrid interfaces can connect routers, routers and switches, and switches and PCs. When configuring a VLAN trunk, choose to configure trunk interfaces or hybrid interfaces as required.

Pre-configuration Tasks
Before configuring a VLAN trunk, complete the following tasks:
l l

Configuring connections on switches in the same VLAN Configuring a VLAN Based on Layer 2 Interfaces

Data Preparation
To configure a VLAN trunk, you need the following data.
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-19

4 VLAN Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

No. 1 2 3

Data Port number of the trunk interface or the hybrid interface ID of VLANs supported on the trunk interface or the hybrid interface ID of the VLAN frame without tag sent on the hybrid interface

4.5.2 Specifying the VLANs Supported by a Trunk Interface


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { ethernet | gigabitethernet | eth-trunk } interface-number

The specified Ethernet interface view is displayed. Step 3 Run:


portswitch

The interface is switched to a Layer 2 interface. Step 4 Run:


port link-type trunk

The interface is configured to a trunk interface. Step 5 Run:


port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }

The VLANs supported by the trunk interface are specified. A trunk interface can permit frames of multiple VLANs to pass through. Thus, the interfaces of different switches in the same VLAN can communicate. ----End

4.5.3 Specifying the VLANs Supported by a Hybrid Interface


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { ethernet | gigabitethernet | eth-trunk } interface-number

4-20

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

The specified Ethernet interface view is displayed. Step 3 Run:


portswitch

The interface is switched to a Layer 2 interface. Step 4 Run:


port link-type hybrid

The interface is configured to a hybrid interface. Step 5 Run:


port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }

The VLANs supported by the trunk interface are specified. A trunk interface can permit frames of multiple VLANs to pass through. Thus, the interfaces of different switches in the same VLAN can communicate. ----End

4.5.4 Checking the Configuration


Run the following commands to check the previous configuration. Action Check the VLAN information. Check the information about VLANs supported by the trunk interface. Command display vlan [ vlan-id [ statistics | verbose] ] display port vlan [ interface-type interfacenumber ]

Run the display vlan command. You can view the VLAN type, whether the broadcast attribute is enabled, and whether the MAC address learning is enabled. For example:
<Quidway> display vlan 2 verbose VLAN ID : 2 VLAN Type : Common Description : VLAN 0002 Status : Enable Broadcast : Enable MAC learning : Enable Statistics : Disable ---------------Untagged Port: Eth-Trunk1

Eth-Trunk2

Run the display port vlan command. You can view the information about the port number, the default VLAN of the port, and the number of VLANs supported by the interface. For example:
<Quidway> display port vlan Port Link Type PVID Trunk VLAN List --------------------------------------------------------------------------GigabitEthernet1/0/0 trunk 0 5 Eth-Trunk2 hybrid 2 10-12, 2049

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

4-21

4 VLAN Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4.6 Configuring VLAN Aggregation


Describes how to solve the problem that multiple VLANs occupy excessive IP addresses. 4.6.1 Establishing the Configuration Task 4.6.2 Configuring Sub-VLANs 4.6.3 Creating a Super-VLAN 4.6.4 Configuring an IP Address for the VLANIF Interface 4.6.5 (Optional) Configuring the Proxy ARP for the Super-VLAN 4.6.6 Checking the Configuration

4.6.1 Establishing the Configuration Task


Applicable Environment
VLAN aggregation solves the problem that excessive IP addresses occupation caused by VLANs. As shown in Figure 4-7, in VLAN aggregation, multiple VLANs are aggregated into a superVLAN. Member VLANs of a super-VLAN are called sub-VLANs. All sub-VLANs share the same IP network segment. Figure 4-7 Application scenario of VLAN aggregation

If a large number of VLANs exist in an Ethernet network, VLAN aggregation can simplify the configurations.

Pre-configuration Tasks
Before configuring VLAN aggregation, complete the following tasks:
4-22 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
l l

4 VLAN Configuration

Configuring Ethernet interfaces or Eth-Trunk interfaces Connecting the interface, setting the physical parameters of the interface, and ensuring that the status of the physical layer of the interface is Up

Data Preparation
To configure VLAN aggregation, you need the following data. No. 1 2 3 Data IDs of the sub-VLANs and the number of ports included by those sub-VLANs ID of the super-VLAN IP address and mask of the VLANIF interface

4.6.2 Configuring Sub-VLANs


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


vlan vlan-id

The VLAN is created and the VLAN view is displayed. Step 3 Run:
port interface-type { interface-number1 [ to interface-number2 ] } &<1-10>

The ports contained in the VLAN are specified. When configuring a sub-VLAN, you need to add ports into the created VLAN only. You cannot create a VLANIF interface on the sub-VLANIF interface.
NOTE

Before configuring a super-VLAN, you have to configure a sub-VLAN.

----End

4.6.3 Creating a Super-VLAN


Procedure
Step 1 Run:
system-view

The system view is displayed.


Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-23

4 VLAN Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Step 2 Run:
vlan vlan-id

The VLAN is created and the VLAN view is displayed. Step 3 Run:
aggregate-vlan

The VLAN is configured as a super-VLAN. The ID of a super-VLAN must be different from that of a sub-VLAN. A super-VLAN cannot contain any physical ports.
NOTE

Using the undo aggregate-vlan command in the VLAN view, you can change a super-VLAN port to a sub-VLAN port.

Step 4 Run:
access-vlan { vlan-id1 [ to vlan-id2 ] } &<1-10>

The sub-VLANs are added into the super-VLAN. Only sub-VLANs can be added into a super-VLAN. While adding VLANs into a super-VLAN, ensure they are all sub-VLANs. ----End

4.6.4 Configuring an IP Address for the VLANIF Interface


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface vlanif vlan-id

The VLANIF interface is created. Only the super-VLAN supports the VLANIF interface; the sub-VLAN does not support the VLANIF interface. vlan-id is the ID of the super-VLAN. Step 3 Run:
ip address ip-address { mask | mask-length } [ sub ]

The IP address for the VLANIF interface is configured. The network segment to which the IP address of the VLANIF interface belongs to must include the subnet segments where the users of sub-VLANs reside.
NOTE

The interfaces of different sub-VLANs cannot have the same IP address.

----End
4-24 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

4.6.5 (Optional) Configuring the Proxy ARP for the Super-VLAN


Context

CAUTION
The proxy ARP can take effect only after an IP address is configured on VLANIF interfaces of a super-VLAN.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface vlanif vlan-id

The VLANIF interface is created. Only the super-VLAN supports the VLANIF interface; the sub-VLAN does not support the VLANIF interface. vlan-id is the ID of the super-VLAN. Step 3 Run:
arp-proxy enable

The proxy ARP is enabled on the VLANIF interface. Step 4 Run:


arp-proxy inter-sub-vlan-proxy enable

The proxy ARP is enabled between sub-VLANs. ----End

4.6.6 Checking the Configuration


Run the following commands to check the previous configuration. Action Check information about the VLAN. Check information about the VLANIF interface. Command display vlan [ vlan-id [ statistics | verbose] ] display interface vlanif [ vlan-id ] [ | { begin | exclude | include } regular-expression ]

Run the display vlan verbose command. You can view the VLAN type. For example:
<Quidway> display vlan 2 verbose VLAN ID : 2

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

4-25

4 VLAN Configuration
VLAN Type Description Status Broadcast MAC learning Statistics --------------sub-VLAN List: 1 : : : : : : Super VLAN 0002 Enable Enable Enable Disable 3

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Run the display interface vlanif command. You can view the information such as physical status of the VLANIF interface, link protocol status, IP address and mask. For example:
<Quidway> display interface vlanif 2 Vlanif2 current state : UP Line protocol current state : UP Description : HUAWEI, Quidway Series, Vlanif10 Interface, Route Port The Maximum Transmit Unit is 1500 bytes Internet Address is 10.110.10.11/24 IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-ab74-7700 Physical is VLANIF Last 300 seconds input rate 0 bits/sec, 0 packets/sec Last 300 seconds output rate 0 bits/sec, 0 packets/sec Input: 0 packets,0 bytes, 0 unicast,0 broadcast,0 multicasts 0 errors,0 drops,0 unknowprotocol Output:0 packets,0 bytes, 0 unicast,0 broadcast,0 multicasts 0 errors,0 drops

4.7 Configuring VLAN Mapping


This section describes how to configure different VLANs to communicate through VLAN mapping. 4.7.1 Establishing the Configuration Task 4.7.2 Configuring Port Type 4.7.3 Configuring the Allowed VLAN on the Port 4.7.4 Configuring Replacement of Outer VLAN Tag 4.7.5 Checking the Configuration

4.7.1 Establishing the Configuration Task


Applicable Environment
Through VLAN mapping, two VLANs on different devices whose IP addresses are in the same network segment can communicate. As shown in Figure 4-8, VLAN 1 connects to Router A through upstream link. VLAN 2 connects to Router B through upstream link. Router A and Router B are connected by Router C. The host IP addresses of VLAN 1 and VLAN 2 are in the same network segment. By configuring VLAN mapping on GE 1/0/1 of Router A and GE 1/0/2 of Router B, VLAN 1 and VLAN 2 can communication.

4-26

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

Figure 4-8 Networking diagram of configuring VLAN mapping

Pre-configuration Tasks
Before configuring VLAN mapping, complete the following tasks:
l l

Configuring Ethernet interfaces and Eth-Trunk interfaces Configuring a VLAN Based on Layer 2 Interfaces

Data Preparation
Before configuring VLAN mapping, you need the following data. No. 1 2 Data VLAN ID before replacement VLAN ID after replacement

4.7.2 Configuring Port Type


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { ethernet | gigabitethernet | eth-trunk } interface-number

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

4-27

4 VLAN Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

The Ethernet interface view is displayed. The interface is the one that needs VLAN mapping configuration. Step 3 Run:
portswitch

Set the port as a switched port. Step 4 Run:


port link-type { hybrid | trunk }

Configure the type of interface as hybrid or trunk. By default, the port type is hybrid. ----End

4.7.3 Configuring the Allowed VLAN on the Port


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { ethernet | gigabitethernet | eth-trunk } interface-number

The Ethernet interface view is displayed. Here, the port is the one that needs to be configured with VLAN mapping. Step 3 Run:
port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }

You can configure the VLAN that is allowed to pass ports with VLAN mapping. The VLAN allowed passing the VLAN mapping port must be local VLAN ID rather than other IDs of other VLANs. ----End

4.7.4 Configuring Replacement of Outer VLAN Tag


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { ethernet | gigabitethernet | eth-trunk } interface-number

The Ethernet interface view is displayed.


4-28 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

Step 3 Run:
port vlan-mapping outside-vlan vlan-id1 [ to vlan-id2 ] map-vlan vlan-id3

Replace the outer VLAN tag with vlan-id3. By default, the port is disabled with VLAN mapping. ----End

4.7.5 Checking the Configuration


Run the following command to check the previous configuration. Action View VLAN information Command display vlan [ vlan-id [ statistics | verbose] ]

Running the display vlan command, you can view information about the interface enabled with VLAN mapping. For example:
<Quidway> display vlan 10 verbose VLAN ID : 10 VLAN Type : Common Description : VLAN 0010 Status : Enable Broadcast : Enable MAC learning : Enable Statistics : Disable ---------------Tagged Port: Ethernet1/0/0 Ethernet1/0/2 ---------------QinQ-map Port: Ethernet1/0/2

Ethernet1/0/1

4.8 Configuring VLAN Damping


Describes how to configure the VLAN damping function. 4.8.1 Establishing the Configuration Task 4.8.2 Configuring VLAN Damping 4.8.3 Checking the Configuration

4.8.1 Establishing the Configuration Task


Applicable Environment
To avoid network flapping caused by the change of the VLANIF interface status, enable VLAN damping on the VLANIF interface. In this manner, you can lengthen the period during which the VLANIF interface status changes to Down.
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-29

4 VLAN Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Pre-configuration Tasks
Before configuring VLAN damping, complete the following tasks:
l l

Configuring a VLAN Based on Layer 2 Interfaces Configuring VLANIF Interfaces to Support Communication Between VLANs

Data Preparation
To configure VLAN damping, you need the following data. No. 1 2 Data Number of the VLANIF interface Suppression period configured in the VLAN damping

4.8.2 Configuring VLAN Damping


Context
Do as follows on the VLANIF interfaces:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface vlanif interface-number

The specified VLANIF interface view is displayed. The VLAN associated with the VLANIF interface is created. Step 3 Run:
damping time delay-time

The suppression time is configured. The value ranges from 0 to 20, in seconds. By default, the suppression time is set to 0 seconds. After the suppression time, the Down state of interfaces is reported to VLANIF interfaces. ----End

4.8.3 Checking the Configuration


Run the following command to check the previous configuration.
4-30 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

Action Check information about the VLANIF interface.

Command display interface vlanif interface-number

Run the display interface vlanif command. You can view the information such as the physical status of the VLANIF interface, link protocol status, IP address and mask. For example:
<Quidway> display interface vlanif 10 Vlanif10 current state : UP Line protocol current state : UP Description : HUAWEI, Quidway Series, Vlanif10 Interface, Route Port The Maximum Transmit Unit is 1500 bytes The Holdoff Timer is 10(sec) Internet Address is 10.110.10.11/24 IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-ab74-7700 Physical is VLANIF Last 300 seconds input rate 0 bits/sec, 0 packets/sec Last 300 seconds output rate 0 bits/sec, 0 packets/sec Input: 0 packets,0 bytes, 0 unicast,0 broadcast,0 multicasts 0 errors,0 drops,0 unknowprotocol Output:0 packets,0 bytes, 0 unicast,0 broadcast,0 multicasts 0 errors,0 drops

4.9 Configuring Interface Isolation in a VLAN


Describes how to confiugre the interface isolation in a VLAN. 4.9.1 Establishing the Configuration Task 4.9.2 Configuring Interface Isolation in a VLAN 4.9.3 Enabling ARP Proxy in a VLAN

4.9.1 Establishing the Configuration Task


Applicable Environment
When some interfaces are limited not to connect directly, you can configure the interface isolation in a VLAN. When the interfaces isolated in a VLAN need to connect, the connection must be implemented through the layer 3 route. In this way, the users in a VLAN can be managed and controlled flexibly.

Pre-configuration Tasks
Before configuring the interface isolation in VLAN, complete the configuration of VLAN based on the interface.

Data Preparation
To configure the interface isolation in VLAN, you need the following data.
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-31

4 VLAN Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

No. 1 2 3

Data VLAN number Numbers of interfaces that need to be isolated in a VLAN IP addresses and sub net masks of the VLANIF interfaces

4.9.2 Configuring Interface Isolation in a VLAN


Context
Do as follows on the routers:

Procedure
l Enabling the Interface Isolation 1. Run:
system-view

The system view is displayed. 2. Run:


interface { gigabitethernet | eth-trunk } interface-number

The specified Ethernet interface view is displayed. 3. Run:


portswitch

The interface is set to the switched interface. 4. Run:


port isolate-state enable vlan { vlan-id1 [ to vlan-id2 ] } &<1-10>

The interface isolation is enabled in a VLAN. When this command is run, the VLAN should include this interface. l Configuring the Interface Isolation in the VLAN View 1. Run:
system-view

The system view is displayed. 2. Run:


vlan vlan-id

The VLAN view is displayed. 3. Run:


port isolate { { interface-type interface-number} &<1-10>| all }

The interfaces that need to be isolated are configured in a VLAN. ----End


4-32 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

4.9.3 Enabling ARP Proxy in a VLAN


Context
Do as follows on the routers:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface vlanif vlan-id

The VLANIF interface is created. Step 3 Run:


ip address ip-address { mask | mask-length } [ sub ]

The IP addresses are configured for the VLANIF interfaces. The IP addresses of the VLANIF interfaces and those of the hosts in the VLAN are on the same network segment. The IP addresses of different VLANIF interfaces should be on the different network segments, so that there are reachable routes between the users in different VLANs. Step 4 Run:
arp-proxy inner-sub-vlan-proxy enable

The ARP proxy is enabled in a VLAN. ----End

4.10 Configuring the Isolation Based on Interface Groups in a VLAN


Describrs how to confiugre the isolation based on interface groups in a VLAN. 4.10.1 Establishing the Configuration Task 4.10.2 Adding an Interface to the Group to Be Isolated 4.10.3 Checking the Configuration

4.10.1 Establishing the Configuration Task


Applicable Environment
When you need to isolate packets between interface groups, you can configure the isolation based on interface groups in a VLAN.
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-33

4 VLAN Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

You can add the interfaces to be isolated to different interface groups and the interfaces in the interface groups cannot communicate with each other.

Pre-configuration Tasks
Before configuring the isolation based on interface groups in a VLAN, complete the configuration of the interface-based VLAN.

Data Preparation
To configure the isolation based on interface groups in a VLAN, you need the following data. No. 1 2 Data VLAN number Numbers of interfaces and interface groups to be isolated in a VLAN

4.10.2 Adding an Interface to the Group to Be Isolated


Context
Do as follows on the routers:

Procedure
Step 1 Run:
system view

The system view is displayed. Step 2 Run:


interface { gigabitethernet | eth-trunk } interface-number

The Ethernet interface view is displayed. Step 3 Run:


portswitch

The interface is set as a switched interface. Step 4 Run:


port-isolation group group-id

The interface is added to a specific group. The interface must be added to the VLAN before you run this command. ----End

4.10.3 Checking the Configuration


Run the following commands to check the previous configuration.
4-34 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

Action View information about an isolated interface group.

Command display port-isolation group { group-id | brief }

Run the display port-isolation command. You can view the information about an isolated interface group. For example:
[Quidway] display port-isolation group 4 Port islation group 4 Eth-Trunk3 Eth-Trunk5 port islation group 4 has 2 ports

Run the display port-isolation brief command. You can view the information about all isolated interface groups. For example:
[Quidway] display port-isolation group brief Port islation group 4 Eth-Trunk3 Eth-Trunk5 port islation group 4 has 2 ports Port islation group 5 Eth-Trunk4 Eth-Trunk6 port islation group 5 has 2 ports

4.11 Maintaining VLAN


This section describes how to clear the statistics of VLAN packets and debug VLANs. 4.11.1 Clearing the Statistics of VLAN Packets

4.11.1 Clearing the Statistics of VLAN Packets

CAUTION
Statistics about VLAN packets cannot be restored after you clear it. So, confirm the action before you use the command. To clear the statistics of VLAN packets, run the following reset commands in the user view. Action Clear statistics about packets of a specified VLAN. Clear statistics about the VLAN packets on a specified sub-interface. Command reset vlan statistics [ vid ] vlan-id reset vlan statistics interface interface-type interface-number.subinterface-number

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

4-35

4 VLAN Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4.12 Configuration Examples


Provides several examples of VLAN networking. 4.12.1 Example for Configuring a VLAN Based on Layer 2 Interface 4.12.2 Example for Configuring VLANs to Communicate Through VLANIF Interfaces 4.12.3 Example for Configuring VLANs to Communicate Through Sub-interfaces 4.12.4 Example for Configuring VLAN and Non-VLAN to Communicate Through Subinterfaces 4.12.5 Example for Configuring VLAN Trunks 4.12.6 Example for Configuring VLAN Aggregation 4.12.7 Example for Configuring VLAN Mapping 4.12.8 Example for Configuring VLAN Damping 4.12.9 Example for Configuring Interface Isolation in a VLAN 4.12.10 Example for Configuring the Isolation Based on Interface Groups in a VLAN

4.12.1 Example for Configuring a VLAN Based on Layer 2 Interface


Networking Requirements
As shown in Figure 4-9, the LAN contains four hosts. The four hosts belong to two groups, namely Group 1 and Group 2. It is required to separate the two groups. Thus, the two groups cannot communicate. Figure 4-9 Configuring a VLAN based on Layer 2 interface

Configuration Roadmap
The configuration roadmap is as follows:
4-36 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

1. 2.

Create a VLAN. Add interfaces into the VLAN.

Data Preparation
To complete the configuration, you need the following data:
l l

Ethernet 1/0/1 and Ethernet 1/0/2 belong to VLAN 2. Ethernet 1/0/3 and Ethernet 1/0/4 belong to VLAN 3.

Configuration Procedure
1. Configure a switch. # Create VLAN 2.
<Quidway> system-view [Quidway] vlan 2

# Add Ethernet 1/0/1 and Ethernet 1/0/2 to VLAN 2.


[Quidway-vlan2] port ethernet 1/0/1 to 1/0/2

# Create VLAN 3.
[Quidway] vlan 3

# Add Ethernet 1/0/3 and Ethernet 1/0/4 to VLAN 3.


[Quidway-vlan3] port ethernet 1/0/3 to 1/0/4

2.

Verify the configuration. The ping from any host in Group 1 to any host in Group 2 fails. It can be concluded that the communication between two groups is cut off.

Configuration Files
# sysname Quidway # vlan batch 2 to 3 # interface Ethernet1/0/1 undo shutdown port default vlan 2 # interface Ethernet1/0/2 undo shutdown port default vlan 2 # interface Ethernet1/0/3 undo shutdown port default vlan 3 # interface Ethernet1/0/4 undo shutdown port default vlan 3 # return

4.12.2 Example for Configuring VLANs to Communicate Through VLANIF Interfaces


Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-37

4 VLAN Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Networking Requirements
As shown in Figure 4-10, there are two VLANs, namely VLAN 2 and VLAN 3.
l l

VLAN 2 includes the ports GE 1/0/0 and GE 2/0/0. VLAN 3 includes the ports GE 3/0/0 and GE 4/0/0.

Suppose these GE ports are all routed interfaces, and VLAN 2 and VLAN 3 can communicate through VLANIF interfaces. Figure 4-10 Configuring VLANs based on ports

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Change the routed interfaces to the switched interfaces Create a VLAN and then add the switched interfaces to the VLAN Configure routes for the VLANIF interfaces

Data Preparation
To complete the configuration, you need the following data.
l l l l

Ethernet 1/0/0 and Ethernet 2/0/0 belong to VLAN 2. Ethernet 3/0/0 and Ethernet 4/0/0 belong to VLAN 3. The IP address of VLANIF 2 is 120.1.1.1/24. The IP address of VLANIF 3 is 130.1.1.1/24.

Configuration Procedure
1. Configure VLAN 2. # Switch the interfaces to the switched interface (Layer 2 mode).
[Quidway] interface gigabitethernet 1/0/0 [Quidway-GigabitEthernet1/0/0] undo shutdown [Quidway-GigabitEthernet1/0/0] portswitch [Quidway-GigabitEthernet1/0/0] quit

4-38

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[Quidway] interface gigabitethernet 2/0/0 [Quidway-GigabitEthernet2/0/0] undo shutdown [Quidway-GigabitEthernet2/0/0] portswitch [Quidway-GigabitEthernet2/0/0] quit

4 VLAN Configuration

# Create the VLAN 2.


[Quidway] vlan 2

# Add GE 1/0/0 and GE 2/0/0 into the VLAN 2.


[Quidway-vlan2] port gigabitethernet 1/0/0 2/0/0 [Quidway-vlan2] quit

# Configure the VLANIF interface.


[Quidway] interface vlanif 2 [Quidway-Vlanif2] undo shutdown [Quidway-Vlanif2] ip address 120.1.1.1 24 [Quidway-Vlanif2] quit

2.

Configure VLAN 3. # Switch the interfaces to the switched interface.


[Quidway] interface gigabitethernet 3/0/0 [Quidway-GigabitEthernet3/0/0] undo shutdown [Quidway-GigabitEthernet3/0/0] portswitch [Quidway-GigabitEthernet3/0/0] quit [Quidway] interface gigabitethernet 4/0/0 [Quidway-GigabitEthernet4/0/0] undo shutdown [Quidway-GigabitEthernet4/0/0] portswitch [Quidway-GigabitEthernet4/0/0] quit

# Create the VLAN 3.


[Quidway] vlan 3

# Add GE 3/0/0 and GE 4/0/0 to VLAN 3.


[Quidway-vlan3] port gigabitethernet 3/0/0 4/0/0 [Quidway-vlan3] quit

# Configure the VLANIF interface.


[Quidway] interface vlanif 3 [Quidway-Vlanif3] ip address 130.1.1.1 24 [Quidway-Vlanif3] quit

3.

Verify the configuration. On the hosts in VLAN 2, configure the default gateway address as the IP address 120.1.1.1/24 of VLANIF 2. On the hosts in VLAN 3, configure the default gateway address as the IP address 130.1.1.1/24 of VLANIF 3. Then the hosts in VLAN 2 can communicate with the hosts in VLAN 3.

Configuration Files
# sysname Quidway # vlan batch 2 to 3 # interface Vlanif2 undo shutdown ip address 120.1.1.1 255.255.255.0 # interface Vlanif3 undo shutdown ip address 130.1.1.1 255.255.255.0 # interface GigabitEthernet1/0/0 undo shutdown

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

4-39

4 VLAN Configuration
portswitch port default vlan 2 # interface GigabitEthernet2/0/0 undo shutdown portswitch port default vlan 2 # interface GigabitEthernet3/0/0 undo shutdown portswitch port default vlan 3 # interface GigabitEthernet4/0/0 undo shutdown portswitch port default vlan 3 # return

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4.12.3 Example for Configuring VLANs to Communicate Through Sub-interfaces


Networking Requirements
As shown in Figure 4-11:
l l l

The routed interface GE 1/0/0 is connected with the upstream port of Switch B. The routed interface GE 2/0/0 is connected with the upstream port of Switch A. The downstream ports of Switch A are divided into VLAN 40 and VLAN 30 based on the port. The downstream ports of the Switch B are divided into VLAN 10 and VLAN 20 based on the port.

It is required that VLAN 10, VLAN 20, VLAN 30, and VLAN 40 can communicate with each other. Figure 4-11 Configuring VLANs to communicate through a router

4-40

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Configure the encapsulation mode on all the Ethernet interfaces to 802.1Q. Configure the IDs of the VLANs to which each Ethernet interface belongs. Configure the IP address of each Ethernet interface.

Data Preparation
To complete the configuration, you need the following data.
l

VLAN IDs of the Ethernet sub-interfaces GE 1/0/0.1 and GE 1/0/0.2 are 10 and 20 respectively. VLAN IDs of the Ethernet sub-interfaces GE 2/0/0.1 and GE 2/0/0.2 are 30 and 40 respectively. IP addresses of GE 1/0/0.1 and GE 1/0/0.2 are 10.110.6.3 and 10.110.5.3 respectively. IP addresses of GE 1/0/0.1 and GE 1/0/0.2 are 10.110.4.3 and 10.110.3.3 respectively.

l l

Configuration Procedure
This example only lists the configuration procedure on routers.
NOTE

The upstream ports on Switch A and Switch B should be configured as trunk ports. The upstream port on Switch allows frames of VLAN 30 and VLAN 40 to pass through. The upstream port on Switch B allows frames of VLAN 10 and VLAN 20 to pass through.

1.

Configure the interface connected with Switch B on the router. # Create the sub-interface GE 1/0/0.1 and configure it.
<Quidway> system-view [Quidway] interface gigabitethernet 1/0/0.1 [Quidway-GigabitEthernet1/0/0.1] undo shutdown [Quidway-GigabitEthernet1/0/0.1] vlan-type dot1q 10 [Quidway-GigabitEthernet1/0/0.1] ip address 10.110.6.3 255.255.255.0 [Quidway-GigabitEthernet1/0/0.1] quit

# Create the sub-interface GE 1/0/0.2 and configure it.


[Quidway] interface gigabitethernet 1/0/0.2 [Quidway-GigabitEthernet1/0/0.2] undo shutdown [Quidway-GigabitEthernet1/0/0.2] vlan-type dot1q 20 [Quidway-GigabitEthernet1/0/0.2] ip address 10.110.5.3 255.255.255.0 [Quidway-GigabitEthernet1/0/0.2] quit

2.

Configure the interface connected with Switch A on the router. # Create the sub-interface GE 2/0/0.1 and configure it.
[Quidway] interface gigabitethernet 2/0/0.1 [Quidway-GigabitEthernet2/0/0.1] undo shutdown [Quidway-GigabitEthernet2/0/0.1] vlan-type dot1q 30 [Quidway-GigabitEthernet2/0/0.1] ip address 10.110.4.3 255.255.255.0 [Quidway-GigabitEthernet2/0/0.1] quit

# Create the sub-interface GE 1/0/0.2 and configure it.


[Quidway] interface gigabitethernet 2/0/0.2 [Quidway-GigabitEthernet2/0/0.2] undo shutdown [Quidway-GigabitEthernet2/0/0.2] vlan-type dot1q 40 [Quidway-GigabitEthernet2/0/0.2] ip address 10.110.3.3 255.255.255.0 [Quidway-GigabitEthernet2/0/0.2] quit

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

4-41

4 VLAN Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3.

Verify the configuration. On the hosts in VLAN 10, configure the default gateway address as the IP address 10.110.6.3/24 of GE 1/0/0.1. On the hosts in VLAN 20, configure the default gateway address as the IP address 10.110.5.3/24 of GE 1/0/0.2. On the hosts in VLAN 30, configure the default gateway address as the IP address 10.110.4.3/24 of GE 2/0/0.1. On the hosts in VLAN 40, configure the default gateway address as the IP address 10.110.3.3/24 of GE 2/0/0.2. Then the hosts in VLAN 10, VLAN 20, VLAN 30, and VLAN 40 can communicate with each other.

Configuration Files
Configuration file of the router
# sysname Quidway # interface GigabitEthernet1/0/0.1 undo shutdown vlan-type dot1q 10 ip address 10.110.6.3 255.255.255.0 # interface GigabitEthernet1/0/0.2 undo shutdown vlan-type dot1q 20 ip address 10.110.5.3 255.255.255.0 # interface GigabitEthernet2/0/0.1 undo shutdown vlan-type dot1q 30 ip address 10.110.4.3 255.255.255.0 # interface GigabitEthernet2/0/0.2 undo shutdown vlan-type dot1q 40 ip address 10.110.3.3 255.255.255.0 # return

4.12.4 Example for Configuring VLAN and Non-VLAN to Communicate Through Sub-interfaces
Networking Requirements
As shown in Figure 4-12, Switch A supports VLAN; while Switch B is not configured with any VLAN. It is required that the host members in VLAN 10 can communicate with the hosts attached to Switch B.

4-42

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

Figure 4-12 Configuring VLANs to communicate with non-VLAN through a router

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Configure the encapsulation mode of the routed interface GE 1/0/0.1 connected with Switch A to 802.1 Q. Configure GE 1/0/0.1 and VLAN 10 to be on the same network segment. Configure the routed interface GE 2/0/0 connected with Switch B and Switch B to be on the same network segment.

Data Preparation
To complete the configuration, you need the following data:
l l l

The interfaces that connect Switch A and hosts are divided into VLAN 10 and VLAN 20. The IP address of GE 1/0/0.1 is 10.110.2.5. The IP address of GE 2/0/0.1 is 10.110.3.5.

Configuration Procedure
This example lists only the configuration procedure on routers.
NOTE

The upstream port on Switch A must be configured as trunk port and allows frames from VLAN 10 to pass through.

1.

Configure the interface connected with Switch A on the router. # Create the sub-interface GE 1/0/0.1.
<Quidway> system-view [Quidway] interface gigabitethernet 1/0/0.1 [Quidway-GigabitEthernet1/0/0.1] undo shutdown [Quidway-GigabitEthernet1/0/0.1] vlan-type dot1q 10

# Configure the IP address for GE1/0/0.1, ensuring the interface and VLAN 10 are on the same network segment.
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-43

4 VLAN Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[Quidway-GigabitEthernet1/0/0.1] ip address 10.110.2.5 255.255.255.0 [Quidway-GigabitEthernet1/0/0.1] quit

2.

Configure the interface connected with Switch B on the router. # Configure the IP address for GE 2/0/0, ensuring the interface and the hosts attached to Switch B are on the same network segment.
[Quidway] interface gigabitethernet 2/0/0 [Quidway-GigabitEthernet2/0/0] undo shutdown [Quidway-GigabitEthernet2/0/0] ip address 10.110.3.5 255.255.255.0

3.

Verify the configuration. The default gateway of the hosts in the VLAN 10 is configured as 10.110.2.5, while that of the hosts attached to Switch B is configured as 10.110.3.5. After the configuration is complete, the hosts in VLAN 10 and hosts attached to Switch B can communicate.

Configuration Files
# sysname Quidway # interface GigabitEthernet1/0/0.1 undo shutdown vlan-type dot1q 10 ip address 10.110.2.5 255.255.255.0 # interface GigabitEthernet2/0/0 undo shutdown ip address 10.110.3.5 255.255.255.0 # return

4.12.5 Example for Configuring VLAN Trunks


Networking Requirements
As shown in Figure 4-13, the switched interface GE 1/0/0 on Router A connects the switched interface GE 1/0/0 on Router B. VLAN 5 and VLAN 9 contain interfaces on both Router A and Router B.
l

VLAN 5 contains GE 2/0/0 and GE 2/0/1 of Router A, and GE 2/0/0 and GE 2/0/1 of Router B. VLAN 9 contains GE 2/0/2 and GE 2/0/3 of Router A, and GE 2/0/2 and GE 2/0/3 of Router B.

Configure VLAN trunks, through which both VLAN 5 and VLAN 9 packets can pass, between the switched interface GE 1/0/0 on Router A and that on Router B.

4-44

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

Figure 4-13 Configuring VLAN trunks

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Configure GE 1/0/0, GE 2/0/0, GE 2/0/1, GE 2/0/2, and GE 2/0/3 interfaces on Router A and Router B to switched interfaces. Configure VLAN 5 and VLAN 9, which contain interfaces belonging to different routers, Router A and Router B. Then add the switched interfaces to VLANs. Configure the trunk interfaces that connect Router A and Router B to allow the VLAN 5 and VLAN 9 frames to pass through.

Data Preparation
To complete the configuration, you need the following data:
l l

The number of trunk interfaces that connect Router A and Router B is the GE 1/0/0. Four interfaces contained in VLAN 5 are GE 2/0/0 and GE 2/0/1 of Router A, and GE 2/0/0 and GE 2/0/1 of Router B. Four interfaces contained in VLAN 9 are GE 2/0/2 and GE 2/0/3 of Router A, and GE 2/0/2 and GE 2/0/3 of Router B. VLAN IDs are 5 and 9.

Configuration Procedure
1. Configure Router A. # Configure GE 1/0/0, GE 2/0/0, GE 2/0/1, GE 2/0/2, and GE 2/0/3 as switched interfaces.
<RouterA> system-view [RouterA] interface GigabitEthernet 1/0/0 [RouterA-GigabitEthernet1/0/0] undo shutdown [RouterA-GigabitEthernet1/0/0] portswitch [RouterA-GigabitEthernet1/0/0] quit [RouterA] interface GigabitEthernet 2/0/0 [RouterA-GigabitEthernet2/0/0] undo shutdown [RouterA-GigabitEthernet2/0/0] portswitch [RouterA-GigabitEthernet2/0/0] quit [RouterA] interface GigabitEthernet 2/0/1 [RouterA-GigabitEthernet2/0/1] undo shutdown [RouterA-GigabitEthernet2/0/1] portswitch [RouterA-GigabitEthernet2/0/1] quit [RouterA] interface GigabitEthernet 2/0/2 [RouterA-GigabitEthernet2/0/2] undo shutdown [RouterA-GigabitEthernet2/0/2] portswitch

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

4-45

4 VLAN Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[RouterA-GigabitEthernet2/0/2] quit [RouterA] interface GigabitEthernet 2/0/3 [RouterA-GigabitEthernet2/0/3] undo shutdown [RouterA-GigabitEthernet2/0/3] portswitch [RouterA-GigabitEthernet2/0/3] quit

# Create VLAN 5 and add GE 2/0/0 and GE 2/0/1 to VLAN 5. Create VLAN 9 and add GE 2/0/2 and GE 2/0/3 to VLAN 9.
[RouterA] vlan 5 [RouterA-vlan5] port [RouterA-vlan5] port [RouterA-vlan5] quit [RouterA] vlan 9 [RouterA-vlan9] port [RouterA-vlan9] port [RouterA-vlan9] quit GigabitEthernet 2/0/0 GigabitEthernet 2/0/1 GigabitEthernet 2/0/2 GigabitEthernet 2/0/3

# Configure the switched interface GE 1/0/0 as the trunk interface, which allows VLAN 5 and VLAN 9 packets to pass through.
[RouterA] interface GigabitEthernet 1/0/0 [RouterA-GigabitEthernet1/0/0] port link-type trunk [RouterA-GigabitEthernet1/0/0] port trunk allow-pass vlan 5 9 [RouterA-GigabitEthernet1/0/0] quit

2.

Configure Router B. # Configure GE 1/0/0, GE 2/0/0, GE 2/0/1, GE 2/0/2, and GE 2/0/3 as switched interfaces.
<RouterB> system-view [RouterB] interface GigabitEthernet 1/0/0 [RouterB-GigabitEthernet1/0/0] undo shutdown [RouterB-GigabitEthernet1/0/0] portswitch [RouterB-GigabitEthernet1/0/0] quit [RouterB] interface GigabitEthernet 2/0/0 [RouterB-GigabitEthernet2/0/0] undo shutdown [RouterB-GigabitEthernet2/0/0] portswitch [RouterB-GigabitEthernet2/0/0] quit [RouterB] interface GigabitEthernet 2/0/1 [RouterB-GigabitEthernet2/0/1] undo shutdown [RouterB-GigabitEthernet2/0/1] portswitch [RouterB-GigabitEthernet2/0/1] quit [RouterB] interface GigabitEthernet 2/0/2 [RouterB-GigabitEthernet2/0/2] undo shutdown [RouterB-GigabitEthernet2/0/2] portswitch [RouterB-GigabitEthernet2/0/2] quit [RouterB] interface GigabitEthernet 2/0/3 [RouterB-GigabitEthernet2/0/3] undo shutdown [RouterB-GigabitEthernet2/0/3] portswitch [RouterB-GigabitEthernet2/0/3] quit

# Create VLAN 5 and add GE 2/0/0 and GE 2/0/1 to VLAN 5. Create VLAN 9 and add GE 2/0/2, and GE 2/0/3 to VLAN 9.
[RouterB] vlan 5 [RouterB-vlan5] port [RouterB-vlan5] port [RouterB-vlan5] quit [RouterB] vlan 9 [RouterB-vlan9] port [RouterB-vlan9] port [RouterB-vlan9] quit GigabitEthernet 2/0/0 GigabitEthernet 2/0/1 GigabitEthernet 2/0/2 GigabitEthernet 2/0/3

# Configure the switched interface GE 1/0/0 as the trunk interface, which allows VLAN 5 and VLAN 9 packets to pass through.
[RouterB] interface GigabitEthernet 1/0/0 [RouterB-GigabitEthernet1/0/0] port link-type trunk [RouterB-GigabitEthernet1/0/0] port trunk allow-pass vlan 5 9 [RouterB-GigabitEthernet1/0/0] quit

3.
4-46

Verify the configuration.


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

# Run the display vlan command. You can view the status of the VLANs. Take Router A as an example:
[RouterA] display vlan 5 VLAN ID Type Status MAC Learning Broadcast -------------------------------------------------------------------------2 common enable enable enable ---------------Untagged Port: GigabitEthernet2/0/0 GigabitEthernet2/0/1 ---------------Tagged Port: GigabitEthernet1/0/0 ---------------Interface Physical GigabitEthernet1/0/0 UP GigabitEthernet2/0/0 UP GigabitEthernet2/0/1 UP [RouterA] display vlan 9 VLAN ID Type Status MAC Learning Broadcast -------------------------------------------------------------------------9 common enable enable enable ---------------Untagged Port: GigabitEthernet2/0/2 GigabitEthernet2/0/3 ---------------Tagged Port: GigabitEthernet1/0/0 ---------------Interface Physical GigabitEthernet1/0/0 UP GigabitEthernet2/0/2 UP GigabitEthernet2/0/3 UP

# Run the display port vlan command. You can view information about VLANs supported by the trunk port. Take Router A as an example:
[RouterA] display port vlan gigabitethernet1/0/0 Port Link Type PVID Trunk VLAN List --------------------------------------------------------------------------GigabitEthernet1/0/0 trunk 0 5,9

You can find that GE 1/0/0 allows frames of VLAN 5 and VLAN 9 to pass through. On different routers, PCs within the same VLAN can communicate with each other.

Configuration Files
l

Configuration file of Router A


# sysname RouterA # vlan batch 5 9 # interface GigabitEthernet1/0/0 undo shutdown portswitch port link-type trunk port trunk allow-pass vlan 5 9 # interface GigabitEthernet2/0/0 undo shutdown portswitch port default vlan 5 # interface GigabitEthernet2/0/1 undo shutdown portswitch port default vlan 5 # interface GigabitEthernet2/0/2 undo shutdown

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

4-47

4 VLAN Configuration
portswitch port default vlan 9 # interface GigabitEthernet2/0/3 undo shutdown portswitch port default vlan 9 # return l

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Configuration file of Router B


# sysname RouterB # vlan batch 5 9 # interface GigabitEthernet1/0/0 undo shutdown portswitch port link-type trunk port trunk allow-pass vlan 5 9 # interface GigabitEthernet2/0/0 undo shutdown portswitch port default vlan 5 # interface GigabitEthernet2/0/1 undo shutdown portswitch port default vlan 5 # interface GigabitEthernet2/0/2 undo shutdown portswitch port default vlan 9 # interface GigabitEthernet2/0/3 undo shutdown portswitch port default vlan 9 # return

4.12.6 Example for Configuring VLAN Aggregation


Networking Requirements
As shown in Figure 4-14, VLAN 2 and VLAN 3 compose a super-VLAN, namely VLAN 4. Such sub-VLANs as VLAN 2 and VLAN 3 cannot ping through each other. After being configured with the ARP proxy, VLAN 2 and VLAN 3 can ping through each other successfully.

4-48

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

Figure 4-14 Configuring VLAN aggregation

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. 5. Convert the router interfaces to the switched interfaces. Add the switched interfaces to the corresponding sub-VLANs. Aggregate the sub-VLANs to a super-VLAN. Configure the routes of the VLANIF interface of the super-VLAN. Configure the ARP proxy of the super-VLAN.

Data Preparation
To complete the configuration, you need the following data:
l l l l

GE 1/0/0 and GE 2/0/0 belong to VLAN 2. GE 3/0/0 and GE 4/0/0 belong to VLAN 3. The ID of the super-VLAN is 4. The IP address of the super-VLAN is 100.1.1.12.

Configuration Procedure
1. Configure VLAN 2. # Convert the interfaces to switched ones.
<RouterA> system-view [RouterA] interface gigabitethernet 1/0/0 [RouterA-GigabitEthernet1/0/0] undo shutdown [RouterA-GigabitEthernet1/0/0] portswitch [RouterA-GigabitEthernet1/0/0] quit [RouterA] interface gigabitethernet 2/0/0 [RouterA-GigabitEthernet2/0/0] undo shutdown [RouterA-GigabitEthernet2/0/0] portswitch [RouterA-GigabitEthernet2/0/0] quit

# Create VLAN 2.
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-49

4 VLAN Configuration
[RouterA] vlan 2

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

# Add GE 1/0/0 and GE 2/0/0 to VLAN 2.


[RouterA-vlan2] port gigabitethernet 1/0/0 2/0/0 [RouterA-vlan2] quit

2.

Configure VLAN 3. # Convert the interfaces to switched ones.


[RouterA] interface gigabitethernet 3/0/0 [RouterA-GigabitEthernet3/0/0] undo shutdown [RouterA-GigabitEthernet3/0/0] portswitch [RouterA-GigabitEthernet3/0/0] quit [RouterA] interface gigabitethernet 4/0/0 [RouterA-GigabitEthernet4/0/0] undo shutdown [RouterA-GigabitEthernet4/0/0] portswitch [RouterA-GigabitEthernet4/0/0] quit

# Create VLAN 3.
[RouterA] vlan 3

# Add GE 3/0/0 and GE 4/0/0 to VLAN 3.


[RouterA-vlan3] port gigabitethernet 3/0/0 4/0/0 [RouterA-vlan3] quit

3.

Configure VLAN 4. # Configure the super-VLAN.


[RouterA] vlan 4 [RouterA-vlan4] aggregate-vlan [RouterA-vlan4] access-vlan 2 to 3

# Configure the VLANIF interface.


[RouterA] interface vlanif 4 [RouterA-Vlanif4] undo shutdown [RouterA-Vlanif4] ip address 100.1.1.12 255.255.255.0 [RouterA-Vlanif4] quit

4.

Configure PCs. Configure IP addresses for PCs, ensuring they are in the same network segment with VLAN 4. After the configuration is complete, routers and PCs can ping each other successfully. The PCs in VLAN 2 cannot ping through the PCs in VLAN 3.

5.

Configure the proxy ARP.


[RouterA] interface vlanif 4 [RouterA-Vlanif4] arp-proxy enable [RouterA-Vlanif4] arp-proxy inter-sub-vlan-proxy enable

6.

Verify the configuration. After the configuration, PCs in VLAN 2 and that in VLAN 3 can ping each other successfully.

Configuration Files
Configuration file of Router A is as follows:
# sysname RouterA # vlan batch 2 to 4 # vlan 4 aggregate-vlan access-vlan 2 to 3

4-50

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
# interface Vlanif4 undo shutdown ip address 100.1.1.12 255.255.255.0 arp-proxy enable arp-proxy inter-sub-vlan-proxy enable # interface GigabitEthernet1/0/0 undo shutdown portswitch port default vlan 2 # interface GigabitEthernet2/0/0 undo shutdown portswitch port default vlan 2 # interface GigabitEthernet3/0/0 undo shutdown portswitch port default vlan 3 # interface GigabitEthernet4/0/0 undo shutdown portswitch port default vlan 3 # return

4 VLAN Configuration

4.12.7 Example for Configuring VLAN Mapping


Networking Requirements
As shown in Figure 4-15, IP addresses of VLAN 1 and VLAN 2 are in the same network segment. Configure VLAN mapping on Router A and Router B to ensure the hosts in VLAN 1 and VLAN 2 to communicate with each other directly without routing of Layer 3. Figure 4-15 Networking diagram of configuring VLAN mapping

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

4-51

4 VLAN Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. 5. Create VLANs on Router A and Router B respectively. Add GE 2/0/1 of Router A and GE 2/0/2 of Router B to their own VLANs respectively. Configure VLAN mapping on GE 2/0/1 of Router A. Configure VLAN mapping on GE 2/0/2 of Router B. Configure GE 1/0/1 and GE 1/0/2 on Router C as Trunk interfaces sharing the same VLAN with Router A and Router B.

Data Preparation
Before configuring, you need the following data.
l l

ID 1 for the VLAN to be created on Router A and ID 2 for that on Router B Number of the interfaces, namely, GE 1/0/1 and GE 1/0/2 to be added to Router C

Configuration Procedure
1. Configure VLAN. # Create VLAN 1 on Router A.
<Quidway> system-view [Quidway] sysname RouterA [RouterA] vlan 1 [RouterA-vlan1] quit

# Create VLAN 2 on Router B.


<Quidway> system-view [Quidway] sysname RouterB [RouterB] vlan 2 [RouterB-vlan2] quit

# Create VLAN 1 and VLAN 2 on Router C.


<Quidway> system-view [Quidway] sysname RouterC [RouterC] vlan batch 1 2

2.

Add the interface to VLAN. # Add Ethernet 1/0/1 and Ethernet 1/0/2 to VLAN 1 on Router A.
[RouterA] interface ethernet 1/0/1 [RouterA-Ethernet1/0/1] undo shutdown [RouterA-Ethernet1/0/1] portswitch [RouterA-Ethernet1/0/1] port link-type trunk [RouterA-Ethernet1/0/1] port trunk allow-pass vlan 1 [RouterA-Ethernet1/0/1] quit [RouterA] interface ethernet 1/0/2 [RouterA-Ethernet1/0/2] undo shutdown [RouterA-Ethernet1/0/2] portswitch [RouterA-Ethernet1/0/2] port link-type trunk [RouterA-Ethernet1/0/2] port trunk allow-pass vlan 1 [RouterA-Ethernet1/0/2] quit

# Configure Gigabit Ethernet 2/0/1 on Router A to allow frames from VLAN 1 passing.
[RouterA] interface gigabitethernet 2/0/1 [RouterA-GigabitEthernet2/0/1] undo shutdown [RouterA-GigabitEthernet2/0/1] portswitch [RouterA-GigabitEthernet2/0/1] port link-type trunk [RouterA-GigabitEthernet2/0/1] port trunk allow-pass vlan 1

4-52

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

# Configure Ethernet 1/0/1 and Ethernet 1/0/2 on Router B to add them to VLAN 2.
[RouterB] interface ethernet 1/0/1 [RouterB-Ethernet1/0/1] undo shutdown [RouterB-Ethernet1/0/1] portswitch [RouterB-Ethernet1/0/1] port link-type trunk [RouterB-Ethernet1/0/1] port trunk allow-pass vlan 2 [RouterB-Ethernet1/0/1] quit [RouterB] interface ethernet 1/0/2 [RouterB-Ethernet1/0/2] undo shutdown [RouterB-Ethernet1/0/2] portswitch [RouterB-Ethernet1/0/2] port link-type trunk [RouterB-Ethernet1/0/2] port trunk allow-pass vlan 2 [RouterB-Ethernet1/0/2] quit

# Configure Gigabit Ethernet 2/0/2 on Router B to allow frames from VLAN 2 pass through.
[RouterB] interface gigabitethernet 2/0/2 [RouterA-GigabitEthernet2/0/2] undo shutdown [RouterA-GigabitEthernet2/0/2] portswitch [RouterB-GigabitEthernet2/0/2] port link-type trunk [RouterB-GigabitEthernet2/0/2] port trunk allow-pass vlan 2

# Configure Gigabit Ethernet 1/0/1 and Gigabit Ethernet 1/0/2 on Router C and add them to VLAN 2.
<Quidway> system-view [Quidway] sysname RouterC [RouterC] interface gigabitethernet1/0/1 [RouterC-Gigabitethernet1/0/1] undo shutdown [RouterC-Gigabitethernet1/0/1] portswitch [RouterC-Gigabitethernet1/0/1] port link-type trunk [RouterC-Gigabitethernet1/0/1] port trunk allow-pass vlan 1 2 [RouterC-Gigabitethernet1/0/1] quit [RouterC] interface gigabitethernet1/0/2 [RouterC-Gigabitethernet1/0/2] undo shutdown [RouterC-Gigabitethernet1/0/2] portswitch [RouterC-Gigabitethernet1/0/2] port link-type trunk [RouterC-Gigabitethernet1/0/2] port trunk allow-pass vlan 1 2 [RouterC-Gigabitethernet1/0/2] quit

3.

Configure VLAN mapping. # Configure VLAN mapping on GE 2/0/1 of Router A.


[RouterA-GigabitEthernet2/0/1] port vlan-mapping outside-vlan 2 map-vlan 1

# Configure VLAN mapping on GE 2/0/2 of Router B.


[RouterB-GigabitEthernet2/0/2] port vlan-mapping outside-vlan 1 map-vlan 2

4.

Verify the configuration. Run following commands on Router A. The result is shown as follows:
[RouterA] display vlan 1 VLAN ID Type Status MAC Learning Broadcast ------------------------------------------------------------------------1 common enable enable enable ---------------Tagged Port: Ethernet1/0/1 Ethernet1/0/2 GigabitEthernet2/0/1 ---------------QinQ-map Port: GigabitEthernet2/0/1 ---------------Interface Physical GigabitEthernet2/0/1 UP Ethernet1/0/1 UP Ethernet1/0/2 UP

On any host in VLAN 1, ping any host in VLAN 2, or operate conversely. If they ping through each other, it shows that the configuration succeeds.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

4-53

4 VLAN Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Configuration Files
l

Configuration file of Router A


# sysname RouterA # vlan batch 1 # interface Ethernet1/0/1 undo shutdown portswitch port link-type trunk port trunk allow-pass vlan 1 # interface Ethernet1/0/2 undo shutdown portswitch port link-type trunk port trunk allow-pass vlan 1 # interface GigabitEthernet2/0/1 undo shutdown portswitch port link-type trunk port trunk allow-pass vlan 1 port vlan-mapping outside-vlan 2 map-vlan 1 # return

Configuration file of Router B


# sysname RouterB # vlan batch 2 # interface Ethernet1/0/1 undo shutdown portswitch port link-type trunk port trunk allow-pass vlan 2 # interface Ethernet1/0/2 undo shutdown portswitch port link-type trunk port trunk allow-pass vlan 2 # interface GigabitEthernet2/0/2 undo shutdown portswitch port link-type trunk port trunk allow-pass vlan 2 port vlan-mapping outside-vlan 1 map-vlan 2 # return

Configuration file of Router C


# sysname RouterC # vlan batch 1 2 # interface GigabitEthernet1/0/1 undo shutdown portswitch port link-type trunk port trunk allow-pass vlan 1 2 # interface GigabitEthernet1/0/2

4-54

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
undo shutdown portswitch port link-type trunk port trunk allow-pass vlan 1 2 # return

4 VLAN Configuration

4.12.8 Example for Configuring VLAN Damping


Networking Requirements
As shown in Figure 4-16, the hosts in VLAN 10 communicate with the hosts outside VLAN 10 through VLANIF 10. Configure VLAN damping on VLANIF 10 to prevent network flapping caused by the change of the VLANIF interface status. Figure 4-16 Networking diagram of configuring VLAN damping

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Create VLAN 10. Create VLANIF 10 and configure an IP address for it. Set the suppression time on VLANIF 10.

Data Preparation
To complete the configuration, you need the following data:
l l l

Number of the VLANIF interface IP address 10.100.100.100/24 of the VLANIF interface Suppression time of 20 seconds
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-55

Issue 03 (2008-09-22)

4 VLAN Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Configuration Procedure
1. 2. Create VLAN 10. The configuration details are not mentioned here. For details, see Example for Configuring a VLAN Based on Layer 2 Ports. Create VLANIF 10. # Create VLANIF 10 and configure an IP address for it.
[RouterA] interface vlanif 10 [RouterA-Vlanif10] undo shutdown [RouterA-Vlanif10] ip address 10.100.100.100 24

3.

Set the suppression time. # Set the suppression time to 20 seconds.


[RouterA-Vlanif10] damping time 20

4.

Verify the configuration. Run the display interface vlanif command on Router A. You can view the set suppression time.
<RouterA> display interface vlanif 10 Vlanif10 current state : UP Line protocol current state : UP Description : HUAWEI, Quidway Series, Vlanif10 Interface, Route Port The Maximum Transmit Unit is 1500 bytes The Holdoff Timer is 20(sec) Internet Address is 10.100.100.100/24 IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-ab74-7700 Physical is VLANIF Last 300 seconds input rate 0 bits/sec, 0 packets/sec Last 300 seconds output rate 0 bits/sec, 0 packets/sec Input: 0 packets,0 bytes, 0 unicast,0 broadcast,0 multicasts 0 errors,0 drops,0 unknowprotocol Output:0 packets,0 bytes, 0 unicast,0 broadcast,0 multicasts 0 errors,0 drops

Configuration Files
# sysname RouterA # vlan batch 10 # interface Vlanif10 undo shutdown ip address 10.100.100.100 255.255.255.0 damping time 20 # interface Ethernet1/0/0 undo shutdown portswitch port default vlan 10 # interface Ethernet1/0/1 undo shutdown portswitch port default vlan 10 # return

4.12.9 Example for Configuring Interface Isolation in a VLAN


4-56 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

4 VLAN Configuration

Networking Requirements
As shown in Figure 4-17, the VLAN10 is configured on the router. GE1/0/0 and Host A are connected, and GE4/0/0 and Host B are connected. Requirements: Host A and Host B cannot be connected directly in a VLAN. The traffic from Host A to Host B must pass through layer 3 route, which is convenient for statistics. Figure 4-17 Networking diagram of configuring interface isolation in a VLAN
Router

GE1/0/0 GE2/0/0

GE3/0/0 GE4/0/0

HostA

VLAN 10

HostB

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. Switch the routed interfaces to the layer 2 interfaces. Add the routed interfaces into the corresponding VLANs. Configure the isolated interfaces of GE1/0/0 and GE4/0/0. Enable the ARP proxy in a VLAN.

Data Preparation
To complete the configuration, you need the following data
l l

GE1/0/0 and GE4/0/0 that belongs to VLAN10 The IP address 10.1.1.1/24 of VLANIF 10

Configuration Procedure
1. Configuring interface isolation in a VLAN. # Create VLAN10.
<Quidway> system-view [Quidway] vlan 10 [Quidway-vlan10] quit

# Add the interface into VLAN10, and configure the interface isolation.
<Quidway> system-view [Quidway] interface gigabitethernet 1/0/0

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

4-57

4 VLAN Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[Quidway-GigabitEthernet1/0/0] portswitch [Quidway-GigabitEthernet1/0/0] port default vlan 10 [Quidway-GigabitEthernet1/0/0] port isolate-state enable vlan 10 [Quidway-GigabitEthernet1/0/0] quit [Quidway] interface gigabitethernet 4/0/0 [Quidway-GigabitEthernet4/0/0] portswitch [Quidway-GigabitEthernet4/0/0] port default vlan 10 [Quidway-GigabitEthernet4/0/0] port isolate-state enable vlan 10 [Quidway-GigabitEthernet4/0/0] quit

After the configuration, Host A and Host B cannot ping through each other. 2. Enable the ARP proxy in a VLAN. # Create the VLANIF interface.
<Quidway> system-view [Quidway] interface vlanif 10 [Quidway-vlanif10] ip address 10.1.1.1 24

# Enable the ARP proxy in a VLAN.


[Quidway-vlanif10] arp-proxy inner-sub-vlan-proxy enable

3.

Verify the configuration. When the configuration is complete, Host A and Host B can ping through each other.

Configuration Files
Configuration file of router
# sysname Quidway # vlan 10 # interface Vlanif10 ip address 10.1.1.1 255.255.255.0 arp-proxy inner-sub-vlan-proxy enable # interface GigabitEthernet1/0/0 undo shutdown portswitch port default vlan 10 port isolate-state enable vlan 10 # interface GigabitEthernet4/0/0 undo shutdown portswitch port default vlan 10 port isolate-state enable vlan 10 # return

4.12.10 Example for Configuring the Isolation Based on Interface Groups in a VLAN
Networking Requirements
As shown in Figure 4-18, VLAN 10 is created on the router. GE 1/0/0 is connected with Switch A; GE 2/0/0 is connected with Switch B; GE 3/0/0 is connected with Switch C; GE 4/0/0 is connected with Switch D; GE 5/0/0 is connected with Switch E. The requirements are as follows:
4-58 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
l l l

4 VLAN Configuration

Switch A can communicate with Switch B and Switch C can communicate with Switch D. Switch A and Switch B cannot communicate with Switch C and Switch D. Switch E can communicate with the hosts in VLAN 10.

Figure 4-18 Networking diagram of configuring the isolation based on interface groups in a VLAN
GE1/0/0 GE2/0/0

Router

GE4/0/0 GE3/0/0

GE5/0/0

SwitchA SwitchB group1

SwitchE VLAN10

SwitchC SwitchD group2

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Switch the interfaces of the router to be Layer 2 interfaces. Add the interfaces of the router to different isolated interface groups. Add the interfaces that cannot communicate with each other to different isolated interface groups.

Data Preparation
To complete the configuration, you need the following data:
l l l

GE 1/0/0, GE 2/0/0, GE 3/0/0, GE 4/0/0, and GE 5/0/0 that belong to VLAN 10 GE 1/0/0 and GE 2/0/0 that belong to the isolated group 1 GE 3/0/0 and GE 4/0/0 that belong to the isolated group 2

Configuration Procedure
1. Create an interface-based VLAN 10. # Create VLAN 10.
<Quidway> system-view [Quidway] vlan 10 [Quidway-vlan10] quit

# Add interfaces to VLAN 10.


<Quidway> system-view [Quidway] interface gigabitethernet 1/0/0

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

4-59

4 VLAN Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[Quidway-GigabitEthernet1/0/0] portswitch [Quidway-GigabitEthernet1/0/0] port default [Quidway-GigabitEthernet1/0/0] quit [Quidway] interface gigabitethernet 2/0/0 [Quidway-GigabitEthernet2/0/0] portswitch [Quidway-GigabitEthernet2/0/0] port default [Quidway-GigabitEthernet2/0/0] quit [Quidway] interface gigabitethernet 3/0/0 [Quidway-GigabitEthernet3/0/0] portswitch [Quidway-GigabitEthernet3/0/0] port default [Quidway-GigabitEthernet3/0/0] quit [Quidway] interface gigabitethernet 4/0/0 [Quidway-GigabitEthernet4/0/0] portswitch [Quidway-GigabitEthernet4/0/0] port default [Quidway-GigabitEthernet4/0/0] quit [Quidway] interface gigabitethernet 5/0/0 [Quidway-GigabitEthernet5/0/0] portswitch [Quidway-GigabitEthernet5/0/0] port default [Quidway-GigabitEthernet5/0/0] quit

vlan 10

vlan 10

vlan 10

vlan 10

vlan 10

2.

Add the interfaces to the isolated group. # Add GE 1/0/0 and GE 2/0/0 to the isolated group 1.
[Quidway] interface gigabitethernet 1/0/0 [Quidway-GigabitEthernet1/0/0] port-isolation group 1 [Quidway-GigabitEthernet1/0/0] quit [Quidway] interface gigabitethernet 2/0/0 [Quidway-GigabitEthernet2/0/0] port-isolation group 1 [Quidway-GigabitEthernet2/0/0] quit

# Add GE 3/0/0 and GE 4/0/0 to the isolated group 2.


[Quidway] interface gigabitethernet 3/0/0 [Quidway-GigabitEthernet3/0/0] port-isolation group 2 [Quidway-GigabitEthernet3/0/0] quit [Quidway] interface gigabitethernet 4/0/0 [Quidway-GigabitEthernet4/0/0] port-isolation group 2 [Quidway-GigabitEthernet4/0/0] quit

3.

Verify the configuration. After the configuration, you can run the display port-isolation command to view the configuration of the isolated group.
[Quidway] display port-isolation group brief Port islation group 1 GigabitEthernet1/0/0 GigabitEthernet2/0/0 port islation group 1 has 2 ports Port islation group 2 GigabitEthernet3/0/0 GigabitEthernet4/0/0 port islation group 1 has 2 ports

After the configuration, Switch E can communicate with other switches. Switch A cannot communicate with Switch C and Switch D. Switch B cannot communicate with Switch C and Switch D.

Configuration Files
The configuration file of the router is as follows:
# sysname Quidway # vlan 10 # interface GigabitEthernet1/0/0 undo shutdown portswitch

4-60

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
port default vlan 10 port-isolation group 1 # interface GigabitEthernet2/0/0 undo shutdown portswitch port default vlan 10 port-isolation group 1 # interface GigabitEthernet3/0/0 undo shutdown portswitch port default vlan 10 port-isolation group 2 # interface GigabitEthernet4/0/0 undo shutdown portswitch port default vlan 10 port-isolation group 2 # interface GigabitEthernet5/0/0 undo shutdown portswitch port default vlan 10 # return

4 VLAN Configuration

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

4-61

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

5
About This Chapter
5.1 QinQ Overview Describes the basic QinQ principle. 5.2 Configuring the QinQ Tunnel Function Describes how to configure the QinQ tunnel.

QinQ Configuration

Describes the principle, configuration procedures, and configuration examples of QinQ.

5.3 Configuring Selective QinQ on a Layer 2 Interface Describes how to configure the selective QinQ on a Layer 2 interface. 5.4 Configuring the Sub-interface for VLAN Tag Termination to Support Proxy ARP Describes how to configure the sub-interface for VLAN tag termination to support proxy ARP so that the users on the same network segment in different VLANs can communicate. 5.5 Configuring the Sub-interface for VLAN Tag Termination to Support VRRP Describes how to configure the sub-interface for VLAN tag termination to support VRRP so that the communication between the user and the network can be reliable, stable, and uninterrupted. 5.6 Configuring the Sub-interface for VLAN Tag Termination to Access an L3VPN Describes how to configure the sub-interface for VLAN tag termination to access an L3VPN so that the user networks between CEs can communicate. 5.7 Configuring the Sub-interface for VLAN Tag Termination to Access an L2VPN Describes how to configure the sub-interface for VLAN tag termination to access an L2VPN so that the user networks between CEs can communicate. 5.8 Configuring the Sub-interface for VLAN Tag Termination to Access a VPLS Describes how to configure the sub-interface for VLAN tag termination to access a VPLS so that the user networks between CEs can communicate. 5.9 Configuring the Sub-interface for VLAN Stacking to Access an L2VPN Describes how to configure the L2VPN user network based on the sub-interface for VLAN stacking so that VLAN tags of users can be transparently transmitted in the ISP network. 5.10 Configuring the Sub-interface for VLAN Stacking to Access a VPLS
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-1

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Describes how to configure the VPLS user network based on the sub-interface for VLAN stacking so that VLAN tags of users can be transparently transmitted in the ISP network. 5.11 Configuring the Sub-interface for QinQ VLAN Tag Termination to Support URPF Describes how to configure the sub-interface for QinQ VLAN tag termination to support URPF. 5.12 Maintaining QinQ Describes how to clear the statistics of QinQ or debug QinQ. 5.13 Configuration Examples Provides several examples of QinQ networking.

5-2

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

5.1 QinQ Overview


Describes the basic QinQ principle. 5.1.1 Introduction to QinQ 5.1.2 QinQ Features Supported by the NE80E/40E

5.1.1 Introduction to QinQ


In intercommunication between Layer 2 LANs on the basis of the traditional IEEE 802.1Q protocol, when two user networks access each other through an ISP, the ISP must assign VLAN IDs to users of different VLANs, as shown in Figure 5-1. Suppose User Network1 and User Network2 access the backbone network through PE1 and PE2 of an ISP. Figure 5-1 Intercommunication between Layer 2 LANs on the basis of the traditional IEEE 802.1Q protocol

To connect VLAN 100 VLAN 200 on User Network1 to VLAN 100 VLAN 200 on User Network2, you must change the attribute of the interfaces of CE1, PE1, and P that connect PE2 and CE2 to the trunk and allow packets of VLAN 100VLAN 200 to pass. This configuration makes user's VLANs visible on the backbone network, and the transmission is not transparent. This intercommunication occupies the VLAN IDs of an ISP, who has only 4094 VLAN IDs. A rush of too many users accessing the network may cause the ISP network to be short of VLAN IDs because an ISP network has only 4094 VLAN IDs. In addition, different users cannot use the same VLAN ID and user's VLAN IDs must be planned by an ISP. QinQ is a technology used to expand the VLAN space by encapsulating a packet that carries an 802.1Q tag in another 802.1Q tag. The private VLANs thus can transparently transmit packets over the public network and the preceding problem is solved. The QinQ technology expands the VLAN space by encapsulating a packet that carries an 802.1Q tag in another 802.1Q tag. The private VLANs thus can transparently transmit packets over the
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-3

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

public network. This function is the same as the Layer 2 VPN. Packets that are forwarded over the backbone network carry two 802.1Q tags, one for the public network and the other for the private network. This is called 802.1Q-in-802.1Q, or QinQ for short. The ISP network only provides one VLAN ID for different VLANs from the same user network. This saves VLAN IDs of an ISP. Meanwhile, the QinQ provides a simple Layer 2 VPN solution to a small metropolitan area network (MAN) or a local area network (LAN). The QinQ technology has been widely used on ISPs' networks because of its easy application. The QinQ technology can be applied to multiple services in a metropolitan area Ethernet solution. The emergence of flexible QinQ that is VLAN stacking enables QinQ services to widely spread among ISPs. This technology has the following features:
l l

Private networks are effectively segregated from the public network. ISP's VLAN IDs are saved to the maximum.

With the development of the metropolitan area Ethernet, all device vendors have put forward their solutions to the metropolitan area Ethernet. The QinQ technology plays an important role in the solutions because of its simplicity and flexibility.

5.1.2 QinQ Features Supported by the NE80E/40E


QinQ of Layer 2 Interfaces
l l l

QinQ tunnel Selective QinQ (VLAN stacking) Compatibility of QinQ EType in the outer tag

As shown in Figure 5-2, 802.1Q defines that the Ethernet encapsulation type field (EType) value of the Tag Protocol Identifier (TPID) is 0x8100. In QinQ encapsulation, devices of all vendors use 0x8100 as the value of the EType in the inner TPID. For the EType in the outer TPID, vendors use different values. Figure 5-2 802.1 encapsulation

The NE80E/40E supports compatibility of QinQ outer tag EType. Namely, the NE80E/40E can identify and encapsulate packets with different outer EType values, thus implementing interoperation among devices manufactured by different vendors.
NOTE

IEEE 802.1ad defines the value of the EType field in the outer TPID to 0x88a8.

As shown in Figure 5-3, Router B in the ingress recognizes the QinQ packet whose EType value in the outer tag is 0x9100 and in the egress sets different EType values of the TPID in the outer
5-4 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

tag for the devices of different vendors, such as 0x9100, 0x8100, or other values. Thus, Router B can interoperate with the devices of different vendors. Figure 5-3 Compatibility of the EType field in the TPID field of the outer tag in the QinQ packet

Supporting Proxy ARP


The sub-interface for QinQ VLAN tag termination supports VLANs in a specified value range on the same network segment. The users on the network segment belong to different VLANs. In this case, the users cannot be interconnected with each other at Layer 2. For interconnection between them, IP forwarding is required. Therefore, the sub-interfaces need to support ARP agent. As shown in Figure 5-4, PC 1 and PC 2 belong to VLAN 100. PC 3 belongs to VLAN 200. QinQ is enabled on Switch 1. Switch 1 adds an outer VLAN tag with VLAN 1000 to packets. PC 1, PC 2, and PC 3 are on the same network segment. When PC1 needs to communicate with PC3, PC 1 sends an ARP request message because PC 1 and PC 3 are on the same network segment. PC 1 and PC 3, however, are not in the same VLAN; therefore, PC 3 cannot receive the ARP request message from PC 1. To make PC 1 obtain the MAC address of PC 3, ARP agent can be enabled on the sub-interface for QinQ tag termination. Figure 5-4 Supporting proxy ARP

Whether the dot1q termination sub-interface or the QinQ termination sub-interface supports ARP proxy is determined by the number of the tag in a packet received by the PE:
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-5

5 QinQ Configuration
l l

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

If one tag is contained in a packet, the dot1q termination sub-interface supports ARP proxy. If double tags are contained in a packet, the QinQ termination sub-interface supports ARP proxy.

Supporting the DHCP Server Function


Sub-interfaces for QinQ VLAN tag termination can serve as the Dynamic Host Configuration Protocol (DHCP) server to assign IP addresses to QinQ users. Figure 5-5 Typical networking diagram of IP address assignation on the sub-interface for QinQ VLAN tag termination as a DHCP server

As shown in Figure 5-5, selective QinQ is enabled on the switch. The DHCP server receives packets with double tags. To assign IP addresses to the DHCP clients, the sub-interface for QinQ tag termination needs to support the DHCP server function, that is, the sub-interface can assign IP addresses to legal QinQ users. Whether the dot1q termination sub-interface or the QinQ termination sub-interface accesses the DHCP server is determined by the number of the tag in a packet received by the PE:
l

If one tag is contained in a packet, the dot1q termination sub-interface accesses the DHCP server. If double tags are contained in a packet, the QinQ termination sub-interface accesses the DHCP server.

Supporting the DHCP Relay Function


As shown in Figure 5-6, the DHCP relay device receives the packets with double tags. If the sub-interface for QinQ tag termination does not support DHCP relay, the DHCP relay device takes the received packets as invalid packets and discards them. As a result, the DHCP clients cannot be assigned with IP addresses from the DHCP server. The sub-interface for QinQ tag termination provides the DHCP relay function as follows:
l

When receiving the DHCP request message, the DHCP relay device adds the Option82 field to the packets. When receiving the DHCP reply message (ACK message) from the DHCP server, the DHCP relay device analyzes the DHCP reply and generates a binding table.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

5-6

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
l

5 QinQ Configuration

After DHCP snooping is enabled, the DHCP server checks the packets according to the double tags.

Figure 5-6 Typical networking diagram of the DHCP relay function on the sub-interface for QinQ VLAN tag termination

Whether the dot1q termination sub-interface or the QinQ termination sub-interface accesses the DHCP relay is determined by the number of the tag in a packet received by the PE:
l

If one tag is contained in a packet, the dot1q termination sub-interface accesses the DHCP relay. If double tags are contained in a packet, the QinQ termination sub-interface accesses the DHCP relay.
NOTE

For services transmitted on the dot1q termination sub-interface connected to the DHCP relay, when the the dot1q termination sub-interface sends a DHCP message to the user side, the system only encapsulates the smallest VLAN ID of the sub-interface into the message. The system, however, does not process other VLAN IDs.

Supporting VRRP
Users usually require communicating with certain key networks at any time. The Virtual Router Redundancy Protocol (VRRP) is used to ensure the reliable and stable operation of the system. Therefore, the sub-interfaces for QinQ VLAN tag termination need to support VRRP. VRRP running on the QinQ termination sub-interface provides a standby/active mechanism for QinQ users.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-7

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Figure 5-7 Typical networking diagram of VRRP on the sub-interface for QinQ VLAN tag termination

As shown in Figure 5-7, the QinQ termination sub-interface only specifies a two-layer tag, such the outer tag being 1000 and the inner tag being 100, to configure VRRP. VRRP running on the QinQ termination sub-interface supports the following functions:
l

Maintaining the active/standby state of the VRRP routers You can configure VRRP to maintain the active/standby state of the VRRP routers. Giving a response to the ARP request message When the routers receive the ARP request messages from users, the routers give response messages to all the VLAN tags that can be terminated on the sub-interfaces.

Refreshing the MAC address table of the Layer 2 switch You can configure the router to send gratuitous ARP messages periodically to refresh the MAC address table of the switch. All the double tags on the sub-interfaces for QinQ VLAN tag termination are copied to the gratuitous ARP messages to ensure that the switch can learn the virtual MAC addresses for all VLANs. To improve the system performance, the frequency of sending gratuitous ARP messages is heightened only when the active/standby state is changed. During stable operation of VRRP, the frequency of sending gratuitous ARP messages is lowered and the interval for sending gratuitous ARP messages should be longer than the aging time of the MAC entry.

The following shows the advantages:


l

For the QinQ users with different VLAN tags in the same network segment, only one VRRP instance is set up. VRRP resources are saved.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

5-8

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
l l

5 QinQ Configuration

Hardware resources are saved. IP addresses are saved and the access users are increased.

Whether the dot1q termination sub-interface or the QinQ termination sub-interface supports VRRP is determined by the number of the tag in a packet received by the VRRP backup group:
l l

If one tag is contained in a packet, the dot1q termination sub-interface supports VRRP. If double tags are contained in a packet, the QinQ termination sub-interface supports VRRP.

Access to an L3VPN Through the Sub-interfaces for QinQ VLAN Tag Termination
Figure 5-8 shows a typical networking of the access to an L3VPN through the sub-interface for QinQ VLAN tag termination. DSLAM, switches and CEs add double VLAN tags to packets on the basis of customers and services. QinQ encapsulation is configured on sub-interfaces of the PEs. Inner and outer VLAN tags are specified and the sub-interfaces are bound with a VPN instance. When packets sent by the customer arrive at the PE, the PE terminates double VLAN tags and forwards the packets through the L3VPN. The PE also adds double VLAN tags to the packets from the remote end. Therefore, in the process of QinQ tag termination, ARP learning on the basis of double VLAN tags is required.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-9

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Figure 5-8 Typical networking diagram of the access to an L3VPN through the sub-interface for QinQ VLAN tag termination

Dynamic QinQ
A common sub-interface for QinQ termination can be configured with a maximum of 16,000 user packets. Each user packet carries double VLAN tags. When the number of the user packets exceeds 16,000, you can use dynamic to enable dynamic QinQ aggregation on the sub-interface for QinQ termination. At this time, the sub-interface for QinQ aggregation can be configured with a maximum of 64,000 user packets. Each user packet carries double VLAN tags. After dynamic QinQ is configured on the termination sub-interface, the sub-interface cannot support Virtual Leased Line (VLL), Pseudo Wire Emulation Edge-to-Edge (PWE3), or Virtual Private LAN Service (VPLS).

5-10

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

Figure 5-9 Typical networking diagram of dynamic QinQ

As shown in Figure 5-9, the DHCP client connects to the DHCP relay through two-hierarchy switches and requests a valid IP address from the DHCP server through the DHCP relay. Dynamic QinQ is configured on the termination sub-interface of the DHCP relay on the client side. When users log in, resources are allocated to users. When users log out abnormally after requesting IP addresses, the system senses this failure automatically, then deletes the binding relationship in the DHCP binding table, and notifies the DHCP server to release IP addresses. In the case of configuring dynamic QinQ, if interfaces are configured with dynamic QinQ, usually it is users who send the ARP request actively to the gateway device;if ARP rigid learning is also configured on the device, all interfaces on the device learn the responses to the ARP requests that are actively sent by themselves instead of learning the requests sent by other devices. As a result, dynamic QinQ interfaces on this device cannot learn ARP entries of users and then users fail to log in. To solve the problem, you can run the arp learning strict forcedisable command on the interface configured with dynamic QinQ so that the interface can learn the ARP requests sent by users.

Sub-interfaces for QinQ VLAN Tag Termination Support the Access to a PWE3/ VLL Network
A value range for double VLAN tags can be specified on the PEs. The users whose packets with double VLAN tags in the value range can access PWE3/VLL. The packets with double VLAN tags can be transmitted transparently as Layer 2 packets to a broadband remote access server (BRAS) at the remote end. The BRAS identifies and authenticates the users.
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-11

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Figure 5-10 shows a typical networking of the access to a PWE3/VLL network through the subinterface for QinQ VLAN tag termination. Figure 5-10 Typical networking diagram of the access to a PWE3/VLL network through the sub-interface for QinQ VLAN tag termination

Access of the Sub-interfaces for QinQ VLAN Tag Termination to a VPLS


Sub-interfaces for QinQ VLAN tag termination support the access to a VPLS. By specifying the value range of double VLAN tags, sub-interfaces for QinQ tag termination and the virtual switch instance (VSI) can ping through each other. This function is used for Layer 2 interworking of a customer's QinQ network. In VPLS, a VC can connect two separated VLANs. When multiple VLANs of a customer need to be connected, multiple VCs are required. Sub-interfaces for QinQ VLAN tag termination support a value range of VLAN IDs other than one VLAN ID. Therefore, only one VC is required to connect the VLANs in the specified range. In addition, a customer can assign VLANs independently, regardless of VLAN designation on the ISP network. Actually, traffic of all the VLANs in the specified range is transmitted on one VC. The VC resources on the public network can thus be saved and the configuration is simplified. Figure 5-11 shows a typical networking of the access of the sub-interface for QinQ VLAN tag termination to a VPLS.

5-12

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

Figure 5-11 Typical networking diagram of the access to a VPLS through the sub-interface for QinQ VLAN tag termination

VPLS supports the Point-to-Point Protocol (PPP) and forwards data by learning MAC addresses. In this case, VPLS access on sub-interfaces can be achieved by MAC address learning on the basis of double VLAN tags. VLAN tags can be configured without limit for VPLS access. VPLS access can be configured on the sub-interfaces for QinQ VLAN tag termination in the following two modes:
l l

Symmetry Asymmetry

You can configure relevant attributes to select the access mode and guide MAC address learning.

Access to a PWE3/VLL Network Through the Sub-interface for QinQ Stacking


VLL is a point-to-point L2VPN. Because the VLANIF interface does not support VLL, you have to use the main interface to access VPN. Such a configuration is not flexible because the same physical interface cannot be accessed by multiple users. To make one physical interface accessed by multiple users, you can use the VLAN-based QinQ function at different subinterfaces as mentioned previously. In this case, CE-VLANs on both sides must be symmetrical, as shown in Figure 5-12. You can perform stacking to the tag packets of VLANs 1 200 on sub-interfaces, adding VLAN tag 1000 of the outer ISP network to the packets and then accessing VLL and PWE3.
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-13

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Figure 5-12 Typical networking diagram of the access to VLL/PWE3 through the sub-interface for VLAN stacking

Access to a VPLS Through the Sub-interface for QinQ Stacking


When users access an ISP network in VPLS mode, you can enable packets from user VLANs to be transmitted transparently over ISP networks in the following two ways:
l

Enable VLAN-based QinQ on the switched interface and bind the VLANIF interface to VSI. Create a sub-interface on a routed interface and then configure VLAN stacking at the subinterface.

As shown in Figure 5-13, perform stacking to tag packets of VLANs 1 to 200 at the sub-interface and add VLAN tag 1000 of the outer ISP network to the packets. Now user networks can access VPLS by binding the sub-interface to the VSI.

5-14

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

Figure 5-13 Typical networking diagram of the access to VPLS through the sub-interface for VLAN stacking

802.1p Remark Supported by QinQ


After QinQ encapsulation, the 802.1p value in the inner VLAN tag cannot be sensed. Therefore, services cannot be differentiated according to the priority, as shown in Figure 5-14. Figure 5-14 802.1p remark supported by QinQ

In the process of QinQ implementation, the 802.1p value in the inner VLAN tag needs to be sensed. You can set rules to sense the 802.1p value through commands as follows:
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-15

5 QinQ Configuration
l

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Ignore the 802.1p value in the inner VLAN tag and set a new 802.1p value in the outer VLAN tag. Automatically set the 802.1p value in the inner VLAN tag as the 802.1p value in the outer VLAN tag. Set the 802.1p value in the outer VLAN tag according to the 802.1p value in the inner VLAN tag.

As shown in Figure 5-15, QinQ supports 802.1p remark in the following three modes:
l l l

Set a value (Pipe mode). Use the 802.1p value in the inner VLAN tag (Uniform mode). Map the 802.1p value in the inner VLAN tag to a value in the outer VLAN tag. The values in multiple inner VLAN tags can be mapped to the same value in the outer VLAN tags. The value in an inner VLAN tag cannot be mapped to different values in multiple outer VLAN tags.

Figure 5-15 Typical networking diagram of 802.1p Remark supported by QinQ

802.1p and DSCP Remark During QinQ Termination


As shown in Figure 5-16 and defined in RFC 2724, six bits of the Type of Service (TOS) field in an IP header are used as DiffServ Code Point (DSCP) field to ensure Quality of Service (QoS) on the IP network. Traffic control on the gateway depends on the DSCP field. Figure 5-16 DSCP signaling

As shown in Figure 5-17, after QinQ termination on the PE, the packets are sent to the ISP network. To ensure QoS, 802.1p mapping to DSCP needs to be configured.
5-16 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

The following are the three mapping modes:


l l l

Select the 802.1p value in the inner VLAN tag. Select the 802.1p value in the outer VLAN tag. Select any number ranging from 0 to 7.

Figure 5-17 802.1p and DSCP remark during QinQ termination

802.1p and EXP Remark During QinQ Termination


As shown in Figure 5-18, the EXP field in an MPLS packet is used for Class of Service (CoS). Traffic control on the gateway depends on the field. Figure 5-18 MPLS packets

As shown in Figure 5-19, after QinQ termination on the PE, the packets are sent to the ISP MPLS network. To ensure QoS, 802.1p mapping to EXP needs to be configured. The following are the three mapping modes:
l l l

Select the 802.1p value in the inner VLAN tag. Select the 802.1p value in the outer VLAN tag. Select any number ranging from 0 to 7.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-17

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Figure 5-19 802.1p and EXP remark during QinQ termination

QinQ Termination Sub-interface Supports URPF


Unicast Reverse Path Forwarding (URPF) is used to avoid network attacks based on the source address spoofing. To avoid network attacks based on the source address spoofing through the sub-interface for QinQ VLAN tag termination, the sub-interface for QinQ VLAN tag termination needs to support URPF. The sub-interface for QinQ VLAN tag termination supports URPF as follows:
l

The system obtains the source address, the inner and outer VLAN tags, and the inbound interface information. The system takes the source address of the packet as the destination address and searches the forwarding table for the relevant outbound interface and the inner and outer VLAN tags. The system compares the searching result and the obtained information of the packet. If they are inconsistent, the system takes the source address as spoofing and discards the packet.

In this way, URPF can defend the network against the hostile attacks by modifying the source address. URPF has the following check modes:
l l

Loose check. If the relevant routing entry exists in the forwarding table, URPF is complete. Strict check. URPF is complete only when the relevant routing entry exists in the forwarding table and the interface information matches.
NOTE

The sub-interface for QinQ VLAN tag termination of the NE80E/40Esupports only loose URPF.

5-18

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

5.2 Configuring the QinQ Tunnel Function


Describes how to configure the QinQ tunnel. 5.2.1 Establishing the Configuration Task 5.2.2 Creating the Outer VLAN Tag for a Layer 2 Interface 5.2.3 Configuring QinQ for a Layer 2 Interface 5.2.4 (Optional) Configuring the Protocol Type for the Outer Tag 5.2.5 Checking the Configuration

5.2.1 Establishing the Configuration Task


Applicable Environment
When multiple VLANs are required, the QinQ tunnel need be configured. You can add the outer tag to the VLAN so that the range of available number of VLANs is widen; thus, the number of VLANs is no longer insufficient.

Pre-configuration Task
Before configuring the QinQ tunnel, complete the following tasks:
l l

Ensuring that the device is powered on correctly and operates properly Configuring basic attributes of the Ethernet interface

Data Preparation
To configure the QinQ tunnel, you need the following data. No. 1 2 Data Interface number of the QinQ tunnel ID of the outer VLAN tag

5.2.2 Creating the Outer VLAN Tag for a Layer 2 Interface


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-19

5 QinQ Configuration
vlan vlan-id

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

A VLAN is created and its view is displayed. The VLAN ID refers to the value of the outer tag specified in the QinQ tunnel function. The VLAN ID ranges from 1 to 4094. ----End

5.2.3 Configuring QinQ for a Layer 2 Interface


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { ethernet | gigabitethernet | eth-trunk } interface-number

The view of the Ethernet interface that need be configured with the QinQ tunnel is displayed. Step 3 Run:
portswitch

The interface is configured as a Layer 2 interface. (Optional) If the interface is a Layer 2 interface, this step is unnecessary. Step 4 Run:
port link-type dot1q-tunnel

The interface type is configured as a QinQ interface. Step 5 Run:


port default vlan vlan-id

The outer tag is configured; namely, the default VLAN ID of the interface is configured.
NOTE

The outer tag value should be the same as the VLAN ID created in Creating the Outer VLAN Tag for a Layer 2 Interface.

----End

5.2.4 (Optional) Configuring the Protocol Type for the Outer Tag
Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { ethernet | gigabitethernet | eth-trunk } interface-number

5-20

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

The view of the Ethernet interface that need be configured with the QinQ tunnel is displayed. Step 3 Run:
qinq protocol protocol-id

The protocol type of the outer tag is configured.


l l

IEEE 802.1ad defines the value of the EType field in the outer TPID to 0x88a8. The value of EType ranges from 0x0600 to 0xFFFF, and the default value is 0x8100.

To implement interoperation between devices of different vendors, in the case that QinQ is configured, devices of different vendors use 0x8100 as the value of the EType in the inner TPID but use different values as the values of EType in the outer TPID. In addition, the protocol type of the outer tag need be configured. ----End

5.2.5 Checking the Configuration


Run the following commands to check the previous configuration. Action Check VLAN information. Check the EType encapsulation value of the outer tag of the interface. Command display vlan [ vlan-id ] [ statistics | verbose ] display bpdu-tunnel interface config

Running the display vlan command, you can view whether broadcast, VLAN status, and address learning are enabled and view whether the interface configured with the QinQ tunnel function is an untagged interface. For example:
<Quidway> display vlan 10 verbose VLAN ID : 10 VLAN Type : Common Description : VLAN 0010 Status : Enable Broadcast : Enable MAC learning : Enable Statistics : Disable ---------------Untagged Port: GigabitEthernet1/0/0

Running the display bpdu-tunnel interface config command, you can view the configuration of TPID. For example:
<Quidway> system-view [Quidway] interface gigabitethernet 1/0/0 [Quidway-GigabitEthernet1/0/0] display bpdu-tunnel interface config BpduDot1qStatus disable BpduOneQStatus disable BpduTwoQStatus disable EtherType 9100 Dot1qVlan TwoQList

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-21

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5.3 Configuring Selective QinQ on a Layer 2 Interface


Describes how to configure the selective QinQ on a Layer 2 interface. 5.3.1 Establishing the Configuration Task 5.3.2 Creating the Outer VLAN Tag for a QinQ Interface 5.3.3 Configuring Selective QinQ on a Layer 2 Interface 5.3.4 (Optional) Configuring the Protocol Type for the Outer Tag 5.3.5 Checking the Configuration

5.3.1 Establishing the Configuration Task


Applicable Environment
Layer 2 selective QinQ is an extension of the QinQ tunnel. Layer 2 selective QinQ is more flexible than the QinQ tunnel. The major difference is as follows:
l

QinQ tunnel It attaches the same outer tag to all the frames entering the Layer 2 QinQ interface. Selective QinQ on the Layer 2 interface It can attach different outer tags to the frames entering the Layer 2 QinQ interface according to different inner tags.

Pre-configuration Task
Before configuring selective QinQ on a Layer 2 interface, complete the following tasks:
l l

Ensuring that the device is powered on correctly and operates properly Configuring basic attributes of the Ethernet interface

Data Preparation
To configure selective QinQ on a Layer 2 interface, you need the following data. No. 1 2 3 Data Interface number of the selective QinQ on the Layer 2 interface ID of the inner VLAN tag ID of the outer VLAN tag

5.3.2 Creating the Outer VLAN Tag for a QinQ Interface


5-22 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


vlan vlan-id

A VLAN is created and its view is displayed. The VLAN ID refers to the value of the outer tag specified in the Layer 2 selective QinQ function. The VLAN ID ranges from 1 to 4094. ----End

5.3.3 Configuring Selective QinQ on a Layer 2 Interface


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { gigabitethernet | eth-trunk } interface-number

The view of the Ethernet interface that need be configured with the Layer 2 selective QinQ is displayed. Step 3 Run:
portswitch

The interface is configured as a Layer 2 interface. (Optional) If the interface is a Layer 2 interface, this step is unnecessary. Step 4 Run:
port vlan-stacking outside-vlan vlan-id1 [ to vlan-id2 ] stack-vlan vlan-id3

The interface type is configured as a Layer 2 selective QinQ interface. In this step, vlan-id1 and vlan-id2 specify the range of the inner tag of the frame received by the interface; vlan-id3 is the value of the outer tag attached to the frame by the interface. ----End

5.3.4 (Optional) Configuring the Protocol Type for the Outer Tag
Procedure
Step 1 Run:
system-view

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-23

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

The system view is displayed. Step 2 Run:


interface { ethernet | gigabitethernet | eth-trunk } interface-number

The view of the Ethernet interface that need be configured with the QinQ tunnel is displayed. Step 3 Run:
qinq protocol protocol-id

The protocol type of the outer tag is configured.


l l

IEEE 802.1ad defines the value of the EType field in the outer TPID to 0x88a8. The value of EType ranges from 0x0600 to 0xFFFF, and the default value is 0x8100.

To implement interoperation between devices of different vendors, in the case that QinQ is configured, devices of different vendors use 0x8100 as the value of the EType in the inner TPID but use different values as the values of EType in the outer TPID. In addition, the protocol type of the outer tag need be configured. ----End

5.3.5 Checking the Configuration


Run the following commands to check the previous configuration. Action Check VLAN information. Check the EType encapsulation value of the outer tag of the interface. Command display vlan [ vlan-id ] [ statistics | verbose ] display bpdu-tunnel interface config

Running the display vlan command, you can view whether broadcast, VLAN status, and address learning are enabled and view whether the interface configured with the QinQ tunnel is a QinQ stack interface. For example:
<Quidway> display vlan 10 verbose VLAN ID : 10 VLAN Type : Common Description : VLAN 0010 Status : Enable Broadcast : Enable MAC learning : Enable Statistics : Disable ---------------QinQ-stack Port: GigabitEthernet1/0/0

Running the display bpdu-tunnel interface config command, you can view the configuration of TPID. For example:
<Quidway> system-view [Quidway] interface gigabitethernet 1/0/0 [Quidway-GigabitEthernet1/0/0] display bpdu-tunnel interface config BpduDot1qStatus disable BpduOneQStatus disable BpduTwoQStatus disable EtherType 9100

5-24

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
Dot1qVlan TwoQList

5 QinQ Configuration

5.4 Configuring the Sub-interface for VLAN Tag Termination to Support Proxy ARP
Describes how to configure the sub-interface for VLAN tag termination to support proxy ARP so that the users on the same network segment in different VLANs can communicate. 5.4.1 Establishing the Configuration Task 5.4.2 Configuring the Interface Mode as the User-Termination Mode 5.4.3 Configuring the Sub-interface for dot1q VLAN Tag Termination to Support Proxy ARP 5.4.4 Configuring the Sub-interface for QinQ VLAN Tag Termination to Support Proxy ARP 5.4.5 Checking the Configuration

5.4.1 Establishing the Configuration Task


Applicable Environment
Sub-interfaces for VLAN tag termination support the access of the VLANs in a certain range to the same network segment. Users on the same network segment belong to different VLANs. Such users can communicate by configuring the sub-interface for VLAN tag termination to support proxy ARP.

Pre-configuration Tasks
Before configuring the sub-interface for VLAN tag termination to support proxy ARP, complete the following tasks:
l l

Configuring the users that communicate to be on the same network segment Configuring the correct VLANs of users to enable the packets received by the sub-interface for VLAN tag termination to carry one or double tags

Data Preparation
To configure the sub-interface for VLAN tag termination to support proxy ARP, you need the following data. No. 1 2 Data Control VLAN ID of the termination sub-interface Range of the termination tag of the interface

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-25

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5.4.2 Configuring the Interface Mode as the User-Termination Mode


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { gigabitethernet | eth-trunk } interface-number

The Ethernet interface view or the Eth-Trunk interface view is displayed. Step 3 Run:
mode user-termination

The mode of the Ethernet interface is configured as user-termination mode. When this command is run on the main interface, ensure that no sub-interface is configured under this main interface. ----End

5.4.3 Configuring the Sub-interface for dot1q VLAN Tag Termination to Support Proxy ARP
Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { gigabitethernet | eth-trunk } interface-number.subinterface-number

The Ethernet sub-interface view or the Eth-Trunk sub-interface view is displayed. Step 3 Run:
control-vid vid dot1q-termination [ rt-protocol ]

The VLAN ID of the sub-interface for VLAN tag termination is set to terminate the packets with one tag. Step 4 (Optional) Create a user VLAN group. 1. 2. Step 5 Run:
dot1q termination vid low-pe-vid [ to high-pe-vid ] [ vlan-group group-id ]

Run the vlan-group group-id command to create a user VLAN group. Run the quit command to return to the Ethernet sub-interface view or the Eth-Trunk subinterface view.

5-26

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

The VLAN tag termination function is configured for the dotlq sub-interface. Step 6 Run:
ip address ip-address { mask | mask-length }

The IP address is configured for the Ethernet sub-interface or the Eth-Trunk sub-interface. The IP address of the sub-interface and the IP address of the VLAN user associated with the subinterface are on the same network segment. Step 7 Run:
arp-proxy inter-sub-vlan-proxy enable

The proxy ARP function of the sub-interface is enabled. Step 8 Run:


arp broadcast enable

The ARP broadcast of the sub-interface for VLAN tag termination is enabled. Enabling or disabling the ARP broadcast on the termination sub-interface makes the route status change from Down to Up on the sub-interface. This may lead to route flapping in the whole network, and even affect the running services. ----End

5.4.4 Configuring the Sub-interface for QinQ VLAN Tag Termination to Support Proxy ARP
Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { gigabitethernet | eth-trunk } interface-number.subinterface-number

The VLAN ID of the sub-interface for VLAN tag termination is set to terminate the packets with double tags. Step 3 Run:
control-vid vid qinq-termination [ local-switch | [ rt-protocol | dynamic ]* ]

The VLAN ID for the termination sub-interface is set and packets with double tags are configured to be terminated. Step 4 (Optional) Create a user VLAN group. 1. 2. Step 5 Run:
qinq termination pe-vid pe-vid ce-vid low-ce-vid [ to high-ce-vid ] [ vlan-group group-id ]

Run the vlan-group group-id command to create a user VLAN group. Run the quit command to return to the Ethernet sub-interface view or the Eth-Trunk subinterface view.

The sub-interface is configured for QinQ VLAN tag termination.


Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-27

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Step 6 Run:
ip address ip-address { mask | mask-length }

The IP address is configured for the Ethernet sub-interface or the Eth-Trunk sub-interface. The IP address of the sub-interface and the IP address of the VLAN user associated with the sub-interface are on the same network segment. Step 7 Run:
arp-proxy inter-sub-vlan-proxy enable

The proxy ARP function of the sub-interface is enabled. Step 8 Run:


arp broadcast enable

The ARP broadcast of the sub-interface for VLAN tag termination is enabled. Enabling or disabling the ARP broadcast on the termination sub-interface makes the route status change from Down to Up on the sub-interface. This may lead to route flapping in the whole network, and even affect the running services. ----End

5.4.5 Checking the Configuration


Run the following commands to check the previous configuration. Action Check information on dot1q termination. Check information on QinQ VLAN tag termination. Command display dot1q information termination [interface interface-type interface-number [.subinterface-number ] ] display qinq information termination [ interface interface-type interface-number [.subinterface-number ] ]

Run the display dot1q information termination interface on PE. The details about dot1q termination are displayed. For example: # Display information on dot1q termination.
<Quidway> display dot1q information termination interface gigabitethernet 2/0/0 GigabitEthernet2/0/0.1 Total QinQ Num: 1 dot1q termination vid 10 to 20 vlan-group 1 Total vlan-group: 1 vlan-group Num: 1 control-vid 1 dot1q-termination

Run the display qinq information termination interface command on PE. The details about the QinQ VLAN tag termination are displayed. For example: # Display information on the interface for QinQ VLAN tag termination.
[Quidway] display qinq information termination interface gigabitethernet 2/0/0 GigabitEthernet2/0/0.1 Total QinQ Num: 1 qinq termination pe-vid 1000 ce-vid 100 to 200 vlan-group 1 Total vlan-group Num: 1

5-28

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
vlan-group 1 control-vid 1 qinq-termination

5 QinQ Configuration

By displaying the ARP table of the user device, you can see the MAC address of the users in other VLAN and the correct corresponding entries.

5.5 Configuring the Sub-interface for VLAN Tag Termination to Support VRRP
Describes how to configure the sub-interface for VLAN tag termination to support VRRP so that the communication between the user and the network can be reliable, stable, and uninterrupted. 5.5.1 Establishing the Configuration Task 5.5.2 Configuring the Interface Mode as the User Termination Mode 5.5.3 Configuring the Sub-interface for dot1q VLAN Tag Termination to Support VRRP 5.5.4 Configuring the Sub-interface for QinQ VLAN Tag Termination to Support VRRP 5.5.5 Configuring VRRP 5.5.6 Checking the Configuration

5.5.1 Establishing the Configuration Task


Applicable Environment
Users usually require communicating with certain key networks at any time. VRRP can be used to ensure that the communication between users and the network is reliable, stable, and uninterrupted. When the packets received by a VRRP virtual router carry one or double tags, you can configure the sub-interface for VLAN tag termination to support VRRP.

Pre-configuration Tasks
Before configuring the sub-interface for VLAN Tag termination to support VRRP, complete the following tasks:
l l

Connecting devices correctly Configuring the correct VLANs of users to enable the packets received by the sub-interface for VLAN tag termination to carry one or double tags

Data Preparation
To configure the sub-interface for VLAN Tag termination to support VRRP, you need the following data. No. 1 2
Issue 03 (2008-09-22)

Data Group number of the VRRP backup group and the virtual IP address Priorities of the routers in the backup group
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-29

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

No. 3 4

Data Preemption mode Range of tags that the sub-interface terminates

5.5.2 Configuring the Interface Mode as the User Termination Mode


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { gigabitethernet | eth-trunk } interface-number

The Ethernet interface view or the Eth-Trunk interface view is displayed. Step 3 Run:
mode user-termination

The mode of the Ethernet interface is configured as user-termination mode. When this command is run on the main interface, ensure that no sub-interface is configured under this main interface. ----End

5.5.3 Configuring the Sub-interface for dot1q VLAN Tag Termination to Support VRRP
Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { gigabitethernet | eth-trunk } interface-number.subinterface-number

The Ethernet sub-interface view or the Eth-Trunk sub-interface view is displayed. Step 3 Run:
control-vid vid dot1q-termination [ rt-protocol ]

The VLAN ID of the sub-interface for VLAN tag termination is set to terminate the packets with one tag. If the key word "rt-protocol" is configured when you configure a control VLAN, the configured user vid must be the same as the control vid. Otherwise, the traffic is blocked.
5-30 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

Step 4 (Optional) Create a user VLAN group. 1. 2. Step 5 Run:


dot1q termination vid low-pe-vid [ to high-pe-vid ] [ vlan-group group-id ]

Run the vlan-group group-id command to create a user VLAN group. Run the quit command to return to the Ethernet sub-interface view or the Eth-Trunk subinterface view.

The VLAN tag termination function is configured on the sub-interface for dot1q termination. Step 6 Run:
dot1q vrrp vid vid

The VLAN ID that maintains the VRRP status is configured. Step 7 Run:
arp broadcast enable

The ARP broadcast of the sub-interface for VLAN tag termination is enabled. Enabling or disabling the ARP broadcast on the termination sub-interface makes the route status change from Down to Up on the sub-interface. This may lead to route flapping in the whole network, and even affect the running services. ----End

5.5.4 Configuring the Sub-interface for QinQ VLAN Tag Termination to Support VRRP
Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { gigabitethernet | eth-trunk } interface-number.subinterface-number

The Ethernet sub-interface view or the Eth-Trunk sub-interface view is displayed. Step 3 Run:
control-vid vid qinq-termination [ local-switch | [ rt-protocol | dynamic ] * ]

The VLAN ID of the sub-interface for VLAN tag termination is set to terminate the packets with double tags. Step 4 (Optional) Create a user VLAN group. 1. 2. Step 5 Run:
qinq termination pe-vid pe-vid ce-vid low-ce-vid [ to high-ce-vid ] [ vlan-group group-id ]

Run the vlan-group group-id command to create a user VLAN group. Run the quit command to return to the Ethernet sub-interface view or the Eth-Trunk subinterface view.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-31

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

The sub-interface for VLAN tag termination is configured. Step 6 Run:


qinq vrrp pe-vid pe-vid ce-vid ce-vid

The VLAN ID that maintains the VRRP status is configured. Step 7 Run:
arp broadcast enable

The ARP broadcast of the sub-interface for VLAN tag termination is enabled. Enabling or disabling the ARP broadcast on the termination sub-interface makes the route status change from Down to Up on the sub-interface. This may lead to route flapping in the whole network, and even affect the running services. ----End

5.5.5 Configuring VRRP


Configure VRRP on the device. For the detailed configuration, refer to the "VRRP Configuration" in the Quidway NetEngine80E/40E Router Configuration Guide - Reliability. When configuring VRRP and static ARP on the dot1q termination sub-interface, QinQ termination sub-interface, or VLANIF interface at the same time, note the following:
l

Do not configure the IP address mapping to the static ARP entry on the interface as the VRRP virtual address. Do not configure the virtual address of the VRRP virtual router where the interface resides as the IP address mapping to the static ARP entry on the interface.

Otherwise, incorrect host routes are generated. This affects packet forwarding between devices.

5.5.6 Checking the Configuration


Run the following commands to check the previous configuration. Action Check information on dot1q VLAN tag termination. Check information on QinQ VLAN tag termination. Check the status of VRRP. Command display dot1q information termination [ interface interface-type interface-number [.subinterface-number ] ] display qinq information termination [ interface interface-type interface-number [.subinterface-number ] ] display vrrp

Run the display dot1q information termination interface command on PE. The details about the dot1q termination are displayed. For example: # Display information on dot1q termination.
<Quidway> display dot1q information termination interface gigabitethernet 1/0/0 GigabitEthernet1/0/0.1 L3VPN bound

5-32

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
Total QinQ Num: 1 dot1q termination vid 10 vlan-group 1 Total vlan-group Num: 1 vlan-group 1 control-vid 1 dot1q-termination

5 QinQ Configuration

Run the display qinq information termination interface command on PE. The details about QinQ VLAN tag termination on interfaces are displayed. For example: # Display information on QinQ VLAN tag termination.
<Quidway> display qinq information termination interface gigabitethernet 1/0/0 GigabitEthernet1/0/0.1 Total QinQ Num: 1 qinq termination pe-vid 1000 ce-vid 100 vlan-group 1 Total vlan-group Num: 1 vlan-group 1 control-vid 1 qinq-termination

Using the display vrrp command, you can view the VRRP status of the PE as follows:
<Quidway> display vrrp GigabitEthernet2/0/0.1 | Virtual Router 1 state : Master Virtual IP : 10.1.1.111 PriorityRun : 100 PriorityConfig : 100 MasterPriority : 100 Preempt : YES Delay Time : 0 Timer : 1 Auth Type : NONE Virtual Mac : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp

5.6 Configuring the Sub-interface for VLAN Tag Termination to Access an L3VPN
Describes how to configure the sub-interface for VLAN tag termination to access an L3VPN so that the user networks between CEs can communicate. 5.6.1 Establishing the Configuration Task 5.6.2 Configuring the Interface Mode as the User Termination Mode 5.6.3 Configuring the Sub-interface for dot1q VLAN Tag Termination to Access an L3VPN 5.6.4 Configuring the Sub-interface for QinQ VLAN Tag Termination to Access an L3VPN 5.6.5 Configuring L3VPN 5.6.6 Checking the Configuration

5.6.1 Establishing the Configuration Task


Applicable Environment
The CE accesses the ISP network through PEs. The user data packets sent by the CE to the PE have one or double tags.
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-33

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

It is required to configure the sub-interface for VLAN tag termination to access an L3VPN on the PE, so that the user networks between the CEs can communicate.

Pre-configuration Tasks
Before configuring the sub-interface for VLAN tag termination to access an L3VPN, complete the following tasks:
l l

Connecting devices correctly Configuring the VLAN of the CE and the basic Layer 2 forwarding function to make the packets sent from the CE to the PE carry one or double tags

Data Preparation
To configure the sub-interface for VLAN tag termination to access an L3VPN, you need the following data. No. 1 2 3 4 5 6 Data Name of the PE interface connected with CE IP address of the interface Name of the VPN instances on PE1 and PE2 RD and VPN target of the VPN instances Control VLAN ID, and the name and number of the sub-interface for VLAN tag termination Interface that is bound with the VPN instance

5.6.2 Configuring the Interface Mode as the User Termination Mode


Context
Do as follows on the PE:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { gigabitethernet| eth-trunk } interface-number

The Ethernet interface view or the Eth-Trunk interface view is displayed. Step 3 Run:
mode user-termination

The mode of the Ethernet interface is configured as user-termination mode.


5-34 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

When this command is run on the main interface, ensure that no sub-interface is configured under this main interface. ----End

5.6.3 Configuring the Sub-interface for dot1q VLAN Tag Termination to Access an L3VPN
Context
Do as follows on the PE:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { gigabitethernet | eth-trunk } interface-number.subinterface-number

The Ethernet sub-interface view or the Eth-Trunk sub-interface view is displayed. Step 3 Run:
ip binding vpn-instance vpn-instance-name

The sub-interface is bound with VPN instances. Step 4 Run:


ip address ip-address { mask | mask-length }

An IP address is assigned to the sub-interface. Step 5 Run:


control-vid vid dot1q-termination [ rt-protocol ]

The VLAN ID of the sub-interface for VLAN tag termination is set to terminate the packets with one tag. Step 6 (Optional) Create a user VLAN group. 1. 2. Step 7 Run:
dot1q termination vid low-pe-vid [ to high-pe-vid ] [ vlan-group group-id ]

Run the vlan-group group-id command to create a user VLAN group. Run the quit command to return to the Ethernet sub-interface view or the Eth-Trunk subinterface view.

The VLAN tag termination function is configured for the dotlq sub-interface. ----End

5.6.4 Configuring the Sub-interface for QinQ VLAN Tag Termination to Access an L3VPN
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-35

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Context
Do as follows on the PE:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { gigabitethernet | eth-trunk } interface-number.subinterface-number

The Ethernet sub-interface view or the Eth-Trunk sub-interface view is displayed. Step 3 Run:
ip binding vpn-instance vpn-instance-name

The sub-interface is bound with the VPN instance. Step 4 Run:


ip address ip-address { mask | mask-length }

The IP address of the sub-interface is configured. Step 5 Run:


control-vid vid qinq-termination [ local-switch | [ rt-protocol | dynamic ] * ]

The VLAN ID of the sub-interface for VLAN tag termination is set to terminate the packets with double tags. Step 6 (Optional) Create a user VLAN group. 1. 2. Step 7 Run:
qinq termination pe-vid pe-vid ce-vid low-ce-vid [ to high-ce-vid ] [ vlan-group group-id ]

Run the vlan-group group-id command to create a user VLAN group. Run the quit command to return to the Ethernet sub-interface view or the Eth-Trunk subinterface view.

The VLAN tag termination function of the sub QinQ function is configured. ----End

5.6.5 Configuring L3VPN


Configure L3VPN on the CE, PE, and P. For the detailed configuration, refer to the "BGP MPLS IP VPN Configuration" in the Quidway NetEngine80E/40E Router Configuration Guide - VPN.

5.6.6 Checking the Configuration


Run the following commands to check the previous configuration.
5-36 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

Action Check information on the dot1q VLAN tag termination. Check information on QinQ VLAN tag termination. Check configuration of the VPN instance.

Command display dot1q information termination [ interface interface-type interface-number [.subinterface-number ] ] display qinq information termination [ interface interface-type interface-number [.subinterface-number ] ] display ip vpn-instance verbose [ vpn-instancename ]

Run the display dot1q information termination interface command on PE. The details about dot1q VLAN tag termination are displayed. For example: # Display information about the dot1q VLAN tag termination.
[Quidway] display dot1q information termination interface gigabitethernet 2/0/0 GigabitEthernet2/0/0.1 L3VPN bound Total QinQ Num: 1 dot1q termination vid 10 to 20 vlan-group 1 Total vlan-group Num: 1 vlan-group 1 control-vid 1 dot1q-termination

Run the display qinq information termination interface command on PE. The details about the QinQ VLAN tag termination are displayed. For example: # Display information on the dot1q interface.
<Quidway> display qinq information termination interface gigabitethernet 2/0/0 GigabitEthernet2/0/0.1 L3VPN bound Total QinQ Num: 1 qinq termination pe-vid 1000 ce-vid 100 to 200 vlan-group 1 Total vlan-group Num: 1 vlan-group 1 control-vid 1 qinq-termination

Run the display ip vpn-instance verbose [ vpn-instance-name ] command. The details about the VPN instances created on the local device are displayed. The details cover the creation date, the time being in the Up status, the RD value, VPN target and the policy used to assign the labels.
<Quidway> display ip vpn-instance verbose Total VPN-Instances configured : 1 VPN-Instance Name and ID : vpn1, 1 Create date : 2006/06/06 16:30:22 Up time : 0 days, 00 hours, 01 minutes and 03 seconds Route Distinguisher : 100:1 Export VPN Targets : 1:2 Import VPN Targets : 1:2 Label policy : label per route The diffserv-mode Information is : uniform The ttl-mode Information is : uniform Interfaces : GigabitEthernet1/0/0.1

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-37

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5.7 Configuring the Sub-interface for VLAN Tag Termination to Access an L2VPN
Describes how to configure the sub-interface for VLAN tag termination to access an L2VPN so that the user networks between CEs can communicate. 5.7.1 Establishing the Configuration Task 5.7.2 Configuring the Interface Mode as the User Termination Mode 5.7.3 Configuring the Sub-interface for QinQ VLAN Tag Termination to Access an L2VPN 5.7.4 Configuring L2VPN 5.7.5 Checking the Configuration

5.7.1 Establishing the Configuration Task


Applicable Environment
CEs access the ISP network through PEs. The user data packets sent from CE to PE have one or double tags. It is required to configure sub-interface for VLAN tag termination to access an L2VPN on the PE, so that the user networks between the CEs can communicate.

Pre-configuration Tasks
Before configuring the sub-interface for VLAN tag termination to access an L2VPN, complete the following tasks:
l l

Connecting devices correctly Configuring the VLAN of the CE and the basic Layer 2 forwarding function to make the packets sent from the CE to the PE carry double tags

Data Preparation
To configure the sub-interface for VLAN tag termination to access an L2VPN, you need the following data. No. 1 2 3 4 5
5-38

Data Name of the PE interface connected to the CE IP address of the interface The L2VC IDs of two PW ends (The two IDs must be the same) The MPLS LSR ID on each PE and P IP addresses of the remote peers
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

No. 6

Data The controlling VLAN number and the sub-interface for VLAN tag termination

5.7.2 Configuring the Interface Mode as the User Termination Mode


Context
Do as follows on the PE:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { gigabitethernet| eth-trunk } interface-number

The Ethernet interface view or the Eth-Trunk interface view is displayed. Step 3 Run:
mode user-termination

The mode of Ethernet interface is configured as user-termination mode. When this command is run on the main interface, ensure that no sub-interface is configured under this main interface. ----End

5.7.3 Configuring the Sub-interface for QinQ VLAN Tag Termination to Access an L2VPN
Context
Do as follows on the PE:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { gigabitethernet | eth-trunk } interface-number.subinterface-number

The Ethernet sub-interface view or the Eth-Trunk sub-interface view is displayed.


Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-39

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Step 3 Run:
control-vid vid qinq-termination [ local-switch | [ rt-protocol | dynamic ] * ]

The VLAN ID of the sub-interface for VLAN tag termination is set to terminate the packets with double tags. Step 4 Run:
qinq termination l2 { symmetry | asymmetry }

The attributes of the sub-interface for QinQ VLAN tag termination are set. QinQ termination sub-interfaces can be classified into two modes: symmetric and asymmetric. The asymmetric mode is the default mode. In symmetric mode, the inner VLAN tag is perceived as data and is transmitted to the remote PE; and packets can be correctly forwarded to the destination user VLAN. In this case, the inner tag can be specified as a tag range. In asymmetric mode, the inner VLAN tag is not transmitted to the remote PE. User VLANs, thus, cannot be isolated. In this case, the inner tag cannot identify users, and thus cannot be specified as a tag range. Step 5 (Optional) Create a user VLAN group. 1. 2. Step 6 Run:
qinq termination pe-vid pe-vid ce-vid low-ce-vid [ to high-ce-vid ] [ vlan-group group-id ]

Run the vlan-group group-id command to create a user VLAN group. Run the quit command to return to the Ethernet sub-interface view or the Eth-Trunk subinterface view.

The VLAN tag termination function of the QinQ sub-interface is configured.


l

If the attributes of the QinQ termination sub-interface are configured as symmetric mode, the inner tag can be specified as a range. If the attributes of the QinQ termination sub-interface are configured as asymmetric mode, the inner tag is a fixed value instead of a range. Otherwise, in Configuring L2VPN, the system prompts errors.

By default, a QinQ termination sub-interface operates in asymmetric mode. ----End

5.7.4 Configuring L2VPN


Configure L2VPN on the CE, PE, and P. For the detailed configuration, refer to "VLL Configuration" in the Quidway NetEngine80E/40E Router Configuration Guide - VPN. On a QinQ termination sub-interface, various MPLS L2VPN connections can be set up, including the following:
l l l l l

CCC local connection CCC remote connection SVC remote connection Kompella local connection Kompella remote connection
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

5-40

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
l

5 QinQ Configuration

Martini remote connection

5.7.5 Checking the Configuration


Run the following commands to check the previous configuration. Action Check information about the QinQ termination sub-interface. Check information about the CCC connection. Check information about the interface of the CCC connection. Check information about the SVC L2VPN connection. Check information about the SVC interface in the Up or Down state. Check information about the Martini MPLS L2VPN connection on the PE. Check information about the remote Martini MPLS L2VPN connection on the PE. Check BGP information about the Kompella MPLS L2VPN. Check information about the Kompella MPLS L2VPN. Check information about the L2VPN on the PE. Command display qinq information termination [ interface interface-type interface-number [.subinterfacenumber ] ] display ccc [ ccc-name | type { local | remote } ] display l2vpn ccc-interface vc-type ccc [ up | down ] display mpls static-l2vc [ interface interface-type interface-number ] display l2vpn ccc-interface vc-type static-vc { up | down } display mpls l2vc [ vc-id | interface interface-type interface-number ] display mpls l2vc remote-info [ vc-id ]

display bgp l2vpn { all | group [ group-name ] | peer [ [ ip-address ] verbose ] | route-distinguisher rd [ ceid ce-id [ label-offset label-offset ] ] } display mpls l2vpn connection [ vpn-name [ remotece ce-offset | down | up | verbose ] | summary | interface interface-type interface-number ] display mpls l2vpn [ vpn-name [ local-ce | remote-ce ] ]

Run the display qinq information termination interface command on the PE, and you can view detailed information about the QinQ termination sub-interface. For example: # Check information about the QinQ termination sub-interface.
[Quidway] display qinq information termination interface gigabitethernet 2/0/0 GigabitEthernet2/0/0.1 VLL/PWE3 bound qinq 8021p-mode trust ce-vid-8021p Total QinQ Num: 1 qinq termination pe-vid 1000 ce-vid 100 to 200 vlan-group 1 Total vlan-group: 1 vlan-group 1

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-41

5 QinQ Configuration
control-vid 1 qinq-termination

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Run the display ccc command, and you can find that the CCC VC status is Up. For example:
<Quidway> display ccc total ccc vc : 1 local ccc vc : 1, 1 up remote ccc vc : 0, 0 up name: ce1-ce2, type: local, state: up, intf1: Pos1/0/0 (up), intf2: Pos2/0/0 (up) <Quidway> display ccc total ccc vc : 1 local ccc vc : 0, 0 up remote ccc vc : 1, 1 up name: ce2-ce1, type: remote, state: up, intf: Pos2/0/0 (up), in-label: 201 , out-label: 101 , out-interface : Pos1/0/0

Run the display l2vpn ccc-interface vc-type ccc command, and you can find that the VC type is CCC, and the CCC status is Up. For example:
<Quidway> display l2vpn ccc-interface vc-type all Total ccc-interface of CCC VC: 1 up (1), down (0) Interface Encap Type State VC Type Pos1/0/0 ppp up CCC

Run the display mpls static-l2vc command, and you can find that the VC status is Up. For example:
<Quidway> display mpls Total svc connections: *Client Interface AC Status VC State VC ID VC Type Destination Transmit VC Label Receive VC Label Control Word VCCV Capability Tunnel Policy Name Traffic Behavior PW Template Name Create time UP time Last change time static-l2vc 1, 1 up, 0 down : Pos1/0/0 is up : up : up : 0 : ppp : 3.3.3.9 : 100 : 200 : Disable : Disable : -: -: -: 0 days, 0 hours, 1 minutes, 38 seconds : 0 days, 0 hours, 1 minutes, 11 seconds : 0 days, 0 hours, 1 minutes, 11 seconds

Run the display l2vpn ccc-interface vc-type static-l2vc up command, and you can find that the VC type is SVC, and the SVC status is Up. For example:
<Quidway> display l2vpn ccc-interface vc-type all Total ccc-interface of CCC VC: 1 up (1), down (0) Interface Encap Type State VC Type Pos1/0/0 ppp up SVC

Run the display mpls l2vc command, and you can find that "Destination" is the peer address of the specified VC, and "VC State" is "up". For example:
<Quidway> display mpls total LDP VC : 2 2 *client interface session state AC status VC state VC ID VC type destination l2vc up 0 down : GigabitEthernet2/0/0.1 : up : up : up : 101 : VLAN : 3.3.3.9

5-42

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
local VC label : control word : forwarding entry : local group ID : manual fault : active state : link state : local VC MTU : tunnel policy name : traffic behavior name: PW template name : primary or secondary : create time : up time : last change time : *client interface : session state : AC status : VC state : VC ID : VC type : destination : local VC label : control word : forwarding entry : local group ID : manual fault : active state : link state : local VC MTU : tunnel policy name : traffic behavior name: PW template name : primary or secondary : create time : up time : last change time : 21504 remote VC label disable existent 0 not set active up 1500 remote VC MTU ---primary 0 days, 0 hours, 7 minutes, 53 0 days, 0 hours, 2 minutes, 29 0 days, 0 hours, 2 minutes, 29 GigabitEthernet2/0/0.2 up up up 102 VLAN 3.3.3.9 21505 remote VC label disable existent 0 not set active up 1500 remote VC MTU ---primary 0 days, 0 hours, 7 minutes, 50 0 days, 0 hours, 2 minutes, 29 0 days, 0 hours, 2 minutes, 29

5 QinQ Configuration
: 21504

: 1500

seconds seconds seconds

: 21505

: 1500

seconds seconds seconds

Run the display mpls l2vc remote-info command, and you can find that " Peer Addr" is the peer address of the specified VC. For example:
<Quidway> display mpls l2vc remote-info Total remote ldp vc : 1 Transport Group Peer Remote VC ID ID Addr Encap 100 0 3.3.3.9 vlan

Remote VC Label 17408

C MTU/ N S Bit CELLS Bit Bit 0 1500 1 0

Run the display bgp l2vpn command, and you can find "Destination" is the peer address of the VC, "route-distinguisher" of the L2VPN is correctly configured, and the label is assigned to the peer device. For example:
<Quidway> display bgp l2vpn all BGP Local router ID : 2.2.2.9, local AS number : 100 Origin codes:i - IGP, e - EGP, ? - incomplete bgp.l2vpn: 1 destination Route Distinguisher: 100:1 CE ID Label Offset Label Base nexthop pref 4 0 132096 3.3.3.9 100

as-path

Run the display mpls l2vpn connection command, and you can find "VPN name" is correctly configured, the connection status is Up, and "route-distinguisher" is correctly configured. For example:
[Quidway] display mpls l2vpn connection 1 total connections, connections: 1 up, 0 down, 0 local, 1 remote, 0 unknown VPN name: vpn1, 1 total connections,

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-43

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

connections: 1 up, 0 down, 0 local, 1 remote, 0 unknown CE name: ce1, id: 1, Rid type status peer-id route-distinguisher intf 2 rmt up 3.3.3.9 100:1 Pos1/0/0

Run the display mpls l2vpn command on the PE, and you can view the detailed configurations of the L2VPN. For example: # Check the configurations of all the L2VPNs on the PE.
<Quidway> display mpls l2vpn VPN number: 1 vpn-name encap-type route-distinguisher vpn1 ppp 100:1

mtu 128

ce(L) 1

ce(R) 1

5.8 Configuring the Sub-interface for VLAN Tag Termination to Access a VPLS
Describes how to configure the sub-interface for VLAN tag termination to access a VPLS so that the user networks between CEs can communicate. 5.8.1 Establishing the Configuration Task 5.8.2 Configuring the Interface Mode as the User Termination Mode 5.8.3 Configuring the Sub-interface for dot1q VLAN Tag Termination to Access a VPLS 5.8.4 Configuring the Sub-interface for QinQ VLAN Tag Termination to Access a VPLS 5.8.5 Configuring VPLS 5.8.6 Checking the Configuration

5.8.1 Establishing the Configuration Task


Applicable Environment
CEs access the ISP network through PEs. The user data packets sent from CE to PE have one or double tags. It is required to configure sub-interface for VLAN tag termination to access the VPLS network on the PE, so that the user networks between the CEs can communicate.

Pre-configuration Tasks
Before configuring the sub-interface for VLAN tag termination to access VPLS, complete the following tasks:
l l

Connecting devices correctly Configuring the VLAN of the CE and the basic Layer 2 forwarding function to make the packets sent from the CE to the PE carry one or double tags

Data Preparation
To configure the sub-interface for VLAN tag termination to access VPLS, you need the following data.
5-44 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

No. 1 2 3 4 5 6

Data Name of the PE interface connected with CE IP address of the interface The L2VC IDs of two PW ends (The two IDs must be the same) The MPLS LSR ID on each PE and P The VSI names on PE1, PE2 and PE3 The bound VSI interface

5.8.2 Configuring the Interface Mode as the User Termination Mode


Context
Do as follows on the PE:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { gigabitethernet | eth-trunk } interface-number

The Ethernet interface view or the Eth-Trunk interface view is displayed. Step 3 Run:
mode user-termination

The mode of the Ethernet interface is configured as user-termination mode. When this command is run on the main interface, ensure that no sub-interface is configured under this main interface. ----End

5.8.3 Configuring the Sub-interface for dot1q VLAN Tag Termination to Access a VPLS
Context
Do as follows on the PE:

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-45

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { gigabitethernet | eth-trunk } interface-number.subinterface-number

The Ethernet sub-interface view or the Eth-Trunk sub-interface view is displayed. Step 3 Run:
control-vid vid dot1q-termination [ rt-protocol ]

The VLAN ID of the sub-interface for VLAN tag termination is set to terminate the packets with one tag. Step 4 (Optional) Create a user VLAN group. 1. 2. Step 5 Run:
dot1q termination vid low-pe-vid [ to high-pe-vid ] [vlan-group group-id ]

Run the vlan-group group-id command to create a user VLAN group. Run the quit command to return to the Ethernet sub-interface view or the Eth-Trunk subinterface view.

The termination function of the sub-interface for dot1q VLAN tag termination is configured. ----End

5.8.4 Configuring the Sub-interface for QinQ VLAN Tag Termination to Access a VPLS
Context
Do as follows on the PE:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { gigabitethernet | eth-trunk } interface-number.subinterface-number

The Ethernet sub-interface view or the Eth-Trunk sub-interface view is displayed. Step 3 Run:
control-vid vid qinq-termination [ local-switch | [ rt-protocol | dynamic ] * ]

The VLAN ID of the sub-interface for VLAN tag termination is set to terminate the packets with double tags. Step 4 Run:
5-46 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
qinq termination l2 { symmetry | asymmetry }

5 QinQ Configuration

The mode of the QinQ termination sub-interface is configured. QinQ termination sub-interfaces can be classified into two modes: symmetric and asymmetric. The asymmetric mode is the default mode. In symmetric mode, the inner VLAN tag is perceived as data and is transmitted to the remote PE. Thus, the VLAN packet can be correctly forwarded to the destination VLAN. In asymmetric mode, the outer VLAN tag is not transmitted to the remote PE. User VLANs, thus, cannot be isolated. Step 5 (Optional) Create a user VLAN group. 1. 2. Step 6 Run:
qinq termination pe-vid pe-vid ce-vid low-ce-vid [ to high-ce-vid ] [ vlan-group group-id ]

Run the vlan-group group-id command to create a user VLAN group. Run the quit command to return to the Ethernet sub-interface view or the Eth-Trunk subinterface view.

The termination function of the sub-interface for QinQ VLAN tag termination is configured. ----End

5.8.5 Configuring VPLS


Configure VPLS on the CE, PE, and P. For the detailed configuration, refer to the "VPLS Configuration" in the Quidway NetEngine80E/40E Router Configuration Guide - VPN. When configuring VPLS, you can adopt Martini VPLS or Kompella VPLS.

5.8.6 Checking the Configuration


Run the following commands to check the previous configuration. Action Check information about the dot1q VLAN tag termination. Check information on QinQ VLAN tag termination. Check the VPLS VSI. Command display dot1q information termination [ interface interface-type interface-number [.subinterfacenumber ] ] display qinq information termination [ interface interface-type interface-number [.subinterfacenumber ] ] display vsi vsi-name [ verbose ]

Running the display dot1q information termination interface command, you can view the detailed information about the dot1q VLAN tag termination. For example: # Display information about the dot1q VLAN tag termination.
[Quidway] display dot1q information termination interface gigabitethernet 2/0/0 GigabitEthernet2/0/0.1 L3VPN bound Total QinQ Num: 1 dot1q termination vid 10 to 20 vlan-group 1

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-47

5 QinQ Configuration
Total vlan-group Num: 1 vlan-group 1 control-vid 1 dot1q-termination

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Run the display qinq information termination interface command on the PE. The details of the QinQ VLAN tag termination are displayed. For example: # Display information on the QinQ VLAN tag termination.
<Quidway> display qinq information termination interface gigabitethernet 2/0/0 GigabitEthernet2/0/0.1 VSI bound qinq 8021p-mode trust ce-vid-8021p Total QinQ Num: 1 qinq termination pe-vid 1000 ce-vid 100 to 200 vlan-group 1 Total vlan-group Num: 1 vlan-group 1 control-vid 1 qinq-termination

Run the display vsi vsi-name [ verbose ] command. From the display, you can see that the "VSI State" item is "up". If you choose the parameter verbose, the "Signaling" item is " PW Signaling ", and the "PW State" item is "up". For example:
<Quidway> display vsi bgp1 *** VSI Name VSI Index PW Signaling Member Discovery Style PW MAC Learn Style Encapulation Type MTU VSI State BGP RD SiteID/Range/Offset Import vpn target Export vpn target Remote Label Block Local Label Block Interface Name State *Peer Ip Address PW State Local VC Label Remote VC Label PW Type Tunnel ID verbose : bgp1 : 0 : bgp : auto : unqualify : vlan : 1500 : up : : : : : 168.1.1.1:1 1/5/0 100:1, 100:1, 19456/5/0,

: 19456/5/0, : GigabitEthernet1/0/0.1 : up : : : : : : 3.3.3.9 up 19458 19457 label 0x6002001,

5.9 Configuring the Sub-interface for VLAN Stacking to Access an L2VPN


Describes how to configure the L2VPN user network based on the sub-interface for VLAN stacking so that VLAN tags of users can be transparently transmitted in the ISP network. 5.9.1 Establishing the Configuration Task 5.9.2 Configuring the Interface Mode as the User Termination Mode 5.9.3 Configuring the Ethernet Sub-interface for VLAN Stacking 5.9.4 Configuring L2VPN
5-48 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

5.9.5 Checking the Configuration

5.9.1 Establishing the Configuration Task


Applicable Environment
The packet of the user that accesses the CE has one tag. The CE accesses the ISP network through PEs. It is required to configure an L2VPN on the PE for the sub-interface for VLAN stacking. In this way, the user VLAN tags can be transparently transmitted on the ISP network, and the user networks connected to the CEs can communicate.

Pre-configuration Tasks
Before configuring the sub-interface for VLAN stacking to access an L2VPN, complete the following tasks:
l l

Connecting devices correctly Configuring the VLAN of the CE and the basic Layer 2 forwarding function to make the packets sent from the CE to the PE carry one tag

Data Preparation
To configure the sub-interface for VLAN stacking to access an L2VPN, you need the following data. No. 1 2 3 4 Data Name of the PE interface connected to the CE The L2VC IDs of two PW ends (The two IDs must be the same) The MPLS LSR ID of each PE and P The IP address for the remote peer of the PE

5.9.2 Configuring the Interface Mode as the User Termination Mode


Context
Do as follows on the PE:

Procedure
Step 1 Run:
system-view

The system view is displayed.


Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-49

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Step 2 Run:
interface { gigabitethernet | eth-trunk } interface-number

The Ethernet interface view or the Eth-Trunk interface view is displayed. Step 3 Run:
mode user-termination

The mode of Ethernet interface is configured as the user-termination mode. When this command is run on the main interface, ensure that no sub-interface is configured under this main interface. ----End

5.9.3 Configuring the Ethernet Sub-interface for VLAN Stacking


Context
Do as follows on the PE:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { gigabitethernet | eth-trunk } interface-number.subinterface-number

The Ethernet sub-interface view or the Eth-Trunk sub-interface view is displayed. Step 3 (Optional) Create a user VLAN group. 1. 2. Step 4 Run: The outer VLAN tag is added to the user VLAN data in the specified range. The data is transparently transmitted in stacking mode. The user packet received by the Ethernet sub-interface can carry single tag or double tags. If the user packet carries no tag or the outer tag is different to the user tag, the Ethernet sub-interface discards this user packet. When the qinq stacking vid command is run on different Ethernet sub-interfaces, the ranges of ce-vid cannot overlap. ----End Run the vlan-group group-id command to create a user VLAN group. Run the quit command to return to the Ethernet sub-interface view or the Eth-Trunk subinterface view.

5.9.4 Configuring L2VPN


Configure L2VPN on the CE, PE, and P. For the detailed configuration, refer to the "VLL Configuration" in the Quidway NetEngine80E/40E Router Configuration Guide - VPN.
5-50 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

On a QinQ stacking sub-interface, various MPLS L2VPN connections can be set up, including the following:
l l l l l l

CCC local connection CCC remote connection SVC remote connection Kompella local connection Kompella remote connection Martini remote connection

5.9.5 Checking the Configuration


Run the following commands to check the previous configuration. Action Check information about the QinQ stacking sub-interface. Check information about the CCC connection. Check information about the CCC interface. Check information about the SVC L2VPN connection. Check information about the SVC interface in the Up or Down state. Check information about the Martini MPLS L2VPN connection. Check information about the remote Martini MPLS L2VPN connection on the PE. Check BGP information about the Kompella MPLS L2VPN. Check information about the Kompella MPLS L2VPN. Check information about the L2VPN on the PE. Command display qinq information stacking [ interface interface-type interface-number [.subinterfacenumber ] ] display ccc [ ccc-name | type { local | remote } ] display l2vpn ccc-interface vc-type ccc [ up | down ] display mpls static-l2vc [ interface interface-type interface-number ] display l2vpn ccc-interface vc-type static-vc { up | down } display mpls l2vc [ vc-id | interface interface-type interface-number ] display mpls l2vc remote-info [ vc-id ]

display bgp l2vpn { all | group [ group-name ] | peer [ [ ip-address ] verbose ] | route-distinguisher rd [ ce-id ce-id [ label-offset label-offset ] ] } display mpls l2vpn connection [ vpn-name [ remotece ce-offset | down | up | verbose ] | summary | interface interface-type interface-number ] display mpls l2vpn [ vpn-name [ local-ce | remotece ] ]

Run the display qinq information stacking interface command on the PE, and you can view detailed information about the QinQ stacking sub-interface. For example:
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-51

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

# Check information about the QinQ stacking sub-interface.


<Quidway> display qinq information stacking interface gigabitethernet 1/0/0 GigabitEthernet1/0/0.1 VLL/PWE3 bound Total QinQ Num: 2 qinq stacking vid 100 vlan-group 1 qinq stacking vid 200 vlan-group 1 Total vlan-group Num: 1 vlan-group 1

Run the display ccc command, and you can find that the CCC VC status is Up. For example:
<Quidway> display ccc total ccc vc : 1 local ccc vc : 1, 1 up remote ccc vc : 0, 0 up name: ce1-ce2, type: local, state: up, intf1: Pos1/0/0 (up), intf2: Pos2/0/0 (up) <Quidway> display ccc total ccc vc : 1 local ccc vc : 0, 0 up remote ccc vc : 1, 1 up name: ce2-ce1, type: remote, state: up, intf: Pos2/0/0 (up), in-label: 201 , out-label: 101 , out-interface : Pos1/0/0

Run the display l2vpn ccc-interface vc-type ccc command, and you can find that the VC type is CCC, and the CCC status is Up. For example:
<Quidway> display l2vpn ccc-interface vc-type all Total ccc-interface of CCC VC: 1 up (1), down (0) Interface Encap Type State VC Type Pos1/0/0 ppp up CCC

Run the display mpls static-l2vc command, and you can find that the VC status is Up. For example:
<Quidway> display mpls Total svc connections: *Client Interface AC Status VC State VC ID VC Type Destination Transmit VC Label Receive VC Label Control Word VCCV Capability Tunnel Policy Name Traffic Behavior PW Template Name Create time UP time Last change time static-l2vc 1, 1 up, 0 down : Pos1/0/0 is up : up : up : 0 : ppp : 3.3.3.9 : 100 : 200 : Disable : Disable : -: -: -: 0 days, 0 hours, 1 minutes, 38 seconds : 0 days, 0 hours, 1 minutes, 11 seconds : 0 days, 0 hours, 1 minutes, 11 seconds

Run the display l2vpn ccc-interface vc-type static-l2vc up command, and you can find that the VC type is SVC, and the SVC status is Up. For example:
<Quidway> display l2vpn ccc-interface vc-type all Total ccc-interface of CCC VC: 1 up (1), down (0) Interface Encap Type State VC Type Pos1/0/0 ppp up SVC

Run the display mpls l2vc command, and you can find that "Destination" is the peer address of the specified VC, and "VC State" is "up". For example:
5-52 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
<Quidway> display mpls l2vc Total ldp vc : 1 1 up 0 down *Client Interface : GigabitEthernet1/0/0.1 Session State : up AC Status : up VC State : up VC ID : 101 VC Type : vlan Destination : 3.3.3.9 Local VC Label : 1025 Remote VC Label : 1024 Control Word : Disable Local VC MTU : 1500 Remote VC MTU : 1500 Tunnel Policy Name : -Traffic Behavior Name: -PW Template Name : -Create time : 0 days, 0 hours, 3 minutes, 14 seconds UP time : 0 days, 0 hours, 1 minutes, 48 seconds Last change time : 0 days, 0 hours, 1 minutes, 48 seconds

5 QinQ Configuration

Run the display mpls l2vc remote-info command, and you can find that "Destination" is the peer address of the specified VC. For example:
<Quidway> display mpls l2vc remote-info Total remote ldp vc : 1 Transport Group Peer Remote VC ID ID Addr Encap 100 0 3.3.3.9 vlan

Remote VC Label 17408

MTU/ N S Bit CELLS Bit Bit 0 1500 1 0

Run the display bgp l2vpn command, and you can find "Destination" is the peer address of the VC, "route-distinguisher" of the L2VPN is correctly configured, and the label is assigned to the peer device. For example:
<Quidway> display bgp l2vpn all BGP Local router ID : 2.2.2.9, local AS number : 100 Origin codes:i - IGP, e - EGP, ? - incomplete bgp.l2vpn: 1 destination Route Distinguisher: 100:1 CE ID Label Offset Label Base nexthop pref 4 0 132096 3.3.3.9 100

as-path

Run the display mpls l2vpn connection command, and you can find "VPN name" is correctly configured, the connection status is Up, and "route-distinguisher" is correctly configured. For example:
[Quidway] display mpls l2vpn connection 1 total connections, connections: 1 up, 0 down, 0 local, 1 remote, 0 unknown VPN name: vpn1, 1 total connections, connections: 1 up, 0 down, 0 local, 1 remote, 0 unknown CE name: ce1, id: 1, Rid type status peer-id route-distinguisher intf 2 rmt up 3.3.3.9 100:1 Pos1/0/0

Run the display mpls l2vpn command on the PE, and you can view the detailed configurations of the L2VPN. For example: # Check the configurations of all the L2VPNs on the PE.
<Quidway> display mpls l2vpn VPN number: 1 vpn-name encap-type route-distinguisher vpn1 ppp 100:1

mtu

ce(L) ce(R) 128 1 1

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-53

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5.10 Configuring the Sub-interface for VLAN Stacking to Access a VPLS


Describes how to configure the VPLS user network based on the sub-interface for VLAN stacking so that VLAN tags of users can be transparently transmitted in the ISP network. 5.10.1 Establishing the Configuration Task 5.10.2 Configuring the Interface Mode as the User Termination Mode 5.10.3 Configuring the Ethernet Sub-interface for VLAN Stacking 5.10.4 Configuring VPLS 5.10.5 Checking the Configuration

5.10.1 Establishing the Configuration Task


Applicable Environment
The packet of the user that accesses the CE has one tag. CE accesses the ISP network through PE. You are required to configure the VPLS user network based on the sub-interface for QinQ stacking on the PE. In this way, the packets with VLAN tags can be transparently transmitted through the ISP network, and the user networks between the CEs can communicate.

Pre-configuration Tasks
Before configuring the sub-interface for VLAN stacking to access VPLS, complete the following tasks:
l l

Connecting devices correctly Configuring the VLAN of the CE and the basic Layer 2 forwarding function to make the packets sent from the CE to the PE carry one tag

Data Preparation
To configure the sub-interface for VLAN stacking to access VPLS, you need the following data. No. 1 2 3 4 5
5-54

Data Name of PE interface connected to the CE IP address of the interface The L2VC IDs of two PW ends (The two IDs must be the same) MPLS LSR ID of each PE and P The names of VSI on PE1, PE2 and PE3
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

No. 6

Data The bound VSI interface

5.10.2 Configuring the Interface Mode as the User Termination Mode


Context
Do as follows on the PE:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { gigabitethernet| eth-trunk } interface-number

The Ethernet interface view or the Eth-Trunk interface view is displayed. Step 3 Run:
mode user-termination

The mode of the Ethernet interface is configured as user-termination mode. When this command is run on the main interface, ensure that no sub-interface is configured under this main interface. ----End

5.10.3 Configuring the Ethernet Sub-interface for VLAN Stacking


Context
Do as follows on the PE:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { gigabitethernet | eth-trunk } interface-number.subinterface-number

The Ethernet sub-interface view or the Eth-Trunk sub-interface view is displayed.


Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-55

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Step 3 (Optional) Create a user VLAN group. 1. 2. Step 4 Run:


qinq stacking vid low-ce-vid [ to high-ce-vid ] [vlan-group group-id]

Run the vlan-group group-id command to create a user VLAN group. Run the quit command to return to the Ethernet sub-interface view or the Eth-Trunk subinterface view.

Another layer outer VLAN tag is added to the user VLAN data in the specified range. The data is transparently transmitted in stacking mode. The user packet received by the Ethernet sub-interface can carry single tag or double tags. If the user packet carries no tag or the outer tag is different to the user tag, the Ethernet sub-interface discards this user packet. When the qinq stacking vid command is run on different Ethernet sub-interfaces, the ranges of ce-vid cannot overlap. ----End

5.10.4 Configuring VPLS


Configure VPLS on the CE, PE, and P. For the detailed configurations, refer to the "VPLS Configuration" in the Quidway NetEngine80E/40E Router Configuration Guide - VPN. You can configure either a Martini VPLS or a Kompella VPLS.

5.10.5 Checking the Configuration


Run the following commands to check the previous configuration. Action Check information on VLAN stacking interface. Check the VSI instances of VPLS. Command display qinq information stacking [ interface interfacetype interface-number [.subinterface-number ] ] display vsi vsi-name [ verbose ]

Run the display qinq information stacking interface command on PE. The details about the sub-interface for VLAN stacking are displayed. For example: # Display information on the sub-interface for VLAN stacking.
<Quidway> display qinq information stacking interface gigabitethernet 1/0/0 GigabitEthernet1/0/0.1 VSI bound Total QinQ Num: 2 qinq stacking vid 100 vlan-group 1 qinq stacking vid 200 vlan-group 1 Total vlan-group Num: 1 vlan-group 1

Run the display vsi vsi-name [ verbose ] command. From the display, you can see that the "VSI State" item is "up". If you choose the parameter verbose, the "Signaling" item is " PW Signaling ", and the "PW State" item is "up". For example:
5-56 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
<Quidway> display vsi bgp1 *** VSI Name VSI Index PW Signaling Member Discovery Style PW MAC Learn Style Encapulation Type MTU VSI State BGP RD SiteID/Range/Offset Import vpn target Export vpn target Remote Label Block Local Label Block Interface Name State *Peer Ip Address PW State Local VC Label Remote VC Label PW Type Tunnel ID verbose : bgp1 : 0 : bgp : auto : unqualify : vlan : 1500 : up : : : : : 168.1.1.1:1 1/5/0 100:1, 100:1, 19456/5/0,

5 QinQ Configuration

: 19456/5/0, : GigabitEthernet1/0/0.1 : up : : : : : : 3.3.3.9 up 19458 19457 label 0x6002001,

5.11 Configuring the Sub-interface for QinQ VLAN Tag Termination to Support URPF
Describes how to configure the sub-interface for QinQ VLAN tag termination to support URPF. 5.11.1 Establishing the Configuration Task 5.11.2 Configuring the Ethernet Interface of the PE 5.11.3 Configuring the Ethernet Sub-interface of the PE 5.11.4 Configuring URPF on the Sub-interface for QinQ VLAN Tag Termination 5.11.5 Checking the Configuration

5.11.1 Establishing the Configuration Task


Applicable Environment
On the ISP network, a router may receive the packet with the spoofing source address. In this case, you need to configure URPF on the relevant interface to avoid the attacks based on the source address spoofing. When a router receives a packet with double tags, you need to apply URPF on the sub-interface for QinQ VLAN tag termination.

Pre-configuration Tasks
Before configuring the sub-interface for QinQ VLAN tag termination to support URPF, complete the following tasks:
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-57

5 QinQ Configuration
l l l

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Configuring the physical parameters of the interface Configuring the link protocol of the interface Assigning the IP address to the interface

Data Preparation
To configure the sub-interface for QinQ VLAN tag termination to support URPF, you need the following data. No. 1 2 Data The number of QinQ interface which to be configured with URPF Termination range of the sub-interface for QinQ VLAN tag termination

5.11.2 Configuring the Ethernet Interface of the PE


Context
Do as follows on the PE.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { gigabitethernet | eth-trunk } interface-number

The Ethernet interface view is displayed. Step 3 Run:


mode user-termination

The mode of the Ethernet interface is configured as user-termination mode. ----End

5.11.3 Configuring the Ethernet Sub-interface of the PE


Context
Do as follows on the PE.

Procedure
Step 1 Run:
system-view

5-58

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

The system view is displayed. Step 2 Run:


interface { gigabitethernet | eth-trunk } interface-number.subinterface-number

The Ethernet sub-interface view is displayed. Step 3 Run:


control-vid vid qinq-termination [ local-switch | [ rt-protocol | flexible ] * ]

The VLAN ID of the sub-interface for VLAN tag termination is set to terminate the user packets with double tags. Step 4 Run:
qinq termination pe-vid pe-vid ce-vid low-ce-vid [ to high-ce-vid ]

The VLAN tag termination function is configured for the sub-interface. ----End

5.11.4 Configuring URPF on the Sub-interface for QinQ VLAN Tag Termination
Context
Do as follows on the PE.

Procedure
Step 1 Run:
system view

The system view is displayed. Step 2 Run:


interface { gigabitethernet | eth-trunk } interface-number.subinterface-number

The sub-interface for QinQ VLAN tag termination view is displayed. Step 3 Run:
ip urpf loose [ allow-default ]

URPF is enabled. That is, the IP address must be in the FIB but the interface may not be matched. ----End

5.11.5 Checking the Configuration


Run the following commands to check the previous configuration. Action Display the information of QinQ termination Command display qinq information termination [ interface interface-type interface-number [.subinterfacenumber ] ]
5-59

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Run the display qinq information termination command on PE. The details about the subinterface for QinQ termination are displayed. For example: # Display the information on the sub-interface for QinQ termination.
<Quidway> display qinq information termination interface gigabitethernet 1/0/0 GigabitEthernet1/0/0.1 Total QINQ Num: 1 qinq termination pe-vid 10 ce-vid 100 Total vlan-group Num: 0 control-vid 1 qinq-termination

5.12 Maintaining QinQ


Describes how to clear the statistics of QinQ or debug QinQ. 5.12.1 Clearing QinQ Statistics 5.12.2 Monitoring the Operating Status of the Termination Sub-interface 5.12.3 Debugging QinQ

5.12.1 Clearing QinQ Statistics


To clear the QinQ statistics, run the following reset command in the user view. Action Clear the QinQ statistics. Command reset qinq statistic interface sub-interface name vlangroup group-id

5.12.2 Monitoring the Operating Status of the Termination Subinterface


In routine maintenance, run the following commands in any view to display the operating status of the termination sub-interface. Action Check information about the sub-interface dot1q termination. Check information about the QinQ termination. Check information about the sub-interface QinQ Stacking.
5-60

Command display dot1q information termination [ interface interface-type interface-number [.subinterface-number ] ] display qinq information termination [ interface interfacetype interface-number [.subinterface-number ] ] display qinq information stacking [ interface interface-type interface-number [.subinterface-number ] ]

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

5.12.3 Debugging QinQ

CAUTION
Debugging affects the performance of the system. So, after debugging, run the undo debugging all command to disable it immediately. When a fault occurs, run the following debugging command in the user view to locate the fault. For the procedure of displaying the debugging information, refer to the chapter "Maintenance and Debugging" in the Quidway NetEngine80E/40E Router Configuration Guide - System Management. Action Enable QinQ debugging. Command debugging qinq { all | error | event | message | packet [ interface interface-type interface-number [ vid vid [ cevid cevid ] ] ]}

5.13 Configuration Examples


Provides several examples of QinQ networking. 5.13.1 Example for Configuring the QinQ Tunnel 5.13.2 Example for Configuring Selective QinQ on a Layer 2 Interface 5.13.3 Example for Configuring Compatibility of the EType Field in the Outer Tag of QinQ Packets 5.13.4 Example for Configuring the Sub-interface for dot1q VLAN Tag Termination to Support Proxy ARP 5.13.5 Example for Configuring the Sub-interface for QinQ VLAN Tag Termination to Support Proxy ARP 5.13.6 Example for Configuring the Sub-interface for dot1q VLAN Tag Termination to Support VRRP 5.13.7 Example for Configuring the Sub-interface for QinQ VLAN Tag Termination to Support VRRP 5.13.8 Example for Configuring the Sub-interface for dotlq VLAN Tag Termination and QinQ VLAN Tag Termination to Access an L3VPN 5.13.9 Example for Configuring the Sub-interface for QinQ VLAN Tag Termination to Access a VLL
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-61

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5.13.10 Example for Configuring the Sub-interface for dot1q VLAN Tag Termination and QinQ VLAN Tag Termination to Access a VPLS 5.13.11 Example for Configuring the Sub-interface for QinQ VLAN Tag Termination to Access a VPLS 5.13.12 Example for Configuring a QinQ Termination Sub-interface to Support the Local Connection 5.13.13 Example for Configuring the Sub-interface for dot1q VLAN Tag Termination to Support the DHCP Relay 5.13.14 Example for Configuring the Sub-interface for QinQ VLAN Tag Termination to Support the DHCP Relay 5.13.15 Example for Configuring Dynamic QinQ 5.13.16 Example for Configuring the Sub-interface for VLAN Stacking to Access an L2VPN 5.13.17 Example for Configuring the Sub-interface for QinQ VLAN Stacking to Access a VPLS 5.13.18 Example for Configuring the Sub-interface for QinQ VLAN Tag Termination to Support URPF

5.13.1 Example for Configuring the QinQ Tunnel


Networking Requirements
In the network as shown in Figure 5-20, enterprise 1 has two offices and enterprise 2 has three offices; offices of enterprise 1 and enterprise 2 connect to Router A and Router B in the operator network respectively. Enterprise 1 and enterprise 2 can partition their own VLANs as desired. It is required to configure the QinQ tunnel on Router A and Router B. Thus, office networks in enterprise 1 or enterprise 2 can interwork but office networks between enterprise 1 and enterprise 2 cannot interwork.

5-62

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

Figure 5-20 Typical networking diagram of the QinQ tunnel

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Configure the default outer VLAN tag. Configure QinQ for a Layer 2 interface. Configure the interfaces disabled with QinQ and allow the packets carrying the specific outer tags to pass through the interface.

Data Preparation
To complete the configuration, you need the following data:
l l

Number of the interface connecting to enterprise 1 and enterprise 2 Default VLAN ID of the QinQ interface connecting to enterprise 1 and enterprise 2

Configuration Procedure
1. Create the default outer VLAN tag for a Layer 2 interface. # Configure Router A.
<Quidway> system-view [Quidway] sysname RouterA [RouterA] vlan batch 10 20

# Configure Router B.
<Quidway> system-view [Quidway] sysname RouterB

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-63

5 QinQ Configuration
[RouterB] vlan batch 20

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

2.

Configure QinQ for a Layer 2 interface. # Configure Router A.


[RouterA] interface gigabitethernet 1/0/1 [RouterA-GigabitEthernet1/0/1] portswitch [RouterA-GigabitEthernet1/0/1] port link-type dot1q-tunnel [RouterA-GigabitEthernet1/0/1] port default vlan 10 [RouterA-GigabitEthernet1/0/1] undo shutdown [RouterA-GigabitEthernet1/0/1] quit [RouterA] interface gigabitethernet 2/0/1 [RouterA-GigabitEthernet2/0/1] portswitch [RouterA-GigabitEthernet2/0/1] port link-type dot1q-tunnel [RouterA-GigabitEthernet2/0/1] port default vlan 20 [RouterA-GigabitEthernet2/0/1] undo shutdown [RouterA-GigabitEthernet2/0/1] quit [RouterA] interface gigabitethernet 3/0/1 [RouterA-GigabitEthernet3/0/1] portswitch [RouterA-GigabitEthernet3/0/1] port link-type dot1q-tunnel [RouterA-GigabitEthernet3/0/1] port default vlan 10 [RouterA-GigabitEthernet3/0/1] undo shutdown [RouterA-GigabitEthernet3/0/1] quit

# Configure Router B.
[RouterB] interface gigabitethernet 1/0/1 [RouterB-GigabitEthernet1/0/1] portswitch [RouterB-GigabitEthernet1/0/1] port link-type dot1q-tunnel [RouterB-GigabitEthernet1/0/1] port default vlan 20 [RouterB-GigabitEthernet1/0/1] undo shutdown [RouterB-GigabitEthernet1/0/1] quit [RouterB] interface gigabitethernet 2/0/1 [RouterB-GigabitEthernet2/0/1] portswitch [RouterB-GigabitEthernet2/0/1] port link-type dot1q-tunnel [RouterB-GigabitEthernet2/0/1] port default vlan 20 [RouterB-GigabitEthernet2/0/1] undo shutdown [RouterB-GigabitEthernet2/0/1] quit

3.

Configure other interfaces. # Allow the packets in VLAN 20 to pass through GE 4/0/1 on Router A.
[RouterA] interface gigabitethernet 4/0/1 [RouterA-GigabitEthernet4/0/1] portswitch [RouterA-GigabitEthernet4/0/1] port trunk allow-pass vlan 20 [RouterA-GigabitEthernet4/0/1] undo shutdown [RouterA-GigabitEthernet4/0/1] quit

# Allow the packets in VLAN 20 to pass through GE 3/0/1 on Router B.


[RouterB] interface gigabitethernet 3/0/1 [RouterB-GigabitEthernet3/0/1] portswich [RouterB-GigabitEthernet3/0/1] port trunk allow-pass vlan 20 [RouterB-GigabitEthernet3/0/1] undo shutdown [RouterB-GigabitEthernet3/0/1] quit

4.

Verify the configuration. Hosts in different offices but the same VLAN can ping through each other in enterprise 1. Hosts in different offices but the same VLAN can ping through each other in enterprise 2. Any host in enterprise 1 and enterprise 2 cannot ping through each other.

Configuration Files
l

Configuration file of Router A


# sysname RouterA # vlan batch 10 20 #

5-64

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
interface GigabitEthernet1/0/1 undo shutdown portswitch port link-type dot1q-tunnel port default vlan 10 # interface GigabitEthernet2/0/1 undo shutdown portswitch port link-type dot1q-tunnel port default vlan 20 # interface GigabitEthernet3/0/1 undo shutdown portswitch port link-type dot1q-tunnel port default vlan 10 # interface GigabitEthernet4/0/1 undo shutdown portswitch port trunk allow-pass vlan 20 # return l

5 QinQ Configuration

Configuration file of Router B


# sysname RouterB # vlan batch 20 # interface GigabitEthernet1/0/1 undo shutdown portswitch port link-type dot1q-tunnel port default vlan 20 # interface GigabitEthernet2/0/1 undo shutdown portswitch port link-type dot1q-tunnel port default vlan 20 # interface GigabitEthernet3/0/1 undo shutdown portswitch port trunk allow-pass vlan 20 # return

5.13.2 Example for Configuring Selective QinQ on a Layer 2 Interface


Networking Requirements
As shown in Figure 5-21, enterprise 1 and enterprise 2 have many offices.
l l l

VLAN 2 through VLAN 1500 are used in the network of enterprise 1. VLAN 500 through VLAN 4094 are used in the network of enterprise 2. GE 1/0/1 on Router A receives the packets from different VLANs of enterprise 1 and enterprise 2 simultaneously.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-65

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

It is required to configure Layer 2 selective QinQ on GE 1/0/1 of Router A. Thus, office networks in enterprise 1 or enterprise 2 can interwork but office networks between enterprise 1 and enterprise 2 cannot interwork. Figure 5-21 Typical networking diagram of Layer 2 selective QinQ

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Configure the default outer VLAN tag. Configure selective QinQ for a Layer 2 interface. Configure the interfaces disabled with QinQ and allow the packets carrying the specific outer tags to pass through the interface.

Data Preparation
To complete the configuration, you need the following data:
l l

Number of the interface connecting to enterprise 1 and enterprise 2 Outer tags attached to the packets of different enterprises on Layer 2 interfaces of Router A and Router B
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

5-66

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

Configuration Procedure
1. Create the default outer VLAN tag for a Layer 2 interface. # Configure Router A.
<Quidway> system-view [Quidway] sysname RouterA [RouterA] vlan batch 10 20

# Configure Router B.
<Quidway> system-view [Quidway] sysname RouterB [RouterB] vlan batch 20

2.

Configure selective QinQ for a Layer 2 interface. # Configure Router A.


[RouterA] interface gigabitethernet 1/0/1 [RouterA-GigabitEthernet1/0/1] portswitch [RouterA-GigabitEthernet1/0/1] port vlan-stacking outside-vlan 2 to 500 stackvlan 10 [RouterA-GigabitEthernet1/0/1] port vlan-stacking outside-vlan 1000 to 2000 stack-vlan 20 [RouterA-GigabitEthernet1/0/1] undo shutdown [RouterA-GigabitEthernet1/0/1] quit [RouterA] interface gigabitethernet 2/0/1 [RouterA-GigabitEthernet2/0/1] portswitch [RouterA-GigabitEthernet2/0/1] port vlan-stacking outside-vlan 100 to 1500 stack-vlan 10 [RouterA-GigabitEthernet2/0/1] undo shutdown [RouterA-GigabitEthernet2/0/1] quit

# Configure Router B.
[RouterB] interface gigabitethernet 1/0/1 [RouterB-GigabitEthernet1/0/1] portswitch [RouterB-GigabitEthernet1/0/1] port vlan-stacking outside-vlan 1000 to 4094 stack-vlan 20 [RouterB-GigabitEthernet1/0/1] undo shutdown [RouterB-GigabitEthernet1/0/1] quit [RouterB] interface gigabitethernet 2/0/1 [RouterB-GigabitEthernet2/0/1] portswitch [RouterB-GigabitEthernet2/0/1] port vlan-stacking outside-vlan 500 to 2500 stack-vlan 20 [RouterB-GigabitEthernet2/0/1] undo shutdown [RouterB-GigabitEthernet2/0/1] quit

3.

Configure other interfaces. # Allow the packets of VLAN 20 to pass through GE 3/0/1 on Router A.
[RouterA] interface gigabitethernet 3/0/1 [RouterA-GigabitEthernet3/0/1] portswitch [RouterA-GigabitEthernet3/0/1] port trunk allow-pass vlan 20 [RouterA-GigabitEthernet3/0/1] undo shutdown [RouterA-GigabitEthernet3/0/1] quit

# Allow the packets in VLAN 20 to pass through GE 3/0/1 on Router B.


[RouterB] interface gigabitethernet 3/0/1 [RouterB-GigabitEthernet3/0/1] portswich [RouterB-GigabitEthernet3/0/1] port trunk allow-pass vlan 20 [RouterB-GigabitEthernet3/0/1] undo shutdown [RouterB-GigabitEthernet3/0/1] quit

4.

Verify the configuration. Hosts in different offices but the same VLAN can ping through each other in enterprise 1. Hosts in different offices but the same VLAN can ping through each other in enterprise 2. Any host in enterprise 1 and enterprise 2 cannot ping through each other.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-67

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Configuration Files
l

Configuration file of Router A


# sysname RouterA # vlan batch 10 20 # interface GigabitEthernet1/0/1 undo shutdown portswitch port vlan-stacking outside-vlan 2 to 500 stack-vlan 10 port vlan-stacking outside-vlan 1000 to 2000 stack-vlan 20 # interface GigabitEthernet2/0/1 undo shutdown portswitch port vlan-stacking outside-vlan 100 to 1500 stack-vlan 10 # interface GigabitEthernet3/0/1 undo shutdown portswitch port trunk allow-pass vlan 20 # return

Router B
# sysname RouterB # vlan batch 20 # interface GigabitEthernet1/0/1 undo shutdown portswitch port vlan-stacking outside-vlan 1000 to 4094 stack-vlan 20 # interface GigabitEthernet2/0/1 undo shutdown portswitch port vlan-stacking outside-vlan 500 to 2500 stack-vlan 20 # interface GigabitEthernet3/0/1 undo shutdown portswitch port trunk allow-pass vlan 20 # return

5.13.3 Example for Configuring Compatibility of the EType Field in the Outer Tag of QinQ Packets
Networking Requirements
Router B is Huawei data communications equipment. Router A and Router C are the devices of other vendors. Switch A is the switch of other vendors. Figure 5-22 shows the networking diagram and the EType value in the outer tag of QinQ packets. Devices of different vendors can interoperate by setting the EType value in the outer tag of the interface on Router B.

5-68

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

Figure 5-22 Networking diagram of configuring the compatibility of the EType field in the outer tag of QinQ packets

Device Name Router A Router B

EType Value in the Outer Tag 0x9100 0x8100

Device Name Router C Switch A

EType Value in the Outer Tag 0x8100 0x9100

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. Switch Layer 3 interfaces into Layer 2 interfaces. Configure the compatibility of the EType field in the outer tag of QinQ packets on the Layer 2 interface of the device in the demand for interoperation.

Data Preparation
To complete the configuration, you need the following data:
l l

EType encapsulation value in the outer tag of the device of other vendors Name of the physical interface through which Router B connects to the devices of other vendors

Configuration Procedure
1. Switch the interface connecting to the devices of other vendors into a Layer 2 interface.
<Quidway> system-view [Quidway] sysname RouterB [RouterB] interface gigabitethernet 1/0/0 [RouterB-GigabitEthernet1/0/0] portswitch [RouterB-GigabitEthernet1/0/0] undo shutdown [RouterB-GigabitEthernet1/0/0] quit [RouterB] interface gigabitethernet 2/0/0 [RouterB-GigabitEthernet2/0/0] portswitch [RouterB-GigabitEthernet2/0/0] undo shutdown [RouterB-GigabitEthernet2/0/0] quit

2.

Configure the EType encapsulation value of the outer tag on the physical interface through which Router B connects to the devices of other vendors.
<Quidway> system-view [RouterB] interface gigabitethernet 1/0/0 [RouterB-GigabitEthernet1/0/0] qinq protocol 9100 [RouterB-GigabitEthernet1/0/0] undo shutdown [RouterB-GigabitEthernet1/0/0] quit

3.

Verify the configuration. After the previous configurations, running the display this command on GE 1/0/0 of Router B, you can view the configuration of this command; running the display bpdu-tunnel interface config command, you can view the configuration of TPID.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-69

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[RouterB-GigabitEthernet1/0/0] display bpdu-tunnel interface config BpduDot1qStatus disable BpduOneQStatus disable BpduTwoQStatus disable EtherType 9100 Dot1qVlan TwoQList

Configuration Files
Configuration file of Router B
# sysname RouterB # interface GigabitEthernet 1/0/0 undo shutdown qinq protocol 9100 portswitch # interface GigabitEthernet 2/0/0 undo shutdown portswitch # return

5.13.4 Example for Configuring the Sub-interface for dot1q VLAN Tag Termination to Support Proxy ARP
Network Requirements
As shown in Figure 5-23, Router 1 is connected to Router 2 through an Ethernet sub-interface. Router 2 is connected with PC 1 and PC 2. PC 1 and PC 2 are in the same network segments but belong to different VLANs. Default gateways are not configured on PC 1 and PC 2. In this case, configure proxy ARP on the sub-interface GE 1/0/0.1 on Router 1 to implement intercommunication between PC 1 and PC 2. Figure 5-23 Typical networking diagram of configuring the sub-interface for dot1q VLAN tag termination to support proxy ARP

5-70

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Switch the Layer 3 interface of Router 2 into a Layer 2 interface. Configure the basic Layer 2 forwarding function for Router 2. Configure a dot1q termination sub-interface for Router 1 and enable ARP proxy.

Data Preparation
To complete the configuration, you need the following data:
l l

Name of the sub-interface for dot1q VLAN tag termination VLAN IDs of the interfaces on Router 2

Configuration Procedure
1. Switch the interface to a Layer 2 interface. # Configure Router 2.
<Quidway> system-view [Quidway] sysname Router2 [Router2] interface gigabitethernet 1/0/0 [Router2-GigabitEthernet1/0/0] portswitch [Router2-GigabitEthernet1/0/0] quit [Router2] interface gigabitethernet 1/0/1 [Router2-GigabitEthernet1/0/1] portswitch [Router2-GigabitEthernet1/0/1] quit [Router2] interface gigabitethernet 1/0/2 [Router2-GigabitEthernet1/0/2] portswitch [Router2-GigabitEthernet1/0/2] quit
NOTE

If the interface is already a Layer 2 interface, the preceding operation is not required.

2.

Configure the basic Layer 2 forwarding function. # Configure Router 2.


<Router2> system-view [Router2] vlan 10 [Router2-vlan10] port gigabitethernet 1/0/0 [Router2-vlan10] quit [Router2] vlan 20 [Router2-vlan20] port gigabitethernet 1/0/1 [Router2-vlan20] quit [Router2] interface gigabitethernet 1/0/2 [Router2-GigabitEthernet1/0/2] port trunk allow-pass vlan 10 20 [Router2-GigabitEthernet1/0/2] quit

3.

Configure the sub-interface for dot1q VLAN tag termination and enable proxy ARP on the sub-interface. # Configure Router 1.
<Quidway> system-view [Quidway] sysname Router1 [Router1] interface gigabitethernet 1/0/0 [Router1-GigabitEthernet1/0/0] mode user-termination [Router1-GigabitEthernet1/0/0] quit [Router1] interface gigabitethernet 1/0/0.1 [Router1-GigabitEthernet1/0/0.1] control-vid 1 dot1q-termination [Router1-GigabitEthernet1/0/0.1] dot1q termination vid 10 [Router1-GigabitEthernet1/0/0.1] dot1q termination vid 20 [Router1-GigabitEthernet1/0/0.1] ip address 10.1.1.254 24

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-71

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[Router1-GigabitEthernet1/0/0.1] arp-proxy inter-sub-vlan-proxy enable [Router1-GigabitEthernet1/0/0.1] arp broadcast enable

4.

Verify the configuration. Ping PC 2 from PC 1. The ping succeeds. If viewing the ARP table on PC 1, you can find that the MAC address corresponding to PC 2 is the MAC address of GE 1/0/0 on Router 1.

Configuration Files
l

Configuration file of Router 1


# sysname Router1 # interface GigabitEthernet1/0/0 undo shutdown mode user-termination # interface GigabitEthernet1/0/0.1 undo shutdown control-vid 1 dot1q-termination dot1q termination vid 10 dot1q termination vid 20 ip address 10.1.1.254 255.255.255.0 arp-proxy inter-sub-vlan-proxy enable arp broadcast enable # return

Configuration file of Router 2


# sysname Router2 # vlan batch 10 20 # interface GigabitEthernet1/0/0 undo shutdown portswitch port default vlan 10 # interface GigabitEthernet1/0/1 undo shutdown portswitch port default vlan 20 # interface GigabitEthernet1/0/2 undo shutdown portswitch port trunk allow-pass vlan 10 20 # return

5.13.5 Example for Configuring the Sub-interface for QinQ VLAN Tag Termination to Support Proxy ARP
Network Requirements
As shown in Figure 5-24, Router 1 is connected to Router 2 through a sub-interface. Router 2 is connected with PC 1 and PC 2 respectively through Router 3 and Router 4. PC 1 and PC 2 are in the same network segments but belong to different VLANs. Configure QinQ on the convergent device Router 2, with the outer tag as 100. The packet sent from Router 2 to Router 1 then carries double tags. Default gateways are not configured on PC 1 and PC 2. In this case,
5-72 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

configure proxy ARP on the sub-interface GE 1/0/0.1 on Router 1 to implement intercommunication between PC 1 and PC 2. Figure 5-24 Typical networking diagram of configuring the sub-interface for QinQ VLAN tag termination to support proxy ARP

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. Configure the sub-interface for QinQ VLAN tag termination on Router 1. Enable proxy ARP on GE 1/0/0.1. Configure QinQ on Router 2. Configure the basic Layer 2 forwarding function on Router 2, Router 3, and Router 4.

Data Preparation
To complete the configuration, you need the following data:
l l l

Name of the sub-interface for QinQ VLAN tag termination Outer tag value of the packet sent from Router 2 to Router 1 VLAN IDs of the interfaces on Router 2

Configuration Procedure
1. Switch the interface to a Layer 2 interface. # Configure Router 2.
<Quidway> system-view [Quidway] sysname Router2 [Router2] interface gigabitethernet 1/0/0 [Router2-GigabitEthernet1/0/0] portswitch [Router2-GigabitEthernet1/0/0] quit [Router2] interface gigabitethernet 1/0/1 [Router2-GigabitEthernet1/0/1] portswitch [Router2-GigabitEthernet1/0/1] quit [Router2] interface gigabitethernet 1/0/2

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-73

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[Router2-GigabitEthernet1/0/2] portswitch [Router2-GigabitEthernet1/0/2] quit

# Configure Router 3.
<Quidway> system-view [Quidway] sysname Router3 [Router3] interface gigabitethernet 1/0/0 [Router3-GigabitEthernet1/0/0] portswitch [Router3-GigabitEthernet1/0/0] quit [Router3] interface gigabitethernet 1/0/1 [Router3-GigabitEthernet1/0/1] portswitch [Router3-GigabitEthernet1/0/1] quit

# Configure Router 4.
<Quidway> system-view [Quidway] sysname Router4 [Router4] interface gigabitethernet 1/0/0 [Router4-GigabitEthernet1/0/0] portswitch [Router4-GigabitEthernet1/0/0] quit [Router4] interface gigabitethernet 1/0/1 [Router4-GigabitEthernet1/0/1] portswitch [Router4-GigabitEthernet1/0/1] quit
NOTE

If the interface is already a Layer 2 interface, the preceding operation is not required.

2.

Configure the basic Layer 2 forwarding function. # Configure Router 3.


<Router3> system-view [Router3] vlan 10 [Router3-vlan10] port gigabitethernet 1/0/0 [Router3-vlan10] quit [Router3] interface gigabitethernet 1/0/1 [Router3-GigabitEthernet1/0/1] port trunk allow-pass vlan 10 [Router3-GigabitEthernet1/0/1] quit

# Configure Router 4.
<Router4> system-view [Router4] vlan 20 [Router4-vlan20] port gigabitethernet 1/0/0 [Router4-vlan20] quit [Router4] interface gigabitethernet 1/0/1 [Router4-GigabitEthernet1/0/1] port trunk allow-pass vlan 20 [Router4-GigabitEthernet1/0/1] quit

3.

Configure QinQ on Router 2 and set the packet sent from Router 2 to Router 1 to carry double VLAN tags. # Configure Router 2.
<Router2> system-view [Router2] vlan 100 [Router2-vlan100] quit [Router2] interface gigabitethernet [Router2-GigabitEthernet1/0/0] port 100 [Router2-GigabitEthernet1/0/0] quit [Router2] interface gigabitethernet [Router2-GigabitEthernet1/0/1] port 100 [Router2-GigabitEthernet1/0/1] quit [Router2] interface gigabitethernet [Router2-GigabitEthernet1/0/2] port [Router2-GigabitEthernet1/0/2] quit
NOTE

1/0/0 vlan-stacking outside-vlan 10 stack-vlan 1/0/1 vlan-stacking outside-vlan 20 stack-vlan 1/0/2 trunk allow-pass vlan 100

If the device does not support the port vlan-stacking command, you can run the commands port link-type dot1q-tunnel and port default vlan on the interface to configure QinQ.

5-74

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

4.

Configure the sub-interface for QinQ VLAN tag termination and enable proxy ARP on the sub-interface. # Configure Router 1.
<Quidway> system-view [Quidway] sysname Router1 [Router1] interface gigabitethernet 1/0/0 [Router1-GigabitEthernet1/0/0] mode user-termination [Router1-GigabitEthernet1/0/0] quit [Router1] interface gigabitethernet 1/0/0.1 [Router1-GigabitEthernet1/0/0.1] control-vid 1 qinq-termination [Router1-GigabitEthernet1/0/0.1] qinq termination pe-vid 100 ce-vid 10 [Router1-GigabitEthernet1/0/0.1] qinq termination pe-vid 100 ce-vid 20 [Router1-GigabitEthernet1/0/0.1] ip address 10.1.1.254 24 [Router1-GigabitEthernet1/0/0.1] arp-proxy inter-sub-vlan-proxy enable [Router1-GigabitEthernet1/0/0.1] arp broadcast enable
NOTE

When the qinq termination command is used, on two sub-interfaces, the ranges of ce-vid cannot overlap if pe-vid is the same.

5.

Verify the configuration. Ping PC 2 from PC 1. The ping succeeds. If viewing the ARP table on PC 1, you can find that the corresponding MAC address of PC 2 is the MAC address of GE 1/0/0 on Router 1.

Configuration Files
l

Configuration file of Router 1


# sysname Router1 # interface GigabitEthernet1/0/0 undo shutdown mode user-termination # interface GigabitEthernet1/0/0.1 undo shutdown control-vid 1 qinq-termination qinq termination pe-vid 100 ce-vid 10 qinq termination pe-vid 100 ce-vid 20 ip address 10.1.1.254 255.255.255.0 arp-proxy inter-sub-vlan-proxy enable arp broadcast enable # return

Configuration file of Router 2


# sysname Router2 # vlan batch 100 # interface GigabitEthernet1/0/0 shutdown portswitch port vlan-stacking outside-vlan 10 stack-vlan 100 # interface GigabitEthernet1/0/1 undo shutdown portswitch port vlan-stacking outside-vlan 20 stack-vlan 100 # interface GigabitEthernet1/0/2 undo shutdown portswitch

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-75

5 QinQ Configuration
port trunk allow-pass vlan 100 # return l

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Configuration file of Router 3


# sysname Router3 # vlan batch 10 # interface GigabitEthernet1/0/0 undo shutdown portswitch port default vlan 10 # interface GigabitEthernet1/0/1 undo shutdown portswitch port trunk allow-pass vlan 10 # return

Configuration file of Router 4


# sysname Router4 # vlan batch 20 # interface GigabitEthernet1/0/0 undo shutdown portswitch port default vlan 20 # interface GigabitEthernet1/0/1 undo shutdown portswitch port trunk allow-pass vlan 20 # return

5.13.6 Example for Configuring the Sub-interface for dot1q VLAN Tag Termination to Support VRRP
Network Requirements
As shown in Figure 5-25, a host accesses the ISP network through the default gateway. The requirements are as follows:
l

As the default gateway of the host, the VRRP backup group consists of Router 1 and Router 2. In normal case, Router 1 serves as the gateway. When Router 1 is faulty, Router 2 acts as the gateway. When Router 1 recovers, it can become master within 20 seconds. The packets sent by Switch 1 have a single tag.

l l

It is required to configure GE 2/0/0.1 respectively on Router 1 and Router 2 to implement VRRP on the sub-interface for dot1q VLAN tag termination.

5-76

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

Figure 5-25 Typical networking diagram of configuring the sub-interface for dot1q VLAN tag termination to support VRRP

Configuration Roadmap
The configuration roadmap is as follows: 1. Create the backup group1 on the interface GE 2/0/0.1 of Router 1, and configure the high precedence for Router 1 in the backup group. Ensure that Router 1 is master, and Configure Preemption mode. Create the backup group1 on the interface GE 2/0/0.1 of Router 2, and use the default precedence. Configure the GE 2/0/0.1 interfaces of Router 1 and Router 2 as the sub-interface for dot1q VLAN tag termination. Configure the basic Layer 2 forwarding function on Switch.

2. 3. 4.

Data Preparation
To complete the configuration, you need the following data:
l l l

Number of VRRP backup group, and virtual IP address Router precedence in the backup group Terminating range of the sub-interface for dot1q termination

Configuration Procedure
1. Configure the interface mode to user termination. # Configure Router 1.
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-77

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
<Quidway> system-view [Quidway] sysname Router1 [Router1] interface gigabitethernet 2/0/0 [Router1-GigabitEthernet2/0/0] mode user-termination [Router1-GigabitEthernet2/0/0] quit

# Configure Router 2.
<Quidway> system-view [Quidway] sysname Router2 [Router2] interface gigabitethernet 2/0/0 [Router2-GigabitEthernet2/0/0] mode user-termination [Router2-GigabitEthernet2/0/0] quit

2.

Configure the network interconnection between the devices. As shown in Figure 5-25, configure IP addresses of interfaces. Configure IGP run between Router 1, Router 2, and Router 3. Here, OSPF is configured. # Configure Router 1.
<Router1> system-view [Router1] interface pos 1/0/0 [Router1-Pos1/0/0] ip address 192.168.2.1 24 [Router1-Pos1/0/0] quit [Router1] interface gigabitethernet 2/0/0.1 [Router1-GigabitEthernet2/0/0.1] ip address 100.1.1.1 24 [Router1-GigabitEthernet2/0/0.1] quit [Router1] ospf [Router1-ospf-1] area 0 [Router1-ospf-1-area-0.0.0.0] network 192.168.2.0 0.0.0.255 [Router1-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255 [Router1-ospf-1-area-0.0.0.0] quit [Router1-ospf-1] quit

# Configure Router 2.
<Router2> system-view [Router2] interface pos 1/0/0 [Router2-Pos1/0/0] ip address 192.168.1.1 24 [Router2-Pos1/0/0] quit [Router2] interface gigabitethernet 2/0/0.1 [Router2-GigabitEthernet2/0/0.1] ip address 100.1.1.2 24 [Router2-GigabitEthernet2/0/0.1] quit [Router2] ospf [Router2-ospf-1] area 0 [Router2-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255 [Router2-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255 [Router2-ospf-1-area-0.0.0.0] quit [Router2-ospf-1] quit

# Configure Router3.
<Quidway> system-view [Quidway] sysname Router3 [Router3] interface pos 1/0/0 [Router3-Pos1/0/0] ip address [Router3-Pos1/0/0] quit [Router3] interface pos 1/0/1 [Router3-Pos2/0/0] ip address [Router3-Pos2/0/0] quit [Router3] ospf [Router3-ospf-1] area 0 [Router3-ospf-1-area-0.0.0.0] [Router3-ospf-1-area-0.0.0.0] [Router3-ospf-1-area-0.0.0.0] [Router3-ospf-1] quit

192.168.2.2 24 192.168.1.2 24

network 192.168.1.0 0.0.0.255 network 192.168.2.0 0.0.0.255 quit

After the preceding steps, Router 1 and Router 2 both have routes, discovered through OSPF, to each other. Router 1 and Router 2 can ping through each other. Take the display on Router 1 as an example:
<Router1> display ip routing-table

5-78

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

Route Flags: R - relied, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 6 Routes : 7 Destination/Mask Proto Pre Cost Flags NextHop Interface 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 192.168.1.0/24 OSPF 10 2 D 192.168.2.2 Pos1/0/0 192.168.2.0/24 Direct 0 0 D 192.168.2.1 Pos1/0/0 192.168.2.0/30 OSPF 10 2 D 192.168.2.2 Pos1/0/0 192.168.2.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 192.168.2.2/32 Direct 0 0 D 192.168.2.2 Pos1/0/0

Router 1 and Router 2 can ping through each other.


<Router1> ping 192.168.1.1 PING 192.168.1.1: 56 data bytes, press CTRL_C to break Reply from 192.168.1.1: bytes=56 Sequence=1 ttl=254 time=110 ms Reply from 192.168.1.1: bytes=56 Sequence=2 ttl=254 time=60 ms Reply from 192.168.1.1: bytes=56 Sequence=3 ttl=254 time=90 ms Reply from 192.168.1.1: bytes=56 Sequence=4 ttl=254 time=90 ms Reply from 192.168.1.1: bytes=56 Sequence=5 ttl=254 time=90 ms --- 192.168.1.1 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 60/88/110 ms

3.

Configure VRRP on the sub-interface for dot1q VLAN tag termination. Set the default gateway of the host to 100.1.1.111. # Configure Router 1, create backup group 1, and set the priority of Router 1 in this backup group to 120. (Router 1 serves as the Master.)
<Router1> system-view [Router1] interface gigabitethernet 2/0/0.1 [Router1-GigabitEthernet2/0/0.1] control-vid 1 dot1q-termination [Router1-GigabitEthernet2/0/0.1] dot1q termination vid 10 [Router1-GigabitEthernet2/0/0.1] dot1q vrrp vid 10 [Router1-GigabitEthernet2/0/0.1] vrrp vrid 1 virtual-ip 100.1.1.111 [Router1-GigabitEthernet2/0/0.1] vrrp vrid 1 priority 120 [Router1-GigabitEthernet2/0/0.1] vrrp vrid 1 preempt-mode timer delay 20 [Router1-GigabitEthernet2/0/0.1] arp broadcast enable

# Configure Router 2, create backup group 1, and set the priority of Router 2 in this backup group to the default value. (Router 2 serves as the Backup.)
<Router2> system-view [Router2] interface gigabitethernet 2/0/0.1 [Router2-GigabitEthernet2/0/0.1] control-vid 1 dot1q-termination [Router2-GigabitEthernet2/0/0.1] dot1q termination vid 10 [Router2-GigabitEthernet2/0/0.1] dot1q vrrp vid 10 [Router2-GigabitEthernet2/0/0.1] vrrp vrid 1 virtual-ip 100.1.1.111 [Router2-GigabitEthernet2/0/0.1] arp broadcast enable

After the preceding steps, the sub-interfaces for dot1q VLAN tag termination on Router 1 and Router 2 turn Up. A route to the network segment 100.1.1.0/24 is generated on Router 3. Take the display on Router 3 as an example:
<Router3> display ip routing-table Route Flags: R - relied, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 11 Routes : 12 Destination/Mask Proto Pre Cost Flags NextHop Interface 100.1.1.0/24 OSPF 10 2 D 192.168.2.1 Pos1/0/0 OSPF 10 2 D 192.168.1.1 Pos1/0/1 100.1.1.111/32 OSPF 10 2 D 192.168.2.1 Pos1/0/0 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-79

5 QinQ Configuration
192.168.1.0/24 192.168.1.1/32 192.168.1.2/32 192.168.2.0/24 192.168.2.0/30 192.168.2.1/32 192.168.2.2/32 Direct Direct Direct OSPF Direct Direct Direct 0 0 0 10 0 0 0 0 0 0 2 0 0 0

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
D D D D D D D 192.168.1.2 192.168.1.1 127.0.0.1 192.168.2.1 192.168.2.2 192.168.2.1 127.0.0.1 Pos1/0/1 Pos1/0/1 InLoopBack0 Pos1/0/0 Pos1/0/0 Pos1/0/0 InLoopBack0

4.

Configure the sub-interface for dot1q VLAN tag termination on routers. # Configure Router 1.
[Router1] interface gigabitethernet2/0/0 [Router1-GigabitEthernet2/0/0] mode user-termination [Router1-GigabitEthernet2/0/0] quit [Router1] interface gigabitethernet2/0/0.1 [Router1-GigabitEthernet2/0/0.1] control-vid 1 dot1q-termination [Router1-GigabitEthernet2/0/0.1] dot1q termination vid 100 to 200 [Router1-GigabitEthernet2/0/0.1] ip address 100.1.1.1 24 [Router1-GigabitEthernet2/0/0.1] dot1q vrrp vid 100 [Router1-GigabitEthernet2/0/0.1] vrrp vrid 1 virtual-ip 100.1.1.111 [Router1-GigabitEthernet2/0/0.1] vrrp vrid 1 priority 120 [Router1-GigabitEthernet2/0/0.1] arp broadcast enable

# Configure Router 2.
[Router2] interface gigabitethernet2/0/0 [Router2-GigabitEthernet2/0/0] mode user-termination [Router2-GigabitEthernet2/0/0] quit [Router2] interface gigabitethernet2/0/0.1 [Router2-GigabitEthernet2/0/0.1] control-vid 1 dot1q-termination [Router2-GigabitEthernet2/0/0.1] dot1q termination vid 100 to 200 [Router2-GigabitEthernet2/0/0.1] ip address 100.1.1.2 24 [Router2-GigabitEthernet2/0/0.1] dot1q vrrp vid 100 [Router2-GigabitEthernet2/0/0.1] vrrp vrid 1 virtual-ip 100.1.1.111 [Router2-GigabitEthernet2/0/0.1] vrrp vrid 1 priority 120 [Router2-GigabitEthernet2/0/0.1] arp broadcast enable

5.

Configure the basic Layer 2 forwarding function. #Configure Switch.


<Quidway> system-view [Quidway] sysname Switch [Switch] vlan 10 [Switch-vlan10] port gigabitethernet 1/0/0 [Switch-vlan10] quit [Switch] interface gigabitethernet 1/0/1 [Switch-GigabitEthernet1/0/1] port trunk allow-pass vlan 10 [Switch-GigabitEthernet1/0/1] quit [Switch] interface gigabitethernet 1/0/2 [Switch-GigabitEthernet1/0/2] port trunk allow-pass vlan 10 [Switch-GigabitEthernet1/0/2] quit

6.

Verify the configuration.


l

Verify that the VRRP backup group can provide the gateway function. Running the display vrrp command on Router 1, you can view that Router 1 is in the master state. Running the display vrrp command, you can view that Router 2 is in the backup state. The results are displayed as follows:
<Router1> display vrrp GigabitEthernet2/0/0.1 | Virtual Router 1 state : Master Virtual IP : 100.1.1.111 PriorityRun : 120 PriorityConfig : 120 MasterPriority : 120 Preempt : YES Delay Time : 20 Timer : 1 Auth Type : NONE Virtual Mac : 0000-5e00-0101 Check TTL : YES

5-80

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
Config type : normal-vrrp <Router2> display vrrp GigabitEthernet2/0/0.1 | Virtual Router 1 state : Backup Virtual IP : 100.1.1.111 PriorityRun : 100 PriorityConfig : 100 MasterPriority : 120 Preempt : YES Delay Time : 0 Timer : 1 Auth Type : NONE Virtual Mac : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp

5 QinQ Configuration

Running the display ip routing-table command, you can view that there is a direct route in the routing table on Router 1. The destination address of the direct route is a virtual IP address. The route is an OSPF route on Router 2. The following displays the information on Router 1 and Router 2:
<Router1> display ip routing-table Route Flags: R - relied, D - download to fib ----------------------------------------------------------------------------Routing Tables: Public Destinations : 11 Routes : 12 Destination/Mask Proto Pre Cost Flags NextHop Interface 100.1.1.0/24 Direct 0 0 D 100.1.1.1 GigabitEthernet2/0/0.1 100.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 100.1.1.2/32 Direct 0 0 D 100.1.1.2 GigabitEthernet2/0/0.1 100.1.1.111/32 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 192.168.1.0/24 OSPF 10 2 D 192.168.2.2 Pos1/0/0 192.168.2.0/24 Direct 0 0 D 192.168.2.1 Pos1/0/0 192.168.2.0/30 OSPF 10 2 D 192.168.2.2 Pos1/0/0 192.168.2.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 192.168.2.2/32 Direct 0 0 D 192.168.2.2 Pos1/0/0 <Router2> display ip routing-table Route Flags: R - relied, D - download to fib ----------------------------------------------------------------------------Routing Tables: Public Destinations : 10 Routes : 10 Destination/Mask Proto Pre Cost Flags NextHop Interface 100.1.1.0/24 Direct 0 0 D 100.1.1.2 GigabitEthernet2/0/0.1 100.1.1.1/32 Direct 0 0 D 100.1.1.1 GigabitEthernet2/0/0.1 100.1.1.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0 100.1.1.111/32 OSPF 10 2 D 100.1.1.1 GigabitEthernet2/0/0.1 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 192.168.1.0/24 Direct 0 0 D 192.168.1.1 Pos1/0/0 192.168.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 192.168.1.2/32 Direct 0 0 D 192.168.1.2 Pos1/0/0 192.168.2.0/30 OSPF 10 2 D 192.168.1.2 Pos1/0/0 l

Verify that Router2 becomes master when Router1 is faulty. Run the shutdown command on GE 2/0/0.1 of Router 1 and imitate that Router 1 is faulty. Run the display vrrp command on Router 1 and Router 2 respectively to view VRRP status. You can find that VRRP status on Router 1 is "Initialize" and VRRP status on Router 2 is "Master".

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-81

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
<Router1> display vrrp GigabitEthernet2/0/0.1 | Virtual Router 1 state : Initialize Virtual IP : 100.1.1.111 PriorityRun : 120 PriorityConfig : 120 MasterPriority : 0 Preempt : YES Delay Time : 20 Timer : 1 Auth Type : NONE Virtual Mac : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp <Router2> display vrrp GigabitEthernet2/0/0.1 | Virtual Router 1 state : Master Virtual IP : 100.1.1.111 PriorityRun : 100 PriorityConfig : 100 MasterPriority : 100 Preempt : YES Delay Time : 0 Timer : 1 Auth Type : NONE Virtual Mac : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp l

Verify that it can preempt after Router 1 recovers. Run the undo shutdown command on GE 2/0/0.1 on Router 1. After GE 2/0/0.1 turns Up, run the display vrrp command on Router 1 to view VRRP status. You can find that VRRP status on Router 1 is Backup.
<Router1> display vrrp GigabitEthernet2/0/0.1 | Virtual Router 1 state : Backup Virtual IP : 100.1.1.111 PriorityRun : 120 PriorityConfig : 120 MasterPriority : 100 Preempt : YES Delay Time : 20 Timer : 1 Auth Type : NONE Virtual Mac : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp

After 20 seconds, run the display vrrp command on Router 1 to view VRRP status. You can find VRRP status restores Master.
<Router1> display vrrp GigabitEthernet2/0/0.1 | Virtual Router 1 state : Master Virtual IP : 100.1.1.111 PriorityRun : 120 PriorityConfig : 120 MasterPriority : 100 Preempt : YES Delay Time : 20 Timer : 1 Auth Type : NONE Virtual Mac : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp

Configuration Files
l

Configuration file of Router 1


# sysname Router1 #

5-82

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
interface GigabitEthernet2/0/0 undo shutdown mode user-termination # interface GigabitEthernet2/0/0.1 undo shutdown control-vid 1 dot1q-termination dot1q termination vid 10 dot1q vrrp vid 10 ip address 100.1.1.1 255.255.255.0 vrrp vrid 1 virtual-ip 100.1.1.111 vrrp vrid 1 priority 120 vrrp vrid 1 preempt-mode timer delay 20 arp broadcast enable # interface Pos1/0/0 link-protocol ppp undo shutdown ip address 192.168.2.1 255.255.255.0 # ospf 1 area 0.0.0.0 network 192.168.2.0 0.0.0.255 network 100.1.1.0 0.0.0.255 # return l

5 QinQ Configuration

Configuration file of Router 2


# sysname Router2 # interface GigabitEthernet2/0/0 undo shutdown mode user-termination # interface GigabitEthernet2/0/0.1 undo shutdown control-vid 1 dot1q-termination dot1q termination vid 10 dot1q vrrp vid 10 ip address 100.1.1.2 255.255.255.0 vrrp vrid 1 virtual-ip 100.1.1.111 arp broadcast enable # interface Pos1/0/0 link-protocol ppp undo shutdown ip address 192.168.1.1 255.255.255.0 # ospf 1 area 0.0.0.0 network 192.168.1.0 0.0.0.255 network 100.1.1.0 0.0.0.255 # return

Configuration file of Router 3


# sysname Router3 # interface Pos1/0/0 link-protocol ppp undo shutdown ip address 192.168.2.2 255.255.255.0 # interface Pos1/0/1 link-protocol ppp undo shutdown ip address 192.168.1.2 255.255.255.0 #

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-83

5 QinQ Configuration
ospf 1 area 0.0.0.0 network 192.168.1.0 0.0.0.255 network 192.168.2.0 0.0.0.255 # return l

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Configuration file of Switch


# sysname Switch # vlan batch 10 # interface GigabitEthernet1/0/0 undo shutdown port default vlan 10 # interface GigabitEthernet1/0/1 undo shutdown port trunk allow-pass vlan 10 # interface GigabitEthernet1/0/2 undo shutdown port trunk allow-pass vlan 10 # return

5.13.7 Example for Configuring the Sub-interface for QinQ VLAN Tag Termination to Support VRRP
Network Requirements
As shown in Figure 5-26, a host accesses the ISP network through the default gateway. The requirements are as follows:
l

As the default gateway of the host, the VRRP backup group consists of Router 1 and Router 2. In normal case, Router 1 serves as the gateway. When Router 1 is faulty, Router 2 acts as the gateway. When Router 1 recovers, it can become master within 20 seconds. The packets sent by Switch 1 have double tags.

l l

It is required to configure GE 2/0/0.1 respectively on Router 1 and Router 2 to implement VRRP on the sub-interface for QinQ VLAN tag termination.

5-84

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

Figure 5-26 Typical networking diagram of configuring the sub-interface for QinQ VLAN tag termination to support VRRP

Configuration Roadmap
The configuration roadmap is as follows: 1. Create the backup group1 on the interface GE 2/0/0.1 of Router 1, and configure the high precedence for Router 1 in the backup group. Ensure that Router 1 is master and Configure Preemption mode. Create the backup group2 on the interface GE 2/0/0.2 of Router 1, and configure the high precedence for Router 1 in the backup group. Ensure that Router 1 is master and Configure Preemption mode. Create the backup group1 on the interface GE 2/0/0.1 of Router 2 and use the default precedence. Create the backup group2 on the interface GE 2/0/0.2 of Router 2 and use the default precedence. Configure the interface GE 2/0/0.1 on Router 1 and Router 2 as the sub-interface for QinQ VLAN tag termination. Configure the VLAN stacking function on Switch 1. Configure the basic forwarding functions on Switch 2 and Switch 3.

2.

3. 4. 5. 6. 7.

Data Preparation
To complete the configuration, you need the following data:
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-85

5 QinQ Configuration
l l l

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Number of VRRP backup group, and virtual IP address Router precedence in the backup group Terminating range of the sub-interface for QinQ VLAN tag termination

Configuration Procedure
1. Configure the interface mode to user termination. # Configure Router 1.
<Quidway> system-view [Quidway] sysname Router1 [Router1] interface gigabitethernet 2/0/0 [Router1-GigabitEthernet2/0/0] mode user-termination [Router1-GigabitEthernet2/0/0] quit

# Configure Router 2.
<Quidway> system-view [Quidway] sysname Router2 [Router2] interface gigabitethernet 2/0/0 [Router2-GigabitEthernet2/0/0] mode user-termination [Router2-GigabitEthernet2/0/0] quit

2.

Configure the network interconnection between the devices. As shown in Figure 5-26, configure IP addresses of interfaces. Configure IGP run between Router 1, Router 2, and Router 3. Here, OSPF is configured. # Configure Router1.
<Router1> system-view [Router1] interface pos 1/0/0 [Router1-Pos1/0/0] ip address 192.168.2.1 24 [Router1-Pos1/0/0] quit [Router1] interface gigabitethernet 2/0/0.1 [Router1-GigabitEthernet2/0/0.1] ip address 100.1.1.1 24 [Router1-GigabitEthernet2/0/0.1] quit [Router1] interface gigabitethernet 2/0/0.2 [Router1-GigabitEthernet2/0/0.2] ip address 200.1.1.1 24 [Router1-GigabitEthernet2/0/0.2] quit [Router1] ospf [Router1-ospf-1] area 0 [Router1-ospf-1-area-0.0.0.0] network 192.168.2.0 0.0.0.255 [Router1-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255 [Router1-ospf-1-area-0.0.0.0] network 200.1.1.0 0.0.0.255 [Router1-ospf-1-area-0.0.0.0] quit [Router1-ospf-1] quit

# Configure Router 2.
<Router2> system-view [Router2] interface pos 1/0/0 [Router2-Pos1/0/0] ip address 192.168.1.1 24 [Router2-Pos1/0/0] quit [Router2] interface gigabitethernet 2/0/0.1 [Router2-GigabitEthernet2/0/0.1] ip address 100.1.1.2 24 [Router2-GigabitEthernet2/0/0.1] quit [Router2] interface gigabitethernet 2/0/0.2 [Router2-GigabitEthernet2/0/0.2] ip address 200.1.1.2 24 [Router2-GigabitEthernet2/0/0.2] quit [Router2] ospf [Router2-ospf-1] area 0 [Router2-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255 [Router2-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255 [Router2-ospf-1-area-0.0.0.0] network 200.1.1.0 0.0.0.255 [Router2-ospf-1-area-0.0.0.0] quit [Router2-ospf-1] quit

# Configure Router 3.
<Quidway> system-view

5-86

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[Quidway] sysname Router3 [Router3] interface pos 1/0/0 [Router3-Pos1/0/0] ip address [Router3-Pos1/0/0] quit [Router3] interface pos 1/0/1 [Router3-Pos2/0/0] ip address [Router3-Pos2/0/0] quit [Router3] ospf [Router3-ospf-1] area 0 [Router3-ospf-1-area-0.0.0.0] [Router3-ospf-1-area-0.0.0.0] [Router3-ospf-1-area-0.0.0.0] [Router3-ospf-1] quit

5 QinQ Configuration

192.168.2.2 24 192.168.1.2 24

network 192.168.1.0 0.0.0.255 network 192.168.2.0 0.0.0.255 quit

After the preceding steps, Router 1 and Router 2 both have routes, discovered through OSPF, to each other. Router 1 and Router 2 can ping through each other. Take the display on Router 1 as an example:
<Router1> display ip routing-table Route Flags: R - relied, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 10 Routes : 11 Destination/Mask Proto Pre Cost Flags NextHop Interface 100.1.1.0/24 Direct 0 0 D 100.1.1.1 GigabitEthernet2/0/0.1 100.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 192.168.1.0/24 OSPF 10 2 D 192.168.2.2 Pos1/0/0 192.168.2.0/24 Direct 0 0 D 192.168.2.1 Pos1/0/0 192.168.2.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 192.168.2.2/32 Direct 0 0 D 192.168.2.2 Pos1/0/0 200.1.1.0/24 Direct 0 0 D 200.1.1.1 GigabitEthernet2/0/0.2 200.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 200.1.1.2/32 Direct 0 0 D 200.1.1.2 GigabitEthernet2/0/0.2

Router 1 and Router 2 can ping through each other.


<Router1> ping 192.168.1.1 PING 192.168.1.1: 56 data bytes, press CTRL_C to break Reply from 192.168.1.1: bytes=56 Sequence=1 ttl=254 time=110 ms Reply from 192.168.1.1: bytes=56 Sequence=2 ttl=254 time=60 ms Reply from 192.168.1.1: bytes=56 Sequence=3 ttl=254 time=90 ms Reply from 192.168.1.1: bytes=56 Sequence=4 ttl=254 time=90 ms Reply from 192.168.1.1: bytes=56 Sequence=5 ttl=254 time=90 ms --- 192.168.1.1 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 60/88/110 ms

3.

Configure VRRP on the sub-interface for QinQ VLAN tag termination. Set the default gateway of the host to 100.1.1.111. # Configure Router 1, create backup group 1 and backup group 2, and set the priority of Router 1 in backup group 1 and backup group 2 to 120. (Router 1 serves as the Master.)
<Router1> system-view [Router1] interface gigabitethernet 2/0/0.1 [Router1-GigabitEthernet2/0/0.1] control-vid 1 qinq-termination [Router1-GigabitEthernet2/0/0.1] qinq termination pe-vid 100 ce-vid 10 [Router1-GigabitEthernet2/0/0.1] qinq vrrp pe-vid 100 ce-vid 10 [Router1-GigabitEthernet2/0/0.1] vrrp vrid 1 virtual-ip 100.1.1.111 [Router1-GigabitEthernet2/0/0.1] vrrp vrid 1 priority 120 [Router1-GigabitEthernet2/0/0.1] vrrp vrid 1 preempt-mode timer delay 20 [Router1-GigabitEthernet2/0/0.1] arp broadcast enable [Router1-GigabitEthernet2/0/0.1] quit [Router1] interface gigabitethernet 2/0/0.2

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-87

5 QinQ Configuration
[Router1-GigabitEthernet2/0/0.2] [Router1-GigabitEthernet2/0/0.2] [Router1-GigabitEthernet2/0/0.2] [Router1-GigabitEthernet2/0/0.2] [Router1-GigabitEthernet2/0/0.2] [Router1-GigabitEthernet2/0/0.2] [Router1-GigabitEthernet2/0/0.2] [Router1-GigabitEthernet2/0/0.2]

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
control-vid 2 qinq-termination qinq termination pe-vid 100 ce-vid 20 qinq vrrp pe-vid 100 ce-vid 20 vrrp vrid 2 virtual-ip 200.1.1.111 vrrp vrid 2 priority 120 vrrp vrid 2 preempt-mode timer delay 20 arp broadcast enable quit

# Configure Router 2, create backup group 1 and backup group 2, and set the priority of Router 2 in backup group 1 and backup group 2 to the default value. (Router 2 serves as the Backup.)
<Router2> system-view [Router2] interface gigabitethernet 2/0/0.1 [Router2-GigabitEthernet2/0/0.1] control-vid 1 qinq-termination [Router2-GigabitEthernet2/0/0.1] qinq termination pe-vid 100 ce-vid 10 [Router2-GigabitEthernet2/0/0.1] qinq vrrp pe-vid 100 ce-vid 10 [Router2-GigabitEthernet2/0/0.1] vrrp vrid 1 virtual-ip 100.1.1.111 [Router2-GigabitEthernet2/0/0.1] arp broadcast enable [Router2-GigabitEthernet2/0/0.1] quit [Router2] interface gigabitethernet 2/0/0.2 [Router2-GigabitEthernet2/0/0.2] control-vid 2 qinq-termination [Router2-GigabitEthernet2/0/0.2] qinq termination pe-vid 100 ce-vid 20 [Router2-GigabitEthernet2/0/0.2] qinq vrrp pe-vid 100 ce-vid 20 [Router2-GigabitEthernet2/0/0.2] vrrp vrid 2 virtual-ip 200.1.1.111 [Router2-GigabitEthernet2/0/0.2] arp broadcast enable [Router2-GigabitEthernet2/0/0.2] quit
NOTE

When the qinq termination command is used, the ranges of ce-vid cannot overlap if pe-vid of two sub-interfaces is the same.

After the preceding steps, the sub-interfaces for QinQ VLAN tag termination on Router 1 and Router 2 turn Up. Routes to the network segments 100.1.1.0/24 and 200.1.1.0/24 are generated on Router 3. Take the display on Router 3 as an example:
<Router3> display ip routing-table Route Flags: R - relied, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 12 Routes : 14 Destination/Mask Proto Pre Cost Flags NextHop Interface 100.1.1.0/24 OSPF 10 2 D 192.168.1.1 Pos1/0/1 OSPF 10 2 D 192.168.2.1 Pos1/0/0 100.1.1.111/32 OSPF 10 2 D 192.168.2.1 Pos1/0/0 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 192.168.1.0/24 Direct 0 0 D 192.168.1.2 Pos1/0/1 192.168.1.1/32 Direct 0 0 D 192.168.1.1 Pos1/0/1 192.168.1.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0 192.168.2.0/24 Direct 0 0 D 192.168.2.2 Pos1/0/0 192.168.2.1/32 Direct 0 0 D 192.168.2.1 Pos1/0/0 192.168.2.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0 200.1.1.0/24 OSPF 10 2 D 192.168.2.1 Pos1/0/0 OSPF 10 2 D 192.168.1.1 Pos1/0/1 200.1.1.111/32 OSPF 10 2 D 192.168.2.1 Pos1/0/0

4.

Configure the basic Layer 2 forwarding functions on routers. # Configure Switch 2.


<Quidway> system-view [Quidway] sysname Switch2 [Switch2] vlan 10 [Switch2-vlan10] port gigabitethernet 1/0/0 [Switch2-vlan10] quit [Switch2] interface gigabitethernet 1/0/1 [Switch2-GigabitEthernet1/0/1] port trunk allow-pass vlan 10

5-88

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[Switch2-GigabitEthernet1/0/1] quit

5 QinQ Configuration

# Configure Switch 3.
<Quidway> system-view [Quidway] sysname Switch3 [Switch3] vlan 20 [Switch3-vlan20] port gigabitethernet 1/0/0 [Switch3-vlan20] quit [Switch3] interface gigabitethernet 1/0/1 [Switch3-GigabitEthernet1/0/1] port trunk allow-pass vlan 20 [Switch3-GigabitEthernet1/0/1] quit

5.

Configure QinQ on Switch 1 and set the packets sent from Switch 1 to Router 1 and Router 2 to carry double VLAN tags. # Configure Switch 1.
<Quidway> system-view [Quidway] sysname Switch1 [Switch1] vlan 100 [Switch1-vlan100] quit [Switch1] interface gigabitethernet [Switch1-GigabitEthernet1/0/0] port 100 [Switch1-GigabitEthernet1/0/0] quit [Switch1] interface gigabitethernet [Switch1-GigabitEthernet1/0/1] port 100 [Switch1-GigabitEthernet1/0/1] quit [Switch1] interface gigabitethernet [Switch1-GigabitEthernet1/0/2] port [Switch1-GigabitEthernet1/0/2] quit [Switch1] interface gigabitethernet [Switch1-GigabitEthernet1/0/3] port [Switch1-GigabitEthernet1/0/3] quit
NOTE

1/0/0 vlan-stacking outside-vlan 10 stack-vlan 1/0/1 vlan-stacking outside-vlan 20 stack-vlan 1/0/2 trunk allow-pass vlan 100 1/0/3 trunk allow-pass vlan 100

If the device does not support the port vlan-stacking command, you can run the commands port link-type dot1q-tunnel and port default vlan to configure QinQ.

6.

Verify the configuration.


l

Verify that the VRRP backup group can normally provide the gateway function. Running the display vrrp command on Router 1, you can view that Router 1 is in the master state. Running the display vrrp command on Router 2, you can view that Router 2 is in the Backup state. The results are displayed as follows:
<Router1> display vrrp GigabitEthernet2/0/0.1 | Virtual Router 1 state : Master Virtual IP : 100.1.1.111 PriorityRun : 120 PriorityConfig : 120 MasterPriority : 120 Preempt : YES Delay Time : 20 Timer : 1 Auth Type : NONE Virtual Mac : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp GigabitEthernet2/0/0.2 | Virtual Router 2 state : Master Virtual IP : 200.1.1.111 PriorityRun : 120 PriorityConfig : 120 MasterPriority : 120 Preempt : YES Delay Time : 20 Timer : 1 Auth Type : NONE Virtual Mac : 0000-5e00-0102

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-89

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
Check TTL : YES Config type : normal-vrrp <Router2> display vrrp GigabitEthernet2/0/0.2 | Virtual Router 2 state : Backup Virtual IP : 200.1.1.111 PriorityRun : 100 PriorityConfig : 100 MasterPriority : 120 Preempt : YES Delay Time : 0 Timer : 1 Auth Type : NONE Virtual Mac : 0000-5e00-0102 Check TTL : YES Config type : normal-vrrp GigabitEthernet2/0/0.1 | Virtual Router 1 state : Backup Virtual IP : 100.1.1.111 PriorityRun : 100 PriorityConfig : 100 MasterPriority : 120 Preempt : YES Delay Time : 0 Timer : 1 Auth Type : NONE Virtual Mac : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp

Running the display ip routing-table command on Router 1 and Router 2, you can view that there is a direct route in the routing table on Router 1. The destination address of the direct route is a virtual IP address, and the route is an OSPF route on Router 2. The following displays the information on Router 1 and Router 2:
<Router1> display ip routing-table Route Flags: R - relied, D - download to fib ----------------------------------------------------------------------------Routing Tables: Public Destinations : 14 Routes : 16 Destination/Mask Proto Pre Cost Flags NextHop Interface 100.1.1.0/24 Direct 0 0 D 100.1.1.1 GigabitEthernet2/0/0.1 100.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 100.1.1.2/32 Direct 0 0 D 100.1.1.2 GigabitEthernet2/0/0.1 100.1.1.111/32 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 192.168.1.0/24 OSPF 10 2 D 100.1.1.2 GigabitEthernet2/0/0.1 OSPF 10 2 D 200.1.1.2 GigabitEthernet2/0/0.2 OSPF 10 2 D 192.168.2.2 Pos1/0/0 192.168.2.0/24 Direct 0 0 D 192.168.2.1 Pos1/0/0 192.168.2.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 192.168.2.2/32 Direct 0 0 D 192.168.2.2 Pos1/0/0 200.1.1.0/24 Direct 0 0 D 200.1.1.1 GigabitEthernet2/0/0.2 200.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 200.1.1.2/32 Direct 0 0 D 200.1.1.2 GigabitEthernet2/0/0.2 200.1.1.111/32 Direct 0 0 D 127.0.0.1 InLoopBack0 <Router2> display ip routing-table Route Flags: R - relied, D - download to fib ----------------------------------------------------------------------------Routing Tables: Public Destinations : 14 Routes : 18 Destination/Mask Proto Pre Cost Flags NextHop Interface

5-90

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
100.1.1.0/24 Direct GigabitEthernet2/0/0.1 100.1.1.1/32 Direct GigabitEthernet2/0/0.1 100.1.1.2/32 Direct 100.1.1.111/32 OSPF GigabitEthernet2/0/0.1 OSPF GigabitEthernet2/0/0.2 127.0.0.0/8 Direct 127.0.0.1/32 Direct 192.168.1.0/24 Direct 192.168.1.1/32 Direct 192.168.1.2/32 Direct 192.168.2.0/24 OSPF GigabitEthernet2/0/0.1 OSPF GigabitEthernet2/0/0.2 OSPF 200.1.1.0/24 Direct GigabitEthernet2/0/0.2 200.1.1.1/32 Direct GigabitEthernet2/0/0.2 200.1.1.2/32 Direct 200.1.1.111/32 OSPF GigabitEthernet2/0/0.1 OSPF GigabitEthernet2/0/0.2 l 0 0 0 10 10 0 0 0 0 0 10 10 10 0 0 0 10 10 0 0 0 2 2 0 0 0 0 0 2 2 2 0 0 0 2 2 D D D D D D D D D D D D D D D D D D 100.1.1.2 100.1.1.1 127.0.0.1 100.1.1.1 200.1.1.1

5 QinQ Configuration

InLoopBack0

127.0.0.1 127.0.0.1 192.168.1.1 127.0.0.1 192.168.1.2 100.1.1.1 200.1.1.1 192.168.1.2 200.1.1.2 200.1.1.1 127.0.0.1 100.1.1.1 200.1.1.1

InLoopBack0 InLoopBack0 Pos1/0/0 InLoopBack0 Pos1/0/0

Pos1/0/0

InLoopBack0

Verify that when Router 1 is faulty, Router 2 can become master. Run the shutdown command on GE 2/0/0.1 of Router 1 and imitate that Router 1 is faulty. Run the display vrrp command on Router 1 and Router 2 respectively to view VRRP status. You can find that VRRP status on Router 1 is "Initialize" and VRRP status on Router 2 is "Master".
<Router1> display vrrp GigabitEthernet2/0/0.1 | Virtual Router 1 state : Initialize Virtual IP : 100.1.1.111 PriorityRun : 120 PriorityConfig : 120 MasterPriority : 0 Preempt : YES Delay Time : 20 Timer : 1 Auth Type : NONE Virtual Mac : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp GigabitEthernet2/0/0.2 | Virtual Router 2 state : Master Virtual IP : 200.1.1.111 PriorityRun : 120 PriorityConfig : 120 MasterPriority : 120 Preempt : YES Delay Time : 20 Timer : 1 Auth Type : NONE Virtual Mac : 0000-5e00-0102 Check TTL : YES Config type : normal-vrrp <Router2> display vrrp GigabitEthernet2/0/0.2 | Virtual Router 2 state : Backup Virtual IP : 200.1.1.111 PriorityRun : 100 PriorityConfig : 100 MasterPriority : 120

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-91

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
Preempt : YES Delay Time : 0 Timer : 1 Auth Type : NONE Virtual Mac : 0000-5e00-0102 Check TTL : YES Config type : normal-vrrp GigabitEthernet2/0/0.1 | Virtual Router 1 state : Master Virtual IP : 100.1.1.111 PriorityRun : 100 PriorityConfig : 100 MasterPriority : 100 Preempt : YES Delay Time : 0 Timer : 1 Auth Type : NONE Virtual Mac : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp

Run the shutdown command on GE2/0/0.2 of Router 1. The operation process is as described previously. It is not mentioned here.
l

Verify that after Router 1 recovers, it can preempt. Run the undo shutdown command on GE 2/0/0.1 on Router 1. After GE 2/0/0.1 turns Up, run the display vrrp command on Router 1 to view VRRP status. You can find that VRRP status on Router 1 restores Backup.
<Router1> display vrrp GigabitEthernet2/0/0.1 | Virtual Router 1 state : Backup Virtual IP : 100.1.1.111 PriorityRun : 120 PriorityConfig : 120 MasterPriority : 100 Preempt : YES Delay Time : 20 Timer : 1 Auth Type : NONE Virtual Mac : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp GigabitEthernet2/0/0.2 | Virtual Router 2 state : Master Virtual IP : 200.1.1.111 PriorityRun : 120 PriorityConfig : 120 MasterPriority : 120 Preempt : YES Delay Time : 20 Timer : 1 Auth Type : NONE Virtual Mac : 0000-5e00-0102 Check TTL : YES Config type : normal-vrrp

After 20 seconds, run the display vrrp command on Router 1 to view VRRP status. You can find VRRP status restores Master.
<Router1> display vrrp GigabitEthernet2/0/0.1 | Virtual Router 1 state : Master Virtual IP : 100.1.1.111 PriorityRun : 120 PriorityConfig : 120 MasterPriority : 120 Preempt : YES Delay Time : 20 Timer : 1 Auth Type : NONE Virtual Mac : 0000-5e00-0101 Check TTL : YES Config type : normal-vrrp GigabitEthernet2/0/0.2 | Virtual Router 2

5-92

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
state : Master Virtual IP : 200.1.1.111 PriorityRun : 120 PriorityConfig : 120 MasterPriority : 120 Preempt : YES Delay Time : 20 Timer : 1 Auth Type : NONE Virtual Mac : 0000-5e00-0102 Check TTL : YES Config type : normal-vrrp

5 QinQ Configuration

Configuration Files
l

Configuration file of Router 1


# sysname Router1 # interface GigabitEthernet2/0/0 undo shutdown mode user-termination # interface GigabitEthernet2/0/0.1 undo shutdown control-vid 1 qinq-termination qinq termination pe-vid 100 ce-vid 10 qinq vrrp pe-vid 100 ce-vid 10 ip address 100.1.1.1 255.255.255.0 vrrp vrid 1 virtual-ip 100.1.1.111 vrrp vrid 1 priority 120 vrrp vrid 1 preempt-mode timer delay 20 arp broadcast enable # interface GigabitEthernet2/0/0.2 undo shutdown control-vid 2 qinq-termination qinq termination pe-vid 100 ce-vid 20 qinq vrrp pe-vid 100 ce-vid 20 ip address 200.1.1.1 255.255.255.0 vrrp vrid 2 virtual-ip 200.1.1.111 vrrp vrid 2 priority 120 vrrp vrid 2 preempt-mode timer delay 20 arp broadcast enable # interface Pos1/0/0 link-protocol ppp undo shutdown ip address 192.168.2.1 255.255.255.0 # ospf 1 area 0.0.0.0 network 192.168.2.0 0.0.0.255 network 100.1.1.0 0.0.0.255 network 200.1.1.0 0.0.0.255 # return

Configuration file of Router 2


# sysname Router2 # interface GigabitEthernet2/0/0 undo shutdown mode user-termination # interface GigabitEthernet2/0/0.1 undo shutdown control-vid 1 qinq-termination qinq termination pe-vid 100 ce-vid 10

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-93

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
qinq vrrp pe-vid 100 ce-vid 10 ip address 100.1.1.2 255.255.255.0 vrrp vrid 1 virtual-ip 100.1.1.111 arp broadcast enable # interface GigabitEthernet2/0/0.2 undo shutdown control-vid 2 qinq-termination qinq termination pe-vid 100 ce-vid 20 qinq vrrp pe-vid 100 ce-vid 20 ip address 200.1.1.2 255.255.255.0 vrrp vrid 2 virtual-ip 200.1.1.111 arp broadcast enable # interface Pos1/0/0 link-protocol ppp undo shutdown ip address 192.168.1.1 255.255.255.0 # ospf 1 area 0.0.0.0 network 192.168.1.0 0.0.0.255 network 100.1.1.0 0.0.0.255 network 200.1.1.0 0.0.0.255 # return

Configuration file of Router 3


# sysname Router3 # interface Pos1/0/0 link-protocol ppp undo shutdown ip address 192.168.2.2 255.255.255.0 # interface Pos1/0/1 link-protocol ppp undo shutdown ip address 192.168.1.2 255.255.255.0 # ospf 1 area 0.0.0.0 network 192.168.1.0 0.0.0.255 network 192.168.2.0 0.0.0.255 # return

Configuration file of Switch 1


# sysname Switch1 # vlan batch 100 # interface GigabitEthernet1/0/0 undo shutdown port vlan-stacking outside-vlan 10 stack-vlan 100 # interface GigabitEthernet1/0/1 undo shutdown port vlan-stacking outside-vlan 20 stack-vlan 100 # interface GigabitEthernet1/0/2 undo shutdown port trunk allow-pass vlan 100 # interface GigabitEthernet1/0/3 undo shutdown port trunk allow-pass vlan 100 #

5-94

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
return l

5 QinQ Configuration

Configuration file of Switch 2


# sysname Switch2 # vlan batch 10 # interface GigabitEthernet1/0/0 undo shutdown port default vlan 10 # interface GigabitEthernet1/0/1 undo shutdown port trunk allow-pass vlan 10 # return

Configuration file of Switch 3


# sysname Switch3 # vlan batch 20 # interface GigabitEthernet1/0/0 undo shutdown port default vlan 20 # interface GigabitEthernet1/0/1 undo shutdown port trunk allow-pass vlan 20 # return

5.13.8 Example for Configuring the Sub-interface for dotlq VLAN Tag Termination and QinQ VLAN Tag Termination to Access an L3VPN
Networking Requirements
As shown in Figure 5-27, both GE 1/0/0.1 of CE1 and that of CE3 are connected to PE1 through Switch 1. QinQ is configured on Switch 1 so that the outer VLAN tag with the VLAN ID as 100 is added to a user packet from CE1 or CE3. The public VLAN IDs are thus saved. Then the user packet sent from Switch 1 to PE1 carries double VLAN tags. CE2 and CE4 are connected to PE2 through Switch 2 and a user packet sent from Switch 2 to PE2 carries one VLAN tag. It is required that the sub-interface for QinQ VLAN tag termination be configured on PE1 to access the L3VPN; the sub-interface for dot1q VLAN tag termination be configured on PE2 to access the L3VPN. Then the user networks connected to CE1 and CE2 can communicate with each other; the user networks connected to CE3 and CE4 can communicate with each other.
NOTE

The types of the AC interfaces at both ends of the L3VPN are not necessarily associated with each other. The interfaces at both ends can be sub-interfaces for QinQ VLAN tag termination or sub-interfaces for dot1q VLAN tag termination.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-95

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Figure 5-27 Typical networking diagram of configuring the sub-interface for dot1q VLAN tag termination and QinQ VLAN tag termination to access an L3VPN
AS100 Loopback1 1.1.1.9/32 POS1/0/0 100.1.1.1/24 GE2/0/0.1 10.1.1.1/24 GE2/0/0.2 20.1.1.1/24 GE1/0/0 Switch1 GE1/0/1 GE1/0/2 POS1/0/0 100.1.1.2/24 P Loopback1 2.2.2.9/32 Loopback1 3.3.3.9/32 POS1/0/0 100.1.2.2/24 POS2/0/0 100.1.2.1/24 GE2/0/0.1 10.2.1.1/24 GE2/0/0.2 20.2.1.1/24 GE1/0/0 Switch2 GE1/0/1 GE1/0/2

PE1

PE2

GE1/0/0.1 10.1.1.2/24

GE1/0/0.1 20.1.1.2/24

GE1/0/0 10.2.1.2/24

GE1/0/0 20.2.1.2/24

CE1

AS65410

CE3

AS65411

AS65420

CE2

AS65421

CE4

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. 5. 6. 7. Configure the interface mode to user termination on PE1 and PE2. Run the IGP protocol to interconnect the routers on the backbone network. Configure and enable basic MPLS capabilities on the backbone network. Create the VPN instance, and configure the RD and VPN-Target. Bind the AC interface to the VPN instance. Configure Layer 2 forwarding and QinQ on switches. Configure an EBGP between the CE and the PE to exchange VPN routing information.

Data Preparation
To complete the configuration, you need the following data:
l l l l l

Name of PE interface connected to CE IP address of the interface VPN instance names of PE1 and PE2 RD and VPN-Target of the VPN-Instance Tag value of the sub-interface for dot1q VLAN tag termination and QinQ VLAN tag termination.

Configuration Procedure
1. Configure the interface mode to user termination. # Configure PE1.
5-96 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
<Quidway> system-view [Quidway] sysname PE1 [PE1] interface gigabitethernet 2/0/0 [PE1-GigabitEthernet2/0/0] mode user-termination [PE1-GigabitEthernet2/0/0] quit

5 QinQ Configuration

# Configure PE2.
<Quidway> system-view [Quidway] sysname PE2 [PE2] interface gigabitethernet 2/0/0 [PE2-GigabitEthernet2/0/0] mode user-termination [PE2-GigabitEthernet2/0/0] quit

2.

Configure IGP of the MPLS backbone network. OSPF is used in this example. According to Figure 5-27, configure the addresses for the interfaces on PE and P. Configure OSPF to advertise the addresses of the loopback interfaces on PE1, P, and PE2. # Configure PE1.
<PE1> system-view [PE1] interface loopback 1 [PE1-LoopBack1] ip address 1.1.1.9 32 [PE1-LoopBack1] quit [PE1] interface pos 1/0/0 [PE1-Pos1/0/0] ip address 100.1.1.1 24 [PE1-Pos1/0/0] quit [PE1] ospf [PE1-ospf-1] area 0 [PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0 [PE1-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255 [PE1-ospf-1-area-0.0.0.0] quit [PE1-ospf-1] quit

# Configure P.
<Quidway> system-view [Quidway] sysname P [P] interface LoopBack 1 [P-LoopBack1] ip address 2.2.2.9 32 [P-LoopBack1] quit [P] interface pos 1/0/0 [P-Pos1/0/0] ip address 100.1.1.2 24 [P-Pos1/0/0] quit [P] interface pos 2/0/0 [P-Pos2/0/0] ip address 100.1.2.1 24 [P-Pos2/0/0] quit [P] ospf [P-ospf-1] area 0 [P-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0 [P-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255 [P-ospf-1-area-0.0.0.0] network 100.1.2.0 0.0.0.255 [P-ospf-1-area-0.0.0.0] quit [P-ospf-1] quit

# Configure PE2.
<PE2> system-view [PE2] interface loopback 1 [PE2-LoopBack1] ip address 3.3.3.9 32 [PE2-LoopBack1] quit [PE2] interface pos 1/0/0 [PE2-Pos1/0/0] ip address 100.1.2.2 24 [PE2-Pos1/0/0] quit [PE2] ospf [PE2-ospf-1] area 0 [PE2-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0 [PE2-ospf-1-area-0.0.0.0] network 100.1.2.0 0.0.0.255 [PE2-ospf-1-area-0.0.0.0] quit [PE2-ospf-1] quit

After the preceding steps, PE1 and PE2 have routes, discovered through OSPF, to loopback1 interface of each other. PE1 and PE2 can ping through each other.
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-97

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Take the display on PE1 as an example:


<PE1> display ip routing-table Route Flags: R - relied, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 9 Routes : 9 Destination/Mask Proto Pre Cost Flags NextHop Interface 1.1.1.9/32 Direct 0 0 D 127.0.0.1 InLoopBack0 2.2.2.9/32 OSPF 10 2 D 100.1.1.2 Pos1/0/0 3.3.3.9/32 OSPF 10 3 D 100.1.1.2 Pos1/0/0 100.1.1.0/24 Direct 0 0 D 100.1.1.1 Pos1/0/0 100.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 100.1.1.2/32 Direct 0 0 D 100.1.1.2 Pos1/0/0 100.1.2.0/24 OSPF 10 2 D 100.1.1.2 Pos1/0/0 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 <PE1> ping 100.1.2.2 PING 100.1.2.2: 56 data bytes, press CTRL_C to break Reply from 100.1.2.2: bytes=56 Sequence=1 ttl=254 time=200 ms Reply from 100.1.2.2: bytes=56 Sequence=2 ttl=254 time=60 ms Reply from 100.1.2.2: bytes=56 Sequence=3 ttl=254 time=90 ms Reply from 100.1.2.2: bytes=56 Sequence=4 ttl=254 time=90 ms Reply from 100.1.2.2: bytes=56 Sequence=5 ttl=254 time=90 ms --- 100.1.2.2 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 60/106/200 ms

3.

Enable the basic MPLS capabilities and LDP on the MPLS backbone network. # Configure PE1.
[PE1] mpls lsr-id 1.1.1.9 [PE1] mpls [PE1-mpls] quit [PE1] mpls ldp [PE1-mpls-ldp] quit [PE1] interface pos 1/0/0 [PE1-Pos1/0/0] mpls [PE1-Pos1/0/0] mpls ldp [PE1-Pos1/0/0] quit

# Configure P.
[P] mpls lsr-id 2.2.2.9 [P] mpls [P-mpls] quit [P] mpls ldp [P-mpls-ldp] quit [P] interface pos1/0/0 [P-Pos1/0/0] mpls [P-Pos1/0/0] mpls ldp [P-Pos1/0/0] quit [P] interface pos2/0/0 [P-Pos2/0/0] mpls [P-Pos2/0/0] mpls ldp [P-Pos2/0/0] quit

# Configure PE2.
[PE2] mpls lsr-id 3.3.3.9 [PE2] mpls [PE2-mpls] quit [PE2] mpls ldp [PE2-mpls-ldp] quit [PE2] interface pos 1/0/0 [PE2-Pos1/0/0] mpls [PE2-Pos1/0/0] mpls ldp [PE2-Pos1/0/0] quit

5-98

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

After the configuration, the sessions between PE1 and the P and between PE2 and the P are set up. Running the display mpls ldp session command, you can view that the status is "Operational". Running the display mpls ldp lsp command, you can view the establishing status of LDP LSP. For example, the following displays the session information on PE1.
<PE1> display mpls ldp session LDP Session(s) in Public Network -----------------------------------------------------------------------------Peer-ID Status LAM SsnRole SsnAge KA-Sent/Rcv -----------------------------------------------------------------------------2.2.2.9:0 Operational DU Passive 000:00:01 5/5 -----------------------------------------------------------------------------TOTAL: 1 session(s) Found. LAM : Label Advertisement Mode SsnAge Unit : DDD:HH:MM <PE1> display mpls ldp lsp LDP LSP Information -----------------------------------------------------------------------------SN DestAddress/Mask In/OutLabel Next-Hop In/Out-Interface -----------------------------------------------------------------------------1 1.1.1.9/32 3/NULL 127.0.0.1 Pos1/0/0/InLoop0 2 2.2.2.9/32 NULL/3 100.1.1.2 -------/Pos1/0/0 3 3.3.3.9/32 NULL/1024 100.1.1.2 -------/Pos1/0/0 4 100.1.2.0/24 NULL/3 100.1.1.2 -------/Pos1/0/0 -----------------------------------------------------------------------------TOTAL: 4 Normal LSP(s) Found. TOTAL: 0 Liberal LSP(s) Found. A '*' before an LSP means the LSP is not established A '*' before a Label means the USCB or DSCB is stale

4.

Configure VPN instances on PEs and bind the VPN instances to the sub-interface for dot1q VLAN tag termination and QinQ VLAN tag termination. # Configure PE1.
<PE1> system-view [PE1] ip vpn-instance vpn1 [PE1-vpn-instance-vpn1] route-distinguisher 100:1 [PE1-vpn-instance-vpn1] vpn-target 100:1 both [PE1-vpn-instance-vpn1] quit [PE1] interface gigabitethernet 2/0/0.1 [PE1-GigabitEthernet2/0/0.1] control-vid 1 qinq-termination [PE1-GigabitEthernet2/0/0.1] qinq termination pe-vid 100 ce-vid 10 [PE1-GigabitEthernet2/0/0.1] ip binding vpn-instance vpn1 [PE1-GigabitEthernet2/0/0.1] ip address 10.1.1.1 24 [PE1-GigabitEthernet2/0/0.1] undo shutdown [PE1-GigabitEthernet2/0/0.1] quit [PE1] ip vpn-instance vpn2 [PE1-vpn-instance-vpn2] route-distinguisher 100:2 [PE1-vpn-instance-vpn2] vpn-target 200:2 both [PE1-vpn-instance-vpn2] quit [PE1] interface gigabitethernet 2/0/0.2 [PE1-GigabitEthernet2/0/0.2] control-vid 2 qinq-termination [PE1-GigabitEthernet2/0/0.2] qinq termination pe-vid 100 ce-vid 20 [PE1-GigabitEthernet2/0/0.2] ip binding vpn-instance vpn2 [PE1-GigabitEthernet2/0/0.2] ip address 20.1.1.1 24 [PE1-GigabitEthernet2/0/0.2] quit [PE1-GigabitEthernet2/0/0.2] undo shutdown

# Configure PE2.
<PE2> system-view [PE2] ip vpn-instance vpn1 [PE2-vpn-instance-vpn1] route-distinguisher 100:1

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-99

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[PE2-vpn-instance-vpn1] vpn-target 100:1 both [PE2-vpn-instance-vpn1] quit [PE2] interface gigabitethernet 2/0/0.1 [PE2-GigabitEthernet2/0/0.1] control-vid 1 dot1q-termination [PE2-GigabitEthernet2/0/0.1] dot1q termination vid 10 [PE2-GigabitEthernet2/0/0.1] ip binding vpn-instance vpn1 [PE2-GigabitEthernet2/0/0.1] ip address 10.2.1.1 24 [PE2-GigabitEthernet2/0/0.1] quit [PE2] ip vpn-instance vpn2 [PE2-vpn-instance-vpn2] route-distinguisher 100:2 [PE2-vpn-instance-vpn2] vpn-target 200:2 both [PE2-vpn-instance-vpn2] quit [PE2] interface gigabitethernet 2/0/0.2 [PE2-GigabitEthernet2/0/0.2] control-vid 2 dot1q-termination [PE2-GigabitEthernet2/0/0.2] dot1q termination vid 20 [PE2-GigabitEthernet2/0/0.2] ip binding vpn-instance vpn2 [PE2-GigabitEthernet2/0/0.2] ip address 20.2.1.1 24 [PE2-GigabitEthernet2/0/0.2] quit
NOTE

On different sub-interfaces, the vid values cannot overlap.

After the preceding steps, run the display ip vpn-instance verbose command on PEs to view configurations of VPN instances. Take the display on PE1 as an example:
<PE1> display ip vpn-instance verbose Total VPN-Instances configured : 2 VPN-Instance Name and ID : vpn1, 1 Create date : 2007/03/03 16:43:43 Up time : 0 days, 00 hours, 08 minutes and 19 seconds Route Distinguisher : 100:1 Export VPN Targets : 100:1 Import VPN Targets : 100:1 Label policy : label per route The diffserv-mode Information is : uniform The ttl-mode Information is : uniform Interfaces : GigabitEthernet2/0/0.1 VPN-Instance Name and ID : vpn2, 2 Create date : 2007/03/03 16:45:21 Up time : 0 days, 00 hours, 06 minutes and 40 seconds Route Distinguisher : 100:2 Export VPN Targets : 200:2 Import VPN Targets : 200:2 Label policy : label per route The diffserv-mode Information is : uniform The ttl-mode Information is : uniform Interfaces : GigabitEthernet2/0/0.2

5.

Configure the basic Layer 2 forwarding function. # Configure Switch 1. Create VLAN 100 on Switch 1 so that GE 1/0/1 and GE 1/0/2 add an outer VLAN tag with the VLAN ID as 100 to a packet of VLAN 10 or VLAN 20. Specify GE 1/0/0 as a trunk interface and configure it to allow the packets of VLAN 100 to pass through. # Configure Switch 2. Create VLAN 10 and VLAN 20 on Switch 2. Specify GE 1/0/1 and GE 1/0/2 as access interfaces, and add GE 1/0/1 to VLAN 10 and GE 1/0/2 to VLAN 20. Specify GE 1/0/0 as a trunk interface and configure it to allow the packets of VLAN 10 and VLAN 20 to pass through. # Configure IP addresses for interfaces of CEs as shown in Figure 5-27. The details are not mentioned here. After the configuration, All PEs can ping through their CEs.

5-100

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
NOTE

5 QinQ Configuration

When multiple interfaces on the PE are bound with the same VPN, you need to specify the source IP address that is the -a source-ip-address in the ping -vpn-instance vpn-instance-name -a sourceip-address dest-ip-address command when you run the ping -vpn-instance command; otherwise, the ping fails.

Take the display on PE1 as an example:


[PE1] ping -vpn-instance vpn1 10.1.1.2 PING 10.1.1.2: 56 data bytes, press CTRL_C to break Reply from 10.1.1.2: bytes=56 Sequence=1 ttl=255 time=50 Reply from 10.1.1.2: bytes=56 Sequence=2 ttl=255 time=60 Reply from 10.1.1.2: bytes=56 Sequence=3 ttl=255 time=60 Reply from 10.1.1.2: bytes=56 Sequence=4 ttl=255 time=40 Reply from 10.1.1.2: bytes=56 Sequence=5 ttl=255 time=60 --- 10.1.1.2 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 40/54/60 ms ms ms ms ms ms

6.

Set up EBGP peer relationships between the PEs and the CEs to import VPN routes. # Configure CE1.
[CE1] bgp 65410 [CE1-bgp] peer 10.1.1.1 as-number 100 [CE1-bgp] import-route direct

# Configure CE2.
[CE2] bgp 65420 [CE2-bgp] peer 10.2.1.1 as-number 100 [CE2-bgp] import-route direct

# Configure CE3.
[CE3] bgp 65411 [CE3-bgp] peer 20.1.1.1 as-number 100 [CE3-bgp] import-route direct

# Configure CE4.
[CE4] bgp 65421 [CE4-bgp] peer 20.2.1.1 as-number 100 [CE4-bgp] import-route direct

# Configure PE1.
[PE1] bgp 100 [PE1-bgp] ipv4-family vpn-instance vpn1 [PE1-bgp-vpn1] peer 10.1.1.2 as-number 65410 [PE1-bgp-vpn1] import-route direct [PE1-bgp-vpn1] quit [PE1-bgp] ipv4-family vpn-instance vpn2 [PE1-bgp-vpn1] peer 20.1.1.2 as-number 65411 [PE1-bgp-vpn1] import-route direct [PE1-bgp-vpn1] quit

# Configure PE2.
[PE2] bgp 100 [PE2-bgp] ipv4-family vpn-instance vpn1 [PE2-bgp-vpn1] peer 10.2.1.2 as-number 65420 [PE2-bgp-vpn1] import-route direct [PE2-bgp-vpn1] quit [PE2-bgp] ipv4-family vpn-instance vpn2 [PE2-bgp-vpn1] peer 20.2.1.2 as-number 65421 [PE2-bgp-vpn1] import-route direct

After the configuration, running the display bgp vpnv4 vpn-instance peer command on the PE, you can view that the BGP peer relationships are set up between the PEs and the CEs and are in the Established state. Take the display on PE1 as an example:
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-101

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[PE1] display bgp vpnv4 vpn-instance vpn1 peer BGP local router ID : 1.1.1.9 Local AS number : 100 Total number of peers : 1 Peers in established state : 1 Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv 10.1.1.2 4 65410 6 7 0 00:02:58 Established 1

7.

Set up MP-IBGP peer relationships between the PEs. # Configure PE1.


[PE1] bgp 100 [PE1-bgp] peer 3.3.3.9 as-number 100 [PE1-bgp] peer 3.3.3.9 connect-interface loopback 1 [PE1-bgp] ipv4-family vpnv4 [PE1-bgp-af-vpnv4] peer 3.3.3.9 enable [PE1-bgp-af-vpnv4] quit

# Configure PE2.
[PE2] bgp 100 [PE2-bgp] peer 1.1.1.9 as-number 100 [PE2-bgp] peer 1.1.1.9 connect-interface loopback 1 [PE2-bgp] ipv4-family vpnv4 [PE2-bgp-af-vpnv4] peer 1.1.1.9 enable [PE2-bgp-af-vpnv4] quit

After the configuration, running the display bgp peer or display bgp vpnv4 all peer command on the PE, you can view that the BGP peer relationships between the PEs are set up and are in the Established state.
[PE1] display bgp peer BGP local router ID : 1.1.1.9 Local AS number : 100 Total number of peers : 1 Peer V AS MsgRcvd 3.3.3.9 4 100 5 [PE1] display bgp vpnv4 all peer BGP local router ID : 1.1.1.9 Local AS number : 100 Total number of peers : 3 Peer V AS MsgRcvd 3.3.3.9 4 100 5 Peer of vpn instance : vpn instance vpn1 : 10.1.1.2 4 65410 6 1 vpn instance vpn2 : 20.1.1.2 4 65411 3 1

MsgSent 5

Peers in established state : 1 OutQ Up/Down State PrefRcv 0 00:00:58 Established 0

MsgSent 5 7 4

Peers in established state : 3 OutQ Up/Down State PrefRcv 0 00:01:28 Established 2 0 00:07:59 0 00:06:39 Established Established

8.

Verify the configuration. Run the display qinq information termination command. You can view information about QinQ VLAN tag termination. In addition, the sub-interface is bound to the L3VPN. Take the display on PE1 as an example:
[PE1] display qinq information termination interface gigabitethernet 2/0/0 GigabitEthernet2/0/0.1 L3VPN binded Total QinQ Num: 1 qinq termination pe-vid 100 ce-vid 10 Total vlan-group Num: 0 control-vid 1 qinq-termination GigabitEthernet2/0/0.2 L3VPN binded Total QinQ Num: 1 qinq termination pe-vid 100 ce-vid 20 Total vlan-group Num: 0 control-vid 2 qinq-termination

5-102

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

Run the display dot1q information termination command. You can view information about dot1q VLAN tag termination. In addition, the sub-interface is bound to the L3VPN. Take the display on PE2 as an example:
[PE2] display dot1q information termination interface gigabitethernet 2/0/0 GigabitEthernet2/0/0.1 L3VPN binded Total QinQ Num: 1 dot1q termination vid 10 Total vlan-group Num: 0 control-vid 1 dot1q-termination GigabitEthernet2/0/0.2 L3VPN binded Total QinQ Num: 1 dot1q termination vid 20 Total vlan-group Num: 0 control-vid 2 dot1q-termination

The hosts connected to CE1 and CE2 can ping through each other; the hosts connected to CE3 and CE4 can ping through each other. As they belong to different VPN instances, neither CE1 nor CE2 can communicate with CE3 or CE4. You can view relevant ARP entries on PEs. Take the display on PE1 as an example.
[PE1] display arp slot 1 IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-INSTANCE VLAN/ CEVLAN PVC ---------------------------------------------------------------------------------10.1.1.1 00e0-fc00-0001 I GE1/0/0.1 vpn1 20.1.1.1 00e0-fc00-0001 I GE1/0/0.2 vpn2 10.1.1.2 00e0-fc00-8fe6 12 DF1 GE1/0/0.1 vpn1 100/10 20.1.1.2 00e0-fc00-8fe6 13 DF1 GE1/0/0.2 vpn2 100/20 ---------------------------------------------------------------------------------Total:4 Dynamic:2 Static:0 Interface:2

Configuration Files
l

Configuration file of CE1


# sysname CE1 # interface GigabitEthernet1/0/0.1 vlan-type dot1q 10 ip address 10.1.1.2 255.255.255.0 # bgp 65410 peer 10.1.1.1 as-number 100 # ipv4-family unicast undo synchronization import-route direct peer 10.1.1.1 enable # return

Configuration file of CE2


# sysname CE2 # interface GigabitEthernet1/0/0 undo shutdown ip address 10.2.1.2 255.255.255.0 # bgp 65420

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-103

5 QinQ Configuration
peer 10.2.1.1 as-number 100 # ipv4-family unicast undo synchronization import-route direct peer 10.2.1.1 enable # return l

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Configuration file of CE3


# sysname CE3 # interface GigabitEthernet1/0/0.1 vlan-type dot1q 20 ip address 20.1.1.2 255.255.255.0 # bgp 65411 peer 20.1.1.1 as-number 100 # ipv4-family unicast undo synchronization import-route direct peer 20.1.1.1 enable # return

Configuration file of CE4


# sysname CE4 # interface GigabitEthernet1/0/0 undo shutdown ip address 20.2.1.2 255.255.255.0 # bgp 65421 peer 20.2.1.1 as-number 100 # ipv4-family unicast undo synchronization import-route direct peer 20.2.1.1 enable # return

Configuration file of PE1


# sysname PE1 # ip vpn-instance vpn1 route-distinguisher 100:1 vpn-target 100:1 export-extcommunity vpn-target 100:1 import-extcommunity # ip vpn-instance vpn2 route-distinguisher 100:2 vpn-target 200:2 export-extcommunity vpn-target 200:2 import-extcommunity # mpls lsr-id 1.1.1.9 mpls # mpls ldp # interface GigabitEthernet2/0/0 undo shutdown mode user-termination # interface GigabitEthernet2/0/0.1 control-vid 1 qinq-termination

5-104

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
qinq termination pe-vid 100 ce-vid 10 ip binding vpn-instance vpn1 ip address 10.1.1.1 255.255.255.0 # interface GigabitEthernet2/0/0.2 control-vid 2 qinq-termination qinq termination pe-vid 100 ce-vid 20 ip binding vpn-instance vpn2 ip address 20.1.1.1 255.255.255.0 # interface Pos1/0/0 link-protocol ppp undo shutdown ip address 100.1.1.1 255.255.255.0 mpls mpls ldp # interface LoopBack1 ip address 1.1.1.9 255.255.255.255 # bgp 100 peer 3.3.3.9 as-number 100 peer 3.3.3.9 connect-interface LoopBack1 # ipv4-family unicast undo synchronization peer 3.3.3.9 enable # ipv4-family vpnv4 policy vpn-target peer 3.3.3.9 enable # ipv4-family vpn-instance vpn1 peer 10.1.1.2 as-number 65410 import-route direct # ipv4-family vpn-instance vpn2 peer 20.1.1.2 as-number 65411 import-route direct # ospf 1 area 0.0.0.0 network 1.1.1.9 0.0.0.0 network 100.1.1.0 0.0.0.255 # return l

5 QinQ Configuration

Configuration file of P
# sysname P # mpls lsr-id 2.2.2.9 mpls # mpls ldp # interface Pos1/0/0 link-protocol ppp undo shutdown ip address 100.1.1.2 255.255.255.0 mpls mpls ldp # interface Pos2/0/0 link-protocol ppp undo shutdown ip address 100.1.2.1 255.255.255.0 mpls mpls ldp #

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-105

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
interface LoopBack1 ip address 2.2.2.9 255.255.255.255 # ospf 1 area 0.0.0.0 network 2.2.2.9 0.0.0.0 network 100.1.1.0 0.0.0.255 network 100.1.2.0 0.0.0.255 # return

Configuration file of PE2


# sysname PE2 # ip vpn-instance vpn1 route-distinguisher 200:1 vpn-target 100:1 export-extcommunity vpn-target 100:1 import-extcommunity # ip vpn-instance vpn2 route-distinguisher 200:2 vpn-target 200:2 export-extcommunity vpn-target 200:2 import-extcommunity # mpls lsr-id 3.3.3.9 mpls # mpls ldp # interface GigabitEthernet2/0/0 undo shutdown mode user-termination # interface GigabitEthernet2/0/0.1 control-vid 1 dot1q-termination dot1q termination vid 10 ip binding vpn-instance vpn1 ip address 10.2.1.1 255.255.255.0 # interface GigabitEthernet2/0/0.2 control-vid 2 dot1q-termination dot1q termination vid 20 ip binding vpn-instance vpn2 ip address 20.2.1.1 255.255.255.0 # interface Pos1/0/0 link-protocol ppp undo shutdown ip address 100.1.2.2 255.255.255.0 mpls mpls ldp # interface LoopBack1 ip address 3.3.3.9 255.255.255.255 # bgp 100 peer 1.1.1.9 as-number 100 peer 1.1.1.9 connect-interface LoopBack1 # ipv4-family unicast undo synchronization peer 1.1.1.9 enable # ipv4-family vpnv4 policy vpn-target peer 1.1.1.9 enable # ipv4-family vpn-instance vpn1 import-route direct

5-106

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
peer 10.2.1.2 as-number 65420 # ipv4-family vpn-instance vpn2 import-route direct peer 20.2.1.2 as-number 65421 # ospf 1 area 0.0.0.0 network 3.3.3.9 0.0.0.0 network 100.1.2.0 0.0.0.255 # return

5 QinQ Configuration

5.13.9 Example for Configuring the Sub-interface for QinQ VLAN Tag Termination to Access a VLL
Networking Requirements
As shown in Figure 5-28, GE 1/0/0.1 of CE1 is connected to PE1 through Switch. Configure QinQ on Switch. A packet from CE1 is then added with an outer VLAN tag with the VLAN ID as 100 to save public VLAN IDs. In this example Martini is adopted. Then the packet sent from Switch to PE1 carries double VLAN tags. CE2 accesses PE2 through a common sub-interface. It is required that the sub-interface for QinQ VLAN tag termination on PE1 be configured to access a VLL; the common sub-interface on PE2 be configured to access the VLL. The user networks connected CE1 and CE2 can thus communicate.
NOTE

At both ends of a VLL, an unsymmetric sub-interface for QinQ VLAN tag termination can communicate with other types of AC interfaces; a symmetric sub-interface for QinQ VLAN tag termination can communicate with only symmetric sub-interfaces for QinQ VLAN tag termination.

Figure 5-28 Typical networking diagram of configuring the sub-interface for QinQ VLAN tag termination to access a VLL
Loopback1 1.1.1.9/32 POS1/0/0 100.1.1.1/24 GE2/0/0.1 POS1/0/0 100.1.1.2/24 P Loopback1 2.2.2.9/32 Loopback1 3.3.3.9/32 POS1/0/0 100.1.2.2/24 POS2/0/0 100.1.2.1/24 GE2/0/0.1 GE1/0/0.1 10.1.1.2/24

PE1

PE2

GE1/0/0 Switch GE1/0/1 GE1/0/0.1 10.1.1.1/24

CE2 VPN1

CE1 VPN1

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-107

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. 5. 6. Configure the interface mode to user termination on PE1. Configure IGP run on the MPLS backbone network, implementing inter-communication between routers on the backbone network. Enable the basic MPLS capabilities on the MPLS backbone network and establish an LSP tunnel. Set up MPLS LDP peer relationship between PEs on two ends of a Pseudo Wire (PW). Configure the Layer 2 forwarding function and QinQ on switches. Create a MPLS L2VC connection between PEs.

Data Preparation
To complete the configuration, you need the following data:
l l l l l l

Name of PE interface connected to CE IP address of the interface Consistent L2VC IDs on the both ends of PW MPLS LSR-IDs on PEs and P IP address of the PE peer Tag value of the sub-interface for QinQ VLAN tag termination

Configuration Procedure
1. Configure the interface mode to user termination. # Configure PE1.
<Quidway> system-view [Quidway] sysname PE1 [PE1] interface gigabitethernet 2/0/0 [PE1-GigabitEthernet2/0/0] mode user-termination [PE1-GigabitEthernet2/0/0] quit

2.

Configure IGP on the MPLS backbone network. OSPF is used in this example. According to Figure 5-28, configure the addresses for the interfaces on PE and P. Configure OSPF to advertise the addresses of the loopback interfaces on PE1, P, and PE2. # Configure PE1.
[PE1] interface loopback 1 [PE1-LoopBack1] ip address 1.1.1.9 32 [PE1-LoopBack1] quit [PE1] interface pos 1/0/0 [PE1-Pos1/0/0] ip address 100.1.1.1 24 [PE1-Pos1/0/0] quit [PE1] ospf [PE1-ospf-1] area 0 [PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0 [PE1-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255 [PE1-ospf-1-area-0.0.0.0] quit [PE1-ospf-1] quit

# Configure P.
<Quidway> system-view [Quidway] sysname P [P] interface LoopBack 1

5-108

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[P-LoopBack1] ip address 2.2.2.9 32 [P-LoopBack1] quit [P] interface pos 1/0/0 [P-Pos1/0/0] ip address 100.1.1.2 24 [P-Pos1/0/0] quit [P] interface pos 2/0/0 [P-Pos2/0/0] ip address 100.1.2.1 24 [P-Pos2/0/0] quit [P] ospf [P-ospf-1] area 0 [P-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0 [P-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255 [P-ospf-1-area-0.0.0.0] network 100.1.2.0 0.0.0.255 [P-ospf-1-area-0.0.0.0] quit [P-ospf-1] quit

5 QinQ Configuration

# Configure PE2.
<Quidway> system-view [Quidway] sysname PE2 [PE2] interface loopback 1 [PE2-LoopBack1] ip address 3.3.3.9 32 [PE2-LoopBack1] quit [PE2] interface pos 1/0/0 [PE2-Pos1/0/0] ip address 100.1.2.2 24 [PE2-Pos1/0/0] quit [PE2] ospf [PE2-ospf-1] area 0 [PE2-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0 [PE2-ospf-1-area-0.0.0.0] network 100.1.2.0 0.0.0.255 [PE2-ospf-1-area-0.0.0.0] quit [PE2-ospf-1] quit

After this step, PE1 and PE2 learn the route to the loopback interface of the peer through the OSPF protocol. PE1 and PE2 can ping through each other. Take the display on PE1 as an example:
<PE1> display ip routing-table Route Flags: R - relied, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 9 Routes : 9 Destination/Mask Proto Pre Cost Flags NextHop Interface 1.1.1.9/32 Direct 0 0 D 127.0.0.1 InLoopBack0 2.2.2.9/32 OSPF 10 2 D 100.1.1.2 Pos1/0/0 3.3.3.9/32 OSPF 10 3 D 100.1.1.2 Pos1/0/0 100.1.1.0/24 Direct 0 0 D 100.1.1.1 Pos1/0/0 100.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 100.1.1.2/32 Direct 0 0 D 100.1.1.2 Pos1/0/0 100.1.2.0/24 OSPF 10 2 D 100.1.1.2 Pos1/0/0 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 <PE1> ping 100.1.2.2 PING 100.1.2.2: 56 data bytes, press CTRL_C to break Reply from 100.1.2.2: bytes=56 Sequence=1 ttl=254 time=200 ms Reply from 100.1.2.2: bytes=56 Sequence=2 ttl=254 time=60 ms Reply from 100.1.2.2: bytes=56 Sequence=3 ttl=254 time=90 ms Reply from 100.1.2.2: bytes=56 Sequence=4 ttl=254 time=90 ms Reply from 100.1.2.2: bytes=56 Sequence=5 ttl=254 time=90 ms --- 100.1.2.2 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 60/106/200 ms

3.

Enable the basic MPLS capabilities and LDP on the MPLS backbone network. # Configure PE1.
[PE1] mpls lsr-id 1.1.1.9 [PE1] mpls [PE1-mpls] quit

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-109

5 QinQ Configuration
[PE1] mpls ldp [PE1-mpls-ldp] quit [PE1] interface pos 1/0/0 [PE1-Pos1/0/0] mpls [PE1-Pos1/0/0] mpls ldp [PE1-Pos1/0/0] quit

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

# Configure P.
[P] mpls lsr-id 2.2.2.9 [P] mpls [P-mpls] quit [P] mpls ldp [P-mpls-ldp] quit [P] interface pos1/0/0 [P-Pos1/0/0] mpls [P-Pos1/0/0] mpls ldp [P-Pos1/0/0] quit [P] interface pos2/0/0 [P-Pos2/0/0] mpls [P-Pos2/0/0] mpls ldp [P-Pos2/0/0] quit

# Configure PE2.
[PE2] mpls lsr-id 3.3.3.9 [PE2] mpls [PE2-mpls] quit [PE2] mpls ldp [PE2-mpls-ldp] quit [PE2] interface pos 1/0/0 [PE2-Pos1/0/0] mpls [PE2-Pos1/0/0] mpls ldp [PE2-Pos1/0/0] quit

After the preceding configurations, LDP sessions are set up between PE1 and P, and between P and PE1. Running the display mpls ldp session command, you can see the Status field is "Operational". Run the display mpls ldp lsp command to view the establishing status of LDPLSP. Take the display on PE1 as an example:
<PE1> display mpls ldp session LDP Session(s) in Public Network -----------------------------------------------------------------------------Peer-ID Status LAM SsnRole SsnAge KA-Sent/Rcv -----------------------------------------------------------------------------2.2.2.9:0 Operational DU Passive 000:00:02 11/11 -----------------------------------------------------------------------------TOTAL: 1 session(s) Found. LAM : Label Advertisement Mode SsnAge Unit : DDD:HH:MM <PE1> display mpls ldp lsp LDP LSP Information -----------------------------------------------------------------------------SN DestAddress/Mask In/OutLabel Next-Hop In/Out-Interface -----------------------------------------------------------------------------1 1.1.1.9/32 3/NULL 127.0.0.1 Pos1/0/0/InLoop0 2 2.2.2.9/32 NULL/3 100.1.1.2 -------/Pos1/0/0 3 3.3.3.9/32 NULL/1025 100.1.1.2 -------/Pos1/0/0 -----------------------------------------------------------------------------TOTAL: 3 Normal LSP(s) Found. TOTAL: 0 Liberal LSP(s) Found. A '*' before an LSP means the LSP is not established A '*' before a Label means the USCB or DSCB is stale

4.
5-110

Set up the remote LDP session between PEs.


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

# Configure PE1.
[PE1] mpls ldp remote-peer 1 [PE1-mpls-ldp-remote-1] remote-ip 3.3.3.9 [PE1-mpls-ldp-remote-1] quit

# Configure PE2.
[PE2] mpls ldp remote-peer 1 [PE2-mpls-ldp-remote-1] remote-ip 1.1.1.9 [PE2-mpls-ldp-remote-1] quit

After the configuration, the sessions between PE1 and P and between PE2 and P are set up. Running the display mpls ldp session command, you can view that the Status field is "Operational". Running the display mpls ldp lsp command, you can view the establishing status of LDP LSP. For example, the following displays the session information on PE1:
<PE1> display mpls ldp session LDP Session(s) in Public Network -----------------------------------------------------------------------------Peer-ID Status LAM SsnRole SsnAge KA-Sent/Rcv -----------------------------------------------------------------------------2.2.2.9:0 Operational DU Passive 000:00:04 18/18 3.3.3.9:0 Operational DU Passive 000:00:00 2/2 -----------------------------------------------------------------------------TOTAL: 2 session(s) Found. LAM : Label Advertisement Mode SsnAge Unit : DDD:HH:MM <PE1> display mpls ldp lsp LDP LSP Information -----------------------------------------------------------------------------SN DestAddress/Mask In/OutLabel Next-Hop In/Out-Interface -----------------------------------------------------------------------------1 1.1.1.9/32 3/NULL 127.0.0.1 P1/0/0/InLoop0 2 1.1.1.9/32 3/NULL 127.0.0.1 -------/InLoop0 *3 1.1.1.9/32 Liberal 4 2.2.2.9/32 NULL/3 100.1.1.2 -------/P1/0/0 5 2.2.2.9/32 1024/3 100.1.1.2 -------/P1/0/0 *6 2.2.2.9/32 Liberal 7 3.3.3.9/32 NULL/1025 100.1.1.2 -------/P1/0/0 8 3.3.3.9/32 1025/1025 100.1.1.2 -------/P1/0/0 *9 3.3.3.9/32 Liberal -----------------------------------------------------------------------------TOTAL: 6 Normal LSP(s) Found. TOTAL: 3 Liberal LSP(s) Found. A '*' before an LSP means the LSP is not established A '*' before a Label means the USCB or DSCB is stale

5.

Enable MPLS L2VPN and create a VC. Configure the sub-interface for QinQ VLAN tag termination. # Configure PE1.
[PE1] mpls l2vpn [PE1-l2vpn] mpls l2vpn default martini [PE1-l2vpn] quit [PE1] interface gigabitethernet 2/0/0.1 [PE1-GigabitEthernet2/0/0.1] control-vid 1 qinq-termination [PE1-GigabitEthernet2/0/0.1] qinq termination pe-vid 100 ce-vid 10 [PE1-GigabitEthernet2/0/0.1] mpls l2vc 3.3.3.9 101 [PE1-GigabitEthernet2/0/0.1] quit [PE1] interface gigabitethernet 2/0/0.2 [PE1-GigabitEthernet2/0/0.2] control-vid 2 qinq-termination [PE1-GigabitEthernet2/0/0.2] qinq termination l2 symmetry [PE1-GigabitEthernet2/0/0.2] qinq termination pe-vid 100 ce-vid 20

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-111

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[PE1-GigabitEthernet2/0/0.2] mpls l2vc 3.3.3.9 102 [PE1-GigabitEthernet2/0/0.2] quit

# Configure PE2.
[PE2] mpls l2vpn [PE2-l2vpn] mpls l2vpn default martini [PE2-l2vpn] quit [PE2] interface gigabitethernet 2/0/0.1 [PE2-GigabitEthernet2/0/0.1] vlan-type dot1q 10 [PE2-GigabitEthernet2/0/0.1] mpls l2vc 1.1.1.9 101 [PE2-GigabitEthernet2/0/0.1] quit

6.

Configure QinQ so that a packet sent from the switch to the PE1 carries double VLAN tags. Configure GE 1/0/1 on Switch to add an outer VLAN tag with the VLAN ID as 100 to a packet of VLAN 10. Specify GE 1/0/1 as a trunk interface and configure it to allow the packets of VLAN 100 to pass through.

7.

Configure IP addresses of the interfaces of the CEs. # Configure CE1.


<Quidway> system-view [Quidway] sysname CE1 [CE1] interface gigabitethernet 1/0/0.1 [CE1-GigabitEthernet1/0/0.1] ip address 10.1.1.1 24 [CE1-GigabitEthernet1/0/0.1] vlan-type dot1q 10 [CE1-GigabitEthernet1/0/0.1] quit

# Configure CE2.
<Quidway> system-view [Quidway] sysname CE2 [CE2] interface gigabitethernet 1/0/0.1 [CE2-GigabitEthernet1/0/0.1] ip address 10.1.1.2 24 [CE2-GigabitEthernet1/0/0.1] vlan-type dot1q 10 [CE2-GigabitEthernet1/0/0.1] quit

8.

Verify the configuration. Running the display qinq information termination command, you can view the QinQ terminating information. For example, the following displays the stacking information on PE1:
<PE1> display qinq information termination interface gigabitethernet 2/0/0.1 GigabitEthernet2/0/0.1 VLL/PWE3 binded qinq termination l2 symmetry Total QinQ Num: 1 qinq termination pe-vid 100 ce-vid 10 Total vlan-group Num: 0 control-vid 1 qinq-termination GigabitEthernet2/0/0.2 VLL/PWE3 binded qinq termination l2 symmetry Total QinQ Num: 1 qinq termination pe-vid 100 ce-vid 20 Total vlan-group Num: 0 control-vid 2 qinq-termination

View the L2VPN information on the PE. You can find that an L2 VA is created and is Up. Take the display on PE1 as an example:
<PE1> display mpls l2vc total LDP VC : 2 2 up 0 down *client interface : GigabitEthernet2/0/0.1 session state : up AC status : up VC state : up VC ID : 101 VC type : VLAN destination : 3.3.3.9

5-112

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
local VC label : control word : forwarding entry : local group ID : manual fault : active state : link state : local VC MTU : tunnel policy name : traffic behavior name: PW template name : primary or secondary : create time : up time : last change time : *client interface : session state : AC status : VC state : VC ID : VC type : destination : local VC label : control word : forwarding entry : local group ID : manual fault : active state : link state : local VC MTU : tunnel policy name : traffic behavior name: PW template name : primary or secondary : create time : up time : last change time : 21504 remote VC label disable existent 0 not set active up 1500 remote VC MTU ---primary 0 days, 0 hours, 7 minutes, 53 0 days, 0 hours, 2 minutes, 29 0 days, 0 hours, 2 minutes, 29 GigabitEthernet2/0/0.2 up up up 102 VLAN 3.3.3.9 21505 remote VC label disable existent 0 not set active up 1500 remote VC MTU ---primary 0 days, 0 hours, 7 minutes, 50 0 days, 0 hours, 2 minutes, 29 0 days, 0 hours, 2 minutes, 29

5 QinQ Configuration
: 21504

: 1500

seconds seconds seconds

: 21505

: 1500

seconds seconds seconds

On CEs, the attached hosts can ping through each other if they are in the same VLAN. Take the display on CE1 as an example:
<CE1> ping 10.1.1.2 PING 10.1.1.2: 56 data bytes, press CTRL_C to break Reply from 10.1.1.2: bytes=56 Sequence=1 ttl=255 time=80 Reply from 10.1.1.2: bytes=56 Sequence=2 ttl=255 time=30 Reply from 10.1.1.2: bytes=56 Sequence=3 ttl=255 time=60 Reply from 10.1.1.2: bytes=56 Sequence=4 ttl=255 time=60 Reply from 10.1.1.2: bytes=56 Sequence=5 ttl=255 time=60 --- 10.1.1.2 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 30/58/80 ms ms ms ms ms ms

Configuration Files
l

Configuration file of CE1


# sysname CE1 # interface GigabitEthernet1/0/0.1 vlan-type dot1q 10 ip address 10.1.1.1 255.255.255.0 # return

Configuration file of CE2


# sysname CE2

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-113

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
# interface GigabitEthernet1/0/0.1 vlan-type dot1q 10 ip address 10.1.1.2 255.255.255.0 # return

Configuration file of PE1


# sysname PE1 # mpls lsr-id 1.1.1.9 mpls # mpls l2vpn mpls l2vpn default martini # mpls ldp # mpls ldp remote-peer 3.3.3.9 remote-ip 3.3.3.9 # interface GigabitEthernet2/0/0 undo shutdown mode user-termination # interface GigabitEthernet2/0/0.1 control-vid 1 qinq-termination qinq termination pe-vid 100 ce-vid 10 mpls l2vc 3.3.3.9 101 # interface Pos1/0/0 link-protocol ppp undo shutdown ip address 100.1.1.1 255.255.255.0 mpls mpls ldp # interface LoopBack1 ip address 1.1.1.9 255.255.255.255 # ospf 1 area 0.0.0.0 network 1.1.1.9 0.0.0.0 network 100.1.1.0 0.0.0.255 # return

Configuration file of P
# sysname P # mpls lsr-id 2.2.2.9 mpls # mpls ldp # interface Pos1/0/0 link-protocol ppp undo shutdown ip address 100.1.1.2 255.255.255.0 mpls mpls ldp # interface Pos2/0/0 link-protocol ppp undo shutdown ip address 100.1.2.1 255.255.255.0 mpls mpls ldp

5-114

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
# interface LoopBack1 ip address 2.2.2.9 255.255.255.255 # ospf 1 area 0.0.0.0 network 2.2.2.9 0.0.0.0 network 100.1.1.0 0.0.0.255 network 100.1.2.0 0.0.0.255 # return l

5 QinQ Configuration

Configuration file of PE2


# sysname PE2 # mpls lsr-id 3.3.3.9 mpls # mpls l2vpn mpls l2vpn default martini # mpls ldp # mpls ldp remote-peer 1.1.1.9 remote-ip 1.1.1.9 # interface GigabitEthernet2/0/0.1 vlan-type dot1q 10 mpls l2vc 1.1.1.9 101 # interface Pos1/0/0 link-protocol ppp undo shutdown ip address 100.1.2.2 255.255.255.0 mpls mpls ldp # interface LoopBack1 ip address 3.3.3.9 255.255.255.255 # ospf 1 area 0.0.0.0 network 3.3.3.9 0.0.0.0 network 100.1.2.0 0.0.0.255 # return

5.13.10 Example for Configuring the Sub-interface for dot1q VLAN Tag Termination and QinQ VLAN Tag Termination to Access a VPLS
Networking Requirements
As shown in Figure 5-29, CE1 and CE2 are connected to PE1and PE2 through switches. CE3 is connected to PE3 through a sub-interface. A packet sent from CE1 to Switch 1 carries one VLAN tag; the packet sent from CE2 to Switch 2 carries no VLAN tag. The Switch then labels the packets from the CE with outer tags based on the inbound interface and then sends the packets to the PE. It is required to configure the sub-interface for QinQ VLAN tag termination on PE1 and the sub-interface for dot1q VLAN tag termination on PE2 to access VPLS to implement inter-communication between CEs 1 to 3. The backbone network adopts Martini VPLS and uses LDP to set up PWs.
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-115

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Figure 5-29 Typical networking diagram of configuring the sub-interface for dot1q VLAN tag termination and QinQ VLAN tag termination to access VPLS
VPN1 CE3

GE1/0/0.1 10.1.1.3/24 GE2/0/0.1 POS1/0/0 100.1.1.2/30 PE3 Loopback1 3.3.3.9/32 POS1/0/1 100.1.1.1/30 Loopback1 1.1.1.9/32 PE1 POS1/0/0 100.1.3.1/30 GE2/0/0.1 GE1/0/0 Switch1 GE1/0/1 GE1/0/0.1 10.1.1.1/24 POS1/0/0 100.1.3.2/30 GE2/0/0.1 GE1/0/0 Switch2 GE1/0/1 GE1/0/0 10.1.1.2/24 PE2 POS1/0/1 100.1.2.2/30 Loopback1 2.2.2.9/32 POS1/0/1 100.1.2.1/30

CE1 VPN1 VLAN10

CE2 VPN1 VLAN10

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. 5. 6. 7. Configure the interface mode to user termination on PEs. Run IGP on the backbone network and interconnect the routers on the backbone network. Configure the routing protocol on the backbone network to interconnect the routers and enable the basic MPLS capabilities. Set up the LSP tunnel between PEs. Enable MPLS L2VPN on PE. Configure the Layer 2 forwarding function on switches. Bind the AC interface to the VSI.

Data Preparation
To complete the configuration, you need the following data:
5-116 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
l l l l l

5 QinQ Configuration

IP address of the interface Consistent L2VC IDs on the both ends of PW MPLS LSR-IDs on PEs VSI names on PE1, PE2, and PE3 Interface bound to VSI

Configuration Procedure
1. Configure the interface mode to user termination. # Configure PE1.
<Quidway> system-view [Quidway] sysname PE1 [PE1] interface gigabitethernet 2/0/0 [PE1-GigabitEthernet2/0/0] mode user-termination [PE1-GigabitEthernet2/0/0] quit

# Configure PE2.
<Quidway> system-view [Quidway] sysname PE2 [PE2] interface gigabitethernet 2/0/0 [PE2-GigabitEthernet2/0/0] mode user-termination [PE2-GigabitEthernet2/0/0] quit

2.

Configure IGP on the MPLS backbone network. OSPF is used in this example. According to Figure 5-29, configure the addresses for the interfaces on PE and P. Configure OSPF to advertise the addresses of the loopback interfaces on PE1, PE2, and PE3. # Configure PE1.
[PE1] interface loopback 1 [PE1-LoopBack1] ip address 1.1.1.9 32 [PE1-LoopBack1] quit [PE1] interface pos 1/0/0 [PE1-Pos1/0/0] ip address 100.1.3.1 30 [PE1-Pos1/0/0] quit [PE1] interface pos 1/0/1 [PE1-Pos1/0/1] ip address 100.1.1.1 30 [PE1-Pos1/0/1] quit [PE1] ospf [PE1-ospf-1] area 0 [PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0 [PE1-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.3 [PE1-ospf-1-area-0.0.0.0] network 100.1.3.0 0.0.0.3 [PE1-ospf-1-area-0.0.0.0] quit [PE1-ospf-1] quit

# Configure PE2.
[PE2] interface LoopBack 1 [PE2-LoopBack1] ip address 2.2.2.9 32 [PE2-LoopBack1] quit [PE2] interface pos 1/0/0 [PE2-Pos1/0/0] ip address 100.1.3.2 30 [PE2-Pos1/0/0] quit [PE2] interface pos 1/0/1 [PE2-Pos1/0/1] ip address 100.1.2.2 30 [PE2-Pos1/0/1] quit [PE2] ospf [PE2-ospf-1] area 0 [PE2-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0 [PE2-ospf-1-area-0.0.0.0] network 100.1.3.0 0.0.0.3 [PE2-ospf-1-area-0.0.0.0] network 100.1.2.0 0.0.0.3 [PE2-ospf-1-area-0.0.0.0] quit [PE2-ospf-1] quit

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-117

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

# Configure PE3.
<Quidway> system-view [Quidway] sysname PE3 [PE3] interface loopback 1 [PE3-LoopBack1] ip address 3.3.3.9 32 [PE3-LoopBack1] quit [PE3] interface pos 1/0/0 [PE3-Pos1/0/0] ip address 100.1.1.2 30 [PE3-Pos1/0/0] quit [PE3] interface pos 1/0/1 [PE3-Pos1/0/1] ip address 100.1.2.1 30 [PE3-Pos1/0/1] quit [PE3] ospf [PE3-ospf-1] area 0 [PE3-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0 [PE3-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.3 [PE3-ospf-1-area-0.0.0.0] network 100.1.2.0 0.0.0.3 [PE3-ospf-1-area-0.0.0.0] quit [PE3-ospf-1] quit

After the preceding step, PE1 and PE2 both have routes, discovered through OSPF, to the loopback1 interface of each other. PE1 and PE3 also have routes, discovered through OSPF, to the loopback1 interface of each other. Take the display on PE1 as an example:
<PE1> display ip routing-table Route Flags: R - relied, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 12 Routes : 13 Destination/Mask Proto Pre Cost Flags NextHop Interface 1.1.1.9/32 Direct 0 0 D 127.0.0.1 InLoopBack0 2.2.2.9/32 OSPF 10 2 D 100.1.3.2 Pos1/0/0 3.3.3.9/32 OSPF 10 2 D 100.1.1.2 Pos1/0/1 100.1.1.0/30 Direct 0 0 D 100.1.1.1 Pos1/0/1 100.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 100.1.1.2/32 Direct 0 0 D 100.1.1.2 Pos1/0/1 100.1.2.0/30 OSPF 10 2 D 100.1.1.2 Pos1/0/1 OSPF 10 2 D 100.1.3.2 Pos1/0/0 100.1.3.0/30 Direct 0 0 D 100.1.3.1 Pos1/0/0 100.1.3.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 100.1.3.2/32 Direct 0 0 D 100.1.3.2 Pos1/0/0 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 <PE1> ping 100.1.2.2 PING 100.1.2.2: 56 data bytes, press CTRL_C to break Reply from 100.1.2.2: bytes=56 Sequence=1 ttl=255 time=250 ms Reply from 100.1.2.2: bytes=56 Sequence=2 ttl=255 time=30 ms Reply from 100.1.2.2: bytes=56 Sequence=3 ttl=255 time=60 ms Reply from 100.1.2.2: bytes=56 Sequence=4 ttl=255 time=60 ms Reply from 100.1.2.2: bytes=56 Sequence=5 ttl=255 time=60 ms --- 100.1.2.2 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 30/92/250 ms

3.

Enable the basic MPLS capabilities and LDP on the MPLS backbone network. # Configure PE1.
[PE1] mpls lsr-id 1.1.1.9 [PE1] mpls [PE1-mpls] quit [PE1] mpls ldp [PE1-mpls-ldp] quit [PE1] interface pos 1/0/0 [PE1-Pos1/0/0] mpls [PE1-Pos1/0/0] mpls ldp [PE1-Pos1/0/0] quit

5-118

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[PE1] interface pos 1/0/1 [PE1-Pos1/0/1] mpls [PE1-Pos1/0/1] mpls ldp [PE1-Pos1/0/1] quit

5 QinQ Configuration

# Configure PE2.
[PE2] mpls lsr-id 2.2.2.9 [PE2] mpls [PE2-mpls] quit [PE2] mpls ldp [PE2-mpls-ldp] quit [PE2] interface pos1/0/0 [PE2-Pos1/0/0] mpls [PE2-Pos1/0/0] mpls ldp [PE2-Pos1/0/0] quit [PE2] interface pos1/0/1 [PE2-Pos1/0/1] mpls [PE2-Pos1/0/1] mpls ldp [PE2-Pos1/0/1] quit

# Configure PE3.
[PE3] mpls lsr-id 3.3.3.9 [PE3] mpls [PE3-mpls] quit [PE3] mpls ldp [PE3-mpls-ldp] quit [PE3] interface pos 1/0/0 [PE3-Pos1/0/0] mpls [PE3-Pos1/0/0] mpls ldp [PE3-Pos1/0/0] quit [PE3] interface pos 1/0/1 [PE3-Pos1/0/1] mpls [PE3-Pos1/0/1] mpls ldp [PE3-Pos1/0/1] quit

After the preceding configurations, LDP sessions are set up between PEs. Running the display mpls ldp session command, you can view that the Status field is "Operational". Running the display mpls ldp lsp command, you can view the establishing status of LSP through LDP. For example, the following displays the session information on PE1:
<PE1> display mpls ldp session LDP Session(s) in Public Network -----------------------------------------------------------------------------Peer-ID Status LAM SsnRole SsnAge KA-Sent/Rcv -----------------------------------------------------------------------------2.2.2.9:0 Operational DU Passive 000:00:02 10/10 3.3.3.9:0 Operational DU Passive 000:00:02 9/9 -----------------------------------------------------------------------------TOTAL: 2 session(s) Found. LAM : Label Advertisement Mode SsnAge Unit : DDD:HH:MM <PE1> display mpls ldp lsp LDP LSP Information -----------------------------------------------------------------------------SN DestAddress/Mask In/OutLabel Next-Hop In/Out-Interface -----------------------------------------------------------------------------1 1.1.1.9/32 3/NULL 127.0.0.1 Pos1/0/0/InLoop0 2 1.1.1.9/32 3/NULL 127.0.0.1 Pos1/0/1/InLoop0 3 2.2.2.9/32 NULL/3 100.1.3.2 -------/Pos1/0/0 4 2.2.2.9/32 1025/3 100.1.3.2 Pos1/0/1/Pos1/0/0 *5 2.2.2.9/32 Liberal 6 3.3.3.9/32 NULL/3 100.1.1.2 -------/Pos1/0/1 7 3.3.3.9/32 1024/3 100.1.1.2 Pos1/0/0/Pos1/0/1 *8 3.3.3.9/32 Liberal

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-119

5 QinQ Configuration
9 10 12 100.1.1.0/30 100.1.2.0/30 100.1.3.0/30 3/NULL NULL/3 NULL/3 3/NULL

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
100.1.1.1 100.1.3.2 100.1.1.2 100.1.3.1 Pos1/0/0/Pos1/0/1 -------/Pos1/0/0 -------/Pos1/0/1 Pos1/0/1/Pos1/0/0

-----------------------------------------------------------------------------TOTAL: 10 Normal LSP(s) Found. TOTAL: 2 Liberal LSP(s) Found. A '*' before an LSP means the LSP is not established A '*' before a Label means the USCB or DSCB is stale
NOTE

If PEs are not directly connected, run the mpls ldp remote-peer command and the remote-ip command to set up a remote LDP sessions between PEs.

4.

Enable MPLS L2VPN on PEs. # Configure PE1.


[PE1] mpls l2vpn

# Configure PE2.
[PE2] mpls l2vpn

# Configure PE3.
[PE3] mpls l2vpn

5.

Create VSIs and specify LDP as the signaling protocol on VSIs. # Configure PE1
[PE1] vsi ldp1 static [PE1-vsi-ldp1] pwsignal ldp [PE1-vsi-ldp1-ldp] vsi-id 2 [PE1-vsi-ldp1-ldp] peer 2.2.2.9 [PE1-vsi-ldp1-ldp] peer 3.3.3.9

# Configure PE2.
[PE2] vsi ldp1 static [PE2-vsi-ldp1] pwsignal ldp [PE2-vsi-ldp1-ldp] vsi-id 2 [PE2-vsi-ldp1-ldp] peer 1.1.1.9 [PE2-vsi-ldp1-ldp] peer 3.3.3.9

# Configure PE3.
[PE3] vsi ldp1 static [PE3-vsi-ldp1] pwsignal ldp [PE3-vsi-ldp1-ldp] vsi-id 2 [PE3-vsi-ldp1-ldp] peer 1.1.1.9 [PE3-vsi-ldp1-ldp] peer 2.2.2.9

6.

Bind VSIs and AC interfaces. # Configure PE1.


[PE1] interface gigabitethernet 2/0/0.1 [PE1-GigabitEthernet2/0/0.1] control-vid 1 qinq-termination [PE1-GigabitEthernet2/0/0.1] qinq termination pe-vid 100 ce-vid 10 [PE1-GigabitEthernet2/0/0.1] l2 binding vsi ldp1 [PE1-GigabitEthernet2/0/0.1] undo shutdown [PE1-GigabitEthernet2/0/0.1] quit

# Configure PE2.
[PE2] interface gigabitethernet 2/0/0.1 [PE2-GigabitEthernet2/0/0.1] control-vid 1 dot1q-termination [PE2-GigabitEthernet2/0/0.1] dot1q termination vid 10 [PE2-GigabitEthernet2/0/0.1] l2 binding vsi ldp1

# Configure PE3.
[PE3] interface gigabitethernet 2/0/0.1 [PE3-GigabitEthernet2/0/0.1] vlan-type dot1q 10 [PE3-GigabitEthernet2/0/0.1] l2 binding vsi ldp1

5-120

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[PE3-GigabitEthernet2/0/0.1] quit

5 QinQ Configuration

7.

Configure Layer 2 forwarding. # Configure Switch 1. Create VLAN 100 on Switch 1. Configure GE 1/0/1 to add an outer VLAN tag with the VLAN ID as 100 to a packet of VLAN 10. Specify GE 1/0/1 as a trunk interface and configure it to allow the packets of VLAN 100 to pass through. # Configure Switch 2. Create VLAN 10 on Switch 2. Specify GE 1/0/1 as an access interface and add it to VLAN 10. Specify GE 1/0/0 as a trunk interface and configure it to allow the packets of VLAN 10 to pass through. # Configure IP addresses of the interfaces on CEs as shown in Figure 5-29. # Configure CE1.
<Quidway> system-view [Quidway] sysname CE1 [CE1] interface gigabitethernet 1/0/0.1 [CE1-GigabitEthernet1/0/0.1] vlan-type dot1q 10 [CE1-GigabitEthernet1/0/0.1] ip address 10.1.1.1 24 [CE1-GigabitEthernet1/0/0.1] undo shutdown [CE1-GigabitEthernet1/0/0.1] quit

# Configure CE2.
<Quidway> system-view [Quidway] sysname CE2 [CE2] interface gigabitethernet 1/0/0 [CE2-GigabitEthernet1/0/0] ip address 10.1.1.2 24 [CE2-GigabitEthernet1/0/0] quit

# Configure CE3.
<Quidway> system-view [Quidway] sysname CE3 [CE3] interface gigabitethernet 1/0/0.1 [CE3-GigabitEthernet1/0/0.1] vlan-type dot1q 10 [CE3-GigabitEthernet1/0/0.1] ip address 10.1.1.3 24 [CE3-GigabitEthernet1/0/0.1] undo shutdown [CE3-GigabitEthernet1/0/0.1] quit

8.

Verify the configuration. Run the display qinq information termination interface command. You can view QinQ configuration. Take the display on PE1 as an example.
[PE1] display qinq information termination interface gigabitethernet 2/0/0 GigabitEthernet2/0/0.1 VSI binded Total QinQ Num: 2 qinq termination pe-vid 100 ce-vid 10 Total vlan-group Num: 0 control-vid 1 qinq-termination

Run the display dot1q information termination interface command. You can view dot1q configuration. Take the display on PE2 as an example.
[PE2] display dot1q information termination interface gigabitethernet 2/0/0 GigabitEthernet2/0/0.1 VSI binded Total QinQ Num: 2 dot1q termination vid 10 Total vlan-group Num: 0 control-vid 1 dot1q-termination

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-121

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

After the preceding configuration, run the display vsi name ldp1 verbose command on PE1. You can view that the VSI named ldp1 sets up PWs to PE2 and PE3 and the VSI status is Up.
[PE1] display vsi name ldp1 verbose VSI ID : 22 ***VSI Name : ldp1 Administrator VSI : no Isolate Spoken : disable VSI Index : 0 PW Signaling : ldp Member Discovery Style : static PW MAC Learn Style : unqualify Encapsulation Type : vlan MTU : 1500 Diffserv Mode : uniform Service Class : -Color : -DomainId : 255 Domain Name : VSI State : up VSI ID : 2 *Peer Router ID : 3.3.3.9 VC Label : 23552 Peer Type : dynamic Session : up Tunnel ID : 0x6002003, *Peer Router ID : 2.2.2.9 VC Label : 23553 Peer Type : dynamic Session : up Tunnel ID : 0x6002000, Interface Name : Ethernet6/0/0.1 State : up **PW Information: *Peer Ip Address : 2.2.2.9 PW State : up Local VC Label : 23553 Remote VC Label : 23552 PW Type : label Tunnel ID : 0x6002000, *Peer Ip Address : 3.3.3.9 PW State : up Local VC Label : 23552 Remote VC Label : 23552 PW Type : label Tunnel ID : 0x6002003,

Hosts attached to CE1, CE2, and CE3 can ping through each other.
<CE1> ping 10.1.1.2 PING 10.1.1.2: 56 data bytes, press CTRL_C to break Reply from 10.1.1.2: bytes=56 Sequence=1 ttl=255 time=50 ms Reply from 10.1.1.2: bytes=56 Sequence=2 ttl=255 time=1 ms Reply from 10.1.1.2: bytes=56 Sequence=3 ttl=255 time=1 ms Reply from 10.1.1.2: bytes=56 Sequence=4 ttl=255 time=1 ms Reply from 10.1.1.2: bytes=56 Sequence=5 ttl=255 time=1 ms --- 10.1.1.2 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 1/10/50 ms <CE1> ping 10.1.1.3 PING 10.1.1.3: 56 data bytes, press CTRL_C to break Reply from 10.1.1.3: bytes=56 Sequence=1 ttl=255 time=1 ms Reply from 10.1.1.3: bytes=56 Sequence=2 ttl=255 time=1 ms Reply from 10.1.1.3: bytes=56 Sequence=3 ttl=255 time=1 ms Reply from 10.1.1.3: bytes=56 Sequence=4 ttl=255 time=1 ms Reply from 10.1.1.3: bytes=56 Sequence=5 ttl=255 time=1 ms --- 10.1.1.3 ping statistics ---

5-122

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 1/1/1 ms

5 QinQ Configuration

Configuration Files
l

Configuration file of PE1


# sysname PE1 # mpls lsr-id 1.1.1.9 mpls mpls l2vpn # vsi ldp1 static pwsignal ldp vsi-id 2 peer 3.3.3.9 peer 2.2.2.9 # mpls ldp # interface GigabitEthernet2/0/0 undo shutdown mode user-termination # interface GigabitEthernet2/0/0.1 control-vid 1 qinq-termination qinq termination pe-vid 100 ce-vid 10 l2 binding vsi ldp1 # interface Pos1/0/0 link-protocol ppp undo shutdown ip address 100.1.3.1 255.255.255.252 mpls mpls ldp # interface Pos1/0/1 link-protocol ppp undo shutdown ip address 100.1.1.1 255.255.255.252 mpls mpls ldp # interface LoopBack1 ip address 1.1.1.9 255.255.255.255 # ospf 1 area 0.0.0.0 network 1.1.1.9 0.0.0.0 network 100.1.1.0 0.0.0.3 network 100.1.3.0 0.0.0.3 # return

Configuration file of PE2


# sysname PE2 # mpls lsr-id 2.2.2.9 mpls # mpls l2vpn # vsi ldp1 static pwsignal ldp vsi-id 2

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-123

5 QinQ Configuration
peer 1.1.1.9 peer 3.3.3.9

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

# mpls ldp # interface GigabitEthernet2/0/0 undo shutdown mode user-termination # interface GigabitEthernet2/0/0.1 control-vid 1 dot1q-termination dot1q termination vid 10 l2 binding vsi ldp1 # interface Pos1/0/0 link-protocol ppp undo shutdown ip address 100.1.3.2 255.255.255.252 mpls mpls ldp # interface Pos1/0/1 link-protocol ppp undo shutdown ip address 100.1.2.2 255.255.255.252 mpls mpls ldp # interface LoopBack1 ip address 2.2.2.9 255.255.255.255 # ospf 1 area 0.0.0.0 network 2.2.2.9 0.0.0.0 network 100.1.3.0 0.0.0.3 network 100.1.2.0 0.0.0.3 # return l

Configuration file of PE3


# sysname PE3 # mpls lsr-id 3.3.3.9 mpls # mpls l2vpn # vsi ldp1 static pwsignal ldp vsi-id 2 peer 1.1.1.9 peer 2.2.2.9 # mpls ldp # interface GigabitEthernet2/0/0.1 vlan-type dot1q 10 l2 binding vsi ldp1 # interface Pos1/0/0 link-protocol ppp undo shutdown ip address 100.1.1.2 255.255.255.252 mpls mpls ldp # interface Pos1/0/1 link-protocol ppp undo shutdown

5-124

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
ip address 100.1.2.1 255.255.255.252 mpls mpls ldp # interface LoopBack1 ip address 3.3.3.9 255.255.255.255 # ospf 1 area 0.0.0.0 network 3.3.3.9 0.0.0.0 network 100.1.1.0 0.0.0.3 network 100.1.2.0 0.0.0.3 # return l

5 QinQ Configuration

Configuration file of CE1


# sysname CE1 # interface GigabitEthernet1/0/0.1 vlan-type dot1q 10 ip address 10.1.1.1 255.255.255.0 # return

Configuration file of CE2


# sysname CE2 # interface GigabitEthernet1/0/0 undo shutdown ip address 10.1.1.2 255.255.255.0 # return

Configuration file of CE3


# sysname CE3 # interface GigabitEthernet1/0/0.1 vlan-type dot1q 10 ip address 10.1.1.3 255.255.255.0 # return

5.13.11 Example for Configuring the Sub-interface for QinQ VLAN Tag Termination to Access a VPLS
Network Requirements
As shown in Figure 5-30, VLAN 10 and VLAN 20 are connected to PEs through switches. The packet sent from the switch to the switch carries double VLAN tags. It is required to configure the sub-interface for QinQ VLAN tag termination to access VPLS to implement intercommunication between CE1, CE2, and CE3, and between CE4, CE5, and CE6. The backbone network adopts Martini VPLS and uses LDP to set up PWs. Considering that the inter-communication is not required between CE1 (or CE2 and CE3) and CE4 (or CE5 and CE6), in this example, the sub-interface for QinQ VLAN tag termination access VPLS in symmetric mode. The switch uniformly labels the packets from CEs with outer VLAN tags (tag 100), so a user can communicate with only the user in the same VLAN.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-125

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Figure 5-30 Typical networking diagram of configuring the sub-interface for QinQ VLAN tag termination to access VPLS

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. 5. 6. 7.
5-126

Run IGP on the backbone network and interconnect the devices on the backbone network. Configure the routing protocol on the backbone network to interconnect the devices and enable the basic MPLS capabilities. Set up the LSP tunnel between PEs. Enable MPLS L2VPN on PE. Create and then configure the VSI. Configure the sub-interface for QinQ VLAN tag termination and bind the AC interface to the VSI. Configure the Layer 2 forwarding function on switches.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

Data Preparation
To complete the configuration, you need the following data:
l l l l l

IP address of the interface VSI IDs on the PEs (The IDs must be consistent) MPLS LSR-IDs on PEs VSI names on PE1, PE2, and PE3 Interface bound to VSI

Configuration Procedure
1. Configure the interface mode to user termination. # Configure PE1.
<Quidway> system-view [Quidway] sysname PE1 [PE1] interface gigabitethernet 2/0/0 [PE1-GigabitEthernet2/0/0] mode user-termination [PE1-GigabitEthernet2/0/0] quit

# Configure PE2.
<Quidway> system-view [Quidway] sysname PE2 [PE2] interface gigabitethernet 2/0/0 [PE2-GigabitEthernet2/0/0] mode user-termination [PE2-GigabitEthernet2/0/0] quit

# Configure PE3.
<Quidway> system-view [Quidway] sysname PE3 [PE3] interface gigabitethernet 2/0/0 [PE3-GigabitEthernet2/0/0] mode user-termination [PE3-GigabitEthernet2/0/0] quit

2.

Configure IGP on the MPLS backbone network. OSPF is used in this example. According to Figure 5-30, configure IP addresses of interfaces on PEs. Configure OSPF to advertise the addresses of the loopback interfaces on PE1, PE2, and PE3. # Configure PE1.
<PE1> system-view [PE1] interface loopback 1 [PE1-LoopBack1] ip address 1.1.1.9 32 [PE1-LoopBack1] quit [PE1] interface pos 1/0/0 [PE1-Pos1/0/0] ip address 100.1.3.1 30 [PE1-Pos1/0/0] quit [PE1] interface pos 1/0/1 [PE1-Pos1/0/1] ip address 100.1.1.1 30 [PE1-Pos1/0/1] quit [PE1] ospf [PE1-ospf-1] area 0 [PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0 [PE1-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.3 [PE1-ospf-1-area-0.0.0.0] network 100.1.3.0 0.0.0.3 [PE1-ospf-1-area-0.0.0.0] quit [PE1-ospf-1] quit

# Configure PE2.
<PE2> system-view [PE2] interface LoopBack 1 [PE2-LoopBack1] ip address 2.2.2.9 32 [PE2-LoopBack1] quit

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-127

5 QinQ Configuration
[PE2] interface pos 1/0/0 [PE2-Pos1/0/0] ip address [PE2-Pos1/0/0] quit [PE2] interface pos 1/0/1 [PE2-Pos1/0/1] ip address [PE2-Pos1/0/1] quit [PE2] ospf [PE2-ospf-1] area 0 [PE2-ospf-1-area-0.0.0.0] [PE2-ospf-1-area-0.0.0.0] [PE2-ospf-1-area-0.0.0.0] [PE2-ospf-1-area-0.0.0.0] [PE2-ospf-1] quit

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

100.1.3.2 30 100.1.2.2 30

network 2.2.2.9 0.0.0.0 network 100.1.3.0 0.0.0.3 network 100.1.2.0 0.0.0.3 quit

# Configure PE3.
<PE3> system-view [PE3] interface loopback 1 [PE3-LoopBack1] ip address 3.3.3.9 32 [PE3-LoopBack1] quit [PE3] interface pos 1/0/0 [PE3-Pos1/0/0] ip address 100.1.1.2 30 [PE3-Pos1/0/0] quit [PE3] interface pos 1/0/1 [PE3-Pos1/0/1] ip address 100.1.2.1 30 [PE3-Pos1/0/1] quit [PE3] ospf [PE3-ospf-1] area 0 [PE3-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0 [PE3-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.3 [PE3-ospf-1-area-0.0.0.0] network 100.1.2.0 0.0.0.3 [PE3-ospf-1-area-0.0.0.0] quit [PE3-ospf-1] quit

After the preceding step, PE1 and PE2 both have routes, discovered through OSPF, to the loopback1 interface of each other. PE1 and PE3 also have routes, discovered through OSPF, to the loopback1 interface of each other. Take the display on PE1 as an example:
<PE1> display ip routing-table Route Flags: R - relied, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 12 Routes : 13 Destination/Mask Proto Pre Cost Flags NextHop Interface 1.1.1.9/32 Direct 0 0 D 127.0.0.1 InLoopBack0 2.2.2.9/32 OSPF 10 2 D 100.1.3.2 Pos1/0/0 3.3.3.9/32 OSPF 10 2 D 100.1.1.2 Pos1/0/1 100.1.1.0/30 Direct 0 0 D 100.1.1.1 Pos1/0/1 100.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 100.1.1.2/32 Direct 0 0 D 100.1.1.2 Pos1/0/1 100.1.2.0/30 OSPF 10 2 D 100.1.1.2 Pos1/0/1 OSPF 10 2 D 100.1.3.2 Pos1/0/0 100.1.3.0/30 Direct 0 0 D 100.1.3.1 Pos1/0/0 100.1.3.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 100.1.3.2/32 Direct 0 0 D 100.1.3.2 Pos1/0/0 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 <PE1> ping 100.1.2.2 PING 100.1.2.2: 56 data bytes, press CTRL_C to break Reply from 100.1.2.2: bytes=56 Sequence=1 ttl=255 time=250 ms Reply from 100.1.2.2: bytes=56 Sequence=2 ttl=255 time=30 ms Reply from 100.1.2.2: bytes=56 Sequence=3 ttl=255 time=60 ms Reply from 100.1.2.2: bytes=56 Sequence=4 ttl=255 time=60 ms Reply from 100.1.2.2: bytes=56 Sequence=5 ttl=255 time=60 ms --- 100.1.2.2 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 30/92/250 ms

5-128

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

3.

Enable the basic MPLS capabilities and LDP on the MPLS backbone network. # Configure PE1.
[PE1] mpls lsr-id 1.1.1.9 [PE1] mpls [PE1-mpls] lsp-trigger all [PE1-mpls] quit [PE1] mpls ldp [PE1-mpls-ldp] quit [PE1] interface pos 1/0/0 [PE1-Pos1/0/0] mpls [PE1-Pos1/0/0] mpls ldp [PE1-Pos1/0/0] quit [PE1] interface pos 1/0/1 [PE1-Pos1/0/1] mpls [PE1-Pos1/0/1] mpls ldp [PE1-Pos1/0/1] quit

# Configure PE2.
[PE2] mpls lsr-id 2.2.2.9 [PE2] mpls [PE2-mpls] lsp-trigger all [PE2-mpls] quit [PE2] mpls ldp [PE2-mpls-ldp] quit [PE2] interface pos1/0/0 [PE2-Pos1/0/0] mpls [PE2-Pos1/0/0] mpls ldp [PE2-Pos1/0/0] quit [PE2] interface pos1/0/1 [PE2-Pos1/0/1] mpls [PE2-Pos1/0/1] mpls ldp [PE2-Pos1/0/1] quit

# Configure PE3.
[PE3] mpls lsr-id 3.3.3.9 [PE3] mpls [PE3-mpls] lsp-trigger all [PE3-mpls] quit [PE3] mpls ldp [PE3-mpls-ldp] quit [PE3] interface pos 1/0/0 [PE3-Pos1/0/0] mpls [PE3-Pos1/0/0] mpls ldp [PE3-Pos1/0/0] quit [PE3] interface pos 1/0/1 [PE3-Pos1/0/1] mpls [PE3-Pos1/0/1] mpls ldp [PE3-Pos1/0/1] quit

After the preceding configuration, LDP sessions are set up between PEs. Running the display mpls ldp session command, you can view that the status is "Operational". Running the display mpls ldp lsp command, you can view the establishing status of LSP through LDP. For example, the following displays the session information on PE1:
<PE1> display mpls ldp session LDP Session(s) in Public Network -----------------------------------------------------------------------------Peer-ID Status LAM SsnRole SsnAge KA-Sent/Rcv -----------------------------------------------------------------------------2.2.2.9:0 Operational DU Passive 000:00:02 10/10 3.3.3.9:0 Operational DU Passive 000:00:02 9/9 -----------------------------------------------------------------------------TOTAL: 2 session(s) Found.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-129

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
LAM : Label Advertisement Mode SsnAge Unit : DDD:HH:MM <PE1> display mpls ldp lsp LDP LSP Information -----------------------------------------------------------------------------SN DestAddress/Mask In/OutLabel Next-Hop In/Out-Interface -----------------------------------------------------------------------------1 1.1.1.9/32 3/NULL 127.0.0.1 Pos1/0/0/InLoop0 2 1.1.1.9/32 3/NULL 127.0.0.1 Pos1/0/1/InLoop0 3 2.2.2.9/32 NULL/3 100.1.3.2 -------/Pos1/0/0 4 2.2.2.9/32 1025/3 100.1.3.2 Pos1/0/1/Pos1/0/0 *5 2.2.2.9/32 Liberal 6 3.3.3.9/32 NULL/3 100.1.1.2 -------/Pos1/0/1 7 3.3.3.9/32 1024/3 100.1.1.2 Pos1/0/0/Pos1/0/1 *8 3.3.3.9/32 Liberal 9 100.1.1.0/30 3/NULL 100.1.1.1 Pos1/0/0/Pos1/0/1 10 100.1.2.0/30 NULL/3 100.1.3.2 -------/Pos1/0/0 NULL/3 100.1.1.2 -------/Pos1/0/1 12 100.1.3.0/30 3/NULL 100.1.3.1 Pos1/0/1/Pos1/0/0 -----------------------------------------------------------------------------TOTAL: 10 Normal LSP(s) Found. TOTAL: 2 Liberal LSP(s) Found. A '*' before an LSP means the LSP is not established A '*' before a Label means the USCB or DSCB is stale
NOTE

If PEs are not directly connected, run the mpls ldp remote-peer command and the remote-ip command to set up a remote LDP sessions between PEs.

4.

Enable MPLS L2VPN on the PE. # Configure PE1.


[PE1] mpls l2vpn

# Configure PE2.
[PE2] mpls l2vpn

# Configure PE3.
[PE3] mpls l2vpn

5.

Create VSIs and specify LDP as the signaling protocol on VSIs. # Configure PE1.
[PE1] vsi ldp1 static [PE1-vsi-ldp1] pwsignal ldp [PE1-vsi-ldp1-ldp] vsi-id 2 [PE1-vsi-ldp1-ldp] peer 2.2.2.9 [PE1-vsi-ldp1-ldp] peer 3.3.3.9

# Configure PE2.
[PE2] vsi ldp1 static [PE2-vsi-ldp1] pwsignal ldp [PE2-vsi-ldp1-ldp] vsi-id 2 [PE2-vsi-ldp1-ldp] peer 1.1.1.9 [PE2-vsi-ldp1-ldp] peer 3.3.3.9

# Configure PE3.
[PE3] vsi ldp1 static [PE3-vsi-ldp1] pwsignal ldp [PE3-vsi-ldp1-ldp] vsi-id 2 [PE3-vsi-ldp1-ldp] peer 1.1.1.9 [PE3-vsi-ldp1-ldp] peer 2.2.2.9

6.

Configure the sub-interface for dot1q VLAN tag termination and bind VSIs and AC interfaces. # Configure PE1.

5-130

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

[PE1] interface gigabitethernet 2/0/0.1 [PE1-GigabitEthernet2/0/0.1] control-vid 1 qinq-termination [PE1-GigabitEthernet2/0/0.1] qinq termination l2 symmetry [PE1-GigabitEthernet2/0/0.1] qinq termination pe-vid 100 ce-vid 10 [PE1-GigabitEthernet2/0/0.1] qinq termination pe-vid 100 ce-vid 20 [PE1-GigabitEthernet2/0/0.1] l2 binding vsi ldp1

# Configure PE2.
[PE2] interface gigabitethernet 2/0/0.1 [PE2-GigabitEthernet2/0/0.1] control-vid 1 qinq-termination [PE2-GigabitEthernet2/0/0.1] qinq termination l2 symmetry [PE2-GigabitEthernet2/0/0.1] qinq termination pe-vid 100 ce-vid 10 [PE2-GigabitEthernet2/0/0.1] qinq termination pe-vid 100 ce-vid 20 [PE2-GigabitEthernet2/0/0.1] l2 binding vsi ldp1

# Configure PE3.
[PE3] interface gigabitethernet 2/0/0.1 [PE3-GigabitEthernet2/0/0.1] control-vid 1 qinq-termination [PE3-GigabitEthernet2/0/0.1] qinq termination l2 symmetry [PE3-GigabitEthernet2/0/0.1] qinq termination pe-vid 100 ce-vid 10 [PE3-GigabitEthernet2/0/0.1] qinq termination pe-vid 100 ce-vid 20 [PE3-GigabitEthernet2/0/0.1] l2 binding vsi ldp1
NOTE

When the qinq termination command is used, the ranges of ce-vid cannot overlap if pe-vid of two sub-interfaces is the same.

7.

Configure QinQ and set the packets sent from the switch to the PE to carry double tags. # Configure Switch 1.
<Quidway> system-view [Quidway] sysname Switch1 [Switch1] vlan 100 [Switch1-vlan100] quit [Switch1] interface gigabitethernet [Switch1-GigabitEthernet1/0/0] port [Switch1-GigabitEthernet1/0/0] quit [Switch1] interface gigabitethernet [Switch1-GigabitEthernet1/0/1] port 100 [Switch1-GigabitEthernet1/0/1] quit [Switch1] interface gigabitethernet [Switch1-GigabitEthernet1/0/2] port 100 [Switch1-GigabitEthernet1/0/2] quit

1/0/0 trunk allow-pass vlan 100 1/0/1 vlan-stacking outside-vlan 10 stack-vlan 1/0/2 vlan-stacking outside-vlan 20 stack-vlan

# Configure Switch 2.
<Quidway> system-view [Quidway] sysname Switch2 [Switch2] vlan 100 [Switch2-vlan100] quit [Switch2] interface gigabitethernet [Switch2-GigabitEthernet1/0/0] port [Switch2-GigabitEthernet1/0/0] quit [Switch2] interface gigabitethernet [Switch2-GigabitEthernet1/0/1] port 100 [Switch2-GigabitEthernet1/0/1] quit [Switch2] interface gigabitethernet [Switch2-GigabitEthernet1/0/2] port 100 [Switch2-GigabitEthernet1/0/2] quit

1/0/0 trunk allow-pass vlan 100 1/0/1 vlan-stacking outside-vlan 10 stack-vlan 1/0/2 vlan-stacking outside-vlan 20 stack-vlan

# Configure Switch 3.
<Quidway> system-view [Quidway] sysname Switch3 [Switch3] vlan 100 [Switch3-vlan100] quit [Switch3] interface gigabitethernet 1/0/0

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-131

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[Switch3-GigabitEthernet1/0/0] port [Switch3-GigabitEthernet1/0/0] quit [Switch3] interface gigabitethernet [Switch3-GigabitEthernet1/0/1] port 100 [Switch3-GigabitEthernet1/0/1] quit [Switch3] interface gigabitethernet [Switch3-GigabitEthernet1/0/2] port 100 [Switch3-GigabitEthernet1/0/2] quit trunk allow-pass vlan 100 1/0/1 vlan-stacking outside-vlan 10 stack-vlan 1/0/2 vlan-stacking outside-vlan 20 stack-vlan

If the device does not support the port vlan-stacking command, you can run the commands port link-type dot1q-tunnel and port default vlan to configure QinQ. Configure IP addresses of the interfaces on CEs based on Figure 5-30. Set the packet sent from the CE to the switch to carry one VLAN tag. # Configure CE1.
<Quidway> system-view [Quidway] sysname CE1 [CE1] interface gigabitethernet 1/0/0.1 [CE1-GigabitEthernet1/0/0.1] ip address 10.1.1.1 24 [CE1-GigabitEthernet1/0/0.1] vlan-type dot1q 10 [CE1-GigabitEthernet1/0/0.1] quit

# Configure CE2.
<Quidway> system-view [Quidway] sysname CE2 [CE2] interface gigabitethernet 1/0/0.1 [CE2-GigabitEthernet1/0/0.1] ip address 10.1.1.2 24 [CE2-GigabitEthernet1/0/0.1] vlan-type dot1q 10 [CE2-GigabitEthernet1/0/0.1] quit

# Configure CE3.
<Quidway> system-view [Quidway] sysname CE3 [CE3] interface gigabitethernet 1/0/0.1 [CE3-GigabitEthernet1/0/0.1] ip address 10.1.1.3 24 [CE3-GigabitEthernet1/0/0.1] vlan-type dot1q 10 [CE3-GigabitEthernet1/0/0.1] quit

# Configure CE4.
<Quidway> system-view [Quidway] sysname CE4 [CE4] interface gigabitethernet 1/0/0.1 [CE4-GigabitEthernet1/0/0.1] ip address 20.1.1.1 24 [CE4-GigabitEthernet1/0/0.1] vlan-type dot1q 20 [CE4-GigabitEthernet1/0/0.1] quit

# Configure CE5.
<Quidway> system-view [Quidway] sysname CE5 [CE5] interface gigabitethernet 1/0/0.1 [CE5-GigabitEthernet1/0/0.1] ip address 20.1.1.2 24 [CE5-GigabitEthernet1/0/0.1] vlan-type dot1q 20 [CE5-GigabitEthernet1/0/0.1] quit

# Configure CE6.
<Quidway> system-view [Quidway] sysname CE6 [CE6] interface gigabitethernet 1/0/0.1 [CE6-GigabitEthernet1/0/0.1] ip address 20.1.1.3 24 [CE6-GigabitEthernet1/0/0.1] vlan-type dot1q 20 [CE6-GigabitEthernet1/0/0.1] quit

5-132

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

8.

Verify the configuration. Running the display qinq information termination interface command, you can view the QinQ information. The following displays the QinQ information on PE1:
<PE1> display qinq information termination interface gigabitethernet 2/0/0 GigabitEthernet2/0/0.1 VSI bound qinq termination l2 symmetry Total QinQ Num: 2 qinq termination pe-vid 100 ce-vid 10 qinq termination pe-vid 100 ce-vid 20 Total vlan-group Num: 0 control-vid 1 qinq-termination

After the preceding configuration, run the display vsi ldp1 verbose command on PE1. you can find that PWs to PE2 and PE3 are set up on the VSI named ldp1. The VSI status is Up.
<PE1> display vsi bgp1 verbose ***VSI Name : ldp1 VSI Index : 0 PW Signaling : ldp Member Discovery Style : static PW MAC Learn Style : unqualify Encapsulation Type : vlan MTU : 1500 VSI State : up VSI ID : 2 *Peer Router ID : 3.3.3.9 VC Label : 23552 Peer Type : dynamic Session : up Tunnel ID : 0x6002003, *Peer Router ID : 2.2.2.9 VC Label : 23553 Peer Type : dynamic Session : up Tunnel ID : 0x6002000, Interface Name : Ethernet6/0/0.1 State : up **PW Information: *Peer Ip Address : 2.2.2.9 PW State : up Local VC Label : 23553 Remote VC Label : 23552 PW Type : label Tunnel ID : 0x6002000, *Peer Ip Address : 3.3.3.9 PW State : up Local VC Label : 23552 Remote VC Label : 23552 PW Type : label Tunnel ID : 0x6002003,

The hosts attached to CE1, CE2, and CE3 can ping through each other.
<CE1> ping 10.1.1.2 PING 10.1.1.2: 56 data bytes, press CTRL_C to break Reply from 10.1.1.2: bytes=56 Sequence=1 ttl=255 time=50 ms Reply from 10.1.1.2: bytes=56 Sequence=2 ttl=255 time=1 ms Reply from 10.1.1.2: bytes=56 Sequence=3 ttl=255 time=1 ms Reply from 10.1.1.2: bytes=56 Sequence=4 ttl=255 time=1 ms Reply from 10.1.1.2: bytes=56 Sequence=5 ttl=255 time=1 ms --- 10.1.1.2 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 1/10/50 ms <CE1> ping 10.1.1.3 PING 10.1.1.3: 56 data bytes, press CTRL_C to break

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-133

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
Reply from 10.1.1.3: bytes=56 Sequence=1 Reply from 10.1.1.3: bytes=56 Sequence=2 Reply from 10.1.1.3: bytes=56 Sequence=3 Reply from 10.1.1.3: bytes=56 Sequence=4 Reply from 10.1.1.3: bytes=56 Sequence=5 --- 10.1.1.3 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 1/1/1 ms ttl=255 ttl=255 ttl=255 ttl=255 ttl=255 time=1 time=1 time=1 time=1 time=1 ms ms ms ms ms

Configuration Files
l

Configuration file of PE1


# sysname PE1 # mpls lsr-id 1.1.1.9 mpls lsp-trigger all # mpls l2vpn # vsi ldp1 static pwsignal ldp vsi-id 2 peer 3.3.3.9 peer 2.2.2.9 # mpls ldp # interface GigabitEthernet2/0/0 undo shutdown mode user-termination # interface GigabitEthernet2/0/0.1 undo shutdown control-vid 1 qinq-termination qinq termination l2 symmetry qinq termination pe-vid 100 ce-vid 10 qinq termination pe-vid 100 ce-vid 20 l2 binding vsi ldp1 # interface Pos1/0/0 link-protocol ppp undo shutdown ip address 100.1.3.1 255.255.255.252 mpls mpls ldp # interface Pos1/0/1 link-protocol ppp undo shutdown ip address 100.1.1.1 255.255.255.252 mpls mpls ldp # interface LoopBack1 ip address 1.1.1.9 255.255.255.255 # ospf 1 area 0.0.0.0 network 1.1.1.9 0.0.0.0 network 100.1.1.0 0.0.0.3 network 100.1.3.0 0.0.0.3 # return

5-134

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
l

5 QinQ Configuration

Configuration file of PE2


# sysname PE2 # mpls lsr-id 2.2.2.9 mpls lsp-trigger all # mpls l2vpn # vsi ldp1 static pwsignal ldp vsi-id 2 peer 1.1.1.9 peer 3.3.3.9 # mpls ldp # interface GigabitEthernet2/0/0 undo shutdown mode user-termination # interface GigabitEthernet2/0/0.1 undo shutdown control-vid 1 qinq-termination qinq termination l2 symmetry qinq termination pe-vid 100 ce-vid 10 qinq termination pe-vid 100 ce-vid 20 l2 binding vsi ldp1 # interface Pos1/0/0 link-protocol ppp undo shutdown ip address 100.1.3.2 255.255.255.252 mpls mpls ldp # interface Pos1/0/1 link-protocol ppp undo shutdown ip address 100.1.2.2 255.255.255.252 mpls mpls ldp # interface LoopBack1 ip address 2.2.2.9 255.255.255.255 # ospf 1 area 0.0.0.0 network 2.2.2.9 0.0.0.0 network 100.1.3.0 0.0.0.3 network 100.1.2.0 0.0.0.3 # return

Configuration file of PE3


# sysname PE3 # mpls lsr-id 3.3.3.9 mpls lsp-trigger all # mpls l2vpn # vsi ldp1 static pwsignal ldp vsi-id 2 peer 1.1.1.9

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-135

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
peer 2.2.2.9 # mpls ldp # interface GigabitEthernet2/0/0 undo shutdown mode user-termination # interface GigabitEthernet2/0/0.1 undo shutdown control-vid 1 qinq-termination qinq termination l2 symmetry qinq termination pe-vid 100 ce-vid 10 qinq termination pe-vid 100 ce-vid 20 l2 binding vsi ldp1 # interface Pos1/0/0 link-protocol ppp undo shutdown ip address 100.1.1.2 255.255.255.252 mpls mpls ldp # interface Pos1/0/1 link-protocol ppp undo shutdown ip address 100.1.2.1 255.255.255.252 mpls mpls ldp # interface LoopBack1 ip address 3.3.3.9 255.255.255.255 # ospf 1 area 0.0.0.0 network 3.3.3.9 0.0.0.0 network 100.1.1.0 0.0.0.3 network 100.1.2.0 0.0.0.3 # return

Configuration file of Switch 1


# sysname Switch1 # vlan batch 100 # interface GigabitEthernet1/0/0 undo shutdown port trunk allow-pass vlan 100 # interface GigabitEthernet1/0/1 undo shutdown port vlan-stacking outside-vlan 10 stack-vlan 100 # interface GigabitEthernet1/0/2 undo shutdown port vlan-stacking outside-vlan 20 stack-vlan 100 # return

Configuration file of Switch 2


# sysname Switch2 # vlan batch 100 # interface GigabitEthernet1/0/0 undo shutdown port trunk allow-pass vlan 100

5-136

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
# interface GigabitEthernet1/0/1 undo shutdown port vlan-stacking outside-vlan 10 stack-vlan 100 # interface GigabitEthernet1/0/2 undo shutdown port vlan-stacking outside-vlan 20 stack-vlan 100 # return l

5 QinQ Configuration

Configuration file of Switch 3


# sysname Switch3 # vlan batch 100 # interface GigabitEthernet1/0/0 undo shutdown port trunk allow-pass vlan 100 # interface GigabitEthernet1/0/1 undo shutdown port vlan-stacking outside-vlan 10 stack-vlan 100 # interface GigabitEthernet1/0/2 undo shutdown port vlan-stacking outside-vlan 20 stack-vlan 100 # return

Configuration file of CE1


# sysname CE1 # interface GigabitEthernet1/0/0.1 undo shutdown vlan-type dot1q 10 ip address 10.1.1.1 255.255.255.0 # return

Configuration file of CE2


# sysname CE2 # interface GigabitEthernet1/0/0.1 undo shutdown vlan-type dot1q 10 ip address 10.1.1.2 255.255.255.0 # return

Configuration file of CE3


# sysname CE3 # interface GigabitEthernet1/0/0.1 undo shutdown vlan-type dot1q 10 ip address 10.1.1.3 255.255.255.0 # return

Configuration file of CE4


# sysname CE4 # interface GigabitEthernet1/0/0.1

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-137

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
undo shutdown vlan-type dot1q 20 ip address 20.1.1.1 255.255.255.0 # return

Configuration file of CE5


# sysname CE5 # interface GigabitEthernet1/0/0.1 undo shutdown vlan-type dot1q 20 ip address 20.1.1.2 255.255.255.0 # return

Configuration file of CE6


# sysname CE6 # interface GigabitEthernet1/0/0.1 undo shutdown vlan-type dot1q 20 ip address 20.1.1.3 255.255.255.0 # return

5.13.12 Example for Configuring a QinQ Termination Sub-interface to Support the Local Connection
Networking Requirements
As shown in Figure 5-31, PE1 and PE2 are configured with the basic VPLS function. CE1 and CE2 access the VSI on PE1 through switches. In Figure 5-31:
l l

The packets sent from CE1 and CE2 to PE1 have double tags. Switch2 labels the packets received from CE1 with the inner tag 10. Switch3 labels the packets received from CE2 with the inner tag 20. Switch1 labels the packets received from CE1 and CE2 with the same outer tag 100.

If PE1 is configured with QinQ termination sub-interface accessing the VPLS network, the packets sent by these CEs cannot be forwarded by GE 1/0/0 because packets from CE1/0/0 to PE1 have the same outer tag (otherwise, Switch1 learns the same MAC address entry from different interfaces, which leads to incorrect forwarding). Thus, CEs in the same VSI on PE1 cannot communicate. In this case, to ensure that CE1 and CE2 can communicate, you can configure the QinQ termination sub-interface to support the local switching.

5-138

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

Figure 5-31 QinQ termination sub-interface supporting the local switching

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. Configure the basic VPLS function on the PEs and ensure that the VSIs on the PEs are Up. On PE1, configure the QinQ termination sub-interface to support the local switching and configure the QinQ termination sub-interface to access the VPLS network. After the configuration, CEs in the same VSI can communicate. Configure the Layer 2 forwarding function on the switches. After the configuration, the packets received on the PEs from the CEs have double tags with the outer tags being the same. Disable the MAC address learning on the switches connected to the termination subinterface on the PEs.

3.

4.

Data Preparation
To complete the configuration, you need the following data:
l l l l

IP addresses of the interfaces L2VC IDs on the two ends of the PW (IDs are the same) MPLS LSR ID of the PEs VSI names of the PEs
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-139

Issue 03 (2008-09-22)

5 QinQ Configuration
l

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Interfaces bound to the VSIs

Configuration Procedure
1. Configure the mode of the interface connected to PE1 as user-termination.
<PE1> system-view [PE1] interface gigabitethernet 1/0/0 [PE1-GigabitEthernet1/0/0] mode user-termination [PE1-GigabitEthernet1/0/0] quit

2.

Configure IGP, MPLS, LDP, and VPLS between the PEs. The detailed configurations are not mentioned here. After the configuration, run the display vsi command on PE1 and PE2, and you can find that the VSI status is Up. Take PE1 as an example.
<PE1> display vsi Total VSI number is 1, 1 is up, 0 is down, 1 is LDP mode, 0 is BGP mode Vsi Mem PW Mac Encap Mtu Vsi Name Disc Type Learn Type Value State -------------------------------------------------------------------------v1 static ldp unqualify vlan 1500 up

3.

Configure the QinQ termination sub-interface to support the local switching and to access the VPLS network. On PE1, configure the QinQ termination sub-interface to support the local switching and to access the VPLS network. After the configurations, CEs in the same VSI can communicate.
<PE1> system-view [PE1] interface gigabitethernet 1/0/0.1 [PE1-GigabitEthernet1/0/0.1] control-vid 1 qinq-termination local-switch [PE1-GigabitEthernet1/0/0.1] qinq termination pe-vid 100 ce-vid 1 to 20 [PE1-GigabitEthernet1/0/0.1] l2 binding vsi v1 [PE1-GigabitEthernet1/0/0.1] quit

4.

Configure the basic Layer 2 forwarding function. After the configuration, the packets received on PE1 from the CEs have double tags with the outer tags being the same. # On Switch1, label the VLAN packets from GE 2/0/0 and GE 3/0/0 with the outer tag 100, and permit GE 1/0/0 to send these packets to PE1.
<Switch1> system-view [Switch1] vlan 100 [Switch1-vlan100] quit [Switch1] interface gigabitethernet [Switch1-GigabitEthernet1/0/0] port [Switch1-GigabitEthernet1/0/0] quit [Switch1] interface gigabitethernet [Switch1-GigabitEthernet2/0/0] port [Switch1-GigabitEthernet2/0/0] port [Switch1-GigabitEthernet2/0/0] quit [Switch1] interface gigabitethernet [Switch1-GigabitEthernet3/0/0] port [Switch1-GigabitEthernet3/0/0] port [Switch1-GigabitEthernet3/0/0] quit

1/0/0 trunk allow-pass vlan 100 2/0/0 link-type dot1q-tunnel default vlan 100 3/0/0 link-type dot1q-tunnel default vlan 100

# On Switch2, label the VLAN packets from GE 1/0/0 with the tag 10, and permit GE 2/0/0 to send these packets to Switch1.
<Switch2> system-view [Switch2] vlan 10 [Switch2-vlan10] quit [Switch2] interface gigabitethernet [Switch2-GigabitEthernet1/0/0] port [Switch2-GigabitEthernet1/0/0] quit [Switch2] interface gigabitethernet [Switch2-GigabitEthernet2/0/0] port [Switch2-GigabitEthernet2/0/0] quit

1/0/0 default vlan 10 2/0/0 trunk allow-pass vlan 10

5-140

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

# On Switch3, label the VLAN packets from GE 1/0/0 with the tag 20, and permit GE 2/0/0 to send these packets to Switch1.
<Switch3> system-view [Switch3] vlan 10 [Switch3-vlan10] quit [Switch3] interface gigabitethernet [Switch3-GigabitEthernet1/0/0] port [Switch3-GigabitEthernet1/0/0] quit [Switch3] interface gigabitethernet [Switch3-GigabitEthernet2/0/0] port [Switch3-GigabitEthernet2/0/0] quit

1/0/0 default vlan 20 2/0/0 trunk allow-pass vlan 20

After the configurations, run the display vlan vlan-id command on the switches, and you can find the interfaces added to the VLAN are Up. The VLAN trunk interface is displayed as "Tagged port"; the default VLAN interface is displayed as "Untagged port". Take Switch1 as an example:
[Switch1] display vlan 100 VLAN ID Type Status MAC Learning ---------------------------------------------------------100 common enable enable ---------------Untagged Port: GigabitEthernet2/0/0 GigabitEthernet3/0/0 ---------------Tagged Port: GigabitEthernet1/0/0 ---------------Interface Physical GigabitEthernet1/0/0 UP GigabitEthernet2/0/0 UP GigabitEthernet3/0/0 UP

5.

Disable the MAC address learning. Disable the MAC address learning on Switch1. Otherwise, Switch1 learns the same MAC address from different interfaces.
<Switch1> system-view [Switch1] interface gigabitethernet 1/0/0 [Switch1-GigabitEthernet1/0/0] mac-address learning disable [Switch1-GigabitEthernet1/0/0] quit

Clear all address entries in the MAC address table on Switch1; thus, Switch1 can learn correct address entries before the original entries age.
[Switch1] undo mac-address all

6.

Verify the configuration. # CE1 and CE2 can successfully ping each other. Take CE1 as an example:
[CE1] ping 10.1.1.2 PING 10.1.1.2: 56 data bytes, press CTRL_C to break Reply from 10.1.1.2: bytes=56 Sequence=1 ttl=255 time Reply from 10.1.1.2: bytes=56 Sequence=2 ttl=255 time Reply from 10.1.1.2: bytes=56 Sequence=3 ttl=255 time Reply from 10.1.1.2: bytes=56 Sequence=4 ttl=255 time Reply from 10.1.1.2: bytes=56 Sequence=5 ttl=255 time --- 10.1.1.2 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 2/2/2 ms = = = = = 2 2 2 2 2 ms ms ms ms ms

# Check the MAC address entries on PE1. You can find that PE1 has learned the address of GE 1/0/0 and the values of double tags with the outer tag "PEVLAN" being the same from CE1 and CE2.
<PE1> display mac-address dynamic 1 MAC Address VLAN/VSI PEVLAN CEVLAN Port Type Lsp

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-141

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
------------------------------------------------------------------------------00e0-fc22-18e1 v1 100 20 GigabitEthernet1/0/0 dynamic 4/65546 00e0-fc7a-5747 v1 100 10 GigabitEthernet1/0/0 dynamic 4/65556 Total 2 ,2 printed

# Run the display arp interface command on the CEs, and you can find the ARP entries of the CEs are correct. Take CE1 as an example:
<CE1> display arp interface gigabitethernet 1/0/0 IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-INSTANCE VLAN PVC -----------------------------------------------------------------------------10.1.1.1 00e0-fc7a-5747 I GigabitEthernet1/0/0 10.1.1.2 00e0-fc22-18e1 14 D GigabitEthernet1/0/0 -----------------------------------------------------------------------------Total:2 Dynamic:1 Static:0 Interface:1

Configuration Files
l

Configuration file of PE1


# sysname PE1 # mpls lsr-id 1.1.1.9 mpls lsp-trigger all mpls l2vpn # vsi v1 static pwsignal ldp vsi-id 100 peer 2.2.2.9 peer 3.3.3.9 # mpls ldp # mpls ldp remote-peer 3.3.3.9 remote-ip 3.3.3.9 # interface GigabitEthernet1/0/0 mode user-termination # interface GigabitEthernet1/0/0.1 control-vid 1 qinq-termination local-switch qinq termination pe-vid 100 ce-vid 1 to 20 l2 binding vsi v1 # interface Pos2/0/0 link-protocol ppp ip address 100.1.1.1 255.255.255.0 mpls mpls ldp # ospf 1 area 0.0.0.0 network 1.1.1.9 0.0.0.0 network 100.1.1.0 0.0.0.255 # return

Configuration file of Switch1


# sysname Switch1 # vlan batch 100 #

5-142

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
interface GigabitEthernet1/0/0 mac-address learning disable port trunk allow-pass vlan 100 # interface GigabitEthernet2/0/0 port link-type dot1q-tunnel port default vlan 100 # interface GigabitEthernet3/0/0 port link-type dot1q-tunnel port default vlan 100 # return l

5 QinQ Configuration

Configuration file of Switch2


# sysname Switch2 # vlan batch 10 # interface GigabitEthernet1/0/0 port default vlan 10 # interface GigabitEthernet2/0/0 port trunk allow-pass vlan 10 # return

Configuration file of Switch3


# sysname Switch3 # vlan batch 20 # interface GigabitEthernet1/0/0 port default vlan 20 # interface GigabitEthernet2/0/0 port trunk allow-pass vlan 20 # return

Configuration file of CE1


# sysname CE1 # interface GigabitEthernet1/0/0 ip address 10.1.1.1 255.255.255.0 # return

Configuration file of CE2


# sysname CE2 # interface GigabitEthernet1/0/0 ip address 10.1.1.2 255.255.255.0 # return

5.13.13 Example for Configuring the Sub-interface for dot1q VLAN Tag Termination to Support the DHCP Relay

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-143

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Network Requirements
As shown in Figure 5-32, the network segment to which the DHCP client belongs is 100.1.1.0/24, while the network segment to which the DHCP server belongs is 100.1.3.0/24. The DHCP packets should be relayed through the router with the DHCP relay function to make the DHCP client obtain the related configuration information such as the IP address from the DHCP server. The DHCP server should be assigned with an IP address pool on the network segment 100.1.1.0, so that the DHCP server can assign appropriate IP addresses to the DHCP clients on the network segment. You need to configure the route to the network segment 100.1.1.0 on the DHCP server. The lease period of the addresses on the segment 100.1.1.0/24 is 10 days and 12 hours, and the domain name is huawei.com. The DNS address is 100.1.1.2. There is no NetBIOS address. The address of the egress device is 100.1.1.254. The packets received on the DHCP relay carries one VLAN tag. Figure 5-32 Typical networking diagram of configuring the sub-interface for dot1q VLAN tag termination to support the DHCP relay

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. 5. 6. 7. 8. Configure the route from the DHCP server to the DHCP relay. Configure DHCP relay on the router. Enable DHCP. Configure the interface implementing the DHCP relay function, including the IP address and the subnet mask. Configure the IP relay address on the interface. Enable the DHCP relay function of the interface. Configure the sub-interface for dot1q termination on the DHCP relay. Configure the Layer 2 forwarding function on Switch.

Data Preparation
To complete the configuration, you need the following data:
5-144 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
l l l

5 QinQ Configuration

IP address of the interface implementing the DHCP relay function Address pool range of the DHCP server Terminating range of the sub-interface for dot1q VLAN tag termination

Configuration Procedure
1. Configure the DHCP relay interface mode to user termination.
<Quidway> system-view [Quidway] sysname DHCP-Relay [DHCP-Relay] interface gigabitethernet 2/0/0 [DHCP-Relay-GigabitEthernet2/0/0] mode user-termination [DHCP-Relay-GigabitEthernet2/0/0] quit

2.

Configure the DHCP relay. # Enable DHCP.


<DHCP-Relay> system-view [DHCP-Relay] dhcp enable

# Configure the address of POS 1/0/0.


<DHCP-Relay> system-view [DHCP-Relay] interface pos 1/0/0 [DHCP-Relay-Pos1/0/0] ip address 100.1.2.1 24

# Enter the view of the interface on which DHCP relay is to be enabled and configure its IP address and mask to keep it and the DHCP client on the same network segment.
<DHCP-Relay> system-view [DHCP-Relay] interface gigabitethernet 2/0/0.1 [DHCP-RelayGigabitEthernet2/0/0.1] ip address 100.1.1.1 24 [DHCP-Relay-GigabitEthernet2/0/0.1] ip relay address 100.1.3.1 [DHCP-Relay-GigabitEthernet2/0/0.1] dhcp select relay

3.

Configure the DHCP server. # Configure the route from Router 2 to Router 1.
<Quidway> system-view [Quidway] sysname DHCP-Server [DHCP-Server] ip route-static 100.1.1.0 24 100.1.2.1

# Enable DHCP.
<DHCP-Server> system-view [DHCP-Server] dhcp enable

# Configure the client connected with POS 1/0/0 to obtain the IP address from the global address pool.
<DHCP-Server> system-view [DHCP-Server] interface pos 1/0/0 [DHCP-Server-Pos1/0/0] ip address 100.1.3.1 24 [DHCP-Server-Pos1/0/0] dhcp select global

# Configure the IP addresses that are not assigned automatically, including the address of the DNS server, the address of NetBIOS, and the address of the egress gateway.
<DHCP-Server> system-view [DHCP-Server] dhcp server forbidden-ip 100.1.1.2 [DHCP-Server] dhcp server forbidden-ip 100.1.1.254

# Configure the features of the DHCP address pool 1, including the address pool range, the domain name, the egress gateway, the DNS address, and the lease period of the address.
<DHCP-Server> system-view [DHCP-Server] dhcp server ip-pool 1 [DHCP-Server-dhcp-1] network 100.1.1.0 mask 255.255.255.0 [DHCP-Server-dhcp-1] domain-name huawei.com [DHCP-Server-dhcp-1] dns-list 100.1.1.2 [DHCP-Server-dhcp-1] gateway-list 100.1.1.254

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-145

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[DHCP-Server-dhcp-1] expired day 10 hour 12 [DHCP-Server-dhcp-1] quit

4.

Configure the sub-interface for dot1p VLAN tag termination on the DHCP relay.
<DHCP-Relay> system-view [DHCP-Relay] interface gigabitethernet 2/0/0.1 [DHCP-Relay-GigabitEthernet2/0/0.1] control-vid 1 dot1q-termination [DHCP-Relay-GigabitEthernet2/0/0.1] dot1q termination vid 10 [DHCP-Relay-GigabitEthernet2/0/0.1] dot1q termination vid 20 [DHCP-Relay-GigabitEthernet2/0/0.1] arp broadcast enable
NOTE

For services transmitted on the dot1q termination sub-interface connected to the DHCP relay, when the dot1q termination sub-interface sends a DHCP message to the user side, the system only encapsulates the smallest VLAN ID of the sub-interface into the message. The system, however, does not process other VLAN IDs. In this example, if dot1q termination vid 10 and dot1q termination vid 20 are configured on the termination sub-interface, the system encapsulates only VLAN 10 into DHCP messages when sending DHCP messages to the user side. In this case, users in VLAN 20 cannot obtain IP addresses. On different sub-interfaces, the vid value cannot overlap The dot1q sub-interface need not be configured with the dhcp option82 insert enable command and the dhcp option82 rebuild enable command.

l l

5.

Configure the basic Layer 2 forwarding function. # Configure Switch.


<Quidway> system-view [Quidway] sysname Switch [Switch] interface gigabitethernet 1/0/0 [Switch-GigabitEthernet1/0/0] port trunk allow-pass vlan 10 20 [Switch-GigabitEthernet1/0/0] quit [Switch] vlan 10 [Switch-vlan10] port gigabitethernet 1/0/1 [Switch-vlan10] quit [Switch] vlan 20 [Switch-vlan20] port gigabitethernet 1/0/2 [Switch-vlan20] quit

6.

Verify the configuration. Run the display dhcp server ip-in-use command on the DHCP server to view the address binding information about the DHCP client, such as the hardware address, the IP address, and the lease period.
[DHCP-Server] display dhcp server ip-in-use all Global pool: IP address Hardware address Lease expiration 100.1.1.3 0014-2aee-1351 Jun 24 2007 23:35:55 PM 100.1.1.4 00e0-4c77-1af7 Jun 24 2007 23:36:58 PM Interface pool: IP address Hardware address Lease expiration Type Auto:COMMITTED Auto:COMMITTED Type

Run the display dhcp relay address command on the DHCP relay device to view the address configuration of the DHCP relay device.
<DHCP-Relay> display dhcp relay address all ** GigabitEthernet2/0/0.1 DHCP Relay Address Relay Address [0] : 100.1.3.1 **

The DHCP client can obtain an IP address allocated by the DHCP server through the DHCP relay.

Configuration Files
l

Configuration file of a DHCP relay


# sysname DHCP-Relay

5-146

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
# interface GigabitEthernet2/0/0 undo shutdown mode user-termination # interface GigabitEthernet2/0/0.1 undo shutdown control-vid 1 dot1q-termination dot1q termination vid 10 dot1q termination vid 20 ip address 100.1.1.1 255.255.255.0 ip relay address 100.1.3.1 dhcp select relay arp broadcast enable # interface Pos 1/0/0 link-protocol ppp undo shutdown ip address 100.1.2.1 255.255.255.0 # return l

5 QinQ Configuration

Configuration file of a DHCP server


# sysname DHCP-Server # interface Pos 1/0/0 link-protocol ppp undo shutdown ip address 100.1.3.1 255.255.255.0 dhcp select global # dhcp server ip-pool 1 network 100.1.1.0 mask 255.255.255.0 gateway-list 100.1.1.254 dns-list 100.1.1.2 domain-name huawei.com expired day 10 hour 12 # dhcp server forbidden-ip 100.1.1.2 dhcp server forbidden-ip 100.1.1.254 # ip route-static 100.1.1.0 255.255.255.0 100.1.2.1 # return

Configuration file of Switch


# sysname Switch # vlan batch 10 20 # interface GigabitEthernet1/0/0 undo shutdown port trunk allow-pass vlan 10 20 # interface GigabitEthernet1/0/1 undo shutdown port default vlan 10 # interface GigabitEthernet1/0/2 undo shutdown port default vlan 20 # return

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-147

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5.13.14 Example for Configuring the Sub-interface for QinQ VLAN Tag Termination to Support the DHCP Relay
Network Requirements
As shown in Figure 5-33, the network segment to which the DHCP client belongs is 100.1.1.0/24, while the network segment to which the DHCP server belongs is 100.1.3.0/24. The DHCP packets should be relayed through the router with the DHCP relay function to make the DHCP client obtain the related configuration information such as the IP address from the DHCP server. The DHCP server should be assigned an IP address pool on the network segment 100.1.1.0, so that the DHCP server can assign IP addresses to the DHCP clients on the network segment. You need to configure the route to the network segment 100.1.1.0 on the DHCP server. After the DHCP server receives a packet containing Option82 information from the DHCP relay, the DHCP server sends a response also contains Option82 information to the DHCP relay. The lease period of the addresses on the segment 100.1.1.0/24 is 10 days and 12 hours, and the domain name is huawei.com. The DNS address is 100.1.1.2. There is no NetBIOS address. The address of the egress device is 100.1.1.254. The packets received on the DHCP relay carries double VLAN tags. Figure 5-33 Typical networking diagram of configuring the sub-interface for QinQ VLAN tag termination to support the DHCP relay

Configuration Roadmap
The configuration roadmap is as follows: 1. 2.
5-148

Configure DHCP relay on the router. Enable DHCP.


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

3. 4. 5. 6. 7. 8.

Configure the interface implementing the DHCP relay function, such as the IP address and subnet mask. Configure the IP relay address for the interface. Enable the DHCP relay function on the interface. Configure the sub-interface for QinQ VLAN tag termination on the DHCP relay. Configure the VLAN stacking function on Switch 1. Configure the Layer 2 forwarding function.

Data Preparation
To complete the configuration, you need the following data:
l l l

IP address of the interface implementing the DHCP relay function Address pool range of the DHCP server Terminating range of the sub-interface for QinQ VLAN tag termination

Configuration Procedure
1. Configure the mode of the DHCP relay to user termination.
<Quidway> system-view [Quidway] sysname DHCP-Relay [DHCP-Relay] interface gigabitethernet 2/0/0 [DHCP-Relay-GigabitEthernet2/0/0] mode user-termination [DHCP-Relay-GigabitEthernet2/0/0] quit

2.

Configure the DHCP relay. # Enable DHCP.


<DHCP-Relay> system-view [DHCP-Relay] dhcp enable

# Configure the address for POS 1/0/0.


<DHCP-Relay> system-view [DHCP-Relay] interface pos 1/0/0 [DHCP-Relay-Pos1/0/0] ip address 100.1.2.1 24

# Enter the view of the interface on which DHCP relay is to be enabled and configure its IP address and mask to keep it and the DHCP client on the same network segment.
<DHCP-Relay> system-view [DHCP-Relay] interface gigabitethernet 2/0/0.1 [DHCP-RelayGigabitEthernet2/0/0.1] ip address 100.1.1.1 24 [DHCP-Relay-GigabitEthernet2/0/0.1] ip relay address 100.1.3.1 [DHCP-Relay-GigabitEthernet2/0/0.1] dhcp select relay

3.

Configure the DHCP server. # Configure the route from Router 2 to Router 1.
<Quidway> system-view [Quidway] sysname DHCP-Server [DHCP-Server] ip route-static 100.1.1.0 24 100.1.2.1

# Enable DHCP.
<DHCP-Server> system-view [DHCP-Server] dhcp enable

# Configure the client connected with POS 1/0/0 to obtain the IP address from the global address pool.
<DHCP-Server> system-view [DHCP-Server] interface pos 1/0/0 [DHCP-Server-Pos1/0/0] ip address 100.1.3.1 24

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-149

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[DHCP-Server-Pos1/0/0] dhcp select global

# Configure the IP addresses that are not assigned automatically, including the address of the DNS server, the address of NetBIOS, and the address of the egress gateway.
<DHCP-Server> system-view [DHCP-Server] dhcp server forbidden-ip 100.1.1.2 [DHCP-Server] dhcp server forbidden-ip 100.1.1.254

# Configure the attributes of the DHCP address pool 1, including the address pool range, the domain name, the egress gateway, the DNS address, and the lease period of the address.
<DHCP-Server> system-view [DHCP-Server] dhcp server ip-pool 1 [DHCP-Server-dhcp-1] network 100.1.1.0 mask 255.255.255.0 [DHCP-Server-dhcp-1] domain-name huawei.com [DHCP-Server-dhcp-1] dns-list 100.1.1.2 [DHCP-Server-dhcp-1] gateway-list 100.1.1.254 [DHCP-Server-dhcp-1] expired day 10 hour 12 [DHCP-Server-dhcp-1] quit

4.

Configure the sub-interface for QinQ VLAN tag termination on the DHCP relay.
<DHCP-Relay> system-view [DHCP-Relay] interface gigabitethernet 2/0/0.1 [DHCP-Relay-GigabitEthernet2/0/0.1] control-vid 1 qinq-termination [DHCP-Relay-GigabitEthernet2/0/0.1] qinq termination pe-vid 100 ce-vid 10 [DHCP-Relay-GigabitEthernet2/0/0.1] qinq termination pe-vid 100 ce-vid 20 [DHCP-Relay-GigabitEthernet2/0/0.1] dhcp option82 rebuild enable [DHCP-Relay-GigabitEthernet2/0/0.1] arp broadcast enable
NOTE

l l

When the qinq termination command is used, the ranges of ce-vid cannot overlap if pe-vid of two sub-interfaces is the same. For the DHCP relay, you need to use the dhcp option82 insert enable command or the dhcp option82 rebuild enable command on the QinQ termination sub-interface to insert the Option82 information into the DHCP packet. If the QinQ termination sub-interface cannot insert the Option82 information into the DHCP packet, the client cannot obtain the IP address through this sub-interface. After the relay sends a packet containing Option82 information to the DHCP server, the Offer or ACK message returned from the DHCP server must contain the Option82 information.

5.

Configure the basic Layer 2 forwarding function. # Configure Switch 2.


<Quidway> system-view [Quidway] sysname Switch2 [Switch2] vlan 10 [Switch2-vlan10] port gigabitethernet 1/0/0 [Switch2-vlan10] quit [Switch2] interface gigabitethernet 1/0/1 [Switch2-GigabitEthernet1/0/1] port trunk allow-pass vlan 10 [Switch2-GigabitEthernet1/0/1] quit

# Configure Switch 3.
<Quidway> system-view [Quidway] sysname Switch3 [Switch3] vlan 20 [Switch3-vlan20] port gigabitethernet 1/0/0 [Switch3-vlan20] quit [Switch3] interface gigabitethernet 1/0/1 [Switch3-GigabitEthernet1/0/1] port trunk allow-pass vlan 20 [Switch3-GigabitEthernet1/0/1] quit

6.

Configure QinQ and set the packets sent from Switch 1 to the DHCP server to carry double tags. # Configure Switch 1.
<Quidway> system-view

5-150

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[Quidway] sysname Switch1 [Switch1] vlan 100 [Switch1-vlan100] quit [Switch1] interface gigabitethernet [Switch1-GigabitEthernet1/0/0] port [Switch1-GigabitEthernet1/0/0] quit [Switch1] interface gigabitethernet [Switch1-GigabitEthernet1/0/1] port 100 [Switch1-GigabitEthernet1/0/1] quit [Switch1] interface gigabitethernet [Switch1-GigabitEthernet1/0/2] port 100 [Switch1-GigabitEthernet1/0/2] quit

5 QinQ Configuration

1/0/0 trunk allow-pass vlan 100 1/0/1 vlan-stacking outside-vlan 10 stack-vlan 1/0/2 vlan-stacking outside-vlan 20 stack-vlan

7.

Verify the configuration. Run the display dhcp server ip-in-use command to view the address binding information about the DHCP client, such as the hardware address, the IP address, and the lease period of the address on the DHCP server.
[DHCP-Server] display dhcp server ip-in-use all Global pool: IP address Hardware address Lease expiration 100.1.1.3 0014-2aee-1351 Jun 24 2007 23:35:55 PM 100.1.1.4 00e0-4c77-1af7 Jun 24 2007 23:36:58 PM Interface pool: IP address Hardware address Lease expiration Type Auto:COMMITTED Auto:COMMITTED Type

Run the display dhcp relay address command to view the configuration of the DHCP relay address of the interface on the DHCP relay.
<Router1> display dhcp relay address all ** GigabitEthernet2/0/0.1 DHCP Relay Address Relay Address [0] : 100.1.3.1 **

The DHCP client can obtain an IP address allocated by the DHCP server through the DHCP relay.

Configuration Files
l

Configuration file a DHCP relay


# sysname DHCP-Relay # interface GigabitEthernet2/0/0 undo shutdown mode user-termination # interface GigabitEthernet2/0/0.1 undo shutdown control-vid 1 qinq-termination qinq termination pe-vid 100 ce-vid 10 qinq termination pe-vid 100 ce-vid 20 dhcp select relay ip address 100.1.1.1 255.255.255.0 ip relay address 100.1.3.1 dhcp option82 rebuild enable arp broadcast enable # interface Pos 1/0/0 link-protocol ppp undo shutdown ip address 100.1.2.1 255.255.255.0 # return

Configuration file a DHCP server


# sysname DHCP-Server

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-151

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
# interface Pos 1/0/0 link-protocol ppp undo shutdown ip address 100.1.3.1 255.255.255.0 dhcp select global # dhcp server ip-pool 1 network 100.1.1.0 mask 255.255.255.0 gateway-list 100.1.1.254 dns-list 100.1.1.2 domain-name huawei.com expired day 10 hour 12 # dhcp server forbidden-ip 100.1.1.2 dhcp server forbidden-ip 100.1.1.254 # ip route-static 100.1.1.0 255.255.255.0 100.1.2.1 # return

Configuration file of Switch 1


# sysname Switch1 # vlan batch 100 # interface GigabitEthernet1/0/0 undo shutdown port trunk allow-pass vlan 100 # interface GigabitEthernet1/0/1 undo shutdown port vlan-stacking outside-vlan 10 stack-vlan 100 # interface GigabitEthernet1/0/2 undo shutdown port vlan-stacking outside-vlan 20 stack-vlan 100 # return

Configuration file of Switch 2


# sysname Switch2 # vlan batch 10 # interface GigabitEthernet1/0/0 undo shutdown port default vlan 10 # interface GigabitEthernet1/0/1 undo shutdown port trunk allow-pass vlan 10 # return

Configuration file of Switch 3


# sysname Switch3 # vlan batch 20 # interface GigabitEthernet1/0/0 undo shutdown port default vlan 20 # interface GigabitEthernet1/0/1 undo shutdown port trunk allow-pass vlan 20

5-152

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
# return

5 QinQ Configuration

5.13.15 Example for Configuring Dynamic QinQ


Networking Requirements
As shown in Figure 5-34, the DHCP client connects to the DHCP relay through two-hierarchy switches and requests valid IP addresses from the DHCP server through the DHCP relay. The DHCP server supports Option82 return. The lease period of the addresses on the segment 10.1.1.0/24 is 10 days and 12 hours, and the domain name is huawei.com. The DNS address is 10.1.1.2. There is no NetBIOS address. Two-hierarchy switches attach double tags to the packets that are sent from the DHCP client to the DHCP relay. It is required to configure the sub-interface of the DHCP relay on the client side to terminate double tags in the client packet and support the DHCP relay function. Furthermore, the following features need be deployed on the DHCP relay:
l

Dynamic QinQ Dynamic QinQ is configured on the termination sub-interface of the DHCP relay on the client side. When users log in, resources are allocated to users. When users log out arising from exceptions after requesting IP addresses, the system senses this failure automatically, then deletes the binding in the DHCP binding table, and notifies the DHCP server to release IP addresses.

Security features The DHCP relay can defend itself against the following types of DHCP attacks:

Bogus DHCP server attack Middleman attack and IP/MAC spoofing attack DoS attack by changing CHADDR Attack by sending bogus DHCP request messages for extending IP lease Attack by sending the DHCP request message

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-153

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Figure 5-34 Networking diagram of dynamic QinQ

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. 5. 6. 7. Configure the interface mode on the DHCP relay as the user termination mode. Configure the basic functions of the DHCP relay. Configure the basic functions of the DHCP server. Configure the sub-interface for QinQ termination to support DHCP relay and dynamic QinQ. Configure the basic functions of DHCP snooping. Associate ARP with DHCP snooping so that the DHCP relay can dynamically sense users' log in and log out. Configure Layer 2 forwarding and QinQ for Switch.

Data Preparation
To complete the configuration, you need the following data:
l l l

IP address of the interface to be configured with DHCP relay Address pool range of the DHCP server Tag values of the sub-interface for QinQ termination
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

5-154

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
l l

5 QinQ Configuration

Rate for sending the DHCP message to CPU Threshold of the alarm sent to the Network Management System (NMS)

Configuration Procedure
1. Configure the user termination mode on the interface of the DHCP relay.
<Quidway> system-view [Quidway] sysname DHCP-Relay [DHCP-Relay] interface gigabitethernet 1/0/0 [DHCP-Relay-GigabitEthernet1/0/0] mode user-termination [DHCP-Relay-GigabitEthernet1/0/0] undo shutdown [DHCP-Relay-GigabitEthernet1/0/0] quit

2.

Configure the basic DHCP relay function. # Enable the DHCP service.
[DHCP-Relay] dhcp enable

# Assign an IP address to GE 2/0/0.


[DHCP-Relay] interface gigabitethernet 2/0/0 [DHCP-Relay-GigabitEthernet2/0/0] ip address 100.1.1.1 24 [DHCP-Relay-GigabitEthernet2/0/0] undo shutdown [DHCP-Relay-GigabitEthernet2/0/0] quit

# Configure a sub-interface that is to implement DHCP relay. Assign an IP address and subnet mask to the sub-interface so that the sub-interface and the DHCP client reside on the same segment.
[DHCP-Relay] interface gigabitethernet 1/0/0.1 [DHCP-RelayGigabitEthernet1/0/0.1] ip address 10.1.1.1 24 [DHCP-Relay-GigabitEthernet1/0/0.1] ip relay address 100.1.1.2 [DHCP-Relay-GigabitEthernet1/0/0.1] dhcp select relay [DHCP-Relay-GigabitEthernet1/0/0.1] undo shutdown [DHCP-Relay-GigabitEthernet1/0/0.1] quit

3.

Configure a DHCP server. # Enable a DHCP server.


<Quidway> system-view [Quidway] sysname DHCP-Server [DHCP-Server] dhcp enable

# Configure the client on GE 1/0/0 to obtain IP addresses from the global address pool.
[DHCP-Server] interface gigabitethernet 1/0/0 [DHCP-Server-GigabitEthernet1/0/0] ip address 100.1.1.2 24 [DHCP-Server-GigabitEthernet1/0/0] dhcp select global [DHCP-Server-GigabitEthernet1/0/0] quit

# Configure the IP addresses that are not automatically assigned, including the DNS server address, the NetBIOS address, and the egress gateway address.
[DHCP-Server] dhcp server forbidden-ip 10.1.1.1 [DHCP-Server] dhcp server forbidden-ip 10.1.1.2 [DHCP-Server] dhcp server forbidden-ip 10.1.1.254

# Configure the attributes for DHCP address pool 1, including the address pool range, the domain name, the egress gateway, the DNS address, and the address lease period.
[DHCP-Server] dhcp server ip-pool 1 [DHCP-Server-dhcp-1] network 10.1.1.0 mask 255.255.255.0 [DHCP-Server-dhcp-1] domain-name huawei.com [DHCP-Server-dhcp-1] dns-list 10.1.1.2 [DHCP-Server-dhcp-1] gateway-list 10.1.1.254 [DHCP-Server-dhcp-1] expired day 10 hour 12 [DHCP-Server-dhcp-1] quit

4.

Configure the sub-interface for QinQ termination on the DHCP relay and dynamic QinQ.
[DHCP-Relay] interface gigabitethernet 1/0/0.1

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-155

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[DHCP-Relay-GigabitEthernet1/0/0.1] [DHCP-Relay-GigabitEthernet1/0/0.1] [DHCP-Relay-GigabitEthernet1/0/0.1] 51200 inbound [DHCP-Relay-GigabitEthernet1/0/0.1] [DHCP-Relay-GigabitEthernet1/0/0.1] [DHCP-Relay-GigabitEthernet1/0/0.1] [DHCP-Relay-GigabitEthernet1/0/0.1] [DHCP-Relay-GigabitEthernet1/0/0.1] [DHCP-Relay-GigabitEthernet1/0/0.1] [DHCP-Relay-GigabitEthernet1/0/0.1]
NOTE

control-vid 1 qinq-termination dynamic qinq-dynamic max-access-user 3 qinq-dynamic user-queue 1024 bandwidth qinq termination pe-vid 1 ce-vid 1 to 4094 qinq termination pe-vid 2 ce-vid 1 to 4094 dhcp option82 insert enable arp broadcast enable arp learning strict force-disable undo shutdown quit

For the DHCP relay, you need to use the dhcp option82 insert enable command or the dhcp option82 rebuild enable command on the QinQ termination sub-interface to insert the Option82 information into the DHCP packet. If the QinQ termination sub-interface cannot insert the Option82 information into the DHCP packet, the client cannot obtain the IP address through this sub-interface. The DHCP server must support the Option82 return function. Namely, the Offer or ACK message returned from the DHCP server must contain the Option82 information. Run the arp learning strict force-disable command to unfetter the dynamic QinQ interface from global ARP rigid learning so that the dynamic QinQ interface can learn the ARP request sent by users.

l l

5.

Enable DHCP snooping. (1) Enable global and interface-specific DHCP snooping.
[DHCP-Relay] dhcp snooping enable [DHCP-Relay] interface gigabitethernet 1/0/0.1 [DHCP-Relay-GigabitEthernet1/0/0.1] dhcp snooping enable [DHCP-Relay-GigabitEthernet1/0/0.1] quit [DHCP-Relay] interface gigabitethernet 2/0/0 [DHCP-Relay-GigabitEthernet2/0/0] dhcp snooping enable [DHCP-Relay-GigabitEthernet2/0/0] quit

(2) Configure a Trusted interface. # Configure the interface connecting to the DHCP server as a trusted interface and enable DHCP snooping on all the interfaces connecting to the DHCP client. (If the interface on the client side is not configured with "trusted", the default interface mode is "untrusted" after DHCP snooping is enabled on the interface.) This prevents the bogus DHCP server attack.
[DHCP-Relay] interface gigabitethernet 2/0/0 [DHCP-Relay-GigabitEthernet2/0/0] dhcp snooping trusted [DHCP-Relay-GigabitEthernet2/0/0] quit

(3) Check specific packets. # Check ARP packets and IP packets on the interface on the DHCP client side. This prevents the middleman attack and IP/MAC spoofing attack.
[DHCP-Relay] interface gigabitethernet 1/0/0.1 [DHCP-Relay-GigabitEthernet1/0/0.1] dhcp snooping check arp enable [DHCP-Relay-GigabitEthernet1/0/0.1] dhcp snooping check ip enable [DHCP-Relay-GigabitEthernet1/0/0.1] quit

# Check the DHCP request message on the interface on the DHCP client side. This prevents the attacker from sending bogus DHCP request messages for extending IP lease.
[DHCP-Relay] interface gigabitethernet 1/0/0.1 [DHCP-Relay-GigabitEthernet1/0/0.1] dhcp snooping check dhcp-request enable [DHCP-Relay-GigabitEthernet1/0/0.1] quit

# Check CHADDR packets on the interface on the DHCP client side. This prevents the DoS attack that is launched by changing the CHADDR value.
5-156 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

[DHCP-Relay] interface gigabitethernet 1/0/0.1 [DHCP-Relay-GigabitEthernet1/0/0.1] dhcp snooping check dhcp-chaddr enable [DHCP-Relay-GigabitEthernet1/0/0.1] quit

(4) Restrict the sending rate of DHCP messages. # Check the sending rate of DHCP messages to prevent the attacker from sending DHCP request messages.
[DHCP-Relay] dhcp snooping check dhcp-rate 90 [DHCP-Relay] dhcp snooping check dhcp-rate enable

(5) Configure forwarding behaviors for the packets that do not contain DHCP snooping entries. # Configure how to process unmatched ARP and IP packets globally.
[DHCP-Relay] dhcp snooping nomatch-packet arp action discard [DHCP-Relay] dhcp snooping nomatch-packet ip action discard

# Configure how to process unmatched ARP and IP packets on the interface.


[DHCP-Relay] interface gigabitethernet 1/0/0.1 [DHCP-Relay-GigabitEthernet1/0/0.1] dhcp snooping nomatch-packet arp action discard [DHCP-Relay-GigabitEthernet1/0/0.1] dhcp snooping nomatch-packet ip action discard [DHCP-Relay-GigabitEthernet1/0/0.1] quit

(6) Send alarms to the NMS. # Send alarms to the NMS.


[DHCP-Relay] interface gigabitethernet 1/0/0.1 [DHCP-Relay-GigabitEthernet1/0/0.1] dhcp snooping alarm [DHCP-Relay-GigabitEthernet1/0/0.1] dhcp snooping alarm [DHCP-Relay-GigabitEthernet1/0/0.1] dhcp snooping alarm [DHCP-Relay-GigabitEthernet1/0/0.1] dhcp snooping alarm enable [DHCP-Relay-GigabitEthernet1/0/0.1] quit [DHCP-Relay] dhcp snooping check dhcp-rate alarm enable dhcp-reply enable arp enable dhcp-chaddr enable dhcp-request

# Set the threshold for the alarm message.


[DHCP-Relay] interface gigabitethernet 1/0/0.1 [DHCP-Relay-GigabitEthernet1/0/0.1] dhcp snooping alarm dhcp-reply threshold 10 [DHCP-Relay-GigabitEthernet1/0/0.1] dhcp snooping alarm arp threshold 10 [DHCP-Relay-GigabitEthernet1/0/0.1] dhcp snooping alarm dhcp-chaddr threshold 10 [DHCP-Relay-GigabitEthernet1/0/0.1] dhcp snooping alarm dhcp-request threshold 10 [DHCP-Relay-GigabitEthernet1/0/0.1] quit [DHCP-Relay] dhcp snooping check dhcp-rate alarm threshold 40

6.

Associate ARP with DHCP snooping. # The system sends the ARP packet to probe the IP address that expires within the aging time in the DHCP snooping entry and does not exist in the ARP entry. If no user is detected within the specified detection times, the system deletes the binding relationship in the DHCP binding table and notifies the DHCP server to release the IP address.
[DHCP-Relay] arp dhcp-snooping-detect enable

7.

Configure QinQ so that the packets sent from Switch to the DHCP relay carry double tags.
NOTE

In this configuration example, Switch is a CX200/300 Metropolitan Area Network (MAN) service platform.

# Configure Switch.
<Quidway> system-view [Quidway] sysname Switch [Switch] vlan batch 1 to 2

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-157

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[Switch] interface gigabitethernet [Switch-GigabitEthernet2/0/0] port [Switch-GigabitEthernet2/0/0] undo [Switch-GigabitEthernet2/0/0] quit [Switch] interface gigabitethernet [Switch-GigabitEthernet1/0/1] port inbound [Switch-GigabitEthernet1/0/1] undo [Switch-GigabitEthernet1/0/1] quit [Switch] interface gigabitethernet [Switch-GigabitEthernet1/0/2] port inbound [Switch-GigabitEthernet1/0/2] undo [Switch-GigabitEthernet1/0/2] quit 2/0/0 trunk allow-pass vlan 1 to 2 shutdown 1/0/1 vlan-stacking vlan 1 to 4094 push vlan 1 shutdown 1/0/2 vlan-stacking vlan 1 to 4094 push vlan 2 shutdown

8.

Verify the configuration. The DHCP client can request valid IP addresses. Running the display this command on the termination sub-interface configured with dynamic QinQ, you can find that the controlvid dynamic command is configured on the sub-interface.
<DCHP-Relay> display this # interface GigabitEthernet1/0/1.1 control-vid 1 qinq-termination dynamic qinq termination pe-vid 2 ce-vid 1 to 4094 ip address 10.1.1.1 255.255.255.0 ip relay address 100.1.1.2 dhcp select relay dhcp snooping enable dhcp snooping check arp enable dhcp snooping alarm arp enable dhcp snooping alarm arp threshold 10 dhcp snooping nomatch-packet arp action discard dhcp snooping check ip enable dhcp snooping nomatch-packet ip action discard dhcp snooping alarm dhcp-reply enable dhcp snooping alarm dhcp-reply threshold 10 dhcp snooping check dhcp-chaddr enable dhcp snooping alarm dhcp-chaddr enable dhcp snooping alarm dhcp-chaddr threshold 10 dhcp snooping check dhcp-request enable dhcp snooping alarm dhcp-request enable dhcp snooping alarm dhcp-request threshold 10 dhcp option82 insert enable #

Running the display dhcp snooping global command on the DHCP relay, you can find that DHCP snooping is enabled in the global view and interface view. In addition, you can view the statistics of the alarm message sent to the NMS.
<DHCP-Relay> display dhcp snooping global dhcp snooping enable dhcp snooping nomatch-packet ip action discard dhcp snooping nomatch-packet arp action discard dhcp snooping check dhcp-rate enable dhcp snooping check dhcp-rate alarm enable dhcp snooping check dhcp-rate 90 dhcp snooping check dhcp-rate alarm threshold 40 <DHCP-Relay> display dhcp snooping interface gigabitethernet 1/0/0.1 dhcp snooping enable dhcp snooping check arp enable dhcp snooping alarm arp enable dhcp snooping alarm arp threshold 10 dhcp snooping nomatch-packet arp action discard dhcp snooping check ip enable dhcp snooping nomatch-packet ip action discard dhcp snooping alarm dhcp-reply enable dhcp snooping alarm dhcp-reply threshold 10 dhcp snooping check dhcp-chaddr enable dhcp snooping alarm dhcp-chaddr enable

5-158

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

dhcp snooping alarm dhcp-chaddr threshold 10 dhcp snooping check dhcp-request enable dhcp snooping alarm dhcp-request enable dhcp snooping alarm dhcp-request threshold 10 arp total 0 ip total 0 dhcp-request total 0 chaddr&src mac total 0 dhcp-reply total 0 <DHCP-Relay> display dhcp snooping interface gigabitethernet 2/0/0 dhcp snooping enable dhcp snooping trusted arp total 0 ip total 0 dhcp-request total 0 chaddr&src mac total 0 dhcp-reply total 0 <DHCP-Relay> display dhcp option82 interface gigabitethernet 1/0/0.1 dhcp option82 insert enable interface GigabitEthernet1/0/0.1

Configuration Files
l

Configuration file of a DHCP relay


# sysname DHCP-Relay # dhcp snooping enable dhcp snooping nomatch-packet ip action discard dhcp snooping nomatch-packet arp action discard dhcp snooping check dhcp-rate enable dhcp snooping check dhcp-rate alarm enable dhcp snooping check dhcp-rate 90 dhcp snooping check dhcp-rate alarm threshold 40 # interface GigabitEthernet1/0/0 undo shutdown # interface GigabitEthernet1/0/0.1 undo shutdown control-vid 1 qinq-termination dynamic qinq-dynamic max-access-user 3 qinq-dynamic user-queue 1024 bandwidth 51200 inbound qinq termination pe-vid 1 ce-vid 1 to 4094 qinq termination pe-vid 2 ce-vid 1 to 4094 ip address 10.1.1.1 255.255.255.0 ip relay address 100.1.1.2 dhcp select relay arp learning strict force-disable dhcp snooping enable dhcp snooping check arp enable dhcp snooping alarm arp enable dhcp snooping alarm arp threshold 10 dhcp snooping nomatch-packet arp action discard dhcp snooping check ip enable dhcp snooping nomatch-packet ip action discard dhcp snooping alarm dhcp-reply enable dhcp snooping alarm dhcp-reply threshold 10 dhcp snooping check dhcp-chaddr enable dhcp snooping alarm dhcp-chaddr enable dhcp snooping alarm dhcp-chaddr threshold 10 dhcp snooping check dhcp-request enable dhcp snooping alarm dhcp-request enable dhcp snooping alarm dhcp-request threshold 10 dhcp option82 insert enable # interface GigabitEthernet2/0/0 undo shutdown dhcp snooping enable dhcp snooping trusted

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-159

5 QinQ Configuration
# arp dhcp-snooping-detect enable # return l

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Configuration file of a DHCP server


# sysname DHCP-Server # interface GigabitEthernet 1/0/0 undo shutdown ip address 100.1.1.2 255.255.255.0 dhcp select global # dhcp server ip-pool 1 network 10.1.1.0 mask 255.255.255.0 gateway-list 10.1.1.254 dns-list 10.1.1.2 domain-name huawei.com expired day 10 hour 12 # dhcp server forbidden-ip 10.1.1.1 dhcp server forbidden-ip 10.1.1.2 dhcp server forbidden-ip 10.1.1.254 # return

Configuration file of Switch


# sysname Switch # vlan batch 1 to 2 # interface GigabitEthernet1/0/1 undo shutdown port vlan-stacking vlan 1 to 4094 push vlan 1 inbound # interface GigabitEthernet1/0/2 undo shutdown port vlan-stacking vlan 1 to 4094 push vlan 2 inbound # interface GigabitEthernet2/0/0 undo shutdown port trunk allow-pass vlan 1 to 2 # return

5.13.16 Example for Configuring the Sub-interface for VLAN Stacking to Access an L2VPN
Networking Requirements
As shown in Figure 5-35, the sub-interfaces GE1/0/0.1 of CEs are connected to PEs through switches. The packet sent from the CE to the switch carries no tag. The switch then labels the packets from the CE with different outer tags according to the inbound interface. The packets sent from the switch to the PE carries on VLAN tag. It is required to configure the sub-interface for VLAN stacking on the PE to access an L2VPN to implement inter-communication between CE1 and CE2, and between CE3 and CE4.

5-160

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

Figure 5-35 Typical networking diagram of configuring the sub-interface for VLAN stacking to access an L2VPN

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. 5. 6. Configure the interface mode on PE1 and PE2 as the user termination mode. Run IGP on the backbone network to interconnect the devices. Enable basic MPLS capabilities to set up an LSP in the backbone network. Set up MPLS LDP remote peer relationship between the PEs at both ends of the PW. Configure the sub-interface for QinQ VLAN stacking on the client side to access an L2VPN on the PE. Configure Layer 2 forwarding on Switch.

Data Preparation
To complete the configuration, you need the following data:
l l l l

Names of the interfaces through which the PEs and the CEs are connected L2VC IDs that must be identical at both ends of the PW MPLS LSR IDs on the PEs and Ps IP addresses of the remote peers of the PEs

Configuration Procedure
1. Configure the interface mode to user termination. # Configure PE1.
<Quidway> system-view [Quidway] sysname PE1 [PE1] interface gigabitethernet 2/0/0

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-161

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[PE1-GigabitEthernet2/0/0] mode user-termination [PE1-GigabitEthernet2/0/0] quit

# Configure PE2.
<Quidway> system-view [Quidway] sysname PE2 [PE2] interface gigabitethernet 2/0/0 [PE2-GigabitEthernet2/0/0] mode user-termination [PE2-GigabitEthernet2/0/0] quit

2.

Configure IGP on the MPLS backbone network. OSPF is configured in this example. Configure the IP addresses of the interfaces on the PEs and Ps, as shown in Figure 5-35. When you configure OSPF, advertise the IP addresses of the loopback interfaces on PE1, P, and PE2. # Configure PE1.
<PE1> system-view [PE1] interface loopback 1 [PE1-LoopBack1] ip address 1.1.1.9 32 [PE1-LoopBack1] quit [PE1] interface pos 1/0/0 [PE1-Pos1/0/0] ip address 100.1.1.1 24 [PE1-Pos1/0/0] quit [PE1] ospf [PE1-ospf-1] area 0 [PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0 [PE1-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255 [PE1-ospf-1-area-0.0.0.0] quit [PE1-ospf-1] quit

# Configure P.
<Quidway> system-view [Quidway] sysname P [P] interface LoopBack 1 [P-LoopBack1] ip address 2.2.2.9 32 [P-LoopBack1] quit [P] interface pos 1/0/0 [P-Pos1/0/0] ip address 100.1.1.2 24 [P-Pos1/0/0] quit [P] interface pos 2/0/0 [P-Pos2/0/0] ip address 100.1.2.1 24 [P-Pos2/0/0] quit [P] ospf [P-ospf-1] area 0 [P-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0 [P-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255 [P-ospf-1-area-0.0.0.0] network 100.1.2.0 0.0.0.255 [P-ospf-1-area-0.0.0.0] quit [P-ospf-1] quit

# Configure PE2.
<PE2> system-view [PE2] interface loopback 1 [PE2-LoopBack1] ip address 3.3.3.9 32 [PE2-LoopBack1] quit [PE2] interface pos 1/0/0 [PE2-Pos1/0/0] ip address 100.1.2.2 24 [PE2-Pos1/0/0] quit [PE2] ospf [PE2-ospf-1] area 0 [PE2-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0 [PE2-ospf-1-area-0.0.0.0] network 100.1.2.0 0.0.0.255 [PE2-ospf-1-area-0.0.0.0] quit [PE2-ospf-1] quit

After this step, PE1 and PE2 can discover the routes of Loopback1 through OSPF and ping through each other. Take the display on PE1 as an example:
5-162 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

<PE1> display ip routing-table Route Flags: R - relied, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 9 Routes : 9 Destination/Mask Proto Pre Cost Flags NextHop Interface 1.1.1.9/32 Direct 0 0 D 127.0.0.1 InLoopBack0 2.2.2.9/32 OSPF 10 2 D 100.1.1.2 Pos1/0/0 3.3.3.9/32 OSPF 10 3 D 100.1.1.2 Pos1/0/0 100.1.1.0/24 Direct 0 0 D 100.1.1.1 Pos1/0/0 100.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 100.1.1.2/32 Direct 0 0 D 100.1.1.2 Pos1/0/0 100.1.2.0/24 OSPF 10 2 D 100.1.1.2 Pos1/0/0 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 <PE1> ping 100.1.2.2 PING 100.1.2.2: 56 data bytes, press CTRL_C to break Reply from 100.1.2.2: bytes=56 Sequence=1 ttl=254 time=200 ms Reply from 100.1.2.2: bytes=56 Sequence=2 ttl=254 time=60 ms Reply from 100.1.2.2: bytes=56 Sequence=3 ttl=254 time=90 ms Reply from 100.1.2.2: bytes=56 Sequence=4 ttl=254 time=90 ms Reply from 100.1.2.2: bytes=56 Sequence=5 ttl=254 time=90 ms --- 100.1.2.2 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 60/106/200 ms

3.

Enable the basic MPLS capabilities and LDP on the MPLS backbone network. # Configure PE1.
[PE1] mpls lsr-id 1.1.1.9 [PE1] mpls [PE1-mpls] lsp-trigger all [PE1-mpls] quit [PE1] mpls ldp [PE1-mpls-ldp] quit [PE1] interface pos 1/0/0 [PE1-Pos1/0/0] mpls [PE1-Pos1/0/0] mpls ldp [PE1-Pos1/0/0] quit

# Configure P.
[P] mpls lsr-id 2.2.2.9 [P] mpls [P-mpls] lsp-trigger all [P-mpls] quit [P] mpls ldp [P-mpls-ldp] quit [P] interface pos1/0/0 [P-Pos1/0/0] mpls [P-Pos1/0/0] mpls ldp [P-Pos1/0/0] quit [P] interface pos2/0/0 [P-Pos2/0/0] mpls [P-Pos2/0/0] mpls ldp [P-Pos2/0/0] quit

# Configure PE2.
[PE2] mpls lsr-id 3.3.3.9 [PE2] mpls [PE2-mpls] lsp-trigger all [PE2-mpls] quit [PE2] mpls ldp [PE2-mpls-ldp] quit [PE2] interface pos 1/0/0 [PE2-Pos1/0/0] mpls [PE2-Pos1/0/0] mpls ldp [PE2-Pos1/0/0] quit

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-163

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

After the preceding configurations, LDP sessions are set up between PE1 and P, and between P and PE2. Running the display mpls ldp session command, you can view that the Status field is "Operational". Running the display mpls ldp lsp command, you can view the establishment status of the LDP LSP. Take the display on PE1 as an example:
<PE1> display mpls ldp session LDP Session(s) in Public Network -----------------------------------------------------------------------------Peer-ID Status LAM SsnRole SsnAge KA-Sent/Rcv -----------------------------------------------------------------------------2.2.2.9:0 Operational DU Passive 000:00:01 5/5 -----------------------------------------------------------------------------TOTAL: 1 session(s) Found. LAM : Label Advertisement Mode SsnAge Unit : DDD:HH:MM <PE1> display mpls ldp lsp LDP LSP Information -----------------------------------------------------------------------------SN DestAddress/Mask In/OutLabel Next-Hop In/Out-Interface -----------------------------------------------------------------------------1 1.1.1.9/32 3/NULL 127.0.0.1 Pos1/0/0/InLoop0 2 2.2.2.9/32 NULL/3 100.1.1.2 -------/Pos1/0/0 3 3.3.3.9/32 NULL/1024 100.1.1.2 -------/Pos1/0/0 4 100.1.2.0/24 NULL/3 100.1.1.2 -------/Pos1/0/0 -----------------------------------------------------------------------------TOTAL: 4 Normal LSP(s) Found. TOTAL: 0 Liberal LSP(s) Found. A '*' before an LSP means the LSP is not established A '*' before a Label means the USCB or DSCB is stale

4.

Set up remote LDP sessions between the PEs. # Configure PE1.


[PE1] mpls ldp remote-peer 1 [PE1-mpls-ldp-remote-1] remote-ip 3.3.3.9 [PE1-mpls-ldp-remote-1] quit

# Configure PE2.
[PE2] mpls ldp remote-peer 1 [PE2-mpls-ldp-remote-1] remote-ip 1.1.1.9 [PE2-mpls-ldp-remote-1] quit

After the configuration, LDP sessions can be set up between PE1 and P and between PE2 and P. Running the display mpls ldp session command, you can view that the Status is "Operational". Running the display mpls ldp lsp command, you can view the setup of the LDP LSP. Take PE1 as an example.
<PE1> display mpls ldp session LDP Session(s) in Public Network -----------------------------------------------------------------------------Peer-ID Status LAM SsnRole SsnAge KA-Sent/Rcv -----------------------------------------------------------------------------2.2.2.9:0 Operational DU Passive 000:00:15 64/64 3.3.3.9:0 Operational DU Passive 000:00:01 5/5 -----------------------------------------------------------------------------TOTAL: 2 session(s) Found.

5-164

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

LAM : Label Advertisement Mode SsnAge Unit : DDD:HH:MM <PE1> display mpls ldp lsp LDP LSP Information -----------------------------------------------------------------------------SN DestAddress/Mask In/OutLabel Next-Hop In/Out-Interface -----------------------------------------------------------------------------1 1.1.1.9/32 3/NULL 127.0.0.1 Pos1/0/0/InLoop0 2 2.2.2.9/32 NULL/3 100.1.1.2 -------/Pos1/0/0 3 3.3.3.9/32 NULL/1025 100.1.1.2 -------/Pos1/0/0 4 100.1.1.0/24 3/NULL 100.1.1.1 -------/Pos1/0/0 5 100.1.2.0/24 NULL/3 100.1.1.2 -------/Pos1/0/0 *6 100.1.2.0/24 Liberal -----------------------------------------------------------------------------TOTAL: 5 Normal LSP(s) Found. TOTAL: 1 Liberal LSP(s) Found. A '*' before an LSP means the LSP is not established A '*' before a Label means the USCB or DSCB is stale

5.

Enable MPLS L2VPN on the PEs and set up VCs. # Configure PE1.
[PE1] mpls l2vpn [PE1] interface gigabitethernet 2/0/0.1 [PE1-GigabitEthernet2/0/0.1] qinq stacking vid 10 [PE1-GigabitEthernet2/0/0.1] qinq stacking vid 20 [PE1-GigabitEthernet2/0/0.1] mpls l2vc 3.3.3.9 101 [PE1-GigabitEthernet2/0/0.1] quit

# Configure PE2.
[PE2] mpls l2vpn [PE2] interface gigabitethernet 2/0/0.1 [PE2-GigabitEthernet2/0/0.1] qinq stacking vid 10 [PE2-GigabitEthernet2/0/0.1] qinq stacking vid 20 [PE2-GigabitEthernet2/0/0.1] mpls l2vc 1.1.1.9 101 [PE2-GigabitEthernet2/0/0.1] quit
NOTE

Here, when configuring the sub-interface for QinQ VLAN stacking, you need to specify the value of only the inner VLAN tag. The value of the outer tag is not required. The outer VLA tag is appended automatically by the system.

6.

Configure the basic Layer 2 forwarding function and set the packet sent from the switch to the PE to carry one VLAN tag. # Configure Switch 1.
<Quidway> system-view [Quidway] sysname Switch1 [Switch1] vlan 10 [Switch1-vlan10] port gigabitethernet 1/0/1 [Switch1-vlan10] quit [Switch1] vlan 20 [Switch1-vlan20] port gigabitethernet 1/0/2 [Switch1-vlan20] quit [Switch1] interface gigabitethernet 1/0/0 [Switch1-GigabitEthernet1/0/0] port trunk allow-pass vlan 10 20 [Switch1-GigabitEthernet1/0/0] quit

# Configure Switch 2.
<Quidway> system-view [Quidway] sysname Switch2 [Switch2] vlan 10 [Switch2-vlan10] port gigabitethernet 1/0/1 [Switch2-vlan10] quit [Switch2] vlan 20 [Switch2-vlan20] port gigabitethernet 1/0/2 [Switch2-vlan20] quit

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-165

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[Switch2] interface gigabitethernet 1/0/0 [Switch2-GigabitEthernet1/0/0] port trunk allow-pass vlan 10 20 [Switch2-GigabitEthernet1/0/0] quit
NOTE

When the qinq termination command is used, the ranges of ce-vid cannot overlap if pe-vid of two sub-interfaces is the same.

Configure IP addresses of the interfaces on CEs based on Figure 5-35. Set the packet sent from the CE to the switch to carry no VLAN tag. # Configure CE1.
<Quidway> system-view [Quidway] sysname CE1 [CE1] interface gigabitethernet 1/0/0 [CE1-GigabitEthernet1/0/0] ip address 10.1.1.1 24 [CE1-GigabitEthernet1/0/0] quit

# Configure CE2.
<Quidway> system-view [Quidway] sysname CE2 [CE2] interface gigabitethernet 1/0/0 [CE2-GigabitEthernet1/0/0] ip address 10.1.1.2 24 [CE2-GigabitEthernet1/0/0] quit

# Configure CE3.
<Quidway> system-view [Quidway] sysname CE3 [CE3] interface gigabitethernet 1/0/0 [CE3-GigabitEthernet1/0/0] ip address 20.1.1.1 24 [CE3-GigabitEthernet1/0/0] quit

# Configure CE4.
<Quidway> system-view [Quidway] sysname CE4 [CE4] interface gigabitethernet 1/0/0 [CE4-GigabitEthernet1/0/0] ip address 20.1.1.2 24 [CE4-GigabitEthernet1/0/0] quit

7.

Verify the configuration. On the PEs, you can view that an L2 VC is set up and is in the Up state. Take the display on PE1 as an example:
<PE1> display mpls l2vc Total ldp vc : 2 2 up 0 down *Client Interface : GigabitEthernet2/0/0.2 Session State : up AC Status : up VC State : up VC ID : 102 VC Type : vlan Destination : 3.3.3.9 Local VC Label : 21505 Remote VC Label : 21505 Control Word : Disable Local VC MTU : 1500 Remote VC MTU : 1500 Tunnel Policy Name : -Traffic Behavior Name: -PW Template Name : -Create time : 0 days, 0 hours, 16 minutes, 41 seconds UP time : 0 days, 0 hours, 11 minutes, 52 seconds Last change time : 0 days, 0 hours, 11 minutes, 52 seconds *Client Interface : GigabitEthernet2/0/0.1 Session State : up AC Status : up VC State : up

5-166

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
VC ID : VC Type : Destination : Local VC Label : Remote VC Label : Control Word : Local VC MTU : Remote VC MTU : Tunnel Policy Name : Traffic Behavior Name: PW Template Name : Create time : UP time : Last change time :

5 QinQ Configuration
101 vlan 3.3.3.9 21504 21504 Disable 1500 1500 ---0 days, 0 hours, 12 minutes, 23 seconds 0 days, 0 hours, 12 minutes, 23 seconds 0 days, 0 hours, 12 minutes, 23 seconds

The hosts attached to CEs can ping through each other if they are in the same VLAN. Take the display on CE1 as an example:
<CE1> ping 10.1.1.2 PING 10.1.1.2: 56 data bytes, press CTRL_C to break Reply from 10.1.1.2: bytes=56 Sequence=1 ttl=255 time=80 Reply from 10.1.1.2: bytes=56 Sequence=2 ttl=255 time=30 Reply from 10.1.1.2: bytes=56 Sequence=3 ttl=255 time=60 Reply from 10.1.1.2: bytes=56 Sequence=4 ttl=255 time=60 Reply from 10.1.1.2: bytes=56 Sequence=5 ttl=255 time=60 --- 10.1.1.2 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 30/58/80 ms ms ms ms ms ms

Configuration Files
l

Configuration file of PE1


# sysname PE1 # mpls lsr-id 1.1.1.9 mpls lsp-trigger all mpls l2vpn # mpls l2vpn default martini # mpls ldp # mpls ldp remote-peer 1 remote-ip 3.3.3.9 # interface GigabitEthernet2/0/0 undo shutdown mode user-termination # interface GigabitEthernet2/0/0.1 undo shutdown qinq stacking vid 10 qinq stacking vid 20 mpls l2vc 3.3.3.9 101 # interface Pos1/0/0 link-protocol ppp undo shutdown ip address 100.1.1.1 255.255.255.0 mpls mpls ldp # interface LoopBack1 ip address 1.1.1.9 255.255.255.255 #

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-167

5 QinQ Configuration
ospf 1 area 0.0.0.0 network 1.1.1.9 0.0.0.0 network 100.1.1.0 0.0.0.255 # return l

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Configuration file of P
# sysname P # mpls lsr-id 2.2.2.9 mpls lsp-trigger all # mpls ldp # interface Pos1/0/0 link-protocol ppp undo shutdown ip address 100.1.1.2 255.255.255.0 mpls mpls ldp # interface Pos2/0/0 link-protocol ppp undo shutdown ip address 100.1.2.1 255.255.255.0 mpls mpls ldp # interface LoopBack1 ip address 2.2.2.9 255.255.255.255 # ospf 1 area 0.0.0.0 network 2.2.2.9 0.0.0.0 network 100.1.1.0 0.0.0.255 network 100.1.2.0 0.0.0.255 # return

Configuration file of PE2


# sysname PE2 # mpls lsr-id 3.3.3.9 mpls lsp-trigger all # mpls l2vpn mpls l2vpn default martini # mpls ldp # mpls ldp remote-peer 1 remote-ip 1.1.1.9 # interface GigabitEthernet2/0/0 undo shutdown mode user-termination # interface GigabitEthernet2/0/0.1 undo shutdown qinq stacking vid 10 qinq stacking vid 20 mpls l2vc 1.1.1.9 101 # interface Pos1/0/0 link-protocol ppp

5-168

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
undo shutdown ip address 100.1.2.2 255.255.255.0 mpls mpls ldp # interface LoopBack1 ip address 3.3.3.9 255.255.255.255 # ospf 1 area 0.0.0.0 network 3.3.3.9 0.0.0.0 network 100.1.2.0 0.0.0.255 # return l

5 QinQ Configuration

Configuration file of Switch 1


# sysname Switch1 # vlan batch 10 20 # interface GigabitEthernet1/0/0 undo shutdown port trunk allow-pass vlan 10 20 # interface GigabitEthernet1/0/1 undo shutdown port default vlan 10 # interface GigabitEthernet1/0/2 undo shutdown port default vlan 20 # return

Configuration file of Switch 2


# sysname Switch2 # vlan batch 10 20 # interface GigabitEthernet1/0/0 undo shutdown port trunk allow-pass vlan 10 20 # interface GigabitEthernet1/0/1 undo shutdown port default vlan 10 # interface GigabitEthernet1/0/2 undo shutdown port default vlan 20 # return

Configuration file of CE1


# sysname CE1 # interface GigabitEthernet1/0/0 undo shutdown ip address 10.1.1.1 255.255.255.0 # return

Configuration file of CE2


# sysname CE2 #

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-169

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
interface GigabitEthernet1/0/0 undo shutdown ip address 10.1.1.2 255.255.255.0 # return

Configuration file of CE3


# sysname CE3 # interface GigabitEthernet1/0/0 undo shutdown ip address 20.1.1.1 255.255.255.0 # return

Configuration file of CE4


# sysname CE4 # interface GigabitEthernet1/0/0 undo shutdown ip address 20.1.1.2 255.255.255.0 # return

5.13.17 Example for Configuring the Sub-interface for QinQ VLAN Stacking to Access a VPLS
Network Requirements
As shown in Figure 5-36, CEs are connected to PEs through switches. The packet sent from the switch to the switch carries no VLAN tags. The switch then labels the packets from the CE with different outer tags according to the inbound interface and send the packets to the PE. It is required to configure the sub-interface for QinQ VLAN stacking to access VPLS to implement inter-communication between CE1, CE2, and CE3, and between CE4, CE5, and CE6. The backbone network adopts Martini VPLS and uses LDP to set up PWs.

5-170

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

Figure 5-36 Typical networking diagram of configuring the sub-interface for VLAN stacking to access VPLS

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. 5. 6. 7.
Issue 03 (2008-09-22)

Run the IGP protocol to connect the devices on the backbone network. Configure the basic MPLS capabilities on the backbone network. Set up the LSP tunnel between PEs. Enable MPLS L2VPN on PEs. Create and then configure the VSI. Configure the sub-interface for QinQ VLAN stacking on PEs and bind VSIs and AC interfaces. Configure the Layer 2 forwarding function on switches.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-171

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Data Preparation
To complete the configuration, you need the following data:
l l l l l

IP address of the interface Consistent L2VC IDs on the both ends of PW MPLS LSR-IDs on PEs VSI names on PE1, PE2, and PE3 Interface bound to VSI

Configuration Procedure
1. Configure the interface mode to user termination. # Configure PE1.
<Quidway> system-view [Quidway] sysname PE1 [PE1] interface gigabitethernet 2/0/0 [PE1-GigabitEthernet2/0/0] mode user-termination [PE1-GigabitEthernet2/0/0] quit

# Configure PE2.
<Quidway> system-view [Quidway] sysname PE2 [PE2] interface gigabitethernet 2/0/0 [PE2-GigabitEthernet2/0/0] mode user-termination [PE2-GigabitEthernet2/0/0] quit

# Configure PE3.
<Quidway> system-view [Quidway] sysname PE3 [PE3] interface gigabitethernet 2/0/0 [PE3-GigabitEthernet2/0/0] mode user-termination [PE3-GigabitEthernet2/0/0] quit

2.

Configure IGP on the MPLS backbone network. OSPF is used in this example. According to Figure 5-36, configure the addresses for the interfaces on PE. Configure OSPF to advertise the addresses of the loopback interfaces on PE1, PE2, and PE3. # Configure PE1.
<PE1> system-view [PE1] interface loopback 1 [PE1-LoopBack1] ip address 1.1.1.9 32 [PE1-LoopBack1] quit [PE1] interface pos 1/0/0 [PE1-Pos1/0/0] ip address 100.1.3.1 30 [PE1-Pos1/0/0] quit [PE1] interface pos 1/0/1 [PE1-Pos1/0/1] ip address 100.1.1.1 30 [PE1-Pos1/0/1] quit [PE1] ospf [PE1-ospf-1] area 0 [PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0 [PE1-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.3 [PE1-ospf-1-area-0.0.0.0] network 100.1.3.0 0.0.0.3 [PE1-ospf-1-area-0.0.0.0] quit [PE1-ospf-1] quit

# Configure PE2.
<PE2> system-view [PE2] interface LoopBack 1 [PE2-LoopBack1] ip address 2.2.2.9 32 [PE2-LoopBack1] quit

5-172

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[PE2] interface pos 1/0/0 [PE2-Pos1/0/0] ip address [PE2-Pos1/0/0] quit [PE2] interface pos 1/0/1 [PE2-Pos1/0/1] ip address [PE2-Pos1/0/1] quit [PE2] ospf [PE2-ospf-1] area 0 [PE2-ospf-1-area-0.0.0.0] [PE2-ospf-1-area-0.0.0.0] [PE2-ospf-1-area-0.0.0.0] [PE2-ospf-1-area-0.0.0.0] [PE2-ospf-1] quit

5 QinQ Configuration

100.1.3.2 30 100.1.2.2 30

network 2.2.2.9 0.0.0.0 network 100.1.3.0 0.0.0.3 network 100.1.2.0 0.0.0.3 quit

# Configure PE3.
<PE3> system-view [PE3] interface loopback 1 [PE3-LoopBack1] ip address 3.3.3.9 32 [PE3-LoopBack1] quit [PE3] interface pos 1/0/0 [PE3-Pos1/0/0] ip address 100.1.1.2 30 [PE3-Pos1/0/0] quit [PE3] interface pos 1/0/1 [PE3-Pos1/0/1] ip address 100.1.2.1 30 [PE3-Pos1/0/1] quit [PE3] ospf [PE3-ospf-1] area 0 [PE3-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0 [PE3-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.3 [PE3-ospf-1-area-0.0.0.0] network 100.1.2.0 0.0.0.3 [PE3-ospf-1-area-0.0.0.0] quit [PE3-ospf-1] quit

After the preceding step, PE1 and PE2 both have routes, discovered through OSPF, to the loopback1 interface of each other. PE1 and PE3 also have routes, discovered through OSPF, to the loopback1 interface of each other. Take the display on PE1 as an example:
<PE1> display ip routing-table Route Flags: R - relied, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 12 Routes : 13 Destination/Mask Proto Pre Cost Flags NextHop Interface 1.1.1.9/32 Direct 0 0 D 127.0.0.1 InLoopBack0 2.2.2.9/32 OSPF 10 2 D 100.1.3.2 Pos1/0/0 3.3.3.9/32 OSPF 10 2 D 100.1.1.2 Pos1/0/1 100.1.1.0/30 Direct 0 0 D 100.1.1.1 Pos1/0/1 100.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 100.1.1.2/32 Direct 0 0 D 100.1.1.2 Pos1/0/1 100.1.2.0/30 OSPF 10 2 D 100.1.1.2 Pos1/0/1 OSPF 10 2 D 100.1.3.2 Pos1/0/0 100.1.3.0/30 Direct 0 0 D 100.1.3.1 Pos1/0/0 100.1.3.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 100.1.3.2/32 Direct 0 0 D 100.1.3.2 Pos1/0/0 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 <PE1> ping 100.1.2.2 PING 100.1.2.2: 56 data bytes, press CTRL_C to break Reply from 100.1.2.2: bytes=56 Sequence=1 ttl=255 time=250 ms Reply from 100.1.2.2: bytes=56 Sequence=2 ttl=255 time=30 ms Reply from 100.1.2.2: bytes=56 Sequence=3 ttl=255 time=60 ms Reply from 100.1.2.2: bytes=56 Sequence=4 ttl=255 time=60 ms Reply from 100.1.2.2: bytes=56 Sequence=5 ttl=255 time=60 ms --- 100.1.2.2 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 30/92/250 ms

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-173

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

3.

Enable the basic MPLS capabilities and LDP on the MPLS backbone network. # Configure PE1.
[PE1] mpls lsr-id 1.1.1.9 [PE1] mpls [PE1-mpls] lsp-trigger all [PE1-mpls] quit [PE1] mpls ldp [PE1-mpls-ldp] quit [PE1] interface pos 1/0/0 [PE1-Pos1/0/0] mpls [PE1-Pos1/0/0] mpls ldp [PE1-Pos1/0/0] quit [PE1] interface pos 1/0/1 [PE1-Pos1/0/1] mpls [PE1-Pos1/0/1] mpls ldp [PE1-Pos1/0/1] quit

# Configure PE2.
[PE2] mpls lsr-id 2.2.2.9 [PE2] mpls [PE2-mpls] lsp-trigger all [PE2-mpls] quit [PE2] mpls ldp [PE2-mpls-ldp] quit [PE2] interface pos1/0/0 [PE2-Pos1/0/0] mpls [PE2-Pos1/0/0] mpls ldp [PE2] interface pos1/0/1 [PE2-Pos1/0/1] mpls [PE2-Pos1/0/1] mpls ldp [PE2-Pos1/0/1] quit

# Configure PE3.
[PE3] mpls lsr-id 3.3.3.9 [PE3] mpls [PE3-mpls] lsp-trigger all [PE3-mpls] quit [PE3] mpls ldp [PE3-mpls-ldp] quit [PE3] interface pos 1/0/0 [PE3-Pos1/0/0] mpls [PE3-Pos1/0/0] mpls ldp [PE3-Pos1/0/0] quit [PE3] interface pos 1/0/1 [PE3-Pos1/0/1] mpls [PE3-Pos1/0/1] mpls ldp [PE3-Pos1/0/1] quit

After the configuration, the sessions between PE1, PE2 and PE3 are set up. Running the display mpls ldp session command, you can view that the Status field is "Operational". Running the display mpls ldp lsp command, you can view the establishing status of LDP LSP. For example, the following displays the session information on PE1.
<PE1> display mpls ldp session LDP Session(s) in Public Network -----------------------------------------------------------------------------Peer-ID Status LAM SsnRole SsnAge KA-Sent/Rcv -----------------------------------------------------------------------------2.2.2.9:0 Operational DU Passive 000:00:02 10/10 3.3.3.9:0 Operational DU Passive 000:00:02 9/9 -----------------------------------------------------------------------------TOTAL: 2 session(s) Found. LAM : Label Advertisement Mode SsnAge Unit : DDD:HH:MM

5-174

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
<PE1> display mpls ldp lsp LDP LSP Information

5 QinQ Configuration

-----------------------------------------------------------------------------SN DestAddress/Mask In/OutLabel Next-Hop In/Out-Interface -----------------------------------------------------------------------------1 1.1.1.9/32 3/NULL 127.0.0.1 Pos1/0/0/InLoop0 2 1.1.1.9/32 3/NULL 127.0.0.1 Pos1/0/1/InLoop0 3 2.2.2.9/32 NULL/3 100.1.3.2 -------/Pos1/0/0 4 2.2.2.9/32 1025/3 100.1.3.2 Pos1/0/1/Pos1/0/0 *5 2.2.2.9/32 Liberal 6 3.3.3.9/32 NULL/3 100.1.1.2 -------/Pos1/0/1 7 3.3.3.9/32 1024/3 100.1.1.2 Pos1/0/0/Pos1/0/1 *8 3.3.3.9/32 Liberal 9 100.1.1.0/30 3/NULL 100.1.1.1 Pos1/0/0/Pos1/0/1 10 100.1.2.0/30 NULL/3 100.1.3.2 -------/Pos1/0/0 NULL/3 100.1.1.2 -------/Pos1/0/1 12 100.1.3.0/30 3/NULL 100.1.3.1 Pos1/0/1/Pos1/0/0 -----------------------------------------------------------------------------TOTAL: 10 Normal LSP(s) Found. TOTAL: 2 Liberal LSP(s) Found. A '*' before an LSP means the LSP is not established A '*' before a Label means the USCB or DSCB is stale
NOTE

If PEs are not directly connected, run the mpls ldp remote-peer command and the remote-ip command to set up a remote LDP sessions between PEs.

4.

Enable MPLS L2VPN on the PE. # Configure PE1.


[PE1] mpls l2vpn

# Configure PE2.
[PE2] mpls l2vpn

# Configure PE3.
[PE3] mpls l2vpn

5.

Create VSIs and specify LDP as the signaling protocol on VSIs. # Configure PE1.
[PE1] vsi ldp1 static [PE1-vsi-ldp1] pwsignal ldp [PE1-vsi-ldp1-ldp] vsi-id 2 [PE1-vsi-ldp1-ldp] peer 2.2.2.9 [PE1-vsi-ldp1-ldp] peer 3.3.3.9

# Configure PE2.
[PE2] vsi ldp1 static [PE2-vsi-ldp1] pwsignal ldp [PE2-vsi-ldp1-ldp] vsi-id 2 [PE2-vsi-ldp1-ldp] peer 1.1.1.9 [PE2-vsi-ldp1-ldp] peer 3.3.3.9

# Configure PE3.
[PE3] vsi ldp1 static [PE3-vsi-ldp1] pwsignal ldp [PE3-vsi-ldp1-ldp] vsi-id 2 [PE3-vsi-ldp1-ldp] peer 1.1.1.9 [PE3-vsi-ldp1-ldp] peer 2.2.2.9

6.

Configure the sub-interface for QinQ VLAN stacking, and bind VSIs and AC interfaces. # Configure PE1
[PE1] interface gigabitethernet 2/0/0.1 [PE1-GigabitEthernet2/0/0.1] qinq stacking vid 10

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-175

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[PE1-GigabitEthernet2/0/0.1] qinq stacking vid 20 [PE1-GigabitEthernet2/0/0.1] l2 binding vsi ldp1

# Configure PE2.
[PE2] interface gigabitethernet 2/0/0.1 [PE2-GigabitEthernet2/0/0.1] qinq stacking vid 10 [PE2-GigabitEthernet2/0/0.1] qinq stacking vid 20 [PE2-GigabitEthernet2/0/0.1] l2 binding vsi ldp1

# ConfigurePE3
[PE3] interface gigabitethernet 2/0/0.1 [PE3-GigabitEthernet2/0/0.1] qinq stacking vid 10 [PE3-GigabitEthernet2/0/0.1] qinq stacking vid 20 [PE3-GigabitEthernet2/0/0.1] l2 binding vsi ldp1
NOTE

Here, when configuring the sub-interface for QinQ VLAN stacking, you need to specify the value of only the inner VLAN tag. The value of the outer tag is not required. The outer VLA tag is appended automatically by the system.

7.

Configure the Layer 2 forwarding function and set the packet sent from the switch to the PE to carry one VLAN tag. # Configure Switch 1.
<Quidway> system-view [Quidway] sysname Switch1 [Switch1] vlan 10 [Switch1-vlan10] port gigabitethernet 1/0/1 [Switch1-vlan10] quit [Switch1] vlan 20 [Switch1-vlan20] port gigabitethernet 1/0/2 [Switch1-vlan20] quit [Switch1] interface gigabitethernet 1/0/0 [Switch1-GigabitEthernet1/0/0] port trunk allow-pass vlan 10 20 [Switch1-GigabitEthernet1/0/0] quit

# Configure Switch 2.
<Quidway> system-view [Quidway] sysname Switch2 [Switch2] vlan 10 [Switch2-vlan10] port gigabitethernet 1/0/1 [Switch2-vlan10] quit [Switch2] vlan 20 [Switch2-vlan20] port gigabitethernet 1/0/2 [Switch2-vlan20] quit [Switch2] interface gigabitethernet 1/0/0 [Switch2-GigabitEthernet1/0/0] port trunk allow-pass vlan 10 20 [Switch2-GigabitEthernet1/0/0] quit

# Configure Switch 3.
<Quidway> system-view [Quidway] sysname Switch3 [Switch3] vlan 10 [Switch3-vlan10] port gigabitethernet 1/0/1 [Switch3-vlan10] quit [Switch3] vlan 20 [Switch3-vlan20] port gigabitethernet 1/0/2 [Switch3-vlan20] quit [Switch3] interface gigabitethernet 1/0/0 [Switch3-GigabitEthernet1/0/0] port trunk allow-pass vlan 10 20 [Switch3-GigabitEthernet1/0/0] quit

Configure IP addresses of the interfaces on CEs based on Figure 5-36. Set the packet sent from the CE to the switch to carry no VLAN tag. # Configure CE1.
<Quidway> system-view [Quidway] sysname CE1

5-176

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[CE1] interface gigabitethernet 1/0/0 [CE1-GigabitEthernet1/0/0] ip address 10.1.1.1 24 [CE1-GigabitEthernet1/0/0] quit

5 QinQ Configuration

# Configure CE2.
<Quidway> system-view [Quidway] sysname CE2 [CE2] interface gigabitethernet 1/0/0 [CE2-GigabitEthernet1/0/0] ip address 10.1.1.2 24 [CE2-GigabitEthernet1/0/0] quit

# Configure CE3.
<Quidway> system-view [Quidway] sysname CE3 [CE3] interface gigabitethernet 1/0/0 [CE3-GigabitEthernet1/0/0] ip address 10.1.1.3 24 [CE3-GigabitEthernet1/0/0] quit

# Configure CE4.
<Quidway> system-view [Quidway] sysname CE4 [CE4] interface gigabitethernet 1/0/0 [CE4-GigabitEthernet1/0/0] ip address 20.1.1.1 24 [CE4-GigabitEthernet1/0/0] quit

# Configure CE5.
<Quidway> system-view [Quidway] sysname CE5 [CE5] interface gigabitethernet 1/0/0 [CE5-GigabitEthernet1/0/0] ip address 20.1.1.2 24 [CE5-GigabitEthernet1/0/0] quit

# Configure CE6.
<Quidway> system-view [Quidway] sysname CE6 [CE6] interface gigabitethernet 1/0/0 [CE6-GigabitEthernet1/0/0] ip address 20.1.1.3 24 [CE6-GigabitEthernet1/0/0] quit

8.

Verify the configuration. Running the display qinq information stacking interface command, you can view the stacking information. The following displays the stacking information on PE1:
<PE1> display qinq information stacking interface gigabitethernet 2/0/0 GigabitEthernet2/0/0.1 VSI bound Total QinQ Num: 2 qinq Stacking vid 10 qinq Stacking vid 20 Total vlan-group Num: 0

After the preceding configuration, run the display vsi ldp1 verbose command on PE1. You can find that PWs to PE2 and PE3 are set up on the VSI named ldp1. The VSI status is Up.
<PE1> display vsi bgp1 verbose ***VSI Name : ldp1 VSI Index : 0 PW Signaling : ldp Member Discovery Style : static PW MAC Learn Style : unqualify Encapsulation Type : vlan MTU : 1500 VSI State : up VSI ID : 2 *Peer Router ID : 3.3.3.9 VC Label : 23552 Peer Type : dynamic Session : up

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-177

5 QinQ Configuration
Tunnel ID *Peer Router ID VC Label Peer Type Session Tunnel ID Interface Name State **PW Information: *Peer Ip Address PW State Local VC Label Remote VC Label PW Type Tunnel ID *Peer Ip Address PW State Local VC Label Remote VC Label PW Type Tunnel ID : : : : : : : : : : : : : : : : : : : :

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
0x6002003, 2.2.2.9 23553 dynamic up 0x6002000, Ethernet6/0/0.1 up 2.2.2.9 up 23553 23552 label 0x6002000, 3.3.3.9 up 23552 23552 label 0x6002003,

The hosts attached to CE1, CE2, and CE3 can ping through each other.
<CE1> ping 10.1.1.2 PING 10.1.1.2: 56 data bytes, press CTRL_C to break Reply from 10.1.1.2: bytes=56 Sequence=1 ttl=255 time=50 ms Reply from 10.1.1.2: bytes=56 Sequence=2 ttl=255 time=1 ms Reply from 10.1.1.2: bytes=56 Sequence=3 ttl=255 time=1 ms Reply from 10.1.1.2: bytes=56 Sequence=4 ttl=255 time=1 ms Reply from 10.1.1.2: bytes=56 Sequence=5 ttl=255 time=1 ms --- 10.1.1.2 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 1/10/50 ms <CE1> ping 10.1.1.3 PING 10.1.1.3: 56 data bytes, press CTRL_C to break Reply from 10.1.1.3: bytes=56 Sequence=1 ttl=255 time=1 ms Reply from 10.1.1.3: bytes=56 Sequence=2 ttl=255 time=1 ms Reply from 10.1.1.3: bytes=56 Sequence=3 ttl=255 time=1 ms Reply from 10.1.1.3: bytes=56 Sequence=4 ttl=255 time=1 ms Reply from 10.1.1.3: bytes=56 Sequence=5 ttl=255 time=1 ms --- 10.1.1.3 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 1/1/1 ms

Configuration Files
l

Configuration file of PE1


# sysname PE1 # mpls lsr-id 1.1.1.9 mpls lsp-trigger all # mpls l2vpn # vsi ldp1 static pwsignal ldp vsi-id 2 peer 3.3.3.9 peer 2.2.2.9 # mpls ldp # interface GigabitEthernet2/0/0

5-178

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
undo shutdown mode user-termination # interface GigabitEthernet2/0/0.1 undo shutdown qinq stacking vid 10 qinq stacking vid 20 l2 binding vsi ldp1 # interface Pos1/0/0 link-protocol ppp undo shutdown ip address 100.1.3.1 255.255.255.252 mpls mpls ldp # interface Pos1/0/1 link-protocol ppp undo shutdown ip address 100.1.1.1 255.255.255.252 mpls mpls ldp # interface LoopBack1 ip address 1.1.1.9 255.255.255.255 # ospf 1 area 0.0.0.0 network 1.1.1.9 0.0.0.0 network 100.1.1.0 0.0.0.3 network 100.1.3.0 0.0.0.3 # return l

5 QinQ Configuration

Configuration file of PE2


# sysname PE2 # mpls lsr-id 2.2.2.9 mpls lsp-trigger all # mpls l2vpn # vsi ldp1 static pwsignal ldp vsi-id 2 peer 1.1.1.9 peer 3.3.3.9 # mpls ldp # interface GigabitEthernet2/0/0 undo shutdown mode user-termination # interface GigabitEthernet2/0/0.1 undo shutdown qinq stacking vid 10 qinq stacking vid 20 l2 binding vsi ldp1 # interface Pos1/0/0 link-protocol ppp undo shutdown ip address 100.1.3.2 255.255.255.252 mpls mpls ldp # interface Pos1/0/1

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-179

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
link-protocol ppp undo shutdown ip address 100.1.2.2 255.255.255.252 mpls mpls ldp # interface LoopBack1 ip address 2.2.2.9 255.255.255.255 # ospf 1 area 0.0.0.0 network 2.2.2.9 0.0.0.0 network 100.1.3.0 0.0.0.3 network 100.1.2.0 0.0.0.3 # return

Configuration file of PE3


# sysname PE3 # mpls lsr-id 3.3.3.9 mpls lsp-trigger all # mpls l2vpn # vsi ldp1 static pwsignal ldp vsi-id 2 peer 1.1.1.9 peer 2.2.2.9 # mpls ldp # interface GigabitEthernet2/0/0 undo shutdown mode user-termination # interface GigabitEthernet2/0/0.1 undo shutdown qinq stacking vid 10 qinq stacking vid 20 l2 binding vsi ldp1 # interface Pos1/0/0 link-protocol ppp undo shutdown ip address 100.1.1.2 255.255.255.252 mpls mpls ldp # interface Pos1/0/1 link-protocol ppp undo shutdown ip address 100.1.2.1 255.255.255.252 mpls mpls ldp # interface LoopBack1 ip address 3.3.3.9 255.255.255.255 # ospf 1 area 0.0.0.0 network 3.3.3.9 0.0.0.0 network 100.1.1.0 0.0.0.3 network 100.1.2.0 0.0.0.3 # return

5-180

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
l

5 QinQ Configuration

Configuration file of Switch 1


# sysname Switch1 # vlan batch 10 20 # interface GigabitEthernet1/0/0 undo shutdown port trunk allow-pass vlan 10 20 # interface GigabitEthernet1/0/1 undo shutdown port default vlan 10 # interface GigabitEthernet1/0/2 undo shutdown port default vlan 20 # return

Configuration file of Switch 2


# sysname Switch2 # vlan batch 10 20 # interface GigabitEthernet1/0/0 undo shutdown port trunk allow-pass vlan 10 20 # interface GigabitEthernet1/0/1 undo shutdown port default vlan 10 # interface GigabitEthernet1/0/2 und shutdown port default vlan 20 # return

Configuration file of Switch 3


# sysname Switch3 # vlan batch 10 20 # interface GigabitEthernet1/0/0 undo shutdown port trunk allow-pass vlan 10 20 # interface GigabitEthernet1/0/1 undo shutdown port default vlan 10 # interface GigabitEthernet1/0/2 undo shutdown port default vlan 20 # return

Configuration file of CE1


# sysname CE1 # interface GigabitEthernet1/0/0 undo shutdown ip address 10.1.1.1 255.255.255.0 #

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-181

5 QinQ Configuration
return l

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Configuration file of CE2


# sysname CE2 # interface GigabitEthernet1/0/0 undo shutdown ip address 10.1.1.2 255.255.255.0 # return

Configuration file of CE3


# sysname CE3 # interface GigabitEthernet1/0/0 undo shutdown ip address 10.1.1.3 255.255.255.0 # return

Configuration file of CE4


# sysname CE4 # interface GigabitEthernet1/0/0 undo shutdown ip address 20.1.1.1 255.255.255.0 # return

Configuration file of CE5


# sysname CE5 # interface GigabitEthernet1/0/0 undo shutdown ip address 20.1.1.2 255.255.255.0 # return

Configuration file of CE6


# sysname CE6 # interface GigabitEthernet1/0/0 undo shutdown ip address 20.1.1.3 255.255.255.0 # return

5.13.18 Example for Configuring the Sub-interface for QinQ VLAN Tag Termination to Support URPF
Networking Requirements
As shown in Figure 5-37, Switch A and Switch B access the ISP network through Router A and Router B. URPF is configured on the sub-interface for QinQ VLAN tag termination GE 2/0/0.1 of Router A and Router B to perform strict URPF for the packets with the outer VLAN tag as 100 and the inner VLAN tag as 10 to 20.

5-182

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

5 QinQ Configuration

Figure 5-37 Typical networking diagram of configuring the sub-interface for QinQ VLAN tag termination to support URPF
RouterA POS1/0/0 100.1.1.1/24 POS1/0/0 100.1.1.2/24 RouterB

GE2/0/0.1 10.1.1.1/24 GE1/0/0 SwitchA VLAN100 VLAN10 VLAN20 VLAN10

GE2/0/0.1 10.2.1.1/24 GE1/0/0 SwitchB VLAN100 VLAN20

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. Configure GE 2/0/0.1 of Router A and Router B as the sub-interface for QinQ VLAN tag termination. Enable URPF on GE 2/0/0.1.

Data Preparation
To complete the configuration, you need the following data:
l l

IP addresses of the interfaces QinQ VLAN tags to be terminated on the sub-interface for QinQ VLAN tag termination

Configuration Procedure
1. Configure IGP. OSPF is used in this example. # Configure Router A.
<Quidway> system-view [Quidway] sysname RouterA [RouterA] interface pos 1/0/0 [RouterA-Pos1/0/0] ip address [RouterA-Pos1/0/0] quit [RouterA] ospf [RouterA-ospf-1] area 0 [RouterA-ospf-1-area-0.0.0.0] [RouterA-ospf-1-area-0.0.0.0] [RouterA-ospf-1-area-0.0.0.0] [RouterA-ospf-1] quit

100.1.1.1 24

network 100.1.1.0 0.0.0.255 network 10.1.1.0 0.0.0.255 quit

# Configure Router B.
<Quidway> system-view [Quidway] sysname RouterB [RouterB] interface pos 1/0/0 [RouterB-Pos1/0/0] ip address 100.1.1.2 24 [RouterB-Pos1/0/0] quit [RouterB] ospf [RouterB-ospf-1] area 0 [RouterB-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-183

5 QinQ Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
[RouterB-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255 [RouterB-ospf-1-area-0.0.0.0] quit [RouterB-ospf-1] quit

2.

Configure the sub-interface for QinQ VLAN tag termination and enable URPF. # Configure Router A.
[RouterA] interface gigabitethernet 2/0/0 [RouterA-GigabitEthernet2/0/0] mode user-termination [RouterA-GigabitEthernet2/0/0] quit [RouterA] interface gigabitethernet 2/0/0.1 [RouterA-GigabitEthernet2/0/0.1] control-vid 1 qinq-termination [RouterA-GigabitEthernet2/0/0.1] qinq termination pe-vid 100 ce-vid 10 to 20 [RouterA-GigabitEthernet2/0/0.1] ip address 10.1.1.1 24 [RouterA-GigabitEthernet2/0/0.1] arp broadcast enable [RouterA-GigabitEthernet2/0/0.1] ip urpf loose

# Configure Router B.
[RouterB] interface gigabitethernet 2/0/0 [RouterB-GigabitEthernet2/0/0] mode user-termination [RouterB-GigabitEthernet2/0/0] quit [RouterB] interface gigabitethernet 2/0/0.1 [RouterB-GigabitEthernet2/0/0.1] control-vid 1 qinq-termination [RouterB-GigabitEthernet2/0/0.1] qinq termination pe-vid 100 ce-vid 10 to 20 [RouterB-GigabitEthernet2/0/0.1] ip address 10.2.1.1 24 [RouterB-GigabitEthernet2/0/0.1] arp broadcast enable [RouterB-GigabitEthernet2/0/0.1] ip urpf loose

3.

Verify the configuration. Running the display qinq information termination interface command on Router, you can view information about QinQ termination. Configuring the URPF check on the interace can effectively avoid the attack of the packets whith the pseudo IP addresses.

Configuration Files
l

Configuration file of Router A


# sysname RouterA # interface GigabitEthernet2/0/0 mode user-termination # interface GigabitEthernet2/0/0.1 control-vid 1 qinq-termination qinq termination pe-vid 100 ce-vid 10 to 20 ip address 10.1.1.1 255.255.255.0 arp broadcast enable ip urpf loose # interface Pos1/0/0 link-protocol ppp ip address 100.1.1.1 255.255.255.0 # ospf 1 area 0.0.0.0 network 10.1.1.0 0.0.0.255 network 100.1.1.0 0.0.0.255 # return

Configuration file of Router B


# sysname RouterB # interface GigabitEthernet2/0/0 mode user-termination #

5-184

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access
interface GigabitEthernet2/0/0.1 control-vid 1 qinq-termination qinq termination pe-vid 100 ce-vid 10 to 20 ip address 10.2.1.1 255.255.255.0 arp broadcast enable ip urpf loose # interface Pos1/0/0 link-protocol ppp ip address 100.1.1.2 255.255.255.0 # ospf 1 area 0.0.0.0 network 10.2.1.0 0.0.0.255 network 100.1.1.0 0.0.0.255 # return

5 QinQ Configuration

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

5-185

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

6 PBB-TE Configuration

6
About This Chapter

PBB-TE Configuration

Describes the fundamentals, the configuration procedures and the configuration examples of PBB-TE. 6.1 Introduction Describes the background and basic concepts of the PBB-TE technology. 6.2 Configuring a PBB-TE Tunnel Describes how to configure PBB-TE tunnels and the related commands. 6.3 Configuring a PBB-TE Protection Group and Protection Switchover Describes how to configure a PBB-TE protection group and protection switchover and the related commands. 6.4 Configuring a P2P SI Describes how to configure a Point-to-Point Service Instance and the related commands. 6.5 Configuring an MP2MP SI Describes how to configure a Multipoint-to-Multipoint SI and the related commands. 6.6 Associating Ethernet CFM and the PBB-TE SI This section describes how to associate Ethernet CFM with the PBB-TE SI. 6.7 Associating EFM OAM with the PBB-TE SI This section describes how to associate EFM OAM with the PBB-TE SI. 6.8 Configuration Examples Provides several configuration examples of PBB-TE.

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

6-1

6 PBB-TE Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

6.1 Introduction
Describes the background and basic concepts of the PBB-TE technology. 6.1.1 Overview of PBB-TE 6.1.2 PBB-TE Supported by the NE80E/40E

6.1.1 Overview of PBB-TE


Background
Traditional Ethernet cannot ensure Quality of Service (QoS) and is poor in reliability, scalability, and operation and administration. Its application is limited to Local Area Networks (LANs). The Metropolitan Ethernet Forum's (MEF's) carrier-class Ethernet presents a fresh Ethernet architecture to solve the inherent defects of the traditional Ethernet, trying to unify the whole transport layer through Ethernet technologies. The carrier-class Ethernet marks a revolution in Ethernet history. Ethernet changes from simple interconnection and corporate application with no QoS ensured or management into manageable carrier-class operation of which QoS is ensured. The carrier-class Ethernet greatly reduces the Operation Expenditure (OPEX) and Capital Expenditure (CAPEX) of networks, yielding good economic returns for carriers. There are two roadmaps for the construction of new generation of Metropolitan Area Networks (MANs):
l

One is to extend the traditional Multiprotocol Label Switching (MPLS) network to the edge, using the IPCore technology to carry various services. The other is to reconstruct the traditional Ethernet architecture, which is proposed by the MEF. Ethernet can be then extended to MANs or even Wide Area Networks (WANs) to replace Synchronous Digital Hierarchy (SDH) and become the base for the new generation of networks to carry services. Owing to its economical efficiency and applicability, the roadmap of the carrier-class Ethernet is being accepted by more and more carriers.

MAC-in-MAC
The MAC-in-MAC technology is defined in IEEE 802.1ah standard. This standard is still in draft form. This technology is an important part of the MEF carrier-class Ethernet program. Through the cooperation between MAC-in-MAC and QinQ (defined in IEEE 802.1ad standard), the whole transport network can be based on the Ethernet architecture. MANs or WANs can adopt the Ethernet technology at the access layer, convergence layer, and even backbone layer. This is an important direction for the development of Ethernet. MAC-in-MAC is an embedded technology based on MAC addresses. The user MAC address is encapsulated in the carrier MAC address. The user MAC address is deemed as the inter-MAC address and isolated to enhance the scalability and security of Ethernet. IEEE 802.1ah introduces Service Instances (SI) when introducing the concept of MAC-in-MAC. It is more suitable to use SIs to interwork with other technologies such as MPLS. An SI is no longer used to identify a virtual network but services of the same type.
6-2 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

6 PBB-TE Configuration

PBB-TE
Provider Backbone Bridge-Traffic Engineering (PBB-TE) is a connection-oriented Ethernet technology that combines the features of telecom networks. Through PBB-TE, MANs adopt the Ethernet technology to transmit Ethernet services. PBB-TE is based on Provider Backbone Bridge (PBB) defined in IEEE 802.1ah, that is, the MAC-in-MAC technology. PBB-TE mainly applies to carriers' backbone networks. It can solve the problem of Ethernet scalability. Since this technology is similar to QinQ, it can also be used to access and converge user services. QinQ requires that all nodes learn user MAC addresses, which makes the number of entries in the MAC address table enormous. For PBB-TE, information about user MAC addresses is stored only in edge nodes.

6.1.2 PBB-TE Supported by the NE80E/40E


Virtual MAC Address
A virtual MAC address can be the source or destination MAC address of a PBB-TE tunnel. Each NE80E/40E can be configured with only one virtual MAC address.

Backbone VLAN
The backbone VLAN ID refers to the VLAN ID of the carrier's backbone network. A backbone VLAN ID and a virtual MAC address identify a PBB-TE tunnel. The backbone VLAN that is used to create a PBB-TE tunnel cannot be used for other services.

SI
SIs are entities that associate user services with PBB-TE tunnels. An SI is a specific user service on a device. User services should be mapped to SIs. The SIs are bound to PBB-TE tunnels. After that, services can be transmitted in PBB-TE tunnels. SIs are of two types: P2P services instances and MP2MP SIs. The detailed description is as follows:
l

P2P SIs P2P SIs apply to P2P. One or a range of user VLANs can be mapped to a P2P SI. An interface can also be deemed as a user service and mapped to an SI. A P2P SI is bound to a PBB-TE tunnel only. If this PBB-TE tunnel is in a protection group, it must be the working tunnel.

MP2MP SIs MP2MP SIs apply to MP2MP. One or more user VLANs can be mapped to an MP2MP SI. An MP2MP SI can be bound to more than one PBB-TE tunnel. If the PBB-TE tunnel is in a protection group, it must be the working one.

Protection Group
To provide carrier-class security and reliability, PBB-TE can bundle two PBB-TE tunnels into a protection group. One PBB-TE tunnel is the working tunnel, which is used to transmit services. The other PBB-TE tunnel is the protection tunnel. When the working tunnel fails, traffic can be switched to the protection tunnel for transmission to avoid service interruption. PBB-TE groups are of two types:
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-3

6 PBB-TE Configuration
l

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Protection group with the same source and the same sink, also called the APS-type protection group: The two PBB-TE tunnels in a protection group have the same source MAC address and the same destination MAC address. Protection group with the same source but different sinks, also called the OAM-type protection group: The two PBB-TE tunnels in a protection group have the same source MAC address, but their destination MAC addresses are different.

Protection Switchover
The Automatic Protection Switching (APS) protocol implements the protection switchover of PBB-TE protection groups. Receiving a link failure message, the APS protocol switches the traffic from the working tunnel to the protection tunnel based on the protection mode. After the working tunnel recovers, APS can switch the traffic back from the protection tunnel to the working tunnel for transmission. A protection group has two protection modes:
l

1:1 protection switchover In a PBB-TE protection group, service data is transmitted only in the working tunnel before protection switchover. No data flows are in the protection tunnel. After protection switchover, service data is switched to the protection tunnel for transmission. If the working tunnel fails, the device at one end of the PBB-TE tunnel detects the failure and sends signals through the protection tunnel to the device at the other end. The two devices determine the protection switchover action after negotiation.

1+1 protection switchover In a PBB-TE protection group, the transmit end does not discriminate between the working tunnel and the protection tunnel. The same service packets are transmitted to the two PBBTE tunnels at the same time. To receive packets from which PBB-TE tunnel is determined at the receive end. The receive end chooses packets from only one PBB-TE tunnel. By default, the receive end receives packets from the working tunnel and forwards the packets to the target device. The packets carried by the protection tunnel are discarded at the receive end. In 1+1 protection mode, protection switchover is of two types: unidirectional protection switchover and bidirectional protection switchover.

Unidirectional protection switchover: Two PBB-TE tunnels in opposite directions are configured with a protection tunnel respectively. When a PBB-TE tunnel fails, its traffic is redirected onto its protection tunnel. The traffic of the tunnel in the opposite direction, however, is not switched. Bidirectional protection switchover: Two PBB-TE tunnels in opposite directions are configured with a protection tunnel respectively. When a PBB-TE tunnel fails, its traffic is redirected onto its protection tunnel. The traffic of the tunnel in the opposite direction is also switched to its own protection tunnel.

In unidirectional protection mode, protection switchover is performed at the receive end of the PBB-TE tunnel. The receive end chooses packets from the protection tunnel when detecting a link failure of the working tunnel. The transmit end does not need to detect link failures or implement protection switchover. It always transmits the same data packets to the two PBB-TE tunnels. In bidirectional protection mode, the transmit end and receive end detect link failures and perform the protection switchover together. Detecting a fault of the working tunnel, the two ends switch the traffic to the protection tunnel at the same time.
6-4 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

6 PBB-TE Configuration

6.2 Configuring a PBB-TE Tunnel


Describes how to configure PBB-TE tunnels and the related commands. 6.2.1 Establishing the Configuration Task 6.2.2 Creating a Virtual MAC Address 6.2.3 Creating the Backbone VLAN for a PBB-TE Tunnel 6.2.4 Creating a PBB-TE Tunnel 6.2.5 (Optional) Configuring Split Horizon of the PBB-TE Tunnel 6.2.6 (Optional) Configuring the Priority of the PBB-TE Tunnel 6.2.7 Adding the Interface to the Backbone VLAN of the PBB-TE Tunnel on the Transit Node 6.2.8 Configuring the Static MAC Address Forwarding Function on the Transit Node 6.2.9 Disabling STP on the Interface of the Transit Node 6.2.10 Discarding Unknown Unicast and Multicast Packets and Broadcast Packets on the Transit Node 6.2.11 Disabling the VLAN-Based MAC Address Learning Function on the Transit Node 6.2.12 Checking the Configuration

6.2.1 Establishing the Configuration Task


Applicable Environment
PBB-TE mainly applies to carriers' backbone networks. It can solve the problem of Ethernet scalability. Since the PBB-TE technology is similar to QinQ, it can also be used to access or converge user services. The application of PBB-TE can enable end-to-end data transmission with high reliability and maintainability. In this manner, the Ethernet technology is applied to telecom networks. As shown in Figure 6-1, a PBB-TE tunnel is set up between Router A and Router B, which are on the edge of a MAN. The device at a transit node of a PBB-TE tunnel need not support PBB-TE. You just need to configure the static MAC address forwarding function based on the destination MAC address of packets and the backbone VLAN of the PBB-TE tunnel. The transit node receives packets transmitted in the PBB-TE tunnel, observes its static MAC address forwarding table, and sends the packets to the specified interface. PBB-TE identifies a packet according to the destination MAC address of the packet and the BVLAN of the PBB-TE tunnel. Multiple interfaces on a bridge node may belong to the same backbone VLAN. In this case, unknown unicast traffic, unknown multicast traffic, and broadcast traffic are flooded in the backbone VLAN. Thus, you need to configure the function of discarding unknown unicast packets, unknown multicast packets, and broadcast packets on Router C. The forwarding path of a PBB-TE tunnel is configured statically. Thus, you need to disable the MAC address learning function based on the backbone VLAN and STP functions on Router C.
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-5

6 PBB-TE Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Figure 6-1 Configuring a PBB-TE tunnel

RouterA

RouterC

RouterB

PBB-TE Tunnel

Pre-configuration Tasks
None

Data Preparation
To configure a PBB-TE tunnel, you need the following data. No. 1 2 3 4 Data Virtual MAC address Backbone VLAN ID Interface number of the PBB-TE tunnel Destination MAC address of the PBB-TE tunnel

6.2.2 Creating a Virtual MAC Address


Context
One NE80E/40E can be configured with only one virtual MAC address. This virtual MAC address is the source MAC address of the device at this end of the PBB-TE tunnel. It is also the destination MAC address for the device at the opposite end of the PBB-TE tunnel. The network administrator should ensure that a virtual MAC address is unique on the entire network.
NOTE

A virtual MAC address should not be the same as the bridge MAC address of the transit node, multicast MAC address, or broadcast MAC address.

Do as follows on each router at the edge of the MAN:

6-6

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

6 PBB-TE Configuration

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


virtual-mac mac-address

A virtual MAC address is configured or modified. ----End

6.2.3 Creating the Backbone VLAN for a PBB-TE Tunnel


Context
Do as follows on each router at the edge of the MAN:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


vlan batch { vlan-id1 [ to vlan-id2 ] }

A VLAN is created. Step 3 Run:


mac-tunnel vlan-pool { vlan-id1 [ to vlan-id2 ] } &<1-10>

The VLAN is added to the backbone VLAN pool.


NOTE

VLANs in a backbone VLAN pool can only be used to configure PBB-TE tunnels. The restrictions are as follows:
l l l

These VLANs cannot be used for other non-PBB-TE tunnel configurations. These VLANs cannot be configured as default VLANs for interfaces. These VLANs cannot be bound to SIs or configured with the VLANIF.

Step 4 Run:
interface interface-type interface-number

The Ethernet interface view is displayed. Step 5 Run:


portswitch

The Ethernet interface is switched to a Layer 2 interface. Step 6 Run:


port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] }&<1-10> | all }

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

6-7

6 PBB-TE Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

The interface of the PBB-TE tunnel is added to the backbone VLAN. ----End

6.2.4 Creating a PBB-TE Tunnel


Context
Do as follows on each router at the edge of the MAN:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


mac-tunnel tunnel-name tunnel-name

A PBB-TE tunnel is created, and the MAC tunnel view is displayed. Step 3 Run:
destination-mac mac-address

The destination MAC address of the PBB-TE tunnel is configured. The destination MAC address of the PBB-TE tunnel is the virtual MAC address of the peer device. Step 4 Run:
vlan vlanid [ protocol protocol-id ]

The backbone VLAN of the PBB-TE tunnel is configured.


NOTE

If the protocol number of the backbone VLAN needs to be modified, you need to use the qinq protocol command on the outbound interface. Otherwise, the local end cannot receive service traffic from the peer end.

Step 5 Run:
tunnel-interface interface-type interface-number

The interface used by the PBB-TE tunnel is configured. Step 6 Run:


undo shutdown

The PBB-TE tunnel is activated. By default, the management state of a PBB-TE tunnel is Down after it is created.
NOTE

The destination MAC address, backbone VLAN, and interface of a PBB-TE tunnel must be configured when you use the undo shutdown command to set the state of the PBB-TE tunnel to Up. Otherwise, the PBB-TE tunnel cannot be activated.

----End
6-8 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

6 PBB-TE Configuration

6.2.5 (Optional) Configuring Split Horizon of the PBB-TE Tunnel


Context
Split horizon is used to prohibit the communication between PBB-TE tunnels on the same device. That is, a user packet received by a PBB-TE tunnel cannot be forwarded by another PBB-TE tunnel. When an SI is bound to multiple PBB-TE tunnels, you must enable the split horizon function to prohibit the communication between the PBB-TE tunnels. If different SIs are bound to respective PBB-TE tunnels, the communication between these tunnels is impossible even if you do not enable the split horizon function.
NOTE

STP or RRPP cannot be used on the PBB-TE tunnel to prevent network loops.

Do as follows on each router at the edge of the MAN:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


mac-tunnel tunnel-name tunnel-name

The MAC tunnel view is displayed. Step 3 Run:


split-horizon enable

Split horizon of the PBB-TE tunnel is enabled. By default, the split horizon function of a PBB-TE tunnel is enabled. ----End

6.2.6 (Optional) Configuring the Priority of the PBB-TE Tunnel


Context
Do as follows on each router at the edge of the MAN:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


mac-tunnel tunnel-name tunnel-name

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

6-9

6 PBB-TE Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

The MAC tunnel view is created. Step 3 Run:


priority {priority |trust instance-priority }

The priority of the PBB-TE tunnel is configured. By default, a PBB-TE tunnel trusts the priority of the SI. ----End

6.2.7 Adding the Interface to the Backbone VLAN of the PBB-TE Tunnel on the Transit Node
Context
When you add the interface on the transit node to the backbone VLAN of the PBB-TE tunnel, the configurations are different in the following situations:
l l

Transit Node Supporting PBB-TE Transit Node Not Supporting PBB-TE

Do as follows on the transit node of the PBB-TE tunnel:

Procedure
l Transit Node Supporting PBB-TE 1. Run:
system-view

The system view is displayed. 2. Run:


vlan batch { vlan-id1 [ to vlan-id2 ] }

A VLAN is created, and the VLAN view is displayed. 3. Run:


mac-tunnel vlan-pool { vlan-id1 [ to vlan-id2 ] } &<1-10>

The VLAN is added to the backbone VLAN pool. 4. Run:


interface interface-type interface-number

The Ethernet interface view is displayed. This interface should be used by the PBB-TE tunnel. 5. Run:
portswitch

The Ethernet interface is switched to the Layer 2 mode. 6. Run:


port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] }&<1-10> | all }

The interface of the PBB-TE tunnel is added to the backbone VLAN. Certain attributes of a VLAN change after it is added to the backbone VLAN pool. For example, the VLAN automatically prohibits the MAC address learning and discards
6-10 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

6 PBB-TE Configuration

unknown unicast packets, unknown multicast packets, and broadcast packets. In addition, the VLAN does not support the modification of these attributes. Therefore, you need not perform the following procedures after adding the interface to the backbone VLAN:

Disabling STP on the Interface of the Transit Node Discarding Unknown Unicast and Multicast Packets and Broadcast Packets on the Transit Node Disabling the VLAN-Based MAC Address Learning Function on the Transit Node Run:
system-view

Transit Node Not Supporting PBB-TE 1.

The system view is displayed. 2. Run:


vlan batch { vlan-id1 [ to vlan-id2 ] }&<1-10>

A VLAN is created, and the VLAN view is displayed. 3. Run:


quit

Return to the system view. 4. Run:


interface interface-type interface-number

The view of the specified Ethernet interface is displayed. 5. Run:


portswitch

The Ethernet interface is switched to a Layer 2 interface. 6. Run:


port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }

The interface is added to the VLAN. When adding an interface on the transit node to the backbone VLAN of a PBB-TE tunnel, ensure that the outbound interface and inbound interface of the PBB-TE tunnel are added to the same backbone VLAN. ----End

6.2.8 Configuring the Static MAC Address Forwarding Function on the Transit Node
Context
Do as follows on the transit node of the PBB-TE tunnel:

Procedure
Step 1 Run:
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-11

6 PBB-TE Configuration
system-view

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

The system view is displayed. Step 2 Run:


interface { ethernet | gigabitethernet } interface-number

The view of the specified Ethernet interface is displayed. Step 3 Run:


portswitch

The Ethernet interface is switched to a Layer 2 interface. Step 4 Run:


mac-address static mac-address interface-type interface-number vlan vlan-id1 [ cevlan ce-vlan ]

The interface-based static MAC forwarding function is configured. ----End

6.2.9 Disabling STP on the Interface of the Transit Node


Context
Do as follows on the transit node of the PBB-TE tunnel:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface { ethernet | gigabitethernet } interface-number

The view of the specified Ethernet interface is displayed. Step 3 Run:


portswitch

The Ethernet interface is switched to a Layer 2 interface. Step 4 Run:


stp disable

Spanning Tree Protocol (STP) is disabled on the interface. By default, STP is disabled on the interfaces of the NE80E/40E. ----End

6.2.10 Discarding Unknown Unicast and Multicast Packets and Broadcast Packets on the Transit Node
6-12 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

6 PBB-TE Configuration

Context
Do as follows on the transit node of the PBB-TE tunnel:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


vlan vlanid

A VLAN is created, and the VLAN view is displayed. Step 3 Run:


unknown-multicast discard

The unknown multicast packets are configured to discard. By default, the NE80E/40E broadcasts unknown multicast packets. Step 4 Run:
unknown-unicast discard

The unknown unicast packets are configured to discard. By default, the NE80E/40E broadcasts unknown unicast packets. Step 5 Run:
broadcast discard

The broadcast packets are configured to discard. By default, the NE80E/40E forwards all broadcast packets. ----End

6.2.11 Disabling the VLAN-Based MAC Address Learning Function on the Transit Node
Context
Do as follows on the transit node of the PBB-TE tunnel:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


vlan vlan-id

The VLAN view is displayed.


Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-13

6 PBB-TE Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Step 3 Run:
mac-address learning disable

The VLAN-based MAC address learning function is disabled. By default, the VLAN-based MAC address learning function of the router is enabled. Thus, it is needed to disable the MAC address learning based on the backbone VLAN of the PBB-TE tunnel for the transit node. ----End

6.2.12 Checking the Configuration


Run the following commands to check the previous configuration. Action Check the virtual MAC address. Check the backbone VLAN pool of the PBB-TE tunnel. Check information about the PBB-TE tunnel. Check whether the interface is added to the local VLAN. Check the configuration of the static MAC address forwarding function. Check the configurations of the discarding of packets and disabling of STP on the interface. Command display virtual-mac display mac-tunnel vlan-pool display mac-tunnel [ tunnel-name tunnel-name ] [ verbose ] display vlan vlan-id display mac-address [ blackhole | static [ vlan vlanid ] | dynamic slot-id [ vlan vlan-id ] ] display current-configuration interface interfacetype interface-number

Run the display mac-tunnel [ tunnel-name tunnel-name ] [ verbose ] command as an example. You can check the configurations of routers at both ends of the PBB-TE tunnel.
<Quidway> display mac-tunnel tunnel-name tu1 verbose Tunnel-name tu1 Tunnel-description this is a single tunnel without protection tunnel Destination-mac 0000-0000-0004 Source-mac 0000-0000-0003 Port GigabitEthernet1/0/2 Vlan 200 Vlan-protocol 88a8 Manage-status up Cfm-status disable TrustInstancePriority yes Priority Split-horizon enable Join-protection-group no Work-or-Protect Another-tunnel Switch-result Tunnel up-time second 0 Bind service-instance Total num of bind service-instance 0

6-14

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

6 PBB-TE Configuration

The contents in bold indicate the name of the PBB-TE tunnel, destination MAC address, source MAC address, interface, and backbone VLAN, which should be consistent with your configurations. Run the display vlan vlan-id command. You can check whether the interface is added to the correct VLAN, which is indicated by the following contents in bold:
<Quidway> display vlan 200 VLAN ID Type Status MAC Learning Broadcast/Multicast/Unicast Property --------------------------------------------------------------------------------------200 common enable disable discard discard discard backboneVLAN ---------------Tagged Port: GigabitEthernet3/0/3 ---------------Interface Physical GigabitEthernet3/0/3 UP

Run the display mac-address [ blackhole | static [ vlan vlan-id ] | dynamic slot-id [ vlan vlanid ] ] command. You can check whether the static MAC address forwarding function is correctly configured, which is indicated by the following contents in bold:
<Quidway> display mac-address static vlan 200 MAC Address VLAN/VSI/SI PEVLAN CEVLAN ort Type Lsp/ Mac-tunnel ------------------------------------------------------------------------------------------0015-0001-0002 200 2 GE3/0/3 static Total matching items displayed = 1

Run the display current-configuration interface interface-type interface-number command as an example. You can view the configurations of the discarding of packets and disabling of STP on the interface:
<Quidway> display current-configuration interface gigabitethernet 1/0/1 # interface GigabitEthernet1/0/1 undo shutdown port trunk allow-pass vlan 200 mac-address static 0000-0000-0004 GigabitEthernet1/0/2 vlan 200 stp disable broadcast discard unknown-multicast discard unknown-unicast discard # Return

6.3 Configuring a PBB-TE Protection Group and Protection Switchover


Describes how to configure a PBB-TE protection group and protection switchover and the related commands. 6.3.1 Establishing the Configuration Task 6.3.2 Configuring a PBB-TE Protection Group 6.3.3 Configuring Protection Mode of the Protection Group 6.3.4 (Optional) Configuring Revertive Mode for Protection Switchover 6.3.5 (Optional) Configuring Hold-off Time for Protection Switchover
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-15

6 PBB-TE Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

6.3.6 Enabling Ethernet CFM 6.3.7 Enabling the APS Protocol 6.3.8 Checking the Configuration

6.3.1 Establishing the Configuration Task


Applicable Environment
Two PBB-TE tunnels can be bundled into a protection group, which carries out data transmission with high reliability. In a protection group, one PBB-TE tunnel is the working tunnel, and the other one is the protection tunnel. PBB-TE depends on CFM of Ethernet for detection of link failures. Ethernet CFM reports detected failures to PBB-TE and triggers the APS mechanism. As shown in Figure 6-2, two PBB-TE tunnels are set up between Router A and Router B, which are on the edge of a MAN. The two PBB-TE tunnels are added to a protection group. One serves as the working tunnel, and the other serves as the protection tunnel. If the working tunnel fails, traffic is rapidly switched from the working tunnel to the protection tunnel for transmission to avoid service interruption and data loss. Figure 6-2 Configuring a PBB-TE protection group and protection switchover

Work Tunnel

RouterA

Protection Tunnel

RouterB

Pre-configuration Tasks
Before configuring a PBB-TE protection group and protection switchover, complete the following task:
l

Creating two PBB-TE tunnels of which one is the working tunnel and the other is the protection tunnel

Data Preparation
To configure a PBB-TE protection group and protection switchover, you need the following data.
6-16 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

6 PBB-TE Configuration

No. 1 2 3 4 5

Data PBB-TE tunnel name of the working tunnel PBB-TE tunnel name of the protection tunnel Protection mode of the protection group Revertive mode of the protection group Hold-off time for protection switchover

6.3.2 Configuring a PBB-TE Protection Group


Context
Do as follows on each router at the edge of the MAN:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


mac-tunnel tunnel-name tunnel-name

The MAC tunnel view of the working tunnel is displayed. Step 3 Run:
protection mac-tunnel tunnel-name [ protocol { oam | aps } ]

A PBB-TE protection group is created.


NOTE

The protection tunnel cannot be bound to any SIs during the configuration of a PBB-TE protection group. The priority cannot be configured. A tunnel to be added in a protection group must be completely configured.

----End

6.3.3 Configuring Protection Mode of the Protection Group


Context
Do as follows on each router at the edge of the MAN:

Procedure
Step 1 Run:
system-view

Issue 03 (2008-09-22)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

6-17

6 PBB-TE Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

The system view is displayed. Step 2 Run:


mac-tunnel tunnel-name tunnel-name

The MAC tunnel view of the working tunnel is displayed. Step 3 Run:
protection mode { one-plus-one { bidirectional | unidirectional } | one-to-one}

The protection mode of the protection group is configured. By default, protection mode is one-to-one, that is, 1:1 protection mode.
l

In 1:1 protection mode, only the working tunnel transmits services. If protection switchover occurs, traffic is switched to the protection tunnel for transmission. No traffic is in the working tunnel. In this mode, it is the transmit end of the PBB-TE tunnel that performs protection switchover. In 1+1 protection mode, the working tunnel and the protection tunnel transmit the same services. The receive end of the PBB-TE tunnel receives services from the working tunnel only. The services from the protection tunnel are discarded. In this mode, it is the receive end of the PBB-TE tunnel that performs protection switchover.

----End

6.3.4 (Optional) Configuring Revertive Mode for Protection Switchover


Context
Do as follows on each router at the edge of the MAN:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


mac-tunnel tunnel-name tunnel-name

The MAC tunnel view of the working tunnel is displayed. Step 3 Run:
protection restore { revertive [ wtr wtr-time ] | non-revertive }

The revertive mode for the protection switchover of the protection group is configured. By default, the revertive mode of a protection group is revertive, and the Wait-to-Restore (WTR) time is five minutes. For APS-type protection groups, this command is applicable only when the APS protocol is disabled and CFM is enabled. There is no restriction on OAM-type protection groups. ----End
6-18 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

6 PBB-TE Configuration

6.3.5 (Optional) Configuring Hold-off Time for Protection Switchover


Context
For APS-type protection groups, this command is applicable only when the APS protocol is disabled and CFM is enabled. There is no restriction on OAM-type protection groups. Do as follows on each router at the edge of the MAN:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


mac-tunnel tunnel-name tunnel-name

The MAC tunnel view of the working tunnel is displayed. Step 3 Run:
protection hold-off hold-off-time

The hold-off time for the protection switchover is configured for the PBB-TE APS protection group. By default, the hold-off time is 0, which indicates direct switching without waiting. ----End

6.3.6 Enabling Ethernet CFM


Context
Do as follows on each router at the edge of the MAN:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


cfm enable

Ethernet CFM is enabled globally. Step 3 Run:


mac-tunnel tunnel-name tunnel-name

The MAC tunnel view of the working tunnel or protection tunnel is displayed.
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-19

6 PBB-TE Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

Step 4 Run:
cfm [ ccm-interval interval ] enable

Ethernet CFM of the working tunnel or protection tunnel is enabled. By default, CFM of a PBB-TE tunnel is disabled. Step 5 Run:
remote-mep ccm-receive enable

The receiving of Connectivity Check Messages (CCMs) is enabled. By default, the receiving of CCMs is disabled.
NOTE

If Router A and Router B are directly connected, you need not configure Ethernet CFM for a tunnel.

----End

6.3.7 Enabling the APS Protocol


Context
Do as follows on each router at the edge of the MAN:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


mac-tunnel tunnel-name tunnel-name

The MAC tunnel view of the working tunnel is displayed. Step 3 Run:
aps enable

The APS protocol is enabled. By default, the APS protocol is disabled on the NE80E/40E. ----End

6.3.8 Checking the Configuration


Run the following command to check the previous configuration. Action Check information about a PBB-TE protection group. Command display mac-tunnel protection tunnel-name [ verbose ]

6-20

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

6 PBB-TE Configuration

Run the display mac-tunnel protection tunnel-name [ verbose ] command. You can view the following information. The contents in bold should be consistent with your configurations.
<Quidway> display mac-tunnel protection worktu verbose Work-tunnel : worktu Protect-tunnel : protecttu Protocol : aps Protect-mode : 1:1 bidirectional Aps-interval : 3.3(ms) Protocol enable : enable Revertive-mode : revertive Wtr-time : 5 Hold-off-time : 0 Switch command : null Switch-result : work-tunnel Aps received : 0 Work-status : defect Protect-status : non-defect Local-Request : SF_W B-mismatch : no R-mismatch : no Tunnel-mismatch : no Bridged-mismatch : no Far-request : NULL Far-requested-state : null Far-Bridged-state : null Far protect-mode : null Far revertive-mode : null

6.4 Configuring a P2P SI


Describes how to configure a Point-to-Point Service Instance and the related commands. 6.4.1 Establishing the Configuration Task 6.4.2 Creating a P2P SI 6.4.3 Mapping User Services to the SI 6.4.4 Binding the SI to a PBB-TE Tunnel 6.4.5 (Optional) Configuring the Priority of the SI 6.4.6 (Optional) Configuring How the SI Processes Layer 2 Protocol Packets 6.4.7 (Optional) Enabling Service Data to Carry the CRC Flag 6.4.8 Activating the SI 6.4.9 (Optional) Enabling the Traffic Statistics Function for the SI 6.4.10 Checking the Configuration

6.4.1 Establishing the Configuration Task


Applicable Environment
P2P SIs apply to P2P PBB-TE tunnels. One or a range of user VLANs can be mapped to a P2P SI. An interface can also be deemed as a user service and mapped to an SI. A P2P SI is bound to a PBB-TE tunnel only. If this PBB-TE tunnel is in a protection group, it must be the working tunnel.
Issue 03 (2008-09-22) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-21

6 PBB-TE Configuration

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

As shown in Figure 6-3, the user accesses Router A and Router B on the edge of a MAN through LAN switches. A PBB-TE tunnel is set up between Router A and Router B. It is needed to configure an SI on Router A and Router B to transmit user services in the PBB-TE tunnel. Figure 6-3 Configuring a P2P SI

RouterA

RouterC

RouterB

PBB-TE Tunnel

Pre-configuration Tasks
Before configuring a P2P SI, complete the following task:
l

Configuring a PBB-TE Tunnel

Data Preparation
To configure a P2P SI, you need the following data. No. 1 2 3 4 5 Data Name of the PBB-TE tunnel SI ID Mapping mode of the SI VLAN ID of the service mapped to the SI Priority of the SI

6.4.2 Creating a P2P SI


Context
NOTE

The SI ID must be configured; otherwise, the SI cannot be used. On a router, an SI can be configured with only one ID. Each SI ID is unique. If an ID is set for an SI, this ID cannot be used by other SIs.

Do as follows on each router that need be configured with the P2P SI and is on the edge of the MAN:
6-22 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 03 (2008-09-22)

Quidway NetEngine80E/40E Core Router Configuration Guide - LAN Access and MAN Access

6 PBB-TE Configuration

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


service-instance instance-na