Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

180
Quidway S5300 Series Ethernet Switches V100R003 Configuration Guide - Security Issue 02 Date 2009-08-14 Huawei Proprietary and Confidential Copyright © Huawei Technologies Co., Ltd.

Transcript of Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Page 1: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Quidway S5300 Series Ethernet Switches

V100R003

Configuration Guide - Security

Issue 02

Date 2009-08-14

Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Page 2: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

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

Huawei Technologies Co., Ltd.Address: Huawei Industrial Base

Bantian, LonggangShenzhen 518129People's Republic of China

Website: http://www.huawei.com

Email: [email protected]

Copyright © Huawei Technologies Co., Ltd. 2009. All rights reserved.No part of this document may be reproduced or transmitted in any form or by any means without prior writtenconsent of Huawei Technologies Co., Ltd. Trademarks and Permissions

and other Huawei trademarks are the property of Huawei Technologies Co., Ltd.All other trademarks and trade names mentioned in this document are the property of their respective holders. NoticeThe information in this document is subject to change without notice. Every effort has been made in thepreparation of this document to ensure accuracy of the contents, but the statements, information, andrecommendations in this document do not constitute a warranty of any kind, express or implied.

Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Page 3: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Contents

About This Document.....................................................................................................................1

1 Security Protection on Interfaces............................................................................................1-11.1 Overview of Security Protection on Interfaces...............................................................................................1-2

1.1.1 Introduction to Security Protection on Interfaces...................................................................................1-21.1.2 Security Protection on Interfaces Supported by the S-switch................................................................1-2

1.2 Configuring Security Protection on an Interface.............................................................................................1-21.2.1 Establishing the Configuration Task......................................................................................................1-31.2.2 Configuring the Limit on the Number of MAC Addresses Learnt by an Interface...............................1-31.2.3 Enabling Security Protection on an Interface.........................................................................................1-41.2.4 (Optional) Configuring the Security Protection Action for an Interface................................................1-41.2.5 (Optional) Configuring an Interface to Convert Secure Dynamic MAC Addresses to Static MACAddresses........................................................................................................................................................1-51.2.6 Checking the Configuration...................................................................................................................1-5

1.3 Configuration Examples..................................................................................................................................1-51.3.1 Example for Configuring Security Protection on an Interface...............................................................1-6

2 MFF Configuration....................................................................................................................2-12.1 Introduction to MFF........................................................................................................................................2-2

2.1.1 MFF Overview.......................................................................................................................................2-22.1.2 MFF Functions Supported by the S-switch............................................................................................2-32.1.3 Update History.......................................................................................................................................2-4

2.2 Configuring MFF............................................................................................................................................2-42.2.1 Establishing the Configuration Task......................................................................................................2-42.2.2 Enabling MFF Globally.........................................................................................................................2-52.2.3 Configuring an MFF Network Interface................................................................................................2-52.2.4 Enabling MFF in a VLAN.....................................................................................................................2-62.2.5 (Optional) Assigning an IP Address to the Static Gateway...................................................................2-62.2.6 (Optional) Enabling Timing Detection of the MAC Address of the Gateway.......................................2-62.2.7 (Optional) Assigning an IP Address to the Server.................................................................................2-72.2.8 Checking the Configuration...................................................................................................................2-7

2.3 Configuration Examples..................................................................................................................................2-82.3.1 Example for Configuring MFF..............................................................................................................2-8

3 Attack Defense Configuration.................................................................................................3-1

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security Contents

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

i

Page 4: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

3.1 Overview of Attack Defense...........................................................................................................................3-23.1.1 Introduction to Attack Defense..............................................................................................................3-23.1.2 Attack Defense Supported by the S-switch............................................................................................3-23.1.3 Logical Relationships Between Configuration Tasks............................................................................3-2

3.2 Configuring the Defense Against IP Spoofing Attacks..................................................................................3-23.2.1 Establishing the Configuration Task......................................................................................................3-33.2.2 Configuring the Defense Against IP Spoofing Attacks.........................................................................3-33.2.3 Checking the Configuration...................................................................................................................3-4

3.3 Configuring the Defense Against Land Attacks.............................................................................................3-43.3.1 Establishing the Configuration Task......................................................................................................3-53.3.2 Configuring the Defense Against Land Attacks....................................................................................3-53.3.3 Checking the Configuration...................................................................................................................3-6

3.4 Configuring the Defense Against Smurf Attacks............................................................................................3-63.4.1 Establishing the Configuration Task......................................................................................................3-73.4.2 Configuring the Defense Against Smurf Attacks...................................................................................3-73.4.3 Checking the Configuration...................................................................................................................3-8

3.5 Configuring the Defense Against SYN Flood Attacks...................................................................................3-83.5.1 Establishing the Configuration Task......................................................................................................3-83.5.2 Example for Configuring the Defense Against SYN Flood Attacks.....................................................3-93.5.3 Checking the Configuration.................................................................................................................3-10

3.6 Configuring the Defense Against ICMP Flood Attacks................................................................................3-103.6.1 Establishing the Configuration Task....................................................................................................3-103.6.2 Configuring the Defense Against ICMP Flood Attacks.......................................................................3-113.6.3 Checking the Configuration.................................................................................................................3-12

3.7 Configuring the Defense Against Ping of Death Attacks.............................................................................3-123.7.1 Establishing the Configuration Task....................................................................................................3-123.7.2 Configuring the Defense Against Ping of Death Attacks....................................................................3-123.7.3 Checking the Configuration.................................................................................................................3-13

3.8 Configuring the Defense Against Teardrop Attacks.....................................................................................3-143.8.1 Establishing the Configuration Task....................................................................................................3-143.8.2 Configuring the Defense Against Teardrop Attacks............................................................................3-143.8.3 Checking the Configuration.................................................................................................................3-15

3.9 Debugging Attack Defense...........................................................................................................................3-163.10 Configuration Examples..............................................................................................................................3-16

3.10.1 Example for Configuring the Defense Against Land Attacks............................................................3-163.10.2 Example for Configuring the Defense Against SYN Flood Attacks.................................................3-18

4 DHCP Snooping Configuration..............................................................................................4-14.1 Overview of DHCP snooping.........................................................................................................................4-2

4.1.1 Introduction to DHCP Snooping............................................................................................................4-24.1.2 DHCP Snooping Supported by the S-switch..........................................................................................4-24.1.3 Logical Relationships Between Configuration Tasks............................................................................4-4

4.2 Preventing the Bogus DHCP Server Attack....................................................................................................4-4

ContentsQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

ii Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 5: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

4.2.1 Establishing the Configuration Task......................................................................................................4-44.2.2 Enabling Global DHCP Snooping..........................................................................................................4-54.2.3 Enabling Local DHCP Snooping...........................................................................................................4-64.2.4 Configuring Trusted Interfaces..............................................................................................................4-64.2.5 Checking the Configuration...................................................................................................................4-7

4.3 Preventing the Middleman Attack and IP/MAC Spoofing Attack..................................................................4-74.3.1 Establishing the Configuration Task......................................................................................................4-84.3.2 Enabling Global DHCP Snooping........................................................................................................4-104.3.3 Enabling Local DHCP Snooping.........................................................................................................4-104.3.4 Enabling Packet Check.........................................................................................................................4-104.3.5 Configuring the DHCP Snooping Binding Table................................................................................4-114.3.6 Configuring Option 82.........................................................................................................................4-124.3.7 Configuring Security Protection on an Interface..................................................................................4-134.3.8 Checking the Configuration.................................................................................................................4-13

4.4 Preventing the DoS Attack by Changing the CHADDR Field.....................................................................4-144.4.1 Establishing the Configuration Task....................................................................................................4-144.4.2 Enabling Global DHCP Snooping........................................................................................................4-164.4.3 Enabling Local DHCP Snooping.........................................................................................................4-164.4.4 Checking the CHADDR Field in DHCP Request Messages...............................................................4-174.4.5 Checking the Configuration.................................................................................................................4-17

4.5 Preventing the Attacker from Sending Bogus Messages for Extending IP Address Leases.........................4-184.5.1 Establishing the Configuration Task....................................................................................................4-184.5.2 Enabling Global DHCP Snooping........................................................................................................4-194.5.3 Enabling Local DHCP Snooping.........................................................................................................4-204.5.4 Enabling the Checking of DHCP Request Messages...........................................................................4-204.5.5 Configuring Option 82.........................................................................................................................4-214.5.6 Checking the Configuration.................................................................................................................4-21

4.6 Configuring the Packet Discarding Alarm....................................................................................................4-224.6.1 Establishing the Configuration Task....................................................................................................4-224.6.2 Configuring the Packet Discarding Alarm...........................................................................................4-234.6.3 Checking the Configuration.................................................................................................................4-24

4.7 Configuring the DHCP Option 82 String......................................................................................................4-254.7.1 Configuring the Storage Format of the Option 82 Field......................................................................4-254.7.2 Configuring the Circuit ID in the Option 82 Field in the System View..............................................4-254.7.3 Configuring the Circuit ID of the Option 82 Field in the Interface View............................................4-264.7.4 Configuring the Remote ID in the Option 82 Field in the System View.............................................4-264.7.5 Configuring the Remote ID of the Option 82 Field in the Interface View..........................................4-274.7.6 Checking the Configuration.................................................................................................................4-27

4.8 Maintaining DHCP Snooping.......................................................................................................................4-274.8.1 Backing Up the DHCP Snooping Binding Table.................................................................................4-284.8.2 Debugging DHCP Snooping................................................................................................................4-28

4.9 Configuration Examples................................................................................................................................4-28

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security Contents

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

iii

Page 6: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

4.9.1 Example for Configuring DHCP Snooping to Prevent Attacks Against the Network.........................4-28

5 AAA Configuration...................................................................................................................5-15.1 Overview of AAA...........................................................................................................................................5-2

5.1.1 Introduction to AAA.............................................................................................................................. 5-25.1.2 RADIUS.................................................................................................................................................5-35.1.3 HWTACACS......................................................................................................................................... 5-55.1.4 Domain-based User Management..........................................................................................................5-65.1.5 Local User Management........................................................................................................................ 5-65.1.6 References..............................................................................................................................................5-65.1.7 Logical Relationships Between Configuration Tasks............................................................................5-7

5.2 Configuring AAA............................................................................................................................................5-75.2.1 Establishing the Configuration Task......................................................................................................5-75.2.2 Configuring the Authentication Scheme................................................................................................5-85.2.3 (Optional) Configuring the Authorization Scheme................................................................................5-95.2.4 Configuring the Accounting Scheme.....................................................................................................5-95.2.5 (Optional) Configuring the Recording Scheme...................................................................................5-105.2.6 Checking the Configuration.................................................................................................................5-11

5.3 Configuring the RADIUS Server..................................................................................................................5-115.3.1 Establishing the Configuration Task....................................................................................................5-125.3.2 Creating a RADIUS Server Template..................................................................................................5-135.3.3 Configuring the RADIUS Authentication Server................................................................................5-135.3.4 Configuring the RADIUS Accounting Server.....................................................................................5-145.3.5 (Optional) Configuring the Protocol Version for the RADIUS Server................................................5-145.3.6 (Optional) Configuring the Shared Key for the RADIUS Server........................................................5-155.3.7 (Optional) Configuring the User Name Format for the RADIUS Server............................................5-155.3.8 (Optional) Setting the Traffic Unit for the RADIUS Server................................................................5-165.3.9 (Optional) Configuring the Retransmission Parameters for the RADIUS Server................................5-165.3.10 (Optional) Configuring the NAS Interface for the RADIUS Server..................................................5-175.3.11 Checking the Configuration...............................................................................................................5-17

5.4 Configuring the HWTACACS Server...........................................................................................................5-175.4.1 Establishing the Configuration Task....................................................................................................5-185.4.2 Creating a HWTACACS Server Template..........................................................................................5-195.4.3 Configuring the HWTACACS Authentication Server.........................................................................5-195.4.4 Configuring the HWTACACS Authorization Server..........................................................................5-205.4.5 Configuring the HWTACACS Accounting Server..............................................................................5-205.4.6 (Optional) Configuring the Source IP Address of the HWTACACS Server.......................................5-215.4.7 (Optional) Configuring the Shared Key for the HWTACACS Server.................................................5-215.4.8 (Optional) Configuring the User Name Format for the HWTACACS Server.....................................5-225.4.9 (Optional) Setting the Traffic Unit for the HWTACACS Server........................................................5-225.4.10 (Optional) Setting the Timer of the HWTACACS Server.................................................................5-235.4.11 Checking the Configuration...............................................................................................................5-23

5.5 Configuring a Domain...................................................................................................................................5-24

ContentsQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

iv Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 7: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

5.5.1 Establishing the Configuration Task....................................................................................................5-245.5.2 Creating a Domain...............................................................................................................................5-245.5.3 Configuring Authentication, Authorization, and Accounting Schemes for the Domain.....................5-255.5.4 (Optional) Configuring the RADIUS Server Template for the Domain..............................................5-265.5.5 (Optional) Configuring the HWTACACS Server Template for the Domain......................................5-265.5.6 (Optional) Configuring the Status of the Domain................................................................................5-275.5.7 (Optional) Setting the Maximum Number of Access Users for the Domain.......................................5-275.5.8 Checking the Configuration.................................................................................................................5-28

5.6 Configuring Local User Management...........................................................................................................5-285.6.1 Establishing the Configuration Task....................................................................................................5-285.6.2 Creating Local User Accounts.............................................................................................................5-295.6.3 (Optional) Configuring the Service Type for Local Users...................................................................5-295.6.4 (Optional) Configuring the Authority of Accessing the FTP Directory for Local Users.....................5-305.6.5 (Optional) Configuring the Status of Local Users...............................................................................5-305.6.6 (Optional) Setting the Priority of Local Users.....................................................................................5-315.6.7 (Optional) Setting the Access Limit for Local Users...........................................................................5-315.6.8 Checking the Configuration.................................................................................................................5-32

5.7 Maintaining AAA..........................................................................................................................................5-325.7.1 Clearing HWTACACS Statistics.........................................................................................................5-325.7.2 Debugging AAA..................................................................................................................................5-32

5.8 Configuration Examples................................................................................................................................5-33

6 MAC Address Authentication Configuration......................................................................6-16.1 Overview of MAC Address Authentication....................................................................................................6-2

6.1.1 Introduction to MAC Address Authentication.......................................................................................6-26.1.2 MAC Address Authentication Features Supported by the S-switch......................................................6-36.1.3 Update History.......................................................................................................................................6-3

6.2 Configuring MAC Address Authentication....................................................................................................6-36.2.1 Establishing the Configuration Task......................................................................................................6-46.2.2 Configuring Global MAC Address Authentication...............................................................................6-46.2.3 Configuring MAC Address Authentication on an Interface..................................................................6-56.2.4 Configuring a MAC Address as a Username for MAC Address Authentication..................................6-56.2.5 Configuring a Fixed Username for a MAC Address Authentication User............................................6-56.2.6 (Optional)Configuring a Domain Name for a MAC Address Authentication User...............................6-66.2.7 (Optional)Configuring Timers for MAC Address Authentication.........................................................6-66.2.8 Checking the Configuration...................................................................................................................6-7

6.3 Configuring Enhanced MAC Address Authentication....................................................................................6-76.3.1 Establishing the Configuration Task......................................................................................................6-76.3.2 Configuring a Guest VLAN...................................................................................................................6-86.3.3 Configuring the Maximum Number of MAC Address Authentication Users on an Interface..............6-96.3.4 Checking the Configuration...................................................................................................................6-9

6.4 Maintaining MAC Address Authentication..................................................................................................6-106.4.1 Resetting Statistics of MAC Address Authentication..........................................................................6-10

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security Contents

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

v

Page 8: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

6.5 Configuration Examples................................................................................................................................6-106.5.1 Example for Configuring MAC Address Authentication....................................................................6-10

7 802.1X Configuration.................................................................................................................7-17.1 Overview of 802.1X........................................................................................................................................7-2

7.1.1 Introduction to 802.1X...........................................................................................................................7-27.1.2 802.1X Authentication System.............................................................................................................. 7-27.1.3 802.1X Authentication Process..............................................................................................................7-37.1.4 Implementation of 802.1X on the S-switch........................................................................................... 7-67.1.5 Logical Relationships Between Configuration Tasks............................................................................7-77.1.6 Update History....................................................................................................................................... 7-7

7.2 Configuring 802.1X........................................................................................................................................ 7-77.2.1 Establishing the Configuration Task......................................................................................................7-77.2.2 Enabling 802.1X Globally and on the Interface.....................................................................................7-87.2.3 (Optional) Setting the Port Access Control Mode................................................................................. 7-87.2.4 (Optional) Setting the Port Access Control Method.............................................................................. 7-97.2.5 (Optional) Setting the Maximum Number of Concurrent Access Users................................................7-97.2.6 (Optional) Enabling DHCP Trigger.......................................................................................................7-97.2.7 (Optional) Setting the Authentication Method for the 802.1X User....................................................7-107.2.8 (Optional) Configuring the Guest VLAN............................................................................................7-107.2.9 (Optional) Setting the Maximum Number of Times for Sending an Authentication Request.............7-117.2.10 (Optional) Setting the Timer Parameters...........................................................................................7-117.2.11 (Optional) Enabling the Quiet-Period Timer.....................................................................................7-117.2.12 (Optional) Enabling the Handshake-Period Timer.............................................................................7-127.2.13 Checking the Configuration...............................................................................................................7-12

7.3 Configuration Examples................................................................................................................................7-137.3.1 Example for Configuring 802.1X.........................................................................................................7-13

8 NAC Configuration...................................................................................................................8-18.1 Access Mode of NAC..................................................................................................................................... 8-28.2 Configuring the NAC Access Based on Web Authentication.........................................................................8-4

8.2.1 Establishing the Configuration Task......................................................................................................8-58.2.2 Configuring the Web Authentication Server..........................................................................................8-58.2.3 Configuring the Portal Protocol............................................................................................................. 8-68.2.4 Configuring Mandatory Web Authentication........................................................................................ 8-78.2.5 Configuring a Non-authentication Rule.................................................................................................8-78.2.6 Checking the Configuration...................................................................................................................8-8

8.3 Configuring the NAC Access Based on 802.1X Authentication....................................................................8-98.4 Configuring the NAC Access Based on MAC Address Authentication.........................................................8-98.5 Configuring the NAC Access Based on MAC Bypass Authentication.......................................................... 8-9

8.5.1 Establishing the Configuration Task......................................................................................................8-98.5.2 Enabling 802.1X Globally....................................................................................................................8-108.5.3 Enabling MAC Bypass Authentication on an Interface.......................................................................8-108.5.4 (Optional) Setting the Port Access Control Mode...............................................................................8-11

ContentsQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

vi Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 9: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

8.5.5 (Optional) Setting the Port Access Control Method............................................................................8-118.5.6 (Optional) Setting the Maximum Number of Concurrent Access Users..............................................8-128.5.7 (Optional) Setting the Authentication Method for the 802.1X User....................................................8-128.5.8 (Optional) Configuring the Guest VLAN............................................................................................8-128.5.9 (Optional) Setting the Maximum Number of Times for Sending an Authentication Request.............8-138.5.10 (Optional) Setting the Timer Parameters...........................................................................................8-138.5.11 (Optional) Enabling the Quiet-Period Timer.....................................................................................8-148.5.12 (Optional) Enabling the Handshake-Period Timer.............................................................................8-148.5.13 Checking the Configuration...............................................................................................................8-14

8.6 Configuration Examples................................................................................................................................8-158.6.1 Example for Configuring the NAC Access Based on Web Authentication.........................................8-15

9 PPPoE+ Configuration..............................................................................................................9-19.1 PPPoE+ Overview...........................................................................................................................................9-29.2 PPPoE+ Supported by the S-switch................................................................................................................9-29.3 Configuring PPPoE+.......................................................................................................................................9-2

9.3.1 Establishing the Configuration Task......................................................................................................9-29.3.2 Enabling PPPoE+ Globally....................................................................................................................9-39.3.3 Configuring Actions for an Interface to Process the Original Fields in PPPoE Packets........................9-39.3.4 Configuring the Format and Contents of the Fields to be Inserted into PPPoE Packets........................9-49.3.5 Configuring an Interface to be Trusted..................................................................................................9-49.3.6 Checking the Configuration...................................................................................................................9-4

9.4 Configuration Examples..................................................................................................................................9-59.4.1 Example for Configuring PPPoE+.........................................................................................................9-5

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security Contents

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

vii

Page 10: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf
Page 11: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Figures

Figure 1-1 Networking diagram of configuring security protection on an interface........................................... 1-6Figure 2-1 Networking diagram of configuring dynamic MFF...........................................................................2-8Figure 3-1 Networking for configuring the defense against Land attacks.........................................................3-16Figure 3-2 Networking for configuring the defense against SYN flood attacks................................................3-18Figure 4-1 Networking for the DHCP snooping application on the S-switch......................................................4-3Figure 4-2 Diagram of preventing the bogus DHCP server attack...................................................................... 4-5Figure 4-3 Diagram of preventing the middleman attack and IP/MAC spoofing attack..................................... 4-8Figure 4-4 Diagram of preventing the middleman attack and IP/MAC spoofing attack..................................... 4-9Figure 4-5 Networking diagram of preventing the DoS attack by changing the CHADDR field.....................4-15Figure 4-6 Networking diagram of preventing the attacker from sending bogus messages for extending IP addressleases...................................................................................................................................................................4-18Figure 4-7 Networking for configuring DHCP snooping to prevent attacks against the network.....................4-29Figure 5-1 Message exchange between the RADIUS client and the RADIUS server.........................................5-4Figure 5-2 Message structure defined by RADIUS............................................................................................. 5-4Figure 5-3 Networking diagram of AAA...........................................................................................................5-33Figure 6-1 Networking diagram for configuring local authentication with a fixed username...........................6-10Figure 7-1 802.1X authentication system.............................................................................................................7-3Figure 7-2 802.1X authentication process in EAP-MD5 relay mode.................................................................. 7-4Figure 7-3 802.1X authentication process in EAP termination mode..................................................................7-6Figure 7-4 Authentication through 802.1X and RADIUS.................................................................................7-13Figure 8-1 Typical networking of Web authentication........................................................................................ 8-2Figure 8-2 Typical networking of 802.1x authentication.....................................................................................8-3Figure 8-3 Example for Configuring Web Authentication.................................................................................8-16Figure 9-1 Networking diagram of PPPoE+ configurations................................................................................9-5

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security Figures

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

ix

Page 12: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf
Page 13: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Tables

Table 4-1 Attack types and DHCP snooping working modes..............................................................................4-3Table 4-2 Relationship between the type of attacks and the type of discarded packets.....................................4-22Table 5-1 Comparisons between HWTACACS and RADIUS............................................................................5-5

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security Tables

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

xi

Page 14: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf
Page 15: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

About This Document

PurposeThis document describes procedures and provides examples for configuring the security featuresof the S-switch.

This document covers the following topics:

l Feature description

l Data preparation

l Pre-configuration tasks

l Configuration procedures

l Checking the configuration

l Configuration examples

This document guides you through the configuration and applicable environment of the securityfeatures of the S-switch.

Related VersionsThe following table lists the product versions related to this document.

Product Name Version

S5300 V100R003

Intended AudienceThis document is intended for:

l Commissioning engineers

l Data configuration engineers

l Network monitoring engineers

l System maintenance engineers

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security About This Document

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

1

Page 16: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

OrganizationThis document is organized as follows.

Chapter Description

1 Security Protection onInterfaces

This chapter describes the basics and configuration ofsecurity protection on interfaces.

2 MFF Configuration This chapter describes the basics of MAC ForcedForwarding (MFF) and the procedures and examples forconfiguring MFF.

3 Attack DefenseConfiguration

This chapter describes how to implement and configureattack defense on the S-switch.

4 DHCP SnoopingConfiguration

This chapter describes the implementation andconfiguration procedures of DHCP Snooping on the S-switch.

5 AAA Configuration This chapter describes the basic concepts and configurationprocedures of Athenticatoin, Authorization, andAccounting (AAA), Remote Authentication Dial in UserService (RADIUS), Huawei Terminal Access ControllerAccess Control System (HWTACACS), domains, and localusers.

6 MAC AddressAuthenticationConfiguration

This chapter describes the basic concepts of MAC addressauthentication and the procedure for configuring MACaddress authentication, and provides examples forconfiguring MAC address authentication.

7 802.1X Configuration This chapter describes the basics, methods, andconfiguration example of 802.1X.

8 NAC Configuration This chapter describes the basics, methods, andconfiguration example of NAC.

9 PPPoE+ Configuration This chapter describes the basics, methods, andconfiguration example of PPPoE Plus.

Conventions

Symbol ConventionsThe symbols that may be found in this document are defined as follows.

Symbol Description

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

About This DocumentQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

2 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 17: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Symbol Description

Indicates a hazard with a medium or low level of risk,which if not avoided, could result in minor ormoderate injuries.

Indicates a potentially hazardous situation, which ifnot avoided, could result in equipment damage, dataloss, performance degradation, or unexpectedresults.

Indicates a tip that may help you address a problemor save your time.

Provides additional information to emphasize orsupplement important points of the main text.

General ConventionsConvention Description

Times New Roman Normal paragraphs are in Times New Roman.

Boldface Names of files, directories, folders, and users are in boldface.For example, log in as user root.

Italic Book titles are in italics.

Courier New Terminal display is in Courier New. The messages input onterminals by users that are displayed are in boldface.

Command ConventionsConvention 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 verticalbars. One item is selected.

[ x | y | ... ] Optional items are grouped in brackets and separated by verticalbars. One item is selected or no item is selected.

{ x | y | ... }* Optional items are grouped in braces and separated by verticalbars. A minimum of one item or a maximum of all items can beselected.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security About This Document

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

3

Page 18: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Convention Description

[ x | y | ... ]* Optional items are grouped in brackets and separated by verticalbars. 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.

GUI ConventionsConvention Description

Boldface Buttons, menus, parameters, tabs, window, and dialog titles arein boldface. For example, click OK.

> Multi-level menus are in boldface and separated by the ">" signs.For example, choose File > Create > Folder.

Keyboard OperationsFormat Description

Key Press the key. For example, press Enter and press Tab.

Key 1+Key 2 Press the keys concurrently. For example, pressing Ctrl+Alt+A means the three keys should be pressed concurrently.

Key 1, Key 2 Press the keys in turn. For example, pressing Alt, A means thetwo keys should be pressed in turn.

Mouse OperationAction Description

Click Select and release the primary mouse button without moving thepointer.

Double-click Press the primary mouse button twice continuously and quicklywithout moving the pointer.

Drag Press and hold the primary mouse button and move the pointerto a certain position.

About This DocumentQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

4 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 19: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Update HistoryUpdates between document versions are cumulative. Therefore, the latest document versioncontains all updates made to previous versions.

Updates in Issue 02 (2009-08-14)Second commercial release. The document is updated as follows:l Bugs are fixed.

