Professional Documents
Culture Documents
V100R006C01
Configuration Guide - Ethernet
Issue 01
Date 2011-10-26
HUAWEI TECHNOLOGIES CO., LTD.
Copyright Huawei Technologies Co., Ltd. 2011. 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 trademarks of Huawei Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of their respective holders.
Notice
The purchased products, services and features are stipulated by the contract made between Huawei and the
customer. All or part of the products, services and features described in this document may not be within the
purchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information,
and recommendations in this document are provided "AS IS" without warranties, guarantees or representations
of any kind, either express or implied.
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 all statements, information, and
recommendations in this document do not constitute the warranty of any kind, express or implied.
Huawei Technologies Co., Ltd.
Address: Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website: http://www.huawei.com
Email: support@huawei.com
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
i
About This Document
Intended Audience
This document provides the basic concepts, configuration procedures, and configuration
examples in different application scenarios of the Ethernet feature supported by the S3700
device.
This document describes how to configure the Ethernet feature.
This document is intended for:
l Data configuration engineers
l Commissioning engineers
l Network monitoring engineers
l System maintenance engineers
Symbol Conventions
The symbols that may be found in this document are defined as follows.
Symbol Description
DANGER
Indicates a hazard with a high level of risk, which if not
avoided, will result in death or serious injury.
WARNING
Indicates a hazard with a medium or low level of risk, which
if not avoided, could result in minor or moderate injury.
CAUTION
Indicates a potentially hazardous situation, which if not
avoided, could result in equipment damage, data loss,
performance degradation, or unexpected results.
TIP
Indicates a tip that may help you solve a problem or save
time.
NOTE
Provides additional information to emphasize or supplement
important points of the main text.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet About This Document
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
ii
Command Conventions
The command conventions that may be found in this document are defined as follows.
Convention Description
Boldface The keywords of a command line are in boldface.
Italic Command arguments are in italics.
[ ] Items (keywords or arguments) in brackets [ ] are optional.
{ x | y | ... } Optional items are grouped in braces and separated by vertical
bars. One item is selected.
[ x | y | ... ] Optional items are grouped in brackets and separated by vertical
bars. One item is selected or no item is selected.
{ x | y | ... }
*
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.
[ x | y | ... ]
*
Optional items are grouped in brackets and separated by vertical
bars. Several items or no item can be selected.
&<1-n> The parameter before the & sign can be repeated 1 to n times.
# A line starting with the # sign is comments.
Change History
Updates between document issues are cumulative. Therefore, the latest document issue contains
all updates made in previous issues.
Changes in Issue 01 (2011-10-26)
Initial commercial release.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet About This Document
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
iii
Contents
About This Document.....................................................................................................................ii
1 Ethernet Interface Configuration...............................................................................................1
1.1 Introduction to Ethernet Interfaces.....................................................................................................................2
1.2 Ethernet Interface Features Supported by the S3700.........................................................................................2
1.3 Configuring Basic Attributes of the Ethernet Interface......................................................................................3
1.3.1 Establishing the Configuration Task.........................................................................................................3
1.3.2 (Optional) Configuring a Description for an Interface..............................................................................3
1.3.3 (Optional) Configuring the Cable Type on an Interface............................................................................4
1.3.4 (Optional) Setting the Duplex Mode.........................................................................................................5
1.3.5 (Optional) Setting the Rate of an Interface................................................................................................5
1.3.6 (Optional) Enabling Auto-Negotiation......................................................................................................6
1.3.7 (Optional) Switching Between Optical and Electrical Interfaces..............................................................6
1.3.8 Checking the Configuration.......................................................................................................................7
1.4 Configuring Advanced Attributes of an Ethernet Interface................................................................................7
1.4.1 Establishing the Configuration Task.........................................................................................................7
1.4.2 (Optional) Configuring Loopback on the Ethernet Interface....................................................................8
1.4.3 (Optional) Configuring the Interface Group..............................................................................................8
1.4.4 (Optional) Setting the Maximum Frame Length on the Ethernet Interface...............................................9
1.4.5 (Optional) Enabling Flow Control.............................................................................................................9
1.4.6 (Optional) Enabling Auto-Negotiation of Flow Control.........................................................................10
1.4.7 (Optional) Enabling Port Isolation..........................................................................................................10
1.4.8 (Optional) Performing a Cable Test on an Interface...............................................................................11
1.4.9 (Optional) Configuring a Loopback Test on an Interface.......................................................................12
1.4.10 Checking the Configuration...................................................................................................................12
1.5 Maintaining Ethernet Interfaces.......................................................................................................................13
1.5.1 Debugging Ethernet Interfaces................................................................................................................13
1.6 Configuration Examples...................................................................................................................................13
1.6.1 Example for Configuring Port Isolation..................................................................................................13
2 Link Aggregation Configuration..............................................................................................16
2.1 Introduction to Link Aggregation.....................................................................................................................17
2.2 Link Aggregation Supported by the S3700......................................................................................................17
2.3 Configuring Link Aggregation in Manual Load Balancing Mode...................................................................18
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet Contents
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
iv
2.3.1 Establishing the Configuration Task.......................................................................................................18
2.3.2 Configuring the Eth-Trunk to Work in Manual Load Balancing Mode..................................................19
2.3.3 Adding Member Interfaces to an Eth-Trunk...........................................................................................20
2.3.4 (Optional) Configuring the Load Balancing Mode.................................................................................21
2.3.5 (Optional) Limiting the Number of Active Interfaces.............................................................................22
2.3.6 (Optional) Configuring the Load Balancing Mode for Unknown Unicast Traffic..................................23
2.3.7 Checking the Configuration.....................................................................................................................24
2.4 Configuring Link Aggregation in Static LACP Mode.....................................................................................24
2.4.1 Establishing the Configuration Task.......................................................................................................24
2.4.2 Configuring the Eth-Trunk to Work in Static LACP Mode....................................................................25
2.4.3 Adding Member Interfaces to an Eth-Trunk...........................................................................................26
2.4.4 (Optional) Configuring the Load Balancing Mode.................................................................................27
2.4.5 (Optional) Limiting the Number of Active Interfaces.............................................................................28
2.4.6 (Optional) Setting the LACP Priority of the System...............................................................................29
2.4.7 (Optional) Setting the LACP Priority of an Interface..............................................................................29
2.4.8 (Optional) Enabling LACP Preemption and Setting the Delay for LACP Preemption...........................30
2.4.9 (Optional) Setting the Timeout Interval for Receiving LACP Packets...................................................31
2.4.10 (Optional) Configuring the Load Balancing Mode for Unknown Unicast Traffic................................32
2.4.11 Checking the Configuration...................................................................................................................32
2.5 Configuring an E-Trunk...................................................................................................................................32
2.5.1 Establishing the Configuration Task.......................................................................................................32
2.5.2 Setting the LACP System ID and LACP Priority of an E-Trunk............................................................33
2.5.3 Creating an E-Trunk and Setting Its Priority...........................................................................................34
2.5.4 Configuring Local and Peer IP Addresses of an E-Trunk.......................................................................35
2.5.5 Binding an E-Trunk to a BFD Session....................................................................................................35
2.5.6 Adding an Eth-Trunk to an E-Trunk.......................................................................................................36
2.5.7 (Optional) Configuring the Working Mode of an Eth-Trunk in an E-Trunk..........................................37
2.5.8 (Optional) Setting the Password..............................................................................................................37
2.5.9 (Optional) Setting the Timeout of Hello Packets....................................................................................38
2.5.10 (Optional) Setting the Revertive Switching Delay................................................................................39
2.5.11 Checking the Configuration...................................................................................................................40
2.6 Maintaining Link Aggregation.........................................................................................................................40
2.6.1 Clearing Statistics of LACP Packets.......................................................................................................40
2.6.2 Debugging the Link Aggregation Group.................................................................................................40
2.6.3 Monitoring the Operation Status of the Link Aggregation Group..........................................................41
2.7 Configuration Examples...................................................................................................................................42
2.7.1 Example for Configuring Link Aggregation in Manual Load Balancing Mode.....................................42
2.7.2 Example for Configuring Link Aggregation in Static LACP Mode.......................................................44
3 VLAN Configuration..................................................................................................................48
3.1 Introduction......................................................................................................................................................50
3.2 VLAN Features Supported by the S3700.........................................................................................................57
3.3 Dividing a LAN into VLANs...........................................................................................................................61
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet Contents
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
v
3.3.1 Establishing the Configuration Task.......................................................................................................61
3.3.2 Dividing a LAN into VLANs Based on Ports.........................................................................................64
3.3.3 Dividing a LAN into VLANs Based on MAC Addresses.......................................................................66
3.3.4 Dividing a LAN into VLANs Based on IP Subnets................................................................................67
3.3.5 Dividing a LAN into VLANs Based on Protocols..................................................................................69
3.3.6 Dividing a LAN into VLANs Based on Policies.....................................................................................71
3.3.7 Checking the Configuration.....................................................................................................................72
3.4 Creating a VLANIF Interface...........................................................................................................................73
3.4.1 Establishing the Configuration Task.......................................................................................................73
3.4.2 Creating a VLANIF Interface..................................................................................................................73
3.4.3 Assigning an IP Address to a VLANIF Interface....................................................................................74
3.4.4 (Optional) Setting a Delay After Which a VLANIF Interface Goes Down............................................74
3.4.5 (Optional) Setting the MTU of a VLANIF Interface...............................................................................75
3.4.6 Checking the Configuration.....................................................................................................................76
3.5 Configuring Inter-VLAN Communication.......................................................................................................76
3.5.1 Establishing the Configuration Task.......................................................................................................76
3.5.2 Configuring VLANIF Interfaces for Inter-VLAN Communication........................................................77
3.5.3 Checking the Configuration.....................................................................................................................79
3.6 Configuring VLAN Aggregation to Save IP Addresses...................................................................................79
3.6.1 Establishing the Configuration Task.......................................................................................................79
3.6.2 Creating a Sub-VLAN.............................................................................................................................80
3.6.3 Creating a Super-VLAN..........................................................................................................................81
3.6.4 Assigning an IP Address to the VLANIF Interface of a Super-VLAN...................................................82
3.6.5 (Optional) Enabling Proxy ARP on the VLANIF Interface of a Super-VLAN......................................82
3.6.6 Checking the Configuration.....................................................................................................................83
3.7 Configuring a MUX VLAN to Separate Layer 2 Traffic.................................................................................84
3.7.1 Establishing the Configuration Task.......................................................................................................84
3.7.2 Configuring a Principal VLAN for a MUX VLAN................................................................................85
3.7.3 Configuring a Group VLAN for a Subordinate VLAN...........................................................................86
3.7.4 Configuring a Separate VLAN for a Subordinate VLAN.......................................................................86
3.7.5 Enabling the MUX VLAN Function on a Port........................................................................................87
3.7.6 Checking the Configuration.....................................................................................................................88
3.8 Configuring a Voice VLAN to Transmit Voice Data.......................................................................................88
3.8.1 Establishing the Configuration Task.......................................................................................................88
3.8.2 Enabling the Voice VLAN Function.......................................................................................................90
3.8.3 Configuring an OUI for a Voice VLAN..................................................................................................91
3.8.4 (Optional) Setting an Aging Timer for a Voice VLAN...........................................................................91
3.8.5 (Optional) Configuring an 802.1p Priority and a DSCP Value for the Voice VLAN.............................92
3.8.6 (Optional) Configuring the Mode in Which Ports Are Added to a Voice VLAN...................................93
3.8.7 (Optional) Configuring the Working Mode for a Voice VLAN..............................................................94
3.8.8 (Optional) Configuring a Port to Communicate with a Voice Device of Another Vendor.....................95
3.8.9 Checking the Configuration.....................................................................................................................95
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet Contents
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
vi
3.9 Configuring an mVLAN to Implement Integrated Management.....................................................................96
3.9.1 Establishing the Configuration Task.......................................................................................................96
3.9.2 Configuring an mVLAN..........................................................................................................................97
3.9.3 Configuring a VLANIF Interface for an mVLAN..................................................................................97
3.9.4 Checking the Configuration.....................................................................................................................98
3.10 Maintaining VLAN.........................................................................................................................................98
3.10.1 Clearing the Statistics of VLAN Packets..............................................................................................98
3.11 Configuration Examples.................................................................................................................................98
3.11.1 Example for Configuring Interface-based VLANs................................................................................98
3.11.2 Example for Configuring MAC Address-based VLAN Assignment..................................................101
3.11.3 Example for Configuring IP Subnet-based VLAN Assignment.........................................................103
3.11.4 Example for Configuring Protocol-based VLAN Assignment............................................................107
3.11.5 Example for Implementing Communication Between VLANs by Using VLANIF Interfaces...........110
3.11.6 Example for Configuring VLAN Aggregation....................................................................................112
3.11.7 Example for Configuring the MUX VLAN........................................................................................115
3.11.8 Example for Configuring a Voice VLAN in Auto Mode....................................................................118
3.11.9 Example for Configuring a Voice VLAN in Manual Mode................................................................120
4 VLAN Mapping Configuration..............................................................................................124
4.1 Introduction to VLAN Mapping.....................................................................................................................125
4.2 VLAN Mapping Features Supported by the S3700........................................................................................125
4.3 Configuring VLAN Mapping of Single VLAN Tag......................................................................................125
4.3.1 Establishing the Configuration Task.....................................................................................................125
4.3.2 Replacing a Single Tag..........................................................................................................................126
4.3.3 Checking the Configuration...................................................................................................................127
4.4 Configuring VLAN Mapping of Double VLAN Tags...................................................................................127
4.4.1 Establishing the Configuration Task.....................................................................................................127
4.4.2 Replacing the Outer VLAN Tag............................................................................................................128
4.4.3 Checking the Configuration...................................................................................................................129
4.5 Configuring Global VLAN Mapping.............................................................................................................129
4.5.1 Establishing the Configuration Task.....................................................................................................129
4.5.2 Configuring Global VLAN Mapping....................................................................................................129
4.5.3 Checking the Configuration...................................................................................................................130
4.6 Configuration Examples.................................................................................................................................130
4.6.1 Example for Configuring Single-Tag VLAN Mapping........................................................................130
4.6.2 Example for Configuring N:1 VLAN Mapping....................................................................................134
4.6.3 Example for Configuring Global VLAN Mapping...............................................................................136
5 QinQ Configuration..................................................................................................................139
5.1 Concept of QinQ.............................................................................................................................................140
5.2 QinQ Features Supported by the S3700.........................................................................................................140
5.3 Configuring QinQ on an Interface..................................................................................................................140
5.3.1 Establishing the Configuration Task.....................................................................................................140
5.3.2 Setting the Link Type of an Interface....................................................................................................141
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet Contents
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
vii
5.3.3 Specifying the Outer VLAN ID.............................................................................................................141
5.3.4 Checking the Configuration...................................................................................................................142
5.4 Configuring Selective QinQ...........................................................................................................................142
5.4.1 Establishing the Configuration Task.....................................................................................................142
5.4.2 Setting the Link Type of an Interface....................................................................................................143
5.4.3 Adding an Outer VLAN Tag.................................................................................................................143
5.4.4 Configuring Selective QinQ..................................................................................................................144
5.4.5 Checking the Configuration...................................................................................................................144
5.5 Configuring QinQ Stacking on a VLANIF Interface.....................................................................................145
5.5.1 Establishing the Configuration Task.....................................................................................................145
5.5.2 Configuring QinQ Stacking on a VLANIF Interface............................................................................146
5.5.3 Checking the Configuration...................................................................................................................147
5.6 Setting the Protocol Type in the Outer VLAN Tag........................................................................................147
5.6.1 Establishing the Configuration Task.....................................................................................................147
5.6.2 Configuring the Type of an Interface....................................................................................................148
5.6.3 Setting the Protocol Type in the Outer VLAN Tag...............................................................................148
5.6.4 Checking the Configuration...................................................................................................................149
5.7 Configuration Examples.................................................................................................................................149
5.7.1 Example for Configuring QinQ on Interfaces.......................................................................................149
5.7.2 Example for Configuring Selective QinQ.............................................................................................152
5.7.3 Example for Configuring Selective QinQ with VLAN Mapping..........................................................155
5.7.4 Example for Configuring QinQ Stacking on the VLANIF Interface....................................................158
6 GVRP Configuration................................................................................................................162
6.1 GVRP Overview.............................................................................................................................................163
6.2 GVRP Features Supported by the S3700.......................................................................................................166
6.3 Configuring GVRP.........................................................................................................................................167
6.3.1 Establishing the Configuration Task.....................................................................................................167
6.3.2 Enabling GVRP.....................................................................................................................................167
6.3.3 (Optional) Setting the Registration Mode of a GVRP Interface............................................................168
6.3.4 (Optional) Setting the GARP Timers....................................................................................................169
6.3.5 Checking the Configuration...................................................................................................................170
6.4 Maintaining GVRP.........................................................................................................................................170
6.4.1 Clearing GARP Statistics......................................................................................................................170
6.5 Configuration Examples.................................................................................................................................171
6.5.1 Example for Configuring GVRP...........................................................................................................171
7 MAC Address Table Configuration.......................................................................................175
7.1 MAC Address Table Overview......................................................................................................................177
7.2 MAC Address Features Supported by the S3700...........................................................................................178
7.3 Configuring a Static MAC Address Entry......................................................................................................180
7.4 Configuring a Blackhole MAC Address Entry...............................................................................................181
7.5 Setting the Aging Time of Dynamic MAC Address Entries..........................................................................182
7.6 Disabling MAC Address Learning.................................................................................................................183
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet Contents
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
viii
7.6.1 Establishing the Configuration Task.....................................................................................................183
7.6.2 Disabling MAC Address Learning on an Interface...............................................................................184
7.6.3 Disabling MAC Address Learning in a VLAN.....................................................................................185
7.6.4 Checking the Configuration...................................................................................................................185
7.7 Limiting the Number of Learned MAC Addresses........................................................................................185
7.7.1 Establishing the Configuration Task.....................................................................................................186
7.7.2 Limiting the Number of MAC Addresses Learned on an Interface......................................................187
7.7.3 Limiting the Number of MAC Addresses Learned in a VLAN............................................................188
7.7.4 Checking the Configuration...................................................................................................................188
7.8 Configuring Port Security...............................................................................................................................189
7.8.1 Establishing the Configuration Task.....................................................................................................189
7.8.2 Configuring the Secure Dynamic MAC Function on an Interface........................................................190
7.8.3 Configuring the Sticky MAC Function on an Interface........................................................................191
7.8.4 Checking the Configuration...................................................................................................................192
7.9 Configuring MAC Address Anti-Flapping.....................................................................................................192
7.9.1 Establishing the Configuration Task.....................................................................................................192
7.9.2 Setting the MAC Address Learning Priority of an Interface.................................................................193
7.9.3 Prohibiting MAC Address Flapping Between Interfaces with the Same Priority.................................194
7.9.4 Checking the Configuration...................................................................................................................194
7.10 Configuring MAC Address Flapping Detection...........................................................................................195
7.10.1 Establishing the Configuration Task...................................................................................................195
7.10.2 Configuring MAC Address Flapping Detection..................................................................................196
7.10.3 (Optional) Unblocking a Blocked Interface or MAC Address............................................................196
7.10.4 Checking the Configuration.................................................................................................................197
7.11 Enabling MAC Spoofing Defense................................................................................................................197
7.12 Configuring the S3700 to Discard Packets with an All-0 MAC Address....................................................198
7.13 Enabling MAC Address Triggered ARP Entry Update................................................................................199
7.14 Enabling Port Bridge....................................................................................................................................200
7.15 Configuration Examples...............................................................................................................................201
7.15.1 Example for Configuring the MAC Address Table.............................................................................201
7.15.2 Example for Configuring the Limitation on MAC Address Learning Based on VLANs...................204
7.15.3 Example for Configuring Interface Security.......................................................................................206
7.15.4 Example for Configuring MAC Address Anti-Flapping.....................................................................208
8 STP/RSTP Configuration.........................................................................................................210
8.1 STP/RSTP Overview......................................................................................................................................211
8.1.1 STP/RSTP Overview.............................................................................................................................211
8.1.2 STP/RSTP Features Supported by the S3700........................................................................................216
8.2 Configuring Basic STP/RSTP Functions.......................................................................................................218
8.2.1 Establishing the Configuration Task.....................................................................................................218
8.2.2 Configuring the STP/RSTP Mode.........................................................................................................220
8.2.3 (Optional) Configuring Switching Device Priorities.............................................................................220
8.2.4 (Optional) Setting the Path Cost for a Port............................................................................................221
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet Contents
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
ix
8.2.5 (Optional) Configuring Port Priorities...................................................................................................222
8.2.6 Enabling STP/RSTP..............................................................................................................................223
8.2.7 Checking the Configuration...................................................................................................................223
8.3 Configuring STP/RSTP Parameters on an Interface......................................................................................224
8.3.1 Establishing the Configuration Task.....................................................................................................226
8.3.2 Setting System Parameters....................................................................................................................227
8.3.3 Setting Port Parameters.........................................................................................................................228
8.3.4 Checking the Configuration...................................................................................................................230
8.4 Configuring RSTP Protection Functions........................................................................................................230
8.4.1 Establishing the Configuration Task.....................................................................................................230
8.4.2 Configuring BPDU Protection on a Switching Device.........................................................................232
8.4.3 Configuring TC Protection on a Switching Device...............................................................................233
8.4.4 Configuring Root Protection on a Port..................................................................................................233
8.4.5 Configuring Loop Protection on a Port.................................................................................................234
8.4.6 Checking the Configuration...................................................................................................................235
8.5 Configuring STP/RSTP Interoperability Between Huawei Devices and Non-Huawei Devices....................235
8.5.1 Establishing the Configuration Task.....................................................................................................235
8.5.2 Configuring the Proposal/Agreement Mechanism................................................................................236
8.5.3 Checking the Configuration...................................................................................................................237
8.6 Maintaining STP/RSTP..................................................................................................................................237
8.6.1 Clearing STP/RSTP Statistics...............................................................................................................238
8.7 Configuration Examples.................................................................................................................................238
8.7.1 Example for Configuring Basic STP Functions....................................................................................238
8.7.2 Example for Configuring Basic RSTP Functions..................................................................................243
9 MSTP Configuration.................................................................................................................248
9.1 MSTP Overview.............................................................................................................................................250
9.1.1 MSTP Introduction................................................................................................................................250
9.1.2 MSTP Features Supported by the S3700...............................................................................................258
9.2 Configuring Basic MSTP Functions...............................................................................................................262
9.2.1 Establishing the Configuration Task.....................................................................................................262
9.2.2 Configuring the MSTP Mode................................................................................................................264
9.2.3 Configuring and Activating an MST Region........................................................................................265
9.2.4 (Optional) Setting a Priority for a Switching Device in an MSTI.........................................................266
9.2.5 (Optional) Setting a Path Cost of a Port in an MSTI.............................................................................267
9.2.6 (Optional) Setting a Port Priority in an MSTI.......................................................................................268
9.2.7 Enabling MSTP.....................................................................................................................................269
9.2.8 Checking the Configuration...................................................................................................................269
9.3 Configuring MSTP Multi-process..................................................................................................................270
9.3.1 Establishing the Configuration Task.....................................................................................................270
9.3.2 Creating an MSTP Process....................................................................................................................271
9.3.3 Adding an Interface to an MSTP Process - Access Links.....................................................................272
9.3.4 Adding an Interface to an MSTP Process - Share Link.........................................................................272
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet Contents
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
x
9.3.5 Configuring Priorities and Root Protection in MSTP Multi-process....................................................273
9.3.6 Configuring TC Notification in MSTP Multi-process..........................................................................273
9.3.7 Checking the Configuration...................................................................................................................274
9.4 Configuring MSTP Parameters on an Interface.............................................................................................274
9.4.1 Establishing the Configuration Task.....................................................................................................274
9.4.2 Configuring System Parameters............................................................................................................275
9.4.3 Configuring Port Parameters.................................................................................................................277
9.4.4 Checking the Configuration...................................................................................................................278
9.5 Configuring MSTP Protection Functions.......................................................................................................279
9.5.1 Establishing the Configuration Task.....................................................................................................279
9.5.2 Configuring BPDU Protection on a Switching Device.........................................................................281
9.5.3 Configuring TC Protection on a Switching Device...............................................................................282
9.5.4 Configuring Root Protection on an Interface........................................................................................283
9.5.5 Configuring Loop Protection on an Interface........................................................................................283
9.5.6 Configuring Share-Link Protection on a Switching Device..................................................................284
9.5.7 Checking the Configuration...................................................................................................................285
9.6 Configuring MSTP Interoperability Between Huawei Devices and Non-Huawei Devices...........................285
9.6.1 Establishing the Configuration Task.....................................................................................................285
9.6.2 Configuring a Proposal/Agreement Mechanism...................................................................................286
9.6.3 Configuring the MSTP Protocol Packet Format on an Interface...........................................................287
9.6.4 Enabling the Digest Snooping Function................................................................................................288
9.6.5 Checking the Configuration...................................................................................................................289
9.7 Maintaining MSTP.........................................................................................................................................289
9.7.1 Clearing MSTP Statistics.......................................................................................................................289
9.8 Configuration Examples.................................................................................................................................290
9.8.1 Example for Configuring Basic MSTP Functions.................................................................................290
9.8.2 Example for Configuring MSTP Multi-Process for Layer 2 Single-Access Rings and Layer 2 Multi-Access
Rings...............................................................................................................................................................297
10 SEP Configuration...................................................................................................................305
10.1 SEP Overview...............................................................................................................................................307
10.1.1 SEP Overview......................................................................................................................................307
10.1.2 SEP Features Supported by the S3700................................................................................................320
10.2 Configuring Basic SEP Functions................................................................................................................326
10.2.1 Establishing the Configuration Task...................................................................................................326
10.2.2 Configuring an SEP Segment..............................................................................................................327
10.2.3 Configuring a Control VLAN..............................................................................................................327
10.2.4 Creating a Protected Instance..............................................................................................................328
10.2.5 Adding a Layer 2 Interface to a SEP Segment and Configuring a Role for the Interface...................329
10.2.6 Checking the Configuration.................................................................................................................331
10.3 Specifying an Interface to Block..................................................................................................................331
10.3.1 Establishing the Configuration Task...................................................................................................331
10.3.2 Setting an Interface Blocking Mode....................................................................................................332
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet Contents
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
xi
10.3.3 Configuring the Preemption Mode......................................................................................................334
10.3.4 Checking the Configuration.................................................................................................................335
10.4 Configuring SEP Multi-Instance..................................................................................................................336
10.4.1 Establishing the Configuration Task...................................................................................................336
10.4.2 Configuring and Activating Mappings Between Protected Instances and VLANs.............................338
10.4.3 Checking the Configuration.................................................................................................................339
10.5 Configuring the Topology Change Notification Function...........................................................................339
10.5.1 Establishing the Configuration Task...................................................................................................339
10.5.2 Reporting Topology Changes of a Lower-Layer Network - SEP Topology Change Notification
........................................................................................................................................................................341
10.5.3 Reporting Topology Changes of a Lower-Layer Network - Enabling the Edge Devices in a SEP Segment
to Process SmartLink Flush Packets...............................................................................................................342
10.5.4 Reporting Topology Changes of an Upper-Layer Network - Configuring Association Between SEP and
CFM................................................................................................................................................................343
10.5.5 Checking the Configuration.................................................................................................................344
10.6 Maintaining SEP...........................................................................................................................................344
10.6.1 Clearing SEP Statistics........................................................................................................................344
10.6.2 Debugging SEP....................................................................................................................................344
10.7 Configuration Examples...............................................................................................................................345
10.7.1 Example for Configuring SEP on a Closed Ring Network.................................................................345
10.7.2 Example for Configuring SEP on a Multi-ring Network....................................................................351
10.7.3 Example for Configuring SEP on a Hybrid-ring Network..................................................................362
10.7.4 Example for Configuring a Hybrid SEP+RRPP Ring Network (Reporting the Topology Changes of a
Lower-Layer Network)...................................................................................................................................371
10.7.5 Example for Configuring SEP Multi-Instance on a Closed Ring Network.........................................383
11 Layer 2 Protocol Transparent Transmission Configuration............................................392
11.1 Overview of Layer 2 Protocol Transparent Transmission............................................................................394
11.2 Layer 2 Protocol Transparent Transmission Features Supported by the S3700...........................................395
11.3 Configuring Interface-based Layer 2 Protocol Transparent Transmission...................................................401
11.3.1 Establishing the Configuration Task...................................................................................................401
11.3.2 (Optional) Defining Characteristic Information About a Layer 2 Protocol........................................402
11.3.3 Configuring the Transparent Transmission Mode of Layer 2 Protocol Packets.................................403
11.3.4 Enabling Layer 2 Protocol Transparent Transmission on an Interface...............................................404
11.3.5 Checking Configuration......................................................................................................................405
11.4 Configuring VLAN-based Layer 2 Protocol Transparent Transmission......................................................405
11.4.1 Establishing the Configuration Task...................................................................................................405
11.4.2 (Optional) Defining Characteristic Information About a Layer 2 Protocol........................................406
11.4.3 Configuring the Transparent Transmission Mode of Layer 2 Protocol Packets.................................406
11.4.4 Enabling VLAN-based Layer 2 Protocol Transparent Transmission on an Interface.........................407
11.4.5 Checking the Configuration.................................................................................................................408
11.5 Configuring QinQ-based Layer 2 Protocol Transparent Transmission........................................................409
11.5.1 Establishing the Configuration Task...................................................................................................409
11.5.2 (Optional) Defining Characteristic Information About a Layer 2 Protocol........................................409
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet Contents
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
xii
11.5.3 Configuring the Transparent Transmission Mode of Layer 2 Protocol Packets.................................410
11.5.4 Enabling QinQ-based Layer 2 Transparent Transmission on an Interface..........................................411
11.5.5 Checking the Configuration.................................................................................................................412
11.6 Maintaining Layer 2 Protocol Transparent Transmission............................................................................412
11.6.1 Debugging Layer 2 Protocol Transparent Transmission.....................................................................413
11.7 Configuration Examples...............................................................................................................................413
11.7.1 Example for Configuring Interface-based Layer 2 Protocol Transparent Transmission.....................413
11.7.2 Example for Configuring VLAN-based Layer 2 Protocol Transparent Transmission........................420
11.7.3 Example for Configuring QinQ-based Layer 2 Protocol Transparent Transmission..........................427
12 Loopback Detection Configuration.....................................................................................434
12.1 Loopback Detection Overview.....................................................................................................................435
12.2 Configuring Loopback Detection.................................................................................................................435
12.2.1 Establishing the Configuration Task...................................................................................................435
12.2.2 Enabling Loopback Detection.............................................................................................................437
12.2.3 Specifying VLAN IDs of Loopback Detection Packets......................................................................437
12.2.4 (Optional) Configuring an Action to Perform After a Loopback Is Detected.....................................438
12.2.5 (Optional) Setting the Interface Recovery Time After a Loop Is Removed........................................439
12.2.6 (Optional) Setting the Interval for Sending Loopback Detection Packets on an Interface.................440
12.2.7 Checking the Configuration.................................................................................................................440
12.3 Configuration Examples...............................................................................................................................440
12.3.1 Example for Configuring Loopback Detection...................................................................................440
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet Contents
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
xiii
1 Ethernet Interface Configuration
About This Chapter
This chapter describes the basic knowledge, methods, and examples for configuring the Ethernet
interface.
1.1 Introduction to Ethernet Interfaces
This section describes the Ethernet interfaces.
1.2 Ethernet Interface Features Supported by the S3700
This section describes the Ethernet interface features supported by the S3700.
1.3 Configuring Basic Attributes of the Ethernet Interface
This section describes how to configure the description, cable type, duplex mode, rate, and auto-
negotiation an Ethernet interface, and switch between the optical and electrical interfaces.
1.4 Configuring Advanced Attributes of an Ethernet Interface
This section describes how to configure the loopback on the Ethernet Interface, port group,
maximum frame size, flow control, flow control auto-negotiation, cable test, loopback test, and
port isolation.
1.5 Maintaining Ethernet Interfaces
This section describes how to maintain Ethernet interfaces.
1.6 Configuration Examples
This section provides several configuration examples of Ethernet interfaces.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 1 Ethernet Interface Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
1
1.1 Introduction to Ethernet Interfaces
This section describes the Ethernet interfaces.
The Ethernet is flexible, simple, and easy to implement; therefore, it becomes an important local
area network (LAN) networking technology.
Ethernet interfaces are classified into Ethernet electrical interfaces and Ethernet optical
interfaces.
Table 1-1 shows the attributes of Ethernet electrical interfaces and Ethernet optical interfaces.
Table 1-1 Attributes of Ethernet interfaces
Interface
Type
Rate (Mbit/
s)
Auto-negotiation Non-negotiation
Full
Duplex
Half
Duplex
Full
Duplex
Half
Duplex
Ethernet
electrical
interface
10 Yes Yes Yes Yes
100 Yes Yes Yes Yes
1000 Yes No Yes No
Ethernet
optical
interface
100 No No Yes No
1000 Yes No Yes No
If the local interface works in auto-negotiation mode, the peer interface must also work in auto-
negotiation mode; otherwise, packet loss may occur.
1.2 Ethernet Interface Features Supported by the S3700
This section describes the Ethernet interface features supported by the S3700.
Port Group
The port group function enables you to configure multiple interfaces at the same time. You can
run commands in the port group view to configure all the interfaces in the group.
Auto-Negotiation
The auto-negotiation function allows interfaces on both ends of a link to select the same operating
parameters by exchanging capability information. Each interface sends its capability information
to the remote end and checks capabilities of the remote end. After both interfaces receive the
capability information from each other, they adopt the highest capability they support to
communicate with each other.
The interfaces negotiate the duplex mode, speed, and flow control parameters. After a successful
negotiation, the interfaces use the same duplex mode, speed, and flow control parameters.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 1 Ethernet Interface Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
2
Port Isolation
The port isolation function isolates Layer 2 and Layer 3 communication between ports in the
same VLAN. This function restricts packet transmission between ports flexibly, providing a
secure and flexible network solution.
1.3 Configuring Basic Attributes of the Ethernet Interface
This section describes how to configure the description, cable type, duplex mode, rate, and auto-
negotiation an Ethernet interface, and switch between the optical and electrical interfaces.
1.3.1 Establishing the Configuration Task
Applicable Environment
The configuration task is applicable to the following situations:
l You can configure the description of interfaces to facilitate the identification, maintenance,
and configuration of the interfaces.
l By default, an FE electrical interface automatically identifies the network cable type. If the
interface cannot identify the cable type properly, set the cable type for the interface
manually.
l By default, an FE electrical interface negotiates the duplex mode and rate with the
equipment that is directly connected to the interface. If the connected equipment does not
have the auto-negotiation capability, set the duplex mode and rate for the FE interface
manually so that the interface can work with the connected equipment.
Pre-configuration Tasks
None
Data Preparation
To configure the basic functions of Ethernet interfaces, you need the following data.
No. Data
1 Number of an Ethernet interface
2 (Optional) Description of an interface
3 (Optional) Cable type of an ethernet electrical interface
4 (Optional) Duplex mode of an ethernet electrical interface
5 (Optional) Rate of an ethernet interface
1.3.2 (Optional) Configuring a Description for an Interface
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 1 Ethernet Interface Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
3
Context
Perform the following steps on the S3700.
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:
description description
A description is configured for the interface.
By default, the description of an interface is "HUAWEI, Quidway Series, X interface". X
specifies the interface type and number.
----End
1.3.3 (Optional) Configuring the Cable Type on an Interface
Context
Perform the following steps on the S3700.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The Ethernet electrical interface view is displayed.
Step 3 Run:
mdi { across | auto | normal }
The cable type is configured for the Ethernet electrical interface.
By default, an Ethernet electrical interface automatically identifies the cable type.
An electrical interface can use a crossover cable or a straight through cable. If across is specified,
the interface can use a crossover cable; if normal is specified, the interface can use a straight
through cable; if auto is specified, the interface can use both types of network cables.
----End
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 1 Ethernet Interface Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
4
1.3.4 (Optional) Setting the Duplex Mode
Context
Do as follows on the S3700 where you need to set the duplex mode of interfaces.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The Ethernet electrical interface view is displayed.
Step 3 Run:
undo negotiation auto
The auto-negotiation mode is disabled on the Ethernet electrical interface.
Step 4 Run:
duplex { full | half }
The duplex mode is set for the Ethernet electrical interface.
By default, the duplex mode of an Ethernet electrical interface is full-duplex when auto-
negotiation is disabled on the interface.
----End
1.3.5 (Optional) Setting the Rate of an Interface
Context
Do as follows on the S3700 where you need to set the rate of interfaces.
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:
undo negotiation auto
The auto-negotiation mode is disabled on the interface.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 1 Ethernet Interface Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
5
Step 4 Run:
speed { 10 | 100 | 1000 }
The rate is set for the interface.
By default, an Ethernet interface works at its maximum rate when auto-negotiation is disabled
on the interface.
----End
1.3.6 (Optional) Enabling Auto-Negotiation
Context
Do as follows on the S3700 where you want to enable auto-negotiation and on the switch
connected to this S3700.
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:
negotiation auto
Auto-negotiation is enabled on the interface.
By default, an interface works in auto-negotiation mode.
The local interface and peer interface must work in the same mode, that is, both in auto-
negotiation mode or not.
NOTE
100M optical interfaces do not support auto-negotiation.
----End
1.3.7 (Optional) Switching Between Optical and Electrical
Interfaces
Context
Do as follows on the S3700 where you need to switch between optical and electrical interfaces.
Procedure
Step 1 Run:
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 1 Ethernet Interface Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
6
system-view
The system view is displayed.
Step 2 Run:
interface gigabitethernet interface-number
The GigabitEthernet interface view is displayed.
Step 3 Run:
combo-port { auto | copper | fiber }
The interface is changed to an optical interface or an electrical interface.
By default, a combo port selects the working mode automatically.
----End
1.3.8 Checking the Configuration
Procedure
Step 1 Run the display interface [ interface-type [ interface-number ] ] command to display the
description, duplex mode, and rate of an Ethernet interface.
----End
1.4 Configuring Advanced Attributes of an Ethernet
Interface
This section describes how to configure the loopback on the Ethernet Interface, port group,
maximum frame size, flow control, flow control auto-negotiation, cable test, loopback test, and
port isolation.
1.4.1 Establishing the Configuration Task
Applicable Environment
The configuration task is applicable to the following situations:
l The S3700 provides the interface group function, which enables you to configure multiple
interfaces at the same time.
l If the traffic volume received on an interface of the S3700 may exceed the processing
capability of the interface and the directly connected interface supports traffic control,
enable the traffic control function on the interface. When the rate of received traffic reaches
the threshold, the interface sends a Pause frame (in full duplex mode) or sends a back
pressure signal (in half duplex mode) to notify the peer interface. If the peer interface
supports traffic control, it decreases the rate of at which it sends traffic so that the local
interface can properly process received traffic.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 1 Ethernet Interface Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
7
l Ports enabled with port isolation cannot communicate with each other so that ports on the
same VLAN can be isolated. Port isolation provides secure and flexible networking
schemes for customers.
Pre-configuration Tasks
None.
Data Preparation
To configure the advanced functions of Ethernet interfaces, you need the following data.
No. Data
1 Interface number
2 (Optional) Maximum frame length allowed on the interface
1.4.2 (Optional) Configuring Loopback on the Ethernet Interface
Context
Do as follows on the S3700 where you need to configure the loopback.
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:
loopback internal
The loopback is configured on the Ethernet interface.
By default, loopback is not configured on an Ethernet interface.
----End
1.4.3 (Optional) Configuring the Interface Group
Context
Do as follows on the S3700 where you need to configure interface groups.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 1 Ethernet Interface Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
8
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
port-group port-group-name
The interface group view is displayed.
Step 3 Run:
group-member interface-type interface-number
The Ethernet interface is added to the interface group.
----End
1.4.4 (Optional) Setting the Maximum Frame Length on the
Ethernet Interface
Context
Do as follows on the S3700 where you need to set the maximum frame length.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The Ethernet interface view is displayed.
Step 3 Run:
jumboframe enable [ value ]
The maximum length of the frame is set on the Ethernet interface.
By default, the maximum frame length allowed by interfaces of the S3700EI and S3700SI is
1600 bytes, and the maximum frame length allowed by an interface of the S3700HI is 9216
bytes.
----End
1.4.5 (Optional) Enabling Flow Control
Context
Do as follows on the S3700 where you need to enable flow control.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 1 Ethernet Interface Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
9
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:
flow-control
Flow control is enabled on the Ethernet interface.
By default, flow control is disabled on an Ethernet interface.
To implement flow control, you must enable this function on both the local interface and peer
interface.
----End
1.4.6 (Optional) Enabling Auto-Negotiation of Flow Control
Context
Do as follows on the S3700 whose interface needs to be configured with auto-negotiation of
flow control.
GE interfaces support auto-negotiation of flow control, but FE interfaces do not support this
function.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface gigabitethernet interface-number
The GE interface view is displayed.
Step 3 Run:
flow-control negotiation
Auto-negotiation of flow control is enabled on the GE interface.
By default, auto-negotiation of flow control is disabled on a GE interface.
You also need to configure auto-negotiation of flow control on the peer interface.
----End
1.4.7 (Optional) Enabling Port Isolation
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 1 Ethernet Interface Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
10
Context
Do as follows on the S3700 where you need to enable port isolation.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
port-isolate mode { l2 | all }
The port isolation mode is set.
By default, ports are isolated on Layer 2 but can communicate on Layer 3.
Step 3 Run:
interface interface-type interface-number
The Ethernet interface view is displayed.
Step 4 (Optional) Run:
am isolate interface-type interface-number [ to interface-number ]
The Ethernet interface is isolated from another interface unidirectionally.
NOTE
After interface A is isolated from interface B unidirectionally, packets sent by interface A cannot reach
interface B, whereas packets sent from interface B can reach interface A.
Step 5 Run:
port-isolate enable [ group group-id ]
Port isolation is enabled.
NOTE
Ports in a port isolation group are isolated from each other, and ports in different port isolation groups can
communicate with each other. If group-id is not specified, a port is added to port isolation group 1.
----End
1.4.8 (Optional) Performing a Cable Test on an Interface
Context
A cable test detects faults on the cable connected to an interface. If the cable is working properly,
the total length of the cable is displayed. If the cable cannot work properly, the distance between
the interface and the fault point is displayed.
Procedure
Step 1 Run:
system-view
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 1 Ethernet Interface Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
11
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The interface view is displayed.
Step 3 Run:
virtual-cable-test
A cable test is performed on the interface.
NOTE
l The test result is only for reference.
l Running the virtual-cable-test command may affect services on the interface in a short period of time.
l Combo electrical interfaces support cable tests.
l Before performing a cable test, shut down the remote interface or remove the network cable from the
remote interface. Otherwise, signals from the remote interface may make the test result inaccurate.
----End
1.4.9 (Optional) Configuring a Loopback Test on an Interface
Context
Perform the following steps on the S3700 where a loopback test needs to be performed.
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:
loopbacktest internal
A loopback test is configured on the interface.
By default, no loopback test is configured on an interface.
----End
1.4.10 Checking the Configuration
Procedure
l Run the display port-group [ all | port-group-name ] command to check information about
a port group.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 1 Ethernet Interface Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
12
l Run the display interface [ interface-type [ interface-number ] ] command to check
information about auto-negotiation capability on an Ethernet interface.
l Run the display virtual-cable-test interface-type interface-number command to check the
cable test result on an Ethernet interface.
----End
1.5 Maintaining Ethernet Interfaces
This section describes how to maintain Ethernet interfaces.
1.5.1 Debugging Ethernet Interfaces
Context
CAUTION
Debugging affects the performance of the system. So, after debugging, run the undo debugging
all command to disable it immediately.
When an Ethernet interface or Eth-Trunk fault occurs, run the following debugging commands
in the user view to locate the fault.
Procedure
Step 1 Run the debugging l2if [ error | event | msg | updown ] command to enable the debugging of
link layer features.
----End
1.6 Configuration Examples
This section provides several configuration examples of Ethernet interfaces.
1.6.1 Example for Configuring Port Isolation
Networking Requirements
As shown in Figure 1-1, it is required that PC1 and PC2 cannot communicate with each other,
but they can communicate with PC3.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 1 Ethernet Interface Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
13
Figure 1-1 Networking diagram for configuring port isolation
Switch
PC1 PC2 PC3
Eth0/0/3 E
t
h
0
/
0
/
2
Eth0/0/1
10.10.10.1/24 10.10.10.2/24 10.10.10.3/24
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable port isolation on the ports connected to PC1 and PC2 respectively to prevent PC1
and PC2 from communicating with each other.
Data Preparation
To complete the configuration, you need the following data:
l Number of the port connected to PC1
l Number of the port connected to PC2
l Port isolation mode: Layer 2 isolation and Layer 3 communication (default configuration)
l ID of the VLAN that the ports connected to PC1, PC2, and PC3 belong to (VLAN 1 by
default)
l Port isolation group that the ports connected to PC1 and PC2 belong to (group 1 by default)
Procedure
Step 1 Enable port isolation.
# Isolate ports on Layer 2 and allow them to communicate on Layer 3.
<Quidway> system-view
[Quidway] port-isolate mode l2
# Enable port isolation on Ethernet 0/0/1.
<Quidway> system-view
[Quidway] interface ethernet 0/0/1
[Quidway-Ethernet0/0/1] port-isolate enable
[Quidway-Ethernet0/0/1] quit
# Enable port isolation on Ethernet 0/0/2.
<Quidway> system-view
[Quidway] interface ethernet 0/0/2
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 1 Ethernet Interface Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
14
[Quidway-Ethernet0/0/2] port-isolate enable
[Quidway-Ethernet0/0/2] quit
Step 2 Verify the configuration.
PC1 and PC2 cannot ping each other.
PC1 and PC3 can ping each other.
PC2 and PC3 can ping each other.
----End
Configuration Files
Configuration file of the Switch
#
sysname Quidway
#
interface Ethernet0/0/1
port-isolate enable group 1
#
interface Ethernet0/0/2
port-isolate enable group 1
#
interface Ethernet0/0/3
#
return
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 1 Ethernet Interface Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
15
2 Link Aggregation Configuration
About This Chapter
This chapter describes the concepts, configuration procedures, and configuration examples of
link aggregation.
2.1 Introduction to Link Aggregation
This section describes the concept of link aggregation.
2.2 Link Aggregation Supported by the S3700
This section describes link aggregation features supported by the S3700.
2.3 Configuring Link Aggregation in Manual Load Balancing Mode
This section describes how to configure link aggregation in manual load balancing mode.
2.4 Configuring Link Aggregation in Static LACP Mode
This section describes how to configure link aggregation in static LACP mode.
2.5 Configuring an E-Trunk
As an extension to the Link Aggregation Protocol (LACP) that implements link aggregation on
a single device, the Enhanced Trunk (E-Trunk) protocol implements link aggregation between
different devices. This improves link reliability between devices.
2.6 Maintaining Link Aggregation
This section describes how to clear the statistics of received and sent LACP packets, debug the
link aggregation group, and monitor the running status of the link aggregation group.
2.7 Configuration Examples
This section provides several configuration examples of link aggregation in manual load
balancing mode and in static LACP mode.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
16
2.1 Introduction to Link Aggregation
This section describes the concept of link aggregation.
Link aggregation refers to a method of bundling a group of physical interfaces into a logical
interface to increase bandwidth. It is also called multi-interface load sharing group or link
aggregation group. For details, refer to IEEE802.3ad.
By setting up a link aggregation group between two devices, you can obtain higher bandwidth
and reliability. Link aggregation provides redundancy protection for communication among
devices without upgrading the hardware.
2.2 Link Aggregation Supported by the S3700
This section describes link aggregation features supported by the S3700.
Manual Load Balancing Mode
In load balancing mode, you can manually add member interfaces to the link aggregation group.
All the interfaces configured with load balancing are in forwarding state. The S3700 can perform
load balancing based on destination MAC addresses, source MAC addresses, source MAC
address exclusive-or destination MAC address, source IP addresses, destination IP addresses,
source address exclusive-or destination IP address.
You must set up the Eth-Trunk and add an interface to the Eth-Trunk manually. The Link
Aggregation Control Protocol (LACP) is not used.
The manual load balancing mode is usually used when the peer device does not support LACP.
Static LACP Mode
The static LACP mode is a link aggregation mode in which the two parties negotiate aggregation
parameters by exchanging LACP packets. After the negotiation, the two parties determine the
active interface and the inactive interface. In static LACP mode, you need to create an Eth-Trunk
manually and add members to the Eth-Trunk. The active interfaces and inactive interfaces are
determined by LACP negotiation.
The static LACP mode is also called the M:N mode. In this mode, links can implement load
balancing and redundancy at the same time. In a link aggregation group, M links are active and
they forward data in load balancing mode. N links are inactive and they function as backup links.
The backup links do not forward data. When an active link fails, the backup link with the highest
priority replaces the failed link to forward data and its status changes to active.
In static LACP mode, some links function as backup links. In manual load balancing mode, all
member interfaces work in forwarding state to share the traffic. This is the main difference
between the two modes.
Link aggregation can also be implemented in dynamic LACP mode. In dynamic LACP mode,
LACP creates the Eth-Trunk and adds member interfaces automatically without human
intervention. This mode is easy for users, but is too flexible and hard for management; therefore,
the S3700 does not support dynamic LACP mode.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
17
Active Interface and Inactive Interface
Active interfaces refer to the interfaces that are in active state and are responsible for forwarding
data. The interfaces that do not forward data and are in inactive state are called inactive interfaces.
According to the operation modes, active and inactive interfaces are classified as follows:
l Manual load balancing mode: Generally, all member interfaces are active interfaces unless
a fault occurs on these interfaces.
l Static LACP mode: The interfaces connected to M links are active interfaces that are
responsible for forwarding data; the interfaces connected to N links are inactive interfaces
that are used for redundancy backup.
Actor and Partner
In static LACP mode, the device in the link aggregation group with a higher LACP priority is
the Actor and the device with a lower LACP priority is the Partner.
If the two devices have the same LACP priority, the Actor is selected based on the MAC
addresses of the devices. The device with a smaller MAC address becomes the Actor.
Differentiating the Actor and the Partner is to keep the active interfaces of devices at both ends
consistent. If the devices at both ends select active interfaces according to the priority of their
own interfaces, the active interfaces may be 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. Figure 2-1 shows the process of selecting active interfaces.
Figure 2-1 Determining the active links in static LACP mode
SwitchA SwitchB
SwitchB SwitchA
The Actor determines
the active link
Device with high
priority
Device with low
priority
Active interface selected by SwitchA
Active interface selected by SwitchB
2.3 Configuring Link Aggregation in Manual Load
Balancing Mode
This section describes how to configure link aggregation in manual load balancing mode.
2.3.1 Establishing the Configuration Task
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
18
Applicable Environment
When the bandwidth or the reliability of two devices should be increased and either of the two
devices does not support LACP, you should create an Eth-Trunk in manual load balancing mode
on Switches and add member interfaces to the Eth-Trunk to increase the bandwidth and improve
reliability of devices.
As shown in Figure 2-2, Eth-Trunks are created between SwitchA and SwitchB.
Figure 2-2 Networking diagram for configuring link aggregation in load balancing mode
SwitchA SwitchB
Eth-Trunk
Eth-Trunk 1 Eth-Trunk 1
Pre-configuration Tasks
Before configuring an Eth-Trunk in manual load balancing mode, complete the following tasks:
l Powering on the S3700
l Creating the Eth-Trunks
Data Preparation
To configure an Eth-Trunk in manual load balancing mode, you need the following data.
No. Data
1 Number of the Eth-Trunk in manual load balancing mode
2 Type and number of the member interface
2.3.2 Configuring the Eth-Trunk to Work in Manual Load Balancing
Mode
Context
NOTE
Check whether the Eth-Trunk contains member interfaces before you configure the operation mode of the
Eth-Trunk. If the Eth-Trunk contains member interfaces, the operation mode of the Eth-Trunk cannot be
changed. To delete member interfaces from the Eth-Trunk, run the undo eth-trunk command in the
interface view or run the undo trunkport interface-type interface-number command in the Eth-Trunk
view.
Do as follows on the S3700 where you need to configure an Eth-Trunk in manual load balancing
mode.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
19
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:
mode manual load-balance
The operation mode of the Eth-Trunk is set to load balancing.
By default, an Eth-Trunk works in manual load balancing mode.
If the local device is configured with the Eth-Trunk in manual load balancing mode, you need
to configure the Eth-Trunk in manual load balancing mode on the peer device.
----End
2.3.3 Adding Member Interfaces to an Eth-Trunk
Context
Do as follows on the S3700 where you need to configure member interfaces of 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:
trunkport interface-type { interface-number1 [ to interface-number2 ] }
&<1-8>
Member interfaces are added to the Eth-Trunk.
l Configuration in the member interface view
1. Run:
system-view
The system view is displayed.
2. Run:
interface interface-type interface-number
The interface view is displayed.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
20
3. Run:
eth-trunk trunk-id
The interface is added to the Eth-Trunk.
When adding an interface to an Eth-Trunk, pay attention to the following points:
An Eth-Trunk contains a maximum of eight member interfaces.
A member interface cannot be configured with any service or static MAC address.
When adding an interface to an Eth-Trunk, ensure that the interface is a hybrid interface,
which is the default interface type.
An Eth-Trunk cannot be nested, that is, its member interfaces cannot be Eth-Trunk.
An Ethernet interface can be added to only one Eth-trunk interface. To add the Ethernet
interface to another Eth-trunk, delete the Ethernet interface from the current Eth-Trunk
first.
The member interfaces of an Eth-trunk must be of the same type. For example, the FE
interface and the GE interface cannot be added to the same Eth-trunk.
Ethernet interfaces on different LPUs can be added to the same Eth-Trunk.
The peer interface directly connected to the Eth-Trunk on the local end must also be
added to an Eth-Trunk; otherwise, the two ends cannot communicate.
When the rates of member interfaces are different, the interfaces with a smaller rate may
be congested, and packets may be lost.
After an interface is added to an Eth-Trunk, MAC address learning is performed by the
Eth-Trunk rather than the member interfaces.
----End
2.3.4 (Optional) Configuring the Load Balancing Mode
Context
Do as follows on the S3700 where the Eth-Trunk load balancing mode needs to be configured.
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 { dst-ip | dst-mac | src-ip | src-mac | src-dst-ip | src-dst-mac }
The load balancing mode is configured for the Eth-Trunk.
The default load balancing mode of the S3700SI and S3700EI is src-dst-mac; the default load
balancing mode of the S3700HI is src-dst-ip.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
21
The S3700 supports the following load balancing modes:
l dst-ip: load balancing based on the destination IP address. In this mode, the system obtains
the specified three bits from each of the destination IP address and the TCP or UDP port
number in outgoing packets to perform the Exclusive-OR calculation, and then selects the
outgoing interface from the Eth-Trunk table according to the calculation result.
l dst-mac: load balancing based on the destination MAC address. In this mode, the system
obtains the specified three bits from each of the destination MAC address, VLAN ID,
Ethernet type, and incoming interface information to perform the Exclusive-OR calculation,
and then selects the outgoing interface from the Eth-Trunk table according to the calculation
result.
l src-ip: load balancing based on the source IP address. In this mode, the system obtains the
specified three bits from each of the source IP address and the TCP or UDP port number in
incoming packets to perform the Exclusive-OR calculation, and then selects the outgoing
interface from the Eth-Trunk table according to the calculation result.
l src-mac: load balancing based on the source MAC address. In this mode, the system obtains
the specified three bits from each of the source MAC address, VLAN ID, Ethernet type, and
incoming interface information to perform the Exclusive-OR calculation, and then selects
the outgoing interface from the Eth-Trunk table according to the calculation result.
l src-dst-ip: load balancing based on the Exclusive-OR result of the source IP address and
destination IP address. In this mode, the system performs the Exclusive-OR calculation
between the Exclusive-OR results of the dip and dmac modes, and then selects the outgoing
interface from the Eth-Trunk table according to the calculation result.
l src-dst-mac: load balancing based on the Exclusive-OR result of the source MAC address
and destination MAC address. In this mode, the system obtains three bits from each of the
source MAC address, destination MAC address, VLAN ID, Ethernet type, and incoming
interface information to perform the Exclusive-OR calculation, and then selects the outgoing
interface from the Eth-Trunk table according to the calculation result.
Member interfaces of an Eth-Trunk perform per-flow load balancing. The local end and the
remote end can use different load balancing modes, and the load balancing mode on one end
does not affect load balancing on the other end.
----End
2.3.5 (Optional) Limiting the Number of Active Interfaces
Context
Do as follows on the S3700 where you need to limit the number of active interfaces.
Procedure
l Setting the upper threshold of the number of interfaces that determine bandwidth of the
Eth-Trunk
1. Run:
system-view
The system view is displayed.
2. Run:
interface eth-trunk trunk-id
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
22
The Eth-Trunk view is displayed.
3. Run:
max bandwidth-affected-linknumber link-number
The maximum number of interfaces that determine bandwidth of the Eth-Trunk is set.
By default, the maximum number of interfaces that determine bandwidth of the Eth-
Trunk is 8.
NOTE
l The upper threshold the number of interfaces that determine bandwidth of the Eth-Trunk of the
local S3700 and that of the remote S3700 can be different. If the upper thresholds at two ends
are different, the smaller one is used.
l Setting the lower threshold of the number of active interfaces
1. Run:
system-view
The system view is displayed.
2. Run:
interface eth-trunk trunk-id
The Eth-Trunk view is displayed.
3. Run:
least active-linknumber link-number
The lower threshold of the number of active interfaces is set.
By default, the lower threshold of the number of active interfaces is 1.
In manual load balancing mode, you can determine the minimum number of active
interfaces in the Eth-Trunk by setting the lower threshold. If the number of active interfaces
is smaller than the value in manual load balancing mode, the status the Eth-Trunk becomes
Down.
NOTE
l The lower threshold of the number of active interfaces of the local S3700 and that of the remote
S3700 can be different. If the lower thresholds at two ends are different, the larger one is used.
----End
2.3.6 (Optional) Configuring the Load Balancing Mode for
Unknown Unicast Traffic
Context
Do as follows on the S3700 where you need to configure the load balancing mode for unknown
unicast traffic.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
23
Step 2 Run:
unknown-unicast load-balance { dmac | smac | smacxordmac }
The load balancing mode for unknown unicast traffic is configured.
NOTE
The S3700HI does not support the unknown-unicast load-balance command.
----End
2.3.7 Checking the Configuration
Procedure
l Run the display trunkmembership eth-trunk trunk-id command to display the member
interfaces of the Eth-Trunk.
l Run the display eth-trunk trunk-id command to display the load balancing status of the
Eth-Trunk.
----End
2.4 Configuring Link Aggregation in Static LACP Mode
This section describes how to configure link aggregation in static LACP mode.
2.4.1 Establishing the Configuration Task
Applicable Environment
To increase the bandwidth and improve the connection reliability, you can configure a link
aggregation group on two directly connected Switches. The requirements are as follows:
l The links between two devices can implement redundancy backup. When a fault occurs on
some links, the backup links replace the faulty ones to keep data transmission uninterrupted.
l The active links have the load balancing capability.
Figure 2-3 Typical networking of link aggregation in static LACP mode
SwitchB
Eth-Trunk 1
SwitchA
Eth-Trunk 1
Eth-Trunk
Active link
Standby link
Pre-configuration Tasks
Before configuring an Eth-Trunk in static LACP mode, complete the following tasks:
l Powering on the S3700
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
24
l Creating the Eth-Trunk
Data Preparation
To configure an Eth-Trunk in static LACP mode, you need the following data.
No. Data
1 Number of the Eth-Trunk
2 Type and number of the member interface
3 Maximum number of active interfaces
2.4.2 Configuring the Eth-Trunk to Work in Static LACP Mode
Context
NOTE
Check whether the Eth-Trunk contains member interfaces before you configure the operation mode of the
Eth-Trunk. If the Eth-Trunk contains member interfaces, the operation mode of the Eth-Trunk cannot be
changed. To delete member interfaces from the Eth-Trunk, run the undo eth-trunk command in the
interface view or run the undo trunkport interface-type interface-number command in the Eth-Trunk
view.
Do as follows on the S3700 where you need to configure an Eth-Trunk of static LACP mode.
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:
bpdu enable
The Eth-Trunk member interfaces are configured to send received BPDUs to the CPU.
Step 4 Run:
mode lacp-static
The Eth-Trunk is configured to work in static LACP mode.
By default, an Eth-Trunk works in manual load balancing mode.
If the local device is configured with an Eth-Trunk of static LACP mode, you must configure
the Eth-Trunk of static LACP mode on the peer device.
----End
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
25
2.4.3 Adding Member Interfaces to an Eth-Trunk
Context
Do as follows on the S3700 where you need to configure member interfaces of 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:
trunkport interface-type { interface-number1 [ to interface-number2 ] }
&<1-8>
Member interfaces are added to the Eth-Trunk.
l Configuration in the member interface view
1. Run:
system-view
The system view is displayed.
2. Run:
interface interface-type interface-number
The interface view is displayed.
3. Run:
eth-trunk trunk-id
The interface is added to the Eth-Trunk.
When adding an interface to an Eth-Trunk, pay attention to the following points:
An Eth-Trunk contains a maximum of eight member interfaces.
A member interface cannot be configured with any service or static MAC address.
When adding an interface to an Eth-Trunk, ensure that the interface is a hybrid interface,
which is the default interface type.
An Eth-Trunk cannot be nested, that is, its member interfaces cannot be Eth-Trunk.
An Ethernet interface can be added to only one Eth-Trunk interface. To add the Ethernet
interface to another Eth-Trunk, delete the Ethernet interface from the current Eth-Trunk
first.
The member interfaces of an Eth-Trunk must be of the same type. For example, the FE
interface and the GE interface cannot be added to the same Eth-Trunk.
Ethernet interfaces on different LPUs can be added to the same Eth-Trunk.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
26
The peer interface directly connected to the Eth-Trunk on the local end must also be
added to an Eth-Trunk; otherwise, the two ends cannot communicate.
When the rates of member interfaces are different, the interfaces with a smaller rate may
be congested, and packets may be lost.
After an interface is added to an Eth-Trunk, MAC address learning is performed by the
Eth-Trunk rather than the member interfaces.
----End
2.4.4 (Optional) Configuring the Load Balancing Mode
Context
Do as follows on the S3700 where you need to configure the Eth-Trunk load balancing mode.
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 { dst-ip | dst-mac | src-ip | src-mac | src-dst-ip | src-dst-mac }
The load balancing mode is configured for the Eth-Trunk.
The default load balancing mode of the S3700SI and S3700EI is src-dst-mac; the default load
balancing mode of the S3700HI is src-dst-ip.
The S3700 supports the following load balancing modes:
l dst-ip: load balancing based on the destination IP address. In this mode, the system obtains
the specified three bits from each of the destination IP address and the TCP or UDP port
number in outgoing packets to perform the Exclusive-OR calculation, and then selects the
outgoing interface from the Eth-Trunk table according to the calculation result.
l dst-mac: load balancing based on the destination MAC address. In this mode, the system
obtains the specified three bits from each of the destination MAC address, VLAN ID,
Ethernet type, and incoming interface information to perform the Exclusive-OR calculation,
and then selects the outgoing interface from the Eth-Trunk table according to the calculation
result.
l src-ip: load balancing based on the source IP address. In this mode, the system obtains the
specified three bits from each of the source IP address and the TCP or UDP port number in
incoming packets to perform the Exclusive-OR calculation, and then selects the outgoing
interface from the Eth-Trunk table according to the calculation result.
l src-mac: load balancing based on the source MAC address. In this mode, the system obtains
the specified three bits from each of the source MAC address, VLAN ID, Ethernet type, and
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
27
incoming interface information to perform the Exclusive-OR calculation, and then selects
the outgoing interface from the Eth-Trunk table according to the calculation result.
l src-dst-ip: load balancing based on the Exclusive-OR result of the source IP address and
destination IP address. In this mode, the system performs the Exclusive-OR calculation
between the Exclusive-OR results of the dip and dmac modes, and then selects the outgoing
interface from the Eth-Trunk table according to the calculation result.
l src-dst-mac: load balancing based on the Exclusive-OR result of the source MAC address
and destination MAC address. In this mode, the system obtains three bits from each of the
source MAC address, destination MAC address, VLAN ID, Ethernet type, and incoming
interface information to perform the Exclusive-OR calculation, and then selects the outgoing
interface from the Eth-Trunk table according to the calculation result.
Member interfaces of an Eth-Trunk perform per-flow load balancing. The local end and the
remote end can use different load balancing modes, and the load balancing mode on one end
does not affect load balancing on the other end.
----End
2.4.5 (Optional) Limiting the Number of Active Interfaces
Context
Do as follows on the S3700 where you need to limit the number of active interfaces.
Procedure
l Setting the upper threshold of the number of active interfaces
1. Run:
system-view
The system view is displayed.
2. Run:
interface eth-trunk trunk-id
The Eth-Trunk view is displayed.
3. Run:
max active-linknumber link-number
The upper threshold of the number of active interfaces is set.
By default, the upper threshold of the number of active interfaces is 8.
In static LACP mode, you can limit the maximum number (M) of active interfaces in the
Eth-Trunk by setting the upper threshold. The other member interfaces function as backup.
If the upper threshold is not set, up to eight interfaces in the Eth-Trunk can be active.
NOTE
l The upper threshold of the number of active interfaces should not be smaller the lower threshold
for the number of active interfaces.
l The upper threshold of the number of active interfaces of the local S3700 and that of the remote
S3700 can be different. If the upper thresholds at two ends are different, the smaller one is used.
l Setting the lower threshold of the number of active interfaces
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
28
1. Run:
system-view
The system view is displayed.
2. Run:
interface eth-trunk trunk-id
The Eth-Trunk view is displayed.
3. Run:
least active-linknumber link-number
The lower threshold of the number of active interfaces is set.
By default, the lower threshold of the number of active interfaces is 1.
In static LACP mode, you can determine the minimum number of active interfaces in the
Eth-Trunk by setting the lower threshold. If the number of active interfaces is smaller than
the value in static mode, the status of the Eth-Trunk becomes Down.
NOTE
l The lower threshold of the number of active interfaces should not be larger than the upper
threshold of the number of active interfaces.
l The lower threshold of the number of active interfaces of the local S3700 and that of the remote
S3700 can be different. If the lower thresholds at two ends are different, the larger one is used.
----End
2.4.6 (Optional) Setting the LACP Priority of the System
Context
Do as follows on the S3700 where you need to set the LACP priority of the system.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
lacp priority priority
The system LACP priority of the S3700 is set.
The smaller the LACP priority value of the system is, the higher the priority is. By default, the
LACP priority of the system is 32768.
The end of a smaller priority value functions as the Actor. If the two ends have the same priority,
the end with a smaller MAC address functions as the Actor.
----End
2.4.7 (Optional) Setting the LACP Priority of an Interface
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
29
Context
Perform the following steps on the S3700.
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 interface is set.
By default, the interface LACP priority is 32768. A smaller priority value indicates a higher
LACP priority.
----End
2.4.8 (Optional) Enabling LACP Preemption and Setting the Delay
for LACP Preemption
Context
Do as follows on the S3700 where you need to enable LACP preemption mode and set the delay
for LACP preemption.
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.
By default, the LACP preemption function is disabled.
NOTE
To ensure normal running of an Eth-Trunk, it is recommended that you enable or disable LACP preemption
on both ends of the Eth-Trunk.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
30
Step 4 Run:
lacp preempt delay delay-time
The delay for LACP preemption on the Eth-Trunk is set.
By default, the delay for LACP preemption is 30 seconds.
Enabling the LACP preemption function ensures that the interface with the highest LACP
priority can be an active interface. For example, when an interface with the highest priority
becomes inactive due to a failure, and then recovers, the interface can become an active interface
if the LACP preemption function is enabled; if the LACP preemption function is disabled, the
interface cannot become an active interface again.
The delay for LACP preemption refers to the period in which an inactive interface of the Eth-
Trunk in static LACP mode waits before it becomes active.
----End
2.4.9 (Optional) Setting the Timeout Interval for Receiving LACP
Packets
Context
Do as follows on the S3700 where you need to set the timeout interval for receiving LACP
packets.
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 for receiving LACP protocol packets the Eth-Trunk is set.
NOTE
l After the lacp timeout command is used, the local end informs the peer end of the timeout interval
through LACP packets. If the fast is selected, the interval for sending LACP packets is 1 second. If
the slow keyword is selected, the interval for sending LACP packets is 30 seconds.
l The timeout interval for receiving LACP packets is three times the interval for sending LACP packets.
That is, when the fast keyword is used, the timeout interval for receiving LACP packets is 3s; when
the slow keyword is used, the timeout interval for receiving LACP packets is 90s.
l You can select different keywords on the two ends. To facilitate the maintenance, however, it is
recommended that you select the same keyword on both ends.
----End
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
31
2.4.10 (Optional) Configuring the Load Balancing Mode for
Unknown Unicast Traffic
Context
Do as follows on the S3700 where you need to configure the load balancing mode for unknown
unicast traffic.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
unknown-unicast load-balance { dmac | smac | smacxordmac }
The load balancing mode for unknown unicast traffic is configured.
NOTE
The S3700HI does not support the unknown-unicast load-balance command.
----End
2.4.11 Checking the Configuration
Procedure
l Run the display trunkmembership eth-trunk trunk-id command to display the member
interfaces of the Eth-Trunk.
l Run the display eth-trunk [ trunk-id [interface interface-type interface-number ] ]
command to display information about the Eth-Trunk and member interfaces.
----End
2.5 Configuring an E-Trunk
As an extension to the Link Aggregation Protocol (LACP) that implements link aggregation on
a single device, the Enhanced Trunk (E-Trunk) protocol implements link aggregation between
different devices. This improves link reliability between devices.
2.5.1 Establishing the Configuration Task
Before configuring an E-Trunk, familiarize yourself with the applicable environment, complete
the pre-configuration tasks, and obtain the data required for the configuration. This will help
you complete the configuration task quickly and accurately.
Applicable Environment
As shown in Figure 2-4, the E-Trunk is used to protect the links between a CE and two PEs
when the CE is dual-homed to the two PEs. The CE is connected to PE1 and PE2 through a static
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
32
LACP Eth-Trunk respectively. The two Eth-Trunks form an E-Trunk to implement backup of
link aggregation groups between PE1 and PE2, enhancing the network reliability.
Figure 2-4 Networking diagram of the E-Trunk
PE1
PE2
CE
E
t
h
-
T
r
u
n
k
1
E
th
-
T
r
u
n
k
2
E-Trunk1 Network
NOTE
Only the S3700HI supports the E-Trunk function.
Pre-configuration Tasks
Before configuring an E-Trunk, complete the following tasks:
l Connecting physical links between devices correctly
l Configuring static LACP Eth-Trunk interfaces
Data Preparation
To configure an E-Trunk, you need the following data.
No. Data
1 LACP system ID and priority
2 ID and priority of the E-Trunk
3 Interface numbers and working modes of the Eth-Trunks
4 Local and peer IP addresses
5 Encrypted password
6 Interval for sending hello packets and time multiplier for detecting hello packets
2.5.2 Setting the LACP System ID and LACP Priority of an E-Trunk
In an E-Trunk, the two PEs must be configured with the same LACP system ID and priority so
that the CE considers the two PEs as one device.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
33
Context
Do as follows on the member devices of the E-Trunk.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
lacp e-trunk system-id mac-address
The LACP system ID is set for the E-Trunk.
By default, the MAC address of Ethernet interface on the MPU is used as the LACP system ID
a device.
The master and backup devices in an E-Trunk must use the same LACP system ID.
Step 3 Run:
lacp e-trunk priority priority
The LACP priority of the E-Trunk member is set.
By default, the LACP priority of an E-Trunk is 32768.
The master and backup devices in an E-Trunk must use the same LACP priority.
----End
2.5.3 Creating an E-Trunk and Setting Its Priority
The E-Trunk priority determines whether a device in the E-Trunk is the master device or the
standby device.
Context
Do as follows on the member devices of the E-Trunk.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
e-trunk e-trunk-id
An Eth-Trunk is created.
If the specified E-Trunk already exists, the E-Trunk view is displayed directly.
The member devices in an E-Trunk must be configured with the same E-Trunk ID.
At most 16 E-Trunks can be created on a device.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
34
Step 3 Run:
priority priority
The priority of the E-Trunk is set.
The E-Trunk priority is applied to master/backup negotiation between two devices. The device
of higher priority is the master. A smaller priority value indicates a higher priority.
If the priorities of two devices are the same, the device with the smaller system ID is the master.
By default, the priority of an E-Trunk is 100.
----End
2.5.4 Configuring Local and Peer IP Addresses of an E-Trunk
E-Trunk packets are sent through the local IP address and port configured on the local device.
When changing the local IP address or peer IP address on a device, you must change the
corresponding address on the peer device. Otherwise, LACP packets are discarded.
Context
Do as follows on the member devices of the E-Trunk.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
e-trunk e-trunk-id
The E-Trunk view is displayed.
Step 3 Run:
peer-address peer-ip-address source-address source-ip-address
The local and peer IP addresses of the E-Trunk are configured.
The peer IP address of the local device is the local IP address of the peer device. For example,
an E-Trunk is set up between device A and device B. On device A, the peer IP address is 2.2.2.2
and the local IP address is 1.1.1.1. Then, on device B, the peer IP address is 1.1.1.1 and the local
IP address is 2.2.2.2.
----End
2.5.5 Binding an E-Trunk to a BFD Session
If the local device in an E-Trunk cannot detect whether the peer device is faulty by sending E-
Trunk packets, it can use the Bidirectional Fast Detection (BFD) protocol to detect faults on the
peer device. Each E-Trunk needs to be configured with a peer IP address. You can create a BFD
session to check whether the route to the peer is reachable. The E-Trunk can detect faults reported
by the BFD session and handles the faults quickly.
Do as follows on the member devices of the E-Trunk.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
35
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
e-trunk e-trunk-id
The E-Trunk view is displayed.
Step 3 Run:
e-trunk track bfd-session session-id
The E-Trunk is bound to a BFD session.
BFD sessions are used to fast detect the fault of the control link between the two devices of the
E-Trunk.
----End
2.5.6 Adding an Eth-Trunk to an E-Trunk
After configuring an E-Trunk, you must add Eth-Trunks to the E-Trunk to implement link
aggregation between the two devices. In this manner, backup of aggregation groups is
implemented between devices and the network reliability is enhanced.
Context
Do as follows on the member devices of the E-Trunk.
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.
Only static LACP Eth-Trunks can be added to an E-Trunk.
Step 3 Run:
e-trunk e-trunk-id
The Eth-Trunk is added to an E-Trunk.
An Eth-Trunk can be added to only one E-Trunk.
On the two devices in an E-Trunk, the IDs of the Eth-Trunks added to the E-Trunk must be the
same. For example, if you add Eth-Trunk 1 and Eth-Trunk 2 to E-Trunk 1 on device A, you must
also add Eth-Trunk 1 and Eth-Trunk 2 to E-Trunk 1 on device B.
----End
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
36
2.5.7 (Optional) Configuring the Working Mode of an Eth-Trunk in
an E-Trunk
You can configure the working mode of an Eth-Trunk only after adding the Eth-Trunk to an E-
Trunk. The working mode of an Eth-Trunk can be automatic, forced master, or forced backup.
Context
Do as follows on the member devices of the E-Trunk.
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.
Only static LACP Eth-Trunks can be added to an E-Trunk.
Step 3 Run:
e-trunk mode { auto | force-master | force-backup }
The working mode of the Eth-Trunk in the E-Trunk is configured.
By default, an Eth-Trunk works in automatic mode in an E-Trunk.
The e-trunk mode command is valid only for an Eth-Trunk in an E-Trunk. When the Eth-Trunk
exits from the E-Trunk, the configuration is cancelled.
When the Eth-Trunk works in automatic mode, the master/backup status of the Eth-Trunk is
determined by the E-Trunk status of the local device and the fault information of the peer Eth-
Trunk.
l If the local E-Trunk is the master, the local Eth-Trunk works in master state.
l If the local E-Trunk is the backup and the peer Eth-Trunk is faulty, the local Eth-Trunk works
in master state. When the local Eth-Trunk receives the message informing that the peer Eth-
Trunk recovers, the local Eth-Trunk becomes the backup.
When the E-Trunk works properly, changing the interval for sending packets or timeout of hello
packets make the E-Trunk alternate between the master state and the backup state. Therefore, it
is recommended that you set the working mode of a member Eth-Trunk to forcible master/backup
before changing the interval for sending packets or the timeout of hello packets. After new
configurations take effect, you can restore the working mode to automatic.
----End
2.5.8 (Optional) Setting the Password
An encrypted password can be set to enhance the system security. The encrypted passwords set
on the two devices of an E-Trunk must be the same.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
37
Context
You can encrypt the password in plain text or cipher text.
l When the password is encrypted in plain text, it can be displayed in the configuration file.
l When the password is encrypted in cipher text, it is displayed as unidentifiable characters.
Do as follows on the member devices of the E-Trunk.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
e-trunk e-trunk-id
The E-Trunk view is displayed.
Step 3 Run:
security-key { simple simple-key | cipher cipher-key }
The password for encrypting packets is configured.
CAUTION
If simple is selected, the password is saved in the configuration file in plain text. In this case,
users at a lower level can easily obtain the password by viewing the configuration file. This
brings security risks. Therefore, it is recommended that you select cipher to save the password
in cipher text.
----End
2.5.9 (Optional) Setting the Timeout of Hello Packets
If the backup device in an E-Trunk does not receive any hello packet from the peer device within
the timeout interval, it becomes the master device. The timeout interval here refers to the timeout
interval contained in the hello packets sent by the peer device rather than that set on the local
device.
Context
Do as follows on the member devices of the E-Trunk.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
38
e-trunk e-trunk-id
The E-Trunk view is displayed.
Step 3 Run:
timer hello hello-times
The interval for sending Hello packets is set.
By default, the value of hello-times is 10. Since the unit is 100 ms, the interval for sending hello
packets is 1s.
Step 4 Run:
timer hold-on-failure multiplier multiplier
The time multiplier for detecting Hello packets is set.
The peer device checks the timeout interval contained in the received packet to check whether
the local device times out. If the peer device is the backup and does not receive hello packets
from the local device within the timeout interval, the peer device becomes the master.
Timeout interval = Interval for sending hello packets x Time multiplier. It is recommended that
you set the time multiplier to at least 3.
By default, the time multiplier for detecting hello packets is 20.
----End
2.5.10 (Optional) Setting the Revertive Switching Delay
After the revertive switching delay is set, the local Eth-Trunk must wait until the delay timer
times out to become the master again after it recovers from a fault. This delays the revertive
switching of the service traffic, ensuring uninterrupted forwarding of the service traffic.
Context
If an E-Trunk works with other services, after the master device recovers from a fault, the status
of the member Eth-Trunk on the master device may be restored before other services are restored.
If traffic is immediately switched back to the master device, service traffic will be interrupted.
After the revertive switching delay is set, the local Eth-Trunk becomes Up only after the delay
timer times out. Then the local device becomes the master again. This delays the revertive
switching of the service traffic, thus ensuring uninterrupted forwarding of the service traffic.
Do as follows on the member devices of the E-Trunk.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
e-trunk e-trunk-id
The E-Trunk view is displayed.
Step 3 Run:
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
39
timer revert delay delay-value
The revertive switching delay is set.
By default, the revertive switching delay of an E-Trunk is 120 seconds.
----End
2.5.11 Checking the Configuration
After configuring an E-Trunk, you can view information about the E-Trunk, including its
priority, system ID, local IP address, peer IP address, revertive switching delay, master/backup
status, and cause of status change.
Procedure
l Run the display e-trunk e-trunk-id command to view information about the E-Trunk.
----End
2.6 Maintaining Link Aggregation
This section describes how to clear the statistics of received and sent LACP packets, debug the
link aggregation group, and monitor the running status of the link aggregation group.
2.6.1 Clearing Statistics of LACP Packets
Context
CAUTION
The statistics of LACP packets cannot be restored after you clear them. So, confirm the action
before you use the command.
Procedure
l Run the reset lacp statistics eth-trunk [ trunk-id ] command to clear statistics of received
and sent LACP packets.
----End
2.6.2 Debugging the Link Aggregation Group
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
40
Context
CAUTION
Debugging affects the performance of the system. So, after debugging, run the undo debugging
all command to disable it immediately.
When a running fault occurs in the link aggregation group, run the following debugging
commands in the user view to check the debugging information, and locate and analyze the fault.
Procedure
l Run the debugging trunk error command to enable the debugging of Eth-Trunk errors.
l Run the debugging trunk event command to enable the debugging of Eth-Trunk events.
l Run the debugging trunk lacp-pdu command to enable the debugging of LACP packets.
l Run the debugging trunk lagmsg command to enable the debugging of LACP protocol
messages.
l Run the debugging trunk msg command to enable the debugging of Eth-Trunk messages.
l Run the debugging trunk state-machine command to enable the debugging of Eth-Trunk
status machine.
l Run the debugging trunk updown command to enable the debugging of Eth-Trunk Up
and Down messages.
l Run the debugging trunk command to enable the debugging of Eth-Trunk messages.
----End
2.6.3 Monitoring the Operation Status of the Link Aggregation
Group
Context
During the daily maintenance, you can run the following commands in any view to check the
operation status of the link aggregation group.
Procedure
l Run the display eth-trunk [ trunk-id [ interface interface-type interface-number ] ]
command to display the status of the link aggregation group.
l Run the display lacp statistics eth-trunk [ trunk-id [ interface interface-type interface-
number ] ] command to display the statistics of sent and received LACP packets.
l Run the display trunkmembership eth-trunk trunk-id command to display the member
interfaces of the Eth-Trunk.
----End
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
41
2.7 Configuration Examples
This section provides several configuration examples of link aggregation in manual load
balancing mode and in static LACP mode.
2.7.1 Example for Configuring Link Aggregation in Manual Load
Balancing Mode
Networking Requirements
As shown in Figure 2-5, the Switch is connected to the SwitchA through an Eth-Trunk. The
link between the Switch and SwitchA must ensure high reliability.
Figure 2-5 Networking diagram for configuring link aggregation in manual load balancing mode
Switch
Eth-Trunk 1
LAN Switch
GE0/0/1
VLAN 100-150
E
t
h
-
T
r
u
n
k
Eth-Trunk 1
GE0/0/3 GE0/0/4
GE0/0/2
VLAN 151-200
SwitchA
LAN Switch
Configuration Roadmap
The configuration roadmap is as follows:
1. Create an Eth-Trunk.
2. Add member interfaces to the Eth-Trunk.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
42
Data Preparation
To complete the configuration, you need the following data:
l Number of the Eth-Trunk
l Types and numbers of the member interfaces in the Eth-Trunk
Procedure
Step 1 Create an Eth-Trunk.
# Create Eth-Trunk 1.
<Quidway> system-view
[Quidway] sysname Switch
[Switch] interface eth-trunk 1
[Switch-Eth-Trunk1] quit
Step 2 Add member interfaces to the Eth-Trunk.
# Add Eth 0/0/3 to Eth-Trunk 1.
[Switch] interface ethernet 0/0/3
[Switch-Ethernet0/0/3] eth-trunk 1
[Switch-Ethernet0/0/3] quit
# Add Eth 0/0/4 to Eth-Trunk 1.
[Switch] interface ethernet 0/0/4
[Switch-Ethernet0/0/4] eth-trunk 1
[Switch-Ethernet0/0/4] quit
Step 3 Configure Eth-Trunk 1.
# Configure Eth-Trunk 1 to allow packets of VLANs 100 to 200 to pass through.
[Switch] interface eth-trunk 1
[Switch-Eth-Trunk1] port link-type trunk
[Switch-Eth-Trunk1] port trunk allow-pass vlan 100 to 200
[Switch-Eth-Trunk1] quit
Step 4 Verify the configuration.
Run the display trunkmembership command in any view to check whether Eth-Trunk 1 is
created and whether member interfaces are added.
[Switch] display trunkmembership eth-trunk 1
Trunk ID: 1
used status: VALID
TYPE: ethernet
Working Mode : Normal
Number Of Ports in Trunk = 2
Number Of UP Ports in Trunk = 2
operate status: up
Interface Ethernet0/0/3, valid, operate up, weight=1,
Interface Ethernet0/0/4, valid, operate up, weight=1,
# Display the configuration of Eth-Trunk 1.
[Switch] display eth-trunk 1
Eth-Trunk1's state information is:
WorkingMode: NORMAL Hash arithmetic: According to SA-XOR-DA
Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 8
Operate status: up Number Of Up Port In Trunk: 2
--------------------------------------------------------------------------------
PortName Status Weight
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
43
Ethernet0/0/3 Up 1
Ethernet0/0/4 Up 1
The preceding information indicates that Eth-Trunk 1 consists of member interfaces Eth 0/0/3
and Eth 0/0/4. The member interfaces are both in Up state.
----End
Configuration Files
Configuration file of the Switch
#
sysname Switch
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 100 to 200
#
interface Ethernet0/0/3
eth-trunk 1
#
interface Ethernet0/0/4
eth-trunk 1
#
return
2.7.2 Example for Configuring Link Aggregation in Static LACP
Mode
Networking Requirements
To improve the bandwidth and the connection reliability, configure the link aggregation group
on two directly connected Switches, as shown in Figure 2-6. The requirements are as follows:
l M active links can implement load balancing.
l N links between two Switches can carry out redundancy backup. When a fault occurs on
an active link, the backup link replaces the faulty link to keep the reliability of data
transmission.
Figure 2-6 Networking diagram for configuring link aggregation in static LACP mode
SwitchB
Eth-Trunk 1
SwitchA
Eth-Trunk 1
Eth-Trunk
Active link
Backup link
Eth 0/0/1
Eth 0/0/2
Eth 0/0/3
Eth 0/0/2
Eth 0/0/1
Eth 0/0/3
Configuration Roadmap
The configuration roadmap is as follows:
1. Create an Eth-Trunk on the Switch and configure the Eth-Trunk to work in static LACP
mode.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
44
2. Add member interfaces to the Eth-Trunk.
3. Set the system priority and determine the Actor.
4. Set the upper threshold of the active interfaces.
5. Set the priority of the interface and determine the active link.
Data Preparation
To complete the configuration, you need the following data:
l Numbers of the link aggregation groups on the Switches
l System priority of SwitchA
l Upper threshold of active interfaces
l LACP priority of the active interface
Procedure
Step 1 Create Eth-Trunk 1 and set the load balancing mode of the Eth-Trunk to static LACP mode.
# Configure SwitchA.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] interface eth-trunk 1
[SwitchA-Eth-Trunk1] bpdu enable
[SwitchA-Eth-Trunk1] mode lacp-static
[SwitchA-Eth-Trunk1] quit
# Configure SwitchB.
<Quidway> system-view
[Quidway] sysname SwitchB
[SwitchB] interface eth-trunk 1
[SwitchB-Eth-Trunk1] bpdu enable
[SwitchB-Eth-Trunk1] mode lacp-static
[SwitchB-Eth-Trunk1] quit
Step 2 Add member interfaces to the Eth-Trunk.
# Configure SwitchA.
[SwitchA] interface ethernet 0/0/1
[SwitchA-Ethernet0/0/1] eth-trunk 1
[SwitchA-Ethernet0/0/1] quit
[SwitchA] interface ethernet 0/0/2
[SwitchA-Ethernet0/0/2] eth-trunk 1
[SwitchA-Ethernet0/0/2] quit
[SwitchA] interface ethernet 0/0/3
[SwitchA-Ethernet0/0/3] eth-trunk 1
[SwitchA-Ethernet0/0/3] quit
# Configure SwitchB.
[SwitchB] interface ethernet 0/0/1
[SwitchB-Ethernet0/0/1] eth-trunk 1
[SwitchB-Ethernet0/0/1] quit
[SwitchB] interface ethernet 0/0/2
[SwitchB-Ethernet0/0/2] eth-trunk 1
[SwitchB-Ethernet0/0/2] quit
[SwitchB] interface ethernet 0/0/3
[SwitchB-Ethernet0/0/3] eth-trunk 1
[SwitchB-Ethernet0/0/3] quit
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
45
Step 3 Set the system priority on SwitchA to 100 so that SwitchA becomes the Actor.
[SwitchA] lacp priority 100
Step 4 Set the upper threshold M of active interfaces on SwitchA to 2.
[SwitchA] interface eth-trunk 1
[SwitchA-Eth-Trunk1] max active-linknumber 2
[SwitchA-Eth-Trunk1] quit
Step 5 Set the priority of the interface and determine active links on SwitchA.
[SwitchA] interface ethernet 0/0/1
[SwitchA-Ethernet0/0/1] lacp priority 100
[SwitchA-Ethernet0/0/1] quit
[SwitchA] interface ethernet 0/0/2
[SwitchA-Ethernet0/0/2] lacp priority 100
[SwitchA-Ethernet0/0/2] quit
Step 6 Verify the configuration.
# Check information about the Eth-Trunk of the Switches and check whether the negotiation is
successful on the link.
[SwitchA] display eth-trunk 1
Eth-Trunk1's state information is:
Local:
LAG ID: 1 WorkingMode: STATIC
Preempt Delay: Disabled Hash arithmetic: According to SA-XOR-DA
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
Ethernet0/0/1 Selected 100M 100 6145 2865 11111100
1
Ethernet0/0/2 Selected 100M 100 6146 2865 11111100
1
Ethernet0/0/3 Unselect 100M 32768 6147 2865 11100000
1
Partner:
------------------------------------------------------------------------------
PartnerPortName SysPri SystemID PortPri PortNo PortKey PortState
Ethernet0/0/1 32768 00e0-fca6-7f85 32768 6145 2609 11111100
Ethernet0/0/2 32768 00e0-fca6-7f85 32768 6146 2609 11111100
Ethernet0/0/3 32768 00e0-fca6-7f85 32768 6147 2609 11110000
[SwitchB] display eth-trunk 1
Eth-Trunk1's state information is:
Local:
LAG ID: 1 WorkingMode: STATIC
Preempt Delay: Disabled Hash arithmetic: According to SA-XOR-DA
System Priority: 32768 System ID: 00e0-fca6-7f85
Least Active-linknumber: 1 Max Active-linknumber: 8
Operate status: Up Number Of Up Port In Trunk: 2
------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState
Weight
Ethernet0/0/1 Selected 100M 32768 6145 2609 11111100
1
Ethernet0/0/2 Selected 100M 32768 6146 2609 11111100
1
Ethernet0/0/3 Unselect 100M 32768 6147 2609 11100000
1
Partner:
------------------------------------------------------------------------------
PartnerPortName SysPri SystemID PortPri PortNo PortKey
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
46
PortState
Ethernet0/0/1 100 00e0-fca8-0417 100 6145 2865
11111100
Ethernet0/0/2 100 00e0-fca8-0417 100 6146 2865
11111100
Ethernet0/0/3 100 00e0-fca8-0417 32768 6147 2865
11110000
The preceding information shows that the system priority of SwitchA is 100 and it is higher than
the system priority of SwitchB. Member interfaces Eth0/0/1 and Eth0/0/2 become the active
interfaces and are in Selected state. Interface Eth0/0/3 is in Unselect state. M active links work
in load balancing mode and N links are the backup links.
----End
Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
lacp priority 100
#
interface Eth-Trunk1
mode lacp-static
max active-linknumber 2
#
interface Ethernet0/0/1
eth-trunk 1
lacp priority 100
#
interface Ethernet0/0/2
eth-trunk 1
lacp priority 100
#
interface Ethernet0/0/3
eth-trunk 1
#
return
l Configuration file of SwitchB
#
sysname SwitchB
#
interface Eth-Trunk1
mode lacp-static
#
interface Ethernet0/0/1
eth-trunk 1
#
interface Ethernet0/0/2
eth-trunk 1
#
interface Ethernet0/0/3
eth-trunk 1
#
return
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 2 Link Aggregation Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
47
3 VLAN Configuration
About This Chapter
Virtual Local Area Networks (VLANs) have advantages of broadcast domain isolation, security
enhancement, flexible networking, and good extensibility.
3.1 Introduction
The VLAN technology is important for forwarding on Layer 2 networks. This section describes
the background, functions, and advantages of the VLAN technology.
3.2 VLAN Features Supported by the S3700
This section describes VLAN features supported by the S3700 to help you understand VLAN
configurations.
3.3 Dividing a LAN into VLANs
A LAN can be divided into several VLANs and users in each VLAN can communicate with
each other. Currently, the S3700 supports several VLAN division modes. You can choose one
of them as required.
3.4 Creating a VLANIF Interface
VLANIF interfaces are Layer 3 logical interfaces. After creating VLANIF interfaces on Layer
2 devices, you can configure Layer 3 features on these interfaces.
3.5 Configuring Inter-VLAN Communication
Configuring inter-VLAN communication allows users in different VLANs to communicate with
each other. Currently, the S3700 supports several inter-VLAN communication schemes. Choose
one of them as required.
3.6 Configuring VLAN Aggregation to Save IP Addresses
VLAN aggregation prevents the waste of IP addresses and implements inter-VLAN
communication.
3.7 Configuring a MUX VLAN to Separate Layer 2 Traffic
Configuring a MUX VLAN allows users in different VLANs to communicate with each other,
and separates users in a certain VLAN.
3.8 Configuring a Voice VLAN to Transmit Voice Data
A voice VLAN is used to transmit voice data.
3.9 Configuring an mVLAN to Implement Integrated Management
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
48
Configuring an mVLAN allows users to use the IP address of the VLANIF interface
corresponding to the mVLAN to log in to a management switch to manage devices attached to
the switch.
3.10 Maintaining VLAN
A command of clearing statistics helps to locate the faults in a VLAN.
3.11 Configuration Examples
This section provides several examples of VLAN configuration.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
49
3.1 Introduction
The VLAN technology is important for forwarding on Layer 2 networks. This section describes
the background, functions, and advantages of the VLAN technology.
Overview of VLAN
The Ethernet technology is for sharing communication mediums and data based on the Carrier
Sense Multiple Access/Collision Detect (CSMA/CD). If there are a large number of PCs on an
Ethernet network, collision becomes a serious problem and can lead to broadcast storms. As a
result, network performance deteriorates. This can even cause the Ethernet network to become
unavailable. Switches can be used to interconnect local area networks (LANs). Switches forward
information received by inbound ports to specified outbound ports, thereby preventing access
collision in a shared medium. If no specified outbound port is found for information received
by an inbound port, the switch will forward the information from all ports except the inbound
port. This forms a broadcast domain.
To prevent broadcast domains from being too broad and causing problems, you can divide a
network into segments. In this manner, a large broadcast domain is divided into multiple small
broadcast domains to confine the possible scope of broadcast packets. Routers can be deployed
at the network layer to separate broadcast domains, but this method has disadvantages, which
include: complex network planning, inflexible networking, and high levels of expenditure. The
Virtual Local Area Network (VLAN) technology can divide a large Layer 2 network into
broadcast domains to prevent broadcast storms and protect network security.
Definition of VLAN
The VLAN technology is used to divide a physical LAN into multiple logical broadcast domains,
each of which is called a VLAN. Each VLAN contains a group of PCs that have the same
requirements. A VLAN has the same attributes as a LAN. PCs of a VLAN can be placed on
different LAN segments. If two PCs are located on one LAN segment but belong to different
VLANs, they do not broadcast packets to each other. With VLAN, the broadcast traffic volume
is reduced; fewer devices are required; network management is simplified; and network security
is improved.
Figure 3-1 shows a typical VLAN application. Three switches are placed in different locations,
for example, different stories of an office building. The VLAN technology allows enterprises to
share LAN facilities and ensures information security for each enterprise network.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
50
Figure 3-1 Schematic diagram for a typical VLAN application
VLAN-A
VLAN-B
VLAN-C
Router
Switch1 Switch2 Switch3
This application shows the following VLAN advantages:
l Broadcast domains are confined. A broadcast domain is confined to a VLAN. This saves
bandwidth and improves network processing capabilities.
l Network security is enhanced. Packets from different VLANs are separately transmitted.
PCs in one VLAN cannot directly communicate with PCs in another VLAN.
l Network robustness is improved. A fault in a VLAN does not affect PCs in other VLANs.
l Virtual groups are set up flexibly. With the VLAN technology, PCs in different
geographical areas can be grouped together. This facilitates network construction and
maintenance.
Basic VLAN Concepts and Principles
l 802.1Q and VLAN frame format
A conventional Ethernet frame is encapsulated with the Length/Type field for an upper-
layer protocol following the Destination address and Source address fields, as shown in
Figure 3-2.
Figure 3-2 Conventional Ethernet frame format
2bytes 6bytes 6bytes 46-1500bytes 4bytes
Destination
address
Source
address
Length/Type
Data FCS
IEEE 802.1Q is an Ethernet networking standard for a specified Ethernet frame format. It
adds a 32-bit field between the Source address and the Length/Type fields of the original
frame, as shown in Figure 3-3.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
51
Figure 3-3 802.1Q frame format
2bytes 3bits 12bits 1bit
4bytes 2bytes
802.1Q
Tag
Data FCS
TPID PRI CFI VID
6bytes 6bytes 42-1500bytes 4bytes
Destination
address
Source
address
Length/
Type
Tag Protocol Identifier (TPID): a 16-bit field set to a value of 0x8100 in order to identify
the frame as an IEEE 802.1Q-tagged frame. If an 802.1Q-incapable device receives an
802.1Q frame, it will discard the frame.
Priority (PRI): a 3-bit field which indicates the frame priority. The value ranges from 0
to 7. The greater the value, the higher the priority. These values can be used to prioritize
different classes of traffic to ensure that frames with high priorities are transmitted first
when traffic is heavy.
Canonical Format Indicator (CFI): a 1-bit field. If the value of this field is 1, the MAC
address is in the non-canonical format. If the value is 0, the MAC address is in the
canonical format. CFI is used to ensure compatibility between Ethernet networks and
Token Ring networks. It is always set to zero for Ethernet switches.
VLAN Identifier (VID): a 12-bit field specifying the VLAN to which the frame belongs.
On the S3700, VLAN IDs range from 0 to 4095. The values 0 and 4095 are reserved,
and therefore VLAN IDs range from 1 to 4094.
Each frame sent by an 802.1Q-capable switch carries a VLAN ID. On a VLAN, Ethernet
frames are classified into the following types:
Tagged frames: frames with 32-bits 802.1Q tags.
Untagged frames: frames without 32-bits 802.1Q tags.
l VLAN division methods
Table 3-1 shows VLAN division methods.
Table 3-1 VLAN division methods
VLAN
Division
Method
Definition
Port-based
VLAN division
VLANs are configured based on ports on a switch. For example, ports
1 to 4 on a switch are added to VLAN 2; ports 5 to 8 are added to
VLAN 3.
Ports on different Ethernet switches can be added to one VLAN. For
example, ports 1 to 4 on switch A and ports 3 to 6 on switch B can
be added to the same VLAN.
Each switch maintains a VLAN mapping table that records mappings
between local ports and VLANs.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
52
VLAN
Division
Method
Definition
MAC address-
based VLAN
division
PCs are added to VLANs based on their MAC addresses.
A switch maintains a VLAN mapping table that records mappings
between MAC addresses and VLANs.
IP subnet-based
VLAN division
VLANs are configured based on IP addresses of PCs. PCs belonging
to one IP subnet are added to the same VLAN.
A switch maintains a VLAN mapping table that records mappings
between IP subnets and VLANs.
Protocol-based
VLAN division
VLANs are configured based on the Length/Type fields in Layer 2
frames. Currently, IPv4, IPv6, IPX, or AppleTalk can be specified in
the Length/Type field of a Layer 2 frame to indicate the running
network protocol.
A switch maintains a VLAN mapping table that records mappings
between protocols and VLANs.
Policy-based
VLAN division
PCs are added to VLANs based on their MAC and IP addresses.
A switch maintains a VLAN mapping table that records mappings
between MAC addresses, IP addresses, interfaces, and VLANs.
l Type of VLAN links
Figure 3-4 Schematic diagram for VLAN links
Trunk link
CE1 CE2
PC3
VLAN3 VLAN3
PC4
PC1
VLAN2 VLAN2
PC2
3
2
3
2
2
3
Access link
Access link
Trunk link
PE
As shown in Figure 3-4, there are the following types of VLAN links:
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
53
Access link: connects a PC to a switch. Generally, a PC does not know which VLAN
it belongs to, and PC hardware cannot distinguish frames with VLAN tags. Therefore,
PCs send and receive only untagged frames.
Trunk link: connects a switch to another switch or to a router. Data of different VLANs
are transmitted along a trunk link. The two ends of a trunk link must be able to distinguish
frames with VLAN tags. Therefore, only tagged frames are transmitted along trunk
links.
l Port types
Table 3-2 lists VLAN port types.
Table 3-2 Port types
Port
Type
Method of
Processing
Received
Untagged Frames
Method of
Processing
Received
Tagged
Frames
Method of
Sending
Frames
Application
Access
port
Accepts an untagged
frame and adds a tag
with the default
VLAN ID to the
frame.
l Accepts a
tagged
frame if the
VLAN ID
carried in
the frame is
the same as
the default
VLAN ID.
l Discards a
tagged
frame if the
VLAN ID
carried in
the frame is
different
from the
default
VLAN ID.
Removes the tag
from a frame and
sends the frame.
An access port
connects a
switch to a PC
and can be
added to only
one VLAN.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
54
Port
Type
Method of
Processing
Received
Untagged Frames
Method of
Processing
Received
Tagged
Frames
Method of
Sending
Frames
Application
Trunk
port
l Adds a tag with
the default
VLAN ID to an
untagged frame
and accepts the
frame if the port
permits the
default VLAN
ID.
l Adds a tag with
the default
VLAN ID to an
untagged frame
and discards the
frame if the port
denies the default
VLAN ID.
l Accepts a
tagged
frame if the
port permits
the VLAN
ID carried in
the frame.
l Discards a
tagged
frame if the
port denies
the VLAN
ID carried in
the frame.
l Removes the
tag from a
received
frame and
sends the
frame if the
VLAN ID
carried in the
frame is the
same as the
default
VLAN ID
and
permitted by
the port.
l Directly
sends a
received
frame if the
VLAN ID
carried in the
frame is
different
from the
default
VLAN ID
but permitted
by the port.
A trunk port
can be added to
multiple
VLANs to send
and receive
frames for these
VLANs. A
trunk port
connects a
switch to
another switch
or to a router.
Hybrid
port
Sends a received
frame if the port
permits the
VLAN ID
carried in the
frame. A
specified
command can be
used to
determine
whether a hybrid
port sends
frames with or
without tags.
A hybrid port
can be added to
multiple
VLANs to send
and receive
frames for these
VLANs. A
hybrid port can
connect a
switch to a PC
or connect a
network device
to another
network
device.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
55
Port
Type
Method of
Processing
Received
Untagged Frames
Method of
Processing
Received
Tagged
Frames
Method of
Sending
Frames
Application
QinQ
port
QinQ ports are enabled with the IEEE 802.1QinQ protocol. A QinQ port adds
a tag to a single-tagged frame, and thus supports a maximum of 4094 x 4094
VLAN tags, which meets the requirement of a Networkfor the number of
VLANs.
Each access, trunk, hybrid, or QinQ port can be configured with a default VLAN, namely,
the port default VLAN ID (PVID) to specify the VLAN to which the port belongs.
The PVID of an access port indicates the VLAN to which the port belongs.
As a trunk or hybrid port can be added to multiple VLANs, the port must be configured
with PVIDs.
By default, a port is added to VLAN 1.
l Principle for data switching in a VLAN
Use the network shown in Figure 3-4 as an example. If PC 1 in VLAN 2 intends to send
data to PC 2, the data is forwarded as follows:
1. An access port on CE 1 receives an untagged frame from PC 1 and adds a PVID
(VLAN 2) to the frame. CE 1 searches the MAC address table for an outbound port.
Then the frame is transmitted from the outbound port.
NOTE
Assume that VLANs are configured based on MAC addresses. After an access port on CE 1
receives an untagged frame from PC 1, the port checks the VLAN mapping table for a VLAN
ID corresponding to the source MAC address, and adds a tag with the obtained VLAN ID to
the frame.
2. After the trunk port on CE 1 and PE receives the frame, the port checks whether the
VLAN ID carried in the frame is the same as that configured on the port. If the VLAN
ID has been configured on the port, the port transparently transmits the frame to CE
2. If the VLAN ID is not configured on the port, the port discards the frame.
3. After a trunk port on CE 2 receives the frame, the system searches the MAC address
table for an outbound port which connects CE 2 to PC 2.
4. After the frame is sent to the access port connecting CE 2 to PC 2, the port checks that
the VLAN ID carried in the frame is the same as that configured on the port. The port
then removes the tag from the frame and sends the untagged frame to PC 2.
l VLANIF interface
A VLANIF interface is a Layer 3 logical interface, which can be configured on either a
Layer 3 switch or a router.
Layer 3 switching combines routing and switching techniques to implement routing on a
switch, thus improving the overall network performance. After sending the first data flow,
a Layer 3 switch generates mappings between MAC addresses and IP addresses. To send
the same data flow, the switch directly sends the data flow at Layer 2 but not Layer 3 based
on this mapping table.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
56
To allow that new data flows are correctly forwarded based on the routing table, be sure
that the routing table's routing entries are correct. Therefore, VLANIF interfaces and
routing protocols must be configured on Layer 3 switches for reachable Layer 3 routes.
NOTE
Key points are summarized as follows:
l A PC does not need to know the VLAN to which it belongs. It sends only untagged frames.
l After receiving an untagged frame from a PC, a switching device determines the VLAN to which
the frame belongs. The determination is based on the configured VLAN division method such as port
information, and then the switching device processes the frame accordingly.
l If the frame needs to be forwarded to another switching device, the frame must be transparently
transmitted along a trunk link. Frames transmitted along trunk links must carry VLAN tags to allow
other switching devices to properly forward the frame based on the VLAN information.
l Before sending the frame to the destination PC, the switching device connected to the destination PC
removes the VLAN tag from the frame to ensure that the PC receives an untagged frame.
Generally, only tagged frames are transmitted on trunk links; only untagged frames are transmitted on
access links. In this manner, switching devices on the network can properly process VLAN information
and PCs are not concerned about VLAN information.
3.2 VLAN Features Supported by the S3700
This section describes VLAN features supported by the S3700 to help you understand VLAN
configurations.
The VLAN technology helps set up virtual groups to separate broadcast domains and implements
both intra-VLAN and inter-VLAN communication.
1. After VLANs are configured, users in a VLAN can communicate with each other.
2. In addition to intra-VLAN communication, users in different VLANs need to communicate
with each other sometimes.
NOTE
Intra-VLAN communication and inter-VLAN communication are basic VLAN functions.
3. The following VLAN features are also supported to meet requirements of special
applications and extended functions:
l VLAN aggregation: prevents the waste of IP addresses and implements inter-VLAN
communication.
l MUX VLAN: provides a mechanism to isolate Layer 2 traffic between interfaces in a
VLAN.
l Voice VLAN: select voice data packets from various packets and changes the priority
of voice data packets to improve the voice data transmission quality.
l Management VLAN (mVLAN): helps implement integrated management by using a
remote device. A user can use the IP address of the VLANIF interface corresponding
to the mVLAN to telnet to a management switch.
VLAN Assignment
VLAN assignment is a basic VLAN configuration. After VLANs are configured, users in a
VLAN can communicate with each other. VLANs are configured in different manners, as shown
in Table 3-3.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
57
Table 3-3 VLAN assignment in different usage scenarios
VLAN
Assignment
Method
Advantage Disadvantage Usage Scenario
Port-based
VLAN
assignment
The configuration is
simple. It is the most
common VLAN
assignment method.
The configuration is
not flexible. If a port
needs to transmit
frames of another
VLAN, the port must
be deleted from the
original VLAN and
added to the new
VLAN. For a network
having a large number
of traveling users, the
network administrator
needs to spend more
time on maintenance.
Port-based VLAN
assignment is applicable
to large-scale networks
that do not have high
security requirements.
MAC address-
based VLAN
assignment
If a user travels from
one place to another,
the user does not need
to be added to a new
VLAN. This improves
security and flexibility
for terminal users.
A network
administrator needs to
configure a switch
with a MAC address
associated with a
specific VLAN. For a
network with a large
number of terminals,
configuration will take
the network
administrator a lot of
work before VLAN-
based communication
can be enabled.
MAC address-based
VLAN assignment is
applicable to networks
that have high security
requirements and many
traveling users.
IP subnet-
based VLAN
assignment
IP subnet-based and
protocol-based VLAN
assignment are both
called network layer-
based VLAN
assignment.
Network layer-based
VLAN assignment
greatly reduces the
workload of manual
configurations and
allows users to easily
join a VLAN, move
from one VLAN to
another VLAN, or
leave a VLAN.
Switches need to parse
the source IP addresses
of packets and convert
them into MAC
addresses. This slows
down the response of
switches.
IP subnet-based VLAN
assignment is applicable
to networks that have
traveling users and
require simple
management.
Protocol-
based VLAN
assignment
Switches need to
analyze protocol
address formats and
convert between them.
This slows down the
response of switches.
Currently, VLANs can
be configured based on
AppleTalk, IPv4, IPv6,
or IPX.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
58
VLAN
Assignment
Method
Advantage Disadvantage Usage Scenario
Policies-based
VLAN
assignment
MAC and IP
addresses-based or
MAC addresses, IP
addresses and
interfaces-based
VLAN assignment is
of high security. This
VLAN assignment
method does not allow
users to change MAC
addresses or IP
addresses based on
which VLANs are
configured.
Compared with other
VLAN assignment
methods, policies-
based VLAN
assignment has the
highest priority.
Each policy needs to
be manually
configured.
Policies-based VLAN
assignment is applicable
to small-scale networks
that have strict security
requirements and a large
number of traveling
users.
NOTE
Only the S3700HI supports policy-based VLAN assignment.
Inter-VLAN Communication
After VLANs are configured, users in a VLAN can communicate with each other. Users in
different VLANs cannot directly communicate with each other. Table 3-4 lists schemes for inter-
VLAN communication.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
59
Table 3-4 Schemes for inter-VLAN communication
Inter-VLAN
Communica
tion Scheme
Advantage Disadvantage Usage Scenario
VLANIF
interface
After VLANIF
interfaces are
configured, users in
different VLANs and
network segments can
communicate with
each other as long as
routes are reachable.
Inter-VLAN
communication can
also be implemented by
Layer 3 switches if
routes are reachable.
This scheme boasts of
low operating costs.
If multiple users on a
network belong to
different VLANs, each
VLAN requires a
VLANIF interface.
Each VLANIF interface
needs to be assigned an
IP address. This
increases configuration
workload and uses a lot
of IP addresses.
This scheme is
applicable to small-
scale networks on
which users belong to
different network
segments and IP
addresses of these
users are seldom
changed.
If a large number of
VLANs are configured
and both Layer 2 and
Layer 3 forwarding of
packets are required,
use VLANIF
interfaces.
VLAN Aggregation
To implement inter-VLAN communication on switches, configure IP addresses for the VLANIF
interfaces. When many VLANs are deployed, a great number of IP addresses are occupied.
VLAN aggregation can solve the problem of occupation of excessive IP addresses.
VLAN aggregation means that multiple VLANs are aggregated into a super-VLAN. The VLANs
that form the super-VLAN is 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 for each sub-VLAN. All sub-VLANs share the same IP network
segment, which optimizes the use of IP addresses.
MUX VLAN
A MUX VLAN is used to isolate Layer 2 traffic between interfaces in a VLAN. For example,
on an intranet, a user interface can communicate with a server interface, but the user interfaces
cannot communicate with each other.
In MUX VLAN implementation, VLANs are classified in to MUX VLANs and subordinate
VLANs. Subordinate VLANs are classified into subordinate group VLANs and subordinate
separate VLANs.
The MUX VLAN can communicate with the subordinate VLANs, but the subordinate VLANs
cannot communicate with each. Interfaces in a subordinate group VLAN can communicate with
each other, but interfaces in a subordinate separate VLAN cannot communicate with each other.
You can implement inter-device MUX VLAN by configuring the same MUX VLAN on multiple
devices and configuring interfaces between the devices to allow packets of the MUX VLAN.
Implementation of inter-device MUX VLAN is the same as the implementation of MUX VLAN
on a single device.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
60
3.3 Dividing a LAN into VLANs
A LAN can be divided into several VLANs and users in each VLAN can communicate with
each other. Currently, the S3700 supports several VLAN division modes. You can choose one
of them as required.
3.3.1 Establishing the Configuration Task
Before dividing a LAN into VLANs, familiarize yourself with the applicable environment,
complete the pre-configuration tasks, and obtain the data required for the configuration. This
will help you complete the configuration task quickly and accurately.
Applicable Environment
Currently, the S3700 supports the following VLAN division modes. You can choose one of them
as required. Table 3-5 lists VLAN division modes.
Table 3-5 VLAN assignment in different usage scenarios
VLAN
Assignment
Method
Advantage Disadvantage Usage Scenario
Port-based
VLAN
assignment
The configuration is
simple. It is the most
common VLAN
assignment method.
The configuration is
not flexible. If a port
needs to transmit
frames of another
VLAN, the port must
be deleted from the
original VLAN and
added to the new
VLAN. For a network
having a large number
of traveling users, the
network administrator
needs to spend more
time on maintenance.
Port-based VLAN
assignment is applicable
to large-scale networks
that do not have high
security requirements.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
61
VLAN
Assignment
Method
Advantage Disadvantage Usage Scenario
MAC address-
based VLAN
assignment
If a user travels from
one place to another,
the user does not need
to be added to a new
VLAN. This improves
security and flexibility
for terminal users.
A network
administrator needs to
configure a switch
with a MAC address
associated with a
specific VLAN. For a
network with a large
number of terminals,
configuration will take
the network
administrator a lot of
work before VLAN-
based communication
can be enabled.
MAC address-based
VLAN assignment is
applicable to networks
that have high security
requirements and many
traveling users.
IP subnet-
based VLAN
assignment
IP subnet-based and
protocol-based VLAN
assignment are both
called network layer-
based VLAN
assignment.
Network layer-based
VLAN assignment
greatly reduces the
workload of manual
configurations and
allows users to easily
join a VLAN, move
from one VLAN to
another VLAN, or
leave a VLAN.
Switches need to parse
the source IP addresses
of packets and convert
them into MAC
addresses. This slows
down the response of
switches.
IP subnet-based VLAN
assignment is applicable
to networks that have
traveling users and
require simple
management.
Protocol-
based VLAN
assignment
Switches need to
analyze protocol
address formats and
convert between them.
This slows down the
response of switches.
Currently, VLANs can
be configured based on
AppleTalk, IPv4, IPv6,
or IPX.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
62
VLAN
Assignment
Method
Advantage Disadvantage Usage Scenario
Policies-based
VLAN
assignment
MAC and IP
addresses-based or
MAC addresses, IP
addresses and
interfaces-based
VLAN assignment is
of high security. This
VLAN assignment
method does not allow
users to change MAC
addresses or IP
addresses based on
which VLANs are
configured.
Compared with other
VLAN assignment
methods, policies-
based VLAN
assignment has the
highest priority.
Each policy needs to
be manually
configured.
Policies-based VLAN
assignment is applicable
to small-scale networks
that have strict security
requirements and a large
number of traveling
users.
NOTE
l The S3700SI and S3700EI do not support Policies-based VLAN assignment.
NOTE
In the case that the S3700 supports multiple VLAN division modes, the priorities of these VLAN division
modes are in descending order:
1. Policies-based VLAN division
This mode has the highest priority, but is not commonly used.
2. MAC address-based VLAN division and IP subnet-based VLAN division
By default, MAC address-based VLAN division is set as the preference. You can run commands to
change priorities of these two VLAN division modes.
3. Protocol-based VLAN division
4. Port-based VLAN division
Port-based VLAN division has the lowest priority, but is most commonly used.
Pre-configuration Tasks
Before dividing a LAN into VLANs, complete the following task:
l Connecting ports and configuring physical parameters of the ports, ensuring that the ports
are physically Up
Data Preparation
To dividing a LAN into VLANs, you need the following data.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
63
No. Data
1 VLAN ID, number of each Ethernet port to be added to the VLAN, and (optional)
attribute of Ethernet ports
2 VLAN ID, MAC address mapped to the VLAN and (optional) 802.1p priority
value related to the MAC address
3 VLAN ID, (optional) IP subnet index, IP address mapped to the VLAN and
(optional) 802.1p priority value related to the IP address or network segment
4 VLAN ID, (optional) protocol template index, protocol type mapped to the
VLAN, and (optional) 802.1p priority value related to the protocol
5 VLAN ID, MAC address and IP address mapped to the VLAN and (optional)
number of the Ethernet port added to a VLAN based on its MAC and IP addresses
3.3.2 Dividing a LAN into VLANs Based on Ports
Dividing a LAN into VLANs based on ports is the most simple and effective VLAN division
mode.
Context
After VLANs are configured based on ports, the VLANs can process tagged and untagged frames
in the following manners:
l After receiving an untagged frame, a port adds the PVID to the frame, searches the MAC
address table for an outbound port, and sends the tagged frame from the outbound port.
l After a port receives a tagged frame, it checks the VLAN ID carried in the frame:
If the port allows frames with the specified VLAN ID to pass through, it forwards the
frame.
If the port does not allow frames with the specified VLAN ID to pass through, it discards
the frame.
The configuration roadmap is as follows:
1. Create VLANs.
2. Configure the port type and features.
(1) Configure the port type (access, trunk, hybrid, or QinQ).
3. Add ports to VLANs.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
vlan vlan-id
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
64
A VLAN is created, and the VLAN view is displayed. If the specified VLAN has been created,
the VLAN view is directly displayed.
The VLAN ID ranges from 1 to 4094. If VLANs need to be created in batches, run the vlan
batch { vlan-id1 [ to vlan-id2 ] } &<1-10> command to create VLANs in batches, and then run
the vlan vlan-id command to enter the view of a specified VLAN.
Step 3 Run:
quit
The system view is displayed.
Step 4 Configure the port type and features.
1. Run the interface interface-type interface-number command to enter the view of an
Ethernet port to be added to the VLAN.
2. Run the port link-type { access | hybrid | trunk | dot1q-tunnel } command to configure
the port type.
By default, the port type is hybrid.
l If a Layer 2 Ethernet port is directly connected to a terminal, set the port type to access
or hybrid.
l If a Layer 2 Ethernet port is connected to another switch, the port type can be set to
access, trunk, hybrid, or QinQ.
Step 5 Add ports to the VLAN.
Run either of the following commands as needed:
l For access or QinQ ports:
Run the port default vlan vlan-id command to add a port to a specified VLAN.
To add ports to a VLAN in batches, run the port interface-type { interface-number1 [ to
interface-number2 ] } &<1-10> command in the VLAN view.
l For trunk ports:
Run the port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }
command to add the port to specified VLANs.
(Optional) Run the port trunk pvid vlan vlan-id command to specify the default VLAN
for a trunk interface.
l For hybrid ports:
Run either of the following commands to add a port to VLANs in untagged or tagged
mode:
Run the port hybrid untagged vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }
command to add a port to VLANs in untagged mode.
In untagged mode, a port removes tags from frames and then forwards the frames.
This is applicable to scenarios in which Layer 2 Ethernet ports are connected to
terminals.
Run the port hybrid tagged vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }
command to add a port to VLANs in tagged mode.
In tagged mode, a port forwards frames without removing their tags. This is applicable
to scenarios in which Layer 2 Ethernet ports are connected to switches.
(Optional) Run the port hybrid pvid vlan vlan-id command to specify the default VLAN
of a hybrid interface.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
65
By default, all ports are added to VLAN 1.
----End
3.3.3 Dividing a LAN into VLANs Based on MAC Addresses
MAC address-based VLAN division is used if user locations do not need to be concerned. This
improves security and flexibility for terminal users.
Context
VLANs configured based on MAC addresses process only untagged frames, and treat tagged
frames in the same manner as VLANs configured based on ports.
After receiving an untagged frame, a port searches for a MAC-VLAN mapping based on the
source MAC address in the frame.
l If a mapping is found, the port forwards the frame based on the VLAN ID and priority
value in the mapping.
l If no matching mapping is found, the port matches the frame with other matching rules.
The configuration roadmap is as follows:
1. Create VLANs.
2. Map MAC addresses to VLAN IDs.
3. Configure the port type and features.
(1) Set the port type to hybrid.
(2) Configure a port to allow frames with specified VLAN IDs to pass through.
4. (Optional) Configure the highest priority for MAC address-based VLAN division.
NOTE
By default, MAC address-based VLAN division is set as the preference. To use IP subnet-based
VLAN division, set a higher priority for it.
5. Enable MAC address-based VLAN division.
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. If the specified VLAN has been created,
the VLAN view is directly displayed.
The VLAN ID ranges from 1 to 4094. If VLANs need to be created in batches, run the vlan
batch { vlan-id1 [ to vlan-id2 ] } &<1-10> command to create VLANs in batches, and then run
the vlan vlan-id command to enter the view of a specified VLAN.
Step 3 Run:
mac-vlan mac-address mac-address [ mac-address-mask | mac-address-mask-length ]
[ priority priority ]
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
66
Map a MAC address to the VLAN.
l The mac-address value is in the H-H-H format. H is a hexadecimal number that contains one
to four digits, such as 00e0 and fc01. If an H contains less than four digits, 0s are padded
ahead. For example, if you specify an H as e0, it is displayed as 00e0. A MAC address cannot
be set to all 0s or all Fs.
l The optional parameter priority specifies the 802.1p priority value related to the MAC
addresses. The value ranges from 0 to 7. The greater the value, the higher the priority. The
default value is 0. After the 802.1p priority value is specified, frames with high priorities are
first forwarded when traffic is congested.
Step 4 Run:
quit
The system view is displayed.
Step 5 Configure the port type and features.
1. Run the interface interface-type interface-number command to enter the view of the port
to be configured to allow frames with a specified VLAN ID to pass through.
2. Run the port link-type hybrid command to set the port type to hybrid.
By default, the port type is hybrid.
3. Run the port hybrid untagged vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all } command
to configure the hybrid port to allow frames with a specified VLAN ID to pass through.
NOTE
If an interface of an S3700SI or S3700EI is added to a MAC address-based VLAN with a mask
specified, add this interface to its default VLAN.
Step 6 (Optional) Run the vlan precedence mac-vlan command to configure a higher priority for MAC
address-based VLAN division.
By default, MAC address-based VLAN division is set as the preference.
Step 7 Run:
mac-vlan enable
MAC address-based VLAN division is enabled.
By default, MAC address-based VLAN division is disabled.
NOTE
MAC address-based VLAN assignment conflict with MUX VLAN. They cannot be configured on the same
interface.
----End
3.3.4 Dividing a LAN into VLANs Based on IP Subnets
IP subnet-based and protocol-based VLAN division are called network layer-based VLAN
division, which reduces manual VLAN configuration workload and allows users to easily join
a VLAN, transfer from one VLAN to another, and exit from a VLAN. IP subnet-based VLAN
division is applicable to networks that have traveling users and require simple management.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
67
Context
VLANs configured based on IP subnets process only untagged frames. and treat tagged frames
in the same manner as VLANs configured based on ports.
After receiving untagged frames, a device determines the VLANs to which the frames belong
based on their source IP addresses before sending them to corresponding VLANs.
The configuration roadmap is as follows:
1. Create VLANs.
2. Associate IP subnets with VLANs to determine mappings between subnets and VLANs.
3. Configure the port type and features.
(1) Set the port type to hybrid.
(2) Configure a port to allow frames with the specified VLAN IDs to pass through.
4. (Optional) Set a higher priority for IP subnet-based VLAN division.
NOTE
By default, MAC address-based VLAN division is set as the preference. To use IP subnet-based
VLAN division, set a higher priority for it.
5. Enable IP subnet-based VLAN division.
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. If the specified VLAN has been created,
the VLAN view is directly displayed.
The VLAN ID ranges from 1 to 4094. If VLANs need to be created in batches, run the vlan
batch { vlan-id1 [ to vlan-id2 ] } &<1-10> command to create VLANs in batches, and then run
the vlan vlan-id command to enter the view of a specified VLAN.
Step 3 Run:
ip-subnet-vlan [ ip-subnet-index ] ip ip-address { mask | mask-length }
[ priority priority ]
An IP subnet is associated with the VLAN.
l The optional parameter ip-subnet-index specifies the IP subnet index. The subnet index can
be specified by a user or automatically generated by the system.
l The parameter ip-address specifies the source IP address or network address based on which
a VLAN is configured. The value is in dotted decimal notation.
l The optional parameter priority specifies the 802.1p priority value related to the VLAN
configured based on the IP address or network address. The value ranges from 0 to 7. The
greater the value, the higher the priority. The default value is 0. After the 802.1p priority
value is specified, frames with high priorities are first forwarded when traffic is congested.
Step 4 Run:
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
68
quit
The system view is displayed.
Step 5 Configure the port type and features.
1. Run the interface interface-type interface-number command to enter the view of the port
to be configured to allow frames with the specified VLAN ID to pass through.
2. Run the port link-type hybrid command to set the port type to hybrid.
By default, the port type is hybrid.
3. Run the port hybrid untagged vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all } command
to allow frames with the specified VLAN ID to pass through.
Step 6 (Optional) Run:
vlan precedence ip-subnet-vlan
IP subnet-based VLAN division is configured with a higher priority.
By default, MAC address-based VLAN division is set as the preference.
Step 7 Run:
ip-subnet-vlan enable
IP subnet-based VLAN division is enabled.
By default, IP subnet-based VLAN division is disabled.
----End
3.3.5 Dividing a LAN into VLANs Based on Protocols
IP subnet-based and protocol-based VLAN division are called network layer-based VLAN
division, which reduces manual VLAN configuration workload and allows users to easily join
a VLAN, transfer from one VLAN to another, and exit from a VLAN.
Context
VLANs configured based on protocols process only untagged frames. and treat tagged frames
in the same manner as VLANs configured based on ports.
After receiving an untagged frame, a port identifies the protocol template used by the frame to
determine the VLAN to which the frame belongs.
l If the port has been added to VLANs corresponding to some protocols, and the protocol
template adopted by the frame matches one of these protocols, the port adds the
corresponding VLAN ID to the frame.
l If the port has been added to VLANs corresponding to some protocols, but the protocol
template adopted by the frame does not match any one of these protocols, the port adds the
PVID to the frame.
The configuration roadmap is as follows:
1. Create VLANs.
2. Associate protocols with VLANs to determine mappings between protocols and VLANs.
3. Configure the port type and features.
(1) Set the port type to hybrid.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
69
(2) Configure a port to allow frames with the specified VLAN ID to pass through.
(3) Associate ports with VLANs.
After receiving a frame associated with a specified protocol, the system automatically
assigns the VLAN ID associated with the protocol to the frame.
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. If the specified VLAN has been created,
the VLAN view is directly displayed.
The VLAN ID ranges from 1 to 4094. If VLANs need to be created in batches, run the vlan
batch { vlan-id1 [ to vlan-id2 ] } &<1-10> command to create VLANs in batches, and then run
the vlan vlan-id command to enter the view of a specified VLAN.
Step 3 Run:
protocol-vlan [ protocol-index ] { at | ipv4 | ipv6 | ipx { ethernetii | llc | raw
| snap } | mode { ethernetii-etype etype-id1 | llc dsap dsap-id ssap ssap-id | snap-
etype etype-id2 } }
A protocol is associated with a VLAN and the protocol template is specified.
l The optional parameter protocol-index specifies the protocol template index.
The protocol template is determined by the protocol type and encapsulation format. A
protocol VLAN can be defined by a protocol template.
l When configuring the source and destination service access points, note the following points:
dsap-id and ssap-id cannot be both set to 0xaa.
dsap-id and ssap-id cannot be both set to 0xe0, which corresponds to the Logical Link
Control (LLC) encapsulation format for IPX packets.
dsap-id and ssap-id cannot be both set to 0xff, which corresponds to the RAW
encapsulation format for IPX packets.
Step 4 Configure the port type and features.
1. Run the interface interface-type interface-number command to enter the view of the port
to be configured to allow frames with the specified VLAN ID to pass through.
2. Run the port link-type hybrid command to set the port type to hybrid.
By default, the port type is hybrid.
3. Run the port hybrid untagged vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all } command
to allow frames with the specified VLAN ID to pass through.
4. Run:
protocol-vlan vlan vlan-id { all | protocol-index1 [ to protocol-index2 ] }
[ priority priority ]
The port is associated with the VLAN.
l The parameter vlan-id specifies the ID of a VLAN configured based on a protocol.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
70
l The optional parameter priority specifies the 802.1p priority value related to the
protocol. The value ranges from 0 to 7. The greater the value, the higher the priority.
The default value is 0. After the 802.1p priority value is specified, frames with high
priorities are first forwarded when traffic is congested.
----End
3.3.6 Dividing a LAN into VLANs Based on Policies
VLANs configured based on policies are also called policy VLANs. Policy VLANs allow
terminals to plug and play and data for different users to be separately transmitted.
Context
A LAN can be divided into VLANs based on MAC and IP addresses or based on MAC and IP
addresses and interfaces.
To divide a LAN into VLANs based on policies, configure MAC and IP addresses of terminals
on a switch and associate pairs of MAC addresses ,IP addresses and interfaces with VLANs.
Only users matching a policy can be added to a specified VLAN. If the IP or MAC addresses
of users added to a VLAN are changed, they will exit from the VLAN.
Policy VLANs process only untagged frames. and treat tagged frames in the same manner as
VLANs configured based on ports.
After receiving an untagged frame, the device finds a VLAN matching both MAC and IP
addresses of the frame, and transmits the frame in the VLAN.
The configuration roadmap is as follows:
1. Create VLANs.
2. Associate pairs of MAC and IP addresses with VLANs to divide a LAN into VLANs based
on both MAC and IP addresses.
3. Configure the port type and features.
(1) Set the port type to hybrid.
(2) Configure a port to allow frames with specified MAC and IP addresses to pass through.
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. If the specified VLAN has been created,
the VLAN view is directly displayed.
The VLAN ID ranges from 1 to 4094. If VLANs need to be created in batches, run the vlan
batch { vlan-id1 [ to vlan-id2 ] } &<1-10> command to create VLANs in batches, and then run
the vlan vlan-id command to enter the view of a specified VLAN.
Step 3 Run:
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
71
policy-vlan mac-address mac-address ip ip-address [ interface interface-type
interface-number ] [ priority priority ]
Policy VLAN is configured.
If interface interface-type interface-number is not specified, the MAC and IP address policy
will be applied to all ports in the VLAN. If interface interface-type interface-number is
specified, the MAC and IP address policy will be applied to the specified port in the VLAN.
Before deleting a policy VLAN, run the undo policy-vlan command to disable the policy VLAN
function.
Step 4 Run:
quit
The system view is displayed.
Step 5 Configure the port type and features.
1. Run the interface interface-type interface-number command to enter the view of the port
to be configured with a policy VLAN.
2. Run the port link-type hybrid command to set the port type to hybrid.
By default, the port type is hybrid.
3. Run the port hybrid untagged vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all } command
to allow frames with specified MAC and IP addresses to pass through.
----End
3.3.7 Checking the Configuration
After dividing a LAN into VLANs, you can view information about VLANs configured in
different modes. For example, which VLANs are classified based on ports or MAC addresses.
Prerequisite
The configurations of VLAN division are complete.
Procedure
l Run the display vlan [ vlan-id [ verbose ] ] command to check information about all
VLANs or a specified VLAN.
l Run the display mac-vlan { mac-address { all | mac-address [ mac-address-mask | mac-
address-mask-length ] } | vlan vlan-id } command to check information about VLANs
configured based on MAC addresses.
l Run the display ip-subnet-vlan vlan { all | vlan-id1 [ to vlan-id2 ] } command to check
information about VLANs configured based on IP subnets.
l Run the display protocol-vlan vlan { all | vlan-id1 [ to vlan-id2 ] } command to check
information about VLANs configured based on protocols.
l Run the display protocol-vlan interface { all | interface-type interface-number } command
to check information about VLANs configured based on protocols associated with ports.
l Run the display policy-vlan { all | vlan vlan-id } command to check information about
policy vlan.
----End
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
72
3.4 Creating a VLANIF Interface
VLANIF interfaces are Layer 3 logical interfaces. After creating VLANIF interfaces on Layer
2 devices, you can configure Layer 3 features on these interfaces.
3.4.1 Establishing the Configuration Task
Before creating a VLANIF interface, familiarize yourself with the applicable environment,
complete the pre-configuration tasks, and obtain the data required for the configuration. This
will help you complete the configuration task quickly and accurately.
Applicable Environment
Layer 3 switching combines routing and switching techniques to implement routing on a switch,
thus improving the overall network performance. After sending the first data flow, a Layer 3
switch generates mappings between MAC addresses and IP addresses. To send the same data
flow, the switch directly sends the data flow at Layer 2 but not Layer 3 based on this mapping
table.
To allow that new data flows are correctly forwarded based on the routing table, be sure that the
routing table's routing entries are correct. Therefore, VLANIF interfaces and routing protocols
must be configured on Layer 3 switches for reachable Layer 3 routes.
Pre-configuration Tasks
Before creating a VLANIF interface, complete the following task:
l Creating a VLAN
Data Preparation
To create a VLANIF interface, you need to the following data.
No. Data
1 VLAN ID
2 IP address to be assigned to the VLANIF interface
3 (Optional) Delay after which the VLANIF interface goes Down
4 (Optional) MTU of the VLANIF interface
3.4.2 Creating a VLANIF Interface
Before configure Layer 3 features on a Layer 2 device, you must create a VLANIF interface on
the device.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
73
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif vlan-id
A VLANIF interface is created and the VLAIF interface view is displayed.
The VLAN ID specified in this command must be the ID of an existing VLAN.
NOTE
A VLANIF interface is Up only when at least one physical port added to the corresponding VLAN is Up.
----End
3.4.3 Assigning an IP Address to a VLANIF Interface
As a VLANIF interface is a Layer 3 logical interface, it can communicate with other interfaces
at the network layer only after being assigned an IP address.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif vlan-id
The VLANIF interface view is displayed.
The VLAN ID specified in this command must be the ID of an existing VLAN.
Step 3 Run:
ip address ip-address { mask | mask-length } [ sub ]
An IP address is assigned to the VLANIF interface for communication at the network layer.
----End
3.4.4 (Optional) Setting a Delay After Which a VLANIF Interface
Goes Down
Setting a delay after which a VLANIF interface goes Down prevents network flapping caused
by changes of VLANIF interface status. This function is also called VLAN damping.
Context
If a VLAN goes Down because all ports in the VLAN go Down, the system immediately reports
the VLAN Down event to the corresponding VLANIF interface, instructing the VLANIF
interface to go Down.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
74
To prevent network flapping caused by changes of VLANIF interface status, enable VLAN
damping on the VLANIF interface. After the last Up port in a VLAN goes Down, the system
starts a delay timer and informs the corresponding VLANIF interface of the VLAN Down event
after the timer expires. If a port in the VLAN goes Up during the delay period, the VLANIF
interface remains Up.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif vlan-id
The VLANIF interface view is displayed.
The VLAN ID specified in this command must be the ID of an existing VLAN.
Step 3 Run:
damping time delay-time
The delay for VLAN damping is set.
The delay-time value ranges from 0 to 20, in seconds. By default, the value is 0 seconds,
indicating that VLAN damping is disabled.
----End
3.4.5 (Optional) Setting the MTU of a VLANIF Interface
Context
NOTE
l After changing the maximum transmission unit (MTU) by using the mtu command on a specified
interface, you need to restart the interface to make the new MTU take effect. To restart the interface,
run the shutdown command and then the undo shutdown command, or run the restart command in
the interface view.
l If you change the MTU of an interface, you need to change the MTU of the peer interface to the same
value by using the mtu command; otherwise, services may be interrupted.
l To ensure availability of Layer 3 functions, set the MTU value of the VLANIF interface to be smaller
than the maximum length of frames on the physical interface in the corresponding VLAN.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif vlan-id
The VLANIF interface view is displayed.
Step 3 Run:
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
75
mtu mtu
The MTU of the VLANIF interface is set.
The MTU of a VLANIF interface ranges from 128 to 9216, in bytes. The default value is 1500.
NOTE
If the MTU is too small whereas the packet size is large, the packet is probably split into many fragments.
Therefore, the packet may be discarded due to the insufficient QoS queue length. To avoid this situation,
lengthen the QoS queue accordingly.
----End
3.4.6 Checking the Configuration
After a VLANIF interface is configured for communication at the network layer, you can check
the IP address and status of a specified VLANIF interface.
Prerequisite
The configurations of a VLANIF interface are complete.
Procedure
l Run the display interface vlanif [ vlan-id ] command to check the physical status, link
protocol status, description, and IP address of the VLANIF interface.
----End
3.5 Configuring Inter-VLAN Communication
Configuring inter-VLAN communication allows users in different VLANs to communicate with
each other. Currently, the S3700 supports several inter-VLAN communication schemes. Choose
one of them as required.
3.5.1 Establishing the Configuration Task
Before configuring inter-VLAN communication, familiarize yourself with the applicable
environment, complete the pre-configuration tasks, and obtain the data required for the
configuration. This will help you complete the configuration task quickly and accurately.
Applicable Environment
Currently, schemes listed in Table 3-6 are provided for inter-VLAN communication. You can
choose one of them based on the real world situation.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
76
Table 3-6 Schemes for inter-VLAN communication
Inter-VLAN
Communica
tion Scheme
Advantage Disadvantage Usage Scenario
VLANIF
interface
After VLANIF
interfaces are
configured, users in
different VLANs and
network segments can
communicate with
each other as long as
routes are reachable.
Inter-VLAN
communication can
also be implemented by
Layer 3 switches if
routes are reachable.
This scheme boasts of
low operating costs.
If multiple users on a
network belong to
different VLANs, each
VLAN requires a
VLANIF interface.
Each VLANIF interface
needs to be assigned an
IP address. This
increases configuration
workload and uses a lot
of IP addresses.
This scheme is
applicable to small-
scale networks on
which users belong to
different network
segments and IP
addresses of these
users are seldom
changed.
If a large number of
VLANs are configured
and both Layer 2 and
Layer 3 forwarding of
packets are required,
use VLANIF
interfaces.
Pre-configuration Tasks
Before configuring inter-VLAN communication, complete the following task:
l Creating VLANs
Data Preparation
To configure inter-VLAN communication, you need the following data.
No. Data
1 VLAN ID, VLANIF interface number, IP address and mask of the VLANIF
interface
3.5.2 Configuring VLANIF Interfaces for Inter-VLAN
Communication
Configuring VLANIF interfaces for inter-VLAN communication saves expenditure and helps
implement fast forwarding.
Context
VLAIF interfaces are Layer 3 logical interfaces. After being assigned IP addresses, VLANIF
interfaces are able to communicate at the network layer.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
77
By using VLANIF interfaces to implement inter-VLAN communication, you need to configure
a VLANIF interface for each VLAN and assign an IP address to each VLANIF interface.
Figure 3-5 Networking diagram for configuring VLANIF interfaces for inter-VLAN
communication
Switch
VLAN2 VLAN3
VLANIF2 VLANIF3
NOTE
The default gateway address of each PC in a VLAN must be the IP address of the corresponding VLANIF
interface. Otherwise, inter-VLAN communication will fail.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif vlan-id
A VLANIF interface is created and the VLAIF interface view is displayed.
The VLAN ID specified in this command must be the ID of an existing VLAN.
NOTE
A VLANIF interface is Up only when at least one physical port added to the corresponding VLAN is Up.
Step 3 Run:
ip address ip-address { mask | mask-length } [ sub ]
An IP address is assigned to the VLANIF interface.
VLANIF interfaces must belong to different network segments.
----End
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
78
3.5.3 Checking the Configuration
After inter-VLAN communication is configured, you can check whether users in different
VLANs can communicate with each other and check information about VLANs to which users
belong.
Prerequisite
The configurations of inter-VLAN communication are complete.
Procedure
l Run the ping [ ip ] [ -a source-ip-address | -c count | -d | -f | -h ttl-value | -i interface-
type interface-number | -m time | -n | -p pattern | -q | -r | -s packetsize | -system-time | -t
timeout | -tos tos-value | -v | -vpn-instance vpn-instance-name ]
*
host command to check
whether users in different VLANs can communicate with each other.
If the ping fails, you can run the following commands to locate the fault:
Run the display vlan [ vlan-id [ verbose ] ] command to check information about all
VLANs or a specified VLAN.
Run the display interface vlanif [ vlan-id ] command to check information about
VLANIF interfaces.
Before running this command, ensure that VLANIF interfaces have been configured.
----End
3.6 Configuring VLAN Aggregation to Save IP Addresses
VLAN aggregation prevents the waste of IP addresses and implements inter-VLAN
communication.
3.6.1 Establishing the Configuration Task
Before configuring VLAN aggregation, familiarize yourself with the applicable environment,
complete the pre-configuration tasks, and obtain the data required for the configuration. This
will help you complete the configuration task quickly and accurately.
Applicable Environment
As networks expand, address resources become insufficient. VLAN aggregation is developed
to save IP addresses.
In VLAN aggregation, one super-VLAN is associated with multiple sub-VLANs. Physical ports
cannot join a super-VLAN but a VLANIF interface can be created for the super-VLAN and an
IP address can be assigned to the VLANIF interface. Physical ports can join a sub-VLAN but
no VLANIF interface can be created for the sub-VLAN. All the ports in the sub-VLAN use the
same IP address with the VLANIF interface of the super-VLAN. This saves subnet IDs, default
gateway addresses of the subnets, and directed broadcast addresses of the subnets. In addition,
different broadcast domains can use the addresses in the same subnet segment. As a result, subnet
differences are eliminated, addressing becomes flexible, and the number of idle addresses is
reduced. VLAN aggregation allows each sub-VLAN to function as a broadcast domain and
reduces the waste of IP addresses to be assigned to ordinary VLANs.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
79
Figure 3-6 shows the typical VLAN aggregation networking.
Figure 3-6 Typical networking diagram for VLAN aggregation
Super
VLAN4
PE
Sub-VLAN 2
CE1
Sub-VLAN 3
CE2
Pre-configuration Tasks
Before configuring VLAN aggregation, complete the following task:
l Connecting ports and configuring physical parameters of the ports, ensuring that the ports
are physically Up
Data Preparation
To configure VLAN aggregation, you need the following data.
No. Data
1 ID of each sub-VLAN and number of each port belonging to the sub-VLAN
2 ID of a super-VLAN
3 IP address and mask of a VLANIF interface
3.6.2 Creating a Sub-VLAN
Each sub-VLAN functions as a broadcast domain.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
80
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:
port link-type access
The link type of the interface is set to access.
Step 4 Run:
quit
Return to the system view.
Step 5 Run:
vlan vlan-id
A sub-VLAN is created and the sub-VLAN view is displayed.
Step 6 Run:
port interface-type { interface-number1 [ to interface-number2 ] } &<1-10>
A port is added to the sub-VLAN.
----End
3.6.3 Creating a Super-VLAN
A super-VLAN consists of several sub-VLANs. No physical port can be added to a super-VLAN,
but a VLANIF interface can be configured for the super-VLAN and an IP address can be assigned
to the VLANIF interface.
Context
NOTE
Before configuring a super-VLAN, ensure that sub-VLANs have been configured.
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 ID of a super-VLAN must be different from every sub-VLAN ID.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
81
Step 3 Run:
aggregate-vlan
A super-VLAN is created.
A super-VLAN cannot contain any physical interfaces.
VLAN 1 cannot be configured as a super-VLAN.
Step 4 Run:
access-vlan { vlan-id1 [ to vlan-id2 ] } &<1-10>
A sub-VLAN is added to a super-VLAN.
Before adding sub-VLANs to a super-VLAN in batches, ensure that these sub-VLANs are not
configured with VLANIF interfaces.
----End
3.6.4 Assigning an IP Address to the VLANIF Interface of a Super-
VLAN
The IP address of the VLANIF interface of a super-VLAN must contain the subnet segments
where users in sub-VLANs reside. All the sub-VLANs use the IP address of the VLANIF
interface of the super-VLAN, thus saving IP addresses.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif vlan-id
A VLANIF interface is created for a super-VLAN, and the view of the VLANIF interface is
displayed.
Step 3 Run:
ip address ip-address { mask | mask-length } [ sub ]
An IP address is assigned to the VLANIF interface.
----End
3.6.5 (Optional) Enabling Proxy ARP on the VLANIF Interface of a
Super-VLAN
PCs in different sub-VLANs cannot directly communicate with each other in Layer2 network.
To allow these PCs to communicate with each other at Layer 3, enable proxy ARP on the
VLANIF interface of the super-VLAN.
Context
VLAN aggregation allows sub-VLANs to use the same subnet address, but prevents PCs in
different sub-VLANs from communicating with each other at the network layer.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
82
PCs in ordinary VLANs can communicate with each other at the network layer by using different
gateway addresses. In VLAN aggregation, PCs in a super-VLAN use the same subnet address
and gateway address. As PCs in different sub-VLANs belong to one subnet, they communicate
with each other only at Layer 2, not Layer 3. These PCs are isolated from each other at Layer
2. Consequently, PCs in different sub-VLANs cannot communicate with each other.
Proxy ARP is required to enable PCs in a sub-VLAN to communicate with PCs in another sub-
VLAN or PCs on other networks. After a super-VLAN and its VLANIF interface are created,
proxy ARP must be enabled to allow the super-VLAN to forward or process ARP request and
reply packets. Proxy ARP helps PCs in sub-VLANs communicate with each other at the network
layer.
NOTE
An IP address must have been assigned to the VLANIF interface corresponding to the super-VLAN.
Otherwise, proxy ARP cannot take effect.
VLAN aggregation simplifies configurations for the network where many VLANs are
configured and PCs in different VLANs need to communicate with each other.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif vlan-id
The view of the VLANIF interface of the super-VLAN is displayed.
Step 3 Run:
arp-proxy inter-sub-vlan-proxy enable
Inter-sub-VLAN proxy ARP is enabled.
----End
3.6.6 Checking the Configuration
After VLAN aggregation is configured, you can view VLAN types and information about
VLANIF interfaces, such as the physical status, link protocol status, IP address, and mask.
Prerequisite
The VLAN aggregation configurations are complete.
Procedure
l Run the display vlan [ vlan-id [ verbose ] ] command to check VLAN information.
l Run the display interface vlanif [ vlan-id ] command to check information about a specific
VLANIF interface.
----End
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
83
3.7 Configuring a MUX VLAN to Separate Layer 2 Traffic
Configuring a MUX VLAN allows users in different VLANs to communicate with each other,
and separates users in a certain VLAN.
3.7.1 Establishing the Configuration Task
Before configuring a MUX VLAN, familiarize yourself with the applicable environment,
complete the pre-configuration tasks, and obtain the data required for the configuration. This
will help you complete the configuration task quickly and accurately.
Applicable Environment
In an enterprise network, all employees of the enterprise can access the enterprise's server. It is
required that some employees be able to communicate with each other, whereas some employees
not communicate with each other.
Configuring a MUX VLAN on the switch connected to PCs helps to save VLAN ID resources,
reduce the configuration workload of the network administrator, and facilitate network
maintenance.
Figure 3-7 Networking diagram for a MUX VLAN
Enterprise
server
Switch
Group PORT Separate PORT
Principal PORT
Enterprise
employee1
Enterprise
employee2
In the MUX VLAN shown in Figure 3-7, the principal port connects the switch to the enterprise's
server; separate ports connect the switch to employees that do not communicate with each other;
group ports connect the switch to employees that need to communicate with each other. A MUX
VLAN consists of VLANs in different types listed in Table 3-7.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
84
Table 3-7 Components of a MUX VLAN
MUX
VLAN
VLAN
Type
Port Type Communication Rights
Principal
VLAN
- Principal port A principal port can communicate with every
port in the MUX VLAN.
Subordinate
VLAN
Separate
VLAN
Separate port A separate port can only communicate with
principal ports.
Each separate VLAN must be associated with
a principal VLAN.
Group
VLAN
Group port A group port can communicate with both
principal ports and other group ports in the
same group VLAN but cannot communicate
with group ports in other group VLANs or
separate ports.
Each group VLAN must be associated with a
principal VLAN.
Pre-configuration Tasks
Before configuring a MUX VLAN, complete the following task:
l Creating VLANs
Data Preparation
To configure a MUX VLAN, you need the following data.
No. Data
1 ID of each principal VLAN and number of each port belonging to the principal VLAN
2 ID of each group VLAN and number of each port belonging to the group VLAN
3 ID of each separate VLAN and number of each port belonging to the separate VLAN
3.7.2 Configuring a Principal VLAN for a MUX VLAN
Ports added to a principal VLAN can communicate with every port in the MUX VLAN.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
85
vlan vlan-id
A VLAN is created, and the VLAN view is displayed. If the specified VLAN has been created,
the VLAN view is directly displayed.
The VLAN ID ranges from 1 to 4094. If VLANs need to be created in batches, run the vlan
batch { vlan-id1 [ to vlan-id2 ] } &<1-10> command to create VLANs in batches, and then run
the vlan vlan-id command to enter the view of a specified VLAN.
Step 3 Run:
mux-vlan
The VLAN is configured as a principal VLAN.
The VLAN ID assigned to a principal VLAN can no longer be used to configure any VLANIF
interface, super-VLAN, or sub-VLAN.
----End
3.7.3 Configuring a Group VLAN for a Subordinate VLAN
A VLAN associated with a group port is called a group VLAN. Group ports in a group VLAN
can communicate with each other.
Context
In a MUX VLAN, group VLANs cannot share the same VLAN ID with a separate VLAN.
Do as follows on a switching device that requires a group VLAN:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
vlan vlan-id
The view of a created principal VLAN is displayed.
Step 3 Run:
subordinate group vlan-id1 [ to vlan-id2 ]
A group VLAN is configured for the subordinate VLAN.
In this command, vlan-id1 and vlan-id2 specify a range of VLAN IDs. The value is an integer
ranging from 1 to 4094. The value of vlan-id2 must be greater than the value of vlan-id1.
The VLAN ID assigned to a group VLAN can be assigned to no other VLANIF interface, super-
VLAN, or sub-VLAN.
----End
3.7.4 Configuring a Separate VLAN for a Subordinate VLAN
A VLAN associated with separate ports is called a separate VLAN. Ports in a separate VLAN
cannot communicate with each other.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
86
Context
Group VLANs and separate VLANs in one MUX VLAN cannot use the same VLAN ID.
Do as follows on a switching device that requires a separate VLAN:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
vlan vlan-id
The view of a created principal VLAN is displayed.
Step 3 Run:
subordinate separate vlan-id
A separate VLAN is configured for a subordinate VLAN.
Group VLANs and separate VLANs in one MUX VLAN cannot use the same VLAN ID.
----End
3.7.5 Enabling the MUX VLAN Function on a Port
After the MUX VLAN function is enabled on a port, the principal VLAN and subordinate VLAN
can communicate with each other; ports in a group VLAN can communicate with each other;
ports in a separate VLAN cannot communicate with each other.
Context
Before the MUX VLAN function is enabled on a port, ensure that:
l The port has been added to only one ordinary VLAN. If the port has been added to multiple
VLANs, the MUX VLAN function cannot be enabled on this port.
l The port has been added to a principal or subordinate VLAN.
Do as follows on the switching device on which a port needs to be enabled with the MUX VLAN
function:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The view of an Ethernet port connecting users is displayed.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
87
Step 3 Run:
port mux-vlan enable
The MUX VLAN function is enabled.
The interface has been added only to a principal VLAN or a subordinate VLAN.
After being enabled with the MUX VLAN function, the port can no longer be configured with
VLAN mapping or VLAN stacking.
NOTE
l Disabling MAC address learning or limiting the number of learned MAC addresses on an interface
affects the MUX VLAN function on the interface.
l The MUX VLAN and port security functions cannot be enabled on the same interface.
l The MUX VLAN and MAC address authentication cannot be enabled on the same interface.
l The MUX VLAN and 802.1x authentication cannot be enabled on the same interface.
----End
3.7.6 Checking the Configuration
After a MUX VLAN is configured, you can check the principal VLAN ID, subordinate VLAN
ID, and VLAN type.
Prerequisite
The configurations of a MUX VLAN are complete.
Procedure
Step 1 Run the display mux-vlan command to check information about the MUX VLAN.
----End
3.8 Configuring a Voice VLAN to Transmit Voice Data
A voice VLAN is used to transmit voice data.
3.8.1 Establishing the Configuration Task
Before configuring a voice VLAN, familiarize yourself with the applicable environment,
complete the pre-configuration tasks, and obtain the data required for the configuration. This
will help you complete the configuration task quickly and accurately.
Applicable Environment
Voice and non-voice data are transmitted on networks. Voice data is configured with a higher
priority than non-voice data to reduce the probability of the transmission delay and packet loss.
In most cases, an Access Control List (ACL) is configured to distinguish voice data from non-
voice data, and the Quality of Service (QoS) is used to ensure the transmission quality of voice
data.
Voice over IP (VoIP) phones are commonly used. If an ACL is configured to distinguish voice
data from non-voice data, and QoS is used to ensure the transmission quality of voice data, each
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
88
terminal needs to be configured with an ACL rule. This increases the network administrator's
workload and burdens maintenance.
The voice VLAN technique is introduced to solve the preceding problem.
After being enabled with the voice VLAN function, a device determines voice data based on
source MAC addresses of received frames, adds ports that receive voice data to a voice VLAN,
and automatically applies priority rules to ensure high priorities and good qualities of voice data.
This simplifies user configuration and facilitates management on voice data.
On the network shown in Figure 3-8, a user's High Speed Internet (HSI), VoIP, and Internet
Protocol Television (IPTV) services are connected to a switch. A voice VLAN can be configured
on the switch to implement QoS for voice data, prioritize voice data, and ensure the
communication quality.
Figure 3-8 Networking diagram for configuring a voice VLAN
Network
Server
HSI VoIP IPTV HSI VoIP IPTV
Switch
LAN Switch2
Voice flow
Voice VLAN
VLAN 10
LAN Switch1
Pre-configuration Tasks
Before configuring a voice VLAN, complete the following task:
l Creating VLANs
Data Preparation
To configure a voice VLAN, you need the following data.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
89
No. Data
1 Type and number of the port enabled with the voice VLAN function, voice VLAN
ID
2 The Organizationally Unique Identifier (OUI) address and mask of the voice VLAN
3 (Optional) Aging timer value of the voice VLAN
4 (Optional) 802.1p priority and DSCP value for the voice VLAN
5 (Optional) Mode in which the port is added to the voice VLAN
6 (Optional) Security mode of the voice VLAN
3.8.2 Enabling the Voice VLAN Function
After being enabled with the voice VLAN function, a device is able to identify voice data based
on source MAC addresses of received frames.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The view of a port connecting the device to users' voice devices is displayed.
Step 3 Run:
voice-vlan vlan-id enable
A voice VLAN is configured and the voice VLAN function is enabled on the port.
By default, the voice VLAN function is disabled on ports.
NOTE
l VLAN 1 cannot be configured as a voice VLAN.
l The voice VLAN and default VLAN on a port must be assigned different VLAN IDs to ensure that
every function works properly.
l Only one VLAN on a port can be configured as a voice VLAN at a time.
l If the voice VLAN configured on an interface works in automatic mode, you need to run the port link-
type command to set the interface type to trunk, or hybrid.
l Before deleting a voice VLAN, run the undo voice-vlan enable command to disable the voice VLAN
function.
l The port enabled with the voice VLAN function cannot be configured with VLAN mapping, VLAN
stacking, or traffic policies.
----End
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
90
3.8.3 Configuring an OUI for a Voice VLAN
A voice VLAN-enabled port checks source MAC addresses of received frames. If the source
MAC addresses match OUIs, the frames are considered voice data.
Context
An OUI is a globally-unique identifier assigned by the Institute of Electrical and Electronics
Engineers (IEEE) to a specific equipment vendor. An OUI represents the first 24 bits of a binary
MAC address.
An OUI represents a MAC address segment that is obtained by performing the AND operation
between a 48-bit MAC address and a mask. For example, the MAC address is 1-1-1, and the
mask is FFFF-FF00-0000. The AND operation is performed between the MAC address and the
mask to obtain the OUI 0001-0000-0000. If the first 24 bits of the MAC address of a device are
the same as an OUI, a voice VLAN-enabled port considers the device as a voice device and data
from the device as voice data.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
voice-vlan mac-address mac-address mask oui-mask [ description text ]
An OUI is configured.
l The mac-address value cannot be all 0s or a multicast or broadcast address.
l A device can be configured with a maximum of 16 OUIs. When the device is configured
with 16 OUIs, subsequent configurations will not take effect.
l When using the undo voice-vlan mac-address command to delete an OUI, specify the mac-
address value in this command as the result of the AND operation by using the configured
MAC address and mask.
NOTE
When the source MAC address of a packet matches the OUI, the S3700 changes the priority of the packet
basing on the configuration of 3.8.5 (Optional) Configuring an 802.1p Priority and a DSCP Value for
the Voice VLAN to improve the transmission quality.
----End
3.8.4 (Optional) Setting an Aging Timer for a Voice VLAN
In automatic mode, a voice VLAN-enabled port learns source MAC addresses of frames from
voice devices, adds ports connecting the device to voice devices to a voice VLAN, and uses the
voice VLAN aging timer to control the number of ports in the voice VLAN.
Context
The aging timer of a voice VLAN is effective only when ports are automatically added to the
voice VLAN.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
91
If a voice VLAN-enabled port does not receive voice data from a voice device before the aging
timer expires, the port will be automatically deleted from the voice VLAN. If the port receives
voice data from the voice device again, the port will be automatically added to the voice VLAN
and the aging timer will be reset.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
voice-vlan aging-time minutes
The aging timer is set for a voice VLAN.
The aging timer value ranges from 5 to 43200, in minutes. The default value is 1440 minutes.
----End
3.8.5 (Optional) Configuring an 802.1p Priority and a DSCP Value
for the Voice VLAN
Different 802.1p priorities and DiffServ Code Point (DSCP) values can be configured for
different voice VLANs, which makes voice service deployment more flexible.
Context
By default, the 802.1p priority and DSCP value for each voice VLAN are 6 and 46 respectively.
Manual configuration of the 802.1p priority and DSCP value will allow you to plan priorities
for different voice services at will.
NOTE
l The 802.1p priority is indicated by the value in the 3-bit PRI field in each 802.1Q VLAN frame. This
field determines the transmission priority for data packets when a switching device is congested.
l The DSCP value is indicated by the 6 bits in the Type of Service (ToS) field in the IPv4 packet header.
DSCP, as the signaling for DiffServ, is used for QoS guarantee on IP networks. The traffic controller
on the network gateway takes actions merely based on the information carried by the 6 bits.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
voice-vlan remark { 8021p 8021p-value | dscp dscp-value }
*
An 802.1p priority and a DSCP value are configured for a voice VLAN.
By default, the 802.1p priority and DSCP value for a voice VLAN are 6 and 46 respectively.
----End
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
92
3.8.6 (Optional) Configuring the Mode in Which Ports Are Added
to a Voice VLAN
On a switching device, only one VLAN on a port can be configured as a voice VLAN. Ports can
be added to the voice VLAN in either automatic or manual mode.
Context
Ports can be added to a voice VLAN in either of the following modes:
l Automatic mode
A voice VLAN-enabled port learns source MAC addresses of frames from voice devices,
adds ports connecting the device to voice devices to a voice VLAN, and uses the voice
VLAN aging timer to control the number of ports in the voice VLAN. If a voice VLAN-
enabled port does not receive voice data from a voice device before the aging timer expires,
the port will be automatically deleted from the voice VLAN. If the port receives voice data
from the voice device again, the port will be automatically added to the voice VLAN.
l Manual mode
After the voice VLAN function is enabled, ports connected to voice devices must be
manually added to a voice VLAN. Otherwise, the voice VLAN function does not take
effect.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The view of a port connecting the device to users' voice devices is displayed.
Step 3 Run:
voice-vlan mode { auto | manual }
The mode in which ports are added to a voice VLAN is configured.
By default, ports are automatically added to a voice VLAN.
l If the auto parameter is configured, ports will be automatically added to a voice VLAN.
l If the manual parameter is configured, ports will be manually added to a voice VLAN.
If trunk ports are connected to voice devices, run the port trunk allow-pass vlan
{ { vlan-id1 [ to vlan-id2 ] } &<1-10> | all } command to manually add these ports to a
voice VLAN.
If hybrid ports are connected to voice devices, do as follows as required:
Run the port hybrid untagged vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }
command to manually add these ports to a voice VLAN in untagged mode.
Run the port hybrid tagged vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }
command to manually add these ports to a voice VLAN in tagged mode.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
93
NOTE
In Access ports cannot be automatically added to a voice VLAN. To add a port of the access type to the
voice VLAN, run the port link-type command to change the port type to trunk or hybrid.
----End
3.8.7 (Optional) Configuring the Working Mode for a Voice VLAN
A voice VLAN works in either security or ordinary mode to transmit merely voice data or both
voice and non-voice data.
Context
Based on the data filtering mechanism, a voice VLAN works in either security or ordinary mode:
l Security mode
A voice VLAN-enabled inbound port transmits only frames of which the source MAC
addresses match OUIs configured on the device, discards the voice data not belong to the
current voice VLAN and the other data can be forwarded normally.
The security mode prevents a voice VLAN from being attacked by malicious data flows,
but consumes system resources to check frames.
l Ordinary mode
A voice VLAN-enabled inbound port transmits both voice and non-voice data. The port
does not compare source MAC addresses in received frames with configured OUIs,
exposing a voice VLAN to malicious attacks.
NOTE
Transmitting voice and service data at the same time in a voice VLAN is not recommended. If a voice
VLAN must transmit both voice and service data, ensure that the voice VLAN works in ordinary mode.
Table 3-8 shows how to process frames in different voice VLAN working modes.
Table 3-8 Frame processing in different voice VLAN working modes
Voice VLAN
Working Mode
Frame Processing Mode
Security mode If the source MAC address of a frame and the OUI do not match,
the priority of the frame is not changed and the frame is prohibited
from forwarding in the voice VLAN.
Ordinary mode If the source MAC address of a frame and the OUI do not match,
the priority of the frame is not changed and the frame is allowed to
be forwarded in the voice VLAN.
Procedure
l Security mode
1. Run the system-view command to enter the system view.
2. Run the interface interface-type interface-number command to enter the view of a
port connecting the device to users' voice devices.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
94
3. Run the voice-vlan security enable command to configure the voice VLAN work in
security mode.
By default, a voice VLAN works in security mode.
l Ordinary mode
1. Run the system-view command to enter the system view.
2. Run the interface interface-type interface-number command to enter the view of a
port connecting the device to users' voice devices.
3. Run the undo voice-vlan security enable command to configure the voice VLAN
work in ordinary mode.
By default, a voice VLAN works in security mode.
----End
3.8.8 (Optional) Configuring a Port to Communicate with a Voice
Device of Another Vendor
The voice VLAN legacy function can be configured to allow Huawei datacom devices to identify
packets of proprietary protocols of other vendors.
Context
After VoIP devices of some vendors are powered on, proprietary protocol packets but not DHCP
packets are sent to apply for IP addresses. To help Huawei datacom devices communicate with
voice devices of other vendors, you can enable the voice VLAN legacy function. This allows
Huawei devices to identify packets of proprietary protocols of other vendors.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The view of a port connecting the device to users' voice devices is displayed.
Step 3 Run:
voice-vlan legacy enable
The port is configured to communicate with a voice device of another vendor.
By default, ports on Huawei devices cannot communicate with voice devices of other vendors.
----End
3.8.9 Checking the Configuration
After a voice VLAN is configured, you can view information about the voice VLAN, including
the OUI, working mode, security mode or ordinary mode, aging timer value, the 802.1p priority
and DSCP value as well as the configuration of the port enabled with the voice VLAN function.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
95
Prerequisite
The configurations of a voice VLAN are complete.
Procedure
l Run the display voice-vlan [ vlan-id ] status command to check information about the
voice VLAN, including the working mode, security mode, aging timer value and the 802.1p
priority and DSCP value as well as the configuration of the port enabled with the voice
VLAN function.
l Run the display voice-vlan oui command to check information about the OUI of the voice
VLAN, including the mask and description of the OUI.
----End
3.9 Configuring an mVLAN to Implement Integrated
Management
Configuring an mVLAN allows users to use the IP address of the VLANIF interface
corresponding to the mVLAN to log in to a management switch to manage devices attached to
the switch.
3.9.1 Establishing the Configuration Task
Before configuring an mVLAN to implement integrated management, familiarize yourself with
the applicable environment, complete the pre-configuration tasks, and obtain the data required
for the configuration. This will help you complete the configuration task quickly and accurately.
Applicable Environment
An mVLAN can be configured to help a user use an NMS to manage indirectly-connected
devices.
After an mVLAN is configured, a user can use the IP address of the VLANIF interface
corresponding to the mVLAN to telnet to a management switch and manage devices attached
to the switch.
Pre-configuration Tasks
Before configuring an mVLAN, complete the following task:
l Creating a VLAN
Data Preparation
To configure an mVLAN, you need the following data.
No. Data
1 VLAN ID
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
96
3.9.2 Configuring an mVLAN
An mVLAN allows a user to use the IP address of the VLANIF interface corresponding to the
mVLAN to telnet to a management switch to manage devices attached to the switch.
Do as follows on the device that requires an mVLAN:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
vlan vlan-id
The VLAN view is displayed.
Step 3 Run:
management-vlan
An mVLAN is configured.
Only a trunk or hybrid port can be added to an mVLAN.
After the undo management-vlan command is used for an mVLAN, the mVLAN becomes an
ordinary VLAN, to which access, trunk, or hybrid ports can be added.
----End
3.9.3 Configuring a VLANIF Interface for an mVLAN
You need to use the IP address of the VLANIF interface corresponding to an mVLAN to telnet
to a management switch to manage attached devices.
Do as follows on the device that requires an mVLAN:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif vlan-id
A VLANIF interface is created and the VLAIF interface view is displayed.
The ID of the VLANIF interface must be the ID of a configured mVLAN.
Step 3 Run:
ip address ip-address { mask | mask-length } [ sub ]
After assigning an IP address to the VLANIF interface, you can run the telnet command to log
in to a management switch to manage attached devices.
----End
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
97
3.9.4 Checking the Configuration
After an mVLAN is configured, you can check information about the mVLAN.
Prerequisite
The configurations of an mVLAN are complete.
Procedure
l Run the display vlan command to check information about the mVLAN. The command
output shows information about the mVLAN in the line started with an asterisk sign (*).
----End
3.10 Maintaining VLAN
A command of clearing statistics helps to locate the faults in a VLAN.
3.10.1 Clearing the Statistics of VLAN Packets
Before collecting traffic statistics in a specified time period on an interface, you need to reset
the original statistics on the interface.
Context
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 command in the user view:
Procedure
l Run the reset vlan vlan-id statistics command to clear packets of a specified VLAN
statistics.
----End
3.11 Configuration Examples
This section provides several examples of VLAN configuration.
3.11.1 Example for Configuring Interface-based VLANs
It is easy to divide a LAN into VLANs based on ports. After ports are added to different VLANs,
users in the same VLAN can directly communicate with each other, whereas users in different
VLANs cannot directly communicate with each other.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
98
Networking Requirements
An enterprise has multiple departments. It is required that departments in charge of the same
service can communicate with each other, and departments in charge of different services cannot
communicate with each other.
It is required that on the network shown in Figure 3-9, the requirements are as follows:
l Department 1 and Department 2 are isolated from Department 3 and Department 4.
l Department 1 and Department 2 can communicate with each other.
l Department 3 and Department 4 can communicate with each other.
Figure 3-9 Networking diagram for configuring interface-based VLANs
Eth0/0/1
Eth0/0/2 Eth0/0/3
Eth0/0/4
Group 2
VLAN 3
Switch
VLAN 3
Network
VLAN 2
Department 3 Department 2 Department 4 Department 1
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and determine mappings between employees and VLANs.
2. Configure port types to determine the device connected to each port.
3. Add the ports connected to department 1 and department 2 to VLAN 2 and the ports
connected to department 3 and department 4 to VLAN 3 to prevent employees in department
1 or department 2 from communicating with employees in department 3 or department 4.
Data Preparation
To complete the configuration, you need the following data:
l Eth 0/0/1 and Eth 0/0/2 belong to VLAN 2.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
99
l Eth 0/0/3 and Eth 0/0/4 belong to VLAN 3.
Procedure
Step 1 Configure the Switch.
# Create VLAN 2.
<Quidway> system-view
[Quidway] vlan 2
[Quidway-vlan2] quit
# Set the link type of Eth 0/0/1 to trunk and add Eth 0/0/1 to VLAN 2.
[Quidway] interface ethernet 0/0/1
[Quidway-Ethernet0/0/1] port link-type trunk
[Quidway-Ethernet0/0/1] port trunk allow-pass vlan 2
[Quidway-Ethernet0/0/1] quit
# Set the link type of Eth 0/0/2 to trunk and add Eth 0/0/2 to VLAN 2.
[Quidway]interface ethernet 0/0/2
[Quidway-Ethernet0/0/2] port link-type trunk
[Quidway-Ethernet0/0/2] port trunk allow-pass vlan 2
[Quidway-Ethernet0/0/2] quit
# Create VLAN 3.
[Quidway] vlan 3
[Quidway-vlan3] quit
# Set the link type of Eth 0/0/3 to trunk and add Eth 0/0/3 to VLAN 3.
[Quidway] interface ethernet 0/0/3
[Quidway-Ethernet0/0/3] port link-type trunk
[Quidway-Ethernet0/0/3] port trunk allow-pass vlan 3
[Quidway-Ethernet0/0/3] quit
# Set the link type of Eth 0/0/4 to trunk and add Eth 0/0/4 to VLAN 3.
[Quidway] interface ethernet 0/0/4
[Quidway-Ethernet0/0/4] port link-type trunk
[Quidway-Ethernet0/0/4] port trunk allow-pass vlan 3
[Quidway-Ethernet0/0/4] quit
Step 2 Verify the configuration.
Ping any host in VLAN 3 from a host in VLAN 2. The ping operation fails. This indicates that
Department 1 and Department 2 are isolated from Department 3 and Department 4.
Ping any host in Department 2 from a host in Department 1. The ping operation is successful.
This indicates that Department 1 and Department 2 can communicate with each other.
Ping any host in Department 4 from a host in Department 3. The ping operation is successful.
This indicates that Department 3 and Department 4 can communicate with each other.
----End
Configuration Files
The following lists the configuration file of the Switch.
#
sysname Quidway
#
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
100
vlan batch 2 to 3
#
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2
#
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2
#
interface Ethernet0/0/3
port link-type trunk
port trunk allow-pass vlan 3
#
interface Ethernet0/0/4
port link-type trunk
port trunk allow-pass vlan 3
#
return
3.11.2 Example for Configuring MAC Address-based VLAN
Assignment
MAC address-based VLAN assignment is applicable only to simple networks where network
adapters are not changed frequently.
Networking Requirements
On an enterprise network, the network administrator adds PCs of employees in a department to
the same VLAN. To improve information security, only employees is this department are
allowed to access the intranet.
As shown in Figure 3-10, only PC1, PC2, and PC3 are allowed to access the intranet through
SwitchA and Switch.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
101
Figure 3-10 Network diagram of MAC address-based VLAN assignment
PC1
PC2
PC3
Switch
SwitchA
Network
Eth0/0/1
Eth0/0/1
Eth0/0/2
MAC:22-22-22 MAC:33-33-33 MAC:44-44-44
VLAN 10
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and determine the VLAN that PCs of employees belong to.
2. Add Ethernet interfaces to VLANs.
3. Associate MAC addresses of PC1, PC2, and PC3 with the specified VLAN so that the
Switch can assign the VLAN to packets according to their source MAC addresses.
Data Preparation
To complete the configuration, you need the following data:
l The PVID of Eth0/0/1 on the Switch is 100.
l Eth0/0/1 of the Switch needs to be added to VLAN 10 in untagged mode.
l Eth0/0/2 of the Switch needs to be added to VLAN 10 in tagged mode.
l All the interfaces on SwitchA need to be added to VLAN 1 in untagged mode.
l MAC addresses of PC1, PC2, and PC3 need to be associated with VLAN 10.
Procedure
Step 1 Configure the Switch.
# Create VLANs.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
102
<Quidway> system-view
[Quidway] vlan batch 10 100
# Set the PVID of interfaces and add interfaces to the VLANs.
[Quidway] interface ethernet 0/0/1
[Quidway-Ethernet0/0/1] port hybrid pvid vlan 100
[Quidway-Ethernet0/0/1] port hybrid untagged vlan 10
[Quidway-Ethernet0/0/1] quit
[Quidway] interface ethernet 0/0/2
[Quidway-Ethernet0/0/2] port hybrid tagged vlan 10
[Quidway-Ethernet0/0/2] quit
# Associate MAC addresses of PC1, PC2, and PC3 with VLAN 10.
[Quidway] vlan 10
[Quidway-Vlan10] mac-vlan mac-address 22-22-22
[Quidway-Vlan10] mac-vlan mac-address 33-33-33
[Quidway-Vlan10] mac-vlan mac-address 44-44-44
[Quidway-Vlan10] quit
# Enable MAC address-based VLAN assignment on Eth0/0/1.
[Quidway] interface ethernet 0/0/1
[Quidway-Ethernet0/0/1] mac-vlan enable
[Quidway-Ethernet0/0/1] quit
Step 2 Verify the configuration.
PC1, PC2, and PC3 can access the intranet, whereas PCs of non-employees cannot access the
intranet.
----End
Configuration Files
Configuration file of the Switch
#
sysname Quidway
#
vlan batch 10 100
#
vlan 10
mac-vlan mac-address 0022-0022-0022
mac-vlan mac-address 0033-0033-0033
mac-vlan mac-address 0044-0044-0044
#
interface Ethernet0/0/1
port hybrid pvid vlan 100
port hybrid untagged vlan 10
mac-vlan enable
#
interface Ethernet0/0/2
port hybrid tagged vlan 10
#
return
3.11.3 Example for Configuring IP Subnet-based VLAN
Assignment
After a LAN is divided into VLANs based on IP subnets, frames from a certain network segment
or IP address are transmitted in a specified VLAN. This reduces the configuration workload of
network administrators and facilitates management.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
103
Networking Requirements
A company has multiple services including the IPTV, VoIP, and Internet access services. Each
service uses a unique IP address. Packets of the same service must be transmitted in the same
VLAN and packets of different services must be transmitted in different VLANs.
On the network shown in Figure 3-11, a switch receives Internet, IPTV, and voice services from
users of which IP addresses are diverse. It is required that different types of services be
transmitted in separate VLANs. This allows each type of services to be sent to a remote dedicated
server.
Figure 3-11 Networking diagram of IP subnet-based VLAN assignment
Internet
IPTV
server
Voice
Network
192.168.1.2
192.168.2.2
192.168.3.2
Eth0/0/1
Eth0/0/3
Eth0/0/2
Switch
RouterA
Eth0/0/4
RouterB
RouterC
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and determine mappings between services and VLANs.
2. Associate IP subnets with VLANs.
The switch determines the VLAN mapped to a frame based on the source IP address carried
in the frame. New nodes can be deployed on the network without too much configuration.
The switch is able to add each new node to a corresponding VLAN based on the network
address of the node.
3. Configure a port to allow frames with specified VLAN IDs to pass through.
4. Configure the highest priority for IP subnet-based VLAN assignment.
5. Enable IP subnet-based VLAN assignment.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
104
Data Preparation
To complete the configuration, you need the following data:
l VLANs to which Eth 0/0/1 needs to be added in untagged mode: VLAN 100, VLAN 200,
and VLAN 300
l VLANs to which Eth 0/0/2, Eth 0/0/3, and Eth 0/0/4 need to be added in tagged mode
respectively: VLAN 100, VLAN 200, and VLAN 300
l Configuration data for IP subnet-based VLAN assignment, as shown in Table 3-9
Table 3-9 Configuration data for IP subnet-based VLAN assignment
VLAN ID IP Subnet
Index
Source IP
Address
Subnet Mask 802.1p Priority
100 1 192.168.1.2 255.255.255.0 2
200 1 192.168.2.2 255.255.255.0 3
300 1 192.168.3.2 255.255.255.0 4
Procedure
Step 1 Create VLANs.
# Create VLAN 100, VLAN 200, and VLAN 300 on the Switch.
<Quidway> system-view
[Quidway] vlan batch 100 200 300
Step 2 Configure interfaces.
# Set the link type of Eth 0/0/1 to hybrid and add it to VLAN 100, VLAN 200, and VLAN 300.
[Quidway] interface ethernet 0/0/1
[Quidway-Ethernet0/0/1] port link-type hybrid
[Quidway-Ethernet0/0/1] port hybrid untagged vlan 100 200 300
[Quidway-Ethernet0/0/1] quit
# Add Eth 0/0/2 of the Switch to VLAN 100.
[Quidway] interface ethernet 0/0/2
[Quidway-Ethernet0/0/2] port link-type trunk
[Quidway-Ethernet0/0/2] port trunk allow-pass vlan 100
[Quidway-Ethernet0/0/2] quit
# Add Eth 0/0/3 of the Switch to VLAN 200.
[Quidway] interface ethernet 0/0/3
[Quidway-Ethernet0/0/3] port link-type trunk
[Quidway-Ethernet0/0/3] port trunk allow-pass vlan 200
[Quidway-Ethernet0/0/3] quit
# Add Eth 0/0/4 of the Switch to VLAN 300.
[Quidway] interface ethernet 0/0/4
[Quidway-Ethernet0/0/4] port link-type trunk
[Quidway-Ethernet0/0/4] port trunk allow-pass vlan 300
[Quidway-Ethernet0/0/4] quit
# Enable the IP subnet-based VLAN function on Eth 0/0/1.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
105
[Quidway] interface ethernet 0/0/1
[Quidway-Ethernet0/0/1] ip-subnet-vlan enable
[Quidway-Ethernet0/0/1] quit
Step 3 Configure IP subnet-based VLAN assignment.
# Associate 192.168.1.2 to VLAN 100 and set the 802.1p priority of VLAN 100 to 2.
[Quidway] vlan 100
[Quidway-vlan100] ip-subnet-vlan 1 ip 192.168.1.2 24 priority 2
[Quidway-vlan100] quit
# Associate 192.168.2.2 to VLAN 200 and set the 802.1p priority of VLAN 200 to 3.
[Quidway] vlan 200
[Quidway-vlan200] ip-subnet-vlan 1 ip 192.168.2.2 24 priority 3
[Quidway-vlan200] quit
# Associate IP subnet 192.168.3.2 to VLAN 100 and set the 802.1p priority of VLAN 300 to 4.
[Quidway] vlan 300
[Quidway-vlan300] ip-subnet-vlan 1 ip 192.168.3.2 24 priority 4
[Quidway-vlan300] quit
Step 4 Verify the configuration.
Run the display ip-subnet-vlan vlan all command on the Switch. The following information
is displayed:
[Quidway] display ip-subnet-vlan vlan all
----------------------------------------------------------------
Vlan Index IpAddress SubnetMask Priority
----------------------------------------------------------------
100 1 192.168.1.2 255.255.255.0 2
200 1 192.168.2.2 255.255.255.0 3
300 1 192.168.3.2 255.255.255.0 4
----------------------------------------------------------------
ip-subnet-vlan count: 3 total count: 3
----End
Configuration Files
l Configuration file of the Switch
#
sysname Quidway
#
vlan batch 100 200 300
#
vlan 100
ip-subnet-vlan 1 ip 192.168.1.2 255.255.255.0 priority 2
#
vlan 200
ip-subnet-vlan 1 ip 192.168.2.2 255.255.255.0 priority 3
#
vlan 300
ip-subnet-vlan 1 ip 192.168.3.2 255.255.255.0 priority 4
#
interface Ethernet0/0/1
port hybrid untagged vlan 100 200 300
ip-subnet-vlan enable
#
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 100
#
interface Ethernet0/0/3
port link-type trunk
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
106
port trunk allow-pass vlan 200
#
interface Ethernet0/0/4
port link-type trunk
port trunk allow-pass vlan 300
#
return
3.11.4 Example for Configuring Protocol-based VLAN Assignment
Protocol-based VLAN assignment reduces manual configuration workload and allows users to
easily join a VLAN, transfer from one VLAN to another, and exit from a VLAN.
Networking Requirements
A company has multiple services including the IPTV, VoIP, and Internet access services. Each
service uses a unique protocol. It is required that services of the same type be transmitted in a
VLAN and services of different types be transmitted in separate VLANs to facilitate
management and reduce manual VLAN configuration workload.
As shown in Figure 3-12, the Switch receives packets of multiple services that use different
protocols. Users in VLAN 10 use IPv4 to communicate with remote users, and users in VLAN
20 use IPv6 to communicate with the servers. The Switch needs to assign VLANs to packets of
different services and transmit packets with different VLAN IDs to different servers.
Figure 3-12 Network diagram of protocol-based VLAN assignment
Internet
Eth0/0/1
Eth0/0/3
Eth0/0/2
Switch
RouterA
IPv6
VLAN 20
IPv4
VLAN 10
RouterB
Voice
Network
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
107
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and determine mappings between services and VLANs.
2. Associate protocols with VLANs.
The Switch assigns a VLAN ID to a frame based on the protocol or protocol suite to which
the frame belongs. As long as the protocols of user devices keep unchanged, users do not
need to be added to new VLANs regardless of whether their locations change, whether
network cards of PCs are changed, or whether users locate in the same network segment.
3. Configure a port to allow frames with specified VLAN IDs to pass through.
4. Associate ports with VLANs.
After receiving a frame associated with a specified protocol, the system automatically
assigns the VLAN ID associated with the protocol to the frame.
Data Preparation
To complete the configuration, you need the following data:
l VLANs to which Eth0/0/1 of the Switch needs to be added in untagged mode: VLAN 10
and VLAN 20
l VLANs to which Eth0/0/2 and Eth0/0/3 of the Switch need to be added in tagged mode:
VLAN 10 and VLAN 20
l Protocol associated with each VLAN
VLAN 10:IPv4
VLAN 20:IPv6
Procedure
Step 1 Create VLANs.
<Quidway> system-view
[Quidway] sysname Switch
[Switch] vlan batch 10 20
Step 2 Configure protocol-based VLANs.
# Associate IPv4 with VLAN 10.
[Switch] vlan 10
[Switch-vlan10] protocol-vlan ipv4
[Switch-vlan10] quit
# Associate IPv6 with VLAN 20.
[Switch] vlan 20
[Switch-vlan20] protocol-vlan ipv6
[Switch-vlan20] quit
Step 3 Associate interfaces with protocol-based VLANs.
# Associate Eth0/0/1 with VLAN 10 and set the 802.1p priority of VLAN 10 to 5.
[Switch] interface ethernet 0/0/1
[Switch-Ethernet0/0/1] protocol-vlan vlan 10 all priority 5
# Associate Eth0/0/1 with VLAN 20 and set the 802.1p priority of VLAN 20 to 6.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
108
[Switch-Ethernet0/0/1] protocol-vlan vlan 20 all priority 6
[Switch-Ethernet0/0/1] quit
Step 4 Configure interfaces.
# Add Eth0/0/1 to VLAN 10 and VLAN 20 so that Eth0/0/1 allows packets of VLAN 10 and
VLAN 20 to pass through.
[Switch] interface ethernet 0/0/1
[Switch-Ethernet0/0/1] port link-type hybrid
[Switch-Ethernet0/0/1] port hybrid untagged vlan 10 20
[Switch-Ethernet0/0/1] quit
# Add Eth0/0/2 to VLAN 10 so that Eth0/0/2 allows packets of VLAN 10 to pass through.
[Switch] interface ethernet 0/0/2
[Switch-Ethernet0/0/2] port link-type trunk
[Switch-Ethernet0/0/2] port trunk allow-pass vlan 10
[Switch-Ethernet0/0/2] quit
# Add Eth0/0/3 to VLAN 20 so that Eth0/0/3 allows packets of VLAN 20 to pass through.
[Switch] interface ethernet 0/0/3
[Switch-Ethernet0/0/3] port link-type trunk
[Switch-Ethernet0/0/3] port trunk allow-pass vlan 20
[Switch-Ethernet0/0/3] quit
Step 5 Verify the configuration.
After completing the configuration, run the display protocol-vlan interface all command, and
you can view the configuration of protocol-based VLANs on Eth0/0/1. For example:
<Switch> display protocol-vlan interface all
-------------------------------------------------------------------------------
Interface VLAN Index Protocol Type Priority
-------------------------------------------------------------------------------
Ethernet0/0/1 10 0 ipv4 5
Ethernet0/0/1 20 0 ipv6 6
----End
Configuration Files
l Configuration file of the Switch
#
sysname Switch
#
vlan batch 10 20
#
vlan 10
protocol-vlan 0 ipv4
vlan 20
protocol-vlan 0 ipv6
#
interface Ethernet0/0/1
port hybrid untagged vlan 10 20
protocol-vlan vlan 10 0 priority 5
protocol-vlan vlan 20 0 priority 6
#
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10
#
interface Ethernet0/0/3
port link-type trunk
port trunk allow-pass vlan 20
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
109
#
return
3.11.5 Example for Implementing Communication Between VLANs
by Using VLANIF Interfaces
A Layer 3 switch can replace a router to implement communications between VLANs by using
VLANIF interfaces.
Networking Requirements
Departments of an enterprise are located on different network segments and use same services
such as Internet access and VoIP. Departments in different VLANs need to use the same service,
so communication between VLANs must be implemented.
As shown in Figure 3-13, department 1 and department 2 use the same service but belong to
different VLANs and are located on different network segments. Users in department 1 and
department 2 need to communicate with each other.
Figure 3-13 Communication between VLANs using VLANIF interfaces
SwitchA
Switch
Eth0/0/1
VLAN 10
VLAN 20
PC1
10.10.10.2/24 20.20.20.2/24
Department1
PC2
Department2
Eth0/0/1
Eth0/0/2 Eth0/0/3
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs on the switches for different departments.
2. Add Layer 2 interfaces to the VLANs so that packets of the VLANs can pass through the
Layer 2 interfaces.
3. On the Layer 3 switch, create VLANIF interfaces corresponding to the VLANs and
configure IP addresses for the VLANIF interfaces to implement Layer 3 communication.
NOTE
To implement communication between VLANs, hosts in each VLAN must use the IP address of the
corresponding VLANIF interface as gateway address.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
110
Data Preparation
To complete the configuration, you need the following data:
l Eth0/0/1 of the Switch needs to be added to VLAN 10 and VLAN 20.
l The IP address of VLANIF10 on the Switch is 10.10.10.1/24.
l The IP address of VLANIF20 on the Switch is 20.20.20.1/24.
l Eth0/0/1of SwitchA needs to be added to VLAN 10 and VLAN 20.
l Eth0/0/2 of SwitchA needs to be added to VLAN 10.
l Eth0/0/3 of SwitchA needs to be added to VLAN 20.
Procedure
Step 1 # Configure the Switch.
# Create VLANs.
<Quidway> system-view
[Quidway] vlan batch 10 20
# Add Eth0/0/1 to VLANs.
[Quidway] interface ethernet 0/0/1
[Quidway-Ethernet0/0/1] port link-type trunk
[Quidway-Ethernet0/0/1] port trunk allow-pass vlan 10 20
[Quidway-Ethernet0/0/1] quit
# Assign IP addresses to VLANIF interfaces.
[Quidway] interface vlanif 10
[Quidway-Vlanif10] ip address 10.10.10.1 24
[Quidway-Vlanif10] quit
[Quidway] interface vlanif 20
[Quidway-Vlanif20] ip address 20.20.20.1 24
[Quidway-Vlanif20] quit
Step 2 Configure SwitchA.
# Create VLANs.
<Quidway> system-view
[Quidway] vlan batch 10 20
# Add interfaces to VLANs.
[Quidway] interface ethernet 0/0/1
[Quidway-Ethernet0/0/1] port link-type trunk
[Quidway-Ethernet0/0/1] port trunk allow-pass vlan 10 20
[Quidway-Ethernet0/0/1] quit
[Quidway] interface ethernet 0/0/2
[Quidway-Ethernet0/0/2] port link-type access
[Quidway-Ethernet0/0/2] port default vlan 10
[Quidway-Ethernet0/0/2] quit
[Quidway] interface ethernet 0/0/3
[Quidway-Ethernet0/0/2] port link-type access
[Quidway-Ethernet0/0/2] port default vlan 20
[Quidway-Ethernet0/0/3] quit
Step 3 Verify the configuration.
On PC1 in VLAN 10, set the default gateway address to 10.10.10.1/24, which is the IP address
of VLANIF10.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
111
On PC2 in VLAN 20, set the default gateway address to 20.20.20.1/24, which is the IP address
of VLANIF20.
After the preceding configurations are complete, PC1 in VLAN 10 and PC2 in VLAN 20 can
communicate.
----End
Configuration Files
Configuration file of the Switch
#
sysname Quidway
#
vlan batch 10 20
#
interface Vlanif10
ip address 10.10.10.1 255.255.255.0
#
interface Vlanif20
ip address 20.20.20.1 255.255.255.0
#
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
#
return
Configuration file of SwitchA
#
sysname Quidway
#
vlan batch 10 20
#
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
#
interface Ethernet0/0/2
port link-type access
port default vlan 10
#
interface Ethernet0/0/3
port link-type access
port default vlan 20
#
return
3.11.6 Example for Configuring VLAN Aggregation
This part describes how to configure communication between VLANs with less IP addresses.
Networking Requirements
Assume that an enterprise has many departments and IP addresses of these departments are on
the same network segment, to improve the service security, IP address of employee users in
different departments are added to different VLANs. Employee users in different departments
need to communicate with each other.
As shown in Figure 3-14, IP addresses of the R&D department and test department belong to
different VLANs. It is required that employee users in different VLANs communicate with each
other.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
112
Figure 3-14 Typical networking of VLAN configuration
VLAN 2 VLAN 3
VLAN4
Switch
VLAN3 VLAN2
VLANIF4:100.1.1.12/24
Development
Department
Test
Department
Eth0/0/1
Eth0/0/2
Eth0/0/3
Eth0/0/4
Configuration Roadmap
The configuration roadmap is as follows:
1. Add interfaces of the Switch to sub-VLANs.
2. Add the sub-VLANs to a super-VLAN.
3. Configure the IP address for the super-VLAN.
4. Configure proxy ARP for the super-VLAN.
Data Preparation
To complete the configuration, you need the following data:
l Eth 0/0/1 and Eth 0/0/2 belong to VLAN 2.
l Eth 0/0/3 and Eth 0/0/4 belong to VLAN 3.
l The VLAN ID of the super-VLAN is 4.
l The IP address of the super-VLAN is 100.1.1.12.
Procedure
Step 1 Set the interface type.
# Configure Eth 0/0/1 as an access interface.
<Quidway> system-view
[Quidway] interface ethernet 0/0/1
[Quidway-Ethernet0/0/1] port link-type access
[Quidway-Ethernet0/0/1] quit
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
113
# Configure Eth 0/0/2 as an access interface.
<Quidway> system-view
[Quidway] interface ethernet 0/0/2
[Quidway-Ethernet0/0/2] port link-type access
[Quidway-Ethernet0/0/2] quit
# Configure Eth 0/0/3 as an access interface.
<Quidway> system-view
[Quidway] interface ethernet 0/0/3
[Quidway-Ethernet0/0/3] port link-type access
[Quidway-Ethernet0/0/3] quit
# Configure Eth 0/0/4 as an access interface.
<Quidway> system-view
[Quidway] interface ethernet 0/0/4
[Quidway-Ethernet0/0/4] port link-type access
[Quidway-Ethernet0/0/4] quit
Step 2 Configure VLAN 2.
# Create VLAN 2.
[Quidway] vlan 2
# Add Eth 0/0/1 and Eth 0/0/2 to VLAN 2.
[Quidway-vlan2] port ethernet 0/0/1 0/0/2
[Quidway-vlan2] quit
Step 3 Configure VLAN 3.
# Create VLAN 3.
[Quidway] vlan 3
# Add Eth 0/0/3 and Eth 0/0/4 to VLAN 3.
[Quidway-vlan3] port ethernet 0/0/3 0/0/4
[Quidway-vlan3] quit
Step 4 Configure VLAN 4.
# Configure the super-VLAN.
[Quidway] vlan 4
[Quidway-vlan4] aggregate-vlan
[Quidway-vlan4] access-vlan 2 to 3
# Configure the VLANIF interface.
[Quidway] interface vlanif 4
[Quidway-Vlanif4] ip address 100.1.1.12 255.255.255.0
[Quidway-Vlanif4] quit
Step 5 Configure the personal computers.
Configure the IP address for each personal computer and make them reside in the same network
segment with VLAN 4.
After the preceding configuration, the personal computers and the Switch can ping each other,
but the computers in VLAN 2 and the computers in VLAN 3 cannot ping each other.
Step 6 Configure proxy ARP.
[Quidway] interface vlanif 4
[Quidway-Vlanif4] arp-proxy inter-sub-vlan-proxy enable
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
114
Step 7 Verify the configuration.
After the preceding configuration, the computers in VLAN 2 and the computers in VLAN 3 can
ping each other.
----End
Configuration Files
Configuration file of the Switch
#
sysname Quidway
#
vlan batch 2 to 4
#
vlan 4
aggregate-vlan
access-vlan 2 to 3
#
interface Vlanif4
ip address 100.1.1.12 255.255.255.0
arp-proxy inter-sub-vlan-proxy enable
#
interface Ethernet0/0/1
port link-type access
port default vlan 2
#
interface Ethernet0/0/2
port link-type access
port default vlan 2
#
interface Ethernet0/0/3
port link-type access
port default vlan 3
#
interface Ethernet0/0/4
port link-type access
port default vlan 3
#
return
3.11.7 Example for Configuring the MUX VLAN
MUX VLAN isolates Layer 2 traffic of different interfaces in a VLAN. It allows some employee
users of an enterprise to communicate with each other and isolates some employee users from
each other.
Networking Requirements
In an enterprise network, all employees of the enterprise can access the enterprise's server. It is
required that some employees be able to communicate with each other, whereas some employees
not communicate with each other.
As shown in Figure 3-15, in an enterprise network, all employees of the enterprise can access
the enterprise's server. It is required that some employees be able to communicate with each
other, whereas some employees not communicate with each other.
For an enterprise with a large number of employees, each employee that is prohibited from
communicating with another needs to be added to a separate VLAN if the preceding scheme is
used. This wastes VLAN ID resources and imposes an additional configuration workload on the
network administrator.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
115
Configuring a MUX VLAN on the switch connected to PCs helps to save VLAN ID resources,
reduce the configuration workload of the network administrator, and facilitate network
maintenance.
Figure 3-15 Typical networking of MUX VLAN configuration
VLAN3 VLAN4 VLAN2
HostA
HostE HostD HostC HostB
Eth0/0/2
Eth0/0/1
Eth0/0/3 Eth0/0/4 Eth0/0/5
Switch
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the MUX VLAN.
2. Configure the group VLAN.
3. Configure the separate VLAN.
4. Add interfaces to the VLAN and enable the MUX VLAN function.
Data Preparation
To complete the configuration, you need the following data:
l Eth 0/0/1 belongs to VLAN 2.
l Eth 0/0/2 and Eth 0/0/3 belong to VLAN 3.
l Eth 0/0/4 and Eth 0/0/5 belong to VLAN 4.
Procedure
Step 1 Configure the MUX VLAN.
# Create VLAN 2, VLAN 3, and VLAN 4.
<Quidway> system-view
[Quidway] vlan batch 2 3 4
[Quidway] quit
# Configure the MUX VLAN, subordinate VLAN, and interfaces.
<Quidway> system-view
[Quidway] vlan 2
[Quidway-vlan2] mux-vlan
[Quidway-vlan2] subordinate group 3
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
116
[Quidway-vlan2] subordinate separate 4
[Quidway-vlan2] quit
[Quidway] interface ethernet 0/0/1
[Quidway-Ethernet0/0/1] port link-type access
[Quidway-Ethernet0/0/1] port default vlan 2
[Quidway-Ethernet0/0/1] port mux-vlan enable
[Quidway-Ethernet0/0/1] quit
[Quidway] interface ethernet 0/0/2
[Quidway-Ethernet0/0/2] port link-type access
[Quidway-Ethernet0/0/2] port default vlan 3
[Quidway-Ethernet0/0/2] port mux-vlan enable
[Quidway-Ethernet0/0/2] quit
[Quidway] interface ethernet 0/0/3
[Quidway-Ethernet0/0/3] port link-type access
[Quidway-Ethernet0/0/3] port default vlan 3
[Quidway-Ethernet0/0/3] port mux-vlan enable
[Quidway-Ethernet0/0/3] quit
[Quidway] interface ethernet 0/0/4
[Quidway-Ethernet0/0/4] port link-type access
[Quidway-Ethernet0/0/4] port default vlan 4
[Quidway-Ethernet0/0/4] port mux-vlan enable
[Quidway-Ethernet0/0/4] quit
[Quidway] interface ethernet 0/0/5
[Quidway-Ethernet0/0/5] port link-type access
[Quidway-Ethernet0/0/5] port default vlan 4
[Quidway-Ethernet0/0/5] port mux-vlan enable
[Quidway-Ethernet0/0/5] quit
Step 2 Verify the configuration.
Host A can ping Hosts B to E. Hosts B to E can also ping Host A.
Host B and Host C can ping each other.
Host D and Host E cannot ping each other.
Host B and Host C cannot ping Host D or host E. Host D and Host E cannot ping Host B or Host
C.
----End
Configuration Files
Configuration file of the Switch
#
sysname Quidway
#
vlan batch 2 to 4
#
vlan 2
mux-vlan
subordinate group 3
subordinate separate 4
#
interface Ethernet0/0/1
port link-type access
port default vlan 2
port mux-vlan enable
#
interface Ethernet0/0/2
port link-type access
port default vlan 3
port mux-vlan enable
#
interface Ethernet0/0/3
port link-type access
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
117
port default vlan 3
port mux-vlan enable
#
interface Ethernet0/0/4
port link-type access
port default vlan 4
port mux-vlan enable
#
interface Ethernet0/0/5
port link-type access
port default vlan 4
port mux-vlan enable
#
return
3.11.8 Example for Configuring a Voice VLAN in Auto Mode
In this example, voice traffic is transmitted by using a specific VLAN, namely, voice VLAN.
During a certain period, if a voice device becomes faulty or exits from the network, the interface
connected to the voice device will exit from the voice VLAN.
Networking Requirements
Data flows of the HSI, VoIP, and IPTV services are transmitted on a network. Users require
high quality of VoIP services; therefore, voice data flows must be transmitted with a high priority
to ensure the call quality.
As shown in Figure 3-16, after a voice VLAN is configured on the Switch, the Switch checks
whether a data flow received by Ethernet0/0/1 is a voice data flow based on the source MAC
address of the flow. If the data flow is a voice data flow, the Switch changes the priority of the
flow and transmits it in the voice VLAN. If not, the Switch transmits the flow in a common
VLAN without changing the priority of the flow. Ethernet0/0/1 needs to be automatically added
to or deleted from the voice VLAN.
Figure 3-16 Networking diagram of a voice VLAN in auto mode
Switch
Internet
DHCP Server
HSI VoIP IPTV
Eth0/0/1
LAN Switch
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
118
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs.
2. Configure the link type and default VLAN of the interface.
3. Enable the voice VLAN on the interface.
4. Set the mode of adding the interface to the voice VLAN to auto.
5. Set the OUI of the voice VLAN.
6. Set the aging time of the voice VLAN.
7. Set the working mode of the voice VLAN.
Data Preparation
To complete the configuration, you need the following data:
l Voice VLAN and VLAN through which the IP phone applies for an IP address: VLAN 2
and VLAN 6
l OUI and mask: 0011-2200-0000 and ffff-ff00-0000
l Aging time of the voice VLAN: 100 minutes
l The default VLAN of Ethernet0/0/1: VLAN 6
Procedure
Step 1 Create VLANs and configure the interface on the Switch.
# Create VLAN 2 and VLAN 6.
<Quidway> system-view
[Quidway] vlan batch 2 6
# Configure the link type and default VLAN of the interface.
[Quidway] interface ethernet 0/0/1
[Quidway-Ethernet0/0/1] port hybrid pvid vlan 6
[Quidway-Ethernet0/0/1] port hybrid untagged vlan 6
[Quidway-Ethernet0/0/1] quit
Step 2 Configure the voice VLAN on the Switch.
# Configure the voice VLAN on the interface.
[Quidway] interface ethernet 0/0/1
[Quidway-Ethernet0/0/1] voice-vlan 2 enable
# Set the mode of adding the interface to the voice VLAN to auto.
[Quidway-Ethernet0/0/1] voice-vlan mode auto
[Quidway-Ethernet0/0/1] quit
# Set the OUI of the voice VLAN.
[Quidway] voice-vlan mac-address 0011-2200-0000 mask ffff-ff00-0000
# Set the aging time of the voice VLAN.
[Quidway] voice-vlan aging-time 100
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
119
# Set the working mode of the voice VLAN.
[Quidway-Ethernet0/0/1] voice-vlan security enable
Step 3 Verify the configuration.
Run the display voice-vlan oui command to check whether the OUI of the voice VLAN is
correct.
<Quidway> display voice-vlan oui
---------------------------------------------------
OuiAddress Mask Description
---------------------------------------------------
0011-2200-0000 ffff-ff00-0000
Run the display voice-vlan 2 status command to check whether the mode of adding the interface
to the voice VLAN, working mode, and aging time of the voice VLAN are correct.
<Quidway> display voice-vlan 2 status
Voice VLAN Configurations:
---------------------------------------------------
Voice VLAN ID : 2
Voice VLAN status : Enable
Voice VLAN aging time : 100 (minutes)
Voice VLAN 8021p remark : 6
Voice VLAN dscp remark : 46
----------------------------------------------------------
Port Information:
-----------------------------------------------------------
Port Add-Mode Security-Mode Legacy
-----------------------------------------------------------
Ethernet0/0/1 Auto Security Disable
----End
Configuration Files
Configuration file of the Switch
#
sysname Quidway
#
vlan batch 2 6
#
voice-vlan aging-time 100
#
voice-vlan mac-address 0011-2200-0000 mask ffff-ff00-0000
#
interface Ethernet0/0/1
port hybrid pvid vlan 6
port hybrid untagged vlan 6
voice-vlan 2 enable
#
return
3.11.9 Example for Configuring a Voice VLAN in Manual Mode
In manual voice VLAN mode, an interface must be added to the voice VLAN manually after
the voice VLAN function is enabled on the interface. The interface connected to a voice device
can forward voice data packets only after the interface is added to the voice VLAN manually.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
120
Networking Requirements
Data flows of the HSI, VoIP, and IPTV services are transmitted on a network. Users require
high quality of VoIP services; therefore, voice data flows must be transmitted with a high priority
to ensure the call quality.
As shown in Figure 3-17, after a voice VLAN is configured on the Switch, the Switch checks
whether a data flow received by Ethernet0/0/1 is a voice data flow based on the source MAC
address of the data flow. If the data flow is a voice data flow, the Switch changes the priority of
the flow and transmits it in the voice VLAN. If not, the Switch transmits the flow in a common
VLAN without changing the priority of the flow. Ethernet0/0/1 needs to be added to or deleted
from the voice VLAN manually.
Figure 3-17 Networking diagram of a voice VLAN in manual mode
Switch
Internet
DHCP Server
HSI VoIP IPTV
Eth0/0/1
LAN Switch
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs.
2. Configure the link type and default VLAN of the interface.
3. Enable the voice VLAN on the interface.
4. Set the mode of adding the interface to the voice VLAN to manual.
5. Set the OUI of the voice VLAN.
6. Set the working mode of the voice VLAN.
7. Add the interface to the voice VLAN.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
121
Data Preparation
To complete the configuration, you need the following data:
l Voice VLAN and VLAN through which the IP phone applies for an IP address: VLAN 2
and VLAN 6
l OUI and mask: 0011-2200-0000 and ffff-ff00-0000
l The default VLAN of Ethernet0/0/1: VLAN 6
Procedure
Step 1 Create VLANs and configure the interface on the Switch.
# Create VLAN 2 and VLAN 6.
<Quidway> system-view
[Quidway] vlan batch 2 6
# Configure the link type and default VLAN of the interface.
[Quidway] interface ethernet 0/0/1
[Quidway-Ethernet0/0/1] port hybrid pvid vlan 6
[Quidway-Ethernet0/0/1] port hybrid untagged vlan 6
[Quidway-Ethernet0/0/1] quit
Step 2 Configure the voice VLAN on the Switch.
# Configure the voice VLAN on the interface.
[Quidway] interface ethernet 0/0/1
[Quidway-Ethernet0/0/1] voice-vlan 2 enable
# Set the mode of adding the interface to the voice VLAN to manual and add the interface to the
voice VLAN.
[Quidway-Ethernet0/0/1] voice-vlan mode manual
[Quidway-Ethernet0/0/1] port hybrid tagged vlan 2
[Quidway-Ethernet0/0/1] quit
# Set the OUI of the voice VLAN.
[Quidway] voice-vlan mac-address 0011-2200-0000 mask ffff-ff00-0000
# Set the working mode of the voice VLAN.
[Quidway-Ethernet0/0/1] voice-vlan security enable
Step 3 Verify the configuration.
Run the display voice-vlan oui command to check whether the OUI of the voice VLAN is
correct.
<Quidway> display voice-vlan oui
---------------------------------------------------
OuiAddress Mask Description
---------------------------------------------------
0011-2200-0000 ffff-ff00-0000
Run the display voice-vlan 2 status command to check whether the mode of adding the interface
to the voice VLAN, working mode, and aging time of the voice VLAN are correct.
<Quidway> display voice-vlan 2 status
Voice VLAN Configurations:
---------------------------------------------------
Voice VLAN ID : 2
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
122
Voice VLAN status : Enable
Voice VLAN aging time : 1440(minutes)
Voice VLAN 8021p remark : 6
Voice VLAN dscp remark : 46
----------------------------------------------------------
Port Information:
-----------------------------------------------------------
Port Add-Mode Security-Mode Legacy
-----------------------------------------------------------
Ethernet0/0/1 Manual Security Disable
----End
Configuration Files
Configuration file of the Switch
#
sysname Quidway
#
vlan batch 2 6
#
voice-vlan mac-address 0011-2200-0000 mask ffff-ff00-0000
#
interface Ethernet0/0/1
port hybrid pvid vlan 6
port hybrid tagged vlan 2
port hybrid untagged vlan 6
voice-vlan 2 enable
voice-vlan mode manual
#
return
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 3 VLAN Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
123
4 VLAN Mapping Configuration
About This Chapter
This chapter describes the basic knowledge, methods, and examples for configuring VLAN
mapping.
4.1 Introduction to VLAN Mapping
This section describes the concept of VLAN mapping.
4.2 VLAN Mapping Features Supported by the S3700
This section describes VLAN mapping features supported by the S3700.
4.3 Configuring VLAN Mapping of Single VLAN Tag
This section describes how to configure VLAN mapping of single VLAN tag.
4.4 Configuring VLAN Mapping of Double VLAN Tags
This section describes how to configure mapping of double VLAN tags.
4.5 Configuring Global VLAN Mapping
This section describes how to configure global VLAN mapping.
4.6 Configuration Examples
This section provides several examples of VLAN mapping configuration.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 4 VLAN Mapping Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
124
4.1 Introduction to VLAN Mapping
This section describes the concept of VLAN mapping.
VLAN Mapping is a process of mapping the customer VLAN to the carrier VLAN by replacing
the inner and outer VLAN tags of data frames. In this manner, VLAN aggregation is realized,
and services of customers can be transmitted according to the network planning of the carrier.
4.2 VLAN Mapping Features Supported by the S3700
This section describes VLAN mapping features supported by the S3700.
The S3700 supports the following VLAN mapping features:
l Single-tag VLAN mapping based on the interface and VLAN
l Double-tag VLAN mapping based on the interface and VLAN
l Single-tag VLAN mapping based on the interface, VLAN, and 802.1p priority
l Global VLAN mapping
NOTE
Only the S3700HI supports double-tag VLAN mapping.
The S3700HI does not support global VLAN mapping.
4.3 Configuring VLAN Mapping of Single VLAN Tag
This section describes how to configure VLAN mapping of single VLAN tag.
4.3.1 Establishing the Configuration Task
Applicable Environment
When two private networks in different VLANs communicate with each other through a public
network, the user packets may carry the C-VLAN tag when reaching the ISP network. You can
configure VLAN mapping on the edge device of the public network so that the VLANs of private
networks are separated from VLANs of the public network. This saves VLAN resources of the
public network.
Pre-configuration Tasks
Before configuring VLAN mapping, complete the following task:
l Configuring VLANs
Data Preparation
To configure VLAN mapping, you need the following data.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 4 VLAN Mapping Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
125
No. Data
1 VLAN ID before VLAN mapping
2 VLAN ID after VLAN mapping
4.3.2 Replacing a Single Tag
Context
Do as follows on the S3700 where you need to configure single-tag VLAN mapping.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface interface-type interface-number
The Ethernet interface view is displayed.
Step 3 Run:
port link-type trunk
The link type of the interface is set.
By default, the link type of an interface is hybrid.
Step 4 Run:
port trunk allow-pass vlan vlan-id
The interface is added to the VLAN specified by map-vlan.
Step 5 Run:
qinq vlan-translation enable
VLAN translation is enabled on the interface.
Step 6 Run:
port vlan-mapping vlan vlan-id1 [ to vlan-id2 ] map-vlan vlan-id3 [ remark-8021p
8021p-value ]
Single-tag VLAN mapping is configured on the interface.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 4 VLAN Mapping Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
126
NOTE
l VLAN mapping can only be configured on a trunk or hybrid interface, and the interface must be added
to the VLAN specified by map-vlan in tagged mode.
l If multiple VLANs are specified in vlan, the interface needs to be added to these VLANs in tagged
mode, and the VLAN specified by map-vlan cannot be a VLAN corresponding to a VLANIF interface.
l If VLAN mapping and DHCP are configured on the same interface, the interface must be added to the
original VLANs (VLANs before mapping) in tagged mode.
l Limiting MAC address learning on an interface may affect the N:1 VLAN mapping on the interface.
----End
4.3.3 Checking the Configuration
Procedure
l Run the display vlan vlan-id command to check whether the interface is added to the
translated local VLAN.
l Run the display current-configuration command to display information about the VLAN
mapping of single VLAN tag on the interface.
Run the preceding command, and you can obtain the following information:
The interface is added to the translated local VLAN.
The information about the VLAN mapping is correct.
----End
4.4 Configuring VLAN Mapping of Double VLAN Tags
This section describes how to configure mapping of double VLAN tags.
4.4.1 Establishing the Configuration Task
Applicable Environment
When two private networks in different VLANs communicate with each other through a public
network, the user packets may carry one or two VLAN tags when arriving on the public network.
You can configure VLAN mapping of double VLAN tags on the edge device of the public
network so that the VLANs of private networks and public network can be separated. This saves
VLAN resources of the public network. Compared with VLAN mapping of single VLAN tag,
this function is more flexible and used in a wider scope.
NOTE
Only the S3700HI supports double-tag VLAN mapping.
Pre-configuration Tasks
l Before configuring outer-tag VLAN mapping, configure VLANs.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 4 VLAN Mapping Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
127
Data Preparation
To configure double-tag VLAN mapping, you need the following data.
No. Data
1 Outer VLAN ID before VLAN mapping
2 Inner VLAN ID before VLAN mapping
3 Outer VLAN ID after VLAN mapping
4.4.2 Replacing the Outer VLAN Tag
Context
Do as follows on the S3700 where you need to replace the outer VLAN tags.
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:
port link-type trunk
The link type of the interface is set to trunk.
Step 4 Run:
port trunk allow-pass vlan vlan-id
The interface is added to the VLAN whose ID will replace the outer VLAN tag of frames.
Step 5 Run:
qinq vlan-translation enable
VLAN translation is enabled on the interface.
Step 6 Run:
port vlan-mapping vlan vlan-id1 inner-vlan vlan-id2 [ to vlan-id3 ] map-vlan vlan-
id4 [ remark-8021p 8021p-value ]
The outer VLAN tag is replaced.
NOTE
VLAN mapping can only be configured on a trunk or hybrid interface, and the interface must be added to
the VLAN specified by map-vlan in tagged mode.
----End
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 4 VLAN Mapping Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
128
4.4.3 Checking the Configuration
Procedure
l Run the display vlan vlan-id command to check whether the interface is added to the
translated local VLAN.
l Run the display current-configuration command to display information about the
mapping of double VLAN tags on the interface.
Run the preceding command, and you can obtain the following information:
The interface is added to the translated local VLAN.
The information about the VLAN mapping is correct.
----End
4.5 Configuring Global VLAN Mapping
This section describes how to configure global VLAN mapping.
4.5.1 Establishing the Configuration Task
Applicable Environment
To apply VLAN mapping to multiple interfaces, you can configure global VLAN mapping to
simplify configuration.
NOTE
The S3700HI does not support global VLAN mapping.
Pre-configuration Tasks
Before configuring global VLAN mapping, complete the following tasks:
l Creating the VLANs involved in VLAN mapping
l Adding the related interfaces to the translated VLAN in tagged mode
Data Preparations
To configure global VLAN mapping, you need the following data.
No. Data
1 Original VLAN ID
2 Translated VLAN ID
4.5.2 Configuring Global VLAN Mapping
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 4 VLAN Mapping Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
129
Context
Do as follows as the S3700 where global VLAN mapping needs to be configured.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
vlan vlan-id
The VLAN view is displayed.
Step 3 Run:
vlan-mapping map-vlan vlan-id [ remark-8021p 8021p-value ]
Global VLAN mapping is configured.
NOTE
To enable global VLAN mapping to take effect on an interface, ensure that:
l The interface is a hybrid or trunk interface.
l The interface has been added to the translated VLAN in tagged mode.
l VLAN translation is enabled on the interface by using the qinq vlan-translation enable command.
----End
4.5.3 Checking the Configuration
Procedure
l Run the display this command in the VLAN view to check the configuration of global
VLAN mapping.
----End
Example
Run the display this command in the VLAN view.
[Quidway-vlan10] display this
#
vlan 10
vlan-mapping map-vlan 20
#
return
4.6 Configuration Examples
This section provides several examples of VLAN mapping configuration.
4.6.1 Example for Configuring Single-Tag VLAN Mapping
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 4 VLAN Mapping Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
130
Networking Requirements
As shown in Figure 4-1, users in VLAN 6 need to communicate with users in VLAN 5 through
VLAN 10 on the network.
Figure 4-1 Networking diagram of single-tag VLAN mapping configurations
VLAN10
SwitchC SwitchD
SwitchB SwitchA
Eth0/0/1
Eth0/0/1
Eth0/0/3
Eth0/0/2
VLAN6
172.16.0.1/16 172.16.0.2/16 172.16.0.3/16 172.16.0.5/16 172.16.0.6/16 172.16.0.7/16
VLAN5
Eth0/0/1
Eth0/0/1
Eth0/0/2
Eth0/0/3
Network
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs on SwitchA, SwitchB, SwitchC, and SwitchD.
2. Add interfaces of SwitchA, SwitchB, SwitchC, and SwitchD to the corresponding VLANs.
3. Configure single-tag VLAN mapping on Eth 0/0/1 of SwitchA.
4. Configure single-tag VLAN mapping on Eth 0/0/1 of SwitchB.
Data Preparation
To complete the configuration, you need the following data:
l VLAN to be created on SwitchA: VLAN 6
l VLAN to be created on SwitchB: VLAN 5
l VLAN to be created on SwitchC and SwitchD: VLAN 10
Procedure
Step 1 Create VLANs on the Switches.
# Create VLAN 6 on SwitchA.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 4 VLAN Mapping Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
131
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan 6
# Create VLAN 5 on SwitchB.
<Quidway> system-view
[Quidway] sysname SwitchB
[SwitchB] vlan 5
# Create VLAN 10 on SwitchC.
<Quidway> system-view
[Quidway] sysname SwitchC
[SwitchC] vlan 10
# Create VLAN 10 on SwitchD.
<Quidway> system-view
[Quidway] sysname SwitchD
[SwitchD] vlan 10
Step 2 Add interfaces to VLANs.
# Add Eth 0/0/2 and Eth 0/0/3 of SwitchA to VLAN 6.
[SwitchA] interface ethernet 0/0/2
[SwitchA-Ethernet0/0/2] port link-type trunk
[SwitchA-Ethernet0/0/2] port trunk allow-pass vlan 6
[SwitchA-Ethernet0/0/2] quit
[SwitchA] interface ethernet 0/0/3
[SwitchA-Ethernet0/0/3] port link-type trunk
[SwitchA-Ethernet0/0/3] port trunk allow-pass vlan 6
[SwitchA-Ethernet0/0/3] quit
# Add Eth 0/0/1 of SwitchA to VLAN 6.
[SwitchA] interface ethernet 0/0/1
[SwitchA-Ethernet0/0/1] port link-type trunk
[SwitchA-Ethernet0/0/1] port trunk allow-pass vlan 6
[SwitchA-Ethernet0/0/1] quit
# Add Eth 0/0/2 and Eth 0/0/3 of SwitchB to VLAN 5.
[SwitchB] interface ethernet 0/0/2
[SwitchB-Ethernet0/0/2] port link-type trunk
[SwitchB-Ethernet0/0/2] port trunk allow-pass vlan 5
[SwitchB-Ethernet0/0/2] quit
[SwitchB] interface ethernet 0/0/3
[SwitchB-Ethernet0/0/3] port link-type trunk
[SwitchB-Ethernet0/0/3] port trunk allow-pass vlan 5
[SwitchB-Ethernet0/0/3] quit
# Add Eth 0/0/1 of SwitchB to VLAN 5.
[SwitchB] interface ethernet 0/0/1
[SwitchB-Ethernet0/0/1] port link-type trunk
[SwitchB-Ethernet0/0/1] port trunk allow-pass vlan 5
[SwitchB-Ethernet0/0/1] quit
# Add Eth 0/0/1 of SwitchC to VLAN 10.
[SwitchC] interface ethernet 0/0/1
[SwitchC-Ethernet0/0/1] port link-type trunk
[SwitchC-Ethernet0/0/1] port trunk allow-pass vlan 10
[SwitchC-Ethernet0/0/1] quit
# Add Eth 0/0/1 of SwitchD to VLAN 10.
[SwitchD] interface ethernet 0/0/1
[SwitchD-Ethernet0/0/1] port link-type trunk
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 4 VLAN Mapping Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
132
[SwitchD-Ethernet0/0/1] port trunk allow-pass vlan 10
[SwitchD-Ethernet0/0/1] quit
Step 3 Configure single-tag VLAN mapping on the Switches.
# Configure single-tag VLAN mapping on Eth 0/0/1 of SwitchA.
[SwitchA-Ethernet0/0/1] qinq vlan-translation enable
[SwitchA-Ethernet0/0/1] port vlan-mapping vlan 10 map-vlan 6
# Configure single-tag VLAN mapping on Eth 0/0/1 of SwitchB.
[SwitchB-Ethernet0/0/1] qinq vlan-translation enable
[SwitchB-Ethernet0/0/1] port vlan-mapping vlan 10 map-vlan 5
Step 4 Verify the configuration.
The hosts in VLAN 6 and the hosts in VLAN 5 can ping each other.
----End
Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 6
#
interface Ethernet0/0/1
qinq vlan-translation enable
port link-type trunk
port trunk allow-pass vlan 6
port vlan-mapping vlan 10 map-vlan 6
#
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 6
#
interface Ethernet0/0/3
port link-type trunk
port trunk allow-pass vlan 6
#
return
l Configuration file of SwitchB
#
sysname SwitchB
#
vlan batch 5
#
interface Ethernet0/0/1
qinq vlan-translation enable
port link-type trunk
port trunk allow-pass vlan 5
port vlan-mapping vlan 10 map-vlan 5
#
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 5
#
interface Ethernet0/0/3
port link-type trunk
port trunk allow-pass vlan 5
#
return
l Configuration file of SwitchC
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 4 VLAN Mapping Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
133
#
sysname SwitchC
#
vlan batch 10
#
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return
l Configuration file of SwitchD
#
sysname SwitchD
#
vlan batch 10
#
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return
4.6.2 Example for Configuring N:1 VLAN Mapping
Networking Requirements
As shown in Figure 4-2, users in VLAN 100 to VLAN 110 connect to the Internet through the
aggregate switch of the carrier, that is, the Switch.
After user devices are powered on, they send service request packets to the switch of the carrier.
After the user devices pass the authentication, services can be used.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 4 VLAN Mapping Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
134
Figure 4-2 Networking diagram of N:1 VLAN mapping
Eth0/0/1 Switch
SwitchA
SwitchE
VLAN100~110
SwitchD SwitchC
SwitchB
Internet
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the VLANs before and after mapping.
2. Add Eth 0/0/1 of the Switch to the VLANs before and after mapping in tagged mode.
3. Configure VLAN mapping on Eth 0/0/1 of the Switch.
Data preparation
To complete the configuration, you need the following data:
l VLANs before mapping: VLAN 100 to VLAN 110
l VLAN after mapping: VLAN 10
Procedure
Step 1 Configure the Switch.
# Create VLANs.
<Quidway> system-view
[Quidway] vlan batch 10 100 to 110
# Add related Eth 0/0/1 to the VLANs.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 4 VLAN Mapping Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
135
[Quidway] interface ethernet 0/0/1
[Quidway-Ethernet0/0/1] port hybrid tagged vlan 10 100 to 110
# Configure VLAN mapping on Eth 0/0/1.
[Quidway-Ethernet0/0/1] qinq vlan-translation enable
[Quidway-Ethernet0/0/1] port vlan-mapping vlan 100 to 110 map-vlan 10
[Quidway-Ethernet0/0/1] quit
Step 2 Verify the configuration.
Users in VLAN 100 to VLAN 110 can connect to the Internet through the Switch.
----End
Configuration Files
l Configuration file of the Switch
#
sysname Quidway
#
vlan batch 10 100 to 110
#
interface Ethernet0/0/1
qinq vlan-translation enable
port hybrid tagged vlan 10 100 to 110
port vlan-mapping vlan 100 to 110 map-vlan 10
#
return
4.6.3 Example for Configuring Global VLAN Mapping
Networking Requirements
As shown in Figure 4-3, users in VLAN 10 connect to network through the Switch.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 4 VLAN Mapping Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
136
Figure 4-3 Networking of global VLAN mapping
Switch
SwitchA
VLAN 10
Configuration Roadmap
The configuration roadmap is as follows:
1. Create the VLANs before and after mapping on the Switch.
2. Add Eth0/0/1 of the Switch to the translated VLAN in tagged mode.
3. Enable VLAN translation on Eth0/0/1 of the Switch.
4. Configure other downlink interfaces of the Switch in the same way.
5. Configuring global VLAN mapping on the Switch.
Data Preparations
To complete the configuration, you need the following data:
l VLAN ID before VLAN mapping: VLAN 10
l Translated VLAN ID: VLAN 20
Procedure
Step 1 Configure the Switch.
# Create VLANs.
<Quidway> system-view
[Quidway] vlan batch 10 20
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 4 VLAN Mapping Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
137
# Add Eth0/0/1 to the VLANs.
[Quidway] interface ethernet 0/0/1
[Quidway-Ethernet0/0/1] port hybrid tagged vlan 10 20
# Enable VLAN translation on Eth0/0/1.
[Quidway-Ethernet0/0/1] qinq vlan-translation enable
[Quidway-Ethernet0/0/1] quit
# Configure global LAN mapping.
[Quidway] vlan 10
[Quidway-vlan10] vlan-mapping map-vlan 20 remark-8021p 5
[Quidway-vlan10] quit
Step 2 Verify the configuration.
Users in VLAN 10 can connect to the Internet through the Switch.
----End
Configuration Files
l Configuration file of the Switch
#
sysname Quidway
#
vlan batch 10 20
#
interface Ethernet0/0/1
port hybrid tagged vlan 10 20
qinq vlan-translation enable
#
vlan-mapping map-vlan 20 remark-8021p 5
#
return
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 4 VLAN Mapping Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
138
5 QinQ Configuration
About This Chapter
This chapter describes the basic knowledge, methods, and examples for configuring QinQ.
5.1 Concept of QinQ
This section describes the concept of QinQ.
5.2 QinQ Features Supported by the S3700
This section describes the QinQ features supported by the S3700.
5.3 Configuring QinQ on an Interface
This section describes how to configure the interface type, the protocol used by the outer VLAN
tag, and the interface-based QinQ.
5.4 Configuring Selective QinQ
This section describes how to configure the interface type, the outer VLAN ID, and selective
QinQ.
5.5 Configuring QinQ Stacking on a VLANIF Interface
To log in to a remote device to manage it, configure QinQ stacking on the VLANIF interface
corresponding to the management VLAN on the remote device.
5.6 Setting the Protocol Type in the Outer VLAN Tag
This section describes how to set the protocol type in the outer VLAN tag on an interface.
5.7 Configuration Examples
This section provides several configuration examples of QinQ.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 5 QinQ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
139
5.1 Concept of QinQ
This section describes the concept of QinQ.
The 802.1Q-in-802.1Q (QinQ) protocol is a Layer 2 tunneling protocol based on the IEEE
802.1Q technology. The frame transmitted on the public network has double 802.1Q tags. One
is a public tag and the other is a private tag. It is called the QinQ protocol.
The principle of QinQ is to encapsulate a private VLAN tag in a public VLAN tag; therefore, a
packet traverses the backbone network of the Internet service provider (ISP) carrying double
VLAN tags. By using the QinQ technology, the S3700 provides a simpler Layer 2 VPN tunnel
for users.
5.2 QinQ Features Supported by the S3700
This section describes the QinQ features supported by the S3700.
Selective QinQ
The S3700 supports selective QinQ, which is extended on the basis of QinQ. Selective QinQ
enables an interface to add the outer VLAN tags with different public VLAN IDs to frames
according to the private VLAN IDs in the inner VLAN tags. This can differentiate various types
of users.
The S3700 not only supports selective QinQ based on the interface and VLAN, but also supports
flow-based selective QinQ.
For the commands related to flow-based selective QinQ, see the Quidway S3700 Series Ethernet
Switches Command Reference - QoS.
Protocols Used by Outer VLAN Tags
The protocols applied to outer VLAN tags vary according to the vendors. To interwork with
non-Huawei devices, the S3700 supports the selective setting of the protocols used by the outer
VLAN tags.
5.3 Configuring QinQ on an Interface
This section describes how to configure the interface type, the protocol used by the outer VLAN
tag, and the interface-based QinQ.
5.3.1 Establishing the Configuration Task
Applicable Environment
To separate the private network from the public network and save VLAN resources, you can
configure double 802.1q tags on a QinQ interface provided by the S3700. The inner VLAN tag
of the private network is distributed for the internal network such as the intranet; the outer VLAN
tag of the public network is distributed for the external network such as the ISP's network. In
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 5 QinQ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
140
this way, a maximum of 4094 x 4094 VLAN tags are provided to enable transparent transmission
of the packets from different private network users with the same VLAN ID.
Pre-configuration Tasks
None
Data Preparation
To configure QinQ on the interface, you need the following data.
No. Data
1 Number of the QinQ interface
2 (Optional) Protocol used by the outer VLAN tag
3 Outer VLAN ID
5.3.2 Setting the Link Type of an Interface
Context
Do as follows on the S3700 to be configured with interface QinQ.
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:
port link-type dot1q-tunnel
The link type of the interface is set to dot1q-tunnel.
By default, the link type of an interface is hybrid.
Dot1q-tunnel interfaces do not support Layer 2 multicast.
----End
5.3.3 Specifying the Outer VLAN ID
Context
Do as follows on the S3700 to be configured with interface QinQ.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 5 QinQ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
141
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
vlan vlan-id
The VLAN is created.
Step 3 Run:
quit
Return to the system view.
Step 4 Run:
interface interface-type interface-number
The interface view is displayed.
Step 5 Run:
port default vlan vlan-id
The VLAN ID (default VLAN) of the outer VLAN tag is set.
----End
5.3.4 Checking the Configuration
Procedure
l Run the display current-configuration interface interface-type interface-number
command to display the QinQ configuration on the interface.
----End
5.4 Configuring Selective QinQ
This section describes how to configure the interface type, the outer VLAN ID, and selective
QinQ.
5.4.1 Establishing the Configuration Task
Applicable Environment
To enable users to communicate through the ISP network, user packets are added an outer VLAN
tag.
Pre-configuration Tasks
None
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 5 QinQ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
142
Data Preparation
To configure selective QinQ, you need the following data.
No. Data
1 Number of the interface to be configured with selective QinQ
2 Inner VLAN ID
3 Outer VLAN ID
5.4.2 Setting the Link Type of an Interface
Context
Do as follows on the S3700 to be configured with selective QinQ:
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:
port link-type hybrid
The link type of the interface is set to hybrid.
By default, the link type of an interface is hybrid.
----End
5.4.3 Adding an Outer VLAN Tag
Context
Do as follows on the S3700 where you need to configure selective QinQ.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 5 QinQ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
143
Step 2 Run:
interface interface-type interface-number
The interface view is displayed.
Step 3 Run:
port hybrid untagged vlan vlan-id
The interface is added to the stacked VLAN in untagged mode.
The stacked outer VLAN must a VLAN existing on the S3700, but the VLANs before VLAN
stacking do not need to be created on the S3700.
----End
5.4.4 Configuring Selective QinQ
Context
An interface learns the MAC address from the outer VLAN tag of a QinQ packet.
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:
qinq vlan-translation enable
VLAN translation is enabled on the interface.
Step 4 Run:
port vlan-stacking vlan vlan-id1 [ to vlan-id2 ] stack-vlan vlan-id3 [
remark-8021p 8021p-value ]
The selective QinQ is configured. The meanings of the parameters are as follows:
l vlan-id1 [ to vlan-id2 ] specifies the C-VLAN IDs of packets to which you need to add an
outer VLAN tag.
l stack-vlan vlan-id3 specifies the VLAN ID in the outer VLAN tag to be added.
l [ remark-8021p 8021p-value ] specifies the internal priority in the stacked outer VLAN tag.
By default, the priority in the stacked outer VLAN tag is the same as the priority in the inner
VLAN tag.
----End
5.4.5 Checking the Configuration
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 5 QinQ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
144
Procedure
l Run the display current-configuration interface interface-type interface-number
command to display the selective QinQ configuration on the interface.
----End
5.5 Configuring QinQ Stacking on a VLANIF Interface
To log in to a remote device to manage it, configure QinQ stacking on the VLANIF interface
corresponding to the management VLAN on the remote device.
5.5.1 Establishing the Configuration Task
Before configuring QinQ stacking on a VLANIF interface, familiarize yourself with the
applicable environment, complete the pre-configuration tasks, and obtain the data required for
the configuration. This will help you complete the configuration task quickly and accurately.
Applicable Environment
As shown in Figure 5-1, SwitchA is connected to SwitchB through a third-party network. The
management VLAN on SwitchB is the same as the VLAN for users connected to SwitchA. The
VLAN ID provided by the carrier, however, is different from the management VLAN ID.
Figure 5-1 Networking for QinQ stacking on a VLANIF interface
Internet
SwitchA
SwitchB
user1
user2
VLAN 10
IP 10
IP 10 20
Management VLAN 10
Interface VLANIF 10
To log in to SwitchB to manage it from SwitchA, you can configure QinQ stacking on the
VLANIF interface corresponding to the management VLAN on SwitchB.
After QinQ stacking is configured, data frames are processed as follows:
l Frames sent from SwitchA to SwitchB
The user-side interface of SwitchA, which is configured with QinQ, sends double-tagged
frames to the ISP network. The outer VLAN tag is assigned by the carrier so that the frames
can be transparently transmitted across the ISP network to SwitchB.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 5 QinQ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
145
When SwitchB receives double-tagged frames, it compares the VLAN tags of the frames
with the VLAN tags configured on the VLANIF interface. If the outer tag of the frames is
the same as the outer tag configured on the VLANIF interface, SwitchB removes the outer
tag and sends the frames to the IP layer for processing.
l Frames sent from SwitchB to SwitchA
When the VLANIF interface of SwitchB receives data frames, SwitchB adds a VLAN tag
to the frames according to the QinQ stacking configuration. The new outer VLAN tag is
assigned by the carrier so that the double-tagged data frames can be transparently
transmitted to SwitchA across the ISP network. SwitchA removes the outer VLAN tag of
the frames and forwards the frames to users.
Pre-configuration Tasks
Before configuring QinQ stacking on a VLANIF interface, complete the following tasks:
l Creating VLANs
l Configuring the management VLAN
Data Preparations
To configure QinQ stacking on a VLANIF interface, you need the following data.
No. Data
1 VLAN IDs
5.5.2 Configuring QinQ Stacking on a VLANIF Interface
To log in to a remote device to manage it, configure QinQ stacking on the VLANIF interface
corresponding to the management VLAN on the remote device.
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
interface vlanif vlan-id
The VLANIF interface corresponding to the management VLAN is created.
Before running this command, ensure that the management VLAN exists.
Step 3 Run:
qinq stacking vlan vlan-id
QinQ stacking is configured on the VLANIF interface.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 5 QinQ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
146
NOTE
l When configuring QinQ stacking on a VLANIF interface, ensure that the VLANIF interface
corresponds to the management VLAN. VLANIF interfaces corresponding to other VLANs do not
support QinQ stacking.
l To change the configured outer VLAN tag, run the undo qinq stacking vlan command to disable QinQ
stacking, and then run the qinq stacking vlan command to configure a new outer VLAN tag.
l The qinq stacking vlan command conflicts with the icmp host-unreachable send command.
Therefore, you must run the undo icmp host-unreachable send command before using the qinq
stacking vlan command.
----End
5.5.3 Checking the Configuration
After QinQ stacking is configured on the VLANIF interface of the remote device, you can log
in to the remote device to manage it from the local device.
Prerequisite
The configurations of QinQ stacking on the VLANIF interface are complete.
Procedure
Step 1 Run the display vlan [ vlan-id [ verbose ] ] command to check whether the management VLAN
is configured correctly.
Step 2 Run the display this command in the VLANIF interface view to check whether QinQ stacking
is configured correctly.
----End
5.6 Setting the Protocol Type in the Outer VLAN Tag
This section describes how to set the protocol type in the outer VLAN tag on an interface.
5.6.1 Establishing the Configuration Task
Applicable Environment
To enable the S3700 to communicate with devices of other vendors, you need to set a protocol
type that can be identified by the peer device in the outer VLAN tag.
Pre-configuration Tasks
None.
Data Preparation
To set the protocol type in the outer VLAN tag, you need the following data.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 5 QinQ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
147
No. Data
1 Interface number
2 Protocol type in the outer VLAN tag
5.6.2 Configuring the Type of an Interface
Context
Do as follows on the S3700 where you need to set the protocol type in the outer VLAN tag.
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:
port link-type { hybrid | trunk | access }
The interface type is configured.
By default, the interface type is hybrid.
----End
5.6.3 Setting the Protocol Type in the Outer VLAN Tag
Context
Do as follows on the S3700 where you need to set the protocol type in the outer VLAN tag.
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:
qinq protocol protocol-id
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 5 QinQ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
148
The protocol type of the outer VLAN tag is set.
The qinq protocol command cannot be used on a QinQ interface.
The qinq protocol command is used to identify incoming frames and add or change TPID for
outgoing frames.
By default, the protocol type in the outer VLAN tag is 0x8100.
NOTE
l To implement the connectivity between the devices of different vendors, the protocol type in the outer
VLAN tag must be identified by the peer device.
l The protocol IDs set by the qinq protocol command cannot be the same as well-known protocol IDs.
Otherwise, the interface cannot distinguish packets of these protocols. For example, protocol-id cannot
be set to 0x0806, which is the ARP protocol ID.
----End
5.6.4 Checking the Configuration
Procedure
Step 1 Run the display current-configuration interface interface-type interface-number command to
display protocol type in the outer VLAN tag set on an interface.
----End
5.7 Configuration Examples
This section provides several configuration examples of QinQ.
5.7.1 Example for Configuring QinQ on Interfaces
Networking Requirements
As shown in Figure 5-2, there are two enterprises on the network, namely, Enterprise 1 and
Enterprise 2. Enterprise 1 has two office locations; Enterprise 2 has three office locations. The
office locations of the two enterprises access SwitchG or SwitchF of the ISP network. The
network of Enterprise 1 is divided into VLAN 1000 to VLAN 1500; the network of Enterprise
2 is divided into VLAN 2000 to VLAN 3000. It is required that employees in the same VLAN
can communicate with each other through the ISP network but the two enterprises are isolated
from each other.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 5 QinQ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
149
Figure 5-2 Networking diagram for configuring QinQ on interfaces
VLAN1500
VLAN1000
VLAN3000
VLAN2000
Enterprise 2
VLAN3000
VLAN2000
Enterprise 2
Eth0/0/1 Eth0/0/2
Eth0/0/3
Eth0/0/4
Eth0/0/3
VLAN3000
VLAN2000 VLAN1500
VLAN1000
Enterprise 1 Enterprise1 Enterprise 2
Eth0/0/1
SwitchG
SwitchF
Eth0/0/2
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLAN 10 and VLAN 20 on SwitchF; create VLAN 20 on SwitchG.
2. Configure Eth 0/0/1, Eth 0/0/2, and Eth 0/0/3 of SwitchF as QinQ interfaces.
3. Configure Eth 0/0/1 and Eth 0/0/2 of SwitchG as QinQ interfaces.
4. Add Eth 0/0/4 of SwitchF and Eth 0/0/3 of SwitchG to VLAN 20 in tagged mode.
Data Preparation
To complete the configuration, you need the following data:
l VLAN 10 assigned to Enterprise 1 on the ISP network
l VLAN 20 assigned to Enterprise 2 on the ISP network.
Procedure
Step 1 Create VLANs.
# Create VLAN 10 and VLAN 20 on SwitchF.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 5 QinQ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
150
<Quidway> system-view
[Quidway] sysname SwitchF
[SwitchF] vlan batch 10 20
# Create VLAN 20 on SwitchG.
<Quidway> system-view
[Quidway] sysname SwitchG
[SwitchG] vlan 20
Step 2 Configure the interfaces as QinQ interfaces.
# Configure Eth 0/0/1, Eth 0/0/2, and Eth 0/0/3 of SwitchF as QinQ interfaces. Set the VLAN
ID of the outer VLAN tag added by Eth 0/0/1 and Eth 0/0/3/ to VLAN 10; set the VLAN ID of
the outer VLAN tag added by Eth 0/0/2 to VLAN 20.
[SwitchF] interface ethernet 0/0/1
[SwitchF-Ethernet0/0/1] port link-type dot1q-tunnel
[SwitchF-Ethernet0/0/1] port default vlan 10
[SwitchF-Ethernet0/0/1] quit
[SwitchF] interface ethernet 0/0/2
[SwitchF-Ethernet0/0/2] port link-type dot1q-tunnel
[SwitchF-Ethernet0/0/2] port default vlan 20
[SwitchF-Ethernet0/0/2] quit
[SwitchF] interface ethernet 0/0/3
[SwitchF-Ethernet0/0/3] port link-type dot1q-tunnel
[SwitchF-Ethernet0/0/3] port default vlan 10
[SwitchF-Ethernet0/0/3] quit
# Set Eth 0/0/1 and Eth 0/0/2 of SwitchG as QinQ interfaces; set the VLAN ID of the outer
VLAN tags added by Eth 0/0/1 and Eth 0/0/2/ to VLAN 20.
[SwitchG] interface ethernet 0/0/1
[SwitchG-Ethernet0/0/1] port link-type dot1q-tunnel
[SwitchG-Ethernet0/0/1] port default vlan 20
[SwitchG-Ethernet0/0/1] quit
[SwitchG] interface ethernet 0/0/2
[SwitchG-Ethernet0/0/2] port link-type dot1q-tunnel
[SwitchG-Ethernet0/0/2] port default vlan 20
[SwitchG-Ethernet0/0/2] quit
Step 3 Configure other interfaces.
# Add Eth 0/0/4 of SwitchF to VLAN 20.
[SwitchF] interface ethernet 0/0/4
[SwitchF-Ethernet0/0/4] port link-type trunk
[SwitchF-Ethernet0/0/4] port trunk allow-pass vlan 20
[SwitchF-Ethernet0/0/4] quit
# Add Eth 0/0/3 of SwitchG to VLAN 20.
[SwitchG] interface ethernet 0/0/3
[SwitchG-Ethernet0/0/3] port link-type trunk
[SwitchG-Ethernet0/0/3] port trunk allow-pass vlan 20
[SwitchG-Ethernet0/0/3] quit
Step 4 Verify the configuration.
Ping a remote host on the same VLAN in another office location of Enterprise 1 from a host of
Enterprise 1. If it can ping the remote host, hosts in different locations of Enterprise 1 can
communicate with each other.
Ping a remote host on the same VLAN in another office location of Enterprise 2 from a host of
Enterprise 2. If it can ping the remote host, hosts in different locations of Enterprise 2 can
communicate with each other.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 5 QinQ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
151
Ping a host of Enterprise 2 from a host in any office location of Enterprise 1. If it fails to ping
the host of Enterprise 2, the two enterprises are isolated from each other.
----End
Configuration Files
The following lists the configuration files of the Switch.
l Configuration file of SwitchF
#
sysname SwitchF
#
vlan batch 10 20
#
interface Ethernet0/0/1
port link-type dot1q-tunnel
port default vlan 10
#
interface Ethernet0/0/2
port link-type dot1q-tunnel
port default vlan 20
#
interface Ethernet0/0/3
port link-type dot1q-tunnel
port default vlan 10
#
interface Ethernet0/0/4
port link-type trunk
port trunk allow-pass vlan 20
#
return
l Configuration file of SwitchG
#
sysname SwitchG
#
vlan batch 20
#
interface Ethernet0/0/1
port link-type dot1q-tunnel
port default vlan 20
#
interface Ethernet0/0/2
port link-type dot1q-tunnel
port default vlan 20
#
interface Ethernet0/0/3
port link-type trunk
port trunk allow-pass vlan 20
#
return
5.7.2 Example for Configuring Selective QinQ
Networking Requirements
As shown in Figure 5-3, common Internet access users (using PCs) and IPTV users (using IPTV
terminals) connect to the carrier network through Switch A and Switch B and communicate with
each other through the carrier network.
It is required that packets of PCs and IPTV terminals are tagged VLAN 2 and VLAN 3 when
the packets are transmitted through the carrier network.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 5 QinQ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
152
Figure 5-3 Networking for configuring selective QinQ
PC
PC
IPTV IPTV
Network
Eth0/0/2 Eth0/0/2
Eth0/0/1 Eth0/0/1
SwitchA SwitchB
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs on Switch A and Switch B.
2. Configure types of interfaces on Switch A and Switch B, and add the interfaces to
corresponding VLANs.
3. Configure selective QinQ on interfaces of Switch A and Switch B.
Data Preparation
To complete the configuration, you need the following data:
l VLANs that PCs belong to: VLAN 100 to VLAN 200
l VLANs that IPTV terminals belong to: VLAN 300 to VLAN 400
l VLAN tag that packets of PCs carry on the carrier network: VLAN 2
l VLAN tag that packets of IPTV terminals carry on the carrier network: VLAN 3
Procedure
Step 1 Create VLANs.
# On Switch A, create VLAN 2 and VLAN 3, that is, the outer VLAN IDs added to packets on
the carrier network.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan batch 2 3
# On Switch B, create VLAN 2 and VLAN 3, that is, the outer VLAN IDs added to packets on
the carrier network.
<Quidway> system-view
[Quidway] sysname SwitchB
[SwitchB] vlan batch 2 3
Step 2 Configure selective QinQ on interfaces of Switch A and Switch B.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 5 QinQ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
153
# Configure Eth 0/0/1 of Switch A.
[SwitchA] interface ethernet 0/0/1
[SwitchA-Ethernet0/0/1] port link-type hybrid
[SwitchA-Ethernet0/0/1] port hybrid untagged vlan 2 3
[SwitchA-Ethernet0/0/1] qinq vlan-translation enable
[SwitchA-Ethernet0/0/1] port vlan-stacking vlan 100 to 200 stack-vlan 2
[SwitchA-Ethernet0/0/1] port vlan-stacking vlan 300 to 400 stack-vlan 3
[SwitchA-Ethernet0/0/1] quit
# Configure Eth 0/0/1 of Switch B.
[SwitchB] interface ethernet 0/0/1
[SwitchB-Ethernet0/0/1] port link-type hybrid
[SwitchB-Ethernet0/0/1] port hybrid untagged vlan 2 3
[SwitchB-Ethernet0/0/1] qinq vlan-translation enable
[SwitchB-Ethernet0/0/1] port vlan-stacking vlan 100 to 200 stack-vlan 2
[SwitchB-Ethernet0/0/1] port vlan-stacking vlan 300 to 400 stack-vlan 3
[SwitchB-Ethernet0/0/1] quit
Step 3 Configure other interfaces.
# Add Eth 0/0/2 of Switch A to VLAN 2 and VLAN 3.
[SwitchA] interface ethernet 0/0/2
[SwitchA-Ethernet0/0/2] port link-type trunk
[SwitchA-Ethernet0/0/2] port trunk allow-pass vlan 2 3
[SwitchA-Ethernet0/0/2] quit
# Add Eth 0/0/2 of Switch B to VLAN 2 and VLAN 3.
[SwitchB] interface ethernet 0/0/2
[SwitchB-Ethernet0/0/2] port link-type trunk
[SwitchB-Ethernet0/0/2] port trunk allow-pass vlan 2 3
[SwitchB-Ethernet0/0/2] quit
Step 4 Verify the configuration.
# View the configuration of each interface on Switch A.
<SwitchA> display current-configuration interface ethernet 0/0/1
#
interface Ethernet0/0/1
qinq vlan-translation enable
port hybrid untagged vlan 2 to 3
port vlan-stacking vlan 100 to 200 stack-vlan 2
port vlan-stacking vlan 300 to 400 stack-vlan 3
#
return
<SwitchA> display current-configuration interface ethernet 0/0/2
#
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
return
# View the configuration of each interface on Switch B.
<SwitchB> display current-configuration interface ethernet 0/0/1
#
interface Ethernet0/0/1
qinq vlan-translation enable
port hybrid untagged vlan 2 to 3
port vlan-stacking vlan 100 to 200 stack-vlan 2
port vlan-stacking vlan 300 to 400 stack-vlan 3
#
return
<SwitchB> display current-configuration interface ethernet 0/0/2
#
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 5 QinQ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
154
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
return
If Switch A and Switch B are configured correctly:
l PCs can communicate with each other through the carrier network.
l IPTV terminals can communicate with each other through the carrier network.
----End
Configuration Files
Only the configuration files of the Switches are provided:
l Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 2 to 3
#
interface Ethernet0/0/1
qinq vlan-translation enable
port hybrid untagged vlan 2 to 3
port vlan-stacking vlan 100 to 200 stack-vlan 2
port vlan-stacking vlan 300 to 400 stack-vlan 3
#
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
return
l Configuration file of Switch B
#
sysname SwitchB
#
vlan batch 2 to 3
#
interface Ethernet0/0/1
qinq vlan-translation enable
port hybrid untagged vlan 2 to 3
port vlan-stacking vlan 100 to 200 stack-vlan 2
port vlan-stacking vlan 300 to 400 stack-vlan 3
#
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
return
5.7.3 Example for Configuring Selective QinQ with VLAN
Mapping
Networking Requirements
As shown in Figure 5-4, the Internet access, IPTV, and VoIP services are provided for users
through home gateways.
The corridor switches allocate VLANs to the services as follows:
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 5 QinQ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
155
l VLANs for the Internet access service of different users: VLAN 1000 to VLAN 1100
l Shared VLAN for the IPTV service: VLAN 1101
l Shared VLAN for the VoIP service: VLAN 1102
l Shared VLAN for home gateways: VLAN 1103
Each community switch is connected to 50 downstream corridor switches and maps the VLAN
IDs in the packets of the Internet access service from the corridor switches to VLAN 101 to
VLAN 150.
The aggregate switch of the carrier is connected to 50 downstream community switches and
adds outer VLAN IDs 21 to 70 to the packets sent from the community switches.
After user devices are powered on, they send service request packets to the switch of the carrier.
After the user devices pass the authentication, services can be used.
Figure 5-4 Networking for configuring selective QinQ
Community
switch
Corridor
switch
Home
gateway
SwitchA
Aggregate switch of carrier
SwitchB
Eth0/0/1
Eth0/0/1
Internet
Eth0/0/2
ME60
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs on SwitchA and SwitchB.
2. Configure VLAN mapping on SwitchB and add Eth 0/0/1 and Eth 0/0/2 to the VLANs.
3. Configure selective QinQ on SwitchA and add Eth 0/0/1 to VLANs.
4. Add other downlink interfaces of SwitchA and SwitchB to the VLANs. The configurations
are similar to the configurations of their Eth 0/0/1 interfaces.
5. Configure other community switches. The configuration is similar to the configuration on
SwitchB.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 5 QinQ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
156
Data preparation
To complete the configuration, you need the following data:
l VLANs to which Eth 0/0/1 of SwitchB is added in tagged mode: VLAN 1000 to VLAN
1100, VLAN 1101, VLAN 1102, VLAN 1103, and VLAN 101
l VLANs to which Eth 0/0/2 of SwitchB is added in tagged mode: VLAN 101 to VLAN 150,
VLAN 1101, VLAN 1102, and VLAN 1103
l VLANs to which Eth 0/0/1 of SwitchA is added in tagged mode: VLAN 1101, VLAN 1102,
and VLAN 1103
l VLANs to which Eth 0/0/1 of SwitchA is added in untagged mode: VLAN 21
l Interface on SwitchB where VLAN mapping is configured: Eth 0/0/1
l Interface on SwitchA where selective QinQ is configured: Eth 0/0/1
Procedure
Step 1 # Configure SwitchA.
# Create VLANs.
<Quidway> system-view
[Quidway] vlan batch 21 to 70 1101 to 1103
# Add related Eth 0/0/1 to the VLANs.
[Quidway] interface ethernet 0/0/1
[Quidway-Ethernet0/0/1] port hybrid untagged vlan 21
[Quidway-Ethernet0/0/1] port hybrid tagged vlan 1101 to 1103
[Quidway-Ethernet0/0/1] quit
# Configure selective QinQ on Eth 0/0/1.
[Quidway] interface ethernet 0/0/1
[Quidway-Ethernet0/0/1] qinq vlan-translation enable
[Quidway-Ethernet0/0/1] port vlan-stacking vlan 101 to 150 stack-vlan 21
[Quidway-Ethernet0/0/1] quit
Step 2 # Configure SwitchB.
# Create VLANs.
<Quidway> system-view
[Quidway] vlan batch 101 to 150 1000 to 1103
# Add Eth 0/0/1 and Eth 0/0/2 to the VLANs.
[Quidway] interface ethernet 0/0/1
[Quidway-Ethernet0/0/1] port hybrid tagged vlan 101 1000 to 1103
[Quidway-Ethernet0/0/1] quit
[Quidway] interface ethernet 0/0/2
[Quidway-Ethernet0/0/2] port hybrid tagged vlan 101 to 150 1101 to 1103
[Quidway-Ethernet0/0/2] quit
# Configure VLAN mapping on Eth 0/0/1.
[Quidway] interface ethernet 0/0/1
[Quidway-Ethernet0/0/1] qinq vlan-translation enable
[Quidway-Ethernet0/0/1] port vlan-mapping vlan 1000 to 1100 map-vlan 101
[Quidway-Ethernet0/0/1] quit
Step 3 Verify the configuration.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 5 QinQ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
157
The Internet access service, IPTV service, and VoIP service can be used.
----End
Configuration Files
Configuration file of SwitchA
#
sysname Quidway
#
vlan batch 21 to 70 1101 to 1103
#
interface Ethernet0/0/1
qinq vlan-translation enable
port hybrid tagged vlan 1101 to 1103
port hybrid untagged vlan 21
port vlan-stacking vlan 101 to 150 stack-vlan 21
#
return
Configuration file of SwitchB
#
sysname Quidway
#
vlan batch 101 to 150 1000 to 1103
#
interface Ethernet0/0/1
qinq vlan-translation enable
port hybrid tagged vlan 101 1000 to 1103
port vlan-mapping vlan 1000 to 1100 map-vlan 101
#
interface Ethernet0/0/2
port hybrid tagged vlan 101 to 150 1101 to 1103
#
return
5.7.4 Example for Configuring QinQ Stacking on the VLANIF
Interface
In this networking, the management VLAN is deployed on the remote server and the VLAN ID
of Switch A is the same as the management VLAN ID. The VLAN ID provided by the carrier,
however, is different from the management VLAN ID. To remotely log in to the remote server
for managing VLAN services on Switch A, you can configure VLAN stacking according to this
example.
Networking Requirements
As shown in Figure 5-5, Switch A is connected to the remote server through the third-party
network. The management VLAN is deployed on the remote server and the VLAN ID that the
downstream user connected to Switch A belongs to is the same as the management VLAN ID.
The VLAN ID provided by the carrier, however, is different from the management VLAN ID.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 5 QinQ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
158
Figure 5-5 Networking diagram for configuring QinQ stacking on the VLANIF interface
Internet
SwitchA
Server
Eth0/0/1
Eth0/0/2
Eth0/0/2
user1
VLAN 10
IP 10
IP 10 20
Eth0/0/1
Eth0/0/2
SwitchC
To remotely log in to the remote server for managing VLAN services on Switch A, you can
configure QinQ stacking on the VLANIF interface corresponding to the management VLAN on
Switch B.
NOTE
The VLANIF interface where QinQ stacking is configured must correspond to the management VLAN.
This is because other types of VLANs do not support QinQ stacking.
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure QinQ on Switch A.
2. Do as follows on the remote server:
(1) Create VLAN 10 and configure VLAN 10 as the management VLAN.
(2) Create a VLANIF interface on VLAN 10.
(3) Configure QinQ stacking on the VLANIF interface.
Data Preparation
To complete the configuration, you need the following data:
l Outer tag that Switch A adds to data frames
l Management VLAN ID on the remote server
Procedure
Step 1 Configure Switch C.
# Configure Eth 0/0/1 and Eth 0/0/2 to allow packets from VLAN 10 to pass through.
<Quidway> system-view
[Quidway] sysname SwitchC
[SwitchC] vlan batch 10
[SwitchC] interface ethernet 0/0/1
[SwitchC-Ethernet0/0/1] port hybrid tagged vlan 10
[SwitchC-Ethernet0/0/1] quit
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 5 QinQ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
159
[SwitchC] interface ethernet 0/0/2
[SwitchC-Ethernet0/0/2] port hybrid tagged vlan 10
[SwitchC-Ethernet0/0/2] quit
Step 2 Configure Switch A.
# Configure QinQ so that the frames sent from Switch A to the remote server carry double tags.
<Quidway> system-view
[Quidway] sysname SwitchA
[SwitchA] vlan batch 20
[SwitchA] interface ethernet 0/0/1
[SwitchA-Ethernet0/0/1] port vlan-stacking vlan 10 stack-vlan 20
[SwitchA-Ethernet0/0/1] port hybrid untagged vlan 20
[SwitchA-Ethernet0/0/1] quit
[SwitchA] interface ethernet 0/0/2
[SwitchA-Ethernet0/0/2] port hybrid tagged vlan 20
[SwitchA-Ethernet0/0/2] quit
Step 3 Configure the remote server.
# Configure Eth 0/0/2 to allow frames from VLAN 20 to pass through.
<Quidway> system-view
[Quidway] sysname Server
[Server] vlan batch 10 20
[Server] interface ethernet 0/0/2
[Server-Ethernet0/0/2] port hybrid tagged vlan 20
[Server-Ethernet0/0/2] quit
# Configure QinQ stacking.
[Server] vlan 10
[Server-vlan10] management-vlan
[Server-vlan10] quit
[Server] interface vlanif 10
[Server-Vlanif10] undo icmp host-unreachable send
[Server-Vlanif10] qinq stacking vlan 20
[Server-Vlanif10] ip address 10.10.10.1 24
[Server-Vlanif10] quit
[Server] interface ethernet 0/0/2
[Server-Ethernet0/0/2] port hybrid tagged vlan 10 20
Step 4 Verify the configuration.
You can log in to the remote server for managing VLAN services on Switch A.
----End
Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 20
#
interface Ethernet 0/0/1
port hybrid untagged vlan 20
port vlan-stacking vlan 10 stack-vlan 20
#
interface Ethernet 0/0/2
port hybrid tagged vlan 20
#
return
l Configuration file of Switch C
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 5 QinQ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
160
#
sysname SwitchC
#
vlan batch 10
#
interface Ethernet 0/0/1
port hybrid tagged vlan 10
#
interface Ethernet 0/0/2
port hybrid tagged vlan 10
#
return
l Configuration file of the remote server
#
sysname Server
#
vlan batch 10 20
#
vlan 10
management-vlan
#
interface Vlanif10
ip address 10.10.10.1 255.255.255.0
undo icmp host-unreachable send
qinq stacking vlan 20
#
interface Ethernet 0/0/2
port hybrid tagged vlan 10 20
#
return
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 5 QinQ Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
161
6 GVRP Configuration
About This Chapter
This chapter describes basic concepts involved in GVRP, GVRP configuration procedures, and
concludes with a GVRP configuration example.
6.1 GVRP Overview
This section explains the concepts of Generic Attribute Registration Protocol (GARP) and GARP
VLAN Registration Protocol (GVRP), and how they relate to each another.
6.2 GVRP Features Supported by the S3700
This section describes the GVRP features supported by the S3700.
6.3 Configuring GVRP
This section describes how to configure the GVRP function.
6.4 Maintaining GVRP
This section describes how to clear the statistics about GARP.
6.5 Configuration Examples
This section provides configuration examples of GVRP.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 6 GVRP Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
162
6.1 GVRP Overview
This section explains the concepts of Generic Attribute Registration Protocol (GARP) and GARP
VLAN Registration Protocol (GVRP), and how they relate to each another.
GVRP
GVRP is an application of GARP that maintains and propagates VLAN registration information
to other devices.
GARP
GARP enables member switches on a LAN to distribute, transmit, and register information such
as VLAN information and multicast addresses with one another.
GARP is not an entity on a device. GARP-compliant entities are called GARP participants.
GVRP is a GARP application. When a GARP application runs on an interface, the interface is
considered a GARP participant.
l GARP messages and timers
GARP messages
GARP members transmit VLAN registration information by exchanging GARP
messages. The three main GARP messages are Join, Leave, and LeaveAll.
When a GARP participant expects other devices to register its attributes, it sends
Join messages to other devices. When the GARP participant receives a Join message
from another participant or is configured with attributes statically, it also sends Join
messages to other devices for the devices to register the new attributes.
When a GARP participant expects other devices to deregister its attributes, it sends
Leave messages to other devices. When the GARP participant receives a Leave
message from another participant or some of its attributes are deregistered statically,
it also sends Leave messages to other devices.
When a GARP participant is enabled, the LeaveAll timer is started. When the
LeaveAll timer expires, the GARP participant sends LeaveAll messages to request
other GARP participants to deregister all the attributes of the sender. Then other
participants can re-register the attributes.
The Join, Leave, and LeaveAll messages are used to control registration and
deregistration of attributes.
Through GARP messages, all attributes that need to be registered are sent to all the
GARP-enabled devices on the same LAN.
GARP timers
The intervals for sending GARP messages are controlled by GARP timers. GARP
defines four timers to control the intervals for sending GARP messages.
Hold timer: When a GARP participant receives a registration message from another
participant, it does not send the registration message in a Join message to other
participants immediately. Instead, the participant starts the Hold timer. When the
Hold timer expires, the participant packs all the registration messages received
within this period in a Join message and sends the Join message to other participants.
This saves bandwidth on the network.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 6 GVRP Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
163
Join timer: To ensure reliable transmission of Join messages, a participant can send
each Join message twice. If the participant does not receive the response after
sending the Join message the first time, it sends the Join message again. The Join
timer specifies the interval between the two Join messages.
Leave timer: When a GARP participant expects other participants to deregister its
attribute, it sends Leave messages to other participants. When another participant
receives the Leave message, it starts the Leave timer. If the participant does not
receive any Join message before the Leave timer expires, it deregisters the attributes
of the Leave message sender.
LeaveAll timer: When a GARP participant is enabled, the LeaveAll timer is started.
When the LeaveAll timer expires, the GARP participant sends LeaveAll messages
to request other GARP participants to re-register all its attributes. Then the LeaveAll
timer restarts.
NOTE
l The GARP timers apply to all GARP participants (such as GVRP) on the same LAN.
l The Hold timer, Join timer, and Leave timer must be set individually on each interface,
whereas the LeaveAll timer is set globally and takes effect on all interfaces of a device.
l Devices on a network may have different settings of the LeaveAll timer. In this case, all the
devices use the smallest LeaveAll timer value on the network. When the LeaveAll timer of
a device expires, the device sends LeaveAll messages to other devices. After other devices
receive the LeaveAll messages, they reset their LeaveAll timers. Therefore, only the
LeavelAll timer with the smallest value takes effect even if devices have different settings
of the LeaveAll timer.
l GARP operation process
Through GARP, the configuration information of a GARP member can be propagated on
the entire LAN. A GARP member may be a terminal workstation or a bridge. A GARP
member sends an attribute declaration or an attribute reclaim declaration to request other
GARP members to register or deregister its attributes. The GARP member can also register
or deregister attributes of other members when receiving attribute declarations or attribute
reclaim declarations from other members. When an interface receives an attribute
declaration, it registers the attribute. When the interface receives an attribute reclaim
declaration, the interface deregisters the attribute.
PDUs sent from a GARP participant use a multicast MAC address as the destination MAC
address. When a device receives a packet from a GARP participant, the device identifies
the packet according to the destination MAC address of the packet and sends the packet to
the corresponding GARP participant (such as GVRP).
l Format of a GARP packet
Figure 6-1 shows the format of a GARP packet.
Quidway S3700 Series Ethernet Switches
Configuration Guide - Ethernet 6 GVRP Configuration
Issue 01 (2011-10-26) Huawei Proprietary and Confidential
Copyright Huawei Technologies Co., Ltd.
164
Figure 6-1 Format of a GARP packet
DA SA length DSAP SSAP Ctrl PDU
Protocol ID Message 1
Message N End Mark
Attribute Type Attribute List
Attribute 1 End Mark Attribute N