l The manual version is updated.

Updates in Issue 01 (2009-06-30)This is the first release.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security About This Document

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5

Page 20: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf
Page 21: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

1 Security Protection on Interfaces

About This Chapter

This chapter describes the basics and configuration of security protection on interfaces.

1.1 Overview of Security Protection on InterfacesThis section describes security protection on interfaces.

1.2 Configuring Security Protection on an InterfaceThis section describes how to configure security protection on an interface.

1.3 Configuration ExamplesThis section provides examples of security protection on interfaces.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 1 Security Protection on Interfaces

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

1-1

Page 22: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

1.1 Overview of Security Protection on InterfacesThis section describes security protection on interfaces.

1.1.1 Introduction to Security Protection on Interfaces

1.1.2 Security Protection on Interfaces Supported by the S-switch

1.1.1 Introduction to Security Protection on InterfacesAs a security mechanism to control network access, security protection on interfaces ensuresthe security of interfaces. It detects invalid packets and takes corresponding protection actionsby checking whether the source MAC addresses of received data frames are valid.

1.1.2 Security Protection on Interfaces Supported by the S-switch

GigabitEthernet , 10GE interfaces on the S-switch support security protection on interfaces.After security protection is enabled on GigabitEthernet interfaces, the S-switch considers thefollowing types of MAC addresses as valid:

l Static MAC addresses that are manually configured

l Dynamic or static MAC addresses in a Dynamic Host Configuration Protocol (DHCP)snooping binding table

l Dynamic MAC addresses learnt before the number of MAC addresses reaches the upperlimit

Source MAC addresses that do not fall into the preceding types are considered invalid. Whenan interface receives packets with invalid source MAC addresses, security protection takes effecton the interface. At present, the S-switch supports the following security protection actions onan interface:

l restrict: The interface neither learns the source MAC addresses of received packets withinvalid source MAC addresses nor forwards the packets, but directly discards them andsends a trap message to the Network Management System (NMS).

l shutdown: The interface is automatically shut down when receiving packets with invalidsource MAC addresses. You have to manually restore the interface if required.

l protect: The interface neither learns the source MAC addresses of received packets withinvalid source MAC addresses nor forwards the packets, but directly discards them.

1.2 Configuring Security Protection on an InterfaceThis section describes how to configure security protection on an interface.

1.2.3 Enabling Security Protection on an Interface is the prerequisite for 1.2.4 (Optional)Configuring the Security Protection Action for an Interface. That is, you can perform 1.2.4(Optional) Configuring the Security Protection Action for an Interface only afterperforming 1.2.3 Enabling Security Protection on an Interface.

1.2.1 Establishing the Configuration Task

1.2.2 Configuring the Limit on the Number of MAC Addresses Learnt by an Interface

1 Security Protection on InterfacesQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

1-2 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 23: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

1.2.3 Enabling Security Protection on an Interface

1.2.4 (Optional) Configuring the Security Protection Action for an Interface

1.2.5 (Optional) Configuring an Interface to Convert Secure Dynamic MAC Addresses to StaticMAC Addresses

1.2.6 Checking the Configuration

1.2.1 Establishing the Configuration Task

Applicable Environment

After enabling security protection on an interface, the device can protect the interface bycontrolling packets with invalid source MAC addresses.

Pre-configuration Tasks

None.

Data Preparation

Before configuring security protection on an interface, you need the following data.

No. Data

1 Number of the interface

2 Maximum number of MAC addresses that can be learnt and that of static MACaddresses on the interface

1.2.2 Configuring the Limit on the Number of MAC AddressesLearnt by an Interface

Context

Do as follows on devices on which the limit on the number of MAC addresses learnt by aninterface should be configured.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:mac-address restrict

MAC address learning restriction and forwarding restriction are enabled on interfaces of thedevice.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 1 Security Protection on Interfaces

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

1-3

Page 24: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Step 3 Run:mac-table limit interface-type interface-number limit-number

The limit on the number of MAC addresses that can be learnt is configured for an interface.

By default, the MAC address learning restriction and forwarding restriction on interfaces aredisabled on the device. That is, there is no limit on the number of static MAC addresses on aninterface.

----End

1.2.3 Enabling Security Protection on an Interface

ContextDo as follows on devices on which security protection on interfaces should be enabled.

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-security enable

Security protection is enabled on the interface.

By default, security protection is disabled on interfaces of the device.

----End

1.2.4 (Optional) Configuring the Security Protection Action for anInterface

ContextDo as follows on devices on which the security protection actions on interfaces should beconfigured.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface interface-type interface-number

1 Security Protection on InterfacesQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

1-4 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 25: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

The interface view is displayed.

Step 3 Run:port-security protect-action { protect | restrict | shutdown }

A security protection action is configured for the interface.

By default, the security protection action on an interface is restrict.

----End

1.2.5 (Optional) Configuring an Interface to Convert SecureDynamic MAC Addresses to Static MAC Addresses

ContextDo as follows on devices on which security protection on interfaces should be configured.

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-security dynamic-to-static mac-address { all | mac-address vlan vlan-id }

The interface is configured to convert secure dynamic MAC addresses into static MACaddresses.

----End

1.2.6 Checking the ConfigurationRun the following commands to check the previous configuration.

Action Command

Check the configurations oninterfaces.

display current-configuration [ configuration[ configuration-type ] | controller | interface interface-type [ interface-number ] ] [ | { begin | exclude |include } regular-expression ]

1.3 Configuration ExamplesThis section provides examples of security protection on interfaces.

1.3.1 Example for Configuring Security Protection on an Interface

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 1 Security Protection on Interfaces

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

1-5

Page 26: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

1.3.1 Example for Configuring Security Protection on an Interface

Networking RequirementsIn the network shown in Figure 1-1, you need to enable security protection on GigabitEthernet0/0/1 of the S-switch to protect the interface. You are also required to configure the securityprotection action on the interface as shutdown.

Figure 1-1 Networking diagram of configuring security protection on an interface

Configuration RoadmapThe configuration roadmap is as follows:

1. Configure the limit on the number of MAC addresses learnt by the interface.2. Enable security protection on the interface.3. Configure the security protection action for the interface.

Data PreparationTo complete the configuration, you need the following data:

l Number of the interface

l Maximum number of MAC addresses learnt by the interface, which is set to 100

Configuration Procedure1. Configure the limit on the number of MAC addresses learnt by the interface.

<Quidway> system-view[Quidway] mac-address restrict[Quidway] interface GigabitEthernet 0/0/1[Quidway-GigabitEthernet0/0/1] mac-table limit 100

2. Enable security protection on the interface.[Quidway-GigabitEthernet0/0/1] port-security enable

3. Set the security protection action on the interface as shutdown.[Quidway-GigabitEthernet0/0/1] port-security protect-action shutdown

4. Verify the configuration.# Run the display current-configuration command to check the configuration of securityprotection on the interface.

1 Security Protection on InterfacesQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

1-6 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 27: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

[S-switch-A-GigabitEthernet0/0/1] display this#interface GigabitEthernet0/0/1 mac-table limit 100 port-security enable port-security protect-action shutdown#return

Configuration FilesConfiguration file of the S-switch

# sysname Quidway#mac-address restrict#interface GigabitEthernet0/0/1mac-table limit 100 port-security enable port-security protect-action shutdown

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 1 Security Protection on Interfaces

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

1-7

Page 28: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf
Page 29: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

2 MFF Configuration

About This Chapter

This chapter describes the basics of MAC Forced Forwarding (MFF) and the procedures andexamples for configuring MFF.

2.1 Introduction to MFFThis section describes the definition, principle, and specification of MFF.

2.2 Configuring MFFIn an access network, configuring MFF implements Layer 2 isolation between user hosts andenables the traffic between user hosts to be forwarded through ARs.

2.3 Configuration ExamplesThis section provides several configuration examples of MFF.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 2 MFF Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

2-1

Page 30: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

2.1 Introduction to MFFThis section describes the definition, principle, and specification of MFF.

2.1.1 MFF Overview

2.1.2 MFF Functions Supported by the S-switch

2.1.3 Update History

2.1.1 MFF Overview

In traditional Ethernet networking schemes, to implement Layer 2 isolation and Layer 3interconnection between different clients, Virtual Local Area Networks (VLANs) are often usedon the switch. If a large number of users need to be isolated at Layer 2, a large number of VLANsare occupied. To implement Layer 3 interconnection between clients, you need to plan differentIP network segments for VLANs and assign IP addresses to VLANIF interfaces. Thus, dividingtoo many VLANs reduces the efficiency in allocating IP addresses.

MFF provides a solution to the preceding issues, implementing Layer 2 isolation and Layer 3interconnection between clients in the same broadcast domain. MFF captures AddressResolution Protocol (ARP) request packets and sends ARP response packets with the MACaddress of the gateway through proxy ARP. In this manner, all traffic including the traffic in thesame subnet can be forcibly sent to the gateway so that the gateway can monitor data traffic.This prevents malicious attacks between user hosts and improves the security of networkdeployment.

MFF involves two types of interface roles: user interface and network interface.

1. User interfaceThe MFF user interface refers to the interface connected to the network terminal users.The user interface processes different packets as follows:l Permits protocol packets to pass through.

l Sends ARP packets and Dynamic Host Configuration Protocol (DHCP) packets to theCPU for processing.

l Permits only the unicast packets with the destination address as the MAC address ofthe gateway to pass through if the MAC address of the gateway is learnt, and discardsother packets. Discards the unicast packets with the destination address as the MACaddress of the gateway if the MAC address of the gateway is not learnt.

l Denies multicast and broadcast packets to pass through.

2. Network interfaceThe MFF network interface refers to the interface that is connected to another networkdevice such as the access switch, the convergence switch, or the gateway.The network interface processes different packets as follows:l Permits multicast packets and DHCP packets to pass through.

l Sends ARP packets to the CPU for processing.

l Denies other broadcast packets to pass through.

2 MFF ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

2-2 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 31: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

NOTE

The interfaces that connect upstream devices and the gateway, the interfaces that are connected toother downstream MFF devices in a cascading network where multiple MFF devices are connected,or the interfaces connecting devices in a ring network should be configured as network interfaces.

The network interface is just a type of interface roles, and is irrelevant to the position of the interfacein the network.

In a VLAN where MFF is enabled, there are only network interfaces and user interfaces.

2.1.2 MFF Functions Supported by the S-switch

Static GatewayThe static gateway is applied in a scenario where the IP address is configured statically becausethe information about the gateway cannot be obtained through DHCP packets. When configuringthe IP address statically, you need to maintain an IP address of the static gateway in a VLAN.If the IP address of the static gateway is not configured, user hosts except for valid user hostsdynamically allocated by DHCP cannot communicate normally.

Detection and Maintenance of the MAC Address of the GatewayIf timing detection of the gateway is configured, the gateway is detected periodically. The bogusARP packets are used during detection. Their IP address and source MAC address are originatedfrom the user list recorded by MFF. Generally, the IP address and MAC address of the first userrecorded by MFF are selected. If the entry of this user is deleted, you need to re-select userinformation of bogus ARP packets. If no user host corresponds to the gateway after the userentry is deleted, information about detection of the gateway is cleared.

Proxy ARPProxy ARP ensures Layer 3 interconnection between user hosts. In addition, proxy ARP reducesthe number of broadcast packets at the network side and at the user side.

MFF processes ARP packets as follows:

l Responds to ARP requests. Replaces the gateway to respond to ARP packets to the userhost so that packets between users are forwarded at Layer 3 through the gateway. Here,ARP requests of user hosts include ARP requests on the gateway and ARP requests on IPinformation of other users.

l Replaces the gateway to respond to ARP requests. Replaces the user host to respond toARP packets to the gateway. If the entry requested by the gateway exists on the MFF, theresponse is replied according to the entry. If the entry is not created, the request is forwarded.In this manner, broadcast packets are reduced.

l Monitors ARP packets in the network, and updates the mapping table between IP addressesand MAC addresses of the gateway.

Deploying the Server in a NetworkThe IP address of the server can be the IP address of the DHCP server, the IP address of theserver bearing other services, or the virtual IP address of the Virtual Router Redundancy Protocol(VRRP). If ARP requests with the source IP address as the IP address of the server are receivedat the network side, MFF responds to these ARP requests of the server as follows:

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 2 MFF Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

2-3

Page 32: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

l MFF forwards the packets sent from the user host to the server through the gateway.

l MFF forwards the packets sent from the server to the user host without using the gateway.

2.1.3 Update History

Version Revision

V200R002C01B010 This is the first release.

2.2 Configuring MFFIn an access network, configuring MFF implements Layer 2 isolation between user hosts andenables the traffic between user hosts to be forwarded through ARs.

2.2.1 Establishing the Configuration Task

2.2.2 Enabling MFF Globally

2.2.3 Configuring an MFF Network Interface

2.2.4 Enabling MFF in a VLAN

2.2.5 (Optional) Assigning an IP Address to the Static Gateway

2.2.6 (Optional) Enabling Timing Detection of the MAC Address of the Gateway

2.2.7 (Optional) Assigning an IP Address to the Server

2.2.8 Checking the Configuration

2.2.1 Establishing the Configuration Task

Applicable EnvironmentIn the Metro Ethernet network at the access layer, you can configure MFF to implement thefollowing functions:

l Isolate multiple access users at Layer 2.

l The traffic between user hosts is forwarded through ARs at Layer 3 so that user traffic canbe filtered, scheduled, and charged.

Pre-configuration TasksBefore configuring basic MFF functions, complete the following tasks:

If there are user hosts whose IP addresses are allocated dynamically, you need to:

l Enable DHCP snooping.

l Set the trusted interface of DHCP snooping.

Data PreparationTo configure basic MFF functions, you need the following data.

2 MFF ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

2-4 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 33: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

No. Data

1 ID of the VLAN where MFF needs to be configured

2 Number of the network interface

3 IP address of the static gateway

4 IP address of the server

2.2.2 Enabling MFF Globally

ContextDo as follows on the AN.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:mac-forced-forwarding enable

MFF is enabled globally.

----End

2.2.3 Configuring an MFF Network Interface

ContextDo as follows on the AN.

Procedure

Step 1 Run:interface interface-type interface-number

The interface view is displayed.

Step 2 Run:mac-forced-forwarding network-port

The interface is configured as the MFF network interface.

NOTE

This configuration can be performed before MFF is enabled, but takes effect only after MFF is enabled.

----End

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 2 MFF Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

2-5

Page 34: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

2.2.4 Enabling MFF in a VLAN

ContextDo as follows on the AN.

Procedure

Step 1 Run:vlan vlan-id

The VLAN view is displayed.

Step 2 Run:mac-forced-forwarding enable

MFF is enabled in the VLAN.

NOTE

If entries on the device are insufficient, MFF fails to be configured.

----End

2.2.5 (Optional) Assigning an IP Address to the Static Gateway

ContextDo as follows on the AN.

Procedure

Step 1 Run:vlan vlan-id

The VLAN view is displayed.

Step 2 Run:mac-forced-forwarding static-gateway ip-address

An IP address is assigned to the static gateway.

----End

2.2.6 (Optional) Enabling Timing Detection of the MAC Address ofthe Gateway

ContextDo as follows on the AN.

2 MFF ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

2-6 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 35: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Procedure

Step 1 Run:vlan vlan-id

The VLAN view is displayed.

Step 2 Run:mac-forced-forwarding gateway-detect

Detection of the MAC address of the gateway is enabled in the VLAN.

----End

2.2.7 (Optional) Assigning an IP Address to the Server

ContextDo as follows on the AN.

Procedure

Step 1 Run:vlan vlan-id

The VLAN view is displayed.

Step 2 Run:mac-forced-forwarding server ip-address &<1-10>

An IP address is assigned to the server deployed in a network.

----End

2.2.8 Checking the Configuration

Run the following commands to check the previous configuration.

Action Command

Check information about theMFF network interface.

display mac-forced-forwarding network-port

Check information about theMFF user and gateway in aVLAN.

display mac-forced-forwarding vlan vlan-id

Run the display mac-forced-forwarding network-port command, and you can viewinformation about the network interface in a VLAN where MFF is enabled. For example:

[Quidway] display mac-forced-forwarding network-port-------------------------------------------------------------------------------- VLAN ID Network-ports -------------------------------------------------------------------------------- VLAN 111 GigabitEthernet0/0/4

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 2 MFF Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

2-7

Page 36: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Run the display mac-forced-forwarding vlan vlan-id command, and you can view informationabout the MFF user and gateway in a specified VLAN. For example:

[Quidway] display mac-forced-forwarding vlan 111----------------------------------------------------------------------------Servers (none) ----------------------------------------------------------------------------User IP User MAC Gateway IP Gateway MAC ----------------------------------------------------------------------------10.1.1.1 0000-0001-0101 10.1.1.100 0000-0001-0200

2.3 Configuration ExamplesThis section provides several configuration examples of MFF.

2.3.1 Example for Configuring MFF

2.3.1 Example for Configuring MFF

Networking Requirements

As shown in Figure 2-1, all user hosts obtain IP addresses dynamically through the DHCP server.It is required that all user hosts should be interconnected through the AR.

Figure 2-1 Networking diagram of configuring dynamic MFF

2 MFF ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

2-8 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 37: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Configuration RoadmapThe configuration roadmap is as follows:

1. Configure DHCP snooping.2. Enable MFF globally.3. Configure MFF network interfaces.4. Enable MFF in a VLAN.5. (Optional) Configure timing detection of the gateway.6. (Optional) Configure the server.

Data PreparationTo complete the configuration, you need the following data:

l ID of the VLAN where MFF needs to be configured

l Number of the network interface

l IP address of the static gateway

l (Optional) IP address of the server

Configuration Procedure1. Configure DHCP snooping.

# Configure DHCP snooping globally on S-switch-A.[S-switch-A] dhcp snooping enable# Configure DHCP snooping in a VLAN on S-switch-A.[S-switch-A] vlan 2[S-switch-A-Vlan2] dhcp snooping enable# Configure GigabitEthernet 0/0/4 as the trusted interface on S-switch-A.[S-switch-A-vlan2] dhcp snooping trusted interface gigabitethernet0/0/4[S-switch-A-vlan2] quit# Configure DHCP snooping globally on S-switch-B.[S-switch-B] dhcp snooping enable# Configure DHCP snooping in a VLAN on S-switch-B.[S-switch-B] vlan 2[S-switch-B-vlan2] dhcp snooping enable# Configure GigabitEthernet 0/0/1 as the trusted interface on S-switch-B.[S-switch-B-vlan2] dhcp snooping trusted interface gigabitethernet0/0/1[S-switch-B-vlan2] quit

2. Enable MFF globally.# Enable MFF globally on S-switch-A.[S-switch-A] mac-forced-forwarding enable# Enable MFF globally on S-switch-B.[S-switch-B] mac-forced-forwarding enable

3. Configure MFF network interfaces.# Configure GigabitEthernet 0/0/4 as the MFF network interface on S-switch-A.[S-switch-A] interface gigabitethernet0/0/4[S-switch-A-GigabitEthernet0/0/4] mac-forced-forwarding network-port

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 2 MFF Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

2-9

Page 38: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

[S-switch-A-GigabitEthernet0/0/4] quit

# Configure GigabitEthernet 0/0/1 and GigabitEthernet0/0/2 as MFF network interfaces onS-switch-B.[S-switch-B] interface gigabitethernet0/0/1[S-switch-B-GigabitEthernet0/0/1] mac-forced-forwarding network-port[S-switch-B-GigabitEthernet0/0/1] quit[S-switch-B] interface gigabitethernet0/0/2[S-switch-B-GigabitEthernet0/0/2] mac-forced-forwarding network-port[S-switch-B-GigabitEthernet0/0/2] quit

4. Enable MFF in a VLAN.# Enable MFF in VLAN 2 on S-switch-A.[S-switch-A] vlan 2[S-switch-A-vlan2] mac-forced-forwarding enable

# Enable MFF in VLAN 2 on S-switch-B.[S-switch-B] vlan 2[S-switch-B-vlan2] mac-forced-forwarding enable

5. (Optional) Configure timing detection of the gateway.# Configure timing detection of the gateway on S-switch-A.[S-switch-A-vlan2] mac-forced-forwarding gateway-detect

# Configure timing detection of the gateway on S-switch-B.[S-switch-B-vlan2] mac-forced-forwarding gateway-detect

6. (Optional) Configure the server.# Configure the server on S-switch-A.[S-switch-A-vlan2] mac-forced-forwarding server 10.10.0.1

# Configure the server on S-switch-B.[S-switch-B-vlan2] mac-forced-forwarding server 10.10.0.1

Configuration Filesl Configuration file of S-switch-A

# sysname S-switch-A# vlan batch 2#dhcp snooping enablemac-forced-forwarding enable#vlan 2dhcp snooping enable dhcp snooping trusted interface GigabitEthernet0/0/4 mac-forced-forwarding enable mac-forced-forwarding gateway-detect mac-forced-forwarding server 10.10.0.1#interface GigabitEthernet0/0/1 port default vlan 2#interface GigabitEthernet0/0/2 port default vlan 2#interface GigabitEthernet0/0/3 port default vlan 2#interface GigabitEthernet0/0/4 port trunk allow-pass vlan 2 mac-forced-forwarding network-port

2 MFF ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

2-10 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 39: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

#return

l Configuration file of S-switch-B# sysname S-switch-B# vlan batch 2#dhcp snooping enablemac-forced-forwarding enable#vlan 2dhcp snooping enable dhcp snooping trusted interface GigabitEthernet0/0/1 mac-forced-forwarding enable mac-forced-forwarding gateway-detect mac-forced-forwarding server 10.10.0.1#interface GigabitEthernet0/0/1 port trunk allow-pass vlan 2 mac-forced-forwarding network-port#interface GigabitEthernet0/0/2 port trunk allow-pass vlan 2mac-forced-forwarding network-port#interface GigabitEthernet0/0/3 port default vlan 2#return

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 2 MFF Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

2-11

Page 40: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf
Page 41: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

3 Attack Defense Configuration

About This Chapter

This chapter describes how to implement and configure attack defense on the S-switch.

3.1 Overview of Attack DefenseThis section describes the concepts and types of attack defense.

3.2 Configuring the Defense Against IP Spoofing AttacksThis section describes how to configure the defense against IP spoofing attacks.

3.3 Configuring the Defense Against Land AttacksThis section describes how to configure the defense against Land attacks.

3.4 Configuring the Defense Against Smurf AttacksThis section describes how to configure the defense against Smurf attacks.

3.5 Configuring the Defense Against SYN Flood AttacksThis section describes how to configure the defense against SYN flood attacks.

3.6 Configuring the Defense Against ICMP Flood AttacksThis section describes how to configure the defense against ICMP flood attacks.

3.7 Configuring the Defense Against Ping of Death AttacksThis section describes how to configure the defense against Ping of Death attacks.

3.8 Configuring the Defense Against Teardrop AttacksThis section describes how to configure the defense against Teardrop attacks.

3.9 Debugging Attack DefenseThis section describes how to debug attack defense.

3.10 Configuration ExamplesThis section provides several configuration examples of attack defense.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 3 Attack Defense Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

3-1

Page 42: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

3.1 Overview of Attack DefenseThis section describes the concepts and types of attack defense.

3.1.1 Introduction to Attack Defense

3.1.2 Attack Defense Supported by the S-switch

3.1.3 Logical Relationships Between Configuration Tasks

3.1.1 Introduction to Attack Defense

Network attacks are generally launched in the following ways: The network attack intrudes ordestroys a network server (a host) to steal sensitive data or to interrupt the server's service. Thenetwork attacker directly destroys network devices, which results in abnormality of networkservices or even service interruption.

With the attack defense function, the S-switch can locate types of network attacks and protectthe Intranet against malicious attacks to ensure normal running of the system.

3.1.2 Attack Defense Supported by the S-switch

The S-switch defends the system against the following attacks:l Denial of Service (DoS) attack: The attacker consumes a large quantity of system resources

by sending numerous unsolicited packets or forged connection packets to the S-switch. Asa result, the S-switch reboots or crashes, interrupting normal services.

l Malformed packet attack: The attacker sends a defective IP packet to the S-switch, causingthe system to crash during the processing of such an IP packet.

3.1.3 Logical Relationships Between Configuration TasksTo protect the S-switch against attacks, you can configure the following attack defense functions.All configuration tasks are not listed in sequence. You can configure them as required.l 3.2 Configuring the Defense Against IP Spoofing Attacksl 3.3 Configuring the Defense Against Land Attacksl 3.7 Configuring the Defense Against Ping of Death Attacksl 3.8 Configuring the Defense Against Teardrop Attacksl 3.6 Configuring the Defense Against ICMP Flood Attacks

To protect an Intranet connected to the S-switch against attacks, you can configure the followingattack defense functions. All configuration tasks are not listed in sequence. You can configurethem as required.l 3.4 Configuring the Defense Against Smurf Attacksl 3.5 Configuring the Defense Against SYN Flood Attacks

3.2 Configuring the Defense Against IP Spoofing AttacksThis section describes how to configure the defense against IP spoofing attacks.

3 Attack Defense ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

3-2 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 43: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

3.2.1 Establishing the Configuration Task

3.2.2 Configuring the Defense Against IP Spoofing Attacks

3.2.3 Checking the Configuration

3.2.1 Establishing the Configuration Task

Applicable EnvironmentIn the IP spoofing attack, an attacker forges a packet carrying a valid source IP address to accessa targeted system, or even control it. To defend the S-switch against IP spoofing attacks, youneed to configure the defense against IP spoofing attacks on the S-switch.

Pre-configuration TasksBefore configuring the defense against IP spoofing attacks, complete the following task:l Create a VLAN and the corresponding VLANIF interface

l Adding the interface connecting the Extranet to a VLAN and assigning an IP address tothe VLANIF interface

Data PreparationTo configure the defense against IP spoofing attacks, you need the following data.

No. Data

1 ID of the VLAN that the interface joins

3.2.2 Configuring the Defense Against IP Spoofing Attacks

ContextDo as follows on the S-switch to be configured with the defense against IP spoofing attacks.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:vlan vlan-id

A VLAN is created and the view of the VLAN is displayed.

Step 3 Run:quit

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 3 Attack Defense Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

3-3

Page 44: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

The system view is returned to.

Step 4 Run:firewall enable

The firewall is enabled.

Step 5 Run:interface vlanif vlan-id

The VLANIF interface view is displayed.

Step 6 Run:firewall defend enable

Attack defense is enabled.

Step 7 Run:quit

The system view is returned to.

Step 8 Run:firewall defend ip-spoofing enable

The defense against IP spoofing attacks is enabled.

By default, the defense against IP spoofing attacks is disabled.

After the S-switch is enabled with the defense against IP spoofing attacks, the attack informationis recorded when the S-switch suffers IP spoofing attacks and a log is output. The log displaysthe records maintained by the system within the last 30 seconds. The records include the sourceIP addresses of the attack packets, the start time of the attacks, the end time of the attacks, andthe total number of the attack packets. In addition, a maximum of 12 different IP addresses canbe displayed. When the attack sources are more than 12, "…" is displayed.

----End

3.2.3 Checking the ConfigurationRun the following command to check the previous configuration.

Action Command

Check the configuration of attack defense on theS-switch.

display firewall defend flag

Run the display firewall defend flag command on the S-switch. If ip-spoofing is displayed, itmeans that the defense against IP spoofing attacks is enabled.

<Quidway> display firewall defend flag The attack defend flag is: ip-spoofing

3.3 Configuring the Defense Against Land AttacksThis section describes how to configure the defense against Land attacks.

3 Attack Defense ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

3-4 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 45: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

3.3.1 Establishing the Configuration Task

3.3.2 Configuring the Defense Against Land Attacks

3.3.3 Checking the Configuration

3.3.1 Establishing the Configuration Task

Applicable EnvironmentTo protect the S-switch against Land attacks, you need to configure the defense against Landattacks on the S-switch.

Pre-configuration TasksBefore configuring the defense against Land attacks, complete the following task:

l Create a VLAN and the corresponding VLANIF interface.

l Adding the interface to a VLAN and assigning an IP address to the VLANIF interface

Data PreparationTo configure the defense against Land attacks, you need the following data.

No. Data

1 ID of the VLAN to which the interface belongs

3.3.2 Configuring the Defense Against Land Attacks

ContextDo as follows on the S-switch to be configured with the defense against Land attacks.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:vlan vlan-id

A VLAN is created and the view of the VLAN is displayed.

Step 3 Run:quit

The system view is returned to.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 3 Attack Defense Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

3-5

Page 46: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Step 4 Run:firewall enable

The firewall is enabled.

Step 5 Run:interface vlanif vlan-id

The VLANIF interface view is displayed.

Step 6 Run:firewall defend enable

Attack defense is enabled.

Step 7 Run:quit

The system view is returned to.

Step 8 Run:firewall defend land enable

The defense against Land attacks is enabled.

By default, the defense against Land attacks is disabled.

----End

3.3.3 Checking the ConfigurationRun the following command to check the previous configuration.

Action Command

Check the configuration of attack defense on theS-switch.

display firewall defend flag

Run the display firewall defend flag command on the S-switch. If land is displayed, it meansthat the defense against Land attacks is enabled.

<Quidway> display firewall defend flag The attack defend flag is: land

3.4 Configuring the Defense Against Smurf AttacksThis section describes how to configure the defense against Smurf attacks.

3.4.1 Establishing the Configuration Task

3.4.2 Configuring the Defense Against Smurf Attacks

3.4.3 Checking the Configuration

3 Attack Defense ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

3-6 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 47: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

3.4.1 Establishing the Configuration Task

Applicable EnvironmentTo protect the S-switch against Smurf attacks, you need to configure the defense against Smurfattacks on the S-switch.

Pre-configuration TasksBefore configuring the defense against Smurf attacks, complete the following task:l Create a VLAN and the corresponding VLANIF interface

l Adding the interface to a VLAN and assigning an IP address to the VLANIF interface

Data PreparationTo configure the defense against Smurf attacks, you need the following data.

No. Data

1 ID of the VLAN to which the interface belongs

3.4.2 Configuring the Defense Against Smurf Attacks

ContextDo as follows on the S-switch to be configured with the defense against Smurf attacks.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:vlan vlan-id

A VLAN is created and the view of the VLAN is displayed.

Step 3 Run:quit

The system view is returned to.

Step 4 Run:firewall enable

The firewall is enabled.

Step 5 Run:interface vlanif vlan-id

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 3 Attack Defense Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

3-7

Page 48: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

The VLANIF interface view is displayed.

Step 6 Run:firewall defend enable

Attack defense is enabled.

Step 7 Run:quit

The system view is returned to.

Step 8 Run:firewall defend smurf enable

The defense against Smurf attacks is enabled.

By default, the defense against Smurf attacks is disabled.

----End

3.4.3 Checking the ConfigurationRun the following command to check the previous configuration.

Action Command

Check the configuration of attack defense on a S-switch.

display firewall defend flag

Run the display firewall defend flag command on the S-switch. If smurf is displayed, it meansthat the defense against Smurf attacks is enabled.

<Quidway> display firewall defend flag The attack defend flag is: smurf

3.5 Configuring the Defense Against SYN Flood AttacksThis section describes how to configure the defense against SYN flood attacks.

3.5.1 Establishing the Configuration Task

3.5.2 Example for Configuring the Defense Against SYN Flood Attacks

3.5.3 Checking the Configuration

3.5.1 Establishing the Configuration Task

Applicable Environment

To protect the S-switch against SYN flood attacks, you need to configure the defense againstSYN flood attacks on the S-switch.

3 Attack Defense ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

3-8 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 49: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Pre-configuration Tasks

Before configuring the defense against SYN flood attacks, complete the following task:l Create a VLAN and the corresponding VLANIF interface.

l Adding the interface to a VLAN and assigning an IP address to the VLANIF interface

Data Preparation

To configure the defense against SYN flood attacks, you need the following data.

No. Data

1 ID of the VLAN to which the interface belongs

2 IP address of a device to be protected

3 (Optional) Maximum rate of SYN packets

3.5.2 Example for Configuring the Defense Against SYN FloodAttacks

Context

Do as follows on the S-switch to be configured with the defense against SYN flood attacks.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the vlan vlan-id command to create a VLAN and enter the view of the VLAN.

Step 3 Run the quit command to return to the system view.

Step 4 Run the firewall enable command to enable the firewall.

Step 5 Run the firewall defend syn-flood enable command to enable the defense against SYN floodattacks.

By default, the defense against SYN flood attacks is disabled.

Step 6 Run the interface vlanif vlan-id command to enter the VLANIF interface view.

Step 7 Run the firewall defend enable command to enable attack defense.

Step 8 Run the quit command to return to the system view.

Step 9 (Optional) Run the firewall defend syn-flood ip ip-address [ max-rate rate-number ] commandto specify the IP address of a device to be protected from SYN flood attacks and specify relevantparameters.

----End

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 3 Attack Defense Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

3-9

Page 50: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

3.5.3 Checking the ConfigurationRun the following command to check the previous configuration.

Action Command

Check the configuration of attack defense on a S-switch.

display firewall defend flag

Run the display firewall defend flag command on the S-switch. If syn-flood is displayed, itmeans that the defense against SYN flood attacks is enabled.

<Quidway> display firewall defend flag The attack defend flag is: syn-flood

3.6 Configuring the Defense Against ICMP Flood AttacksThis section describes how to configure the defense against ICMP flood attacks.

3.6.1 Establishing the Configuration Task

3.6.2 Configuring the Defense Against ICMP Flood Attacks

3.6.3 Checking the Configuration

3.6.1 Establishing the Configuration Task

Applicable EnvironmentTo protect the S-switch against ICMP flood attacks, you need to configure the defense againstICMP flood attacks on the S-switch.

Pre-configuration TasksBefore configuring the defense against ICMP flood attacks, complete the following task:l Create a VLAN and the corresponding VLANIF interface.

l Adding the interface to a VLAN and assigning an IP address to the VLANIF interface

Data PreparationTo configure the defense against ICMP flood attacks, you need the following data.

No. Data

1 ID of the VLAN to which the interface belongs

2 IP address of a device to be protected

3 (Optional) Maximum rate of ICMP packets

3 Attack Defense ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

3-10 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 51: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

3.6.2 Configuring the Defense Against ICMP Flood Attacks

ContextDo as follows on the S-switch to be configured with the defense against ICMP flood attacks.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:vlan vlan-id

A VLAN is created and the view of the VLAN is displayed.

Step 3 Run:quit

The system view is returned to.

Step 4 Run:firewall enable

The firewall is enabled.

Step 5 Run:interface vlanif vlan-id

The VLANIF interface view is displayed.

Step 6 Run:firewall defend enable

Attack defense is enabled.

Step 7 Run:quit

The system view is returned to.

Step 8 Run:firewall defend icmp-flood enable

The global defense against ICMP flood attacks is enabled.

By default, the defense against ICMP flood attacks is disabled.

Step 9 (Optional) Run:

firewall defend icmp-flood ip ip-address [ max-rate rate-number ]

The relevant parameters are specified for the device with a specified IP address to be protectedfrom ICMP flood attacks.

----End

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 3 Attack Defense Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

3-11

Page 52: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

3.6.3 Checking the ConfigurationRun the following command to check the previous configuration.

Action Command

Check the configuration of attack defense on theS-switch.

display firewall defend flag

Run the display firewall defend flag command on the S-switch. If icmp-flood is displayed, itmeans that the defense against ICMP flood attacks is enabled.

<Quidway> display firewall defend flag The attack defend flag is: icmp-flood

3.7 Configuring the Defense Against Ping of Death AttacksThis section describes how to configure the defense against Ping of Death attacks.

3.7.1 Establishing the Configuration Task

3.7.2 Configuring the Defense Against Ping of Death Attacks

3.7.3 Checking the Configuration

3.7.1 Establishing the Configuration Task

Applicable EnvironmentTo protect the S-switch against attacks of oversized ICMP packets, you need to configure thedefense against Ping of Death attacks on the S-switch.

Pre-configuration TasksBefore configuring the defense against Ping of Death attacks, complete the following task:l Create a VLAN and the corresponding VLANIF interface.

l Adding the interface to a VLAN and assigning an IP address to the VLANIF interface

Data PreparationTo configure the defense against Ping of Death attacks, you need the following data.

No. Data

1 ID of the VLAN to which the interface belongs

3.7.2 Configuring the Defense Against Ping of Death Attacks

3 Attack Defense ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

3-12 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 53: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

ContextDo as follows on the S-switch to be configured with the defense against Ping of Death attacks.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:vlan vlan-id

A VLAN is created and the view of the VLAN is displayed.

Step 3 Run:quit

The system view is returned to.

Step 4 Run:firewall enable

The firewall is enabled.

Step 5 Run:interface vlanif vlan-id

The VLANIF interface view is displayed.

Step 6 Run:firewall defend enable

Attack defense is enabled.

Step 7 Run:quit

The system view is returned to.

Step 8 Run:firewall defend ping-of-death enable

The defense against Ping of Death attacks is enabled.

By default, the defense against Ping of Death attacks is disabled.

----End

3.7.3 Checking the ConfigurationRun the following command to check the previous configuration.

Action Command

Check the configuration of attack defense on theS-switch.

display firewall defend flag

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 3 Attack Defense Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

3-13

Page 54: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Run the display firewall defend flag command on the S-switch. If ping-of-death is displayed,it means that the defense against Ping of Death attacks is enabled.

<Quidway> display firewall defend flag The attack defend flag is: ping-of-death

3.8 Configuring the Defense Against Teardrop AttacksThis section describes how to configure the defense against Teardrop attacks.

3.8.1 Establishing the Configuration Task

3.8.2 Configuring the Defense Against Teardrop Attacks

3.8.3 Checking the Configuration

3.8.1 Establishing the Configuration Task

Applicable Environment

To protect the S-switch against attacks of forged fragmented IP packets, you need to configurethe defense against Teardrop attacks on the S-switch.

Pre-configuration Tasks

Before configuring the defense against Teardrop attacks, complete the following task:l Create a VLAN and the corresponding VLANIF interface.

l Adding the interface to a VLAN and assigning an IP address to the VLANIF interface

Data Preparation

To configure the defense against Teardrop attacks, you need the following data.

No. Data

1 ID of the VLAN to which the interface belongs

3.8.2 Configuring the Defense Against Teardrop Attacks

Context

Do as follows on the S-switch to be configured with the defense against Teardrop attacks.

Procedure

Step 1 Run:system-view

3 Attack Defense ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

3-14 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 55: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

The system view is displayed.

Step 2 Run:vlan vlan-id

A VLAN is created and the view of the VLAN is displayed.

Step 3 Run:quit

The system view is returned to.

Step 4 Run:firewall enable

The firewall is enabled.

Step 5 Run:interface vlanif vlan-id

The VLANIF interface view is displayed.

Step 6 Run:firewall defend enable

Attack defense is enabled.

Step 7 Run:quit

The system view is returned to.

Step 8 Run:firewall defend teardrop enable

The defense against Teardrop attacks is enabled.

By default, the defense against Teardrop attacks is disabled.

----End

3.8.3 Checking the ConfigurationRun the following command to check the previous configuration.

Action Command

Check the configuration of attack defense on a S-switch.

display firewall defend flag

Run the display firewall defend flag command on the S-switch. If teardrop is displayed, itmeans that the defense against Teardrop attacks is enabled.

<Quidway> display firewall defend flag The attack defend flag is: teardrop

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 3 Attack Defense Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

3-15

Page 56: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

3.9 Debugging Attack DefenseThis section describes how to debug attack defense.

CAUTIONEnabling the debugging affects the system performance. So, after debugging, run the undodebugging all command to disable it at once.

When a fault occurs, run the following debugging command in the user view to locate the fault.

Action Command

Enable the debugging ofattack defense.

debugging firewall defend { all | ip-spoofing | land | smurf |syn-flood | icmp-flood | ping-of-death | tear-drop }

3.10 Configuration ExamplesThis section provides several configuration examples of attack defense.

3.10.1 Example for Configuring the Defense Against Land Attacks

3.10.2 Example for Configuring the Defense Against SYN Flood Attacks

3.10.1 Example for Configuring the Defense Against Land Attacks

Networking Requirements

As shown in Figure 3-1, on the S-switch, GigabitEthernet0/0/1 is connected to an Intranet andGigabitEthernet0/0/2 is connected to the Internet. It is required that GigabitEthernet0/0/2 beenabled with the defense against Land attacks.

Figure 3-1 Networking for configuring the defense against Land attacks

3 Attack Defense ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

3-16 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 57: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Configuration Roadmap

The configuration roadmap is as follows:

1. Add GigabitEthernet0/0/2 to a VLAN and assign an IP address to the VLANIF interface.

2. Enable the defense against Land attacks on the S-switch.

Data Preparation

To complete the configuration, you need the following data:

l Numbers of the interfaces on the S-switch

l ID of the VLAN to which GigabitEthernet0/0/2 is added and the IP address of the VLANIFinterface

Configuration Procedure1. Enable the global attack defense on the S-switch.

<Quidway> system-view[Quidway] firewall enable[Quidway] vlan 2[Quidway–vlan2] port gigabitethernet 0/0/2[Quidway–vlan2] quit[Quidway] interface vlanif 2[Quidway–Vlanif2] ip address 192.168.0.1 24[Quidway–Vlanif2] firewall defend enable[Quidway–Vlanif2] quit

2. Enable the defense against Land attacks on the S-switch.[Quidway] firewall defend land enable

3. Verify the configuration.

Run the display firewall defend flag command on the S-switch, and you can view that thedefense against Land attacks is enabled.[Quidway] display firewall defend flagThe attack defend flag is: land

Configuration Filesl The following lists the configuration file of the S-switch.

sysname Quidway#firewall enable#vlan batch 1 2#firewall defend land enable#interface Vlanif2ip address 192.168.0.1 255.255.255.255firewall defend enable#interface GigabitEthernet0/0/2port default vlan 2.........#return

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 3 Attack Defense Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

3-17

Page 58: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

3.10.2 Example for Configuring the Defense Against SYN FloodAttacks

Networking RequirementsAs shown in Figure 3-2, on the S-switch, GE 0/0/1 is connected to an Intranet and GE 0/0/2 isconnected to the Internet. It is required that the defense against SYN flood attacks be enabledon the Figure 3-2 to protect the device at 192.168.1.3.

Figure 3-2 Networking for configuring the defense against SYN flood attacks

Configuration RoadmapThe configuration roadmap is as follows:

1. Add GE 0/0/1 and GE 0/0/2 to VLANs respectively and assign an IP address to eachVLANIF interface.

2. Configure the defense function on the VLANIF interfaces corresponding toGigabitEthernet 0/0/1 and GigabitEthernet 0/0/2 respectively

3. Configure the defense against SYN flood attacks on the S-switch to protect the device at192.168.1.3.

Data PreparationTo complete the configuration, you need the following data:l Numbers of the interfaces on the S-switch

l IDs of the VLANs to which GE 0/0/1 and GE 0/0/2 are respectively added and the IPaddresses of the VLANIF interfaces

l IP address of the device to be protected

l Maximum rate of SYN packets

l Maximum number of half-open connections

Configuration Procedure1. Add GE 0/0/1 to VLAN 30 and assign an IP address to VLANIF 30.

<Quidway> system-view[Quidway] firewall enable

3 Attack Defense ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

3-18 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 59: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

[Quidway] vlan 30[Quidway-vlan30] port gigabitethernet 0/0/1[Quidway-vlan30] quit[Quidway] interface vlanif 30[Quidway-Vlanif30] ip address 192.168.1.0 24[Quidway-Vlanif30] firewall defend enable[Quidway-Vlanif30] quit

2. Add GE 0/0/2 to VLAN 40 and assign an IP address to VLANIF 40.[Quidway] vlan 40[Quidway–vlan40] port gigabitethernet 0/0/2[Quidway–vlan40] quit[Quidway] interface vlanif 40[Quidway–Vlanif40] ip address 202.1.0.0 16[Quidway-Vlanif40] firewall defend enable[Quidway–Vlanif40] quit

3. Enable the global defense against SYN flood attacks.[Quidway] firewall defend syn-flood enable

4. Configure the defense against SYN flood attacks. Set the maximum rate of SYN packetsto 500 packets per second.[Quidway] firewall defend syn-flood ip 192.168.1.3 max-rate 500

5. Verify the configuration.Run the display firewall defend flag command on the S-switch, and you can view that thedefense against SYN flood attacks is enabled.<Quidway> display firewall defend flagThe attack defend flag is:syn-flood

Configuration Filesl The following lists the configuration file of the S-switch.

sysname Quidway#firewall enable#vlan batch 1 30 40#firewall defend syn-flood enablefirewall defend syn-flood ip 192.168.1.3 max-rate 500#interface Vlanif30ip address 192.168.1.0 255.255.255.0firewall defend enable#interface Vlanif40ip address 202.1.0.0 255.255.0.0firewall defend enable#interface GigabitEthernet0/0/1port default vlan 30#interface GigabitEthernet0/0/2port default vlan 40......#return

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 3 Attack Defense Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

3-19

Page 60: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf
Page 61: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

4 DHCP Snooping Configuration

About This Chapter

This chapter describes the implementation and configuration procedures of DHCP snooping onthe S-switch.

4.1 Overview of DHCP snoopingThis section describes the concept and types of DHCP snooping.

4.2 Preventing the Bogus DHCP Server AttackThis section describes how to prevent the bogus DHCP server attack through the S-switch.

4.3 Preventing the Middleman Attack and IP/MAC Spoofing AttackThis section describes how to prevent the middleman attack and IP/MAC spoofing attack throughthe S-switch.

4.4 Preventing the DoS Attack by Changing the CHADDR FieldThis section describes how to prevent the DoS attack by changing the CHADDR field.

4.5 Preventing the Attacker from Sending Bogus Messages for Extending IP Address LeasesThis section describes how to prevent the attacker from sending bogus messages for extendingIP address leases.

4.6 Configuring the Packet Discarding AlarmThis section describes how to configure the packet discarding alarm.

4.7 Configuring the DHCP Option 82 StringThis section describes how to configure the DHCP Option 82 string.

4.8 Maintaining DHCP SnoopingThis section describes how to maintain DHCP snooping.

4.9 Configuration ExamplesThis section provides several examples for configuring DHCP snooping.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 4 DHCP Snooping Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-1

Page 62: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

4.1 Overview of DHCP snoopingThis section describes the concept and types of DHCP snooping.

4.1.1 Introduction to DHCP Snooping

4.1.2 DHCP Snooping Supported by the S-switch

4.1.3 Logical Relationships Between Configuration Tasks

4.1.1 Introduction to DHCP SnoopingDynamic Host Configuration Protocol (DHCP) snooping intercepts and analyzes DHCPmessages transmitted between the DHCP client and the DHCP server agent. In this manner,DHCP snooping creates and maintains a DHCP snooping binding table, and filters untrustedDHCP messages according to the table. The binding table contains the MAC address, IP address,lease, binding type, VLAN ID, and interface information. DHCP snooping acts as a firewallbetween DHCP clients and a DHCP server.

DHCP snooping prevents DHCP Denial of Service (DoS) attacks, bogus DHCP server attacks,and middleman and IP/MAC spoofing attacks when DHCP is enabled on the device.

The S-switch supports security features such as the MAC address limit, DHCP snooping bindingtable, binding of the IP address and MAC address, and Option 82. In this manner, security ofthe device enabled with DHCP is ensured.

4.1.2 DHCP Snooping Supported by the S-switchThe S-switch supports the following DHCP snooping features:l MAC address limit

l Configuring the trusted/untrusted interfaces

l Checking the CHADDR field in DHCP messages

l DHCP snooping binding table

Figure 4-1 shows the DHCP snooping application on the S-switch where DHCP snooping isenabled.

4 DHCP Snooping ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

4-2 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 63: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Figure 4-1 Networking for the DHCP snooping application on the S-switch

As shown in Figure 4-1, the S-switch enabled with DHCP snooping is deployed between theDHCP client and the DHCP relay agent. The S-switch forwards DHCP reply messages receivedfrom a trusted interface but discards DHCP reply messages received from an untrusted interface.The DHCP snooping binding table is then generated on the basis of the DHCP reply messagesreceived from the trusted interface. IP packets and ARP packets received from the untrustedinterface are forwarded only when there are matching entries in the binding table; otherwise,they are discarded.

When DHCP snooping is configured for a VLAN of the S-switch, the S-switch checks packetscoming from the VLAN.

The working mode of DHCP snooping varies according to the type of attacks, as shown in Table4-1.

Table 4-1 Attack types and DHCP snooping working modes

Type of Attacks DHCP Snooping Working Mode

DHCP exhaustion attack MAC Address limit

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 4 DHCP Snooping Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-3

Page 64: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Type of Attacks DHCP Snooping Working Mode

Bogus DHCP server attack Configuring an interface as trusted or untrusted

Middleman attack and IP/MAC spoofingattack

Checking whether the IP packets or ARPpackets have matching entries in the DHCPsnooping binding table

DoS attack by changing the value of theCHADDR field

Checking the CHADDR field in DHCPmessages

Attack of sending bogus messages to extendIP address leases

Checking whether the DHCP request messageshave matching entries in the DHCP snoopingbinding table

4.1.3 Logical Relationships Between Configuration TasksAll configuration tasks in this chapter are not listed in sequence. You can configure them asrequired.

4.2 Preventing the Bogus DHCP Server AttackThis section describes how to prevent the bogus DHCP server attack through the S-switch.

4.2.1 Establishing the Configuration Task

4.2.2 Enabling Global DHCP Snooping

4.2.3 Enabling Local DHCP Snooping

4.2.4 Configuring Trusted Interfaces

4.2.5 Checking the Configuration

4.2.1 Establishing the Configuration Task

Applicable EnvironmentAs shown in Figure 4-2, a bogus DHCP server on the user network replies incorrect messagessuch as the incorrect IP address of the gateway, incorrect DNS server, and incorrect IP addressto the DHCP client, so that the DHCP client cannot access the network.

4 DHCP Snooping ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

4-4 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 65: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Figure 4-2 Diagram of preventing the bogus DHCP server attack

To prevent the bogus DHCP server attack, you can configure DHCP snooping on the S-switch, and set the interface at the user side to be untrusted and the interface at the network sideto be trusted. In this manner, DHCP reply messages received from the untrusted interface arediscarded. Only DHCP reply messages received from the trusted interface are forwarded.

Pre-configuration TasksBefore preventing the bogus DHCP server attack through the S-switch, complete the followingtasks:

l Configuring the DHCP server

l Configuring the DHCP relay agent

NOTE

The DHCP server and the DHCP relay agent are configured on the upstream router or server of the S-switch.

Data PreparationTo prevent the bogus DHCP server attack through the S-switch, you need the following data.

No. Data

1 Name of the interface to be added to a VLAN

2 ID of the VLAN to which the interfaces belong

3 Name of the interface to be configured as trusted

4.2.2 Enabling Global DHCP Snooping

ContextDo as follows on the S-switch.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 4 DHCP Snooping Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-5

Page 66: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:dhcp snooping enable

Global DHCP snooping is enabled.

By default, DHCP snooping is disabled.

----End

4.2.3 Enabling Local DHCP Snooping

ContextDo as follows on the S-switch.

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:dhcp snooping enable

DHCP snooping is enabled in the VLAN.

By default, DHCP snooping is disabled.

----End

4.2.4 Configuring Trusted Interfaces

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:

4 DHCP Snooping ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

4-6 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 67: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

vlan vlan-id

The VLAN view is displayed.

The VLAN should be the one to which the interface connected to the DHCP server belongs.

Step 3 Run:dhcp snooping trusted interface interface-type interface-number

A specified interface is configured in the VLAN as trusted.

----End

4.2.5 Checking the ConfigurationRun the following commands to check the previous configuration.

Action Command

Check information about global DHCPsnooping.

display dhcp snooping global

Check information about trustedinterfaces.

display this

Run the display dhcp snooping global command. You can view that global DHCP snooping isenabled.

<Quidway> display dhcp snooping globaldhcp snooping enable

Run the display this command in the VLAN view. You can check the information about trustedinterfaces.

<Quidway> system-view[Quidway] vlan 10[Quidway-vlan10] display this#vlan 10 dhcp snooping enable dhcp snooping trusted interface GigabitEthernet0/0/2#return

4.3 Preventing the Middleman Attack and IP/MACSpoofing Attack

This section describes how to prevent the middleman attack and IP/MAC spoofing attack throughthe S-switch.

4.3.1 Establishing the Configuration Task

4.3.2 Enabling Global DHCP Snooping

4.3.3 Enabling Local DHCP Snooping

4.3.4 Enabling Packet Check

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 4 DHCP Snooping Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-7

Page 68: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

4.3.5 Configuring the DHCP Snooping Binding Table

4.3.6 Configuring Option 82

4.3.7 Configuring Security Protection on an Interface

4.3.8 Checking the Configuration

4.3.1 Establishing the Configuration Task

Applicable EnvironmentWhen a middleman attack exists or an IP/MAC spoofing attack occurs, the attacker pretends tobe the DHCP server or DHCP client to exchange data with the actual DHCP server and DHCPclient.

As shown in Figure 4-3Figure 4-4, the middleman sends IP or ARP packets to the DHCP server.Thus, the DHCP server learns the IP address 10.1.1.3 of the DHCP client and the MAC address0000-005e-008b of the middleman. The DHCP server considers that all the packets are comingfrom or sending to the DHCP client. In fact, all the packets are processed by the middleman.

The middleman then sends IP or ARP packets to the DHCP client. Thus, the DHCP client learnsthe IP address 10.2.1.1 of the DHCP server and the MAC address 0000-005e-008b of itself. Inthe same manner, the DHCP client considers that all the packets are coming from or sending tothe DHCP server. In fact, all the packets are processed by the middleman.

As a result, the middleman can pretend to be the DHCP server or the DHCP client and obtaindata exchanged between the DHCP server and the DHCP client.

Figure 4-3 Diagram of preventing the middleman attack and IP/MAC spoofing attack

4 DHCP Snooping ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

4-8 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 69: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Figure 4-4 Diagram of preventing the middleman attack and IP/MAC spoofing attack

To prevent the middleman attack and the IP/MAC spoofing attack, configure DHCP snoopingon the S-switch and use the DHCP snooping binding table. The received packets can beforwarded only when they match with entries in the binding table; otherwise, packets arediscarded.

Pre-configuration Tasks

Before preventing the middleman attack and the IP/MAC spoofing attack through the S-switch, complete the following tasks:

l Configuring the DHCP server

l Configuring the DHCP relay agent

NOTE

The DHCP server and the DHCP relay agent are configured on the upstream router or server of the S-switch.

Data Preparation

To prevent the middleman attack and the IP/MAC spoofing attack through the S-switch, youneed the following data.

No. Data

1 Name of the interface to be added to a VLAN

2 ID of the VLAN to which the interfaces belong

3 Static IP addresses from which packets are forwarded

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 4 DHCP Snooping Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-9

Page 70: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

4.3.2 Enabling Global DHCP Snooping

Context

Do as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:dhcp snooping enable

Global DHCP snooping is enabled.

By default, DHCP snooping is disabled.

----End

4.3.3 Enabling Local DHCP Snooping

Context

Do as follows on the S-switch.

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:dhcp snooping enable

DHCP snooping is enabled in the VLAN.

By default, DHCP snooping is disabled.

----End

4.3.4 Enabling Packet Check

Context

Do as follows on the S-switch.

4 DHCP Snooping ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

4-10 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 71: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface interface-type interface-number

The GigabitEthernet interface view or Eth-Trunk interface viewis displayed.

The interface should be at the user side.

Step 3 Run:dhcp snooping check arp enable alarm arp enable threshold

ARP packet check is enabled on the interface.

Step 4 Run:dhcp snooping check ip enable alarm ip enable threshold

IP packet check is enabled on the interface.

Step 5 Run:dhcp snooping check dhcp-chaddr enable alarm dhcp-chaddr enable threshold

DHCP packet check is enabled on the interface.

Step 6 Run:dhcp snooping check dhcp-request enable alarm dhcp-request enable threshold

DHCP packet check is enabled on the interface.

Step 7 Run:dhcp snooping check dhcp-rate enable rate rate-value alarm dhcp-rate enable threshold

Checking the rate of sending DHCP packets to the DHCP protocol stack is enabled on the S-switch.The rate of sending DHCP packets to the DHCP protocol stack is set.

By default, the S-switch is disabled from checking the rate of sending DHCP packets to theDHCP protocol stack. And it checks 100 DHCP packets per second.

----End

4.3.5 Configuring the DHCP Snooping Binding Table

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 4 DHCP Snooping Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-11

Page 72: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Step 2 Run:vlan vlan-id

The VLAN view is displayed.

The VLAN should be the one to which the interface at the user side belongs.

Step 3 Run:dhcp snooping bind-table static ip-address ip-address mac-address mac-address interface interface-type interface-number

A static entry binding the IP address and MAC address is configured in the DHCP snoopingtable.

The static binding table contains the MAC address, IP address, VLAN ID, and interfaceinformation. If users access the network through static IP addresses, user packets can beforwarded by the S-switch only after the MAC address, IP address, VLAN ID, and inboundinterface of the packets match entries in the static binding table. Otherwise, user packets arediscarded.

If users are assigned static IP addresses, you can configure static binding entries for these staticIP addresses. If static entries are not configured in the DHCP snooping binding table, packetsfrom all users with static IP addresses are discarded. All static users thus cannot access the DHCPserver.

The dynamic entries in the DHCP snooping binding table require no configuration. They areautomatically generated when DHCP snooping is enabled. The static entries, however, need tobe configured through commands.

----End

4.3.6 Configuring Option 82

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:vlan vlan-id

The VLAN view is displayed.

The VLAN should be the one to which the interface at the user side belongs.

Step 3 Run:dhcp option82 rebuild enable interface interface-type interface-number1 [ to interface-number2 ]

The Option 82 field is forcibly appended to the DHCP messages on a specified interface in theVLAN.

By default, the Option 82 field cannot be forcibly appended.

4 DHCP Snooping ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

4-12 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 73: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

The DHCP reply messages are broadcast packets. Thus, the S-switch cannot determine to whichinterface the packets are sent. As a result, dynamic binding entries do not include interfaces.

To protect the S-switch against attacks with the forged Option 82 field, you can enable the S-switch to forcibly append the Option 82 field to DHCP messages. The Option 82 field isappended to DHCP discovery messages if original DHCP discovery messages are not appendedwith the Option 82 field. If the original DHCP discovery messages are appended with the Option82 field, the original Option 82 field is removed and a new one is appended.

----End

4.3.7 Configuring Security Protection on an Interface

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:mac-address restrict

The S-switch is enabled to restrict MAC address learning and packet forwarding.

Step 3 Run:mac-table limit interface-type interface-number limit-number

The limit on the number of MAC addresses that can be learnt by an interface is configured.

Step 4 Run:interface interface-type interface-number

The interface view is displayed.

Step 5 Run:port-security enable

Security protection is enabled on the interface.

By default, the S-switch is disabled from restricting MAC address learning and packetforwarding. If the S-switch is not enabled to restrict MAC address learning and packetforwarding, you cannot enable security protection on interfaces.

----End

4.3.8 Checking the ConfigurationRun the following commands to check the previous configuration.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 4 DHCP Snooping Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-13

Page 74: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Action Command

Check information about global DHCPsnooping.

display dhcp snooping global

Check information about the DHCPsnooping binding table.

display dhcp snooping bind-table { all |dynamic | ip-address ip-address | mac-addressmac-address | static | vlan vlan-id | interfaceinterface-type interface-number }

Check the Option 82 status. display dhcp option82 vlan vlan-id [ interfaceinterface-type interface-number ]

Run the display dhcp snooping global command. You can view that global DHCP snooping isenabled.

<Quidway> display dhcp snooping global dhcp snooping enable

Run the display dhcp snooping bind-table command. You can view the static entries generatedin the DHCP snooping binding table.

<Quidway> display dhcp snooping bind-table ip-address 10.1.1.1bind-table:ifname vrf vsi p/cvlan mac-address ip-address tp lease-------------------------------------------------------------------------------GE0/0/1 0000-0020/0000 003e-0001-0001 010.001.001.001 S 0-------------------------------------------------------------------------------binditem count: 1 binditem total count: 1

Run the display dhcp option82 command. You can view the Option 82 status.

<Quidway> display dhcp option82 vlan 20 interface gigabitethernet 0/0/1 dhcp option82 rebuild enable interface GigabitEthernet0/0/1

4.4 Preventing the DoS Attack by Changing the CHADDRField

This section describes how to prevent the DoS attack by changing the CHADDR field.

4.4.1 Establishing the Configuration Task

4.4.2 Enabling Global DHCP Snooping

4.4.3 Enabling Local DHCP Snooping

4.4.4 Checking the CHADDR Field in DHCP Request Messages

4.4.5 Checking the Configuration

4.4.1 Establishing the Configuration Task

Applicable EnvironmentAs shown in Figure 4-5, the attacker continuously applies for IP addresses in a DHCP domainthrough various MAC addresses until all IP addresses are exhausted. Thus, legal users cannot

4 DHCP Snooping ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

4-14 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 75: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

obtain IP addresses. To prevent the DHCP exhaustion attack, you can apply the MAC addresslimit, that is, limit to the number of MAC addresses learned on interfaces. This protects the S-switch against attacks of sending a large number of DHCP request messages through variousMAC addresses.

Figure 4-5 Networking diagram of preventing the DoS attack by changing the CHADDR field

The attacker may change the CHADDR field carried in a DHCP message instead of the sourceMAC address in the frame header to apply for IP addresses continuously. If the S-switch checksthe validity of packets based on the source MAC address in the frame header, attack packets canstill be forwarded normally. The MAC address limit cannot take effect in this manner.

To prevent the attacker from changing the CHADDR field, you can configure DHCP snoopingon the S-switch to check the CHADDR field carried in DHCP request messages. If the CHADDRfield matches the source MAC address in the frame header, the messages are forwarded.Otherwise, the messages are discarded.

Pre-configuration Tasks

Before preventing the DoS attack by changing the CHADDR field, complete the following tasks:

l Configuring the DHCP server

l Configuring the DHCP relay agent

NOTE

The DHCP server and the DHCP relay agent are configured on the upstream router or server of the S-switch.

Data Preparation

To prevent the DoS attack by changing the CHADDR field, you need the following data.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 4 DHCP Snooping Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-15

Page 76: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

No. Data

1 Name of the interface to be added to a VLAN

2 ID of the VLAN to which the interfaces belong

4.4.2 Enabling Global DHCP Snooping

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:dhcp snooping enable

Global DHCP snooping is enabled.

By default, DHCP snooping is disabled.

All the other DHCP snooping configurations can be performed only after global DHCP snoopingis enabled.

----End

4.4.3 Enabling Local DHCP Snooping

ContextDo as follows on the S-switch.

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:dhcp snooping enable

DHCP snooping is enabled in the VLAN.

4 DHCP Snooping ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

4-16 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 77: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

By default, DHCP snooping is disabled.

----End

4.4.4 Checking the CHADDR Field in DHCP Request Messages

Context

Do as follows on the S-switch.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the interface interface-type interface-number command to enter the GigabitEthernetinterface view, 10GE interface view or Eth-Trunk interface view. The interface should be at theuser side.

Step 3 Run the dhcp snooping check dhcp-chaddr enable alarm dhcp-chaddr enable thresholdcommand to enable the interface to check the CHADDR field in DHCP request messages.

By default, checking the CHADDR field is disabled.

----End

4.4.5 Checking the ConfigurationRun the following commands to check the previous configuration.

Action Command

Check information about global DHCPsnooping.

display dhcp snooping global

Check information about DHCPsnooping on an interface.

display dhcp snooping interface interface-typeinterface-number

Run the display dhcp snooping global command. You can view that global DHCP snooping isenabled.

<Quidway> display dhcp snooping global dhcp snooping enable

Run the display dhcp snooping interface command. You can view the DHCP snoopingconfiguration on the interface.

<Quidway> display dhcp snooping interface gigabitethernet 0/0/1 dhcp snooping check dhcp-chaddr enable arp total 0 ip total 0 dhcp-rate-drop total 0 dhcp-request total 0 chaddr&src mac total 0 dhcp-reply total 0

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 4 DHCP Snooping Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-17

Page 78: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

4.5 Preventing the Attacker from Sending Bogus Messagesfor Extending IP Address Leases

This section describes how to prevent the attacker from sending bogus messages for extendingIP address leases.

4.5.1 Establishing the Configuration Task

4.5.2 Enabling Global DHCP Snooping

4.5.3 Enabling Local DHCP Snooping

4.5.4 Enabling the Checking of DHCP Request Messages

4.5.5 Configuring Option 82

4.5.6 Checking the Configuration

4.5.1 Establishing the Configuration Task

Applicable EnvironmentAs shown in Figure 4-6, the attacker pretends to be a legal user and continuously sends DHCPrequest messages intending to extend the IP address lease. This prevents certain expired IPaddresses from being reused, which is not the purpose of a legal user.

Figure 4-6 Networking diagram of preventing the attacker from sending bogus messages forextending IP address leases

To prevent the attacker from sending bogus messages to extend IP address leases, you canconfigure DHCP snooping on the S-switch to check the source IP address and source MACaddress of DHCP request messages.

4 DHCP Snooping ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

4-18 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 79: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

l If there are no entries that match the source IP address in the DHCP snooping binding table,the DHCP request messages are forwarded.

l If there are entries that match the source IP address but do not match the source MACaddress, the DHCP request messages are discarded.

Pre-configuration TasksBefore preventing the attacker from sending bogus messages for extending IP address leasesthrough the S-switch, complete the following tasks:

l Configuring the DHCP server

l Configuring the DHCP relay agent

NOTE

The DHCP server and the DHCP relay agent are configured on the upstream router or server of the S-switch.

Data PreparationTo prevent the attacker from sending bogus messages for extending IP address leases throughthe S-switch, you need the following data.

No. Data

1 Name of the interface to be added to a VLAN

2 ID of the VLAN to which the interfaces belong

3 Static IP addresses from which packets are forwarded

4.5.2 Enabling Global DHCP Snooping

ContextDo as follows on the S-switch.

ProcedureStep 1 Run:

system-view

The system view is displayed.

Step 2 Run:dhcp snooping enable

Global DHCP snooping is enabled.

By default, DHCP snooping is disabled.

All the other DHCP snooping configurations can be performed only after global DHCP snoopingis enabled.

----End

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 4 DHCP Snooping Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-19

Page 80: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

4.5.3 Enabling Local DHCP Snooping

Context

Do as follows on the S-switch.

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:dhcp snooping enable

DHCP snooping is enabled in the VLAN.

By default, DHCP snooping is disabled.

----End

4.5.4 Enabling the Checking of DHCP Request Messages

Context

Do as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface interface-type interface-number

The Eth-Trunk interface viewis displayed.

The interface should be at the user side.

Step 3 Run:dhcp snooping check dhcp-request enable alarm dhcp-request enable threshold

The checking of DHCP request messages is enabled on the interface.

By default, checking DHCP request messages is disabled.

----End

4 DHCP Snooping ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

4-20 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 81: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

4.5.5 Configuring Option 82

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:vlan vlan-id

The VLAN view is displayed.

The VLAN should be the one to which the interface at the user side belongs.

Step 3 Run:dhcp option82 rebuild enable interface interface-type interface-number1 [ to interface-number2 ]

The Option 82 field is forcibly appended to the DHCP messages on a specified interface in theVLAN.

By default, the Option 82 field cannot be forcibly appended.

The DHCP reply messages are broadcast packets. Thus, the S-switch cannot determine to whichinterface the packets are sent. As a result, the related dynamic binding entries cannot begenerated.

To protect the S-switch against attacks with the forged Option 82 field, you can enable the S-switch to forcibly append the Option 82 field to DHCP messages. The Option 82 field isappended to DHCP discovery messages if original DHCP discovery messages are not appendedwith the Option 82 field. If the original DHCP discovery messages are appended with the Option82 field, the original Option 82 field is removed and a new one is appended.

----End

4.5.6 Checking the ConfigurationRun the following commands to check the previous configuration.

Action Command

Check information about global DHCPsnooping.

display dhcp snooping global

Check information about DHCPsnooping on an interface.

display dhcp snooping interface interface-tyreinterface-number

Check the Option 82 status. display dhcp option82 vlan vlan-id [ interfaceinterface-type interface-number ]

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 4 DHCP Snooping Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-21

Page 82: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Run the display dhcp snooping global command. You can view that global DHCP snooping isenabled.

<Quidway> display dhcp snooping global dhcp snooping enable

Run the display dhcp snooping interface command. You can view the DHCP snoopingconfiguration on the interface.

<Quidway> display dhcp snooping interface gigabitethernet 0/0/1 dhcp snooping check dhcp-request enable arp total 0 ip total 0 dhcp-rate-drop total 0 dhcp-request total 0 chaddr&src mac total 0 dhcp-reply total 0

Run the display dhcp option82 command. You can view the Option 82 status.

<Quidway> display dhcp option82 vlan 20 interface gigabitethernet 0/0/1 dhcp option82 rebuild enable interface GigabitEthernet0/0/1

4.6 Configuring the Packet Discarding AlarmThis section describes how to configure the packet discarding alarm.

4.6.1 Establishing the Configuration Task

4.6.2 Configuring the Packet Discarding Alarm

4.6.3 Checking the Configuration

4.6.1 Establishing the Configuration Task

Applicable EnvironmentWith DHCP snooping configured, the S-switch can discard packets sent from the attacker. Table4-2 shows the relationship between the type of attacks and the type of discarded packets.

Table 4-2 Relationship between the type of attacks and the type of discarded packets

Type of Attacks Type of Discarded Packets

Bogus attack DHCP reply messages received fromuntrusted interfaces

Middleman and IP/MAC spoofing attack IP packets or ARP packets that do not matchentries in the DHCP snooping binding table

DoS attack by changing the CHADDR field DHCP request messages whose CHADDRfield does not match the source MAC addressin the frame header

Attack of sending bogus messages to extendIP address leases

DHCP request messages that do not matchentries in the DHCP snooping binding table

Attack of sending DHCP request messages Messages exceeding the rate limit

4 DHCP Snooping ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

4-22 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 83: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

After the packet discarding alarm is enabled, an alarm is generated when the number of discardedpackets on the S-switch reaches the threshold.

Pre-configuration Tasks

Before configuring the packet discarding alarm, complete the following tasks:

l Configuring the DHCP server

l Configuring the DHCP relay agent

l Configuring the discarding of DHCP reply messages from the untrusted interface at theuser side

l Configuring the checking of ARP packets, IP packets, and DHCP request messages

l Configuring the checking of the CHADDR field in DHCP request messages

l Configuring the checking of the rate of sending DHCP messages

NOTE

The DHCP server and the DHCP relay agent are configured on the upstream router or server of the S-switch.

Data Preparation

To configure the packet discarding alarm, you need the following data.

No. Data

1 Alarm threshold for the number of discarded ARP packets

2 Alarm threshold for the number of discarded IP packets

3 Alarm threshold for the number of discarded DHCP CHADDR packets

4 Alarm threshold for the number of discarded DHCP reply messages

5 Alarm threshold for the number of discarded DHCP request messages

4.6.2 Configuring the Packet Discarding Alarm

Context

Do as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface interface-type interface-number

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 4 DHCP Snooping Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-23

Page 84: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

The interface view is displayed.

Step 3 Run:dhcp snooping check arp enable alarm arp enable threshold

The ARP packet discarding alarm is enabled on the interface, and the threshold that triggers thealarm is set.

Step 4 Run:dhcp snooping check dhcp-chaddr enable alarm dhcp-chaddr enable threshold

The DHCP Request packet discarding alarm is enabled on the interface, and the threshold thattriggers the alarm is set.

Step 5 Run:dhcp snooping alarm dhcp-reply enable threshold

The DHCP Reply packet discarding alarm is enabled on the interface, and the threshold thattriggers the alarm is set.

Step 6 Run:dhcp snooping check dhcp-request enable alarm dhcp-request enable threshold

The DHCP Request packet discarding alarm is enabled on the interface, and the threshold thattriggers the alarm is set.

Step 7 Run:dhcp snooping check ip enable alarm ip enable threshold

The IP packet discarding alarm is enabled on the interface, and the threshold that triggers thealarm is set.

Step 8 Run:dhcp snooping check dhcp-rate enable rate alarm dhcp-rate enable threshold

The alarm is enabled for the rate of sending DHCP messages to the protocol stack, and thethreshold that triggers the alarm is set.

----End

4.6.3 Checking the ConfigurationRun the following commands to check the previous configuration.

Action Command

Check information about global DHCPsnooping.

display dhcp snooping global

Check information about DHCPsnooping on an interface.

display dhcp snooping interface interface-typeinterface-number

Run the display dhcp snooping global command. You can view that global DHCP snooping isenabled.

<Quidway> display dhcp snooping globaldhcp snooping enable

4 DHCP Snooping ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

4-24 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 85: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Run the display dhcp snooping interface command. You can view the DHCP snoopingconfiguration on the interface.

<Quidway> display dhcp snooping interface gigabitethernet 0/0/1 dhcp snooping check arp enable dhcp snooping alarm arp enabledhcp snooping alarm arp threshold 50 arp total 0 ip total 0 dhcp-rate-drop total 0 dhcp-request total 0 chaddr&src mac total 0 dhcp-reply total 0

4.7 Configuring the DHCP Option 82 StringThis section describes how to configure the DHCP Option 82 string.

4.7.1 Configuring the Storage Format of the Option 82 Field

4.7.2 Configuring the Circuit ID in the Option 82 Field in the System View

4.7.3 Configuring the Circuit ID of the Option 82 Field in the Interface View

4.7.4 Configuring the Remote ID in the Option 82 Field in the System View

4.7.5 Configuring the Remote ID of the Option 82 Field in the Interface View

4.7.6 Checking the Configuration

4.7.1 Configuring the Storage Format of the Option 82 Field

ContextDo as follows on the S-switch.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the dhcp snooping enable command to enable DHCP snooping on the S-switch. By default,DHCP snooping is disabled.

Step 3 Run the dhcp snooping information format { hex | ascii } command to configure the storageformat of the Option 82 field.

By default, the storage format for the Option 82 field is hex.

----End

4.7.2 Configuring the Circuit ID in the Option 82 Field in the SystemView

ContextDo as follows on the S-switch.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 4 DHCP Snooping Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-25

Page 86: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the dhcp snooping information circuit-id string string command to configure the circuitID in the Option 82 field.

By default, the circuit ID in the Option 82 field is the ID of the VLAN to which the interfacereceiving the DHCP client's request belongs.

----End

4.7.3 Configuring the Circuit ID of the Option 82 Field in theInterface View

ContextDo as follows on the S-switch.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the interface interface-type interface-number to enter the GigabitEthernet interface view.

Step 3 Run the dhcp snooping information [ vlan vlan-id ] circuit-id string string command toconfigure the circuit ID in the Option 82 field.

By default, the circuit ID in the Option 82 field is the bridge MAC address of the DHCP snoopingdevice that receives the DHCP client's request.

NOTEWith vlan vlan-id specified, the customized circuit ID applies only to the DHCP packets from the specifiedVLAN. With no vlan vlan-id specified, the customized circuit ID applies to all DHCP packets that passthrough the current interface.

----End

4.7.4 Configuring the Remote ID in the Option 82 Field in theSystem View

ContextDo as follows on the S-switch.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the dhcp snooping information remote-id { sysname | string string } command toconfigure the remote ID in the Option 82 field.

By default, the remote ID in the Option 82 field is the bridge MAC address of the DHCP snoopingdevice that receives the DHCP client's request.

4 DHCP Snooping ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

4-26 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 87: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

NOTEIf you have configured the remote ID both in the interface view and in the system view, the remote IDconfigured in the interface view is applied. If no remote ID ID is configured in the interface view, theremote ID configured in the system view is applied.

----End

4.7.5 Configuring the Remote ID of the Option 82 Field in theInterface View

Context

Do as follows on the S-switch.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the interface interface-type interface-number to enter the GigabitEthernet interface view.

Step 3 Run the dhcp snooping information [ vlan vlan-id ] remote-id string string command toconfigure the remote ID in the Option 82 field.

By default, the remote ID in the Option 82 field is the bridge MAC address of the DHCP snoopingdevice that receives the DHCP client's request.

NOTEWith vlan vlan-id specified, the customized remote ID applies only to the DHCP packets from the specifiedVLAN. With no vlan vlan-id specified, the customized remote ID applies to all DHCP packets that passthrough the current interface.

----End

4.7.6 Checking the ConfigurationRun the following commands in the user view to check the previous configuration.

Action Command

Check information about global DHCPsnooping.

display dhcp snooping global

Check information about DHCPsnooping on an interface.

display dhcp snooping interface

4.8 Maintaining DHCP SnoopingThis section describes how to maintain DHCP snooping.

4.8.1 Backing Up the DHCP Snooping Binding Table

4.8.2 Debugging DHCP Snooping

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 4 DHCP Snooping Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-27

Page 88: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

4.8.1 Backing Up the DHCP Snooping Binding TableTo back up the DHCP snooping binding table, run the following command in the system view.

Action Command

Back up the DHCP snoopingbinding table.

dhcp snooping bind-table autosave file-name

If the backup of the binding table is configured, the system automatically backs up the bindingtable to a specified path every 24 hours.

If no backup binding table exists, the DHCP snooping dynamic binding table is lost after the S-switch reboots. As a result, users cannot obtain IP addresses dynamically from the DHCP serverso that they cannot communicate normally.

4.8.2 Debugging DHCP Snooping

CAUTIONDebugging affects the performance of the system. So, after debugging, run the undo debuggingall command to disable it immediately.

When an operation fault occurs, run the following debugging command in the user view todisplay the debugging information and locate the fault.

Action Command

Enable DHCP snoopingdebugging.

debugging dhcp snooping

4.9 Configuration ExamplesThis section provides several examples for configuring DHCP snooping.

4.9.1 Example for Configuring DHCP Snooping to Prevent Attacks Against the Network

4.9.1 Example for Configuring DHCP Snooping to Prevent AttacksAgainst the Network

Networking RequirementsYou can configure DHCP snooping to prevent the following network attacks:

l Bogus DHCP server attack

4 DHCP Snooping ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

4-28 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 89: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

l Middleman and IP/MAC spoofing attack

l DoS attack by changing the value of the CHADDR field

l Attack of sending bogus messages to extend IP address leases

As shown in Figure 4-7, to prevent attacks against the network, you need to configure trusted/untrusted interfaces, enable packet check, set up a static binding table, and enable the sendingof alarms to the NMS on the S-switch.

Two DHCP clients access the network through the static IP addresses 10.1.1.2 and 10.1.1.3respectively. It is required that a static DHCP snooping binding table be configured to ensurethe forwarding of packets from the DHCP clients.

Figure 4-7 Networking for configuring DHCP snooping to prevent attacks against the network

Configuration RoadmapThe configuration roadmap is as follows:

1. Enable DHCP snooping globally and in the VLAN view.2. Set the interface at the network side to be trusted.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 4 DHCP Snooping Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-29

Page 90: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

3. Enable packet check.4. Configure a static binding table.5. Configure Option 82 and create a binding table covering accurate interface information.6. Configure the sending of alarms to the NMS.

Data PreparationTo complete the configuration, you need the following data:

l IDs of VLANs to which the interfaces belong

l Static IP addresses and MAC addresses assigned to users

l Threshold for sending alarms to the NMS

Configuration ProcedureThe following describes how to configure the S-switch. For the configuration procedures for theother devices shown in Figure 4-7, refer to the related configuration guides.

1. Configure DHCP snooping on the S-switch.# Enable global DHCP snooping.[Quidway] dhcp snooping enable# Configure the VLAN to which the interfaces at the user side belong.[Quidway] vlan 100[Quidway-vlan100] quit[Quidway] interface gigabitethernet 0/0/1[Quidway-GigabitEthernet0/0/1] port trunk allow-pass vlan 100[Quidway-GigabitEthernet0/0/1] quit[Quidway] interface gigabitethernet 0/0/2[Quidway-GigabitEthernet0/0/2] port trunk allow-pass vlan 100[Quidway-GigabitEthernet0/0/2] quit# Configure the VLAN to which the interface at the network side belong.[Quidway] interface gigabitethernet 0/0/3[Quidway-GigabitEthernet0/0/3] port trunk allow-pass vlan 100[Quidway-GigabitEthernet0/0/3] quit# Enable DHCP snooping for VLAN 100.[Quidway]vlan 100[Quidway-vlan100] dhcp snooping enable

2. Configure the interface at the network side as trusted.[Quidway-vlan100] dhcp snooping trusted interface gigabitethernet 0/0/3[Quidway-vlan100]quit

3. Enable packet check on the interfaces at the user side.[Quidway]interface gigabitethernet 0/0/1[Quidway-GigabitEthernet0/0/1]dhcp snooping check arp enable[Quidway-GigabitEthernet0/0/1]dhcp snooping check ip enable[Quidway-GigabitEthernet0/0/1]dhcp snooping check dhcp-chaddr enable[Quidway-GigabitEthernet0/0/1]dhcp snooping check dhcp-request enable[Quidway-GigabitEthernet0/0/1]quit[Quidway]interface gigabitethernet 0/0/2[Quidway-GigabitEthernet0/0/2]dhcp snooping check arp enable[Quidway-GigabitEthernet0/0/2]dhcp snooping check ip enable[Quidway-GigabitEthernet0/0/2]dhcp snooping check dhcp-chaddr enable[Quidway-GigabitEthernet0/0/2]dhcp snooping check dhcp-request enable[Quidway-GigabitEthernet0/0/2]quit

4. Configure static binding entries.[Quidway]vlan 100

4 DHCP Snooping ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

4-30 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 91: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

[Quidway-vlan100]dhcp snooping bind-table static ip-address 10.1.1.3 mac-address 0000-005e-008a interface gigabitethernet 0/0/2[Quidway-vlan100]dhcp snooping bind-table static ip-address 10.1.1.2 mac-address 0000-005e-008b interface gigabitethernet 0/0/1

5. Forcibly append the Option 82 field to DHCP messages.[Quidway-vlan100]dhcp option82 rebuild enable interface gigabitethernet 0/0/1[Quidway-vlan100]dhcp option82 rebuild enable interface gigabitethernet 0/0/2[Quidway-vlan100]dhcp option82 rebuild enable interface gigabitethernet 0/0/3[Quidway-vlan100]quit

6. Configure the sending of alarms to the NMS.# Enable the sending of alarms to the NMS.[Quidway]interface gigabitethernet 0/0/1[Quidway-GigabitEthernet0/0/1]dhcp snooping alarm arp enable[Quidway-GigabitEthernet0/0/1]dhcp snooping alarm ip enable[Quidway-GigabitEthernet0/0/1]dhcp snooping alarm dhcp-chaddr enable[Quidway-GigabitEthernet0/0/1]dhcp snooping alarm dhcp-request enable[Quidway-GigabitEthernet0/0/1]dhcp snooping alarm dhcp-reply enable[Quidway-GigabitEthernet0/0/1]quit[Quidway]interface gigabitethernet 0/0/2[Quidway-GigabitEthernet0/0/2]dhcp snooping alarm arp enable[Quidway-GigabitEthernet0/0/2]dhcp snooping alarm ip enable[Quidway-GigabitEthernet0/0/2]dhcp snooping alarm dhcp-chaddr enable[Quidway-GigabitEthernet0/0/2]dhcp snooping alarm dhcp-request enable[Quidway-GigabitEthernet0/0/2]dhcp snooping alarm dhcp-reply enable[Quidway-GigabitEthernet0/0/2]quit

# Set the threshold for sending alarms.[Quidway]interface gigabitethernet 0/0/1[Quidway-GigabitEthernet0/0/1]dhcp snooping alarm arp threshold 10[Quidway-GigabitEthernet0/0/1]dhcp snooping alarm ip threshold 10[Quidway-GigabitEthernet0/0/1]dhcp snooping alarm dhcp-chaddr threshold 10[Quidway-GigabitEthernet0/0/1]dhcp snooping alarm dhcp-request threshold 10[Quidway-GigabitEthernet0/0/1] dhcp snooping alarm dhcp-reply threshold 10[Quidway-GigabitEthernet0/0/1]quit[Quidway]interface gigabitethernet 0/0/2[Quidway-GigabitEthernet0/0/2]dhcp snooping alarm arp threshold 10[Quidway-GigabitEthernet0/0/2]dhcp snooping alarm ip threshold 10[Quidway-GigabitEthernet0/0/2]dhcp snooping alarm dhcp-chaddr threshold 10[Quidway-GigabitEthernet0/0/2]dhcp snooping alarm dhcp-request threshold 10[Quidway-GigabitEthernet0/0/2]dhcp snooping alarm dhcp-reply threshold 10[Quidway-GigabitEthernet0/0/2]quit

7. Verify the configuration.Run the display dhcp snooping bind-table command and the display dhcp option82command. You can view that DHCP snooping is enabled in the system view. You can alsoview the configurations of sending alarms to the NMS and the statistics on the discardedpackets.# Check DHCP snooping configurations in the system view.[Quidway]display dhcp snooping globaldhcp snooping enable

# Check static entries in the DHCP snooping binding table.[Quidway]display dhcp snooping bind-table staticbind-table:ifname vrf vsi p/cvlan mac-address ip-address tp lease-------------------------------------------------------------------------------GE0/0/1 0000 - 0100/0000 0000-005e-008b 010.001.001.002 S 0GE0/0/2 0000 - 0100/0000 0000-005e-008a 010.001.001.003 S 0-------------------------------------------------------------------------------binditem count: 2 binditem total count: 2

# Check whether Option 82 is enabled on GigabitEthernet 0/0/1.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 4 DHCP Snooping Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

4-31

Page 92: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

[Quidway]display dhcp option82 vlan 100 interface gigabitethernet 0/0/1dhcp option82 rebuilt enable interface gigabitethernet 0/0/1

Configuration FilesThe following lists configuration files of the S-switch.

# sysname Quidway# vlan batch 100# dhcp snooping enable#vlan 100dhcp snooping enabledhcp snooping trusted interface GigabitEthernet0/0/3 dhcp option82 rebuild enable interface GigabitEthernet0/0/1 dhcp option82 rebuild enable interface GigabitEthernet0/0/2 dhcp option82 rebuild enable interface GigabitEthernet0/0/3 dhcp snooping bind-table static ip-address 10.1.1.3 mac-address 0000-005e-008a interface GigabitEthernet0/0/2 dhcp snooping bind-table static ip-address 10.1.1.2 mac-address 0000-005e-008b interface GigabitEthernet 0/0/1#interface GigabitEthernet0/0/1port trunk allow-pass vlan 100 dhcp snooping check arp enable dhcp snooping alarm arp enable dhcp snooping alarm arp threshold 10 dhcp snooping check ip enable dhcp snooping alarm ip enable dhcp snooping alarm ip threshold 10 dhcp snooping check dhcp-chaddr enable dhcp snooping alarm dhcp-chaddr enable dhcp snooping alarm dhcp-chaddr threshold 10 dhcp snooping alarm dhcp-reply enable dhcp snooping alarm dhcp-reply threshold 10 dhcp snooping check dhcp-request enable dhcp snooping alarm dhcp-request enable dhcp snooping alarm dhcp-request threshold 10#interface GigabitEthernet0/0/2port trunk allow-pass vlan 100 dhcp snooping check arp enable dhcp snooping alarm arp enable dhcp snooping alarm arp threshold 10 dhcp snooping check ip enable dhcp snooping alarm ip enable dhcp snooping alarm ip threshold 10 dhcp snooping check dhcp-chaddr enable dhcp snooping alarm dhcp-chaddr enable dhcp snooping alarm dhcp-chaddr threshold 10 dhcp snooping alarm dhcp-reply enable dhcp snooping alarm dhcp-reply threshold 10 dhcp snooping check dhcp-request enable dhcp snooping alarm dhcp-request enable dhcp snooping alarm dhcp-request threshold 10#interface GigabitEthernet0/0/3 port trunk allow-pass vlan 100#return#

4 DHCP Snooping ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

4-32 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 93: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

5 AAA Configuration

About This Chapter

This chapter describes the basic concepts and configuration procedures of Athenticatoin,Authorization, and Accounting (AAA), Remote Authentication Dial in User Service (RADIUS),Huawei Terminal Access Controller Access Control System (HWTACACS), domains, and localusers.

5.1 Overview of AAAThis section describes the basic principle and concepts of AAA and user management.

5.2 Configuring AAAThis section describes how to configure AAA.

5.3 Configuring the RADIUS ServerThis section describes how to configure the RADIUS server.

5.4 Configuring the HWTACACS ServerThis section describes how to configure the HWTACACS server.

5.5 Configuring a DomainThis section describes how to configure a domain.

5.6 Configuring Local User ManagementThis section describes how to configure local user management.

5.7 Maintaining AAAThis section describes how to clear or debug AAA.

5.8 Configuration ExamplesThis section provides an example for configuring AAA.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 5 AAA Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-1

Page 94: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

5.1 Overview of AAAThis section describes the basic principle and concepts of AAA and user management.

5.1.1 Introduction to AAA

5.1.2 RADIUS

5.1.3 HWTACACS

5.1.4 Domain-based User Management

5.1.5 Local User Management

5.1.6 References

5.1.7 Logical Relationships Between Configuration Tasks

5.1.1 Introduction to AAA

AAA provides the following security functions for users:

l AuthenticationIt determines the users that can access the network.

l AuthorizationIt authorizes users to use certain services.

l AccountingIt records the network resource usage of users.

Generally, AAA adopts the client/server model. In this model, the client runs at the resourceside that is managed through AAA, whereas the server collects and keeps all user information.This model features good extensibility and facilitates concentrated management over userinformation.

AuthenticationAAA, implemented on the S-switch, provides the following authentication modes:

l Non-authenticationUsers are completely trusted and there is no check on their validity. This authenticationmode is not recommended.

l Local authenticationFor local authentication, user information, including the user name, password, andattributes, is configured on the S-switch. This authentication mode features high processingspeed and low operation cost; however, the capacity of information storage is restricted bythe hardware of the device.

l Remote authenticationUsers are remotely authenticated through the RADIUS protocol or the HWTACACSprotocol. In this process, the S-switch serves as the client to communicate with the RADIUSor HWTACACS authentication server. The RADIUS protocol can be either a standardRADIUS protocol or an extended RADIUS protocol of Huawei, which is used on the

5 AAA ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

5-2 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 95: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

iTELLIN or the Comprehensive Access Management Server (CAMS) to complete theauthentication.

Authorization

AAA, implemented on the S-switch, provides the following authorization modes:

l Non-authorizationUsers are completely trusted and directly authorized.

l Local authorizationLocal users are authorized based on their attributes configured on the S-switch.

l HWTACACS authorizationUsers are authorized by the HWTACACS server.

l If-authenticated authorizationUsers are authorized if they pass the authentication and the authentication mode is not non-authentication.

l RADIUS authorizationRADIUS authentication and RADIUS authorization are bound together. Therefore,RADIUS authorization cannot be performed separately. The RADIUS server authorizesusers immediately after they pass the RADIUS authentication.

Accounting

AAA, implemented on the S-switch, provides the following accounting modes:

l Non-accountingFree services are provided.

l Remote accountingIt supports remote accounting through the RADIUS server or the HWTACACS server.

5.1.2 RADIUS

AAA can be implemented through many protocols, of which the RADIUS protocol is the mostcommonly used. The RADIUS protocol was initially used for managing a large number ofscattered users who accessed the network through serial interfaces and modems. Later, thisprotocol is widely applied to the network access server (NAS) system.

RADIUS prescribes how to transmit user information and accounting information between theNAS and the RADIUS server. The authentication information between the NAS and theRADIUS server is transmitted with a key. This can protect the user password from theft on aninsecure network.

To obtain the right to access certain networks or to use some network resources, a user needs toset up a connection with the NAS through a network. In this case, the NAS is in charge ofauthenticating the user or the connection. After this authentication, the NAS sends the AAAinformation about the user to the RADIUS server.

The RADIUS server receives connection requests from users, authenticates users, and then sendsthe required configuration information back to the NAS.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 5 AAA Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-3

Page 96: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Message Exchange Defined by RADIUS

The RADIUS protocol prescribes the message exchange between the client and the server, andthe structure of the exchanged messages. The server where the RADIUS protocol is applied iscalled a RADIUS server. Figure 5-1 shows the simple message exchange defined by RADIUS.

Figure 5-1 Message exchange between the RADIUS client and the RADIUS server

To log in to the S-switch, a user first sends its user name and password to the S-switch. Onreceiving the user name and password, the RADIUS client on the S-switch sends a request tothe RADIUS server for authentication. If the request is legal, the RADIUS server completes theauthentication and returns required user authentication information to the S-switch.Authentication information is transmitted between the S-switch and the RADIUS server with akey, that is, authentication information is transmitted on the network only after being encrypted.This can protect user information against theft on an insecure network. The exchange ofaccounting information is the same as that of authentication and authorization information.

Message Structure Defined by RADIUS

Figure 5-2 shows the message structure defined by RADIUS.

Figure 5-2 Message structure defined by RADIUS

Code: indicates the message type, such as the access request, access permission, and accounting request.Identifier: is a string of ascending numbers for matching the request and response packets.Length: indicates the total length of all fields.Authenticator: is a value for checking the validity of a RADIUS message.Attribute: is the main body of a message, providing the attributes of the user.

5 AAA ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

5-4 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 97: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Features of RADIUS

Using the User Datagram Protocol (UDP) as the transmission protocol, RADIUS features goodand real-time performance. In addition, RADIUS features high reliability by providingretransmission and standby server mechanisms.

RADIUS is easy to implement and is applicable to the multithreading structure of the server fora large number of users. Owing to these features, RADIUS is widely applied.

As the RADIUS client, the S-switch provides the following functions:

l Functions defined in the standard and extended RADIUS protocols including RFC 2865and RFC 2866

l Functions defined in Huawei extended RADIUS+v1.1

l Active detection of the RADIUS server: After receiving an AAA authentication oraccounting message, the RADIUS client enables the server detection if the status of thecurrent server is Down. The RADIUS client then transforms the message into a packet thatfunctions as the server-probe packet, and sends the packet to the server. If the client receivesa response packet from the RADIUS server, the client considers the server as available.

l Caching Accounting Stop packets locally and retransmitting them: If the number ofretransmission failures exceeds the set value, the Accounting Stop packets are stored intothe buffer queue. The system periodically scans the queue, extracts the packets, and thensends them to the specified server. After the sending, the system enables a timer. If thetransmission fails or no response packet comes from the server within the timeout period,the packets are replaced into the buffer queue.

l Automatic switchover of the RADIUS server: When the timer expires, you can send packetsto another server in the configured server group if the current server does not work or thenumber of transmissions exceeds the maximum number.

5.1.3 HWTACACS

HWTACACS is an access control protocol based on TACACS (RFC1492).

Like RADIUS, HWTACACS carries out several AAA services in server/client mode.

Compared with RADIUS, HWTACACS is more reliable in transmission by encrypting thepackets. Table 5-1 shows the comparisons between HWTACACS and RADIUS.

Table 5-1 Comparisons between HWTACACS and RADIUS

HWTACACS RADIUS

Uses the Transmission Control Protocol(TCP) to provide reliable transmission.

Uses UDP.

Encrypts the main structure of theauthentication packet except the standardHWTACACS header.

Encrypts only the password field in theauthentication packet.

Separates authentication from authorization. Performs authentication together withauthorization.

Is suitable for security control. Is suitable for accounting.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 5 AAA Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-5

Page 98: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

HWTACACS RADIUS

Authorizes users to use the commands forconfiguring the device.

None.

5.1.4 Domain-based User Management

The NAS manages users in the following ways: One is based on the domain in which you canconfigure default authorization, RADIUS or HWTACACS server template, and authenticationand accounting schemes in the domain; the other is based on the user account. In current AAAimplementation, users are categorized into different domains. The domain to which a userbelongs depends on the character string that follows the "@" in the user name. For example, theuser "user@huawei" belongs to the domain "huawei". If there is no "@" in the user name, theuser belongs to the domain "default".

To perform AAA for access users, you need to configure authentication, authorization, andaccounting modes respectively in the AAA view, and then apply the authentication,authorization, and accounting schemes in the domain view. AAA, by default, adopts localauthentication, local authorization, and non-accounting schemes respectively. If a domain iscreated but no scheme is applied in it, AAA adopts the default schemes for this domain. Inaddition, to use the RADIUS or HWTACACS schemes for a user, the RADIUS or HWTACACSserver template must be pre-configured in the system view and then applied in the view of thedomain to which the user belongs. For details about the configuration procedures, see examplesin the following sections.

When a domain and users in the domain are configured with the same attribute at the same time,the user-based configuration takes precedence over the domain-based configuration.

The authorization precedence configured within a domain is lower than that configured on anAAA server. In other words, the authorization attribute of the AAA server is used preferentially.The domain authorization attribute is valid only when the AAA server lacks this authorizationor does not support this authorization. In this way, you can add services flexibly when usingdomains regardless of the attribute limitations of the AAA server.

On the S-switch, you can configure multiple domains. Packets are transmitted according to theirdomain names. Functioning as an NAS, the S-switch determines the Internet service provider(ISP) to which a user belongs according to the domain name of the user, and then transmitspackets of the user to this ISP network.

5.1.5 Local User Management

To perform local user management, you need to set up the local user database, maintain userinformation, and manage users on the local S-switch. In addition to creating local user accounts,you can also implement functions such as local authentication and authorization.

5.1.6 ReferencesFor more information about AAA and RADIUS, refer to the following documents:

l RFC2865: Remote Authentication Dial In User Service (RADIUS)

l RFC2866: RADIUS Accounting

5 AAA ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

5-6 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 99: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

l RFC2867: RADIUS Accounting Modifications for Tunnel Protocol Support

l RFC2869: RADIUS Extensions

l RFC2903: Generic AAA Architecture

l RFC2904: AAA Authorization Framework

l RFC2906: AAA Authorization Requirements

5.1.7 Logical Relationships Between Configuration Tasks

1. Categorize users as required.

2. Create authentication, authorization, and accounting schemes.

3. Configure the RADIUS or HWTACACS server to implement RADIUS or HWTACACSauthentication, authorization, or accounting.

4. Create a domain.

5. Apply the authentication, authorization, and accounting schemes configured in Step 2 inthe domain.

6. Apply the RADIUS or HWTACACS server configured in Step 5 in the domain.

7. Configure local users.

5.2 Configuring AAAThis section describes how to configure AAA.

5.2.1 Establishing the Configuration Task

5.2.2 Configuring the Authentication Scheme

5.2.3 (Optional) Configuring the Authorization Scheme

5.2.4 Configuring the Accounting Scheme

5.2.5 (Optional) Configuring the Recording Scheme

5.2.6 Checking the Configuration

5.2.1 Establishing the Configuration Task

Applicable Environment

You can configure AAA to provide network access services for legal users in the followingscenarios:

l The network devices need to be protected.

l Illegal access needs to be denied.

l The credibility of legal users is low.

NOTE

AAA is always enabled on the S-switch.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 5 AAA Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-7

Page 100: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Pre-configuration TasksNone.

Data PreparationTo configure AAA, you need the following data.

No. Data

1 Name of the authentication scheme and authentication mode

2 (Optional) Name of the authorization scheme and authorization mode

3 Name of the accounting scheme, accounting mode, and interval for real-timeaccounting

4 (Optional) Policy for accounting start failures, policy for real-time accountingfailures, and maximum number of real-time accounting failures

5 (Optional) Name of the recording scheme, name of the HWTACACS servertemplate related to the recording mode, and events to be recorded

6 Types and numbers of the interfaces at the server side and the client side

5.2.2 Configuring the Authentication Scheme

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:aaa

The AAA view is displayed.

Step 3 Run:authentication-scheme authentication-scheme-name

An authentication scheme is created and the authentication scheme view is displayed.

Step 4 Run:authentication-mode { hwtacacs | radius | local }*[ none ]orauthentication-mode none

The authentication mode is set.

5 AAA ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

5-8 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 101: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

In this step, more than one authentication mode can be chosen, with the none mode as the lastchoice. During the actual authentication, the order for the modes to take effect is determined bythe order of input commands. The next mode takes effect only after the preceding one becomesinvalid.

----End

5.2.3 (Optional) Configuring the Authorization Scheme

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:aaa

The AAA view is displayed.

Step 3 Run:authorization-scheme authorization-scheme-name

An authorization scheme is created and the authorization scheme view is displayed.

Step 4 Run:authorization-mode { hwtacacs | if-authenticated | local }*[ none ]orauthorization-mode none

The authorization mode is set.

In this step, more than one authorization mode can be chosen, with the none mode as the lastchoice. During the actual authorization, the order for the modes to take effect is determined bythe order of input commands. The next mode takes effect only after the preceding one becomesinvalid.

----End

5.2.4 Configuring the Accounting Scheme

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 5 AAA Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-9

Page 102: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

The system view is displayed.

Step 2 Run:aaa

The AAA view is displayed.

Step 3 Run:accounting-scheme accounting-scheme-name

An accounting scheme is created and the accounting scheme view is displayed.

Step 4 Run:accounting-mode { hwtacacs | none | radius }

The accounting mode is set.

Step 5 (Optional) Run:accounting realtime interval

Real-time accounting is enabled and the accounting interval is set.

By default, the value of interval is 5, in minutes.

Step 6 (Optional) Run:accounting interim-fail [ max-times times ] [offline | online ]

The policy for real-time accounting failures is configured.

By default, the value of times is 3.

Step 7 (Optional) Run:accounting start-fail [ offline | online ]

The policy for accounting start failures is configured.

By default, the policy for accounting start failures is offline.

----End

5.2.5 (Optional) Configuring the Recording Scheme

ContextNOTE

You can configure the recording scheme only when HWTACACS has been enabled and the HWTACACSserver template has been set.

Do as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:aaa

5 AAA ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

5-10 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 103: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

The AAA view is displayed.

Step 3 Run:recording-scheme recording-scheme-name

A recording scheme is created and the recording scheme view is displayed.

Step 4 Run:recording-mode hwtacacs template-name

The recording mode is set.

Step 5 Run:quit

The recording scheme view is quit and the AAA view is displayed.

Step 6 Run:cmd recording-scheme recording-scheme-name

The commands that are used by the user are recorded on the device.

Step 7 Run:outbound recording-scheme recording-scheme-name

The operations that are implemented on the device are recorded for the client.

Step 6 and Step 7 are not listed in sequence.

----End

5.2.6 Checking the ConfigurationRun the following commands to check the previous configuration.

Action Command

Check the summary of AAA. display aaa configuration

Check the accounting scheme. display accounting-scheme [ accounting-scheme-name ]

Check the authenticationscheme.

display authentication-scheme [ authentication-scheme-name ]

Check the authorizationscheme.

display authorization-scheme [ authorization-scheme-name ]

Check the recording scheme. display recording-scheme [ recording-scheme-name ]

5.3 Configuring the RADIUS ServerThis section describes how to configure the RADIUS server.

5.3.1 Establishing the Configuration Task

5.3.2 Creating a RADIUS Server Template

5.3.3 Configuring the RADIUS Authentication Server

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 5 AAA Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-11

Page 104: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

5.3.4 Configuring the RADIUS Accounting Server

5.3.5 (Optional) Configuring the Protocol Version for the RADIUS Server

5.3.6 (Optional) Configuring the Shared Key for the RADIUS Server

5.3.7 (Optional) Configuring the User Name Format for the RADIUS Server

5.3.8 (Optional) Setting the Traffic Unit for the RADIUS Server

5.3.9 (Optional) Configuring the Retransmission Parameters for the RADIUS Server

5.3.10 (Optional) Configuring the NAS Interface for the RADIUS Server

5.3.11 Checking the Configuration

5.3.1 Establishing the Configuration Task

Applicable Environment

When the RADIUS protocol is adopted for AAA, you need to configure the RADIUS server.

NOTE

Although most RADIUS configurations have default ones, you can modify them as required.

The configurations, however, can be modified only when the RADIUS server template is not in use.

Pre-configuration Tasks

None.

Data Preparation

To configure the RADIUS server, you need the following data.

No. Data

1 Name of the RADIUS server template

2 IP address, interface number, and source interface number of the primaryRADIUS server for authentication and accounting

3 (Optional) IP address, interface number, and source interface number of thesecondary RADIUS server for authentication and accounting

4 (Optional) Retransmission times or prohibited retransmission of Accounting Stoppackets

5 (Optional) Protocol version of the RADIUS server

6 (Optional) Shared key of the RADIUS server

7 (Optional) User name format (with or without the domain name) of the RADIUSserver

8 (Optional) Traffic unit of the RADIUS server

5 AAA ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

5-12 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 105: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

No. Data

9 (Optional) Response timeout period and retransmission times of the RADIUSserver

10 (Optional) NAS interface format and its ID format of the RADIUS server

5.3.2 Creating a RADIUS Server Template

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:radius-server template template-name

A RADIUS server template is created and the RADIUS view is displayed.

----End

5.3.3 Configuring the RADIUS Authentication Server

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:radius-server template template-name

The RADIUS view is displayed.

Step 3 Run:radius-server authentication ip-address port [ source loopback interface-number ]

The primary RADIUS authentication server is configured.

Step 4 Run:radius-server authentication ip-address port [ source loopback interface-number ] secondary

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 5 AAA Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-13

Page 106: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

The secondary RADIUS authentication server is configured.

----End

5.3.4 Configuring the RADIUS Accounting Server

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:radius-server template template-name

The RADIUS view is displayed.

Step 3 Run:radius-server accounting ip-address port [ source loopback interface-number ]

The primary RADIUS accounting server is configured.

Step 4 Run:radius-server accounting ip-address port [ source loopback interface-number ] secondary

The secondary RADIUS accounting server is configured.

----End

5.3.5 (Optional) Configuring the Protocol Version for the RADIUSServer

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:radius-server template template-name

The RADIUS view is displayed.

Step 3 Run:

5 AAA ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

5-14 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 107: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

radius-server type { portal | standard }

The protocol version is configured for the RADIUS server.

----End

5.3.6 (Optional) Configuring the Shared Key for the RADIUSServer

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:radius-server template template-name

The RADIUS view is displayed.

Step 3 Run:radius-server shared-key key-string

The shared key is configured for the RADIUS server.

----End

5.3.7 (Optional) Configuring the User Name Format for theRADIUS Server

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:radius-server template template-name

The RADIUS view is displayed.

Step 3 Run:radius-server user-name domain-included

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 5 AAA Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-15

Page 108: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

The user name format is configured for the RADIUS server.

----End

5.3.8 (Optional) Setting the Traffic Unit for the RADIUS Server

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:radius-server template template-name

The RADIUS view is displayed.

Step 3 Run:radius-server traffic-unit { byte | kbyte | mbyte | gbyte }

The traffic unit is set for the RADIUS server.

----End

5.3.9 (Optional) Configuring the Retransmission Parameters for theRADIUS Server

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:radius-server template template-name

The RADIUS view is displayed.

Step 3 Run:radius-server timeout seconds

The response timeout period is set for the RADIUS server.

Step 4 Run:radius-server retransmit retry-times

5 AAA ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

5-16 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 109: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

The retransmission times are set for the RADIUS server.

Step 3 and Step 4 are not listed in sequence.

----End

5.3.10 (Optional) Configuring the NAS Interface for the RADIUSServer

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:radius-server template template-name

The RADIUS view is displayed.

Step 3 Run:radius-server nas-port-format { new | old }

The NAS interface format is configured for the RADIUS server.

Step 4 Run:radius-server nas-port-id-format { new | old }

The ID format of the NAS interface is configured for the RADIUS server.

Step 3 and Step 4 are not listed in sequence.

----End

5.3.11 Checking the ConfigurationRun the following command to check the previous configuration.

Action Command

Check the configuration of theRADIUS server.

display radius-server configuration [ templatetemplate-name ]

5.4 Configuring the HWTACACS ServerThis section describes how to configure the HWTACACS server.

5.4.1 Establishing the Configuration Task

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 5 AAA Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-17

Page 110: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

5.4.2 Creating a HWTACACS Server Template

5.4.3 Configuring the HWTACACS Authentication Server

5.4.4 Configuring the HWTACACS Authorization Server

5.4.5 Configuring the HWTACACS Accounting Server

5.4.6 (Optional) Configuring the Source IP Address of the HWTACACS Server

5.4.7 (Optional) Configuring the Shared Key for the HWTACACS Server

5.4.8 (Optional) Configuring the User Name Format for the HWTACACS Server

5.4.9 (Optional) Setting the Traffic Unit for the HWTACACS Server

5.4.10 (Optional) Setting the Timer of the HWTACACS Server

5.4.11 Checking the Configuration

5.4.1 Establishing the Configuration Task

Applicable Environment

When the HWTACACS protocol is adopted for AAA, you need configure the HWTACACSserver.

NOTE

The configuration of the HWTACACS server differs from that of the RADIUS server as follows:

The S-switch does not check whether the HWTACACS template is in use when you modify attributes ofthe HWTACACS server except for deleting the configuration of the server.

By default, no authentication key is configured for the HWTACACS server.

HWTACACS can process Accounting Stop packets on both integrated devices and distributed devices.

Pre-configuration Tasks

None.

Data Preparation

To configure AAA, you need the following data.

No. Data

1 Name of the HWTACACS server template

2 IP address and interface number of the primary HWTACACS server forauthentication, authorization, and accounting

3 (Optional) IP address and interface number of the secondary HWTACACS serverfor authentication, authorization, and accounting

4 (Optional) Retransmission times or prohibited retransmission of Accounting Stoppackets

5 (Optional) Source IP address of the HWTACACS server

5 AAA ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

5-18 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 111: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

No. Data

6 (Optional) Shared key of the HWTACACS server

7 (Optional) User name format (with or without the domain name) of theHWTACACS server

8 (Optional) Traffic unit of the HWTACACS server

9 (Optional) Response timeout period of the HWTACACS server and the time forrestoring the primary HWTACACS server to be active

5.4.2 Creating a HWTACACS Server Template

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:hwtacacs-server template template-name

A HWTACACS server template is created and the HWTACACS view is displayed.

----End

5.4.3 Configuring the HWTACACS Authentication Server

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:hwtacacs-server template template-name

The HWTACACS view is displayed.

Step 3 Run:hwtacacs-server authentication ip-address [ port ]

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 5 AAA Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-19

Page 112: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

The primary HWTACACS authentication server is configured.

Step 4 Run:hwtacacs-server authentication ip-address [ port ]

The secondary HWTACACS authentication server is configured.

----End

5.4.4 Configuring the HWTACACS Authorization Server

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:hwtacacs-server template template-name

The HWTACACS view is displayed.

Step 3 Run:hwtacacs-server authorization ip-address [ port ]

The primary HWTACACS authorization server is configured.

Step 4 Run:hwtacacs-server authorization ip-address [ port ] secondary

The secondary HWTACACS authorization server is configured.

----End

5.4.5 Configuring the HWTACACS Accounting Server

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:hwtacacs-server template template-name

5 AAA ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

5-20 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 113: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

The HWTACACS view is displayed.

Step 3 Run:hwtacacs-server accounting ip-address [ port ]

The primary HWTACACS accounting server is configured.

Step 4 Run:hwtacacs-server accounting ip-address [ port ] secondary

The secondary HWTACACS accounting server is configured.

Step 5 Run:quit

The HWTACACS view is quit.

Step 6 Run:hwtacacs-server accounting-stop-packet resend { disable | enable number }

The retransmission of Accounting Stop packets is configured.

----End

5.4.6 (Optional) Configuring the Source IP Address of theHWTACACS Server

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:hwtacacs-server template template-name

The HWTACACS view is displayed.

Step 3 Run:hwtacacs-server source-ip ip-address

The source IP address of the HWTACACS server is configured.

----End

5.4.7 (Optional) Configuring the Shared Key for the HWTACACSServer

ContextDo as follows on the S-switch.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 5 AAA Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-21

Page 114: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:hwtacacs-server template template-name

The HWTACACS view is displayed.

Step 3 Run:hwtacacs-server shared-key key-string

The shared key is configured for the HWTACACS server.

----End

5.4.8 (Optional) Configuring the User Name Format for theHWTACACS Server

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:hwtacacs-server template template-name

The HWTACACS view is displayed.

Step 3 Run:hwtacacs-server user-name domain-included

The user name format is configured for the HWTACACS server.

----End

5.4.9 (Optional) Setting the Traffic Unit for the HWTACACS Server

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

5 AAA ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

5-22 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 115: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

The system view is displayed.

Step 2 Run:hwtacacs-server template template-name

The HWTACACS view is displayed.

Step 3 Run:hwtacacs-server traffic-unit { byte | kbyte | mbyte | gbyte }

The traffic unit is set for the HWTACACS server.

----End

5.4.10 (Optional) Setting the Timer of the HWTACACS Server

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:hwtacacs-server template template-name

The HWTACACS view is displayed.

Step 3 Run:hwtacacs-server timer response-timeout timeout

The response timeout period is set for the HWTACACS server.

Step 4 Run:hwtacacs-server timer quiet time

The restoration period is set for the HWTACACS server.

----End

5.4.11 Checking the ConfigurationRun the following commands to check the previous configuration.

Action Command

Check the HWTACACS server. display hwtacacs-server template [ template-name[ verbose ] ]

Check Accounting Stop packets onthe HWTACACS server.

display hwtacacs-server accounting-stop-packet{ all | number | ip ip-address }

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 5 AAA Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-23

Page 116: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

5.5 Configuring a DomainThis section describes how to configure a domain.

5.5.1 Establishing the Configuration Task

5.5.2 Creating a Domain

5.5.3 Configuring Authentication, Authorization, and Accounting Schemes for the Domain

5.5.4 (Optional) Configuring the RADIUS Server Template for the Domain

5.5.5 (Optional) Configuring the HWTACACS Server Template for the Domain

5.5.6 (Optional) Configuring the Status of the Domain

5.5.7 (Optional) Setting the Maximum Number of Access Users for the Domain

5.5.8 Checking the Configuration

5.5.1 Establishing the Configuration Task

Applicable Environment

You can configure a domain to implement AAA management on users who access the S-switch through the domain.

Pre-configuration Tasks

Configure the RADIUS or HWTACACS server template if the remote authentication,authorization, and accounting schemes are adopted.

Data Preparation

To configure a domain, you need the following data.

No. Data

1 Domain name

2 Names of the authentication, authorization and accounting schemes to be usedfor the domain

3 (Optional) Name of the RADIUS or HWTACACS template to be used for thedomain

4 (Optional) Maximum number of access users allowed in the domain

5.5.2 Creating a Domain

5 AAA ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

5-24 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 117: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:aaa

The AAA view is displayed.

Step 3 Run:domain domain-name

A domain is created and the domain view is displayed.

----End

5.5.3 Configuring Authentication, Authorization, and AccountingSchemes for the Domain

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:aaa

The AAA view is displayed.

Step 3 Run:domain domain-name

The domain view is displayed.

Step 4 Run:authentication-scheme authentication-scheme-name

The authentication scheme is configured for the domain.

Step 5 Run:authorization-scheme authorization-scheme-name

The authorization scheme is configured for the domain.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 5 AAA Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-25

Page 118: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Step 6 Run:accounting-scheme accounting-scheme-name

The accounting scheme is configured for the domain.

----End

5.5.4 (Optional) Configuring the RADIUS Server Template for theDomain

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:aaa

The AAA view is displayed.

Step 3 Run:domain domain-name

The domain view is displayed.

Step 4 Run:radius-server template-name

The RADIUS server template is configured for the domain.

----End

5.5.5 (Optional) Configuring the HWTACACS Server Template forthe Domain

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:aaa

5 AAA ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

5-26 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 119: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

The AAA view is displayed.

Step 3 Run:domain domain-name

The domain view is displayed.

Step 4 Run:hwtacacs-server template-name

The HWTACACS server template is configured for the domain.

----End

5.5.6 (Optional) Configuring the Status of the Domain

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:aaa

The AAA view is displayed.

Step 3 Run:domain domain-name

The domain view is displayed.

Step 4 Run:state { active | block }

The status of the domain is configured.

----End

5.5.7 (Optional) Setting the Maximum Number of Access Users forthe Domain

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 5 AAA Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-27

Page 120: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

The system view is displayed.

Step 2 Run:aaa

The AAA view is displayed.

Step 3 Run:domain domain-name

The domain view is displayed.

Step 4 Run:access-limit max-number

The maximum number of access users is set for the domain.

----End

5.5.8 Checking the ConfigurationRun the following command to check the previous configuration.

Action Command

Check the domain. display domain [ domain-name ]

5.6 Configuring Local User ManagementThis section describes how to configure local user management.

5.6.1 Establishing the Configuration Task

5.6.2 Creating Local User Accounts

5.6.3 (Optional) Configuring the Service Type for Local Users

5.6.4 (Optional) Configuring the Authority of Accessing the FTP Directory for Local Users

5.6.5 (Optional) Configuring the Status of Local Users

5.6.6 (Optional) Setting the Priority of Local Users

5.6.7 (Optional) Setting the Access Limit for Local Users

5.6.8 Checking the Configuration

5.6.1 Establishing the Configuration Task

Applicable EnvironmentYou can create local users and manage them on the S-switch.

Pre-configuration TasksNone.

5 AAA ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

5-28 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 121: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Data PreparationTo configure AAA, you need the following data.

No. Data

1 User names and passwords

2 (Optional) Service type of local users

3 (Optional) Name of the FTP directory for local users

4 (Optional) Status of local users

5 (Optional) Priority of local users

6 (Optional) Maximum number of local access users

5.6.2 Creating Local User Accounts

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:aaa

The AAA view is displayed.

Step 3 Run:local-user user-name password { simple | cipher } password

Local user accounts are created.

----End

5.6.3 (Optional) Configuring the Service Type for Local Users

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 5 AAA Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-29

Page 122: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

The system view is displayed.

Step 2 Run:aaa

The AAA view is displayed.

Step 3 Run:local-user user-name service-type { ftp | ppp | ssh | telnet | terminal } *

The service type is configured for local users.

NOTE

Through this configuration procedure, user management based on the service type is implemented.

----End

5.6.4 (Optional) Configuring the Authority of Accessing the FTPDirectory for Local Users

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:aaa

The AAA view is displayed.

Step 3 Run:local-user user-name ftp-directory directory

The authority of accessing the FTP directory is configured for local users.

----End

5.6.5 (Optional) Configuring the Status of Local Users

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

5 AAA ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

5-30 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 123: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

The system view is displayed.

Step 2 Run:aaa

The AAA view is displayed.

Step 3 Run:local-user user-name state { active | block }

The status of local users is configured.

----End

5.6.6 (Optional) Setting the Priority of Local Users

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:aaa

The AAA view is displayed.

Step 3 Run:local-user user-name level level

The priority of local users is set.

----End

5.6.7 (Optional) Setting the Access Limit for Local Users

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:aaa

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 5 AAA Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-31

Page 124: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

The AAA view is displayed.

Step 3 Run:local-user user-name access-limit access-limit

The access limit is set for local users.

----End

5.6.8 Checking the ConfigurationRun the following command to check the previous configuration.

Action Command

Check the attributes of local users. display local-user [ domain domain-name | user-name user-name ]

5.7 Maintaining AAAThis section describes how to clear or debug AAA.

5.7.1 Clearing HWTACACS Statistics

5.7.2 Debugging AAA

5.7.1 Clearing HWTACACS Statistics

CAUTIONHWTACACS statistics cannot be restored after you clear it. So, confirm the action before youuse the commands.

Action Command

Clear statistics about theHWTACACS server.

reset hwtacacs-server statistics { all | accounting |authentication | authorization }

Clear statistics about AccountingStop packets on the HWTACACSserver.

reset hwtacacs-server accounting-stop-packet { all |ip ip-address }

5.7.2 Debugging AAA

5 AAA ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

5-32 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 125: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

CAUTIONDebugging affects the performance of the system. So, after debugging, run the undo debuggingall command to disable it at once.

When an AAA fault occurs, run the following debugging commands in the user view to locatethe fault. For details about debugging, see Chapter 6 "Debugging and Diagnosis."

Action Command

Debug RADIUS packets. debugging radius packet

Debug the HWTACACS server. debugging hwtacacs { all | error | event | message |receive-packet | send-packet }

5.8 Configuration ExamplesThis section provides an example for configuring AAA.

Networking RequirementsIt is required that Telnet users be authenticated through the RADIUS protocol.

A maximum of five Telnet users can log in to the S-switch. Telnet users are first authenticatedby the RADIUS authentication server. If the RADIUS authentication server does not respond,the non-authentication mode is adopted. The IP address of the RADIUS authentication serveris 1.1.1.1. There is no secondary authentication server. By default, the interface number is 1812.

Networking diagramSee .

Figure 5-3 Networking diagram of AAA

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 5 AAA Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-33

Page 126: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Configuration Procedure# Configure the mode in which users access the S-switch to only Telnet and set the AAAauthentication for users.

[S-switch-A] user-interface vty 0 4 [S-switch-A-ui-vty0-4] protocol inbound telnet [S-switch-A-ui-vty0-4] authentication-mode aaa [S-switch-A-ui-vty0-4] quit

# Configure the RADIUS server template.

[S-switch-A] radius-server template shiva

# Configure the IP address and interface of the RADIUS authentication server.

[S-switch-A-radius-shiva] radius-server authentication 1.1.1.1 1812

# Set the shared key and retransmission times for the RADIUS server.

[S-switch-A-radius-shiva] radius-server shared-key it-is-my-secret [S-switch-A-radius-shiva] radius-server retransmit 2 [S-switch-A-radius-shiva] quit

# Enter the AAA view.

[S-switch-A] aaa

# Configure the authentication scheme r-n and set the authentication mode to radius andnone in sequence, that is, if the RADIUS authentication server does not respond, the non-authentication is adopted.

[S-switch-A–aaa] authentication-scheme r-n [S-switch-A-aaa-authen-r-n] authentication-mode radius none [S-switch-A-aaa-authen-r-n] quit

# Configure the default domain. Adopt the authentication scheme r-n, default accounting scheme(non-accounting scheme), and the RADIUS template shiva in the domain view.

[S-switch-A-aaa] domain default [S-switch-A-aaa-domain-default] authentication-scheme r-n [S-switch-A-aaa-domain-default] radius-server shiva

Configuration Files# sysname S-switch-A# radius-server template shiva radius-server shared-key it-is-my-secret radius-server authentication 1.1.1.1 1812 radius-server retransmit 2# aaa authentication-scheme default authentication-scheme r-n authentication-mode radius none # authorization-scheme default # accounting-scheme default # domain default authentication-scheme r-n radius-server shiva

5 AAA ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

5-34 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 127: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

##user-interface con 0user-interface aux 0user-interface vty 0 4 authentication-mode aaa#

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 5 AAA Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

5-35

Page 128: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf
Page 129: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

6 MAC Address Authentication Configuration

About This Chapter

This chapter describes the basic concepts of MAC address authentication and the procedure forconfiguring MAC address authentication, and provides examples for configuring MAC addressauthentication.

6.1 Overview of MAC Address AuthenticationThis section describes the basic principle and concepts of MAC address authentication.

6.2 Configuring MAC Address AuthenticationThis section describes how to configure MAC address authentication.

6.3 Configuring Enhanced MAC Address AuthenticationThis section describes how to configure a guest VLAN and the maximum number of MACaddress authentication users attached to an interface of an S-switch.

6.4 Maintaining MAC Address AuthenticationRun the reset command in the user view to reset the statistics of MAC address authentication.

6.5 Configuration ExamplesThis section provides a configuration example for MAC address authentication.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 6 MAC Address Authentication Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-1

Page 130: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

6.1 Overview of MAC Address AuthenticationThis section describes the basic principle and concepts of MAC address authentication.

6.1.1 Introduction to MAC Address Authentication

6.1.2 MAC Address Authentication Features Supported by the S-switch

6.1.3 Update History

6.1.1 Introduction to MAC Address Authentication

The switch adopt MAC address authentication in the following modes:

l Remote Authentication Dial-In User Service (RADIUS) server authentication

l Local authentication

After confirming the authentication mode, you can select one of the following types ofauthentication usernames:

l MAC-address usenames: The MAC address of a user is used as a usename forauthentication.

l Fixed username: All users that use the same MAC address use the username and passwordpre-configured on an S-switch; therefore, whether users can pass the authentication dependson the correctness of the username and password, and the maximum number of usersallowed to use the username.

MAC Address Authentication in RADIUS Server Authentication ModeWhen MAC address authentication adopts the RADIUS server authentication mode, an S-switch functioning as a RADIUS client cooperates with the RADIUS server to implement MACaddress authentication.l When the MAC-address username type is adopted, the S-switch takes the MAC address of

a detected user as the username and password of the user, and sends it to the RADIUSserver.

l When the fixed username type is adopted, the S-switch takes the locally configuredusername and password as the username and password of a user to be authenticated, andsends them to the RADIUS server.

Users that pass the authentication on the RADIUS server can access the network.

MAC Address Authentication in Local Authentication ModeWhen MAC address authentication adopts the local authentication mode, users are authenticatedon the local S-switch. You need to configure the local username and password on the S-switch.

l When the MAC-address username type is adopted, the MAC address of an access user isconfigured as the local username and the password for the authentication.Whether the localusername contains delimiter - should be consistent with the format of a usernameconfigured on a device; otherwise, MAC address authentication fails.

6 MAC Address Authentication ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

6-2 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 131: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

l When the fixed username type is adopted, the MAC addresses of all the users match theconfigured local username and password automatically.

6.1.2 MAC Address Authentication Features Supported by the S-switch

Timers for MAC Address AuthenticationMAC address authentication is controlled by the following timers:

l Offline-detect timer: specifies the interval for an S-switch to check whether a user goesoffline. When a user goes offline, the S-switch immediately notifies the RADIUS serverto stop charging the user.

l Quiet timer: specifies the period for a switch to wait to re-authenticate a user that fails inthe authentication. During this period, the S-switch does not process the authenticationrequests of the user.

l Server-timeout timer: specifies the timeout period of the connection between an S-switchand the RADIUS server. During the authentication process, if the connection between anS-switch and a RADIUS server times out, the authentication fails.

Silent MAC AddressAfter the authentication of a MAC address fails, the MAC address becomes a silent MACaddress. During the timeout period of the quiet timer, the S-switch directly discards data packetsreceived from users of this MAC address. The silent MAC address is configured to preventinvalid MAC addresses from being authenticated repeatedly in a short time.

Guest VLANWhen the authentication of a user connected to an interface fails, the interface is added to a guestVLAN if the conditions for validating a guest VLAN are met. The user connected to the interfacecan access network resources of the guest VLAN. This is an authorization method of enablingusers that fail in the authentication to access limited resource of specific VLANs.

6.1.3 Update HistoryVersion Revision

V200R002C02 This is the first release.

6.2 Configuring MAC Address AuthenticationThis section describes how to configure MAC address authentication.

6.2.1 Establishing the Configuration Task

6.2.2 Configuring Global MAC Address Authentication

6.2.3 Configuring MAC Address Authentication on an Interface

6.2.4 Configuring a MAC Address as a Username for MAC Address Authentication

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 6 MAC Address Authentication Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-3

Page 132: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

6.2.5 Configuring a Fixed Username for a MAC Address Authentication User

6.2.6 (Optional)Configuring a Domain Name for a MAC Address Authentication User

6.2.7 (Optional)Configuring Timers for MAC Address Authentication

6.2.8 Checking the Configuration

6.2.1 Establishing the Configuration Task

Applicable EnvironmentMAC address authentication can be configured on an interface before global MAC addressauthentication is enabled, but MAC address authentication does not take effect on the interface.After global MAC address authentication is enabled, MAC address authentication enabled onthe interface takes effect immediately.

NOTE

l If MAC address authentication is enabled on an interface, 802.1x cannot be enabled on the interface;if 802.1x is enabled on an interface, MAC address authentication cannot be enabled on the interface.

l If MAC address authentication is enabled on an interface, VLAN mapping cannot be enabled on theinterface; if VLAN mapping is enabled on an interface, MAC address authentication cannot be enabledon the interface.

Pre-configuration TasksBefore configuring MAC address authentication, complete the following tasks:

l Connecting interfaces and configuring physical parameters for the interfaces to ensure thatthe physical layer status of the interfaces is Up

l Configuring parameters of the link layer protocol for interfaces and ensuring that the statusof the link layer protocol on the interfaces is Up

Data PreparationTo configure MAC address authentication, you need the following data.

No. Data

1 Number of an interface to be authenticated

6.2.2 Configuring Global MAC Address Authentication

ContextDo as follows on the S-switch.

Procedure

Step 1 Run the system-view command to enter the system view.

6 MAC Address Authentication ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

6-4 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 133: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Step 2 Run the mac-authen command to enable global MAC address authentication.

----End

6.2.3 Configuring MAC Address Authentication on an Interface

ContextDo as follows on the S-switch in the system view and in the interface view respectively.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the mac-authen interface { interface-type interface-number1 [ to interface-number2 ] }command to enable MAC address authentication on a specified interface.

NOTE

In addition, you can run the mac-authen command in the interface view to enable MAC address authenticationon the interface.

----End

6.2.4 Configuring a MAC Address as a Username for MAC AddressAuthentication

ContextDo as follows on the S-switch.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the mac-authen username macaddress command to configure a MAC address as ausername for MAC address authentication.By default, a MAC address without delimiter - is used as a username for MAC addressauthentication.

Step 3 (Optional)Run the mac-authen username macaddress format with-hyphen command toconfigure a MAC address with delimiter - as a username for MAC address authentication.

----End

6.2.5 Configuring a Fixed Username for a MAC AddressAuthentication User

ContextTo configure a fixed username for a MAC address authentication user, do as follows on the S-switch.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 6 MAC Address Authentication Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-5

Page 134: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the mac-authen username fixed command to configure a fixed username for a MACaddress authentication user.

Step 3 Run the mac-authen username username command to configure a username for MAC addressauthentication.

Step 4 Run the mac-authen password password command to configure a password for MAC addressauthentication.

----End

6.2.6 (Optional)Configuring a Domain Name for a MAC AddressAuthentication User

ContextWhen a user adopts MAC address authentication, you must configure an authentication domainfor the user. To configure a domain name for a MAC address authentication user, do as followson the S-switch.

The configuration is invalid for a user with a fixed username.By default, MAC addressauthentication without a domain is used, and a username does not contains a domain name.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the mac-authen domain isp-name command to configure a domain name for a MACaddress authentication user.

NOTE

Configure an authentication domain for a MAC address authentication user. Check whether there is anavailable domain before configuring the domain; otherwise, the system prompts that an error occurs.

----End

6.2.7 (Optional)Configuring Timers for MAC AddressAuthentication

ContextDo as follows on the S-switch.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the mac-authen timer offline-detect offline-detect-value command to configure the valueof the offline-detect timer.The default value is 300 seconds.

6 MAC Address Authentication ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

6-6 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 135: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Step 3 Run the mac-authen timer quiet-period quiet-value command to configure the value of thequiet timer.The default value is 60 seconds.

Step 4 Run the mac-authen timer server-timeout server-timeout-value command to configure thevalue of the server timeout timer.The default value is 30 seconds.

----End

6.2.8 Checking the Configuration

PrerequisiteAll configurations of MAC address authentication are complete.

Procedure

Step 1 Run the display mac-authen command to view the status of MAC address authentication.

----End

Example

Run the display mac-authen command to check the configuration results of MAC addressauthentication. For example:

<Quidway> display mac-authenMac address authentication is Enabled.Fixed username: testFixed Password: test123 Offline detect period is 60s Quiet period is 65s Server response timeout value is 66s Guest VLAN reauthenticate period is 30s Max online user is 1024 Current online user is 0 Current domain: not configured

6.3 Configuring Enhanced MAC Address AuthenticationThis section describes how to configure a guest VLAN and the maximum number of MACaddress authentication users attached to an interface of an S-switch.

6.3.1 Establishing the Configuration Task

6.3.2 Configuring a Guest VLAN

6.3.3 Configuring the Maximum Number of MAC Address Authentication Users on an Interface

6.3.4 Checking the Configuration

6.3.1 Establishing the Configuration Task

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 6 MAC Address Authentication Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-7

Page 136: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Applicable Environment

After the authentication of a user connected to an interface fails, the interface is added to a guestVLAN. The MAC address of the user is added to the MAC address table of the guest VLAN.Thus, the user can access network resources of the guest VLAN.

By configuring the maximum number of MAC address authentication users, you can controlusers accessing an interface. The number of users accessing an interface of an S-switch reachesa limit value, the S-switch does not trigger MAC address authentication for subsequent usersaccessing the interface. Therefore, these users cannot access the network normally.

Pre-configuration Tasks

Before configuring enhanced MAC address authentication, complete the following tasks:

l Enabling MAC address authentication

l Creating a VLAN to be configured as a guest VLAN

l Configuring the maximum number of MAC address authentication users to one.

Data Preparation

To configure enhanced MAC address authentication, you need the following data.

No. Data

1 Number of an interface on a S-switch that performs MAC address authentication

2 ID of a guest VLAN

6.3.2 Configuring a Guest VLAN

ContextDo as follows on the S-switch.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the interface interface-type interface-number to enter the GigabitEthernet interface view.

Step 3 Run the mac-authen guest-vlan vlan-id command to configure a guest VLAN on the interface.

Step 4 (Optional) Run the mac-authen timer guest-vlan reauthenticate-period interval command toconfigure the interval for the S-switch to re-authenticate users of the guest VLAN.

Step 5 Run the quit command to return to the system view.

----End

6 MAC Address Authentication ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

6-8 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 137: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

6.3.3 Configuring the Maximum Number of MAC AddressAuthentication Users on an Interface

ContextTo set the maximum number of online users on an interface of a S-switch, do as follows on theS-switch.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the interface interface-type interface-number to enter the GigabitEthernet interface view.

Step 3 Run the mac-authen max-user user-number command to set the maximum number of MACaddress authentication users on the interface.

Step 4 Run the quit command to return to the system view.

----End

6.3.4 Checking the Configuration

PrerequisiteAll configurations of enhanced MAC address authentication are complete.

Procedure

Step 1 Run the display mac-authen command to check the configuration of enhanced MAC addressauthentication.

----End

Example

Run the display mac-authen command to check the configuration results of enhanced MACaddress authentication.

For example:

<Quidway> display mac-authenMac address authentication is Enabled.Fixed username:Fixed Password: test123 Offline detect period is 60s Quiet period is 65s Server response timeout value is 66s Guest VLAN reauthenticate period is 30s Max online user is 1024 Current online user is 0 Current domain: not configured

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 6 MAC Address Authentication Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-9

Page 138: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

6.4 Maintaining MAC Address AuthenticationRun the reset command in the user view to reset the statistics of MAC address authentication.

6.4.1 Resetting Statistics of MAC Address Authentication

6.4.1 Resetting Statistics of MAC Address Authentication

Context

CAUTIONStatistics of MAC address authentication cannot be restored after you clear them. So, confirmthe action before you use the command.

ProcedureStep 1 After confirming the action of resetting the statistics of MAC address authentication, run the

reset mac-authentication statistics [ interface { interface-type interface-number1 [ tointerface-number2 ] } ] command in the user view to clear them.

----End

6.5 Configuration ExamplesThis section provides a configuration example for MAC address authentication.

6.5.1 Example for Configuring MAC Address Authentication

6.5.1 Example for Configuring MAC Address Authentication

Networking Requirementsl The administrator of the S-switch wants to perform MAC address authentication on users

accessing GigabitEthernet 0/0/1 to control users' access to the Internet.l Local authentication with a fixed username is adopted; the fixed username is set to

huawei@default; the fixed password is set to huawei. Only users that pass the authenticationcan access the Internet.

Figure 6-1 Networking diagram for configuring local authentication with a fixed username

6 MAC Address Authentication ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

6-10 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 139: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Configuration Roadmap

The configuration roadmap is as follows:

l Add a local access user and configure the username and password for the user.

l Configure MAC address authentication on GigabitEthernet 0/0/1 and configure defaultVLAN.

l Adopt a fixed username for MAC address authentication.

l Enable global MAC address authentication.

NOTE

Configure global MAC address authentication after setting all related parameters. Otherwise,authorized users may fail to access the Internet.

Data Preparation

To complete this configuration, you need the following data:

l Interface for authentication

l Username for authentication

l Password for authentication

l Authentication type

Procedure

Step 1 Add a local access user to an S-switch, and configure the username and password for the user.<Quidway> system-view[Quidway] aaa[Quidway-aaa] local-user huawei@default password simple huawei[Quidway-aaa] local-user huawei@default service-type ppp[Quidway-aaa] authorization-scheme default[Quidway-aaa-author-default] authorization-mode none[Quidway-aaa-author-default] quit[Quidway-aaa] quit

Step 2 Configure MAC address authentication on GigabitEthernet 0/0/1 and configure default VLAN.[Quidway] vlan batch 10[Quidway-aaa] interface gigabitethernet 0/0/1[Quidway–GigabitEthernet0/0/1] port default vlan 10[Quidway–GigabitEthernet0/0/1] mac-authen[Quidway–GigabitEthernet0/0/1] quit

Step 3 Adopt a fixed username for MAC address authentication.[Quidway] mac-authen username fixed[Quidway] mac-authen username huawei@default[Quidway] mac-authen password huawei

Step 4 Enable global MAC address authentication.[Quidway] mac-authen[Quidway] quit

----End

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 6 MAC Address Authentication Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

6-11

Page 140: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Configuration FilesConfiguration file of the S-switch

# sysname Quidway# vlan batch 10# mac-authen mac-authen username fixed mac-authen username huawei@default mac-authen password huawei# interface GigabitEthernet0/0/1 port default vlan 10 mac-authen#aaa local-user huawei@default password simple huawei local-user huawei@default service-type ppp authentication-scheme default # authorization-scheme default authorization-mode none # accounting-scheme default # domain default #return

6 MAC Address Authentication ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

6-12 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 141: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

7 802.1X Configuration

About This Chapter

This chapter describes the basics, methods, and configuration example of 802.1X.

7.1 Overview of 802.1XThis section describes the basic concepts of 802.1X and the 802.1X functions supported by theS-switch.

7.2 Configuring 802.1XThis section describes the scenario, procedures, and precautions for configuring 802.1X.

7.3 Configuration ExamplesThis section describes a configuration example of 802.1X.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 7 802.1X Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-1

Page 142: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

7.1 Overview of 802.1XThis section describes the basic concepts of 802.1X and the 802.1X functions supported by theS-switch.

7.1.1 Introduction to 802.1X

7.1.2 802.1X Authentication System

7.1.3 802.1X Authentication Process

7.1.4 Implementation of 802.1X on the S-switch

7.1.5 Logical Relationships Between Configuration Tasks

7.1.6 Update History

7.1.1 Introduction to 802.1XThe IEEE 802.1X standard, 802.1X in brief, is a port-based network access control protocol. Itis put forward based on the IEEE 802.11 standard for wireless local area network (WLAN)access to solve the authentication problem. Later, the 802.1X protocol is applied on the Ethernetas a common access control mechanism on the local area network (LAN) interface to solveproblems in terms of authentication and security on the Ethernet.

"Port-based network access control" indicates the authentication and control implemented foraccess devices on an interface of a LAN access control device. A user device can access LANresources only after it passes the authentication.

7.1.2 802.1X Authentication SystemAs shown in Figure 7-1, 802.1X authentication adopts the typical client/server model andinvolves three entities, that is, the supplicant, authenticator, and the authentication server.

l The supplicant is usually a user terminal installed with the 802.1X client software providedby Huawei or the Windows XP operating system. The supplicant initiates the 802.1Xauthentication by running the 802.1X client software. The supplicant must support theExtensible Authentication Protocol over LAN (EAPoL).

l The authenticator is usually a network device supporting the 802.1X protocol. Theauthenticator provides the interface, either physical or logical, for LAN access of thesupplicant.

l The authentication server is usually a Remote Authentication Dial-In User Service(RADIUS) server for implementing authentication, authorization, and accounting (AAA).The authentication server stores information such as the user name, password, user VLAN,committed access rate (CAR) parameters, priority, and user access control list (ACL).

The information exchange between the three entities is as follows:

l The authenticator and the authentication server exchange information through theExtensible Authentication Protocol (EAP).

l The supplicant and the authenticator exchange information through EAPoL defined in theIEEE 802.1X standard.

The authenticator encapsulates authentication data in an EAP packet and then encapsulates theEAP packet in an upper-layer AAA protocol packet such as the RADIUS protocol packet. In

7 802.1X ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

7-2 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 143: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

this manner, the authentication data can travel through the complex network to reach theauthentication server.

Figure 7-1 802.1X authentication system

The three authentication entities involve the following basic concepts:

1. PAEThe Port Access Entity (PAE) performs the algorithm and implements the protocol.

2. Controlled or uncontrolled interfacel In authorized mode, a controlled interface can transmit packets in both directions; in

unauthorized mode, a controlled interface cannot receive packets from the supplicant.l An uncontrolled interface can bidirectionally transmit EAPoL protocol packets in either

mode to ensure that the supplicant sends and receives packets at any time.3. Controlled direction

In unauthorized mode, you can set an interface to be unidirectionally controlled orbidirectionally controlled.If an interface is unidirectionally controlled, it can send packets to the supplicant but cannotreceive packets from the supplicant.

NOTECurrently, the S-switch supports only unidirectionally controlled interfaces.

7.1.3 802.1X Authentication ProcessThe 802.1X authentication can be initiated by either the authenticator or the supplicant.

l 802.1X authentication initiated by the supplicantThe supplicant sends an EAPoL-Start packet to the authenticator through the client softwareand initiates the authentication.

l 802.1X authentication initiated by the authenticatorOn detecting an unauthenticated user accessing the network, the authenticator sends anEAP-Request/Identity packet to the user and initiates the authentication.

The 802.1X authentication system supports the EAP relay mode and the EAP termination modeto exchange information for user authentication. Take the 802.1X authentication initiated by thesupplicant as an example. The authentication processes in preceding modes are as follows:

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 7 802.1X Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-3

Page 144: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

EAP Relay Mode

The EAP relay mode is defined in the IEEE 802.1X standard. The EAP protocol is borne by anupper-layer AAA protocol, for example EAP over RADIUS, to travel through the complexnetwork and reach the authentication server. In EAP relay mode, the RADIUS server mustsupport EAP attributes, EAP-Message and Message-Authenticator.

Currently, the S-switch supports the EAP-Message Digest 5 (MD5) relay mode. In EAP-MD5relay mode, the RADIUS server sends an MD5 encryption word in an EAP-Request/MD5Challenge packet to the supplicant. The supplicant encrypts the password with the MD5encryption word. Figure 7-2 shows the authentication process in EAP-MD5 relay mode.

Figure 7-2 802.1X authentication process in EAP-MD5 relay mode

The authentication process is as follows:

1. The user runs the 802.1X client program, enters the assigned and registered user name andpassword, and sends an EAPoL-Start packet to the authenticator.

7 802.1X ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

7-4 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 145: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

2. After receiving the EAPoL-Start packet, the authenticator returns an EAP-Request/Identitypacket, requiring the supplicant to send the entered user name.

3. The supplicant responds with an EAP-Response/Identity packet, carrying the user name tothe authenticator. The authenticator receives the EAP-Response/Identity packet,encapsulates the packet into a RADIUS Access-Request packet, and sends it to theauthentication server.

4. After receiving the user name from the authenticator, the authentication server searches forthe password corresponding to the user name, encrypts the password through a randomlygenerated encryption word, and at the same time, sends the encryption word in a RADIUSAccess-Challenge packet to the authenticator.

5. After receiving the encryption word in the EAP-Request/MD5 Challenge packet from theauthenticator, the supplicant encrypts the password with the encryption word and then sendsit in an EAP-Response/MD5 Challenge packet to the authentication server through theauthenticator.

6. The authentication server compares the password in the RADIUS Access-Request packetfrom the authenticator with the local password generated through the MD5 algorithm. Ifthe two passwords are the same, the authentication server responds with RADIUS Access-Accept and EAP-Success packets.

7. After the authenticator receives the packets, the interface becomes authorized and the usercan access the network through this interface. After the interface becomes authorized, theauthenticator periodically sends handshake packets to the supplicant to monitor the onlineuser. By default, the authenticator disconnects a user after sending two handshake packetsbut receiving no response. In this manner, network resource waste caused by theauthenticator's unawareness of abnormal user disconnection is prevented.

EAP Termination ModeIn EAP termination mode, EAP packets are terminated on the authenticator and mapped toRADIUS packets to complete the authentication, authorization, and accounting through thestandard RADIUS protocol.

In EAP termination mode, the authenticator and the RADIUS server exchange informationthrough the Password Authentication Protocol (PAP) or Challenge Handshake AuthenticationProtocol (CHAP). Figure 7-3 takes authentication through CHAP as an example and shows theauthentication process in EAP termination mode.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 7 802.1X Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-5

Page 146: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Figure 7-3 802.1X authentication process in EAP termination mode

The difference between the EAP termination mode and the EAP relay mode is: In EAPtermination mode, the authenticator randomly generates an encryption word for user passwordencryption, and then sends the user name, random encryption word, and password encrypted onthe supplicant to the RADIUS server for authentication.

7.1.4 Implementation of 802.1X on the S-switchThe S-switch supports port-based access authentication defined in the 802.1X protocol, andextends and optimizes this feature in the following ways to enhance the security andmanageability of the system.

l Supporting a physical interface connected to multiple users

l Supporting MAC-based and port-based access control methods

7 802.1X ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

7-6 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 147: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

7.1.5 Logical Relationships Between Configuration TasksEnabling 802.1X globally and on the interface is a required configuration task; otherconfiguration tasks are optional. There is no strict logical relation between the configurationtasks. You can configure them as required.

7.1.6 Update HistoryVersion Revision

V100R002C02 This is the first release.

7.2 Configuring 802.1XThis section describes the scenario, procedures, and precautions for configuring 802.1X.

7.2.1 Establishing the Configuration Task

7.2.2 Enabling 802.1X Globally and on the Interface

7.2.3 (Optional) Setting the Port Access Control Mode

7.2.4 (Optional) Setting the Port Access Control Method

7.2.5 (Optional) Setting the Maximum Number of Concurrent Access Users

7.2.6 (Optional) Enabling DHCP Trigger

7.2.7 (Optional) Setting the Authentication Method for the 802.1X User

7.2.8 (Optional) Configuring the Guest VLAN

7.2.9 (Optional) Setting the Maximum Number of Times for Sending an Authentication Request

7.2.10 (Optional) Setting the Timer Parameters

7.2.11 (Optional) Enabling the Quiet-Period Timer

7.2.12 (Optional) Enabling the Handshake-Period Timer

7.2.13 Checking the Configuration

7.2.1 Establishing the Configuration Task

Applicable EnvironmentYou can configure 802.1X to implement port-based network access control, that is, toauthenticate and control access devices on an interface of a LAN access control device.

Pre-configuration TasksThe 802.1X protocol provides only an implementation scheme for user identity authentication.To complete the user identity authentication, you need to select the RADIUS or localauthentication method. Before configuring 802.1X, complete the following tasks:

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 7 802.1X Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-7

Page 148: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

l Configuring the Internet Service Provider (ISP) authentication domain and AAA scheme,that is, RADIUS or local authentication scheme, for the 802.1X user

l Configuring the user name and password on the RADIUS server if RADIUS authenticationis selected.

l Adding the user name and password manually on the S-switch if local authentication isselected.

Data PreparationNone.

7.2.2 Enabling 802.1X Globally and on the Interface

ContextDo as follows on the S-switch.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the dot1x command to enable 802.1X globally.

By default, 802.1X is disabled globally and on an interface.

NOTETo add the interface to the dynamic VLAN delivered by the server, you also need to run the port hybriduntagged vlan command in the interface view. In this manner, frames from the VLAN can pass throughthe interface in untagged mode.

Step 3 Run the dot1x interface interface-type interface-number1 [ to interface-number2 ] commandto enable 802.1X on the specified interface. Or run the interface interface-type interface-number command to enter the interface view and then run the dot1x command to enable 802.1Xon the interface.

----End

7.2.3 (Optional) Setting the Port Access Control Mode

ContextDo as follows on the S-switch.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the dot1x port-control { auto | authorized-force | unauthorized-force } [ interfaceinterface-type interface-number1 [ to interface-number2 ] ] command to set the port accesscontrol mode.

By default, the port access control mode is auto.

----End

7 802.1X ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

7-8 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 149: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

7.2.4 (Optional) Setting the Port Access Control Method

ContextDo as follows on the S-switch.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the dot1x port-method { mac | port } [ interface { interface-type interface-number1[ to interface-number2 ] }] command to set the port access control method.

By default, the port access control method is mac.

----End

7.2.5 (Optional) Setting the Maximum Number of ConcurrentAccess Users

ContextDo as follows on the S-switch.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the dot1x max-user user-number [ interface { interface-type interface-number1 [ tointerface-number2 ] } ] command to set the maximum number of concurrent access users on theinterface.

By default, an interface allows up to eight concurrent access users.

By default, an interface allows up to 256 concurrent access users.

----End

7.2.6 (Optional) Enabling DHCP Trigger

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:dot1x dhcp-trigger

Dynamic Host Configuration Protocol (DHCP) trigger is enabled for user authentication.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 7 802.1X Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-9

Page 150: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

By default, DHCP trigger is disabled.

----End

7.2.7 (Optional) Setting the Authentication Method for the 802.1XUser

ContextDo as follows on the S-switch.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the dot1x authentication-method { chap | eap | pap} command to set the authenticationmethod for the 802.1X user.

By default, the authentication method of an 802.1X user is chap.

----End

7.2.8 (Optional) Configuring the Guest VLAN

ContextBefore configuring the guest VLAN, complete the following tasks:

l Enabling 802.1X

l Setting the maximum number of concurrent access users to 1 on the interface

l Setting the port access control mode to auto on the interface

l Creating a VLAN to be configured as the guest VLAN

After the preceding configurations, do as follows on the S-switch.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the dot1x guest-vlan vlan-id [ interface { interface-type interface-number1 [ to interface-number2 ] }] command to configure the guest VLAN on the interface. Or run the interfaceinterface-type interface-number command to enter the interface view and then run the dot1xguest-vlan vlan-id command to configure the guest VLAN on the interface.

By default, no guest VLAN is configured on an interface.

NOTE

The configured guest VLAN takes effect only when the maximum number of concurrent access users onthe interface is 1. If the maximum number of concurrent access users on interface is not 1, you can configurethe guest VLAN, whereas the configured guest VLAN does not take effect.

Assign different VLAN IDs to the voice VLAN, default VLAN, and 802.X guest VLAN on the interfaceto ensure normal services.

----End

7 802.1X ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

7-10 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 151: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

7.2.9 (Optional) Setting the Maximum Number of Times forSending an Authentication Request

ContextDo as follows on the S-switch.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the dot1x retry max-retry-value command to set the maximum number of times for sendingan authentication request to the access user.

By default, the S-switch can send an authentication request to an access user twice.

----End

7.2.10 (Optional) Setting the Timer Parameters

Context

Do as follows on the S-switch

.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the dot1x timer { client-timeout client-timeout-value | handshake-period handshake-period-value | quiet-period quiet-period-value | reauthenticate-period reauthenticate-period-value | server-timeout server-timeout-value | tx-period tx-period-value} command to set thetimer parameters.

By default, the settings of the timers are as follows:l The timeout period of the response from the client is 30s.

l The interval for sending handshake packets is 15s.

l The quiet period of a user failing the authentication is 60s.

l The authentication interval is 3600s.

l The timeout period of the response from the server is 30s.

l The interval for sending authentication requests is 30s.

----End

7.2.11 (Optional) Enabling the Quiet-Period Timer

ContextDo as follows on the S-switch.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 7 802.1X Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-11

Page 152: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the dot1x quiet-period command to enable the quiet-period timer.

By default, the quiet-period timer is disabled.

----End

7.2.12 (Optional) Enabling the Handshake-Period Timer

ContextDo as follows on the S-switch.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the dot1x handshake command to enable the handshake-period timer.

By default, the handshake-period timer is enabled.

----End

7.2.13 Checking the Configuration

Procedurel Using the display dot1x command, you can view information about the sessions and

statistics about 802.1X.

----End

ExampleRun the display dot1x command, you can view that the 802.1x is enabled globally and oninterface.

[Quidway] display dot1xGlobal 802.1x is EnabledCHAP authentication is EnabledDHCP-trigger is DisabledHandshake is EnabledQuiet function is disabledConfiguration:Handshake Period 15s Reauthen Period 3600s Client Timeout 30s Server Timeout 30s Quiet Period 60s

Total maximum 802.1x user resource number is 1024Total current used 802.1x resource number is 3

GigabitEthernet0/0/1 current state : UP 802.1x protocol is Enabled Port control type is Auto Authentication method is MAC-based Reauthentication is enabled Max online user is 256 Current online user is 1 Guest VLAN is disabled

7 802.1X ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

7-12 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 153: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Authentication Success: 0 Failure: 0 EAPOL Packets: TX : 0 RX : 0

7.3 Configuration ExamplesThis section describes a configuration example of 802.1X.

Context

7.3.1 Example for Configuring 802.1X

7.3.1 Example for Configuring 802.1X

Networking Requirementsl The user must be authenticated on an interface of the S-switch before accessing the Internet;

the MAC-based access control method is adopted.l RADIUS authentication is performed for the user. If the RADIUS server does not respond,

local authentication is performed for the user. The user name of the local 802.1X accessuser is localuser@test and the password is localpass.

l Configure the S-switch to remove the domain name from the user name before sending itto the RADIUS server.

Figure 7-4 Authentication through 802.1X and RADIUS

Configuration RoadmapThe configuration roadmap is as follows:

l Create a VLANIF interface, assign an IP address to it. And add all the interfaces to thecorresponding VLANs.

l Create a local access user and configure the user name and password for the user.

l Configure the domain for local authentication.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 7 802.1X Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-13

Page 154: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

l Configure the domain for RADIUS authentication.

l Create a RADIUS scheme.

l Enable 802.1X authentication on the specified interface, and set the number of max useron the interface to 1.

l Enable 802.1X authentication globally.

NOTE

Perform this step after setting all related parameters. Otherwise, authorized users may fail to accessthe Internet.

Data Preparation

To configure 802.1X, you need the following data.

l IP address of the VLANIF interface

l IP address of the RADIUS server

l Interface for authentication

l User name for authentication

l Domain for authentication

l Password for authentication

l Service type

Procedure

Step 1 Create a VLANIF interface and assign an IP address to it on the S-switch.<Quidway> system-view[Quidway] vlan 10[Quidway-vlan10] port gigabitethernet 0/0/1[Quidway-vlan10] quit[Quidway-vlan10] interface vlanif 10[Quidway-Vlanif10] ip address 10.10.1.1 255.255.255.0[Quidway-Vlanif10] quit[Quidway] vlan 100[Quidway-vlan100] port gigabitethernet 0/0/2[Quidway-vlan100] port gigabitethernet 0/0/3[Quidway-vlan100] interface vlanif 100[Quidway-Vlanif100] ip address 192.168.0.1 255.255.255.0[Quidway-Vlanif100] quit

Step 2 Create a local access user, and configure the user name and password for the user.<Quidway> system-view[Quidway] aaa[Quidway-aaa] local-user localuser@test password simple localpass[Quidway-aaa] local-user localuser@test service-type ppp

Step 3 Configure the domain for local authentication.[Quidway-aaa] authentication-scheme test[Quidway-aaa-authen-test] authentication-mode local[Quidway-aaa-authen-test] quit[Quidway-aaa] authorization-scheme test[Quidway-aaa-author-test] authorization-mode none[Quidway-aaa-author-test] quit[Quidway-aaa] domain test[Quidway-aaa-domain-test] authentication-scheme test[Quidway-aaa-domain-test] authorization-scheme test[Quidway-aaa-domain-test] quit

7 802.1X ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

7-14 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 155: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Step 4 Configure the domain for RADIUS authentication.<Quidway> system-view[Quidway] radius-server template account[Quidway-radius-account] radius-server authentication 192.168.0.10 1000[Quidway-radius-account] radius-server accounting 192.168.0.10 1001[Quidway-radius-account] radius-server shared-key 3300

Step 5 Create a RADIUS scheme.[Quidway-aaa] authentication-scheme server[Quidway-aaa-authen-server] authentication-mode radius[Quidway-aaa-authen-server] quit[Quidway-aaa] accounting-scheme account[Quidway-aaa-accounting-account] accounting-mode radius[Quidway-aaa-accounting-account] quit[Quidway-aaa] domain remote[Quidway-aaa-domain-remote] authentication-scheme server[Quidway-aaa-domain-remote] accounting-scheme account[Quidway-aaa-domain-remote] radius-server account

Step 6 Enable 802.1X authentication on GigabitEthernet 0/0/1.[Quidway] interface gigabitethernet 0/0/1[Quidway–GigabitEthernet0/0/1] dot1x max-user 1[Quidway–GigabitEthernet0/0/1] dot1x[Quidway–GigabitEthernet0/0/1] quit

Step 7 Enable 802.1X authentication globally.[Quidway] dot1x

Step 8 Check the configuration.[Quidway] display dot1x interface gigabitethernet 0/0/1GigabitEthernet0/0/1 current state : UP 802.1x protocol is Enabled The port is an authenticator Port control type is Auto Authentication method is MAC-based Reauthentication is disabled Max online user is 1 Current online user is 1 Guest VLAN is disabled Dynamic VLAN: 4000 Alias: VLAN 4000

Authentication Success: 2 Failure: 0 EAPOL Packets: TX : 45 RX : 26 Sent EAPOL Request/Identity Packets : 21 EAPOL Request/Challenge Packets : 2 Multicast Trigger Packets : 0 DHCP Trigger Packets : 0 EAPOL Success Packets : 21 EAPOL Failure Packets : 1 Received EAPOL Start Packets : 2 EAPOL LogOff Packets : 1 EAPOL Response/Identity Packets : 21 EAPOL Response/Challenge Packets: 2

Index MAC/VLAN UserOnlineTime UserName 12 0001-0001-0002/4000 2008-01-01 08:20:35 localuser@test Controlled User(s) amount to 1

----End

Configuration FilesConfiguration files of the S-switch

#sysname Quidway# vlan batch 10 100

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 7 802.1X Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

7-15

Page 156: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

# dot1x#radius-server template account radius-server shared-key 3300 radius-server authentication 192.168.0.10 1000 radius-server accounting 192.168.0.10 1001#interface Vlanif10 ip address 10.10.1.1 255.255.255.0#interface Vlanif100 ip address 192.168.0.1 255.255.255.0#interface GigabitEthernet0/0/1 port default vlan 10 dot1x dot1x max-user 1#interface GigabitEthernet0/0/2 port default vlan 100#interface GigabitEthernet0/0/3 port default vlan 100#aaa local-user localuser@test password simple localpass local-user localuser@test service-type ppp authentication-scheme default authentication-scheme test authentication-scheme server authentication-mode radius # authorization-scheme default authorization-scheme test authorization-mode none # accounting-scheme default accounting-scheme account accounting-mode radius# domain default domain test authentication-scheme test authorization-scheme test domain remote authentication-scheme server accounting-scheme account radius-server account ##return

7 802.1X ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

7-16 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 157: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

8 NAC Configuration

About This Chapter

This chapter describes the basics, configuration methods, and configuration examples of NAC.

8.1 Access Mode of NACThis section describes access modes of NAC.

8.2 Configuring the NAC Access Based on Web AuthenticationThis section how to configure the NAC access based on Web authentication.

8.3 Configuring the NAC Access Based on 802.1X AuthenticationThe procedure for configuring the NAC access based on 802.1X authentication is the same asthat for configuring 802.1X authentication. For more details, see 802.1X authentication.

8.4 Configuring the NAC Access Based on MAC Address AuthenticationFor the procedure of configuring the NAC access based on MAC address authentication , pleaserefer to MAC address authentication.

8.5 Configuring the NAC Access Based on MAC Bypass AuthenticationThis section describes how to configure the NAC access based on MAC bypass authentication.

8.6 Configuration ExamplesThis section provides an example for configuring the NAC access based on Web authentication.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 8 NAC Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8-1

Page 158: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

8.1 Access Mode of NACThis section describes access modes of NAC.

BasicsNetwork Admission Control (NAC) refers to a technology that is used to control the access andisolation of users on the network.

Access Based on Web AuthenticationNAC supports Web authentication.In Web authentication, if accessing an unaccessible networksegment, a user is to be redirected to the login page of Web authentication. The Webauthentication server communicates with the S-switch through the Portal protocol. The S-switch functions as the client. After extracting the user name and password entered by the useron the authentication page, the Web authentication server forwards them to the S-switch throughthe Portal protocol.

The typical networking of access based on Web authentication is shown in Figure 8-1.

Figure 8-1 Typical networking of Web authentication

NAC proceeds as follows:l The PC does not need to be installed with terminal software. The S-switch forcibly redirects

the user to the Web authentication page. After the user enters the user name and password,

8 NAC ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

8-2 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 159: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

the S-switch forwards them to the RADIUS server for authentication. In this case, the usercan access the isolation area only.

l The Access Control Server (ACS), functioning as the RADIUS server, replies that the userpasses the authentication.

l An HTTP link is established between the PC and ACS. The ACS checks whether the PCpasses the authentication. If the PC has passed the authentication, the user can access thecommon information area or the core information area according to the authority of theuser.

Access Based on 802.1x Authentication802.1x is an interface-based network access control protocol. That is, 802.1x authenticates andcontrol access devices on the interface connecting the LAN. User devices connected to theinterface can access the sources in the LAN only after passing the authentication.

802.1x authentication operates in two modes:l the mode based on interfaces:Once one device connected to an interface passes the 802.1x

authentication, other devices connected to the interface are allowed to access the S-switch;

l the mode based on MAC addresses:each device needs to be authenticated before accessingthe S-switch.

The typical networking of access based on 802.1x authentication is shown in Figure 8-2.

Figure 8-2 Typical networking of 802.1x authentication

NAC proceeds as follows:l Detecting that a user goes online, the S-switch sends an EAP authentication request. If the

user does not respond after several requests, the S-switch detects that the user is not installedwith terminal software, and then expands the authority of the user to access the isolation

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 8 NAC Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8-3

Page 160: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

area. The S-switch can also redirect the user to the URL to instruct the user to downloadterminal software.

l After a specified period of time, the S-switch implements 802.1X authentication on theuser if detecting that the user is installed with terminal software. After the user passes802.1X authentication, an HTTP link is established between the PC and the ACS, and theACS checks whether the PC passes the authentication. If yes, the ACL is updated, and thePC can access the working area.

l If the user is not installed with terminal software but configured with MAC bypassauthentication, the MAC address of the user is used as the user name and password to passthe MAC address authentication. If failing to pass MAC address authentication, the usergoes offline, and the S-switch does not implement MAC address authentication or detectionfor a period of time. After the timeout period, the S-switch implements detection again anddetermines that the user fails to pass the authentication, if the user is not configured withMAC address authentication.

l After the ACS detects that the PC is infected with virus, the S-switch delivers an ACL toallow the user to access the isolation area only, and redirects the user to the URL to updateits virus library or install a corresponding patch.

l After the user updates its virus library, the ACS detects that the user is secured, and the S-switch updates the ACL through the COA interface on the RADIUS server. In this case,the user is allowed to access the working area.

Access Based on MAC Address AuthenticationWhen the access based on MAC address authentication is adopted, an NAC user needs to passMAC address authentication. In addition, the S-switch implements real-time detection on onlineusers. When an NAC user accesses the S-switch, the S-switch creates a MAC authenticationuser according to the obtained source MAC address.

The NAC procedure of the access based on MAC address authentication is similar to that of theaccess based on 802.1X authentication. For more details, see the NAC procedure of the accessbased on 802.1X authentication.

Access Based on MAC Bypass AuthenticationWhen MAC bypass authentication is adopted, it indicates that MAC address authentication isautomatically performed if 802.1X authentication fails. The S-switch sends the MAC addressof the user to the RADIUS server as the user name and password for authentication and createsan ARP entry. When detecting that the user is infected with virus, the ACS instructs theauthentication server to deliver an ACL. In this case, the user is isolated, and malicious attacksare prevented.

Certain special terminals, such as a printer, cannot use or be installed with 802.1X terminalsoftware. In this case, MAC bypass authentication is adopted.

The NAC procedure of the access based on MAC bypass authentication is similar to that of theaccess based on 802.1X authentication. For more details, see the NAC procedure of the accessbased on 802.1X authentication.

8.2 Configuring the NAC Access Based on WebAuthentication

This section how to configure the NAC access based on Web authentication.

8 NAC ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

8-4 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 161: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

8.2.1 Establishing the Configuration Task

8.2.2 Configuring the Web Authentication Server

8.2.3 Configuring the Portal Protocol

8.2.4 Configuring Mandatory Web Authentication

8.2.5 Configuring a Non-authentication Rule

8.2.6 Checking the Configuration

8.2.1 Establishing the Configuration Task

Applicable EnvironmentYou need to configure the Web authentication server for Web authentication users.

Pre-configuration TasksNone.

Data PreparationTo configure Web authentication, you need the following data.

No. Data

1 Name, IP address, port number, shared key, and Uniform Resource Locator(URL) of the Web authentication server

2 Version of the Portal protocol, listening port number of the S-switch, and sourceinterface

3 Whether to transparently transmit the RADIUS authentication result to the Webauthentication server

4 (Optional) Whether to use mandatory Web authentication

8.2.2 Configuring the Web Authentication Server

PrerequisiteTo configure the Web authentication server, you need the following data:

l IP address and name of the Web authentication server

l Port number of the Web authentication server

l Shared key of the Web authentication server

l URL of the Web authentication server

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 8 NAC Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8-5

Page 162: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:web-auth-server server-name ip-address [ port port-number [ all ] | key key-string | url url-string ] *

The Web authentication server is configured.

NOTE

If all is specified during the configuration of the port number of the Web authentication server, theconfigured port number is used as the destination port number of all the packets sent from the S-switch tothe Web authentication server, and the destination port number of the packets received from the Webauthentication server is used as the source port number of the packets.

----End

8.2.3 Configuring the Portal Protocol

PrerequisiteThe configurations of the Portal protocol, which are valid for all Web authentication servers,include the following items:

l Version of the Portal protocol. The Portal protocol has two versions, that is, V1 and V2.The S-switch supports both versions.

l Listening port number. The listening port number refers to the port number of the interfacethrough which the S-switch monitors the messages of the Web authentication server. Bydefault, the S-switch monitors the messages of the Web authentication server through port2000.

l Whether to transparently transmit RADIUS messages. The transparent transmission ofRADIUS messages indicates that after receiving the authentication result from the RADIUSserver, the S-switch forwards the authentication result directly to the Web authenticationserver without any processing.

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

8 NAC ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

8-6 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 163: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Step 2 (Optional) Run:web-auth-server version v2 [ v1 ]

The version of the Portal protocol is configured.

Or run:

web-auth-server listening-port port

The listening port number of the S-switch is configured.

(Optional) Or run:

web-auth-server reply-message

The S-switch is configured to transparently transmit RADIUS messages.

By default, the S-switch transparently transmits RADIUS messages to the Web authenticationserver.

----End

8.2.4 Configuring Mandatory Web Authentication

Context

Do as follows on the S-switch.

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:web-auth-server server-name

The mandatory Web authentication server is configured.

The URL to which the Web authentication server redirects a user is in the format of "http://www.isp.com/index.htm."

----End

8.2.5 Configuring a Non-authentication Rule

Context

Do as follows on the S-switch.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 8 NAC Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8-7

Page 164: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:portal free-rule rule-number { destination ip { ip-address mask { mask-length | ip-mask } | any } | source { interface { interface-type interface-number | interface-name } | ip { ip-address mask { mask-length | ip-mask } | any } | any | vlan vlan-id } * } *

A non-authentication rule is configured for Portal users.

----End

8.2.6 Checking the Configuration

Procedurel Run the display this command in the VLANIF interface view to check whether Web

authentication is correctly configured on the S-switch.l Run the display this command in the AAA view to check information about the current

configuration of the S-switch.

----End

ExampleRun the display this command and you can detect that Web authentication is correctlyconfigured on the S-switch.

[S-switch-Vlanif2] display this#interface Vlanif2 ip address 10.1.1.1 255.255.255.0 web-auth-server webserver#

Run the display this command and you can detect that the current configuration of the S-switch is correct.

[Quidway-aaa] display this#aaa authentication-scheme nac authentication-mode none domain nac authentication-scheme nac local-user huawei@nac password simple 888 local-user huawei@nac service-type web#return

8 NAC ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

8-8 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 165: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

8.3 Configuring the NAC Access Based on 802.1XAuthentication

The procedure for configuring the NAC access based on 802.1X authentication is the same asthat for configuring 802.1X authentication. For more details, see 802.1X authentication.

8.4 Configuring the NAC Access Based on MAC AddressAuthentication

For the procedure of configuring the NAC access based on MAC address authentication , pleaserefer to MAC address authentication.

8.5 Configuring the NAC Access Based on MAC BypassAuthentication

This section describes how to configure the NAC access based on MAC bypass authentication.

8.5.1 Establishing the Configuration Task

8.5.2 Enabling 802.1X Globally

8.5.3 Enabling MAC Bypass Authentication on an Interface

8.5.4 (Optional) Setting the Port Access Control Mode

8.5.5 (Optional) Setting the Port Access Control Method

8.5.6 (Optional) Setting the Maximum Number of Concurrent Access Users

8.5.7 (Optional) Setting the Authentication Method for the 802.1X User

8.5.8 (Optional) Configuring the Guest VLAN

8.5.9 (Optional) Setting the Maximum Number of Times for Sending an Authentication Request

8.5.10 (Optional) Setting the Timer Parameters

8.5.11 (Optional) Enabling the Quiet-Period Timer

8.5.12 (Optional) Enabling the Handshake-Period Timer

8.5.13 Checking the Configuration

8.5.1 Establishing the Configuration Task

Applicable Environment

You can configure 802.1X to implement port-based network access control, that is, toauthenticate and control access devices on an interface of a LAN access control device.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 8 NAC Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8-9

Page 166: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Pre-configuration TasksThe 802.1X protocol provides only an implementation scheme for user identity authentication.To complete the user identity authentication, you need to select the RADIUS or localauthentication method. Before configuring 802.1X, complete the following tasks:

l Configuring the Internet Service Provider (ISP) authentication domain and AAA scheme,that is, RADIUS or local authentication scheme, for the 802.1X user

l Configuring the user name and password on the RADIUS server if RADIUS authenticationis selected.

l Adding the user name and password manually on the S-switch if local authentication isselected.

Data PreparationNone.

8.5.2 Enabling 802.1X Globally

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:dot1x

802.1X is enabled globally.

By default, 802.1X is disabled globally.

----End

8.5.3 Enabling MAC Bypass Authentication on an Interface

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:interface interface-type interface-number

8 NAC ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

8-10 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 167: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

The GE interface view is displayed.

Step 3 Run:dot1x mac-bypass

MAC bypass authentication is enabled on an interface.

After MAC bypass authentication is enabled on an interface, MAC address authentication isautomatically performed if 802.1X authentication fails for a long period of time. The MACaddress of the user is sent to the RADIUS server as the user name and password forauthentication.

By default, MAC bypass authentication is disabled on an interface.

----End

8.5.4 (Optional) Setting the Port Access Control Mode

Context

Do as follows on the S-switch.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the dot1x port-control { auto | authorized-force | unauthorized-force } [ interfaceinterface-type interface-number1 [ to interface-number2 ] ] command to set the port accesscontrol mode.

By default, the port access control mode is auto.

----End

8.5.5 (Optional) Setting the Port Access Control Method

Context

Do as follows on the S-switch.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the dot1x port-method { mac | port } [ interface { interface-type interface-number1[ to interface-number2 ] }] command to set the port access control method.

By default, the port access control method is mac.

----End

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 8 NAC Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8-11

Page 168: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

8.5.6 (Optional) Setting the Maximum Number of ConcurrentAccess Users

ContextDo as follows on the S-switch.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the dot1x max-user user-number [ interface { interface-type interface-number1 [ tointerface-number2 ] } ] command to set the maximum number of concurrent access users on theinterface.

By default, an interface allows up to eight concurrent access users.

By default, an interface allows up to 256 concurrent access users.

----End

8.5.7 (Optional) Setting the Authentication Method for the 802.1XUser

ContextDo as follows on the S-switch.

Procedure

Step 1 Run the system-view command to enter the system view.

Step 2 Run the dot1x authentication-method { chap | eap | pap} command to set the authenticationmethod for the 802.1X user.

By default, the authentication method of an 802.1X user is chap.

----End

8.5.8 (Optional) Configuring the Guest VLAN

Context

Before configuring the guest VLAN, complete the following tasks:

l Enabling 802.1X

l Setting the maximum number of concurrent access users to 1 on the interface

l Setting the port access control mode to auto on the interface

l Creating a VLAN to be configured as the guest VLAN

After the preceding configurations, do as follows on the S-switch.

8 NAC ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

8-12 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 169: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

ProcedureStep 1 Run the system-view command to enter the system view.

Step 2 Run the dot1x guest-vlan vlan-id [ interface { interface-type interface-number1 [ to interface-number2 ] }] command to configure the guest VLAN on the interface. Or run the interfaceinterface-type interface-number command to enter the interface view and then run the dot1xguest-vlan vlan-id command to configure the guest VLAN on the interface.

By default, no guest VLAN is configured on an interface.

NOTE

The configured guest VLAN takes effect only when the maximum number of concurrent access users onthe interface is 1. If the maximum number of concurrent access users on interface is not 1, you can configurethe guest VLAN, whereas the configured guest VLAN does not take effect.Assign different VLAN IDs to the voice VLAN, default VLAN, and 802.X guest VLAN on the interfaceto ensure normal services.

----End

8.5.9 (Optional) Setting the Maximum Number of Times forSending an Authentication Request

ContextDo as follows on the S-switch.

ProcedureStep 1 Run the system-view command to enter the system view.

Step 2 Run the dot1x retry max-retry-value command to set the maximum number of times for sendingan authentication request to the access user.

By default, the S-switch can send an authentication request to an access user twice.

----End

8.5.10 (Optional) Setting the Timer Parameters

ContextDo as follows on the S-switch

.

ProcedureStep 1 Run the system-view command to enter the system view.

Step 2 Run the dot1x timer { client-timeout client-timeout-value | handshake-period handshake-period-value | quiet-period quiet-period-value | reauthenticate-period reauthenticate-period-value | server-timeout server-timeout-value | tx-period tx-period-value} command to set thetimer parameters.

By default, the settings of the timers are as follows:

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 8 NAC Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8-13

Page 170: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

l The timeout period of the response from the client is 30s.

l The interval for sending handshake packets is 15s.

l The quiet period of a user failing the authentication is 60s.

l The authentication interval is 3600s.

l The timeout period of the response from the server is 30s.

l The interval for sending authentication requests is 30s.

----End

8.5.11 (Optional) Enabling the Quiet-Period Timer

ContextDo as follows on the S-switch.

ProcedureStep 1 Run the system-view command to enter the system view.

Step 2 Run the dot1x quiet-period command to enable the quiet-period timer.

By default, the quiet-period timer is disabled.

----End

8.5.12 (Optional) Enabling the Handshake-Period Timer

ContextDo as follows on the S-switch.

ProcedureStep 1 Run the system-view command to enter the system view.

Step 2 Run the dot1x handshake command to enable the handshake-period timer.

By default, the handshake-period timer is enabled.

----End

8.5.13 Checking the Configuration

Procedurel Run the display dot1x command to check information about 802.1X sessions and the

statistics about 802.1X.

----End

ExampleRun the display dot1x command, and you can detect that 802.1X authentication is enabledglobally and on GigabitEthernet 0/0/1.

8 NAC ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

8-14 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 171: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

[Quidway] display dot1xGlobal 802.1x is EnabledCHAP authentication is EnabledDHCP-trigger is DisabledHandshake is EnabledQuiet function is disabledConfiguration:Handshake Period 15s Reauthen Period 3600s Client Timeout 30s Server Timeout 30s Quiet Period 60s

Total maximum 802.1x user resource number is 1024Total current used 802.1x resource number is 3

GigabitEthernet0/0/1 current state : UP 802.1x protocol is Enabled Port control type is Auto Authentication method is MAC-based Reauthentication is enabled Max online user is 256 Current online user is 1 Guest VLAN is disabled

Authentication Success: 0 Failure: 0 EAPOL Packets: TX : 0 RX : 0

8.6 Configuration ExamplesThis section provides an example for configuring the NAC access based on Web authentication.

8.6.1 Example for Configuring the NAC Access Based on Web Authentication

8.6.1 Example for Configuring the NAC Access Based on WebAuthentication

Networking RequirementsAs shown in Figure 8-3, the user accesses the Web authentication server through the S-switchfor identity authentication. After the user enters the user name and password, the S-switchforwards them to the RADIUS server for authentication. The user can access the Internet onlyafter passing the authentication.

l The IP address of the Web authentication server is 10.1.1.1; the port number of the Webauthentication server is 50100; the listening port number is 2000; and the key isHuaweiTech.

l The user name and password of the Web authentication user are huawei and 888respectively; the IP address of the Web authentication user is 10.1.1.2.

l The access type of the Web authentication user is Web.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 8 NAC Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8-15

Page 172: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Figure 8-3 Example for Configuring Web Authentication

Configuration Roadmap

The configuration roadmap is as follows:

1. Configure the user name and password of the Web authentication user.2. Set the access type of the Web authentication user to Web.3. Configure the Web authentication server.4. Configure a non-authentication rule for the Web authentication user.5. Create and enter the VLANIF interface view.6. Bind the Web authentication server in the VLANIF interface view to redirect all HTTP

request packets to the Web authentication server.

Data Preparation

To complete the configuration, you need the following data:l User name and password of the Web authentication user

l Access type of the Web authentication user

l IP address, name, port number, and shared key of the Web authentication server

l URL of the Web authentication server being http://www.isp.com/index.htm

l VLAN ID and IP address of the VLANIF interface being 2 and 10.1.1.1 respectively

Configuration Procedure1. Configure the user name and password of the Web authentication user as huawei and

888 respectively.<S-switch> system-view[S-switch] aaa[S-switch-aaa] authentication-scheme nac[S-switch-aaa-authen-nac] authentication-mode none[S-switch-aaa-author-nac] quit[S-switch-aaa] domain nac[S-switch-aaa-domain-nac] authentication-scheme nac[S-switch-aaa-domain-nac] quit[S-switch-aaa] local-user huawei@nac password simple 888

2. Set the access type of the Web authentication user to Web.

8 NAC ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

8-16 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 173: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

[S-switch-aaa] local-user huawei@nac service-type web[S-switch-aaa] quit

3. Configure the IP address of the Web authentication server as 10.1.1.1, the port number ofthe Web authentication server as 50100, the listening port number as 2000, and the key asHuaweiTech.[S-switch] web-auth-server webserver 10.1.1.1 port 50100 key HuaweiTech url http://www.isp.com/index.htm.

4. Configure the IP address of the Web authentication server, 10.1.1.1, to implement the non-authentication rule.[S-switch] portal free-rule 1 destination ip 10.1.1.1 mask 255.255.255.0

5. Assign IP address 10.1.1.1 to the VLANIF interface.[S-switch] vlan 2[S-switch-vlan2] quit[S-switch] interface vlanif 2[S-switch-Vlanif2] ip address 10.1.1.1 255.255.255.0

6. Configure forced Web authentication in the VLANIF interface view.[S-switch-Vlanif2] web-auth-server webserver

7. Verify the configuration.Run the display this command in the VLANIF interface view to check whether the S-switch is correctly configured.[S-switch-Vlanif2] display this#interface Vlanif2 ip address 10.1.1.1 255.255.255.0 web-auth-server webserver# Run the display this command in the AAA view to check whether the S-switch is correctlyconfigured.[S-switch-aaa] display this#aaa authentication-scheme nac authentication-mode none domain nac authentication-scheme nac local-user huawei@nac password simple 888 local-user huawei@nac service-type web#return

8. Check whether the PC functioning as the client is correctly configured. On the PC, openthe IE browser and enter the address of the Web authentication server http://10.1.1.1/ orany other address. Then, the authentication page of the Web authentication server isdisplayed. After a user enters the correct user name and password, the user can access theInternet.

Configuration Files#sysname S-switch#vlan batch 2#web-auth-server webserver 10.1.1.1 port 50100 key HuaweiTechportal free-rule 1 destination ip 10.1.1.1 mask 255.255.255.0#interface Vlanif2 ip address 10.1.1.1 255.255.255.0 web-auth-server webserver

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 8 NAC Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

8-17

Page 174: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

#aaa authentication-scheme nac authentication-mode none domain nac authentication-scheme nac local-user huawei@nac password simple 888 local-user huawei@nac service-type web#return

8 NAC ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

8-18 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 175: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

9 PPPoE+ Configuration

About This Chapter

This chapter describes the basics, configuration procedures, and configuration examples ofPPPoE+.

9.1 PPPoE+ Overview

9.2 PPPoE+ Supported by the S-switch

9.3 Configuring PPPoE+This section describes how to configure PPPoE+.

9.4 Configuration ExamplesThis section provides a configuration example of PPPoE+.

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 9 PPPoE+ Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-1

Page 176: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

9.1 PPPoE+ Overview

PPPoE currently boasts of a good authentication and security mechanism. Certain bugs such asaccount embezzlement, however, still exist.

If the common PPPoE dial-up is adopted, a user can access the Internet only if the account passesthe same RADIUS authentication, regardless of the access interfaces. As the PPPoE+ feature isadded, in addition to the user name and password, authentication packets also carry informationabout access interfaces. If the interface number identified by the RADIUS server is not the sameas the configured one, the account fails to pass the authentication. In this manner, users areprevented from embezzling accounts (mostly owned by companies) to access the Internet.

9.2 PPPoE+ Supported by the S-switch

The S-switch inserts such information as the device type and interface number to received PPPoEpackets. Then, the PPPoE server can implement flexible control policies such as IP addressassignment and flexible accounting on the client according to the information.

9.3 Configuring PPPoE+This section describes how to configure PPPoE+.

9.3.1 Establishing the Configuration Task

9.3.2 Enabling PPPoE+ Globally

9.3.3 Configuring Actions for an Interface to Process the Original Fields in PPPoE Packets

9.3.4 Configuring the Format and Contents of the Fields to be Inserted into PPPoE Packets

9.3.5 Configuring an Interface to be Trusted

9.3.6 Checking the Configuration

9.3.1 Establishing the Configuration Task

Applicable EnvironmentTo prevent users from illegally accessing the Internet during the PPPoE authentication, you needto configure PPPoE+ on the S-switch. PPPoE+ inserts information about access interfaces toPPPoE packets to ensure the network security.

Pre-configuration TasksNone.

Data PreparationTo configure PPPoE+, you need the following data.

9 PPPoE+ ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

9-2 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 177: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

No. Data

1 Numbers of interfaces related to PPPoE authentication

2 Format and contents of the fields to be inserted into PPPoE packets

9.3.2 Enabling PPPoE+ Globally

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:pppoe intermediate-agent information enable

PPPoE+ is enabled globally.

By default, PPPoE+ is disabled globally.

----End

9.3.3 Configuring Actions for an Interface to Process the OriginalFields in PPPoE Packets

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:pppoe intermediate-agent information policy { drop | replace | keep }

Actions are configured for an interface to process the original fields in PPPoE packets.

Step 3 (Optional) Run:interface interface-type interface-number

The Ethernet interface view is displayed.

Then run:

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 9 PPPoE+ Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-3

Page 178: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

pppoe intermediate-agent information policy { drop | replace | keep }

Actions are configured for an interface to process the original fields in PPPoE packets.

----End

9.3.4 Configuring the Format and Contents of the Fields to beInserted into PPPoE Packets

ContextDo as follows on the S-switch.

Procedure

Step 1 Run:system-view

The system view is displayed.

Step 2 Run:pppoe intermediate-agent information format { circuit-id | remote-id } { common | extend | user-defined text }

The format and contents of the fields to be added to PPPoE packets are configured.

----End

9.3.5 Configuring an Interface to be Trusted

ContextDo as follows on the S-switch.

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:pppoe uplink-port trusted

An interface is configured to be trusted.

----End

9.3.6 Checking the Configuration

Run the following commands to check the previous configuration.

9 PPPoE+ ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

9-4 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)

Page 179: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Action Command

Check information about theglobally-configured circuit-idand remote-id parameters.

display pppoe intermediate-agent informationformat

Check the actions configured onthe device to process the originalfields in PPPoE packets.

display pppoe intermediate-agent information policy

9.4 Configuration ExamplesThis section provides a configuration example of PPPoE+.

9.4.1 Example for Configuring PPPoE+

9.4.1 Example for Configuring PPPoE+

Networking Requirements

As shown in Figure 9-1, the S-switch is connected to an upstream BAS and downstream PCs.The BAS functions as a PPPoE server. PPPoE+ is enabled on the S-switch to control and monitorusers' accessing the Internet through dial-up.

Figure 9-1 Networking diagram of PPPoE+ configurations

Quidway S5300 Series Ethernet SwitchesConfiguration Guide - Security 9 PPPoE+ Configuration

Issue 02 (2009-08-14) Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

9-5

Page 180: Quidway S5300 Configuration Guide - Security(V100R003_02).pdf

Configuration RoadmapThe configuration roadmap is as follows:

1. Enable PPPoE+ globally or on specified interfaces of the S-switch.

NOTE

If being enabled globally, PPPoE+ is enabled on all interfaces.

2. Configure actions for the S-switch to process PPPoE packets.3. Configure the format and contents of the fields to be inserted by the S-switch into PPPoE

packets.4. Configure the interfaces connecting the PPPoE server on the S-switch to be trusted.

Data PreparationNone.

Configuration Procedure1. Enable PPPoE+ on the S-switch.

<Quidway> system-view[Quidway] pppoe intermediate-agent information enable

2. Configure all interfaces to replace the original fields in PPPoE packets with the circuit-idfields configured on the local S-switches.[Quidway] pppoe intermediate-agent information policy replace

3. Configure the S-switch to add the circuit-id fields in the extended format to PPPoE packets.That is, the circuit-id fields are filled in the hexadecimal format.[Quidway] pppoe intermediate-agent information format circuit-id extend

4. # Configure GigabitEthernet 0/0/3 to be trusted.[Quidway] interface gigabitethernet 0/0/3[Quidway-GigabitEthernet0/0/3] pppoe uplink-port trusted[Quidway-GigabitEthernet0/0/3] quit

Configuration FilesConfiguration file of the S-switch

# sysname Quidway# pppoe intermediate-agent information enable pppoe intermediate-agent information format circuit-id extend#interface GigabitEthernet0/0/3 pppoe uplink-port trusted#return

9 PPPoE+ ConfigurationQuidway S5300 Series Ethernet Switches

Configuration Guide - Security

9-6 Huawei Proprietary and ConfidentialCopyright © Huawei Technologies Co., Ltd.

Issue 02 (2009-08-14)