You are on page 1of 598

Quidway S9300 Terabit Routing Switch V100R002C00

Configuration Guide - IP Routing

Issue Date

04 2010-01-08

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

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

Huawei Technologies Co., Ltd.


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

Website: Email:

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

Trademarks and Permissions


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

Notice
The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services and features described in this document may not be within the purchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information, and recommendations in this document are provided "AS IS" without warranties, guarantees or representations of any kind, either express or implied. The information in this document is subject to change without notice. Every effort has been made in the preparation of this document to ensure accuracy of the contents, but all statements, information, and recommendations in this document do not constitute the warranty of any kind, express or implied.

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

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Contents

Contents
About This Document.....................................................................................................................1 1 Static Route Configuration.......................................................................................................1-1
1.1 Introduction to Static Routes...........................................................................................................................1-2 1.2 Static Route Features Supported by the S9300...............................................................................................1-3 1.3 S9300 Interfaces That Support Static Routes..................................................................................................1-3 1.4 Configuring an IPv4 Static Route...................................................................................................................1-3 1.4.1 Establishing the Configuration Task......................................................................................................1-4 1.4.2 Configuring an IPv4 Static Route..........................................................................................................1-4 1.4.3 (Optional) Setting the Default Priority of an IPv4 Static Route............................................................1-5 1.4.4 (Optional) Configuring Static Route Selection Based on Relay Depth.................................................1-5 1.4.5 Checking the Configuration...................................................................................................................1-6 1.5 Configuring an IPv6 Static Route...................................................................................................................1-6 1.5.1 Establishing the Configuration Task......................................................................................................1-7 1.5.2 Configuring an IPv6 Static Route..........................................................................................................1-7 1.5.3 (Optional) Configuring the Default Preference of the IPv6 Static Route..............................................1-8 1.5.4 Checking the Configuration...................................................................................................................1-8 1.6 Configuring BFD for Static Routes.................................................................................................................1-8 1.6.1 Establishing the Configuration Task......................................................................................................1-9 1.6.2 Configuring a Static Route.....................................................................................................................1-9 1.6.3 Configuring a BFD Session..................................................................................................................1-10 1.6.4 Binding a Static Route to a BFD Session.............................................................................................1-10 1.6.5 Checking the Configuration.................................................................................................................1-11 1.7 Configuration Examples................................................................................................................................1-11 1.7.1 Example for Configuring IPv4 Static Routes.......................................................................................1-11 1.7.2 Example for Configuring IPv6 Static Routes.......................................................................................1-15 1.7.3 Example for Configuring BFD for IPv4 Static Routes........................................................................1-20

2 RIP Configuration......................................................................................................................2-1
2.1 Introduction to RIP..........................................................................................................................................2-3 2.2 RIP Features Supported by the S9300.............................................................................................................2-3 2.3 Configuring Basic RIP Functions...................................................................................................................2-3 2.3.1 Establishing the Configuration Task......................................................................................................2-4 2.3.2 Enabling RIP..........................................................................................................................................2-4 Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. i

Contents

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing 2.3.3 Enabling RIP on a Specified Network Segment....................................................................................2-5 2.3.4 (Optional) Specifying the RIP Version..................................................................................................2-6 2.3.5 Checking the Configuration...................................................................................................................2-6

2.4 Configuring RIP Route Attributes...................................................................................................................2-7 2.4.1 Establishing the Configuration Task......................................................................................................2-8 2.4.2 Setting the Additional Metric of an Interface.........................................................................................2-8 2.4.3 Setting the Preference of RIP.................................................................................................................2-9 2.4.4 Setting the Maximum Number of Equal-Cost Routes...........................................................................2-9 2.4.5 Checking the Configuration.................................................................................................................2-10 2.5 Controlling the Advertisement of RIP Routing Information........................................................................2-10 2.5.1 Establishing the Configuration Task....................................................................................................2-11 2.5.2 Advertising a Default Route.................................................................................................................2-11 2.5.3 Disabling an Interface from Sending RIP Update Packets...................................................................2-12 2.5.4 Configuring RIP to Import Routes.......................................................................................................2-13 2.5.5 Checking the Configuration.................................................................................................................2-14 2.6 Controlling Received RIP Routing Information...........................................................................................2-14 2.6.1 Establishing the Configuration Task....................................................................................................2-14 2.6.2 Disabling an Interface from Receiving RIP Update Packets...............................................................2-15 2.6.3 Configuring RIP to Deny Host Routes.................................................................................................2-16 2.6.4 Configuring RIP to Filter Received Routes.........................................................................................2-16 2.6.5 Checking the Configuration.................................................................................................................2-17 2.7 Configuring RIPv2 Features..........................................................................................................................2-17 2.7.1 Establishing the Configuration Task....................................................................................................2-18 2.7.2 Configuring Route Aggregation of RIPv2...........................................................................................2-18 2.7.3 Setting the Authentication Mode of RIPv2 Packets.............................................................................2-19 2.7.4 Checking the Configuration.................................................................................................................2-20 2.8 Adjusting and Optimizing the RIP Network.................................................................................................2-20 2.8.1 Establishing the Configuration Task....................................................................................................2-21 2.8.2 Configuring RIP Timers.......................................................................................................................2-21 2.8.3 Setting the Interval of Update Packets and Maximum Number of Packets Sent at a Time.................2-23 2.8.4 Configuring Split Horizon and Poison Reverse...................................................................................2-23 2.8.5 Configuring RIP to Check the Validity of Update Packets..................................................................2-24 2.8.6 Configuring a RIP Neighbor................................................................................................................2-25 2.8.7 Checking the Configuration.................................................................................................................2-25 2.9 Configuring the Network Management Function of RIP..............................................................................2-26 2.9.1 Establishing the Configuration Task....................................................................................................2-26 2.9.2 Binding a RIP Process to the MIB.......................................................................................................2-26 2.9.3 Checking the Configuration.................................................................................................................2-27 2.10 Maintaining RIP..........................................................................................................................................2-27 2.11 Configuration Examples..............................................................................................................................2-28 2.11.1 Example for Configuring the RIP Version.........................................................................................2-28 2.11.2 Example for Configuring RIP to Import Routes................................................................................2-32 ii Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Contents

3 RIPng Configuration.................................................................................................................3-1
3.1 RIPng Overview..............................................................................................................................................3-2 3.2 Features Supported by the S9300....................................................................................................................3-3 3.3 Configuring Basic RIPng Functions...............................................................................................................3-3 3.3.1 Establishing the Configuration Task......................................................................................................3-3 3.3.2 Enabling RIPng and Entering the RIPng View......................................................................................3-4 3.3.3 Enabling RIPng in the Interface View...................................................................................................3-4 3.3.4 Checking the Configuration...................................................................................................................3-5 3.4 Configuring RIPng Route Attributes...............................................................................................................3-6 3.4.1 Establishing the Configuration Task......................................................................................................3-6 3.4.2 Configuring RIPng Protocol Preference................................................................................................3-7 3.4.3 Configuring Additional Metrics of an Interface.....................................................................................3-7 3.4.4 Configuring the Maximum Number of Equal-Cost Routes...................................................................3-8 3.4.5 Checking the Configuration...................................................................................................................3-8 3.5 Controlling the Advertising of RIPng Routing Information...........................................................................3-8 3.5.1 Establishing the Configuration Task......................................................................................................3-9 3.5.2 Configuring RIPng Route Aggregation..................................................................................................3-9 3.5.3 Configuring RIPng to Advertise the Default Routes...........................................................................3-10 3.5.4 Configuring the Default Cost for External Routes Imported by RIPng...............................................3-11 3.5.5 Configuring RIPng to Import External Routes....................................................................................3-11 3.5.6 Checking the Configuration.................................................................................................................3-12 3.6 Controlling the Receiving of RIPng Routing Information............................................................................3-12 3.6.1 Establishing the Configuration Task....................................................................................................3-12 3.6.2 Configuring RIPng to Filter the Received Routes...............................................................................3-13 3.6.3 Checking the Configuration.................................................................................................................3-13 3.7 Optimizing a RIPng Network........................................................................................................................3-14 3.7.1 Establishing the Configuration Task....................................................................................................3-14 3.7.2 Configuring RIPng Timers...................................................................................................................3-14 3.7.3 Configuring Split Horizon and Poison Reverse...................................................................................3-15 3.7.4 Enabling Zero Field Check of the RIPng Packets................................................................................3-16 3.7.5 Checking the Configuration.................................................................................................................3-16 3.8 Maintaining RIPng........................................................................................................................................3-16 3.9 Configuration Examples................................................................................................................................3-17 3.9.1 Example for Configuring RIPng to Filter the Received Routes...........................................................3-17

4 OSPF Configuration..................................................................................................................4-1
4.1 Introduction to OSPF......................................................................................................................................4-3 4.2 OSPF Features Supported by the S9300.........................................................................................................4-6 4.3 Configuring Basic OSPF Functions................................................................................................................4-8 4.3.1 Establishing the Configuration Task......................................................................................................4-8 4.3.2 Starting an OSPF Process and Entering the OSPF View.......................................................................4-9 4.3.3 Configuring a Network Segment That Belongs to an Area.................................................................. -10 4 4.3.4 Checking the Configuration.................................................................................................................4-11 Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. iii

Contents

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4.4 Establishing and Maintaining OSPF Adjacencies.........................................................................................4-11 4.4.1 Establishing the Configuration Task....................................................................................................4-12 4.4.2 Setting the Interval for Sending Hello Packets on an Interface...........................................................4-13 4.4.3 Setting the Dead Interval of Neighbors................................................................................................4-13 4.4.4 Setting the Interval for Retransmitting LSAs.......................................................................................4-14 4.4.5 Restricting Retransmission of OSPF Packets.......................................................................................4-15 4.4.6 Suppressing OSPF Packets on an Interface..........................................................................................4-15 4.4.7 Checking the Configuration.................................................................................................................4-16 4.5 Configuring OSPF Area Attributes...............................................................................................................4-17 4.5.1 Establishing the Configuration Task....................................................................................................4-17 4.5.2 Configuring an OSPF Stub Area..........................................................................................................4-18 4.5.3 Configuring an NSSA Area..................................................................................................................4-18 4.5.4 Configuring an OSPF Virtual Link......................................................................................................4-19 4.5.5 Checking the Configuration.................................................................................................................4-20 4.6 Configuring OSPF Attributes on Networks of Different Types...................................................................4-21 4.6.1 Establishing the Configuration Task....................................................................................................4-21 4.6.2 Setting the Network Type of an OSPF Interface..................................................................................4-22 4.6.3 (Optional) Setting the DR Priority of an OSPF Interface....................................................................4-22 4.6.4 Specifying a Neighbor for an NBMA Network...................................................................................4-23 4.6.5 (Optional) Setting the Interval for Sending Polling Packets on the NBMA Network.........................4-23 4.6.6 Checking the Configuration.................................................................................................................4-24 4.7 Configuring OSPF Route Attributes.............................................................................................................4-25 4.7.1 Establishing the Configuration Task....................................................................................................4-25 4.7.2 Setting the Link Cost of an OSPF Interface.........................................................................................4-26 4.7.3 Setting the Preference of OSPF............................................................................................................4-27 4.7.4 Setting the Maximum Number of Equal-Cost Routes.........................................................................4-27 4.7.5 Checking the Configuration.................................................................................................................4-28 4.8 Configuring OSPF Route Aggregation.........................................................................................................4-28 4.8.1 Establishing the Configuration Task....................................................................................................4-29 4.8.2 Configuring Route Aggregation on the ABR.......................................................................................4-29 4.8.3 Configuring Route Aggregation on the ASBR....................................................................................4-30 4.8.4 Checking the Configuration.................................................................................................................4-30 4.9 Configuring Filtering of OSPF Routing Information....................................................................................4-31 4.9.1 Establishing the Configuration Task....................................................................................................4-31 4.9.2 Configuring the ABR to Filter Type 3 LSAs.......................................................................................4-32 4.9.3 Configuring OSPF to Filter Received Routes......................................................................................4-33 4.9.4 Configuring OSPF to Import External Routes.....................................................................................4-33 4.9.5 Checking the Configuration.................................................................................................................4-35 4.10 Adjusting and Optimizing the OSPF Network............................................................................................4-35 4.10.1 Establishing the Configuration Task..................................................................................................4-36 4.10.2 Setting the Delay for Transmitting LSAs on an Interface..................................................................4-37 4.10.3 Setting the Interval for Updating and Receiving LSAs......................................................................4-37 iv Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Contents

4.10.4 Setting the Interval of the SPF Calculation........................................................................................4-38 4.10.5 Configuring a Stub Router.................................................................................................................4-39 4.10.6 Enabling an Interface to Add the Actual MTU in DD Packets..........................................................4-40 4.10.7 Setting the Maximum Number of External LSAs in an LSDB..........................................................4-40 4.10.8 Configuring OSPF to Be Compatible with the Route Selection Rule of RFC 1583..........................4-41 4.10.9 Checking the Configuration...............................................................................................................4-41 4.11 Configuring OSPF GR................................................................................................................................4-42 4.11.1 Establishing the Configuration Task..................................................................................................4-43 4.11.2 Enabling the Opaque-LSA Capability of OSPF.................................................................................4-43 4.11.3 Enabling OSPF GR............................................................................................................................4-44 4.11.4 (Optional) Setting Session Parameters of GR on the Restarter..........................................................4-44 4.11.5 (Optional) Setting Session Parameters of GR on the Helper.............................................................4-45 4.11.6 (Optional) Configuring the S9300 Not to Work in Helper Mode......................................................4-46 4.11.7 Checking the Configuration...............................................................................................................4-46 4.12 Configuring BFD for OSPF........................................................................................................................4-47 4.12.1 Establishing the Configuration Task..................................................................................................4-47 4.12.2 Configuring Global BFD....................................................................................................................4-48 4.12.3 Configuring BFD for OSPF...............................................................................................................4-48 4.12.4 Disabling an Interface from Dynamically Creating BFD Sessions....................................................4-49 4.12.5 Configuring the BFD Feature for a Specified Interface.....................................................................4-49 4.12.6 Checking the Configuration...............................................................................................................4-50 4.13 Configuring the Authentication Function on an OSPF Network................................................................4-51 4.13.1 Establishing the Configuration Task..................................................................................................4-51 4.13.2 Configuring the Area Authentication Mode.......................................................................................4-51 4.13.3 Configuring the Interface Authentication Mode................................................................................4-52 4.13.4 Checking the Configuration...............................................................................................................4-53 4.14 Configuring Network Management Functions of OSPF.............................................................................4-54 4.14.1 Establishing the Configuration Task..................................................................................................4-54 4.14.2 Binding an OSPF Process to the MIB................................................................................................4-54 4.14.3 Configuring OSPF to Send Trap Messages........................................................................................4-55 4.14.4 Enabling OSPF to Record Logs.........................................................................................................4-55 4.14.5 Checking the Configuration...............................................................................................................4-56 4.15 Maintaining OSPF.......................................................................................................................................4-57 4.15.1 Restarting an OSPF Process...............................................................................................................4-57 4.15.2 Clearing OSPF Information...............................................................................................................4-57 4.15.3 Debugging OSPF................................................................................................................................4-58 4.16 Configuration Examples..............................................................................................................................4-58 4.16.1 Configuring Basic OSPF Functions...................................................................................................4-59 4.16.2 Example for Configuring an OSPF Stub Area...................................................................................4-65 4.16.3 Example for Configuring an NSSA Area...........................................................................................4-71 4.16.4 Example for Configuring DR Election of OSPF................................................................................4-75 4.16.5 Example for Configuring an OSPF virtual link.................................................................................4-81 Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. v

Contents

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing 4.16.6 Example for Configuring Load Balancing Among OSPF Routes.....................................................4-85 4.16.7 Example for Configuring OSPF GR..................................................................................................4-90 4.16.8 Example for Configuring BFD for OSPF..........................................................................................4-93

5 OSPFv3 Configuration..............................................................................................................5-1
5.1 OSPFv3........................................................................................................................................................... 5-3 5.2 OSPFv3 Features Supported by S9300...........................................................................................................5-3 5.3 Configuring Basic OSPFv3 Functions............................................................................................................5-4 5.3.1 Establishing the Configuration Task......................................................................................................5-4 5.3.2 Enabling OSPFv3...................................................................................................................................5-4 5.3.3 Enabling OSPFv3 on an Interface..........................................................................................................5-5 5.3.4 Entering the OSPFv3 Area View...........................................................................................................5-6 5.3.5 Checking the Configuration...................................................................................................................5-6 5.4 Establishing or Maintaining OSPFv3 Neighbor Relationship........................................................................ 5-7 5.4.1 Establishing the Configuration Task......................................................................................................5-7 5.4.2 Configuring the Interval for Sending Hello Packets..............................................................................5-8 5.4.3 Configuring Dead Time of Neighbor Relationship................................................................................5-8 5.4.4 Configuring the Interval for Retransmitting LSAs to Neighboring S9300s.......................................... 5-9 5.4.5 Configuring the Delay for Transmitting LSAs on the Interface..........................................................5-10 5.4.6 Checking the Configuration.................................................................................................................5-10 5.5 Configuring OSPFv3 Areas..........................................................................................................................5-10 5.5.1 Establishing the Configuration Task....................................................................................................5-11 5.5.2 Configuring OSPFv3 Stub Areas.........................................................................................................5-11 5.5.3 Configuring OSPFv3 Virtual Links.....................................................................................................5-12 5.5.4 Checking the Configuration.................................................................................................................5-12 5.6 Configuring OSPFv3 Route Attributes.........................................................................................................5-13 5.6.1 Establishing the Configuration Task....................................................................................................5-13 5.6.2 Setting the Cost of the OSPFv3 Interface............................................................................................5-14 5.6.3 Setting the Maximum Number of Equal-Cost Routes.........................................................................5-14 5.6.4 Checking the Configuration.................................................................................................................5-15 5.7 Controlling OSPFv3 Routing Information....................................................................................................5-15 5.7.1 Establishing the Configuration Task....................................................................................................5-15 5.7.2 Configuring OSPFv3 Route Aggregation............................................................................................5-16 5.7.3 Configuring OSPFv3 to Filter the Received Routes............................................................................5-17 5.7.4 Configuring OSPFv3 to Import External Routes.................................................................................5-17 5.7.5 Checking the Configuration.................................................................................................................5-18 5.8 Optimizing an OSPF Network......................................................................................................................5-19 5.8.1 Establishing the Configuration Task....................................................................................................5-19 5.8.2 Configuring the SPF Timer..................................................................................................................5-20 5.8.3 Suppressing an Interface from Sending and Receiving OSPFv3 Packets............................................5-20 5.8.4 Configuring DR Priority of an Interface..............................................................................................5-21 5.8.5 Configuring Stub Routers.....................................................................................................................5-22 5.8.6 Ignoring MTU Check on DD Packets..................................................................................................5-22 vi Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Contents

5.8.7 Checking the Configuration.................................................................................................................5-23 5.9 Configuring OSPFv3 GR..............................................................................................................................5-23 5.9.1 Establishing the Configuration Task....................................................................................................5-23 5.9.2 Enabling OSPFv3 GR..........................................................................................................................5-24 5.9.3 Enabling the Helper of OSPFv3 Helper...............................................................................................5-24 5.9.4 Check the Configuration......................................................................................................................5-25 5.10 Maintaining OSPFv3...................................................................................................................................5-25 5.10.1 Resetting OSPFv3..............................................................................................................................5-26 5.10.2 Debugging OSPFv3............................................................................................................................5-26 5.11 Configuration Examples..............................................................................................................................5-27 5.11.1 Example for Configuring OSPFv3 Areas...........................................................................................5-27 5.11.2 Example for Configuring DR Election Through OSPFv3.................................................................5-33 5.11.3 Example for Configuring the OSPFv3 Virtual Link..........................................................................5-38 5.11.4 Example for Configuring OSPFv3 GR..............................................................................................5-42

6 IS-IS Configuration...................................................................................................................6-1
6.1 Concepts of IS-IS............................................................................................................................................6-3 6.2 IS-IS Features Supported by the S9300..........................................................................................................6-4 6.3 Configuring Basic IS-IS Functions.................................................................................................................6-9 6.3.1 Establishing the Configuration Task......................................................................................................6-9 6.3.2 Starting an IS-IS Process......................................................................................................................6-10 6.3.3 Configuring a NET...............................................................................................................................6-10 6.3.4 (Optional) Setting the Level of the S9300...........................................................................................6-11 6.3.5 Enabling an IS-IS Process on an Interface...........................................................................................6-12 6.3.6 Checking the Configuration.................................................................................................................6-12 6.4 Establishing and Maintaining IS-IS Adjacencies..........................................................................................6-13 6.4.1 Establishing the Configuration Task....................................................................................................6-13 6.4.2 (Optional) Setting Timers of IS-IS Packets..........................................................................................6-14 6.4.3 Setting LSP Parameters........................................................................................................................6-16 6.4.4 (Optional) Disabling the Padding of Hello Packets on an Interface....................................................6-19 6.4.5 Checking the Configuration.................................................................................................................6-20 6.5 Configuring IS-IS Attributes on Networks of Different Types.....................................................................6-21 6.5.1 Establishing the Configuration Task....................................................................................................6-21 6.5.2 Setting the Network Type of an IS-IS Interface...................................................................................6-22 6.5.3 (Optional) Setting the DIS Priority of an Interface..............................................................................6-22 6.5.4 Setting the Neighbor Relationship Negotiation Mode on P2P Links...................................................6-23 6.5.5 Configuring an IS-IS Interface Not to Check IP Addresses of the Received Hello Packets...............6-24 6.5.6 Checking the Configuration.................................................................................................................6-24 6.6 Setting the Attributes of IS-IS Routes...........................................................................................................6-25 6.6.1 Establishing the Configuration Task....................................................................................................6-25 6.6.2 Setting the Cost of an IS-IS Interface...................................................................................................6-26 6.6.3 Setting the Preference of IS-IS.............................................................................................................6-28 6.6.4 Checking the Configuration.................................................................................................................6-30 Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. vii

Contents

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6.7 Controlling the Advertisement of IS-IS Routing Information......................................................................6-31 6.7.1 Establishing the Configuration Task....................................................................................................6-31 6.7.2 Configuring IS-IS Route Aggregation.................................................................................................6-32 6.7.3 Configuring IS-IS to Generate Default Routes....................................................................................6-32 6.7.4 Configuring IS-IS Route Leaking (Controlling Level-2 Routes Imported to Level-1 Areas).............6-33 6.7.5 Configuring IS-IS Route Leaking (Controlling Level-1 Routes Imported to Level-2 Areas).............6-33 6.7.6 Checking the Configuration.................................................................................................................6-34 6.8 Controlling the Received IS-IS Routing Information...................................................................................6-35 6.8.1 Establishing the Configuration Task....................................................................................................6-35 6.8.2 Configuring IS-IS to Filter the Received Routing Information...........................................................6-36 6.8.3 Configuring IS-IS to Import External Routes......................................................................................6-36 6.8.4 Checking the Configuration.................................................................................................................6-37 6.9 Adjusting and Optimizing the IS-IS Network...............................................................................................6-37 6.9.1 Establishing the Configuration Task....................................................................................................6-38 6.9.2 (Optional) Setting the Level of an IS-IS Interface...............................................................................6-38 6.9.3 Suppressing an IS-IS Interface.............................................................................................................6-39 6.9.4 Setting SPF Parameters........................................................................................................................6-40 6.9.5 Enabling LSP Fast Flooding................................................................................................................6-41 6.9.6 Configuring IS-IS Dynamic Host Name Mapping...............................................................................6-41 6.9.7 Configuring the LSP Overload Bit.......................................................................................................6-43 6.9.8 Enabling Output of the Adjacency Status............................................................................................6-43 6.9.9 Checking the Configuration.................................................................................................................6-44 6.10 Configuring IS-IS GR.................................................................................................................................6-44 6.10.1 Establishing the Configuration Task..................................................................................................6-45 6.10.2 Enabling IS-IS GR.............................................................................................................................6-45 6.10.3 Setting Parameters of an IS-IS GR Session.......................................................................................6-46 6.10.4 Checking the Configuration...............................................................................................................6-47 6.11 Configuring BFD for IS-IS.........................................................................................................................6-47 6.11.1 Establishing the Configuration Task..................................................................................................6-48 6.11.2 Configuring Single-Hop BFD............................................................................................................6-48 6.11.3 Enabling IS-IS Fast Detection............................................................................................................6-49 6.11.4 Enabling the BFD Feature Globally...................................................................................................6-50 6.11.5 Configuring Dynamic BFD of an IS-IS Process................................................................................6-50 6.11.6 Disabling Dynamic Creation of BFD Sessions..................................................................................6-51 6.11.7 Configuring the BFD Feature for a Specified Interface.....................................................................6-52 6.11.8 Checking the Configuration...............................................................................................................6-52 6.12 Configuring IS-IS IPv6...............................................................................................................................6-53 6.12.1 Establishing the Configuration Task..................................................................................................6-53 6.12.2 Enabling IPv6 on an IS-IS Process....................................................................................................6-54 6.12.3 Enabling IPv6 on an IS-IS Interface..................................................................................................6-54 6.12.4 Configuring the IPv6 Route Cost on an Interface..............................................................................6-55 6.12.5 Configuring the Attributes of IS-IS IPv6 Routes...............................................................................6-55 viii Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Contents

6.12.6 Checking the Configuration...............................................................................................................6-58 6.13 Configuring IS-IS Authentication...............................................................................................................6-59 6.13.1 Establishing the Configuration Task..................................................................................................6-59 6.13.2 Configuring Area Authentication and Routing Domain Authentication............................................6-59 6.13.3 Configuring the Interface Authentication...........................................................................................6-60 6.13.4 Checking the Configuration...............................................................................................................6-61 6.14 Maintaining IS-IS........................................................................................................................................6-61 6.14.1 Clearing Data of an IS-IS Process......................................................................................................6-61 6.14.2 Resetting a Specific IS-IS Neighbor..................................................................................................6-62 6.14.3 Debugging IS-IS.................................................................................................................................6-62 6.15 Configuration Examples..............................................................................................................................6-64 6.15.1 Example for Configuring Basic IS-IS Functions...............................................................................6-64 6.15.2 Example for Configuring IS-IS Route Aggregation..........................................................................6-71 6.15.3 Example for Configuring the DIS Election........................................................................................6-75 6.15.4 Example for Configuring IS-IS Load Balancing................................................................................6-80 6.15.5 Example for Configuring IS-IS GR...................................................................................................6-86 6.15.6 Example for Configuring BFD for IS-IS............................................................................................6-89 6.15.7 Example for Configuring Basic IS-IS IPv6 Functions.......................................................................6-96

7 BGP Configuration....................................................................................................................7-1
7.1 Introduction to BGP........................................................................................................................................7-3 7.2 BGP Features Supported by the S9300...........................................................................................................7-3 7.3 Configuring Basic BGP Functions..................................................................................................................7-8 7.3.1 Establishing the Configuration Task......................................................................................................7-8 7.3.2 Starting a BGP Process.......................................................................................................................... 7-9 7.3.3 Configuring a BGP Peer.......................................................................................................................7-10 7.3.4 (Optional) Configuring a Local Interface for a BGP Connection........................................................7-11 7.3.5 Checking the Configuration.................................................................................................................7-12 7.4 Configuring BGP Route Attributes...............................................................................................................7-12 7.4.1 Establishing the Configuration Task....................................................................................................7-13 7.4.2 Setting the Preference of BGP.............................................................................................................7-14 7.4.3 Setting the PrefVal for BGP Routes.....................................................................................................7-14 7.4.4 Setting the Default Local_Pref for the Local Device...........................................................................7-15 7.4.5 Setting the MED...................................................................................................................................7-15 7.4.6 Configuring the Next_Hop...................................................................................................................7-17 7.4.7 Setting the AS_Path.............................................................................................................................7-19 7.4.8 Checking the Configuration.................................................................................................................7-20 7.5 Configuring BGP Filters...............................................................................................................................7-21 7.5.1 Establishing the Configuration Task....................................................................................................7-21 7.5.2 Configuring a Policy for Advertising BGP Routes..............................................................................7-22 7.5.3 Configuring a Policy for Receiving BGP Routes.................................................................................7-24 7.5.4 Configuring BGP Soft Resetting..........................................................................................................7-26 7.5.5 Checking the Configuration.................................................................................................................7-27 Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. ix

Contents

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7.6 Controlling Advertisement of BGP Routes...................................................................................................7-28 7.6.1 Establishing the Configuration Task....................................................................................................7-28 7.6.2 Configuring BGP to Advertise Local Routes.......................................................................................7-29 7.6.3 Configuring BGP Route Aggregation..................................................................................................7-29 7.6.4 Configuring BGP to Advertise Default Routes to the Peers................................................................7-30 7.6.5 Configuring Split Horizon Between EBGP Peers................................................................................7-31 7.6.6 Checking the Configuration.................................................................................................................7-31 7.7 Controlling Routes Imported by BGP...........................................................................................................7-32 7.7.1 Establishing the Configuration Task....................................................................................................7-32 7.7.2 Configuring BGP to Import Default Routes........................................................................................7-32 7.7.3 Configuring BGP to Import Protocol Routes.......................................................................................7-33 7.7.4 Checking the Configuration.................................................................................................................7-33 7.8 Configuring BGP Route Dampening............................................................................................................7-34 7.8.1 Establishing the Configuration Task....................................................................................................7-34 7.8.2 Configuring BGP Route Dampening...................................................................................................7-35 7.8.3 Checking the Configuration.................................................................................................................7-35 7.9 Setting Parameters of a BGP Connection.....................................................................................................7-36 7.9.1 Establishing the Configuration Task....................................................................................................7-36 7.9.2 Configuring BGP Timers.....................................................................................................................7-37 7.9.3 Setting the Interval for Sending Update Packets..................................................................................7-38 7.9.4 Enabling Fast Resetting for EBGP Connections..................................................................................7-38 7.9.5 Checking the Configuration.................................................................................................................7-39 7.10 Configuring BFD for BGP..........................................................................................................................7-39 7.10.1 Establishing the Configuration Task..................................................................................................7-39 7.10.2 Configuring BFD for BGP on a Public Network...............................................................................7-40 7.10.3 Configuring BFD for BGP on a Private Network..............................................................................7-41 7.10.4 Preventing a Peer from Inheriting BFD of Its Peer Group.................................................................7-41 7.10.5 Checking the Configuration...............................................................................................................7-42 7.11 Configuring BGP Load Balancing..............................................................................................................7-42 7.11.1 Establishing the Configuration Task..................................................................................................7-43 7.11.2 Setting the Number of Routes for Load Balancing............................................................................7-43 7.11.3 Checking the Configuration...............................................................................................................7-44 7.12 Configuring a BGP Peer Group..................................................................................................................7-44 7.12.1 Establishing the Configuration Task..................................................................................................7-44 7.12.2 Creating an IBGP Peer Group............................................................................................................7-45 7.12.3 Creating a Pure EBGP Peer Group....................................................................................................7-45 7.12.4 Creating a Mixed EBGP Peer Group.................................................................................................7-46 7.12.5 Checking the Configuration...............................................................................................................7-47 7.13 Configuring a BGP RR...............................................................................................................................7-47 7.13.1 Establishing the Configuration Task..................................................................................................7-47 7.13.2 Configuring an RR and Specifying the Clients..................................................................................7-48 7.13.3 (Optional) Disabling Route Reflection Between Clients...................................................................7-48 x Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Contents

7.13.4 (Optional) Setting the Cluster ID of an RR........................................................................................7-49 7.13.5 Checking the Configuration...............................................................................................................7-49 7.14 Configuring a BGP Confederation..............................................................................................................7-50 7.14.1 Establishing the Configuration Task..................................................................................................7-50 7.14.2 Configuring a BGP Confederation.....................................................................................................7-50 7.14.3 Checking the Configuration...............................................................................................................7-51 7.15 Configuring BGP Accounting.....................................................................................................................7-52 7.15.1 Establishing the Configuration Task..................................................................................................7-52 7.15.2 Configuring a Route-Policy to Set the Traffic Index.........................................................................7-52 7.15.3 Applying a Route-Policy Configured with the Traffic Index.............................................................7-53 7.15.4 Applying BGP Accounting on an Interface.......................................................................................7-54 7.15.5 Checking the Configuration...............................................................................................................7-54 7.16 Configuring BGP GR..................................................................................................................................7-54 7.16.1 Establishing the Configuration Task..................................................................................................7-55 7.16.2 Enabling BGP GR..............................................................................................................................7-55 7.16.3 Configuring Parameters for a BGP GR Session.................................................................................7-56 7.16.4 Checking the Configuration...............................................................................................................7-56 7.17 Configuring BGP Security..........................................................................................................................7-57 7.17.1 Establishing the Configuration Task..................................................................................................7-57 7.17.2 Configuring the MD5 Authentication................................................................................................7-58 7.17.3 Configuring the BGP GTSM Function..............................................................................................7-58 7.17.4 Checking the Configuration...............................................................................................................7-59 7.18 Maintaining BGP.........................................................................................................................................7-59 7.18.1 Resetting BGP Connections...............................................................................................................7-60 7.18.2 Clearing BGP Statistics......................................................................................................................7-60 7.18.3 Debugging BGP.................................................................................................................................7-61 7.19 Configuration Examples..............................................................................................................................7-61 7.19.1 Example for Configuring Basic BGP Functions................................................................................7-62 7.19.2 Example for Configuring BGP to Interact With an IGP....................................................................7-68 7.19.3 Example for Configuring BFD for BGP............................................................................................7-72 7.19.4 Example for Configuring BGP Load Balancing and Setting the MED.............................................7-78 7.19.5 Example for Configuring a BGP RR..................................................................................................7-82 7.19.6 Example for Configuring a BGP Confederation................................................................................7-88

8 BGP4+ Configuration................................................................................................................8-1
8.1 BGP4+ Overview............................................................................................................................................8-3 8.2 BGP4+ Features Supported by the S9300.......................................................................................................8-3 8.3 Configuring Basic BGP4+ Functions..............................................................................................................8-3 8.3.1 Establishing the Configuration Task......................................................................................................8-4 8.3.2 Starting a BGP Process.......................................................................................................................... 8-4 8.3.3 Configuring an IPv6 Peer.......................................................................................................................8-5 8.3.4 (Optional) Configuring the Local Interfaces Used for BGP4+ Connections.........................................8-7 8.3.5 Checking the Configuration...................................................................................................................8-8 Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. xi

Contents

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8.4 (Optional) Configuring BGP4+ Route Attributes...........................................................................................8-8 8.4.1 Establishing the Configuration Task......................................................................................................8-8 8.4.2 Configuring the BGP4+ Preference.......................................................................................................8-9 8.4.3 Configuring BGP4+ Preferred Value for Routing Information...........................................................8-10 8.4.4 Configuring the Default Local_Pref Attribute of the Local S9300......................................................8-10 8.4.5 Configuring the MED Attribute...........................................................................................................8-11 8.4.6 Configuring the Next_Hop Attribute...................................................................................................8-12 8.4.7 Configuring the AS-Path Attribute......................................................................................................8-12 8.4.8 Configuring the BGP4+ Community attribute.....................................................................................8-14 8.4.9 Checking the Configuration.................................................................................................................8-15 8.5 (Optional) Controlling the Advertising and Receiving of BGP4+ Routing Information..............................8-16 8.5.1 Establishing the Configuration Task....................................................................................................8-16 8.5.2 Configuring BGP4+ to Advertise Local IPv6 Routes..........................................................................8-17 8.5.3 Configuring BGP4+ to Import and Filter External Routes..................................................................8-17 8.5.4 Configuring S9300s to Advertise Default Routes to Peers..................................................................8-18 8.5.5 Configuring the Policy for Advertising BGP4+ Routing Information.................................................8-19 8.5.6 Configuring the Policy for Receiving BGP4+ Routing Information...................................................8-20 8.5.7 Configuring BGP4+ Soft Resetting......................................................................................................8-21 8.5.8 Checking the Configuration.................................................................................................................8-22 8.6 (Optional) Setting Parameters of a Connection Between BGP4+ Peers.......................................................8-22 8.6.1 Establishing the Configuration Task....................................................................................................8-23 8.6.2 Configuring BGP4+ Timers.................................................................................................................8-23 8.6.3 Configuring the Interval for Sending Update Packets..........................................................................8-24 8.6.4 Checking the Configuration.................................................................................................................8-25 8.7 (Optional) Configuring BGP4+ Route Dampening......................................................................................8-25 8.7.1 Establishing the Configuration Task....................................................................................................8-25 8.7.2 Configuring BGP4+ Route Dampening...............................................................................................8-26 8.7.3 Checking the Configuration.................................................................................................................8-26 8.8 (Optional) Configuring BGP4+ Load Balancing..........................................................................................8-26 8.8.1 Establishing the Configuration Task....................................................................................................8-27 8.8.2 Setting the Number of Routes for BGP4+ Load Balancing.................................................................8-27 8.8.3 Checking the Configuration.................................................................................................................8-28 8.9 (Optional) Configuring a BGP4+ Peer Group...............................................................................................8-28 8.9.1 Establishing the Configuration Task....................................................................................................8-28 8.9.2 Creating an IBGP Peer Group..............................................................................................................8-29 8.9.3 Creating a Pure EBGP Peer Group......................................................................................................8-29 8.9.4 Creating a Mixed EBGP Peer Group...................................................................................................8-30 8.9.5 Checking the Configuration.................................................................................................................8-31 8.10 (Optional) Configuring a BGP4+ Route Reflector.....................................................................................8-31 8.10.1 Establishing the Configuration Task..................................................................................................8-32 8.10.2 Configuring a Route Reflector and Specifying Clients......................................................................8-32 8.10.3 (Optional) Disabling a Route Reflection Between Clients................................................................8-33 xii Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Contents

8.10.4 (Optional) Configuring the Cluster ID for a Route Reflector............................................................8-33 8.10.5 Checking the Configuration...............................................................................................................8-34 8.11 (Optional) Configuring a BGP4+ Confederation........................................................................................8-34 8.11.1 Establishing the Configuration Task..................................................................................................8-34 8.11.2 Configuring a BGP Confederation.....................................................................................................8-35 8.11.3 Checking the Configuration...............................................................................................................8-36 8.12 (Optional) Configuring BGP4+ 6PE...........................................................................................................8-36 8.12.1 Establishing the Configuration Task..................................................................................................8-36 8.12.2 Configuring a 6PE Peer......................................................................................................................8-37 8.12.3 Checking the Configuration...............................................................................................................8-37 8.13 Maintaining BGP4+....................................................................................................................................8-38 8.13.1 Debugging BGP4+.............................................................................................................................8-38 8.13.2 Resetting BGP4+ Connections...........................................................................................................8-39 8.13.3 Clearing BGP4+ Statistics..................................................................................................................8-39 8.14 Configuration Examples..............................................................................................................................8-40 8.14.1 Example for Configuring Basic BGP4+ Functions............................................................................8-40 8.14.2 Example for Configuring BGP4+ Route Reflectors..........................................................................8-46 8.14.3 Example for Configuring the BGP 6PE.............................................................................................8-51

9 MBGP Configuration................................................................................................................9-1
9.1 Introduction to MBGP.....................................................................................................................................9-2 9.2 MBGP Features Supported by the S9300.......................................................................................................9-2 9.3 Configuring Basic BGP Functions..................................................................................................................9-2 9.3.1 Establishing the Configuration Task......................................................................................................9-2 9.3.2 Configuring a BGP Peer.........................................................................................................................9-3 9.3.3 Configuring a BGP Peer.........................................................................................................................9-4 9.3.4 (Optional) Configuring the MBGP RR..................................................................................................9-5 9.3.5 Configuring MBGP to Import Local Routes..........................................................................................9-6 9.3.6 Checking the Configuration...................................................................................................................9-6 9.4 Configuring a Policy for Advertising MBGP Routes.....................................................................................9-7 9.4.1 Establishing the Configuration Task......................................................................................................9-7 9.4.2 Configuring the Next Hop in the Route as the Local Address...............................................................9-8 9.4.3 Configuring Local Route Aggregation of MBGP..................................................................................9-9 9.4.4 Configuring the Local Peer to Advertise the Default Route................................................................9-10 9.4.5 Configuring the Local Peer to Advertise the Community Attributes and Extended Community Attributes .......................................................................................................................................................................9-10 9.4.6 Configuring the Update Message Not to Contain the Private AS Number..........................................9-11 9.4.7 Checking the Configuration.................................................................................................................9-12 9.5 Configuring the Routing Policy Between MBGP Peers...............................................................................9-12 9.5.1 Establishing the Configuration Task....................................................................................................9-13 9.5.2 Configuring the Routing Policy in the Global MBGP View...............................................................9-14 9.5.3 Configuring the Routing Policy Based on Route-Policy.....................................................................9-15 9.5.4 Configuring the Routing Policy Based on IP ACL..............................................................................9-15 Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. xiii

Contents

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing 9.5.5 Configuring the Routing Policy Based on the AS-Path List................................................................9-16 9.5.6 Configuring a Routing Policy Based on the IP Prefix List..................................................................9-17 9.5.7 Setting the Maximum Number of Routes Received from an MBGP Peer...........................................9-18 9.5.8 Configuring BGP Route Dampening................................................................................................... 9-19 9.5.9 Checking the Configuration.................................................................................................................9-19

9.6 Configuring MBGP Route Attributes........................................................................................................... 9-20 9.6.1 Establishing the Configuration Task....................................................................................................9-20 9.6.2 Setting the Preferred Value for the Route Received from an MBGP Peer.......................................... 9-21 9.6.3 Setting the Preference of an MBGP Route...........................................................................................9-22 9.6.4 Setting Local_Pref of an MBGP Route................................................................................................9-23 9.6.5 Configuring the MED of an MBGP Route...........................................................................................9-23 9.6.6 Checking the Configuration.................................................................................................................9-24 9.7 Maintaining MBGP.......................................................................................................................................9-25 9.7.1 Resetting MBGP Connections............................................................................................................. 9-25 9.7.2 Clearing MBGP Statistics.................................................................................................................... 9-25 9.7.3 Debugging MBGP................................................................................................................................9-26 9.8 Configuration Examples................................................................................................................................9-26 9.8.1 Example for Configuring Basic MSDP Functions...............................................................................9-26

10 Routing Policy Configuration..............................................................................................10-1


10.1 Introduction to the Routing Policy..............................................................................................................10-3 10.2 Routing Policy Features Supported by the S9300.......................................................................................10-4 10.3 Configuring an IP Prefix List......................................................................................................................10-5 10.3.1 Establishing the Configuration Task..................................................................................................10-5 10.3.2 Configuring an IPv4 Prefix List.........................................................................................................10-6 10.3.3 Configuring an IPv6 Prefix List.........................................................................................................10-7 10.3.4 Checking the Configuration...............................................................................................................10-7 10.4 Configuring a Route-Policy........................................................................................................................ 10-8 10.4.1 Establishing the Configuration Task..................................................................................................10-8 10.4.2 Creating a Route-Policy.....................................................................................................................10-9 10.4.3 (Optional) Setting an if-match Clause................................................................................................10-9 10.4.4 (Optional) Setting an apply Clause..................................................................................................10-11 10.4.5 Checking the Configuration.............................................................................................................10-12 10.5 Applying Filters to the Received Routes...................................................................................................10-12 10.5.1 Establishing the Configuration Task................................................................................................10-13 10.5.2 Filtering the Routes Received by RIP..............................................................................................10-14 10.5.3 Filtering the Routes Received by OSPF...........................................................................................10-14 10.5.4 Filtering the Routes Received by IS-IS............................................................................................10-14 10.5.5 Filtering the Routes Received by BGP............................................................................................10-15 10.5.6 Checking the Configuration.............................................................................................................10-16 10.6 Applying Filters to the Advertised Routes................................................................................................10-16 10.6.1 Establishing the Configuration Task................................................................................................10-16 10.6.2 Filtering the Routes Advertised by RIP...........................................................................................10-17 xiv Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Contents

10.6.3 Filtering the Routes Advertised by OSPF........................................................................................10-18 10.6.4 Filtering the Routes Advertised by IS-IS.........................................................................................10-18 10.6.5 Filtering the Routes Advertised by BGP..........................................................................................10-19 10.6.6 Checking the Configuration.............................................................................................................10-20 10.7 Applying Filters to the Imported Routes...................................................................................................10-20 10.7.1 Establishing the Configuration Task................................................................................................10-20 10.7.2 Applying a Route-Policy to the Routes Imported by RIP................................................................10-21 10.7.3 Applying a Route-Policy to the Routes Imported by OSPF.............................................................10-22 10.7.4 Applying a Route-Policy to the External Routes Imported by IS-IS...............................................10-22 10.7.5 Applying a Route-Policy to the Routes Imported by BGP..............................................................10-23 10.7.6 Checking the Configuration.............................................................................................................10-23 10.8 Controlling the Valid Time of a Routing Policy.......................................................................................10-23 10.8.1 Establishing the Configuration Task................................................................................................10-24 10.8.2 Setting the Delay for Applying the Routing Policy.........................................................................10-24 10.8.3 Checking the Configuration.............................................................................................................10-25 10.9 Configuring IP FRR on a Public Network................................................................................................10-25 10.9.1 Establishing the Configuration Task................................................................................................10-26 10.9.2 Configuring a Route-Policy.............................................................................................................10-26 10.9.3 Enabling IP FRR on a Public Network............................................................................................10-27 10.9.4 Checking the Configuration.............................................................................................................10-27 10.10 Configuring IP FRR on a Private Network.............................................................................................10-28 10.10.1 Establishing the Configuration Task..............................................................................................10-28 10.10.2 Configuring a Route-Policy...........................................................................................................10-28 10.10.3 Enabling IP FRR on a Private Network.........................................................................................10-29 10.10.4 Checking the Configuration...........................................................................................................10-29 10.11 Maintaining the Routing Policy..............................................................................................................10-30 10.12 Configuration Examples..........................................................................................................................10-30 10.12.1 Example for Filtering the Received and Advertised Routes..........................................................10-31 10.12.2 Example for Applying a Routing Policy to the Imported Routes..................................................10-36 10.12.3 Example for Configuring IP FRR on a Public Network................................................................10-41 10.12.4 Example for Configuring IP FRR on a Private Network...............................................................10-45

Issue 04 (2010-01-08)

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

xv

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Figures

Figures
Figure 1-1 Networking diagram for configuring static routes............................................................................1-12 Figure 1-2 Networking diagram for configuring IPv6 static routes...................................................................1-16 Figure 1-3 Networking diagram for configuring BFD for static routes.............................................................1-20 Figure 2-1 Networking diagram for configuring the RIP version......................................................................2-28 Figure 2-2 Network diagram of configuring RIP to import external route........................................................2-32 Figure 3-1 Networking diagram for configuring RIPng to filter the received routes........................................3-18 Figure 4-1 OSPF areas.........................................................................................................................................4-4 Figure 4-2 OSPF device types..............................................................................................................................4-5 Figure 4-3 Change of the state machine of a neighbor.........................................................................................4-7 Figure 4-4 Networking diagram for configuring the basic OSPF functions......................................................4-59 Figure 4-5 Networking diagram for configuring a stub area..............................................................................4-66 Figure 4-6 Networking diagram for configuring an NSSA area........................................................................4-71 Figure 4-7 Networking diagram for configuring DR election of an OSPF process...........................................4-75 Figure 4-8 Networking for configuring an OSPF virtual link............................................................................4-81 Figure 4-9 Networking diagram for configuring load balancing among OSPF routes......................................4-85 Figure 4-10 Networking diagram for configuring OSPF GR.............................................................................4-91 Figure 4-11 Networking diagram for configuring BFD for OSPF.....................................................................4-94 Figure 5-1 Networking diagram for configuring an OSPFv3 area.....................................................................5-28 Figure 5-2 Networking diagram for configuring DR election through OSPFv3................................................5-33 Figure 5-3 Networking diagram for configuring OSPFv3 virtual links.............................................................5-38 Figure 5-4 Networking diagram for configuring OSPFv3 GR...........................................................................5-43 Figure 6-1 IS-IS topology I..................................................................................................................................6-3 Figure 6-2 IS-IS typology II.................................................................................................................................6-4 Figure 6-3 Networking diagram for configuring basic functions of IS-IS.........................................................6-65 Figure 6-4 Networking diagram for configuring IS-IS route aggregation.........................................................6-71 Figure 6-5 Networking diagram for configuring the DIS election.....................................................................6-75 Figure 6-6 Networking diagram for configuring IS-IS load balancing..............................................................6-81 Figure 6-7 Networking diagram of IS-IS GR configuration..............................................................................6-86 Figure 6-8 Networking diagram for configuring BFD for IS-IS........................................................................6-90 Figure 6-9 Networking diagram for configuring basic IS-IS IPv6 functions.....................................................6-96 Figure 7-1 Networking diagram for configuring basic BGP functions..............................................................7-62 Figure 7-2 Networking diagram for configuring BGP to interact with an IGP..................................................7-68 Figure 7-3 Networking diagram for configuring BFD for BGP........................................................................7-73 Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. xvii

Figures

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing Figure 7-4 Networking diagram of BGP route selection....................................................................................7-78 Figure 7-5 Networking diagram for configuring a BGP RR..............................................................................7-83

Figure 7-6 Networking diagram for configuring a BGP confederation.............................................................7-89 Figure 8-1 Networking diagram for configuring basic BGP4+ functions..........................................................8-40 Figure 8-2 Networking diagram for configuring the BGP4+ route reflectors...................................................8-46 Figure 8-3 Networking diagram for configuring the BGP 6PE.........................................................................8-52 Figure 9-1 Networking diagram of MBGP configuration..................................................................................9-27 Figure 10-1 Networking diagram for filtering the received and advertised routes..........................................10-31 Figure 10-2 Networking diagram for applying a routing policy to the imported routes..................................10-36 Figure 10-3 Networking diagram for configuring IP FRR on a public network..............................................10-41 Figure 10-4 Networking diagram for configuring IP FRR on a private network.............................................10-46

xviii

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Tables

Tables
Table 6-1 Mapping between interface costs and the bandwidth.........................................................................6-28 Table 10-1 Difference between the routing policy and PBR..............................................................................10-3

Issue 04 (2010-01-08)

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

xix

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

About This Document

About This Document


Purpose
This document describes the IP routing features of the S9300, including static routes, routing protocols (RIP, RIPng, OSPF, OSPFv3, IS-IS, BGP, BGP4+, MBGP), and routing policies. The document provides the configuration procedures and configuration examples of the IP routing features. This document covers the following topics:
l l l l l l

Feature description Data preparation Pre-configuration tasks Operation procedures Checking the configuration Configuration examples

This document guides you through the configuration and the applicable environment of IP routing features of the S9300.

Related Versions
The following table lists the product versions related to this document. Product Name S9300 Version V100R002C00

Intended Audience
This document is intended for:
l l l

Commissioning engineer Data configuration engineer Network monitoring engineer


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

Issue 04 (2010-01-08)

About This Document


l l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

System maintenance engineer Network administrator

Organization
This document is organized as follows. Chapter 1 Static Route Configuration 2 RIP Configuration Description Describes the concepts of static routes and the procedure for configuring static routes, and provides examples for configuring static routes. Describes the concepts of RIP and the procedure for configuring RIP, and provides configuration examples of RIP. Describes the concepts of RIPng and the procedure for configuring RIPng, and provides configuration examples of RIPng. Describes the concepts of OSPF and the procedure for configuring OSPF, and provides configuration examples of OSPF. Describes the concepts of OSPFv3 and the procedure for configuring OSPFv3, and provides configuration examples of OSPFv3. Describes the concepts of IS-IS and the procedure for configuring IS-IS, and provides configuration examples of IS-IS. Describes the concepts of BGP and the procedure for configuring BGP, and provides configuration examples of BGP. Describes the concepts of BGP4+ and the procedure for configuring BGP4+, and provides configuration examples of BGP4+. Describes the concepts of MBGP and the procedure for configuring MBGP, and provides configuration examples of MBGP. Describes the concepts of routing policies and the procedure for configuring routing policies, and provides configuration examples of routing policies.

3 RIPng Configuration

4 OSPF Configuration

5 OSPFv3 Configuration

6 IS-IS Configuration

7 BGP Configuration

8 BGP4+ Configuration

9 MBGP Configuration

10 Routing Policy Configuration

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

About This Document

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

DANGER

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

WARNING

CAUTION
TIP

NOTE

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

Command Conventions
The command conventions that may be found in this document are defined as follows. Convention Boldface Italic
Issue 04 (2010-01-08)

Description The keywords of a command line are in boldface. Command arguments are in italics.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 3

About This Document

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Convention [] { x | y | ... } [ x | y | ... ] { x | y | ... }*

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

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

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

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

Mouse Operations
The mouse operations that may be found in this document are defined as follows.
4 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

About This Document

Action Click Double-click Drag

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

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

Updates in Issue 04 (2010-01-08)


Based on issue 03 (2009-11-10), the document is updated as follows: The following content is modified:
l

10.4.4 (Optional) Setting an apply Clause

Updates in Issue 03 (2009-11-10)


Based on issue 02 (2009-09-30), the document is updated as follows: The following content is modified:
l

10.3.3 Configuring an IPv6 Prefix List

Updates in Issue 02 (2009-09-30)


Based on issue 01 (2009-07-29), the document is updated as follows: The following content is modified:
l

10.12.4 Example for Configuring IP FRR on a Private Network

Updates in Issue 01 (2009-07-29)


Initial commercial release.

Issue 04 (2010-01-08)

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

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

1 Static Route Configuration

1
About This Chapter

Static Route Configuration

This chapter describes the concepts of static routes and the procedure for configuring static routes, and provides configuration examples of static routes. 1.1 Introduction to Static Routes This section describes the principle and concepts of the static route. 1.2 Static Route Features Supported by the S9300 This section describes the static route features supported by the S9300. 1.3 S9300 Interfaces That Support Static Routes This section describes the S9300 interfaces that support static routes. 1.4 Configuring an IPv4 Static Route This section describes how to configure an IPv4 static route. 1.5 Configuring an IPv6 Static Route This section describes how to configure IPv6 static route. 1.6 Configuring BFD for Static Routes This section describes how to bind a static route to a BFD session. 1.7 Configuration Examples This section provides configuration examples of static routes and BFD for static routes.

Issue 04 (2010-01-08)

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

1-1

1 Static Route Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

1.1 Introduction to Static Routes


This section describes the principle and concepts of the static route.

IPv4 Static Routes


A static route is a route that is configured manually. When a network is simple or the topology seldom changes, you need to configure only static routes to ensure normal operation of the network. A proper configuration and usage of static routes can improve the network performance and provide fixed routes for important applications. The advantages of static routes are as follows:
l l l

Static routes can be easily implemented. Static routes occupy a few network resources. Static routes can be used to control route selection.

The disadvantage of static routes is as follows:


l

When a fault occurs on the network or the topology changes, static routes cannot automatically change and must be changed by an administrator.

IPv6 Static Routes


An IPv6 static route is similar to an IPv4 static route and needs to be configured manually by an administrator. The IPv6 static route is applicable to simple IPv6 networks. The main difference between an IPv6 static route and an IPv4 static route lies in the destination address and the next hop address. IPv6 static routes use IPv6 addresses as the next hops, whereas the IPv4 static routes use IPv4 addresses as the next hops. Currently, only IPv4 static routes support VPN instances. When an IPv6 static route is configured, if the specified destination address is ::/0 (the mask length is 0), it indicates that a default IPv6 route is configured. If the destination address of a packet fails to match any entry in the routing table, the router selects a default IPv6 route to forward the IPv6 packet.

Default Static Routes


A default static route is a special route. Generally, an administrator can manually configure a default route. The default route, however, can also be generated through dynamic routing protocols, such as the Open Shortest Path First (OSPF) and Intermediate System-to-Intermediate System (IS-IS) protocols. The default route is used when no matching routing entry can be found. In a routing table, the destination address of the default route is 0.0.0.0 with the mask being 0.0.0.0. You can run the display ip routing-table command to check whether the default route is configured. If the destination IP address of a packet does not match any entry in the routing table, the default route is chosen. If neither the default route nor the destination address of the packet exists in the routing table, the packet is discarded. An Internet Control Message Protocol (ICMP) packet is then sent, reporting that the destination address or the destination network is unreachable.
1-2 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

1 Static Route Configuration

1.2 Static Route Features Supported by the S9300


This section describes the static route features supported by the S9300. The S9300 can check the reachability of a static route through Bidirectional Forwarding Detection (BFD). Compared with dynamic routing protocols, static routes do not have a detection mechanism. When a fault occurs on the network, the administrator needs to reconfigure static routes. BFD for static routes can check the reachability of a static route of the public network by binding the static route to a BFD session. Each static route can be bound to a BFD session.
l

When the BFD session that is bound to a static route detects a fault, that is, the route status changes from Up to Down, the BFD session notifies the route management (RM) module on the S9300 of the fault. The RM module then sets the route status to inactive. That is, the route becomes unavailable and is deleted from the routing table. When the BFD session that is bound to a static route is established, that is, the route status changes from Down to Up, the BFD session notifies the RM system. The RM system then sets the route status to active. That is, the route becomes available and is added to the routing table.

1.3 S9300 Interfaces That Support Static Routes


This section describes the S9300 interfaces that support static routes. Before configuring static routes, you need to assign an IP address to each interface so that the nodes can be interconnected through the network. The physical interfaces of the S9300 except the management network interface are Layer 2 interfaces; therefore, they cannot be assigned IP addresses directly. In this case, you can configure an IP address for a Layer 2 interface on the S9300 through the following methods:
l

Creating a VLAN that the Layer 2 interface belongs to and assigning an IP address to the VLANIF interface of the VLAN Assigning an IP address to the loopback interface
NOTE

For details about the Layer 2 interface configuration, see the Quidway S9300 Terabit Routing Switch Configuration Guide - Ethernet.

1.4 Configuring an IPv4 Static Route


This section describes how to configure an IPv4 static route. 1.4.1 Establishing the Configuration Task 1.4.2 Configuring an IPv4 Static Route 1.4.3 (Optional) Setting the Default Priority of an IPv4 Static Route 1.4.4 (Optional) Configuring Static Route Selection Based on Relay Depth
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 1-3

1 Static Route Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

1.4.5 Checking the Configuration

1.4.1 Establishing the Configuration Task


Applicable Environment
When a network is simple and the topology seldom change, you can configure static routes to ensure normal operation of the network. Different static routes can be set with different preferences, and you can thus flexibly use routing policies. For example, if you specify the same priority for the routes to the same destination, the routes work in load balancing mode. If you specify different priorities for the routes, the routes work in backup mode. A default route usually exists in a routing table. If no matching routing entry is found for a packet, the packet is forwarded through the default route and is not discarded.

Pre-configuration Tasks
Before configuring a static route, complete the following tasks:
l

Configuring the physical parameters of related interfaces to ensure that the status of the physical layer of each interface is Up Creating VLANs and adding corresponding interfaces to the VLANs Assigning IP addresses to VLANIF interfaces to ensure that neighboring nodes can be interconnected through the network

l l

Data Preparation
To configure a static route, you need the following data. No. 1 2 Data (Optional) Default priority of a static route Destination IP address and subnet mask, IP address of the next hop, or local outgoing interface

1.4.2 Configuring an IPv4 Static Route


Context
It is recommended that you specify the next hop address when configuring a static route on the S9300. The reason is that the physical interfaces of the S9300 are Ethernet interfaces of the broadcast type and one outgoing interface can be associated with multiple next hop addresses. The next hop thus cannot be identified. If the outbound interface is specified, you must specify the next hop address of the interface. Do as follows on the S9300 that forwards packets to other network segments.
1-4 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

1 Static Route Configuration

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ip route-static ipv4-address { mask | mask-length } { nexthop-address | interfacetype interface-number [ nexthop-address ] } [ preference preference | tag tag ] * [ description text ]

A static route is configured.


NOTE

If you run the ip route-static command to configure a static route and set the destination address and mask to 0.0.0.0/0.0.0.0, this route is the default route.

----End

1.4.3 (Optional) Setting the Default Priority of an IPv4 Static Route


Context
Do as follows on the S9300.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ip route-static default-preference preference

The default priority of a static route is set. By default, the priority of a static route is 60. If the priority of a static route is not specified, the default priority is used for the static route. If you change the default priority, the new default priority is valid only for new static routes. ----End

1.4.4 (Optional) Configuring Static Route Selection Based on Relay Depth


Context
Do as follows on the router configured with static routes:

Procedure
Step 1 Run:
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 1-5

1 Static Route Configuration


system-view

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The system view is displayed. Step 2 Run:


ip route-static selection-rule relay-depth

Static route selection based on relay depths is configured. By default, static routes are not selected according to relay depths. After static routes are configured, multiple static routes with the same prefix and preference but different relay depths exist. After static route selection based on relay depths is configured, the static route module selects the route with the smallest relay depth as the active route and sends it to the Forwarding Information Base (FIB) table. Other routes become inactive. ----End

1.4.5 Checking the Configuration


Prerequisite
All parameters of a static route are set.

Procedure
l l Run the display ip routing-table command to check the summary of the routing table. Run the display ip routing-table verbose command to check detailed information about the routing table.

----End

Example
# Run the display ip routing-table command, and you can view information about the routing table and the configured static routes in the routing table.
<Quidway> display ip routing-table Route Flags: R - relay, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 8 Routes : 8 Destination/Mask 0.0.0.0/0 1.1.1.0/24 1.1.1.1/32 1.1.4.0/30 1.1.4.1/32 1.1.4.2/32 127.0.0.0/8 127.0.0.1/32 Proto Static Direct Direct Direct Direct Direct Direct Direct Pre 60 0 0 0 0 0 0 0 Cost 0 0 0 0 0 0 0 0 Flags RD D D D D D D D NextHop 1.1.4.2 1.1.1.1 127.0.0.1 1.1.4.1 127.0.0.1 1.1.4.2 127.0.0.1 127.0.0.1 Interface Vlanif10 Vlanif30 InLoopBack0 Vlanif10 InLoopBack0 Vlanif10 InLoopBack0 InLoopBack0

1.5 Configuring an IPv6 Static Route


This section describes how to configure IPv6 static route. 1.5.1 Establishing the Configuration Task
1-6 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

1 Static Route Configuration

1.5.2 Configuring an IPv6 Static Route 1.5.3 (Optional) Configuring the Default Preference of the IPv6 Static Route 1.5.4 Checking the Configuration

1.5.1 Establishing the Configuration Task


Applicable Environment
In a small IPv6 network, you can interconnect networks by configuring IPv6 static routes. Compared with dynamic routing protocol, using static routes saves the bandwidth.

Pre-configuration Tasks
Before configuring an IPv6 static route, complete the following task:
l

Configuring link layer protocol parameters and assigning IP addresses to the interfaces to ensure that the status of the link layer protocol of the interface is Up

Data Preparation
To configure an IPv6 static route, you need the following data. No. 1 2 3 Data Destination address and mask Outbound interface or the next hop IPv6 address Preference of the IPv6 static route

1.5.2 Configuring an IPv6 Static Route


Context
Do as follows on the S9300 configured with static routes:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ipv6 route-static ipv6-address prefix-length { interface-type interface-number | nexthop-address } [ preference preference ] [ tag tag ] [ description text ]

An IPv6 static route is configured. When configuring a static route, you need to specify either the outbound interface or the next hop address according to the actual situation.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 1-7

1 Static Route Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

If preference is not specified, the default preference is 60. By default, no IPv6 static route is configured. ----End

1.5.3 (Optional) Configuring the Default Preference of the IPv6 Static Route
Context
Do as follows on the S9300 configured with an IPv6 static route:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ipv6 route-static default-preference preference

The default preference of an IPv6 static route is set. By default, the default preference of the IPv6 static route is 60. When an IPv6 static route is configured, the default preference is used if the preference of the static route is not explicitly specified. After the default preference of the IPv6 static route is reset, the default preference is valid for the newly added IPv6 static routes only. ----End

1.5.4 Checking the Configuration


Prerequisite
The configurations of an IPv6 static route are complete.

Procedure
l l Run the display ipv6 routing-table command to check the brief information about the IPv6 routing table. Run the display ipv6 routing-table verbose command to check the details about the IPv6 routing table.

----End

1.6 Configuring BFD for Static Routes


This section describes how to bind a static route to a BFD session. 1.6.1 Establishing the Configuration Task 1.6.2 Configuring a Static Route
1-8 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

1 Static Route Configuration

1.6.3 Configuring a BFD Session 1.6.4 Binding a Static Route to a BFD Session 1.6.5 Checking the Configuration

1.6.1 Establishing the Configuration Task


Applicable Environment
When the link changes, a static route cannot be dynamically adjusted because the change cannot be detected in the static routing mechanism. In this case, the static route becomes unreachable, which causes packet loss or route loop. BFD for static routes provides a mechanism for checking link connectivity of static routes quickly on the public network. The BFD session can detect connectivity of the network automatically. You can bind a static route to a BFD session. When BFD detects a link failure, it sets the static route bound to the BFD session as invalid. After the link recovers, the static route bound to the BFD session is enabled automatically.

Pre-configuration Tasks
Before configuring BFD for static routes, complete the following tasks:
l

Configuring the physical parameters of related interfaces to ensure that the status of the physical layer of each interface is Up Creating VLANs and adding corresponding interfaces to the VLANs Assigning IP addresses to VLANIF interfaces to ensure that neighboring nodes can be interconnected through the network

l l

Data Preparation
To configure BFD for static routes, you need the following data. No. 1 2 Data Destination network address and mask, IP address of the next hop, or local outgoing interface Peer IP address, local discriminator, and remote discriminator of the BFD session

1.6.2 Configuring a Static Route


Context
Before running a BFD session, make sure that a reachable forwarding path exists in the routing table. To set up a BFD session between two networks that are indirectly connected, configure a static route between the networks first. Then, the BFD session can run normally. If a BFD session is set up between directly connected networks, you do not need to configure a static route.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 1-9

1 Static Route Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ip route-static ipv4-address { mask | mask-length } { nexthop-address | interfacetype interface-number [ nexthop-address ] } [ preference preference | tag tag ] * [ description text ]

A static route is configured.


NOTE

If you run the ip route-static command to configure a static route and set the destination address and mask to 0.0.0.0/0.0.0.0, this route is the default route.

----End

1.6.3 Configuring a BFD Session


Procedure
Step 1 Configure a BFD session according to Quidway S9300 Terabit Routing Switch Configuration Guide - Reliability. ----End

1.6.4 Binding a Static Route to a BFD Session


Context
Before binding a static route to a BFD session, ensure that the BFD session and the static route reside on the same link. A static route can be bound only to one BFD session. Do as follows on the S9300s on both ends of the link that needs to be bound to the BFD session.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ip route-static ipv4-address { mask | mask-length } { nexthop-address | interfacetype interface-number [ nexthop-address ] } [ preference preference | tag tag ] *track bfd-session cfg-name [ description text ]

A static route on the public network is bound to a BFD session. ----End


1-10 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

1 Static Route Configuration

1.6.5 Checking the Configuration


Prerequisite
All parameters of BFD for static routes are set.

Procedure
l l Run the display bfd session { all | discriminator discriminator | peer-ip peer-ip } [ verbose ] command to check information about a BFD session. Run the display current-configuration | include bfd command to check the configuration of BFD for static routes.

----End

Example
You can view information about a BFD session only after the parameters of the BFD session are set and the BFD session is set up. If the State field is Up, it means that the configuration is correct.
<Quidway> display bfd session all -------------------------------------------------------------------------------Local Remote PeerIPAddress Interface Name State Type -------------------------------------------------------------------------------10 20 1.1.1.2 -Up S_IP -------------------------------------------------------------------------------Total UP/DOWN Session Number : 1/0

Run the display current-configuration | include bfd command in the system view, and you can find that the BFD session is bound to the static route.
<Quidway> display current-configuration | include bfd bfd bfd aa bind peer-ip 1.1.1.2 ip route-static 0.0.0.0 0.0.0.0 1.1.1.2 track bfd-session aa

1.7 Configuration Examples


This section provides configuration examples of static routes and BFD for static routes. 1.7.1 Example for Configuring IPv4 Static Routes 1.7.2 Example for Configuring IPv6 Static Routes 1.7.3 Example for Configuring BFD for IPv4 Static Routes

1.7.1 Example for Configuring IPv4 Static Routes


Networking Requirements
Hosts in different network segments are connected through several S9300s. You are required to configure static routes enable each two hosts in different network segments to communicate with each other.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 1-11

1 Static Route Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Figure 1-1 Networking diagram for configuring static routes


PC2 1.1.2.2/24

GE1/0/3 GE1/0/1 S9300-B S9300-A GE1/0/1 GE1/0/2 GE1/0/1 GE1/0/2 S9300-C GE1/0/2

PC1 1.1.1.2/24

PC3 1.1.3.2/24

S9300 S9300-A S9300-A S9300-B S9300-B S9300-B S9300-C S9300-C

Interface GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/3 GigabitEthernet1/0/1 GigabitEthernet1/0/1

VLANIF interface VLANIF 10 VLANIF 30 VLANIF 10 VLANIF 20 VLANIF 40 VLANIF 20 VLANIF 50

IP address 1.1.4.1/30 1.1.1.1/24 1.1.4.2/30 1.1.4.5/30 1.1.2.1/24 1.1.4.6/30 1.1.3.1/24

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. Create VLANs and add corresponding interfaces to the VLANs. Assign an IP address to each VLANIF interface. Configure a default IP gateway on each host. Configure static routes and default routes on the S9300s.

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

IDs of the VLANs that the interfaces belong to, as shown in Figure 1-1 VLANIF interfaces and the IP addresses of the hosts, as shown in Figure 1-1 Default route of S9300-A, whose next hop address is 1.1.4.2 Static route of S9300-B, whose destination address is 1.1.1.0, and the next hop address is 1.1.4.1
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

1-12

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


l

1 Static Route Configuration

Static route of S9300-B, whose destination address is 1.1.3.0, and the next hop address is 1.1.4.6 Default route of S9300-C, whose next hop address is 1.1.4.5

Procedure
Step 1 Configure VLANs that interfaces belong to.
<Quidway>system-view [Quidway]sysname S9300-A [S9300-A]vlan 10 [S9300-A-vlan10]quit [S9300-A]vlan 30 [S9300-A-vlan30]quit [S9300-A]interface GigabitEthernet [S9300-A-GigabitEthernet1/0/1]port [S9300-A-GigabitEthernet1/0/1]port [S9300-A-GigabitEthernet1/0/1]quit [S9300-A]interface GigabitEthernet [S9300-A-GigabitEthernet1/0/1]port [S9300-A-GigabitEthernet1/0/1]port [S9300-A-GigabitEthernet1/0/1]quit

1/0/1 hybrid pvid vlan 10 hybrid untagged vlan 10 1/0/2 link-type access default vlan 30

The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A, and are not mentioned here. Step 2 Assign an IP address to each VLANIF interface.
[S9300-A]interface vlanif 10 [S9300-A-Vlanif10]ip address 1.1.4.1 30 [S9300-A-Vlanif10]quit [S9300-A]interface vlanif 30 [S9300-A-Vlanif30]ip address 1.1.1.1 24 [S9300-A-Vlanif30]quit

The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A, and are not mentioned here. Step 3 Configure the hosts. Configure the default gateway addresses of PC1, PC2, and PC3 to 1.1.1.1, 1.1.2.1, and 1.1.3.1 respectively. Step 4 Configure static routes. # Configure a default route on S9300-A.
<S9300-A>system-view [S9300-A] ip route-static 0.0.0.0 0.0.0.0 1.1.4.2

# Configure two static routes on S9300-B.


<S9300-B> system-view [S9300-B] ip route-static 1.1.1.0 255.255.255.0 1.1.4.1 [S9300-B] ip route-static 1.1.3.0 255.255.255.0 1.1.4.6

# Configure a default route on S9300-C.


<S9300-C> system-view [S9300-C] ip route-static 0.0.0.0 0.0.0.0 1.1.4.5

Step 5 Verify the configuration. # Check the routing table of S9300-A.


[S9300-A] display ip routing-table Route Flags: R - relay, D - download to fib

Issue 04 (2010-01-08)

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

1-13

1 Static Route Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

-----------------------------------------------------------------------------Routing Tables: Public Destinations : 8 Routes : 8 Destination/Mask 0.0.0.0/0 1.1.1.0/24 1.1.1.1/32 1.1.4.0/30 1.1.4.1/32 1.1.4.2/32 127.0.0.0/8 127.0.0.1/32 Proto Static Direct Direct Direct Direct Direct Direct Direct Pre 60 0 0 0 0 0 0 0 Cost 0 0 0 0 0 0 0 0 Flags RD D D D D D D D NextHop 1.1.4.2 1.1.1.1 127.0.0.1 1.1.4.1 127.0.0.1 1.1.4.2 127.0.0.1 127.0.0.1 Interface Vlanif10 Vlanif30 InLoopBack0 Vlanif10 InLoopBack0 Vlanif10 InLoopBack0 InLoopBack0

# Run the ping command to verify the connectivity.


[S9300-A] ping 1.1.3.1 PING 1.1.3.1: 56 data bytes, press CTRL_C to break Reply from 1.1.3.1: bytes=56 Sequence=1 ttl=254 time=62 Reply from 1.1.3.1: bytes=56 Sequence=2 ttl=254 time=63 Reply from 1.1.3.1: bytes=56 Sequence=3 ttl=254 time=63 Reply from 1.1.3.1: bytes=56 Sequence=4 ttl=254 time=62 Reply from 1.1.3.1: bytes=56 Sequence=5 ttl=254 time=62 --- 1.1.3.1 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 62/62/63 ms

ms ms ms ms ms

# Run the tracert command to verify the connectivity.


[S9300-A] tracert 1.1.3.1 traceroute to 1.1.3.1(1.1.3.1) 30 hops max,40 bytes packet 1 1.1.4.2 31 ms 32 ms 31 ms 2 1.1.4.6 62 ms 63 ms 62 ms

----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # vlan batch 10 30 # interface Vlanif10 ip address 1.1.4.1 255.255.255.252 # interface Vlanif30 ip address 1.1.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port link-type access port default vlan 30 # ip route-static 0.0.0.0 0.0.0.0 1.1.4.2 # return

Configuration file of S9300-B


# sysname S9300-B

1-14

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


# vlan batch 10 20 40 # interface Vlanif10 ip address 1.1.4.2 255.255.255.252 # interface Vlanif20 ip address 1.1.4.5 255.255.255.252 # interface Vlanif40 ip address 1.1.2.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet1/0/3 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # ip route-static 1.1.1.0 255.255.255.0 1.1.4.1 ip route-static 1.1.3.0 255.255.255.0 1.1.4.6 # return l

1 Static Route Configuration

Configuration file of S9300-C


# sysname S9300-C # vlan batch 20 50 # interface Vlanif20 ip address 1.1.4.6 255.255.255.252 # interface Vlanif40 ip address 1.1.3.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet1/0/2 port link-type acess port default vlan 50 # ip route-static 0.0.0.0 0.0.0.0 1.1.4.5 # return

1.7.2 Example for Configuring IPv6 Static Routes


Networking Requirements
As shown in Figure 1-2, the prefix length of all the IPv6 addresses is 64 bits. You need to configure IPv6 static routes between the S9300s to ensure that all the PCs and S9300s can communicate with each other. The VLANIF interfaces connecting the S9300s to PCs need to be configured with IPv6 global unicast addresses. The VLANIF interfaces connecting the S9300s need to be configured with IPv6 link-local addresses.

Issue 04 (2010-01-08)

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

1-15

1 Static Route Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Figure 1-2 Networking diagram for configuring IPv6 static routes


PC2
2::2/64 GE3/0/0 VLANIF30 2::1/64 VLANIF20 VLANIF40 FE80::218:20FF:FE00:80 FE80::218:20FF:FE00:83 GE1/0/0 GE2/0/0

S9300-A

S9300-B

GE2/0/0 VLANIF10 1::1/64

GE1/0/0 GE1/0/0 FE80::218:20FF:FE00:82 VLANIF20 VLANIF40 FE80::218:20FF:FE00:81

S9300-C

GE2/0/0 VLANIF50 3::1/64

PC1
1::2/64

PC3
3::2/64

Device name S9300-A S9300-A S9300-B S9300-B S9300-B S9300-C S9300-C

Interface GE2/0/0 GE1/0/0 GE1/0/0 GE2/0/0 GE3/0/0 GE1/0/0 GE2/0/0

VLANIF interface VLANIF 10 VLANIF 20 VLANIF 20 VLANIF 40 VLANIF 30 VLANIF 40 VLANIF 50

IP address 1::1/64 Generated automatically Generated automatically Generated automatically 2::1/64 Generated automatically 3::1/64

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. Configure the VLAN that each interface belongs to. Assign IPv6 addresses to the VLANIF interfaces on the S9300s so that the devices on the network can communicate with each other. Configure an IPv6 static route to the destination address and the default route on each S9300. Configure the IPv6 default gateway on each PC so that any two PCs can communicate with each other.

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

IDs of the VLANs that the interfaces belong to, as shown in Figure 1-2 Default route of S9300-A with the outgoing interface being VLANIF 20
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

1-16

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


l

1 Static Route Configuration

Static route of S9300-B with the destination address being 1:: 64 and outgoing interface being VLANIF 20 Static route of S9300-B with the destination address being 3:: 64 and outgoing interface being VLANIF 40 Default route of S9300-C with the outgoing interface being VLANIF 40 Default gateway address (1::1) of PC1, default gateway address (2::1) of PC2, and default gateway address (3::1) of PC3

l l

Procedure
Step 1 Add interfaces to VLANs.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] vlan 10 [S9300-A-vlan10] quit [S9300-A] interface GigabitEthernet [S9300-A-GigabitEthernet2/0/0] port [S9300-A-GigabitEthernet2/0/0] port [S9300-A-GigabitEthernet2/0/0] quit [S9300-A] vlan 20 [S9300-A-vlan20] quit [S9300-A] interface GigabitEthernet [S9300-A-GigabitEthernet1/0/0] port [S9300-A-GigabitEthernet1/0/0] port [S9300-A-GigabitEthernet1/0/0] quit

2/0/0 hybrid pvid vlan 10 hybrid untagged vlan 10

1/0/0 hybrid pvid vlan 20 hybrid untagged vlan 20

The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A and are not mentioned here. Step 2 Assign IP addresses to the VLANIF interfaces.
[S9300-A] ipv6 [S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ipv6 enable [S9300-A-Vlanif10] ipv6 address 1::1/64 [S9300-A-Vlanif10] quit [S9300-A] interface vlanif 20 [S9300-A-Vlanif20] ipv6 enable [S9300-A-Vlanif20] ipv6 address auto link-local [S9300-A-Vlanif20] quit

The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A and are not mentioned here. Step 3 Configure the PCs. Configure the default gateway addresses of PC1, PC2, and PC3 to 1.1.1.1, 1.1.2.1, and 1.1.3.1 respectively. Step 4 Configure the IPv6 static routes. # Configure a default IPv6 route on S9300-A.
[S9300-A] ipv6 route-static :: 0 vlanif20 FE80::218:20FF:FE00:80

# Configure two IPv6 static routes on S9300-B.


[S9300-B] ipv6 route-static 1:: 64 vlanif20 FE80::218:20FF:FE00:81 [S9300-B] ipv6 route-static 3:: 64 vlanif40 FE80::218:20FF:FE00:82

# Configure a default IPv6 route on S9300-C.


[S9300-C] ipv6 route-static :: 0 vlanif40 FE80::218:20FF:FE00:83

Issue 04 (2010-01-08)

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

1-17

1 Static Route Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Step 5 Configure the addresses and the gateway addresses on the PCs. Assign the IPv6 addresses to the PCs according to the networking diagram. Set the default gateway address on PC1 to 1::1, the default gateway address on PC2 to 2::1, and the default gateway address on PC3 to 3::1. Step 6 Verify the configuration. # Check the IPv6 routing table of S9300-A.
[S9300-A] display ipv6 routing-table Routing Table : Destinations : 5 Routes : 5 Destination NextHop Interface State Tunnel ID Age Destination NextHop Interface State Tunnel ID Age Destination NextHop Interface State Tunnel ID Age Destination NextHop Interface State Tunnel ID Age Destination NextHop Interface State Tunnel ID Age : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :: FE80::218:20FF:FE00:80 Vlanif20 Active Adv 0x0 685270sec ::1 ::1 InLoopBack0 Active NoAdv 0x0 523sec 1:: 1::1 Vlanif10 Active Adv 0x0 523sec 1::1 ::1 InLoopBack0 Active NoAdv 0x0 357sec FE80:: :: NULL0 Active NoAdv 0x0 407sec PrefixLength Preference Protocol Cost Label PrefixLength Preference Protocol Cost Label PrefixLength Preference Protocol Cost Label PrefixLength Preference Protocol Cost Label PrefixLength Preference Protocol Cost Label : : : : : : : : : : : : : : : : : : : : : : : : : 0 60 Static 0 NULL 128 0 Direct 0 NULL 64 0 Direct 0 NULL 128 0 Direct 0 NULL 10 0 Direct 0 NULL

# Run the ping command to verify the configuration.


[S9300-A] ping ipv6 3::1 PING 3::1 : 56 data bytes, press CTRL_C to Reply from 3::1 bytes=56 Sequence=1 hop limit=254 time = Reply from 3::1 bytes=56 Sequence=2 hop limit=254 time = Reply from 3::1 bytes=56 Sequence=3 hop limit=254 time = Reply from 3::1 bytes=56 Sequence=4 hop limit=254 time = Reply from 3::1 bytes=56 Sequence=5 hop limit=254 time = --- 3::1 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 62/62/63 ms break 63 ms 62 ms 62 ms 63 ms 63 ms

1-18

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

1 Static Route Configuration

# Run the tracert command to verify the configuration.


[S9300-A] tracert ipv6 3::1 traceroute to 3::1 30 hops max,60 bytes packet 1 2::1 31 ms 32 ms 31 ms 2 3::1 62 ms 63 ms 62 ms

----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # ipv6 # vlan batch 10 20 # interface Vlanif10 ipv6 enable ipv6 address 1::1/64 # interface Vlanif20 ipv6 enable ipv6 address auto link-local # interface GigabitEthernet1/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # ipv6 route-static :: 0 vlanif20 # return

Configuration file of S9300-B


# sysname S9300-B # ipv6 # vlan batch 20 30 40 # interface Vlanif20 ipv6 enable ipv6 address auto link-local # interface Vlanif30 ipv6 enable ipv6 address 2::1/64 # interface Vlanif40 ipv6 enable ipv6 address auto link-local # interface GigabitEthernet1/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # interface GigabitEthernet3/0/0

Issue 04 (2010-01-08)

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

1-19

1 Static Route Configuration


port hybrid pvid vlan 30 port hybrid untagged vlan 30 # ipv6 route-static 1:: 64 Vlanif20 ipv6 route-static 3:: 64 Vlanif40 # return l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of S9300-C


# sysname S9300-C # ipv6 # vlan batch 40 50 # interface Vlanif40 ipv6 enable ipv6 address auto link-local # interface Vlanif50 ipv6 enable ipv6 address 3::1/64 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 50 port hybrid untagged vlan 50 # ipv6 route-static :: 0 Vlanif40 # return

1.7.3 Example for Configuring BFD for IPv4 Static Routes


Networking Requirements
As shown in Figure 1-3, S9300-A is connected to the network management system (NMS) through S9300-B. You need to configure static routes on S9300-A so that S9300-A can communicate with the NMS. In addition, configure a BFD session between S9300-A and S9300-B to detect link failure. Figure 1-3 Networking diagram for configuring BFD for static routes
GE1/0/1 S9300-A
S9300 S9300-A S9300-B S9300-B

GE1/0/1 S9300-B
Interface GigabitEthernet1/0/1 GigabitEthernet1/0/1 GigabitEthernet1/0/2

GE1/0/2 2.2.2.1/24 NMS


VLANIF interface VLANIF 10 VLANIF 10 VLANIF 20 IP address 1.1.1.1/24 1.1.1.2/24 2.2.2.2/24

1-20

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

1 Static Route Configuration

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. Create a BFD session on S9300-A and S9300-B to detect the link between S9300-A and S9300-B. Configure a static route from S9300-A to the NMS and bind the static route to the BFD session.

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

IDs of the VLANs that the interfaces belong to, as shown in Figure 1-3 VLANIF interfaces and the IP address of the NMS, as shown in Figure 1-3 Peer IP address of the BFD session Local discriminator and remote discriminator of the BFD session Static route from S9300-A to the NMS

Procedure
Step 1 Create VLANs and add corresponding interfaces to the VLANs.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] vlan 10 [S9300-A-vlan10] quit [S9300-A] interface GigabitEthernet 1/0/1 [S9300-A-GigabitEthernet1/0/1] port hybrid pvid vlan 10 [S9300-A-GigabitEthernet1/0/1] port hybrid untagged vlan 10 [S9300-A-GigabitEthernet1/0/1] quit

The configuration on S9300-B is similar to the configuration of S9300-A, and is not mentioned here. Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ip address 1.1.1.1 24 [S9300-A-Vlanif10] quit

The configuration on S9300-B is similar to the configuration on S9300-A and is not mentioned here. Step 3 Create a BFD session between S9300-A and S9300-B. # On S9300-A, create a BFD session with S9300-B.
<S9300-A> system-view [S9300-A] bfd [S9300-A-bfd] quit [S9300-A] bfd aa bind peer-ip 1.1.1.2 [S9300-A-bfd-session-aa] discriminator local 10 [S9300-A-bfd-session-aa] discriminator remote 20 [S9300-A-bfd-session-aa] commit [S9300-A-bfd-session-aa] quit

# On S9300-B, create a BFD session with S9300-A.


<S9300-B> system-view [S9300-B] bfd [S9300-B-bfd] quit

Issue 04 (2010-01-08)

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

1-21

1 Static Route Configuration


[S9300-B] bfd bb bind peer-ip 1.1.1.1 [S9300-B-bfd-session-bb] discriminator local 20 [S9300-B-bfd-session-bb] discriminator remote 10 [S9300-B-bfd-session-bb] commit [S9300-B-bfd-session-bb] quit

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Step 4 Configure a static route and bind the route to the BFD session. # On S9300-A, configure a default static route to the external network and bind the default static route to the BFD session named aa.
[S9300-A]ip route-static 2.2.2.1 24 1.1.1.2 track bfd-session aa [S9300-A]quit

Step 5 Verify the configuration. # After the configuration is complete, run the display bfd session all command on S9300-A and S9300-B, and you can find that the BFD session is set up and its status is Up. Take S9300-A for example. The display is as follows:
<S9300-A> display bfd session all -------------------------------------------------------------------------------LocalRemote PeerIPAddressInterface NameStateType -------------------------------------------------------------------------------10201.1.1.2--UpS_IP -------------------------------------------------------------------------------Total UP/DOWN Session Number : 1/0

# Check the IP routing table on S9300-A, and you can find that the static route exists in the routing table.
<S9300-A> display ip routing-table Route Flags: R - relay, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 6 Routes : 6 Destination/Mask 1.1.1.0/24 1.1.1.1/32 1.1.1.2/32 2.2.2.0/24 127.0.0.0/8 127.0.0.1/32 Proto Direct Direct Direct Static Direct Direct Pre 0 0 0 60 0 0 Cost 0 0 0 0 0 0 Flags NextHop D D D RD D D 1.1.1.1 127.0.0.1 1.1.1.2 1.1.1.2 127.0.0.1 127.0.0.1 Interface Vlanif10 InLoopBack0 Vlanif10 Vlanif10 InLoopBack0 InLoopBack0

# On S9300-A, enable debugging of the terminal.


<S9300-A> terminal monitor <S9300-A> terminal debugging

# Run the shutdown command on VLANIF 10 of S9300-B to simulate a link fault.


[S9300-B] interface vlanif 10 [S9300-B-Vlanif10] shutdown

# The following debugging information is displayed on S9300-A, indicating that BFD detects a link fault.
<S9300-A> *0.27708400 S9300-A RM/3/RMDEBUG: RM_USR_BFDRefreshRT_H: BfdSessionID = 10 BfdEvent = 0X0 USR : UsrDbID = 0X6, DestAdd = 0X0, Mask = 0X0, NextHop = 0X1010102 URT : TableID = 0X1, EntryID = 0XB, ProcID = 0X2, FLAG = 0X8114000

1-22

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

1 Static Route Configuration

# Check the routing table on S9300-A, and you can find that default route 2.2.2.0/24 does not exist. The reason is that the default static route is bound to a BFD session, and BFD immediately notifies that the bound static route is unavailable when a fault is detected.
<S9300-A> display ip routing-table Route Flags: R - relay, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 5 Routes : 5 Destination/Mask 1.1.1.0/24 1.1.1.1/32 1.1.1.2/32 127.0.0.0/8 127.0.0.1/32 Proto Direct Direct Direct Direct Direct Pre 0 0 0 0 0 Cost 0 0 0 0 0 Flags NextHop D D D D D 1.1.1.1 127.0.0.1 1.1.1.2 127.0.0.1 127.0.0.1 Interface Vlanif10 InLoopBack0 Vlanif10 InLoopBack0 InLoopBack0

# Run the undo shutdown command on VLANIF 10 of S9300-B to simulate link recovery.
[S9300-B-Vlanif10]undo shutdown

# Check the routing table on S9300-A, and you can find default route 2.2.2.0/24 in the routing table. After BFD detects link recovery, it immediately notifies that the bound static route is reachable.
<S9300-A> display ip routing-table Route Flags: R - relay, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 6 Routes : 6 Destination/Mask 1.1.1.0/24 1.1.1.1/32 1.1.1.2/32 2.2.2.0/24 127.0.0.0/8 127.0.0.1/32 Proto Direct Direct Direct Static Direct Direct Pre 0 0 0 60 0 0 Cost 0 0 0 0 0 0 Flags NextHop D D D RD D D 1.1.1.1 127.0.0.1 1.1.1.2 1.1.1.2 127.0.0.1 127.0.0.1 Interface Vlanif10 InLoopBack0 Vlanif10 Vlanif10 InLoopBack0 InLoopBack0

----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # vlan batch 10 # bfd # interface Vlanif10 ip address 1.1.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # bfd aa bind peer-ip 1.1.1.2 discriminator local 10 discriminator remote 20 commit # ip route-static 2.2.2.0 255.255.255.0 1.1.1.2 track bfd-session aa

Issue 04 (2010-01-08)

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

1-23

1 Static Route Configuration


# return l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of S9300-B


# sysname S9300-B # vlan batch 10 20 # bfd # interface Vlanif10 ip address 1.1.1.2 255.255.255.0 # interface Vlanif20 ip address 2.2.2.2 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # bfd bb bind peer-ip 1.1.1.1 discriminator local 20 discriminator remote 10 commit # return

1-24

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2 RIP Configuration

2
About This Chapter

RIP Configuration

This chapter describes the principle and configuration procedures of the Routing Information Protocol (RIP) and, provides configuration examples of RIP. 2.1 Introduction to RIP This section describes the principle and concepts of RIP. 2.2 RIP Features Supported by the S9300 This section describes the RIP features supported by the S9300. 2.3 Configuring Basic RIP Functions This section describes how to enable RIP and configure the basic RIP functions. 2.4 Configuring RIP Route Attributes This section describes how to change the routing policy of RIP by configuring route attributes. 2.5 Controlling the Advertisement of RIP Routing Information This section describes how to precisely control the advertisement of RIP routing information to meet the requirements of a complicated networking environment. 2.6 Controlling Received RIP Routing Information This section describes how to precisely control the received RIP routes to meet requirements of a complicated networking environment. 2.7 Configuring RIPv2 Features This section describes how to configure the functions of route aggregation and packet authentication in RIPv2. 2.8 Adjusting and Optimizing the RIP Network This section describes how to configure RIP features in a special networking environment and how to optimize the RIP network. 2.9 Configuring the Network Management Function of RIP This section describes how to bind a RIP process to the Management Information Base (MIB). 2.10 Maintaining RIP This section describes how to debug RIP. 2.11 Configuration Examples
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 2-1

2 RIP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

This section provides several configuration examples of RIP.

2-2

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2 RIP Configuration

2.1 Introduction to RIP


This section describes the principle and concepts of RIP. The Routing Information Protocol (RIP) is an Interior Gateway Protocol (IGP) that is used in a small-scale network, such as a campus network and a simple regional network. Generally, RIP is not used in a complicated or a large-scale network. RIP is based on the Distance-Vector (DV) algorithm and it exchanges the routing information through User Datagram Protocol (UDP) packets. The port number used by RIP is 520. RIP measures the distance from the local end to the destination by hop count. The hop count is also called the metric. RIP specifies that the hop count from a router to a directly connected network is 0, and the hop count from a router to a network that can be reached through another router is 1. The hop count increases with the number of routers between the local router and the destination network. To restrict the route convergence time, RIP specifies that the hop count must be an integer ranging from 0 to 15. A hop count of 16 or greater is defined as infinite. That is, the destination network or host is unreachable. RIP cannot be used in large networks because of this restriction. To improve system performance and to avoid routing loops, RIP supports the split horizon and poison reverse functions. The implementation of RIP is simple, and RIP is much easier to configure and maintain than OSPF and IS-IS. RIP, therefore, is widely used in actual networks. RIP has two versions: RIPv1 and RIPv2. RIPv1 is a classful routing protocol, and RIPv2 is a classless routing protocol. In RIPv2, RIP routers use 224.0.0.9 as the multicast address.

2.2 RIP Features Supported by the S9300


This section describes the RIP features supported by the S9300. Currently, the S9300 supports the following RIP features:
l l

RIPv1 and RIPv2 RIP multi-instance, which functions as the internal routing protocol of the virtual private network (VPN) and runs between CE and PE routers in the Multiprotocol Label Switching (MPLS) L3VPN
NOTE

For the configuration of VPN instances, see "BGP/MPLS IP VPN Configuration" in the Quidway S9300 Terabit Routing Switch Configuration Guide - VPN.

2.3 Configuring Basic RIP Functions


This section describes how to enable RIP and configure the basic RIP functions. 2.3.1 Establishing the Configuration Task 2.3.2 Enabling RIP 2.3.3 Enabling RIP on a Specified Network Segment
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 2-3

2 RIP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2.3.4 (Optional) Specifying the RIP Version 2.3.5 Checking the Configuration

2.3.1 Establishing the Configuration Task


Applicable Environment
After configuring the basic RIP functions, you can use the RIP features.

Pre-configuration Tasks
Before configuring the basic RIP functions, complete the following tasks:
l l l

Configuring the link layer protocol Creating VLANs and adding corresponding interfaces to the VLANs Assigning IP addresses to VLANIF interfaces to ensure network reachability between neighboring nodes
NOTE

To create the VLAN that each interface belongs to, you can add interfaces to the VLAN in default mode or by running the port trunk allow-pass vlan command or port hybrid { tagged |untagged } vlan command. The same method, however, must be used on the interfaces at both ends of a link. If you run the port trunk allow-pass command or port hybrid tagged vlan command to add interfaces to a VLAN, add the directly connected physical interfaces in the same network segment to the same VLAN. In this manner, the corresponding VLANIF interfaces can be directly connected at the network layer. For details, see the Quidway S9300 Terabit Routing Switch Configuration Guide - Ethernet.

Data Preparation
To configure the basic RIP functions, you need the following data. No. 1 2 3 Data RIP process ID Network segment where the RIP interface is located RIP version number

2.3.2 Enabling RIP


Context
Do as follows on the S9300s that need to run RIP.
NOTE

If you run the RIP commands in the interface view before enabling RIP, the configurations take effect only when the RIP process is enabled.

2-4

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2 RIP Configuration

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


rip [process-id ]

A RIP process is started and the RIP view is displayed. ----End

Postrequisite
RIP supports multi-instance. That is, RIP processes can be bound to VPN instances. To bind a RIP process to a VPN instance, run the rip [ process-id ] vpn-instance vpn-instance-name command.
NOTE

For the configuration of VPN instances, see Chapter 4 "BGP/MPLS IP VPN Configuration" in the Quidway S9300 Terabit Routing Switch Configuration Guide - VPN.

2.3.3 Enabling RIP on a Specified Network Segment


Context
Do as follows on the S9300s that need to run RIP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


rip [ process-id ]

A RIP process is started and the RIP view is displayed. Step 3 Run:
network network-address

RIP is enabled on the specified network segment. RIP runs only on the interfaces of the specified network segment. RIP does not receive or send routes for other interfaces, and does not forward their routes. Thus, after enabling RIP, you must specify network-address, which is the address of a natural network segment. By default, after RIP is enabled, it is disabled on all interfaces.
NOTE

The same network segment of a VLANIF interface cannot be specified for different RIP processes; otherwise, only the address of one RIP process takes effect.

----End
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 2-5

2 RIP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2.3.4 (Optional) Specifying the RIP Version


Context
Do as follows on the S9300s that run RIP.

Procedure
l Specifying the global RIP version 1. Run:
system-view

The system view is displayed. 2. Run:


rip [ process-id

] A RIP process is started and the RIP view is displayed. 3. Run:


version { 1 | 2 }

The global RIP version is specified. l Specifying the RIP version on an interface 1. Run:
system-view

The system view is displayed. 2. Run:


interface interface-type interface-number

The interface view is displayed. 3. Run:


rip version { 1 | 2 [ broadcast | multicast ] }

The version of RIP packets that can be received by the interface is specified. By default, an interface can receive packets of RIPv1 and RIPv2 but can send only packets of RIPv1. If the RIP version is set to RIPv2, you can specify the mode of sending packets on the interface. If the RIP version is not specified on the interface, the global RIP version takes effect on the interface. ----End

2.3.5 Checking the Configuration


Prerequisite
The basic RIP functions are configured.

Procedure
l Run the display rip [ process-id | vpn-instance vpn-instance-name ] command to check the status and configuration of a RIP process.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

2-6

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2 RIP Configuration

Run the display rip process-id route command to check all the active and inactive RIP routes.

----End

Example
Run the display rip [ process-id | vpn-instance vpn-instance-name ], and you can view the status and configuration of the specified RIP process.
<Quidway> display rip Public VPN-instance RIP process : 1 RIP version : 1 Preference : 100 Checkzero : Enabled Default-cost : 0 Summary : Enabled Hostroutes : Enabled Maximum number of balanced paths : 16 Update time : 30 sec Age time : 180 sec Suppress time : 0 sec Garbage-collect time : 120 sec Silent interfaces : None Default Route : Disabled Verify-source : Enabled Networks : 192.168.1.0 Configured peers : None Number of routes in database : 2 Number of interfaces enabled : 1 Triggered updates sent : 0 Number of route changes : 2 Number of replies to queries : 1 Total Number of routes : 2 Total Number of routes in ADV DB is : 2 Total count Number Number Number Number for 1 process : of routes in database : 2 of interfaces enabled : 1 of routes sendable in a periodic update : 2 of routes sent in last periodic update : 0

Run the display rip process-id route, and you can view all active and inactive routes of the specified RIP process.
<Quidway> display rip 1 route Route Flags: R - RIP A - Aging, S - Suppressed, G - Garbage-collect ---------------------------------------------------------------------------Peer 192.168.1.2 on Vlanif10 Destination/Mask Nexthop Cost Tag Flags Sec 192.168.1.0/24 192.168.1.2 1 0 RA 24 192.168.2.0/24 192.168.1.2 1 0 RA 24

2.4 Configuring RIP Route Attributes


This section describes how to change the routing policy of RIP by configuring route attributes. 2.4.1 Establishing the Configuration Task 2.4.2 Setting the Additional Metric of an Interface 2.4.3 Setting the Preference of RIP
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 2-7

2 RIP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2.4.4 Setting the Maximum Number of Equal-Cost Routes 2.4.5 Checking the Configuration

2.4.1 Establishing the Configuration Task


Applicable Environment
To meet the requirements of a complicated networking environment, you can change RIP routing policies by configuring RIP route attributes. Through the following procedures, you can:
l l

Determine route selection by adjusting the additional metric of a RIP interface. Change the matching order of routing protocols by configuring the RIP priority when various routing protocols discover routes to the same destination. Implement load balancing among several equal-cost routes.

Pre-configuration Tasks
Before configuring RIP route attributes, complete the following tasks:
l

Configuring the IP addresses of interfaces to ensure that neighboring nodes can be interconnected through the network 2.3 Configuring Basic RIP Functions

Data Preparation
To configure RIP route attributes, you need the following data. No. 1 2 3 Data Additional metric of each interface RIP priority Maximum number of equal-cost routes

2.4.2 Setting the Additional Metric of an Interface


Context
Do as follows on the S9300s that run RIP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface interface-type interface-number

2-8

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2 RIP Configuration

The interface view is displayed. Step 3 Run:


rip metricin value

The metric that is added to a route received on the interface is set. Step 4 Run: rip metricout value The additional metric that is added to a route advertised from the interface is set. The additional metric is an increment (hop count) added to the original metric of a RIP route. After you run the rip metricin command, the S9300 adds an additional metric to a received route, and then adds the route to the routing table. Then, the metric of the route changes in the routing table. After you run the rip metricout command, the S9300 adds an additional metric to a route when advertising the route. The metric of the route, however, does not change in the routing table. ----End

2.4.3 Setting the Preference of RIP


Context
Do as follows on the S9300s that run RIP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


rip [ process-id ]

A RIP process is started and the RIP view is displayed. Step 3 Run:
preference { preference | route-policy route-policy-name }*

The preference of RIP is set. ----End

2.4.4 Setting the Maximum Number of Equal-Cost Routes


Context
Do as follows on the S9300s that run RIP.

Procedure
Step 1 Run:
system-view

Issue 04 (2010-01-08)

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

2-9

2 RIP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The system view is displayed. Step 2 Run:


rip [ process-id ]

A RIP process is started and the RIP view is displayed. Step 3 Run:
maximum load-balancing number

The maximum number of equal-cost routes is set. By default,the maximum number of equal-cost is 16. ----End

2.4.5 Checking the Configuration


Prerequisite
All the route attributes of RIP are set.

Procedure
l l l Run the display rip [ process-id | vpn-instance vpn-instance-name ] command to check the status and configuration of a RIP process. Run the display rip process-id database command to check all the active routes in the RIP database. Run the display rip process-id route command to check all the active and inactive RIP routes.

----End

Example
Run the display rip process-id database command, and you can view information about the database of the specified RIP process.
<Quidway> display rip 100 database 10.0.0.0/8, cost 1, ClassfulSumm 10.0.0.0/24, cost 1, nexthop 10.0.0.1, Rip-interface 11.0.0.0/8, cost 1, ClassfulSumm 11.0.0.0/24, cost 1, nexthop 10.0.0.1, Imported

2.5 Controlling the Advertisement of RIP Routing Information


This section describes how to precisely control the advertisement of RIP routing information to meet the requirements of a complicated networking environment. 2.5.1 Establishing the Configuration Task 2.5.2 Advertising a Default Route 2.5.3 Disabling an Interface from Sending RIP Update Packets 2.5.4 Configuring RIP to Import Routes
2-10 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2 RIP Configuration

2.5.5 Checking the Configuration

2.5.1 Establishing the Configuration Task


Applicable Environment
In certain applications, you need to control the advertisement of RIP routing information precisely to meet requirements of a complicated networking environment. Through the following procedures, you can:
l l l

Configure the S9300 to advertise default routes to neighbors. Disable interfaces from sending RIP update packets. Configure the S9300 to import external routes from other routing protocols and filter routes before advertising routes.

Pre-configuration Tasks
Before controlling the advertisement of RIP routing information, complete the following tasks:
l

Configuring the IP addresses of interfaces to ensure that neighboring nodes can be interconnected through the network 2.3 Configuring Basic RIP Functions

Data Preparation
To control the advertisement of RIP routing information, you need the following data. No. 1 2 Data Metric of the default route to be advertised Protocol name and process ID of the imported route

2.5.2 Advertising a Default Route


Context
Do as follows on the S9300s that run RIP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


rip [ process-id ]

A RIP process is started and the RIP view is displayed.


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 2-11

2 RIP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Step 3 Run:
default-route originate [ cost cost ]

The S9300 is configured to advertise a default route. The preceding commands configure the S9300 to advertise a default route with the specified metric to the RIP neighbor. ----End

2.5.3 Disabling an Interface from Sending RIP Update Packets


Context
Do as follows on the S9300s that run RIP.

Procedure
l In the RIP view (with a high priority) 1. Run:
system-view

The system view is displayed. 2. Run:


rip [ process-id ]

A RIP process is started and the RIP view is displayed. 3. Disable a specified interface or all the interfaces from sending RIP update packets.

Run:
silent-interface all

All interfaces are disabled from sending RIP update packets.

Run:
silent-interface interface-type interface-number

The specified interface is disabled from sending RIP update packets. You can set an interface to be in the silent state so that the interface can only receive RIP update packets to update the routing table, but cannot send RIP packets. The silent-interface command has a higher priority than the rip input and rip output commands. By default, an interface is not suppressed. l In the interface view (with a low priority) 1. Run:
system-view

The system view is displayed. 2. Run:


interface interface-type interface-number

The interface view is displayed. 3. Run:


undo rip output

The interface is disabled from sending RIP update packets.


2-12 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2 RIP Configuration

You can allow an interface to send or receive RIP update packets. The undo rip output command has a lower priority than the silent-interface command. By default, an interface can send RIP update packets. ----End

2.5.4 Configuring RIP to Import Routes


Context
Do as follows on the S9300s that run RIP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


rip [ process-id ]

A RIP process is started and the RIP view is displayed. Step 3 Run:
default-cost cost

The default metric of the imported routes is set. Step 4 Run:


import-route protocol [ process-id ] [ cost cost ] [ route-policy route-policyname ]

RIP is configured to import external routes. Step 5 Run:


filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol | interface-type interface-number ]

RIP is configured to filter the imported routes when advertising them. Step 3 is optional. If the metric of imported routes is not specified in Step 4, the default metric is used. Step 5 is optional. The routing information advertised by RIP may contain the routing information imported from other protocols. In this case, you can set the protocol parameter to filter the routing information imported from a specified routing protocol. If the protocol is not set, all the routes advertised by RIP are filtered, including the imported routes and the local routes (direct routes).
NOTE

For the configuration of the ACL, see the Quidway S9300 Terabit Routing Switch Configuration Guide Basic Configuration. For the configuration of the address prefix list, see Configuring an IP Prefix List.

----End
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 2-13

2 RIP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2.5.5 Checking the Configuration


Prerequisite
The configuration for controlling the advertisement of RIP routing information is complete.

Procedure
l l l Run the display rip [ process-id | vpn-instance vpn-instance-name ] command to check the status and configuration of a RIP process. Run the display rip process-id database command to check all the active routes in the RIP database. Run the display rip process-id route command to check all the active and inactive RIP routes.

----End

Example
Run the display rip process-id database command, and you can view information in the database of the specified RIP process.
<Quidway> display rip 100 database 172.4.0.0/16, cost 1, ClassfulSumm 172.4.0.0/16, cost 1, nexthop 192.13.14.1 192.4.5.0/24, cost 2, ClassfulSumm 192.4.5.0/24, cost 2, nexthop 192.13.14.1 192.13.14.0/24, cost 0, ClassfulSumm 192.13.14.0/24, cost 0, Rip-interface

2.6 Controlling Received RIP Routing Information


This section describes how to precisely control the received RIP routes to meet requirements of a complicated networking environment. 2.6.1 Establishing the Configuration Task 2.6.2 Disabling an Interface from Receiving RIP Update Packets 2.6.3 Configuring RIP to Deny Host Routes 2.6.4 Configuring RIP to Filter Received Routes 2.6.5 Checking the Configuration

2.6.1 Establishing the Configuration Task


Applicable Environment
In certain applications, you need to control the received RIP routing information precisely to meet requirements of a complicated networking environment. Through the following procedures, you can:
l

Disable an interface from accepting RIP update packets.


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

2-14

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


l l

2 RIP Configuration

Filter the received routing information. Configure the S9300 to import external routes from other routing protocols and filter the received routes.

Pre-configuration Tasks
Before controlling the received RIP routing information, complete the following tasks:
l

Configuring the IP addresses of interfaces to ensure that neighboring nodes can be interconnected through the network Configuring Basic RIP Functions

Data Preparation
To control the received RIP routing information, you need the following data. No. 1 Data ACL used to filter routing information

2.6.2 Disabling an Interface from Receiving RIP Update Packets


Context
Do as follows on the S9300s that run RIP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface interface-type interface-number

The interface view is displayed. Step 3 Run:


undo rip input

The interface is disabled from receiving RIP update packets. You can use this command to allow a specified interface to send or receive RIP update packets. The undo rip input command has a lower priority than the silent-interface command. By default, an interface can receive RIP update packets. ----End

Issue 04 (2010-01-08)

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

2-15

2 RIP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2.6.3 Configuring RIP to Deny Host Routes


Context
Do as follows on the S9300s that run RIP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


rip [ process-id ]

A RIP process is started and the RIP view is displayed. Step 3 Run:
undo host-route

The RIP process is configured to deny received host routes. In certain cases, the S9300 receives a large number of host routes from the same network segment. These host routes are unnecessary for routing, and they waste network resources. If you run the undo host-route command, the S9300 rejects all the host routes it receives. ----End

2.6.4 Configuring RIP to Filter Received Routes


Context
Do as follows on the S9300s that run RIP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


rip [ process-id ]

A RIP process is started and the RIP view is displayed. Step 3 Configure a route filtering policy as required. l Run:
filter-policy acl-number import

The routing information that is learned from other protocols is filtered based on an ACL. l Run:
filter-policy gateway ip-prefix-name import

2-16

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2 RIP Configuration

The routing information that is advertised by neighbors is filtered based on the prefix of the destination addresses. l Run:
filter-policy ip-prefix ip-prefix-name[ gateway ip-prefix-name]import [interface-type interface-number ]

The routing information that is learned from a specified interface is filtered based on the neighbors and the prefix of the destination addresses. A router can filter routing information. You can specify an ACL or an address prefix list to configure an inbound or outbound route filtering policy. Then the router can filter the routing information that it receives or advertises. You can also configure the router to accept RIP packets only from a specified neighbor. ----End

2.6.5 Checking the Configuration


Prerequisite
The configuration for controlling the receiving of RIP routing information is complete.

Procedure
l l l l l Run the display rip [ process-id | vpn-instance vpn-instance-name ] command to check the status and configuration of a RIP process. Run the display rip process-id database [ verbose ] command to check all the active routes in the RIP database. Run the display rip process-id interface [ interface-type interface-number ] [ verbose ] command to check information about the interface that runs RIP. Run the display rip process-id neighbor [ verbose ] command to check information about the RIP neighbors. Run the display rip process-id route command to check all the active and inactive RIP routes.

----End

Example
Run the display rip process-id database command, and you can view information in the database of the specified RIP process.
<Quidway> display rip 100 database 172.4.0.0/16, cost 1, ClassfulSumm 172.4.0.0/16, cost 1, nexthop 192.13.14.1 192.4.5.0/24, cost 2, ClassfulSumm 192.4.5.0/24, cost 2, nexthop 192.13.14.1 192.13.14.0/24, cost 0, ClassfulSumm 192.13.14.0/24, cost 0, Rip-interface

2.7 Configuring RIPv2 Features


This section describes how to configure the functions of route aggregation and packet authentication in RIPv2.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 2-17

2 RIP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2.7.1 Establishing the Configuration Task 2.7.2 Configuring Route Aggregation of RIPv2 2.7.3 Setting the Authentication Mode of RIPv2 Packets 2.7.4 Checking the Configuration

2.7.1 Establishing the Configuration Task


Applicable Environment
Features specific to RIPv2 are as follows:
l l

Route aggregation Authentication of RIPv2 packets

Pre-configuration Tasks
Before configuring the features of RIPv2, complete the following tasks:
l l

Configuring the link layer protocol Configuring IP addresses of the relevant interfaces to ensure network reachability between neighboring nodes

Data Preparation
To configure the features of RIPv2, you need the following data. No. 1 2 Data RIPv2 process ID Network segment where the RIPv2 interface is located

2.7.2 Configuring Route Aggregation of RIPv2


Context
Do as follows on the S9300s that run RIPv2.

Procedure
l Enabling automatic route aggregation 1. Run:
system-view

The system view is displayed. 2. Run:


rip [ process-id ]

2-18

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2 RIP Configuration

A RIP process is started and the RIP view is displayed. 3. Run:


summary

Route aggregation of RIPv2 is enabled. Route aggregation is a function of aggregating the routes in different subnets of a natural network segment into a route with a natural mask and sending the aggregated route to other network segments. This function reduces the size of the routing table, and thus reduces the traffic volume on the network. RIPv1 does not support route aggregation. RIPv2 supports the Variable Length Subnet Mask (VLSM) and Classless Inter-Domain Routing (CIDR) protocols. When a router needs to broadcast all the subnet routes, run the undo summary command to disable automatic route aggregation of RIPv2. l Configuring RIPv2 to advertise the aggregated address 1. Run:
system-view

The system view is displayed. 2. Run:


interface interface-type interface-number

The interface view is displayed. 3. Run:


rip summary-address ip-address mask [ avoid-feedback ]

RIPv2 is configured to advertise the aggregated local IP address. ----End

2.7.3 Setting the Authentication Mode of RIPv2 Packets


Context
Do as follows on the S9300s that run RIPv2.

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 Configure the authentication mode of RIPv2 packets. l Run:
rip authentication-mode simple password

The authentication mode of RIPv2 packets is set to simple authentication, which uses a password in plain text.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 2-19

2 RIP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Run:
rip authentication-mode md5 { nonstandard password-key key-id | usual passwordkey }

The authentication mode of RIPv2 packets is set to MD5 authentication, which uses a password in cipher text. RIPv2 supports the following authentication modes:
l l

Simple authentication MD5 authentication

The simple authentication cannot guarantee security because the password is sent with the packet without encryption. For this reason, simple authentication cannot be used in the application that requires high security. If the MD authentication is adopted, you must configure the format of MD5 authentication packets. If the usual keyword is specified, the authentication packets adopt the standard format specified by the IETF. If the nonstandard keyword is specified, the authentication packets adopt the non-standard format . ----End

2.7.4 Checking the Configuration


Prerequisite
The configuration of RIPv2 features is complete.

Procedure
l l l Run the display rip [ process-id | vpn-instance vpn-instance-name ] command to check the status and configuration of a RIP process. Run the display rip process-id database [ verbose ] command to check all the active routes in the RIP database. Run the display rip process-id route command to check all the active and inactive RIP routes.

----End

2.8 Adjusting and Optimizing the RIP Network


This section describes how to configure RIP features in a special networking environment and how to optimize the RIP network. 2.8.1 Establishing the Configuration Task 2.8.2 Configuring RIP Timers 2.8.3 Setting the Interval of Update Packets and Maximum Number of Packets Sent at a Time 2.8.4 Configuring Split Horizon and Poison Reverse 2.8.5 Configuring RIP to Check the Validity of Update Packets 2.8.6 Configuring a RIP Neighbor
2-20 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2 RIP Configuration

2.8.7 Checking the Configuration

2.8.1 Establishing the Configuration Task


Applicable Environment
In special networking environments, RIP features need to be configured and the performance of the RIP network needs to be improved. Through the following procedures, you can:
l l

Change the convergence speed of the RIP network by adjusting the RIP timer. Improve the performance of the RIP network by changing the number of update packets that an interface can send and the interval for sending update packets. Configure split horizon and poison reverse to prevent routing loops. Check validity of packets and authenticate packets in the networking environment that requires high security. Configure special RIP features on an interface or a link.

l l

Pre-configuration Tasks
Before adjusting and optimizing the RIP network, complete the configuration tasks:
l

Configuring the IP addresses of interfaces to ensure that neighboring nodes can be interconnected through the network 2.3 Configuring Basic RIP Functions

Data Preparation
To adjust and optimize the RIP network, you need the following data. No. 1 2 3 4 5 Data Values of timers Number of update packets that an interface sends each time and the interval for sending update packets Maximum number of equal-cost routes Authentication method of packets and passwords used in authentication IP addresses of RIP neighbors

2.8.2 Configuring RIP Timers


Context
Do as follows on the S9300s that run RIP.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 2-21

2 RIP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


rip [ process-id ]

A RIP process is started and the RIP view is displayed. Step 3 Run:
timers rip update age suppress garbage-collect

The RIP timers are set. RIP uses four timers: Update timer, Age timer, Suppress timer, and Garbage-collect timer. Changing the values of the timers affects the convergence speed of RIP routes. The new value of a RIP timer takes effect immediately after you change the value.

CAUTION
Improper setting of the four timers causes route flapping. The relation between the values of the timers is as follows: update < age, suppress < garbage-collect For example, if the value of the Update timer is greater than the value of the Age timer, the S9300 cannot notify the neighbors when a RIP route changes within the update period. By default, the Update timer is 30 seconds; the Age timer is 180 seconds; the Suppress timer is 0 seconds; the Garbage-collect timer is four times the value of Update timer, namely, 120 seconds. Actually, the Garbage-collect timer is not fixed. When the Update timer is set to 30 seconds, the Garbage-collect timer may range from 90 seconds to 120 seconds. Before deleting an unreachable route from the routing table, RIP sends update packets four times to advertise the route. The metric of the route is set to 16 in the update packets. In this manner, all the neighbors learn that the route is unreachable. A route does not always become unreachable at the beginning of an update cycle; therefore, the value of the Garbage-collect timer is three or four times the value of the update timer.
NOTE

When setting the RIP timers, consider the network performance. In addition, you must set the same timers on all the S9300s that run RIP to avoid unnecessary network traffic and route flapping.

----End

2-22

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2 RIP Configuration

2.8.3 Setting the Interval of Update Packets and Maximum Number of Packets Sent at a Time
Context
Do as follows on the S9300s that run RIP.

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:


rip pkt-transmit { interval interval | number pkt-count }*

The interval for sending RIP update packets on the interface and the maximum number of packets that are sent each time are set. ----End

2.8.4 Configuring Split Horizon and Poison Reverse


Context
If you configure split horizon and poison reverse simultaneously, only the poison reverse function takes effect. Do as follows on the S9300s that run RIP.

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:


rip split-horizon

Split horizon is enabled. Step 4 Run:


rip poison-reverse

Poison reverse is enabled.


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 2-23

2 RIP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

In a non-broadcast multi-access (NBMA) network that uses the Frame Relay or X.25 protocol, if no sub-interfaces are used, disable split horizon to ensure normal exchange of routing information. ----End

2.8.5 Configuring RIP to Check the Validity of Update Packets


Context
Do as follows on the S9300s that run RIP.

Procedure
l Checking the zero fields in RIPv1 packets 1. Run:
system-view

The system view is displayed. 2. Run:


rip [ process-id ]

A RIP process is started and the RIP view is displayed. 3. Run:


checkzero

The RIP process is configured to check the zero fields of RIPv1 packets. In a RIPv1 packet, certain fields must be zero. These fields are zero fields. When receiving a packet, the RIPv1 process checks the zero fields of the packet. The RIPv1 process does not process the packet if the value of a zero field is not 0. The concept of zero field is not applicable to RIPv2 packets; therefore, the checkzero command is invalid for RIPv2 packets. l Checking the source IP addresses of RIP update packets 1. Run:
system-view

The system view is displayed. 2. Run:


rip [ process-id ]

A RIP process is started and the RIP view is displayed. 3. Run:


verify-source

The RIP process is configured to check the source IP addresses of update packets. RIP checks the source IP address of a received update packet and does not process the packet if the packet does not pass the check. By default, RIP checks the source IP addresses of update packets. ----End
2-24 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2 RIP Configuration

2.8.6 Configuring a RIP Neighbor


Context
Do as follows on the S9300s that run RIP.

Context
Generally, RIP uses a broadcast or a multicast address to send packets. If RIP runs on a link that does not support broadcast or multicast packets, you must specify RIP neighbors manually.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


rip [ process-id ]

A RIP process is started and the RIP view is displayed. Step 3 Run:
peer ipv4-address

A RIP neighbor is configured. ----End

2.8.7 Checking the Configuration


Prerequisite
All the configurations for optimizing the RIP network are complete.

Procedure
l l l l l Run the display rip [ process-id | vpn-instance vpn-instance-name ] command to check the status and configuration of a RIP process. Run the display rip process-id database [ verbose command to check all the active routes in the RIP database. Run the display rip process-id interface [ interface-type interface-number ] [ verbose ] command to check information about the interface that runs RIP. Run the display rip process-id neighbor [ verbose ] command to check information about the RIP neighbors. Run the display rip process-id route command to check all the active and inactive RIP routes.

----End
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 2-25

2 RIP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Example
Run the display rip process-id interface [ interface-type interface-number ] [ verbose ] command, and you can view information about a RIP interface. The information indicates that the interface status is Up.
<Quidway> display rip 1 interface Vlanif10 -----------------------------------------------------------------Interface IP Address State Protocol MTU -----------------------------------------------------------------Vlanif10 1.1.1.2 UP RIPv1 Compatible 500

2.9 Configuring the Network Management Function of RIP


This section describes how to bind a RIP process to the Management Information Base (MIB). 2.9.1 Establishing the Configuration Task 2.9.2 Binding a RIP Process to the MIB 2.9.3 Checking the Configuration

2.9.1 Establishing the Configuration Task


Applicable Environment
Through the following procedures, you can bind a RIP process to the MIB in the networking environment that uses the NMS.

Pre-configuration Tasks
Before configuring the network management function of RIP, complete the following tasks:
l

Configuring the IP addresses of interfaces to ensure that neighboring nodes can be interconnected through the network 2.3 Configuring Basic RIP Functions

Data Preparation
None.

2.9.2 Binding a RIP Process to the MIB


Context
Do as follows on the S9300s that run RIP.

Procedure
Step 1 Run:
system-view

The system view is displayed.


2-26 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2 RIP Configuration

Step 2 Run:
rip mib-binding process-id

A RIP process is bound to the MIB. This command specifies the RIP process ID that is bound to the MIB, that is, the ID of the RIP process that receives packets of the Simple Network Management Protocol (SNMP). ----End

2.9.3 Checking the Configuration


Prerequisite
The network management function of RIP is configured.

Procedure
l Run the display current-configuration command to check the configuration parameters of the S9300.

----End

2.10 Maintaining RIP


This section describes how to debug RIP.

Context

CAUTION
Debugging affects the performance of the system. So, after debugging, run the undo debugging all command to disable it immediately. When a RIP fault occurs, run the following debugging commands in the user view to locate the fault. For how to enable debugging, see Chapter 1 "Information Center Configuration" in the Quidway S9300 Terabit Routing Switch Configuration Guide - System Management. For the description of the debugging commands, see the Quidway S9300 Terabit Routing Switch Debugging Reference.

Procedure
l l Run the debugging rip process-id [ brief | error | event | job | packet | receive | routeprocessing | send | timer ] command to enable debugging of RIP packets. Run the debugging rip backup command to enable debugging of RIP backup information.

----End

Issue 04 (2010-01-08)

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

2-27

2 RIP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2.11 Configuration Examples


This section provides several configuration examples of RIP. 2.11.1 Example for Configuring the RIP Version 2.11.2 Example for Configuring RIP to Import Routes

2.11.1 Example for Configuring the RIP Version


Networking Requirements
As shown in Figure 2-1, RIP needs to be enabled on all the interfaces of S9300-A, S9300-B, S9300-C, and S9300-D. The S9300s are interconnected through RIPv2. Figure 2-1 Networking diagram for configuring the RIP version
S9300-C

GE1/0/1

GE1/0/1 GE1/0/0 S9300-A S9300 S9300-A S9300-B S9300-B S9300-B S9300-C S9300-D GE1/0/0 S9300-B GE1/0/2 GE1/0/2 S9300-D IP address 192.168.1.1/24 192.168.1.2/24 172.16.1.1/24 10.1.1.1/24 172.16.1.2/24 10.1.1.2/24

Interface GigabitEthernet1/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2

VLANIF interface VLANIF 10 VLANIF 10 VLANIF 20 VLANIF 30 VLANIF 20 VLANIF 30

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

Assign IP addresses to all the interfaces to ensure network reachability. Enable RIP on each S9300 and configure the basic RIP functions. Configure RIPv2 on each S9300 and check the accurate subnet masks.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2 RIP Configuration

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

IDs of the VLANs that the interfaces belong to, as shown in Figure 2-1 IP addresses of VLANIF interfaces, as shown in Figure 2-1 RIP version on the S9300s, namely, RIPv2

Procedure
Step 1 Configure VLANs that the related interfaces belong to.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] vlan 10 S9300-A-vlan10] quit [S9300-A] interface GigabitEthernet 1/0/0 [S9300-A-GigabitEthernet1/0/0] port hybrid pvid vlan 10 [S9300-A-GigabitEthernet1/0/0] port hybrid untagged vlan 10 [S9300-A-GigabitEthernet1/0/0] quit

The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of S9300-A, and are not mentioned here. Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ip address 192.168.1.1 24 [S9300-A-Vlanif10] quit

The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of S9300-A, and are not mentioned here. Step 3 Configure the basic RIP functions. Configure S9300-A.
[S9300-A] rip [S9300-A-rip-1] network 192.168.1.0 [S9300-A-rip-1] quit

Configure S9300-B.
[S9300-B] rip [S9300-B-rip-1] [S9300-B-rip-1] [S9300-B-rip-1] [S9300-B-rip-1] network 192.168.1.0 network 172.16.0.0 network 10.0.0.0 quit

Configure S9300-C.
[S9300-C] rip [S9300-C-rip-1] network 172.16.0.0 [S9300-C-rip-1] quit

Configure S9300-D.
[S9300-D] rip [S9300-D-rip-1] network 10.0.0.0 [S9300-D-rip-1] quit

# Check the RIP routing table of S9300-A.


[S9300-A] display rip 1 route Route Flags: R - RIP A - Aging, S - Suppressed, G - Garbage-collect

Issue 04 (2010-01-08)

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

2-29

2 RIP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


------------------------------------------------------------------------Peer 192.168.1.2 on Vlanif10 Destination/Mask Nexthop Cost Tag Flags Sec 10.0.0.0/8 192.168.1.2 1 0 RA 14 172.16.0.0/16 192.168.1.2 1 0 RA 14 192.168.1.0/24 192.168.1.2 1 0 RA 14

From the routing table, you can find that the routes advertised by RIPv1 use natural masks. Step 4 Configure the RIP version. # Configure RIPv2 on S9300-A.
[S9300-A] rip [S9300-A-rip-1] version 2 [S9300-A-rip-1] quit

# Configure RIPv2 on S9300-B.


[S9300-B] rip [S9300-B-rip-1] version 2 [S9300-B-rip-1] quit

# Configure RIPv2 on S9300-C.


[S9300-C] rip [S9300-C-rip-1] version 2 [S9300-C-rip-1] quit

# Configure RIPv2 on S9300-D.


[S9300-D] rip [S9300-D-rip-1] version 2 [S9300-D-rip-1] quit

Step 5 Verify the configuration. # Check the RIP routing table of S9300-A.
[S9300-A] display rip 1 route Route Flags: R - RIP A - Aging, S - Suppressed, G - Garbage-collect ------------------------------------------------------------------------Peer 192.168.1.2 on Vlanif10 Destination/Mask Nexthop Cost Tag Flags Sec 10.1.1.0/24 192.168.1.2 1 0 RA 32 172.16.1.0/24 192.168.1.2 1 0 RA 32 192.168.1.0/24 192.168.1.2 1 0 RA 14

From the routing table, you can find that the routes advertised by RIPv2 contain more accurate subnet masks. ----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # vlan 10 # interface Vlanif10 ip address 192.168.1.1 255.255.255.0 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10

2-30

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


# rip 1 version 2 network 192.168.1.0 # return l

2 RIP Configuration

Configuration file of S9300-B


# sysname S9300-B # vlan batch 10 20 30 # interface Vlanif10 ip address 192.168.1.2 255.255.255.0 # interface Vlanif20 ip address 172.16.1.1 255.255.255.0 # interface Vlanif30 ip address 10.1.1.1 255.255.255.0 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # rip 1 version 2 network 192.168.1.0 network 172.16.0.0 network 10.0.0.0 # return

Configuration file of S9300-C


# sysname S9300-C # vlan batch 20 # interface Vlanif20 ip address 172.16.1.2 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # rip 1 version 2 network 172.16.0.0 # return

Configuration file of S9300-D


# sysname S9300-D # vlan batch 30 # interface Vlanif30 ip address 10.1.1.2 255.255.255.0 #

Issue 04 (2010-01-08)

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

2-31

2 RIP Configuration
interface GigabitEthernet1/0/2 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # rip 1 version 2 network 10.0.0.0 # return

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2.11.2 Example for Configuring RIP to Import Routes


Networking Requirements
As shown in Figure 2-2, two RIP processes, RIP100 and RIP200, run on S9300-B. S9300-B exchanges routing information with S9300-A through RIP100 and exchanges routing information with S9300-C through RIP200. You must configure route import on S9300-B so that the two RIP processes can import RIP routes of each other. By default, the metric of the imported routes of RIP200 is set to 3. In addition, you must configure a filtering policy on S9300-B. Thus, S9300-B can filter out a route imported from RIP200 (route to 192.168.4.0/24) and does not advertise the route to S9300-A. Figure 2-2 Network diagram of configuring RIP to import external route

GE2/0/0 GE1/0/0 S9300-A RIP 100

GE1/0/0 S9300-B

GE1/0/1 GE1 /0/1 RIP 200 S9300-C

GE1/0/2 GE1/0/3

S9300 S9300-A S9300-A S9300-B S9300-B S9300-C S9300-C S9300-C

Interface GigabitEthernet1/0/0 GigabitEthernet2/0/0 GigabitEthernet1/0/0 GigabitEthernet1/0/1 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/3

VLANIF interface VLANIF 10 VLANIF 50 VLANIF 10 VLANIF 20 VLANIF 20 VLANIF 30 VLANIF 40

IP address 192.168.1.1/24 192.168.0.1/24 192.168.1.2/24 192.168.2.1/24 192.168.2.2/24 192.168.3.1/24 192.168.4.1/24

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

Enable RIP100 and RIP200 on S9300 and specify the network segment.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2 RIP Configuration

2. 3.

Configure S9300-B to import routes of a RIP process into the routing table of the other RIP process, and set the default metric of the routes imported from RIP200 to 3. Configure an ACL on S9300-B to filter the routes imported from RIP200.

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

IDs of the VLANs that the interfaces belong to, as shown in Figure 2-2 IP addresses of VLANIF interfaces, as shown in Figure 2-2 RIP100 enabled network segments on S9300-A: 192.168.1.0 and 192.168.1.0 Network segments with RIP100 and RIP200 enabled on S9300-B: 192.168.1.0 and 192.168.2.0. RIP200 enabled network segments on S9300-C: 192.168.2.0, 192.168.3.0, and 192.168.4.0 Default metric of routes that are imported to RIP100 from RIP200: 3 ACL 2000 for the routes that are imported to RIP100 from RIP200, which denies the routes of network segment 192.168.4.0

l l l

Procedure
Step 1 Configure VLANs that the related interfaces belong to.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] vlan 10 [S9300-A-Vlan10] quit [S9300-A] interface GigabitEthernet 1/0/0 [S9300-A-GigabitEthernet1/0/0] port hybrid [S9300-A-GigabitEthernet1/0/0] port hybrid [S9300-A-GigabitEthernet1/0/0] quit [S9300-A] vlan 50 [S9300-A-Vlans0] quit [S9300-A]interface GigabitEthernet 2/0/0 [S9300-A-GigabitEthernet2/0/0] port hybrid [S9300-A-GigabitEthernet2/0/0] port hybrid [S9300-A-GigabitEthernet2/0/0] quit

pvid vlan 10 untagged vlan 10

pvid vlan 50 untaged vlan 50

The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A, and are not mentioned here. Step 2 Assign an IP address to each VLANIF interface.
[S9300] interface vlanif 10 [S9300-Vlanif10] ip address 192.168.1.1 24 [S9300-Vlanif10] quit [S9300] interface vlanif 50 [S9300-vlanif50] ip address 192.168.0.1 24 [S9300-vlanif50] quit

The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A, and are not mentioned here. Step 3 Configure the basic RIP functions. # Enable RIP process 100 on S9300-A.
[S9300-A] rip 100 [S9300-A-rip-100] network 192.168.0.0 [S9300-A-rip-100] network 192.168.1.0 [S9300-A-rip-1] quit

Issue 04 (2010-01-08)

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

2-33

2 RIP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

# Enable RIP processes 100 and 200 on S9300-B.


[S9300-B] rip 100 [S9300-B-rip-100] [S9300-B-rip-100] [S9300-B] rip 200 [S9300-B-rip-200] [S9300-B-rip-200] network 192.168.1.0 quit network 192.168.2.0 quit

# Enable RIP process 200 on S9300-C.


[S9300-C] rip 200 [S9300-C-rip-200] network 192.168.2.0 [S9300-C-rip-200] network 192.168.3.0 [S9300-C-rip-200] network 192.168.4.0 [S9300-C-rip-1] quit

# Check the routing table of S9300-A.


[S9300-A] display ip routing-table Route Flags: R - relay, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 7 Routes : 7 Destination/Mask 192.168.0.0/24 192.168.0.1/32 192.168.1.0/24 192.168.1.1/32 192.168.1.2/32 127.0.0.0/8 127.0.0.1/32 127.255.255.255/32 255.255.255.255/32 Proto Direct Direct Direct Direct Direct Direct Direct Direct Direct Pre 0 0 0 0 0 0 0 0 0 Cost 0 0 0 0 0 0 0 0 0 Flags D D D D D D D D D NextHop 192.168.0.1 127.0.0.1 192.168.1.1 127.0.0.1 192.168.1.2 127.0.0.1 127.0.0.1 127.0.0.1 127.0.0.1 Interface Vlanif50 InLoopBack0 Vlanif10 InLoopBack0 Vlanif10 InLoopBack0 InLoopBack0 InLoopBack0 InLoopBack0

Step 4 Configure the RIP processes to import external routes. # On S9300-B, set the default metric of imported routes to 3 and configure the RIP processes to import routes into each other's routing table.
[S9300-B] rip 100 [S9300-B-rip-100] [S9300-B-rip-100] [S9300-B-rip-100] [S9300-B] rip 200 [S9300-B-rip-200] [S9300-B-rip-200] default-cost 3 import-route rip 200 quit import-route rip 100 quit

# View the routing table of S9300-A after the routes are imported.
[S9300-A] display ip routing-table Route Flags: R - relay, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 10 Routes : 10 Destination/Mask 192.168.0.0/24 192.168.0.1/32 192.168.1.0/24 192.168.1.1/32 192.168.1.2/32 192.168.2.0/24 192.168.3.0/24 192.168.4.0/24 Proto Direct Direct Direct Direct Direct RIP RIP RIP Pre 0 0 0 0 0 100 100 100 Cost 0 0 0 0 0 4 4 4 Flags D D D D D D D D NextHop 192.168.0.1 127.0.0.1 192.168.1.1 127.0.0.1 192.168.1.2 192.168.1.2 192.168.1.2 192.168.1.2 Interface Vlanif50 InLoopBack0 Vlanif10 InLoopBack0 Vlanif10 Vlanif10 Vlanif10 Vlanif10

2-34

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


127.0.0.0/8 127.0.0.1/32 127.255.255.255/32 255.255.255.255/32 Direct Direct Direct Direct 0 0 0 0 0 0 0 0 D D D D 127.0.0.1 127.0.0.1 127.0.0.1 127.0.0.1

2 RIP Configuration
InLoopBack0 InLoopBack0 InLoopBack0 InLoopBack0

Step 5 Configure S9300-B to filter imported routes. # Configure an ACL on S9300-B and add a rule to the ACL. The rule denies the packets sent from 192.168.4.0/24.
[S9300-B] acl 2000 [S9300-B-acl-basic-2000] rule deny souce 192.168.4.0 0.0.0.255 [S9300-B-acl-basic-2000] rule permit [S9300-B-acl-basic-2000] quit

# Configure S9300-B to filter the route to 192.168.4.0/24 that is imported from RIP200 according to the ACL rule.
[S9300-B] rip 100 [S9300-B-rip-100] filter-policy 2000 export [S9300-B-rip-1] quit

Step 6 Verify the configuration. # View the RIP routing table of S9300-A after the routes are filtered.
[S9300-A] display ip routing-table Route Flags: R - relay, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 9 Routes : 9 Destination/Mask 192.168.0.0/24 192.168.0.1/32 192.168.1.0/24 192.168.1.1/32 192.168.1.2/32 192.168.2.0/24 192.168.3.0/24 127.0.0.0/8 127.0.0.1/32 127.255.255.255/32 255.255.255.255/32 Proto Direct Direct Direct Direct Direct RIP RIP Direct Direct Direct Direct Pre 0 0 0 0 0 100 100 0 0 0 0 Cost 0 0 0 0 0 4 4 0 0 0 0 Flags D D D D D D D D D D D NextHop 192.168.0.1 127.0.0.1 192.168.1.1 127.0.0.1 192.168.1.2 192.168.1.2 192.168.1.2 127.0.0.1 127.0.0.1 127.0.0.1 127.0.0.1 Interface Vlanif50 InLoopBack0 Vlanif10 InLoopBack0 Vlanif10 Vlanif10 Vlanif10 InLoopBack0 InLoopBack0 InLoopBack0 InLoopBack0

----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # vlan batch 10 50 # interface Vlanif50 ip address 192.168.0.1 255.255.255.0 # interface Vlanif10 ip address 192.168.1.1 255.255.255.0 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 50

Issue 04 (2010-01-08)

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

2-35

2 RIP Configuration
port hybrid untagged vlan 50 # rip 100 network 192.168.0.0 network 192.168.1.0 # return l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of S9300-B


# sysname S9300-B # vlan batch 10 20 # acl number 2000 rule 5 deny source 192.168.4.0 0.0.0.255 rule 10 permit # interface Vlanif10 ip address 192.168.1.2 255.255.255.0 # interface Vlanif20 ip address 192.168.2.1 255.255.255.0 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 20 # rip 100 default-cost 3 network 192.168.1.0 filter-policy 2000 export import-route rip 200 # rip 200 network 192.168.2.0 import-route rip 100 # return

Configuration file of S9300-C


# sysname S9300-C # vlan batch 20 30 40 # interface Vlanif30 ip address 192.168.3.1 255.255.255.0 # interface Vlanif40 ip address 192.168.4.1 255.255.255.0 # interface Vlanif20 ip address 192.168.2.2 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface GigabitEthernet1/0/3 port hybrid pvid vlan 40 port hybrid untagged vlan 40

2-36

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


# rip 200 network 192.168.2.0 network 192.168.3.0 network 192.168.4.0 # return

2 RIP Configuration

Issue 04 (2010-01-08)

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

2-37

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

3 RIPng Configuration

3
About This Chapter

RIPng Configuration

This chapter describes the RIPng fundamentals and configuration steps for basic RIPng functions, controlling RIPng routing information, and adjusting and optimizing RIPng networks, along with typical examples. 3.1 RIPng Overview The Routing Information Protocol Next Generation (RIPng) protocol is an extension of RIP-2 in an IPv4 network. Most RIP-related concepts can apply to RIPng. 3.2 Features Supported by the S9300 In the S9300, you can modify the routing policy of RIPng by configuring RIPng route attributes. You can also control the advertising and receiving of RIPng routing information to meet the requirements of a complex network. In particular networking environments, you are required to configure certain features of RIPng to optimize the performance of a RIPng network. 3.3 Configuring Basic RIPng Functions This section describes how to configure basic RIPng functions. 3.4 Configuring RIPng Route Attributes This section describes how to change route selection by configuring RIPng route attributes. 3.5 Controlling the Advertising of RIPng Routing Information This section describes how to control the advertising of RIPng routing information in the complicated networking environment. 3.6 Controlling the Receiving of RIPng Routing Information This section describes how to control the receiving of RIPng routing information in the complicated networking environment. 3.7 Optimizing a RIPng Network This section describes how to adjust and optimize RIPng networks. 3.8 Maintaining RIPng This section describes how to maintain RIPng. 3.9 Configuration Examples This section provides a configuration example of RIPng.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 3-1

3 RIPng Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

3.1 RIPng Overview


The Routing Information Protocol Next Generation (RIPng) protocol is an extension of RIP-2 in an IPv4 network. Most RIP-related concepts can apply to RIPng.

Extension of RIP
For IPv6 applications, RIPng extends RIP as follows:
l l

UDP port number: uses UDP port number 521 to send and receive routing information. Multicast address: uses FF02::9 as the multicast address of a RIPng router in the local scope of the links. Prefix length: uses a 128-bit (the mask length) prefix in the destination address. Next hop address: uses a 128-bit IPv6 address. Source address: uses the local link address FE80::/10 as the source address to send RIPng Update packets.

l l l

Operation Principle of RIPng


RIPng is a protocol based on the Distance-Vector (DV) algorithm. It exchanges the routing information through User Datagram Protocol (UDP) packets. The number of the port used by RIPng is 521. RIPng employs hop count to measure the distance to the destination. The distance is called the metric value. In RIPng, the hop count from a S9300 to its directly connected network is 0, and that to a network, which can be reached through another S9300, is 1, and so on. The hop count that is equal to or exceeds 16 is defined as infinity, that is, the destination network or the host is unreachable. By default, RIPng sends an Update packet every 30 seconds. If no Update packet is received from a neighbor in 180 seconds, RIPng marks all routes learnt from the neighbor unreachable. If no Update packet is received from a neighbor in 300 seconds, RIPng deletes the routes of the neighbor from the routing table. To improve the performance and to prevent routing loops, RIPng supports both split horizon and poison reverse. In addition, RIPng can import routes from other routing protocols. Each S9300 running RIPng manages a routing database, which contains the routing entries to all the accessible destinations in a network. These routing entries contain the following information:
l l l l

Destination address: indicates the IPv6 address of a host or a network. Next hop address: indicates the address of the next S9300 to the destination. Interface: indicates the interface through which an IP packet is forwarded. Cost: indicates the hop count to the destination. The value is an integer that ranges from 0 to 16. When the value is 16, the network or the host is unreachable. Timer: indicates the time since a routing entry was last updated. The timer is reset to 0 when a routing entry is updated. Route tag: indicates a label that differentiates the routes of internal routing protocols and those of external routing protocols.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

3-2

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

3 RIPng Configuration

3.2 Features Supported by the S9300


In the S9300, you can modify the routing policy of RIPng by configuring RIPng route attributes. You can also control the advertising and receiving of RIPng routing information to meet the requirements of a complex network. In particular networking environments, you are required to configure certain features of RIPng to optimize the performance of a RIPng network.

3.3 Configuring Basic RIPng Functions


This section describes how to configure basic RIPng functions. 3.3.1 Establishing the Configuration Task 3.3.2 Enabling RIPng and Entering the RIPng View 3.3.3 Enabling RIPng in the Interface View 3.3.4 Checking the Configuration

3.3.1 Establishing the Configuration Task


Applicable Environment
The configuration of basic RIPng functions involves the configuration of basic RIPng features. After the configuration, the RIPng features are available. During the RIPng configuration, you should first enable RIPng. If you run RIPng-related commands in the interface view, these commands take effect only after RIPng is enabled in the system view.

Pre-configuration Tasks
Before configuring basic RIPng functions, complete the following tasks:
l l

Enabling IPv6 on the S9300 Configuring the IP addresses of the interfaces to keep the network layers accessible

Data Preparation
To configure basic RIPng functions, you need the following data. No. 1 2 Data RIPng process ID Interfaces on which RIPng is enabled

Issue 04 (2010-01-08)

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

3-3

3 RIPng Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

3.3.2 Enabling RIPng and Entering the RIPng View


Context
Do as follows on the RIPng router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ripng [ process-id ]

RIPng is enabled and the RIPng view is displayed. When only one RIPng process is run, process-id is not specified. That is, process-id defaults to 1. When the process is cancelled, the ripng enable command on the interface need to be reconfigured. ----End

3.3.3 Enabling RIPng in the Interface View


Context
Do as follows on the RIPng router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface interface-type interface-number

The interface view is displayed. The interface is at the network side of the S9300. To enable the S9300 to learn the routes of the network segment where the interface resides, ensure that the link status of the interface is Up. Step 3 Run:
ripng process-id enable

RIPng is enabled on the specified interface.


NOTE

In the interface view, this command is invalid if no IPv6 address is configured.

3-4

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

3 RIPng Configuration

If multiple interfaces on an S9300 connect other devices, repetitively perform Step 2 and Step 3. ----End

3.3.4 Checking the Configuration


Procedure
l l Run display ripng [ process-id ] command to check the configuration of the RIPng process. Run display ripng process-id route command to check all activated and inactivated RIPng routes.

----End

Example
Run the display ripng [ process-id ] command, and you can view the configuration of the specified RIPng process.
<Quidway> display ripng 100 Public vpn6-instance name : RIPng process : 100 Preference : 100 Checkzero : Enabled Default Cost : 0 Maximum number of balanced paths : 6 Update time : 30 sec Age time : 180 sec Suppress time : 0 sec Garbage-Collect time : 120 sec Number of periodic updates sent : 0 Number of trigger updates sent : 1 Number of routes in database : 1 Number of interfaces enabled : 1

Run the display ripng process-id route command, and you can view all activated and inactivated RIPng routes of the specified RIPng process.
<Quidway> display ripng 100 route Route Flags: A - Aging, S - Suppressed, G - Garbage-collect ---------------------------------------------------------------Peer FE80::200:5EFF:FE04:B602 on Vlanif10 Dest 3FFE:C00:C18:1::/64, via FE80::200:5EFF:FE04:B602, cost 2, tag 0, A, 34 Sec Dest 3FFE:C00:C18:2::/64, via FE80::200:5EFF:FE04:B602, cost 2, tag 0, A, 34 Sec Peer FE80::200:5EFF:FE04:B601 on Vlanif10 Dest 3FFE:C00:C18:1::/64, via FE80::200:5EFF:FE04:B601, cost 2, tag 0, A, 13 Sec Dest 3FFE:C00:C18:3::/64, via FE80::200:5EFF:FE04:B601, cost 2, tag 0, A, 13 Sec Peer FE80::200:5EFF:FE04:3302 on Vlanif10 Dest 100::/32, via FE80::200:5EFF:FE04:3302, cost 2, tag 0, A, 6 Sec Dest 4000:1::/64, via FE80::200:5EFF:FE04:3302, cost 2, tag 0, A, 6 Sec Dest 4000:2::/64, via FE80::200:5EFF:FE04:3302, cost 2, tag 0, A, 6 Sec Dest 4000:3::/64, via FE80::200:5EFF:FE04:3302, cost 2, tag 0, A, 6 Sec Dest 4000:4::/64,

Issue 04 (2010-01-08)

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

3-5

3 RIPng Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

3.4 Configuring RIPng Route Attributes


This section describes how to change route selection by configuring RIPng route attributes. 3.4.1 Establishing the Configuration Task 3.4.2 Configuring RIPng Protocol Preference 3.4.3 Configuring Additional Metrics of an Interface 3.4.4 Configuring the Maximum Number of Equal-Cost Routes 3.4.5 Checking the Configuration

3.4.1 Establishing the Configuration Task


Applicable Environment
In actual applications, to meet the requirements of a complicated networking environment, you can change RIPng routing policies by configuring RIPng route attributes. After performing the configuration procedures in this section, you can realize the following:
l l

Change route selection by adjusting the additional metric of a RIPng interface. Change the matching order of routing protocols by configuring the RIPng preference when multiple routing protocols contain routes to the same destination. Configure load balancing among multiple equal-cost routes.

Pre-configuration Tasks
Before configuring RIPng route attributes, complete the following tasks:
l l

Configuring the IP addresses of interfaces to make the network layers accessible 3.3 Configuring Basic RIPng Functions

Data Preparation
To configure RIPng route attributes, you need the following data. No. 1 2 3 Data Additional metric of the interface RIPng preference Maximum number of equal-cost routes

3-6

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

3 RIPng Configuration

3.4.2 Configuring RIPng Protocol Preference


Context
Do as follows on the RIPng router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ripng [ process-id ]

The RIPng process is enabled and the RIPng view is displayed. Step 3 Run:
preference { preference | route-policy route-policy-name }*

The RIPng preference is set. Each routing protocol has its preference, according to which the routing policy selects the optimal route. The RIPng preference can be set manually. The greater the value is, the lower the preference is. ----End

3.4.3 Configuring Additional Metrics of an Interface


Context
Do as follows on the RIPng router:

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:


ripng metricin value

The metric added to a received route is set. Step 4 Run:


ripng metricout value

The metric added to a sent route is set.


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 3-7

3 RIPng Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Using the ripng metricin command, you can add an additional metric to a received route, and then add the route to the routing table. As a result, the metric in the routing table changes. The ripng metricout command is used for route advertisement. When a route is advertised, an additional metric is added, but the metric in the routing table does not change.
NOTE

If the S9300 is connected to other devices that run RIPng through multiple interfaces, repeat Step 2 to Step 4 to configure the metrics of all interfaces.

----End

3.4.4 Configuring the Maximum Number of Equal-Cost Routes


Context
Do as follows on the RIPng router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ripng [ process-id ]

The RIPng process is enabled and the RIPng view is displayed. Step 3 Run:
maximum load-balancing number

The maximum number of equal-cost routes is set. ----End

3.4.5 Checking the Configuration


Procedure
l l l Run display ripng [ process-id ] command to check the configuration of the RIPng process. Run display ripng process-id database command to check routes in the RIPng database. Run display ripng process-id route command to check all activated and inactivated RIPng routes.

----End

3.5 Controlling the Advertising of RIPng Routing Information


This section describes how to control the advertising of RIPng routing information in the complicated networking environment.

3-8

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

3 RIPng Configuration

3.5.1 Establishing the Configuration Task 3.5.2 Configuring RIPng Route Aggregation 3.5.3 Configuring RIPng to Advertise the Default Routes 3.5.4 Configuring the Default Cost for External Routes Imported by RIPng 3.5.5 Configuring RIPng to Import External Routes 3.5.6 Checking the Configuration

3.5.1 Establishing the Configuration Task


Applicable Environment
In actual applications, to meet the requirements of a complicated networking environment, it is required to control the advertising of RIPng routing information. Through the configuration procedures in this section, the following can be implemented:
l l l

Advertise default routes to neighbors. Restrict interfaces from sending RIPng Update packets. Import external routes from various routing protocols and filter routes to be advertised.

Pre-configuration Tasks
Before configuring a S9300 to control the advertising of RIPng routing information, complete the following tasks:
l l

Configuring the IP addresses of interfaces to make the network layers accessible 3.3 Configuring Basic RIPng Functions

Data Preparation
To control the advertising of RIPng routing information, you need the following data. No. 1 2 Data Metric of the default route to be advertised Protocol name and process ID of the external route to be imported

3.5.2 Configuring RIPng Route Aggregation


Context
Do as follows on the RIPng router:

Procedure
Step 1 Run:
system-view

Issue 04 (2010-01-08)

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

3-9

3 RIPng Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The system view is displayed. Step 2 Run:


interface interface-type interface-number

The interface view is displayed. Step 3 Run:


ripng summary-address ipv6-address prefix-length [ avoid-feedback ]

RIPng route aggregation is configured. This command is used to configure the RIPng router to advertise the IPv6 prefixes aggregated on an interface instead of the specific route. ----End

3.5.3 Configuring RIPng to Advertise the Default Routes


Context
Do as follows on the RIPng router:

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:


ripng default-route { only | originate } [ cost cost ]

RIPng is enabled to advertise a default route. Configure RIPng to advertise the default routes according to the actual networking:
l

only: only the IPv6 default routes (::/0) are advertised, and the advertising of other routes is suppressed. originate: only the IPv6 default routes (::/0) are advertised, but the advertising of other routes is not affected.

The RIPng default routes are forcibly advertised by the Update packets through the specified interface, regardless of whether the route exists in the IPv6 routing table. ----End

3-10

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

3 RIPng Configuration

3.5.4 Configuring the Default Cost for External Routes Imported by RIPng
Context
Do as follows on the RIPng router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ripng [ process-id ]

The RIPng view is displayed. Step 3 Run:


default-cost cost

The default cost for external routes imported by RIPng is set. When no metric is specified, the command sets the default cost for external routes imported by RIPng from other routing protocols. ----End

3.5.5 Configuring RIPng to Import External Routes


Context
Do as follows on the RIPng router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ripng [ process-id ]

The RIPng view is displayed. Step 3 (Optional) Run:


default-cost cost

The default cost for imported external routes is set. If no route cost is specified for imported routes, the default cost is used. Step 4 Run:
import-route protocol [ process-id ] [ cost cost ] [ route-policy route-policyname ]

Issue 04 (2010-01-08)

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

3-11

3 RIPng Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

External routes are imported. Step 5 (Optional) Run:


filter-policy { acl6-number | ipv6-prefix ipv6-prefix-name } export [ protocol [ process-id ] ]

RIPng is configured to filter the imported and advertised routing information. RIPng can filter the imported routes based on the ACL6 or IPv6 prefix list. Only the routes matching the rules are advertised. If protocol is not specified in the command, all the routing information to be advertised is filtered, including the imported routes and the local RIPng routes (equivalent to the directly connected routes). ----End

3.5.6 Checking the Configuration


Procedure
l l Run display ripng process-id database command to check the routes in the RIPng database. Run display ripng process-id route command to check all activated and inactivated RIPng routes.

----End

3.6 Controlling the Receiving of RIPng Routing Information


This section describes how to control the receiving of RIPng routing information in the complicated networking environment. 3.6.1 Establishing the Configuration Task 3.6.2 Configuring RIPng to Filter the Received Routes 3.6.3 Checking the Configuration

3.6.1 Establishing the Configuration Task


Applicable Environment
In actual applications, to meet the requirements of a complicated networking environment, it is required to control the receiving of RIPng routing information accurately. Through the configuration procedures in this section, the following can be implemented:
l l l

Disable an interface from receiving RIPng Update packets. Filter the received routing information. Import external routes from various routing protocols and filter the imported routes.

Pre-configuration Tasks
Before configuring a S9300 to control the receiving of RIPng routing information, complete the following tasks:
3-12 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


l l

3 RIPng Configuration

Configuring the IP addresses of interfaces to make the network layers accessible Configuring Basic RIPng Functions

Data Preparation
To control the receiving of RIPng routing information, you need the following data. No. 1 Data ACL used to filter the routing information

3.6.2 Configuring RIPng to Filter the Received Routes


Context
Do as follows on the RIPng router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ripng [ process-id ]

The RIPng view is displayed. Step 3 Run:


filter-policy { acl6-number | ipv6-prefix ipv6-prefix-name } import

The imported routes are filtered. You can specify the ACL6 or IPv6 prefix list to filter the imported routes. Only the routes passing the filter can be added to the RIPng routing table. ----End

3.6.3 Checking the Configuration


Procedure
l l Run display ripng process-id database command to check the routes in the RIPng database. Run display ripng process-id route command to check all activated and inactivated RIPng routes.

----End
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 3-13

3 RIPng Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

3.7 Optimizing a RIPng Network


This section describes how to adjust and optimize RIPng networks. 3.7.1 Establishing the Configuration Task 3.7.2 Configuring RIPng Timers 3.7.3 Configuring Split Horizon and Poison Reverse 3.7.4 Enabling Zero Field Check of the RIPng Packets 3.7.5 Checking the Configuration

3.7.1 Establishing the Configuration Task


Applicable Environment
In particular networking environments, you need to configure RIPng features and optimize the performance of a RIPng network. Through the configuration procedures in this section, the following can be implemented:
l l

Change the convergence speed of the RIPng network by adjusting RIPng timers. Configure split horizon and poison reverse to avoid routing loops.

Pre-configuration Tasks
Before optimizing a RIPng network, complete the following tasks:
l l

Configuring the IP addresses of interfaces to make the network layers accessible Configuring Basic RIPng Functions

Data Preparation
To optimize a RIPng network, you need the following data. No. 1 Data Values of timers

3.7.2 Configuring RIPng Timers


Context
Do as follows on the RIPng router:

Procedure
Step 1 Run:
3-14 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


system-view

3 RIPng Configuration

The system view is displayed. Step 2 Run:


ripng [ process-id ]

The RIPng view is displayed. Step 3 Run:


timers ripng update age suppress garbage-collect

The RIPng timers are configured. Note that the route flapping occurs if the values of these four timers are not configured properly. The relationship of the values is: update<age, suppress<garbage-collect. For example, if the update time is longer than the aging time, and if RIPng routes change, during the update time, S9300s cannot inform their neighbors immediately.
NOTE

The configured suppress timer does not take effect on the local system.

----End

3.7.3 Configuring Split Horizon and Poison Reverse


Context
Do as follows on the RIPng router:

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:


ripng split-horizon

Split horizon is enabled. Step 4 Run:


ripng poison-reverse

Poison reverse is enabled. Split horizon means that the route received through an interface is not sent through this interface again. Routing loops are thus avoided. But in NBMA networks such as Frame Relay and X.25, if no sub-interface is configured, split horizon must be disabled to ensure the accurate advertisement of the routes.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 3-15

3 RIPng Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Poison reverse means that the routes learned from an interface are also sent through the same interface. However, the metric of this route is set to 16. That means the route is unreachable. ----End

3.7.4 Enabling Zero Field Check of the RIPng Packets


Context
Do as follows on the RIPng router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ripng [ process-id ]

The RIPng view is displayed. Step 3 Run:


checkzero

The zero field check is configured for RIPng packets. Certain fields in a RIPng packet must be 0s, and they are called zero fields. If the value of any zero field is not 0, the packet is not processed. ----End

3.7.5 Checking the Configuration


Procedure
l l l l l Run display ripng [ process-id ] command to check the configuration of the RIPng process. Run display ripng process-id database [ verbose ] command to check the routes in the RIPng database. Run display ripng process-id interface [ interface-type interface-number ] [ verbose ] command to check information about RIPng interfaces. Run display ripng process-id neighbor [ verbose ] command to check information about RIPng neighbors. Run display ripng process-id route command to check all activated and inactivated RIPng routes.

----End

3.8 Maintaining RIPng


This section describes how to maintain RIPng.
3-16 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

3 RIPng Configuration

Context

CAUTION
Debugging affects the performance of the system. So, after debugging, run the undo debugging all command to disable it immediately. When a RIPng fault occurs, run the following debugging commands in the user view to debug RIPng and locate the fault. For the procedure of displaying the debugging information, refer to the chapter "Information Center Configuration" in the Quidway S9300Terabit Routing SwitchConfiguration Guide Device Management. For the related debugging command, refer to the Quidway S9300Terabit Routing SwitchDebugging Reference. Action Debug the specified RIPng process. Debug the specified RIPng interface. Command debugging ripng process-id [ brief | error | event | job | packet | receive | route-processing | send | timer ] debugging ripng interface-type interface-number [ packet | receive | send ]

3.9 Configuration Examples


This section provides a configuration example of RIPng. 3.9.1 Example for Configuring RIPng to Filter the Received Routes

3.9.1 Example for Configuring RIPng to Filter the Received Routes


Networking Requirements
As shown in Figure 3-1, the prefix length of all the IPv6 addresses is 64 bits. In addition, the VLANIF interfaces between the neighboring S9300s are assigned IPv6 link-local addresses. All the S9300s must learn IPv6 routing information on the network through RIPng. S9300-B should filter the routes received from S9300-C (3::/64). That is, S9300-B does not add the routes to its own routing table or advertise the routes to S9300-A.

Issue 04 (2010-01-08)

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

3-17

3 RIPng Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Figure 3-1 Networking diagram for configuring RIPng to filter the received routes
VLANIF20 GE1/0/0 VLANIF30 GE2/0/0

S9300-A

S9300-B
GE1/0/0 VLANIF20

GE2/0/0 VLANIF10 1::1/64

VLANIF40 2::1/64 GE1/0/0 VLANIF30 GE2/0/0 VLANIF50 GE3/0/0 3::1/64

S9300-C

Device name S9300-A S9300-A S9300-B S9300-B S9300-C S9300-C S9300-C

Interface GE2/0/0 GE1/0/0 GE1/0/0 GE2/0/0 GE1/0/0 GE2/0/0 GE3/0/0

VLANIF interface VLANIF 10 VLANIF 20 VLANIF 20 VLANIF 30 VLANIF 30 VLANIF 40 VLANIF 50

IP address 1::1/64 Generated automatically Generated automatically Generated automatically Generated automatically 2::1/64 3::1/64

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. Enable RIPng on each S9300 so that the S9300s can communicate with each other. Configure an ACL on S9300-B to filter the received routes.

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

IDs of the VLANs that the interfaces belong to, as shown in Figure 3-1 RIPng1 enabled on each S9300 ACL6 2000 on S9300-B, which rejects the routes from network segment 3::/64

Procedure
Step 1 Add interfaces to VLANs.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] vlan 10 [S9300-A-vlan10] quit [S9300-A] interface GigabitEthernet 2/0/0 [S9300-A-GigabitEthernet2/0/0] port hybrid pvid vlan 10 [S9300-A-GigabitEthernet2/0/0] port hybrid untagged vlan 10 [S9300-A-GigabitEthernet2/0/0] quit [S9300-A] vlan 20 [S9300-A-vlan20] quit

3-18

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


[S9300-A] interface GigabitEthernet 1/0/0 [S9300-A-GigabitEthernet1/0/0] port hybrid pvid vlan 20 [S9300-A-GigabitEthernet1/0/0] port hybrid untagged vlan 20 [S9300-A-GigabitEthernet1/0/0] quit

3 RIPng Configuration

The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A and are not mentioned here. Step 2 Assign IP addresses to the VLANIF interfaces.
[S9300-A] ipv6 [S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ipv6 enable [S9300-A-Vlanif10] ipv6 address 1::1/64 [S9300-A-Vlanif10] quit [S9300-A] interface vlanif 20 [S9300-A-Vlanif20] ipv6 enable [S9300-A-Vlanif20] ipv6 address auto link-local [S9300-A-Vlanif20] quit

The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A and are not mentioned here. Step 3 Configure the basic RIPng functions. # Configure S9300-A.
[S9300-A] ripng 1 [S9300-A-ripng-1] quit [S9300-A] interface vlanif [S9300-A-Vlanif10] ripng 1 [S9300-A-Vlanif10] quit [S9300-A] interface vlanif [S9300-A-Vlanif20] ripng 1 [S9300-A-Vlanif20] quit

10 enable 20 enable

# Configure S9300-B.
[S9300-B] ripng 1 [S9300-B-ripng-1] quit [S9300-B] interface vlaif 20 [S9300-B-Vlanif20] ripng 1 enable [S9300-B-Vlanif20] quit [S9300-B] interface vlanif 30 [S9300-B-Vlanif30] ripng 1 enable [S9300-B-Vlanif30] quit

# Configure S9300-C.
[S9300-C] ripng 1 [S9300-C-ripng-1] quit [S9300-C] interface vlanif [S9300-C-Vlanif30] ripng 1 [S9300-C-Vlanif30] quit [S9300-C] interface vlanif [S9300-C-Vlanif40] ripng 1 [S9300-C-Vlanif40] quit [S9300-C] interface vlanif [S9300-C-Vlanif50] ripng 1 [S9300-C-Vlanif50] quit

30 enable 40 enable 50 enable

# Display the RIPng routing table of S9300-B.


[S9300-B] display ripng 1 route Route Flags: A - Aging, S - Suppressed, G - Garbage-collect ---------------------------------------------------------------Peer FE80::F54C:0:9FDB:1 on Vlanif30 Dest 2::/64, via FE80::F54C:0:9FDB:1, cost 1, tag 0, A, 3 Sec

Issue 04 (2010-01-08)

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

3-19

3 RIPng Configuration
Dest 3::/64, via FE80::F54C:0:9FDB:1, cost

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

1, tag 0, A, 3 Sec

Peer FE80::D472:0:3C23:1 on Vlanif20 Dest 1::/64, via FE80::D472:0:3C23:1, cost 1, tag 0, A, 4 Sec

The preceding information shows that the RIPng routing table of S9300-B contains the routes of network segment 3::/64. # Display the RIPng routing table of S9300-A.
[S9300-A] display ripng 1 route Route Flags: A - Aging, S - Suppressed, G - Garbage-collect ---------------------------------------------------------------Peer FE80::476:0:3624:1 on Vlanif20 Dest 2::/64, via FE80::476:0:3624:1, cost 2, tag 0, A, 21 Sec Dest 3::/64, via FE80::476:0:3624:1, cost 2, tag 0, A, 21 Sec

The preceding information shows that the RIPng routing table of S9300-A contains the routes of network segment 3::/64 advertised by S9300-B. Step 4 Configure S9300-B to filter the received routes.
[S9300-B] acl ipv6 number 2000 [S9300-B-acl6-basic-2000] rule deny source 3:: 64 [S9300-B-acl6-basic-2000] rule permit [S9300-B-acl6-basic-2000] quit [S9300-B] ripng 1 [S9300-B-ripng-1] filter-policy 2000 import [S9300-B-ripng-1] quit

Step 5 Verify the configuration. # Check the RIPng routing table of S9300-B. The RIPng routing table should not contain the routes of network segment 3::/64.
[S9300-B] display ripng 1 route Route Flags: A - Aging, S - Suppressed, G - Garbage-collect ---------------------------------------------------------------Peer FE80::F54C:0:9FDB:1 on Vlanif30 Dest 2::/64, via FE80::F54C:0:9FDB:1, cost 1, tag 0, A, 14 Sec Peer FE80::D472:0:3C23:1 on Vlanif20 Dest 1::/64, via FE80::D472:0:3C23:1, cost 1, tag 0, A, 25 Sec

# Check the RIPng routing table of S9300-A. The RIPng routing table should not contain the routes of network segment 3::/64.
[S9300-A] display ripng 1 route Route Flags: A - Aging, S - Suppressed, G - Garbage-collect ---------------------------------------------------------------Peer FE80::476:0:3624:1 on Vlanif20 Dest 2::/64, via FE80::476:0:3624:1, cost 2, tag 0, A, 7 Sec

----End

3-20

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

3 RIPng Configuration

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # ipv6 # vlan batch 10 20 # interface Vlanif10 ipv6 enable ipv6 address 1::1/64 ripng 1 enable # interface Vlanif20 ipv6 enable ipv6 address auto link-local ripng 1 enable # interface GigabitEthernet1/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # ripng 1 # return

Configuration file of S9300-B


# sysname S9300-B # ipv6 # vlan batch 20 30 # acl ipv6 number 2000 rule 0 deny source 3::/64 rule 1 permit # interface Vlanif20 ipv6 enable ipv6 address auto link-local ripng 1 enable # interface Vlanif30 ipv6 enable ipv6 address auto link-local ripng 1 enable # interface GigabitEthernet1/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # ripng 1 filter-policy 2000 import # return

Configuration file of S9300-C

Issue 04 (2010-01-08)

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

3-21

3 RIPng Configuration
# sysname S9300-C # ipv6 # vlan batch 30 40 50 # interface Vlanif30 ipv6 enable ipv6 address auto link-local ripng 1 enable # interface Vlanif40 ipv6 enable ipv6 address 2::1/64 ripng 1 enable # interface Vlanif50 ipv6 enable ipv6 address 3::1/64 ripng 1 enable # interface GigabitEthernet1/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # interface GigabitEthernet3/0/0 port hybrid pvid vlan 50 port hybrid untagged vlan 50 # ripng 1 # return

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

3-22

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

4
About This Chapter

OSPF Configuration

This chapter describes the concepts of OSPF and the procedure for configuring OSPF, and provides configuration examples of OSPF. 4.1 Introduction to OSPF This section describes the principle and concepts of OSPF. 4.2 OSPF Features Supported by the S9300 This section describes the OSPF features supported by the S9300. 4.3 Configuring Basic OSPF Functions This section describes how to enable OSPF and configure the basic OSPF functions. 4.4 Establishing and Maintaining OSPF Adjacencies This section describes how to set parameters related to packet transmission between adjacent OSPF devices. 4.5 Configuring OSPF Area Attributes This section describes how to configure a stub area, an NSSA area, and a virtual link in an OSPF domain. 4.6 Configuring OSPF Attributes on Networks of Different Types This section describes how to use certain commands to change the network type of an interface to meet the requirements of the network, how to configure the DR election function in a broadcast network or an NBMA network, and how to configure OSPF features in an NBMA network. 4.7 Configuring OSPF Route Attributes This section describes how to set the link cost, priority of OSPF routes, and maximum number of equal-cost routes. 4.8 Configuring OSPF Route Aggregation This section describes how to configure the OSPF route aggregation function. 4.9 Configuring Filtering of OSPF Routing Information This section describes how to configure the S9300 to filter the OSPF routing information and import routes learned by other protocols. 4.10 Adjusting and Optimizing the OSPF Network
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-1

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

This section describes how to adjust and optimize the OSPF network according to the actual networking environment. 4.11 Configuring OSPF GR This section describes how to configure OSPF GR to prevent inaccurate route calculation and packet loss after the S9300 restarts. 4.12 Configuring BFD for OSPF This section describes how to implement fast convergence on an OSPF network through BFD. 4.13 Configuring the Authentication Function on an OSPF Network This section describes how to configure the OSPF area authentication mode and interface authentication mode. 4.14 Configuring Network Management Functions of OSPF This section describes how to bind an OSPF process to the Management Information Base (MIB) and configure the OSPF trap function and log function. 4.15 Maintaining OSPF This section describes how to restart an OSPF process, delete the OSPF information, and debug OSPF. 4.16 Configuration Examples This section provides several configuration examples of OSPF.

4-2

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

4.1 Introduction to OSPF


This section describes the principle and concepts of OSPF. The Open Shortest Path First (OSPF) protocol, developed by the Internet Engineering Task Force (IETF), is an interior gateway protocol based on the link status. Currently, OSPF version 2, as explained in RFC 2328, is used for IPv4.
NOTE

In this chapter, OSPF refers to OSPFv2, unless otherwise specified.

Features of OSPF
OSPF has the following features:
l l

Wide usage: OSPF can run on a large-scale network. Fast convergence: When the network topology changes, the OSPF process sends update packets to synchronize the link state databases (LSDBs) of all the devices in an autonomous system (AS). Loop-free: According to the collected link status, OSPF calculates routes by using the shortest path first (SPT) algorithm. This algorithm prevents routing loops. Area partitioning: An AS is partitioned into areas to simplify AS management. The aggregated routing information is exchanged between areas, which saves network bandwidth. Equal-cost routes: OSPF allows multiple equal-cost routes to the same destination. Routing hierarchy: Four types of routes are available. They are listed in a descending order of IP precedence: intra-area routes, inter-area routes, Type 1 external routes, and Type 2 external routes. Support for authentication: Packets are authenticated based on areas and interfaces to ensure the security of packet exchange. Multicast: Protocol packets are sent in multicast mode on certain types of links. This reduces the interference to the devices that are not enabled with OSPF.

l l

Calculation of OSPF Routes


The calculation of OSPF routes is described as follows:
l

Based on the surrounding network topology, each OSPF device generates a link state advertisement (LSA). The OSPF device sends update packets containing the LSA to other OSPF devices. Each OSPF device collects the LSAs from other devices in the same AS, and all these LSAs constitute the LSDB. An LSA describes the network topology around an S9300, whereas an LSDB describes the network topology of the entire AS. OSPF devices transform the LSDB into a directed map with costs. The directed map represents the topology of an area. All devices in the same area have the same map. According to the directed map, each S9300 uses the SPF algorithm to calculate the shortest path tree with itself being the root. The tree shows the routes to every node in the area.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-3

Issue 04 (2010-01-08)

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

OSPF Areas
Assume that all nodes in a large-scale network run OSPF and the number of nodes increases with the expansion of the network. This leads to a large LSDB on each node. Such an LSDB occupies a large amount of memory, complicates the SPF calculation, and increases the CPU usage of the node. After the network is expanded, the network topology changes more frequently. As a result, a great number of OSPF packets are transmitted on the network, which wastes bandwidth. In addition, every time the network topology changes, all the nodes need to recalculate the routes. OSPF solves the preceding problems by partitioning an AS into areas. An area is regarded as a logical group and each group is identified by an area ID. At the border of an area resides an S9300 instead of a link. A network segment or a link can belong to only one area. That is, for each interface that runs OSPF, you must specify the area that the interface belongs to. Figure 4-1 shows the areas of an AS. Figure 4-1 OSPF areas

Area1

Area3

Area0

Area2

Area4

In a partitioned AS, routes can be aggregated on the area border routers (ABRs) to reduce the LSAs advertised to other areas. Route aggregation also minimizes the influence caused by changes of the topology.

Types of the S9300 in an AS


Based on their locations in an AS, the S9300s that run OSPF are classified into the following types:
l

Internal routers All interfaces of the S9300s of this type belong to the same OSPF area. Area border routers The S9300s of this type can belong to more than two areas, but one of the areas must be a backbone area. An ABR is used to connect the backbone area to the non-backbone areas. An ABR can be physically or logically connected to the backbone area.

4-4

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


l

4 OSPF Configuration

Backbone routers A minimum of one interface on the S9300 of this type belongs to the backbone area. Therefore, all ABRs and the internal nodes in Area 0 are backbone routers.

Autonomous system boundary routers (ASBRs) The S9300 that exchanges routing information with other ASs is called an ASBR. The ASBR may not be located on the boundary of an AS. It can be an internal router or an ABR. When an OSPF device imports the external routing information, the device becomes an ASBR.

Figure 4-2 shows various types of OSPF devices. Figure 4-2 OSPF device types
OSPF Area1

ASBR Area3

Area0 Internal Router

Backbone Router

Area4 Area2 ABR

OSPF Network Types


Based on the types of the link layer protocol, OSPF classifies networks into the following types:
l

Broadcast: If the link layer protocol is Ethernet or Fiber Distributed Digital Interface (FDDI), OSPF considers the network type as broadcast by default. In a broadcast network, Hello packets, Link State Update (LSU) packets, and Link State Acknowledgement (LSAck) packets are transmitted in multicast mode, and Database Description (DD) packets and Link State Request (LSR) packets are transmitted in unicast mode. In multicast mode, 224.0.0.5 is the reserved multicast IP address of the OSPF device; 224.0.0.6 is the reserved multicast IP address of the OSPF Designated Router (DR). NBMA: If the link layer protocol is Frame Relay (FR), ATM, or X.25, OSPF considers the network type as NBMA by default. In an NBMA network, the protocol packets, including Hello packets, DD packets, LSR packets, LSU packets, and LSAck packets, are transmitted in unicast mode. Point-to-multipoint (P2MP): OSPF does not consider the network type as P2MP by default, regardless of link layer protocols. A P2MP network must be forcibly changed from other network types. Generally, a non-full-mesh NBMA network is changed to a P2MP network. In a P2MP network, the protocol packets, including Hello packets, DD packets, LSR
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-5

Issue 04 (2010-01-08)

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

packets, LSU packets, and LSAck packets, are transmitted to the multicast IP address 224.0.0.5.
l

Point-to-point (P2P): If the link layer protocol is the Point-to-Point Protocol (PPP), High Level Data Link Control (HDLC), or Link Access Procedure Balanced (LAPB), OSPF considers the network type as P2P by default. In a P2P network, the protocol packets, including Hello packets, DD packets, LSR packets, LSU packets, and LSAck packets, are transmitted to the multicast address 224.0.0.5.

The link layer protocol of the physical interface of the S9300 is Ethernet. Therefore, OSPF considers the network type of the S9300 interface as broadcast by default.

4.2 OSPF Features Supported by the S9300


This section describes the OSPF features supported by the S9300.

Interfaces That Support OSPF


The creation of OSPF routing tables and configurations of OSPF functions must be performed on Layer 3 interfaces. Except the management network interface, the physical interfaces on the S9300, however, are Layer 2 interfaces. To solve this problem, do as follows on the S9300:
l

Create a VLAN and add a Layer 2 interface to the VLAN to define a VLANIF interface. Then, assign an IP address to the VLANIF interface and enable OSPF functions on the VLANIF interface. Set the IP address of the loopback interface and enable OSPF functions.
NOTE

In the following configuration tasks, the configurations in the interface view must be completed on the VLANIF interface or loopback interface unless otherwise specified. For details about the Layer 2 interface configuration, see the Quidway S9300 Terabit Routing Switch Configuration Guide - Ethernet.

Multi-Process
OSPF supports multi-process. Up to OSPF 150 processes can run on the same S9300, they are independent of each other. The routing exchange between different OSPF processes is similar to the interaction between different routing protocols. An interface of an S9300 can belong to only one OSPF process.

Authentication
OSPF supports packet authentication. Only the OSPF packets that pass the authentication are accepted; otherwise, the neighbor relationship cannot be established. The S9300 supports the following authentication modes:
l l

Area authentication Interface authentication

If both modes are available, interface authentication is preferred.

OSPF Hot Standby


The S9300 supports the hot standby feature of OSPF. OSPF backs up necessary data of the master main control board to the slave main control board. Whenever the master main control
4-6 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

board fails, the slave main control board becomes active. In this manner, OSPF functions normally. The S9300 backs up only the OSPF configuration during the switchover between the master and slave main control boards. OSPF performs Graceful Restart (GR), sends requests to neighbors to establish adjacencies with them, and synchronizes the LSDB.
NOTE

For details about hot standby, see the Quidway S9300 Terabit Routing Switch Configuration Guide Reliability.

Smart-Discover
Generally, the S9300 sends Hello packets periodically from an OSPF-enabled interface. By sending Hello packets, S9300s can establish and maintain neighbor relationship, and elect a designated router (DR) and a backup designated router (BDR) on the multi-address network of broadcast or NBMA. When the S9300s establish neighbor relationship or elect the DR and BDR on a multi-address network, an interface can send Hello packets only when the Hello timer expires. This affects the speed of establishing neighbor relationship and electing the DR and BDR.
NOTE

l l

The interval for sending Hello packets on an interface depends on the interval set on the interface. The default interval for sending Hello packets varies according to the network type.

The smart-discover function can solve the preceding problems. In broadcast and NBMA networks, smart-discover helps to establish the neighbor relationship and elect the DR and BDR quickly.
l

When the status of a neighbor reaches 2-way or changes from 2-way or higher to Init for the first time, as shown in Figure 4-3, the interface enabled with smart-discover receives a Hello packet from the neighbor. This interface then detects the change of the neighbor status and sends Hello packets to other neighbors immediately, rather than waiting until the Hello timer expires.

Figure 4-3 Change of the state machine of a neighbor

Down

Init

2-way

Exstart

Exchange

Loading

Full

Attempt (NBMA)

When the status of an interface of the DR or the BDR on the multi-address network changes, the interface enabled with smart-discover sends Hello packets on the network segment and participates the election of a DR or a BDR.

On a P2P or P2MP network, the principle of establishing the adjacency quickly is the same as the principle that applies to broadcast and NBMA networks.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-7

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

OSPF GR
GR is a function that is used to restart a device gracefully. GR ensures uninterrupted traffic forwarding and prevent route flapping that will occur if the S9300 restarts within a short period of time. If the S9300 does not restart OSPF in GR mode, the adjacent device removes the S9300 from the neighbor list and notifies other devices. This leads to SPF recalculation. If OSPF restarts in a short period of time, route flapping may occur. To prevent unnecessary SPF calculation, when the S9300 restarts OSPF in GR mode, the S9300 notifies the adjacent node that it will recover within a few seconds. The adjacent node, therefore, does not delete the S9300 from the neighbor list. Other devices do not detect that the S9300 restarts. This avoids the route flapping caused by the changes of the neighbor relationship.
NOTE

Unless otherwise specified, protocol restart in this document means restarting OSPF in GR mode.

When the S9300 restarts OSPF, the GR restarter does not age the forwarding information. At the same time, the GR helper retains the topology information or routes obtained from the GR restarter for a certain period. This ensures that the traffic forwarding is not interrupted when OSPF is restarted.
NOTE

The S9300 supports OSPF GR. For details about OSPF GR, see "OSPF" in the Quidway S9300 Terabit Routing Switch Feature Description - IP Routing.

4.3 Configuring Basic OSPF Functions


This section describes how to enable OSPF and configure the basic OSPF functions. 4.3.1 Establishing the Configuration Task 4.3.2 Starting an OSPF Process and Entering the OSPF View 4.3.3 Configuring a Network Segment That Belongs to an Area 4.3.4 Checking the Configuration

4.3.1 Establishing the Configuration Task


Applicable Environment
If OSPF needs to be configured on the S9300s on the network, configure the basic OSPF functions on each device. That is, you must enable OSPF, and specify the interface that runs OSPF and the area number on each device. Then, you can configure other functions of OSPF. When multiple devices are configured in the same area, most configuration data, such as the timer, filter, and aggregation, must be kept consistent in the area. Incorrect configuration may make neighboring nodes fail to send messages to each other, and even lead to path congestion or self-loop.

Pre-configuration Tasks
Before configuring the basic OSPF functions, complete the following tasks:
4-8 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


l l l

4 OSPF Configuration

Configuring the link layer protocol Creating VLANs and adding corresponding interfaces to the VLANs Assigning IP addresses to VLANIF interfaces to ensure network reachability between neighboring nodes
NOTE

To create the VLAN that each interface belongs to, you can add interfaces to the VLAN in default mode or by running the port trunk allow-pass vlan command. Use the same method to add interfaces to a VLAN on both ends of a link. If you run the port trunk allow-pass command to add interfaces to a VLAN, add the directly connected physical interfaces in the same network segment to the same VLAN. In this manner, the corresponding VLANIF interfaces can be directly connected at the network layer. For details, see the Quidway S9300 Terabit Routing Switch Configuration Guide - Ethernet.

Data Preparation
To configure the basic OSPF functions, you need the following data. No. 1 2 3 Data Router ID OSPF process ID Area that each interface belongs to

4.3.2 Starting an OSPF Process and Entering the OSPF View


Context
The S9300 supports multiple OSPF processes. When multiple OSPF processes are enabled on an S9300, you need to specify different process IDs. An OSPF process ID is valid in the local area and does not affect packet exchange with other devices. Different S9300s, therefore, can exchange packets even if their process IDs are different. The OSPF commands that you run in the interface view are not affected regardless of whether OSPF is enabled or disabled. When OSPF is disabled, the commands in the interface view still work. Do as follows on each S9300 in an area.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf [ process-id | router-id router-id ]
*

An OSPF process is started and the OSPF view is displayed.


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-9

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

To ensure the stability of OSPF, determine the router ID of each device during network planning. Manually configure the router ID for each device by running the ospf [ process-id | router-id router-id ] * command. When you manually configure the router ID of an S9300, ensure that the router ID is unique in the AS.
TIP

Generally, the configured router ID is the same as the IP address of a specific Loopback interface on the S9300.

----End

4.3.3 Configuring a Network Segment That Belongs to an Area


Context
Do as follows on each S9300 in an area.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf [ process-id ]

An OSPF process is started and the OSPF view is displayed. Step 3 Run:
area area-id

The OSPF area view is displayed. Step 4 Run:


network ip-address wildcard-mask

A network segment is specified for the area. This command sets the network segment that an OSPF interface belongs to. A network segment belongs to only one area. That is, you must specify a specific area for each OSPF interface. OSPF can run on an interface if the following conditions are met:
l

The mask length of the interface address is longer than or equal to the mask length specified by the network command. The primary IP address of the interface must be in network segment specified by the network command.

For a loopback interface, OSPF advertises the IP address of the loopback interface as a 32-bit host route by default, which is irrelevant to the mask length configured on the interface. If the route of the network segment of the loopback interface needs to be advertised, you need to set the network to a non-broadcast type such as P2P, in the interface view. For details, see 4.6.2 Setting the Network Type of an OSPF Interface. ----End
4-10 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

4.3.4 Checking the Configuration


Prerequisite
All the basic OSPF functions are configured.

Procedure
l l Run the display ospf [ process-id ] cumulative command to check the statistics of an OSPF process. Run the display ospf [ process-id ] lsdb [ brief ] or display ospf [ process-id ] lsdb [ router | network | summary | asbr | ase | nssa | opaque-link | opaque-area | opaque-as ] [ linkstate-id ] [ originate-router [ advertising-router-id ] | self-originate ] command to check information about the LSDB of an OSPF process. Run the display ospf [ process-id ] peer [ { [ interface-type interface-number ] [ neighborid ] } | brief | last-nbr-down ] command to check information about an OSPF neighbor. Run the display ospf [ process-id ] routing [ ipv4-address [ mask | mask-length ] ] [ interface interface-type interface-number ] [ nexthop nexthop-address ] or display ospf [ process-id ] routing router-id [ router-id ] command to check the OSPF routing table.

l l

----End

Example
Run the display ospf peer command. If the OSPF neighbor is in Full state, it means that the OSPF neighbor relationship is established.
<Quidway> display ospf peer OSPF Process 1 with Router ID 10.1.1.2 Neighbors Area 0.0.0.0 interface 10.1.1.2(Vlanif10)'s neighbors Router ID: 10.1.1.1 Address: 10.1.1.1 GR State: Normal State: Full Mode:Nbr is Slave Priority: 1 DR: 10.1.1.1 BDR: None MTU: 0 Dead timer due in 35 sec Neighbor is up for 00:00:05 Authentication Sequence: [ 0 ]

4.4 Establishing and Maintaining OSPF Adjacencies


This section describes how to set parameters related to packet transmission between adjacent OSPF devices. 4.4.1 Establishing the Configuration Task 4.4.2 Setting the Interval for Sending Hello Packets on an Interface 4.4.3 Setting the Dead Interval of Neighbors 4.4.4 Setting the Interval for Retransmitting LSAs 4.4.5 Restricting Retransmission of OSPF Packets 4.4.6 Suppressing OSPF Packets on an Interface
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-11

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4.4.7 Checking the Configuration

4.4.1 Establishing the Configuration Task


Applicable Environment
After an OSPF process is started, OSPF interfaces periodically send Hello packets to discover and maintain the OSPF neighbor relationship. After receiving these Hello packets, an OSPF device checks parameters carried in the packets. If the parameters of the two neighboring routers are consistent, they establish the neighbor relationship. If the S9300 does not receive any Hello packet from the neighbor within the dead interval, the S9300 considers the neighbor invalid. By setting the Hello interval and dead interval, you can speed up the network convergence and utilize network bandwidth resources effectively. After the adjacency is established, both peers send LSU packets to synchronize the LSDB. When an S9300 sends an LSA to its neighbor, it waits for the LSAck packet from the neighbor. If the S9300 does not receive the LSAck packet within the interval for retransmitting LSAs, it retransmits the LSA. You can set a proper LSA retransmission interval to improve the convergence speed of the OSPF network. You can restrict the number of times the OSPF packet is retransmitted by setting the retransmission limitation for OSPF (RL-OSPF). If the S9300 retransmits the LSA specified times without receiving the LSAck packet, it disconnects the neighbor. This avoids the infinite loop caused by consecutive retransmission when the neighbor does not receive the packet. To isolate an interface of the S9300 from an OSPF process, you can suppress sending and accepting of OSPF packets on the interface.

Pre-configuration Tasks
Before configuring the OSPF neighbor or adjacency relationship, complete the following task:
l

4.3 Configuring Basic OSPF Functions

Data Preparation
To configure the OSPF neighbor or adjacency relationship, you need the following data. No. 1 2 3 4 Data Interval for sending Hello packets Dead interval of the neighbor Interval for retransmitting OSPF packets Maximum retransmission count of OSPF packets

4-12

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

4.4.2 Setting the Interval for Sending Hello Packets on an Interface


Context
Set the interval for sending Hello packets according to the topology change rate and bandwidth utilization. Do as follows on the S9300.

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:


ospf timer hello interval

The interval for sending Hello packets is set. By default, an interface of the S9300 sends Hello packets at an interval of 30 seconds. A smaller value of interval means faster detection of topology changes and higher bandwidth consumption on the network. The value of interval must be the same on the directly connected interfaces of two neighboring routers. ----End

Postrequisite
If the network type is changed, the default interval for sending Hello packets on the interface is restored.

4.4.3 Setting the Dead Interval of Neighbors


Context
Do as follows on the S9300 to set the dead interval of neighbors according to the rate of topology changes and interval of Hello packets.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface interface-type interface-number

Issue 04 (2010-01-08)

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

4-13

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The interface view is displayed. Step 3 Run:


ospf timer dead interval

The dead interval of the neighbors of the interface is set. By default, the dead interval of a neighbor of the S9300 is 40 seconds. If the S9300 does not receive Hello packets from a neighbor within the dead interval, the S9300 considers the neighbor as invalid. The dead interval must be at least four times of the interval for sending Hello packets. The neighbors on the same network segment must use the same dead interval. ----End

Postrequisite
If the network type is changed, the default dead interval of the neighbor is restored.

4.4.4 Setting the Interval for Retransmitting LSAs


Context
When an S9300 sends an LSA to its neighbor, the S9300 needs to wait for the LSAck packet from the neighbor. If the S9300 does not receive the LSAck packet within the interval for retransmitting LSAs, the S9300 retransmits the LSA. On a low-speed network, set a relatively long interval for retransmitting LSAs on an interface because a short retransmission interval may cause unnecessary retransmission. The interval is usually longer than the duration of a round trip of a packet between two nodes. Do as follows on the S9300 to set the retransmission interval according to the bandwidth of the network.

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:


ospf timer retransmit interval

The interval for transmitting LSAs is set on the interface. By default, the interval for retransmitting LSAs on an interface is 5 seconds. ----End
4-14 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

4.4.5 Restricting Retransmission of OSPF Packets


Context
The retransmission mechanism applies to DD packets, update packets, and Request packets. When an S9300 sends these packets to its neighbor, the S9300 needs to wait for the LSAck packet from the neighbor. If the S9300 does not receive the LSAck packet, it retransmits the packet. After you enable the retransmission restriction function and set the maximum number of retransmission attempts, the S9300 disconnects the neighbor after the number of retransmission attempts reaches the maximum value. This prevents unnecessary retransmission. Do as follows on the S9300 to set the retransmission restriction according to the bandwidth of the network.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf [ process-id ]

The OSPF view is displayed. Step 3 Run:


retransmission-limit [ max-number ]

The retransmission restriction function is enabled and the maximum number of retransmission attempts is set. If you run the retransmission-limit command without setting optional parameter maxnumber, the maximum number of retransmission attempts is 30. By default, retransmission restriction is not enabled for OSPF processes. ----End

4.4.6 Suppressing OSPF Packets on an Interface


Context
After an OSPF interface is set to be in the silent state, the interface can still advertise its direct route. The Hello packets on the interface, however, are blocked, and neighbor relationship cannot be set up on the interface. In this manner, the OSPF network becomes more adaptive and network resources are saved. Do as follows on the S9300 according to the networking requirement.

Procedure
Step 1 Run:
system-view

The system view is displayed.


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-15

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Step 2 Run:
ospf [ process-id ]

The OSPF view is displayed. Step 3 Run:


silent-interface { all | interface-type interface-number }

OSPF packets are suppressed on the interface. If OSPF routing information does not need to be obtained by the devices of a certain network and the local S9300 does not accept routing update information from other devices, you can run the silent-interface command to disable the interface from sending and accepting OSPF packets. Different processes can disable the same interface from sending and accepting OSPF packets, but the silent-interface command is valid only for the OSPF interface where the specified OSPF process is started. ----End

4.4.7 Checking the Configuration


Prerequisite
All the configurations for establishing and maintaining OSPF neighbors and OSPF adjacencies are complete.

Procedure
l l l l l Run the display ospf [ process-id ] interface [ all | interface-type interface-number ] [ verbose ] command to check information about an OSPF interface. Run the display ospf [ process-id ] peer [ { [ interface-type interface-number ] [ neighborid ] } | brief | last-nbr-down ] command to check information about an OSPF neighbor. Run the display ospf [ process-id ] retrans-queue [ interface-type interface-number ] [ neighbor-id ] command to check information about the retransmission queue. Run the display ospf [ process-id ] brief command to check brief information about an OSPF process. Run the display ospf [ process-id ] cumulative command to check the statistics of an OSPF process.

----End

Example
Run the display ospf interface command, and you can view detailed information about the timers of OSPF packets and the interval for retransmitting LSAs.
<Quidway> display ospf interface vlanif 40 OSPF Process 1 with Router ID 192.168.32.11 Interfaces Interface: 40.0.0.2 (Vlanif40) Cost: 100 State: DR Type: Broadcast Priority: 1 Designated Router: 40.0.0.2

MTU: 1430

4-16

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

Backup Designated Router: 40.0.0.1 Timers: Hello 10 , Dead 40 , Poll 120 , Retransmit 5 , Transmit Delay 1

4.5 Configuring OSPF Area Attributes


This section describes how to configure a stub area, an NSSA area, and a virtual link in an OSPF domain. 4.5.1 Establishing the Configuration Task 4.5.2 Configuring an OSPF Stub Area 4.5.3 Configuring an NSSA Area 4.5.4 Configuring an OSPF Virtual Link 4.5.5 Checking the Configuration

4.5.1 Establishing the Configuration Task


Applicable Environment
After an AS is partitioned into areas, the OSPF routes between non-backbone areas are updated through the backbone area. Therefore, OSPF requires the connectivity between the nonbackbone networks and the backbone networks, and between the backbone networks. In actual application, however, the physical connectivity cannot be ensured. You can configure an OSPF virtual link to solve the problem. After an AS is partitioned, the number of LSAs on the network is reduced and the expansibility of OSPF is enhanced. To further reduce the size of routing tables and the number of LSAs, you can configure the non-backbone areas at the AS border as stub areas. The concept of NSSA areas is introduced because stub areas cannot import external routes. Type 7 LSAs can be transmitted in an NSSA area. A Type 7 LSA is generated by the ASBR in the NSSA area. When the Type 7 LSA arrives at the ABR of the NSSA area, the ABR converts the Type 7 LSA to a Type 5 LSA (AS-external-LSA), and advertises the Type 5 LSA to other areas.

Pre-configuration Tasks
Before configuring an OSPF area, complete the following task:
l

4.3 Configuring Basic OSPF Functions

Data Preparation
To configure an OSPF area, you need the following data. No. 1 2 Data Type of the area Cost of default route advertised to the area

Issue 04 (2010-01-08)

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

4-17

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4.5.2 Configuring an OSPF Stub Area


Context
Do as follows on the S9300 in the area that does not need to import external routes.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf [ process-id ]

The OSPF view is displayed. Step 3 Run:


area area-id

The OSPF area view is displayed. Step 4 Run:


stub [ no-summary ]

The area is configured as a stub area. You must run the stub command on all the nodes connected to the stub area. When you run the stub command on the ABR, you can specify the no-summary keyword in the command. By specifying the no-summary keyword, you can restrict Type 3 LSAs (NetworkSummary-LSAs) except the default route to enter the stub area connected to the ABR. The routing entries of the devices in the stub area are thus reduced. Step 5 (Optional) Run:
default-cost cost

The cost of a default route sent to the stub area is set. By default, the cost of the default route sent to the stub area is 1. The command is valid only on the ABR that is connected to the stub area. ----End

4.5.3 Configuring an NSSA Area


Context
Do as follows on the S9300 in the area that denies the Type 5 LSAs (AS-External-LSA).

Procedure
Step 1 Run:
system-view

4-18

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

The system view is displayed. Step 2 Run:


ospf [ process-id ]

The OSPF view is displayed. Step 3 Run:


area area-id

The OSPF area view is displayed. Step 4 Run:


nssa [ default-route-advertise | no-import-route | no-summary | set-n-bit ]
*

The OSPF area is configured as an NSSA area. You must run the nssa command on all the nodes connected to the NSSA area. You can specify the optional keywords in the nssa command. Step 5 (Optional) Run:
default-cost cost

The cost of the default route sent to the NSSA area is set. By default, the cost of the default route sent to the NSSA area is 1. The command is valid only on the ABR that is connected to the NSSA area. ----End

4.5.4 Configuring an OSPF Virtual Link


Context
Do as follows on the S9300s that function as ABRs at both ends of the transit area.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf [ process-id ]

The OSPF view is displayed. Step 3 Run:


area area-id

The OSPF area view is displayed. Step 4 Run:


vlink-peer router-id [ dead dead-interval | hello hello-interval | retransmit retransmit-interval | trans-delay trans-delay-interval | smart-discover | { simple [ cipher | plain ] password | { hmac-md5 | md5 } [ key-id [ cipher | plain ] password-key ] | authentication-null } ] *

Issue 04 (2010-01-08)

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

4-19

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

A virtual link is configured. According to actual network speed, you can select the hello, retransmit, trans-delay, dead keywords and set the relevant parameters. For details about the parameters, see 4.4 Establishing and Maintaining OSPF Adjacencies. According to the requirements for network security, you can select the simple, hmac-md5, and md5 keywords to specify the authentication mode and set the password. You must run this command on the other end of the virtual link. ----End

4.5.5 Checking the Configuration


Prerequisite
All the configuration related to OSPF areas are complete.

Procedure
l Run the display ospf [ process-id ] lsdb [ brief ] or display ospf [ process-id ] lsdb [ router | network | summary | asbr | ase | nssa | opaque-link | opaque-area | opaqueas ] [ link-state-id ] [ originate-router [ advertising-router-id ] | self-originate ] command to check information about the LSDB of an OSPF process. Run the display ospf [ process-id ] routing [ interface interface-type interface-number ] [ nexthop nexthop-address ] or display ospf [ process-id ] routing router-id [ routerid ] command to check the OSPF routing table. Run the display ospf [ process-id ] vlink command to check the statistics of an OSPF virtual link. Run the display ospf [ process-id ] abr-asbr command to check the statistics of the OSPF ABR and ASBR. Run the display ospf [ process-id ] interface [ all | interface-type interface-number command to check information about an OSPF interface.

l l l

----End

Example
Run the display ospf vlink command. If the virtual link is created, you can find that the status of the local virtual link is Full.
<Quidway> display ospf vlink OSPF Process 100 with Router ID 1.1.1.1 Virtual Links Virtual-link Neighbor-id -> 2.2.2.2, Neighbor-State: Full Interface: 192.168.1.1 (Vlanif10) Cost: 1 State: Down Type: Virtual Transit Area: 0.0.0.1 Timers: Hello 10, Dead 40, Retransmit 5, Transmit Delay 1 GR State: Normal

4-20

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

4.6 Configuring OSPF Attributes on Networks of Different Types


This section describes how to use certain commands to change the network type of an interface to meet the requirements of the network, how to configure the DR election function in a broadcast network or an NBMA network, and how to configure OSPF features in an NBMA network. 4.6.1 Establishing the Configuration Task 4.6.2 Setting the Network Type of an OSPF Interface 4.6.3 (Optional) Setting the DR Priority of an OSPF Interface 4.6.4 Specifying a Neighbor for an NBMA Network 4.6.5 (Optional) Setting the Interval for Sending Polling Packets on the NBMA Network 4.6.6 Checking the Configuration

4.6.1 Establishing the Configuration Task


Applicable Environment
According to the link layer protocol, OSPF divides networks into four types. The link layer protocol of the physical interfaces of the S9300 is Ethernet and the default type of the interfaces is broadcast; therefore, you may need to change the network type forcibly through certain commands when the S9300 interconnects with routers. On an NBMA network, if no reachable link exists between two nodes, set the interface type to P2MP. If the S9300 has only one peer on the NBMA network, you can set the interface type to P2P. In addition, when configuring a broadcast network or an NBMA network, you can set the DR priority of each interface to determine the election of the DR or BDR on the network. Generally, the device with high performance and reliability should be elected as the DR and BDR.

Pre-configuration Tasks
Before configuring OSPF attributes, complete the following task:
l

4.3 Configuring Basic OSPF Functions

Data Preparation
To configure OSPF network attributes, you need the following data. No. 1 2 3
Issue 04 (2010-01-08)

Data Network type IP address of the neighbor (Optional) DR priority of the interface
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-21

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

No. 4

Data (Optional) Interval for sending polling packets on the NBMA network

4.6.2 Setting the Network Type of an OSPF Interface


Context
If the OSPF interfaces that set up the neighbor relationship are of different network types, the local S9300 may not learn correct routes. After you configure a new network type for an interface, the previous network type is cancelled automatically. Do as follows on the S9300.

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:


ospf network-type { broadcast | nbma | p2mp | p2p }

The network type of the OSPF interface is set. ----End

4.6.3 (Optional) Setting the DR Priority of an OSPF Interface


Context
For a broadcast network or an NBMA network, you can set the DR priority of each interface to determine the election of the DR and the BDR. A greater value indicates a higher priority. Do as follows on the S9300 that needs to change the DR priority.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


interface interface-type interface-number

The interface view is displayed.


4-22 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

Step 3 Run:
ospf dr-priority priority

The DR priority of the OSPF interface is set. By default, the DR priority of an OSPF interface is 1. ----End

Postrequisite
After setting the DR priority, you need to run the reset ospf [ process-id ] process command to restart the OSPF process for the new configuration to take effect.

4.6.4 Specifying a Neighbor for an NBMA Network


Context
An interface of the NBMA type needs to be specially configured. Such an interface cannot discover neighboring nodes by broadcasting Hello packets; therefore, you must manually specify the IP address of a neighboring node and determine whether the neighboring node has the election right. Do as follows on the S9300 on an NBMA network.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf [ process-id ]

The OSPF view is displayed. Step 3 Run:


peer ipv4-address [ dr-priority priority ]

A neighbor is specified for the NBMA network. ----End

4.6.5 (Optional) Setting the Interval for Sending Polling Packets on the NBMA Network
Context
On the NBMA network, after a neighbor becomes invalid, the local device sends Hello packets periodically according to the polling interval set by the ospf timer poll command. The polling interval must be at least four times the Hello interval. Do as follows on the S9300 on the NBMA network to set the polling interval according to the speed of topology discovery.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-23

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

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:


ospf timer poll interval

The interval for sending polling Hello packets on the NBMA network is set. By default, the interval for sending polling Hello packets 120 seconds. ----End

4.6.6 Checking the Configuration


Prerequisite
All the OSPF attributes for different network types are configured.

Procedure
l Run the display ospf [ process-id ] lsdb [ brief ] or display ospf [ process-id ] lsdb [ router | network | summary | asbr | ase | nssa | opaque-link | opaque-area | opaque-as ] [ linkstate-id ] [ originate-router [ advertising-router-id ] | self-originate ] command to check information about the LSDB of an OSPF process. Run the display ospf [ process-id ] peer [ { [ interface-type interface-number ] [ neighborid ] } | brief | last-nbr-down ] command to check information about an OSPF neighbor. Run the display ospf [ process-id ] nexthop command to check the statistics of the next hop. Run the display ospf [ process-id ] routing [ interface interface-type interface-number ] [ nexthop nexthop-address ] or display ospf [ process-id ] routing router-id [ routerid ] command to check the OSPF routing table. Run the display ospf [ process-id ] interface [ all | interface-type interface-number command to check information about an OSPF interface. Run the display ospf [ process-id ] brief command to check brief information about an OSPF process.

l l l

l l

----End

Example
Run the display ospf interface command, and you can check the OSPF attributes on different types of networks. <Quidway> display ospf 2 interface verbose OSPF Process 2 with Router ID 192.168.32.13 Interfaces Area: 0.0.0.0 (MPLS TE not enabled)

4-24

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


Area: 0.0.0.2 (MPLS TE not enabled)

4 OSPF Configuration

Interface: 100.0.0.2 (Vlanif100) Cost: 1 State: BDR Type: Broadcast MTU: 1430 Priority: 3 Designated Router: 100.0.0.1 Backup Designated Router: 100.0.0.2 Timers: Hello 10 , Dead 40 , Poll 120 , Retransmit 5 , Transmit Delay 1 ALLSPF GROUP OpaqueId: 0 PrevState: Waiting

4.7 Configuring OSPF Route Attributes


This section describes how to set the link cost, priority of OSPF routes, and maximum number of equal-cost routes. 4.7.1 Establishing the Configuration Task 4.7.2 Setting the Link Cost of an OSPF Interface 4.7.3 Setting the Preference of OSPF 4.7.4 Setting the Maximum Number of Equal-Cost Routes 4.7.5 Checking the Configuration

4.7.1 Establishing the Configuration Task


Applicable Environment
In a complicated network topology, there may be multiple different routes to the same destination. The routes can be discovered by the same or different routing protocols. Through the following procedures, you can determine the method of selecting a route among the routes to the same destination.

Pre-configuration Tasks
Before configuring OSPF route attributes, complete the following task:
l

4.3 Configuring Basic OSPF Functions

Data Preparation
To configure OSPF route attributes, you need the following data. No. 1 2 3 Data Link cost Priority of the OSPF protocol Maximum number of equal-cost routes

Issue 04 (2010-01-08)

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

4-25

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4.7.2 Setting the Link Cost of an OSPF Interface


Context
Do as follows on each S9300 in an area.

Procedure
l Setting the cost of an OSPF interface 1. Run:
system-view

The system view is displayed. 2. Run:


interface interface-type interface-number

The interface view is displayed. 3. Run:


ospf cost cost

The cost of the OSPF interface is set. If the cost of an interface is not set, OSPF calculates the cost according to the bandwidth of the interface. During the configuration, ensure that the cost of interfaces of all the S9300s in the area is the same. Otherwise, routing loop occurs. l Setting the bandwidth reference value 1. Run:
system-view

The system view is displayed. 2. Run:


ospf [ process-id ]

The OSPF view is displayed. 3. Run:


bandwidth-reference value

The bandwidth reference value is set. By default, the bandwidth reference value is 100 Mbit/s. If you do not set the cost of an interface by running the ospf cost command in the interface view, OSPF calculates the cost of an interface according to the bandwidth of the interface. The calculation formula is as follows: Cost of the interface = Bandwidth reference value/Interface bandwidth. The integer portion of the calculation result is taken as the cost of the interface. If the value is smaller than 1, OSPF takes 1 as the interface cost. You can change the cost of an interface by changing the bandwidth reference value. During the configuration, ensure that the bandwidth reference value of the S9300s in the area is the same. Otherwise, routing loop occurs. ----End
4-26 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

4.7.3 Setting the Preference of OSPF


Context
Do as follows on the S9300s that run OSPF.

Procedure
l Setting the priority of OSPF 1. Run:
system-view

The system view is displayed. 2. Run:


ospf [ process-id ]

The OSPF view is displayed. 3. Run:


preference [ ase ] [ route-policy route-policy-name ] preference

The preference of OSPF is set. Multiple routing protocols can be enabled on an S9300. Thus, the problem of routing information sharing and choice among routing protocols arises. To solve this problem, you can set the preference for each routing protocol. When different routing protocols discover routes to the same destination, the route with the highest preference is preferred. A smaller value indicates a higher preference. l Setting the weight of equal-cost routes 1. Run:
system-view

The system view is displayed. 2. Run:


ospf [ process-id ]

The OSPF view is displayed. 3. Run:


nexthop ipv4-address weight value

The load balancing weight of an OSPF route is set. When equal-cost routes exist, OSPF chooses the route with the highest weight according to the setting of the nexthop command. The smaller the weight of the next hop, the higher the priority of the route. By default, the weight is 255, indicating that load-balancing is performed among the equal-cost routes regardless of the priority. ----End

4.7.4 Setting the Maximum Number of Equal-Cost Routes


Context
Do as follows on each S9300 in an area.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-27

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf [ process-id ]

The OSPF view is displayed. Step 3 Run:


maximum load-balancing number

The maximum number of equal-cost routes is set. By default, the maximum number of equalcost routes is 6. ----End

4.7.5 Checking the Configuration


Prerequisite
The configuration of the route attributes of OSPF is complete.

Procedure
l Run the display ospf [ process-id ] routing [ ip-address [ mask | mask-length ] ] [ interface interface-type interface-number ] [ nexthop nexthop-address ] or display ospf [ processid ] routing router-id [ router-id ] command to check the OSPF routing table. Run the display ospf [ process-id ] interface [ all | interface-type interface-number ] [ verbose ] command to check information about an OSPF interface.

----End

Example
Run the display ospf interface command, and you can view information about an OSPF interface, such as the cost and priority.
<Quidway> display ospf interface vlanif 40 OSPF Process 1 with Router ID 192.168.32.11 Interfaces Interface: 40.0.0.2 (Vlanif40) Cost: 100 State: DR Type: Broadcast MTU: 1430 Priority: 1 Designated Router: 40.0.0.2 Backup Designated Router: 40.0.0.1 Timers: Hello 10 , Dead 40 , Poll 120 , Retransmit 5 , Transmit Delay 1

4.8 Configuring OSPF Route Aggregation


This section describes how to configure the OSPF route aggregation function.

4-28

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

4.8.1 Establishing the Configuration Task 4.8.2 Configuring Route Aggregation on the ABR 4.8.3 Configuring Route Aggregation on the ASBR 4.8.4 Checking the Configuration

4.8.1 Establishing the Configuration Task


Applicable Environment
To maintain the routes to all network segments, a network device must have sufficient storage and calculation capacity. To reduce the burden of storage and calculation of network devices, you can configure route aggregation on the ABR and ASBR. The advertised routing information is reduced without affecting the forwarding path.

Pre-configuration Tasks
Before configuring OSPF route aggregation, complete the following task:
l

4.3 Configuring Basic OSPF Functions

Data Preparation
To configure OSPF route aggregation, you need the following data. No. 1 2 Data Destination address and mask of the aggregated route (Optional) Cost of the aggregated route and label of the external LSA

4.8.2 Configuring Route Aggregation on the ABR


Context
This task is performed to aggregate the routes that need to be advertised to a certain area. The ABR advertises only an aggregated route to this area after you configure the route aggregation function. The routes received from an indirectly connected area are not aggregated. Do as follows on the ABR that needs to reduce the advertised route entries.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-29

4 OSPF Configuration
ospf [ process-id ]

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The OSPF view is displayed. Step 3 Run:


area area-id

The OSPF area view is displayed. Step 4 Run:


abr-summary ipv4-address mask [ { advertise | not-advertise } | cost cost ]
*

OSPF route aggregation is configured on the ABR. You can determine whether to advertise the aggregated route and set the cost of the aggregated route through the optional parameters. ----End

4.8.3 Configuring Route Aggregation on the ASBR


Context
This task is performed to aggregate the routes that need to be advertised to a certain AS. Do as follows on the ASBR that needs to reduce the advertised route entries.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf [ process-id ]

The OSPF view is displayed. Step 3 Run:


asbr-summary ipv4-address mask [ cost cost | distribute-delay interval | notadvertise | tag tag ] *

OSPF route aggregation is configured on the ASBR. You can set the cost of the aggregated route and the label of the external LSA through the optional parameters. ----End

4.8.4 Checking the Configuration


Prerequisite
The configuration of OSPF route aggregation is complete.
4-30 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

Procedure
l Run the display ospf [ process-id ] routing [ ipv4-address [ mask | mask-length ] ] [ interface interface-type interface-number ] [ nexthop nexthop-address ] or display ospf [ process-id ] routing router-id [ router-id ] command to check the OSPF routing table. Run the display ospf [ process-id ] asbr-summary [ ipv4-address mask ] command to check information about OSPF route aggregation on the ASBR.

----End

Example
Run the display ospf asbr-summary command, and you can view information about the aggregated route imported by OSPF.
<Quidway> display ospf asbr-summary OSPF Process 1 with Router ID 192.168.32.11 Summary Addresses Total summary address count: 1 Summary Address net : 10.0.0.0 mask : 255.0.0.0 tag : 0 (Not Configured) status : Advertise Cost : 0 (Not Configured) delay : 0 (Not Configured) The Count of Route is : 2 Destination 10.0.0.0 10.1.0.0 Net Mask 255.255.255.0 255.255.255.0 Proto Static Static Process 1 1 Type 2 2 Metric 1 1

4.9 Configuring Filtering of OSPF Routing Information


This section describes how to configure the S9300 to filter the OSPF routing information and import routes learned by other protocols. 4.9.1 Establishing the Configuration Task 4.9.2 Configuring the ABR to Filter Type 3 LSAs 4.9.3 Configuring OSPF to Filter Received Routes 4.9.4 Configuring OSPF to Import External Routes 4.9.5 Checking the Configuration

4.9.1 Establishing the Configuration Task


Applicable Environment
To maintain routes to all network segments, a network device must have sufficient storage and calculation capacity. To reduce the burden of storage and calculation of network devices, you
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-31

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

can configure filtering rules for inbound or outbound routes on the S9300. In this manner, the S9300 can filter the routers that do not need to be accepted or sent and reduce the maintained routing entries.

Pre-configuration Tasks
Before configuring the function of filtering the OSPF routing information, complete the following tasks:
l l l l

Configuring an ACL Configuring an IP Prefix List Configuring a Route-Policy Configuring Basic OSPF Functions

Data Preparation
To configure the function of filtering the OSPF routing information, you need the following data. No. 1 2 Data ACL number, name of the IP address prefix list, and name of the routing policy Name and process ID of the routing protocol of which the routes need to be imported, and default values of the parameters of the imported route

4.9.2 Configuring the ABR to Filter Type 3 LSAs


Context
Do as follows on the ABR to configure the required filtering rule.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf [ process-id ]

The OSPF view is displayed. Step 3 Run:


area area-id

The OSPF area view is displayed. Step 4 Run:


filter { acl-number | ip-prefix ip-prefix-name | route-policy route-policy-name } { export | import }

4-32

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

The ABR is configured to filter Type 3 LSAs. ----End

4.9.3 Configuring OSPF to Filter Received Routes


Context
Do as follows on the S9300 to configure the filtering rule.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf [ process-id ]

The OSPF view is displayed. Step 3 Run:


filter-policy { acl-number | ip-prefix ip-prefix-name } import

The OSPF process is configured to filter the received routes. OSPF cannot filter the advertised and received LSAs because OSPF is a dynamic routing protocol based on the link state and the routing information is hidden in the link state. The filterpolicy import command is used to filter the routes calculated by OSPF. Only the routes that meet the filtering conditions are added to the routing table. This command filters only the routes that are added to the local routing table through OSPF, and it does not affect the OSPF routing table and the advertised routes. ----End

4.9.4 Configuring OSPF to Import External Routes


Context
This task is performed to configure an OSPF process on the ASBR to import routes of other protocols. Do as follows on the S9300 that runs OSPF to configure OSPF to import external routes and set the parameters related to route import.

Procedure
l Configuring OSPF to import routes of other protocols 1. Run:
system-view

The system view is displayed. 2. Run:


ospf [ process-id ]

Issue 04 (2010-01-08)

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

4-33

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The OSPF view is displayed. 3. Run:


import-route protocol [ process-id ] [ cost cost | tag tag | type type ] * [ route-policy route-policy-name ]

OSPF is configured to import routes of other protocols. 4. (Optional) Run:


filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol [ process-id ] ]

OSPF is configured to filter the routes imported in Step 3. Only the routes that meet the specified conditions are advertised. You can specify protocol [ process-id ] to filter the routes of a certain protocol or a certain OSPF process. If protocol [ process-id ] is not specified, OSPF filters all imported routes.
NOTE

l l

The import-route cannot configure OSPF to import the default routes of other protocols. OSPF converts the routes that meet the conditions to Type 5 LSAs, and then advertises the Type 5 LSAs.

Configuring OSPF to import the default route 1. Run:


system-view

The system view is displayed. 2. Run:


ospf [ process-id ]

The OSPF view is displayed. 3. (Optional) Run:


default-route-advertise [ always | cost cost | type type| route-policy route-policy-name ] *

The OSPF process is configured to import the default route. By specifying always in the command, you can configure OSPF to import a default route. Otherwise, the default route can be imported only when the local device has a default route.
NOTE

If a default route is imported to the OSPF area and an OSPF node is configured with a static default route, ensure that the priority of the static default route is lower than the priority of the imported default route. Otherwise, the imported default route cannot be added to the routing table.

Setting the parameters related to OSPF route import 1. Run:


system-view

The system view is displayed. 2. Run:


ospf [ process-id ]

The OSPF view is displayed.


4-34 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

3.

Run:
default { cost cost | limit limit | tag tag | type type } *

The default values of the parameters used for imported routes are set. The parameters are the route cost, number of routes, route tag, and route type. When configuring OSPF to import external routes, you can set the optional parameters, such as the route cost, number of routes, route tag, and route type. The imported routes use the set values as the default values. The route tag identifies information about an imported route, which depends on the protocol. For example, for BGP routes imported by OSPF, the route tag identify the AS ID. ----End

4.9.5 Checking the Configuration


Prerequisite
The configuration of OSPF route filtering is complete.

Procedure
l Run the display ospf [ process-id ] routing [ ipv4-address [ mask | mask-length ] ] [ interface interface-type interface-number ] [ nexthop nexthop-address ] or display ospf [ process-id ] routing router-id [ router-id ] command to check the OSPF routing table.

----End

Example
Run the display ospf routing command, and you can view information about the routes that pass the filtering and are imported from other routing protocols.
<Quidway> display ospf routing OSPF Process 1 with Router ID 192.168.32.10 Routing Tables Routing for Network Destination Cost 30.1.0.0/24 1 50.0.0.0/24 2 Routing for ASEs Destination 10.0.0.0/24 Total Nets: 3 Intra Area: 1 Cost 1 Type Transit Inter-area Type Type2 ASE: 1 NextHop 30.1.0.1 30.1.0.2 Tag 1 NSSA: 0 AdvRouter 192.168.32.10 192.168.32.11 NextHop 30.1.0.2 Area 0.0.0.1 0.0.0.1 AdvRouter 192.168.32.11

Inter Area: 1

4.10 Adjusting and Optimizing the OSPF Network


This section describes how to adjust and optimize the OSPF network according to the actual networking environment.

Issue 04 (2010-01-08)

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

4-35

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Context
NOTE

The configuration tasks of adjusting and optimizing the OSPF network is optional. You can perform the configuration tasks as required.

4.10.1 Establishing the Configuration Task 4.10.2 Setting the Delay for Transmitting LSAs on an Interface 4.10.3 Setting the Interval for Updating and Receiving LSAs 4.10.4 Setting the Interval of the SPF Calculation 4.10.5 Configuring a Stub Router 4.10.6 Enabling an Interface to Add the Actual MTU in DD Packets 4.10.7 Setting the Maximum Number of External LSAs in an LSDB 4.10.8 Configuring OSPF to Be Compatible with the Route Selection Rule of RFC 1583 4.10.9 Checking the Configuration

4.10.1 Establishing the Configuration Task


Applicable Environment
An LSA in the LSDB on the S9300 ages with the time. The age of the LSA increases by 1 every second, but the age does increase during transmission of the LSA. To reduce the difference between the age and lifetime of LSAs, you can set the delay for transmitting LSAs on an interface. The delay is then added to the age of LSAs. The delay for transmitting LSAs depends on the network, and the configuration is important for a low-speed network. To avoid high usage of network bandwidth and device resources due to the network connection or frequent route flapping, the S9300 sets the interval for updating and receiving LSAs. By adjusting the interval for updating and receiving LSAs, you can improve the convergence speed of the OSPF network. The OSPF process calculates the LSDB through the SPF algorithm. By adjusting the interval of SPF calculation, you can reduce the usage of resources due to frequent network changes. If the S9300 needs to restrict the traffic, you can configure a stub router to increase the link cost and reduce the forwarding traffic.

Pre-configuration Tasks
Before adjusting and optimizing an OSPF network, complete the configuration task:
l

4.3 Configuring Basic OSPF Functions

Data Preparation
To adjust and optimize an OSPF network, you need the following data.
4-36 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

No. 1 2 3 4

Data Delay for transmitting LSAs LSA interval Interval of the SPF calculation Maximum number of external LSAs in an LSDB

4.10.2 Setting the Delay for Transmitting LSAs on an Interface


Context
An LSA in the LSDB on the S9300 ages with the time. The age of the LSA increases by 1 every second, but the age does not increase during transmission of the LSA. To reduce the difference between the age and lifetime of LSAs, you can set the delay for transmitting LSAs on an interface. The delay is then added to the age of LSAs. The delay for transmitting LSAs depends on the network, and the configuration is important for a low-speed network. Do as follows on the S9300 to set the delay for transmitting LSAs according to the bandwidth of the network.

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:


ospf trans-delay interval

The delay for transmitting LSAs on the interface is set. By default, the delay for transmitting LSAs on an interface is 1 second. ----End

4.10.3 Setting the Interval for Updating and Receiving LSAs


Context
OSPF specifies that the interval for updating LSAs is 5 seconds. This prevents high usage of network bandwidth and device resource due to network connections or frequent route flapping. For a stable network that requires short route convergence time, you can set the interval for updating LSAs to 0 to cancel the interval. In this manner, changes of the topology or routes can
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-37

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

be advertised to the network through the LSAs immediately. The route convergence speed in the network is thus increased. In such a network, you can set the interval for accepting LSAs to 0. In this manner, changes of the topology or routes can be detected immediately. Do as follows on the S9300s in the area to set the LSA interval according to the network bandwidth.

Procedure
l Setting the interval for updating LSAs 1. Run:
system-view

The system view is displayed. 2. Run:


ospf [ process-id ]

The OSPF view is displayed. 3. Run:


lsa-originate-interval 0

The interval for updating LSAs is set to 0. By default, the interval for updating LSAs is 5 seconds. l Setting the interval for receiving LSAs 1. Run:
system-view

The system view is displayed. 2. Run:


ospf [ process-id ]

The OSPF view is displayed. 3. Run:


lsa-arrival-interval 0

The interval for receiving LSAs. By default, the interval for receiving LSAs is 1 second. ----End

4.10.4 Setting the Interval of the SPF Calculation


Context
When the LSDB of an OSPF process changes, the shortest path tree needs to be recalculated. If the network changes frequently and the shortest path is calculated immediately after each change, many system resources are occupied and the efficiency of the S9300 is decreased. By adjusting the interval of the SPF calculation, you can reduce the impact caused by frequent network changes. By default, the interval of the SPF calculation is 5 seconds.
4-38 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

Do as follows on each S9300 in the area to set the interval of the SPF calculation according to the change rate of network topology.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf [ process-id ]

The OSPF view is displayed. Step 3 Run:


spf-schedule-interval { interval1 | millisecond interval2 }

The interval of the SPF calculation is set. ----End

4.10.5 Configuring a Stub Router


Context
A stub router can control the traffic and informs other OSPF devices that it is a stub router. Generally, other routers do not use the stub router to forward data, but they have routes to the stub router. In the Router-LSAs generated by the stub router, the metric of all the links is 65535. Do as follows on the S9300.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf [ process-id ]

The OSPF view is displayed. Step 3 Run:


stub-router

The router is configured as a stub router.


NOTE

Stub router and stub area are concepts independent of each other. That is, their configurations do not affect each other.

----End
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-39

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4.10.6 Enabling an Interface to Add the Actual MTU in DD Packets


Context
Different device manufacturers may use different default MTUs. The MTU is usually set to 0 for DD packets to ensure consistency of the MTU on devices of different manufacturers. By default, an interface uses 0, rather than the actual MTU, as the MTU in DD packets. This task is performed to configure an interface to add the actual MTU in the Interface MTU filed of DD packets. Do as follows on the S9300.

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:


ospf mtu-enable

The interface is configured to fill the actual MTU in DD packets when sending DD packets. ----End

4.10.7 Setting the Maximum Number of External LSAs in an LSDB


Context
This task is performed to control the number of external LSAs in an LSDB, and thus to reduce the burden of storage and calculation of the S9300. By default, the maximum number of external LSAs in an LSDB is 1000000. Do as follows on the S9300.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf [ process-id ]

The OSPF view is displayed. Step 3 Run:


lsdb-overflow-limit number

4-40

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

The maximum number of external LSAs in an LSDB is set. ----End

4.10.8 Configuring OSPF to Be Compatible with the Route Selection Rule of RFC 1583
Context
If multiple AS-External-LSAs advertise routes to the same destination, OSPF can select the optimal route according to the rule defined by RFC 1583. By default, this rule is not used. Do as follows on the S9300.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf [ process-id ]

The OSPF view is displayed. Step 3 Run:


rfc1583 compatible

OSPF is compatible with the route selection rule specified by RFC 1583. ----End

4.10.9 Checking the Configuration


Prerequisite
All the configurations for optimizing the OSPF network are complete.

Procedure
l l Run the display ospf [ process-id ] brief command to check brief information about an OSPF process. Run the display ospf [ process-id ] cumulative command to check the statistics of an OSPF process.

----End

Example
Run the display ospf brief command, and you can find that the interface is suppressed.
<Quidway> display ospf brief OSPF Process 1 with Router ID 192.168.32.11

Issue 04 (2010-01-08)

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

4-41

4 OSPF Configuration
OSPF Protocol Information

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

RouterID: 192.168.32.11 Border Router: AREA Route Tag: 0 Multi-VPN-Instance is not enabled Graceful-restart capability: disabled Helper support capability : not configured Applications Supported: MPLS Traffic-Engineering Spf-schedule-interval: 5 s Default ASE parameters: Metric: 1 Tag: 1 Type: 2 Route Preference: 10 ASE Route Preference: 150 SPF Computation Count: 20 RFC 1583 Compatible Retransmission limitation is disabled OSPF is in protocol hot standby state: Real-Time Backup Area Count: 2 Nssa Area Count: 0 ExChange/Loading Neighbors: 0 Area: 0.0.0.0 (MPLS TE not enabled) Authtype: None Area flag: Normal SPF scheduled Count: 20 ExChange/Loading Neighbors: 0 Interface: 50.0.0.1 (Vlanif50) Cost: 1 State: DR Type: Broadcast MTU: 1430 Priority: 1 Designated Router: 50.0.0.1 Backup Designated Router: 0.0.0.0 Timers: Hello 10 , Dead 40 , Poll 120 , Retransmit 5 , Transmit Delay 1 Silent interface, No hellos Area: 0.0.0.1 (MPLS TE not enabled) Authtype: None Area flag: Normal SPF scheduled Count: 20 ExChange/Loading Neighbors: 0 Interface: 30.1.0.2 (Vlanif40) Cost: 1 State: BDR Type: Broadcast MTU: 1430 Priority: 1 Designated Router: 30.1.0.1 Backup Designated Router: 30.1.0.2 Timers: Hello 10 , Dead 40 , Poll 120 , Retransmit 5 , Transmit Delay 1

4.11 Configuring OSPF GR


This section describes how to configure OSPF GR to prevent inaccurate route calculation and packet loss after the S9300 restarts. 4.11.1 Establishing the Configuration Task 4.11.2 Enabling the Opaque-LSA Capability of OSPF 4.11.3 Enabling OSPF GR 4.11.4 (Optional) Setting Session Parameters of GR on the Restarter 4.11.5 (Optional) Setting Session Parameters of GR on the Helper 4.11.6 (Optional) Configuring the S9300 Not to Work in Helper Mode 4.11.7 Checking the Configuration

4-42

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

4.11.1 Establishing the Configuration Task


Applicable Environment
To prevent route flapping due to the failover between the master and slave main control boards on the S9300, you can enable OSPF GR. After the active/standby switchover, the restarter and helper continue to maintain the neighbor relationship, exchange routing information and synchronize the database, and update routing table and forwarding table, to implement OSPF fast convergence and keep networking stable.

Pre-configuration Tasks
Before configuring OSPF GR, complete the following task:
l

4.3 Configuring Basic OSPF Functions

Data Preparation
To configure OSPF GR, you need the following data. No. 1 2 Data OSPF process ID (Optional) Duration for graceful restart of the restarter

4.11.2 Enabling the Opaque-LSA Capability of OSPF


Context
OSPF supports GR through Type 9 LSAs; therefore, you need to enable the Opaque-LSA capability of OSPF before enabling OSPF GR. Do as follows on the S9300 on which GR needs to be enabled.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf process-id

The OSPF view is displayed. Step 3 Run:


opaque-capability enable

The Opaque-LSA capability is enabled. ----End


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-43

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4.11.3 Enabling OSPF GR


Context
Do as follows on the S9300 on which GR needs to be enabled.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf process-id

The OSPF view is displayed. Step 3 Run:


graceful-restart

OSPF GR is enabled. ----End

4.11.4 (Optional) Setting Session Parameters of GR on the Restarter


Context
Do as follows on the restarter.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf process-id

The OSPF view is displayed. Step 3 (Optional) Run:


graceful-restart period period

The duration of graceful start on the restarter is set. By default, the duration of graceful restart is 120 seconds. Step 4 (Optional) Run:
graceful-restart planned-only

The restarter is configured to support only planned GR. By default, the restarter supports planned GR and unplanned GR.
4-44 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

Step 5 (Optional) Run:


graceful-restart partial

The restarter is configured to support only partial GR. By default, the restarter supports only totally GR. ----End

Postrequisite
To set multiple parameters at the same time, run thegraceful-restart [ period period | plannedonly | partial ] * command.

4.11.5 (Optional) Setting Session Parameters of GR on the Helper


Context
Do as follows on the helper.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf process-id

The OSPF view is displayed. Step 3 (Optional) Run:


graceful-restart helper-role { ip-prefix ip-prefix-name | acl-number acl-number }

The condition for setting a helper is set. A neighbor works in helper mode only if it meets the condition set by the ip-prefix or acl parameter. Step 4 (Optional) Run:
graceful-restart helper-role ignore-external-lsa

The helper is configured not to check the external LSAs. By default, the helper checks the external LSAs. Step 5 (Optional) Run:
graceful-restart helper-role planned-only

The helper is configured to support only the planned GR. By default, the helper supports planned GR and unplanned GR. ----End

Issue 04 (2010-01-08)

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

4-45

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Postrequisite
To set multiple parameters at the same time, run the graceful-restart helper-role { [ ipprefix ip-prefix-name | acl-number acl-number ] | ignore-external-lsa | planned-only } * command.

4.11.6 (Optional) Configuring the S9300 Not to Work in Helper Mode


Context
Do as follows on the S9300 that does not need to work in helper mode.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf process-id

The OSPF view is displayed. Step 3 Run:


graceful-restart helper-role never

The S9300 is configured not to work in helper mode. ----End

4.11.7 Checking the Configuration


Prerequisite
All the configurations of OSPF GR are complete.
NOTE

If an MPLS TE tunnel is configured on the S9300 and the S9300 learns the route to the destination address of the tunnel through OSPF, then you need to configure the RSVP GR function on the tunnel.

Procedure
l l Run the display ospf [ process-id ] graceful-restart [ verbose ] command to check the status of OSPF GR. Run the display ospf [ process-id ] brief command to check information about an OSPF process.

----End

Example
Run the display ospf graceful-restart, and you can check the status of OSPF GR.
4-46 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


<Quidway> display ospf graceful-restart

4 OSPF Configuration

OSPF Process 1 with Router ID 1.1.1.1 Graceful-restart capability : enabled Graceful-restart support : planned and un-planned, totally Helper-policy support : planned and un-planned, strict lsa check Current GR state : normal Graceful-restart period : 120 seconds Number of neighbors under helper: Normal neighbors : 0 Virtual neighbors : 0 Sham-link neighbors : 0 Total neighbors : 0 Number of restarting neighbors : 0 Last exit reason: On graceful restart : successful exit On Helper : none

4.12 Configuring BFD for OSPF


This section describes how to implement fast convergence on an OSPF network through BFD. 4.12.1 Establishing the Configuration Task 4.12.2 Configuring Global BFD 4.12.3 Configuring BFD for OSPF 4.12.4 Disabling an Interface from Dynamically Creating BFD Sessions 4.12.5 Configuring the BFD Feature for a Specified Interface 4.12.6 Checking the Configuration

4.12.1 Establishing the Configuration Task


Applicable Environment
To ensure high quality of data transmission and speed up convergence of OSPF routes when the link status changes, you can configure the BFD feature for the links that run OSPF.

Pre-configuration Tasks
Before configuring BFD for OSPF, complete the following tasks:
l l

4.3 Configuring Basic OSPF Functions Enabling the BFD feature globally

Data Preparation
To configure BFD for OSPF, you need the following data. No. 1
Issue 04 (2010-01-08)

Data ID of the OSPF process for which BFD is enabled


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-47

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

No. 2 3

Data Type and number of the interface where BFD is enabled Parameters of the BFD session

4.12.2 Configuring Global BFD


Context
OSPF can create a BFD session only after BFD is enabled globally. Do as follows on the S9300.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bfd

BFD is enabled globally. ----End

4.12.3 Configuring BFD for OSPF


Context
To configure the BFD feature for all the interfaces that run an OSPF process, do as follows on the S9300s on which the BFD session needs to be established.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf [ process-id ]

The OSPF view is displayed. Step 3 Run:


bfd all-interfaces enable

The BFD feature is enabled and a BFD session is established. When the BFD feature is configured globally, the OSPF protocol establish a BFD session on all the interfaces whose neighbor is in Full state by using the default BFD parameters.
4-48 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

Step 4 (Optional) Run:


bfd all-interfaces { min-rx-interval receive-interval | min-tx-interval transmitinterval | detect-multiplier multiplier-value } *

The parameters of the BFD session are set.


NOTE

If you set the BFD parameters but do not run the bfd all-interfaces enable command, the BFD feature does not take effect.

----End

4.12.4 Disabling an Interface from Dynamically Creating BFD Sessions


Context
After you run the bfd all-interfaces enable command in an OSPF process, all the OSPF-enabled interfaces connected to neighbors in Full state create BFD sessions. If you do not want to enable BFD on an interface, do as follows on the S9300.

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:


ospf bfd block

The interface is disabled from creating BFD sessions dynamically. ----End

4.12.5 Configuring the BFD Feature for a Specified Interface


Context
If you want to configure the BFD feature for certain interfaces but do not want to enable BFD for OSPF, or if you have enabled BFD for OSPF but want certain interfaces to detect a link failure faster, do as follows on the S9300 to configure the interfaces.

Procedure
Step 1 Run:
system-view

The system view is displayed.


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-49

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Step 2 Run:
interface interface-type interface-number

The interface view is displayed. Step 3 Run:


ospf bfd enable

The BFD feature is enabled on the interface and a BFD session is created. If the BFD feature is configured globally and the neighbors are in Full state, the default values of the BFD parameters are adopted to create the BFD session. Step 4 (Optional) Run:
ospf bfd { min-rx-interval receive-interval | min-tx-interval transmit- interval | detect-multiplier multiplier-value } *

The parameters of the BFD session are set.


NOTE

l l

The BFD parameters set on an interface take precedence over the BFD parameters set in the OSPF process. That is, the BFD session established on an interface use the parameters set on the interface. If you set the BFD parameters but do not run the ospf bfd enable command, the BFD feature does not take effect.

----End

4.12.6 Checking the Configuration


Prerequisite
All the configurations of BFD for OSPF are complete.

Procedure
l Run the display ospf [process-id ] bfd session interface-type interface-number [ routerid ] display ospf [process-id ] bfd session { router-id | all } command to check information about the BFD session.

----End

Example
Run the display ospf bfd session all command. If the BFD session is in Up state on the S9300, it indicates that the BFD session is established successfully.
<Quidway> display ospf bfd session all OSPF Process 1 with Router ID 21.21.21.21 Area 0.0.0.0 interface 128.0.0.2 (Vlanif1000)'s BFD Sessions NeighborId:2.2.2.2 BFDState:up Multiplier:3 RemoteIpAdd:100.2.1.1 AreaId:0.0.0.0 rx :1000 BFD Local Dis:8194 Diagnostic Info: Init Interface:Vlanif10 tx :100 LocalIpAdd:100.2.1.2

4-50

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

4.13 Configuring the Authentication Function on an OSPF Network


This section describes how to configure the OSPF area authentication mode and interface authentication mode. 4.13.1 Establishing the Configuration Task 4.13.2 Configuring the Area Authentication Mode 4.13.3 Configuring the Interface Authentication Mode 4.13.4 Checking the Configuration

4.13.1 Establishing the Configuration Task


Applicable Environment
To improve security of an OSPF network, you can configure OSPF authentication.

Pre-configuration Tasks
Before improving security of an OSPF network, complete the following task:
l

4.3 Configuring Basic OSPF Functions

Data Preparation
To improve security of an OSPF network, you need the following data: No. 1 Data Authentication type and password

4.13.2 Configuring the Area Authentication Mode


Context
OSPF supports packet authentication. Only the OSPF packets passing the authentication are accepted; otherwise, the neighbor relationship cannot be set up. When you use area authentication, all the devices in an area must use the same authentication mode and password. For example, the authentication mode of all the devices in Area 0 is simple authentication and the password is abc. Do as follows on all the S9300s in an area.

Issue 04 (2010-01-08)

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

4-51

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf [ process-id ]

The OSPF view is displayed. Step 3 Run:


area area-id

The OSPF area view is displayed. Step 4 Run the following commands as required.
l

Run:
authentication-mode simple { [ plain ] plain-text | cipher cipher-text }

The authentication mode for the OSPF area is set to simple authentication.
l

Run:
authentication-mode { md5 | hmac-md5 } [ key-id { plain plain-text | [ cipher ] cipher-text } ]

The authentication mode for the OSPF area is configured to MD5 configuration. ----End

4.13.3 Configuring the Interface Authentication Mode


Context
This task is performed to configure the authentication mode and password used between neighboring devices. Interface authentication takes precedence over area authentication. The authentication mode and password of all the interfaces in the same area must be the same. Do as follows on interfaces of all S9300s in an area.

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 Configure the authentication mode for the interface as required.
l

Run:
ospf authentication-mode simple { [ plain ] plain-text | cipher cipher-text }

4-52

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

The authentication mode is configured to simple authentication, and the authentication password is configured.
l

Run:
ospf authentication-mode { md5 | hmac-md5 } [ key-id { plain plain-text | [ cipher ] cipher-text } ]

The authentication mode is configured to MD5 authentication and the configuration password is configured.
l

Run:
ospf authentication-mode null

Authentication is not performed on the OSPF interface. ----End

4.13.4 Checking the Configuration


Prerequisite
All the configurations of the authentication function of the OSPF network are complete.

Procedure
l Run the display ospf [ process-id ] brief command to check brief information about an OSPF process.

----End

Example
Run the display ospf brief command, and you can check the configuration of area authentication.
<Quidway>display ospf brief OSPF Process 1 with Router ID 192.168.32.11 OSPF Protocol Information RouterID: 192.168.32.11 Border Router: Route Tag: 0 Multi-VPN-Instance is not enabled Graceful-restart capability: disabled Helper support capability : not configured Applications Supported: MPLS Traffic-Engineering Spf-schedule-interval: 5 s Default ASE parameters: Metric: 1 Tag: 1 Type: 2 Route Preference: 10 ASE Route Preference: 150 SPF Computation Count: 77 RFC 1583 Compatible Retransmission limitation is disabled OSPF is in protocol hot standby state: Real-Time Backup Area Count: 1 Nssa Area Count: 0 ExChange/Loading Neighbors: 0 Area: 0.0.0.0 (MPLS TE not enabled) Authtype: Simple Area flag: Normal SPF scheduled Count: 77 ExChange/Loading Neighbors: 0 Interface: 20.0.0.1 (Vlanif20) Cost: 1 State: BDR Type: Broadcast Priority: 1 Designated Router: 20.0.0.2 MTU: 1430

Issue 04 (2010-01-08)

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

4-53

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Backup Designated Router: 20.0.0.1 Timers: Hello 10 , Dead 40 , Poll 120 , Retransmit 5 , Transmit Delay 1

4.14 Configuring Network Management Functions of OSPF


This section describes how to bind an OSPF process to the Management Information Base (MIB) and configure the OSPF trap function and log function. 4.14.1 Establishing the Configuration Task 4.14.2 Binding an OSPF Process to the MIB 4.14.3 Configuring OSPF to Send Trap Messages 4.14.4 Enabling OSPF to Record Logs 4.14.5 Checking the Configuration

4.14.1 Establishing the Configuration Task


Applicable Environment
OSPF supports the network management functions. You can bind the OSPF MIB to an OSPF process, and configure the OSPF device to send trap messages and record logs.

Pre-configuration Tasks
Before configuring the network management functions of OSPF, complete the following task:
l

4.3 Configuring Basic OSPF Functions

Data Preparation
To configure the network management functions of OSPF, you need the following data. No. 1 2 Data ID of the OSPF process bound to the MIB (Optional) Parameters of trap messages

4.14.2 Binding an OSPF Process to the MIB


Context
When multiple OSPF processes are enabled, you can bind an OSPF process to the MIB so that the MIB processes only the bound process. Do as follows on the S9300.
4-54 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf mib-binding process-id

An OSPF process is bound to the MIB. ----End

4.14.3 Configuring OSPF to Send Trap Messages


Context
Do as follows on the S9300.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


snmp-agent trap enable ospf [ process-id ] [ ifauthfail | ifcfgerror | ifrxbadpkt | ifstatechange | lsdbapproachoverflow | lsdboverflow | maxagelsa | nbrrestarthelperchange | nbrstatechange | originatelsa | restartstatuschange | txretransmit | vifauthfail | vifcfgerror | virifrxbadpkt | virifstatechange | viriftxretransmit | virnbrstatechange | vnbrrestarthelperchange ] *

The OSPF process is configured to send trap messages. You can configure OSPF to send the SNMP trap messages of different types and specify a certain OSPF process to send them. If the OSPF process ID is not specified, all OSPF processes send trap messages. ----End

4.14.4 Enabling OSPF to Record Logs


Context
Do as follows on the S9300.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-55

4 OSPF Configuration
ospf [ process-id ]

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The OSPF view is displayed. Step 3 Run:


enable log [ config | state | error ]

OSPF is configured to record logs. ----End

4.14.5 Checking the Configuration


Prerequisite
The network management function of OSPF is configured.

Procedure
l Run the display ospf [ process-id ] brief command to check brief information about an OSPF process.

----End

Example
Run the display ospf brief command, and you can check the configuration of the network management function of OSPF.
<Quidway> display ospf brief OSPF Process 1 with Router ID 192.168.32.11 OSPF Protocol Information RouterID: 192.168.32.11 Border Router: Route Tag: 0 Multi-VPN-Instance is not enabled Graceful-restart capability: disabled Helper support capability : not configured Applications Supported: MPLS Traffic-Engineering Spf-schedule-interval: 5 s Default ASE parameters: Metric: 1 Tag: 1 Type: 2 Route Preference: 10 ASE Route Preference: 150 SPF Computation Count: 87 RFC 1583 Compatible Retransmission limitation is disabled This process is currently bound to MIB This process is currently bound to SNMP trap Area Count: 1 Nssa Area Count: 0 ExChange/Loading Neighbors: 0 Area: 0.0.0.0 (MPLS TE not enabled) Authtype: None Area flag: Normal SPF scheduled Count: 87 ExChange/Loading Neighbors: 0 Interface: 20.0.0.1 (Vlanif20) Cost: 1 State: BDR Type: Broadcast MTU: 1430 Priority: 1 Designated Router: 20.0.0.2 Backup Designated Router: 20.0.0.1 Timers: Hello 10 , Dead 40 , Poll 120 , Retransmit 5 , Transmit Delay 1

4-56

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

4.15 Maintaining OSPF


This section describes how to restart an OSPF process, delete the OSPF information, and debug OSPF. 4.15.1 Restarting an OSPF Process 4.15.2 Clearing OSPF Information 4.15.3 Debugging OSPF

4.15.1 Restarting an OSPF Process


Context

CAUTION
The OSPF adjacency between the S9300s may be torn down after you run the reset ospf command to restart the OSPF process. So, confirm the action before you run the command. After the OSPF routing policy or protocol changes, you need to restart the OSPF process for the new configuration to take effect. Perform either of the following steps to restart the OSPF process.

Procedure
l l Run the reset ospf [ process-id ] process command in the user view to restart an OSPF process. Run the reset ospf [ process-id ] process graceful-restart command in the user view to restart an OSPF process in GR mode.

----End

4.15.2 Clearing OSPF Information


Context

CAUTION
OSPF information cannot be restored after you clear it. So, confirm the action before you run the command.

Procedure
l Run the reset ospf [ process-id ] counters [ neighbor [ interface-type interface-number ] [ router-id ] ] command in the user view to clear the OSPF counter.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-57

Issue 04 (2010-01-08)

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Run the reset ospf [ process-id ] redistribution command in the user view to clear the routes imported by OSPF.

----End

4.15.3 Debugging OSPF


Context

CAUTION
Debugging affects the performance of the system. So, after debugging, run the undo debugging all command to disable it immediately. When an OSPF fault occurs, run the following debugging commands in the user view to locate the fault. For the procedure for enabling debugging, see the chapter "Monitoring and Debugging" in the Quidway S9300 Terabit Routing Switch Configuration Guide - Device Management.

Procedure
l Run the debugging ospf [ process-id ] packet [ ack | dd | hello | request | update ] [ brief ] [ filter { src | nbr } { acl-number | ip-prefix ip-prefix-name } ]debugging ospf packet [ rcv-dump [ error ] | snd-dump ] [ filter { src | nbr } { acl-number | ip-prefix ip-prefix-name } ]debugging ospf [ process-id ] packet grace command to enable debugging of OSPF packets. Run the debugging ospf [ process-id ] hot-standby command to enable debugging of OSPF hot standby. Run the debugging ospf [ process-id ] event command to enable debugging of OSPF events. Run the debugging ospf [ process-id ] lsa-originate command to enable debugging of OSPF OSPF LSAs. Run the debugging ospf [ process-id ] spf { all | brief | intra }debugging ospf [ processid ] spf { asbr-summary | ase | net-summary | nssa } [ filter { acl acl-number | ipprefix ip-prefix-name } ] command to enable debugging of SPF calculation of OSPF.

l l l l

----End

4.16 Configuration Examples


This section provides several configuration examples of OSPF. 4.16.1 Configuring Basic OSPF Functions 4.16.2 Example for Configuring an OSPF Stub Area 4.16.3 Example for Configuring an NSSA Area 4.16.4 Example for Configuring DR Election of OSPF 4.16.5 Example for Configuring an OSPF virtual link
4-58 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

4.16.6 Example for Configuring Load Balancing Among OSPF Routes 4.16.7 Example for Configuring OSPF GR 4.16.8 Example for Configuring BFD for OSPF

4.16.1 Configuring Basic OSPF Functions


Networking Requirements
As shown in Figure 4-4, all S9300s run OSPF, and the entire AS is partitioned into three areas. S9300-A and S9300-B function as ABRs to forward routes between areas. You must ensure that every S9300 can learn the routes to all network segments in the AS. Figure 4-4 Networking diagram for configuring the basic OSPF functions
S9300-A Area 0
GE1/0/1 GE1/0/2 GE1/0/1 GE1/0/2

S9300-B

S9300-C

S9300-D
GE1/0/1 GE1/0/1

Area 1
GE1/0/2 GE1/0/1

Area 2
GE1/0/2 GE1/0/1

S9300-E

S9300-F

S9300 S9300-A S9300-A S9300-B S9300-B S9300-C S9300-C S9300-D S9300-D S9300-E S9300-F

Interface GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/1

VLANIF interface VLANIF 10 VLANIF 20 VLANIF 10 VLANIF 30 VLANIF 20 VLANIF 40 VLANIF 30 VLANIF 50 VLANIF 40 VLANIF 50

IP address 192.168.0.1/24 192.168.1.1/24 192.168.0.2/24 192.168.2.1/24 192.168.1.2/24 172.16.1.1/24 192.168.2.2/24 172.17.1.1/24 172.16.1.2/24 172.17.1.2/24

Configuration Roadmap
The configuration roadmap is as follows:
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-59

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

1. 2. 3. 4.

Create VLANs and add corresponding interfaces to the VLANs. Assign an IP address to each VLANIF interface. Enable OSPF on each S9300 and specify network segments in different areas. View the routing table and database information.

Data Preparation
l l l

ID of the VLAN that each interface belongs to, as shown in Figure 4-4 IP address of each VLANIF interface, as shown in Figure 4-4 Router ID and OSPF process ID of each S9300 and the area that each interface belongs to:

On S9300-A, the router ID is 1.1.1.1; the OSPF process ID is 1; the network segment of Area 0 is 192.168.0.0/24; the network segment of Area 1 is 192.168.1.0/24. On S9300-B, the router ID is 2.2.2.2; the OSPF process ID is 1; the network segment of Area 0 is 192.168.0.0/24; the network segment of Area 2 is 192.168.2.0/24. On S9300-C, the router ID is 3.3.3.3; the OSPF process ID is 1; the network segments of Area 1 are 192.168.1.0/24 and 172.16.1.0/24. On S9300-D, the router ID is 4.4.4.4; the OSPF process ID is 1; the network segments of Area 2 are 192.168.2.0/24 and 172.17.1.0/24. On S9300-E, the router ID is 5.5.5.5; the OSPF process ID is 1; the network segment of Area 1 is 172.16.1.0/24. On S9300-F, the router ID is 6.6.6.6; the OSPF process ID is 1; the network segment of Area 2 is 172.17.1.0/24.

Procedure
Step 1 Configure VLANs that the related interfaces belong to.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] vlan batch 10 20 [S9300-A] interface gigabitEthernet [S9300-A-GigabitEthernet1/0/1] port [S9300-A-GigabitEthernet1/0/1] port [S9300-A-GigabitEthernet1/0/1] quit [S9300-A] interface gigabitEthernet [S9300-A-GigabitEthernet1/0/2] port [S9300-A-GigabitEthernet1/0/2] port [S9300-A-GigabitEthernet1/0/2] quit

1/0/1 hybrid pvid vlan 10 hybrid untagged vlan 10 1/0/2 hybrid pvid vlan 20 hybrid untagged vlan 20

The configurations of S9300-B, S9300-C, S9300-E, and S9300-F are similar to the configuration of S9300-A, and are not mentioned here. Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ip address 192.168.0.1 24 [S9300-A-Vlanif10] quit [S9300-A] interface vlanif 20 [S9300-A-Vlanif20] ip address 192.168.1.1 24 [S9300-A-Vlanif20] quit

The configurations on S9300-B, S9300-C, S9300-E, and S9300-F are similar to the configuration of S9300-A, and are not mentioned here. Step 3 Configure the basic OSPF functions. # Configure S9300-A.
4-60 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


[S9300-A] router id 1.1.1.1 [S9300-A] ospf [S9300-A-ospf-1] area 0 [S9300-A-ospf-1-area-0.0.0.0] [S9300-A-ospf-1-area-0.0.0.0] [S9300-A-ospf-1] area 1 [S9300-A-ospf-1-area-0.0.0.1] [S9300-A-ospf-1-area-0.0.0.1] [S9300-A-ospf-1] quit

4 OSPF Configuration

network 192.168.0.0 0.0.0.255 quit network 192.168.1.0 0.0.0.255 quit

# Configure S9300-B.
[S9300-B] router id 2.2.2.2 [S9300-B] ospf [S9300-B-ospf-1] area 0 [S9300-B-ospf-1-area-0.0.0.0] [S9300-B-ospf-1-area-0.0.0.0] [S9300-B-ospf-1] area 2 [S9300-B-ospf-1-area-0.0.0.2] [S9300-B-ospf-1-area-0.0.0.2] [S9300-B-ospf-1] quit

network 192.168.0.0 0.0.0.255 quit network 192.168.2.0 0.0.0.255 quit

# Configure S9300-C.
[S9300-C] router id 3.3.3.3 [S9300-C] ospf [S9300-C-ospf-1] area 1 [S9300-C-ospf-1-area-0.0.0.1] network 192.168.1.0 0.0.0.255 [S9300-C-ospf-1-area-0.0.0.1] network 172.16.1.0 0.0.0.255 [S9300-C-ospf-1-area-0.0.0.1] quit [S9300-C-ospf-1] quit

# Configure S9300-D.
[S9300-D] router id 4.4.4.4 [S9300-D] ospf [S9300-D-ospf-1] area 2 [S9300-D-ospf-1-area-0.0.0.2] network 192.168.2.0 0.0.0.255 [S9300-D-ospf-1-area-0.0.0.2] network 172.17.1.0 0.0.0.255 [S9300-D-ospf-1-area-0.0.0.2] quit [S9300-D-ospf-1] quit

# Configure S9300-E.
[S9300-E] router id 5.5.5.5 [S9300-E] ospf [S9300-E-ospf-1] area 1 [S9300-E-ospf-1-area-0.0.0.1] network 172.16.1.0 0.0.0.255 [S9300-E-ospf-1-area-0.0.0.1] quit [S9300-E-ospf-1] quit

# Configure S9300-F.
[S9300-F] router id 6.6.6.6 [S9300-F] ospf [S9300-F-ospf-1] area 2 [S9300-F-ospf-1-area-0.0.0.2] network 172.17.1.0 0.0.0.255 [S9300-F-ospf-1-area-0.0.0.2] quit [S9300-F-ospf-1] quit

Step 4 Verify the configuration. # View information about OSPF neighbors of S9300-A.
[S9300-A] display ospf peer OSPF Process 1 with Router ID 1.1.1.1 Neighbors Area 0.0.0.0 interface 192.168.0.1(Vlanif10)'s neighbors

Issue 04 (2010-01-08)

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

4-61

4 OSPF Configuration
Router ID: 2.2.2.2 Address: 192.168.0.2 State: Full Mode:Nbr is Master Priority: 1 DR: 192.168.0.1 BDR: 192.168.0.2 MTU: 0 Dead timer due in 36 sec Neighbor is up for 00:15:04 Authentication Sequence: [ 0 ] Neighbors

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


GR State: Normal

Area 0.0.0.1 interface 192.168.1.1(Vlanif20)'s neighbors Router ID: 3.3.3.3 Address: 192.168.1.2 GR State: Normal State: Full Mode:Nbr is Master Priority: 1 DR: 192.168.1.1 BDR: 192.168.1.2 MTU: 0 Dead timer due in 39 sec Neighbor is up for 00:07:32 Authentication Sequence: [ 0 ]

# Check the OSPF routing table of S9300-A.


[S9300-A] display ospf routing OSPF Process 1 with Router ID 1.1.1.1 Routing Tables Routing for Network Destination Cost 172.16.1.0/24 2 172.17.1.0/24 3 192.168.0.0/24 1 192.168.1.0/24 1 192.168.2.0/24 2 Total Nets: 5 Intra Area: 3 Type Transit Inter-area Transit Transit Inter-area ASE: 0 NextHop 192.168.1.2 192.168.0.2 192.168.0.1 192.168.1.1 192.168.0.2 NSSA: 0 AdvRouter 3.3.3.3 2.2.2.2 1.1.1.1 1.1.1.1 2.2.2.2 Area 0.0.0.1 0.0.0.0 0.0.0.0 0.0.0.1 0.0.0.0

Inter Area: 2

# View the LSDB of S9300-A.


[S9300-A] display ospf lsdb OSPF Process 1 with Router ID 1.1.1.1 Link State Database Type Router Router Network Sum-Net Sum-Net Sum-Net Sum-Net Type Router Router Router Router Network Sum-Net Sum-Net Sum-Net LinkState ID 2.2.2.2 1.1.1.1 192.168.0.1 172.16.1.0 172.17.1.0 192.168.2.0 192.168.1.0 LinkState ID 192.168.1.2 5.5.5.5 3.3.3.3 1.1.1.1 172.16.1.1 172.17.1.0 192.168.2.0 192.168.0.0 Area: 0.0.0.0 AdvRouter 2.2.2.2 1.1.1.1 1.1.1.1 1.1.1.1 2.2.2.2 2.2.2.2 1.1.1.1 Area: 0.0.0.1 AdvRouter 192.168.1.2 5.5.5.5 3.3.3.3 1.1.1.1 3.3.3.3 1.1.1.1 1.1.1.1 1.1.1.1 Age 317 316 316 250 203 237 295 Age 188 214 217 289 670 202 242 300 Len 48 48 32 28 28 28 28 Len 48 36 60 48 32 28 28 28 Sequence 80000003 80000002 80000001 80000001 80000001 80000002 80000002 Sequence 80000002 80000004 80000008 80000002 80000001 80000001 80000001 80000001 Metric 1 1 0 2 2 1 1 Metric 1 1 1 1 0 3 2 1

# View the routing table of S9300-D and run the ping command to check the network connectivity.
[S9300-D] display ospf routing OSPF Process 1 with Router ID 4.4.4.4 Routing Tables

4-62

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

Routing for Network Destination Cost 172.16.1.0/24 4 172.17.1.0/24 1 192.168.0.0/24 2 192.168.1.0/24 3 192.168.2.0/24 1 Total Nets: 5 Intra Area: 2

Type Inter-area Transit Inter-area Inter-area Transit ASE: 0

NextHop 192.168.2.1 172.17.1.1 192.168.2.1 192.168.2.1 192.168.2.2 NSSA: 0

AdvRouter 2.2.2.2 4.4.4.4 2.2.2.2 2.2.2.2 4.4.4.4

Area 0.0.0.2 0.0.0.2 0.0.0.2 0.0.0.2 0.0.0.2

Inter Area: 3

[S9300-D] ping 172.16.1.1 PING 172.16.1.1: 56 data bytes, press CTRL_C to break Reply from 172.16.1.1: bytes=56 Sequence=1 ttl=253 time=62 Reply from 172.16.1.1: bytes=56 Sequence=2 ttl=253 time=16 Reply from 172.16.1.1: bytes=56 Sequence=3 ttl=253 time=62 Reply from 172.16.1.1: bytes=56 Sequence=4 ttl=253 time=94 Reply from 172.16.1.1: bytes=56 Sequence=5 ttl=253 time=63 --- 172.16.1.1 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 16/59/94 ms

ms ms ms ms ms

----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # router id 1.1.1.1 # vlan batch 10 20 # interface Vlanif10 ip address 192.168.0.1 255.255.255.0 # interface Vlanif20 ip address 192.168.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # ospf 1 area 0.0.0.0 network 192.168.0.0 0.0.0.255 area 0.0.0.1 network 192.168.1.0 0.0.0.255 # return

Configuration file of S9300-B


# sysname S9300-B # router id 2.2.2.2 # vlan batch 10 30 #

Issue 04 (2010-01-08)

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

4-63

4 OSPF Configuration
interface Vlanif10 ip address 192.168.0.2 255.255.255.0 # interface Vlanif30 ip address 192.168.2.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # ospf 1 area 0.0.0.0 network 192.168.0.0 0.0.0.255 area 0.0.0.2 network 192.168.2.0 0.0.0.255 # return l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of S9300-C


# sysname S9300-C # router id 3.3.3.3 # vlan batch 20 40 # interface Vlanif20 ip address 192.168.1.2 255.255.255.0 # interface Vlanif40 ip address 172.16.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # ospf 1 area 0.0.0.1 network 192.168.1.0 0.0.0.255 network 172.16.1.0 0.0.0.255 # return

Configuration file of S9300-D


# sysname S9300-D # router id 4.4.4.4 # vlan batch 30 50 # interface Vlanif30 ip address 192.168.2.2 255.255.255.0 # interface Vlanif50 ip address 172.17.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface GigabitEthernet1/0/2

4-64

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


port hybrid pvid vlan 50 port hybrid untagged vlan 50 # ospf 1 area 0.0.0.2 network 192.168.2.0 0.0.0.255 network 172.17.1.0 0.0.0.255 # return l

4 OSPF Configuration

Configuration file of S9300-E


# sysname S9300-E # router id 5.5.5.5 # vlan batch 40 # interface Vlanif40 ip address 172.16.1.2 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # ospf 1 area 0.0.0.1 network 172.16.1.0 0.0.0.255 # return

Configuration file of S9300-F


# sysname S9300-F # router id 6.6.6.6 # vlan batch 50 # interface Vlanif50 ip address 172.17.1.2 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # ospf 1 area 0.0.0.2 network 172.17.1.0 0.0.0.255 # return

4.16.2 Example for Configuring an OSPF Stub Area


Networking Requirements
As shown in Figure 4-5, OSPF is enabled on all S9300s and the AS is divided into three areas. S9300-A and S9300-B function as ABRs to forward routes between areas; S9300-D functions as the ASBR to import external routes, that is, static routes. You need to configure Area 1 as a stub area. The LSAs advertised to this area can thus be reduced, without affecting the route reachability.

Issue 04 (2010-01-08)

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

4-65

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Figure 4-5 Networking diagram for configuring a stub area


S9300-A Area 0
GE1/0/1 GE1/0/2 GE1/0/1 GE1/0/2

S9300-B

S9300-C

S9300-D
GE1/0/1 GE1/0/1

Area 1
GE1/0/2 GE1/0/1

Area 2
GE1/0/2 GE1/0/1

S9300-E

S9300-F

S9300 S9300-A S9300-A S9300-B S9300-B S9300-C S9300-C S9300-D S9300-D S9300-E S9300-F

Interface GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/1

VLANIF interface VLANIF 10 VLANIF 20 VLANIF 10 VLANIF 30 VLANIF 20 VLANIF 40 VLANIF 30 VLANIF 50 VLANIF 40 VLANIF 50

IP address 192.168.0.1/24 192.168.1.1/24 192.168.0.2/24 192.168.2.1/24 192.168.1.2/24 172.16.1.1/24 192.168.2.2/24 172.17.1.1/24 172.16.1.2/24 172.17.1.2/24

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. Enable OSPF on each S9300 and configure the basic OSPF functions. Configure static routes on S9300-D and import them into OSPF. Configure Area 1 as a stub area by running the stub command on all S9300s in Area 1. Configure S9300-A not to advertise Type 3 LSAs to the stub area.

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

ID of the VLAN that each interface belongs to, as shown in Figure 4-5 IP address of each VLANIF interface, as shown in Figure 4-5
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

4-66

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


l

4 OSPF Configuration

Router ID and OSPF process ID of each S9300 and area that each interface belongs to:

On S9300-A, the router ID is 1.1.1.1; the OSPF process ID is 1; the network segment of Area 0 is 192.168.0.0/24, the network segment of Area 1 is 192.168.1.0/24. On S9300-B, the router ID is 2.2.2.2; the OSPF process ID is 1; the network segment of Area 0 is 192.168.0.0/24; the network segment of Area 2 is 192.168.2.0/24. On S9300-C, the router ID is 3.3.3.3; the OSPF process ID is 1; the network segments of Area 1 are 192.168.1.0/24 and 172.16.1.0/24. On S9300-D, the router ID is 4.4.4.4; the OSPF process ID is 1; the network segments of Area 2 are 192.168.2.0/24 and 172.17.1.0/24. On S9300-E, the router ID is 5.5.5.5; the OSPF process ID is 1; the network segment of Area 1 is 172.16.1.0/24. On S9300-F, the router ID is 6.6.6.6; the OSPF process ID is 1; the network segment of Area 2 is 172.17.1.0/24.

Procedure
Step 1 Configure the basic OSPF functions. See 4.16.1 Configuring Basic OSPF Functions. Step 2 Configure S9300-D to import static routes. # Import static routes on S9300-D.
[S9300-D] ip route-static 200.0.0.0 8 null 0 [S9300-D] ospf [S9300-D-ospf-1] import-route static type 1 [S9300-D-ospf-1] quit

# View information about the ABR or ASBR on S9300-C.


[S9300-C] display ospf abr-asbr OSPF Process 1 with Router ID 3.3.3.3 Routing Table to ABR and ASBR Type Intra-area Inter-area Destination 1.1.1.1 4.4.4.4 Area 0.0.0.1 0.0.0.1 Cost Nexthop 1 192.168.1.1 3 192.168.1.1 RtType ABR ASBR

# View the OSPF routing table of S9300-C.


[S9300-C] display ospf routing OSPF Process 1 with Router ID 3.3.3.3 Routing Tables Routing for Network Destination Cost 172.16.1.0/24 1 172.17.1.0/24 4 192.168.0.0/24 2 192.168.1.0/24 1 192.168.2.0/24 3 Routing for ASEs Destination 200.0.0.0/8 Total Nets: 6 Intra Area: 2 Cost 4 Type Transit Inter-area Inter-area Transit Inter-area Type Type1 ASE: 1 NextHop 172.16.1.1 192.168.1.1 192.168.1.1 192.168.1.2 192.168.1.1 Tag 1 NSSA: 0 AdvRouter 3.3.3.3 1.1.1.1 1.1.1.1 3.3.3.3 1.1.1.1 NextHop 192.168.1.1 Area 0.0.0.1 0.0.0.1 0.0.0.1 0.0.0.1 0.0.0.1 AdvRouter 4.4.4.4

Inter Area: 3

If S9300-C resides in a common area, you can find AS external routes in the routing table.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-67

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Step 3 Configure Area 1 as a stub area. # Configure S9300-A.


[S9300-A] ospf [S9300-A-ospf-1] area 1 [S9300-A-ospf-1-area-0.0.0.1] stub [S9300-A-ospf-1-area-0.0.0.1] quit [S9300-A-ospf-1] quit

# Configure S9300-C.
[S9300-C] ospf [S9300-C-ospf-1] area 1 [S9300-C-ospf-1-area-0.0.0.1] stub [S9300-C-ospf-1-area-0.0.0.1] quit [S9300-C-ospf-1] quit

# Configure S9300-E.
[S9300-E] ospf [S9300-E-ospf-1] area 1 [S9300-E-ospf-1-area-0.0.0.1] stub [S9300-E-ospf-1-area-0.0.0.1] quit [S9300-E-ospf-1] quit

# View the routing table of S9300-C.


[S9300-C] display ospf routing OSPF Process 1 with Router ID 3.3.3.3 Routing Tables Routing for Network Destination Cost 0.0.0.0/0 2 172.16.1.0/24 1 172.17.1.0/24 4 192.168.0.0/24 2 192.168.1.0/24 1 192.168.2.0/24 3 Total Nets: 6 Intra Area: 2 Type Inter-area Transit Inter-area Inter-area Transit Inter-area ASE: 0 NextHop 192.168.1.1 172.16.1.1 192.168.1.1 192.168.1.1 192.168.1.2 192.168.1.1 NSSA: 0 AdvRouter 1.1.1.1 3.3.3.3 1.1.1.1 1.1.1.1 3.3.3.3 1.1.1.1 Area 0.0.0.1 0.0.0.1 0.0.0.1 0.0.0.1 0.0.0.1 0.0.0.1

Inter Area: 4

When the area where S9300-C resides is configured as a stub area, you cannot find the AS external route but a default route out of the AS. # Disable S9300-A from advertising Type 3 LSAs to the stub area.
[S9300-A] ospf [S9300-A-ospf-1] area 1 [S9300-A-ospf-1-area-0.0.0.1] stub no-summary [S9300-A-ospf-1-area-0.0.0.1] quit [S9300-A-ospf-1] quit

Step 4 Verify the configuration. # View the OSPF routing table of S9300-C.
[S9300-C] display ospf routing OSPF Process 1 with Router ID 3.3.3.3 Routing Tables Routing for Network Destination Cost 0.0.0.0/0 2 172.16.1.0/24 1 Type Inter-area Transit NextHop 192.168.1.1 172.16.1.1 AdvRouter 1.1.1.1 3.3.3.3 Area 0.0.0.1 0.0.0.1

4-68

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


192.168.1.0/24 1 Transit ASE: 0 192.168.1.2 NSSA: 0 3.3.3.3

4 OSPF Configuration
0.0.0.1

Total Nets: 3 Intra Area: 2 Inter Area: 1

After the advertisement of summary LSA to the stub area is disabled, the route entries are further reduced. External routes are not found in the routing table. Instead, there is a default route out of the AS. ----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # router id 1.1.1.1 # vlan batch 10 20 # interface Vlanif10 ip address 192.168.0.1 255.255.255.0 # interface Vlanif20 ip address 192.168.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # ospf 1 area 0.0.0.0 network 192.168.0.0 0.0.0.255 area 0.0.0.1 network 192.168.1.0 0.0.0.255 stub no-summary # return
NOTE

Configuration files of S9300-B and S9300-F are similar to the configuration file of S9300-A, and are not mentioned here.
l

Configuration file of S9300-C


# sysname S9300-C # router id 3.3.3.3 # vlan batch 20 40 # interface Vlanif20 ip address 192.168.1.2 255.255.255.0 # interface Vlanif40 ip address 172.16.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet1/0/2

Issue 04 (2010-01-08)

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

4-69

4 OSPF Configuration
port hybrid pvid vlan 40 port hybrid untagged vlan 40 # ospf 1 area 0.0.0.1 network 192.168.1.0 0.0.0.255 network 172.16.1.0 0.0.0.255 stub # return l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of S9300-D


# sysname S9300-D # vlan batch 30 50 # router id 4.4.4.4 # interface Vlanif30 ip address 192.168.2.2 255.255.255.0 # interface Vlanif50 ip address 172.17.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # ospf 1 import-route static type 1 area 0.0.0.2 network 192.168.2.0 0.0.0.255 network 172.17.1.0 0.0.0.255 # ip route-static 200.0.0.0 255.0.0.0 NULL0 # return

Configuration file of S9300-E


# sysname S9300-E # router id 5.5.5.5 # vlan batch 40 # interface Vlanif40 ip address 172.16.1.2 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # ospf 1 area 0.0.0.1 network 172.16.1.0 0.0.0.255 stub # return

4-70

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

4.16.3 Example for Configuring an NSSA Area


Networking Requirements
As shown in Figure 4-6, OSPF is enabled on all S9300s and the AS is divided into three areas. S9300-A and S9300-B function as ABRs to forward routes between areas; S9300-D functions as the ASBR to import external routes, that is, static routes. You need to configure Area 1 as an NSSA area and configure Figure 4-6-C as an ASBR to import external routes (static routes). The routing information can be transmitted correctly in the AS. Figure 4-6 Networking diagram for configuring an NSSA area
S9300-A Area 0
GE1/0/1 GE1/0/2 GE1/0/1 GE1/0/2

S9300-B

S9300-C

S9300-D
GE1/0/1 GE1/0/1

Area 1
GE1/0/2 GE1/0/1

Area 2
GE1/0/2 GE1/0/1

S9300-E

S9300-F

S9300 S9300-A S9300-A S9300-B S9300-B S9300-C S9300-C S9300-D S9300-D S9300-E S9300-F

Interface GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/1

VLANIF interface VLANIF 10 VLANIF 20 VLANIF 10 VLANIF 30 VLANIF 20 VLANIF 40 VLANIF 30 VLANIF 50 VLANIF 40 VLANIF 50

IP address 192.168.0.1/24 192.168.1.1/24 192.168.0.2/24 192.168.2.1/24 192.168.1.2/24 172.16.1.1/24 192.168.2.2/24 172.17.1.1/24 172.16.1.2/24 172.17.1.2/24

Configuration Roadmap
The configuration roadmap is as follows:
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-71

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

1. 2. 3. 4.

Enable OSPF on each S9300 and configure the basic OSPF functions. Configure static routes on S9300-D and import them into OSPF. Configure Area 1 as an NSSA area and check the OSPF routing information of S9300-C. You must run the nssa command on all the devices in Area 1. Configure static routes on S9300-C, import them into OSPF, and check the OSPF routing information of S9300-D.

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

ID of the VLAN that each interface belongs to, as shown in Figure 4-6 IP address of each VLANIF interface, as shown in Figure 4-6 Router ID and OSPF process ID of each S9300 and the area that each interface belongs to:

On S9300-A, the router ID is 1.1.1.1; the OSPF process ID is 1; the network segment of Area 0 is 192.168.0.0/24, and the network segment of Area 1 is 192.168.1.0/24. On S9300-B, the router ID is 2.2.2.2; the OSPF process ID is 1; the network segment of Area 0 is 192.168.0.0/24; the network segment of Area 2 is 192.168.2.0/24. On S9300-C, the router ID is 3.3.3.3; the OSPF process ID is 1; the network segments of Area 1 are 192.168.1.0/24 and 172.16.1.0/24. On S9300-D, the router ID is 4.4.4.4; the OSPF process ID is 1; the network segments of Area 2 are 192.168.2.0/24 and 172.17.1.0/24. On S9300-E, the router ID is 5.5.5.5; the OSPF process ID is 1; the network segment of Area 1 is 172.16.1.0/24. On S9300-F, the router ID is 6.6.6.6; the OSPF process ID is 1; the network segment of Area 2 is 172.17.1.0/24.

Procedure
Step 1 Configure the basic OSPF functions. See 4.16.1 Configuring Basic OSPF Functions. Step 2 Configure S9300-D to import static routes. See 4.16.2 Example for Configuring an OSPF Stub Area. Step 3 Configure Area 1 as an NSSA area. # Configure S9300-A.
[S9300-A] ospf [S9300-A-ospf-1] area 1 [S9300-A-ospf-1-area-0.0.0.1] nssa default-route-advertise no-summary [S9300-A-ospf-1-area-0.0.0.1] quit [S9300-A-ospf-1] quit

# Configure S9300-C.
[S9300-C] ospf [S9300-C-ospf-1] area 1 [S9300-C-ospf-1-area-0.0.0.1] nssa [S9300-C-ospf-1-area-0.0.0.1] quit [S9300-C-ospf-1] quit

# Configure S9300-E.
[S9300-E] ospf [S9300-E-ospf-1] area 1

4-72

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


[S9300-E-ospf-1-area-0.0.0.1] nssa [S9300-E-ospf-1-area-0.0.0.1] quit [S9300-E-ospf-1] quit
NOTE

4 OSPF Configuration

The default-route-advertise and no-summary keywords are recommend on the ABR (S9300-A). In this manner, the size of the routing table of devices in an NSSA area can be reduced. For the other devices in the NSSA area, you need to run only the nssa command.

# View the OSPF routing table of S9300-C.


[S9300-C] display ospf routing OSPF Process 1 with Router ID 3.3.3.3 Routing Tables Routing for Network Destination Cost 0.0.0.0/0 2 172.16.1.0/24 1 192.168.1.0/24 1 Total Nets: 3 Intra Area: 2 Type Inter-area Transit Transit ASE: 0 NextHop 192.168.1.1 172.16.1.1 192.168.1.2 NSSA: 0 AdvRouter 1.1.1.1 3.3.3.3 3.3.3.3 Area 0.0.0.1 0.0.0.1 0.0.0.1

Inter Area: 1

Step 4 Configure S9300-C to import static routes. # Import static routes on S9300-C.
[S9300-C] ip route-static 100.0.0.0 8 null 0 [S9300-C] ospf [S9300-C-ospf-1] import-route static [S9300-C-ospf-1] quit

Step 5 Verify the configuration. # View the OSPF routing table of S9300-D.
[S9300-D] display ospf routing OSPF Process 1 with Router ID 4.4.4.4 Routing Tables Routing for Network Destination Cost 172.16.1.0/24 4 172.17.1.0/24 1 192.168.0.0/24 2 192.168.1.0/24 3 192.168.2.0/24 1 Routing for ASEs Destination Cost 100.0.0.0/8 1 Total Nets: 6 Intra Area: 2 Type Inter-area Transit Inter-area Inter-area Transit Type Type2 ASE: 1 NextHop 192.168.2.1 172.17.1.1 192.168.2.1 192.168.2.1 192.168.2.2 Tag 1 NSSA: 0 AdvRouter 2.2.2.2 4.4.4.4 2.2.2.2 2.2.2.2 4.4.4.4 NextHop 192.168.2.1 Area 0.0.0.2 0.0.0.2 0.0.0.2 0.0.0.2 0.0.0.2 AdvRouter 1.1.1.1

Inter Area: 3

From the routing table of S9300-D, you can find that an AS external route is imported to the NSSA area. ----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A

Issue 04 (2010-01-08)

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

4-73

4 OSPF Configuration
# router id 1.1.1.1 # vlan batch 10 20 # interface Vlanif10 ip address 192.168.0.1 255.255.255.0 # interface Vlanif20 ip address 192.168.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # ospf 1 area 0.0.0.0 network 192.168.0.0 0.0.0.255 area 0.0.0.1 network 192.168.1.0 0.0.0.255 nssa default-route-advertise no-summary # return
NOTE

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration files of S9300-B, S9300-D, and S9300-F are similar to the configuration file of S9300-A, and are not mentioned here.
l

Configuration file of S9300-C


# sysname S9300-C # router id 3.3.3.3 # vlan batch 20 40 # interface Vlanif20 ip address 192.168.1.2 255.255.255.0 # interface Vlanif40 ip address 172.16.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # ospf 1 import-route static area 0.0.0.1 network 192.168.1.0 0.0.0.255 network 172.16.1.0 0.0.0.255 nssa # ip route-static 100.0.0.0 255.0.0.0 NULL0 # return

Configuration file of S9300-E


# sysname S9300-E #

4-74

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


router id 5.5.5.5 # vlan batch 40 # interface Vlanif40 ip address 172.16.1.2 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # ospf 1 area 0.0.0.1 network 172.16.1.0 0.0.0.255 nssa # return

4 OSPF Configuration

4.16.4 Example for Configuring DR Election of OSPF


Networking Requirements
As shown in Figure 4-7, S9300-A has the highest priority of 100 on the network and is elected as the DR; S9300-C has the second highest priority and is elected as the BDR; The priority of S9300-B is 0 and therefore cannot be elected as a DR or a BDR; the priority of S9300-D is not set, so S9300-D uses the default value 1. Figure 4-7 Networking diagram for configuring DR election of an OSPF process
S9300-A S9300-B

GE1/0/1

GE1/0/1

GE1/0/1

GE1/0/1

S9300-C S9300 S9300-A S9300-B S9300-C S9300-D Interface

S9300-D VLANIF interface VLANIF 10 VLANIF 10 VLANIF 10 VLANIF 10 IP address 192.168.1.1/24 192.168.1.2/24 192.168.1.3/24 192.168.1.4/24

GigabitEthernet1/0/1 GigabitEthernet1/0/1 GigabitEthernet1/0/1 GigabitEthernet1/0/1

Configuration Roadmap
The configuration roadmap is as follows: 1. 2.
Issue 04 (2010-01-08)

Configure the ID of the VLAN that each interface belongs to. Assign an IP address to each VLANIF interface.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-75

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

3. 4. 5.

Configure the router ID, enable OSPF, and specify network segments on each S9300. Check whether an S9300 is the DR or BDR with its default DR priority. Set the DR priority of the interface on each S9300 and check whether the S9300 becomes the DR or BDR.

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

ID of the VLAN that each interface belongs to, as shown in Figure 4-7 IP address of each VLANIF interface, as shown in Figure 4-7 Router ID, OSPF process ID, and DR priority of each S9300, and area that each interface belongs to:

On S9300-A, the router ID is 1.1.1.1; the OSPF process ID is 1; the network segment of Area 0 is 192.168.1.0/24; the DR priority is 100. On S9300-B, the router ID is 2.2.2.2; the OSPF process ID is 1; the network segment of Area 0 is 192.168.1.0/24; the DR priority is 0. On S9300-C, the router ID is 3.3.3.3; the OSPF process ID is 1; the network segment of Area 0 is 192.168.1.0/24; the DR priority is 2. On S9300-D, the router ID is 4.4.4.4; the OSPF process ID is 1; the network segment of Area 0 is 192.168.1.0/24; the DR priority is 1.

Procedure
Step 1 Configure the VLAN that the each interface belongs to.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] vlan 10 [S9300-A-vlan10] quit [S9300-A] interface GigabitEthernet 1/0/1 [S9300-A-GigabitEthernet1/0/1] port hybrid pvid vlan 10 [S9300-A-GigabitEthernet1/0/1] port hybrid untagged vlan 10 [S9300-A-GigabitEthernet1/0/1] quit

The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of S9300-A, and are not mentioned here. Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ip address 192.168.1.1 24

The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of S9300-A, and are not mentioned here. Step 3 Configure the basic OSPF functions. # Configure S9300-A.
[S9300-A] router id 1.1.1.1 [S9300-A] ospf [S9300-A-ospf-1] area 0 [S9300-A-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255 [S9300-A-ospf-1-area-0.0.0.0] quit [S9300-A-ospf-1] quit

# Configure S9300-B.
4-76 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


[S9300-B] router id 2.2.2.2 [S9300-B] ospf [S9300-B-ospf-1] area 0 [S9300-B-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255 [S9300-B-ospf-1-area-0.0.0.0] quit [S9300-B-ospf-1] quit

4 OSPF Configuration

# Configure S9300-C.
[S9300-C] router id 3.3.3.3 [S9300-C] ospf [S9300-C-ospf-1] area 0 [S9300-C-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255 [S9300-C-ospf-1-area-0.0.0.0] quit [S9300-C-ospf-1] quit

# Configure S9300-D.
[S9300-D] router id 4.4.4.4 [S9300-D] ospf [S9300-D-ospf-1] area 0 [S9300-D-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255 [S9300-D-ospf-1-area-0.0.0.0] quit [S9300-D-ospf-1] quit

# Check information about neighbors of S9300-A to find the DR and BDR.


[S9300-A] display ospf peer OSPF Process 1 with Router ID 1.1.1.1 Neighbors Area 0.0.0.0 interface 192.168.1.1(Vlanif10)'s neighbors Router ID: 2.2.2.2 Address: 192.168.1.2 GR State: Normal State: 2-Way Mode:Nbr is Master Priority: 1 DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0 Dead timer due in 32 sec Neighbor is up for 00:00:00 Authentication Sequence: [ 0 ] Router ID: 3.3.3.3 Address: 192.168.1.3 State: Full Mode:Nbr is Master Priority: 1 DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0 Dead timer due in 37 sec Neighbor is up for 00:04:06 Authentication Sequence: [ 0 ] Router ID: 4.4.4.4 Address: 192.168.1.4 State: Full Mode:Nbr is Master Priority: 1 DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0 Dead timer due in 37 sec Neighbor is up for 00:03:53 Authentication Sequence: [ 0 ] GR State: Normal

GR State: Normal

Check the neighbors of S9300-A. You can view the DR priority and the neighbor status. By default, the DR priority is 1. Now S9300-D functions as the DR and S9300-C functions as the BDR.
NOTE

When two routers have the save priority, the router with a greater router ID is elected as the DR. If an Ethernet interface of an S9300 becomes the DR, the other broadcast interfaces of the S9300 have a high priority in the future DR election. That is, the S9300 is still elected as the DR in later election and the DR cannot be preempted.

Step 4 Set the DR priority on each VLAN IF interface. # Configure S9300-A.


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-77

4 OSPF Configuration
[S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ospf dr-priority 100 [S9300-A-Vlanif10] quit

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configure S9300-B.
[S9300-B] interface vlanif 10 [S9300-B-Vlanif10] ospf dr-priority 0 [S9300-B-Vlanif10] quit

# Configure S9300-C.
[S9300-C] interface vlanif 10 [S9300-C-Vlanif10] ospf dr-priority 2 [S9300-C-Vlanif10] quit

# Check the status of the DR or BDR.


[S9300-D] display ospf peer OSPF Process 1 with Router ID 4.4.4.4 Neighbors Area 0.0.0.0 interface 192.168.1.4(Vlanif10)'s neighbors Router ID: 1.1.1.1 Address: 192.168.1.1 GR State: Normal State: Full Mode:Nbr is Slave Priority: 100 DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0 Dead timer due in 31 sec Neighbor is up for 00:11:17 Authentication Sequence: [ 0 ] Router ID: 2.2.2.2 Address: 192.168.1.2 GR State: Normal State: Full Mode:Nbr is Slave Priority: 0 DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0 Dead timer due in 35 sec Neighbor is up for 00:11:19 Authentication Sequence: [ 0 ] Router ID: 3.3.3.3 Address: 192.168.1.3 State: Full Mode:Nbr is Slave Priority: 2 DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0 Dead timer due in 33 sec Neighbor is up for 00:11:15 Authentication Sequence: [ 0 ]
NOTE

GR State: Normal

The DR priorities configured on the interfaces do not take effect immediately.

Step 5 Restart the OSPF process. In the user view of each S9300, run the reset ospf 1 process command to restart the OSPF process. Step 6 Verify the configuration. # Check the status of OSPF neighbors.
[S9300-D] display ospf peer OSPF Process 1 with Router ID 4.4.4.4 Neighbors Area 0.0.0.0 interface 192.168.1.4(Vlanif10)'s neighbors Router ID: 1.1.1.1 Address: 192.168.1.1 GR State: Normal State: Full Mode:Nbr is Slave Priority: 100 DR: 192.168.1.1 BDR: 192.168.1.3 MTU: 0 Dead timer due in 35 sec Neighbor is up for 00:07:19 Authentication Sequence: [ 0 ]

4-78

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


Router ID: 2.2.2.2 Address: 192.168.1.2 State: 2-Way Mode:Nbr is Master Priority: 0 DR: 192.168.1.1 BDR: 192.168.1.3 MTU: 0 Dead timer due in 35 sec Neighbor is up for 00:00:00 Authentication Sequence: [ 0 ] Router ID: 3.3.3.3 Address: 192.168.1.3 State: Full Mode:Nbr is Slave Priority: 2 DR: 192.168.1.1 BDR: 192.168.1.3 MTU: 0 Dead timer due in 37 sec Neighbor is up for 00:07:17 Authentication Sequence: [ 0 ]

4 OSPF Configuration
GR State: Normal

GR State: Normal

# Check the status of OSPF interfaces.


[S9300-A] display ospf interface OSPF Process 1 with Router ID 1.1.1.1 Interfaces Area: 0.0.0.0 IP Address 192.168.1.1 (MPLS TE not enabled) Type State Cost Pri Broadcast DR 1 100 DR 192.168.1.1 BDR 192.168.1.3

[S9300-B] display ospf interface OSPF Process 1 with Router ID 2.2.2.2 Interfaces Area: 0.0.0.0 IP Address 192.168.1.2 (MPLS TE not enabled) Type State Cost Pri Broadcast DROther 1 0 DR 192.168.1.1 BDR 192.168.1.3

If all neighbors are in Full state, it indicates that the local device establishes adjacencies with all its neighbors. If a neighbor stays in 2-Way state, it indicates the local S9300 and the neighbor are not the DR or BDR. Therefore, they do not need to exchange LSAs. If the status of an OSPF interface is DROther, it indicates that the router is neither the DR nor the BDR. ----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # router id 1.1.1.1 # vlan batch 10 # interface Vlanif10 ip address 192.168.1.1 255.255.255.0 ospf dr-priority 100 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # ospf 1 area 0.0.0.0 network 192.168.1.0 0.0.0.255 # return

Issue 04 (2010-01-08)

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

4-79

4 OSPF Configuration
l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of S9300-B


# sysname S9300-B # router id 2.2.2.2 # vlan batch 10 # interface Vlanif10 ip address 192.168.1.2 255.255.255.0 ospf dr-priority 0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # ospf 1 area 0.0.0.0 network 192.168.1.0 0.0.0.255 # return

Configuration file of S9300-C


# sysname S9300-C # router id 3.3.3.3 # vlan batch 10 # interface Vlanif10 ip address 192.168.1.3 255.255.255.0 ospf dr-priority 2 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # ospf 1 area 0.0.0.0 network 192.168.1.0 0.0.0.255 # return

Configuration file of S9300-D


# sysname S9300-D # router id 4.4.4.4 # vlan batch 10 # interface Vlanif10 ip address 192.168.1.4 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # ospf 1 area 0.0.0.0 network 192.168.1.0 0.0.0.255 # return

4-80

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

4.16.5 Example for Configuring an OSPF virtual link


Networking Requirements
As shown in Figure 4-8, Area 2 is not directly connected to the backbone area. Area 1 functions as a transit area to connect Area 2 to Area 0. A virtual link is set up between S9300-A and S9300B. Figure 4-8 Networking for configuring an OSPF virtual link
S9300-A
GE1/0/2

Area 1
GE1/0/1 GE1/0/1

S9300-B
GE1/0/2

S9300-C
GE1/0/1

Virtual Link

S9300-D
GE1/0/1

Area 0

Area 2

S9300 S9300-A S9300-A S9300-B S9300-B S9300-C S9300-D

Interface GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/1

VLANIF interface VLANIF 10 VLANIF 20 VLANIF 10 VLANIF 30 VLANIF 20 VLANIF 30

IP address 192.168.1.1/24 10.1.1.1/8 192.168.1.2/24 172.16.1.1/16 10.1.1.2/8 172.16.1.2/16

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. Enable OSPF on each S9300 and configure the basic OSPF functions. Configure a virtual link between S9300-A and S9300-B to connect the non-backbone areas and the backbone area.

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

ID of the VLAN that each interface belongs to, as shown in Figure 4-8 IP address of each VLANIF interface, as shown in Figure 4-8 Router ID and OSPF process ID of each S9300 and area that each interface belongs to:

On S9300-A, the router ID is 1.1.1.1; OSPF process ID is 1; the network segment of Area 1 is 192.168.1.0/24; the network segment of Area 0 is 10.0.0.0/8.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-81

Issue 04 (2010-01-08)

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

On S9300-B, the router ID is 2.2.2.2; OSPF process ID is 1; the network segment of Area 1 is 192.168.1.0/24; the network segment of Area 2 is 172.16.0.0/16. On S9300-C, the router ID is 3.3.3.3; OSPF process ID is 1; the network segment of Area 0 is 10.0.0.0/8. On S9300-D, the router ID4.4.4.4; OSPF process ID is 1; the network segment of Area 2 is 172.16.0.0/16.

Procedure
Step 1 Configure VLANs that the related interfaces belong to.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] vlan batch 10 20 [S9300-A] interface GigabitEthernet 1/0/1 [S9300-A-GigabitEthernet1/0/1]port hybrid pvid vlan 10 [S9300-A-GigabitEthernet1/0/1]port hybrid untagged vlan 10 [S9300-A-GigabitEthernet1/0/1] quit S9300-A] interface GigabitEthernet 1/0/2 [S9300-A-GigabitEthernet1/0/2] port hybrid pvid vlan 20 [S9300-A-GigabitEthernet1/0/2] port hybrid untagged vlan 20 [S9300-A-GigabitEthernet1/0/2] quit

The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of S9300-A, and are not mentioned here. Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ip address 192.168.1.1 24 [S9300-A-Vlanif10] quit [S9300-A] interface vlanif 20 [S9300-A-Vlanif20] ip address 10.1.1.1 8 [S9300-A-Vlanif20] quit

The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of S9300-A, and are not mentioned here. Step 3 Configure the basic OSPF functions. # Configure S9300-A.
[S9300-A] ospf 1 router-id 1.1.1.1 [S9300-A-ospf-1] area 0 [S9300-A-ospf-1-area-0.0.0.0] network 10.0.0.0 0.255.255.255 [S9300-A-ospf-1-area-0.0.0.0] quit [S9300-A-ospf-1] area 1 [S9300-A-ospf-1-area-0.0.0.1] network 192.168.1.0 0.0.0.255 [S9300-A-ospf-1-area-0.0.0.1] quit [S9300-A-ospf-1] quit

Configure S9300-B.
[S9300-B] ospf 1 router-id 2.2.2.2 [S9300-B-ospf-1] area 1 [S9300-B-ospf-1-area-0.0.0.1] network 192.168.1.0 0.0.0.255 [S9300-B-ospf-1-area-0.0.0.1] quit [S9300-B-ospf-1] area 2 [S9300-B-ospf-1-area-0.0.0.2] network 172.16.0.0 0.0.255.255 [S9300-B-ospf-1-area-0.0.0.2] quit [S9300-B-ospf-1] quit

# Configure S9300-C.
[S9300-C] ospf 1 router-id 3.3.3.3 [S9300-C-ospf-1] area 0

4-82

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


[S9300-C-ospf-1-area-0.0.0.0] network 10.0.0.0 0.255.255.255 [S9300-C-ospf-1-area-0.0.0.0] quit [S9300-C-ospf-1] quit

4 OSPF Configuration

# Configure S9300-D.
[S9300-D] ospf 1 router-id 4.4.4.4 [S9300-D-ospf-1] area 2 [S9300-D-ospf-1-area-0.0.0.2] network 172.16.0.0 0.0.255.255 [S9300-D-ospf-1-area-0.0.0.2] quit [S9300-D-ospf-1] quit

# View the OSPF routing table of S9300-C.


[S9300-A] display ospf routing OSPF Process 1 with Router ID 1.1.1.1 Routing Tables Routing for Network Destination Cost 10.0.0.0/8 1 192.168.1.0/24 1 Total Nets: 2 Intra Area: 2 Type Transit Transit ASE: 0 NextHop 10.1.1.1 192.168.1.1 NSSA: 0 AdvRouter 3.3.3.3 2.2.2.2 Area 0.0.0.0 0.0.0.1

Inter Area: 0

Area 2 is not directly connected to Area 0. Therefore, the routing table of S9300-A does not contain any route to Area 2. Step 4 Configure a virtual link. # Configure S9300-A.
[S9300-A] ospf [S9300-A-ospf-1] area 1 [S9300-A-ospf-1-area-0.0.0.1] vlink-peer 2.2.2.2 [S9300-A-ospf-1-area-0.0.0.1] quit [S9300-A-ospf-1] quit

# Configure S9300-B.
[S9300-B] ospf 1 [S9300-B-ospf-1] area 1 [S9300-B-ospf-1-area-0.0.0.1] vlink-peer 1.1.1.1 [S9300-B-ospf-1-area-0.0.0.1] quit [S9300-B-ospf-1] quit

Step 5 Verify the configuration. # View the OSPF routing table of S9300-C.
[S9300-A] display ospf routing OSPF Process 1 with Router ID 1.1.1.1 Routing Tables Routing for Network Destination Cost 172.16.0.0/16 2 10.0.0.0/8 1 192.168.1.0/24 1 Total Nets: 3 Intra Area: 2 Type Inter-area Transit Transit ASE: 0 NextHop 192.168.1.2 10.1.1.1 192.168.1.1 NSSA: 0 AdvRouter 2.2.2.2 1.1.1.1 2.2.2.2 Area 0.0.0.0 0.0.0.0 0.0.0.1

Inter Area: 1

----End
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-83

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # vlan batch 10 20 # interface Vlanif10 ip address 192.168.1.1 255.255.255.0 # interface Vlanif20 ip address 10.1.1.1 255.0.0.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # ospf 1 router-id 1.1.1.1 area 0.0.0.0 network 10.0.0.0 0.255.255.255 area 0.0.0.1 network 192.168.1.0 0.0.0.255 vlink-peer 2.2.2.2 # return

Configuration file of S9300-B


# sysname S9300-B # vlan batch 10 30 # interface Vlanif10 ip address 192.168.1.2 255.255.255.0 # interface Vlanif30 ip address 172.16.1.1 255.255.0.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # ospf 1 router-id 2.2.2.2 area 0.0.0.1 network 192.168.1.0 0.0.0.255 vlink-peer 1.1.1.1 area 0.0.0.2 network 172.16.0.0 0.0.255.255 # return

Configuration file of S9300-C


# sysname S9300-C # vlan 20 # interface Vlanif20 ip address 10.1.1.2 255.0.0.0 #

4-84

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


interface GigabitEthernet1/0/1 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # ospf 1 router-id 3.3.3.3 area 0.0.0.0 network 10.0.0.0 0.255.255.255 # return l

4 OSPF Configuration

Configuration file of S9300-D


# sysname S9300-D # vlan 30 # interface Vlanif30 ip address 172.16.1.2 255.255.0.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # ospf 1 router-id 4.4.4.4 area 0.0.0.2 network 172.16.0.0 0.0.255.255 # return

4.16.6 Example for Configuring Load Balancing Among OSPF Routes


Networking Requirements
As shown in Figure 4-9, the networking requirements are as follows:
l l l

S9300-A, S9300-B, S9300-C, and S9300-D connect to each other through OSPF. S9300-A, S9300-B, S9300-C, and S9300-D belong to Area 0. Load balancing needs is configured so that the traffic of S9300-A can be sent to S9300-D through S9300-B and S9300-C.

Figure 4-9 Networking diagram for configuring load balancing among OSPF routes
GE1/0/1 GE1/0/2

S9300-B
GE1/0/1 GE1/0/3 GE1/0/1 GE1/0/3 GE1/0/2

Area0
GE1/0/2

S9300-A

S9300-D

GE1/0/1

GE1/0/2

S9300-C

S9300

Interface

VLANIF interface

IP address

Issue 04 (2010-01-08)

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

4-85

4 OSPF Configuration
S9300-A S9300-A S9300-A S9300-B S9300-B S9300-C S9300-C S9300-D S9300-D S9300-D GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/3 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/3 VLANIF 10 VLANIF 20 VLANIF 50 VLANIF 10 VLANIF 30 VLANIF 20 VLANIF 40 VLANIF 30 VLANIF 40 VLANIF 60

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


10.1.1.1/24 10.1.2.1/24 172.16.1.1/24 10.1.1.2/24 192.168.0.1/24 10.1.2.2./24 192.168.1.1/24 192.168.0.2/24 192.168.1.2/24 172.17.1.1/24

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Configure the basic OSPF functions on each S9300 to implement interconnection. Disable load balancing on S9300-A and check the routing table of S9300-A. (Optional) Set the weight of equal-cost routes on S9300-A.

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

ID of the VLAN that each interface belongs to, as shown in Figure 4-9 IP address of each VLANIF interface, as shown in Figure 4-9 Router ID and OSPF process ID of each S9300 and area that each interface belongs to:

On S9300-A, the router ID is 1.1.1.1; the OSPF process ID is 1; the network segments of Area 1 are 10.1.1.0/24, 10.1.2.0/24, and 172.16.1.0/24. On S9300-B, the router ID is 2.2.2.2; the OSPF process ID is 1; the network segments of Area 0 are 10.1.1.0/24 and 192.168.0.0/24. The router ID of S9300-C is 3.3.3.3; the OSPF process ID is 1; the network segments of Area 0 are 10.1.2.0/24 and 192.168.1.0/24. On S9300-D, the router ID is 4.4.4.4; the OSPF process ID is 1; the network segments of Area 0 are 172.17.1.0/24, 192.168.0.0/24, and 192.168.1.0/24.

l l

Number of routes for load balancing on S9300-A: 1 Weight of the equal-cost route whose next hop is S9300-C: 1

Procedure
Step 1 Configure VLANs that the related interfaces belong to.
<Quidway> [Quidway] [S9300-A] [S9300-A] system-view sysname S9300-A vlan batch 10 20 50 interface GigabitEthernet 1/0/1

4-86

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


[S9300-A-GigabitEthernet1/0/1] port hybrid [S9300-A-GigabitEthernet1/0/1] port hybrid [S9300-A-GigabitEthernet1/0/1] quit [S9300-A] interface GigabitEthernet 1/0/2 [S9300-A-GigabitEthernet1/0/2] port hybrid [S9300-A-GigabitEthernet1/0/2] port hybrid [S9300-A-GigabitEthernet1/0/2] quit S9300-A] interface GigabitEthernet 1/0/3 [S9300-A-GigabitEthernet1/0/3] port hybrid [S9300-A-GigabitEthernet1/0/3] port hybrid [S9300-A-GigabitEthernet1/0/3] quit pvid vlan 10 untagged vlan 10 pvid vlan 20 untagged vlan 20 pvid vlan 50 untagged vlan 50

4 OSPF Configuration

The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of S9300-A, and are not mentioned here. Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ip address 10.1.1.1 24 [S9300-A-Vlanif10] quit [S9300-A] interface vlanif 20 [S9300-A-Vlanif20] ip address 10.1.2.1 24 [S9300-A-Vlanif20] quit

The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of S9300-A, and are not mentioned here. Step 3 Configure the basic OSPF functions. See 4.16.1 Configuring Basic OSPF Functions. Step 4 Disable load balancing on S9300-A.
[S9300-A] ospf [S9300-A-ospf-1] maximum load-balancing 1 [S9300-A-ospf-1] quit

# View the routing table of S9300-A.


[S9300-A] display ip routing-table Route Flags: R - relay, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 11 Routes : 11 Destination/Mask 10.1.1.0/24 10.1.1.1/32 10.1.2.0/24 10.1.2.1/32 127.0.0.0/8 127.0.0.1/32 172.16.1.0/24 172.16.1.1/32 172.17.1.0/24 192.168.0.0/24 192.168.1.0/24 Proto Direct Direct Direct Direct Direct Direct Direct Direct OSPF OSPF OSPF Pre 0 0 0 0 0 0 0 0 10 10 10 Cost 0 0 0 0 0 0 0 0 3 2 2 Flags D D D D D D D D D D D NextHop 10.1.1.1 127.0.0.1 10.1.2.1 127.0.0.1 127.0.0.1 127.0.0.1 172.16.1.1 127.0.0.1 10.1.1.2 10.1.1.2 10.1.2.2 Interface Vlanif10 InLoopBack0 Vlanif20 InLoopBack0 InLoopBack0 InLoopBack0 Vlanif50 InLoopBack0 Vlanif10 Vlanif10 Vlanif20

As shown in the routing table, when the maximum number of equal-cost routes for load balancing is set to 1, OSPF selects 10.1.1.2 as the next hop to the destination network 172.17.1.0.
NOTE

In the preceding example, 10.1.1.2 is selected as the optimal next hop. This is because OSPF selects the next hop randomly among equal-cost routes.

Step 5 Restore the default number of equal-cost routes for load balancing on S9300-A.
[S9300-A] ospf [S9300-A-ospf-1] undo maximum load-balancing [S9300-A-ospf-1] quit

Issue 04 (2010-01-08)

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

4-87

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

# View the routing table of S9300-A.


[S9300-A] display ip routing-table Route Flags: R - relay, D - download to fib ---------------------------------------------------------------------------Routing Tables: Public Destinations : 11 Routes : 12 Destination/Mask 10.1.1.0/24 10.1.1.1/32 10.1.2.0/24 10.1.2.1/32 127.0.0.0/8 127.0.0.1/32 172.16.1.0/24 172.16.1.1/32 172.17.1.0/24 192.168.0.0/24 192.168.1.0/24 Proto Direct Direct Direct Direct Direct Direct Direct Direct OSPF OSPF OSPF OSPF Pre 0 0 0 0 0 0 0 0 10 10 10 10 Cost 0 0 0 0 0 0 0 0 3 3 2 2 Flags D D D D D D D D D D D D NextHop 10.1.1.1 127.0.0.1 10.1.2.1 127.0.0.1 127.0.0.1 127.0.0.1 172.16.1.1 127.0.0.1 10.1.1.2 10.1.2.2 10.1.1.2 10.1.2.2 Interface Vlanif10 InLoopBack0 Vlanif20 InLoopBack0 InLoopBack0 InLoopBack0 Vlanif50 InLoopBack0 Vlanif10 Vlanif20 Vlanif10 Vlanif20

As shown in the routing table, when the default setting of load balancing is restored, the next hops of S9300-A, that is, 10.1.1.2 (S9300-B) and 10.1.2.2 (S9300-C), become valid routes. This is because the default number of equal-cost routes is 6. Step 6 (Optional) Set the weight of equal-cost routes on S9300-A. If you do not want to implement load balancing between S9300-B and S9300-C, set the weight of equal-cost routes to specify the next hop.
[S9300-A] ospf [S9300-A-ospf-1] nexthop 10.1.2.2 weight 1 [S9300-A-ospf-1] quit

# View the routing table of S9300-A.


[S9300-A] display ip routing-table Route Flags: R - relay, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 11 Routes : 11 Destination/Mask 10.1.1.0/24 10.1.1.1/32 10.1.2.0/24 10.1.2.1/32 127.0.0.0/8 127.0.0.1/32 172.16.1.0/24 172.16.1.1/32 172.17.1.0/24 192.168.0.0/24 192.168.1.0/24 Proto Direct Direct Direct Direct Direct Direct Direct Direct OSPF OSPF OSPF Pre 0 0 0 0 0 0 0 0 10 10 10 Cost 0 0 0 0 0 0 0 0 3 2 2 Flags D D D D D D D D D D D NextHop 10.1.1.1 127.0.0.1 10.1.2.1 127.0.0.1 127.0.0.1 127.0.0.1 172.16.1.1 127.0.0.1 10.1.2.2 10.1.1.2 10.1.2.2 Interface Vlanif10 InLoopBack0 Vlanif20 InLoopBack0 InLoopBack0 InLoopBack0 Vlanif50 InLoopBack0 Vlanif20 Vlanif10 Vlanif20

As shown in the routing table, the priority of the next hop 10.1.2.2 (S9300-C) with the weight as 1 is higher than that of 10.1.1.2 (S9300-B), after the weight is set for equal-cost routes. Thus, OSPF selects the route with the next hop 10.1.2.2 as the optimal route. ----End

Configuration Files
l

Configuration file of S9300-A


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

4-88

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


# sysname S9300-A # vlan batch 10 20 50 # interface Vlanif10 ip address 10.1.1.1 255.255.255.0 # interface Vlanif20 ip address 10.1.2.1 255.255.255.0 # interface Vlanif50 ip address 172.16.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet1/0/3 port hybrid pvid vlan 50 port hybrid untagged vlan 50 # ospf 1 router-id 1.1.1.1 area 0.0.0.0 network 10.1.1.0 0.0.0.255 network 10.1.2.0 0.0.0.255 network 172.16.1.0 0.0.0.255 # return l

4 OSPF Configuration

Configuration file of S9300-B


sysname S9300-B # vlan batch 10 30 # interface Vlanif10 ip address 10.1.1.2 255.255.255.0 # interface Vlanif30 ip address 192.168.0.1 255.255.255.0 # interface GigabitEthernet1/0/1 port link-type access port default vlan 10 # interface GigabitEthernet1/0/2 port link-type access port default vlan 30 # ospf 1 router-id 2.2.2.2 area 0.0.0.0 network 10.1.1.0 0.0.0.255 network 192.168.0.0 0.0.0.255 # return

Configuration file of S9300-C


# sysname S9300-C # vlan batch 20 40 # interface Vlanif20 ip address 10.1.2.2 255.255.255.0 # interface Vlanif40

Issue 04 (2010-01-08)

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

4-89

4 OSPF Configuration
ip address 192.168.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # ospf 1 router-id 3.3.3.3 area 0.0.0.0 network 10.1.2.0 0.0.0.255 network 192.168.1.0 0.0.0.255 # return l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of S9300-D


# sysname S9300-D # vlan batch 30 40 60 # interface Vlanif30 ip address 192.168.0.2 255.255.255.0 # interface Vlanif40 ip address 192.168.1.2 255.255.255.0 # interface Vlanif60 ip address 172.17.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # interface GigabitEthernet1/0/3 port hybrid pvid vlan 60 port hybrid untagged vlan 60 # ospf 1 router-id 4.4.4.4 area 0.0.0.0 network 192.168.0.0 0.0.0.255 network 192.168.1.0 0.0.0.255 network 172.17.1.0 0.0.0.255 # return

4.16.7 Example for Configuring OSPF GR


Networking Requirements
As shown in Figure 4-10, S9300-A and S9300-B have two main control boards, which work in active/standby mode. S9300-A and S9300-B belong to Area 0 and are connected through OSPF. They also provide the GR feature.

4-90

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

Figure 4-10 Networking diagram for configuring OSPF GR

S9300-A
GE1/0/1 GE1/0/1

S9300-B

Area 0

S9300 S9300-A S9300-B

Interface GigabitEthernet1/0/1 GigabitEthernet1/0/1

VLANIF interface VLANIF 10 VLANIF 10

IP address 1.1.1.1/24 1.1.1.2/24

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Configure the basic OSPF functions on each S9300 to implement interconnection. Enable the Opaque LSA function. Configure GR on each S9300.

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

ID of the VLAN that each interface belongs to, as shown in Figure 4-10 IP address of each VLANIF interface, as shown in Figure 4-10 Router ID and OSPF process ID of each S9300 and area that each interface belongs to:

On S9300-A, the router ID is 1.1.1.1; the OSPF process ID is 1;the network segment of Area 0 is 1.1.1.0/24. On S9300-B, the router ID is 2.2.2.2; OSPF process ID is 1; the network segment of Area 0 is 1.1.1.0/24.

Procedure
Step 1 Configure the basic OSPF functions. See 4.16.1 Configuring Basic OSPF Functions. Step 2 Configure the Opaque LSA function.
[S9300-A] ospf [S9300-A-ospf-1] opaque-capability enable

# Configure S9300-B.
[S9300-B] ospf [S9300-B-ospf-1] opaque-capability enable

Step 3 Configure the OSPF GR feature.


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 4-91

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

# Configure S9300-A.
[S9300-A] ospf [S9300-A-ospf-1] graceful-restart

# Configure S9300-B.
[S9300-B] ospf [S9300-B-ospf-1] graceful-restart

Step 4 Verify the configuration. # View the GR status of S9300-A.


[S9300-A] display ospf graceful-restart OSPF Process 1 with Router ID 1.1.1.1 Graceful-restart capability : enabled Graceful-restart support : planned and un-planned, totally Helper-policy support : planned and un-planned, strict lsa check Current GR state : normal Graceful-restart period : 120 seconds Number of neighbors under helper: Normal neighbors : 0 Virtual neighbors : 0 Sham-link neighbors : 0 Total neighbors : 0 Number of restarting neighbors : 0 Last exit reason: On graceful restart : none On Helper : none

# Verify the GR feature of S9300-A.


[S9300-A] quit <S9300-A> reset ospf process graceful-restart

# View the neighbor status on S9300-B.


[S9300-B] display ospf peer OSPF Process 1 with Router ID 1.1.1.2 Neighbors Area 0.0.0.0 interface 1.1.1.2(Vlanif10)'s neighbors Router ID: 1.1.1.1 Address: 1.1.1.1 State: Full Mode:Nbr is Slave Priority: 1 DR: 1.1.1.2 BDR: 1.1.1.1 MTU: 0 Dead timer due in 29 sec Neighbor is up for 00:01:01 Authentication Sequence: [ 0 ] GR State: Doing GR

The status of the neighbor is Full. ----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # router id 1.1.1.1 # vlan batch 10

4-92

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


# interface Vlanif10 ip address 1.1.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # ospf 1 opaque-capability enable graceful-restart area 0.0.0.0 network 1.1.1.0 0.0.0.255 # return l

4 OSPF Configuration

Configuration file of S9300-B


# sysname S9300-B # router id 2.2.2.2 # vlan batch 10 # interface Vlanif10 ip address 1.1.1.2 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # ospf 1 opaque-capability enable graceful-restart area 0.0.0.0 network 1.1.1.0 0.0.0.255 # return

4.16.8 Example for Configuring BFD for OSPF


Networking Requirements
As shown in Figure 4-11, the networking requirement are as follows:
l l l

S9300-A, S9300-B, and S9300-C run OSPF. BFD for OSPF is enabled on S9300-A, S9300-B, and S9300-C. Service traffic is transmitted on the main link S9300-AS9300-B. Link S9300-A S9300-CS9300-B is a backup link. BFD is configured on the interfaces between S9300-A and S9300-B. When a fault occurs on the link between the S9300s, BFD can quickly detect the fault and notify OSPF of the fault. Then, the service flow is transmitted on the backup link.

Issue 04 (2010-01-08)

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

4-93

4 OSPF Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Figure 4-11 Networking diagram for configuring BFD for OSPF

S9300-A
GE2/0/0 GE2/0/0 GE1/0/0

S9300-B
GE3/0/0 GE1/0/0

GE1/0/0

GE2/0/0

S9300-C
S9300 S9300-A S9300-A S9300-B S9300-B S9300-B S9300-C S9300-C Interface GigabitEthernet1/0/0 GigabitEthernet2/0/0 GigabitEthernet1/0/0 GigabitEthernet2/0/0 GigabitEthernet3/0/0 GigabitEthernet1/0/0 GigabitEthernet2/0/0 VLANIF interface VLANIF 10 VLANIF 20 VLANIF 30 VLANIF 20 VLANIF 40 VLANIF 10 VLANIF 30 IP address 1.1.1.1/24 3.3.3.1/24 2.2.2.2/24 3.3.3.2/24 172.16.1.1/24 1.1.1.2/24 2.2.2.1/24

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Configure the basic OSPF functions on the S9300s. Enable the BFD feature globally. Enable BFD for OSPF on S9300-A and S9300-B.

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

ID of the VLAN that each interface belongs to, as shown in Figure 4-11 IP address of each VLANIF interface, as shown in Figure 4-11 Router ID and OSPF process ID of each S9300 and network segments that OSPF interfaces belong to:

On S9300-A, the router ID is 1.1.1.1; OSPF process ID is 1; the network segments of Area 0 are 3.1.1.0/24 and 1.1.1.0/24. On S9300-B, the router ID is 2.2.2.2; OSPF process ID is 1; the network segments of Area 0 are 3.1.1.0/24, 2.2.2.0/24, and 172.16.1.0/24.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

4-94

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4 OSPF Configuration

On S9300-C, the router ID is 3.3.3.3; the OSPF process ID is 1; the network segments of Area 0 are 192.168.1.0/24 and 172.16.1.0/24.

Minimum interval for sending the BFD packets, minimum interval for receiving the BFD packets, and local detection time multiplier on S9300-A and S9300-B

Procedure
Step 1 Create VLANs and add corresponding interfaces to the VLANs.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] vlan 10 S9300-A-vlan10] quit [S9300-A] vlan 20 [S9300-A-vlan20] quit [S9300-A] interface GigabitEthernet 1/0/0 [S9300-A-GigabitEthernet1/0/0] port hybrid [S9300-A-GigabitEthernet1/0/0] port hybrid [S9300-A-GigabitEthernet1/0/0] quit S9300-A] interface GigabitEthernet 2/0/0 [S9300-A-GigabitEthernet2/0/0] port hybrid [S9300-A-GigabitEthernet1/0/0] port hybrid [S9300-A-GigabitEthernet2/0/0] quit

pvid vlan 10 untagged vlan 10 pvid vlan 20 untagged vlan 20

The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A, and are not mentioned here. Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ip address 1.1.1.1 24 [S9300-A-Vlanif10] quit [S9300-A] interface vlanif 20 [S9300-A-Vlanif20] ip address 3.3.3.1 24 [S9300-A-Vlanif20] quit

The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A, and are not mentioned here. Step 3 Configure the basic OSPF functions. See 4.16.1 Configuring Basic OSPF Functions. Step 4 Configure BFD for OSPF. # Enable BFD globally on S9300-A.
[S9300-A] bfd [S9300-A-bfd] quit [S9300-A] ospf [S9300-A-ospf-1] bfd all-interfaces enable [S9300-A-ospf-1] quit

# Enable BFD globally on S9300-B.


[S9300-B] bfd [S9300-B-bfd] quit [S9300-B] ospf [S9300-B-ospf-1] bfd all-interfaces enable [S9300-B-ospf-1] quit

# Run the display ospf bfd session all command on S9300-A or S9300-B. You can see that the BFD state is Up. Take S9300-A for example. The display is as follows:
[S9300-A] display ospf bfd session all OSPF Process 1 with Router ID 1.1.1.1

Issue 04 (2010-01-08)

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

4-95

4 OSPF Configuration
Area 0.0.0.0 interface NeighborId:2.2.2.2 BFDState:up Multiplier:3 RemoteIpAdd:3.3.3.2

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


3.3.3.1(Vlanif20)'s BFD Sessions AreaId:0.0.0.0 Interface:Vlanif20 rx :1000 tx :1000 BFD Local Dis:8195 LocalIpAdd:3.3.3.1 Diagnostic Info:No diagnostic information

Area 0.0.0.0 interface 1.1.1.1(Vlanif10)'s BFD Sessions NeighborId:3.3.3.3 BFDState:up Multiplier:3 RemoteIpAdd:1.1.1.2 AreaId:0.0.0.0 Interface:Vlanif10 rx :1000 tx :1000 BFD Local Dis:8194 LocalIpAdd1:1.1.1.1 Diagnostic Info:No diagnostic information

Step 5 Configure the BFD feature of interfaces. # Configure BFD on VLANIF 20 of S9300-A, set the minimum interval for sending the packets and the minimum interval for receiving the packets to 100 ms, and set the local detection time multiplier to 4.
[S9300-A] interface vlanif 20 [S9300-A-Vlanif20] ospf bfd enable [S9300-A-Vlanif20] ospf bfd min-tx-interval 100 min-rx-interval 100 detectmultiplier 4 [S9300-A-Vlanif20] quit

# Configure BFD on VLANIF20 of S9300-B and set the minimum interval for sending the packets and the minimum interval for receiving the packets to 100 ms and the local detection time multiplier to 4.
[S9300-B] bfd [S9300-B-bfd] quit [S9300-B] interface vlanif 20 [S9300-B-Vlanif20] ospf bfd enable [S9300-B-Vlanif20] ospf bfd min-tx-interval 100 min-rx-interval 100 detectmultiplier 4 [S9300-B-Vlanif20] quit

# Run the display ospf bfd session all command on S9300-A or S9300-B. You can see that the BFD state is Up. Take S9300-B for example. The display is as follows:
[S9300-B] display ospf bfd session all OSPF Process 1 with Router ID 2.2.2.2 Area 0.0.0.0 interface 3.3.3.2(Vlanif20)'s BFD Sessions NeighborId:1.1.1.1 BFDState:up Multiplier:4 RemoteIpAdd:3.3.3.1 AreaId:0.0.0.0 Interface: Vlanif20 rx :100 tx :100 BFD Local Dis:8198 LocalIpAdd:3.3.3.2 Diagnostic Info:No diagnostic information

Area 0.0.0.0 interface 2.2.2.2(Vlanif30)'s BFD Sessions NeighborId:3.3.3.3 BFDState:up Multiplier:3 RemoteIpAdd:2.2.2.1 AreaId:0.0.0.0 Interface: Vlanif30 rx :1000 tx :1000 BFD Local Dis:8199 LocalIpAdd:2.2.2.2 Diagnostic Info:No diagnostic information

Step 6 Verify the configuration. # Run the shutdown command on VLANIF 20 of S9300-B to simulate a link fault.
[S9300-B] interface vlanif 20 [S9300-B-Vlanif20] shutdown

# View the routing table of S9300-A.


4-96 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


<S9300-A> display ospf routing OSPF Process 1 with Router ID 1.1.1.1 Routing Tables Routing for Network Destination Cost 172.16.1.1/24 3 3.3.3.0/24 1 2.2.2.0/24 2 1.1.1.0/24 1 Type Stub Stub Transit Transit NextHop 1.1.1.2 3.3.3.1 1.1.1.2 1.1.1.1 ASE: 0 AdvRouter 2.2.2.2 1.1.1.1 3.3.3.3 1.1.1.1 NSSA: 0

4 OSPF Configuration

Area 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0

Total Nets: 4 Intra Area: 4

Inter Area: 0

As shown in the OSPF routing table, the backup link S9300-AS9300-CS9300-B takes effect after the main link fails. The next hop address of the route to 172.16.1.0/24 becomes 1.1.1.2. ----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # router id 1.1.1.1 # vlan batch 10 20 # bfd # interface Vlanif10 ip address 1.1.1.1 255.255.255.0 # interface Vlanif20 ip address 3.3.3.1 255.255.255.0 ospf bfd enable ospf bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # ospf 1 bfd all-interface enable area 0.0.0.0 network 3.3.3.0 0.0.0.255 network 1.1.1.0 0.0.0.255 # return

Configuration file of S9300-B


# sysname S9300-B # router id 2.2.2.2 # vlan batch 20 30 40 # bfd # interface Vlanif20 ip address 3.3.3.2 255.255.255.0 ospf bfd enable ospf bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4

Issue 04 (2010-01-08)

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

4-97

4 OSPF Configuration
# interface Vlanif30 ip address 2.2.2.2 255.255.255.0 # interface Vlanif40 ip address 172.16.1.1 255.255.255.0 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface GigabitEthernet2/0/0 port link-type access port default vlan 20 # interface GigabitEthernet3/0/0 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # ospf 1 bfd all-interface enable area 0.0.0.0 network 3.3.3.0 0.0.0.255 network 2.2.2.0 0.0.0.255 network 172.16.1.0 0.0.0.255 # return l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of S9300 C


# sysname S9300-C # router id 3.3.3.3 # vlan batch 10 30 # bfd # interface Vlanif10 ip address 1.1.1.2 255.255.255.0 # interface Vlanif30 ip address 2.2.2.1 255.255.255.0 ospf bfd enable ospf bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # ospf 1 bfd all-interface enable area 0.0.0.0 network 1.1.1.0 0.0.0.255 network 2.2.2.0 0.0.0.255 # return

4-98

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

5 OSPFv3 Configuration

5
About This Chapter

OSPFv3 Configuration

This chapter describes the OSPFv3 fundamentals and configuration steps for basic OSPFv3 functions, OSPFv3 area features, OSPFv3 routing information and adjusting and optimizing OSPFv3 networks, along with typical examples. 5.1 OSPFv3 The Open Shortest Path First Version 3.0 (OSPFv3) supports the version 6 of the Internet Protocol (IPv6). OSPFv3 conforms to RFC 2740 (OSPF for IPv6). 5.2 OSPFv3 Features Supported by S9300 For the features that are provided by both OSPFv3 and OSPFv2, see "OSPF Configuration" in the Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing. This section describes the features exclusively provided by OSPFv3. 5.3 Configuring Basic OSPFv3 Functions This section describes how to configure basic OSPFv3 functions. 5.4 Establishing or Maintaining OSPFv3 Neighbor Relationship This section describes how to establish and maintain OSPFv3 neighbor relationship or adjacency relationship to establish an OSPFv3 network. 5.5 Configuring OSPFv3 Areas This section describes how to configure the OSPFv3 stub areas and virtual links. 5.6 Configuring OSPFv3 Route Attributes This section describes how to configure OSPF route attributes to change OSPFv3 routing polices, thus meeting the requirements of complex networking. 5.7 Controlling OSPFv3 Routing Information This section describes how to advertise and receive OSPFv3 routes and import external routes. 5.8 Optimizing an OSPF Network This section describes how to configure special features of OSPFv3 to adjust and optimize an OSPFv3 network. 5.9 Configuring OSPFv3 GR This section describes how to configure OSPFv3 GR to avoid the inaccurate route calculation and packet loss after an OSPF device restarts.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-1

5 OSPFv3 Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

5.10 Maintaining OSPFv3 This section describes how to debug the OSPFv3 functions. 5.11 Configuration Examples This section provides several configuration examples of OSPFv3.

5-2

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

5 OSPFv3 Configuration

5.1 OSPFv3
The Open Shortest Path First Version 3.0 (OSPFv3) supports the version 6 of the Internet Protocol (IPv6). OSPFv3 conforms to RFC 2740 (OSPF for IPv6). OSPFv3 and OSPFv2 have the following in common:
l l

32-bit Router ID, Area ID, and Link State Advertisement (LSA) link-state ID Five types of packets such as Hello, Database Description (DD), Link State Request (LSR), Link State Update (LSU), and Link State Acknowledgement (LSAck) packets Neighbor discovery and adjacency establishment mechanisms Flooding and aging mechanisms of LSAs LSA types

l l l

OSPFv3 and OSPFv2 differ as follows:


l l l l l

OSPFv3 runs based on a link; OSPFv2 runs based on a network segment. OSPFv3 can run multiple instances on the same link. The topology of OSPFv3 is independent of IPv6 address prefixes. OSPFv3 identifies its neighbors with the IPv6 link-local addresses. According to the flooding scope, OSPFv3 LSA flooding is classified into three types: LSA flooding on a link, LSA flooding within an area, LSA flooding between areas. According to the flooding scope, OSPFv2 LSA flooding is classified into two types: LSA flooding within an area and LSA flooding between areas.

5.2 OSPFv3 Features Supported by S9300


For the features that are provided by both OSPFv3 and OSPFv2, see "OSPF Configuration" in the Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing. This section describes the features exclusively provided by OSPFv3. The S9300 supports the following OSPFv3 features:
l l l l l

Basic features stipulated in RFC 2740 OSPFv3 stub areas OSFPv3 multi-process Multiple OSPFv3 processes can run on a device. OSPFv3 GR If a device restarts or performs the active/standby switchover, it directly ages all the entries in the Forward Information Base (FIB). This interrupts the routing. The neighboring devices remove the device from the neighbor list and inform other devices of the device failure. Then, SPF needs to be calculated again. If the device recovers after a short period of time, the neighbor relationship becomes unstable. This results in route flapping. If a device restarts because of abnormalities, you can enable OSPFv3 Graceful Restart (GR) to avoid service interruption during the restart of the device.

Issue 04 (2010-01-08)

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

5-3

5 OSPFv3 Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

5.3 Configuring Basic OSPFv3 Functions


This section describes how to configure basic OSPFv3 functions. 5.3.1 Establishing the Configuration Task 5.3.2 Enabling OSPFv3 5.3.3 Enabling OSPFv3 on an Interface 5.3.4 Entering the OSPFv3 Area View 5.3.5 Checking the Configuration

5.3.1 Establishing the Configuration Task


Applicable Environment
Enable the OSPFv3 process and specify its Router ID before configuring OSPFv3; otherwise, other functions cannot take effect. You must enable OSPFv3 and specify the interface and area ID before configuring other functions. OSPFv3 configurations, however, are independent of interface-related features.

Pre-configuration Tasks
Before configuring basic OSFPv3 functions, complete the following tasks:
l l

Making the network layers of the adjacent nodes accessible Enabling IPv6 capabilities

Data Preparation
To configure basic OSPFv3 functions, you need the following data. No. 1 2 3 Data Router ID OSPFv3 process ID Interfaces on which OSPFv3 needs to be enabled and their areas

5.3.2 Enabling OSPFv3


Context
OSPFv3 supports multiple processes. Multiple OSPFv3 processes running on one S9300 are differentiated by process IDs. OSPFv3 process ID is set when OSPFv3 is enabled and is only locally valid. It does not affect the packet exchange with other S9300s.
5-4 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

5 OSPFv3 Configuration

In the format of an IPv4 address, a router ID is a 32-bit unsigned integer that uniquely identifies a S9300 within an AS. The router ID of OSPFv3 must be manually set. If no router ID is set, OSPFv3 fails to run normally. When manually setting the router ID, ensure that the router IDs of any two S9300s in an AS are different. When multiple processes are enabled on a S9300, it is necessary to specify a unique route ID for each process. To ensure the stable running of OSPFv3, you need to allocate router IDs and set them in network planning. Do as follows on the S9300 that runs OSPFv3:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospfv3 [ process-id ]

OSPFv3 is enabled and the OSPFv3 view is displayed. Step 3 Run:


router-id router-id

A router ID is set. ----End

5.3.3 Enabling OSPFv3 on an Interface


Context
Because an interface has multiple instances, you need to specify the instance ID after OSPFv3 is enabled on the interface. If no instance ID is specified, the value defaults to 0. The same instance must be enabled on the interfaces between which the neighbor relationship is set up. Do as follows on the S9300 that runs OSPFv3:

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:


ospfv3 process-id area area-id [ instance instance-id ]

OSPFv3 is enabled on the interface.


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-5

5 OSPFv3 Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

After enabling OSPFv3 in the system view by using the ospfv3 command, you need to enable OSPFv3 on the interface. The area ID can be a decimal integer or in the IPv4 address format, but it is displayed in the IPv4 address format. ----End

5.3.4 Entering the OSPFv3 Area View


Context
You must configure the devices in the same area based on the area. Otherwise, the neighbor devices cannot exchange information with each other. The congestion of routing information or routing loop is thus caused. Do as follows on the S9300 that runs OSPFv3:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospfv3 [ process-id ]

The OSPFv3 view is displayed. Step 3 Run:


area area-id

The OSPFv3 area view is displayed. The area ID can be a decimal integer or in the IPv4 address format, but it is displayed in the IPv4 address format. An OSPFv3 area cannot be deleted directly. Only after all the configurations in the area view are removed and the related interfaces in this area become Down, this area is automatically removed. ----End

5.3.5 Checking the Configuration


Prerequisite
The configurations of the Basic OSPFv3 Functions are complete.

Procedure
l l
5-6

Run the display ospfv3 [ process-id ] command to check the summary information about the OSPFv3 process. Run the commands as follow to check the LSDB information about OSPFv3.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

5 OSPFv3 Configuration

display ospfv3 [ process-id ] lsdb [ external | grace | inter-prefix | inter-S9300 | intraprefix | link | network | S9300 ] [ link-state-id ] [ originate-S9300 advertising-S9300id ] display ospfv3 [ process-id ] lsdb statistics

Run the display ospfv3 [ process-id ] [ area area-id ] peer [ interface-type interfacenumber [ verbose ] | neighbor-id ] command to check the information about the OSPFv3 neighbor. Run the display ospfv3 [ process-id ] routing [ [ ipv6-address prefix-length | ipv6-address/ prefix-length ] | abr-routes | asbr-routes | all | statistics ] command to check the information about the OSPFv3 routing table.

----End

5.4 Establishing or Maintaining OSPFv3 Neighbor Relationship


This section describes how to establish and maintain OSPFv3 neighbor relationship or adjacency relationship to establish an OSPFv3 network. 5.4.1 Establishing the Configuration Task 5.4.2 Configuring the Interval for Sending Hello Packets 5.4.3 Configuring Dead Time of Neighbor Relationship 5.4.4 Configuring the Interval for Retransmitting LSAs to Neighboring S9300s 5.4.5 Configuring the Delay for Transmitting LSAs on the Interface 5.4.6 Checking the Configuration

5.4.1 Establishing the Configuration Task


Applicable Environment
In applications, establishing or maintaining the OSPFv3 neighbor relationship is a premise for the construction of an OSPFv3 network. After the configuration in this section, you can:
l

Adjust the convergence speed of the OSPFv3 network and network load caused by protocol packets by modifying OSPFv3 timers. Enable OSPFv3 to be disconnected from its neighbor when the number of OSPFv3 packet retransmissions exceeds the threshold by configuring Retransmission Limitation for OSPF (RL-OSPF) of OSPFv3. This prevents non-stop packet retransmissions if the neighbor does not receive packets. Speed up the convergence of an OSPFv3 network by adjusting the intervals for updating and receiving LSAs.

Pre-configuration Tasks
Before establishing or maintaining the OSPFv3 neighbor relationship, complete the following tasks:
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-7

5 OSPFv3 Configuration
l l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuring the IP addresses of interfaces to make the network layers accessible Configuring Basic OSPFv3 Functions

Data Preparation
To establish or maintain the OSPFv3 neighbor relationship, you need the following data. No. 1 2 3 4 Data Interval for sending Hello packets Dead time of the neighbor relationship Interval for retransmitting LSAs to adjacent S9300s Delay in sending LSAs

5.4.2 Configuring the Interval for Sending Hello Packets


Context
Hello packets are periodically sent to the neighbor S9300 to detect and maintain the neighbor relationship and to elect the DR and the BDR. RFC 2328 requires that the Hello timer values of neighbors should be consistent. The value of the Hello timer is inversely proportional to the route convergence speed and network load. Do as follows on the S9300 that runs OSPFv3:

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:


ospfv3 timer hello interval [ instance instance-id ]

The interval for sending Hello packets is set on the interface. ----End

5.4.3 Configuring Dead Time of Neighbor Relationship


Context
If a S9300 does not receive any Hello packet from its neighbor during a specified period, the neighbor S9300 is considered invalid. The specified period is called the dead time of the neighbor relationship. The dead time must be at least four times the Hello interval on an interface.
5-8 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

5 OSPFv3 Configuration

Do as follows on the S9300 that runs OSPFv3:

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:


ospfv3 timer dead interval [ instance instance-id ]

The dead time of the neighbor relationship is specified. ----End

5.4.4 Configuring the Interval for Retransmitting LSAs to Neighboring S9300s


Context
After an S9300 sends an LSA to its neighbor, it waits for the acknowledgement packet from its neighbor. If it does not receive any acknowledgements from its neighbor, it retransmits an LSA. Do as follows on the S9300 that runs OSPFv3:

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:


ospfv3 timer retransmit interval [ instance instance-id ]

The interval for retransmitting an LSA to the neighboring S9300 is set. The value of interval must be greater than the time taken to transmit a packet between two S9300s.
NOTE

The interval for retransmitting LSAs should not be too small; otherwise, some of the LSAs are retransmitted unnecessarily.

----End
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-9

5 OSPFv3 Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

5.4.5 Configuring the Delay for Transmitting LSAs on the Interface


Context
The LSA ages out in the LSDB of a local S9300 instead of in the transmission process. You need to set the delay for an LSA before sending it. For a low-speed network, this configuration is necessary. Do as follows on the S9300 that runs OSPFv3:

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:


ospfv3 trans-delay seconds [ instance instance-id ]

The delay in transmitting LSAs on the interface is set. ----End

5.4.6 Checking the Configuration


Prerequisite
The configurations of the Establishing or Maintaining OSPFv3 Neighbor Relationship are complete.

Procedure
l Run the display ospfv3 interface [ interface-type interface-number ] command to check the information about OSPFv3 interfaces.

----End

5.5 Configuring OSPFv3 Areas


This section describes how to configure the OSPFv3 stub areas and virtual links. 5.5.1 Establishing the Configuration Task 5.5.2 Configuring OSPFv3 Stub Areas 5.5.3 Configuring OSPFv3 Virtual Links 5.5.4 Checking the Configuration
5-10 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

5 OSPFv3 Configuration

5.5.1 Establishing the Configuration Task


Applicable Environment
OSPFv3 supports stub areas and virtual links, the principle and applicable environment of which are similar to those of OSPFv2. The current S9300 version does not support OSPFv3 NSSA areas.

Pre-configuration Tasks
Before configuring OSPFv3 area attributes, complete the following tasks:
l l

Enabling IPv6 capability Configuring Basic OSPFv3 Functions

Data Preparation
To configure OSPFv3 area attributes, you need the following data. No. 1 2 Data Areas to be defined as stub areas Metrics of default routes sent to stub areas

5.5.2 Configuring OSPFv3 Stub Areas


Context
Do as follows on each S9300 that runs OSPFv3 in the stub area:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospfv3 [ process-id ]

The OSPFv3 view is displayed. Step 3 Run:


area area-id

The OSPFv3 area view is displayed. Step 4 Run:


stub [ no-summary ]

The area is configured as a stub area.


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-11

5 OSPFv3 Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Step 5 (Optional) Run:


default-cost cost

The cost of the default route sent to the stub area is set. By default, the cost of the default route sent to the stub area is 1. This command is configured on the ABR of the stub area only to set the cost of the default route to be sent to the stub area. This command does not need to be configured on other S9300s in the stub area. In addition, the parameter no-summary takes effect only when the stub command is configured on the ABR. If this parameter is configured, the ABR only sends the summary-LSA of a default route to the stub area without originating other summary-LSAs. ----End

5.5.3 Configuring OSPFv3 Virtual Links


Context
Do as follows on the S9300 that runs OSPFv3:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospfv3 [ process-id ]

The OSPFv3 view is displayed. Step 3 Run:


area area-id

The OSPFv3 area view is displayed. Step 4 Run:


vlink-peer S9300-id [ hello seconds ] [ retransmit seconds ] [ trans-delay seconds ] [ dead seconds ] [ instance instance-id ]

A virtual link is created and configured. The concept of OSPFv3 virtual links is the same as that of OSPFv2. A virtual link must be configured at both ends of the link; otherwise, it does not take effect. ----End

5.5.4 Checking the Configuration


Prerequisite
The configurations of the OSPFv3 Areas are complete.
5-12 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

5 OSPFv3 Configuration

Procedure
l Run the commands as follow to check the information about the OSPFv3 LSDB.

display ospfv3 [ process-id ] lsdb [ external | grace | inter-prefix | inter-S9300 | intraprefix | link | network | S9300 ] [ link-state-id ] [ originate-S9300 advertising-S9300id ] display ospfv3 [ process-id ] lsdb statistics

Run the display ospfv3 [ process-id ] routing [ [ ipv6-address prefix-length | ipv6-address/ prefix-length ] | abr-routes | asbr-routes | all | statistics ] command to check the information about the OSPFv3 routing table. Run the display ospfv3 [ process-id ] vlink command to check the information about OSPFv3 virtual links.

----End

5.6 Configuring OSPFv3 Route Attributes


This section describes how to configure OSPF route attributes to change OSPFv3 routing polices, thus meeting the requirements of complex networking. 5.6.1 Establishing the Configuration Task 5.6.2 Setting the Cost of the OSPFv3 Interface 5.6.3 Setting the Maximum Number of Equal-Cost Routes 5.6.4 Checking the Configuration

5.6.1 Establishing the Configuration Task


Applicable Environment
In actual applications, to meet the requirements of a complicated networking environment, you can change OSPFv3 routing policies by configuring OSPFv3 route attributes. Through the following procedures, you can:
l l

Set the cost on the OSPFv3 interface. Configure load balancing among equal-cost routes.

Pre-configuration Tasks
Before configuring OSPFv3 route attributes, complete the following tasks:
l l

Configuring the IP addresses of interfaces to make network layers accessible Configuring Basic OSPFv3 Functions

Data Preparation
To configure OSPFv3 route attributes, you need the following data.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-13

5 OSPFv3 Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

No. 1 2

Data Link cost Maximum number of equal-cost routes

5.6.2 Setting the Cost of the OSPFv3 Interface


Context
Do as follows on the S9300 that runs OSPFv3:

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:


ospfv3 cost cost [ instance instance-id ]

The cost is set on the OSPFv3 interface. You can control route calculation by setting the link cost of OSPFv3 on different interfaces. By default, the link cost on an OSPFv3 interface is 1. ----End

5.6.3 Setting the Maximum Number of Equal-Cost Routes


Context
Do as follows on the S9300 that runs OSPFv3:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospfv3 [ process-id ]

The OSPFv3 view is displayed. Step 3 Run:


maximum load-balancing number

5-14

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

5 OSPFv3 Configuration

The maximum number of equal-cost routes is set. ----End

5.6.4 Checking the Configuration


Prerequisite
The configurations of the OSPFv3 Route Attributes are complete.

Procedure
l l Run the display ospfv3 interface [ interface-type interface-number ] command to check the information about OSPFv3 interfaces. Run the commands as follow to check the information about the OSPFv3 LSDB.

display ospfv3 [ process-id ] lsdb [ external | grace | inter-prefix | inter-S9300 | intraprefix | link | network | S9300 ] [ link-state-id ] [ originate-S9300 advertising-S9300id ] display ospfv3 [ process-id ] lsdb statistics

Run the display ospfv3 [ process-id ] routing [ [ ipv6-address prefix-length | ipv6-address/ prefix-length ] | abr-routes | asbr-routes | all | statistics ] command to check the information about the OSPFv3 routing table.

----End

5.7 Controlling OSPFv3 Routing Information


This section describes how to advertise and receive OSPFv3 routes and import external routes. 5.7.1 Establishing the Configuration Task 5.7.2 Configuring OSPFv3 Route Aggregation 5.7.3 Configuring OSPFv3 to Filter the Received Routes 5.7.4 Configuring OSPFv3 to Import External Routes 5.7.5 Checking the Configuration

5.7.1 Establishing the Configuration Task


Applicable Environment
Through the configuration in this section, you can control the advertising and receiving of OSPFv3 routing information and configure OSPFv3 to import external routes as follows: Routing information control is classified into the following types:
l

Control of routes in non-areas This function can be configured on any S9300 that runs OSPFv3. For example, you can enable the S9300 to filter the imported routes and set the maximum number of equal-cost routes.

Issue 04 (2010-01-08)

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

5-15

5 OSPFv3 Configuration
l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Control of routes in areas This function can be configured only on ABRs. For example, when an ABR has multiple routes to the destination in the area to which the ABR is connected, you can configure the ABR to aggregate routes by 5.7.2 Configuring OSPFv3 Route Aggregation in the current area. In this manner, only an aggregate LSA is sent to the backbone area.

Pre-configuration Tasks
Before controlling OSPFv3 routing information, complete the following tasks:
l l

Enabling IPv6 capability Configuring Basic OSPFv3 Functions

Data Preparation
To control OSPFv3 routing information, you need the following data. No. 1 2 3 4 5 Data Prefix of IPv6 routes after aggregation Filtering list or name used to filter routing information Link cost on an OSPFv3 interface Maximum number of equal-cost routes Name, process ID, and metric of external routes to be imported

5.7.2 Configuring OSPFv3 Route Aggregation


Context
If multiple continuous network segments exist in this area, you can use the abr-summary command to aggregate them into one network segment. In this way, the ABR only sends an LSA after aggregation. No LSA that belongs to the aggregate network segment is separately transmitted, thus reducing the LSDB size of other areas. Do as follows on the ABR that runs OSPFv3:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospfv3 [ process-id ]

The OSPFv3 view is displayed. Step 3 Run:


5-16 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


area area-id

5 OSPFv3 Configuration

The OSPFv3 area view is displayed. Step 4 Run:


abr-summary ipv6-address prefix-length [ not-advertise ]

OSPFv3 route aggregation is configured. If the keyword not-advertise is used, the routes of the specified network segment are not advertised. ----End

5.7.3 Configuring OSPFv3 to Filter the Received Routes


Context
After receiving LSAs, OSPFv3 determines whether to add the calculated routes to the local routing table according to the filtering policy. Do as follows on the S9300 that runs OSPFv3:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospfv3 [ process-id ]

The OSPFv3 view is displayed. Step 3 Run:


filter-policy { acl6-number | ipv6-prefix ipv6-prefix-name } import

OSPFv3 is configured to filter the imported routes. The filter-policy import command filters only the routes calculated by OSPFv3. The routes that do not pass the filtering are not added to the local routing table, and thus cannot be used for packet forwarding. ----End

5.7.4 Configuring OSPFv3 to Import External Routes


Context
Because OSPFv3 is a link state-based routing protocol and cannot directly filter the advertised LSAs, OSPFv3 must filter the routes when importing them. Then, only the routes that pass the filtering can be advertised. Do as follows on the S9300 that runs OSPFv3:
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-17

5 OSPFv3 Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospfv3 [ process-id ]

The OSPFv3 view is displayed. Step 3 Run:


default cost cost-value

The default cost of the imported route is set. Step 4 Run:


import-route protocol [ process-id ] [ cost cost | type type ]* [ route-policy routepolicy-name ]

External routes are imported. Step 5 (Optional) Run:


filter-policy { acl6-number | ipv6-prefix ipv6-prefix-name } export [ protocol [ process-id ] ]

The imported external routes are filtered. After you run the import-route command on a S9300 to import external routes, the S9300 becomes an ASBR. You can configure OSPFv3 to filter a certain type of routing information by specifying the protocol. If protocol is not specified, OSPFv3 filters all the imported routes.
NOTE

The filter-policy export command takes effect only on the routes imported through the import-route command by the ASBR, that is, filters the imported routes. The routes that are filtered out do not generate LSAs and cannot be advertised by OSPFv3. If the import-route command is not configured to import other external routes (including OSPFv3 routes in different processes), the filter-policy export command does not takes effect.

----End

5.7.5 Checking the Configuration


Prerequisite
The configurations of Controlling OSPFv3 Routing Information are complete.

Procedure
l Run the commands as follow to check the information about the OSPFv3 LSDB.

display ospfv3 [ process-id ] lsdb [ external | grace | inter-prefix | inter-S9300 | intraprefix | link | network | S9300 ] [ link-state-id ] [ originate-S9300 advertising-S9300id ] display ospfv3 [ process-id ] lsdb statistics
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

5-18

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

5 OSPFv3 Configuration

Run the display ospfv3 [ process-id ] [ area area-id ] peer [ interface-type interfacenumber [ verbose ] | neighbor-id ] command to check the information about OSPFv3 neighbors. Run the display ospfv3 [ process-id ] routing [ [ ipv6-address prefix-length | ipv6-address/ prefix-length ] | abr-routes | asbr-routes | all | statistics ] command to check the information about the OSPFv3 routing table.

----End

5.8 Optimizing an OSPF Network


This section describes how to configure special features of OSPFv3 to adjust and optimize an OSPFv3 network. 5.8.1 Establishing the Configuration Task 5.8.2 Configuring the SPF Timer 5.8.3 Suppressing an Interface from Sending and Receiving OSPFv3 Packets 5.8.4 Configuring DR Priority of an Interface 5.8.5 Configuring Stub Routers 5.8.6 Ignoring MTU Check on DD Packets 5.8.7 Checking the Configuration

5.8.1 Establishing the Configuration Task


Applicable Environment
By adjusting the OSPFv3 timer, you can change the convergence speed of an OSPFv3 network and the network overload caused by protocol packets. On low-speed links, you need to consider the delay in transmitting LSAs on the interface. By adjusting the SPF calculation interval, you can mitigate resource consumption due to frequent network changes. You can specify the DR priority of an interface to affect the DR/BDR election in a broadcast network.

Pre-configuration Tasks
Before optimizing an OSPFv3 network, complete the configuration tasks:
l l

Enabling IPv6 capability Configuring Basic OSPFv3 Functions

Data Preparation
To optimize an OSPF network, you need the following data. No. 1
Issue 04 (2010-01-08)

Data Values of OSPFv3 timers


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-19

5 OSPFv3 Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

No. 2 3

Data Values of SPF timers DR priority of the interface

5.8.2 Configuring the SPF Timer


Context
Do as follows on the S9300 that runs OSPFv3:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospfv3 [ process-id ]

The OSPFv3 view is displayed. Step 3 Run:


spf timers delay-interval hold-interval

The SPF timer is configured. Whenever the LSDB of OSPFv3 changes, the shortest path should be recalculated. Calculating the shortest path each time the LSDB changes consumes enormous resources and lowers the efficiency of a S9300. Adjusting the SPF delay and hold interval can suppress frequent network changes to avoid resource consumption. ----End

5.8.3 Suppressing an Interface from Sending and Receiving OSPFv3 Packets


Context
To prevent an S9300 from advertising routes to other S9300s on a certain network and from importing the routes of other S9300s, you can suppress the interface on which OSPFv3 is enabled from receiving and sending OSPFv3 packets. Different processes can suppress the same interface from sending and receiving OSPFv3 packets, but the silent-interface command is valid only for the OSPFv3 interface on which the specified process is enabled, and does not take effect on the interface of other processes. After an OSPFv3 interface is set to be silent, the interface can still advertise its direct routes through the Intra-Area-Prefix-LSA of the same S9300. No OSPFv3 neighbor relationship can be set up on the interface. Therefore, the OSPFv3 adaptability is enhanced.
5-20 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

5 OSPFv3 Configuration

Do as follows on the S9300 that runs OSPFv3:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospfv3 [ process-id ]

The OSPFv3 view is displayed. Step 3 Run:


silent-interface interface-type interface-number

The interface is suppressed from sending and receiving OSPFv3 packets. ----End

5.8.4 Configuring DR Priority of an Interface


Context
Do as follows on the S9300 that runs OSPFv3:

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:


ospfv3 dr-priority priority [ instance instance-id ]

The DR priority of the interface is set. Step 4 After the priority is changed, the DR/BDR re-election is performed in either of the following ways:
l l

Restarting all devices Running the shutdown and undo shutdown commands on the interface on which the OSPFv3 neighbor relationship is set up

----End

Issue 04 (2010-01-08)

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

5-21

5 OSPFv3 Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

5.8.5 Configuring Stub Routers


Context
A stub router is used to control traffic. It notifies OSPFv3 routers not to forward data by the stub router, but they can have a route to the stub router. Do as follows on the S9300 that runs OSPFv3:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


Ospfv3 [ process-id ]

The OSPFv3 process view is displayed. Step 3 Run:


stub-S9300 [ on-startup [ interval ] ]

The stub router is configured.


NOTE

There is no correlation between the stub router configured through this command and the S9300 in the stub area.

----End

5.8.6 Ignoring MTU Check on DD Packets


Context
Do as follows on the S9300 that runs OSPFv3:

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:


ospfv3 mtu-ignore [ instance instance-id ]

The MTU check on DD packets is ignored. After the command is used, the interface does not check the MTU field of a received DD packet. ----End
5-22 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

5 OSPFv3 Configuration

5.8.7 Checking the Configuration


Prerequisite
The configurations of Optimizing an OSPFv3 Network are complete.

Procedure
l l Run the display ospfv3 interface [ interface-type interface-number ] command to check the information about OSPFv3 interfaces. Run the commands as follow to check the information about the OSPFv3 LSDB.

display ospfv3 [ process-id ] lsdb [ external | grace | inter-prefix | inter-S9300 | intraprefix | link | network | S9300 ] [ link-state-id ] [ originate-S9300 advertising-S9300id ] display ospfv3 [ process-id ] lsdb statistics

Run the display ospfv3 [ process-id ] routing [ [ ipv6-address prefix-length | ipv6-address/ prefix-length ] | abr-routes | asbr-routes | all | statistics ] command to check the information about the OSPFv3 routing table.

----End

5.9 Configuring OSPFv3 GR


This section describes how to configure OSPFv3 GR to avoid the inaccurate route calculation and packet loss after an OSPF device restarts. 5.9.1 Establishing the Configuration Task 5.9.2 Enabling OSPFv3 GR 5.9.3 Enabling the Helper of OSPFv3 Helper 5.9.4 Check the Configuration

5.9.1 Establishing the Configuration Task


Applicable Environment
To prevent route flapping and service interruption due to the restart of OSPFv3, you can enable OSPFv3 GR. After OSPFv3 restarts, the GR restarter and the GR helper keep the neighbor relationship, exchange routing information, synchronize the database, and update the routing table and the forwarding table. OSPFv3 fast convergence is thus realized.

Pre-configuration Tasks
Before configuring OSPFv3 GR, complete the following task:
l

Configuring Basic OSPFv3 Functions


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-23

Issue 04 (2010-01-08)

5 OSPFv3 Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Data Preparation
To optimize an OSPF network, you need the following data. No. 1 2 Data OSPFv3 process ID Filtering rule of the helper mode of OSPFv3 peers

5.9.2 Enabling OSPFv3 GR


Context
Do as follows on the S9300 that runs OSPFv3:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospfv3 process-id

The OSPFv3 view is displayed. Step 3 Run:


graceful-restart [ period period ] [ack-time time ] [retransmit-interval interval ] [ lsa-checking-ignore] [ planned-only ]

OSPFv3 GR is enabled. By default, OSPFv3 GR is disabled. ack-time is optional. After ack-time is specified, the restarter can discover more neighbors in the time period. ----End

5.9.3 Enabling the Helper of OSPFv3 Helper


Context
Do as follows on the S9300 that runs OSPFv3:

Procedure
Step 1 Run:
system-view

The system view is displayed.


5-24 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

5 OSPFv3 Configuration

Step 2 Run:
ospfv3 process-id

The OSPFv3 view is displayed. Step 3 Run:


helper-role [ ip-prefix ip-prefix-name | acl-number acl-number ] [ max-graceperiod period ] [ planned-only ] [ lsa-checking-ignore ]

The helper of OSPFv3 GR is enabled. By default, the helper of OSPFv3 GR is disabled. ----End

5.9.4 Check the Configuration


Prerequisite
The configurations of OSPFv3 GR are complete.

Procedure
l Run the display ospfv3 graceful-restart-information command to check the status of OSPFv3 GR.

----End

Example
Run the display ospfv3 graceful-restart-information command, and you can view that the local S9300 is enabled with GR.
<Quidway> display ospfv3 graceful-restart-information OSPFv3 Router with ID (0.0.0.0) (Process 1) Graceful-restart capability : enabled Graceful-restart support : planned and unplanned, strict lsa check Grace-Period Configured : 120 Sec Last Restart-exit Reason : none Helper capability : disabled Last Helper-exit Reason : none

5.10 Maintaining OSPFv3


This section describes how to debug the OSPFv3 functions. 5.10.1 Resetting OSPFv3 5.10.2 Debugging OSPFv3

Issue 04 (2010-01-08)

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

5-25

5 OSPFv3 Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

5.10.1 Resetting OSPFv3


Context

CAUTION
The OSPFv3 adjacency is removed when you reset the OSPFv3 connection by using the reset ospfv3 command. So, confirm the action before you use the command. After modifying the OSPFv3 routing policy or protocol parameters, reset the OSPFv3 connection to validate the modification. To reset OSPFv3 connections, run the following reset command in the user view.

Procedure
l To validate the new configuration, run the reset ospfv3 { process-id | all } [ gracefulrestart [ extend-period value ] ] command in the user view to reset OSPFv3 process.

----End

5.10.2 Debugging OSPFv3


Context

CAUTION
Debugging affects the performance of the system. So, after debugging, run the undo debugging all command to disable it immediately. When an OSPFv3 fault occurs, run the following debugging commands in the user view to debug OSPFv3 and locate the fault. For the procedure of displaying the debugging information, refer to the chapter "Information Center Configuration" in the Quidway S9300 Terabit Routing SwitchConfiguration Guide Device Management. For the related debugging command, refer to the Quidway S9300 Terabit Routing SwitchDebugging Reference.

Procedure
l l l Run the debugging ospfv3 [ process-id ] event { abr | asbr | vlink | all } command in the user view to debug OSPFv3 events. Run the debugging ospfv3 [ process-id ] ifsm [ status | event | timer ] command in the user view to debug the OSPFv3 interface status. Run the debugging ospfv3 [ process-id ] lsa { all | flooding | generate | install | maxage | refresh | verbose } command in the user view to debug OSPFv3 LSAs.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

5-26

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

5 OSPFv3 Configuration

l l

Run the debugging ospfv3 [ process-id ] nfsm [ status | event | timer ] command in the user view to debug the OSPFv3 neighbor status. Run the any command in the user view to debug OSPFv3 packets.

debugging ospfv3 [ process-id ] packet all [ verbose ] debugging ospfv3 [ process-id ] { hello | dd | request | update | ack }* [ verbose ]

Run the debugging ospfv3 [ process-id ] route [ ase | install | spf | ia ] command in the user view to debug the OSPFv3 route calculation.

----End

5.11 Configuration Examples


This section provides several configuration examples of OSPFv3. 5.11.1 Example for Configuring OSPFv3 Areas 5.11.2 Example for Configuring DR Election Through OSPFv3 5.11.3 Example for Configuring the OSPFv3 Virtual Link 5.11.4 Example for Configuring OSPFv3 GR

5.11.1 Example for Configuring OSPFv3 Areas


Networking Requirements
As shown in Figure 5-1, OSPFv3 is enabled on all S9300s and the AS is divided into three areas. S9300-B and S9300-C serve as ABRs to forward the inter-area routes. You need to configure Area 2 as a stub area. The LSAs advertised to this area can thus be reduced, without affecting the reachability of routes.

Issue 04 (2010-01-08)

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

5-27

5 OSPFv3 Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Figure 5-1 Networking diagram for configuring an OSPFv3 area


S9300-B Area 0
VLANIF30 1000::1/64 GE1/0/0 VLANIF20 1001::1/64 GE1/0/0 VLANIF20 1001::2/64 GE2/0/0 VLANIF30 1000::2/64 GE2/0/0

S9300-C

GE1/0/0 VLANIF40 1002::1/64 GE2/0/0 VLANIF40 1002::2/64

S9300-A

S9300-D Area 2 Stub

Area 1

Device name S9300-A S9300-B S9300-B S9300-C S9300-C S9300-D

Interface GE1/0/0 GE1/0/0 GE2/0/0 GE2/0/0 GE1/0/0 GE2/0/0

VLANIF interface VLANIF 20 VLANIF 20 VLANIF 30 VLANIF 30 VLANIF 40 VLANIF 40

IP address 1001::2/64 1001::1/64 1000::1/64 1000::2/64 1002::1/64 1002::2/64

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. Configure IPv6 addresses for interfaces. Enable the basic OSPFv3 functions on each S9300. Configure Area 2 as a stub area by running the stub command on all the S9300s in Area 2 and check the OSPFv3 routing table of S9300-D. Configure the Area 2 as a totally stub area and check the OSPFv3 routing table of S9300D.

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

IDs of the VLANs that the interfaces belong to, as shown in Figure 5-1 Router ID (1.1.1.1) of S9300-A and area (Area 1) where S9300-A is located Router ID (2.2.2.2) of S9300-B and areas (Area 0 and Area 1) where S9300-B is located Router ID (3.3.3.3) of S9300-C and areas (Area 0 and Area 2) where S9300-C is located
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

5-28

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


l

5 OSPFv3 Configuration

Router ID (4.4.4.4) of S9300-D and area (Area 2) where S9300-D is located

Procedure
Step 1 Add interfaces to VLANs.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] vlan 20 [S9300-A-vlan20] quit [S9300-A] interface GigabitEthernet 1/0/0 [S9300-A-GigabitEthernet1/0/0] port hybrid pvid vlan 20 [S9300-A-GigabitEthernet1/0/0] port hybrid untagged vlan 20 [S9300-A-GigabitEthernet1/0/0] quit

The configurations of S9300-B, S9300-C, S9300-D are similar to the configuration of S9300A and are not mentioned here. Step 2 Assign IPv6 addresses to the VLANIF interfaces.
[S9300-A] ipv6 [S9300-A] interface vlanif 20 [S9300-A-Vlanif20] ipv6 enable [S9300-A-Vlanif20] ipv6 address 1001::2/64 [S9300-A-Vlanif20] quit

The configurations of S9300-B, S9300-C, S9300-D are similar to the configuration of S9300A and are not mentioned here. Step 3 Configure the basic OSPFv3 functions. # Configure S9300-A.
[S9300-A] ospfv3 [S9300-A-ospfv3-1] router-id 1.1.1.1 [S9300-A-ospfv3-1] quit [S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ospfv3 1 area 1 [S9300-A-Vlanif10] quit [S9300-A] interface vlanif 20 [S9300-A-Vlanif20] ospfv3 1 area 1 [S9300-A-Vlanif20] quit

# Configure S9300-B.
[S9300-B] ospfv3 [S9300-B-ospfv3-1] router-id 2.2.2.2 [S9300-B-ospfv3-1] quit [S9300-B] interface vlanif 20 [S9300-B-Vlanif20] ospfv3 1 area 0 [S9300-B-Vlanif20] quit [S9300-B] interface vlanif 30 [S9300-B-Vlanif30] ospfv3 1 area 1 [S9300-B-Vlanif30] quit

# Configure S9300-C.
[S9300-C] ospfv3 [S9300-C-ospfv3-1] router-id 3.3.3.3 [S9300-C-ospfv3-1] quit [S9300-C] interface vlanif 30 [S9300-C-Vlanif30] ospfv3 1 area 0 [S9300-C-Vlanif30] quit [S9300-C] interface vlanif 40 [S9300-C-Vlanif40] ospfv3 1 area 2 [S9300-C-Vlanif40] quit

# Configure S9300-D.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-29

5 OSPFv3 Configuration
[S9300-D] ospfv3 [S9300-D-ospfv3-1] router-id 4.4.4.4 [S9300-D-ospfv3-1] quit [S9300-D] interface vlanif 40 [S9300-D-Vlanif40] ospfv3 1 area 2 [S9300-D-Vlanif40] quit

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

# View the status of the OSPFv3 neighbors of S9300-B.


[S9300-B] display ospfv3 peer OSPFv3 Process (1) OSPFv3 Area (0.0.0.1) Neighbor ID Pri 1.1.1.1 1 OSPFv3 Area (0.0.0.0) Neighbor ID Pri 3.3.3.3 1

State Full/ State Full/ -

Dead Time 00:00:34 Dead Time 00:00:32

Interface Vlanif20 Interface Vlanif30

Instance ID 0 Instance ID 0

# View the status of the OSPFv3 neighbors of S9300-C.


[S9300-C] display ospfv3 peer OSPFv3 Process (1) OSPFv3 Area (0.0.0.0) Neighbor ID Pri 2.2.2.2 1 OSPFv3 Area (0.0.0.2) Neighbor ID Pri 4.4.4.4 1

State Full/ State Full/ -

Dead Time 00:00:37 Dead Time 00:00:33

Interface Vlanif30 Interface Vlanif40

Instance ID 0 Instance ID 0

# View the OSPFv3 routing table of S9300-D.


[S9300-D] display ospfv3 routing OSPFv3 Process (1) Destination Next-hop IA 1000::/64 via FE80::1572:0:5EF4:1, Vlanif40 IA 1001::/64 via FE80::1572:0:5EF4:1, Vlanif40 1002::/64 directly-connected, Vlanif40 IA 2000::/64 via FE80::1572:0:5EF4:1, Vlanif40 Metric 2 3 1 4

Step 4 Configure the stub areas. # Configure the stub area of S9300-D.
[S9300-D] ospfv3 [S9300-D-ospfv3-1] area 2 [S9300-D-ospfv3-1-area-0.0.0.2] stub [S9300-D-ospfv3-1-area-0.0.0.2] quit

# Configure the stub area of S9300-C, and set the cost of the default route advertised to the stub area to 10.
[S9300-C] ospfv3 [S9300-C-ospfv3-1] area 2 [S9300-C-ospfv3-1-area-0.0.0.2] stub [S9300-C-ospfv3-1-area-0.0.0.2] default-cost 10 [S9300-C-ospfv3-1-area-0.0.0.2] quit

# View the OSPFv3 routing table of S9300-D, and you can see a new default route in the routing table. The cost of the default route is the sum of the cost of the directly connected routes and the configured cost.
5-30 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


[S9300-D] display ospfv3 routing OSPFv3 Process (1) Destination Next-hop IA ::/0 via FE80::1572:0:5EF4:1, vlanif40 IA 1000::/64 via FE80::1572:0:5EF4:1, vlanif40 IA 1001::/64 via FE80::1572:0:5EF4:1, vlanif40 1002::/64 directly-connected, vlanif40 IA 2000::/64 via FE80::1572:0:5EF4:1, vlanif40 Metric 11 2 3 1 4

5 OSPFv3 Configuration

Step 5 Configure the totally sub area. # On S9300-C, configure Area 2 as the totally stub area.
[S9300-C] ospfv3 [S9300-C-ospfv3-1] area 2 [S9300-C-ospfv3-1-area-0.0.0.2] stub no-summary [S9300-C-ospfv3-1-area-0.0.0.2] quit

Step 6 Verify the configuration. # View the OSPFv3 routing table of S9300-D, and you can see that the entries in the routing table are reduced; other non-directly connected routes are suppressed; only the default route is reserved.
[S9300-D] display ospfv3 routing OSPFv3 Process (1) Destination Next-hop IA ::/0 via FE80::1572:0:5EF4:1, vlanif40 1002::/64 directly-connected, vlanif40 Metric 11 1

----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # ipv6 # vlan batch 20 # interface Vlanif20 ipv6 enable ipv6 address 1001::2/64 ospfv3 1 area 0.0.0.1 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # ospfv3 1 router-id 1.1.1.1 area 0.0.0.1 # return

Issue 04 (2010-01-08)

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

5-31

5 OSPFv3 Configuration
l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of S9300-B


# sysname S9300-B # ipv6 # vlan batch 20 30 # interface Vlanif20 ipv6 enable ipv6 address 1001::1/64 ospfv3 1 area 0.0.0.1 # interface Vlanif30 ipv6 enable ipv6 address 1000::1/64 ospfv3 1 area 0.0.0.0 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # ospfv3 1 router-id 2.2.2.2 area 0.0.0.0 area 0.0.0.1 # return

Configuration file of S9300-C


# sysname S9300-C # ipv6 # vlan batch 30 40 # interface Vlanif30 ipv6 enable ipv6 address 1000::2/64 ospfv3 1 area 0.0.0.0 # interface Vlanif40 ipv6 enable ipv6 address 1002::1/64 ospfv3 1 area 0.0.0.2 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # ospfv3 1 router-id 3.3.3.3 area 0.0.0.0 area 0.0.0.2 stub no-summary default-cost 10 # return

Configuration file of S9300-D


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

5-32

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


# sysname S9300-D # ipv6 # vlan batch 40 # interface Vlanif40 ipv6 enable ipv6 address 1002::2/64 ospfv3 1 area 0.0.0.2 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # ospfv3 1 router-id 4.4.4.4 area 0.0.0.2 stub # return

5 OSPFv3 Configuration

5.11.2 Example for Configuring DR Election Through OSPFv3


Networking Requirements
As shown in Figure 5-2, the priority of S9300-A is 100, which is the highest priority on the network; therefore, S9300-A is elected as the DR. S9300-C, which has the second highest priority, is elected as the BDR. The priority of S9300-B is 0, which means that it cannot become the DR. S9300-D is not configured with a priority, that is, S9300-D uses the default priority, namely, 1. Figure 5-2 Networking diagram for configuring DR election through OSPFv3
S9300-A S9300-B

VLANIF10 VLANIF10 GE1/0/0 1001::2/64 1001::1/64 GE1/0/0 VLANIF10 GE1/0/0 GE1/0/0 VLANIF10 1001::4/64 1001::3/64

S9300-C
Device name S9300-A S9300-B S9300-C S9300-D Interface GE1/0/0 GE1/0/0 GE1/0/0 GE1/0/0

S9300-D
VLANIF interface VLANIF 10 VLANIF 10 VLANIF 10 VLANIF 10 IP address 1001::1/64 1001::2/64 1001::3/64 1001::4/64

Issue 04 (2010-01-08)

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

5-33

5 OSPFv3 Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. Configure IPv6 addresses for interfaces. Configure the router ID of each S9300, enable OSPFv3, and specify the network segments. Check the DR/BDR status of each S9300 when the default priority is used. Set the DR priority of the interface on each S9300 and check whether the S9300 becomes the DR or BDR.

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

Router ID (1.1.1.1) and DR priority (100) of S9300-A Router ID (2.2.2.2) and DR priority (0) of S9300-B Router ID (3.3.3.3) and DR priority (2) of S9300-C Router ID (4.4.4.4) and DR priority (1) of S9300-D

Procedure
Step 1 Add interfaces to VLANs.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] vlan 10 [S9300-A-vlan10] quit [S9300-A] interface GigabitEthernet 1/0/0 [S9300-A-GigabitEthernet1/0/0] port hybrid pvid vlan 10 [S9300-A-GigabitEthernet1/0/0] port hybrid untagged vlan 10 [S9300-A-GigabitEthernet1/0/0] quit

The configurations of S9300-B, S9300-C, S9300-D are similar to the configuration of S9300A and are not mentioned here. Step 2 Assign IPv6 addresses to the VLANIF interfaces.
[S9300-A] ipv6 [[S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ipv6 enable [S9300-A-Vlanif10] ipv6 address 1001::1/64 [S9300-A-Vlanif10] quit

The configurations of S9300-B, S9300-C, S9300-D are similar to the configuration of S9300A and are not mentioned here. Step 3 Configure the basic OSPFv3 functions. # On S9300-A, enable OSPFv3 and set the router ID to 1.1.1.1.
[S9300-A] ospfv3 [S9300-A-ospfv3-1] router-id 1.1.1.1 [S9300-A-ospfv3-1] quit [S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ospfv3 1 area 0 [S9300-A-Vlanif10] quit

# On S9300-B, enable OSPFv3 and set the router ID to 2.2.2.2.


[S9300-B] ospfv3 [S9300-B-ospfv3-1] router-id 2.2.2.2

5-34

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


[S9300-B-ospfv3-1] quit [S9300-B] interface vlanif 10 [S9300-B-Vlanif10] ospfv3 1 area 0 [S9300-B-Vlanif10] quit

5 OSPFv3 Configuration

# On S9300-C, enable OSPFv3 and set the router ID to 3.3.3.3.


[S9300-C] ospfv3 [S9300-C-ospfv3-1] router-id 3.3.3.3 [S9300-C-ospfv3-1] quit [S9300-C] interface vlanif 10 [S9300-C-Vlanif10] ospfv3 1 area 0 [S9300-C-Vlanif10] quit

# On S9300-D, enable OSPFv3 and set the router ID to 4.4.4.4.


[S9300-D] ospfv3 [S9300-D-ospfv3-1] router-id 4.4.4.4 [S9300-D-ospfv3-1] quit [S9300-D] interface vlanif 10 [S9300-D-Vlanif10] ospfv3 1 area 0 [S9300-D-Vlanif10] quit

Check the neighbors of S9300-A. You can view the DR priority and the neighbor status. By default, the DR priority is 1. Now S9300-D functions as the DR and S9300-C functions as the BDR.
NOTE

When the priorities of two S9300s are the same, the S9300 that has a greater router ID is elected as the DR. If the VLANIF interface of an S9300 becomes the DR, the other broadcast interfaces of this S9300 have a high priority in the future DR election. That is, the S9300 still functions as the DR. The DR cannot be preempted.
[S9300-A] display ospfv3 peer OSPFv3 Process (1) OSPFv3 Area (0.0.0.0) Neighbor ID Pri 2.2.2.2 1 3.3.3.3 1 4.4.4.4 1

State 2-Way/DROther Full/Backup Full/DR

Dead Time 00:00:32 00:00:36 00:00:38

Interface Vlanif10 Vlanif10 Vlanif10

Instance ID 0 0 0

# View the neighbors of S9300-D, and you can see that the status of the neighbor relation between S9300-D and other devices is Full.
[S9300-D] display ospfv3 peer OSPFv3 Process (1) OSPFv3 Area (0.0.0.0) Neighbor ID Pri 1.1.1.1 1 2.2.2.2 1 3.3.3.3 1

State Full/DROther Full/DROther Full/Backup

Dead Time 00:00:32 00:00:35 00:00:30

Interface Vlanif10 Vlanif10 Vlanif10

Instance ID 0 0 0

Step 4 Configure the DR priorities of interfaces. # Configure the DR priority of S9300-A to 100.
[S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ospfv3 dr-priority 100 [S9300-A-Vlanif10] quit

# Configure the DR priority of S9300-B to 0.


[S9300-B] interface vlanif 10 [S9300-B-Vlanif10] ospfv3 dr-priority 0 [S9300-B-Vlanif10] quit

# Configure the DR priority of S9300-C to 2.


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 5-35

5 OSPFv3 Configuration
[S9300-C] interface vlanif 10 [S9300-C-Vlanif10] ospfv3 dr-priority 2 [S9300-C-Vlanif10] quit

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

# View the neighbors of S9300-A, and you can see that the DR priority is updated but the DR and BDR are unchanged.
[S9300-A] display ospfv3 peer OSPFv3 Process (1) OSPFv3 Area (0.0.0.0) Neighbor ID Pri 2.2.2.2 0 3.3.3.3 2 4.4.4.4 1

State 2-Way/DROther Full/Backup Full/DR

Dead Time 00:00:34 00:00:38 00:00:31

Interface Vlanif10 Vlanif10 Vlanif10

Instance ID 0 0 0

# View the neighbors of S9300-D, and you can see that S9300-D is still the DR.
[S9300-D] display ospfv3 peer OSPFv3 Process (1) OSPFv3 Area (0.0.0.0) Neighbor ID Pri 1.1.1.1 100 2.2.2.2 0 3.3.3.3 2

State Full/DROther Full/DROther Full/Backup

Dead Time 00:00:36 00:00:30 00:00:36

Interface Vlanif10 Vlanif10 Vlanif10

Instance ID 0 0 0

Step 5 Perform DR/BDR election again. # Restart all S9300s (or run the shutdown and undo shutdown commands on the VLANIF interface that establishes the OSPFv3 neighbor relationship) to re-elect the DR and BDR. Step 6 Verify the configuration. # View the neighbors of S9300-A, and you can see that S9300-C is the BDR.
[S9300-A] display ospfv3 peer OSPFv3 Process (1) OSPFv3 Area (0.0.0.0) Neighbor ID Pri 2.2.2.2 0 3.3.3.3 2 4.4.4.4 1

State Full/DROther Full/Backup Full/DROther

Dead Time 00:00:31 00:00:36 00:00:39

Interface Vlanif10 Vlanif10 Vlanif10

Instance ID 0 0 0

# View the neighbors of S9300-D, and you can see that S9300-A is the DR.
[S9300-D] display ospfv3 peer OSPFv3 Process (1) OSPFv3 Area (0.0.0.0) Neighbor ID Pri 1.1.1.1 100 2.2.2.2 0 3.3.3.3 2

State Full/DR 2-Way/DROther Full/Backup

Dead Time 00:00:39 00:00:35 00:00:39

Interface Vlanif10 Vlanif10 Vlanif10

Instance ID 0 0 0

----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # ipv6 # vlan batch 10

5-36

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


# interface Vlanif10 ipv6 enable ipv6 address 1001::1/64 ospfv3 1 area 0.0.0.0 ospfv3 dr-priority 100 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # ospfv3 1 router-id 1.1.1.1 area 0.0.0.0 # return l

5 OSPFv3 Configuration

Configuration file of S9300-B


# sysname S9300-B # ipv6 # vlan batch 10 # interface Vlanif10 ipv6 enable ipv6 address 1001::2/64 ospfv3 1 area 0.0.0.0 ospfv3 dr-priority 0 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # ospfv3 1 router-id 2.2.2.2 area 0.0.0.0 # return

Configuration file of S9300-C


# sysname S9300-C # ipv6 # vlan batch 10 # interface Vlanif10 ipv6 enable ipv6 address 1001::3/64 ospfv3 1 area 0.0.0.0 ospfv3 dr-priority 2 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # ospfv3 1 router-id 3.3.3.3 area 0.0.0.0 # return

Configuration file of S9300-D


# sysname S9300-D # ipv6

Issue 04 (2010-01-08)

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

5-37

5 OSPFv3 Configuration
# vlan batch 10 # interface Vlanif10 ipv6 enable ipv6 address 1001::4/64 ospfv3 1 area 0.0.0.0 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # ospfv3 1 router-id 4.4.4.4 area 0.0.0.0 # return

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

5.11.3 Example for Configuring the OSPFv3 Virtual Link


Networking Requirements
As shown in Figure 5-3, OSPFv3 is enabled on all S9300s and the AS is divided into three areas. S9300-B and S9300-C serve as ABRs to forward the inter-area routes. Area 2 is not directly connected to the backbone area, Area 0. Area 1 is the area between Area 0 and Area 2. You need to configure a virtual link in Area 1 where S9300-B and S9300-C are located so that S9300-A and S9300-D can communicate with each other. Figure 5-3 Networking diagram for configuring OSPFv3 virtual links
Area 2
VLANIF10 1001::2/64 GE1/0/0 GE1/0/0 VLANIF10 1001::1/64

Area 1
VLANIF20 1000::2/64 GE2/0/0 GE2/0/0 VLANIF20 1000::1/64

Area 0
VLANIF30 1002::2/64 GE2/0/0 GE1/0/0 VLANIF30 1002::1/64

S9300-A
Device name S9300-A S9300-B S9300-B S9300-C S9300-C S9300-D

S9300-B
Interface GE1/0/0 GE1/0/0 GE2/0/0 GE2/0/0 GE1/0/0 GE2/0/0

S9300-C
VLANIF interface VLANIF 10 VLANIF 10 VLANIF 20 VLANIF 20 VLANIF 30 VLANIF 30

S9300-D
IP address 1001::2/64 1001::1/64 1000::1/64 1000::2/64 1002::1/64 1002::2/64

5-38

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

5 OSPFv3 Configuration

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Configure IPv6 addresses for interfaces. Enable the basic OSPFv3 functions on each S9300. Configure a virtual link between S9300-B and S9300-C to connect the non-backbone areas to the backbone area.

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

Router ID (1.1.1.1) of S9300-A and area (Area 2) where S9300-A is located Router ID (2.2.2.2) of S9300-B and areas (Area 1 and Area 2) where S9300-B is located Router ID (3.3.3.3) of S9300-C and areas (Area 1 and Area 0) where S9300-C is located Router ID (4.4.4.4) of S9300-D and area (Area 0) where S9300-D is located

Procedure
Step 1 Add interfaces to VLANs.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] vlan 10 [S9300-A-vlan10] quit [S9300-A] interface GigabitEthernet 1/0/0 [S9300-A-GigabitEthernet1/0/0] port hybrid pvid vlan 10 [S9300-A-GigabitEthernet1/0/0] port hybrid untagged vlan 10 [S9300-A-GigabitEthernet1/0/0] quit

The configurations of S9300-B, S9300-C, S9300-D are similar to the configuration of S9300A and are not mentioned here. Step 2 Assign IPv6 addresses to the VLANIF interfaces.
[S9300-A] ipv6 [S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ipv6 enable [S9300-A-Vlanif10] ipv6 address 1001::2/64 [S9300-A-Vlanif10] quit

The configurations of S9300-B, S9300-C, S9300-D are similar to the configuration of S9300A and are not mentioned here. Step 3 Configure the basic OSPFv3 functions. # On S9300-A, enable OSPFv3 and set the router ID to 1.1.1.1.
[S9300-A] ospfv3 [S9300-A-ospfv3-1] router-id 1.1.1.1 [S9300-A-ospfv3-1] quit [S9300-A] interface Vlanif 10 [S9300-A-Vlanif10] ospfv3 1 area 2 [S9300-A-Vlanif10] quit

# On S9300-B, enable OSPFv3 and set the router ID to 2.2.2.2.


[S9300-B] ospfv3 [S9300-B-ospfv3-1] router-id 2.2.2.2 [S9300-B-ospfv3-1] quit [S9300-B] interface vlanif 10

Issue 04 (2010-01-08)

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

5-39

5 OSPFv3 Configuration
[S9300-B-Vlanif10] ospfv3 1 area 2 [S9300-B-Vlanif10] quit [S9300-B] interface vlanif 20 [S9300-B-Vlanif20] ospfv3 1 area 1 [S9300-B-Vlanif20] quit

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

# On S9300-C, enable OSPFv3 and set the router ID to 3.3.3.3.


[S9300-C] ospfv3 [S9300-C-ospfv3-1] router-id 3.3.3.3 [S9300-C-ospfv3-1] quit [S9300-C] interface vlanif 20 [S9300-C-Vlanif20] ospfv3 1 area 1 [S9300-C-Vlanif20] quit [S9300-C] interface vlanif 30 [S9300-C-Vlanif30] ospfv3 1 area 0 [S9300-C-Vlanif30] quit

# On S9300-D, enable OSPFv3 and set the router ID to 4.4.4.4.


[S9300-D] ospfv3 [S9300-D-ospfv3-1] router-id 4.4.4.4 [S9300-D-ospfv3-1] quit [S9300-D] interface vlanif 30 [S9300-D-Vlanif30] ospfv3 1 area 0 [S9300-D-Vlanif30] quit

# View the OSPFv3 routing table of S9300-C, and you can see that the routing table of S9300C does not contain the routes of Area 2 because Area 2 is not directly connected to Area 0.
[S9300-C] display ospfv3 routing OSPFv3 Process (1) Destination Next-hop 1000::/64 directly-connected, Vlanif20 1002::/64 directly-connected, Vlanif30 Metric 1 1

Step 4 Configure a vritual link in Area 1 where S9300-B and S9300-C are located. # Configure S9300-B.
[S9300-B] ospfv3 [S9300-B-ospfv3-1] area 1 [S9300-B-ospfv3-1-area-0.0.0.1] vlink-peer 3.3.3.3 [S9300-B-ospfv3-1-area-0.0.0.1] quit

# Configure S9300-C.
[S9300-C] ospfv3 [S9300-C-ospfv3-1] area 1 [S9300-C-ospfv3-1-area-0.0.0.1] vlink-peer 2.2.2.2 [S9300-C-ospfv3-1-area-0.0.0.1] quit

Step 5 Verify the configuration. # Check the OSPFv3 routing table of S9300-C.
[S9300-C] display ospfv3 routing OSPFv3 Process (1) Destination Next-hop 1000::/64 directly-connected, Vlanif20 1000::1/128 via FE80::4D67:0:EB7D:2, Vlanif20 1000::2/128 Metric 1 1 1

5-40

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


directly-connected, Vlanif20 IA 1001::/64 via FE80::4D67:0:EB7D:2, Vlanif20 1002::/64 directly-connected, Vlanif30

5 OSPFv3 Configuration

2 1

----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # ipv6 # vlan batch 10 # interface Vlanif10 ipv6 enable ipv6 address 1001::2/64 ospfv3 1 area 0.0.0.2 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # ospfv3 1 router-id 1.1.1.1 area 0.0.0.2 # return

Configuration file of S9300-B


# sysname S9300-B # ipv6 # vlan batch 10 20 # interface Vlanif10 ipv6 enable ipv6 address 1001::1/64 ospfv3 1 area 0.0.0.2 # interface Vlanif20 ipv6 enable ipv6 address 1000::1/64 ospfv3 1 area 0.0.0.1 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # ospfv3 1 router-id 2.2.2.2 area 0.0.0.0 area 0.0.0.1 vlink-peer 3.3.3.3 area 0.0.0.2 # return

Issue 04 (2010-01-08)

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

5-41

5 OSPFv3 Configuration
l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of S9300-C


# sysname S9300-C # ipv6 # vlan batch 20 30 # interface Vlanif20 ipv6 enable ipv6 address 1000::2/64 ospfv3 1 area 0.0.0.1 # interface Vlanif30 ipv6 enable ipv6 address 1002::1/64 ospfv3 1 area 0.0.0.0 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # ospfv3 1 router-id 3.3.3.3 area 0.0.0.0 area 0.0.0.1 vlink-peer 2.2.2.2 # return

Configuration file of S9300-D


# sysname S9300-D # ipv6 # vlan batch 30 # interface Vlanif30 ipv6 enable ipv6 address 1002::2/64 ospfv3 1 area 0.0.0.0 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # ospfv3 1 router-id 4.4.4.4 area 0.0.0.0 # return

5.11.4 Example for Configuring OSPFv3 GR


Networking Requirements
As shown in Figure 5-4, S9300-A, S9300-B, and S9300-C belong to the same OSPFv3 area. They communicate with each other through the OSPFv3 protocol and are enabled with GR.

5-42

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

5 OSPFv3 Configuration

When OSPFv3 adjacencies are established between S9300-A, S9300-C, and S9300-B, the three S9300s can exchange routing information. If the OSPFv3 protocol restarts on S9300-A, S9300-A synchronizes data with the neighboring S9300s through GR. Figure 5-4 Networking diagram for configuring OSPFv3 GR
VLANIF10 1000::1/64 GE1/0/0 VLANIF10 1000::2/64 GE1/0/0 VLANIF20 VLANIF20 2000::1/64 2000::2/64 GE2/0/0 GE1/0/0

S9300-A 1.1.1.1
Device name S9300-A S9300-B S9300-B S9300-C Interface GE1/0/0 GE1/0/0 GE2/0/0 GE1/0/0

S9300-B 2.2.2.2
VLANIF interface VLANIF 10 VLANIF 10 VLANIF 20 VLANIF 20

S9300-C 3.3.3.3
IP address 1000::1/64 1000::2/64 2000::1/64 2000::2/64

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. Configure IPv6 addresses for interfaces. Enable the basic OSPFv3 functions on each S9300. Enable the OSPFv3 helper in the OSPFv3 view of S9300-B. Enable the OSPFv3 GR in the OSPFv3 view of S9300-A.

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

IPv6 addresses of the interfaces Process ID of the OSPFv3 protocol Router ID (1.1.1.1) of S9300-A and area (Area 0) where S9300-A is located Router ID (2.2.2.2) of S9300-B and area (Area 0) where S9300-B is located Router ID (3.3.3.3) of S9300-C and area (Area 0) where S9300-C is located

Procedure
Step 1 Add interfaces to VLANs.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] vlan 10 [S9300-A-vlan10] quit [S9300-A] interface GigabitEthernet 1/0/0 [S9300-A-GigabitEthernet1/0/0] port hybrid pvid vlan 10 [S9300-A-GigabitEthernet1/0/0] port hybrid untagged vlan 10 [S9300-A-GigabitEthernet1/0/0] quit

Issue 04 (2010-01-08)

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

5-43

5 OSPFv3 Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A and are not mentioned here. Step 2 Assign IPv6 addresses to the VLANIF interfaces.
[S9300-A] ipv6 [S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ipv6 enable [S9300-A-Vlanif10] ipv6 address 1000::1/64 [S9300-A-Vlanif10] quit

The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A and are not mentioned here. Step 3 Configure the basic OSPFv3 functions. # On S9300-A, enable OSPFv3 and set the router ID to 1.1.1.1.
[S9300-A] ospfv3 100 [S9300-A-ospfv3-100] router-id 1.1.1.1 [S9300-A-ospfv3-100] quit [S9300-A] interface Vlanif 10 [S9300-A-Vlanif10] ospfv3 100 area 0 [S9300-A-Vlanif10] quit

# On S9300-B, enable OSPFv3 and set the router ID to 2.2.2.2.


[S9300-B] ospfv3 100 [S9300-B-ospfv3-100] router-id 2.2.2.2 [S9300-B-ospfv3-100] quit [S9300-B] interface vlanif 10 [S9300-B-Vlanif10] ospfv3 100 area 0 [S9300-B-Vlanif10] quit [S9300-B] interface vlanif 20 [S9300-B-Vlanif20] ospfv3 100 area 0 [S9300-B-Vlanif20] quit

# On S9300-C, enable OSPFv3 and set the router ID to 3.3.3.3.


[S9300-C] ospfv3 100 [S9300-C-ospfv3-100] router-id 3.3.3.3 [S9300-C-ospfv3-100] quit [S9300-C] interface vlanif 20 [S9300-C-Vlanif20] ospfv3 100 area 0 [S9300-C-Vlanif20] quit

Step 4 Enable OSPFv3 GR for S9300-A.


[S9300-A] ospfv3 100 [S9300-A-ospfv3-100] graceful-restart [S9300-A-ospfv3-100] quit

Step 5 Enable OSPFv3 helper for S9300-B.


[S9300-B] ospfv3 100 [S9300-B-ospfv3-100] helper-role [S9300-B-ospfv3-100] quit

Step 6 Verify the configuration. # Run the display ipv6 fib 1 command on S9300-A to view the FIB information.
<S9300-A> display ipv6 fib 1 FIB Table: Total number of Routes : 2 Destination: NextHop : Label : TimeStamp : 1000:: 1000::1 NULL Date- 25:6:2007, Time- 17:31:46 PrefixLength: 64 Flag : U Tunnel ID : 0 reference : 1

5-44

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


Interface : Vlanif10 2000:: FE80::200:1FF:FE00:200 NULL Date- 26:6:2007, Time- 14:6:3 Vlanif10

5 OSPFv3 Configuration

Destination: NextHop : Label : TimeStamp : Interface :

PrefixLength Flag Tunnel ID reference

: 64 : DGU : 0 : 1

# Restart OSPFv3 process 100 on S9300-A without using the GR mechanism.


<S9300-A> reset ospfv3 100

# Run the display ipv6 fib 1 command on S9300-A immediately to view the FIB information.
<S9300-A> display ipv6 fib 1 FIB Table: Total number of Routes : 1 Destination: NextHop : Label : TimeStamp : Interface : 1000:: 1000::1 NULL Date- 25:6:2007, Time- 17:31:46 Vlanif10 PrefixLength Flag Tunnel ID reference :64 : U : 0 : 1

The preceding information shows that the FIB information on S9300-A is modified and the forwarding service is affected. # Restart OSPFv3 process 100 on S9300-A by using the GR mechanism.
<S9300-A> reset ospfv3 100 graceful-restart

# Run the display ipv6 fib 1 command on S9300-A immediately to view the FIB information. Check whether GR functions normally. If GR functions normally, the FIB information is not modified and the forwarding is not affected when you restart the OSPFv3 process through GR on S9300-A.
<S9300-A> display ipv6 fib 1 FIB Table: Total number of Routes : 2 Destination: NextHop : Label : TimeStamp : Interface : Destination: NextHop : Label : TimeStamp : Interface : 1000:: 1000::1 NULL Date- 25:6:2007, Time- 17:31:46 Vlanif10 2000:: FE80::200:1FF:FE00:200 NULL Date- 26:6:2007, Time- 14:6:3 Vlanif10 PrefixLength Flag Tunnel ID reference PrefixLength Flag Tunnel ID reference : 64 : U : 0 : 1 : 64 : DGU : 0 : 1

The preceding information shows that the FIB information on S9300-A is not modified and the forwarding is not affected. ----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # ipv6 # vlan batch 10 #

Issue 04 (2010-01-08)

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

5-45

5 OSPFv3 Configuration
interface Vlanif10 ipv6 enable ipv6 address 1000::1/64 ospfv3 100 area 0.0.0.0 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # ospfv3 100 router-id 1.1.1.1 graceful-restart area 0.0.0.0 # return l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of S9300-B


# sysname S9300-B # ipv6 # vlan batch 10 20 # interface Vlanif10 ipv6 enable ipv6 address 1000::2/64 ospfv3 100 area 0.0.0.0 # interface Vlanif20 ipv6 enable ipv6 address 2000::1/64 ospfv3 100 area 0.0.0.0 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # ospfv3 100 router-id 2.2.2.2 helper-role area 0.0.0.0 # return

Configuration file of S9300-C


# sysname S9300-C # ipv6 # vlan batch 20 # interface Vlanif20 ipv6 enable ipv6 address 2000::2/64 ospfv3 100 area 0.0.0.0 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # ospfv3 100 router-id 3.3.3.3

5-46

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


area 0.0.0.0 # return

5 OSPFv3 Configuration

Issue 04 (2010-01-08)

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

5-47

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

6
About This Chapter

IS-IS Configuration

This chapter describes the concepts of IS-IS and the procedure for configuring IS-IS, and provides configuration examples of IS-IS. 6.1 Concepts of IS-IS This section describes the principle and concepts of IS-IS. 6.2 IS-IS Features Supported by the S9300 This section describes the IS-IS features supported by the S9300. 6.3 Configuring Basic IS-IS Functions This section describes how to enable IS-IS to ensure that the S9300 can select routes through IS-IS. 6.4 Establishing and Maintaining IS-IS Adjacencies This section describes how to set the timers for IS-IS packets and parameters of LSPs to maintain IS-IS adjacencies. 6.5 Configuring IS-IS Attributes on Networks of Different Types This section describes how to change the network type of an IS-IS interface and configure ISIS attributes on networks of in different types. 6.6 Setting the Attributes of IS-IS Routes This section describes how to set the parameters of IS-IS routes, and set the cost and priority of IS-IS links. 6.7 Controlling the Advertisement of IS-IS Routing Information This section describes how to configure IS-IS to generate routes according to the specified rules and configure the route filtering rules. 6.8 Controlling the Received IS-IS Routing Information This section describes how to distinguish routing information inside and outside an IS-IS domain. 6.9 Adjusting and Optimizing the IS-IS Network This section describes how to configure the status of an IS-IS interface and set the LSP parameters.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-1

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6.10 Configuring IS-IS GR This section describes how to enable IS-IS GR and set parameters of the GR session. 6.11 Configuring BFD for IS-IS This section describes how to implement fast convergence of the IS-IS network by using BFD. 6.12 Configuring IS-IS IPv6 This section describes how to interconnect the IPv6 networks through IS-IS. 6.13 Configuring IS-IS Authentication This section describes how to configure the authentication mode and authentication password for an IS-IS network. 6.14 Maintaining IS-IS This section describes how to clear data of an IS-IS process and debugging the IS-IS process. 6.15 Configuration Examples This section provides examples of IS-IS configuration.

6-2

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

6.1 Concepts of IS-IS


This section describes the principle and concepts of IS-IS. The Intermediate System-to-Intermediate System (IS-IS) protocol is initially issued by the International Organization for Standardization (ISO) for its Connectionless Network Protocol (CLNP). To support IP routing, the International Engineering Task Force (IETF) extends and modifies IS-IS in RFC 1195. Thus, IS-IS can be applied to both the TCP/IP and OSI environments. This type of IS-IS is called the Integrated IS-IS or Dual IS-IS. IS-IS is an Interior Gateway Protocol (IGP) and is used within an AS. IS-IS is a link state protocol. It uses the Shortest Path First (SPF) algorithm to calculate routes. IS-IS resembles the OSPF protocol.

IS-IS Areas
To support large-scale routing networks, IS-IS adopts a two-level structure in a routing domain. A large routing domain is divided into one or more areas. The intra-area routes are managed by Level-1 devices, whereas the inter-area routes are managed by Level-2 devices. Figure 6-1 shows a network that runs IS-IS. The network is similar to an OSPF typology with multiple areas. Area 1 is the backbone area. All nodes in the area are Level-2 devices. The other four areas are non-backbone areas. They are connected to Area 1 through Level-1-2 devices. Figure 6-1 IS-IS topology I
Area 2 Area 3 L1 L1/2 L2 Area 1 L2 L1/2

L2

L2 L1

L1 L1

L1/2 Area 4

L1/2

Area 5

L1

L1

Figure 6-2 shows another type of IS-IS topology. The Level-1-2 devices are used to connect the Level-1 devices to the Level-2 devices. In addition, the Level-1-2 devices constitute the backbone network with the Level-2 devices. In this topology, no area is specified as the backbone area. All the Level-2 devices constitute the IS-IS backbone network. The Level-2 devices may belong to different areas, but they must be on contiguous network segments.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-3

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Figure 6-2 IS-IS typology II


Area 1

L1

L1/2

L2

L1/2

L1

L1

Area 2

Area 3

Area 4

L2

L2

NOTE

An IS-IS backbone network does not refer to a specific area.

This networking scheme shows the difference between IS-IS and OSPF. For OSPF, the interarea routes are forwarded through the backbone area, and the SPF algorithm is used only in the same area. For IS-IS, both Level-1 and Level-2 devices use the SPF algorithm to generate the shortest path tree (SPT).

Network Type
IS-IS supports only two types of networks based on physical links:
l l

Broadcast links such as Ethernet links Point-to-point (P2P) links

6.2 IS-IS Features Supported by the S9300


This section describes the IS-IS features supported by the S9300.

IS-IS Interfaces
The creation of IS-IS routing tables and configurations of IS-IS features must be done on Layer 3 interfaces. Physical interfaces on the S9300 except the management network interface, however, are Layer 2 interfaces. In this case, you can configure Layer 2 interfaces on the S9300 as follows:
l

Configure the VLAN that the Layer 2 interfaces belong to, assign an IP address to the corresponding VLANIF interface, and enable IS-IS functions on the VLANIF interface. Assign an IP address to the loopback interface and enable IS-IS functions on the loopback interface.
NOTE

In the following configuration tasks, the configurations in the interface view must be completed on the VLANIF interface and loopback interface unless otherwise specified. For details about the Layer 2 interface configuration, see the Quidway S9300 Terabit Routing Switch Configuration Guide - Ethernet.

6-4

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

The S9300 adds a 3-bit Logical-Link Control (LLC) field to the beginning of an IS-IS PDU before encapsulating the PDU into an Ethernet frame. Then the S9300 transmits the Ethernet frame. The LLC field does not belong to the header of the Ethernet frame but functions as a data field in the Ethernet frame. Therefore, the maximum length of an IS-IS PDU that can be transmitted by the S9300 equals the MTU size of a VLANIF interface minus 3. That is, the MTU value of an IS-IS interface equals the MTU value of a physical interface minus 3. The MTU value of a VLANIF interface on the S9300 is 1500. Therefore, the MTU value of an IS-IS interface on the S9300 is 1497.

Multi-Process
For easy management and effective control, IS-IS provides the multi-process feature. The multiprocess feature allows a group of interfaces to be associated with a specified IS-IS process. This ensures that the specific IS-IS process performs all the protocol operations only on the group of interfaces. Thus, multiple IS-IS processes can work on a single S9300 and each process is responsible for a unique group of interfaces.

IS-IS Hot Standby


The S9300 supports the IS-IS hot standby feature. IS-IS backs up important data of the master main control board to the slave main control board. Whenever the master main control board fails, the slave main control board becomes active. In this manner, IS-IS is not affected and functions normally. The S9300 backs up only the IS-IS configuration during the switchover between the master and slave main control boards. IS-IS performs graceful restart (GR), sends requests to neighbors to establish adjacencies with the neighbors, and synchronizes the LSDB.
NOTE

For details about hot standby, see the Quidway S9300 Terabit Routing Switch Configuration Guide Reliability.

IS-IS GR
GR ensures continuous forwarding of traffic. Restarting a device within a short period of time does not cause route flapping on the network. If IS-IS is not restarted in GR mode, IS-IS sessions are reset and Link State PDUs (LSPs) are regenerated and flooded. This triggers the SPF calculation in the entire area, which causes route flapping and forwarding interruption in the area. In this case, IETF works out an IS-IS GR standard (RFC 3847). The standard deals with restart of protocols with or without FIB tables.
NOTE

The S9300 supports IS-IS GR. For details about IS-IS GR, see the chapter "IS-IS" in the Quidway S9300 Terabit Routing Switch Feature Description - IP Routing.

IS-IS TE
The IS-IS Traffic Engineering (TE) applies when MPLS establishes and maintains label switched paths (LSPs). When constructing the constraint-based routed LSP (CR-LSP), MPLS needs to learn the traffic attributes of all the links in an area. MPLS can acquire the TE information about the links through IS-IS.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-5

6 IS-IS Configuration
NOTE

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

For details about the IS-IS TE, see the Quidway S9300 Terabit Routing Switch Configuration Guide MPLS.

Administrative Tag
The use of administrative tags simplifies management. Administrative tags can be controlled through the advertisement of IP prefixes in the IS-IS domain. The administrative tag carries the administrative information about an IP address prefix. The administrative tag is used to control the routes of different levels and routes imported from different areas, different routing protocols, and multiple IS-IS instances running on a device. In addition, the administrative tag carries the BGP standard community attributes or the extended community attributes. The value of an administrative tag is associated with certain attributes. When IS-IS advertises an IP address prefix with the attributes, it adds the administrative tag to the type-length-value (TLV) in the prefix. In this manner, the tag is advertised with the prefix throughout the routing domain.

LSP Fragments Extension


When an LSP to be advertised by IS-IS contains a lot of information, the LSP is fragmented. Each LSP fragment is identified by the LSP identifier field of an LSP. The length of the LSP identifier field is one byte. Therefore, the maximum number of fragments that can be generated by an IS-IS process is 256. The IS-IS fragments extension feature allows an IS-IS router to generate more LSP fragments. To implement this feature, you can enable the network manager to configure the S9300 with additional system IDs. Each system ID represents a virtual system that can generate 256 LSP fragments. With more additional system IDs (up to 50 virtual systems), the IS-IS router can generate a maximum of 13056 LSP fragments.
l

Related terms

Originating system The originating system is the device that actually runs the IS-IS protocol. With the LSP fragments extension function, an LSP of an IS-IS node can be sliced into multiple LSPs of pseudonodes before being advertised. The originating system refers to the real IS-IS process.

Normal system ID It is the system ID of the originating system. Virtual system The virtual system is used to generate extended LSP fragments. When an LSP is sliced into more than 256 fragments, the extra LSP fragments are advertised to the network by virtual systems. These fragments carry additional system IDs in their LSP ID fields.

Additional system ID It is the system ID of a virtual system. The network manager assigns additional system IDs. Each additional system ID can generate up to 256 additional or extended LSP fragments. Like a normal system ID, an additional system ID must be unique in a routing domain.

Operation modes The S9300 can implement the LSP fragments extension feature in the following modes:

6-6

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

Mode-1: The mode is used when certain nodes in the network do not support this feature. In this mode, the originating system advertises a link to each virtual system of which the additional system ID is in the LSPs. Similarly, each virtual system advertises a link to the originating system. The virtual systems are equivalent to the nodes that are connected to the originating system on the network. One restriction in this mode is that only the leaf information can be advertised in the LSPs of the virtual systems. Mode-2: The mode is used when all the nodes in the network support this feature. In this mode, all the routers on the network know that the LSPs generated by the virtual systems belong to the originating system. There is no restriction to the link state information carried in the LSPs that are advertised by the virtual systems.

Dynamic Host Name Exchange Mechanism


The dynamic host name exchange mechanism is introduced to conveniently manage and maintain IS-IS networks. The mechanism provides the service of mapping host names to system IDs for the IS-IS nodes. This dynamic name information is advertised in a dynamic host name TLV. The dynamic host name exchange mechanism can also associate a host name with the designated IS (DIS) on the broadcast network. Then, this association is advertised in the dynamic host name TLV of a pseudonode LSP. The host name is easier to maintain and memorize than the system ID. After this function is configured, the output of the display commands related to IS-IS running on the S9300 displays the host name rather than the system ID of the S9300.

Fast Convergence of IS-IS Network


l

I-SPF Incremental SPF (I-SPF) calculates only the changed routes rather than all the routes at a time. In ISO-10589, the Dijkstra algorithm is adopted to calculate routes. If the Dijkstra algorithm is adopted, all routes need to be recalculated when a node changes on the network. The calculation takes a long time and consumes too many CPU resources, which affects the convergence speed. I-SPF improves this algorithm. Except for the first time, only changed nodes instead of all nodes are involved in calculation. The SPT generated at last is the same as the SPT generated by the previous algorithm. This lowers the CPU usage and speeds up the network convergence.

PRC Similar to I-SPF, partial route calculation (PRC) involves only changed nodes. PRC, however, does not calculate the shortest path. Instead, it updates leaf routes based on the SPT calculated by I-SPF. In route calculation, a leaf represents a route, and a node represents a device. If the SPT changes after I-SPF calculation, PRC processes all the leaves only on that changed node. If the SPT remains unchanged, PRC processes only the changed leaves. For example, if IS-IS is enabled on an interface of a node, the SPT calculated by I-SPF remains unchanged. In this case, PRC updates only the routes of this node, thus consuming less CPU resources. PRC working with I-SPF further improves the convergence performance of the network. As an improvement to the original SPF algorithm, PRC and I-SPF replace the original algorithm.

Issue 04 (2010-01-08)

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

6-7

6 IS-IS Configuration
NOTE

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

In S9300 implementation, only I-SPF and PRC are used to calculate IS-IS routes.
l

LSP fast flooding As specified by RFC, when the S9300 receives new LSPs from other nodes, it floods the LSPs in its own LSDB periodically according to a timer. This can speed up the network convergence, but the LSDB is synchronized slowly. LSP fast flooding solves the problem. When the S9300 configured with this feature receives one or more LSPs, it floods the LSPs fewer than the specified number before route calculation. Thus, LSDB can be synchronized quickly. This improves the network convergence speed significantly.

Intelligent timer Although the route calculation algorithm is improved, the long interval for triggering the route calculation affects the convergence speed. You can shorten the interval by using a millisecond-level timer. Frequent network changes, however, also consume too many CPU resources. An SPF intelligent timer responds to network changes quickly but consumes fewer CPU resources. An IS-IS network running normally is stable and frequent changes on a network rarely occur. In such a network, the S9300 does not calculate routes very often. Therefore, you can set a short period (in milliseconds) for triggering the route calculation for the first time. If the topology of the network changes frequently, the value of the intelligent timer increases with the number of calculation events to avoid high CPU usage. The LSP generation intelligent timer is similar to the SPF intelligent timer. When the LSP generation intelligent timer expires, the system generates a new LSP based on the current topology. The original mechanism adopts a timer with a constant interval, and fast convergence and low CPU usage cannot be achieved at the same time. To solve this problem, the LSP generation timer is designed as an intelligent timer to respond to the burst events (for example, the interface becomes Up or Down) quickly and speed up the network convergence. In addition, when the network changes frequently, the value of the intelligent timer increases with the calculation count to avoid high CPU usage.
NOTE

Set the intelligent timer with caution according to the network environment.

BFD for IS-IS


The S9300 supports Bidirectional Forwarding Detection (BFD), which is used to detect IS-IS neighbor relationship. BFD can rapidly detect the faults of a link between IS-IS neighbors and report the faults to the IS-IS protocol. The fast convergence of IS-IS is thus implemented. To configure BFD, run certain commands to manually set the parameters of BFD sessions, including the local discriminator and remote discriminator, and then send requests to set up BFD sessions.
NOTE

BFD detects only the one-hop link between IS-IS neighbors because IS-IS establishes only one-hop adjacencies. For details about BFD for IS-IS, see the chapter "IS-IS" in the Quidway S9300 Terabit Routing Switch Feature Description - IP Routing.

Three-Way Handshake
A reliable link layer protocol is required if IS-IS runs on P2P links. According to ISO 10589, the two-way handshake mechanism of IS-IS uses Hello packets to set up P2P adjacencies
6-8 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

between neighbors. Once the S9300 receives a Hello packet from its peer, it regards the status of the peer as Up and sets an adjacency with the peer. This mechanism has distinct disadvantages. For example, unstable link status causes the loss of complete sequence number packets (CSNPs) after an adjacency is set up. As a result, the LSDB fails to be synchronized during the update period of an LSP. If two or more links exist between two neighbors, an adjacency can still be set up when one link is Down and the other is Up in the same direction. The parameters of the fault link, however, are also used in SPF calculation. The device that does not detect any faults still tries to forward packets through the link that is in Down state. The three-way handshake mechanism solves this problem on P2P links. In the three-way handshake mode, the S9300 regards the neighbor as Up and then sets up an adjacency with the neighbor only after confirming that the neighbor receives the packet that S9300 sends . In addition, the three-way handshake mechanism adopts the 32-bit extended circuit ID. This extends the original 8-bit Circuit ID field and thus more than 255 P2P links can be set up.

6.3 Configuring Basic IS-IS Functions


This section describes how to enable IS-IS to ensure that the S9300 can select routes through IS-IS. 6.3.1 Establishing the Configuration Task 6.3.2 Starting an IS-IS Process 6.3.3 Configuring a NET 6.3.4 (Optional) Setting the Level of the S9300 6.3.5 Enabling an IS-IS Process on an Interface 6.3.6 Checking the Configuration

6.3.1 Establishing the Configuration Task


Applicable Environment
Configure the basic IS-IS functions on each S9300 on a network if IS-IS is required so that the S9300s can select routes normally.

Pre-configuration Tasks
Before configuring basic functions of IS-IS, complete the following tasks:
l l l

Configuring a link layer protocol Configuring the VLAN that each physical interface belongs to Assigning an IP address to each VLANIF interface to ensure network reachability between neighboring nodes

Issue 04 (2010-01-08)

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

6-9

6 IS-IS Configuration
NOTE

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

To create the VLAN for each interface, you can add interfaces to the VLAN in default mode or by using the port trunk allow-pass vlan command. Use the same method to add interfaces to a VLAN on both ends of a link. If you run the port trunk allow-pass vlan command to add interfaces to a VLAN, the directly connected physical interfaces in the same network segment should be added to the same VLAN. In this manner, the corresponding VLANIF interfaces can be directly connected at the network layer. For details, see the Quidway S9300 Terabit Routing Switch Configuration Guide - Ethernet.

Data Preparation
To configure basic functions of IS-IS , you need the following data. No. 1 2 3 Data IS-IS process ID. Network entity title (NET) (Optional) Level of the S9300

6.3.2 Starting an IS-IS Process


Context
To enable IS-IS, you must create an IS-IS process and run the isis enable command to activate the IS-IS process on the interface that may be connected to other IS-IS nodes. Do as follows on the S9300s that need to run IS-IS.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


isis [ process-id ]

An IS-IS process is started and the IS-IS view is displayed. Theprocess-id parameter specifies an IS-IS process. If no process ID is specified, IS-IS process 1 is started by default. ----End

6.3.3 Configuring a NET


Context
A NET specifies the current IS-IS area address and the system ID of the S9300.
6-10 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

You can configure up to three NETs for an IS-IS process on an S9300. The system IDs of the three NETs must be the same. Do as follows on the S9300s that need to run IS-IS.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


isis [ process-id ]

The IS-IS view is displayed. Step 3 Run:


network-entity net

A NET is configured. ----End

6.3.4 (Optional) Setting the Level of the S9300


Context
An S9300 that runs IS-IS generates an LSDB for each level. If the level of the S9300 is Level-1-2, the S9300 generates a Level-1 LSDB and a Level-2 LSDB. If the level of the S9300 is Level-1 or Level-2, the S9300 generates an LSDB for the corresponding level. Creating and maintaining two LSDBs simultaneously consumes many system resources. Therefore, after the network structure is layered, set a proper level for the S9300 according to its position in the network. Do as follows on each S9300 of which the level needs to be specified.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


isis [ process-id ]

The IS-IS view is displayed. Step 3 Run:


is-level { level-1 | level-1-2 | level-2 }

The level of the S9300 is set. By default, the level of the S9300 is Level-1-2. ----End
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-11

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6.3.5 Enabling an IS-IS Process on an Interface


Context
Only one IS-IS process can be enabled on an interface. Do as follows on each S9300 that needs to run IS-IS.

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:


isis enable [ process-id ]

An IS-IS process is started on the interface.


NOTE

You can configure an IP address for a VLANIF interface or a loopback interface on the S9300 and enable IS-IS on this interface. All the configurations performed in the interface view are performed on this two types of interfaces.

----End

6.3.6 Checking the Configuration


Prerequisite
All the basic IS-IS functions are configured.

Procedure
l l l l Run the display isis interface [ verbose | process-id ] * command to check information about the interface on which IS-IS is enabled. Run the display isis lsdb [ { level-1 | level-2 } | { local | lsp-id | is-name symbolicname } | process-id | verbose ] * command to check the IS-IS LSDB. Run the display isis peer [ verbose ] [ process-id ] command to check information about the IS-IS neighbors. Run the display isis route [ process-id ] [ ipv4 ] [ {ipv4-address [ mask | mask-length ] } | { level-1 | level-2 } | verbose ] *display isis process-id route [ ipv4 ] [ {ipv4-address [ mask | mask-length ] } | { level-1 | level-2 } | verbose ] * command to check the IS-IS routing table. Run the display isis statistics [ level-1 | level-2 | level-1-2 ] [ process-id ] command to view the statistics of an IS-IS process.

----End
6-12 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

Example
Run the display isis interface command, and you can find that the IPv4 neighbors of the local S9300 are in the Up state.
<Quidway> display isis interface Interface information for ISIS(1) --------------------------------IPV4.State IPV6.State Up Down

Interface Vlanif10

Id 001

MTU 1497

Type L1/L2

DIS No/No

6.4 Establishing and Maintaining IS-IS Adjacencies


This section describes how to set the timers for IS-IS packets and parameters of LSPs to maintain IS-IS adjacencies. 6.4.1 Establishing the Configuration Task 6.4.2 (Optional) Setting Timers of IS-IS Packets 6.4.3 Setting LSP Parameters 6.4.4 (Optional) Disabling the Padding of Hello Packets on an Interface 6.4.5 Checking the Configuration

6.4.1 Establishing the Configuration Task


Applicable Environment
After an IS-IS process is started, the S9300 sends IS-IS packets to neighbors through IS-IS interfaces. This section describes how to set the parameters of IS-IS packets. You can modify the parameters according to the actual situation of the network. You can:
l l l

Adjust timers for various IS-IS packets such as Hello packets, CSNP packets, and LSPs. Adjust LSP parameters. Disable the padding of Hello packets on the specified interface.

When setting the timers of IS-IS packets, note that smaller values of the timers mean faster convergence of the network after a topology change, and therefore higher costs of network links. Set the timers properly to balance the network convergence speed and bandwidth consumption.

Pre-configuration Tasks
Before establishing or maintaining an IS-IS neighbor or adjacency relationship, perform the following task:
l

6.3 Configuring Basic IS-IS Functions

Data Preparation
To establish or maintain an IS-IS neighbor or adjacency relationship, you need the following data.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-13

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

No. 1 2

Data (Optional) Values of packet timers Values of LSP parameters

6.4.2 (Optional) Setting Timers of IS-IS Packets


Context
Do as follows on the S9300.

Procedure
l Setting the interval for sending Hello packets Level-1 and Level-2 hello packets are sent on broadcast links. You can set different intervals for the two levels. If no level is specified, the interval that you set applies to both the Level-1 and Level-2 Hello packets. On point-to-point links, Hello packets are not differentiated on the basis of levels. Therefore, you do not need to specify the level. 1. Run:
system-view

The system view is displayed. 2. Run:


interface interface-type interface-number

The interface view is displayed. 3. Run:


isis timer hello hello-interval [ level-1 | level-2 ]

The interval for sending Hello packets is set. By default, Hello packets are sent every 10 seconds. l Setting the Hello multiplier The IS-IS protocol maintains the neighbor relationship between the neighbors through Hello packets. If the local device does not receive any Hello packet from its peer within a certain period, that is, within the specified number of Hello intervals, it considers the neighbor invalid. The specified number of Hello intervals is called the Hello multiplier. In IS-IS, you can set the Hello interval and the Hello multiplier to control the holding time of the neighbor relationship between two neighbors. 1. Run:
system-view

The system view is displayed. 2. Run:


interface interface-type interface-number

The interface view is displayed.


6-14 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

3.

Run:
isis timer holding-multiplier number [ level-1 | level-2 ]

The Hello multiplier is set. By default, the Hello multiplier is 3. If level of packets is not specified, the set Hello multiplier applies to both Level-1 and Level-2 Hello packets. l Setting the interval for sending CSNPs CSNPs are transmitted by the DIS over the broadcast network to synchronize the LSDBs. If level of packets is not specified, the interval that you set applies to both Level-1 and Level-2 Hello packets. 1. Run:
system-view

The system view is displayed. 2. Run:


interface interface-type interface-number

The interface view is displayed. 3. Run:


isis timer csnp csnp-interval [ level-1 | level-2 ]

The interval for sending CSNPs is set. By default, CSNPs are sent every 10 seconds. l Setting the interval for retransmitting LSPs On a P2P link, if the S9300 does not receive any response to an LSP within a certain period, it considers that this LSP is lost or discarded. To ensure reliable transmission, the local S9300 retransmits the LSP. The LSPs sent over broadcast links do not need response. Therefore, do not perform this configuration on broadcast links. If the type of an interface is changed to non-P2P, this configuration is deleted at the same time. 1. Run:
system-view

The system view is displayed. 2. Run:


interface interface-type interface-number

The interface view is displayed. 3. Run:


isis circuit-type p2p

The network type of the interface is set to P2P. 4. Run:


isis timer lsp-retransmit retransmit-interval

The interval for retransmitting LSPs on P2P links is set. By default, the interval for retransmitting LSPs on a P2P link is 5 seconds.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-15

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Setting the minimum interval for sending LSPs 1. Run:


system-view

The system view is displayed. 2. Run:


interface interface-type interface-number

The interface view is displayed. 3. Run:


isis timer lsp-throttle throttle-interval [ count count ]

The minimum interval for sending LSPs is set. If LSPs are too large, LSP fragments increase accordingly. In this case, you can configure the S9300 to send LSP fragments in batches. The throttle-interval parameter specifies the minimum interval between two batches. The optional parameter count specifies the number of LSP fragments that can be sent in each batch. ----End

6.4.3 Setting LSP Parameters


Context
Do as follows on the S9300.

Procedure
l (Optional) Configuring the LSP refresh interval To synchronize all LSPs in the entire area, an IS-IS system periodically sends all LSPs to its neighbors. When setting the LSP refresh interval, ensure that this interval is shorter than the lifetime of LSPs. 1. Run:
system-view

The system view is displayed. 2. Run:


isis [ process-id ]

The IS-IS view is displayed. 3. Run:


timer lsp-refresh refresh-interval

The LSP refresh interval is set. By default, the LSP refresh interval is 900 seconds. l (Optional) Setting the lifetime of LSPs When the S9300 generates an LSP, it fills in the lifetime field in the LSP. When this LSP is received by other intermediate systems, its lifetime decreases as time elapses. If an intermediate system does not receive any updated LSP before the lifetime of this LSP decreases to 0, the LSP is deleted from the LSDB of the intermediate system.

6-16

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

1.

Run:
system-view

The system view is displayed. 2. Run:


isis [ process-id ]

The IS-IS view is displayed. 3. Run:


timer lsp-max-age age-time

The LSP lifetime is set. By default, the maximum lifetime of an LSP is 1200 seconds. l (Optional) Setting the intelligent timer for generating LSPs In IS-IS, when the local routing information changes, an intermediate system needs to generate new LSPs to advertise the change. When the local routing information changes frequently, the new LSP should be sent after a delay. This prevents degradation of system performance due to high consumption of system resources. If the delay is too long, changes of the local routing information cannot be advertised to the neighbors in time, and thus the network converges slowly. The intelligent timer mitigates this problem by adjusting the delay according to the frequency of changes on the network. The initial interval for generating the first LSP is initial-interval. Then, the interval increases by incremental-interval every time the network changes until the interval reaches the value of max-interval. When the interval reaches the value of max-interval three times, it drops to initial-interval. 1. Run:
system-view

The system view is displayed. 2. Run:


isis [ process-id ]

The IS-IS view is displayed. 3. Run:


timer lsp-generation max-interval [ init-interval [ incr-interval ] ] [ level-1 | level-2 ]

The intelligent timer used for generating LSPs is set. l (Optional) Setting the maximum size of LSPs sent and received The value of max-size specified in the lsp-length originate command must be smaller than or equal to the value of max-size specified in the lsp-length receive command. When enabling IS-IS on an interface, ensure that the value of max-size specified in the lsplength originate command is smaller than or equal to the MTU value of the IS-IS interface. Otherwise, the interface is considered in the MTU down state and the neighbor relationship cannot be set up. The default MTU of an IS-IS interface on the S9300 is 1497 bytes. If the S9300 and other products are used on the same IS-IS network, ensure that LSPs generated by other intermediate systems contain no more than 1497 bytes. Otherwise, the network cannot operate normally.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-17

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

1.

Run:
system-view

The system view is displayed. 2. Run:


isis [ process-id ]

The IS-IS view is displayed. 3. Run:


lsp-length originate max-size

The maximum size of the generated LSPs is set. 4. (Optional) Run:


lsp-length receive max-size

The maximum size of the received LSPs is set. By default, the maximum size of an LSP that can be received or sent is 1497 bytes. l Configuring the mesh group of an interface On a network with a higher connectivity, an interface on the S9300 floods a received LSP to other interfaces on the S9300. This flooding method causes repeated LSP flooding and wastes bandwidth. To avoid such a problem, you can add certain interfaces to a mesh group. These interfaces do not flood the LSPs received from this group to other interfaces of the same group, but floods them out of the group. When the mesh-blocked keyword is configured on an interface, the interface is blocked and cannot flood LSPs. All the interfaces that join a mesh group synchronize the LSDBs in the entire network segment by using the CSNP and Partial Sequence Number Packet (PSNP) mechanisms. 1. Run:
system-view

The system view is displayed. 2. Run:


interface interface-type interface-number

The interface view is displayed. 3. Run:


isis mesh-group { mesh-group-number | mesh-blocked }

The interface is added to a mesh group. l Configuring LSP fragments extension 1. Run:
system-view

The system view is displayed. 2. Run:


isis [ process-id ]

The IS-IS view is displayed. 3. Run:


lsp-fragments-extend [ [ level-1 | level-2 | level-1-2 ] | [ mode-1 | mode-2 ] ] *

6-18

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

LSP fragments extension is enabled. 4. Run:


virtual-system virtual-system-id

A virtual system is configured. At least one virtual system ID must be configured so that the S9300 can generate extended LSP fragments. The virtual system IDs must be unique in the entire area and routing domain. An IS-IS process can be configured with up to 50 virtual system IDs.
NOTE

If all the intermediate systems on a network support the LSP fragments extension, specify mode-2 in the lsp-fragments-extend command. If certain intermediate systems do not support the LSP fragments extension, specify mode-1 in the lsp-fragments-extend command. The LSP fragments extension takes effect only after you run the reset isis process-id all command. After the IS-IS data is cleared, all the previous topology information and the adjacencies are reestablished.

----End

6.4.4 (Optional) Disabling the Padding of Hello Packets on an Interface


Context
The intermediate systems that run IS-IS set up and maintain the neighbor relationship through Hello packets. By default, an interface on the S9300 adds a type-8 TLV to a Hello packet before sending the packet to the peer. In this manner, the length of the Hello packet becomes the same as the depth of the buffer on the local S9300. By sending Hello packets, the S9300 can check whether the MTU of the peer interface is the same as the depth of the local buffer. If the MTU of the peer interface is smaller than the depth of the local buffer, the neighbor relationship cannot be set up. The IS-IS small-hello command reduces the size of Hello packets considerably, thus saving network bandwidth. If the MTU of the peer interface is greater than the MTU of the local interface, disable the padding of Hello packets on the local S9300. Otherwise, IS-IS the neighbor relationship cannot be set up. Do as follows on each S9300 that runs IS-IS.

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:


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-19

6 IS-IS Configuration
isis small-hello

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The Hello packet padding function is disabled. ----End

6.4.5 Checking the Configuration


Prerequisite
All the configurations for establishing and maintaining IS-IS adjacencies are complete.

Procedure
l l l Run the display isis interface [ verbose | process-id ] * command to check information about the interfaces on which IS-IS is enabled. Run the display isis mesh-group [ process-id ] command to check information about the mesh group for IS-IS interfaces. Run the display isis statistics [ level-1 | level-2 | level-1-2 ] [ process-id ] command to view the statistics of an IS-IS process.

----End

Example
Set the Hello interval to 15 seconds, the Hello multiplier to 10, the CSNP interval to 123 seconds, and the minimum interval for sending LSPs to 159 seconds. Then run the display isis interface verbose command. The following information is displayed:
<Quidway> display isis interface verbose Interface information for ISIS(1) --------------------------------Interface Id IPV4.State IPV6.State MTU Type DIS Vlanif10 001 Up Down 1497 L1/L2 No/No Circuit Parameters : small-hello Description : HUAWEI, Quidway Series, Vlanif10 Interface SNPA Address : 00e0-095b-4201 IP Address : 123.1.1.1 IPV6 Link Local Address : IPV6 Global Address(es) : Csnp Timer Value : L1 123 L2 10 Hello Timer Value : L1 15 L2 15 DIS Hello Timer Value : L1 5 L2 5 Hello Multiplier Value : L1 10 L2 10 Retransmit-Throttle Timer : L12 159 Cost : L1 10 L2 10 Ipv6 Cost : L1 10 L2 10 Priority : L1 64 L2 64 Retransmit Timer Value : L12 5 Bandwidth-Value : Low 100000000 High 0 Static Bfd : NO Dynamic Bfd : NO Fast-Sense Rpr : NO

6-20

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

6.5 Configuring IS-IS Attributes on Networks of Different Types


This section describes how to change the network type of an IS-IS interface and configure ISIS attributes on networks of in different types. 6.5.1 Establishing the Configuration Task 6.5.2 Setting the Network Type of an IS-IS Interface 6.5.3 (Optional) Setting the DIS Priority of an Interface 6.5.4 Setting the Neighbor Relationship Negotiation Mode on P2P Links 6.5.5 Configuring an IS-IS Interface Not to Check IP Addresses of the Received Hello Packets 6.5.6 Checking the Configuration

6.5.1 Establishing the Configuration Task


Applicable Environment
IS-IS attributes vary according to network types. This section describes how to configure IS-IS attributes on networks of different types. You can perform the following configurations to control and optimize various networks:
l l l

Change the link type of an Ethernet interface to P2P to simulate a P2P interface. Control the DIS election. Set the negotiation mode in which the neighbor relationship can be set up between neighbors on P2P links. Configuring two P2P interfaces in the different network segments to ignore IP address check so that they can establish a neighbor relationship.

Pre-configuration Tasks
Before configuring OSPF attributes on a network, complete the following task:
l

6.3 Configuring Basic IS-IS Functions

Data Preparation
To configure IS-IS attributes on a network, you need the following data. No. 1 2 Data Network type of an interface (Optional) DIS priority of an interface

Issue 04 (2010-01-08)

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

6-21

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6.5.2 Setting the Network Type of an IS-IS Interface


Context
If the network types of two neighboring IS-IS interfaces are different, the local S9300 may not learn correct routes. In this case, perform this configuration. By default, the network type of an interface is determined by the type of the physical interface. Do as follows on the S9300 as required.

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:


isis circuit-type p2p

The network type of the interface is set to P2P. ----End

6.5.3 (Optional) Setting the DIS Priority of an Interface


Context
Do as follows on the S9300.

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:


isis dis-priority priority [ level-1 | level-2 ]

The DIS priority of the interface is set. A larger value indicates a higher priority. By default, the DIS priority of an IS-IS interface is 64. Level-1 DISs and Level-2 DISs are elected respectively, and you can set different priorities for them. If no level is specified in the command, the DIS priority applies to both Level-1 and Level-2.
6-22 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

The DIS is elected based on the DIS priority. The intermediate system where the interface with the highest DIS priority resides is elected as the DIS. For the interfaces with the same priority, the interface with the greatest MAC address is elected. An interface with the DIS priority of 0 participates in the DIS election, which is different from OSPF.
NOTE

l l

The DIS priority is valid for only broadcast networks. If you run the isis circuit-type command to change the network type of an Ethernet interface to P2P, IS-IS regards this interface as a P2P interface. In this case, the isis dis-priority command does not take effect.

----End

6.5.4 Setting the Neighbor Relationship Negotiation Mode on P2P Links


Context
Do as follows on the S9300.

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:


isis ppp-negotiation { 2-way | 3-way [ only ] }

The neighbor relationship negotiation mode is set for the interface. By default, an interface adopts the 3-way handshake mode. The isis ppp-negotiation command applies to P2P links only. To set up the neighbor relationship on broadcast links, you can run the isis circuit-type command to change the link type to P2P and then run the isis ppp-negotiation command to configure the negotiation mode. The isis ppp-negotiation command specifies the negotiation mode in which the neighbor relationship can be set up on P2P links. Using the three-way handshake model, the S9300 can detect faults of unidirectional links and the unreliable peer status of P2P interfaces caused by other link defects. ----End

Issue 04 (2010-01-08)

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

6-23

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6.5.5 Configuring an IS-IS Interface Not to Check IP Addresses of the Received Hello Packets
Context
Do as follows on the S9300.

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:


isis peer-ip-ignore

The interface is configured not to check the IP address of the received Hello packets. This command applies to only P2P links. In general, an IS-IS interface checks the IP address of a received Hello packet. The neighbor relationship can be set up only when the IP address carried in the Hello packet and the address of the IS-IS interface belong to the same network segment. If you run the isis peer-ip-ignore command on the interfaces at both ends of a link, the neighbor relationship can be set up even if the addresses of the interfaces belong to different network segments. If the link is a real P2P link, the interfaces at both ends can ping each other successfully even if their addresses belong to different network segments. If the link is a P2P link simulated by an Ethernet link, the neighbor relationship can be set up between the devices on both ends but they cannot ping each other. ----End

6.5.6 Checking the Configuration


Prerequisite
The IS-IS attributes are configured.

Procedure
l Run the display isis interface [ verbose | process-id ] * command to check information about the interface on which IS-IS is enabled.

----End

Example
Set the network type to P2P and the DIS priority to 100 on interface VLANIF 10. Run the display isis interface command. The following information is displayed.
<Quidway> display isis interface verbose

6-24

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

Interface information for ISIS(1) --------------------------------Interface Id IPV4.State IPV6.State MTU Type DIS Vlanif10 002 Up Down 1497 L1/L2 -Circuit Parameters : p2p Description : HUAWEI, Quidway Series, Vlanif10 Interface SNPA Address : 00e0-095b-4201 IP Address : 123.1.1.1 IPV6 Link Local Address : IPV6 Global Address(es) : Csnp Timer Value : L1 10 L2 10 Hello Timer Value : 15 DIS Hello Timer Value : Hello Multiplier Value : 10 Cost : L1 10 L2 10 Ipv6 Cost : L1 10 L2 10 Priority : L1 100 L2 100 Retransmit Timer Value : L12 5 Retransmit-Throttle Timer : L12 50 Bandwidth-Value : Low 100000000 High 0 Static Bfd : NO Dynamic Bfd : NO Fast-Sense Rpr : NO Extended-Circuit-Id Value : 0000000001

6.6 Setting the Attributes of IS-IS Routes


This section describes how to set the parameters of IS-IS routes, and set the cost and priority of IS-IS links. 6.6.1 Establishing the Configuration Task 6.6.2 Setting the Cost of an IS-IS Interface 6.6.3 Setting the Preference of IS-IS 6.6.4 Checking the Configuration

6.6.1 Establishing the Configuration Task


Applicable Environment
By changing attributes of IS-IS routes, such as the cost and priority, you can modify the routing table and forwarding table. Thus, the optimal routes can be selected during the routing.

Pre-configuration Tasks
Before setting IS-IS route attributes, complete the following task:
l

6.3 Configuring Basic IS-IS Functions

Data Preparation
To set IS-IS route attributes, you need the following data. No. 1
Issue 04 (2010-01-08)

Data Cost of the IS-IS interface


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-25

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

No. 2

Data Priority of the IS-IS protocol

6.6.2 Setting the Cost of an IS-IS Interface


Context
Do as follows on the S9300.

Procedure
l Setting the IS-IS cost type 1. Run:
system-view

The system view is displayed. 2. Run:


isis [ process-id ]

The IS-IS view is displayed. 3. Run:


cost-style { narrow | wide | wide-compatible | { narrow-compatible | compatible } [ relax-spf-limit ] }

The IS-IS cost type is set. The cost range of an interface and cost range of a received route vary according to the cost type.

If the cost type is narrow, the cost of an interface ranges from 1 to 63. The maximum cost of a received route is 1023. If the cost type is narrow-compatible or compatible, the cost of an interface ranges from 1 to 63. The cost of a received route is related to relax-spf-limit.

If relax-spf-limit is not specified, the following situations occur:

If the cost of the route is smaller than or equal to 1023 and the link costs of all the interfaces that the route passes through are smaller than 63, the route is accepted and the actual cost of the route is adopted. If the cost of the route is smaller than or equal to 1023 but the link cost of an interface that the route passes through is greater than 63, the S9300 can learn only the routes of the network segment where this interface is located and the route imported by the interface. The actual cost of the route is adopted. The routes behind the interface are discarded. If the cost of the route is greater than 1023, the S9300 can learn only the routes of the first interface whose link cost exceeds 1023. That is, the link cost of every interface before this interface is not more than 63. The routes of the network segment where the interface is located and routes imported by the interface can be learned by the S9300. The cost of the route is 1023. The routes behind the interface are discarded.
Issue 04 (2010-01-08)

6-26

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

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

If relax-spf-limit is specified, there is no limit to the link costs of interfaces or route costs. The actual cost of the route is adopted.

If the cost type is wide-compatible or wide, the cost of an interface ranges from 1 to 16777215. If the cost is 16777215, the neighbor TLV (with the cost of 16777215) generated on the link cannot be used in the route calculation. Instead, this neighbor TLV can only be used to deliver TE information. The maximum cost of the received routes is 0 x FFFFFFFF.

Setting the cost of an IS-IS interface 1. Run:


system-view

The system view is displayed. 2. Run:


interface interface-type interface-number

The interface view is displayed. 3. Run:


isis cost cost [ level-1 | level-2 ]

The cost of the IS-IS interface is set. If no level is specified, the set cost applies to both Level-1 and Level-2. By default, the link cost of an IS-IS interface is 10. You can use the command to set the cost of a particular interface. l Setting the global cost for all IS-IS interfaces 1. Run:
system-view

The system view is displayed. 2. Run:


isis [ process-id ]

The IS-IS view is displayed. 3. Run:


circuit-cost cost [ level-1 | level-2 ]

The cost of all the IS-IS interfaces is set. If no level is specified, the link cost is set for Level-1-2 interfaces. You can use the command to change the cost of all interfaces at a time. l Enabling automatic cost calculation 1. Run:
system-view

The system view is displayed. 2. Run:


isis [ process-id ]

The IS-IS view is displayed. 3. Run:


bandwidth-reference value

Issue 04 (2010-01-08)

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

6-27

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The bandwidth reference value is set. By default, the bandwidth reference value is 100 Mbit/s. 4. Run:
auto-cost enable

Automatic calculation of interface cost is enabled. The circuit-cost or isis cost command takes preference over the auto-cost enable command. When the cost type is wide or wide-compatible, the bandwidth reference value set in Step 3 is valid. Then, the cost of each interface is calculated as follows: Interface cost = (Bandwidth-Reference/Interface bandwidth) x 10 The bandwidth reference values of the intermediate systems in an IS-IS area must be the same. If the cost type is narrow, narrow-compatible, or compatible, the cost of each interface can be obtained from Table 6-1. Table 6-1 Mapping between interface costs and the bandwidth Cost 60 50 40 30 20 10 Range of the Interface Bandwidth Interface bandwidth 10M 10M < interface bandwidth 100M 100M < interface bandwidth 155M 155 Mbit/s < interface bandwidth 622 Mbit/s 622 Mbit/s < interface bandwidth 2.5 Gbit/s 2.5Gbit/s < interface bandwidth

NOTE

To change the cost of the loopback interface, you can only run the isis cost command in the interface view.

----End

6.6.3 Setting the Preference of IS-IS


Context
Do as follows on the S9300.

Procedure
l
6-28

(Optional) Setting the preference of the IS-IS protocol


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

1.

Run:
system-view

The system view is displayed. 2. Run:


isis [ process-id ]

The IS-IS view is displayed. 3. Run:


preference preference

The preference of IS-IS is set. This command is used to set the preference of the IS-IS protocol. A smaller value indicates a higher preference. By default, the priority of the IS-IS protocol is 15. The S9300 can run multiple routing protocols at the same time. When multiple routing protocols discover routes to the same destination, the route discovered by the protocol with the highest preference is adopted. l Setting the preference of specific IS-IS routes 1. Run:
system-view

The system view is displayed. 2. Run:


isis [ process-id ]

The IS-IS view is displayed. 3. Run:


preference route-policy route-policy-name

The route preference is determined by the specified routing policy. After the configuration, the specified routing policy determines the priority of specific routes. If the apply preference clause is included in the routing policy, the priority of routes is as follows:

Matching routes: Their preference is set by the apply preference clause. Unmatching routes: Their preference is set by the preference preference command.

If the apply preference clause is not included in the routing policy, the preference of all routes is set by the preference preference command. l Setting the weight of IS-IS equal-cost routes 1. Run:
system-view

The system view is displayed. 2. Run:


isis [ process-id ]

The IS-IS view is displayed. 3.


Issue 04 (2010-01-08)

Run:
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-29

6 IS-IS Configuration
nexthop ipv4-address weight value

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The weight of an equal-cost route of IS-IS is set. After IS-IS uses the SPF algorithm to calculate the equal-cost routes, you can run the nexthop command to choose the route with the highest weight among the equal-cost routes. The smaller the weight, the higher the priority of the route. By default, the weight is 255. It indicates that load balancing is carried out among equal-cost routes regardless of their priorities. ----End

6.6.4 Checking the Configuration


Prerequisite
The configuration of IS-IS route attributes is complete.

Procedure
l l Run the display isis interface [ verbose | process-id ] * command to check information about the interface on which IS-IS is enabled. Run the display isis route [ process-id ] [ ipv4 ] [ {ipv4-address [ mask | mask-length ] } | { level-1 | level-2 } | verbose ] * or display isis process-id route [ ipv4 ] [ {ipv4address [ mask | mask-length ] } | { level-1 | level-2 } | verbose ] * command to check the IS-IS routing table. Run the display isis traffic-eng { statistics | sub-tlvs | { advertisements [ local | lsp-id ] | link [ verbose ] | network } [ level-1 | level-2 | level-1-2 ] } [ process-id ] command to check the statistics of traffic engineering.

----End

Example
Set the cost of interface VLANIF 10 to 20 and run the display isis interface verbose command. The following information is displayed.
<Quidway> display isis interface verbose Interface information for ISIS(1) --------------------------------Interface Id IPV4.State IPV6.State MTU Type DIS Vlanif10 001 Up Down 1497 L1/L2 No/No Circuit Parameters : small-hello Description : HUAWEI, Quidway Series, Vlanif10 Interface SNPA Address : 00e0-c72d-da01 IP Address : 123.1.1.1 IPV6 Link Local Address : IPV6 Global Address(es) : Csnp Timer Value : L1 10 L2 10 Hello Timer Value : L1 10 L2 10 DIS Hello Timer Value : L1 3 L2 3 Hello Multiplier Value : L1 3 L2 3 Retransmit-Throttle Timer : L12 50 Cost : L1 20 L2 20 Ipv6 Cost : L1 20 L2 20 Priority : L1 64 L2 64 Retransmit Timer Value : L12 5 Bandwidth-Value : Low 100000000 High 0

6-30

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


Static Bfd Dynamic Bfd Fast-Sense Rpr : : : NO NO NO

6 IS-IS Configuration

6.7 Controlling the Advertisement of IS-IS Routing Information


This section describes how to configure IS-IS to generate routes according to the specified rules and configure the route filtering rules. 6.7.1 Establishing the Configuration Task 6.7.2 Configuring IS-IS Route Aggregation 6.7.3 Configuring IS-IS to Generate Default Routes 6.7.4 Configuring IS-IS Route Leaking (Controlling Level-2 Routes Imported to Level-1 Areas) 6.7.5 Configuring IS-IS Route Leaking (Controlling Level-1 Routes Imported to Level-2 Areas) 6.7.6 Checking the Configuration

6.7.1 Establishing the Configuration Task


Applicable Environment
To maintain the routes to all network segments, an intermediate system must have high storage and route calculation capacities. To reduce the load brought by calculation and storage on the S9300, you can set certain filtering rules on the S9300 and enable route aggregation. In this manner, fewer routes are advertised. The routing entries maintained by the local S9300 and other intermediate systems in the network decrease accordingly. This configuration task is performed to control the advertisement of IS-IS routing information, for example, advertise aggregated routes, generate default routes, and configure route leaking.

Pre-configuration Tasks
Before controlling the advertisement of IS-IS routing information, complete the following task:
l

6.3 Configuring Basic IS-IS Functions

Data Preparation
To control the advertisement of IS-IS routing information, you need the following data. No. 1 2 Data Aggregated route Type of route leaking

Issue 04 (2010-01-08)

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

6-31

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6.7.2 Configuring IS-IS Route Aggregation


Context
Do as follows on the S9300.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


isis [ process-id ]

The IS-IS view is displayed. Step 3 Run:


summary ipv4-address mask [ avoid-feedback | generate_null0_route | tag tag | [ level-1 | level-1-2 | level-2 ] ] *

IS-IS route aggregation is configured. Routes with the same next hop can be aggregated into one route, thus reducing the number of IS-IS route entries in the routing table. ----End

6.7.3 Configuring IS-IS to Generate Default Routes


Context
Do as follows on the S9300.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


isis [ process-id ]

The IS-IS view is displayed. Step 3 Run:


default-route-advertise [ always | match default | route-policy route-policy-name ] [ cost cost ] [ tag tag ] [ level-1 | level-1-2 | level-2 ] [ avoid-learning ]

IS-IS is configured to generate default routes. The level of the S9300 determines the level of the default routes. After the default-routeadvertise command is run, the generated default routes are advertised to only devices of the
6-32 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

same level. You can use the routing policy to configure IS-IS to generate default routes when a route in the routing table matches the policy. ----End

6.7.4 Configuring IS-IS Route Leaking (Controlling Level-2 Routes Imported to Level-1 Areas)
Context
The import-route isis level-2 into level-1 command is used on the Level-1-2 device that is connected to an external area. By default, Level-2 routing information is not advertised to Level-1 areas. Through the IS-IS route leaking function, a Level-1-2 can import Level-2 routing information to the Level-1 routing table, and advertise the Level-2 routing information to the Level-1 area through LSPs. Do as follows on the S9300 of Level-1-2.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


isis [ process-id ]

The IS-IS view is displayed. Step 3 Run:


import-route isis level-2 into level-1 [ filter-policy { acl-number | ip-prefix ipprefix-name | route-policy route-policy-name } ] [ tag tag ]

IS-IS route leaking is enabled. Routes of the backbone area and other Level-1 areas can leak to the Level-1 area where the S9300 is located. Other intermediate systems in this Level-1 area can then generates more a accurate routing table. ----End

6.7.5 Configuring IS-IS Route Leaking (Controlling Level-1 Routes Imported to Level-2 Areas)
Context
The command is used on the Level-1-2 S9300 that is connected to an external area. By default, Level-1 routing information is advertised to Level-2 areas. Using the import-route isis level-1 into level-2 command, you can control the Level-1 routing information advertised to Level-2 areas. This command facilitates route management and reduces the number of Level-2 route entries. Do as follows on the S9300 of Level-1-2.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-33

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


isis [ process-id ]

The IS-IS view is displayed. Step 3 Run:


import-route isis level-1 into level-2 filter-policy { acl-number | ip-prefix ipprefix-name | route-policy route-policy-name } [ tag tag ]

A routing policy is specified to control the routes advertised from a Level-1 area to a Level-2 area. If you do not want to advertise Level-1 routes to Level-2 areas, run the undo import-route isis level-1 into level-2 command. ----End

6.7.6 Checking the Configuration


Prerequisite
All the configurations for controlling IS-IS route advertisement are complete.

Procedure
l l Run the display isis lsdb [ { level-1 | level-2 } | { local | lsp-id | is-name symbolicname } | process-id | verbose ] * command to check the IS-IS LSDB. Run the display isis route [ process-id ] [ ipv4 ] [ {ip-address [ mask | mask-length ] } | { level-1 | level-2 } | verbose ] * or display isis process-id route [ ipv4 ] [ {ip-address [ mask | mask-length ] } | { level-1 | level-2 } | verbose ] * command to check the IS-IS routing table.

----End

Example
Enable IS-IS process 1 to import Level-1 routes into the Level-2 areas. The leaked routes can be displayed in Level-1 and Level-2 routing tables. The routing information is displayed as follows:
<Quidway> display isis route Route information for ISIS(1) ----------------------------ISIS(1) Level-1 Forwarding Table -------------------------------IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags -------------------------------------------------------------------------------123.1.1.0/24 10 NULL Vlanif10 Direct D/-/ L/-

6-34

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut, U-Up/Down Bit Set ISIS(1) Level-2 Forwarding Table -------------------------------IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags -------------------------------------------------------------------------------123.1.1.0/24 10 NULL Vlanif10 Direct D/-/ L/Flags: D-Direct, R-Added to RM, L-Advertised in LSPs, U-Up/Down Bit Set

6.8 Controlling the Received IS-IS Routing Information


This section describes how to distinguish routing information inside and outside an IS-IS domain. 6.8.1 Establishing the Configuration Task 6.8.2 Configuring IS-IS to Filter the Received Routing Information 6.8.3 Configuring IS-IS to Import External Routes 6.8.4 Checking the Configuration

6.8.1 Establishing the Configuration Task


Applicable Environment
To maintain the routing entries to all network segments, the S9300 must have high storage and route calculation capacities. To reduce the load brought by storage and calculation, you can set filtering rules on the S9300 to decrease the received routes so that the local S9300 maintains fewer route entries. This configuration task is performed to control the received IS-IS routing information. For example, you can configure IS-IS to filter the received routes and import external routes.

Pre-configuration Tasks
Before controlling the received IS-IS routing information, complete the following task:
l

6.3 Configuring Basic IS-IS Functions

Data Preparation
To control the received IS-IS routing information, you need the following data. No. 1 2 Data Filtering list that is needed to filter routing information Protocol name and process ID of the external routes to be imported

Issue 04 (2010-01-08)

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

6-35

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6.8.2 Configuring IS-IS to Filter the Received Routing Information


Context
Do as follows on the S9300.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


isis [ process-id ]

The IS-IS view is displayed. Step 3 Run:


filter-policy { acl-number | ip-prefix ip-prefix-name | route-policy route-policyname } import

IS-IS is configured to filter the received routing information. ----End

6.8.3 Configuring IS-IS to Import External Routes


Context
IS-IS processes the routes discovered by other routing protocols as external routes. When IS-IS imports routes from other protocols, you can specify the default cost of the imported routes. If the route level is not specified in the import-route command, routes are imported to Level-2 routing tables by default. Do as follows on the S9300.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


isis [ process-id ]

The IS-IS view is displayed. Step 3 Run:


import-route protocol [ process-id ] [ cost-type { external | internal } | cost cost |tag tag | route-policy route-policy-name | [ level-1 | level-2 | level-1-2 ] ]
*

IS-IS is configured to import routes from other routing protocols.


6-36 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

Step 4 Run:
filter-policy { acl-number | ip-prefix ip-prefix -name | route-policy route-policyname } export [ protocol [ process-id ] ]

IS-IS is configured to filter the imported routes before advertising them. ----End

6.8.4 Checking the Configuration


Prerequisite
All the configuration for controlling the receiving of IS-IS routing information are complete.

Procedure
l l Run the display isis lsdb [ { level-1 | level-2 } | { local | lsp-id | is-name symbolicname } | process-id | verbose ] * command to check the IS-IS LSDB. Run the display isis route [ process-id ] [ ipv4 ] [ {ip-address [ mask | mask-length ] } | { level-1 | level-2 } | verbose ] * or display isis process-id route [ ipv4 ] [ {ip-address [ mask | mask-length ] } | { level-1 | level-2 } | verbose ] * command to check the IS-IS routing table.

----End

Example
Run the display isis route command, and you can find that the global cost of IS-IS process 1 on the local S9300 changes to 30 and the process imports a static route pointing to 169.1.1.0/24.
<Quidway> display isis route ISIS(1) Level-2 Forwarding Table -------------------------------IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags -------------------------------------------------------------------------------123.1.1.0/24 30 NULL Vlanif10 Direct D/-/L/20.0.0.0/24 30 NULL Vlanif20 Direct D/-/L/Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut, U-Up/Down Bit Set ISIS(1) Level-2 Redistribute Table ---------------------------------Type IPV4 Destination IntCost ExtCost Tag -------------------------------------------------------------------------------S 169.1.1.0/24 0 NULL Type: D-Direct, I-ISIS, S-Static, O-OSPF, B-BGP, R-RIP

6.9 Adjusting and Optimizing the IS-IS Network


This section describes how to configure the status of an IS-IS interface and set the LSP parameters. 6.9.1 Establishing the Configuration Task 6.9.2 (Optional) Setting the Level of an IS-IS Interface
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-37

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6.9.3 Suppressing an IS-IS Interface 6.9.4 Setting SPF Parameters 6.9.5 Enabling LSP Fast Flooding 6.9.6 Configuring IS-IS Dynamic Host Name Mapping 6.9.7 Configuring the LSP Overload Bit 6.9.8 Enabling Output of the Adjacency Status 6.9.9 Checking the Configuration

6.9.1 Establishing the Configuration Task


Applicable Environment
This section describes how to optimize IS-IS networks. Optimizing an IS-IS network involves:
l

Setting the level and status of IS-IS interfaces to decrease the flooding of broadcast packets on the network Adjusting SPF parameters to lower resource consumption caused by frequent changes on the network Configuring the LSP fast flooding and overload bit to increase the convergence speed of the network and reduce the packets lost during the convergence Configuring IS-IS dynamic host name mapping to meet users' requirements on easy maintenance

Pre-configuration Tasks
Before adjusting and optimizing the IS-IS network, complete the following task:
l

6.3 Configuring Basic IS-IS Functions

Data Preparation
To adjusting and optimize the IS-IS network, you need the following data. No. 1 2 3 Data Level of the IS-IS interface Parameters of the SPF timer Mapping between the system ID and host name

6.9.2 (Optional) Setting the Level of an IS-IS Interface


Context
Do as follows on the S9300.
6-38 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

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:


isis circuit-level [ level-1 | level-1-2 | level-2 ]

The level of the interface is set. By default, the level of an interface is Level-1-2. If the local S9300 is a Level-1-2 device and needs to establish a Level-1 or Level-2 relationship with the peer, this command can be used to configure the interface to send and receive only the Hello packets at this level. Only one type of Hello packets are sent and received on the pointto-point (P2P) link. In this manner, excessive packets prevented and bandwidth is also saved.
NOTE

Changing the level of an IS-IS interface is valid only when the level of the IS-IS process is Level-1-2. If the process is not Level-1-2, the level of the IS-IS process determines the level of the established adjacency.

----End

6.9.3 Suppressing an IS-IS Interface


Context
Do as follows on the S9300.

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:


isis silent

The interface is suppressed. ----End

Postrequisite
When an IS-IS AS is connected to other ASs, you need to enable IS-IS on the border interface so that the S9300s within the AS can learn the routes destined for the border interface. The
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-39

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

interface, however, sends IS-IS Hello packets to the network segment where it is located, which is unnecessary. To solve this problem, you can run the isis silent command to suppress the ISIS interface. When an IS-IS interface is configured as a silent interface, the interface does not receive or send IS-IS packets. The routes within the network segment of the interface, however, can still be advertised to other intermediate systems in the domain.
NOTE

If the status of the IS-IS protocol on the interfaces in the area is Down, the intermediate systems within the area cannot learn the outbound routes.

6.9.4 Setting SPF Parameters


Context
Do as follows on the S9300.

Procedure
l Setting the SPF intelligent timer According to the IS-IS protocol, the S9300 needs to recalculate the optimal route when the LSDB changes. Frequent route calculation consumes a lot of system resources and lowers the system performance. Delaying SPF calculation improves the efficiency of route calculation to a certain extent and reduces the resource consumption. A long delay, however, slows down the network convergence. The SPF intelligent timer is a solution to the problem. It can adjust the delay according to the frequency of changes in the LSDB. The interval for generating the first LSP is initialinterval. Then, the interval increases by incremental-interval every time the network changes until the interval reaches the value of max-interval. When the interval reaches the value of max-interval three times, it drops to initial-interval. 1. Run:
system-view

The system view is displayed. 2. Run:


isis [ process-id ]

The IS-IS view is displayed. 3. Run:


timer spf max-interval [ init-interval [ incr-interval ] ]

The SPF intelligent timer is set. l Setting the duration of SPF calculation When a large number of route entries (more than 150000) exist in a routing table, the SPF calculation of IS-IS occupies the CPU for a long time. To avoid this, you can configure ISIS to complete the SPF calculation in several times. You can also set the duration for each SPF calculation. If an SPF calculation does not process all the routing information, the calculation continues one second later. 1. Run:
system-view

6-40

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

The system view is displayed. 2. Run:


isis [ process-id ]

The IS-IS view is displayed. 3. Run:


spf-slice-size duration-time

The duration of SPF calculation is set. ----End

6.9.5 Enabling LSP Fast Flooding


Context
You can run the flash-flood command to speed up the LSP flooding. You can specify the number of LSPs flooded each time for all the interfaces that run the IS-IS process. If the number of LSPs to be sent is greater than the specified number, the LSPs of the specified number are flooded each time. If you run the max-timer-interval command, the LSPs are flooded when the timer expires. Do as follows on the S9300.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


isis [ process-id ]

The IS-IS view is displayed. Step 3 Run:


flash-flood [ { level-1 | level-2 } | lsp-count | max-timer-interval interval ]
*

LSP fast flooding is enabled. ----End

6.9.6 Configuring IS-IS Dynamic Host Name Mapping


Context
Do as follows on the S9300.

Procedure
l Configuring the host name for the S9300 You can run the is-name command configures a host name for the local IS-IS process and also to enable the mapping of the system ID to the host name. The name configured is advertised to neighbors through LSPs.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-41

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

If you do not run this command, the system ID rather than the host name is displayed when you run display commands to display the IS-IS information. 1. Run:
system-view

The system view is displayed. 2. Run:


isis [ process-id ]

The IS-IS view is displayed. 3. Run:


is-name symbolic-name

The host name of the local S9300 is configured. l Configuring the host name for the remote intermediate system The is-name map command is used to configure a host name for a remote intermediate system on the S9300. Each system ID matches only one host name. If the remote intermediate system is already configured with the dynamic host name mapping, the configuration on the remote intermediate system is adopted. 1. Run:
system-view

The system view is displayed. 2. Run:


isis [ process-id ]

The IS-IS view is displayed. 3. Run:


is-name map system-id symbolic-name

The host name of the remote intermediate system is configured. l Configuring the host name for the DIS 1. Run:
system-view

The system view is displayed. 2. Run:


interface interface-type interface-number

The interface view is displayed. 3. Run:


isis dis-name symbolic-name

The host name of the DIS is configured. This configuration takes effect only on the DIS. After you run the isis dis-name command on an interface, the configured host name is added to LSPs of the pseudo node of the local S9300 and advertised to the network connected to the interface. In this manner, the configured host name is associated with the system ID of the DIS.
6-42 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

This command does not take effect on P2P interfaces. ----End

6.9.7 Configuring the LSP Overload Bit


Context
Do as follows on the S9300.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


isis [ process-id ]

The IS-IS view is displayed. Step 3 Run:


set-overload [ on-startup [wait-for-bgp | start-from-nbr system-id ] [ timeout ] ] [ allow { interlevel | external } *]

The overload bit is set. Although the LSPs configured with the overload bit are flooded in the network, the LSPs are not used by other intermediate system to calculate the routes that pass through the intermediate system configured with the overload bit. After the S9300 is configured with the overload bit, other intermediate systems do not forward the packets to this S9300. The packets destined for the S9300, however, are still sent to it. If an intermediate system in an IS-IS area fails, the calculated routes in the entire area may be incorrect. To troubleshoot the intermediate system, you can set the overload flag bit for this intermediate system to isolate it from the IS-IS network temporarily. Then, you can locate the fault easily. ----End

6.9.8 Enabling Output of the Adjacency Status


Context
When the terminal monitor is started, changes of IS-IS adjacencies are displayed on the configuration terminal if the output of the IS-IS adjacency status is enabled. When the output of the adjacency status is disabled, changes of IS-IS adjacencies are not displayed. Do as follows on the S9300.

Procedure
Step 1 Run:
system-view

Issue 04 (2010-01-08)

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

6-43

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The system view is displayed. Step 2 Run:


isis [ process-id ]

The IS-IS view is displayed. Step 3 Run:


log-peer-change

The output of the adjacency status is enabled. ----End

6.9.9 Checking the Configuration


Prerequisite
The configuration for optimizing the IS-IS network is complete.

Procedure
l l l l l Run the display isis name-table [ process-id ] command to check the mapping between the host name and system ID of the S9300. Run the display isis lsdb [ { level-1 | level-2 } | { local | lsp-id | is-name symbolicname } | process-id | verbose ] * command to check the IS-IS LSDB. Run the display isis interface [ verbose | process-id ] * command to check information about the interface on which IS-IS is enabled. Run the display isis spf-log [ process-id ] command to view the SPF calculation log of ISIS. Run the display isis spf-tree [ systemid systemid | dname dname ] [ { level-1 | level-2 } | verbose ] * [ process-id ] command to check the calculated SPF tree.

----End

Example
Run thedisplay isis name-table 1 command, and you can find that the host name of the local S9300 is abc.
<Quidway> display isis name-table 1 system ID Host Name 1111.1111.1111 abc Type DYNAMIC

6.10 Configuring IS-IS GR


This section describes how to enable IS-IS GR and set parameters of the GR session. 6.10.1 Establishing the Configuration Task 6.10.2 Enabling IS-IS GR 6.10.3 Setting Parameters of an IS-IS GR Session 6.10.4 Checking the Configuration
6-44 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

6.10.1 Establishing the Configuration Task


Applicable Environment
When the IS-IS process on the local S9300 is restarted, the adjacencies between the S9300 and its neighbors are torn down. The LSPs of the S9300 are deleted from the LSDBs of other intermediate systems, which causes route flapping and even temporary interruption. This increases the load brought by route calculation and leads to the loss of packets. You can configure IS-IS GR to solve this problem. Enabled with IS-IS GR, the S9300 can advertise its restart status to neighbors and permit neighbors to maintain the adjacencies so that packets can be forwarded continuously. The advantages of IS-IS GR are as follows:
l

When IS-IS is restarted, the S9300 resend connection requests to its neighbors. The adjacencies are retained. Before LSPs are generated, GR minimizes the interference brought to the network by the delay for synchronizing LSDBs. If the S9300 is started for the first time, the S9300 sets the overload bit in LSPs until the LSDB synchronization is complete. This prevents loops on the network.

Pre-configuration Tasks
Before configuring IS-IS GR, complete the following task:
l

6.3 Configuring Basic IS-IS Functions

Data Preparation
To configure IS-IS GR, you need the following data. No. 1 2 3 Data IS-IS process ID Interval for re-establishing GR sessions Whether to suppress the advertisement of adjacency status when the GR restarter is restarted

6.10.2 Enabling IS-IS GR


Context
Do as follows on the S9300 on which GR needs to be enabled.

Procedure
Step 1 Run:
system-view

Issue 04 (2010-01-08)

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

6-45

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The system view is displayed. Step 2 Run:


isis [ process-id ]

The IS-IS view is displayed. Step 3 Run:


graceful-restart

IS-IS GR is enabled. By default, IS-IS GR is disabled. ----End

6.10.3 Setting Parameters of an IS-IS GR Session


Context
Do as follows on the S9300 on which GR needs to be enabled.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


isis [ process-id ]

The IS-IS view is displayed. Step 3 (Optional) Run:


graceful-restart interval timer

The interval for re-establishing a GR session is set. By default, the interval for re-establishing a GR session is 300 seconds. Step 4 Run:
graceful-restart suppress-sa

The GR restarter is configured not to advertise the adjacency status. The GR restarter, namely the S9300, sets the Suppress-Advertisement (SA) bit in Hello packets, requesting neighbors not to advertise the adjacency status during a specified time period. After the LSDB of the S9300 is synchronized, the SA bit is deleted from Hello packets. This feature can effectively avoid the black hole effect caused by the received or sent LSPs during the GR. If you do not want the S9300 to set the SA bit in Hello packets, run the undo graceful-restart suppress-sa command. By default, the SA bit is not suppressed. ----End
6-46 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

6.10.4 Checking the Configuration


Prerequisite
The configuration of IS-IS GR is complete.
NOTE

If an MPLS TE tunnel is configured on the S9300 and the S9300 learns the route to the destination address of the tunnel through IS-IS, then you need to configure the RSVP GR function on the tunnel.

Procedure
l Run the display isis graceful-restart status [ level-1 | level-2 ] [ process-id ] command to check the status of IS-IS GR.

----End

Example
Run the display isis graceful-restart status command, and you can find that GR is enabled for IS-IS process 1 and all GR parameters adopt default values.
<Quidway> display isis graceful-restart status Restart information for ISIS(1) ------------------------------IS-IS(1) Level-1 Restart Status Restart Interval: 300 SA Bit Supported Total Number of Interfaces = 1 Restart Status: RESTART COMPLETE IS-IS(1) Level-2 Restart Status Restart Interval: 300 SA Bit Supported Total Number of Interfaces = 1 Restart Status: RESTART COMPLETE

6.11 Configuring BFD for IS-IS


This section describes how to implement fast convergence of the IS-IS network by using BFD. 6.11.1 Establishing the Configuration Task 6.11.2 Configuring Single-Hop BFD 6.11.3 Enabling IS-IS Fast Detection 6.11.4 Enabling the BFD Feature Globally 6.11.5 Configuring Dynamic BFD of an IS-IS Process 6.11.6 Disabling Dynamic Creation of BFD Sessions 6.11.7 Configuring the BFD Feature for a Specified Interface 6.11.8 Checking the Configuration
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-47

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6.11.1 Establishing the Configuration Task


Applicable Environment
To increase IS-IS convergence speed when the link status changes, you can configure the BFD feature on the IS-IS link. Configure BFD according to the actual network environment. If the time parameters are not correctly set, network flapping may occur.

Pre-configuration Tasks
Before configuring BFD for IS-IS, complete the following task:
l

Configuring Basic IS-IS Functions

Data Preparation
To configure BFD for IS-IS, you need the following data. No. 1 2 3 Data ID of the IS-IS process that is enabled with BFD Type and ID of the interface where the BFD feature is enabled Value of the BFD session parameters

6.11.2 Configuring Single-Hop BFD


Context
NOTE

Before configuring BFD for IS-IS, enable BFD one-hop detection. Do as follows on both S9300s between which the BFD session is established:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bfd

BFD is enabled on the local S9300. Step 3 Run:


quit

The system view is displayed.


6-48 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

Step 4 Run:
interface interface-type interface-number

The interface view is displayed. Step 5 Run:


isis enable

IS-IS is enabled on the interface. Step 6 Run:


isis bfd static

BFD is enabled on the interface. Step 7 Run:


quit

The system view is displayed. Step 8 Run:


bfd cfg-name bind peer-ip ip-address [ interface interface-type interface-number ]

The BFD binding is configured. This command specifies the peer IP address and the local interface. BFD detects a single-hop link, that is, the route with the specified interface as the outgoing interface and the peer address as the next hop address. Step 9 Run the following commands to set BFD discriminators:
l

Run:
discriminator local discr-value

The local discriminator is set.


l

Run:
discriminator remote discr-value

The remote discriminator is set. The local discriminator of one device must be the same as the remote discriminator of the peer device; otherwise, the BFD session cannot be established. In addition, discriminators cannot be changed after being set.
NOTE

The local discriminator of the local router is the same as the remote discriminator of the remote router, and the remote discriminator of the local router is the same as the local discriminator of the remote router.

Step 10 Run:
commit

The configuration is submitted. ----End

6.11.3 Enabling IS-IS Fast Detection


Context
Do as follows on the S9300 that requires IS-IS fast detection.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-49

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

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 Enable IS-IS fast detection as required:
l

Run the isis bfd static command to enable static BFD. Then, run the isis fast-sense rpr command to enable resilient packet ring (RPR) fast detection on an IS-IS interface. Run the isis fast-sense command to enable IS-IS fast detection.
NOTE

l l

The effect of the isis fast-sense command is equal to the effect of the isis bfd static command plus the isis fast-sense rpr command. The isis fast-sense rpr command is required only on the RPR interface.

----End

6.11.4 Enabling the BFD Feature Globally


Context
To dynamically set up a BFD session, you need to enable BFD globally. Do as follows on the S9300.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bfd

BFD is enabled globally. ----End

6.11.5 Configuring Dynamic BFD of an IS-IS Process


Context
To configure the BFD feature for all the interfaces that run an OSPF process, do as follows on both the S9300s on which the BFD session needs to be established.
6-50 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


isis [ process-id]

The IS-IS view is displayed. Step 3 Run:


bfd all-interfaces enable

The BFD feature is enabled to establish a BFD session. When the BFD feature is enabled globally, IS-IS sets up a BFD session on all the interfaces whose neighbor is in Up state by using default values of BFD parameters. Step 4 (Optional) Run:
bfd all-interfaces { min-rx-interval receive interval | min-tx-interval transmit interval | detect-multiplier multiplier value } *

BFD parameters are set. ----End

6.11.6 Disabling Dynamic Creation of BFD Sessions


Context
After you run the bfd all-interfaces enable command for an IS-IS process, On a broadcast network, all IS-IS interfaces whose neighbor status is Up set up dynamic sessions between the DISs and the non-DISs. If you do not want to set up dynamic BFD sessions on an interface, do as follows on the S9300.

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:


isis bfd block

The interface cannot create BFD sessions dynamically. ----End


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-51

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6.11.7 Configuring the BFD Feature for a Specified Interface


Context
To configure dynamic BFD only on certain interfaces and not to enable dynamic BFD for ISIS, or to configure the interfaces to fast detect link faults by using different dynamic BFD session parameters after dynamic BFD for IS-IS is configured, do as follows on the S9300s at both ends of the link.

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:


isis bfd enable

The BFD feature is enabled on the interface and a BFD session is established. When global BFD is configured and the neighbor status is Up (on the broadcast network, DIS is in the Up state), the default values of BFD parameters are used to dynamically set up a BFD session. Step 4 (Optional) Run:
isis bfd { min-rx-interval receive-interval | min-tx-interval transmit-interval | detect-multiplier multiplier-value } *

BFD parameters are set.


NOTE

The BFD feature configured on an interface has a higher priority than the BFD feature configured for an IS-IS process. That is, the BFD session established on an interface uses the parameters set on the interface.

----End

6.11.8 Checking the Configuration


Prerequisite
The configuration of BFD for IS-IS is complete.

Procedure
l l Run the display isis [ process-id | vpn-instance vpn-instance-name ] bfd session { peer ipaddress | all } command to check information about a BFD session. Run the display isis [ process-id ] bfd interface command to check the configuration of the BFD feature configured on an interface.

----End
6-52 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

Example
After enabling BFD on both ends of the link, run the display isis [ process-id | vpn-instance vpn-instance-name ] bfd session { peer ipaddress | all } command. You can see that the BFD status is Up. The following is an example.
<Quidway> display isis bfd session all BFD session information for ISIS(1) ----------------------------------Peer System ID : 0000.0000.0002 TX : 1000 BFD State : up RX : 1000 LocDis : 8192 Multiplier : 3 RemDis : 8192 Diag : No diagnostic information Interface : Vlanif10 Peer IP Address : 1.1.1.2 Local IP Address: 1.1.1.1 Type : L2

Run the display isis [ process-id ] bfd interface command, and you can view all the interfaces enabled with BFD and the values of the BFD session parameters on the interface.
<Quidway> display isis bfd interface BFD information of interface for ISIS(1) ----------------------------------------Interface BFD.State Min-Tx Min-Rx Mul Vlanif10 enable 1000 1000 3 Total interfaces: 1 Total bfd enabled interfaces: 1

6.12 Configuring IS-IS IPv6


This section describes how to interconnect the IPv6 networks through IS-IS. 6.12.1 Establishing the Configuration Task 6.12.2 Enabling IPv6 on an IS-IS Process 6.12.3 Enabling IPv6 on an IS-IS Interface 6.12.4 Configuring the IPv6 Route Cost on an Interface 6.12.5 Configuring the Attributes of IS-IS IPv6 Routes 6.12.6 Checking the Configuration

6.12.1 Establishing the Configuration Task


Applicable Environment
IS-IS supports multiple types networking layer protocols, including IPv6. In an IPv6 network, you can implement interconnection by configuring IS-IS. The functions and configurations of most attributes of IS-IS IPv6 routes are similar to those of IS-IS IPv4 routes. This section describes only the configuration procedures.

Pre-configuration Tasks
Before configure IS-IS IPv6, complete the following tasks:
l

Enabling global IPv6 in the system view


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-53

Issue 04 (2010-01-08)

6 IS-IS Configuration
l l l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuring IPv6 addresses of interfaces to make neighboring nodes reachable 6.3.2 Starting an IS-IS Process 6.3.3 Configuring a NET

Data Preparation
To configure IS-IS IPv6, you need the following data. No. 1 2 3 4 Data Preference value of IS-IS Aggregated IS-IS route The filtering list that is needed to filter the IS-IS routing information and the name of the routing policy The name and the process number of the external IPv6 routing protocol to be imported

6.12.2 Enabling IPv6 on an IS-IS Process


Context
To enable IS-IS, you must first create an IS-IS process and then enable IPv6. Do as follows on the S9300 that runs IS-IS:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


isis [ process-id ]

An IS-IS process is enabled and the IS-IS view is displayed. Step 3 Run:
ipv6 enable

IPv6 is enabled on the IS-IS process. ----End

6.12.3 Enabling IPv6 on an IS-IS Interface


Context
After IPv6 is enabled in the IS-IS process, you also need to enable IPv6 of a specified IS-IS interface. Do as follows on the S9300 that runs IS-IS:
6-54 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

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:


isis ipv6 enable [ process-id ]

IS-IS IPv6 is enabled on the interfaces. ----End

6.12.4 Configuring the IPv6 Route Cost on an Interface


Context
Do as follows on the S9300s that runs IS-IS:

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:


isis ipv6 cost cost-value

The IPv6 route cost of the link is set. The cost is used for SPF calculation in an IPv6 topology. ----End

6.12.5 Configuring the Attributes of IS-IS IPv6 Routes


Context
To perform IPv6-related configurations, you must enable IPv6. Do as follows on the S9300 that runs IS-IS:

Procedure
l
Issue 04 (2010-01-08)

Configuring the Preference of IS-IS IPv6 Routes


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-55

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

1.

Run:
system-view

The system view is displayed. 2. Run:


isis [ process-id ]

The IS-IS view is displayed. 3. Run:


ipv6 preference { preference | route-policy route-policy-name }
*

The preference of IS-IS IPv6 routes is set. l Configuring IS-IS IPv6 Route Aggregation 1. Run:
system-view

The system view is displayed. 2. Run:


isis [ process-id ]

The IS-IS view is displayed. 3. Run:


ipv6 summary ipv6-address prefix-length [ avoid-feedback | generate_null0_route | tag tag | [ level-1 | level-1-2 | level-2 ]]
*

IS-IS IPv6 route aggregation is configured. l Configuring IS-IS to Generate Default IPv6 Routes 1. Run:
system-view

The system view is displayed. 2. Run:


isis [ process-id ]

The IS-IS view is displayed. 3. Run:


ipv6 default-route-advertise [ always | match default | route-policy routepolicy-name ] [ cost cost ] [ tag tag ] [ level-1 | level-2 | level-1-2 ] [ avoid-learning ]

IS-IS is configured to generate default IPv6 routes. After this command is used, IS-IS generates default IPv6 routes and advertises them to IS-IS S9300s of related levels. When IS-IS is configured to generate default IPv6 routes, the level of default IPv6 routes is Level-2 if no level is specified. l Configuring IS-IS to Filter the Received Routes to Determine Which Routes Are to Be Added to the IP Routing Table 1. Run:
system-view

The system view is displayed. 2.


6-56

Run:
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


isis [ process-id ]

6 IS-IS Configuration

The IS-IS view is displayed. 3. Run:


ipv6 filter-policy { acl6-number | ipv6-prefix ipv6-prefix-name | routepolicy route-policy-name } import

IS-IS is configured to filter received IPv6 routes to determine which routes to be added to the IPv6 routing table. l Configuring IS-IS to Import IPv6 Routes of Other Protocols 1. Run:
system-view

The system view is displayed. 2. Run:


isis [ process-id ]

The IS-IS view is displayed. 3. Run:


ipv6 import-route protocol [ process-id ] [ cost cost ] [ tag tag ] [ routepolicy route-policy-name ] [ level-1 | level-2 | level-1-2 ]

IS-IS is configured to import IPv6 routes of other protocols. 4. Run:


ipv6 filter-policy { acl6-number | ipv6-prefix ipv6-prefix-name | routepolicy route-policy-name } export [ protocol [ process-id ] ]

IS-IS is enabled to filter imported IPv6 routes when advertising them to other S9300s. The ipv6 filter-policy export command usually works with the ipv6 import-route command. It filters only imported IPv6 routes to be advertised to other S9300s. If protocol is not specified, the command filters the IPv6 routes imported from all the protocols. If protocol is specified, it filters only the IPv6 routes imported from a certain protocol. If no level is specified in the ipv6 import-route command, IPv6 routes are imported to the Level-2 routing table. l Configuring IS-IS Route Leaking 1. Run:
system-view

The system view is displayed. 2. Run:


isis [ process-id ]

The IS-IS view is displayed. 3. Run:


ipv6 import-route isis level-2 into level-1 [ filter-policy { acl6-number | ipv6-prefix ipv6-prefix-name | route-policy route-policy-name } ] [ tag tag ]

IS-IS IPv6 route leaking is enabled. IPv6 routes in Level-2 areas and other Level-1 areas are leaked to Level-1 area where the Level-1-2 S9300 resides. This command is used on Level-1-2 S9300s connected to Level-2 areas.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-57

6 IS-IS Configuration
NOTE

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

By default, IS-IS IPv6 routes in Level-1 areas are leaked to Level-2 areas.

----End

6.12.6 Checking the Configuration


Procedure
l Run display isis interface [ [ verbose | traffic-eng ] * | tunnel ] [ process-id | [ vpninstance { vpn-instance-name | default } | vpn6-instance { vpn6-instance-name | default } ] * ] command to check information about the IS-IS interface. Run display isis lsdb [ level-1 | level-2 ] [ verbose ] [ local | lsp-id | is-name symbolicname ] [ process-id | [ vpn-instance { vpn-instance-name | default } | vpn6-instance { vpn6-instance-name | default } ] * ] command to check information about the LSDB. Run display isis peer [ verbose ] [ process-id | [ vpn-instance { vpn-instance-name | default } | vpn6-instance { vpn6-instance-name | default } ] * ] command to check information about the IS-IS neighbor. Run display isis route [ process-id | [ vpn-instance { vpn-instance-name | default } | vpn6instance { vpn6-instance-name | default } ] * ] [ [ [ ipv4 ] [ verbose | [ level-1 | level-2 ] | ip-address [ mask | mask-length ] ] * ] | [ ipv6 [ verbose | [ level-1 | level-2 ] | ipv6-address prefix-length ] * ] ] command to check the IS-IS routing information. Check the statistics of the IS-IS process.

display isis statistics [ level-1 | level-2 | level-1-2 ] [ process-id | [ vpn-instance { vpninstance-name | default } | vpn6-instance { vpn6-instance-name | default } ] * ] display isis statistics packet [ interface interface-type interface-number ] display isis process-id statistics [ level-1 | level-2 | level-1-2 | packet ]

----End

Example
Run the display isis interface verbose command, and you can find that the cost of the IPv6 route on GigabitEthernet 6/0/0 is 15.
<Quidway> display isis interface verbose Interface information for ISIS(1) --------------------------------Interface Id IPV4.State IPV6.State MTU Type DIS GigabitEthernet6/0/0 001 Down Up 1497 L1/L2 No/No Description : HUAWEI, Quidway Series, GigabitEthernet6/0/0 Interface Circuit MT State : Standard SNPA Address : 00e0-c72d-da01 IP Address : IPV6 Link Local Address : FF80::FFE0:FFFF:FE2D:DA01 IPV6 Global Address(es) : 2001::1/64 Csnp Timer Value : L1 10 L2 10 Hello Timer Value : L1 10 L2 10 DIS Hello Timer Value : L1 3 L2 3 Hello Multiplier Value : L1 3 L2 3 LSP-Throttle Timer : L12 50 Cost : L1 10 L2 10 Ipv6 Cost : L1 15 L2 15 Priority : L1 64 L2 64 Retransmit Timer Value : L12 5

6-58

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


Bandwidth-Value Static Bfd Dynamic Bfd Fast-Sense Rpr : : : : Low 100000000 NO NO NO High 0

6 IS-IS Configuration

6.13 Configuring IS-IS Authentication


This section describes how to configure the authentication mode and authentication password for an IS-IS network. 6.13.1 Establishing the Configuration Task 6.13.2 Configuring Area Authentication and Routing Domain Authentication 6.13.3 Configuring the Interface Authentication 6.13.4 Checking the Configuration

6.13.1 Establishing the Configuration Task


Applicable Environment
On a network that requires high security, you can configure the IS-IS authentication functions. Authentication improves security of the network to meet users' requirements on security. The IS-IS authentication functions are classified into area authentication, routing domain authentication, and interface authentication.

Pre-configuration Tasks
Before improving security of an IS-IS network, complete the following task:
l

6.3 Configuring Basic IS-IS Functions

Data Preparation
To improve security of an IS-IS network, you need the following data. No. 1 Data Authentication mode and password

6.13.2 Configuring Area Authentication and Routing Domain Authentication


Context
If area authentication is required, the password for area authentication is encapsulated into the Level-1 LSP, CSNP and PSNP packets in the specified mode. The intermediate systems in an area must adopt the same area authentication mode and password so that IS-IS packets can be normally flooded. Similarly, for routing domain authentication, the password is encapsulated into the Level-2 LSP, CSNP and PSNP packets in the specified mode. The intermediate systems in a domain must
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-59

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

adopt the same domain authentication mode and password so that IS-IS packets can be normally flooded. Whether IS-IS packets pass the area or domain authentication does not affect the creation of Level-1 or Level-2 adjacencies. Do as follows on the S9300 on a network that requires high security.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


isis [ process-id ]

The IS-IS view is displayed. Step 3 Run:


area-authentication-mode { simple password | md5 password-key } [ ip | osi ]

The area authentication mode is configured. Step 4 Run:


domain-authentication-mode { simple password | md5 password-key } [ ip | osi ]

The routing domain authentication mode is configured. ----End

6.13.3 Configuring the Interface Authentication


Context
Do as follows on the S9300 on a network that requires high security. The authentication function configured on an interface applies to Hello packets to confirm the validity and correctness of the neighbor relationship. The neighbor relationship can be established only after the Hello packets pass the authentication.

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:


isis authentication-mode { simple password | md5 password-key } [ level-1 | level-2 ] [ ip | osi ]

The authentication mode and password are configured for the interface.
6-60 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


NOTE

6 IS-IS Configuration

The level-1 and level-2 keywords are displayed only on Ethernet interfaces. If no level is specified, the same authentication mode and password are adopted for Level-1 and Level-2 Hello packets by default.

----End

6.13.4 Checking the Configuration


Prerequisite
The authentication function is configured for the IS-IS network.

Procedure
l l Run the display isis peer [ verbose ] [ process-id ] command to check information about the IS-IS neighbors. Run the display isis brief [ process-id ] command to check brief information about an ISIS process.

----End

6.14 Maintaining IS-IS


This section describes how to clear data of an IS-IS process and debugging the IS-IS process. 6.14.1 Clearing Data of an IS-IS Process 6.14.2 Resetting a Specific IS-IS Neighbor 6.14.3 Debugging IS-IS

6.14.1 Clearing Data of an IS-IS Process


Context

CAUTION
After you clear data of an IS-IS process, all the previous topology information and adjacencies are cleared. So, confirm the action before you run the command. To clear the IS-IS data, run the following reset command in the user view.

Procedure
l Run the reset isis all [ process-id ] command to clear data of the IS-IS process. ----End

Issue 04 (2010-01-08)

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

6-61

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6.14.2 Resetting a Specific IS-IS Neighbor


Context

CAUTION
The specified IS-IS neighbor relationship is terminated after you run the reset isis command to reset a specific IS-IS neighbor. So, confirm the action before you run the command. After modifying the IS-IS routing policy, you need to reset the specified IS-IS neighbor to make the modification take effect. To reset a specified IS-IS neighbor, run the following reset command in the user view.

Procedure
l Run thereset isis peer system-id [ process-id ] command to reset an IS-IS neighbor. ----End

6.14.3 Debugging IS-IS


Context

CAUTION
Debugging affects the performance of the system. So, after debugging, run the undo debugging all command to disable it immediately. When an IS-IS fault occurs, run the following debugging commands in the user view to debug IS-IS and locate the fault.

Procedure
l l l l l l l Run the debugging isis all [ process-id ] command to enable all types of debugging. Run the debugging isis adjacency [ process-id ] command to enable debugging of IS-IS adjacencies. Run the debugging isis authentication-error [ process-id ] command to enable debugging of authentication errors. Run the debugging isis checksum-error [ process-id ] command to enable debugging of checksum errors. Run the debugging isis circuit-information [ process-id ] command to enable debugging of links of IS-IS interfaces. Run the debugging isis configuration-error [ process-id ] command to enable debugging of configuration errors. Run the debugging isis datalink-receiving-packet [ process-id ] command to enable debugging of packet receiving on the link layer.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

6-62

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

l l l l l l l l l l

Run the debugging isis datalink-sending-packet [ process-id ] command to enable debugging of packet sending on the link layer. Run the debugging isis event [ process-id ] command to enable debugging of IS-IS events. Run the debugging isis general-error [ process-id ] command to enable debugging of general errors of IS-IS. Run the debugging isis graceful-restart [ process-id ] command to enable debugging of IS-IS GR events. Run the debugging isis ha-events [ process-id ] command to enable debugging of IS-IS HA events. Run the debugging isis interface-information [ process-id ] command to enable debugging of IS-IS interfaces. Run the debugging isis memory-allocating [ process-id ] command to enable debugging of memory allocation. Run the debugging isis miscellaneous-errors command to enable debugging of miscellaneous errors of IS-IS. Run the debugging isis receiving-packet-content [ process-id ] command to enable debugging of contents of received packets. Run the debugging isis receiving-packet-regular-content [ process-id ] command to enable debugging of contents of received packets (displaying debugging information based on the packet format). Run the debugging isis self-originate-update [ process-id ] command to enable debugging of local update packets. Run the debugging isis sending-packet-content [ process-id ] command to enable debugging of contents of sent packets. Run the debugging isis sending-packet-regular-content [ process-id ] command to enable debugging of contents of sent packets (displaying debugging information based on the packet format). Run the debugging isis snp-packet [ process-id ] command to enable debugging of SNP packets of IS-IS. Run the debugging isis spf-event [ process-id ] command to enable debugging of IS-IS SPF events. Run the debugging isis spf-prc [ process-id ] command to enable debugging of SPF processes during SPF calculation. Run the debugging isis spf-summary [ process-id ] command to enable debugging of SPF summary. Run the debugging isis spf-timer [ process-id ] command to enable debugging of IS-IS SPF timers. Run the debugging isis task-error [ process-id ] command to enable debugging of task errors of IS-IS. Run the debugging isis timer [ process-id ] command to enable debugging of IS-IS timers. Run the debugging isis traffic-eng { advertisement | event } [ process-id ] command to enable debugging of TE. Run the debugging isis update-packet [ process-id ] command to enable debugging of ISIS update packets.

l l l

l l l l l l l l l

Issue 04 (2010-01-08)

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

6-63

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Run the debugging isis update-process [ process-id | ipv4-acl acl-number [ process-id ] ] command to enable debugging of the IS-IS update process.

----End

6.15 Configuration Examples


This section provides examples of IS-IS configuration. 6.15.1 Example for Configuring Basic IS-IS Functions 6.15.2 Example for Configuring IS-IS Route Aggregation 6.15.3 Example for Configuring the DIS Election 6.15.4 Example for Configuring IS-IS Load Balancing 6.15.5 Example for Configuring IS-IS GR 6.15.6 Example for Configuring BFD for IS-IS 6.15.7 Example for Configuring Basic IS-IS IPv6 Functions

6.15.1 Example for Configuring Basic IS-IS Functions


Networking Requirements
As shown in Figure 6-3, the networking requirements are as follows:
l

S9300-A, S9300-B, S9300-C, and S9300-D belong to the same AS. The IS-IS protocol runs on them to ensure connectivity on an IP network. The area IDs of S9300-A, S9300-B, and S9300-C are all 10, and the area ID of S9300-D is 20. S9300-A and S9300X-B are Level-1 devices. S9300-C is a Level-1-2 device. S9300-D is the Level-2 device.

6-64

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

Figure 6-3 Networking diagram for configuring basic functions of IS-IS

S9300-A L1
GE1/0/1

GE1/0/1

S9300-C L1/2
GE1/0/3 GE1/0/1

GE1/0/2

IS-IS Area 10 GE1/0/2

S9300-D L2 IS-IS Area 20

GE1/0/1

S9300-B L1

S9300 S9300-A S9300-B S9300-C S9300-C S9300-C S9300-D S9300-D

Interface GigabitEthernet1/0/1 GigabitEthernet1/0/1 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/3 GigabitEthernet1/0/1 GigabitEthernet1/0/2

VLANIF interface VLANIF 10 VLANIF 20 VLANIF 10 VLANIF 20 VLANIF 30 VLANIF 30 VLANIF 40

IP address 10.1.1.2/24 10.1.2.2/24 10.1.1.1/24 10.1.2.1/24 192.168.0.1/24 192.168.0.2/24 172.16.1.1/24

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. Configure the VLANs that the physical interfaces belong to. Assign an IP address to each VLANIF interface. Run the IS-IS progress on each S9300, specify the network entity title, and configure the level. Check the IS-IS database and routing table of each S9300.

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

ID of the VLAN that each interface belongs to, as shown in Figure 6-3 IP address of each VLANIF interface, as shown in Figure 6-3
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-65

Issue 04 (2010-01-08)

6 IS-IS Configuration
l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

System ID, level, and area ID of each S9300:


S9300-A: The system ID is 0000.0000.0001; the area ID is 10; the level is Level-1. S9300-B: The system ID is 0000.0000.0002; the area ID is 10; the level is Level-1. S9300-C: The system ID is 0000.0000.0003; the area ID is 10; the level is Level-1-2. S9300-D: The system ID is 0000.0000.0004; the area ID is 20; the level is Level-2.

Procedure
Step 1 Create VLANs and add corresponding interfaces to the VLANs.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] vlan 10 [S9300-A-vlan10] quit [S9300-A] interface GigabitEthernet 1/0/1 [S9300-A-GigabitEthernet1/0/1] port hybrid pvid vlan 10 [S9300-A-GigabitEthernet1/0/1] port hybrid untagged vlan 10 [S9300-A-GigabitEthernet1/0/1] quit

The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of S9300-A, and are not mentioned here. Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ip address 10.1.1.2 24 [S9300-A-Vlanif10] quit

The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of S9300-A, and are not mentioned here. Step 3 Run the IS-IS progress on each S9300, specify the network entity title, and configure the level. # Configure S9300-A.
[S9300-A] isis 1 [S9300-A-isis-1] is-level level-1 [S9300-A-isis-1] network-entity 10.0000.0000.0001.00 [S9300-A-isis-1] quit

# Configure S9300-B.
[S9300-B] isis 1 [S9300-B-isis-1] is-level level-1 [S9300-B-isis-1] network-entity 10.0000.0000.0002.00 [S9300-B-isis-1] quit

# Configure S9300-C.
[S9300-C] isis 1 [S9300-C-isis-1] network-entity 10.0000.0000.0003.00 [S9300-C-isis-1] quit

# Configure S9300-D.
[S9300-D] isis 1 [S9300-D-isis-1] is-level level-2 [S9300-D-isis-1] network-entity 20.0000.0000.0004.00 [S9300-D-isis-1] quit

Step 4 Enable the IS-IS progress on each interface. # Configure S9300-A.


[S9300-A] interface vlanif 10 [S9300-A-Vlanif10] isis enable 1 [S9300-A-Vlanif10] quit

# Configure S9300-B.
6-66 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


[S9300-B] interface vlanif 20 [S9300-B-Vlanif20] isis enable 1 [S9300-B-Vlanif20] quit

6 IS-IS Configuration

# Configure S9300-C.
[S9300-C] interface vlanif 10 [S9300-C-Vlanif10] isis enable 1 [S9300-C-Vlanif10] quit [S9300-C] interface vlanif 20 [S9300-C-Vlanif20] isis enable 1 [S9300-C-Vlanif20] quit [S9300-C] interface vlanif 30 [S9300-C-Vlanif30] isis enable 1 [S9300-C-Vlanif30] quit

# Configure S9300-D.
[S9300-D] interface vlanif 30 [S9300-D-Vlanif30] isis enable 1 [S9300-D-Vlanif30] quit [S9300-D] interface vlanif 40 [S9300-D-Vlanif40] isis enable 1 [S9300-D-Vlanif40] quit

Step 5 Verify the configuration. # View the IS-IS LSDB of each S9300.
[S9300-A] display isis lsdb Database information for ISIS(1) -------------------------------Level-1 Link State Database LSPID Seq Num Checksum Holdtime Length ATT/P/OL ------------------------------------------------------------------------0000.0000.0001.00-00* 0x00000006 0xbf7d 649 68 0/0/0 0000.0000.0002.00-00 0x00000003 0xef4d 545 68 0/0/0 0000.0000.0003.00-00 0x00000008 0x3340 582 111 1/0/0 0000.0000.0003.01-00 0x00000004 0xa7dd 582 55 0/0/0 0000.0000.0003.02-00 0x00000002 0xc0c4 524 55 0/0/0 *(In TLV)-Leaking Route, *(By LSPID)-Self LSP, +-Self LSP(Extended), ATT-Attached, P-Partition, OL-Overload [S9300-B] display isis lsdb Database information for ISIS(1) -------------------------------Level-1 Link State Database LSPID Seq Num Checksum Holdtime Length ATT/P/OL ------------------------------------------------------------------------0000.0000.0001.00-00 0x00000006 0xbf7d 642 68 0/0/0 0000.0000.0002.00-00* 0x00000003 0xef4d 538 68 0/0/0 0000.0000.0003.00-00 0x00000008 0x3340 574 111 1/0/0 *(In TLV)-Leaking Route, *(By LSPID)-Self LSP, +-Self LSP(Extended), ATT-Attached, P-Partition, OL-Overload [S9300-C] display isis lsdb Database information for ISIS(1) -------------------------------Level-1 Link State Database LSPID Seq Num Checksum Holdtime Length ATT/P/OL ------------------------------------------------------------------------0000.0000.0001.00-00 0x00000006 0xbf7d 638 68 0/0/0 0000.0000.0002.00-00 0x00000003 0xef4d 533 68 0/0/0

Issue 04 (2010-01-08)

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

6-67

6 IS-IS Configuration
0000.0000.0003.00-00* 0x00000008 0000.0000.0003.01-00* 0x00000005 0000.0000.0003.02-00* 0x00000003 0x3340 0xa5de 0xbec5

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


569 569 569 111 55 55 1/0/0 0/0/0 0/0/0

*(In TLV)-Leaking Route, *(By LSPID)-Self LSP, +-Self LSP(Extended), ATT-Attached, P-Partition, OL-Overload Level-2 Link State Database LSPID Seq Num Checksum Holdtime Length ATT/P/OL ------------------------------------------------------------------------0000.0000.0003.00-00* 0x00000008 0x55bb 650 100 0/0/0 0000.0000.0003.03-00* 0x00000003 0xef91 650 55 0/0/0 0000.0000.0004.00-00 0x00000005 0x651 629 84 0/0/0 *(In TLV)-Leaking Route, *(By LSPID)-Self LSP, +-Self LSP(Extended), ATT-Attached, P-Partition, OL-Overload [S9300-D] display isis lsdb Database information for ISIS(1) -------------------------------Level-2 Link State Database LSPID Seq Num Checksum Holdtime Length ATT/P/OL ------------------------------------------------------------------------0000.0000.0003.00-00 0x00000008 0x55bb 644 100 0/0/0 0000.0000.0003.03-00 0x00000003 0xef91 644 55 0/0/0 0000.0000.0004.00-00* 0x00000005 0x651 624 84 0/0/0 *(In TLV)-Leaking Route, *(By LSPID)-Self LSP, +-Self LSP(Extended), ATT-Attached, P-Partition, OL-Overload

# View the IS-IS routing table of each S9300. A default route is available in the routing table of the Level-1 S9300s and the next hop is a Level-1-2 S9300. The routing table of the Level-2 S9300 contains all Level-1 and Level-2 routes.
[S9300-A] display isis route Route information for ISIS(1) ----------------------------ISIS(1) Level-1 Forwarding Table -------------------------------IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags ------------------------------------------------------------------------0.0.0.0/0 10 NULL Vlanif10 10.1.1.1 A/-/-/10.1.1.0/24 10 NULL Vlanif10 Direct D/-/L/10.1.2.0/24 20 NULL Vlanif10 10.1.1.1 A/-/-/192.168.0.0/24 20 NULL Vlanif10 10.1.1.1 A/-/-/Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut, U-Up/Down Bit Set [S9300-C] display isis route Route information for ISIS(1) ----------------------------ISIS(1) Level-1 Forwarding Table -------------------------------IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags ------------------------------------------------------------------------10.1.1.0/24 10 NULL Vlanif10 Direct D/-/L/10.1.2.0/24 10 NULL Vlanif20 Direct D/-/L/192.168.0.0/24 10 NULL Vlanif30 Direct D/-/L/Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut, U-Up/Down Bit Set

6-68

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

ISIS(1) Level-2 Forwarding Table -------------------------------IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags ------------------------------------------------------------------------10.1.1.0/24 10 NULL Vlanif10 Direct D/-/L/10.1.2.0/24 10 NULL Vlanif20 Direct D/-/L/192.168.0.0/24 10 NULL Vlanif30 Direct D/-/L/172.16.0.0/16 20 NULL Vlanif40 192.168.0.2 A/-/-/Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut, U-Up/Down Bit Set [S9300-D] display isis route Route information for ISIS(1) ----------------------------ISIS(1) Level-2 Forwarding Table -------------------------------IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags ------------------------------------------------------------------------192.168.0.0/24 10 NULL Vlanif30 Direct D/-/L/10.1.1.0/24 20 NULL Vlanif30 192.168.0.1 A/-/-/10.1.2.0/24 20 NULL Vlanif30 192.168.0.1 A/-/-/172.16.0.0/16 10 NULL Vlanif40 Direct A/-/-/Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut, U-Up/Down Bit Set

----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # vlan batch 10 # isis 1 is-level level-1 network-entity 10.0000.0000.0001.00 # interface Vlanif10 ip address 10.1.1.2 255.255.255.0 isis enable 1 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # return

Configuration file of S9300-B


# sysname S9300-B # vlan batch 20 # isis 1 is-level level-1 network-entity 10.0000.0000.0002.00 # interface Vlanif20 ip address 10.1.2.2 255.255.255.0 isis enable 1

Issue 04 (2010-01-08)

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

6-69

6 IS-IS Configuration
# interface GigabitEthernet1/0/1 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # return l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of S9300-C


# sysname S9300-C # vlan batch 10 20 30 # isis 1 network-entity 10.0000.0000.0003.00 # interface Vlanif10 ip address 10.1.1.1 255.255.255.0 isis enable 1 # interface Vlanif20 ip address 10.1.2.1 255.255.255.0 isis enable 1 # interface Vlanif30 ip address 192.168.0.1 255.255.255.0 isis enable 1 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet1/0/3 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # return

Configuration file of S9300-D


# sysname S9300-D # vlan batch 30 40 # isis 1 is-level level-2 network-entity 20.0000.0000.0004.00 # interface Vlanif30 ip address 192.168.0.2 255.255.255.0 isis enable 1 # interface Vlanif40 ip address 172.16.1.1 255.255.0.0 isis enable 1 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # Return

6-70

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

6.15.2 Example for Configuring IS-IS Route Aggregation


Networking Requirements
As shown in Figure 6-4, the networking requirements are as follows:
l l l l

S9300-A, S9300-B, and S9300-C run the IS-IS protocol to communicate with each other. S9300-A belongs to Area 20. S9300-B and S9300-C belong to Area 10. S9300-A is a Level-2 device. S9300-B is a Level-1-2 device. S9300-C is a Level-1 device. The addresses in Area 10 can be summarized as 172.1.0.0/16.

Figure 6-4 Networking diagram for configuring IS-IS route aggregation

network 1
172.1.1.0/24

S9300-A L2
GE1/0/1 GE1/0/2

Area 10
GE1/0/2 GE1/0/1 GE1/0/1 GE1/0/3 GE1/0/4

network 2
172.1.2.0/24

Area 20

S9300-B L1/L2

S9300-C L1

network 3

172.1.3.0/24

S9300 S9300-A S9300-B S9300-B S9300-C S9300-C S9300-C S9300-C

Interface GigabitEthernet1/0/1 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/3 GigabitEthernet1/0/4

VLANIF interface VLANIF 50 VLANIF 10 VLANIF 50 VLANIF 10 VLANIF 20 VLANIF 30 VLANIF 40

IP address 172.2.1.1/24 172.1.4.2/24 172.2.1.2/24 172.1.4.1/24 172.1.1.1/24 172.1.2.1/24 172.1.3.1/24

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3.
Issue 04 (2010-01-08)

Enable IS-IS on each S9300 so that the S9300s can be interconnected. Check the IS-IS routing table of S9300-A. Configure route aggregation on S9300-B.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-71

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

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

ID of the VLAN that each interface belongs to, as shown in Figure 6-4 IP address of each VLANIF interface, as shown in Figure 6-4 System ID, level, and area ID of each S9300: S9300-A: The system ID is 0000.0000.0001; the area ID is 10; the level is Level-2. S9300-B: The system ID is 0000.0000.0002; the area ID is 10; the level is Level-1. S9300-C: The system ID is 0000.0000.0003; the area ID is 10; the level is Level-1.

Procedure
Step 1 Create VLANs and add corresponding interfaces to the VLANs.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] interface GigabitEthernet 1/0/1 [S9300-A-GigabitEthernet1/0/1] port link-type access [S9300-A-GigabitEthernet1/0/1] quit [S9300-A] vlan 50 [S9300-A-vlan50] port GigabitEthernet 1/0/1 [S9300-A-vlan50] quit

The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A, and are not mentioned here. Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 50 [S9300-A-Vlanif50] ip address 172.2.1.1 24 [S9300-A-Vlanif50] quit

The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A, and are not mentioned here. Step 3 Configure the basic IS-IS functions. # Configure S9300-A.
[S9300-A] isis 1 [S9300-A-isis-1] is-level level-2 [S9300-A-isis-1] network-entity 20.0000.0000.0001.00 [S9300-A-isis-1] quit [S9300-A] interface vlanif 50 [S9300-A-Vlanif50] isis enable 1 [S9300-A-Vlanif50] quit

# Configure S9300-B.
[S9300-B] isis 1 [S9300-B-isis-1] network-entity 10.0000.0000.0002.00 [S9300-B-isis-1] quit [S9300-B] interface vlanif 10 [S9300-B-Vlanif10] isis enable 1 [S9300-B-Vlanif10] quit [S9300-B] interface vlanif 50 [S9300-B-Vlanif50] isis enable 1 [S9300-B-Vlanif50] quit

# Configure S9300-C.
[S9300-C] isis 1 [S9300-C-isis-1] is-level level-1

6-72

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


[S9300-C-isis-1] network-entity 10.0000.0000.0003.00 [S9300-C-isis-1] quit [S9300-C] interface vlanif 10 [S9300-C-Vlanif10] isis enable 1 [S9300-C-Vlanif10] quit

6 IS-IS Configuration

The configurations of the VLANIF 20, VLANIF 30, and VLANIF 40 interfaces are similar to the configuration of VLANIF 10, and are not mentioned here. Step 4 Check the IS-IS routing table of S9300-A.
[S9300-A]display isis route Route information for ISIS(1) ----------------------------ISIS(1) Level-2 Forwarding Table -------------------------------IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags ------------------------------------------------------------------------172.1.1.0/24 20 NULL Vlanif50 172.2.1.2 A/-/-/172.1.2.0/24 20 NULL Vlanif50 172.2.1.2 A/-/-/172.1.3.0/24 20 NULL Vlanif50 172.2.1.2 A/-/-/172.1.4.0/24 20 NULL Vlanif50 172.2.1.2 A/-/-/172.2.1.0/24 10 NULL Vlanif50 Direct D/-/L/Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut, U-Up/Down Bit Set

Step 5 Configure route aggregation on S9300-B. # Aggregate 172.1.1.0/24, 172.1.2.0/24, 172.1.3.0./24, and 172.1.4.0/24 as 172.1.0.0/16 on S9300-B.
[S9300-B] isis 1 [S9300-B-isis-1] summary 172.1.0.0 255.255.0.0 level-1-2 [S9300-B-isis-1] quit

Step 6 Verify the configuration. # Check the routing table of S9300-A, and you can find that 172.1.1.0/24, 172.1.2.0/24, 172.1.3.0./24 and 172.1.4.0/24 are aggregated as 172.1.0.0/16.
[S9300-A] display isis route Route information for ISIS(1) ----------------------------ISIS(1) Level-2 Forwarding Table -------------------------------IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags ------------------------------------------------------------------------172.1.0.0/16 20 NULL Vlanif50 172.2.1.2 A/-/-/172.2.1.0/24 10 NULL Vlanif50 Direct D/-/L/Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut, U-Up/Down Bit Set

----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A #

Issue 04 (2010-01-08)

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

6-73

6 IS-IS Configuration
vlan batch 50 # isis 1 is-level level-2 network-entity 20.0000.0000.0001.00 # interface Vlanif50 ip address 172.2.1.1 255.255.255.0 isis enable 1 # interface GigabitEthernet1/0/1 port link-type access port default vlan 50 # return l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of S9300-B


# sysname S9300-B # vlan batch 10 50 # isis 1 network-entity 10.0000.0000.0002.00 summary 172.1.0.0 255.255.0.0 level-1-2 # interface Vlanif10 ip address 172.1.4.2 255.255.255.0 isis enable 1 # interface Vlanif50 ip address 172.2.1.2 255.255.255.0 isis enable 1 # interface GigabitEthernet1/0/1 port link-type access port default vlan 10 # interface GigabitEthernet1/0/2 port link-type access port default vlan 50 # return

Configuration file of S9300-C


# sysname S9300-C # vlan batch 10 20 30 40 # isis 1 is-level level-1 network-entity 10.0000.0000.0003.00 # interface Vlanif10 ip address 172.1.4.1 255.255.255.0 isis enable 1 # interface Vlanif20 ip address 172.1.1.1 255.255.255.0 isis enable 1 # interface Vlanif30 ip address 172.1.2.1 255.255.255.0 isis enable 1 # interface Vlanif40 ip address 172.1.3.1 255.255.255.0 isis enable 1 #

6-74

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


interface GigabitEthernet1/0/1 port link-type access port default vlan 10 # interface GigabitEthernet1/0/2 port link-type access port default vlan 20 # interface GigabitEthernet1/0/3 port link-type access port default vlan 30 # interface GigabitEthernet1/0/4 port link-type access port default vlan 40 # return

6 IS-IS Configuration

6.15.3 Example for Configuring the DIS Election


Networking Requirements
As shown in Figure 6-5, the networking requirements are as follows:
l

S9300-A, S9300-B, S9300-C, and S9300-D run the IS-IS protocol to communicate with each other. S9300-A, S9300-B, S9300-C, and S9300-D belong to Area 10. S9300-A and S9300-B are Level-1-2 devices. S9300-C is a Level-1 device. S9300-D is a Level-2 device. You need to change the DIS priority of the related interface to configure S9300-A to a Level-1-2 DIS.

l l

Figure 6-5 Networking diagram for configuring the DIS election


S9300-A L1/L2 S9300-B L1/L2

GE1/0/1

GE1/0/1

GE1/0/1

GE1/0/1

S9300-C L1
S9300 S9300-A S9300-B S9300-C S9300-D Interface GigabitEthernet1/0/1 GigabitEthernet1/0/1 GigabitEthernet1/0/1 GigabitEthernet1/0/1

S9300-D L2
VLANIF interface VLANIF 10 VLANIF 10 VLANIF 10 VLANIF 10 IP address 10.1.1.1/24 10.1.1.2/24 10.1.1.3/24 10.1.1.4/24

Issue 04 (2010-01-08)

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

6-75

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Enable IS-IS on each S9300 so that the S9300s can be interconnected. Check information about the IS-IS interface on each S9300 with the default priority. Configure the DIS priority on S9300-A.

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

ID of the VLAN that each interface belongs to, as shown in Figure 6-5 IP address of each VLANIF interface, as shown in Figure 6-5 System ID, level, and area ID of each S9300:

S9300-A: The system ID is 0000.0000.0001; the area ID is 10; the DIS priority is 100; the level is Level-1-2. S9300-B: The system ID is 0000.0000.0002; the area ID is 10; the level is Level-1. S9300-C: The system ID is 0000.0000.0003; the area ID is 10; the level is Level-1. S9300-D: The system ID is 0000.0000.0004; the area ID is 10; the level is Level-2.

Procedure
Step 1 Create VLANs and add corresponding interfaces to the VLANs.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] vlan 10 S9300-A-vlan10] quit [S9300-A] interface GigabitEthernet 1/0/1 [S9300-A-GigabitEthernet1/0/1] port hybrid pvid vlan 10 [S9300-A-GigabitEthernet1/0/1] port hybrid untagged vlan 10 [S9300-A-GigabitEthernet1/0/1] quit

The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of S9300-A, and are not mentioned here. Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 50 [S9300-A-Vlanif10] ip address 10.1.1.1 24 [S9300-A-Vlanif10] quit

The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of S9300-A, and are not mentioned here. Step 3 View the MAC address of the VLANIF 10 interface on each S9300. # View the MAC address of the VLANIF 10 interface on S9300-A.
INTERFACE VPN-INSTANCE VLAN/CEVLAN PVC -----------------------------------------------------------------------------10.1.1.1 00e0-fc10-afec I Vlanif10 -----------------------------------------------------------------------------Total:1 Dynamic:0 Static:0 Interface:1 [S9300-A] display arp interface vlanif 10 IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE

# View the MAC address of the VLANIF 10 interface on S9300-B.


[S9300-B] display arp interface vlanif 10 IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-INSTANCE

6-76

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

VLAN/CEVLAN PVC -----------------------------------------------------------------------------10.1.1.2 00e0-fccd-acdf I Vlanif10 -----------------------------------------------------------------------------Total:1 Dynamic:0 Static:0 Interface:1

# View the MAC address of the VLANIF 10 interface on S9300-C.


INTERFACE VPN-INSTANCE VLAN/CEVLAN PVC -----------------------------------------------------------------------------10.1.1.3 00e0-fc50-25fe I Vlanif10 -----------------------------------------------------------------------------Total:1 Dynamic:0 Static:0 Interface:1 [S9300-C] display arp interface vlanif 10 IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE

# View the MAC address of the VLANIF 10 interface on S9300-D.


INTERFACE VPN-INSTANCE VLAN/CEVLAN PVC -----------------------------------------------------------------------------10.1.1.4 00e0-fcfd-305c I Vlanif10 -----------------------------------------------------------------------------Total:1 Dynamic:0 Static:0 Interface:1 [S9300-D] display arp interface vlanif 10 IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE

Step 4 Configure the basic IS-IS functions. # Configure S9300-A.


[S9300-A] isis 1 [S9300-A-isis-1] network-entity 10.0000.0000.0001.00 [S9300-A-isis-1] quit [S9300-A] interface vlanif 10 [S9300-A-Vlanif10] isis enable 1 [S9300-A-Vlanif10] quit

# Configure S9300-B.
[S9300-B] isis 1 [S9300-B-isis-1] network-entity 10.0000.0000.0002.00 [S9300-B-isis-1] quit [S9300-B] interface vlanif 10 [S9300-B-Vlanif10] isis enable 1 [S9300-B-Vlanif10] quit

# Configure S9300-C.
[S9300-C] isis 1 [S9300-C-isis-1] network-entity 10.0000.0000.0003.00 [S9300-C-isis-1] is-level level-1 [S9300-C-isis-1] quit [S9300-C] interface vlanif 10 [S9300-C-Vlanif10] isis enable 1 [S9300-C-Vlanif10] quit

# Configure S9300-D.
[S9300-D] isis 1 [S9300-D-isis-1] network-entity 10.0000.0000.0004.00 [S9300-D-isis-1] is-level level-2 [S9300-D-isis-1] quit [S9300-D] interface vlanif 10 [S9300-D-Vlanif10] isis enable 1 [S9300-D-Vlanif10] quit

# View information about the IS-IS neighbors of S9300-A.


[S9300-A] display isis peer Peer information for ISIS(1) ---------------------------System Id Interface Circuit Id State HoldTime PRI 0000.0000.0002 Vlanif10 0000.0000.0002.01 Up 9s 0000.0000.0003 Vlanif10 0000.0000.0002.01 Up 27s

Type L1(L1L2) L1 64 64

Issue 04 (2010-01-08)

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

6-77

6 IS-IS Configuration
0000.0000.0002 0000.0000.0004 Vlanif10 Vlanif10 0000.0000.0004.01 0000.0000.0004.01

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


Up Up 28s 8s L2(L1L2) L2 64 64

# View information about the IS-IS interface of S9300-A.


[S9300-A] display isis interface Interface information for ISIS(1) --------------------------------IPV4.State IPV6.State Up Down

Interface Vlanif10

Id 001

MTU Type DR 1497 L1/L2 No/No

# View information about the IS-IS interface of S9300-B.


[S9300-B] display isis interface Interface information for ISIS(1) --------------------------------IPV4.State IPV6.State Up Down

Interface Vlanif10

Id 001

MTU Type DR 1497 L1/L2 Yes/No

# View information about the IS-IS interface of S9300-D.


[S9300-D] display isis interface Interface information for ISIS(1) --------------------------------IPV4.State IPV6.State Up Down

Interface Vlanif10
NOTE

Id 001

MTU Type DR 1497 L1/L2 No/Yes

When the default DIS priority is used, the interface on S9300-B has the greatest MAC address among all the interfaces on the Level-1 S9300s. Therefore, S9300-B is elected as the Level-1 DIS. The interface on S9300-D has the greatest MAC address among all the interfaces on the Level-2 S9300s. Therefore, S9300D is elected as the Level-2 DIS. The Level-1 pseudonode is 0000.0000.0002.01. The Level-2 pseudonode is 0000.0000.0004.01.

Step 5 Set the DIS priority of S9300-A.


[S9300-A] interface vlanif 10 [S9300-A-Vlanif10] isis dis-priority 100 [S9300-A-Vlanif10] quit

# View information about the IS-IS neighbors of S9300-A.


[S9300-A] display isis peer Peer information for ISIS(1) ---------------------------Interface Circuit Id Vlanif10 Vlanif10 Vlanif10 Vlanif10 0000.0000.0001.01 0000.0000.0001.01 0000.0000.0001.01 0000.0000.0001.01 Up Up Up Up

System Id PRI 0000.0000.0002 0000.0000.0003 0000.0000.0002 0000.0000.0004

State HoldTime Type 21s 27s 28s 30s L1(L1L2) L1 L2(L1L2) L2 64 64 64 64

Step 6 Verify the configuration. # View information about the IS-IS interface of S9300-A.
[S9300-A] display isis interface Interface information for ISIS(1) --------------------------------IPV4.State IPV6.State Up Down

Interface Vlanif10

Id 001

MTU 1497

Type DR L1/L2 Yes/Yes

As shown in the output information, after the DIS priority of the IS-IS interface is changed, S9300-A immediately becomes a Level-1 and Level-2 DIS and its pseudonode is 0000.0000.0001.01. # View information about the IS-IS neighbors and IS-IS interfaces on S9300-B.
6-78 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


[S9300-B] display isis peer Peer information for ISIS(1) ---------------------------Interface Circuit Id 0000.0000.0001.01 0000.0000.0001.01 0000.0000.0001.01 0000.0000.0001.01

6 IS-IS Configuration

System Id PRI 0000.0000.0001 Vlanif10 100 0000.0000.0003 Vlanif10 64 0000.0000.0001 Vlanif10 100 0000.0000.0004 Vlanif10 64 [S9300-B] display isis interface

State HoldTime Type Up Up Up Up 7s 25s 7s 25s L1(L1L2) L1 L2(L1L2) L2

Interface Vlanif10

Id 001

Interface information for ISIS(1) --------------------------------IPV4.State IPV6.State Up Down

MTU 1497

Type DR L1/L2 No/No

# View information about the IS-IS neighbors and IS-IS interfaces on S9300-D.
[S9300-D] display isis peer Peer information for ISIS(1) ---------------------------System Id Interface Circuit Id State HoldTime Type 0000.0000.0001 Vlanif10 0000.0000.0001.01 Up 9s L2 0000.0000.0002 Vlanif10 0000.0000.0001.01 Up 28s L2 [S9300-D] display isis interface Interface information for ISIS(1) --------------------------------IPV4.State IPV6.State Up Down

PRI 100 64

Interface Vlanif10

Id 001

MTU 1497

Type DR L1/L2 No/No

----End

Configuration Files
l

Configuration file of S9300-A


# # sysname S9300-A # vlan batch 10 # isis 1 network-entity 10.0000.0000.0001.00 # interface Vlanif10 ip address 10.1.1.1 255.255.255.0 isis enable 1 isis dis-priority 100 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # return

Configuration file of S9300-B


# # sysname S9300-B # vlan batch 10 # isis 1

Issue 04 (2010-01-08)

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

6-79

6 IS-IS Configuration
network-entity 10.0000.0000.0002.00 # interface Vlanif10 ip address 10.1.1.2 255.255.255.0 isis enable 1 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # return l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of S9300-C


# sysname S9300-C # vlan batch 10 # isis 1 is-level level-1 network-entity 10.0000.0000.0003.00 # interface Vlanif10 ip address 10.1.1.3 255.255.255.0 isis enable 1 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # return

Configuration file of S9300-D


# sysname S9300-D # vlan batch 10 # isis 1 is-level level-2 network-entity 10.0000.0000.0004.00 # interface Vlanif10 ip address 10.1.1.4 255.255.255.0 isis enable 1 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # return

6.15.4 Example for Configuring IS-IS Load Balancing


Networking Requirements
As shown in Figure 6-6, the networking requirements are as follows:
l l l

S9300-A, S9300-B, S9300-C, and S9300-D run IS-IS to communicate with each other. S9300-A, S9300-B, S9300-C, and S9300-D are Level-2 devices in Area 10. Load balancing needs to be configured so that the traffic of S9300-A is sent to S9300-D through S9300-B and S9300-C.

6-80

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

Figure 6-6 Networking diagram for configuring IS-IS load balancing


GE1/0/1 GE1/0/2

GE1/0/1 GE1/0/3

S9300-B L2

S9300-A S9300-D L2 L2 Area 10 GE1/0/2


GE1/0/1 GE1/0/2

GE1/0/1 GE1/0/3 GE1/0/2

S9300-C L2 S9300 S9300-A S9300-A S9300-A S9300-B S9300-B S9300-C S9300-C S9300-D S9300-D S9300-D Interface GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/3 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/3 VLANIF interface VLANIF 10 VLANIF 20 VLANIF 50 VLANIF 10 VLANIF 30 VLANIF 20 VLANIF 40 VLANIF 30 VLANIF 40 VLANIF 60 IP address 10.1.1.1/24 10.1.2.1/24 172.16.1.1/24 10.1.1.2/24 192.168.0.1/24 10.1.2.2./24 192.168.1.1/24 192.168.0.2/24 192.168.1.2/24 172.17.1.1/24

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. Enable IS-IS on each S9300 so that the S9300s can be interconnected. Set the number of equal-cost routes to 1 and check the routing table. Configure load balancing on S9300-A and check the routing table. (Optional) Set the weight of equal-cost routes on S9300-A.

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

ID of the VLAN that each interface belongs to, as shown in Figure 6-6 IP address of each VLANIF interface, as shown in Figure 6-6 System ID, level, and area ID of each S9300:

S9300-A: The system ID is 0000.0000.0001; the area ID is 10; the level is Level-2.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-81

Issue 04 (2010-01-08)

6 IS-IS Configuration
l l l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

S9300-B: The system ID is 0000.0000.0002; the area ID is 10; the level is Level-2. S9300-C: The system ID is 0000.0000.0003; the area ID is 10; the level is Level-2. S9300-D: The system ID is 0000.0000.0004; the area ID is 10; the level is Level-2.

Number of routes for load balancing on S9300-A: 1 Load balancing mode on S9300-A Weight of the equal-cost route with S9300-C as the next hop: 1

Procedure
Step 1 Configure VLANs that the related interfaces belong to.
<Quidway> system-view [Quidway] sysname S9300-A [Quidway] vlan batch 10 20 50 [S9300-A] interface GigabitEthernet [S9300-A-GigabitEthernet1/0/1] port [S9300-A-GigabitEthernet1/0/1] port [S9300-A-GigabitEthernet1/0/1] quit [S9300-A] interface GigabitEthernet [S9300-A-GigabitEthernet1/0/2] port [S9300-A-GigabitEthernet1/0/2] port [S9300-A-GigabitEthernet1/0/2] quit [S9300-A] interface GigabitEthernet [S9300-A-GigabitEthernet1/0/3] port [S9300-A-GigabitEthernet1/0/3] port [S9300-A-GigabitEthernet1/0/3] quit

1/0/1 hybrid pvid vlan 10 hybrid untagged vlan 10 1/0/2 hybrid pvid vlan 20 hybrid untagged vlan 20 1/0/3 hybrid pvid vlan 50 hybrid untagged vlan 50

The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of S9300-A, and are not mentioned here. Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ip address 10.1.1.1 24 [S9300-A-Vlanif10] quit [S9300-A] interface vlanif 20 [S9300-A-Vlanif20] ip address 10.1.2.1 24 [S9300-A-Vlanif20] quit [S9300-A] interface vlanif 50 [S9300-A-Vlanif50] ip address 172.16.1.1 24 [S9300-A-Vlanif50] quit

The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of S9300-A, and are not mentioned here. Step 3 Configure the basic function of IS-IS. The configuration procedure is not mentioned here. Step 4 Set the number of equal-cost routes for load balancing to 1 on S9300-A.
[S9300-A] isis 1 [S9300-A-isis-1] maximum load-balancing 1 [S9300-A-isis-1] quit

# View the routing table of S9300-A.


[S9300-A] display isis route Route information for ISIS(1) ----------------------------ISIS(1) Level-2 Forwarding Table -------------------------------IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags ------------------------------------------------------------------------192.168.1.0/24 20 NULL Vlanif20 10.1.2.2 A/-/-/-

6-82

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


10.1.1.0/24 172.16.1.0/24 172.17.1.0/24 10.1.2.0/24 192.168.0.0/24 10 10 30 10 20 NULL NULL NULL NULL NULL Vlanif10 Vlanif50 Vlanif10 Vlanif20 Vlanif10

6 IS-IS Configuration
Direct Direct 10.1.1.2 Direct 10.1.1.2 D/-/L/D/-/L/A/-/-/D/-/L/A/-/-/-

Flags: D-Direct, R-Added to RM, L-Advertised in LSPs, U-Up/Down Bit Set

As shown in the routing table, when the maximum number of equal-cost routes for load balancing is set to 1, IS-IS selects 10.1.1.2 as the next hop to the destination network 172.17.1.0. This is because S9300-B has a smaller system ID. Step 5 Restore the default number of equal-cost routes for load balancing on S9300-A.
[S9300-A] isis 1 [S9300-A-isis-1] undo maximum load-balancing [S9300-A-isis-1] quit

# View the routing table of S9300-A.


[S9300-A] display isis route Route information for ISIS(1) ----------------------------ISIS(1) Level-2 Forwarding Table -------------------------------IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags ------------------------------------------------------------------------192.168.1.0/24 20 NULL Vlanif20 10.1.2.2 A/-/-/10.1.1.0/24 10 NULL Vlanif10 Direct D/-/L/172.16.1.0/24 10 NULL Vlanif50 Direct D/-/L/172.17.1.0/24 30 NULL Vlanif10 10.1.1.2 A/-/-/Vlanif20 10.1.2.2 10.1.2.0/24 10 NULL Vlanif20 Direct D/-/L/192.168.0.0/24 20 NULL Vlanif10 10.1.1.2 A/-/-/Flags: D-Direct, R-Added to RM, L-Advertised in LSPs, U-Up/Down Bit Set

As shown in the routing table, the number of equal-cost routes for load balancing is restored to the default value 6. Both the next hops of S9300-A, 10.1.1.2 (S9300-B) and 10.1.2.2 (S9300-C) now become valid. Step 6 (Optional) Set the preference for equal-cost routes on S9300-A.
[S9300-A] isis [S9300-A-isis-1] nexthop 10.1.2.2 weight 1 [S9300-A-isis-1] quit

Step 7 Verify the configuration. # View the routing table of S9300-A.


[S9300-A] display isis route Route information for ISIS(1) ----------------------------ISIS(1) Level-2 Forwarding Table -------------------------------IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags -------------------------------------------------------------------------------192.168.1.0/24 20 NULL Vlanif20 10.1.2.2 A/-/-/10.1.1.0/24 10 NULL Vlanif10 Direct D/-/L/172.16.1.0/24 10 NULL Vlanif50 Direct D/-/L/172.17.1.0/24 30 NULL Vlanif20 10.1.2.2 A/-/-/10.1.2.0/24 10 NULL Vlanif20 Direct D/-/L/192.168.0.0/24 20 NULL Vlanif10 10.1.1.2 A/-/-/Flags: D-Direct, R-Added to RM, L-Advertised in LSPs, U-Up/Down Bit Set

Issue 04 (2010-01-08)

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

6-83

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

As shown in the routing table, the preference of the next hop 10.1.2.2 (S9300-C) with the weight as 1, is higher than that of 10.1.1.2 (S9300-B), after the weight is set for equal-cost routes. Therefore, IS-IS selects route with the next hop 10.1.2.2 as the optimal route. ----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # vlan batch 10 20 50 # isis 1 is-level level-2 network-entity 10.0000.0000.0001.00 nexthop 10.1.2.2 weight 1 # interface Vlanif10 ip address 10.1.1.1 255.255.255.0 isis enable 1 # interface Vlanif20 ip address 10.1.2.1 255.255.255.0 isis enable 1 # interface Vlanif50 ip address 172.16.1.1 255.255.255.0 isis enable 1 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet1/0/3 port hybrid pvid vlan 50 port hybrid untagged vlan 50 # return

Configuration file of S9300-B


# sysname S9300-B # vlan batch 10 30 # isis 1 is-level level-2 network-entity 10.0000.0000.0002.00 # interface Vlanif10 ip address 10.1.1.2 255.255.255.0 isis enable 1 # interface Vlanif30 ip address 192.168.0.1 255.255.255.0 isis enable 1 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2

6-84

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


port hybrid pvid vlan 30 port hybrid untagged vlan 30 # return l

6 IS-IS Configuration

Configuration file of S9300-C


# sysname S9300-C # vlan batch 20 40 # isis 1 is-level level-2 network-entity 10.0000.0000.0003.00 # interface Vlanif20 ip address 10.1.2.2 255.255.255.0 isis enable 1 # interface Vlanif40 ip address 192.168.1.1 255.255.255.0 isis enable 1 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # return

Configuration file of S9300-D


# sysname S9300-D # vlan batch 30 40 60 # isis 1 is-level level-2 network-entity 10.0000.0000.0004.00 # interface Vlanif30 ip address 192.168.0.2 255.255.255.0 isis enable 1 # interface Vlanif40 ip address 192.168.1.2 255.255.255.0 isis enable 1 # interface Vlanif60 ip address 172.17.1.1 255.255.255.0 isis enable 1 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # interface GigabitEthernet1/0/3 port hybrid pvid vlan 60 port hybrid untagged vlan 60 # return

Issue 04 (2010-01-08)

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

6-85

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6.15.5 Example for Configuring IS-IS GR


Networking Requirements
As shown in Figure 6-7, the networking requirement are as follows: S9300-A, S9300-A and S9300-C belong to the same autonomous system . They run the IS-IS protocol to implement interworking and provide the GR mechanism. After S9300-A, S9300-B, and S9300-C set up IS-IS adjacencies with each other, they start to exchange routing information. When IS-IS is restarted on S9300-A, S9300-A resends connection requests to neighbors to synchronize the LSDB. Figure 6-7 Networking diagram of IS-IS GR configuration
S9300-A L1
GE1/0/1 GE1/0/1

S9300-C L1/L2
GE1/0/2

S9300-B L2
GE1/0/1

S9300 S9300-A S9300-B S9300-C S9300-C

Interface GigabitEthernet1/0/1 GigabitEthernet1/0/1 GigabitEthernet1/0/1 GigabitEthernet1/0/2

VLANIF interface VLANIF 10 VLANIF 20 VLANIF 10 VLANIF 20

IP address 100.1.1.1/24 100.2.1.2/24 100.1.1.2/24 100.2.1.1/24

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. Enable IS-IS on each S9300 so that the S9300s can be interconnected. Configure GR in the IS-IS view on each S9300 and configure the same interval for the restart.

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

ID of the VLAN that each interface belongs to, as shown in Figure 6-7 IP address of each VLANIF interface, as shown in Figure 6-7 System ID, level, and area ID of each S9300:

S9300-A: The system ID is 0000.0000.0001; the area ID is 10; the level is Level-1. S9300-B: The system ID is 0000.0000.0002; the area ID is 10; the level is Level-2. S9300-C: The system ID is 0000.0000.0003; the area ID is 10; the level is Level-1-2.

Restart interval
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

6-86

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

Procedure
Step 1 Configure VLANs that the related interfaces belong to.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] vlan 10 [S9300-A-Vlan10] quit [S9300-A] interface GigabitEthernet 1/0/1 [S9300-A-GigabitEthernet1/0/1] port hybrid pvid vlan 10 [S9300-A-GigabitEthernet1/0/1] port hybrid untagged vlan 10 [S9300-A-GigabitEthernet1/0/1] quit

The configurations of S9300-B and S9300 are similar to the configuration of S9300-A, and are not mentioned here. Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif10 [S9300-A-Vlanif10] ip address 100.1.1.1 24 [S9300-A-Vlanif10] quit

The configurations of S9300-B and S9300 are similar to the configuration of S9300-A, and are not mentioned here. Step 3 Configure the basic function of IS-IS. The configuration procedure is not mentioned here. Step 4 Configure IS-IS GR. # Enable IS-IS GR on S9300-A and set the restart interval. The configurations on S9300-B and S9300-C are the same as the configurations on S9300-A. S9300-A is taken as an example here.
[S9300-A] isis 1 [S9300-A-isis-1] graceful-restart [S9300-A-isis-1] graceful-restart interval 150 [S9300-A-isis-1] quit

Step 5 Verify the configuration. # Run the display fib command on S9300-A to view the Forwarding Information Base (FIB) table.
<S9300-A> display fib FIB Table: Total number of Routes : 5 Destination/Mask 127.0.0.1/32 127.0.0.0/8 100.1.1.1/32 100.1.1.0/24 100.2.1.0/24 Nexthop 127.0.0.1 127.0.0.1 127.0.0.1 100.1.1.1 100.1.1.2 Flag HU U HU U DGU TimeStamp t[21] t[21] t[20678] t[20678] t[79388] Interface InLoop0 InLoop0 InLoop0 Vlanif10 Vlanif10 TunnelID 0x0 0x0 0x0 0x0 0x0

# Reset the IS-IS process by using the GR method on S9300-A.


<S9300-A> reset isis all
NOTE

The S9300 restarts an IS-IS process in GR mode only when GR is enabled for the IS-IS process.

# Run the display fib command on S9300-A and view the FIB table to check whether GR works normally. If GR works normally, the FIB table does not change and the forwarding service is not affected when S9300-A restarts the IS-IS process in GR mode.
<S9300-A> display fib FIB Table: Total number of Routes : 5 Destination/Mask Nexthop Flag TimeStamp Interface TunnelID

Issue 04 (2010-01-08)

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

6-87

6 IS-IS Configuration
127.0.0.1/32 127.0.0.0/8 100.1.1.1/32 100.1.1.0/24 100.2.1.0/24 127.0.0.1 127.0.0.1 127.0.0.1 100.1.1.1 100.1.1.2 HU U HU U DGU t[21] t[21] t[20678] t[20678] t[79388]

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


InLoop0 InLoop0 InLoop0 Vlanif10 Vlanif10 0x0 0x0 0x0 0x0 0x0

As shown in the display, the FIB table on S9300-A does not change and the forwarding service is not affected. # Disable IS-IS GR on S9300-A.
[S9300-A] isis 1 [S9300-A-isis-1] undo graceful-restart [S9300-A-isis-1] quit

# Reset the IS-IS process on S9300-A.


<S9300-A> reset isis all

# Run the display fib command on S9300-A to view the FIB table.
<S9300-A> display fib FIB Table: Total number of Routes : 4 Destination/Mask 127.0.0.1/32 127.0.0.0/8 100.1.1.1/32 100.1.1.0/24 Nexthop 127.0.0.1 127.0.0.1 127.0.0.1 100.1.1.1 Flag HU U HU U TimeStamp t[21] t[21] t[20678] t[20678] Interface InLoop0 InLoop0 InLoop0 Vlanif10 TunnelID 0x0 0x0 0x0 0x0

As shown in the display, the FIB table on S9300-A changes and the forwarding service is affected. ----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # vlan batch 10 # isis 1 graceful-restart graceful-restart interval 150 is-level level-1 network-entity 10.0000.0000.0001.00 # interface Vlanif10 ip address 100.1.1.1 255.255.255.0 isis enable 1 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # return

Configuration file of S9300-B


# sysname S9300-B # vlan batch 20 # isis 1

6-88

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


graceful-restart graceful-restart interval 150 is-level level-2 network-entity 10.0000.0000.0002.00 # interface Vlanif20 ip address 100.2.1.2 255.255.255.0 isis enable 1 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # return l

6 IS-IS Configuration

Configuration file of S9300-C


# sysname S9300-C # vlan batch 10 20 # isis 1 graceful-restart graceful-restart interval 150 network-entity 10.0000.0000.0003.00 # interface Vlanif10 ip address 100.1.1.2 255.255.255.0 isis enable 1 # interface Vlanif20 ip address 100.2.1.1 255.255.255.0 isis enable 1 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # return

6.15.6 Example for Configuring BFD for IS-IS


Networking Requirements
As shown in Figure 6-8, the networking requirement are as follows:
l l l

S9300-A, S9300-B, S9300-C run IS-IS to communicate with each other. BFD for IS-IS is enabled on S9300-A, S9300-B, and S9300-C. Service traffic is transmitted on the main link S9300-AS9300-B. Link S9300-A S9300-CS9300-B is a backup link. BFD is configured on the interfaces between S9300-A and S9300-B. When a fault occurs on the link between the S9300-A and S9300-B, BFD can quickly detect the fault and notify IS-IS of the fault. Then, the service flow is transmitted through the backup link.

Issue 04 (2010-01-08)

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

6-89

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Figure 6-8 Networking diagram for configuring BFD for IS-IS

S9300-A
GE2/0/0 GE2/0/0 GE1/0/0

S9300-B
GE3/0/0 GE1/0/0

GE1/0/0

GE2/0/0

S9300-C

S9300 S9300-A S9300-A S9300-B S9300-B S9300-B S9300-C S9300-C

Interface GigabitEthernet1/0/0 GigabitEthernet2/0/0 GigabitEthernet1/0/0 GigabitEthernet2/0/0 GigabitEthernet3/0/0 GigabitEthernet1/0/0 GigabitEthernet2/0/0

VLANIF interface VLANIF 10 VLANIF 20 VLANIF 30 VLANIF 20 VLANIF 40 VLANIF 10 VLANIF 30

IP address 1.1.1.1/24 3.3.3.1/24 2.2.2.2/24 3.3.3.2/24 172.16.1.1/24 1.1.1.2/24 2.2.2.1/24

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. 5. Enable IS-IS on each S9300 to ensure the reachability of the routes. Set the cost of IS-IS interfaces to control the route selection. Enable global BFD. Enable the BFD for the IS-IS process on S9300-A, S9300-A, and S9300-C. Enable BFD on interfaces of S9300-A and S9300-B.

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

Process ID of the IS-IS protocol Area IDs of S9300-A, S9300-B, and S9300-C Interface cost of S9300-A and S9300-A Number and type of the BFD-enabled interfaces on S9300-A, S9300-B, and S9300-C
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

6-90

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


l

6 IS-IS Configuration

Minimum interval for sending the BFD packets, the minimum interval for receiving the BFD packets, and the local detection time multiplier on S9300-A and S9300-B

Procedure
Step 1 Configure IP addresses of all interfaces. The configuration procedure is not mentioned here. Step 2 Configure the basic IS-IS functions. # Configure S9300-A.
[S9300-A] isis [S9300-A-isis-1] is-level level-2 [S9300-A-isis-1] network-entity 10.0000.0000.0001.00 [S9300-A-isis-1] quit [S9300-A] interface vlanif 10 [S9300-A-Vlanif10] isis enable 1 [S9300-A-Vlanif10] quit [S9300-A] interface vlanif 20 [S9300-A-Vlanif20] isis enable 1 [S9300-A-Vlanif20] quit

# Configure S9300-B.
[S9300-B] isis [S9300-B-isis-1] is-level level-2 [S9300-B-isis-1] network-entity 10.0000.0000.0002.00 [S9300-B-isis-1] quit [S9300-B] interface vlanif 30 [S9300-B-Vlanif30] isis enable 1 [S9300-B-Vlanif30] quit [S9300-B] interface vlanif 20 [S9300-B-Vlanif20] isis enable 1 [S9300-B-Vlanif20] quit [S9300-B] interface vlanif 40 [S9300-B-Vlanif40] isis enable 1 [S9300-B-Vlanif40] quit

# Configure S9300-C.
[S9300-C] isis [S9300-C-isis-1] is-level level-2 [S9300-C-isis-1] network-entity 10.0000.0000.0003.00 [S9300-C-isis-1] quit [S9300-C] interface vlanif 10 [S9300-C-Vlanif10] isis enable 1 [S9300-C-Vlanif10] quit [S9300-C] interface vlanif 30 [S9300-C-Vlanif30] isis enable 1 [S9300-C-Vlanif30] quit

# After the preceding configurations are complete, run the display isis peer command. You can view the neighbor relationship set up between S9300-A and S9300-B, and the neighbor relationship between S9300-A and S9300-C. Take S9300-A for example. The display is as follows:
[S9300-A] display isis peer Peer information for ISIS(1) ---------------------------System Id interface circuit Id State HoldTime Type 0000.0000.0002 Vlanif20 0000.0000.0002.01 Up 9s L2 0000.0000.0003 Vlanif10 0000.0000.0001.02 Up 21s L2 Total Peer(s): 2

PRI 64 64

# S9300s learn routes from each other. Take S9300-A for example. The routing table is as follows:
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 6-91

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

[S9300-A] display ip routing-table Route Flags: R - relied, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destin-Ations : 8 Routes : 9 Destin-Ation/Mask 1.1.1.0/24 1.1.1.1/32 2.2.2.0/24 Proto Pre Cost Direct 0 0 Direct 0 0 ISIS 15 20 ISIS 15 20 3.3.3.0/24 Direct 0 0 3.3.3.1/32 Direct 0 0 127.0.0.0/8 Direct 0 0 127.0.0.1/32 Direct 0 0 172.16.1.0/24 ISIS 15 20 FlAgs NextHop D 1.1.1.1 D 127.0.0.1 D 1.1.1.2 D 3.3.3.2 D 3.3.3.1 D 127.0.0.1 D 127.0.0.1 D 127.0.0.1 D 3.3.3.2 interface Vlanif10 InLoopback0 Vlanif10 Vlanif20 Vlanif20 InLoopback0 InLoopback0 InLoopback0 Vlanif20

As shown in the routing table, the next hop address of the route to 172.16.1.0/24 is 3.3.3.2 and service flows are transferred on the main link S9300-AS9300-B. Step 3 Set the interface cost. # Configure S9300-A.
[S9300-A] interface vlanif 20 [S9300-A-Vlanif20] isis cost 5 [S9300-A-Vlanif20] quit

# Configure S9300-B.
[S9300-B] interface vlanif 20 [S9300-B-Vlanif20] isis cost 5 [S9300-B-Vlanif20] quit

Step 4 Configure BFD for the IS-IS process. # Enable BFD for the IS-IS process on S9300-A.
[S9300-A] bfd [S9300-A-bfd] quit [S9300-A] isis [S9300-A-isis-1] bfd all-interfaces enable [S9300-A-isis-1] quit

# Enable BFD for the IS-IS process on S9300-B.


[S9300-B] bfd [S9300-B-bfd] quit [S9300-B] isis [S9300-B-isis-1] bfd all-interfaces enable [S9300-B-isis-1] quit

# Enable BFD for the IS-IS process on S9300-C.


[S9300-C] bfd [S9300-C-bfd] quit [S9300-C] isis [S9300-C-isis-1] bfd all-interfaces enable [S9300-C-isis-1] quit

# Run the display isis bfd session all command on S9300-A, S9300-B, or S9300-C. You can see that the BFD state is Up. Take S9300-A for example. The display is as follows:
[S9300-A] display isis bfd session all BFD session information for ISIS(1) -----------------------------------

6-92

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

Peer System ID : 0000.0000.0003 TX : 100 bfd State : up RX : 100 LocDis : 8193 Multiplier : 3 RemDis : 8192 Diag : No diagnostic information

interface : Vlanif10 Peer IP address : 1.1.1.2 Local IP address: 1.1.1.1 Type : L2

From the preceding display, you can find that the status of the BFD session between S9300-A and S9300-B and the BFD session between S9300-A and S9300-C are Up. Step 5 Configure the BFD feature on interfaces. # Configure BFD on VLANIF 20 of S9300-A and set the minimum interval for sending the packets and the minimum interval for receiving the packets to 10 ms and the local detection time multiplier to 4.
[S9300-A] interface vlanif 20 [S9300-A-Vlanif20] isis bfd enable [S9300-A-Vlanif20] isis bfd min-tx-interval 100 min-rx-interval 100 detectmultiplier 4 [S9300-A-Vlanif20] quit

# Configure BFD on VLANIF 20 of S9300-B and set the minimum interval for sending the packets and the minimum interval for receiving the packets to 100 ms and the local detection time multiplier to 4.
[S9300-B] bfd [S9300-B-bfd] quit [S9300-B] interface vlanif 20 [S9300-B-Vlanif20] isis bfd enable [S9300-B-Vlanif20] isis bfd min-tx-interval 100 min-rx-interval 100 detectmultiplier 4 [S9300-B-Vlanif20] quit

# Run the display ospf bfd session all command on S9300-A or S9300-B. You can see that the BFD parameters take effect. Take S9300-B for example. The display is as follows:
[S9300-B] display isis bfd session all bfd session information for ISIS(1) ----------------------------------Peer System ID : 0000.0000.0001 TX : 100 bfd State : up RX : 100 LocDis : 8192 Multiplier : 4 RemDis : 8192 Diag : No diagnostic information interface : Vlanif20 Peer IP address : 3.3.3.1 Local IP address: 3.3.3.2 Type : L2

Step 6 Verify the configuration. # Run the shutdown command on VLANIF 20 of S9300-B to simulate a link fault.
[S9300-B] interface vlanif 20 [S9300-B-Vlanif20] shutdown

# View the routing table of S9300-A.


[S9300-A] display ip routing-table Route Flags: R - relied, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 8 Routes : 8 Destination/Mask 1.1.1.0/24 Proto Pre -Cost 0 Flags NextHop D 1.1.1.1 interface Vlanif10

Direct 0

Issue 04 (2010-01-08)

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

6-93

6 IS-IS Configuration
1.1.1.1/32 Direct 2.2.2.0/24 ISIS 3.3.3.0/24 Direct 3.3.3.1/32 Direct 127.0.0.0/8 Direct 127.0.0.1/32 Direct 172.16.1.0/24 ISIS 15 0 15 0 0 0 0 20 0 20 0 0 0 0 D

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


D 127.0.0.1 D 1.1.1.2 D 3.3.3.1 D 127.0.0.1 D 127.0.0.1 D 127.0.0.1 1.1.1.2 InLoopback0 Vlanif10 Vlanif10 InLoopback0 InLoopback0 InLoopback0 Vlanif10

As shown in the routing table, the backup link S9300-AS9300-CS9300-B takes effect after the main link fails. The next hop address of the route to 172.16.1.0/24 becomes 1.1.1.2. # Run the display isis bfd session all command on S9300-A. You can see that only the BFD session between S9300-A and S9300-C is Up.
[S9300-A] display isis bfd session all bfd session information for ISIS(1) ----------------------------------Peer System ID : 0000.0000.0003 TX : 100 bfd State : up RX : 100 Lo-CDis : 8193 Multiplier : 3 RemDis : 8192 diag : No diagnostic information interface : Vlanif10 Peer IP address : 1.1.1.2 Lo-C-Al IP address: 1.1.1.1 Type : L2

----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # vlan batch 10 20 # bfd # isis 1 is-level level-2 bfd all-interfaces enable network-entity 10.0000.0000.0001.00 # interface Vlanif10 ip address 1.1.1.1 255.255.255.0 isis enable 1 # interface Vlanif20 ip address 3.3.3.1 255.255.255.0 isis enable 1 isis cost 5 isis bfd enable isis bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # return

Configuration file of S9300-B


# sysname S9300-B

6-94

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

# bfd # vlan batch 20 30 40 # isis 1 is-level level-2 bfd all-interfaces enable network-entity 10.0000.0000.0002.00 # interface Vlanif20 ip address 3.3.3.2 255.255.255.0 isis enable 1 isis cost 5 isis bfd enable isis bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4 # interface Vlanif30 ip address 2.2.2.2 255.255.255.0 isis enable 1 # interface Vlanif40 ip address 172.16.1.1 255.255.255.0 isis enable 1 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet3/0/0 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # return l

Configuration file of S9300-C


# sysname S9300-C # vlan batch 10 30 # bfd # isis 1 is-level level-2 bfd all-interfaces enable network-entity 10.0000.0000.0003.00 # interface vlanif10 ip address 1.1.1.2 255.255.255.0 isis enable 1 # interface Vlanif30 ip address 2.2.2.1 255.255.255.0 isis enable 1 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 #

Issue 04 (2010-01-08)

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

6-95

6 IS-IS Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

return

6.15.7 Example for Configuring Basic IS-IS IPv6 Functions


Networking Requirements
As shown in Figure 6-9:
l

S9300-A, S9300-B, S9300-C, and S9300-D belong to the same AS. The IS-IS protocol runs on the S9300s to ensure connectivity on an IPv6 network. The area IDs of S9300-A, S9300-B, and S9300-C are all 10, and the area ID of S9300-D is 20. S9300-A and S9300-B are Level-1 devices. S9300-C is a Level-1-2 device. S9300-D is a Level-2 device.

Figure 6-9 Networking diagram for configuring basic IS-IS IPv6 functions

G E VL 1/0 10 A /0 :1 NI ::2 F2 1 VLA /6 0 0: N 1 I 4 G ::1/ F20 S9300-C L1/L2 E1 64 /0 /0 GE3/0/0 VLANIF30 /0 /0 30::1/64 0 G E 2 F 10 IF1 NI 6 4 A N :2 /6 4 V L A 2 ::1 / V L :2 : 0: 1 0 1 /0 /0 1 GE

S9300-A L1

GE2/0/0 VLANIF40 20::1/64 GE1/0/0 VLANIF30 30::2/64

S9300-D L2 IS-IS Area 20

S9300-B L1

IS-IS Area 10

Device name S9300-A S9300-B S9300-C S9300-C S9300-C S9300-D S9300-D

Interface GE1/0/0 GE1/0/0 GE1/0/0 GE2/0/0 GE3/0/0 GE1/0/0 GE2/0/0

VLANIF interface VLANIF 20 VLANIF 10 VLANIF 20 VLANIF 10 VLANIF 30 VLANIF 30 VLANIF 40

IP address 10:1::2/64 10:2::2/64 10:1::1/64 10:2::1/64 30::1/64 30::2/64 20::1/64

6-96

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6 IS-IS Configuration

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. Enable the IPv6 forwarding capability on each S9300 and assign an IPv6 address to each interface. Enable IS-IS on each S9300, specify the level, and specify the network entity.

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

IPv6 addresses of the interfaces Area ID of each S9300 Level of each S9300

Procedure
Step 1 Add interfaces to VLANs.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] vlan 20 [S9300-A-vlan10] quit [S9300-A] interface GigabitEthernet 1/0/0 [S9300-A-GigabitEthernet1/0/0] port hybrid pvid vlan 20 [S9300-A-GigabitEthernet1/0/0] port hybrid untagged vlan 20 [S9300-A-GigabitEthernet1/0/0] quit

The configurations of S9300-B, S9300-C, S9300-D are similar to the configuration of S9300A and are not mentioned here. Step 2 Enable the IPv6 forwarding capability, and assign an IPv6 address for each interface. The following is the configuration of S9300-A. The configurations of other S9300s are similar to the configuration of S9300-A and are not mentioned here.
<Quidway> system-view [S9300-A] ipv6 [S9300-A] interface vlanif 20 [S9300-A-Vlanif20] ipv6 enable [S9300-A-Vlanif20] ipv6 address 10:1::2/64

Step 3 Configure IS-IS. # Configure S9300-A.


[S9300-A] isis 1 [S9300-A-isis-1] is-level level-1 [S9300-A-isis-1] network-entity 10.0000.0000.0001.00 [S9300-A-isis-1] ipv6 enable [S9300-A-isis-1] quit [S9300-A] interface vlanif 20 [S9300-A-Vlanif20] isis ipv6 enable 1 [S9300-A-Vlanif20] quit

# Configure S9300-B.
[S9300-B] isis 1 [S9300-B-isis-1] is-level level-1 [S9300-B-isis-1] network-entity 10.0000.0000.0002.00 [S9300-B-isis-1] ipv6 enable

Issue 04 (2010-01-08)

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

6-97

6 IS-IS Configuration
[S9300-B-isis-1] quit [S9300-B] interface vlanif 10 [S9300-B-Vlanif10] isis ipv6 enable 1 [S9300-B-Vlanif10] quit

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

# Configure S9300-C.
[S9300-C] isis 1 [S9300-C-isis-1] network-entity 10.0000.0000.0003.00 [S9300-C-isis-1] ipv6 enable [S9300-C-isis-1] quit [S9300-C] interface vlanif 10 [S9300-C-Vlanif10] isis ipv6 enable 1 [S9300-C-Vlanif10] quit [S9300-C] interface vlanif 20 [S9300-C-Vlanif20] isis ipv6 enable 1 [S9300-C-Vlanif20] quit [S9300-C] interface vlanif 30 [S9300-C-Vlanif30] isis ipv6 enable 1 [S9300-C-Vlanif30] isis circuit-level level-2 [S9300-C-Vlanif30] quit

# Configure S9300-D.
[S9300-D] isis 1 [S9300-D-isis-1] is-level level-2 [S9300-D-isis-1] network-entity 20.0000.0000.0004.00 [S9300-D-isis-1] ipv6 enable [S9300-D-isis-1] quit [S9300-D] interface vlanif 30 [S9300-D-Vlanif30] isis ipv6 enable 1 [S9300-D-Vlanif30] quit [S9300-D] interface vlanif 40 [S9300-D-Vlanif40] isis ipv6 enable 1 [S9300-D-Vlanif40] quit

Step 4 Verify the configuration. # Display the IS-IS routing table of S9300-A.
[S9300-A] display isis route Route information for ISIS(1) ----------------------------ISIS(1) Level-1 Forwarding Table -------------------------------IPV6 Dest. ExitInterface NextHop Cost Flags ---------------------------------------------------------------------------::/0 Vlanif20 FE80::A83E:0:3ED2:1 10 A/-/10:1::/64 Vlanif20 Direct 10 D/L/10:2::/64 Vlanif20 FE80::A83E:0:3ED2:1 20 A/-/Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,

# View information about the IS-IS neighbors of S9300-C.


[S9300-C] display isis peer verbose Peer information for ISIS(1) ---------------------------Circuit Id State HoldTime Type 0000000001 Up 24s L1 0(UP) 10 FE80::996B:0:9419:1 00:44:43 IPV6 YES

System Id Interface 0000.0000.0001 Vlanif20 MT IDs supported : Area Address(es) : Peer IPv6 Address(es): Uptime : Adj Protocol : Restart Capable :

PRI --

6-98

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


Suppressed Adj : NO 0000000001 0(UP) 10 FE80::DC40:0:47A9:1 00:46:13 IPV6 YES NO 0000000001 0(UP) 20 FE80::F81D:0:1E24:2 00:53:18 IPV6 YES NO Up 28s

6 IS-IS Configuration

0000.0000.0002 Vlanif10 MT IDs supported : Area Address(es) : Peer IPv6 Address(es): Uptime : Adj Protocol : Restart Capable : Suppressed Adj : 0000.0000.0004 Vlanif30 MT IDs supported : Area Address(es) : Peer IPv6 Address(es): Uptime : Adj Protocol : Restart Capable : Suppressed Adj : Total Peer(s): 3

L1

--

Up

24s

L2

--

# View information about the IS-IS LSDB of S9300-C.


[S9300-C] display isis lsdb verbose Database information for ISIS(1) -------------------------------Level-1 Link State Database LSPID Seq Num Checksum Holdtime Length ATT/P/OL ------------------------------------------------------------------------0000.0000.0001.00-00 0x0000000c 0x4e06 SOURCE 0000.0000.0001.00 NLPID IPV6 AREA ADDR 10 INTF ADDR V6 10:1::2 Topology Standard NBR ID 0000.0000.0003.00 COST: 10 IPV6 10:1::/64 0000.0000.0002.00-00 0x00000009 0x738c SOURCE 0000.0000.0002.00 NLPID IPV6 AREA ADDR 10 INTF ADDR V6 10:2::2 Topology Standard NBR ID 0000.0000.0003.00 COST: 10 IPV6 10:2::/64 0000.0000.0003.00-00* 0x00000020 0x6b10 SOURCE 0000.0000.0003.00 NLPID IPV6 AREA ADDR 10 INTF ADDR V6 30::1 INTF ADDR V6 10:2::1 INTF ADDR V6 10:1::1 Topology Standard NBR ID 0000.0000.0002.00 COST: 10 NBR ID 0000.0000.0001.00 COST: 10 IPV6 10:2::/64 IPV6 10:1::/64 1117 113 0/0/0

COST: 10 1022 83 0/0/0

COST: 10 771 140 1/0/0

COST: 10 COST: 10

Level-2 Link State Database LSPID Seq Num Checksum Holdtime Length ATT/P/OL -------------------------------------------------------------------------

Issue 04 (2010-01-08)

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

6-99

6 IS-IS Configuration
0000.0000.0003.00-00* 0x00000017 0x61b4 SOURCE 0000.0000.0003.00 NLPID IPV6 AREA ADDR 10 INTF ADDR V6 30::1 INTF ADDR V6 10:2::1 INTF ADDR V6 10:1::1 Topology Standard NBR ID 0000.0000.0004.00 COST: 10 IPV6 30::/64 IPV6 10:2::/64 IPV6 10:1::/64 0000.0000.0004.00-00 0x0000000b 0x6dfa SOURCE 0000.0000.0004.00 NLPID IPV6 AREA ADDR 20 INTF ADDR V6 30::2 INTF ADDR V6 20::1 Topology Standard NBR ID 0000.0000.0003.00 COST: 10 NBR ID 0000.0000.0005.00 COST: 10 IPV6 30::/64 IPV6 20::/64

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


771 157 0/0/0

COST: 10 COST: 10 COST: 10 1024 124 0/0/0

COST: 10 COST: 10

----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # ipv6 # vlan batch 20 # isis 1 is-level level-1 network-entity 10.0000.0000.0001.00 # ipv6 enable topology standard # interface Vlanif20 ipv6 enable ipv6 address 10:1::2/64 isis ipv6 enable 1 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # return

Configuration file of S9300-B


# sysname S9300-B # ipv6 # vlan batch 10 # isis 1 is-level level-1 network-entity 10.0000.0000.0002.00 # ipv6 enable topology standard #

6-100

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


interface Vlanif10 ipv6 enable ipv6 address 10:2::2/64 isis ipv6 enable 1 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # return l

6 IS-IS Configuration

Configuration file of S9300-C


# sysname S9300-C # ipv6 # vlan batch 10 20 30 # isis 1 network-entity 10.0000.0000.0003.00 # ipv6 enable topology standard # interface Vlanif10 ipv6 enable ipv6 address 10:2::1/64 isis ipv6 enable 1 # interface Vlanif20 ipv6 enable ipv6 address 10:1::1/64 isis ipv6 enable 1 # interface Vlanif30 ipv6 enable ipv6 address 30::1/64 isis ipv6 enable 1 isis circuit-level level-2 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet3/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # return

Configuration file of S9300-D


# sysname S9300-D # ipv6 # isis 1 is-level level-2 network-entity 20.0000.0000.0004.00 # ipv6 enable topology standard # interface Vlanif30 ipv6 enable ipv6 address 30::2/64 isis ipv6 enable 1

Issue 04 (2010-01-08)

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

6-101

6 IS-IS Configuration
# interface Vlanif40 ipv6 enable ipv6 address 20::1/64 isis ipv6 enable 1 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # return

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

6-102

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

7
About This Chapter

BGP Configuration

This chapter describes the basic concepts of the Border Gateway Protocol (BGP) and the procedure for configuring BGP, and provides several configuration examples of BGP. 7.1 Introduction to BGP This section describes the principle and concepts of BGP. 7.2 BGP Features Supported by the S9300 This section describes the BGP features supported by the S9300. 7.3 Configuring Basic BGP Functions This section describes how to start a BGP process, and configure a BGP peer or a peer group. 7.4 Configuring BGP Route Attributes This section describes how to configure BGP route attributes to change BGP route selection policies. 7.5 Configuring BGP Filters This section describes how to configure BGP filters. 7.6 Controlling Advertisement of BGP Routes This section describes how to configure BGP to advertise routes. 7.7 Controlling Routes Imported by BGP This section describes how to configure BGP to import external routes. 7.8 Configuring BGP Route Dampening This section describes how to configure BGP route dampening to suppress unstable routes. 7.9 Setting Parameters of a BGP Connection This section describes how to set parameters of a BGP connection to adjust and optimize the performance of a BGP network. 7.10 Configuring BFD for BGP This section describes how to configure BFD for BGP to provide faster fault detection and speed up route convergence. 7.11 Configuring BGP Load Balancing This section describes how to configure attributes to implement BGP load balancing.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 7-1

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7.12 Configuring a BGP Peer Group This section describes how to configure a BGP peer group to simplify the management of routing policies and improve the efficiency in advertising routes on a large-scale BGP network. 7.13 Configuring a BGP RR This section describes how to configure a BGP RR to simplify the management of routing policies and increase the efficiency in advertising routes in a large-scale BGP network. 7.14 Configuring a BGP Confederation This section describes how to configure a BGP confederation to simplify the management of routing policies and increase the efficiency in advertising routes in a large-scale BGP network. 7.15 Configuring BGP Accounting This section describes how to configure BGP accounting to charge the incoming and outgoing BGP traffic of an AS. 7.16 Configuring BGP GR This section describes how to configure BGP GR to prevent traffic interruption because of protocol restart. 7.17 Configuring BGP Security This section describes how to enhance BGP security. 7.18 Maintaining BGP This section describes how to maintain BGP. 7.19 Configuration Examples This section provides several configuration examples of BGP.

7-2

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

7.1 Introduction to BGP


This section describes the principle and concepts of BGP. BGP is a dynamic routing protocol used between Autonomous Systems (ASs). BGP has three early versions, that is, BGP-1 defined in RFC 1105, BGP-2 defined in RFC 1163, and BGP-3 defined in RFC 1267. The present version of BGP is BGP-4 defined in RFC 1771. BGP-4 as an exterior routing protocol on the Internet is widely used among Internet Service Providers (ISPs).
NOTE

BGP stated in this manual refers to BGP-4, unless otherwise stated.

The characteristics of BGP are as follows:


l

BGP is an Exterior Gateway Protocol (EGP). Unlike Interior Gateway Protocols (IGPs) such as OSPF and RIP, BGP is used to control the route advertisement and select the optimal route rather than discover and calculate routes. BGP uses the Transmission Control Protocol (TCP) with the port number being 179 as the transport layer protocol. This enhances the reliability of BGP. BGP supports Classless Inter-Domain Routing (CIDR). BGP transmits only the updated routes. This reduces the bandwidth occupied by BGP to transmit routes. BGP is applicable to the Internet where a large amount of routes are transmitted. BGP eliminates routing loops by adding the AS_Path to BGP routes. BGP provides rich routing policies to select and filter routes flexibly. BGP can expand easily to adapt to the new development of networks.

l l

l l l

BGP runs on the S9300 in either of the following modes:


l l

IBGP EBGP

BGP is called Internal BGP (IBGP) when it runs within an AS; it is called External BGP (EBGP) when it runs between ASs.

7.2 BGP Features Supported by the S9300


This section describes the BGP features supported by the S9300.

Interfaces That Support BGP


The BGP routing tables must be created and BGP functions must be configured on Layer 3 interfaces. Except for the MEth interface, the physical interfaces on the S9300, however, are Layer 2 interfaces. To implement the configurations, do as follows on the S9300:
l

Create a VLAN that a Layer 2 interface belongs to, assign an IP address to a VLANIF interface, and enable BGP functions on the VLANIF interface.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 7-3

Issue 04 (2010-01-08)

7 BGP Configuration
l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Assign an IP address to a loopback interface and enable BGP functions on the loopback interface.
NOTE

For the following configuration tasks, the configurations in the interface view are performed on the VLANIF interface or the loopback interface, unless otherwise stated. For details about the Layer 2 interface configuration, see the Quidway S9300 Terabit Routing Switch Configuration Guide - Ethernet.

Main Route Attributes


The S9300 enabled with BGP supports the following attributes:
l l l l l

Origin AS_Path Next_Hop Multi-Exit-Discriminator (MED) Local_Pref

Route Selection Policies of BGP


On the S9300, when multiple routes are available to the same destination, BGP selects routes according to the following policies: 1. Select a locally generated route with a lower preference value. You can run the display ip routing-table command to view the preference value of various routes, including direct routes and static routes in the IP routing table. The smaller the preference value is, the higher the preference is. The route whose preference value is the smallest has the highest preference.
NOTE

The locally generated routes refer to the routes imported by BGP through the import and network commands or the routes aggregated through the aggregate and summary automatic commands. The locally generated routes are defined against the routes received from BGP peers.

2.

Select a protocol route in the following order if different protocol routes have the same preference value: Open Shortest Path First (OSPF), Intermediate System-to-Intermediate System (IS-IS) Level-1, IS-IS Level-2, EBGP (including aggregated BGP routes), static, RIP, OSPF_ASE, and IBGP.
NOTE

BGP prefers direct routes when there are direct routes among locally generated routes, because the preference value of direct routes is 0.

3. 4. 5. 6. 7. 8. 9.

Discard the routes with the unreachable Next_Hop first. Prefer the labeled IPv4 routes unconditionally. Prefer the route with the greatest PreVal. Prefer the route with the highest Local_Pref. Prefer the aggregated route. The preference of an aggregated route is higher than the preference of a non-aggregated route. Prefer the route with the shortest AS_Path. Compare the Origin attributes of routes and selecting the routes whose Origin attributes are IGP, EGP, and Incomplete in order.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

7-4

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

10. Prefer the route with the smallest MED. 11. Prefer the routes learned from EBGP peers. The preference of an EBGP route is higher than the preference of an IBPG route. 12. Prefer the route of an IGP with the smallest metric in an AS. Multiple routes are selected to perform load balancing according to the number of configured routes, if load balancing is configured and there are multiple external routes with the same AS_Path. 13. Prefer the route with the shortest Cluster_List. 14. Prefer the route with the smallest Originator_ID. 15. Prefer the route advertised by the S9300 with the smallest router ID. 16. Compare IP addresses of the peers and preferring the route that is learnt from the peer with a smaller IP address.

Route Selection Policies During Applications of BGP Load Balancing


In the BGP routing table, the next hop address of a route may not be the address of the neighbor directly connected to the local S9300. This is because BGP does not change the next hop of a route when a BGP speaker advertises routes learned from an EBGP peer to an IBGP peer. In this case, to ensure that a packet is correctly forwarded, the S9300 must find a reachable address, and then forwards the packet to the next hop of this address according to the routing table. In this process, the route to the reachable address is called a dependent route. BGP forwards packets according to dependent routes. The process of finding a dependent route according to the next hop address is called route iteration. The S9300 supports BGP load balancing based on route iteration. That is, if the dependent route is configured for load balancing (assume that there are three next hop addresses), BGP generates the same number of next hop addresses to guide the forwarding of packets. The iteration based BGP load balancing need not be configured through commands. This feature is always enabled on the S9300. BGP load balancing is different from load balancing of an IGP in the following implementation ways:
l

For different routes to a destination address, an IGP calculates the metrics of routes according to its routing algorithm. Load balancing is performed among the routes with the same metric. BGP does not have a routing algorithm; therefore, it cannot determine whether to perform load balancing among routes according to the metrics. BGP, however, has many route attributes with different priorities in route selection principles. BGP performs load balancing according to route selection policies. That is, load balancing is performed according to the maximum number of equal-cost routes when all the routes have the same high preference.
NOTE

l l

BGP load balancing is performed only among the routes with the same AS_Path. BGP load balancing also applies to the ASs in a confederation.

Policies for BGP Route Advertisement


On the S9300, BGP advertises routes according to the following policies:
l

The BGP speaker advertises only the optimal route to its peer when multiple valid routes are available.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 7-5

Issue 04 (2010-01-08)

7 BGP Configuration
l l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The BGP speaker sends only the routes in use to its peer. The BGP speaker advertises the routes learned from EBGP peers to all BGP peers (including EBGP peers and IBGP peers) except for the peers that advertise the routes. The BGP speaker does not advertise the routes learned from IBGP peers to its IBGP peers. The BGP speaker advertises the routes learned from IBGP peers to its EBGP peers when the synchronization function between BGP and an IGP is disabled. The BGP speaker advertises all BGP routes to the new peers when the connections with new peers are established.

l l

Route Aggregation
In a large-scale network, the BGP routing table is large. You can configure route aggregation to reduce the size of the routing table. Route aggregation refers to the process of aggregating multiple routes. BGP advertises only the aggregated route rather than all the specific routes to their peers. The S9300 supports automatic aggregation and manual aggregation. Manual aggregation can be used to control the attributes of the aggregated route and determine whether to advertise the specific routes.

BGP Route Dampening


Route dampening solves the problem of route instability. The route instability is presented on route flapping. That is, routes disappear and reappear frequently in the routing table. When route flapping occurs, the routing protocol sends an Update packet to the neighbors. The node that receives the Update packet needs to recalculate routes and modify its routing table. Frequent route flapping consumes lots of bandwidths and CPU resources and even affects the normal operation of a network. In most situations, BGP is applied to complex networks where routes change frequently. To minimize the affect of frequent route flapping, BGP uses route dampening to suppress unstable routes.

Synchronizing IBGP and an IGP


IBGP and an IGP is synchronized so that unreachable routes are not advertised to the nodes of external ASs. If the synchronization function is configured, the S9300 checks the IGP routing table before adding an IBGP route to the routing table and advertising it to EBGP peers. The IBGP route is added to the routing table and advertised to the EBGP peers only when the IGP also learns this IBGP route. The synchronization function can be disabled in the following cases:
l l

The local AS is not a transit AS. IBGP peer relationships are established between all BGP speakers in the local AS and the network is fully meshed.

7-6

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

Peer Group
A peer group is a group of peers with the same attributes. When a peer is added to a peer group, this peer is configured to be the same as this group. The configuration of the peers in the group varies according to the configuration of the peer group. In a large-scale BGP network, there are a large number of peers and most of them have the same policies. You need to repeatedly use some commands when configuring these policies. In most situations, you can simplify the configurations by using a peer group. In addition, you can speed up route advertisement by adding peers to a peer group.

RR
To ensure the connectivity between IBGP peers, you need to establish IBGP connections between all IBGP peers. If there are n nodes in an AS, n (n-1)/2 IBGP connections need to be established. When there are a large number of IBGP peers, a lot of network and CPU resources are consumed. Route reflection solves the preceding problem. In an AS, one node functions as a Route Reflector (RR) and other nodes function as clients. IBGP connections are established between the clients and the RR. The RR transmits or reflects routes among clients, but the clients need not establish BGP connections. A node which is neither an RR nor a client is a non-client. The peer relationships must be set up between non-clients and the RR, and all other non-clients.

Confederation
Confederation is another method of solving problems of increasing IBGP connections in an AS. It divides an AS into several sub-ASs. The peer relationships are established between IBGP peers in each sub-AS, and EBGP peer relationships are established between sub-ASs. For BGP speakers outside the confederation, the sub-ASs in the same confederation are integral. The external devices do not need to know the topology of internal sub-ASs. The confederation ID is the AS number identifying the entire confederation. The confederation has disadvantages. For example, the devices need to be reconfigured when a network in non-confederation mode switches to the network in confederation mode. The logical typology also changes. In large-scale BGP networks, RR and confederation can be used together.

BGP Accounting
BGP accounting sets the traffic index by matching BGP attributes to identify and classify routes, and then charges services according to the traffic.
l l l

The transmitter of BGP routes can set the community, MED, and Local_Pref for BGP routes by matching routing policies. The receiver of BGP routes can set the BGP traffic index based on BGP route attributes. After BGP accounting is enabled on an interface, the traffic index table is generated for statistics collection. The statistics can be collected on the basis of the destination address or the source address.

BGP accounting can collect the traffic of the local AS and inter-ASs, and collect the incoming and outgoing traffic of an AS. BGP accounting is valid only when the S9300 needs to search
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 7-7

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

the forwarding table. For example, if BGP accounting is configured for the outgoing traffic on an originating interface, BGP accounting is invalid.

BFD for BGP


The S9300 supports Bidirectional Forwarding Detection (BFD) for BGP, providing fast detection of faults on links. BFD can fast detect the faults on links between BGP peers and reports the faults to BGP. Fast convergence of BGP routes is thus implemented.

BGP GR
When BGP restarts, the peer relationship is re-established and the forwarding is interrupted. After the Graceful Restart (GR) function is enabled, traffic interruption can be prevented.

7.3 Configuring Basic BGP Functions


This section describes how to start a BGP process, and configure a BGP peer or a peer group. 7.3.1 Establishing the Configuration Task 7.3.2 Starting a BGP Process 7.3.3 Configuring a BGP Peer 7.3.4 (Optional) Configuring a Local Interface for a BGP Connection 7.3.5 Checking the Configuration

7.3.1 Establishing the Configuration Task


Applicable Environment
BGP uses TCP connections; therefore, you need to specify the IP address of the peer when configuring BGP. The BGP peer may not be the neighboring node, but the BGP peer relationship can be established through logical links. To enhance the stability of BGP connections, the loopback interface addresses are used to set up the connections. To configure BGP to advertise and import routes, see 7.6.2 Configuring BGP to Advertise Local Routes and 7.7.2 Configuring BGP to Import Default Routes after this configuration is performed. Most commands in the BGP extended address family view are the same as the commands in the BGP view. The commands used in the extended address family view, however, are valid only in related applications.
NOTE

The commands in the BGP-IPv4 unicast address family view can be run in the BGP view. These commands, however, are described in the BGP-IPv4 unicast address family view in configuration files.

Pre-configuration Tasks
Before configuring basic BGP functions, complete the following tasks:
7-8 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


l l

7 BGP Configuration

Configuring the link layer protocol Creating a VLAN that each interface belongs to and assigning an IP address to each VLANIF interface
NOTE

To create a VLAN that each interface belongs to, you can add interfaces to the VLAN in default mode or by using the port trunk allow-pass vlan command or port hybrid { tagged |untagged } vlan command. Ensure that both ends of the link adopt the same mode of adding interfaces to a VLAN. If you run the port trunk allow-pass command or port hybrid tagged vlan command to add interfaces to a VLAN, the directly connected physical interfaces in the same network segment should be added to the same VLAN. In this manner, the corresponding VLANIF interfaces can be directly connected at the network layer. For details, see the Quidway S9300 Terabit Routing Switch Configuration Guide - Ethernet.

Data Preparation
To configure basic BGP functions, you need the following data. No. 1 2 3 Data Local AS number and router ID IPv4 address of the peer and AS number (Optional) Source address of the Update packet

7.3.2 Starting a BGP Process


Context
Do as follows on the S9300s on which BGP connections need to be set up.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

A BGP process is enabled (the local AS number is specified) and the BGP view is displayed. Step 3 Run:
router-id router-id

The router ID of BGP is set. Configuring or changing the router ID of BGP results in the resetting of the BGP peer relationship.

Issue 04 (2010-01-08)

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

7-9

7 BGP Configuration
TIP

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

To enhance the reliability of a network, you can configure the address of the loopback interface as the router ID manually. If the router ID is not set, BGP automatically selects the router ID in the system view as the router ID of BGP. For the selection of the router ID in the system view, see "router-id (system view)" in the Quidway S9300 Terabit Routing Switch Command Reference - IP Routing Commands.

----End

7.3.3 Configuring a BGP Peer


Procedure
l Configuring an IBGP Peer The routers that send BGP packets are BGP speakers. When a BGP speaker exchange information with other BGP speakers, other BGP spearkers function as its peers. Do as follows on the S9300s on which IBGP connections need to be set up. 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. Run:


peer ipv4-address as-number as-number

The IP address and the number of the AS where a peer resides are specified. The number of the AS where the specified peer resides should be the same as the number of the local AS. The IP address of the specified peer can be one of the following types:

IP address of a VLANIF interface on a directly connected peer IP address of a loopback interface on a reachable peer

If the IP address of a specified peer is a loopback address, a sub-interface address, or an IP address of another non-directly-connected network, you need to perform 7.3.4 (Optional) Configuring a Local Interface for a BGP Connection to ensure the correct establishment of the peer. 4. (Optional) Run:
peer { ipv4-address | group-name } description description-text

The description of a peer or a peer group is set. Configuring the description facilitates the management of a network. l Configuring an EBGP Peer Do as follows on the S9300s on which EBGP connections need to be set up. 1. Run:
system-view

7-10

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. Run:


peer ipv4-address as-number as-number

The IP address and the number of the AS where a peer resides are specified. The number of the AS where the specified peer resides must be different from that of the local AS. The IP address of the specified peer can be one of the following types:

IP address of a VLANIF interface on a directly connected peer IP address of a loopback interface on a reachable peer

If the IP address of a specified peer is a loopback address, a sub-interface address, or an IP address of another non-directly-connected network, you need to perform 7.3.4 (Optional) Configuring a Local Interface for a BGP Connection to ensure the correct establishment of the peer. 4. Run:
peer { ipv4-address | group-name } ebgp-max-hop [ number ]

The maximum number of hops for EBGP connections is set. A directly connected physical link must be available between EBGP peers. If the requirement is not met, you must use the peer ebgp-max-hop command to configure EBGP peers to establish TCP connections through multiple hops. 5. (Optional) Run:
peer { ipv4-address | group-name } description description-text

The description of a peer or a peer group is set. Configuring the description facilitates the management of a network. ----End

7.3.4 (Optional) Configuring a Local Interface for a BGP Connection


Context
When IP addresses of the specified peers belong to a non-directly connected network, do as follows on the S9300s.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

Issue 04 (2010-01-08)

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

7-11

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The BGP view is displayed. Step 3 Run:


peer { ipv4-address | group-name } connect-interface interface-type interfacenumber

A local interface used for establishing a BGP connection is configured. To improve the reliability and stability of BGP connections, you can configure the local interface used for BGP connections as the loopback interface. Therefore, when redundant links are available in the network, the BGP connections are not torn down, if an interface or a link fails.
NOTE

When establishing multiple peers between two S9300s through multiple networks, you should run the peer connect-interface command to specify the interface for establishing a BGP connection.

----End

7.3.5 Checking the Configuration


Prerequisite
Configuring basic BGP functions is complete.

Procedure
Step 1 Run the display tcp status command to check information about the TCP connection. Step 2 Run the display bgp peer [ verbose ]display bgp peer ipv4-address { log-info | verbose } command to check information about a BGP peer. ----End

7.4 Configuring BGP Route Attributes


This section describes how to configure BGP route attributes to change BGP route selection policies. 7.4.1 Establishing the Configuration Task 7.4.2 Setting the Preference of BGP 7.4.3 Setting the PrefVal for BGP Routes 7.4.4 Setting the Default Local_Pref for the Local Device 7.4.5 Setting the MED 7.4.6 Configuring the Next_Hop 7.4.7 Setting the AS_Path 7.4.8 Checking the Configuration

7-12

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

7.4.1 Establishing the Configuration Task


Applicable Environment
BGP has many route attributes. You can change route selection policies by configuring the following attributes:
l

BGP preference Setting the BGP preference affects route selection between BGP and other routing protocols on the S9300.

PrefVal of BGP routes After the PrefVal of BGP routes is set, the route with the largest PrefVal is preferred when multiple routes to the same destination exist in the BGP routing table.

Local_Pref When the S9300 obtains multiple routes with the same destination address and different next hop addresses through IBGP peers, it determines the optimal route when traffic is sent out from the AS by setting Local_Pref.

MED After the MED is set, BGP can notify other ASs of selecting the route with the smallest MED when traffic is transmitted into the AS.

Next_Hop The Next_Hop of BGP is different from the Next_Hop of an IGP. It may not be the IP address of the neighboring node. On the S9300, you can run the peer next-hop-local command to set the next hop of a route to its IP address when BGP advertises the route to its BGP peers or peer groups.

AS_Path The AS_Path is used to record all ASs that a route passes through from the local end to the destination in the Distance-Vector (DV) order. By configuring the AS_Path, you can control route selection. The route with the shortest AS_Path is selected if other attributes are the same.

Pre-configuration Tasks
Before configuring BGP route attributes, complete the following task:
l

7.3 Configuring Basic BGP Functions

Data Preparation
To configure BGP route attributes, you need the following data. No. 1 2 3 4 Data AS number BGP preference Local_Pref MED

Issue 04 (2010-01-08)

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

7-13

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7.4.2 Setting the Preference of BGP


Context
Do as follows on the S9300s that run BGP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. Step 4 Run:


preference { external internal local | route-policy route-policy-name }

The preference of BGP is set. BGP provides the following types of routes:
l l l

Routes learned from EBGP peers Routes learned from IBGP peers Routes originated locally (Local Originated)

You can set the preference for these three types of routes by setting the external, internal, and local parameters. You can also apply routing policies to set the preferences for the specified routes that meet matching rules. You can set the default preferences for the routes that do not meet matching rules.
NOTE

You cannot use the peer route-policy command to apply routing policies to set the BGP preference.

----End

7.4.3 Setting the PrefVal for BGP Routes


Context
Do as follows on the S9300s that run BGP.

Procedure
Step 1 Run:
7-14 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


system-view

7 BGP Configuration

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


peer { group-name | ipv4-address } preferred-value value

The PrefVal is set for a peer. By default, the original PrefVal of a route learned from a peer is 0. ----End

7.4.4 Setting the Default Local_Pref for the Local Device


Context
Do as follows on the S9300s that run BGP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. Step 4 Run:


default local-preference preference

The default Local_Pref is set for the local device. By default, the Local_Pref of BGP is 100. ----End

7.4.5 Setting the MED


Context
Do as follows on the S9300s that run BGP.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 7-15

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Procedure
l Setting the default MED for the local device 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. 4. Run:


default med med

The default MED is set. l Comparing the MEDs of the routes from different ASs 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. 4. Run:


compare-different-as-med

The MEDs of the routes from different ASs are compared. Generally, the S9300 compares only the MEDs of the routes of different peers from the same AS. After this command is run, BGP can compare the MEDs of the routes from different ASs. l (Optional) Configuring the processing method when the MED is not set 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed.


7-16 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

4.

Run:
bestroute med-none-as-maximum

The MED is taken as the maximum value 4294967295 when the MED is not set. By default, the MED is 0 if the MED is not set. l Comparing the MEDs of the routes in a confederation 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. 4. Run:


bestroute med-confederation

The MEDs of the routes in a confederation are compared. ----End

7.4.6 Configuring the Next_Hop


Procedure
l Changing the next hop when the S9300 advertises a route to an IBGP peer Do as follows on the S9300s that run BGP. 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. 4. Run:


peer { ipv4-address | group-name } next-hop-local

The address of the S9300 is configured as the next hop for route advertisement. On certain networks, to ensure that an IBGP peer can find the correct next hop, you can configure the local S9300 to change the next hop of a route as its address when the local S9300 advertises the route to its IBGP peer. By default, the S9300 does not change the next hop address when advertising a route to its IBGP peer.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 7-17

7 BGP Configuration
NOTE

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

If BGP load balancing is configured, the local S9300 modifies the next hop address as its address when advertising routes to IBGP peer groups, regardless of whether the peer nexthop-local command is used.

Not changing the next hop when the S9300 advertises a route learned from an IGP to an IBGP peer Do as follows on the S9300s that import IGP routes. 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. 4. Run:


peer { ipv4-address | group-name } next-hop-invariable

The S9300 is configured not to change the next hop address of an IGP route when advertising the imported IGP route. By default, when a peer advertises an imported IGP route, the peer changes the next hop address to the address of the interface connecting the local S9300 and the remote peer. l Not changing the next hop when the S9300 advertises a route to an EBGP peer Do as follows on the PEs. 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. 4. Run:


peer { group-name | ipv4-address } next-hop-invariable

The S9300 is configured not to change the next hop address when advertising routes to EBGP peers. By default, PEs of different ASs set up EBGP peers, and change the next hop address when advertising routes. ----End
7-18 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

7.4.7 Setting the AS_Path


Context
Do as follows on the S9300s that run BGP.

Procedure
l Allowing the local AS number to be repeated 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. 4. Run:


peer { ipv4-address | group-name } allow-as-loop [ number ]

The local AS numbers can be repeated. Generally, BGP checks the AS_Path of a route sent from the peer. If the local AS number already exists, BGP ignores this route to avoid routing loops. In certain special applications such as the L3VPN configuration, you can use the command to allow the AS_Path of the routes sent from the peers to carry the local AS number. You can also set the number of times when the local AS numbers are repeated. l Configuring the S9300 not to use AS_Path a route selection rule 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. 4. Run:


bestroute as-path-neglect

The AS_Path is not configured as one of the route selection rules. After this command is used, BGP does not compare lengths of AS_Paths. By default, the AS_Path with the smallest length is preferred. l
Issue 04 (2010-01-08)

Configuring a fake AS number


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

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

1.

Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. Run:


peer { ipv4-address | group-name } fake-as fake-as-number

A fake AS number is set. You can hide the actual AS number by using this command. EBGP peers in other ASs can only learn this fake AS number. That is, the peers in other ASs use the fake AS number as the AS number of the local device. This command is applicable to only EBGP peers. l Configuring the AS_Path to carry only the public AS number 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. 4. Run:


peer { ipv4-address | group-name } public-as-only

The AS_Path is configured to carry only the public AS number. The AS number ranges from 1 to 65535. The public AS number ranges from 1 to 64511 and the private AS number ranges from 64512 to 65534. 65535 is used as the reserved AS number in certain applications. Public AS numbers are managed and assigned by the Internet Assigned Number Authority (IANA) and can be used on the Internet. The private AS number cannot be advertised to the Internet and is used only in the internal routing domain. BGP carries an AS number (either public or private) when advertising routes. In certain situations, the private AS number does not need to be transmitted. You can then use the command to configure the AS_Path to carry only the public AS number. This command is applicable to only EBGP peers. ----End

7.4.8 Checking the Configuration


Prerequisite
Configuring BGP route attributes is complete.
7-20 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

Procedure
l l l l l Run the display bgp paths [ as-regular-expression ] command to check information about the AS_Path. Run the display bgp routing-table different-origin-as command to check the routes with different source ASs, but with the same destination address. Run the display bgp routing-table regular-expression as-regular-expression command to check routes matching the regular expression of the AS. Run the display bgp routing-table [ network ] [ mask | mask-length ] [ longer-prefixes ] command to check the BGP routing table. Run the display bgp routing-table community [ aa:nn &<1-13> ] [ internet | noadvertise | no-export | no-export-subconfed ] * [ whole-match ] command to check routing information about the specified BGP community. Run the display bgp routing-table community-filter community-filter-number [ wholematch ] command to check the routes matching the specified BGP community filter.

----End

7.5 Configuring BGP Filters


This section describes how to configure BGP filters. 7.5.1 Establishing the Configuration Task 7.5.2 Configuring a Policy for Advertising BGP Routes 7.5.3 Configuring a Policy for Receiving BGP Routes 7.5.4 Configuring BGP Soft Resetting 7.5.5 Checking the Configuration

7.5.1 Establishing the Configuration Task


Applicable Environment
Through powerful functions of filters, BGP can flexibly send and receive specific routes.
l

Applying the Route-Policy The Route-Policy is used to match the routes or certain attributes of the routes, and change the attributes if the routes satisfy matching rules. A Route-Policy comprises multiple nodes and each node contains the following clauses:

if-match clauses: define the matching rules that the routes satisfy. The matching objects are certain attributes of the routes. apply clauses: specify actions, that is, configuration commands that are run after a route satisfies the matching rules specified by the if-match clauses. The apply clauses can change some attributes of the route.

Controlling the received routes BGP can use the routing policy for or filter the received global routes and only the routes received from a peer or a peer group. When BGP receives routes from peers, BGP may be vulnerable to service attacks and receive a large number of attack routes. As a result, the resources of the S9300 are

Issue 04 (2010-01-08)

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

7-21

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

consumed. In the case of a large number of BGP routes caused by malicious attacks or incorrect configurations, the administrator must limit the resources consumed by the S9300 according to the network planning and performance of the S9300. BGP can control peers to limit the number of routes sent by peers.
l

Resetting BGP connections After changing BGP route selection policies, you must reset the BGP connection to make the new configuration effective. The BGP connection is thus interrupted temporarily. BGP supports the Route-Refresh capability on the S9300. When the policies change, the system refreshes the BGP routing table dynamically. So, the BGP connection is not interrupted. If the peer supports the Route-Refresh capability, you can run the refresh bgp command to manually soft reset the BGP connection. The routing table is thus refreshed. If a peer does not support the Route-Refresh capability, you can run the peer keep-allroutes command. In this manner, the BGP routing table can be refreshed.

Pre-configuration Tasks
Before configuring BGP filters, complete the following task:
l

7.3 Configuring Basic BGP Functions

Data Preparation
To configure BGP filters, you need the following data. No. 1 Data Inbound interface, outbound interface, and name of the routing policy

7.5.2 Configuring a Policy for Advertising BGP Routes


Context
Do as follows on the S9300s that run BGP.

Procedure
l Configuring BGP to filter the globally imported routes 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed.


7-22 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

4.

Run:
filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol [ process-id ] ]

The imported routes are filtered. After BGP filters the imported routes, only the routes that meet the matching rules are added to the local BGP routing table and advertised to BGP peers. If protocol is specified, you can filter the routes of a specific routing protocol. If protocol is not specified, all the routes that need to be advertised are filtered, including the routes imported and the local routes advertised through the network command.
NOTE

For the configuration of Access Control Lists (ACLs), see the chapter "Configuring ACLs" in the Quidway S9300 Terabit Routing Switch Configuration Guide - Basic Configuration. For the configuration of address prefix lists, see 10.3 Configuring an IP Prefix List.

Applying a routing policy to the routes advertised by specified BGP peers 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. 4. Run:


peer { ipv4-address | group-name } route-policy route-policy-name export

A routing policy is configured on the outbound interface.


NOTE

The routing policy applied in the peer route-policy export command does not support a certain interface as one of the matching rules. That is, the routing policy does not support the if-match interface command.

Applying a filter to the routes advertised by specified BGP peers 1. Run:


system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. 4. Run the following command as required.

Run:
peer { ipv4-address | group-name } filter-policy acl-number export

Issue 04 (2010-01-08)

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

7-23

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

BGP is configured to filter routes according to the ACL.

Run:
peer { ipv4-address | group-name } as-path-filter as-path-filternumber export

BGP is configured to filter routes according to the AS_Path.

Run:
peer { ipv4-address | group-name } ip-prefix ip-prefix-name export

BGP is configured to filter routes according to the prefix list. The members of a peer group and the peer group can use different policies to filter routes on the outbound interface. That is, each peer group can select its policy when advertising routes. ----End

7.5.3 Configuring a Policy for Receiving BGP Routes


Context
Do as follows on the S9300s that run BGP.

Procedure
l Configuring BGP to filter the globally received routes 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. 4. Run:


filter-policy { acl-number | ip-prefix ip-prefix-name } import

All the received routes are filtered. The routes received by BGP are filtered. Only those routes that meet the matching rules are received by BGP and are added to the routing table. l Applying a routing policy to the routes received by specified BGP peers 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed.


7-24 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

3.

(Optional) Run:
ipv4-family unicast

The IPv4 unicast address family view is displayed. 4. Run:


peer { ipv4-address | group-name } route-policy route-policy-name import

A routing policy is configured for the received routes.


NOTE

The routing policy applied in the peer route-policy import command does not support a certain interface as one of the matching rules. That is, the routing policy does not support the if-match interface command.

Applying a filter to the routes received by specified BGP peers 1. Run:


system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. 4. Run the following command as required:

Run:
peer { ipv4-address | group-name } filter-policy acl-number import

BGP is configured to filter routes according to the ACL.

Run:
peer { ipv4-address | group-name } as-path-filter as-path-filternumber import

BGP is configured to filter routes according to the AS_Path.

Run:
peer { ipv4-address | group-name } ip-prefix ip-prefix-name import

BGP is configured to filter routes according to the prefix list. The members of a peer group and the peer group can use different policies to filter routes on the inbound interface. That is, each peer group can select its policy when receiving routes. l Limiting the number of routes received from a peer 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3.


Issue 04 (2010-01-08)

Run:
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 7-25

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


peer { group-name | ipv4-address } route-limit limit [ [ alert-only | idle-forever | idle-timeout times ] percentage ]

The number of routes received from the peer or peer group is set. The command provides the control of peer level. You can configure specific parameters as required to control BGP after the number of the routes received from a peer exceeds the threshold.

alert-only: The peer does not receive any routes that exceed the threshold, and an alarm is generated and recorded in the log. idle-forever: The peer relationship is ended. The S9300 does not retry setting up a connection. An alarm is generated and recorded in the log. Run the display bgp peer verbose command, and you can view that the status of the peer is Idle. To restore the BGP connection, run the reset bgp command. idle-timeout: The peer relationship is disconnected. The S9300 retries setting up a connection after the timer expires. An alarm is generated and recorded in the log. Run the display bgp peer verbose command, and you can view that the status of the peer is Idle. To restore the BGP connection before the timer expires, run the reset bgp command. If the preceding parameters are not set, the peer relationship is torn down. The S9300 retries setting up a connection after 30 seconds. An alarm is generated and recorded in the log.

----End

7.5.4 Configuring BGP Soft Resetting


Prerequisite
Do as follows on the S9300s that run BGP.

Procedure
l Enabling the Route-Refresh capability 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. Run:


peer { ipv4-address | group-name } capability-advertise { route-refresh | conventional }

The Route-Refresh capability is enabled. When all BGP speakers are enabled with the Route-Refresh capability, the local S9300 sends Route-Refresh messages to peers, if the routing policy of BGP changes. After receiving the messages, the peers send the messages to the local S9300. In this case, the BGP routing table is dynamically refreshed and the new routing policy is applied without interrupting BGP connections.
7-26 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

Retaining all the routing updates of the peers 1. Run:


system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. 4. Run:


peer { ipv4-address | group-name } keep-all-routes

All the routing updates of the peers are kept. After this command is used, all routing updates sent by the specified peer are kept regardless of whether the filtering policy is used. When the local routing policy changes, such information can be used to generate BGP routes again. l Soft resetting BGP connections 1. Run:
refresh bgp { all | ipv4-address | group group-name | external | internal } { export | import }

BGP connections are soft reset. Run the refresh bgp command in the user view.
NOTE

If the S9300 supports the Route-Refresh capability, running this command does not result in reestablishment of the sessions between the S9300 and its peers. After the command is run, however, the Route-Refresh capability does not take effect on this S9300. If the S9300 supports the RouteRefresh capability, the peer keep-all-routes command need not be run on this S9300.

----End

7.5.5 Checking the Configuration


Prerequisite
Configuring BGP filters is complete.

Procedure
l l l l Run the display bgp network command to check the routes advertised by BGP. Run the display bgp network command to check the routes matching the specified AS_Path filter. Run the display bgp routing-table community-filter community-filter-number [ wholematch ] command to check the routes matching the specified BGP community filter. Run the display bgp routing-table peer ipv4-address { advertised-routes | receivedroutes } [ statistics ] command to check the routes advertised or received by BGP peers.

----End
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 7-27

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7.6 Controlling Advertisement of BGP Routes


This section describes how to configure BGP to advertise routes. 7.6.1 Establishing the Configuration Task 7.6.2 Configuring BGP to Advertise Local Routes 7.6.3 Configuring BGP Route Aggregation 7.6.4 Configuring BGP to Advertise Default Routes to the Peers 7.6.5 Configuring Split Horizon Between EBGP Peers 7.6.6 Checking the Configuration

7.6.1 Establishing the Configuration Task


Applicable Environment
l

BGP route aggregation In medium- or large-scale BGP networks, route aggregation needs to be configured when the routes are advertised to the peers. This reduces the size of the routing tables of the peers. BGP supports automatic aggregation and manual aggregation.

Automatic aggregation Aggregates the subnet routes imported by BGP. After automatic aggregation is configured, BGP aggregates routes according to the natural network segment and sends the aggregated route to only the peers. For example, 10.1.1.1/24 and 10.2.1.1/24 are aggregated to 10.0.0.0/8, which is a Class A address.

Manual aggregation Aggregates routes in the local BGP routing table. Generally, manual aggregation takes precedence over automatic aggregation.

Split horizon between EBGP peers If multiple EBGP peers are set up between two ASs, the routes received from the peers of an AS are advertised to peers of the AS through other EBGP peers. When the routes reach an EBGP peer, the EBGP peer discards the route according to the AS_Path, if the EBGP peer is not configured to permit AS loops. This results in the waste of resources. You can run the as-split-horizon command to prohibit the route received from the peers of an AS from being forwarded to the peers of the AS. This can reduce unnecessary route advertisement.

Controlling the advertised routes BGP can filter or use routing policies for the routes advertised by a certain peer or a peer group.

Pre-configuration Tasks
Before controlling the route advertisement, complete the following task:
l

7.3 Configuring Basic BGP Functions


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

7-28

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

Data Preparation
To control the route advertisement, you need the following data. No. 1 Data Aggregation mode and route aggregated

7.6.2 Configuring BGP to Advertise Local Routes


Context
Do as follows on the S9300s that run BGP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. Step 4 Run:


network ipv4-address [ mask | mask-length ] [ route-policy route-policy-name ]

BGP is configured to advertise local routes. The local routes to be advertised must exist in the local routing table. Using routing policies can control the routes to be advertised more flexibly. ----End

7.6.3 Configuring BGP Route Aggregation


Context
Do as follows on the S9300s that run BGP.

Procedure
l Configuring automatic aggregation 1. Run:
system-view

Issue 04 (2010-01-08)

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

7-29

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. 4. Run:


summary automatic

BGP is configured to aggregate subnet routes automatically. The command is used to aggregate the routes imported by BGP. These routes can be direct routes, static routes, Routing Information Protocol (RIP) routes, Open Shortest Path First (OSPF) routes, or Intermediate System-to-Intermediate System (IS-IS) routes. The command, however, is invalid for the routes imported through the network command. l Configuring manual aggregation 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. 4. Run:


aggregate ipv4-address { mask | mask-length } [ as-set | attribute-policy route-policy-name1 | detail-suppressed | origin-policy route-policy-name2 | suppress-policy route-policy-name3 ] *

Manual aggregation is configured. Manual aggregation is valid for the routing entries in the local BGP routing table. For example, if 10.1.1.1/24 does not exist in the BGP routing table, BGP does not advertise the aggregated route after the aggregate 10.1.1.1 16 command is used to aggregate routes. You can apply various routing policies and set the route attributes when using manual aggregation. ----End

7.6.4 Configuring BGP to Advertise Default Routes to the Peers


Procedure
Step 1 Run:
system-view

7-30

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. Step 4 Run:


peer { group-name | ipv4-address } default-route-advertise [ route-policy routepolicy-name ] [ conditional-route-match-all ipv4-address1 { mask1 | mask-length1 } &<1-4> | conditional-route-match-any ipv4-address2 { mask2 | mask-length2 } &<1-4> ]

BGP is configured to advertise default routes to the peers or peer groups.


NOTE

After the peer default-route-advertise command is used, BGP sends a default route with the local address as the next hop address to the specified peer, regardless of whether there are default routes in the routing table.

----End

7.6.5 Configuring Split Horizon Between EBGP Peers


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


as-split-horizon

Split horizon between EBGP peers is configured. When multiple EBGP peers are set up between two ASs, the as-split-horizon command is used. After the command is used, the route received from the peers of an AS is not forwarded to the peers of the AS. This reduces unnecessary route advertisement. ----End

7.6.6 Checking the Configuration


Prerequisite
Controlling the route advertisement is complete.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 7-31

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Procedure
l l l Run the display bgp network command to check the routes advertised by BGP. Run the display bgp routing-table cidr command to check the routes of CIDR. Run the display bgp routing-table peer ipv4-address { advertised-routes | receivedroutes } [ statistics ] command to check the routes advertised or received by BGP peers.

----End

7.7 Controlling Routes Imported by BGP


This section describes how to configure BGP to import external routes. 7.7.1 Establishing the Configuration Task 7.7.2 Configuring BGP to Import Default Routes 7.7.3 Configuring BGP to Import Protocol Routes 7.7.4 Checking the Configuration

7.7.1 Establishing the Configuration Task


Applicable Environment
BGP can send the routes of the local AS to its neighboring ASs, but it does not discover routes within the AS. Instead, BGP imports IGP routes to the BGP routing table and advertises them to the peers. When importing IGP routes, BGP filters routes according to different routing protocols.

Pre-configuration Tasks
Before controlling BGP to import routes, complete the following task:
l

7.3 Configuring Basic BGP Functions

Data Preparation
None.

7.7.2 Configuring BGP to Import Default Routes


Context
Do as follows on the S9300s that run BGP.

Procedure
Step 1 Run:
system-view

The system view is displayed.


7-32 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

Step 2 Run:
bgp as-number

The BGP view is displayed. Step 3 (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. Step 4 Run:


default-route imported

BGP is configured to import default routes. ----End

7.7.3 Configuring BGP to Import Protocol Routes


Context
Do as follows on the S9300s that run BGP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. Step 4 Run:


import-route protocol [ process-id ] [ med med | route-policy route-policy-name ]
*

BGP is configured to import routes discovered by other routing protocols.


NOTE

When importing routes discovered by dynamic routing protocols, you need to specify the protocol number.

If the default-route imported command is not used, BGP cannot import default routes when you run the import-route command to import routes of other protocols. ----End

7.7.4 Checking the Configuration


Prerequisite
Controlling BGP to import routes is complete.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 7-33

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Procedure
l l l Run the display bgp routing-table as-path-filter as-path-filter-number command to check the routes matching the specified AS_Path filter. Run the display bgp routing-table cidr command to check the routes of CIDR. Run the display bgp routing-table community-filter community-filter-number [ wholematch ] command to check the routes matching the specified BGP community filter.

----End

7.8 Configuring BGP Route Dampening


This section describes how to configure BGP route dampening to suppress unstable routes. 7.8.1 Establishing the Configuration Task 7.8.2 Configuring BGP Route Dampening 7.8.3 Checking the Configuration

7.8.1 Establishing the Configuration Task


Applicable Environment
Route dampening can suppress unstable routes. After route dampening is configured, the unstable routes are neither added to the BGP routing table nor advertised to other BGP peers.

Pre-configuration Tasks
Before configuring BGP route dampening, complete the following task:
l

7.3 Configuring Basic BGP Functions

Data Preparation
To configure BGP route dampening, you need the following data. No. 1 Data Parameters of route dampening:
l l l l l

Half-life of a reachable route Half-life of an unreachable route Threshold for a route to be unsuppressed Threshold for a route to be suppressed Ceiling of the penalty

7-34

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

7.8.2 Configuring BGP Route Dampening


Context
Do as follows on the S9300s that run BGP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. Step 4 Run:


dampening [ half-life-reach half-life-unreach reuse suppress ceiling | routepolicy route-policy-name ] *

Parameters of BGP route dampening are set. When you configure BGP route dampening, the values of reuse, suppress, and ceiling should meet the following condition: reuse < suppress < ceiling. The dampening command is valid for only EBGP routes. ----End

7.8.3 Checking the Configuration


Prerequisite
Setting BGP route dampening parameters is complete.

Procedure
l l l Run the display bgp routing-table dampened command to check BGP dampened routes. Run the display bgp routing-table dampening parameter command to check parameters of BGP route dampening. Run the display bgp routing-table flap-info [ regular-expression as-regularexpression | as-path-filter as-path-filter-number | network-address [ { mask | masklength } [ longer-match ] ] ] command to check the statistics on flapping routes.

----End
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 7-35

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7.9 Setting Parameters of a BGP Connection


This section describes how to set parameters of a BGP connection to adjust and optimize the performance of a BGP network. 7.9.1 Establishing the Configuration Task 7.9.2 Configuring BGP Timers 7.9.3 Setting the Interval for Sending Update Packets 7.9.4 Enabling Fast Resetting for EBGP Connections 7.9.5 Checking the Configuration

7.9.1 Establishing the Configuration Task


Applicable Environment
By configuring BGP timers, you can adjust the convergence speed of the network and change the network bandwidth occupied by BGP packets. After a BGP connection is set up between peers, the peers periodically send Keepalive messages to each other. In this case, the BGP connection is not regarded as interrupted by the peers. If the S9300 does not receive any Keepalive message or any other types of packets from the peer within the hold time, the S9300 considers that the BGP connection is interrupted and thus ends the BGP connection. When the S9300 sets up a BGP connection with its peer, it compares its hold time with the hold time of the peer. The shorter hold time is taken as the negotiated hold time. If the negotiation result is 0, no Keepalive message is transmitted and whether the hold time expires is not detected. If the timer value changes, the BGP connection is interrupted for a short time. This is because the peers need to negotiate the hold time again.

Pre-configuration Tasks
Before configuring BGP timers, complete the following task:
l

7.3 Configuring Basic BGP Functions

Data Preparation
To configure BGP timers, you need the following data. No. 1 2 Data Values of BGP timers Interval for sending Update packets

7-36

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

7.9.2 Configuring BGP Timers


Context
Do as follows on the S9300s that run BGP.

Procedure
l Configuring the global timer 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. Run:


timer keepalive keepalive-time hold hold-time

The BGP timers are configured. The proper maximum interval for sending Keepalive messages is one third of the hold time and is not less than one second. Therefore, if the hold time is not set to 0, it must be 3 seconds at least. By default, the lifetime is 60 seconds and the hold time is 180 seconds. When setting the values of keepalive-time and hold-time, note the following:

The values of keepalive-time and hold-time cannot be 0 at the same time. Otherwise, BGP timers become invalid. That is, BGP does not detect link faults according to the timers. The value of hold-time is much greater than the value of keepalive-time, such as, timer keepalive 1 hold 65535. If the hold time is too long, BGP cannot detect link faults in time.

After connections are set up between peers, the values of keepalive-time and holdtime are negotiated by both peers. The smaller value of hold-time contained in Open messages of both peers is taken as the value of hold-time. The smaller value between one third of the hold time and the lifetime is used as the value of keepalive-time. l Configuring a timer for a peer 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. Run:


peer { ipv4-address | group-name } timer keepalive keepalive-time hold hold-time

The lifetime and the hold time are set for a peer or a peer group.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 7-37

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The proper lifetime is one third of the hold time. The peer timer takes precedence over the global timer. ----End

7.9.3 Setting the Interval for Sending Update Packets


Context
Do as follows on the S9300s that run BGP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


peer { ipv4-address | group-name } route-update-interval interval

The interval for sending Update packets is set. ----End

7.9.4 Enabling Fast Resetting for EBGP Connections


Context
Do as follows on the S9300s that run BGP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ebgp-interface-sensitive

Fast resetting of EBGP connections is enabled.


l

After this function is enabled, BGP can detect the fault on an EBGP link rapidly and then resets BGP connections on the interface immediately.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

7-38

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


l

7 BGP Configuration

Disabling this function can prevent repeated setup and deletion of BGP connections caused by route flapping. The network bandwidth is saved to a certain extent.

----End

7.9.5 Checking the Configuration


Prerequisite
Configuring parameters for a BGP connection is complete.

Procedure
l l Run the display bgp peer [ verbose ] command to check information about a BGP peer. Run the display bgp group [ group-name ] command to check information about a BGP peer group.

----End

7.10 Configuring BFD for BGP


This section describes how to configure BFD for BGP to provide faster fault detection and speed up route convergence. 7.10.1 Establishing the Configuration Task 7.10.2 Configuring BFD for BGP on a Public Network 7.10.3 Configuring BFD for BGP on a Private Network 7.10.4 Preventing a Peer from Inheriting BFD of Its Peer Group 7.10.5 Checking the Configuration

7.10.1 Establishing the Configuration Task


Applicable Environment
BGP periodically sends Keepalive messages to peers to detect faults on the peers. This mechanism, however, takes more than one second to detect a fault. When the data rate reaches Gbit/s, the detection mechanism causes a great packet loss and fails to meet the requirement on the reliability of carrier-class networks. BGP introduces BFD for BGP. By using the fast detection mechanism of BFD, BGP fast detects faults on the links between BGP peers. The route convergence of networks is thus sped up.

Pre-configuration Tasks
Before configuring BFD for BGP, complete the following task:
l

7.3 Configuring Basic BGP Functions

Data Preparation
To configure BFD for BGP, you need the following data.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 7-39

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

No. 1 2

Data Type and number of the interface enabled with BFD Detection parameters of BFD: minimum interval for receiving BFD packets, maximum interval for sending BFD packets, and local detection multiplier

7.10.2 Configuring BFD for BGP on a Public Network


Context
Do as follows on the S9300s where a BFD session needs to be set up on both ends of the link.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bfd

Global BFD is enabled on the node. Step 3 Run:


bgp as-number

The BGP view is displayed. Step 4 Run:


peer { group-name | ipv4-address } bfd enable

BFD is configured for a peer or a peer group and default values of BFD parameters are used to set up the BFD session. Step 5 Run:
peer { group-name | ipv4-address } bfd { min-tx-interval min-tx-interval | min-rxinterval min-rx-interval | detect-multiplier multiplier }*

The values of parameters used to set up a BFD session are set. If BFD is configured on a peer group, peers that belong to the group set up BFD sessions when the peer bfd block command is not used on the peers.
NOTE

l l

A BFD session is set up only when the BFD session is in the Established state. If BFD parameters are set on a peer, the BFD session is set up by using the BFD parameters of the peer.

----End
7-40 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

7.10.3 Configuring BFD for BGP on a Private Network


Context
Do as follows on the S9300s where a BFD session needs to be set up on both ends of the link.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bfd

Global BFD is enabled on the node. Step 3 Run:


bgp as-number

The BGP view is displayed. Step 4 Run:


ipv4-family vpn-instance vpn-instance-name

The BGP-VPN instance view is displayed. Step 5 Run:


peer { group-name | ipv4-address } bfd enable

BFD is configured for a peer or a peer group and default values of BFD parameters are used to set up the BFD session. Step 6 Run:
peer { group-name | ipv4-address } bfd { min-tx-interval min-tx-interval | min-rxinterval min-rx-interval | detect-multiplier multiplier }*

The values of parameters used to set up a BFD session are set. ----End

7.10.4 Preventing a Peer from Inheriting BFD of Its Peer Group


Context
Whena peer joins a group enabled with BFD, the peer inherits BFD of the group and creates a BFD session. If you do not want the peer to inherit BFD of the group, do as follows on the peer.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 7-41

7 BGP Configuration
bfd

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Global BFD is enabled on the node. Step 3 Run:


bgp as-number

The BGP view is displayed. Step 4 Run:


peer ipv4-address bfd block

The peer is prevented from inheriting BFD of its group.


NOTE

The peer ipv4-address bfd block command and the peer { group-name | ipv4-address } bfd enable command are mutually exclusive. After the bfd block command is used, the BFD session is automatically deleted.

----End

7.10.5 Checking the Configuration


Prerequisite
Configuring BFD for BGP is complete.

Procedure
l l l Run the display bgp bfd session { [ vpnv4 vpn-instance vpn-instance-name ] peer ipv4address |all } command to check the BFD session established by BGP. Run the display bgp [ vpnv4 vpn-instance vpn-instance-name ] peer [ ipv4-address ] [ verbose ] command to check BGP peers. Run the display bgp group [ group-name ] command or the display bgp vpnv4 { all | vpn-instance vpn-instance-name } group [ group-name ] command to check BGP peer groups.

----End

7.11 Configuring BGP Load Balancing


This section describes how to configure attributes to implement BGP load balancing. 7.11.1 Establishing the Configuration Task 7.11.2 Setting the Number of Routes for Load Balancing 7.11.3 Checking the Configuration

7-42

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

7.11.1 Establishing the Configuration Task


Applicable Environment
In route attributes, BGP routes become equal-cost BGP routes for load balancing only when the first ten attributes described in Route Selection Policies of BGP are the same and the BGP routes have the same AS_Path attribute.

Pre-configuration Tasks
Before configuring BGP load balancing, complete the following task:
l

7.3 Configuring Basic BGP Functions

Data Preparation
To configure BGP load balancing, you need the following data. No. 1 Data Number of routes for load balancing

7.11.2 Setting the Number of Routes for Load Balancing


Context
Do as follows on the S9300s that run BGP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. Step 4 Run:


maximum load-balancing number

The number of routes for load balancing is set. By default, the number of routes for load balancing is 1. ----End
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 7-43

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7.11.3 Checking the Configuration


Prerequisite
Configuring BGP load balancing is complete.

Procedure
l l Run the display bgp routing-table [ network ] [ mask | mask-length ] [ longer-prefixes ] command to check the BGP routing table. Run the display ip routing-table [ verbose ] command to check the routing table.

----End

7.12 Configuring a BGP Peer Group


This section describes how to configure a BGP peer group to simplify the management of routing policies and improve the efficiency in advertising routes on a large-scale BGP network. 7.12.1 Establishing the Configuration Task 7.12.2 Creating an IBGP Peer Group 7.12.3 Creating a Pure EBGP Peer Group 7.12.4 Creating a Mixed EBGP Peer Group 7.12.5 Checking the Configuration

7.12.1 Establishing the Configuration Task


Applicable Environment
In a large-scale BGP network, there are a large number of peers; therefore, it is difficult to configure and maintain them. In this case, you can configure peer groups to simplify the management and improve the efficiency in advertising routes. According to the AS where the peers reside, you can classify peer groups into IBGP peer groups and EBGP peer groups. For EBGP peer groups, you can classify them into pure EBGP peer groups and mixed EBGP peer groups according to whether the peers reside in the same external AS.

Pre-configuration Tasks
Before configuring a BGP peer group, complete the following task:
l

7.3 Configuring Basic BGP Functions

Data Preparation
To configure a BGP peer group, you need the following data. No. 1
7-44

Data Type and name of the peer group, and peers in the peer group
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

7.12.2 Creating an IBGP Peer Group


Context
Do as follows on the S9300s that run BGP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


group group-name [ internal ]

An IBGP peer group is created. If internal is not specified, an IBGP peer group is created by default. Step 4 Run:
peer ipv4-address group group-name

The peer is added to the peer group. When creating an IBGP peer group, you do not need to specify the AS number.
NOTE

You can add multiple peers to a peer group by repeating step Step 4. The system creates a peer in the BGP view automatically, and sets its AS number to the local AS number.

----End

7.12.3 Creating a Pure EBGP Peer Group


Context
Do as follows on the S9300s that run BGP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

Issue 04 (2010-01-08)

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

7-45

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The BGP view is displayed. Step 3 Run:


group group-name [ external ]

A pure EBGP peer group is created. Step 4 Run:


peer group-name as-number as-number

The number of the AS where this peer group resides is set. Step 5 Run:
peer ipv4-address group group-name

The peer is added to the peer group.


NOTE

You can add multiple peers to a peer group by repeating step Step 5. The system creates a peer in the BGP view automatically, and sets its AS number to the local AS number of the peer group. If peers already exist in a peer group, you can neither change the AS number of the peer group nor delete the specified AS number by using the undo command.

----End

7.12.4 Creating a Mixed EBGP Peer Group


Context
Do as follows on the S9300s that run BGP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


group group-name [ external ]

An EBGP peer group is created. Step 4 Run:


peer ipv4-address as-number as-number

A peer is created and its AS number is set. Step 5 Run:


peer ipv4-address group group-name

The peer is added to the peer group.


7-46 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


NOTE

7 BGP Configuration

You can add multiple peers to a peer group by repeating Step 4 and Step 5. In a mixed EBGP peer group, you need to specify the AS number of each peer.

----End

7.12.5 Checking the Configuration


Prerequisite
Configuring a BGP peer group is complete.

Procedure
l l Run the display bgp peer ipv4-address [verbose] or display bgp peer verbosecommand to check detailed information about BGP peers. Run the display bgp group [ group-name ] command to check information about BGP peer groups.

----End

7.13 Configuring a BGP RR


This section describes how to configure a BGP RR to simplify the management of routing policies and increase the efficiency in advertising routes in a large-scale BGP network. 7.13.1 Establishing the Configuration Task 7.13.2 Configuring an RR and Specifying the Clients 7.13.3 (Optional) Disabling Route Reflection Between Clients 7.13.4 (Optional) Setting the Cluster ID of an RR 7.13.5 Checking the Configuration

7.13.1 Establishing the Configuration Task


Applicable Environment
To ensure the connectivity between IBGP peers in an AS, you need to establish IBGP peer relationships between all IBGP peers. When there are a large number of IBGP peers, establishing a fully meshed network is costly. You can use the RR or confederation to solve the problem.

Pre-configuration Tasks
Before configuring a BGP RR, complete the following task:
l

7.3 Configuring Basic BGP Functions

Data Preparation
To configure a BGP RR, you need the following data.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 7-47

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

No. 1

Data Role of each node (RR, client, and non-client)

7.13.2 Configuring an RR and Specifying the Clients


Prerequisite
Do as follows on the BGP RR.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. Step 4 Run:


peer { ipv4-address | group-name } reflect-client

An RR is configured and its clients are specified. The S9300 where the command is run serves as the RR and the peers are specified as clients. ----End

7.13.3 (Optional) Disabling Route Reflection Between Clients


Context
Do as follows on the BGP RR.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed.


7-48 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

Step 3 (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. Step 4 Run:


undo reflect between-clients

Route reflection between clients is disabled. If peer relationships are established between all the clients of the RR, you can use the undo reflect between-clients command to disable route reflection between the clients. The cost is thus reduced. By default, route reflection is enabled between the clients. This command is applicable to only the RR. ----End

7.13.4 (Optional) Setting the Cluster ID of an RR


Context
Do as follows on the BGP RR.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. Step 4 Run:


reflector cluster-id cluster-id

The cluster ID of the RR is set. If there are multiple RRs in a cluster, you can use this command to set the same cluster ID for these RRs to prevent routing loops. ----End

7.13.5 Checking the Configuration


Prerequisite
Configuring a BGP RR is complete.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 7-49

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Procedure
l Run the display bgp group [ group-name ] command to check information about BGP peer groups.

----End

7.14 Configuring a BGP Confederation


This section describes how to configure a BGP confederation to simplify the management of routing policies and increase the efficiency in advertising routes in a large-scale BGP network. 7.14.1 Establishing the Configuration Task 7.14.2 Configuring a BGP Confederation 7.14.3 Checking the Configuration

7.14.1 Establishing the Configuration Task


Applicable Environment
Confederation is another method of solving problems of increasing IBGP connections in an AS. It divides an AS into several sub-ASs. IBGP peer relationships are set up between all IBGP peers in each sub-AS or the RR is configured in each sub-AS, and EBGP peer relationships are established between sub-ASs.

Pre-configuration Tasks
Before configuring a BGP confederation, complete the following task:
l

7.3 Configuring Basic BGP Functions

Data Preparation
To configure a BGP confederation, you need the following data. No. 1 Data Confederation ID and numbers of sub-ASs

7.14.2 Configuring a BGP Confederation


Context
Do as follows on the S9300s that run BGP.

Procedure
l
7-50

Configuring a BGP confederation


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

1.

Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. Run:


confederation id as-number

The confederation ID is set. 4. Run:


confederation peer-as as-number &<1-32>

The number of the sub-AS where other EBGP peers connected to the local AS reside is set. A confederation can contain up to 32 sub-ASs. The parameter as-number is valid in the confederation when the sub-ASs of the confederation are configured. You must run the confederation id and confederation peer-as commands for all the EBGP peers in the same confederation, and set the same confederation ID for them. l Configuring the compatibility of the confederation 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. Run:


confederation nonstandard

The compatibility of the confederation is configured. Other devices may implement the confederation that does not comply with the RFC standard. In this case, you can use this command to make standard devices compatible with nonstandard devices. ----End

7.14.3 Checking the Configuration


Prerequisite
Configuring a BGP confederation is complete.

Procedure
l Run the display bgp peer [ ipv4-address ] [verbose] command to check detailed information about BGP peers.

----End
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 7-51

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7.15 Configuring BGP Accounting


This section describes how to configure BGP accounting to charge the incoming and outgoing BGP traffic of an AS. 7.15.1 Establishing the Configuration Task 7.15.2 Configuring a Route-Policy to Set the Traffic Index 7.15.3 Applying a Route-Policy Configured with the Traffic Index 7.15.4 Applying BGP Accounting on an Interface 7.15.5 Checking the Configuration

7.15.1 Establishing the Configuration Task


Applicable Environment
For BGP accounting, routes are classified according to the BGP traffic index, and traffic is charged on the basis of the classification. BGP accounting is valid only when the S9300 needs to search the forwarding table. For example, if BGP accounting is configured for the outgoing traffic on an originating interface, BGP accounting is invalid.

Pre-configuration Tasks
Before configuring BGP accounting, complete the following tasks:
l l l l

7.3 Configuring Basic BGP Functions 7.6.2 Configuring BGP to Advertise Local Routes 7.3.4 (Optional) Configuring a Local Interface for a BGP Connection 7.4 Configuring BGP Route Attributes

Data Preparation
To configure BGP accounting, you need the following data. No. 1 2 Data Defined types ACL number, MAC address, interface type and number, DSCP value, IP preference, RTP protocol port number, IP protocol type, MPLS EXP, and 802.1p priority

7.15.2 Configuring a Route-Policy to Set the Traffic Index


Context
Do as follows on the S9300s that run BGP.
7-52 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


route-policy route-policy-name { permit | deny } node node

A Route-Policy node is created and the Route-Policy view is displayed. Step 3 Run the following command as required:
l

Run:
if-match acl acl-number

The ACL is matched.


l

Run:
if-match cost cost

The cost of the route is matched.


l

Run:
if-match ip-prefix ip-prefix-name

The IP prefix list is matched. Step 4 Run:


apply traffic-index traffic-index

The traffic index is set. ----End

7.15.3 Applying a Route-Policy Configured with the Traffic Index


Context
Do as follows on the S9300s that run BGP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

BGP is enabled and the BGP view is displayed. Step 3 Run:


peer ipv4-address as-number as-number

A BGP peer is created. Step 4 Run:


peer ipv4-address route-policy route-policy-name import

Issue 04 (2010-01-08)

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

7-53

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

A Route-Policy is configured for receiving BGP routes. ----End

7.15.4 Applying BGP Accounting on an Interface


Context
Do as follows on the S9300s that run BGP.

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:


ip bgp-accounting { inbound | outbound }* [ source ]

BGP accounting is applied on the interface. By default, BGP accounting matches the destination address. If source is configured, BGP accounting matches the source address. Currently, BGP accounting supports only the statistics of packets on the public network, and must be configured first on the inbound interface. ----End

7.15.5 Checking the Configuration


Prerequisite
Configuring BGP accounting is complete.

Procedure
l Run the display ip bgp-accounting [ inbound | outbound ] interface [ interface-type interface-number ] command to check information about BGP accounting.

----End

7.16 Configuring BGP GR


This section describes how to configure BGP GR to prevent traffic interruption because of protocol restart. 7.16.1 Establishing the Configuration Task 7.16.2 Enabling BGP GR
7-54 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

7.16.3 Configuring Parameters for a BGP GR Session 7.16.4 Checking the Configuration

7.16.1 Establishing the Configuration Task


Applicable Environment
To prevent the interruption of services because of BGP restart, you need to enable BGP GR and set up BGP GR sessions between the GR restarter and its peers.

Pre-configuration Tasks
Before configuring BGP GR, complete the following task:
l

7.3 Configuring Basic BGP Functions

Data Preparation
To configure BGP GR, you need the following data. No. 1 2 3 Data AS number Maximum period for re-establishing a BGP session Period for waiting for the End-Of-RIB messages

7.16.2 Enabling BGP GR


Context
Do as follows on the S9300 that needs to be enabled with BGP GR.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


graceful-restart

BGP GR is enabled.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 7-55

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

By default, BGP GR is disabled. ----End

7.16.3 Configuring Parameters for a BGP GR Session


Context
Do as follows on the S9300 that needs to be enabled with BGP GR.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


graceful-restart timer restart timer

The maximum period for re-establishing a BGP session is set. The restart period is the maximum period for performing GR on the S9300. That is, the maximum waiting period from the receiving speaker discovering that the peer restarts to the reestablishment of the BGP session. By default, the restart period is 150 seconds.
NOTE

Modifying the maximum period for re-establishing a BGP session leads to the re-establishment of the BGP peer relationship.

Step 4 Run:
graceful-restart timer wait-for-rib timer

The period during which the restarting speaker and receiving speaker wait for End-Of-RIB messages is set. By default, the period for waiting for End-Of-RIB messages is 600 seconds.
NOTE

You can change parameters of a BGP GR session as required. Generally, the default values are recommended.

----End

7.16.4 Checking the Configuration


Prerequisite
Configuring BGP GR is complete.
7-56 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


NOTE

7 BGP Configuration

If an MPLS TE tunnel is configured on the S9300 and the S9300 learns the route to the destination address of the tunnel through BGP, then you need to configure the RSVP GR function on the tunnel.

Procedure
l Run the display bgp peer verbose command to check the status of BGP GR. ----End

7.17 Configuring BGP Security


This section describes how to enhance BGP security. 7.17.1 Establishing the Configuration Task 7.17.2 Configuring the MD5 Authentication 7.17.3 Configuring the BGP GTSM Function 7.17.4 Checking the Configuration

7.17.1 Establishing the Configuration Task


Applicable Environment
l

BGP authentication BGP uses TCP as the transport layer protocol. To enhance BGP security, you can perform the Message Digest 5 (MD5) authentication when a TCP connection is set up. The MD5 authentication, however, does not authenticate BGP packets. Instead, it sets an MD5 authentication password for the TCP connection, and the authentication is then completed by TCP. If the authentication fails, the TCP connection cannot be established.

BGP GTSM The Generalized TTL Security Mechanism (GTSM) prevents attacks by using the TTL detection. For example, an attacker keeps sending simulated packets to the S9300. After receiving these packets, the S9300 sends them to the control plane for BGP processing, without checking the validity of the packets. As a result, the system is busy and the CPU usage is high.

The GTSM function protects the S9300 by checking whether the TTL value in the IP packet header is in a predefined range. This improves the system security.
NOTE

l l

The S9300 supports IPv4 BGP GTSM. The GTSM function supports only unicast addresses; therefore, the GTSM function must be configured on all the nodes configured with routing protocols.

Pre-configuration Tasks
Before configuring BGP security, complete the following task:
l

7.3 Configuring Basic BGP Functions


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

Issue 04 (2010-01-08)

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Data Preparation
To configure BGP security, you need the following data. No. 1 2 3 Data MD5 authentication password Process ID of the routing protocol running on each S9300 IP addresses of BGP peers or names of the peer groups for each S9300

7.17.2 Configuring the MD5 Authentication


Context
Do as follows on the S9300s that run BGP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


peer { ipv4-address | group-name } password { cipher cipher-password | simple simple-password }

An MD5 authentication password is configured. ----End

7.17.3 Configuring the BGP GTSM Function


Context
Do as follows on the peers at both ends.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

7-58

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

The BGP view is displayed. Step 3 Run:


peer { group-name | ipv4-address } valid-ttl-hops [ hops ]

The BGP GTSM function is configured. To apply the GTSM function, you need to enable GTSM on the two ends of a BGP connection. The valid TTL range of the detected packet is [255 - hops + 1, 255]. By default, the valid TTL range is [1, 255], that is, the value of hops is 255. For example, for EBGP direct routes, the value of hops is 1, that is, the valid TTL value is 255.
NOTE

The GTSM and EBGP-MAX-HOP functions affect the TTL values of the sent BGP packets and they conflict with each other. For any peers and peer groups, use either of them.

----End

7.17.4 Checking the Configuration


Prerequisite
Configuring BGP security is complete.

Procedure
l l Run the display bgp peer [ ipv4-address ] [verbose] command to check information about GTSM of BGP peers. Run the display bgp group [ group-name ] command to check information about GTSM of the BGP peer groups.

----End

Example
Run the display bgp peer verbose command and the display bgp group command, and you can view that the GTSM function is enabled on the BGP peers and peer groups, and the configured maximum valid number of TTL hops.

7.18 Maintaining BGP


This section describes how to maintain BGP. 7.18.1 Resetting BGP Connections 7.18.2 Clearing BGP Statistics 7.18.3 Debugging BGP

Issue 04 (2010-01-08)

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

7-59

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7.18.1 Resetting BGP Connections


Context

CAUTION
The BGP peer relationship is interrupted after you reset BGP connections by using the reset bgp command. So, confirm the action before you use the command. When the BGP routing policy or the configuration changes, you need to reset BGP connections to make the configuration take effect. To reset BGP connections, run the following reset commands in the user view. To reset BGP connections, run the following reset commands in the user view.

Procedure
l l l l l l Run the reset bgp all command to reset all BGP connections. Run the reset bgp as-number command to reset the BGP connection between the specified AS. Run the reset bgp ipv4-address command to reset the BGP connection with a specified peer. Run the reset bgp external command to reset all EBGP connections. Run the reset bgp group group-name command to reset the BGP connection with the specified peer groups. Run the reset bgp internal command to reset all IBGP connections.

----End

7.18.2 Clearing BGP Statistics


Context

CAUTION
BGP statistics cannot be restored after you clear it. So, confirm the action before you use the command. To clear BGP statistics, run the following reset commands in the user view.

Procedure
l Run the reset bgp flap-info [ regexp as-path-regexp | as-path-filter as-path-filternumber | ipv4-address [ mask | mask-length ] ] command to clear the statistics on flapping routes. Run the reset bgp dampening [ ipv4-address [ mask | mask-length ] ] command to clear the dampened routes and advertise the suppressed routes.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

7-60

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

Run the reset bgp ipv4-address flap-info command to clear the statistics on flapping routes of the specified peer.

----End

7.18.3 Debugging BGP


Context

CAUTION
Debugging affects the performance of the system. So, after debugging, run the undo debugging all command to disable it immediately. When a BGP fault occurs, run the following debugging commands in the user view to locate the fault.

Procedure
l l l l Run the debugging bgp all command to enable all the debugging of BGP. Run the debugging bgp event command to enable the debugging of BGP events. Run the debugging bgp { keepalive | open | packet | route-refresh } [ receive | send ] [ verbose ] command to enable the debugging of BGP packets. Run the debugging bgp update [ acl acl-number | label-route | ipv4 | l2vpn ] [ peer { ipv4-address | group-name } | ip-prefix ip-prefix-name ] [ receive | send ] [ verbose ] command to enable the debugging of BGP Update packets.

----End

7.19 Configuration Examples


This section provides several configuration examples of BGP. 7.19.1 Example for Configuring Basic BGP Functions 7.19.2 Example for Configuring BGP to Interact With an IGP 7.19.3 Example for Configuring BFD for BGP 7.19.4 Example for Configuring BGP Load Balancing and Setting the MED 7.19.5 Example for Configuring a BGP RR 7.19.6 Example for Configuring a BGP Confederation

Issue 04 (2010-01-08)

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

7-61

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7.19.1 Example for Configuring Basic BGP Functions


Networking Requirements
As shown in Figure 7-1, all S9300s run BGP; an EBGP connection is established between S9300-A and S9300-B; IBGP connections are set up between S9300-B, S9300-C, and S9300D. Figure 7-1 Networking diagram for configuring basic BGP functions
S9300-C
GE1/0/1 GE1/0/2 GE1/0/1 GE1/0/2 GE1/0/1 GE1/0/2

AS65009
GE1/0/2 GE1/0/1

S9300-A AS65008

S9300-B GE1/0/3

S9300-D

S9300 S9300-A S9300-A S9300-B S9300-B S9300-B S9300-C S9300-C S9300-D S9300-D

Interface GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/3 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2

VLANIF interface VLANIF 10 VLANIF 50 VLANIF 10 VLANIF 20 VLANIF 30 VLANIF 20 VLANIF 40 VLANIF 30 VLANIF 40

IP address 200.1.1.2/24 8.1.1.1/8 200.1.1.1/24 9.1.3.1/24 9.1.1.1/24 9.1.3.2/24 9.1.2.1/24 9.1.1.2/24 9.1.2.2/24

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. Configure IBGP connections between S9300-B, S9300-C and S9300-D. Configure an EBGP connection between S9300-A and S9300-B. Advertise routes through the network command on Figure 7-1-A and check the routing tables of S9300-A, S9300-B, and S9300-C. Configure BGP on S9300-B to import direct routes, and check the routing tables of S9300-A and S9300-C.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

7-62

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

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

ID of the VLAN that each interface belongs to, as shown in Figure 7-1 IP address of each VLANIF interface, as shown in Figure 7-1 Router ID of S9300-A being 1.1.1.1 and number of the AS where S9300-A resides being 65008 Router IDs of S9300-B, S9300-C, and S9300-D being 2.2.2.2, 3.3.3.3. and 4.4.4.4, and number of the AS where they reside being 65009

Procedure
Step 1 Create VLANs and add interfaces to the corresponding VLANs.
<Quidway> system-view [Quidway] sysname S9300-A [Quidway] vlan batch 10 50 [S9300-A] interface GigabitEthernet [S9300-A-GigabitEthernet1/0/1] port [S9300-A-GigabitEthernet1/0/1] port [S9300-A-GigabitEthernet1/0/1] quit [S9300-A] interface GigabitEthernet [S9300-A-GigabitEthernet1/0/2] port [S9300-A-GigabitEthernet1/0/2] port [S9300-A-GigabitEthernet1/0/2] quit

1/0/1 hybrid pvid vlan 10 hybrid untagged vlan 10 1/0/2 hybrid pvid vlan 50 hybrid untagged vlan 50

The configurations of S9300-B, S9300-C, and S9300-D are the same as the configuration of S9300-A, and are not mentioned here. Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ip address 200.1.2.1 24 [S9300-A-Vlanif10] quit [S9300-A] interface vlanif 50 [S9300-A-Vlanif50] ip address 8.1.1.1 8 [S9300-A-Vlanif50] quit

The configurations of S9300-B, S9300-C, and S9300-D are the same as the configuration of S9300-A, and are not mentioned here. Step 3 Configure IBGP connections. # Configure S9300-B.
[S9300-B] bgp [S9300-B-bgp] [S9300-B-bgp] [S9300-B-bgp] 65009 router-id 2.2.2.2 peer 9.1.1.2 as-number 65009 peer 9.1.3.2 as-number 65009

# Configure S9300-C.
[S9300-C] bgp [S9300-C-bgp] [S9300-C-bgp] [S9300-C-bgp] [S9300-C-bgp] 65009 router-id 3.3.3.3 peer 9.1.3.1 as-number 65009 peer 9.1.2.2 as-number 65009 quit

# Configure S9300-D.
[S9300-D] bgp 65009 [S9300-D-bgp] router-id 4.4.4.4 [S9300-D-bgp] peer 9.1.1.1 as-number 65009

Issue 04 (2010-01-08)

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

7-63

7 BGP Configuration
[S9300-D-bgp] peer 9.1.2.1 as-number 65009 [S9300-D-bgp] quit

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Step 4 Configure EBGP connections. # Configure S9300-A.


[S9300-A] bgp 65008 [S9300-A-bgp] router-id 1.1.1.1 [S9300-A-bgp] peer 200.1.1.1 as-number 65009

# Configure S9300-B.
[S9300-B-bgp] peer 200.1.1.2 as-number 65008 [S9300-B-bgp] quit

# Check the status of BGP connections.


[S9300-B] display bgp peer BGP local router ID : 2.2.2.2 Local AS number : 65009 Total number of peers : 3 Peer 9.1.1.2 9.1.3.2 200.1.1.2 V 4 4 4 AS 65009 65009 65008 MsgRcvd 49 56 49 MsgSent 62 56 65

Peers in established state : 3 OutQ 0 0 0 Up/Down 00:44:58 00:40:54 00:44:03 State Established Established Established PrefRcv 0 0 1

You can view that the BGP connections between S9300-B and all the other S9300s are set up. Step 5 Configure S9300-A to advertise route 8.0.0.0/8. # Configure S9300-A to advertise routes.
[S9300-A-bgp] ipv4-family unicast [S9300-A-bgp-af-ipv4] network 8.0.0.0 255.0.0.0 [S9300-A-bgp-af-ipv4] quit [S9300-A-bgp] quit

# Check the routing table of S9300-A.


[S9300-A] display bgp routing-table Total Number of Routes: 1 BGP Local router ID is 1.1.1.1 Status codes: * - valid, > - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Network NextHop MED LocPrf PrefVal Path/Ogn *> 8.0.0.0/8 0.0.0.0 0 0 i

# Check the routing table of S9300-B.


[S9300-B] display bgp routing-table Total Number of Routes: 1 BGP Local router ID is 2.2.2.2 Status codes: * - valid, > - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Network NextHop MED LocPrf PrefVal Path/Ogn *> 8.0.0.0/8 200.1.1.2 0 0 65008i

# Check the routing table of S9300-C.


7-64 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


[S9300-C] display bgp routing-table Total Number of Routes: 1

7 BGP Configuration

BGP Local router ID is 3.3.3.3 Status codes: * - valid, > - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Network NextHop MED LocPrf PrefVal Path/Ogn i 8.0.0.0/8 200.1.1.2 0 100 0 65008i

According to the routing table, you can view that S9300-C has learned the route to the destination 8.0.0.0 in AS 65008, but the next hop 200.1.1.2 is unreachable. Therefore, this route is invalid. Step 6 Configure BGP to import direct routes. # Configure S9300-B.
[S9300-B] bgp 65009 [S9300-B-bgp] ipv4-family unicast [S9300-B-bgp-af-ipv4] import-route direct [S9300-B-bgp-af-ipv4] quit [S9300-B-bgp] quit

# Check the BGP routing table of S9300-A.


[S9300-A] display bgp routing-table Total Number of Routes: 4 BGP Local router ID is 1.1.1.1 Status codes: * - valid, > - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Network NextHop MED LocPrf PrefVal Path/Ogn *> *> *> * 8.0.0.0/8 9.1.1.0/24 9.1.3.0/24 200.1.1.0/24 0.0.0.0 200.1.1.1 200.1.1.1 200.1.1.1 0 0 0 0 0 0 0 0 i 65009? 65009? 65009?

# Check the routing table of S9300-C.


[S9300-C] display bgp routing-table Total Number of Routes: 4 BGP Local router ID is 3.3.3.3 Status codes: * - valid, > - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Network NextHop MED LocPrf PrefVal Path/Ogn * i *>i i *>i 8.0.0.0/8 9.1.1.0/24 9.1.3.0/24 200.1.1.0/24 200.1.1.2 9.1.3.1 9.1.3.1 9.1.3.1 0 0 0 0 100 100 100 100 0 0 0 0 65008i ? ? ?

You can view that the route destined for 8.0.0.0 becomes valid, and the next hop is the address of S9300-A. # Perform the ping operation to verify the configuration.
[S9300-C] ping 8.1.1.1 PING 8.1.1.1: 56 data bytes, press CTRL_C to break Reply from 8.1.1.1: bytes=56 Sequence=1 ttl=254 time=31 Reply from 8.1.1.1: bytes=56 Sequence=2 ttl=254 time=47 Reply from 8.1.1.1: bytes=56 Sequence=3 ttl=254 time=31 Reply from 8.1.1.1: bytes=56 Sequence=4 ttl=254 time=16 Reply from 8.1.1.1: bytes=56 Sequence=5 ttl=254 time=31

ms ms ms ms ms

Issue 04 (2010-01-08)

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

7-65

7 BGP Configuration
--- 8.1.1.1 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 16/31/47 ms

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # vlan batch 10 50 # interface Vlanif10 ip address 200.1.1.2 255.255.255.0 # interface Vlanif50 ip address 8.1.1.1 255.0.0.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 50 port hybrid untagged vlan 50 # bgp 65008 router-id 1.1.1.1 peer 200.1.1.1 as-number 65009 # ipv4-family unicast undo synchronization network 8.0.0.0 peer 200.1.1.1 enable # return

Configuration file of S9300-B


# sysname S9300-B # vlan batch 10 20 30 # interface Vlanif10 ip address 200.1.1.1 255.255.255.0 # interface Vlanif20 ip address 9.1.3.1 255.255.255.0 # interface Vlanif30 ip address 9.1.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet1/0/3 port hybrid pvid vlan 30 port hybrid untagged vlan 30 #

7-66

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


bgp 65009 router-id 2.2.2.2 peer 9.1.1.2 as-number 65009 peer 9.1.3.2 as-number 65009 peer 200.1.1.2 as-number 65008 # ipv4-family unicast undo synchronization import-route direct peer 9.1.1.2 enable peer 9.1.3.2 enable peer 200.1.1.2 enable # return l

7 BGP Configuration

Configuration file of S9300-C


# sysname S9300-C # vlan batch 20 40 # interface Vlanif20 ip address 9.1.3.2 255.255.255.0 # interface Vlanif40 ip address 9.1.2.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 40 port hybrid untagged vlan 40# bgp 65009 router-id 3.3.3.3 peer 9.1.2.2 as-number 65009 peer 9.1.3.1 as-number 65009 # ipv4-family unicast undo synchronization peer 9.1.2.2 enable peer 9.1.3.1 enable # return

Configuration file of S9300-D


# sysname S9300-D # vlan batch 30 40 # interface Vlanif30 ip address 9.1.1.2 255.255.255.0 # interface Vlanif40 ip address 9.1.2.2 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # bgp 65009 router-id 4.4.4.4 peer 9.1.1.1 as-number 65009 peer 9.1.2.1 as-number 65009

Issue 04 (2010-01-08)

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

7-67

7 BGP Configuration
# ipv4-family unicast undo synchronization peer 9.1.1.1 enable peer 9.1.2.1 enable # return

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7.19.2 Example for Configuring BGP to Interact With an IGP


Networking Requirements
As shown in Figure 7-2, OSPF is used inside AS 65009. An EBGP connection is set up between S9300-A and S9300-B. S9300-C runs OSPF instead of BGP. Figure 7-2 Networking diagram for configuring BGP to interact with an IGP

AS 65008
GE1/0/2 GE1/0/1 GE1/0/1

AS 65009
GE1/0/2 GE1/0/1 GE1/0/2

S9300-A

S9300-B

S9300-C

S9300 S9300-A S9300-A S9300-B S9300-B S9300-C S9300-C

Interface GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2

VLANIF interface VLANIF 10 VLANIF 30 VLANIF 10 VLANIF 20 VLANIF 20 VLANIF 40

IP address 3.1.1.2/24 8.1.1.1/24 3.1.1.1/24 9.1.1.1/24 9.1.1.2/24 9.1.2.1/24

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. Configure OSPF on S9300-B and S9300-C. Configure an EBGP connection on S9300-A and S9300-B. Configure BGP to interact with OSPF on S9300-B and check the routes. Configure BGP route aggregation on S9300-B to simplify the BGP routing table.

Data Preparation
To complete the configuration, you need the following data:
7-68 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


l l l l

7 BGP Configuration

ID of the VLAN that each interface belongs to, as shown in Figure 7-2 IP address of each VLANIF interface, as shown in Figure 7-2 Router ID of S9300-A being 1.1.1.1 and number of the AS where it resides being 65008 Router IDs of S9300-B and S9300-C being 2.2.2.2 and 3.3.3.3, and number of the AS where they reside being 65009

Procedure
Step 1 Create VLANs and add interfaces to the corresponding VLANs.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] vlan 10 [S9300-A-vlan10] quit [S9300-A] vlan 30 S9300-A-vlan30] quit [S9300-A] interface GigabitEthernet [S9300-A-GigabitEthernet1/0/1] port [S9300-A-GigabitEthernet1/0/1] port [S9300-A-GigabitEthernet1/0/1] quit [S9300-A] interface GigabitEthernet [S9300-A-GigabitEthernet1/0/2] port [S9300-A-GigabitEthernet1/0/2] port [S9300-A-GigabitEthernet1/0/2] quit

1/0/1 hybrid pvid vlan 10 hybrid untagged vlan 10 1/0/2 hybrid pvid vlan 30 hybrid untagged vlan 30

The configurations of S9300-B and S9300-C are the same as the configuration of S9300-A, and are not mentioned here. Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ip address 3.1.1.2 24 [S9300-A-Vlanif10] quit [S9300-A] interface vlanif 30 [S9300-A-Vlanif30] ip address 8.1.1.1 24 [S9300-A-Vlanif30] quit

The configurations of S9300-B and S9300-C are the same as the configuration of S9300-A, and are not mentioned here. Step 3 Configure OSPF. # Configure S9300-B.
[S9300-B] ospf 1 [S9300-B-ospf-1] area 0 [S9300-B-ospf-1-area-0.0.0.0] network 9.1.1.0 0.0.0.255 [S9300-B-ospf-1-area-0.0.0.0] quit [S9300-B-ospf-1] quit

# Configure S9300-C.
[S9300-C] ospf 1 [S9300-C-ospf-1] area 0 [S9300-C-ospf-1-area-0.0.0.0] network 9.1.1.0 0.0.0.255 [S9300-C-ospf-1-area-0.0.0.0] network 9.1.2.0 0.0.0.255 [S9300-C-ospf-1-area-0.0.0.0] quit [S9300-C-ospf-1] quit

Step 4 Configure an EBGP connection. # Configure S9300-A.


[S9300-A] bgp 65008 [S9300-A-bgp] router-id 1.1.1.1 [S9300-A-bgp] peer 3.1.1.1 as-number 65009

Issue 04 (2010-01-08)

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

7-69

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

[S9300-A-bgp] ipv4-family unicast [S9300-A-bgp-af-ipv4] network 8.1.1.0 255.255.255.0 [S9300-A-bgp-af-ipv4] quit [S9300-A-bgp] quit

# Configure S9300-B.
[S9300-B] bgp 65009 [S9300-B-bgp] router-id 2.2.2.2 [S9300-B-bgp] peer 3.1.1.2 as-number 65008

Step 5 Configure BGP to interact with an IGP. # On S9300-B, configure BGP to import OSPF routes.
[S9300-B-bgp] ipv4-family unicast [S9300-B-bgp-af-ipv4] import-route ospf 1 [S9300-B-bgp-af-ipv4] quit [S9300-B-bgp] quit

# Check the routing table of S9300-A.


[S9300-A] display bgp routing-table Total Number of Routes: 3 BGP Local router ID is 1.1.1.1 Status codes: * - valid, > - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Network NextHop MED LocPrf PrefVal Path/Ogn *> 8.1.1.0/24 0.0.0.0 0 0 i *> 9.1.1.0/24 3.1.1.1 0 0 65009? *> 9.1.2.0/24 3.1.1.1 2 0 65009?

# On S9300-B, configure OSPF to import BGP routes.


[S9300-B] ospf [S9300-B-ospf-1] import-route bgp [S9300-B-ospf-1] quit

# Check the routing table of S9300-C.


[S9300-C] display ip routing-table Route Flags: R - relay, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 7 Routes : 7 Destination/Mask 8.1.1.0/24 9.1.1.0/24 9.1.1.2/32 9.1.2.0/24 9.1.2.1/32 127.0.0.0/8 127.0.0.1/32 Proto O_ASE Direct Direct Direct Direct Direct Direct Pre 150 0 0 0 0 0 0 Cost 1 0 0 0 0 0 0 Flags D D D D D D D NextHop 9.1.1.1 9.1.1.2 127.0.0.1 9.1.2.1 127.0.0.1 127.0.0.1 127.0.0.1 Interface Vlanif20 Vlanif20 InLoopBack0 Vlanif40 InLoopBack0 InLoopBack0 InLoopBack0

Step 6 Configure automatic aggregation. # Configure S9300-B.


[S9300-B] bgp 65009 [S9300-B-bgp] ipv4-family unicast [S9300-B-bgp-af-ipv4] summary automatic [S9300-B-bgp-af-ipv4] quit [S9300-B-bgp] quit

# Check the BGP routing table of S9300-A.


7-70 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


[S9300-A] display bgp routing-table Total Number of Routes: 2

7 BGP Configuration

BGP Local router ID is 1.1.1.1 Status codes: * - valid, > - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Network NextHop MED LocPrf PrefVal Path/Ogn *> *> 8.1.1.0/24 9.0.0.0 0.0.0.0 3.1.1.1 0 0 0 i 65009?

# Perform the ping operation to verify the configuration.


[S9300-A] ping -a 8.1.1.1 9.1.2.1 PING 9.1.2.1: 56 data bytes, press CTRL_C to break Reply from 9.1.2.1: bytes=56 Sequence=1 ttl=254 time=15 Reply from 9.1.2.1: bytes=56 Sequence=2 ttl=254 time=31 Reply from 9.1.2.1: bytes=56 Sequence=3 ttl=254 time=47 Reply from 9.1.2.1: bytes=56 Sequence=4 ttl=254 time=46 Reply from 9.1.2.1: bytes=56 Sequence=5 ttl=254 time=47 --- 9.1.2.1 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 15/37/47 ms

ms ms ms ms ms

----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # vlan batch 10 30 # interface Vlanif10 ip address 3.1.1.2 255.255.255.0 # interface Vlanif30 ip address 8.1.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # bgp 65008 router-id 1.1.1.1 peer 3.1.1.1 as-number 65009 # ipv4-family unicast undo synchronization network 8.1.1.0 255.255.255.0 peer 3.1.1.1 enable # return

Configuration file of S9300-B


# sysname S9300-B # vlan batch 10 20

Issue 04 (2010-01-08)

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

7-71

7 BGP Configuration
# interface Vlanif10 ip address 3.1.1.1 255.255.255.0 # interface Vlanif20 ip address 9.1.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # bgp 65009 router-id 2.2.2.2 peer 3.1.1.2 as-number 65008 # ipv4-family unicast undo synchronization summary automatic import-route ospf 1 peer 3.1.1.2 enable # ospf 1 import-route bgp area 0.0.0.0 network 9.1.1.0 0.0.0.255 return l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of S9300-C


# sysname S9300-C # vlan batch 20 40 # interface Vlanif20 ip address 9.1.1.2 255.255.255.0 # interface Vlanif40 ip address 9.1.2.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # ospf 1 area 0.0.0.0 network 9.1.1.0 0.0.0.255 network 9.1.2.0 0.0.0.255 # return

7.19.3 Example for Configuring BFD for BGP


Networking Requirements
As shown in Figure 7-3, S9300-A belongs to AS 100, and S9300-B and S9300-C belong to AS 200. EBGP connections are established between S9300-A and S9300-B and between S9300-A and S9300-C.

7-72

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

Service flow is transmitted on the active link S9300-A S9300-B. The link S9300-A S9300-C S9300-B acts as the standby link. Use BFD to detect the BGP peer relationship between S9300-A and S9300-B. When the link between S9300-A and S9300-B fails, BFD can rapidly detect the fault and notify BGP. Service flows are transmitted on the standby link. Figure 7-3 Networking diagram for configuring BFD for BGP
S9300-B
GE3/0/0 GE2/0/0 GE2/0/0 GE1/0/0 GE1/0/0

EBGP IBGP AS 200

S9300-A AS 100
GE1/0/0 GE2/0/0

EBGP S9300-C

S9300 S9300-A S9300-A S9300-B S9300-B S9300-B S9300-C S9300-C

Interface GigabitEthernet1/0/0 GigabitEthernet2/0/0 GigabitEthernet1/0/0 GigabitEthernet2/0/0 GigabitEthernet3/0/0 GigabitEthernet1/0/0 GigabitEthernet2/0/0

VLANIF interface VLANIF 10 VLANIF 20 VLANIF 30 VLANIF 20 VLANIF 40 VLANIF 10 VLANIF 30

IP address 200.1.2.1/24 200.1.1.1/24 9.1.1.1/24 200.1.1.2/24 172.16.1.1/24 200.1.2.2/24 9.1.1.2/24

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Configure basic BGP functions on each S9300. Configure MED attributes to control the route selection. Enable BFD on S9300-A and S9300-B.

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

Router IDs and AS numbers of S9300-A S9300-B, and S9300-C


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

Issue 04 (2010-01-08)

7 BGP Configuration
l l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Peer IP address detected by BFD Minimum interval for sending BFD control packets, minimum interval for receiving BFD control packets, and local detection multiplier

Procedure
Step 1 Assign IP addresses to the interfaces of S9300s. The configuration details are not mentioned here. Step 2 Configure basic BGP functions, establish EBGP connections between S9300-A and S9300-B and between S9300-A and S9300-C, and establish an IBGP connection S9300-B and S9300-C. # Configure S9300-A.
[S9300-A] bgp [S9300-A-bgp] [S9300-A-bgp] [S9300-A-bgp] [S9300-A-bgp] 100 router-id 1.1.1.1 peer 200.1.1.2 as-number 200 peer 200.1.2.2 as-number 200 quit

# Configure S9300-B.
[S9300-B] bgp [S9300-B-bgp] [S9300-B-bgp] [S9300-B-bgp] [S9300-B-bgp] [S9300-B-bgp] 200 router-id 2.2.2.2 peer 200.1.1.1 as-number 100 peer 9.1.1.2 as-number 200 network 9.1.1.0 255.255.255.0 quit

# Configure S9300-C.
[S9300-C] bgp [S9300-C-bgp] [S9300-C-bgp] [S9300-C-bgp] [S9300-C-bgp] [S9300-C-bgp] [S9300-C-bgp] 200 router-id 3.3.3.3 peer 200.1.2.1 as-number 100 peer 9.1.1.1 as-number 200 network 9.1.1.0 255.255.255.0 network 172.16.1.0 255.255.255.0 quit

# On S9300-A, you can view that the BGP peer is established.


<S9300-A> display bgp peer BGP local router ID : 1.1.1.1 Local AS number : 100 Total number of peers : 2 Peer PrefRcv 200.1.1.2 200.1.2.2 V 4 4 AS 200 200 MsgRcvd 2 2 MsgSent 5 4

Peers in established state : 2 OutQ 0 0 Up/Down 00:01:25 00:00:55 State Established Established 0 0

Step 3 Set the MED. Set the MED sent from S9300-B to S9300-C through the policy. # Configure S9300-B.
[S9300-B] route-policy 10 permit node 10 [S9300-B-route-policy] apply cost 100 [S9300-B-route-policy] quit [S9300-B] bgp 200 [S9300-B-bgp] peer 200.1.1.2 route-policy 10 export

# Configure S9300-C.
7-74 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


[S9300-C] route-policy 10 permit node 10 [S9300-C-route-policy] apply cost 150 [S9300-C-route-policy] quit [S9300-C] bgp 200 [S9300-C-bgp] peer 200.1.2.2 route-policy 10 export

7 BGP Configuration

# View all BGP routing information on S9300-A.


<S9300-A> display bgp routing-table Total Number of Routes: 2 BGP Local router ID is 1.1.1.1 Status codes: * - valid, > - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Network NextHop MED LocPrf PrefVal Path/Ogn *> * 172.16.1.0/24 200.1.1.2 200.1.2.2 100 150 0 0 200i 200i

According to the BGP routing table, the next hop address of the route destined for 172.16.1.0/24 is 200.1.1.2 and service flow is transmitted on the active link S9300-A S9300-B. Step 4 Enable BFD, and set the interval for sending packets, the interval for receiving packets, and the local detection multiplier. # Enable BFD on S9300-A and set the minimum interval for sending packets and the minimum interval for receiving packets to 100 ms and the local detection multiplier to 4.
[S9300-A] bfd [S9300-A-bfd] [S9300-A] bgp [S9300-A-bgp] [S9300-A-bgp] multiplier 4 quit 100 peer 200.1.1.2 bfd enable peer 200.1.1.2 bfd min-tx-interval 100 min-rx-interval 100 detect-

# Enable BFD on S9300-B and set the minimum interval for sending packets and the minimum interval for receiving packets to 100 ms and the local detection multiplier to 4.
[S9300-B] bfd [S9300-B-bfd] [S9300-B] bgp [S9300-B-bgp] [S9300-B-bgp] multiplier 4 quit 200 peer 200.1.1.1 bfd enable peer 200.1.1.1 bfd min-tx-interval 100 min-rx-interval 100 detect-

# Display all BFD sessions set up by BGP on S9300-A.


<S9300-A> display bgp bfd session all -------------------------------------------------------------------------------Local_Address Peer_Address LD/RD Interface 200.1.1.1 200.1.1.2 8201/8201 Vlanif20 Tx-interval(ms) Rx-interval(ms) Multiplier Session-State 100 100 4 Up --------------------------------------------------------------------------------

Step 5 Verify the configuration. # Run the shutdown command on VLANIF20 of S9300-B to simulate faults on the active link.
[S9300-B] interface vlanif 20 [S9300-B-Vlanif20] shutdown

# Check the BGP routing table on S9300-A.


<S9300-A> display bgp routing-table

Issue 04 (2010-01-08)

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

7-75

7 BGP Configuration
Total Number of Routes: 1

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

BGP Local router ID is 1.1.1.1 Status codes: * - valid, > - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Network NextHop MED LocPrf PrefVal Path/Ogn *> 172.16.1.0/24 200.1.2.2 150 0 200i

According to the BGP routing table, the standby link S9300-A S9300-C S9300-B takes effect after the active link fails. The next hop address of the route destined for 172.16.1.0/24 becomes 200.1.2.2. ----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # router id 1.1.1.1 # vlan batch 10 20 # bfd # interface Vlanif10 ip address 200.1.2.1 255.255.255.0 # interface Vlanif20 ip address 200.1.1.1 255.255.255.0 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # bgp 100 router-id 1.1.1.1 peer 200.1.1.2 as-number 200 peer 200.1.1.2 bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4 peer 200.1.1.2 bfd enable peer 200.1.2.2 as-number 200 # ipv4-family unicast undo synchronization peer 200.1.1.2 enable peer 200.1.2.2 enable # return

Configuration file of S9300-B


# sysname S9300-B # router id 2.2.2.2 # vlan batch 20 30 40 # bfd #

7-76

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

interface Vlanif30 ip address 9.1.1.1 255.255.255.0 # interface Vlanif20 ip address 200.1.1.2 255.255.255.0 # interface Vlanif40 ip address 172.16.1.1 255.255.255.0 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet3/0/0 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # bgp 200 router-id 2.2.2.2 peer 9.1.1.2 as-number 200 peer 200.1.1.1 as-number 100 peer 200.1.1.1 bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4 peer 200.1.1.1 bfd enable # ipv4-family unicast undo synchronization network 172.16.1.0 255.255.255.0 peer 9.1.1.2 enable peer 200.1.1.1 enable peer 200.1.1.1 route-policy toa export # route-policy toa permit node 10 apply cost 100 # return l

Configuration file of S9300-C


# sysname S9300-C # router id 3.3.3.3 # vlan batch 10 30 # bfd # interface Vlanif10 ip address 200.1.2.2 255.255.255.0 # interface Vlanif30 ip address 9.1.1.2 255.255.255.0 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # bgp 200 router-id 3.3.3.3 peer 9.1.1.1 as-number 200 peer 200.1.2.1 as-number 100 #

Issue 04 (2010-01-08)

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

7-77

7 BGP Configuration
ipv4-family unicast undo synchronization peer 9.1.1.1 enable peer 200.1.2.1 enable peer 200.1.2.1 route-policy c2a export # route-policy c2a permit node 10 apply cost 150 # return

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7.19.4 Example for Configuring BGP Load Balancing and Setting the MED
Networking Requirements
As shown in Figure 7-4, all S9300s run BGP. S9300-A resides in AS 65008. Both S9300-B and S9300-C reside in AS 65009. EBGP runs among S9300-A, S9300-B, and S9300-C. IBGP runs between S9300-B and S9300-C. Figure 7-4 Networking diagram of BGP route selection

S9300-B
EBGP GE1/0/1 GE1/0/2 IBGP GE1/0/2 EBGP GE1/0/1

S9300-A GE1/0/1 AS 65009


GE1/0/2

AS 65008

S9300-C

S9300 S9300-A S9300-A S9300-B S9300-B S9300-C S9300-C

Interface GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2

VLANIF interface VLANIF 10 VLANIF 20 VLANIF 10 VLANIF 30 VLANIF 20 VLANIF 30

IP address 200.1.1.2/24 200.1.2.2/24 200.1.1.1/24 9.1.1.1/24 200.1.2.1/24 9.1.1.2/24

Configuration Roadmap
The configuration roadmap is as follows:
7-78 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

1. 2.

Establish EBGP connections between S9300-A and S9300-B, and between S9300-A and S9300-C; establish an IBGP connection between S9300-B and S9300-C. Configure load balancing and set the MED on S9300-A and check the routing table.

Context
To complete the configuration, you need the following data:
l l l

ID of the VLAN that each interface belongs to, as shown in Figure 7-4 IP address of each VLANIF interface, as shown in Figure 7-4 Router IDs of S9300-A being 1.1.1.1, number of the AS where it resides being 65008, and number of routes for load balancing being 2 Router IDs of S9300-B and S9300-C being 2.2.2.2 and 3.3.3.3, number of the AS where they reside being 65008, and default MED of S9300-B being 100

Procedure
Step 1 Create VLANs and add interfaces to the corresponding VLANs.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] vlan batch 10 20 [S9300-A] interface GigabitEthernet 1/0/1 [S9300-A-GigabitEthernet1/0/1] port hybrid pvid vlan 10 [S9300-A-GigabitEthernet1/0/1] port hybrid untagged vlan 10 [S9300-A-GigabitEthernet1/0/1] quit [S9300-A] interface GigabitEthernet 1/0/2 [S9300-A-GigabitEthernet1/0/2]port hybrid pvid vlan 20 [S9300-A-GigabitEthernet1/0/2]port hybrid untagged vlan 20 [S9300-A-GigabitEthernet1/0/2] quit

The configurations of S9300-B and S9300-C are the same as the configuration of S9300-A, and are not mentioned here. Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ip address 200.1.1.2 24 [S9300-A-Vlanif10] quit [S9300-A] interface vlanif 20 [S9300-A-Vlanif20] ip address 200.1.2.2 24 [S9300-A-Vlanif20] quit

The configurations of S9300-B and S9300-C are the same as the configuration of S9300-A, and are not mentioned here. Step 3 Establish an EBGP connection. # Configure S9300-A.
[S9300-A] bgp [S9300-A-bgp] [S9300-A-bgp] [S9300-A-bgp] [S9300-A-bgp] 65008 router-id 1.1.1.1 peer 200.1.1.1 as-number 65009 peer 200.1.2.1 as-number 65009 quit

# Configure S9300-B.
[S9300-B] bgp [S9300-B-bgp] [S9300-B-bgp] [S9300-B-bgp] [S9300-B-bgp] 65009 router-id 2.2.2.2 peer 200.1.1.2 as-number 65008 peer 9.1.1.2 as-number 65009 ipv4-family unicast

Issue 04 (2010-01-08)

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

7-79

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

[S9300-B-bgp-af-ipv4] network 9.1.1.0 255.255.255.0 [S9300-B-bgp-af-ipv4] quit [S9300-B-bgp] quit

# Configure S9300-C.
[S9300-C] bgp 65009 [S9300-C-bgp] router-id 3.3.3.3 [S9300-C-bgp] peer 200.1.2.2 as-number 65008 [S9300-C-bgp] peer 9.1.1.1 as-number 65009 [S9300-C-bgp] ipv4-family unicast [S9300-C-bgp-af-ipv4] network 9.1.1.0 255.255.255.0 [S9300-C-bgp-af-ipv4] quit [S9300-C-bgp] quit

# Check the routing table of S9300-A.


[S9300-A] display bgp routing-table Total Number of Routes: 2 BGP Local router ID is 1.1.1.1 Status codes: * - valid, > - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Network NextHop MED LocPrf PrefVal Path/Ogn *> * 9.1.1.0/24 200.1.1.1 200.1.2.1 0 0 0 0 65009i 65009i

According to the routing table, you can view that there are two valid routes destined for 9.1.1.0/24. The route whose next hop is 200.1.1.1 is the optimal route because the router ID of S9300-B is smaller. Step 4 Configure load balancing. # Configure S9300-A.
[S9300-A] bgp 65008 [S9300-A-bgp] ipv4-family unicast [S9300-A-bgp-af-ipv4] maximum load-balancing 2 [S9300-A-bgp-af-ipv4] quit [S9300-A-bgp] quit

# Check the routing table of S9300-A.


[S9300-A] display bgp routing-table Total Number of Routes: 2 BGP Local router ID is 1.1.1.1 Status codes: * - valid, > - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Network NextHop MED LocPrf PrefVal Path/Ogn *> *> 9.1.1.0/24 200.1.1.1 200.1.2.1 0 0 0 0 65009i 65009i

According to the routing table, you can view that the BGP route 9.1.1.0/24 has two next hops that are 200.1.1.1 and 200.1.2.1. Both of them are optimal routes. Step 5 Set the MED. # Set the MED sent from S9300-B to S9300-A through the policy.
[S9300-B] route-policy 10 permit node 10 [S9300-B-route-policy] apply cost 100 [S9300-B-route-policy] quit

7-80

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


[S9300-B] bgp 65009 [S9300-B-bgp] peer 200.1.1.2 route-policy 10 export

7 BGP Configuration

# Check the routing table of S9300-A.


[S9300-A] display bgp routing-table Total Number of Routes: 2 BGP Local router ID is 1.1.1.1 Status codes: * - valid, > - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Network NextHop MED LocPrf PrefVal Path/Ogn *> * 9.1.1.0/24 200.1.2.1 200.1.1.1 0 100 0 0 65009i 65009i

According to the routing table, you can view that the MED of the next hop 200.1.1.1 (S9300B) is 100, and that of the next hop 200.1.2.1 is 0. Therefore, the route with the smaller MED is selected. ----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # vlan batch 10 20 # interface Vlanif10 ip address 200.1.1.2 255.255.255.0 # interface Vlanif20 ip address 200.1.2.2 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # bgp 65008 router-id 1.1.1.1 peer 200.1.1.1 as-number 65009 peer 200.1.2.1 as-number 65009 # ipv4-famlily unicast undo synchronization maximum load-balancing 2 peer 200.1.1.1 enable peer 200.1.2.1 enable # return

Configuration file of S9300-B


# sysname S9300-B # vlan batch 10 30 # interface Vlanif10 ip address 200.1.1.1 255.255.255.0 #

Issue 04 (2010-01-08)

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

7-81

7 BGP Configuration
interface Vlanif30 ip address 9.1.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # bgp 65009 router-id 2.2.2.2 peer 9.1.1.2 as-number 65009 peer 200.1.1.2 as-number 65008 # ipv4-family unicast undo synchronization default med 100 network 9.1.1.0 255.255.255.0 peer 9.1.1.2 enable peer 200.1.1.2 enable peer 200.1.1.2 route-policy 10 export # route-policy 10 permit node 10 apply cost 100 # return l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of S9300-C


# sysname S9300-C # vlan batch 20 30 # interface Vlanif10 ip address 200.1.2.1 255.255.255.0 # interface Vlanif30 ip address 9.1.1.2 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # bgp 65009 router-id 3.3.3.3 peer 9.1.1.1 as-number 65009 peer 200.1.2.2 as-number 65008 # ipv4-family unicast undo synchronization network 9.1.1.0 255.255.255.0 peer 9.1.1.1 enable peer 200.1.2.2 enable # return

7.19.5 Example for Configuring a BGP RR


Networking Requirements
As shown in Figure 7-5, S9300-A is a non-client. S9300-B is the RR of cluster 1. S9300-D and S9300-E are two clients of cluster 1. Because the IBGP connection is created between S93007-82 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

D and S9300-E, they do not need an RR. S9300-C is the RR of cluster 2. S9300-F, S9300-G, and S9300-H are the clients of cluster 2. It is required that the peer groups be used to simplify configuration and management. Figure 7-5 Networking diagram for configuring a BGP RR

GE1/0/3 GE1/0/1

S9300-A
GE1/0/2

AS 65010
GE1/0/1 GE1/0/1

S9300-C

S9300-H

S9300-B
GE1/0/3 GE1/0/1

GE1/0/2 GE1/0/4

GE1/0/2 GE1/0/3 GE1/0/1

GE2/0/1 GE1/0/1 GE1/0/4

Cluster1
GE1/0/2 GE1/0/2

GE1/0/1

Cluster2
GE1/0/1

S9300-D

S9300-E

S9300-F

S9300-G

S9300 S9300-A S9300-A S9300-A S9300-B S9300-B S9300-B S9300-B S9300-C S9300-C S9300-C S9300-C S9300-C S9300-D S9300-D S9300-E S9300-E S9300-F S9300-G S9300-H

Interface GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/3 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/3 GigabitEthernet1/0/4 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/3 GigabitEthernet1/0/4 GigabitEthernet2/0/1 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/1 GigabitEthernet1/0/1

VLANIF interface VLANIF 10 VLANIF 30 VLANIF 100 VLANIF 10 VLANIF 20 VLANIF 40 VLANIF 50 VLANIF 30 VLANIF 20 VLANIF 70 VLANIF 80 VLANIF 90 VLANIF 40 VLANIF 60 VLANIF 50 VLANIF 60 VLANIF 70 VLANIF 80 VLANIF 90

IP address 10.1.1.2/24 10.1.3.2/24 9.1.1.1/24 10.1.1.1/24 10.1.2.1/24 10.1.4.1/24 10.1.5.1/24 10.1.3.1/24 10.1.2.2/24 10.1.7.1/24 10.1.8.1/24 10.1.9.1/24 10.1.4.2/24 10.1.6.1/24 10.1.5.2/24 10.1.6.2/24 10.1.7.2/24 10.1.8.2/24 10.1.9.2/24

Issue 04 (2010-01-08)

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

7-83

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. Establish IBGP connections between the client and the RR, and between the non-client and the RR. Configure route reflection on S9300-B and S9300-C, specify the client, and check the routes.

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

ID of the VLAN that each interface belongs to, as shown in Figure 7-5 IP address of each VLANIF interface, as shown in Figure 7-5 Number of the AS where all S9300s reside being 65010 Router IDs of S9300-A, S9300-B, S9300-C, S9300-D, S9300-E, S9300-F, S9300-G, and S9300-H being 1.1.1.1, 2.2.2.2, 3.3.3.3, 4.4.4.4, 5.5.5.5, 6.6.6.6, 7.7.7.7, and 8.8.8.8 ID of the cluster where S9300-B resides being 1 and ID of the cluster where S9300-C resides being 2

Procedure
Step 1 Create VLANs and add interfaces to the corresponding VLANs.
<Quidway> system-view [Quidway] sysname S9300-A [Quidway] vlan batch 10 30 100 [S9300-A] interface GigabitEthernet [S9300-A-GigabitEthernet1/0/1] port [S9300-A-GigabitEthernet1/0/1] port [S9300-A-GigabitEthernet1/0/1] quit [S9300-A] interface GigabitEthernet [S9300-A-GigabitEthernet1/0/2] port [S9300-A-GigabitEthernet1/0/2] port [S9300-A-GigabitEthernet1/0/2] quit [S9300-A] interface GigabitEthernet [S9300-A-GigabitEthernet1/0/3] port [S9300-A-GigabitEthernet1/0/3] port [S9300-A-GigabitEthernet1/0/3] quit

1/0/1 hybrid pvid vlan 10 hybrid untagged vlan 10 1/0/2 hybrid pvid vlan 30 hybrid untagged vlan 30 1/0/3 hybrid pvid vlan 100 hybrid untagged vlan 100

The configurations of S9300-B, S9300-C, S9300-D, S9300-E, S9300-F, S9300-G, and S9300H are the same as the configuration of S9300-A, and are not mentioned here. Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ip address 10.1.1.2 24 [S9300-A-Vlanif10] quit [S9300-A] interface vlanif 30 [S9300-A-Vlanif30] ip address 10.1.3.2 24 [S9300-A-Vlanif30] quit [S9300-A] interface vlanif 100 [S9300-A-Vlanif100] ip address 9.1.1.1 24 [S9300-A-Vlanif100] quit

Step 3 Establish IBGP connections between the clients and the RR, and between the non-clients and the RR. The configuration details are not mentioned here.
7-84 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

Step 4 Configure S9300-A to advertise the local network route 9.1.1.0/24. The configuration details are not mentioned here. Step 5 Configure the RR. # Configure S9300-B.
[S9300-B] bgp 65010 [S9300-B-bgp] router-id 2.2.2.2 [S9300-B-bgp] group in_rr internal [S9300-B-bgp] peer 10.1.4.2 group in_rr [S9300-B-bgp] peer 10.1.5.2 group in_rr [S9300-B-bgp] ipv4-family unicast [S9300-B-bgp-af-ipv4] peer in_rr reflect-client [S9300-B-bgp-af-ipv4] undo reflect between-clients [S9300-B-bgp-af-ipv4] reflector cluster-id 1 [S9300-B-bgp-af-ipv4] quit [S9300-B-bgp] quit

# Configure S9300-C.
[S9300-C] bgp 65010 [S9300-C-bgp] router-id 3.3.3.3 [S9300-C-bgp] group in_rr internal [S9300-C-bgp] peer 10.1.7.2 group in_rr [S9300-C-bgp] peer 10.1.8.2 group in_rr [S9300-C-bgp] peer 10.1.9.2 group in_rr [S9300-C-bgp] ipv4-family unicast [S9300-C-bgp-af-ipv4] peer in_rr reflect-client [S9300-C-bgp-af-ipv4] reflector cluster-id 2 [S9300-C-bgp-af-ipv4] quit [S9300-C-bgp] quit

# Check the routing table of S9300-D.


[S9300-D] display bgp routing-table 9.1.1.0 BGP local router ID : 4.4.4.4 Local AS number : 65010 Paths: 1 available, 0 best BGP routing table entry information of 9.1.1.0/24: From: 10.1.4.1 (2.2.2.2) Original nexthop: 10.1.1.2 Convergence Priority: AS-path Nil, origin igp, MED 0, localpref 100, pref-val 0, internal, pre 255 Originator: 1.1.1.1 Cluster list: 0.0.0.1 Not advertised to any peers yet

According to the routing table, you can view that S9300-D has learned the route advertised by S9300-A from S9300-B. You can also view the Originator and Cluster_ID of the route. ----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # vlan batch 10 30 100 # interface Vlanif10 ip address 10.1.1.2 255.255.255.0 #

Issue 04 (2010-01-08)

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

7-85

7 BGP Configuration
interface Vlanif30 ip address 10.1.3.2 255.255.255.0 # interface Vlanif100 ip address 9.1.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface GigabitEthernet1/0/3 port hybrid pvid vlan 100 port hybrid untagged vlan 100 # bgp 65010 router-id 1.1.1.1 peer 10.1.1.1 as-number 65010 peer 10.1.3.1 as-number 65010 # ipv4-family unicast undo synchronization network 9.1.1.0 255.255.255.0 peer 10.1.1.1 enable peer 10.1.3.1 enable # return l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of S9300-B


# sysname S9300-B # vlan batch 10 20 40 50 # interface Vlanif10 ip address 10.1.1.1 255.255.255.0 # interface Vlanif20 ip address 10.1.2.1 255.255.255.0 # interface Vlanif40 ip address 10.1.4.1 255.255.255.0 # interface Vlanif50 ip address 10.1.5.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet1/0/3 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # interface GigabitEthernet1/0/4 port hybrid pvid vlan 50 port hybrid untagged vlan 50 # bgp 65010 router-id 2.2.2.2 peer 10.1.1.2 as-number 65010 peer 10.1.2.2 as-number 65010 group in_rr internal

7-86

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


peer 10.1.4.2 as-number 65010 peer 10.1.4.2 group in_rr peer 10.1.5.2 as-number 65010 peer 10.1.5.2 group in_rr # ipv4-family unicast undo synchronization undo reflect between-clients reflector cluster-id 1 peer 10.1.1.2 enable peer 10.1.2.2 enable peer in_rr enable peer in_rr reflect-client peer 10.1.4.2 enable peer 10.1.4.2 group in_rr peer 10.1.5.2 enable peer 10.1.5.2 group in_rr # return l

7 BGP Configuration

Configuration file of S9300-C


# sysname S9300-C # vlan batch 20 30 70 80 90 # interface Vlanif20 ip address 10.1.2.2 255.255.255.0 # interface Vlanif30 ip address 10.1.3.1 255.255.255.0 # interface Vlanif70 ip address 10.1.7.1 255.255.255.0 # interface Vlanif80 ip address 10.1.8.1 255.255.255.0 # interface Vlanif90 ip address 10.1.9.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet1/0/3 port hybrid pvid vlan 70 port hybrid untagged vlan 70 # interface GigabitEthernet1/0/4 port hybrid pvid vlan 80 port hybrid untagged vlan 80 # interface GigabitEthernet2/0/1 port hybrid pvid vlan 90 port hybrid untagged vlan 90 # bgp 65010 router-id 3.3.3.3 peer 10.1.2.1 as-number 65010 peer 10.1.3.2 as-number 65010 group in_rr internal peer 10.1.7.2 as-number 65010 peer 10.1.7.2 group in_rr peer 10.1.8.2 as-number 65010 peer 10.1.8.2 group in_rr

Issue 04 (2010-01-08)

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

7-87

7 BGP Configuration
peer 10.1.9.2 as-number 65010 peer 10.1.9.2 group in_rr # ipv4-family unicast undo synchronization reflector cluster-id 2 peer 10.1.2.1 enable peer 10.1.3.2 enable peer in_rr enable peer in_rr reflect-client peer 10.1.7.2 enable peer 10.1.7.2 group in_rr peer 10.1.8.2 enable peer 10.1.8.2 group in_rr peer 10.1.9.2 enable peer 10.1.9.2 group in_rr # return l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of S9300-D


# sysname S9300-D # vlan batch 40 60 # interface Vlanif40 ip address 10.1.4.2 255.255.255.0 # interface Vlanif60 ip address 10.1.6.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 60 port hybrid untagged vlan 60 # bgp 65010 router-id 4.4.4.4 peer 10.1.4.1 as-number 65010 peer 10.1.6.2 as-number 65010 # ipv4-family unicast undo synchronization peer 10.1.4.1 enable peer 10.1.6.2 enable # return
NOTE

The configuration files of other S9300s are similar to the configuration file of S9300-D, and are not mentioned here.

7.19.6 Example for Configuring a BGP Confederation


Networking Requirements
As shown in Figure 7-6, several S9300s run BGP in AS 200. To reduce the number of IBGP connections, divide AS 200 into three sub-ASs, namely AS 65001, AS 65002, and AS 65003. In addition, IBGP connections are set up between the three S9300s in AS 65001.

7-88

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

Figure 7-6 Networking diagram for configuring a BGP confederation

AS 200 S9300-B AS 65002


GE1/0/1 GE1/0/1

S9300-C

AS 65003

AS 100
GE1/0/2 GE1/0/1 GE1/0/1 GE2/0/1

GE1/0/2

AS 65001

S9300-F

S9300-A

GE1/0/1 GE1/0/3 GE1/0/4

S9300-D
GE1/0/2

GE1/0/1

GE1/0/2

S9300-E

S9300 S9300-A S9300-A S9300-A S9300-A S9300-A S9300-B S9300-C S9300-D S9300-D S9300-E S9300-E S9300-F S9300-F

Interface GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/3 GigabitEthernet1/0/4 GigabitEthernet2/0/1 GigabitEthernet1/0/1 GigabitEthernet1/0/1 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2

VLANIF interface VLANIF 10 VLANIF 20 VLANIF 30 VLANIF 40 VLANIF 60 VLANIF 10 VLANIF 20 VLANIF 30 VLANIF 50 VLANIF 40 VLANIF 50 VLANIF 60 VLANIF 70

IP address 10.1.1.1/24 10.1.2.1/24 10.1.3.1/24 10.1.4.1/24 200.1.1.1/24 10.1.1.2/24 10.1.2.2/24 10.1.3.2/24 10.1.5.1/24 10.1.4.2/24 10.1.5.2/24 200.1.1.2/24 9.1.1.1/24

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3.
Issue 04 (2010-01-08)

Configure the BGP confederation on each S9300 in AS 200. Establish IBGP connections in AS 65001. Establish EBGP connections between AS 100 and AS 200, and check the routes.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 7-89

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

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

ID of the VLAN that each interface belongs to, as shown in Figure 7-6 IP address of each VLANIF interface, as shown in Figure 7-6 Router IDs of S9300-A, S9300-B, S9300-C, S9300-D, S9300-E, and S9300-F being 1.1.1.1, 2.2.2.2, 3.3.3.3, 4.4.4.4, 5.5.5.5, and 6.6.6.6 AS 100, AS 200, and three sub-AS numbers of AS 200 are 65001, 65002, and 65003

Procedure
Step 1 Create VLANs and add interfaces to the corresponding VLANs.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] vlan batch 10 20 30 40 60 [S9300-A] interface GigabitEthernet [S9300-A-GigabitEthernet1/0/1] port [S9300-A-GigabitEthernet1/0/1] port [S9300-A-GigabitEthernet1/0/1] quit [S9300-A] interface GigabitEthernet [S9300-A-GigabitEthernet1/0/2] port [S9300-A-GigabitEthernet1/0/2] port [S9300-A-GigabitEthernet1/0/2] quit [S9300-A] interface GigabitEthernet [S9300-A-GigabitEthernet1/0/3] port [S9300-A-GigabitEthernet1/0/3] port [S9300-A-GigabitEthernet1/0/3] quit [S9300-A] interface GigabitEthernet [S9300-A-GigabitEthernet1/0/4] port [S9300-A-GigabitEthernet1/0/4] port [S9300-A-GigabitEthernet1/0/4] quit [S9300-A] interface GigabitEthernet [S9300-A-GigabitEthernet2/0/1] port [S9300-A-GigabitEthernet2/0/1] port [S9300-A-GigabitEthernet2/0/1] quit

1/0/1 hybrid pvid vlan 10 hybrid untagged vlan 10 1/0/2 hybrid pvid vlan 20 hybrid untagged vlan 20 1/0/3 hybrid pvid vlan 30 hybrid untagged vlan 30 1/0/4 hybrid pvid vlan 40 hybrid untagged vlan 40 2/0/1 hybrid pvid vlan 60 hybrid untagged vlan 60

The configurations of S9300-B, S9300-C, S9300-D, S9300-E, and S9300-F are the same as the configuration of S9300-A, and are not mentioned here. Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ip address [S9300-A-Vlanif10] quit [S9300-A] interface vlanif 20 [S9300-A-Vlanif20] ip address [S9300-A-Vlanif20] quit [S9300-A] interface vlanif 30 [S9300-A-Vlanif30] ip address [S9300-A-Vlanif30] quit [S9300-A] interface vlanif 40 [S9300-A-Vlanif40] ip address [S9300-A-Vlanif40] quit [S9300-A] interface vlanif 60 [S9300-A-Vlanif60] ip address [S9300-A-Vlanif60] quit 10.1.1.1 24 10.1.2.1 24 10.1.3.1 24 10.1.4.1 24 200.1.1.1 24

The configurations of S9300-B, S9300-C, S9300-D, S9300-E, and S9300-F are the same as the configuration of S9300-A, and are not mentioned here. Step 3 Configure the BGP confederation. # Configure S9300-A.
7-90 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


[S9300-A] bgp 65001 [S9300-A-bgp] router-id 1.1.1.1 [S9300-A-bgp] confederation id 200 [S9300-A-bgp] confederation peer-as 65002 65003 [S9300-A-bgp] peer 10.1.1.2 as-number 65002 [S9300-A-bgp] peer 10.1.2.2 as-number 65003 [S9300-A-bgp] ipv4-family unicast [S9300-A-bgp-af-ipv4] peer 10.1.1.2 next-hop-local [S9300-A-bgp-af-ipv4] peer 10.1.2.2 next-hop-local [S9300-A-bgp-af-ipv4] quit [S9300-A-bgp] quit

7 BGP Configuration

# Configure S9300-B.
[S9300-B] bgp [S9300-B-bgp] [S9300-B-bgp] [S9300-B-bgp] [S9300-B-bgp] [S9300-B-bgp] 65002 router-id 2.2.2.2 confederation id 200 confederation peer-as 65001 65003 peer 10.1.1.1 as-number 65001 quit

# Configure S9300-C.
[S9300-C] bgp [S9300-C-bgp] [S9300-C-bgp] [S9300-C-bgp] [S9300-C-bgp] [S9300-C-bgp] 65003 router-id 3.3.3.3 confederation id 200 confederation peer-as 65001 65002 peer 10.1.2.1 as-number 65001 quit

Step 4 Establish IBGP connection in AS 65001. # Configure S9300-A.


[S9300-A] bgp 65001 [S9300-A-bgp] peer 10.1.3.2 as-number 65001 [S9300-A-bgp] peer 10.1.4.2 as-number 65001 [S9300-A-bgp] ipv4-family unicast [S9300-A-bgp-af-ipv4] peer 10.1.3.2 next-hop-local [S9300-A-bgp-af-ipv4] peer 10.1.4.2 next-hop-local [S9300-A-bgp-af-ipv4] quit

# Configure S9300-D.
[S9300-D] bgp [S9300-D-bgp] [S9300-D-bgp] [S9300-D-bgp] [S9300-D-bgp] 65001 router-id 4.4.4.4 peer 10.1.3.1 as-number 65001 peer 10.1.5.2 as-number 65001 quit

# Configure S9300-E.
[S9300-E] bgp [S9300-E-bgp] [S9300-E-bgp] [S9300-E-bgp] [S9300-E-bgp] 65001 router-id 5.5.5.5 peer 10.1.4.1 as-number 65001 peer 10.1.5.1 as-number 65001 quit

Step 5 Establish an EBGP connection between AS 100 and AS 200. # Configure S9300-A.
[S9300-A] bgp 65001 [S9300-A-bgp] peer 200.1.1.2 as-number 100 [S9300-A-bgp] quit

# Configure S9300-F.
[S9300-F] bgp 100 [S9300-F-bgp] router-id 6.6.6.6

Issue 04 (2010-01-08)

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

7-91

7 BGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

[S9300-F-bgp] peer 200.1.1.1 as-number 200 [S9300-F-bgp] ipv4-family unicast [S9300-F-bgp-af-ipv4] network 9.1.1.0 255.255.255.0 [S9300-F-bgp-af-ipv4] quit [S9300-F-bgp] quit

Step 6 Verify the configuration. # Check the BGP routing table of S9300-B.
[S9300-B] display bgp routing-table Total Number of Routes: 1 BGP Local router ID is 2.2.2.2 Status codes: * - valid, > - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Network NextHop MED LocPrf PrefVal Path/Ogn *>i 9.1.1.0/24 10.1.1.1 0 [S9300-B] display bgp routing-table 9.1.1.0 BGP local router ID : 2.2.2.2 Local AS number : 65002 Paths: 1 available, 1 best BGP routing table entry information of 9.1.1.0/24: From: 10.1.1.1 (1.1.1.1) Relay Nexthop: 0.0.0.0 Original nexthop: 10.1.1.1 Convergence Priority: 0 AS-path (65001) 100, origin igp, MED 0, localpref 100, pref-val 0, valid, exter nal-confed, best, pre 255 Not advertised to any peers yet 100 0 (65001) 100i

# Check the BGP routing table of S9300-D.


[S9300-D] display bgp routing-table Total Number of Routes: 1 BGP Local router ID is 4.4.4.4 Status codes: * - valid, > - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Network NextHop MED LocPrf PrefVal Path/Ogn *>i 9.1.1.0/24 10.1.3.1 0 [S9300-D] display bgp routing-table 9.1.1.0 BGP local router ID : 4.4.4.4 Local AS number : 65001 Paths: 1 available, 1 best BGP routing table entry information of 9.1.1.0/24: From: 10.1.3.1 (1.1.1.1) Relay Nexthop: 0.0.0.0 Original nexthop: 10.1.3.1 Convergence Priority: 0 AS-path 100, origin igp, MED 0, localpref 100, pref-val 0, valid, internal, best, pre 255 Not advertised to any peers yet 100 0 100i

----End

7-92

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7 BGP Configuration

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # vlan batch 10 20 30 40 60 # interface Vlanif10 ip address 10.1.1.1 255.255.255.0 # interface Vlanif20 ip address 10.1.2.1 255.255.255.0 # interface Vlanif30 ip address 10.1.3.1 255.255.255.0 # interface Vlanif40 ip address 10.1.4.1 255.255.255.0 # interface Vlanif60 ip address 200.1.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet1/0/3 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface GigabitEthernet1/0/4 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # interface GigabitEthernet2/0/1 port hybrid pvid vlan 60 port hybrid untagged vlan 60 # bgp 65001 router-id 1.1.1.1 confederation id 200 confederation peer-as 65002 65003 peer 10.1.1.2 as-number 65002 peer 10.1.2.2 as-number 65003 peer 10.1.3.2 as-number 65001 peer 10.1.4.2 as-number 65001 peer 200.1.1.2 as-number 100 # ipv4-family unicast undo synchronization peer 10.1.1.2 enable peer 10.1.1.2 next-hop-local peer 10.1.2.2 enable peer 10.1.2.2 next-hop-local peer 10.1.3.2 enable peer 10.1.3.2 next-hop-local peer 10.1.4.2 enable peer 10.1.4.2 next-hop-local peer 200.1.1.2 enable # return

Configuration file of S9300-B

Issue 04 (2010-01-08)

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

7-93

7 BGP Configuration
# sysname S9300-B # vlan batch 10 # interface Vlanif10 ip address 10.1.1.2 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # bgp 65002 router-id 2.2.2.2 confederation id 200 confederation peer-as 65001 65003 peer 10.1.1.1 as-number 65001 # ipv4-family unicast undo synchronization peer 10.1.1.1 enable # return

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

7-94

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8 BGP4+ Configuration

8
About This Chapter

BGP4+ Configuration

This chapter describes the implementation and configuration procedures of the BGP4+ protocol and provides configuration examples of BGP4+. 8.1 BGP4+ Overview BGP4+ is a dynamic routing protocol used between Autonomous Systems (ASs). It is an extension of BGP. 8.2 BGP4+ Features Supported by the S9300 Most of BGP4+ features supported by the S9300 are similar to those of BGP supported by the S9300.For details, refer to the chapter "BGP Configuration" in the Quidway S9300Terabit Routing Switch Configuration Guide - IP Routing.BGP4+ does not support route aggregation or MP-BGP. 8.3 Configuring Basic BGP4+ Functions This section describes how to start BGP4+ and configure BGP4+ peers. 8.4 (Optional) Configuring BGP4+ Route Attributes This section describes how to configure BGP4+ route attributes to change BGP4+ routing policies. 8.5 (Optional) Controlling the Advertising and Receiving of BGP4+ Routing Information This section describes how to filter the BGP4+ routes and apply routing policies. 8.6 (Optional) Setting Parameters of a Connection Between BGP4+ Peers This section describes how to set the parameters of the BGP4+ peer relation to adjust and optimize the performance of a BGP network. 8.7 (Optional) Configuring BGP4+ Route Dampening This section describes how to configure BGP4+ route dampening to suppress unstable routes. 8.8 (Optional) Configuring BGP4+ Load Balancing This section describes how to configure certain attributes to implement BGP4+ load balancing. 8.9 (Optional) Configuring a BGP4+ Peer Group This section describes how to simplify the management of routing policies and improve the efficiency of advertising routes on a large-scale BGP4+ network.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 8-1

8 BGP4+ Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8.10 (Optional) Configuring a BGP4+ Route Reflector This section describes how to simplify the management of routing policies and improve the efficiency of advertising routes on a large-scale IBGP network. 8.11 (Optional) Configuring a BGP4+ Confederation This section describes how to simplify the management of routing policies and improve the efficiency of advertising routes on a large-scale BGP network. 8.12 (Optional) Configuring BGP4+ 6PE After the 6PE function is enabled, the separated IPv6 networks can be connected through the Multi-Protocol Label Switch (MPLS) tunnel technology. 8.13 Maintaining BGP4+ This section describes how to reset BGP4+ connections, clear BGP4+ statistics, and debug BGP4 +. 8.14 Configuration Examples This section provides several configuration examples of BGP4+.

8-2

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8 BGP4+ Configuration

8.1 BGP4+ Overview


BGP4+ is a dynamic routing protocol used between Autonomous Systems (ASs). It is an extension of BGP. The traditional BGP4 can manage only the IPv4 routing information. For other network layer protocols such as IPv6, the traditional BGP4 has a limited capability to transmit routing information. The IETF introduces BGP4+ as a supplement to BGP4 to support multiple network layer protocols. The RFC for BGP4+ is RFC 2858 (Multiprotocol Extensions for BGP4). To support IPv6, BGP4 needs to reflect the IPv6 protocol information to the Network Layer Reachable Information (NLRI) attribute and the Next_Hop attribute. BGP4+ introduces two NLRI attributes:
l

Multiprotocol Reachable NLRI (MP_REACH_NLRI): advertises the reachable routes and the next hop information. Multiprotocol Unreachable NLRI (MP_UNREACH_NLRI): withdraws the unreachable routes.

The Next_Hop attribute of BGP4+ is in the format of an IPv6 address. It can be an IPv6 global unicast address or the link-local address of the next hop. BGP4+ can be applied to an IPv6 network by using the BGP attribute of multiple protocol extension. The message and routing mechanisms of BGP remain unaltered.

8.2 BGP4+ Features Supported by the S9300


Most of BGP4+ features supported by the S9300 are similar to those of BGP supported by the S9300.For details, refer to the chapter "BGP Configuration" in the Quidway S9300Terabit Routing Switch Configuration Guide - IP Routing.BGP4+ does not support route aggregation or MP-BGP.

6PE
After the 6PE function is enabled, the separated IPv6 networks can be connected through the Multi-Protocol Label Switch (MPLS) tunnel technology. The tunnel in 6PE mode implements the dual protocol suite of IPv4/IPv6 on PEs of the Internet Service Provider (ISP). It identifies IPv6 routes by using the label assigned by the Multiprotocol Border Gateway Protocol (MPBGP), and implements IPv6 interworking through LSPs between PEs.

8.3 Configuring Basic BGP4+ Functions


This section describes how to start BGP4+ and configure BGP4+ peers. 8.3.1 Establishing the Configuration Task 8.3.2 Starting a BGP Process 8.3.3 Configuring an IPv6 Peer
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 8-3

8 BGP4+ Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8.3.4 (Optional) Configuring the Local Interfaces Used for BGP4+ Connections 8.3.5 Checking the Configuration

8.3.1 Establishing the Configuration Task


Applicable Environment
BGP4+ is configured in an IPv6 network.

Pre-configuration Tasks
Before configuring basic BGP4+ functions, complete the following tasks:
l l

Enabling IPv6 Configuring link layer protocol parameters and IP addresses for interfaces to make link layers of the interfaces Up

Data Preparation
To configure BGP4+, you need the following data. No. 1 2 3 Data Local AS number and router ID IPv6 address and AS number of the peer Interface that sets up the BGP4+ session

8.3.2 Starting a BGP Process


Context
Do as follows on the S9300 on which the BGP4+ connection needs to be set up:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

BGP is enabled (the local AS number is specified) and the BGP view is displayed. Step 3 (Optional) Run:
router-id ipv4-address

The router ID is set. Setting or changing the router ID of BGP resets the BGP peer relationship between S9300s.
8-4 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


TIP

8 BGP4+ Configuration

To enhance the network reliability, you can manually configure the address of a loopback interface as the router ID. If the router ID is not set, BGP uses the router ID in the system view. To select the router ID in the system view, refer to the Quidway S9300Terabit Routing Switch Command Reference. If no interface of a S9300 is configured with an IPv4 address, you must set a router ID for the S9300.

----End

8.3.3 Configuring an IPv6 Peer


Procedure
l Configuring an IBGP Peer Do as follows on the S9300 on which the IBGP connection needs to be set up: 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. Run:


peer ipv6-address as-number as-number

The peer address and the AS where the peer resides are configured. The AS number of the specified peer must be the same as the local AS number. The IP address of the specified peer can be either of the following types:

The IPv6 address of an interface on a directly connected peer The address of a loopback interface on a reachable peer The IPv6 address of a sub-interface on a directly connected peer Link-local interface address of a directly connected peer

When the IPv6 address of a specified peer is the IP address of a loopback interface or the IPv6 address of a sub-interface, you need to perform 8.3.4 (Optional) Configuring the Local Interfaces Used for BGP4+ Connections to ensure the establishment of the peer. 4. (Optional) Run:
peer { ipv6-addres | group-name } listen-only

A peer group is configured only to listen to connection requests, but not to send connection requests. After this command is used, the existing peer relationship is torn down. The peer on which this command is used waits for the connection request from its peer to reestablish the neighbor relationship. This configuration can prevent the conflict of sending connection requests.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 8-5

8 BGP4+ Configuration
NOTE

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

This command can be used on only one of two peers. If this command is used on the two peers, the connection between the two peers cannot be established.

5.

Run:
ipv6-family unicast

The BGP IPv6 unicast address family view is displayed. 6. Run:


peer ipv6-address enable

The IPv6 peers are enabled. After configuring the BGP4+ peers in the BGP view, you need to enable these peers in the BGP IPv6 unicast address family view. l Configuring an EBGP Peer Do as follows on the S9300 on which the EBGP connection needs to be set up: 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. Run:


peer ipv6-address as-number as-number

The IP address and the AS number of a specified BGP peer are specified. The AS number of the specified BGP peer should be different from the local AS number. The IP address of the specified peer can be either of the following types:

IP address of the directly connected peer IP address of the loopback interface on the reachable peer IP address of the sub-interface on the directly connected peer Link-local interface address of a directly connected peer

If the IP address of the specified peer is that of a loopback interface on the reachable peer or that of a sub-interface on the directly connected peer, you need to complete the task of 8.3.4 (Optional) Configuring the Local Interfaces Used for BGP4+ Connections to ensure that the peer is correctly established. 4. Run:
peer { ipv6-address | group-name } ebgp-max-hop [ number ]

The maximum number of hops in the EBGP connections is set. Usually, a direct physical link should be available between the EBGP peers. If this requirement cannot be met, you can use the peer ebgp-max-hop command to configure the EBGP peers to establish the TCP connections through multiple hops. 5. (Optional) Run:
peer { ipv6-addres | group-name } listen-only

8-6

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8 BGP4+ Configuration

The peer or peer group is configured only to listen to connection requests, but not to send any connection request. After this command is used, the existing peer relationship is removed. The peer on which this command is used reestablishes the peer relationship after receiving the connection request from its peer. After this configuration is done, the conflict of connection requests is avoided.
NOTE

This command can be used on only one of two peers. If this command is used on the two peers, the connection between the two peers cannot be established.

6.

Run:
ipv6-family unicast

The BGP IPv6 unicast address family view is displayed. 7. Run:


peer ipv6-address enable

An IPv6 peer is enabled. After configuring a BGP4+ peer in the BGP view, enable the peer in the BGP IPv6 unicast address family view. ----End

8.3.4 (Optional) Configuring the Local Interfaces Used for BGP4+ Connections
Context
Do as follows on the S9300 on which the BGP4+ connection needs to be set up:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


peer { ipv6-address | group-name } connect-interface interface-type interfacenumber [ ipv6-source-address ]

The source interface and source address used to set up a TCP connection are specified. To increase the reliability and stability of the BGP4+ connections, configure the local interface used for the BGP4+ connection as the loopback interface. In this way, when there are redundant links on the network, the BGP4+ connections are not torn down due to the failure of a certain interface or a link. ----End
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 8-7

8 BGP4+ Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8.3.5 Checking the Configuration


Prerequisite
The configurations of basic BGP4+ functions are complete.

Procedure
l l Run the display bgp ipv6 peer ipv4-address verbose command to check information about the BGP4+ peers. Run the display bgp ipv6 peer ipv6-address { log-info | verbose } command to check information about the BGP4+ peers.

----End

8.4 (Optional) Configuring BGP4+ Route Attributes


This section describes how to configure BGP4+ route attributes to change BGP4+ routing policies. 8.4.1 Establishing the Configuration Task 8.4.2 Configuring the BGP4+ Preference 8.4.3 Configuring BGP4+ Preferred Value for Routing Information 8.4.4 Configuring the Default Local_Pref Attribute of the Local S9300 8.4.5 Configuring the MED Attribute 8.4.6 Configuring the Next_Hop Attribute 8.4.7 Configuring the AS-Path Attribute 8.4.8 Configuring the BGP4+ Community attribute 8.4.9 Checking the Configuration

8.4.1 Establishing the Configuration Task


Applicable Environment
You can change the BGP4+ routing policies by configuring the route attributes.
l

BGP4+ priority After the BGP4+ priority is configured, Route Management (RM) is affected in routing between BGP4+ and the other routing protocols.

Preferred value of BGP4+ routing information After the preferred value of BGP4+ routing information is configured, the route with the greatest preferred value is selected when multiple routes to the same destination exist in the BGP4+ routing table.

Local_Pref attribute
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

8-8

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8 BGP4+ Configuration

The function of the Local_Pref attribute is similar to that of the preferred value of BGP4+ routing information. The preferred value of BGP4+ routing information takes precedence over the Local_Pref attribute.
l

MED attribute After the MED attribute is configured, EBGP peers select the route with the smallest MED value when the traffic enters an AS.

Next_Hop attribute A route with an unreachable next hop is ignored. Community attribute The community attribute can simplify the management of routing policies. The management range of the community attribute is wider than that of the peer group. The community attribute can control the routing policies of multiple BGP4+ routers.

AS_Path attribute After the AS_Path attribute is configured, the route with a shorter AS path is selected.

Pre-configuration Tasks
Before configuring BGP4+ route attributes, complete the following tasks:
l

Configuring Basic BGP4+ Functions

Data Preparation
To configure BGP4+ route attributes, you need the following data. No. 1 2 3 4 5 Data AS number Protocol priority Local_Pref attribute MED attribute Name of the routing policy for using the community attribute

8.4.2 Configuring the BGP4+ Preference


Context
Do as follows on the BGP4+ router:

Procedure
Step 1 Run:
system-view

The system view is displayed.


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 8-9

8 BGP4+ Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Step 2 Run:
bgp as-number

The BGP view is displayed. Step 3 Run:


ipv6-family unicast

The BGP IPv6 unicast address family view is displayed. Step 4 Run:
preference { external internal local | route-policy route-policy-name }

The BGP4+ priority is set. ----End

8.4.3 Configuring BGP4+ Preferred Value for Routing Information


Context
Do as follows on the BGP4+ router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv6-family unicast

The BGP IPv6 unicast address family view is displayed. Step 4 Run:
peer { group-name | ipv4-address | ipv6-address } preferred-value value

The preferred value of a peer is configured. By default, the preferred value of the route learned from a neighbor is 0. ----End

8.4.4 Configuring the Default Local_Pref Attribute of the Local S9300


Context
Do as follows on the S9300:
8-10 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8 BGP4+ Configuration

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv6-family unicast

The BGP IPv6 unicast address family view is displayed. Step 4 Run:
default local-preference preference-value

The default Local_Pref attribute of the local S9300 is configured. ----End

8.4.5 Configuring the MED Attribute


Context
Do as follows on the BGP4+ router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv6-family unicast

The BGP IPv6 unicast address family view is displayed. Step 4 Run the following commands to configure the BGP4+ MED attribute:
l

Run:
default med med

The default MED attribute is configured.


l

Run:
compare-different-as-med

The MED values from different ASs are configured.


l

Run:
bestroute med-none-as-maximum

Issue 04 (2010-01-08)

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

8-11

8 BGP4+ Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The maximum MED value is used when the current MED is not available.
l

Run:
bestroute med-confederation

The MED values of routes advertised in the local confederation are compared. The commands in Step 4 can be used regardless of the order. ----End

8.4.6 Configuring the Next_Hop Attribute


Context
Do as follows on the BGP4+ router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv6-family unicast

The BGP IPv6 unicast address family view is displayed. Step 4 Run:
peer { ipv6-address | group-name } next-hop-local

The local address is configured as the next hop when routes are advertised. In some networking environments, to ensure that the IBGP neighbors find the correct next hop, configure the next hop address as its own address when routes are advertised to the IBGP peers.
NOTE

If BGP load balancing is configured, the local S9300 changes the next hop address to its own address when advertising routes to the IBGP peer groups, regardless of whether the peer next-hop-local command is used.

----End

8.4.7 Configuring the AS-Path Attribute


Procedure
l Configuring the AS_Path Attribute in the IPv6 Address Family View Do as follows on the BGP4+ router: 1. Run:
system-view

8-12

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8 BGP4+ Configuration

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. Run:


ipv6-family unicast

The BGP IPv6 unicast address family view is displayed. 4. Run the following commands to configure the AS-Path attribute:

Run:
peer { ipv4-address | ipv6-address | group-name } allow-as-loop [ number ]

The local AS number can be used repeatedly.

Run:
bestroute as-path-neglect

The AS-Path attribute is not configured as one of the route selection rules.

Run:
peer { ipv6-address | group-name } public-as-only

The AS-Path attribute is configured to carry only the public AS number. The commands in Step 4 can be used regardless of the order. l Configuring the Fake AS Number Do as follows on the BGP4+ router: 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. Run:


peer { ipv6-address | group-name } fake-as as-number

The fake AS number is set. You can hide the actual AS number of the local S9300 by using this command. EBGP peers in other ASs can only see this fake AS number. That is, peers in other ASs need to specify the number of the AS where the local peer resides as this fake AS number.
NOTE

This command is applicable only to EBGP peers.

Substituting the AS Number in the AS-Path Attribute Do as follows on the BGP4+ router: 1. Run:
system-view

The system view is displayed.


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 8-13

8 BGP4+ Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

2.

Run:
bgp as-number

The BGP view is displayed. 3. Run:


ipv6-family vpn6-instance vpn6-instance-name

The VPNv6 instance view is displayed. 4. Run:


peer { ipv6-address | group-name } substitute-as

The AS number in the AS-Path attribute is substituted. After this command is used, if the AS-Path attribute contains the AS number of the peer, you can substitute the local AS number for the AS number of the peer before advertising routes to the peer.

CAUTION
If the configuration is not correct, the command may cause routing loops. ----End

8.4.8 Configuring the BGP4+ Community attribute


Context
Do as follows on the BGP4+ router:

Procedure
l Configuring the S9300s to Advertise the Community Attribute to the Peers 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. Run:


ipv6-family unicast

The BGP IPv6 unicast address family view is displayed. 4. Run the following commands to advertise community attributes to the peer group:

Run:
peer { ipv4-address | ipv6-address | group-name } advertise-community

S9300s are configured to advertise the standard community attribute to a peer group.

Run:
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

8-14

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8 BGP4+ Configuration

peer { ipv4-address | ipv6-address | group-name } advertise-extcommunity

S9300s are configured to advertise the extended community attribute to a peer group. l Applying the Routing Policies to the Advertised Routing Information 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. Run:


ipv6-family unicast

The BGP IPv6 unicast address family view is displayed. 4. Run:


peer { ipv4-address | ipv6-address | group-name } route-policy routepolicy-name export

The outbound routing policies are configured.


NOTE

When configuring a BGP4+ community, you should define the specific community attribute by using the routing policies. Then, apply these routing policies to the advertisement of routing information. For the configuration of routing policies, refer to the chapter "Routing Policy Configuration." For the configuration of community attributes, refer to the chapter "BGP Configuration."

----End

8.4.9 Checking the Configuration


Prerequisite
The configurations of BGP4+ route attributes are complete.

Procedure
l l l l Run the display bgp ipv6 paths [ as-regular-expression ] command to check the AS-Path information. Run the display bgp ipv6 routing-table different-origin-as command to check the route with the different source AS. Run the display bgp ipv6 routing-table regular-expression as-regular-expression command to check the routing information matching the regular expression of the AS. Run the display bgp ipv6 routing-table community [ aa:nn &<1-13> ] [ internet | noadvertise | no-export | no-export-subconfed ]* [ whole-match ] command to check routing information about the specified BGP4+ community. Run the display bgp ipv6 routing-table community-filter { { community-filter-name | basic-community-filter-number } [ whole-match ] | advanced-community-filter-number }
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 8-15

Issue 04 (2010-01-08)

8 BGP4+ Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

command to check information about the routes matching the specified BGP4+ community attribute filter. ----End

8.5 (Optional) Controlling the Advertising and Receiving of BGP4+ Routing Information
This section describes how to filter the BGP4+ routes and apply routing policies. 8.5.1 Establishing the Configuration Task 8.5.2 Configuring BGP4+ to Advertise Local IPv6 Routes 8.5.3 Configuring BGP4+ to Import and Filter External Routes 8.5.4 Configuring S9300s to Advertise Default Routes to Peers 8.5.5 Configuring the Policy for Advertising BGP4+ Routing Information 8.5.6 Configuring the Policy for Receiving BGP4+ Routing Information 8.5.7 Configuring BGP4+ Soft Resetting 8.5.8 Checking the Configuration

8.5.1 Establishing the Configuration Task


Applicable Environment
This section describes the following:
l

Controlling the advertising and receiving of BGP4+ routing information, which includes the filtering of routing information and the application of the routing policies. Soft resetting the BGP4+ connections In the S9300, BGP4+ supports the route-refresh capability. When the policies are changed, the system can refresh the BGP4+ routing table automatically without interrupting the BGP4+ connections. If there are routers that do not support route-refresh in the network, you can run the peer keep-all-routes command to save all route refreshment locally. Then, you can run the refresh bgp command to soft reset the BGP4+ connections manually.

Pre-configuration Tasks
Before controlling the advertising and receiving of BGP4+ routing information, complete the following tasks:
l

Configuring Basic BGP4+ Functions

Data Preparation
To control the advertising and receiving of BGP4+ routing information, you need the following data.
8-16 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8 BGP4+ Configuration

No. 1 2 3

Data Name and process ID of the external route to be imported Name of the filtering list used in the routing policies Various parameters of route dampening, including half-life of a reachable route, halflife of an unreachable route, threshold for freeing suppressed routes, threshold for suppressing routes, and upper limit of the penalty

8.5.2 Configuring BGP4+ to Advertise Local IPv6 Routes


Context
Do as follows on the BGP4+ router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv6-family unicast

The BGP IPv6 unicast address family view is displayed. Step 4 Run:
network ipv6-address prefix-length [ route-policy route-policy-name ]

The local IPv6 routes are advertised. You can use the network command to statically inject the IPv6 routes to the BGP4+ routing table. ----End

8.5.3 Configuring BGP4+ to Import and Filter External Routes


Context
Do as follows on the BGP4+ router:

Procedure
Step 1 Run:
system-view

Issue 04 (2010-01-08)

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

8-17

8 BGP4+ Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv6-family unicast

The BGP IPv6 unicast address family view is displayed. Step 4 Run:
default-route imported

BGP4+ is configured to import the default routes. If the default-route imported command is not used, you cannot import the default routes from other protocols by using the import-route command. Step 5 Run:
import-route protocol [ process-id ] [ med med ] [ route-policy route-policy-name ]

BGP4+ is configured to import routes of other protocols. Ifprotocol [ process-id ] is not specified, all the local BGP routes to be advertised are filtered, including the imported routes and the local routes advertised through the network command. Step 6 Run:
filter-policy { acl6-number | ipv6-prefix ipv6-prefix-name } export [ protocol ]

Imported routes are filtered. After BGP4+ filters the imported routes, only the eligible routes are added to the BGP4+ local routing table and advertised to BGP4+ peers. If protocol [ process-id ] is specified, the routes of the specific routing protocol are filtered. ----End

8.5.4 Configuring S9300s to Advertise Default Routes to Peers


Context
Do as follows on the BGP4+ router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv6-family unicast

8-18

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8 BGP4+ Configuration

The BGP IPv6 unicast address family view is displayed. Step 4 Run:
peer { ipv4-address | ipv6-address | group-name } default-route-advertise [ routepolicy route-policy-name ]

Default routes are advertised to peers (or a peer group).


NOTE

After the command peer default-route-advertise is run, the S9300 sends a default route with the local address as the next hop to the specified peer, regardless of whether there are default routes in the routing table.

----End

8.5.5 Configuring the Policy for Advertising BGP4+ Routing Information


Context
Do as follows on the BGP4+ router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv6-family unicast

The BGP IPv6 unicast address family view is displayed. Step 4 Run the following command to configure the outbound routing policy based on the following different filters:
l

Based on the routing policy Run:


peer { ipv4-address | ipv6-address | group-name } route-policy route-policyname export

Based on the ACL Run:


peer { ipv4-address | ipv6-address | group-name } filter-policy acl6-number export

Based on the AS_Path list Run:


peer { ipv4-address | ipv6-address | group-name } as-path-filter as-path-filternumber export

Based on the prefix list


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 8-19

Issue 04 (2010-01-08)

8 BGP4+ Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Run:
peer { ipv4-address | ipv6-address | group-name } ipv6-prefix ip-prefix-name export

The commands in Step 4 can be run regardless of the order. The outbound routing updates policies used by the members of a peer group can be different from that used by the group. That is, members of each peer group can select their policies when advertising routes externally. ----End

8.5.6 Configuring the Policy for Receiving BGP4+ Routing Information


Context
Do as follows on the BGP4+ router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv6-family unicast

The BGP IPv6 unicast address family view is displayed. Step 4 Choose the following operations to filter the received routes based on different policies:
l

Run:
filter-policy { acl6-number | ipv6-prefix ipv6-prefix-name } import

The imported global routes are filtered.


l

Run:
peer { ipv4-address | ipv6-address | group-name } route-policy policy-name import

BGP is configured to filter the routes imported from the specified peers.
l

Run:
peer { ipv4-address | ipv6-address | group-name } filter-policy import

BGP is configured to filter the routes based on the ACL.


l

Run:
peer { ipv4-address | ipv6-address | group-name } as-path-filter as-path-filternumber import

BGP is configured to filter the routes based on the AS path list.


l

Run:
peer { ipv4-address | ipv6-address | group-name } ipv6-prefix ipv6-prefix-name import

8-20

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8 BGP4+ Configuration

BGP is configured to filter the routes based on the prefix list. The commands in Steps 4 to 8 can be run regardless of the order. The routes imported by BGP can be filtered, and only those routes that meet certain conditions are received by BGP and added to the routing table. The inbound routing policies used by the members in a peer group can be different from that used by the group. That is, each peer can select its policy when importing routes. ----End

8.5.7 Configuring BGP4+ Soft Resetting


Procedure
l Enabling the Route-refresh Capability Do as follows on the BGP4+ router: 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. Run:


peer { ipv4-address | ipv6-address | group-name } capability-advertise route-refresh

The route-refresh capability is enabled. By default, this command is configured. If the route-refresh capability is enabled on all the BGP4+ routers, the local S9300 advertises the route-refresh messages to its peer if the BGP4+ route policies change. The peer receiving this message sends its routing information to the local S9300 again. In this way, the BGP4+ routing table is updated dynamically and the new policies are applied without interrupting the BGP4+ connections. l Keeping All Route Updates of Peers Do as follows on the BGP4+ router: 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. Run:


ipv6-family unicast

The BGP IPv6 unicast address family view is displayed.


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 8-21

8 BGP4+ Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

4.

Run:
peer { ipv4-address | ipv6-address | group-name } keep-all-routes

All route updates of the peers are kept. After this command is run, all the route updates of the specified peer are kept regardless of whether the filtering policies are used. When the BGP connections are soft reset, this information can be used to generate the BGP4+ routes. l Soft Resetting a BGP4+ Connection Manually Do as follows on the BGP4+ router: 1. Run:
refresh bgp ipv6 { ipv4-address | ipv6-address | all | external | group group-name | internal } { export | import }

A BGP4+ connection is soft reset. A BGP4+ connection must be soft reset in the user view. ----End

8.5.8 Checking the Configuration


Prerequisite
The configurations of controlling the advertising and receiving of BGP4+ routing information are complete.

Procedure
l l l Run the display bgp ipv6 network command to check the routes advertised through the network command. Run the display bgp ipv6 routing-table as-path-filter as-path-filter-number command to check the routes matching the specified AS-Path filter. Run the display bgp ipv6 routing-table community-filter { { community-filter-name | basic-community-filter-number } [ whole-match ] | advanced-community-filter-number } command to check the routes matching the specified BGP4+ community filter. Run the display bgp ipv6 routing-table peer { ipv4-address | ipv6-address } { advertisedroutes | received-routes } [ statistics ] command to check the routing information advertised or received by the BGP4+ peers.

----End

8.6 (Optional) Setting Parameters of a Connection Between BGP4+ Peers


This section describes how to set the parameters of the BGP4+ peer relation to adjust and optimize the performance of a BGP network. 8.6.1 Establishing the Configuration Task 8.6.2 Configuring BGP4+ Timers 8.6.3 Configuring the Interval for Sending Update Packets
8-22 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8 BGP4+ Configuration

8.6.4 Checking the Configuration

8.6.1 Establishing the Configuration Task


Applicable Environment
After a BGP4+ connection is set up between peers, the peers periodically send Keepalive messages to each other. This prevents the S9300s from considering that the BGP4+ connection is closed. If a S9300 does not receive any Keepalive message or any type of packets from the peer within the specified Hold time, the BGP4+ connection is considered as closed. When a S9300 sets up a BGP4+ connection with its peer, the S9300 and the peer need negotiation with each other. The Hold time after negotiation is the shorter one between the Hold time of the S9300 and that of its peer. If the negotiation result is 0, no Keepalive message is transmitted and whether the Hold timer expires is not detected. If the value of the timer changes, the BGP4+ connection is interrupted for a short time as the S9300 and its peer need negotiate again.

Pre-configuration Tasks
Before configuring the parameters of a connection between BGP4+ peers, complete the following tasks:
l l

Enabling IPv6 Configuring Basic BGP4+ Functions

Data Preparation
To configure the parameters of a connection between BGP4+ peers, you need the following data. No. 1 2 Data Values of the BGP4+ timers Interval for sending the update packets

8.6.2 Configuring BGP4+ Timers


Context

CAUTION
As the change of the timer (with the peer timer command) tears down the BGP peer relationship between S9300s. So, confirm the action before you use the command. Do as follows on the BGP4+ router:
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 8-23

8 BGP4+ Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


peer { ipv6-address | group-name } timer keepalive keepalive-time hold hold-time

The interval for sending Keepalive messages and the Hold time of a peer (or peer group) are set. In actual applications, the value of hold-time is at least three times that of keepalive-time. By default, the Keepalive time is 60s and the Hold time is 180s.
NOTE

Note the following when you set the values of keepalive-time and hold-time:
l l

When the values of keepalive-time and hold-time are 0 at the same time, the BGP timer becomes invalid. That is, BGP does not detect link faults according to the timer. The value of hold-time is far greater than that of keepalive-time, such as, timer keepalive 1 hold 65535. If the Hold time is too long, the link fault cannot be detected on time.

----End

8.6.3 Configuring the Interval for Sending Update Packets


Context
Do as follows on the BGP4+ router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv6-family unicast

The BGP IPv6 unicast address family view is displayed. Step 4 Run:
peer ipv6-address route-update-interval interval

The interval for sending update packets is set. ----End


8-24 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8 BGP4+ Configuration

8.6.4 Checking the Configuration


Prerequisite
The configurations of parameters of a connection between BGP4+ peers are complete.

Procedure
l l Run the display bgp ipv6 peer ipv4-address verbose command to check information about the BGP4+ peers. Run the display bgp ipv6 peer ipv6-address { log-info | verbose } command to check information about the BGP4+ peers.

----End

8.7 (Optional) Configuring BGP4+ Route Dampening


This section describes how to configure BGP4+ route dampening to suppress unstable routes. 8.7.1 Establishing the Configuration Task 8.7.2 Configuring BGP4+ Route Dampening 8.7.3 Checking the Configuration

8.7.1 Establishing the Configuration Task


Applicable Environment
BGP4+ dampening can suppress unstable routes. BGP4+ neither adds the unstable routes to the routing table nor advertises them to other BGP peers.

Pre-configuration Tasks
Before configuring BGP4+ route dampening, complete the following task:
l

8.3 Configuring Basic BGP4+ Functions

Data Preparation
To configure BGP4+ route dampening, you need the following data. No. 1 Data Various parameters of dampening, including half-life of a reachable route, half-life of an unreachable route, threshold for freeing the suppressed routes, threshold for suppressing routes, and upper limit of the penalty

Issue 04 (2010-01-08)

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

8-25

8 BGP4+ Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8.7.2 Configuring BGP4+ Route Dampening


Context
Do as follows on the BGP4+ router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv6-family unicast

The BGP IPv6 unicast address family view is displayed. Step 4 Run:
dampening [ half-life-reach half-life-unreach reuse suppress ceiling | routepolicy route-policy-name ]*

The parameters are configured for BGP4+ route dampening. ----End

8.7.3 Checking the Configuration


Prerequisite
The configurations of BGP4+ route dampening are complete.

Procedure
l l l Run the display bgp ipv6 routing-table dampened command to check BGP4+ dampened routes. Run the display bgp ipv6 routing-table dampening parameter command to check the configuration parameters of BGP4+ dampening. Run the display bgp ipv6 routing-table flap-info [ regular-expression as-regularexpression | as-path-filter as-path-filter-number | ipv6-address [ prefix-length ] [ longermatch ] ] command to check the statistics of BGP4+ route flapping.

----End

8.8 (Optional) Configuring BGP4+ Load Balancing


This section describes how to configure certain attributes to implement BGP4+ load balancing. 8.8.1 Establishing the Configuration Task
8-26 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8 BGP4+ Configuration

8.8.2 Setting the Number of Routes for BGP4+ Load Balancing 8.8.3 Checking the Configuration

8.8.1 Establishing the Configuration Task


Applicable Environment
Equal-cost routes can be generated for BGP4+ load balancing only when the first nine rules described in 8.3 Configuring Basic BGP4+ Functions are the same and the BGP4+ routes have the same AS-Path attribute.

Pre-configuration Tasks
Before configuring BGP4+ load balancing, complete the following task:
l

Configuring Basic BGP4+ Functions

Data Preparation
To configure BGP4+ load balancing, you need the following data. No. 1 Data The number of routes for load balancing

8.8.2 Setting the Number of Routes for BGP4+ Load Balancing


Context
Do as follows on the BGP4+ router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv6-family unicast

The BGP IPv6 unicast address family view is displayed. Step 4 Run:
maximum load-balancing number

The maximum number of equal-cost routes for BGP4+ load balancing is set.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 8-27

8 BGP4+ Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

By default, the number of equal-cost routes for BGP4+ load balancing is 1. ----End

8.8.3 Checking the Configuration


Prerequisite
The configurations of BGP4+ load balancing are complete.

Procedure
l l Run the display bgp ipv6 routing-table [ ipv6-address prefix-length ] command to check information about the BGP4+ routing table. Run the display ipv6 routing-table [ verbose ] command to check information about the routing table.

----End

8.9 (Optional) Configuring a BGP4+ Peer Group


This section describes how to simplify the management of routing policies and improve the efficiency of advertising routes on a large-scale BGP4+ network. 8.9.1 Establishing the Configuration Task 8.9.2 Creating an IBGP Peer Group 8.9.3 Creating a Pure EBGP Peer Group 8.9.4 Creating a Mixed EBGP Peer Group 8.9.5 Checking the Configuration

8.9.1 Establishing the Configuration Task


Applicable Environment
A great number of peers exist in a large-scale BGP4+ network, which is not convenient for configuration and maintenance. In this case, you can configure peer groups to simplify the management and improve the efficiency of route advertisement. According to the AS where the peers reside, you can classify peer groups into IBGP peer groups and EBGP peer groups. You can classify EBGP peer groups into pure EBGP peer groups and mixed EBGP peer groups. This classification is performed according to the position of the peers in the same external AS.

Pre-configuration Tasks
Before configuring a BGP4+ peer group, complete the following task:
l

Configuring Basic BGP4+ Functions

Data Preparation
To configure a BGP4+ peer group, you need the following data.
8-28 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8 BGP4+ Configuration

No. 1

Data Type, name of the peer group, and the member peers

8.9.2 Creating an IBGP Peer Group


Context
Do as follows on the BGP4+ router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


group group-name [ internal ]

A peer group is created. Step 4 Run:


ipv6-family unicast

The BGP IPv6 unicast address family view is displayed. Step 5 Run:
peer group-name enable

The peer group is enabled. Step 6 Run:


peer ipv6-address group group-name

The IPv6 peers are added to the peer group.


NOTE

After an IBGP peer is added to a peer group, the system automatically creates the IPv6 peer in the BGP view. Besides, the system enables this IBGP peer in the IPv6 address family view.

----End

8.9.3 Creating a Pure EBGP Peer Group


Context
Do as follows on the BGP4+ router:
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 8-29

8 BGP4+ Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


group group-name external

A pure EBGP peer group is configured. Step 4 Run:


peer group-name as-number as-number

The AS number of the peer group is set. Step 5 Run:


ipv6-family unicast

The BGP IPv6 unicast address family view is displayed. Step 6 Run:
peer group-name enable

The peer group is enabled. Step 7 Run:


peer ipv6-address group group-name

The IPv6 peer is added to the peer group. After an EBGP peer is added to the peer group, the system automatically creates the EBGP peer in the BGP view. Besides, the system enables this EBGP peer in the IPv6 address family view. When creating a pure EBGP peer group, you need to specify the AS number of the peer group. If there are peers in the peer group, you cannot specify the AS number for this peer group. ----End

8.9.4 Creating a Mixed EBGP Peer Group


Context
Do as follows on the BGP4+ router:

Procedure
Step 1 Run:
system-view

The system view is displayed.


8-30 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8 BGP4+ Configuration

Step 2 Run:
bgp as-number

The BGP view is displayed. Step 3 Run:


group group-name external

A mixed EBGP peer group is created. Step 4 Run:


peer ipv6-address as-number as-number

The AS number of the IPv6 peer is set. Step 5 Run:


ipv6-family unicast

The BGP IPv6 unicast address family view is displayed. Step 6 Run:
peer group-name enable

The peer group is enabled. Step 7 Run:


peer ipv6-address group group-name

The IPv6 peers created are added to this peer group. After an EBGP peer is added to the peer group, the system automatically enables each EBGP peer in the IPv6 address family view. When creating a mixed EBGP peer group, you need to create peers separately, and you can configure different AS numbers for them, but cannot configure the AS number for the peer group. ----End

8.9.5 Checking the Configuration


Prerequisite
The configurations of a BGP4+ peer group are complete.

Procedure
l Run the display bgp ipv6 group [ group-name ] command to check information about the peer group.

----End

8.10 (Optional) Configuring a BGP4+ Route Reflector


This section describes how to simplify the management of routing policies and improve the efficiency of advertising routes on a large-scale IBGP network. 8.10.1 Establishing the Configuration Task
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 8-31

8 BGP4+ Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8.10.2 Configuring a Route Reflector and Specifying Clients 8.10.3 (Optional) Disabling a Route Reflection Between Clients 8.10.4 (Optional) Configuring the Cluster ID for a Route Reflector 8.10.5 Checking the Configuration

8.10.1 Establishing the Configuration Task


Applicable Environment
To ensure the connectivity between IBGP peers inside an AS, you need to establish full-meshed IBGP peers. When there are many IBGP peers, establishing a full-meshed network costs a lot. The route reflector or the confederation can be used to solve this problem.

Pre-configuration Tasks
Before configuring a BGP4+ route reflector, complete the following task:
l

8.3 Configuring Basic BGP4+ Functions

Data Preparation
To configure a BGP4+ route reflector, you need the following data. No. 1 Data Roles of each S9300 (reflector, client, and non-client)

8.10.2 Configuring a Route Reflector and Specifying Clients


Context
Do as follows on the BGP4+ router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv6-family unicast

The BGP IPv6 unicast address family view is displayed.


8-32 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8 BGP4+ Configuration

Step 4 Run:
peer { ipv4-address | ipv6-address | group-name } reflect-client

The route reflector and its clients are configured. The S9300 on which this command is run serves as the route reflector. In addition, this command specifies the peers that serve as its clients. ----End

8.10.3 (Optional) Disabling a Route Reflection Between Clients


Context
Do as follows on the BGP4+ router:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv6-family unicast

The BGP IPv6 unicast address family view is displayed. Step 4 Run:
undo reflect between-clients

Route reflection between clients is disabled. If the clients of the route reflector are full-meshed, you can use the undo reflect between-clients command to disable the route reflection between the clients. This reduces cost. By default, the route reflection between clients is enabled. This command is used only on the reflector. ----End

8.10.4 (Optional) Configuring the Cluster ID for a Route Reflector


Context
Do as follows on the BGP4+ router:

Procedure
Step 1 Run:
system-view

Issue 04 (2010-01-08)

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

8-33

8 BGP4+ Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv6-family unicast

The BGP IPv6 unicast address family view is displayed. Step 4 Run:
reflector cluster-id cluster-id

The cluster ID of the route reflector is set.


TIP

When there are multiple route reflectors in a cluster, you can use the command to configure all the route reflectors in this cluster with the same cluster ID. This avoids routing loops.

----End

8.10.5 Checking the Configuration


Prerequisite
The configurations of a BGP4+ route reflector are complete.

Procedure
l l l Run the display bgp ipv6 peer [ verbose ] command to check information about BGP4+ peers. Run the display bgp ipv6 peer ipv4-address verbose command to check information about BGP4+ peers. Run the display bgp ipv6 peer ipv6-address { log-info | verbose } command to check information about BGP4+ peers.

----End

8.11 (Optional) Configuring a BGP4+ Confederation


This section describes how to simplify the management of routing policies and improve the efficiency of advertising routes on a large-scale BGP network. 8.11.1 Establishing the Configuration Task 8.11.2 Configuring a BGP Confederation 8.11.3 Checking the Configuration

8.11.1 Establishing the Configuration Task


Applicable Environment
The confederation is a method of handling the abrupt increase of IBGP connections in an AS. The confederation divides an AS into multiple sub-ASs. In each sub-AS, IBGP peers can be
8-34 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8 BGP4+ Configuration

full-meshed or be configured with a route reflector. EBGP connections are set up between subASs.

Pre-configuration Tasks
Before configuring a BGP4+ confederation, complete the following task:
l

Configuring Basic BGP4+ Functions

Data Preparation
To configure a BGP4+ confederation, you need the following data. No. 1 Data Confederation ID and the sub-AS number

8.11.2 Configuring a BGP Confederation


Procedure
l Configuring a BGP Confederation Do as follows on the BGP4+ router: 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. Run:


confederation id as-number

The confederation ID is set. 4. Run:


confederation peer-as as-number &<1-32>

The sub-AS number of other EBGP peers connected with the local AS is set. A confederation includes up to 32 sub-ASs. as-number is valid for the confederation that it belongs to. You must run the confederation id and confederation peer-as commands for all the EBGP peers that belong to a confederation, and specify the same confederation ID for them. l Configuring the Compatibility of a Confederation Do as follows on the BGP4+ router: 1. Run:
system-view

Issue 04 (2010-01-08)

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

8-35

8 BGP4+ Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. Run:


confederation nonstandard

The compatibility of the confederation is configured. When the confederation of other S9300s does not conform to the RFC, you can use this command to make standard devices be compatible with nonstandard devices. ----End

8.11.3 Checking the Configuration


Prerequisite
The configurations of a BGP4+ confederation are complete.

Procedure
l Run the display bgp ipv6 peer [ verbose ] command to check detailed information about peers.

----End

8.12 (Optional) Configuring BGP4+ 6PE


After the 6PE function is enabled, the separated IPv6 networks can be connected through the Multi-Protocol Label Switch (MPLS) tunnel technology. 8.12.1 Establishing the Configuration Task 8.12.2 Configuring a 6PE Peer 8.12.3 Checking the Configuration

8.12.1 Establishing the Configuration Task


Applicable Environment
6PE interconnects separated IPv6 networks at different locations by using the MPLS technology in an IPv4 network. Multiple modes are used to connect separated IPv6 networks by using the tunnel technology. The tunnel in 6PE mode supports the IPv4/IPv6 dual stacks on PEs of the ISP. It identifies IPv6 routes by using the label assigned by MP-BGP, and implements IPv6 interworking through LSPs between PEs.

Pre-configuration Tasks
Before configuring BGP4+ 6PE, complete the following task:
l

Establishing LSPs between PEs


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

8-36

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8 BGP4+ Configuration

Data Preparation
To configure BGP4+ 6PE, you need the following data. No. 1 Data IP address and AS number of a PE

8.12.2 Configuring a 6PE Peer


Context
Do as follows on the PE supporting the IPv4/IPv6 dual stacks:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


peer ipv4-address as-number as-number

The IP address and AS number of a PE that needs to be configured with 6PE are specified. Step 4 Run:
ipv6-family unicast

The BGP IPv6 unicast address family view is displayed. Step 5 Run:
peer ipv4-address enable

A 6PE peer is configured in the IPv6 unicast address family view. Step 6 Run:
peer ipv4-address label-route-capability

The capability of sending labeled routes is enabled. ----End

8.12.3 Checking the Configuration


Prerequisite
The configurations of BGP4+ 6PE are complete.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 8-37

8 BGP4+ Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Procedure
l Run the display bgp ipv6 peer [ verbose ] command to check detailed information about BGP peers.

----End

8.13 Maintaining BGP4+


This section describes how to reset BGP4+ connections, clear BGP4+ statistics, and debug BGP4 +. 8.13.1 Debugging BGP4+ 8.13.2 Resetting BGP4+ Connections 8.13.3 Clearing BGP4+ Statistics

8.13.1 Debugging BGP4+


Context

CAUTION
Debugging affects the performance of the system. So, after debugging, run the undo debugging all command to disable it immediately. When a BGP4+ fault occurs, run the following debugging commands in the user view to debug and locate the fault. For the procedure of displaying the debugging information, refer to the chapter "Debugging and Diagnosis" in the Quidway S9300 Terabit Routing Switch Configuration Guide - Device Management. For the related debugging command, refer to the Quidway S9300 Terabit Routing Switch Debugging Reference.

Procedure
l Run the debugging bgp update ipv6 [ peer { ipv4-address | ipv6-address } | ipv6prefix ipv6-prefix-name | acl acl-number ] [ receive | send ] [ verbose ] command in the user view to debug the BGP4+ update packets. Run the debugging bgp [ ipv6-address ] all command in the user view to debug all the BGP4+. Run the debugging bgp [ ipv6-address ] event command in the user view to debug the BGP4+ events. Run the debugging bgp [ ipv6-address ] { keepalive | open | packet | route-refresh } [ receive | send ] [ verbose ] command in the user view to debug the BGP4+ packets.

l l l

----End
8-38 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8 BGP4+ Configuration

8.13.2 Resetting BGP4+ Connections


Context

CAUTION
The peer relationship is broken after you reset the BGP4+ connections with the reset bgp ipv6 command. So, confirm the action before you use the command. To reset the BGP4+ connections, run the following reset command in the user view.

Procedure
l l l To validate the new configuration, run the reset bgp ipv6 all command in the user view to reset all the BGP4+ connections. To validate the new configuration, run the reset bgp ipv6 as-number command in the user view to reset the BGP+4 connections between the peers in a specified AS. To validate the new configuration, run the reset bgp ipv6 { ipv4-address | ipv6-address | group group-name } command in the user view to reset the BGP+4 connections with the specified peer (or peer group). To validate the new configuration, run the reset bgp ipv6 external command in the user view to reset the external BGP4+ connections. To validate the new configuration, run the reset bgp ipv6 internal command in the user view to reset the internal BGP4+ connections.

l l

----End

8.13.3 Clearing BGP4+ Statistics


Context

CAUTION
The BGP4+ statistics cannot be restored after you clear it. So, confirm the action before you use the command.

Procedure
l l Run the reset bgp ipv6 dampening [ ipv6-address prefix-length ] command in the user view to clear information about route dampening and release the suppressed routes. Run the reset bgp ipv6 flap-info [ ipv6-address prefix-length | regexp regexp | as-pathfilter as-path-filter-number ] command in the user view to clear the statistics of route flapping.

----End
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 8-39

8 BGP4+ Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8.14 Configuration Examples


This section provides several configuration examples of BGP4+. 8.14.1 Example for Configuring Basic BGP4+ Functions 8.14.2 Example for Configuring BGP4+ Route Reflectors 8.14.3 Example for Configuring the BGP 6PE

8.14.1 Example for Configuring Basic BGP4+ Functions


Networking Requirements
As shown in Figure 8-1, there are two ASs: 65008 and 65009. S9300-A belongs to AS 65008, and S9300-B, S9300-C, and S9300-D belong to AS 65009. BGP4+ is required to be used to exchange routing information between the two ASs. Figure 8-1 Networking diagram for configuring basic BGP4+ functions
V 9:3LAN : IF GE :2/64 30 3/0 /0

AS 65009

G E2 / S9300-C 0/0

50 IF 64 AN :1/ VL 9:2: 50 IF /64 AN ::2 VL 9 : 2

VLANIF10 8::1/64 GE1/0/0

VL 9:3ANIF :: 3 GE 1/64 0 3/0 /0

AS 65008
GE2/0/0 VLANIF20 10::1/64

G E2 /0
GE1/0/0 VLANIF40 9:1::2/64

/0

GE2/0/0 VLANIF20 S9300-A 10::2/64

S9300-B

GE1/0/0 VLANIF40 9:1::1/64

S9300-D

Device name S9300-A S9300-A S9300-B S9300-B S9300-B S9300-C S9300-C S9300-D S9300-D

Interface GE1/0/0 GE2/0/0 GE2/0/0 GE3/0/0 GE1/0/0 GE3/0/0 GE2/0/0 GE1/0/0 GE2/0/0

VLANIF interface VLANIF 10 VLANIF 20 VLANIF 20 VLANIF 30 VLANIF 40 VLANIF 30 VLANIF 50 VLANIF 40 VLANIF 50

IP address 8::1/64 10::2/64 10::1/64 9:3::1/64 9:1::1/64 9:3::2/64 9:2::1/64 9:1::2/64 9:2::2/64

8-40

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8 BGP4+ Configuration

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. Configure IBGP connections between S9300-B, S9300-C, and S9300-D. Configure an EBGP connection between S9300-A and S9300-B.

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

The router ID of S9300-A is 1.1.1.1 and the AS ID is 65008. The router IDs of S9300-B, S9300-C, and S9300-D are 2.2.2.2, 3.3.3.3, and 4.4.4.4, and the ID of the AS where they are located is 65009.

Procedure
Step 1 Add interfaces to VLANs.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] vlan batch 10 20 [S9300-A] interface GigabitEthernet [S9300-A-GigabitEthernet1/0/0] port [S9300-A-GigabitEthernet1/0/0] port [S9300-A-GigabitEthernet1/0/0] quit [S9300-A] interface GigabitEthernet [S9300-A-GigabitEthernet2/0/0] port [S9300-A-GigabitEthernet2/0/0] port [S9300-A-GigabitEthernet2/0/0] quit

1/0/0 hybrid pvid vlan 10 hybrid untagged vlan 10 2/0/0 hybrid pvid vlan 20 hybrid untagged vlan 20

The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of S9300-A and are not mentioned here. Step 2 Enable the IPv6 forwarding capability, and assign an IPv6 address for each interface. The following is the configuration of S9300-A. The configurations of other S9300s are similar to the configuration of S9300-A and are not mentioned here.
<Quidway> system-view [S9300-A] ipv6 [S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ipv6 enable [S9300-A-Vlanif10] ipv6 address 8::1/64 [S9300-A] interface vlanif 20 [S9300-A-Vlanif20] ipv6 enable [S9300-A-Vlanif20] ipv6 address 10::2/64

Step 3 Configure IBGP. # Configure S9300-B.


[S9300-B] bgp 65009 [S9300-B-bgp] router-id 2.2.2.2 [S9300-B-bgp] peer 9:1::2 as-number 65009 [S9300-B-bgp] peer 9:3::2 as-number 65009 [S9300-B-bgp] ipv6-family unicast [S9300-B-bgp-af-ipv6] peer 9:1::2 enable [S9300-B-bgp-af-ipv6] peer 9:3::2 enable [S9300-B-bgp-af-ipv6] network 9:1:: 64 [S9300-B-bgp-af-ipv6] network 9:3:: 64

# Configure S9300-C.
[S9300-C] bgp 65009 [S9300-C-bgp] router-id 3.3.3.3

Issue 04 (2010-01-08)

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

8-41

8 BGP4+ Configuration
[S9300-C-bgp] peer 9:3::1 as-number 65009 [S9300-C-bgp] peer 9:2::2 as-number 65009 [S9300-C-bgp] ipv6-family unicast [S9300-C-bgp-af-ipv6] peer 9:3::1 enable [S9300-C-bgp-af-ipv6] peer 9:2::2 enable [S9300-C-bgp-af-ipv6] network 9:3:: 64 [S9300-C-bgp-af-ipv6] network 9:2:: 64

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

# Configure S9300-D.
[S9300-D] bgp 65009 [S9300-D-bgp] router-id 4.4.4.4 [S9300-D-bgp] peer 9:1::1 as-number 65009 [S9300-D-bgp] peer 9:2::1 as-number 65009 [S9300-D-bgp] ipv6-family unicast [S9300-D-bgp-af-ipv6] peer 9:1::1 enable [S9300-D-bgp-af-ipv6] peer 9:2::1 enable [S9300-D-bgp-af-ipv6] network 9:2:: 64 [S9300-D-bgp-af-ipv6] network 9:1:: 64

Step 4 Configure the EBGP connection. # Configure S9300-A.


[S9300-A] bgp 65008 [S9300-A-bgp] router-id 1.1.1.1 [S9300-A-bgp] peer 10::1 as-number 65009 [S9300-A-bgp] ipv6-family unicast [S9300-A-bgp-af-ipv6] peer 10::1 enable [S9300-A-bgp-af-ipv6] network 10:: 64 [S9300-A-bgp-af-ipv6] network 8:: 64

# Configure S9300-B.
[S9300-B] bgp 65009 [S9300-B-bgp] peer 10::2 as-number 65008 [S9300-B-bgp] ipv6-family unicast [S9300-B-bgp-af-ipv6] peer 10::2 enable [S9300-B-bgp-af-ipv6] network 10:: 64

# View the status of the BGP4+ peers.


[S9300-B] display bgp ipv6 peer BGP local router ID : 2.2.2.2 Local AS number : 65009 Total number of peers : 3 Peer 9:1::2 9:3::2 10::2 V AS MsgRcvd 8 2 9 MsgSent 9 2 7

Peers in established state : 3 OutQ Up/Down State PrefRcv 2 2 2

4 65009 4 65009 4 65008

0 00:05:37 Established 0 00:00:09 Established 0 00:05:38 Established

The preceding information shows that the BGP4+ connections between S9300-B and other S9300s are set up. # Display the routing table of S9300-A.
[S9300-A] display bgp ipv6 routing-table Total Number of Routes: 6 BGP Local router ID is 1.1.1.1 Status codes: * - valid, > - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete *> Network : 8:: PrefixLen : 64

8-42

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


NextHop MED Label Path/Ogn *> Network NextHop MED Label Path/Ogn Network NextHop MED Label Path/Ogn Network NextHop MED Label Path/Ogn Network NextHop MED Label Path/Ogn NextHop MED Label Path/Ogn : :: : 0 : : i : : : : : 9:1:: 10::1 0 65009 i

8 BGP4+ Configuration
LocPrf PrefVal : : 0

PrefixLen : 64 LocPrf : PrefVal : 0

*>

: 9:2:: : 10::1 : : : 65009 i : : : : : : : : : : 9:3:: 10::1 0 65009 i 10:: :: 0 i

PrefixLen : 64 LocPrf : PrefVal : 0

*>

PrefixLen : 64 LocPrf : PrefVal : 0

*>

PrefixLen : 64 LocPrf : PrefVal : 0

*>

: 10::1 : 0 : : 65009 i

LocPrf PrefVal

: : 0

The routing table shows that S9300-A has learned the route from AS 65009. AS 65008 and AS 65009 can exchange their routing information. ----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # ipv6 # vlan batch 10 20 # interface Vlanif10 ipv6 enable ipv6 address 8::1/64 # interface Vlanif20 ipv6 enable ipv6 address 10::2/64 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # bgp 65008 router-id 1.1.1.1 peer 10::1 as-number 65009

Issue 04 (2010-01-08)

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

8-43

8 BGP4+ Configuration
# ipv4-family unicast undo synchronization # ipv6-family unicast network 8:: 64 network 10:: 64 peer 10::1 enable # return l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of S9300-B


# sysname S9300-B # ipv6 # vlan batch 10 20 30 # interface Vlanif20 ipv6 enable ipv6 address 10::1/64 # interface Vlanif30 ipv6 enable ipv6 address 9:3::1/64 # interface Vlanif40 ipv6 enable ipv6 address 9:1::1/64 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet3/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # bgp 65009 router-id 2.2.2.2 peer 9:1::2 as-number 65009 peer 9:3::2 as-number 65009 peer 10::2 as-number 65008 # ipv4-family unicast undo synchronization # ipv6-family unicast network 9:1:: 64 network 9:3:: 64 network 10:: 64 peer 9:1::2 enable peer 9:3::2 enable peer 10::2 enable # return

Configuration file of S9300-C


# sysname S9300-C # ipv6 # vlan batch 30 50 #

8-44

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


interface Vlanif30 ipv6 enable ipv6 address 9:3::2/64 # interface Vlanif50 ipv6 enable ipv6 address 9:2::1/64 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 50 port hybrid untagged vlan 50 # interface GigabitEthernet3/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # bgp 65009 router-id 3.3.3.3 peer 9:2::2 as-number 65009 peer 9:3::1 as-number 65009 # ipv4-family unicast undo synchronization # ipv6-family unicast network 9:2:: 64 network 9:3:: 64 peer 9:2::2 enable peer 9:3::1 enable # return l

8 BGP4+ Configuration

Configuration file of S9300-D


# sysname S9300-D # ipv6 # vlan batch 40 50 # interface Vlanif40 ipv6 enable ipv6 address 9:1::2/64 # interface Vlanif50 ipv6 enable ipv6 address 9:2::2/64 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 50 port hybrid untagged vlan 50 # bgp 65009 router-id 4.4.4.4 peer 9:1::1 as-number 65009 peer 9:2::1 as-number 65009 # ipv4-family unicast undo synchronization # ipv6-family unicast network 9:1:: 64 network 9:2:: 64 peer 9:1::1 enable peer 9:2::1 enable

Issue 04 (2010-01-08)

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

8-45

8 BGP4+ Configuration
# return

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8.14.2 Example for Configuring BGP4+ Route Reflectors


Networking Requirements
As shown in Figure 8-2, S9300-B receives an update packet from S9300-A through EBGP and forwards the packet to S9300-C. S9300-C is configured as a route reflector and it has two clients, namely, S9300-B and S9300-D. S9300-B and S9300-D do not need to set up an IBGP connection. After receiving a route update packet from S9300-B, S9300-C reflects the packet to S9300-D. Similarly, after receiving a route update packet from S9300-D, S9300-C reflects the packet to S9300-B. Figure 8-2 Networking diagram for configuring the BGP4+ route reflectors
V 1 0 L AN 1:: IF 1/9 30 GE 2/0 6 /0

AS 200

G E1 S9300-C /0/0

40 I F 96 AN ::1/ V L 02 1 40 IF /96 AN ::2 VL 1 0 2

VLANIF10 1::1/64 GE1/0/0

VL 10 ANI 1:: F3 GE 2/960 1/0 /0

AS 100
GE2/0/0 GE2/0/0 VLANIF20 100::2/96

G E1 /0 /0

VLANIF20 S9300-A 100::1/96

S9300-B

S9300-D

Device name S9300-A S9300-A S9300-B S9300-B S9300-C S9300-C S9300-D

Interface GE1/0/0 GE2/0/0 GE2/0/0 GE1/0/0 GE2/0/0 GE1/0/0 GE1/0/0

VLANIF interface VLANIF 10 VLANIF 20 VLANIF 20 VLANIF 30 VLANIF 30 VLANIF 40 VLANIF 40

IP address 1::1/64 100::1/96 100::2/96 101::2/96 101::1/96 102::1/96 102::2/96

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

Establish IBGP connections between the clients and the route reflector. Configure S9300-C as the route reflector.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8 BGP4+ Configuration

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

The ASs are AS 100 and AS 200. The router IDs of S9300-A, S9300-B, S9300-C, and S9300-D are 1.1.1.1, 2.2.2.2, 3.3.3.3, and 4.4.4.4.

Procedure
Step 1 Add interfaces to VLANs.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] vlan batch 10 20 [S9300-A] interface GigabitEthernet [S9300-A-GigabitEthernet1/0/0] port [S9300-A-GigabitEthernet1/0/0] port [S9300-A-GigabitEthernet1/0/0] quit [S9300-A] interface GigabitEthernet [S9300-A-GigabitEthernet2/0/0] port [S9300-A-GigabitEthernet2/0/0] port [S9300-A-GigabitEthernet2/0/0] quit

1/0/0 hybrid pvid vlan 10 hybrid untagged vlan 10 2/0/0 hybrid pvid vlan 20 hybrid untagged vlan 20

The configurations of S9300-B, S9300-C, S9300-D are similar to the configuration of S9300A and are not mentioned here. Step 2 Enable the IPv6 forwarding capability, and assign an IPv6 address for each interface. The following is the configuration of S9300-A. The configurations of other S9300s are similar to the configuration of S9300-A and are not mentioned here.
<Quidway> system-view [S9300-A] ipv6 [S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ipv6 enable [S9300-A-Vlanif10] ipv6 address 8::1/64 [S9300-A] interface vlanif 20 [S9300-A-Vlanif20] ipv6 enable [S9300-A-Vlanif20] ipv6 address 100::1/96

Step 3 Configure the basic BGP4+ functions. # Configure S9300-A.


[S9300-A] bgp 100 [S9300-A-bgp] router-id 1.1.1.1 [S9300-A-bgp] peer 100::2 as-number 200 [S9300-A-bgp] ipv6-family unicast [S9300-A-bgp-af-ipv6] peer 100::2 enable [S9300-A-bgp-af-ipv6] network 1:: 64 [S9300-A-bgp-af-ipv6] quit

# Configure S9300-B.
[S9300-B] ipv6 [S9300-B] bgp 200 [S9300-B-bgp] router-id 2.2.2.2 [S9300-B-bgp] peer 100::1 as-number 100 [S9300-B-bgp] peer 101::1 as-number 200 [S9300-B-bgp] ipv6-family unicast [S9300-B-bgp-af-ipv6] peer 100::1 enable [S9300-B-bgp-af-ipv6] peer 101::1 enable

# Configure S9300-C.
[S9300-C] bgp 200 [S9300-C-bgp] router-id 3.3.3.3

Issue 04 (2010-01-08)

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

8-47

8 BGP4+ Configuration
[S9300-C-bgp] peer 101::2 as-number 200 [S9300-C-bgp] peer 102::2 as-number 200 [S9300-C-bgp] ipv6-family unicast [S9300-C-bgp-af-ipv6] peer 101::2 enable [S9300-C-bgp-af-ipv6] peer 102::2 enable

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

# Configure S9300-D.
[S9300-D] bgp 200 [S9300-D-bgp] router-id 4.4.4.4 [S9300-D-bgp] peer 102::1 as-number 200 [S9300-D-bgp] ipv6-family unicast [S9300-D-bgp-af-ipv6] peer 102::1 enable

Step 4 Configure the route reflector. # Configure S9300-C as the route reflector and S9300-B and S9300-D as the clients.
[S9300-C-bgp] ipv6-family unicast [S9300-C-bgp-af-ipv6] peer 101::2 reflect-client [S9300-C-bgp-af-ipv6] peer 102::2 reflect-client

# View the routing table of S9300-B.


[S9300-B] display bgp ipv6 routing-table Total Number of Routes: 6 BGP Local router ID is 2.2.2.2 Status codes: * - valid, > - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete *> Network : 1:: PrefixLen : 64 NextHop : 100::1 LocPrf : MED : 0 PrefVal : 0 Label : Path/Ogn : 100 i *> Network NextHop MED Label Path/Ogn NextHop MED Label Path/Ogn *> Network NextHop MED Label Path/Ogn i NextHop MED Label Path/Ogn *>i Network NextHop MED Label Path/Ogn : : : : : 100:: :: 0 i LocPrf PrefVal : : 0 PrefixLen : 96 LocPrf : PrefVal : 0

* : 100::1 : 0 : : 100 i : : : : : 101:: :: 0 i LocPrf PrefVal : 100 : 0

PrefixLen : 96 LocPrf : PrefVal : 0

: 101::1 : 0 : : i : : : : : 102:: 101::1 0 i

PrefixLen : 96 LocPrf : 100 PrefVal : 0

# View the routing table of S9300-D.


8-48 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


[S9300-D] display bgp ipv6 routing-table Total Number of Routes: 5

8 BGP4+ Configuration

BGP Local router ID is 4.4.4.4 Status codes: * - valid, > - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete *>i Network NextHop MED Label Path/Ogn *>i Network NextHop MED Label Path/Ogn *>i Network NextHop MED Label Path/Ogn *> Network NextHop MED Label Path/Ogn i NextHop MED Label Path/Ogn : : : : : : : : : : : : : : : : : : : : 1:: 100::1 0 100 i 100:: 101::2 0 i 101:: 102::1 0 i 102:: :: 0 i LocPrf PrefVal : 100 : 0 PrefixLen : 96 LocPrf : PrefVal : 0 PrefixLen : 96 LocPrf : 100 PrefVal : 0 PrefixLen : 96 LocPrf : 100 PrefVal : 0 PrefixLen : 64 LocPrf : 100 PrefVal : 0

: 102::1 : 0 : : i

The routing tables show that S9300-D and S9300-B have learned the routing information advertised by S9300-A from S9300-C. ----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # ipv6 # vlan batch 10 20 # interface Vlanif10 ipv6 enable ipv6 address 1::1/64 # interface Vlanif20 ipv6 enable ipv6 address 100::1/96 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 20

Issue 04 (2010-01-08)

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

8-49

8 BGP4+ Configuration
port hybrid untagged vlan 20 # bgp 100 router-id 1.1.1.1 peer 100::2 as-number 200 # ipv6-family unicast undo synchronization network 1:: 64 network 100:: 96 peer 100::2 enable # return l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of S9300-B


# sysname S9300-B # ipv6 # vlan batch 20 30 # interface Vlanif20 ipv6 enable ipv6 address 100::2/96 # interface Vlanif30 ipv6 enable ipv6 address 101::2/96 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # bgp 200 router-id 2.2.2.2 peer 100::1 as-number 100 peer 101::1 as-number 200 # ipv6-family unicast undo synchronization network 100:: 96 network 101:: 96 peer 100::1 enable peer 101::1 enable # return

Configuration file of S9300-C


# sysname S9300-C # ipv6 # vlan batch 30 40 # interface Vlanif30 ipv6 enable ipv6 address 101::1/96 # interface Vlanif40 ipv6 enable ipv6 address 102::1/96 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 40

8-50

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


port hybrid untagged vlan 40 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # bgp 200 router-id 3.3.3.3 peer 101::2 as-number 200 peer 102::2 as-number 200 # ipv6-family unicast undo synchronization network 101:: 96 network 102:: 96 peer 101::2 enable peer 101::2 reflect-client peer 102::2 enable peer 102::2 reflect-client # return l

8 BGP4+ Configuration

Configuration file of S9300-D


# sysname S9300-D # ipv6 # vlan batch 40 # interface Vlanif40 ipv6 enable ipv6 address 102::2/96 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # bgp 200 router-id 4.4.4.4 peer 102::1 as-number 200 # ipv4-family unicast undo synchronization # ipv6-family unicast undo synchronization network 102:: 96 peer 102::1 enable # return

8.14.3 Example for Configuring the BGP 6PE


Networking Requirements
As shown in Figure 8-3, the link between CE1 and PE1 is an IPv6 link, the link between PE1 and PE2 is an IPv4 link, and the link between PE2 and CE2 is an IPv6 link. BGP4+ runs between CE1 and PE1 and between PE2 and CE2. MPLS runs between PE1 and PE2. 6PE is configured to connect IPv6 networks.

Issue 04 (2010-01-08)

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

8-51

8 BGP4+ Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Figure 8-3 Networking diagram for configuring the BGP 6PE


Loopback 0 2.2.2.2

AS 200

Loopback 0 3.3.3.3

PE1
GE1/0/0 VLANIF10 1::2/64 VLANIF10 1::1/64 GE1/0/0 Loopback 1 5::5/64

MPLS tunnel GE2/0/0 GE2/0/0 VLANIF20 VLANIF20 10.0.0.1/30 10.0.0.2/30

PE2
GE1/0/0 VLANIF30 2::2/64 VLANIF30 2::1/64 GE1/0/0

CE1

CE2
Loopback 0 4.4.4.4

Loopback 1 6::6/64

AS 100 Loopback 0 1.1.1.1

AS 300

Device name CE1 CE1 CE1 PE1 PE1 PE1 PE2 PE2 PE2 CE2 CE2 CE2

Interface Loopback0 Loopback1 GE1/0/0 Loopback0 GE1/0/0 GE2/0/0 GE2/0/0 Loopback0 GE1/0/0 Loopback0 Loopback1 GE1/0/0

VLANIF interface VLANIF 10 VLANIF 10 VLANIF 20 VLANIF 20 VLANIF 30 VLANIF 30

IP address 1.1.1.1/32 5::5/64 1::1/64 2.2.2.2/32 1::2/64 10.0.0.1/30 10.0.0.2/30 3.3.3.3/32 2::2/64 4.4.4.4/32 6::6/64 2::1/64

8-52

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8 BGP4+ Configuration

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. Configure OSPF on the link between PE1 and PE2 to ensure that PE1 and PE2 can learn the loopback interface addresses from each other. Configure BGP4+ on the links between CE1 and PE1 and between PE2 and CE2. Configure MPLS on the link between PE1 and PE2 and set up an LSP. Configure 6PE on the link between PE1 and PE2.

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

Router IDs of CE1, PE1, PE2, and CE2: 1.1.1.1, 2.2.2.2, 3.3.3.3, and 4.4.4.4 AS ID of each S9300

Procedure
Step 1 Add interfaces to VLANs.
<Quidway> system-view [Quidway] sysname PE1 [PE1] vlan batch 10 20 [PE1] interface GigabitEthernet 1/0/0 [PE1-GigabitEthernet1/0/0] port hybrid pvid vlan 10 [PE1-GigabitEthernet1/0/0] port hybrid untagged vlan 10 [PE1-GigabitEthernet1/0/0] quit [PE1-A] interface GigabitEthernet 2/0/0 [PE1-A-GigabitEthernet2/0/0] port hybrid pvid vlan 20 [PE1-A-GigabitEthernet2/0/0] port hybrid untagged vlan 20 [PE1-A-GigabitEthernet2/0/0] quit

The configurations of CE1, PE2, and CE2 are similar to the configuration of PE1 and are not mentioned here. Step 2 Assign IPv4 or IPv6 addresses to interfaces. The following is the configuration of PE1. The configurations of other devices are similar to the configuration of PE1 and are not mentioned here.
<Quidway> system-view [PE1] ipv6 [PE1] interface vlanif 10 [PE1-Vlanif10] ipv6 enable [PE1-Vlanif10] ipv6 address 1::2/64 [PE1-Vlanif10] quit [PE1] interface vlanif 20 [PE1-Vlanif20] ip address 10.0.0.1 30 [PE1-Vlanif20] quit [PE1] interface loopback 0 [PE1-LoopBack0] ip address 2.2.2.2 32 [PE1-LoopBack0] quit

Step 3 Configure OSPF on the link between PE1 and PE2 to ensure that PE1 and PE2 can learn the routes from each other. The configuration procedure is not mentioned here. Step 4 Configure MPLS on the link between PE1 and PE2 and set up an LSP. # Configure PE1.
[PE1] mpls lsr-id 2.2.2.2 [PE1] mpls

Issue 04 (2010-01-08)

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

8-53

8 BGP4+ Configuration
[PE1-mpls] lsp-trigger all [PE1-mpls] quit [PE1] mpls ldp [PE1-mpls-ldp] quit [PE1] interface vlanif 20 [PE1-Vlanif20] mpls [PE1-Vlanif20] mpls ldp [PE1-Vlanif20] quit

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

# Configure PE2.
[PE2] mpls lsr-id 3.3.3.3 [PE2] mpls [PE2-mpls] lsp-trigger all [PE2-mpls] quit [PE2] mpls ldp [PE2-mpls-ldp] quit [PE2] interface vlanif 20 [PE2-Vlanif20] mpls [PE2-Vlanif20] mpls ldp [PE2-Vlanif20] quit

# View information about the LSP on PE1, and you can see that the LSP is set up.
[PE1] display mpls lsp ---------------------------------------------------------------------LSP Information: LDP LSP ---------------------------------------------------------------------FEC In/Out Label In/Out IF Vrf Name 2.2.2.2/32 3/NULL -/3.3.3.3/32 NULL/3 -/Vlanif20 ---------------------------------------------------------------------LSP Information: BGP IPV6 LSP ---------------------------------------------------------------------FEC : 1::/64 In Label : 15360 Out Label : ----In Interface : ----OutInterface : ----Vrf Name : FEC : 5::/64 In Label : 15361 Out Label : ----In Interface : ----OutInterface : ----Vrf Name :

Step 5 Configure BGP4+. # Configure CE1.


[CE1] bgp 100 [CE1-bgp] peer 1::2 as-number 200 [CE1-bgp] ipv6-family unicast [CE1-bgp-af-ipv6] peer 1::2 enable [CE1-bgp-af-ipv6] network 5::5 64 [CE1-bgp-af-ipv6] quit [CE1-bgp] quit

# Configure PE1.
[PE1] bgp 200 [PE1-bgp] peer 1::1 as-number 100 [PE1-bgp] ipv6-family unicast [PE1-bgp-af-ipv6] peer 1::1 enable [PE1-bgp-af-ipv6] quit [PE1-bgp] quit

# Configure PE2.
[PE2] bgp 200 [PE2-bgp] peer 2::1 as-number 300 [PE2-bgp] ipv6-family unicast [PE2-bgp-af-ipv6] peer 2::1 enable

8-54

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


[PE2-bgp-af-ipv6] quit [PE2-bgp] quit

8 BGP4+ Configuration

# Configure CE2.
[CE2] bgp 300 [CE2-bgp] peer 2::2 as-number 200 [CE2-bgp] ipv6-family unicast [CE2-bgp-af-ipv6] peer 2::2 enable [CE2-bgp-af-ipv6] network 6::6 64 [CE2-bgp-af-ipv6] quit [CE2-bgp] quit

# Check information about the peers on PE1 and PE2, and you can see that the peer relation between PE1 and PE2 is set up.
[PE1] display bgp ipv6 peer BGP local router ID : 2.2.2.2 Local AS number : 200 Total number of peers : 1 Peer V AS MsgRcvd 32 MsgSent 35

Peers in established state : 1 OutQ Up/Down 0 00:27:20 State Established PrefRcv 1

1::1 4 100 [PE2] display bgp ipv6 peer BGP local router ID : 3.3.3.3 Local AS number : 200 Total number of peers : 1 Peer 2::1 V 4 AS 300

Peers in established state : 1 MsgSent 37 OutQ Up/Down State Established PrefRcv 1

MsgRcvd 31

0 00:28:08

Step 6 Configure 6PE. # Configure PE1.


[PE1] bgp 200 [PE1-bgp] peer 3.3.3.3 as-number 200 [PE1-bgp] peer 3.3.3.3 connect-interface LoopBack0 [PE1-bgp] ipv6-family unicast [PE1-bgp-af-ipv6] peer 3.3.3.3 enable [PE1-bgp-af-ipv6] peer 3.3.3.3 label-route-capability [PE1-bgp-af-ipv6] import-route direct [PE1-bgp-af-ipv6] quit [PE1-bgp] quit

# Configure PE2.
[PE2] bgp 200 [PE2-bgp] peer 2.2.2.2 as-number 200 [PE2-bgp] peer 2.2.2.2 connect-interface LoopBack0 [PE2-bgp] ipv6-family unicast [PE2-bgp-af-ipv6] peer 2.2.2.2 enable [PE2-bgp-af-ipv6] peer 2.2.2.2 label-route-capability [PE2-bgp-af-ipv6] import-route direct [PE2-bgp-af-ipv6] quit [PE2-bgp] quit

# View the status of the 6PE peers.


[PE1] display bgp ipv6 peer BGP local router ID : 2.2.2.2 Local AS number : 200 Total number of peers : 2 Peer V AS MsgRcvd MsgSent

Peers in established state : 2 OutQ Up/Down State PrefRcv

Issue 04 (2010-01-08)

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

8-55

8 BGP4+ Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

3.3.3.3 1::1

4 4

200 100

1248 32

1342 35

0 18:06:28 0 00:27:20

Established Established

1 1

You can see that the BGP 6PE connection is set up between PE1 and PE2. Step 7 Verify the configuration. Take CE1 as an example. CE1 can learn the loopback1 address from CE2. CE1 and CE2 can ping each other.
[CE1] display ipv6 routing-table Routing Table : Public Destinations : 8 Routes : 8 Destination NextHop Interface State Tunnel ID Age Destination NextHop Interface State Tunnel ID Age Destination NextHop Interface State Tunnel ID Age Destination NextHop Interface State Tunnel ID Age Destination NextHop Interface State Tunnel ID Age Destination NextHop Interface State Tunnel ID Age Destination NextHop Interface State Tunnel ID Age Destination NextHop Interface State Tunnel ID Age : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : ::1 ::1 InLoopBack0 Active NoAdv 0x0 70874sec 1:: 1::1 Vlanif10 Active Adv 0x0 68957sec 1::1 ::1 InLoopBack0 Active NoAdv 0x0 68957sec 2:: 1::2 Vlanif10 Active Adv 0x0 49sec 5:: 5::5 LoopBack1 Active Adv 0x0 68600sec 5::5 ::1 InLoopBack0 Active NoAdv 0x0 68600sec 6:: 1::2 Vlanif10 Active Adv 0x0 3005sec FF80:: :: NULL0 Active NoAdv 0x0 68961sec PrefixLength Preference Protocol Cost Label PrefixLength Preference Protocol Cost Label PrefixLength Preference Protocol Cost Label PrefixLength Preference Protocol Cost Label PrefixLength Preference Protocol Cost Label PrefixLength Preference Protocol Cost Label PrefixLength Preference Protocol Cost Label PrefixLength Preference Protocol Cost Label : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 128 0 Direct 0 NULL 64 0 Direct 0 NULL 128 0 Direct 0 NULL 64 255 BGP 0 NULL 64 0 Direct 0 NULL 128 0 Direct 0 NULL 64 255 BGP 0 NULL 10 0 Direct 0 NULL

8-56

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8 BGP4+ Configuration

Ping loopback1 address of CE2 on CE1.


[CE1] ping ipv6 -c 5 6::6 PING 6::6 : 56 data bytes, press CTRL_C Reply from 6::6 bytes=56 Sequence=1 hop limit=62 time Reply from 6::6 bytes=56 Sequence=2 hop limit=62 time Reply from 6::6 bytes=56 Sequence=3 hop limit=62 time Reply from 6::6 bytes=56 Sequence=4 hop limit=62 time Reply from 6::6 bytes=56 Sequence=5 hop limit=62 time --- 6::6 ping statistics --5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 60/80/90 ms to break = 80 ms = 80 ms = 90 ms = 90 ms = 60 ms

The preceding information shows that 6PE connects separated IPv6 networks and implements interworking. ----End

Configuration Files
l

Configuration file of CE1


# sysname CE1 # ipv6 # vlan batch 10 # interface Vlanif10 ipv6 enable ipv6 address 1::1/64 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface LoopBack0 ip address 1.1.1.1 255.255.255.255 # interface LoopBack1 ipv6 enable ipv6 address 5::5/64 # bgp 100 peer 1::2 as-number 200 # ipv4-family unicast undo synchronization # ipv6-family unicast undo synchronization network 5:: 64 peer 1::2 enable # return

Configuration file of PE1


# sysname PE1 #

Issue 04 (2010-01-08)

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

8-57

8 BGP4+ Configuration
ipv6 # vlan batch 10 20 # mpls lsr-id 2.2.2.2 mpls lsp-trigger all # mpls ldp # interface Vlanif10 ipv6 enable ipv6 address 1::2/64 # interface Vlanif20 ip address 10.0.0.1 255.255.255.252 mpls mpls ldp # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface LoopBack0 ip address 2.2.2.2 255.255.255.255 # bgp 200 peer 3.3.3.3 as-number 200 peer 3.3.3.3 connect-interface LoopBack0 peer 1::1 as-number 100 # ipv4-family unicast undo synchronization peer 3.3.3.3 enable # ipv6-family unicast undo synchronization import-route direct peer 3.3.3.3 enable peer 3.3.3.3 label-route-capability peer 1::1 enable # ospf 1 area 0.0.0.0 network 2.2.2.2 0.0.0.0 network 10.0.0.0 0.0.0.3 # return l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of PE2


# sysname PE2 # ipv6 # vlan batch 20 30 # mpls lsr-id 3.3.3.3 mpls lsp-trigger all # mpls ldp # interface Vlanif20 ip address 10.0.0.2 255.255.255.252 mpls

8-58

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


mpls ldp # interface Vlanif30 ipv6 enable ipv6 address 2::2/64 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface LoopBack0 ip address 3.3.3.3 255.255.255.255 # bgp 200 peer 2.2.2.2 as-number 200 peer 2.2.2.2 connect-interface LoopBack0 peer 2::1 as-number 300 # ipv4-family unicast undo synchronization peer 2.2.2.2 enable # ipv6-family unicast undo synchronization import-route direct peer 2.2.2.2 enable peer 2.2.2.2 label-route-capability peer 2::1 enable # ospf 1 area 0.0.0.0 network 3.3.3.3 0.0.0.0 network 10.0.0.0 0.0.0.3 # return l

8 BGP4+ Configuration

Configuration file of CE2


# sysname CE2 # ipv6 # vlan batch 30 # interface Vlanif30 ipv6 enable ipv6 address 2::1/64 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface LoopBack0 ipv6 enable ip address 4.4.4.4 255.255.255.255 # interface LoopBack1 ipv6 enable ipv6 address 6::6/64 # bgp 300 peer 2::2 as-number 200 # ipv4-family unicast undo synchronization #

Issue 04 (2010-01-08)

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

8-59

8 BGP4+ Configuration
ipv6-family unicast undo synchronization network 6:: 64 peer 2::2 enable # return

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

8-60

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

9 MBGP Configuration

9
About This Chapter

MBGP Configuration

This chapter describes the procedure for configuring MBGP and commands for maintaining MBGP, and provides configuration examples. 9.1 Introduction to MBGP This section describes the principle and concepts of MBGP. 9.2 MBGP Features Supported by the S9300 This section describes MBGP features supported by the S9300. 9.3 Configuring Basic BGP Functions This section describes how to configure and apply MBGP. 9.4 Configuring a Policy for Advertising MBGP Routes This section describes how to configure a policy for advertising MBGP routes. 9.5 Configuring the Routing Policy Between MBGP Peers This section describes how to configure the routing policy between MBGP peers. 9.6 Configuring MBGP Route Attributes This section describes how to configure a policy for selecting MBGP routes. 9.7 Maintaining MBGP This section describes how to clear the statistics on MBGP and how to debug MBGP. 9.8 Configuration Examples This section provides a configuration example of MBGP.

Issue 04 (2010-01-08)

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

9-1

9 MBGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

9.1 Introduction to MBGP


This section describes the principle and concepts of MBGP. When multicast sources and receivers are located in different ASs, the multicast forwarding tree needs to be configured across ASs. The Multiprotocol Border Gateway Protocol (MP-BGP) can be dedicated to transmit routing information across ASs for multicast. MP-BGP is the multiprotocol extension of BGP. Currently, BGP4 is applicable only to unicast. Based on BGP4, MP-BGP provides advanced functions. Therefore, BGP can provide routing information for multiple routing protocols including multicast routing protocoal.
l

MP-BGP can maintain routing information for both unicast and multicast. MP-BGP stores the routing information in different routing tables, which ensures that unicast routing information and multicast routing information are separated. MP-BGP supports both unicast and multicast modes. MP-BGP can create different network topologies for the two modes. The most of the unicast routing policies and configuration methods supported by BGP4 are applicable to the multicast mode. Therefore, MP-BGP can maintain unicast and multicast routes according to different routing policies.

The application of MP-BGP to multicast is called the Multicast BGP (MBGP). The following sections describe the configuration items used by MP-BGP for multicast application, that is, MBGP configuration items. For details about MP-BGP, see the Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing.

9.2 MBGP Features Supported by the S9300


This section describes MBGP features supported by the S9300. For details, see "Configuring the BGP" in the Quidway S9300 Terabit Routing Switch Configuration Guide-IP Routing.

9.3 Configuring Basic BGP Functions


This section describes how to configure and apply MBGP. 9.3.1 Establishing the Configuration Task 9.3.2 Configuring a BGP Peer 9.3.3 Configuring a BGP Peer 9.3.4 (Optional) Configuring the MBGP RR 9.3.5 Configuring MBGP to Import Local Routes 9.3.6 Checking the Configuration

9.3.1 Establishing the Configuration Task


9-2 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

9 MBGP Configuration

Applicable Environment
The multicast packets are checked according to:
l l l

Multicast static route Unicast route MBGP route

The MBGP connection established in the multicast address family view provides useful routing information for RPF check.

Pre-configuration Tasks
Before configuring basic MBGP functions, complete the following task:
l

Configuring the unicast routing protocol to ensure that the IP routes between nodes are reachable

Data Preparation
To configure basic MBGP functions, you need the following data. No. 1 2 3 4 Data Local AS number Address of the remote peer or name of the peer group Cluster ID Routing information to be advertised

9.3.2 Configuring a BGP Peer


Context

CAUTION
If the BGP connection is already established between two S9300s for which the MBGP peer relation needs to be established, skip this configuration.

Procedure
Step 1 Run:
system-view

The system view is displayed.


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 9-3

9 MBGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Step 2 Run:
bgp as-number

BGP is enabled, the local AS number is specified, and the BGP view is displayed. Step 3 (Optional) Run:
router-id ip-address

The router ID of BGP is set. Step 4 Run:


peer ip-address as-number as-number

The IP address of a remote peer and the AS that the remote peer belongs to are specified. Step 5 (Optional) Run:
peer { ipv4-address | group-name } connect-interface interface-type interfacenumber [ ipv4-source-address ]

The source interface and source address used for BGP connection are specified. If a loopback interface is used to establish the BGP connection, this step is mandatory. Step 6 (Optional) Run:
peer { ip-address | group-name } ebgp-max-hop [ number ]

The maximum number of hops of the EBGP connection is set. This step is valid only for EBGP peers. Two S9300s must be directly connected through physical links. In this case, the EBGP peer connection can be established between the S9300s. If a loopback interface is used to establish the BGP connection, this step is mandatory. ----End

9.3.3 Configuring a BGP Peer


Context
Do as follows on the S9300 where a BGP peer is configured.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv4-family multicast

The BGP-IPv4 multicast address family view is displayed. Step 4 Run:


peer { peer-address | group-name } enable

9-4

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

9 MBGP Configuration

MBGP is enabled for the original BGP peer or peer group. The original BGP peer or peer group becomes the MBGP peer.
l l

group-name: specifies the original BGP peer group. peer-address: specifies the IP address of the original remote BGP peer.

----End

9.3.4 (Optional) Configuring the MBGP RR


Context

CAUTION
The route reflector (RR) is valid only for IBGP peers. Before performing this configuration, you must set up the IBGP peer relation between the MBGP RR and the client. Do as follows on the S9300.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv4-family multicast

The BGP-IPv4 multicast address family view is displayed. Step 4 Run:


peer { group-name | peer-address } reflect-client

The S9300 is configured as an RR, and the peer or peer group is specified as the client of the RR.
l l

group-name: specifies the name of an MBGP peer group. peer-address: specifies the IP address of a remote MBGP peer.

Step 5 (Optional) Run:


reflector cluster-id { decimal-value | ipv4-address }

The cluster ID of the RR is set. By default, the RR uses its router ID as the cluster ID.
l

decimal-value: specifies the cluster ID in the form of integer.


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 9-5

Issue 04 (2010-01-08)

9 MBGP Configuration
l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

ipv4-address: specifies the cluster ID in the form of IPv4 address.

----End

9.3.5 Configuring MBGP to Import Local Routes


Context
MBGP routes have two sources: routes statically imported with the network command and routes imported with the import-route command. You must import at least one local route according to the actual network situation. Do as follows on the S9300 where an MBGP peer is configured.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv4-family multicast

The BGP-IPv4 multicast address family view is displayed. Step 4 Run:


network network-address [ mask-length | mask ] [ route-policy route-policy-name ]

The S9300 is configured to advertise the route of the directly connected network segment. Step 5 Run:
import-route protocol [ process-id ] [ med med-value | route-policy route-policyname ]*

The IGP route is imported to MBGP. Step 6 (Optional) Run:


default-route imported

The default route is imported to the MBGP routing table. This command is run in special cases. By default, default routes are not imported. To import a default route, you need to run the default-route imported command and the importroute command. The import-route command cannot be used to import default routes, and the default-route imported command is used to import only default routes in the local routing table. ----End

9.3.6 Checking the Configuration


9-6 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

9 MBGP Configuration

Prerequisite
The configuration of basic MBGP functions is complete.

Procedure
l l l l Run the display bgp multicast peer [ [ peer-address ] verbose ] command to check the information about an MBGP peer. Run the display bgp multicast group [ group-name ] command to check the information about an MBGP peer group. Run the display bgp multicast network command to check the information about the routes advertised by MBGP. Run the display bgp multicast routing-table [ network-address [ mask-length [ longerprefixes ] | mask [ longer-prefixes ] ] ] command to check the information about the MBGP routing table.

----End

9.4 Configuring a Policy for Advertising MBGP Routes


This section describes how to configure a policy for advertising MBGP routes.

Context
NOTE

The following configuration tasks are optional. You can perform the configuration tasks as required.

9.4.1 Establishing the Configuration Task 9.4.2 Configuring the Next Hop in the Route as the Local Address 9.4.3 Configuring Local Route Aggregation of MBGP 9.4.4 Configuring the Local Peer to Advertise the Default Route 9.4.5 Configuring the Local Peer to Advertise the Community Attributes and Extended Community Attributes 9.4.6 Configuring the Update Message Not to Contain the Private AS Number 9.4.7 Checking the Configuration

9.4.1 Establishing the Configuration Task


Applicable Environment
The S9300 configured with an MBGP peer advertises the information about local routes to the remote peer. Based on the actual situation, you can adopt the matching policy and determine:
l

Whether to change the next hop in the route when MBGP advertises routes to the IBGP peer. Whether MBGP advertises all the local routes or only the aggregated local routes. Whether MBGP advertises the default route.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 9-7

l l

Issue 04 (2010-01-08)

9 MBGP Configuration
l l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Whether MBGP advertises the community attributes or the extended community attribute. Whether the BGP Update messages sent by the MBGP peer contains the private AS number.

Pre-configuration Tasks
Before configuring the policy for advertising MBGP routes, complete the following task:
l

9.3 Configuring Basic BGP Functions

Data Preparation
To configure the policy for advertising MBGP routes, you need the following data. No. 1 2 3 4 Data AS number Address of the remote peer or name of the peer group Routing policy name Aggregated IP address and mask of the local route

9.4.2 Configuring the Next Hop in the Route as the Local Address
Context
Do as follows on the S9300 where an MBGP peer is configured.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv4-family multicast

The BGP-IPv4 multicast address family view is displayed. Step 4 Run:


peer { group-name | peer-address } next-hop-local

The next hop in the route is configured as the local address when the S9300 advertises routes to the MBGP peer group or remote MBGP peer.
9-8 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

9 MBGP Configuration

This configuration is valid only for the IBGP peer or peer group.
l l

group-name: specifies the name of an MBGP peer group. peer-address: specifies the IP address of a remote MBGP peer.

----End

9.4.3 Configuring Local Route Aggregation of MBGP


Context
MBGP supports local route aggregation in the following modes:
l l

Automatic aggregation: MBGP automatically aggregates routes imported locally. Manual aggregation: MBGP automatically aggregates routes in the local MBGP routing table. The preference of manual aggregation is higher than the preference of automatic aggregation.

Do as follows on the S9300 where an MBGP peer is configured. By default, MBGP does not aggregate local routes.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv4-family multicast The BGP-IPv4 multicast address family view is displayed.

Step 4 Run:
summary automatic

The automatic aggregation of the subnet route is configured. Step 5 Run:


aggregate ip-address { mask | mask-length } [ as-set | attribute-policy routepolicy-name1 | detail-suppressed | origin-policy route-policy-name2 | suppresspolicy route-policy-name3 ]*

The local routes are aggregated, and MBGP advertises aggregated local routes.
l

ip-address: specifies the IP address of the aggregated routes. The value is in dotted decimal notation. mask: specifies the network mask of the aggregated routes. The value is in dotted decimal notation. mask-length: specifies the length of the mask of the IPv4 address. The value is an integer that ranges from 0 to 32.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 9-9

Issue 04 (2010-01-08)

9 MBGP Configuration
l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

as-set: generates a route with AS-SET. Use this parameter with caution when many AS paths are aggregated. attribute-policy: is used to set the attributes of the aggregation routes. detail-suppressed: indicates that only the aggregated route is advertised. origin-policy: is used to filter the specific routes in route aggregation. suppress-policy: is used to suppress the advertisements of a specific route. route-policy-name: specifies the name of the routing policy.

l l l l l

----End

9.4.4 Configuring the Local Peer to Advertise the Default Route


Context
Do as follows on the S9300 where an MBGP peer is configured. By default, the default route is not advertised.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv4-family multicast

The BGP-IPv4 multicast address family view is displayed. Step 4 Run:


peer { group-name | peer-address } default-route-advertise [ route-policy routepolicy-name ]

The default route is advertised to the MBGP peer group or remote MBGP peer.
l l l

group-name: specifies the name of an MBGP peer group. peer-address: specifies the IP address of a remote MBGP peer. route-policy route-policy-name: specifies the routing policy for controlling the routes to be advertised.

----End

9.4.5 Configuring the Local Peer to Advertise the Community Attributes and Extended Community Attributes
9-10 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

9 MBGP Configuration

Context
Do as follows on the S9300 where an MBGP peer is configured. By default, the community attributes and extended community attributes are not advertised.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv4-family multicast

The BGP-IPv4 multicast address family view is displayed. Step 4 Run:


peer { group-name | community } peer-address } { advertise-community | advertise-ext-

The community attributes and extended community attributes are advertised to the MBGP peer group or the remote MBGP peer.
l l l l

group-name: specifies the name of an MBGP peer group. peer-address: specifies the IP address of a remote MBGP peer. advertise-community: specifies the community attributes. advertise-ext-community: specifies the extended community attributes.

----End

9.4.6 Configuring the Update Message Not to Contain the Private AS Number
Context
Do as follows on the S9300 where an MBGP peer is configured. This configuration is valid only for EBGP peers. By default, the Update message contains the private AS number.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

Issue 04 (2010-01-08)

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

9-11

9 MBGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The BGP view is displayed. Step 3 Run:


ipv4-family multicast

The BGP-IPv4 multicast address family view is displayed. Step 4 Run:


peer { group-name | peer-address } public-as-only

The BGP Update message does not contain the private AS number when being sent to the MBGP peer group or the remote MBGP peer. The public AS number can be directly used on the Internet. The private AS number cannot be advertised on the Internet. It can be used only in the internal routing domain.
l l

group-name: specifies the name of an MBGP peer group. peer-address: specifies the IP address of a remote MBGP peer.

----End

9.4.7 Checking the Configuration


Prerequisite
The configuration of the policy for advertising MBGP routes is complete.

Procedure
l Run the display bgp multicast routing-table community [ aa:nn ] & <0-13> [ noadvertise | no-export | no-export-subconfed ]* [ whole-match ] command to check the routing information of the specified MBGP community. Run the display bgp multicast routing-table community-filter community-filternumber [ whole-match ] command to check the information about routes that match the specified MBGP community list. Run the display bgp multicast network command to check the routing information that MBGP advertises. Run the display bgp multicast routing-table [ network-address [ mask-length [ longerprefixes ] | mask [ longer-prefixes ] ] ] command to check the information about the MBGP routing table. Run the display bgp multicast routing-table cidr command to check the CIDR route. Run the display bgp multicast routing-table statistics command, and you can view the statistics on the MBGP routing table.

l l

l l

----End

9.5 Configuring the Routing Policy Between MBGP Peers


This section describes how to configure the routing policy between MBGP peers.
9-12 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

9 MBGP Configuration

Context
NOTE

The following configuration tasks are optional. You can perform the configuration tasks as required.

9.5.1 Establishing the Configuration Task 9.5.2 Configuring the Routing Policy in the Global MBGP View 9.5.3 Configuring the Routing Policy Based on Route-Policy 9.5.4 Configuring the Routing Policy Based on IP ACL 9.5.5 Configuring the Routing Policy Based on the AS-Path List 9.5.6 Configuring a Routing Policy Based on the IP Prefix List 9.5.7 Setting the Maximum Number of Routes Received from an MBGP Peer 9.5.8 Configuring BGP Route Dampening 9.5.9 Checking the Configuration

9.5.1 Establishing the Configuration Task


Applicable Environment
According to the actual network situation, you can configure the proper routing policy to control the route information transmitted between MBGP peers. For an S9300 configured with MBGP, the route interaction between peers has two directions:
l

import: specifies the incoming direction. By configuring the command, the S9300 can filter the routes from the specified peer. Only the routes that meet the requirements are accepted. export: specifies the outgoing direction. By configuring the command, the S9300 can filter the routes sent to the specified peer or group. Only the routes that meet the requirements are advertised.

MBGP dampening can suppress unstable routing information. After MBGP dampening is configured, unstable routing information is not added to the MBGP routing table or advertised to other MBGP peers.

Pre-configuration Tasks
Before configuring the routing policy for MBGP peers, complete the following task:
l

9.3 Configuring Basic BGP Functions

Data Preparation
To configure the routing policy for MBGP peers, you need the following data. No. 1
Issue 04 (2010-01-08)

Data Number of the AS where the peer is located.


Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 9-13

9 MBGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

No. 2 3 4 5 6 7 8

Data Address of the peer or name of the peer group Policy for filtering routes based on RoutePolicy Policy for filtering routes based on IP ACL Policy for filtering routes based on as-pathfilter Policy for filtering routes based on ip-prefix Value of route-limit Dampening parameters, including the half life and threshold

9.5.2 Configuring the Routing Policy in the Global MBGP View


Context
Do as follows on the S9300 where an MBGP peer is configured. This configuration is applicable to the route interaction between the S9300 and any remote peer.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv4-family multicast

The BGP-IPv4 multicast address family view is displayed. Step 4 Run:


filter-policy { basic-acl-number | ip-prefix ip-prefix-name } { import | export [ protocol process-id ] }

The MBGP routing policy is configured. The S9300 can control the route interaction with any remote MBGP peer.
l l

basic-acl-number: specifies the number of the list used for filtering addresses. ip-prefix-name: specifies the name of the IP prefix list.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

9-14

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


l

9 MBGP Configuration

import: is used to filter routes from any MBGP peer. Only the routes that meet the requirements are accepted. export [ protocol process-id ]: is used to filter the routes advertised to any MBGP peer. Routes advertised to any MBGP peer are filtered when the local routes are imported to the MBGP routing table. Only the local routes that meet the requirements are imported to the MBGP routing table. Then the routing information in the MBGP routing table is advertised.

----End

9.5.3 Configuring the Routing Policy Based on Route-Policy


Context
Do as follows on the S9300 where an MBGP peer is configured.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv4-family multicast

The BGP-IPv4 multicast address family view is displayed. Step 4 Run:


peer { group-name | peer-address } route-policy route-policy-name { import | export }

The policy for filtering MBGP routes is configured based on the Route-Policy. The S9300 can control the route interaction with the specified remote MBGP peer.
l l l l

group-name: specifies the name of an MBGP peer group. peer-address: specifies the IP address of a remote MBGP peer. route-policy-name: specifies the name of the routing policy. import: filters the routes from the specified remote MBGP peer or the MBGP peer group. Only the routes that meet the requirements are accepted. export: filters the routes sent to the specified remote MBGP peer or the MBGP peer group. Only the routes that meet the requirements are advertised.

----End

9.5.4 Configuring the Routing Policy Based on IP ACL


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 9-15

9 MBGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Context
Do as follows on the S9300 where an MBGP peer is configured. This configuration is optional. By default, no routing policy based on IP ACL is configured.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv4-family multicast

The BGP-IPv4 multicast address family view is displayed. Step 4 Run:


peer { group-name | peer-address } filter-policy basic-acl-number { import | export }

The policy for filtering MBGP routes is configured based on IP ACL. You can control the route interaction between the S9300 and the specified remote MBGP peer.
l l l l

group-name: specifies the name of an MBGP peer group. peer-address: specifies the IP address of a remote MBGP peer. basic-acl-number: specifies the routing policy. import: filters the routes from the specified remote MBGP peer or the MBGP peer group. Only the routes meet the requirements are accepted. export: filters the routes sent to the specified remote MBGP peer or the MBGP peer group. Only the routes that meet the requirements are advertised.

----End

9.5.5 Configuring the Routing Policy Based on the AS-Path List


Context
Do as follows on the S9300 where an MBGP peer is configured. By default, the routing policy is not configured based on the AS-Path list.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

9-16

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

9 MBGP Configuration

The BGP view is displayed. Step 3 Run:


ipv4-family multicast

The BGP-IPv4 multicast address family view is displayed. Step 4 Run:


peer { group-name | peer-address } as-path-filter filter-number { import | export }

The policy for filtering MBGP routes is configured based on the AS-Path list. The S9300 can control the route interaction with a specified remote MBGP peer.
l l l l

group-name: specifies the name of an MBGP peer group. peer-address: specifies the IP address of a remote MBGP peer. filter-number: specifies the routing policy. import: filters the routes from the specified remote MBGP peer or the MBGP peer group. Only the routes that meet the requirements are accepted. export: filters the routes sent to the specified remote MBGP peer or the MBGP peer group. Only the routes that meet the requirements are advertised.

----End

9.5.6 Configuring a Routing Policy Based on the IP Prefix List


Context
Do as follows on the S9300 where an MBGP peer is configured. By default, no routing policy based on the IP prefix list is configured.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv4-family multicast

The BGP-IPv4 multicast address family view is displayed. Step 4 Run:


peer { group-name | peer-address } ip-prefix prefix-name { import | export }

The policy for filtering MBGP routes is configured based on the IP prefix list. The S9300 can control the route interaction with the specified remote MBGP peer.
l l

group-name: specifies the name of an MBGP peer group. peer-address: specifies the IP address of a remote MBGP peer.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 9-17

Issue 04 (2010-01-08)

9 MBGP Configuration
l l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

prefix-name: specifies the routing policy. import: is used to filter the routes from the specified remote MBGP peer or the MBGP peer group. Only the routes that meet the requirements are accepted. export: is used to filter the routes sent to the specified remote MBGP peer or the MBGP peer group. Only the routes that meet the requirements are advertised.

----End

9.5.7 Setting the Maximum Number of Routes Received from an MBGP Peer
Context
Do as follows on the S9300 where an MBGP peer is configured.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv4-family multicast

The BGP-IPv4 multicast address family view is displayed. Step 4 Run:


peer { group-name | peer-address } route-limit maximum-limit [ threshold ] [ alertonly | idle-forever | idle-timeout value ]

The maximum number of address prefixes of routes learned from the specified remote peer is set. If the number of address prefixes reaches the maximum number, the S9300 ends the peer relation.
l l l l

group-name: specifies the name of an MBGP peer group. peer-address: specifies the IP address of a remote MBGP peer. maximum-limit: specifies the maximum number of IP prefixes. threshold: specifies the threshold for generating an alarm. The value is the number of routes to the maximum number of IP prefixes. alert-only: indicates that an alarm is generated when the number of routes exceeds the threshold. idle-forever: indicates that the S9300 does not establish connections when the number of routes reaches the threshold until the reset bgp command is run.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

9-18

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


l

9 MBGP Configuration

idle-timeout value: indicates that the S9300 triggers the timer for automatically establishing connections when the number of routes reaches the threshold. The value parameter indicates the timeout interval.

----End

9.5.8 Configuring BGP Route Dampening


Context
Do as follows on the S9300 where an MBGP peer is configured. This configuration is valid only for EBGP routes. By default, the S9300 uses the default values of dampening parameters.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv4-family multicast

The BGP-IPv4 multicast address family view is displayed. Step 4 Run:


dampening [ half-life-time-reachable half-life-time-unreachable route-reuse-value route-suppress-value max-ceiling-value | route-policy route-policy-name ]*

The parameters of MBGP route dampening are set.


l l l

half-life-time-reachable: specifies the half life of a reachable route. half-life-time-unreachable: specifies the half life of an unreachable route. route-reuse-value: specifies the threshold of freeing suppressed routes. When the penalty value becomes smaller than the threshold for freeing suppressed routes, the routes can be used again. route-suppress-value: specifies the threshold for suppressing routes. The value of routesuppress-value must be greater than the value of route-reuse-value. When the penalty value exceeds the threshold for suppressing routes, routes are suppressed. max-ceiling-value: specifies the upper limit of the penalty value. The value of max-ceilingvalue must be greater than the value of route-suppress-value. route-policy route-policy-name: specifies the name of a Rout-Policy that is applied to the routes that meet the matching rules.

----End

9.5.9 Checking the Configuration


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 9-19

9 MBGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Prerequisite
The configuration of the route interaction policy between MBGP peers is complete.

Procedure
l l l l l Run the display bgp multicast routing-table different-origin-as command to check the information about the routing table containing routes with different source ASs. Run the display bgp multicast routing-table regular-expression [ as-regularexpression ] to check the information about routes that match the AS regular expression. Run the display bgp multicast paths as-regular-expression command to check the information about AS paths. Run the display bgp multicast routing-table as-path-filter as-path-filter-number command to check the information about routes that match the filtering list. Run the display bgp multicast routing-table community-filter community-filternumber [ whole-match ] command to check the route that matches the specified MBGP community list. Run the display bgp multicast routing-table peer peer-address { advertised-routes | received-routes } [ statistics ] command to check the information about routes that are sent by and received from the specified MBGP peer. Run the display bgp multicast network command to check the information about routes advertised through the network command. Run the display bgp multicast routing-table dampened command to check the dampened MBGP routes. Run the display bgp multicast routing-table dampening parameter command to check the parameters of MBGP route dampening. Run the display bgp multicast routing-table flap-info [ network-address [ mask [ longermatch ] | mask-length [ longer-match ] ] | as-path-filter as-path-filter-number | regularexpression as-regular-expression ] command to check the statistics on flapping MBGP routes.

l l l l

----End

9.6 Configuring MBGP Route Attributes


This section describes how to configure a policy for selecting MBGP routes. 9.6.1 Establishing the Configuration Task 9.6.2 Setting the Preferred Value for the Route Received from an MBGP Peer 9.6.3 Setting the Preference of an MBGP Route 9.6.4 Setting Local_Pref of an MBGP Route 9.6.5 Configuring the MED of an MBGP Route 9.6.6 Checking the Configuration

9.6.1 Establishing the Configuration Task


9-20 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

9 MBGP Configuration

Applicable Environment
To select the optimal path, MBGP needs to check the following information:
l l l l l

Preferred value of an MBGP route Preference of MBGP routes Local preference of MBGP peers, that is, the values of Local_Pref of MBGP peers MEDs of MBGP routes MBGP route dampening parameters

According to the actual network situation, you can adopt a policy to determine the election of routes.

Pre-configuration Tasks
Before configuring the policy for selecting MBGP routes, complete the following task:
l

9.3 Configuring Basic BGP Functions

Data Preparation
To configure the policy for selecting MBGP routes, you need the following data. No. 1 2 3 4 5 6 7 Data AS number MBGP peer group and remote MBGP peer Preferred value of the MBGP route Preference of external, internal, and local routes, and Route-Policy Value of Default Local-preference of the local S9300 MEDs of MBGP routes Values of the route dampening parameters

9.6.2 Setting the Preferred Value for the Route Received from an MBGP Peer
Context
Do as follows on the S9300 where an MBGP peer is configured. By default, the preferred value is 0.

Issue 04 (2010-01-08)

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

9-21

9 MBGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv4-family multicast

The BGP-IPv4 multicast address family view is displayed. Step 4 Run:


peer { group-name | peer-address } preferred-value preference-value

The preferred value is set for the route learned from MBGP peer group or remote MBGP peer. The route with the largest preferred value is selected as the route to the specified network.
l l

group-name: specifies the name of an MBGP peer group. peer-address: specifies the IP address of a remote MBGP peer.

----End

9.6.3 Setting the Preference of an MBGP Route


Context
Do as follows on the S9300 where an MBGP peer is configured. By default, the preference of EBGP external routes, IBGP internal routes, and local routes is 255.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv4-family multicast

The BGP-IPv4 multicast address family view is displayed. Step 4 Run:


preference { external-preference internal-preference local-preference | routepolicy route-policy-name }

The preferences of external, internal, and local routes are configured.


9-22 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


l l l l

9 MBGP Configuration

external-preference: specifies the preference of routes learned from the EBGP peer. internal-preference: specifies the preference of routes learned from the IBGP peer. local-preference: specifies the preference of the locally generated route. route-policy route-policy-name: specifies the name of a Routing-Policy that is applied to the routes that meet the matching rules.

----End

9.6.4 Setting Local_Pref of an MBGP Route


Context
Do as follows on the S9300 where an MBGP peer is configured. By default, the Local_Pref value is 100.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv4-family multicast

The BGP-IPv4 multicast address family view is displayed. Step 4 Run:


default local-preference preference-value

The Local_Pref value is set for the local S9300. When a BGP-enabled S9300 obtains multiple routes with the same destination address but with different next hops through IBGP peers, the route with the largest Local_Pref value is selected. ----End

9.6.5 Configuring the MED of an MBGP Route


Context
Do as follows on the S9300 where an MBGP peer is configured. When a BGP-enabled S9300 obtains multiple routes to the same destination address but with different next hops through EBGP peers, the route with the smallest MED is selected as the optimal route.

Procedure
Step 1 Run:
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 9-23

9 MBGP Configuration
system-view

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The system view is displayed. Step 2 Run:


bgp as-number

The BGP view is displayed. Step 3 Run:


ipv4-family multicast

The BGP-IPv4 multicast address family view is displayed. Step 4 Run:


default med med-value

The default MED is set for the S9300. Step 5 Run:


compare-different-as-med

The MEDs of the routes from different ASs are compared. By default, the S9300 that runs BGP compares the MEDs only from different peers in the same AS. Step 6 Run:
bestroute med-none-as-maximum

The MED is set to the maximum value when the MED is not set. By default, the MED is 0. Step 7 Run:
bestroute med-confederation

The S9300 is configured to compare MEDs of the routes in a confederation. By default, BGP compares the MEDs of only the routes from the same AS. ----End

9.6.6 Checking the Configuration


Prerequisite
The configuration on MBGP route attributes is complete.

Procedure
l l Run the display bgp multicast routing-table as-path-filter as-path-filter-number command to check the information about routes that match the filtering list. Run the display bgp multicast routing-table statistics command to check the statistics on the MBGP routing table.

----End
9-24 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

9 MBGP Configuration

9.7 Maintaining MBGP


This section describes how to clear the statistics on MBGP and how to debug MBGP. 9.7.1 Resetting MBGP Connections 9.7.2 Clearing MBGP Statistics 9.7.3 Debugging MBGP

9.7.1 Resetting MBGP Connections


Context

CAUTION
The MBGP peer relation between S9300s is ended after you reset MBGP relations by running the reset bgp multicast command. So, confirm the action before you run the command. After the MBGP routing policy or protocol is changed, you can run the following commands in the user view if you want to make the new configuration take effect by resetting MBGP relations

Procedure
l l l l l Run the reset bgp multicast peer-address command to reset the MBGP relation between specified peers. Run the reset bgp multicast all command to reset all MBGP connections. Run the reset bgp multicast group group-name command to reset the MBGP relations between peers in the same peer group. Run the reset bgp multicast external command to reset all external connections. Run the reset bgp multicast internal command to reset internal connections.

----End

9.7.2 Clearing MBGP Statistics


Context

CAUTION
MBGP statistics cannot be restored after you clear them. So, confirm the action before you run the command.

Issue 04 (2010-01-08)

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

9-25

9 MBGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Procedure
l l Run the reset bgp multicast dampening [ network-address [ mask | mask-length ] ] command to clear the MBGP route dampening information. Run the reset bgp multicast flap-info [ network-address [ mask-length | mask ] | as-pathfilter as-path-list-number | regrexp regrexp ] command to clear the statistics on the flapping routes.

----End

9.7.3 Debugging MBGP


Context

CAUTION
Debugging affects the performance of the system. So, after debugging, run the undo debugging all command to disable it immediately. When an MBGP fault occurs, run the following debugging commands in the user view to locate the fault.

Procedure
l l l l Run the debugging bgp all command to enable debugging of all BGP features. Run the debugging bgp event command to enable debugging of BGP events. Run the debugging bgp { keepalive | open | packet | route-refresh } [ receive | send ] [ verbose ] command to enable debugging of BGP packets. Run the debugging bgp update multicast [ acl acl-number | ip-prefix ip-prefix-name | peer peer-address ] [ receive | send] [ verbose ] command to enable debugging of MBGP Update messages.

----End

9.8 Configuration Examples


This section provides a configuration example of MBGP. 9.8.1 Example for Configuring Basic MSDP Functions

9.8.1 Example for Configuring Basic MSDP Functions


Networking Requirements
As shown in Figure 9-1, the receiver receives VOD information in multicast mode. The receiver and the source reside in different ASs. The MBGP peer relation is established between ASs to transmit multicast routing information.
9-26 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

9 MBGP Configuration

Figure 9-1 Networking diagram of MBGP configuration


AS100 AS200 S9300-D Loopback0 GE2/0/0 GE1/0/0

Source GE2/0/0

S9300-A GE1/0/0 Loopback0

S9300-B GE1/0/0

GE2/0/0

GE3/0/0 GE1/0/0 Loopback0

Loopback0 GE3/0/0 S9300-C GE2/0/0 Receiver

MBGP peers

Switch S9300-A

Interface GE 1/0/0 GE 2/0/0 Loopback0

VLANIF interface VLANIF100 VLANIF101 VLANIF100 VLANIF200 VLANIF300 VLANIF400 VLANIF102 VLANIF300 VLANIF400 VLANIF200

IP address 192.1.1.1/24 10.10.10.1/24 1.1.1.1/32 192.1.1.2/24 194.1.1.2/24 193.1.1.2/24 2.2.2.2/32 195.1.1.1/24 22.22.22.1/24 193.1.1.1/24 3.3.3.3/32 195.1.1.2/24 194.1.1.1/24 4.4.4.4/32

S9300-B

GE 1/0/0 GE 2/0/0 GE 3/0/0 Loopback0

S9300-C

GE 1/0/0 GE 2/0/0 GE 3/0/0 Loopback0

S9300-D

GE 1/0/0 GE 2/0/0 Loopback0

Configuration Roadmap
The configuration roadmap is as follows: 1. 2.
Issue 04 (2010-01-08)

Configure the IP addresses for the interfaces on each S9300 to ensure internetworking within the AS in unicast mode. Configure the MBGP peer and set up inter-AS multicast routes.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 9-27

9 MBGP Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

3. 4. 5. 6. 7.

Configure the MBGP routes to be advertised. Enable multicast on each S9300. Configure basic PIM-SM functions in each AS and enable the IGMP function on the interfaces at the host side. Configure the BSR boundary on the interfaces connecting two ASs. Configure the MSDP peers to transfer inter-AS multicast information.

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

AS number of S9300-A: 100 AS number of S9300-B, S9300-C, and S9300-D: 200 Address of the multicast group (225.1.1.1) and address of the multicast source (10.10.10.10/24)
NOTE

This configuration example describes only the commands used to configure MBGP.

Procedure
Step 1 Configure the IP addresses for the interfaces on each S9300 and the OSPF protocol in the ASs. # Configure the IP addresses and masks of the interfaces on each S9300 according to Figure 9-1. Connect the S9300s through OSPF and ensure that S9300-B, S9300-C, and S9300-D can communicate with each other through the network layer and can learn the routes on the loopback interfaces of each other. Configure the S9300s to dynamically update routes through a unicast routing protocol. OSPF process 1 is adopted in the configuration and the procedure is not mentioned here. Step 2 Configure BGP, enable the MBGP protocol, and configure the MBGP peers. # Configure BGP and the MBGP peer on S9300-A.
[S9300-A] bgp 100 [S9300-A-bgp] peer 192.1.1.2 as-number 200 [S9300-A-bgp] ipv4-family multicast [S9300-A-bgp-af-multicast] peer 192.1.1.2 enable [S9300-A-bgp-af-multicast] quit [S9300-A-bgp] quit

# Configure BGP and the MBGP peer on S9300-B.


[S9300-B] bgp 200 [S9300-B-bgp] peer 192.1.1.1 as-number 100 [S9300-B-bgp] peer 193.1.1.1 as-number 200 [S9300-B-bgp] peer 194.1.1.1 as-number 200 [S9300-B-bgp] ipv4-family multicast [S9300-B-bgp-af-multicast] peer 192.1.1.1 enable [S9300-B-bgp-af-multicast] peer 193.1.1.1 enable [S9300-B-bgp-af-multicast] peer 194.1.1.1 enable [S9300-B-bgp-af-multicast] quit [S9300-B-bgp] quit

# Configure BGP and the MBGP peer on S9300-C.


[S9300-C] bgp 200 [S9300-C-bgp] peer 193.1.1.2 as-number 200 [S9300-C-bgp] peer 195.1.1.2 as-number 200

9-28

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


[S9300-C-bgp] ipv4-family multicast [S9300-C-bgp-af-multicast] peer 193.1.1.2 enable [S9300-C-bgp-af-multicast] peer 195.1.1.2 enable [S9300-C-bgp-af-multicast] quit [S9300-C-bgp] quit

9 MBGP Configuration

# Configure BGP and the MBGP peer on S9300-D.


[S9300-D] bgp 200 [S9300-D-bgp] peer 194.1.1.2 as-number 200 [S9300-D-bgp] peer 195.1.1.1 as-number 200 [S9300-D-bgp] ipv4-family multicast [S9300-D-bgp-af-multicast] peer 194.1.1.2 enable [S9300-D-bgp-af-multicast] peer 195.1.1.1 enable [S9300-D-bgp-af-multicast] quit [S9300-D-bgp] quit

Step 3 Configure the routes to be advertised. # Configure the routes to be advertised on S9300-A.
[S9300-A] bgp 100 [S9300-A-bgp] import-route direct [S9300-A-bgp] ipv4-family multicast [S9300-A-bgp-af-multicast] import-route direct [S9300-A-bgp-af-multicast] quit [S9300-A-bgp] quit

# Configure the routes to be advertised on S9300-B.


[S9300-B] bgp 200 [S9300-B-bgp] import-route direct [S9300-B-bgp] import-route ospf 1 [S9300-B-bgp] ipv4-family multicast [S9300-B-bgp-af-multicast] import-route direct [S9300-B-bgp-af-multicast] import-route ospf 1 [S9300-B-bgp-af-multicast] quit [S9300-B-bgp] quit

# Configure the routes to be advertised on S9300-C. The configuration of S9300-D is similar to the configuration of S9300-C, and is not mentioned here.
[S9300-C] bgp 200 [S9300-C-bgp] import-route direct [S9300-C-bgp] ipv4-family multicast [S9300-C-bgp-af-multicast] import-route direct [S9300-C-bgp-af-multicast] import-route ospf 1 [S9300-C-bgp-af-multicast] quit [S9300-C-bgp] quit

Step 4 Enable multicast on each S9300 and the interfaces that are connected. # Configure S9300-A.
[S9300-A] multicast [S9300-A] interface [S9300-A-Vlanif100] [S9300-A-Vlanif100] [S9300-A] interface [S9300-A-Vlanif101] [S9300-A-Vlanif101] routing-enable vlanif 100 pim sm quit vlanif 101 pim sm quit

# Configure S9300-B.
[S9300-B] multicast [S9300-B] interface [S9300-B-Vlanif100] [S9300-B-Vlanif100] [S9300-B] interface [S9300-B-Vlanif200] routing-enable vlanif 100 pim sm quit vlanif 200 pim sm

Issue 04 (2010-01-08)

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

9-29

9 MBGP Configuration
[S9300-B-Vlanif200] [S9300-B] interface [S9300-B-Vlanif300] [S9300-B-Vlanif300] quit vlanif 300 pim sm quit

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

# Configure S9300-C.
[S9300-C] multicast [S9300-C] interface [S9300-C-Vlanif400] [S9300-C-Vlanif400] [S9300-C] interface [S9300-C-Vlanif102] [S9300-C-Vlanif102] [S9300-C-Vlanif102] [S9300-C] interface [S9300-C-Vlanif300] [S9300-C-Vlanif300] routing-enable vlanif 400 pim sm quit vlanif 102 pim sm igmp enable quit vlanif 300 pim sm quit

# Configure S9300-D.
[S9300-D] multicast [S9300-D] interface [S9300-D-Vlanif400] [S9300-D-Vlanif400] [S9300-D] interface [S9300-D-Vlanif200] [S9300-D-Vlanif200] routing-enable vlanif 400 pim sm quit vlanif 200 pim sm quit

Step 5 Configure BSR and RP within each AS. # Configure S9300-A.


[S9300-A] interface loopback 0 [S9300-A-LoopBack0] ip address 1.1.1.1 255.255.255.255 [S9300-A-LoopBack0] pim sm [S9300-A-LoopBack0] quit [S9300-A] pim [S9300-A-pim] c-bsr loopback 0 [S9300-A-pim] c-rp loopback 0 [S9300-A-pim] quit

# Configure S9300-B.
[S9300-B] interface loopback 0 [S9300-B-LoopBack0] ip address 2.2.2.2 255.255.255.255 [S9300-B-LoopBack0] pim sm [S9300-B-LoopBack0] quit [S9300-B] pim [S9300-B-pim] c-bsr loopback 0 [S9300-B-pim] c-rp loopback 0 [S9300-B] quit

Step 6 Configure the BSR boundary on the interfaces connecting two ASs. # Configure S9300-A.
[S9300-A] interface vlanif 100 [S9300-A-Vlanif100] pim bsr-boundary [S9300-A-Vlanif100] quit

# Configure S9300-B.
[S9300-B] interface vlanif 100 [S9300-B-Vlanif100] pim bsr-boundary [S9300-B-Vlanif100] quit

Step 7 Configure MSDP peers. # Configure S9300-A.


9-30 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


[S9300-A] msdp [S9300-A-msdp] peer 192.1.1.2 connect-interface vlanif100 [S9300-A-msdp] quit

9 MBGP Configuration

# Configure S9300-B.
[S9300-B] msdp [S9300-B-msdp] peer 192.1.1.1 connect-interface vlanif100 [S9300-B-msdp] quit

Step 8 Verify the configuration. # Run the display bgp multicast peer command to view the MBGP peer relation between S9300s. For example, the following information shows the MBGP peer relation on S9300-A:
[S9300-A] display bgp multicast peer BGP local router ID : 1.1.1.1 Local AS number : 100 Total number of peers : 1 Peer V AS MsgRcvd MsgSent 192.1.1.2 4 200 82 75

Peers in established state : 1 OutQ Up/Down State PrefRcv 0 00:30:29 Established 17

# Run the display msdp brief command to view information about the MSDP peer relation between S9300s. For example, the following information shows the MBGP peer relation on S9300-B:
[S9300-B] display msdp brief MSDP Peer Brief Information of VPN-Instance: public net Configured Up Listen Connect Shutdown 1 1 0 0 0 Peer's Address 192.1.1.1 State Up Up/Down time 00:07:17 AS 100 SA Count 1

Down 0 Reset Count 0

----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # vlan batch 100 101 # multicast routing-enable # interface vlanif 100 ip address 192.1.1.1 255.255.255.0 pim bsr-boundary pim sm # interface vlanif 101 ip address 10.10.10.1 255.255.255.0 pim sm # interface GigabitEthernet1/0/0 port hybrid tagged vlan 100 # interface GigabitEthernet2/0/0 port hybrid untagged vlan 101 # interface loopback 0 ip address 1.1.1.1 255.255.255.255 pim sm # pim c-bsr loopback 0

Issue 04 (2010-01-08)

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

9-31

9 MBGP Configuration
c-rp loopback 0 # bgp 100 peer 192.1.1.2 as-number 200 # ipv4-family unicast undo synchronization peer 192.1.1.2 enable # ipv4-family multicast undo synchronization import-route direct peer 192.1.1.2 enable # msdp peer 192.1.1.2 connect-interface vlanif100 # return l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of S9300-B


# sysname S9300-B # vlan batch 100 200 300 # multicast routing-enable # interface vlanif 100 ip address 192.1.1.2 255.255.255.0 pim bsr-boundary pim sm # interface vlanif 200 ip address 194.1.1.2 255.255.255.0 pim sm # interface vlanif 300 ip address 193.1.1.2 255.255.255.0 pim sm # interface GigabitEthernet1/0/0 port hybrid tagged vlan 100 # interface GigabitEthernet2/0/0 port hybrid tagged vlan 200 # interface GigabitEthernet3/0/0 port hybrid tagged vlan 300 # interface loopback 0 ip address 2.2.2.2 255.255.255.255 pim sm # pim c-bsr loopback 0 c-rp loopback 0 # ospf 1 area 0.0.0.0 network 193.1.1.0 0.0.0.255 network 194.1.1.0 0.0.0.255 network 2.2.2.2 0.0.0.0 # bgp 200 peer 192.1.1.1 as-number 100 peer 193.1.1.1 as-number 200 peer 194.1.1.1 as-number 200 # ipv4-family unicast undo synchronization

9-32

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


peer 192.1.1.1 enable peer 193.1.1.1 enable peer 194.1.1.1 enable # ipv4-family multicast undo synchronization import-route direct import-route ospf 1 peer 192.1.1.1 enable peer 193.1.1.1 enable peer 194.1.1.1 enable # msdp peer 192.1.1.1 connect-interface vlanif100 # return l

9 MBGP Configuration

Configuration file of S9300-C


# sysname S9300-C # vlan batch 102 300 400 # multicast routing-enable # interface vlanif 102 ip address 22.22.22.1 255.255.255.0 pim sm igmp enable # interface vlanif 300 ip address 193.1.1.1 255.255.255.0 pim sm # interface vlanif 400 ip address 195.1.1.1 255.255.255.0 pim sm # interface GigabitEthernet1/0/0 port hybrid tagged vlan 400 # interface GigabitEthernet2/0/0 port hybrid untagged vlan 102 # interface GigabitEthernet3/0/0 port hybrid tagged vlan 300 # interface loopback 0 ip address 3.3.3.3 255.255.255.255 pim sm # pim c-bsr loopback 0 c-rp loopback 0 # ospf 1 area 0.0.0.0 network 193.1.1.0 0.0.0.255 network 195.1.1.0 0.0.0.255 network 3.3.3.3 0.0.0.0 # bgp 200 peer 193.1.1.2 as-number 100 peer 195.1.1.2 as-number 200 # ipv4-family unicast undo synchronization peer 193.1.1.2 enable peer 195.1.1.2 enable #

Issue 04 (2010-01-08)

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

9-33

9 MBGP Configuration
ipv4-family multicast undo synchronization import-route direct import-route ospf 1 peer 193.1.1.2 enable peer 195.1.1.2 enable # return l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of S9300-D


# sysname S9300-D # vlan batch 200 400 # multicast routing-enable # interface vlanif 200 ip address 194.1.1.1 255.255.255.0 pim sm # interface vlanif 400 ip address 195.1.1.2 255.255.255.0 pim sm # interface GigabitEthernet1/0/0 port hybrid tagged vlan 400 # interface GigabitEthernet2/0/0 port hybrid tagged vlan 200 # interface loopback 0 ip address 4.4.4.4 255.255.255.255 pim sm # ospf 1 area 0.0.0.0 network 194.1.1.0 0.0.0.255 network 195.1.1.0 0.0.0.255 network 4.4.4.4 0.0.0.0 # bgp 200 peer 194.1.1.2 as-number 200 peer 195.1.1.1 as-number 200 # ipv4-family unicast undo synchronization peer 194.1.1.2 enable peer 195.1.1.1 enable # ipv4-family multicast undo synchronization import-route direct import-route ospf 1 peer 194.1.1.2 enable peer 195.1.1.1 enable # return

9-34

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

10 Routing Policy Configuration

10
About This Chapter

Routing Policy Configuration

This chapter describes the concepts of the routing policy and the procedure for configuring the routing policy, and provides examples for configuring the routing policy. 10.1 Introduction to the Routing Policy This section describes the principle and concepts of routing policy. 10.2 Routing Policy Features Supported by the S9300 This section describes the routing policy features supported by the S9300. 10.3 Configuring an IP Prefix List This section describes how to configure an IP prefix list. 10.4 Configuring a Route-Policy This section describes how to configure a Route-Policy, define a group of matching rules, and change the route attributes when the matching rules are met. 10.5 Applying Filters to the Received Routes This section describes how to apply filters in routing protocols to filter the received routes. 10.6 Applying Filters to the Advertised Routes This section describes how to apply filters in routing protocols to filter the advertised routes. 10.7 Applying Filters to the Imported Routes This section describes how to apply filters in routing protocols to filter the imported routes. 10.8 Controlling the Valid Time of a Routing Policy This section describes how to control the valid time of a routing policy. 10.9 Configuring IP FRR on a Public Network This section describes how to configure IP FRR on a public network. 10.10 Configuring IP FRR on a Private Network This section describes how to configure IP FRR on a private network. 10.11 Maintaining the Routing Policy This section describes how to maintain the routing policy. 10.12 Configuration Examples
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 10-1

10 Routing Policy Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

This section provides several configuration examples of the routing policy.

10-2

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

10 Routing Policy Configuration

10.1 Introduction to the Routing Policy


This section describes the principle and concepts of routing policy.

Routing Policy
The routing policy is used to change the path that a packet passes through. By changing route attributes such as reachability, you can change the path that the traffic passes through. When advertising or receiving routes, the S9300 may use policies to filter routes. The policies are used in the following situations:
l l

The S9300 receives or advertises only certain routes that meet the matching rules. A routing protocol may import routes discovered by other routing protocols such as the Border Gateway Protocol (BGP) to enrich routing information. When importing routes from other routing protocols, the S9300 may import certain routes that meet the matching rules, and set attributes for the routes imported to meet the requirements of the local routing protocol. Define the route attributes, that is, a group of matching rules. You can use the route attributes, such as the destination address and the address of the host advertising routes, as matching rules.

To implement a routing policy, you must:


l

Apply the matching rules to advertise, receive, and import routes.

Differences Between the Routing Policy and PBR


A packet is often forwarded according to the destination address of the packet in the routing table, whereas policy-based routing (RBR) is used to search the previous packet forwarding procedure. PBR selects routes based on the source address and the length of packets and the defined routing policy. PBR is applicable to security and load balancing. Routing policies and PBR are different mechanisms. Table 10-1 shows the difference between the two mechanisms. Table 10-1 Difference between the routing policy and PBR Routing Policy Forwards packets based on the destination address in the routing table. Is based on the control plane and serves the routing protocol and routing table. Combines with the routing policy. PBR Forwards packets based on the policy. If packets fail to be forwarded, the device forwards packets by searching the routing table. Is based on the forwarding plane and serves for the forwarding policy. Needs to be manually configured hop by hop to ensure that the packet is forwarded through the policy. The policy-based-route command is used.

The route-policy command is used.

Issue 04 (2010-01-08)

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

10-3

10 Routing Policy Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

10.2 Routing Policy Features Supported by the S9300


This section describes the routing policy features supported by the S9300.

Filters
The S9300 provides several types of filters for routing protocols, such as access control lists (ACLs), IP prefix lists, and Route-Policies. The following describes them in detail.

ACL
The S9300 provides ACLs for IPv4 routes and IPv6 routes. Based on the usage, ACLs are classified into three types, that is, MAC address ACLs, basic ACLs, and advanced ACLs. When defining an ACL, you can specify the IP address and subnet range to match the destination network segment address or the next hop address of a route. For the configuration of ACLs, see the chapter "Configuring ACLs" in the Quidway S9300 Terabit Routing Switch Configuration Guide - Security Configuration.

IP Prefix List
The S9300 provides IP prefix lists for IPv4 routes and IPv6 prefix list. An IP prefix list is identified by its name. Each prefix list contains multiple entries. Each entry can independently specify the matching range in the form of a network prefix. The matching range is identified by an index number that designates the matching sequence. During the matching, the S9300 checks entries identified by the index number in ascending order. If a route matches an entry, it indicates that the matching is complete. In addition, the S9300 does not match the next entry.

Route-Policy
A Route-Policy is a complex filter. It is used to match the route attributes, and to change the route attributes when matching rules are met. The Route-Policy uses the preceding filters to define the matching rules. A Route-Policy consists of multiple nodes and the relation between these nodes is "OR". The system checks the nodes according to the index number. When a route matches a node in the Route-Policy, it indicates that the route matches the Route-Policy. In addition, the S9300 does not match the next node. Each node comprises a set of if-match and apply clauses.
l

The if-match clauses define the matching rules and the matching objects are the route attributes. The relation between if-match clauses in a node is "AND". A matching succeeds only when all the matching rules specified by the if-match clauses are matched. The apply clauses specify actions. When a route matches a node, the apply clauses set some attributes for the route.

Application of the Route-Policy


The routing policy is used in the following situations:
10-4 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


l

10 Routing Policy Configuration

When importing routes discovered by other protocols, a routing protocol imports routes that meet the matching rules by using filters. When advertising or receiving the routes discovered by a routing protocol itself, the routing protocol advertises or receives only the routes that meet the matching rules by filtering them through the filters.

For details of the routing policy configuration, see the related routing protocol configurations.

FRR
In traditional IP networks, after a forwarding device such as a router detects a fault on the link at the lower layer, the system completes the routing convergence in several seconds. A convergence time of several seconds may seriously affect certain services that are sensitive to the delay or packet loss. It may lead to service interruption. For example, the maximum convergence time of VoIP services is about 50 ms when network interruption occurs. To prevent the service from being affected by the faults on the link, ensure that the forwarding system can detect the faults and rectify them quickly. Fast Reroute (FRR) works when a lower layer detects a fault. The lower layer reports the message about the fault to the upper-layer routing system; at the same time, the lower layer forwards packets through a backup link immediately. This minimizes the impact of a fault on services transmitted on a link.

10.3 Configuring an IP Prefix List


This section describes how to configure an IP prefix list. 10.3.1 Establishing the Configuration Task 10.3.2 Configuring an IPv4 Prefix List 10.3.3 Configuring an IPv6 Prefix List 10.3.4 Checking the Configuration

10.3.1 Establishing the Configuration Task


Applicable Environment
Before using a routing policy, you should configure matching rules, that is, filters. Compared with an ACL, an IP prefix list is more flexible. When being used to filter routes, the IP prefix list matches the destination address of a route.

Pre-configuration Tasks
None.

Data Preparation
To configure an IP prefix list, you need the following data.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 10-5

10 Routing Policy Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

No. 1 2

Data Name of the IP prefix list Matched address range

10.3.2 Configuring an IPv4 Prefix List


Context
An IPv4 prefix list is identified by its name. Each prefix list contains multiple entries. Each entry can specify the matching range in the form of a network prefix, and is identified by an index number. For example, the following shows an IPv4 prefix list named abcd.
# ip ip-prefix abcd index 10 permit 1.0.0.0 8 ip ip-prefix abcd index 20 permit 2.0.0.0 8

During the matching, the system checks the entries identified by the index numbers in ascending order. If a route matches an entry, it indicates that the route passes the prefix list. In addition, the route does not match the next entry. Do as follows on the S9300s to which the IP prefix list is applied.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ip ip-prefix ip-prefix-name [ index index-number ] { permit | deny } ip-address mask-length [ greater-equal greater-equal-value ] [ less-equal less-equal-value ]

An IPv4 prefix list is configured. The range of the length is mask-length <= greater-equal-value <= less-equal-value <= 32. If only greater-equal is specified, the range of the prefix is [greater-equal-value, 32]; if only lessequal is specified, the range of the prefix is [mask-length, less-equal-value]. On the S9300, all unmatched routes are filtered out by default. If all entries are set to be in deny mode, none of the routes can pass this prefix list. By defining an entry of permit 0.0.0.0 0 less-equal 32 following multiple entries in deny mode, you can permit all the other IPv4 routes to pass through.
NOTE

If more than one IP prefix entry is defined, at least one entry must be set in permit mode.

----End

10-6

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

10 Routing Policy Configuration

10.3.3 Configuring an IPv6 Prefix List


Context
An IPv6 prefix list is identified by its list name. Each prefix list can include multiple entries. Each entry can independently specify the matching range in the form of the network prefix and identify it with an index number. For example, the following shows an IPv6 prefix list named abcd:
# ip ipv6-prefix abcd index 10 permit 1:: 64 ip ipv6-prefix abcd index 20 permit 2:: 64

During the matching, the system checks the entries identified by the index numbers in an ascending order. When a route matches an entry, it does not match other entries. In S9300, all unmatched routes are filtered. If all entries are in deny mode, all routes are filtered. It is recommended that you define a permit :: 0 less-equal 128 after multiple entries in deny mode, thus allowing all the other IPv6 routes to pass the IP prefix list.
NOTE

l l

If multiple entries are configured in the prefix list, at least one entry must be in permit mode. The G24SA , X12SA and G24CA boards do not support the route with the prefix length ranging between 64 and 128.

Do as follows on the S9300 to which the IP prefix list is applied:

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ip ipv6-prefix ipv6-prefix-name [ index index-number ] { permit | deny } ipv6address prefix-length [ greater-equal greater-equal-value ] [ less-equal lessequal-value ]

An IPv6 prefix list is configured. ----End

10.3.4 Checking the Configuration


Prerequisite
Configuring an IP prefix list is complete.

Procedure
Step 1 Run the display ip ip-prefix [ ip-prefix-name ] command to check the information about the IPv4 prefix list.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 10-7

10 Routing Policy Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Step 2 Run the display ipv6 ip-prefix [ ipv6-prefix-name ]command to check the information about the IPv6 prefix list. ----End

Example
Run the display ip ip-prefix p1 command, and you can view information about the prefix list named p1.
<Quidway> display ip ip-prefix p1 Prefix-list pl Permitted 5 Denied 2 index: 10 permit 192.168.0.0/16

ge

17

le

18

10.4 Configuring a Route-Policy


This section describes how to configure a Route-Policy, define a group of matching rules, and change the route attributes when the matching rules are met. 10.4.1 Establishing the Configuration Task 10.4.2 Creating a Route-Policy 10.4.3 (Optional) Setting an if-match Clause 10.4.4 (Optional) Setting an apply Clause 10.4.5 Checking the Configuration

10.4.1 Establishing the Configuration Task


Applicable Environment
A Route-Policy is used to match routes or attributes of routes, and to change the attributes when the matching rules are met. The preceding filters can be used. A Route-Policy consists of multiple nodes and each node is classified into the following clauses:
l

if-match clauses: define the matching rules that the routes meet. The matching objects are certain attributes of the route. apply clauses: specify actions, that is, configuration commands used to modify certain attributes of the route.

Pre-configuration Tasks
Before configuring a Route-Policy, complete the following tasks:
l l

10.3 Configuring an IP Prefix List Configuring the routing protocol

Data Preparation
To configure a Route-Policy, you need the following data.
10-8 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

10 Routing Policy Configuration

No. 1 2 3

Data Name and node number of the Route-Policy Matching rule Route attributes to be changed

10.4.2 Creating a Route-Policy


Context
Do as follows on the S9300s to which the Route-Policy is applied.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


route-policy route-policy-name { permit | deny } node node

A Route-Policy node is created and the Route-Policy view is displayed. The parameter permit sets the matching mode for a node in a Route-Policy to be in permit mode. If a routing entry matches the node, the S9300 performs the actions specified by the apply clauses and the matching is complete. If the routing entry fails to match the node, the routing entry matches the next node. The parameter deny specifies the matching mode for a node in a Route-Policy to be in deny mode. If a routing entry matches all the if-match clauses of the node, the routing entry is denied by the node and the next node is not matched. If the entry does not match the if-match clauses, the next node is matched. If multiple nodes are defined in a Route-Policy, at least one of them should be in permit mode. When the route-policy is used to filter routes, note the following:
l

If a route does not match any node, it indicates that the routing entry fails to pass the RoutePolicy. If all the nodes of a Route-Policy are set to be in deny mode, no routing entry can pass the Route-Policy.

----End

10.4.3 (Optional) Setting an if-match Clause


Context
Do as follows on the S9300s to which the Route-Policy is applied.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 10-9

10 Routing Policy Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


route-policy route-policy-name { permit | deny } node node

The Route-Policy view is displayed. Step 3 Run the following command as required:
l

Run:
if-match acl acl-number

The ACL is matched


l

Run:
if-match cost

The cost of the route is matched.


l

Run:
if-match interface interface-type interface-number

The outbound interface of the route is matched.


l

Run:
if-match ip { next-hop | route-source} { acl acl-number | ip-prefix ip-prefixname }

The next hop or source address of the IPv4 route is matched.


l

Run:
if-match ip-prefix ip-prefix-name

The IP prefix list is matched.


NOTE

For the same Route-Policy node, the if-match acl command and the if-match ip-prefix command cannot be used at the same time because the latest configuration overrides the previous one.
l

Run:
if-match ipv6 { address | next-hop | route-source } prefix-list ipv6-prefix-name

The IPv6 route is matched.


l

Run the following command as required:

Run:
if-match route-type { external-type1 | external-type1or2 | external-type2 | internal | nssa-external-type1 | nssa-external-type1or2 | nssa-externaltype2 }

The Open Shortest Path First (OSPF) route is matched.

Run:
if-match route-type { is-is-level-1 | is-is-level-2 }

The Intermediate System-to-Intermediate System (IS-IS) route is matched.


l

Run:
if-match tag tag

The tag of the route is matched.


10-10 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

10 Routing Policy Configuration

The commands in this step can be used as required. A node can have either multiple or no ifmatch clauses.
NOTE

For the same node in a Route-Policy, the relation between the if-match clauses is "AND" during the matching. That is, the route must meet all the matching rules before the actions defined by the apply clauses are performed. In the if-match route-type and if-match interface commands, the relation between the if-match clauses is "OR". In other commands, the relation between the if-match clauses is "AND." If no if-match clause is specified, all the routes are matched.

----End

10.4.4 (Optional) Setting an apply Clause


Context
Do as follows on the S9300s to which the Route-Policy is applied.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


route-policy route-policy-name { permit | deny } node node

The Route-Policy view is displayed. Step 3 Run the following command as required:
l

Run:
apply backup-interface interface-type interface-number

The backup outbound interface is set.


l

Run:
apply backup-nexthop { ip-address | auto }

The backup next hop is set.


l

Run:
apply cost [ + | - ] cost

The cost of the route is set.


l

Set the cost type of the route.

Run the apply cost-type { external | internal } command to set the cost type of an ISIS route. Run the apply cost-type { type-1 | type-2 } command to set the cost type of an OSPF route.

Run:
apply ip-address next-hop ipv4-address

The next hop address of the IPv4 route is set.


l

Run:
apply ipv6 next-hop ipv6-address

Issue 04 (2010-01-08)

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

10-11

10 Routing Policy Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

The next hop address of the IPv6 route is set.


l

Run:
apply isis { level-1 | level-1-2 | level-2 }

The route level of IS-IS is set.


l

Run:
apply ospf { backbone | stub-area }

The area of the OSPF route is set.


l

Run:
apply preference preference

The preference of the routing protocol is set.


l

Run:
apply tag tag

The tag of the route is set. The commands in Step 3 can be used regardless of the order. ----End

10.4.5 Checking the Configuration


Prerequisite
Configuring a Route-Policy is complete.

Procedure
l Run the display route-policy [ route-policy-name ] command to check the Route-Policy. ----End

Example
Run the display route-policy command, and you can view information about the prefix list named exp1.
<Quidway> display route-policy Route-policy : exp1 permit : 10

10.5 Applying Filters to the Received Routes


This section describes how to apply filters in routing protocols to filter the received routes. 10.5.1 Establishing the Configuration Task 10.5.2 Filtering the Routes Received by RIP 10.5.3 Filtering the Routes Received by OSPF 10.5.4 Filtering the Routes Received by IS-IS 10.5.5 Filtering the Routes Received by BGP 10.5.6 Checking the Configuration
10-12 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

10 Routing Policy Configuration

10.5.1 Establishing the Configuration Task


Applicable Environment
After defining filters including the IP prefix list, ACL, and Route-Policy related to a routing policy, you need to import the filters to the protocols. You can use the filter-policy command in the protocol view and apply an ACL and an IP prefix list to filter the received routes. Only the routes that satisfy the matching rules are received. The filter-policy import command is used to filter the received routes. For a distance-vector (DV) protocol and a link state protocol, the procedures are different after the filter-policy command is run.
l

DV protocol A DV protocol generates routes based on the routing table; therefore, the filters affect the routes received from the neighbor and the routes advertised to the neighbor.

Link state protocol A link state protocol generates routes based on the Link State Database (LSDB). The filterpolicy command does not affect the Link State Advertisements (LSAs) or integrity of the LSDBs. The filter-policy import and filter-policy export commands are different. When a route is received, the filter-policy command can only identify the route that is added to a local core routing table from a protocol routing table. That is, the command takes effect on the local core routing table without affecting the protocol routing table.
NOTE

l l

BGP has powerful filtering functions. For details of BGP configuration, see 7 BGP Configuration. For details of the filter-policy and import-route commands and their applications in the Routing Information Protocol (RIP), OSPF, IS-IS, and BGP, see related configurations.

Pre-configuration Tasks
Before applying filters to the received routes, complete the following tasks:
l l

10.3 Configuring an IP Prefix List Configuring an ACL

Data Preparation
To apply filters to the received routes, you need the following data. No. 1 2 Data Name of the IP prefix list Name of the ACL

Issue 04 (2010-01-08)

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

10-13

10 Routing Policy Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

10.5.2 Filtering the Routes Received by RIP


Context
Do as follows on the S9300s that run RIP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


rip [ process-id ]

A RIP process is started and the RIP view is displayed. Step 3 Run:
filter-policy { acl-number | ip-prefix ip-prefix-name[ gateway ip-prefix-name ] } import [ interface-type interface-number ]

The received routes are filtered. ----End

10.5.3 Filtering the Routes Received by OSPF


Context
Do as follows on the S9300s that run OSPF.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf [ process-id ]

An OSPF process is started and the OSPF view is displayed. Step 3 Run:
filter-policy { acl-number | ip-prefix ip-prefix-name } import

The received routes are filtered. ----End

10.5.4 Filtering the Routes Received by IS-IS


Context
Do as follows on the S9300s that run IS-IS.
10-14 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

10 Routing Policy Configuration

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


isis [ process-id ]

An IS-IS process is started and the IS-IS view is displayed. Step 3 Run:
filter-policy { acl-number | ip-prefix ip-prefix-name | route-policy route-policyname } import

The received routes are filtered. ----End

10.5.5 Filtering the Routes Received by BGP


Context
Do as follows on the S9300s that run BGP.

Procedure
l Filter the globally received routes. 1. Run:
system-view

The system view is displayed. 2. Run:


bgp [ process-id ]

A BGP process is started and the BGP view is displayed. 3. Run:


filter-policy { acl-number | ip-prefix ip-prefix-name } import

The received routes are filtered. l Filter the routes received from the peers. 1. Run:
system-view

The system view is displayed. 2. Run:


bgp [ process-id ]

A BGP process is started and the BGP view is displayed. 3. (Optional) Run:
ipv4-family unicast

The IPv4 unicast address family view is displayed. 4.


Issue 04 (2010-01-08)

Run:
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 10-15

10 Routing Policy Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


peer { group-name | ipv4-address } filter-policy acl-number import

The routes received from the peers are filtered. ----End

10.5.6 Checking the Configuration


Prerequisite
Applying filters to the received routes is complete.

Procedure
l l Run the command of display ospf [ process-id ] routing, display isis [ process-id ] route, or display bgp routing-table to check the protocol routing table. Run the display ip routing-table command to check the routing table.

----End

Example
Run the display ip routing-table command on the local S9300, and you can view that the routes that meet the matching rules are filtered out or the actions defined by the apply clauses are performed.

10.6 Applying Filters to the Advertised Routes


This section describes how to apply filters in routing protocols to filter the advertised routes. 10.6.1 Establishing the Configuration Task 10.6.2 Filtering the Routes Advertised by RIP 10.6.3 Filtering the Routes Advertised by OSPF 10.6.4 Filtering the Routes Advertised by IS-IS 10.6.5 Filtering the Routes Advertised by BGP 10.6.6 Checking the Configuration

10.6.1 Establishing the Configuration Task


Applicable Environment
After defining filters including the IP prefix list, ACL, and Route-Policy related to a routing policy, you need to import the filters to the protocols. You can use the filter-policy command in the protocol view and import an ACL and an IP prefix list to filter the advertised routes. Only the routes that meet the matching rules are advertised. The filter-policy export command is used to filter the advertised routes. For a DV protocol and a link state protocol, the procedures are different after the filter-policy command is run.
10-16 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


l

10 Routing Policy Configuration

DV protocol A DV protocol generates routes based on the routing table; therefore, the filters affect the routes received from the neighbor and the routes advertised to the neighbor.

Link state protocol A link state protocol generates routes based on the LSDB. The filter-policy command does not affect the LSAs or integrity of the LSDBs. The filter-policy import and filter-policy export commands are thus different. To advertise routes, you can run the filter-policy export command to advertise the routes imported by protocols, such as the imported static routes. Only the LSAs or Link Switched Paths (LSPs) that are imported by using the filter-policy import command are added to the LSDB, but this does not affect the LSAs advertised to other nodes.
NOTE

l l

BGP has powerful filtering functions. For details of BGP configuration, see 7 BGP Configuration. For details of the filter-policy and import-route commands and their applications in the Routing Information Protocol (RIP), OSPF, IS-IS, and BGP, see related configurations.

Pre-configuration Tasks
Before applying filters to the advertised routes, complete the following tasks:
l l

10.3 Configuring an IP Prefix List Configuring an ACL

Data Preparation
To apply filters to the advertised routes, you need the following data. No. 1 2 Data Name of the IP prefix list Name of the ACL

10.6.2 Filtering the Routes Advertised by RIP


Context
Do as follows on the S9300s that run RIP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


rip [ process-id ]

Issue 04 (2010-01-08)

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

10-17

10 Routing Policy Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

A RIP process is started and the RIP view is displayed. Step 3 Run:
filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol [ processid ] | interface-type interface-number ]

The advertised routes are filtered. ----End

10.6.3 Filtering the Routes Advertised by OSPF


Context
Do as follows on the S9300s that run OSPF.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf [ process-id ]

An OSPF process is started and the OSPF view is displayed. Step 3 Run:
filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol [ processid ] ]

The advertised routes are filtered. ----End

10.6.4 Filtering the Routes Advertised by IS-IS


Context
Do as follows on the S9300s that run IS-IS.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


isis [ process-id ]

An IS-IS process is started and the IS-IS view is displayed. Step 3 Run:
filter-policy { acl-number | ip-prefix ip-prefix-name | route-policy route-policyname } export[ protocol [ process-id ] ]

10-18

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

10 Routing Policy Configuration

The advertised route are filtered. ----End

10.6.5 Filtering the Routes Advertised by BGP


Context
For the routes imported by BGP, only the routes that meet matching rules can be added to the BGP local routing table and advertised to the BGP peers. Do as follows on the S9300s that run BGP.

Procedure
l Filter the global routes. 1. Run:
system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed. 3. (Optional) Run:


ipv4-family unicast

The IPv4 unicast address family view is displayed. 4. Run:


filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol [ process-id ] ]

The advertised routes are filtered.

If the parameter protocol is specified, only the routes of a specified protocol are filtered. If the parameter protocol is not specified, all the routes advertised by BGP are filtered, including the imported routes and the local routes advertised by using the network command.
NOTE

The filter-policy export command functions differently in different protocol views:


l l

For the link state protocol, only the imported routes are filtered. For the DV protocol, the imported routes and routes discovered by the protocol are filtered.

Filter the routes advertised to the peers. 1. Run:


system-view

The system view is displayed. 2. Run:


bgp as-number

The BGP view is displayed.


Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 10-19

10 Routing Policy Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

3.

(Optional) Run:
ipv4-family unicast

The IPv4 unicast address family view is displayed. 4. Run:


peer { group-name | ipv4-address } filter-policy acl-number import

The routes advertised to the peers are filtered. ----End

10.6.6 Checking the Configuration


Prerequisite
Applying filters to the advertised routes is complete.

Procedure
l l Run the display ospf [ process-id ] routing, display isis [ process-id ] route, or display bgp routing-table command to check the protocol routing table. Run the display ip routing-table command to check the routing table.

----End

Example
Run the display ip routing-table command on the neighboring router, and you can view that the routes that meet the matching rules set on the neighboring node are filtered out or the actions defined by the apply clauses are performed.

10.7 Applying Filters to the Imported Routes


This section describes how to apply filters in routing protocols to filter the imported routes. 10.7.1 Establishing the Configuration Task 10.7.2 Applying a Route-Policy to the Routes Imported by RIP 10.7.3 Applying a Route-Policy to the Routes Imported by OSPF 10.7.4 Applying a Route-Policy to the External Routes Imported by IS-IS 10.7.5 Applying a Route-Policy to the Routes Imported by BGP 10.7.6 Checking the Configuration

10.7.1 Establishing the Configuration Task


Applicable Environment
After defining filters including the IP prefix list, ACL, and Route-Policy related to a routing policy, you need to import the filters to the protocols.
10-20 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


l

10 Routing Policy Configuration

You can use the import-route command in the protocol view, import the required external routes to the protocols, and apply a Route-Policy to the imported routes. After external routes are imported, run the filter-policy export command to filter the imported external routes. Only the routes that meet the matching rules are advertised.
NOTE

l l

BGP has powerful filtering functions. For details of BGP configuration, see 7 BGP Configuration. For details of the filter-policy and import-route commands and their applications in the Routing Information Protocol (RIP), OSPF, IS-IS, and BGP, see related configurations.

Pre-configuration Tasks
Before applying filters to the imported routes, complete the following tasks:
l l l

7.3.2 Starting a BGP Process Configuring an ACL 7.4 Configuring BGP Route Attributes

Data Preparation
To apply filters to the imported routes, you need the following data. No. 1 2 3 Data Name of the IP prefix list Name of the ACL Name and number of the Route-Policy

10.7.2 Applying a Route-Policy to the Routes Imported by RIP


Context
Do as follows on the S9300s that run RIP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


rip [ process-id ]

A RIP process is started and the RIP view is displayed. Step 3 Run:
import-route protocol [ process-id ] [ cost cost ] [ route-policy route-policyname ]

Issue 04 (2010-01-08)

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

10-21

10 Routing Policy Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

External routes are imported. ----End

10.7.3 Applying a Route-Policy to the Routes Imported by OSPF


Context
Do as follows on the S9300s that run OSPF.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ospf [ process-id ]

An OSPF process is started and the OSPF view is displayed. Step 3 Run:
import-route protocol [ process-id ] [ cost cost ] [ route-policy route-policyname ]

External routes are imported. ----End

10.7.4 Applying a Route-Policy to the External Routes Imported by IS-IS


Context
Do as follows on the S9300s that run IS-IS.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


isis [ process-id ]

An IS-IS process is started and the IS-IS view is displayed. Step 3 Run:
import-route protocol [ process-id ] [ cost cost ] [ route-policy route-policyname ]

External routes are imported. ----End


10-22 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

10 Routing Policy Configuration

10.7.5 Applying a Route-Policy to the Routes Imported by BGP


Context
Do as follows on the S9300s that run BGP.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


bgp [ process-id ]

A BGP process is started and the BGP view is displayed. Step 3 (Optional) Run:
ipv4-family unicast

The IPv4 unicast address family view is displayed. Step 4 Run:


import-route protocol [ process-id ] [ cost cost ] [ route-policy route-policyname ]

External routes are imported. ----End

10.7.6 Checking the Configuration


Prerequisite
Applying filters to the imported routes is complete.

Procedure
l l Run the display ospf [ process-id ] routing, display isis [ process-id ] route, or display bgp routing-table command to check the protocol routing table. Run the display ip routing-table command to check the routing table.

----End

Example
Run the display ip routing-table command on the local S9300, and you can view that the routes that meet the matching rules are filtered out or the actions defined by the apply clauses are performed.

10.8 Controlling the Valid Time of a Routing Policy


This section describes how to control the valid time of a routing policy.

Issue 04 (2010-01-08)

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

10-23

10 Routing Policy Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

10.8.1 Establishing the Configuration Task 10.8.2 Setting the Delay for Applying the Routing Policy 10.8.3 Checking the Configuration

10.8.1 Establishing the Configuration Task


Applicable Environment
In actual applications, when the configurations of multiple routing polices that are used together change, the Routing Management Module (RM) immediately notifies the protocols of applying a new routing policy, after the configuration of a routing policy is complete. An incomplete routing policy causes route flapping, a waste of time during packet processing, and instability of the network. The S9300 processes the change of a routing policy according to the following rules:
l

If the valid time of a routing policy is set, the S9300 does not notify the protocol of processing the changes immediately when the commands used to configure the routing policy change. Instead, the RM waits for a period (0 seconds by default), and then notifies the protocol of applying the changed routing policy. If the configuration of the routing policy changes again during the delay, the S9300 resets the timer and the timer counts again.

You can run related commands to set the waiting time as required.

Pre-configuration Tasks
None.

Data Preparation
Before setting the valid time of a routing policy, you need the following data. No. 1 Data Delay in applying the routing policy

10.8.2 Setting the Delay for Applying the Routing Policy


Context
Do as follows on the S9300s on which the delay for applying the routing policy needs to be changed.

Procedure
Step 1 Run:
system-view

The system view is displayed.


10-24 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

10 Routing Policy Configuration

Step 2 Run:
route-policy-change notify-delay delay-time

The delay for applying the routing policy is set. The delay ranges from 0 to 180, in seconds. By default, it is 0 seconds. If the delay is 0 seconds, the S9300 immediately notifies the protocol of applying a new routing policy when the routing policy changes. The policies affected by the timer are ACLs, IP prefix lists, and Route-Policies. Step 3 (Optional) Run:
refresh bgp all

BGP is configured to apply a new policy immediately. After using the command, you can view how the policy takes effect. You can run the command to configure BGP to apply a new policy immediately. ----End

10.8.3 Checking the Configuration


Prerequisite
Controlling the valid time of a routing policy is complete.

Procedure
l Run the display current-configuration | include notify-delay command to check the delay for applying a routing policy.

----End

Example
Run the display current-configuration command, and you can view the delay for applying the routing policy, for example:
<Quidway> display current-configuration | include notify-delay route-policy-change notify-delay 10

10.9 Configuring IP FRR on a Public Network


This section describes how to configure IP FRR on a public network. 10.9.1 Establishing the Configuration Task 10.9.2 Configuring a Route-Policy 10.9.3 Enabling IP FRR on a Public Network 10.9.4 Checking the Configuration

Issue 04 (2010-01-08)

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

10-25

10 Routing Policy Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

10.9.1 Establishing the Configuration Task


Applicable Environment
IP FRR is applied to the services that are sensitive to packet loss or delay on a public network.

Pre-configuration Tasks
Before configuring IP FRR on a public network, complete the following tasks:
l

Configuring static routes or an Interior Gateway Protocol (IGP) to ensure that the nodes are routable Generating two non-equal-cost routes by setting different costs

Data Preparation
To configure IP FRR on a public network, you need the following data. No. 1 2 3 Data Name of the Route-Policy and number of the node Outbound interface of the backup route (Optional) Next hop of the backup route

10.9.2 Configuring a Route-Policy


Context
Do as follows on the S9300s to which the Route-Policy is applied.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


route-policy route-policy-name { permit | deny } node node

A Route-Policy node is created and the Route-Policy view is displayed. Step 3 (Optional) Run:
if-match

The matching rule is set and is used to filter the routes to be backed up. If the matching rule is not set, IP FRR backs up the outbound interfaces and next hops for all routes on the S9300. Certain routes that do not need to be backed up are configured with backups.
10-26 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

10 Routing Policy Configuration

You need to correctly set the relations between routes to be backed up and the backup routes. It is recommended that you use the matching rule to specify the routes to be backed up. Step 4 Run:
apply backup-interface interface-type interface-number

The backup outbound interface is set. Step 5 Run:


apply backup-nexthop interface-type interface-number

The backup next hop is set. If the backup next hop is specified, you must specify the backup outbound interface. If the backup outbound interface is specified on a point-to-point (P2P) link, you may not specify the backup next hop. If the backup outbound interface is specified on a non-P2P link, you must specify the backup next hop. ----End

10.9.3 Enabling IP FRR on a Public Network


Context
Do as follows on the S9300s to which IP FRR on a public network is applied.

Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ip frr route-policy route-policy-name

The IP FRR function is enabled. Before applying the IP FRR function, you must enable the IP FRR function. In this case, the policy used to set the outbound interface and the next hop takes effect. ----End

10.9.4 Checking the Configuration


Prerequisite
Configuring IP FRR on a public network is complete.

Procedure
l l Run the display route-policy [ route-policy-name ] command to check the Route-Policy. Run the command of display ip routing-table verbose, display ip routing-table ipaddress [ mask | mask-length ] [ longer-match ] verbose, or display ip routing-table ipHuawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 10-27

Issue 04 (2010-01-08)

10 Routing Policy Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

address1 { mask1 | mask-length1 } ip-address2 { mask2 | mask-length2 } verbose to check the backup outbound interface and the backup next hop in the routing table. ----End

10.10 Configuring IP FRR on a Private Network


This section describes how to configure IP FRR on a private network. 10.10.1 Establishing the Configuration Task 10.10.2 Configuring a Route-Policy 10.10.3 Enabling IP FRR on a Private Network 10.10.4 Checking the Configuration

10.10.1 Establishing the Configuration Task


Applicable Environment
IP FRR is applied to the services that are sensitive to the packet loss and delay on a private network.

Pre-configuration Tasks
Before configuring IP FRR on a private network, complete the following tasks:
l l l

Creating a virtual private network (VPN) instance Generating two non-equal-cost routes by binding the VPN instance to a routing protocol Binding the VPN instance to the interface

Data Preparation
To configure IP FRR on a private network, you need the following data. No. 1 2 3 Data Name of the routing policy Name of the VPN instance Outbound interface or next hop of the backup route

10.10.2 Configuring a Route-Policy


Procedure
Step 1 Run:
system-view

10-28

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

10 Routing Policy Configuration

The system view is displayed. Step 2 Run:


route-policy route-policy-name { permit | deny } node node

A Route-Policy node is created and the Route-Policy view is displayed. Step 3 (Optional) Run:
if-match

The matching rule is set and is used to filter the routes to be backed up. If the matching rule is not set, IP FRR backs up the outbound interfaces and next hops for all routes on the S9300. Certain routes that do not need to be backed up are configured with backups. You need to correctly set the relations between routes to be backed up and the backup routes. It is recommended that you use the matching rule to specify the routes to be backed up. Step 4 Run:
apply backup-interface interface-type interface-number

The backup outbound interface is set. Step 5 Run:


apply backup-nexthop { ip-address | auto }

The backup next hop is set. ----End

10.10.3 Enabling IP FRR on a Private Network


Procedure
Step 1 Run:
system-view

The system view is displayed. Step 2 Run:


ip vpn-instance vpn-instance-name

The VPN instance view is displayed. Step 3 Run:


ip frr route-policy route-policy-name

The IP FRR function is enabled on a private network. ----End

10.10.4 Checking the Configuration


Prerequisite
Configuring IP FRR on a private network is complete.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 10-29

10 Routing Policy Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Procedure
l l Run the display route-policy [ route-policy-name ] command to check the Route-Policy. Run the command of display ip routing-table vpn-instance vpn-instance-name [ verbose ], display ip routing-table vpn-instance vpn-instance-name ip-address [ mask | mask-length ] [ longer-match ] [ verbose ], or display ip routing-table vpn-instance vpn-instance-name ip-address1 { mask1 | mask-length1 } ip-address2 { mask2 | masklength2 } [ verbose ] to check the backup outbound interface and backup next hop in the routing table.

----End

10.11 Maintaining the Routing Policy


This section describes how to maintain the routing policy.

Context

CAUTION
The statistics on IP prefix lists cannot be restored after you clear them. So, confirm the action before you use the command. To clear the statistics on IP prefix lists, run the following reset command in the user view.

Procedure
l Run the reset ip ip-prefix [ ip-prefix-name ] command to clear the statistics on IPv4 prefix lists. By default, the statistics on IP prefix lists are not cleared. l Run the reset ip ipv6-prefix [ ipv6-prefix-name ] command to clear the statistics on IPv6 prefix lists. By default, the statistics on IP prefix lists are not cleared. ----End

10.12 Configuration Examples


This section provides several configuration examples of the routing policy. 10.12.1 Example for Filtering the Received and Advertised Routes 10.12.2 Example for Applying a Routing Policy to the Imported Routes 10.12.3 Example for Configuring IP FRR on a Public Network 10.12.4 Example for Configuring IP FRR on a Private Network
10-30 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

10 Routing Policy Configuration

10.12.1 Example for Filtering the Received and Advertised Routes


Networking Requirements
As shown in Figure 10-1, S9300-A receives routes from the Internet, and provides some of the routes for S9300-B on the network where OSPF runs. It is required that:
l l

S9300-A should provide 172.1.17.0/24, 172.1.18.0/24, and 172.1.19.0/24 for S9300-B. S9300-C should receive only 172.1.18.0/24. S9300-D should receive all routes provided by S9300-B.

Figure 10-1 Networking diagram for filtering the received and advertised routes
S9300-C
GE1/0/1

S9300-B
GE1/0/2 GE1/0/3 GE1/0/1 GE1/0/1

172.1.16.0/24 172.1.17.0/24 172.1.18.0/24 172.1.19.0/24 172.1.20.0/24

GE1/0/1

OSPF

S9300-A

S9300-D S9300 S9300-A S9300-B S9300-B S9300-B S9300-C S9300-D Interface GigabitEthernet1/0/1 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/3 GigabitEthernet1/0/1 GigabitEthernet1/0/1 VLANIF interface VLANIF 10 VLANIF 10 VLANIF 20 VLANIF 30 VLANIF 20 VLANIF 30 IP address 192.168.1.1/24 192.168.1.2/24 192.168.2.1/24 192.168.3.1/24 192.168.2.2/24 192.168.3.2/24

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. 5. 6. Specify the ID of the VLAN that each interface belongs to. Assign an IP address to each VLANIF interface. Configure basic OSPF functions on S9300-A, S9300-B, S9300-C, and S9300-D. Configure static routes on S9300-A and import these routes into OSPF. Configure a routing policy for advertising routes on S9300-A and check the filtering result on S9300-B. Configure a routing policy for receiving routes on S9300-C and check the filtering result on S9300-C.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 10-31

Issue 04 (2010-01-08)

10 Routing Policy Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

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

Five static routes imported by S9300-A S9300-A, S9300-B, S9300-C, and S9300-D located in Area 0, that is, the backbone area Name of the IP prefix list and routes to be filtered

Procedure
Step 1 Create VLANs and add interfaces to the corresponding VLANs.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] vlan 10 [S9300-A-vlan10] quit [S9300-A] interface GigabitEthernet 1/0/1 [S9300-A-GigabitEthernet1/0/1] port hybrid pvid vlan 10 [S9300-A-GigabitEthernet1/0/1] port hybrid untagged vlan 10 [S9300-A-GigabitEthernet1/0/1] quit

The configurations of S9300-B, S9300-C, and S9300-D are the same as the configuration of S9300-A, and are not mentioned here. Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ip address 192.168.1.1 24 [S9300-A-Vlanif10] quit

The configurations of S9300-B, S9300-C, and S9300-D are the same as the configuration of S9300-A, and are not mentioned here. Step 3 Configure basic OSPF functions. # Configure S9300-A.
[S9300-A] ospf [S9300-A-ospf-1] area 0 [S9300-A-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255 [S9300-A-ospf-1-area-0.0.0.0] quit [S9300-A-ospf-1] quit

# Configure S9300-B.
[S9300-B] ospf [S9300-B-ospf-1] area 0 [S9300-B-ospf-1-area-0.0.0.0] [S9300-B-ospf-1-area-0.0.0.0] [S9300-B-ospf-1-area-0.0.0.0] [S9300-B-ospf-1-area-0.0.0.0] [S9300-B-ospf-1] quit

network 192.168.1.0 0.0.0.255 network 192.168.2.0 0.0.0.255 network 192.168.3.0 0.0.0.255 quit

# Configure S9300-C.
[S9300-C] ospf [S9300-C-ospf-1] area 0 [S9300-C-ospf-1-area-0.0.0.0] network 192.168.2.0 0.0.0.255 [S9300-C-ospf-1-area-0.0.0.0] quit [S9300-C-ospf-1] quit

# Configure S9300-D.
[S9300-D] ospf [S9300-D-ospf-1] area 0 [S9300-D-ospf-1-area-0.0.0.0] network 192.168.3.0 0.0.0.255

10-32

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


[S9300-D-ospf-1-area-0.0.0.0] quit [S9300-D-ospf-1] quit

10 Routing Policy Configuration

Step 4 Configure five static routes on S9300-A, and import these routes into OSPF.
[S9300-A] ip route-static 172.1.16.0 [S9300-A] ip route-static 172.1.17.0 [S9300-A] ip route-static 172.1.18.0 [S9300-A] ip route-static 172.1.19.0 [S9300-A] ip route-static 172.1.20.0 [S9300-A] ospf [S9300-A-ospf-1] import-route static [S9300-A-ospf-1] quit 24 24 24 24 24 NULL0 NULL0 NULL0 NULL0 NULL0

# Check the routing table on S9300-B. You can view that the five static routes are imported into OSPF.
[S9300-B] display ip routing-table Route Flags: R - relay, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 13 Routes : 13 Destination/Mask 127.0.0.0/8 127.0.0.1/32 192.168.1.0/24 192.168.1.2/32 192.168.2.0/24 192.168.2.1/32 192.168.3.0/24 192.168.3.1/32 172.1.16.0/24 172.1.17.0/24 172.1.18.0/24 172.1.19.0/24 172.1.20.0/24 Proto Direct Direct Direct Direct Direct Direct Direct Direct O_ASE O_ASE O_ASE O_ASE O_ASE Pre 0 0 0 0 0 0 0 0 150 150 150 150 150 Cost 0 0 0 0 0 0 0 0 1 1 1 1 1 Flags NextHop D D D D D D D D D D D D D 127.0.0.1 127.0.0.1 192.168.1.2 127.0.0.1 192.168.2.1 127.0.0.1 192.168.3.1 127.0.0.1 192.168.1.1 192.168.1.1 192.168.1.1 192.168.1.1 192.168.1.1 Interface InLoopBack0 InLoopBack0 Vlanif10 InLoopBack0 Vlanif30 InLoopBack0 Vlanif20 InLoopBack0 Vlanif10 Vlanif10 Vlanif10 Vlanif10 Vlanif10

Step 5 Configure a routing policy for advertising routes. # Configure an IP prefix list named a2b on S9300-A.
[S9300-A] ip ip-prefix a2b index 10 permit 172.1.17.0 24 [S9300-A] ip ip-prefix a2b index 20 permit 172.1.18.0 24 [S9300-A] ip ip-prefix a2b index 30 permit 172.1.19.0 24

# Configure a routing policy for advertising routes on S9300-A and use IP prefix list a2b to filter routes.
[S9300-A] ospf [S9300-A-ospf-1] filter-policy ip-prefix a2b export static

# Check the routing table on S9300-B, and you can find that S9300-B receives only three routes defined in IP prefix list a2b.
[S9300-B] display ip routing-table Route Flags: R - relay, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 11 Routes : 11 Destination/Mask 127.0.0.0/8 127.0.0.1/32 192.168.1.0/24 192.168.1.2/32 192.168.2.0/24 192.168.2.1/32 Proto Direct Direct Direct Direct Direct Direct Pre 0 0 0 0 0 0 Cost 0 0 0 0 0 0 Flags NextHop D D D D D D 127.0.0.1 127.0.0.1 192.168.1.2 127.0.0.1 192.168.2.1 127.0.0.1 Interface InLoopBack0 InLoopBack0 Vlanif10 InLoopBack0 Vlanif30 InLoopBack0

Issue 04 (2010-01-08)

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

10-33

10 Routing Policy Configuration


192.168.3.0/24 192.168.3.1/32 172.1.17.0/24 172.1.18.0/24 172.1.19.0/24 Direct Direct O_ASE O_ASE O_ASE 0 0 150 150 150 0 0 1 1 1 D D D D D

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


192.168.3.1 127.0.0.1 192.168.1.1 192.168.1.1 192.168.1.1 Vlanif20 InLoopBack0 Vlanif10 Vlanif10 Vlanif10

Step 6 Configure a routing policy for receiving routes. # Configure an IP prefix list named in on S9300-C.
[S9300-C] ip ip-prefix in index 10 permit 172.1.18.0 24

# Configure a routing policy for receiving routes on S9300-C, and use IP prefix list in to filter routes.
[S9300-C] ospf [S9300-C-ospf-1] filter-policy ip-prefix in import

# Check the routing table on S9300-C, and you can find that S9300-C in the local core routing table receives only one route defined in IP prefix list in.
[S9300-C] display ip routing-table Route Flags: R - relay, D - download to fib -----------------------------------------------------------------------------Routing Tables: Public Destinations : 6 Routes : 6 Destination/Mask 127.0.0.0/8 127.0.0.1/32 192.168.2.0/24 192.168.2.2/32 172.1.18.0/24 Proto Direct Direct Direct Direct O_ASE Pre 0 0 0 0 150 Cost 0 0 0 0 1 Flags NextHop D D D D D 127.0.0.1 127.0.0.1 192.168.2.2 127.0.0.1 192.168.2.1 Interface InLoopBack0 InLoopBack0 Vlanif20 InLoopBack0 Vlanif20

----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # vlan batch 10 # interface Vlanif10 ip address 192.168.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # ospf 1 filter-policy ip-prefix a2b export static import-route static area 0.0.0.0 network 192.168.1.0 0.0.0.255 # ip ip-prefix a2b index 10 permit 172.1.17.0 24 ip ip-prefix a2b index 20 permit 172.1.18.0 24 ip ip-prefix a2b index 30 permit 172.1.19.0 24 # ip route-static 172.1.16.0 255.255.255.0 NULL0 ip route-static 172.1.17.0 255.255.255.0 NULL0 ip route-static 172.1.18.0 255.255.255.0 NULL0 ip route-static 172.1.19.0 255.255.255.0 NULL0 ip route-static 172.1.20.0 255.255.255.0 NULL0

10-34

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


# return l

10 Routing Policy Configuration

Configuration file of S9300-B


# sysname S9300-B # vlan batch 10 20 30 # interface Vlanif10 ip address 192.168.1.2 255.255.255.0 # interface Vlanif20 ip address 192.168.2.1 255.255.255.0 # interface Vlanif30 ip address 192.168.3.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet1/0/3 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # ospf 1 area 0.0.0.0 network 192.168.1.0 0.0.0.255 network 192.168.2.0 0.0.0.255 network 192.168.3.0 0.0.0.255 # return

Configuration file of S9300-C


# sysname S9300-C # vlan batch 20 # interface Vlanif20 ip address 192.168.2.2 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # ospf 1 filter-policy ip-prefix in import area 0.0.0.0 network 192.168.2.0 0.0.0.255 # ip ip-prefix in index 10 permit 172.1.18.0 24 # return

Configuration file of S9300-D


# sysname S9300-D # vlan batch 30 # interface Vlanif30 ip address 192.168.3.2 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 30

Issue 04 (2010-01-08)

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

10-35

10 Routing Policy Configuration


port hybrid untagged vlan 30 # ospf 1 area 0.0.0.0 network 192.168.3.0 0.0.0.255 # return

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

10.12.2 Example for Applying a Routing Policy to the Imported Routes


Networking Requirements
As shown in Figure 10-2, S9300-B and S9300-A exchange the routing information through OSPF; S9300-B and S9300-C exchange the routing information through IS-IS. S9300-B is required to import IS-IS routes into OSPF and to use the routing policy to set the route attributes. The cost of the route 172.17.1.0/24 is set to 100, and the tag of the route 172.17.2.0/24 is set to 20. Figure 10-2 Networking diagram for applying a routing policy to the imported routes
S9300-B
GE1/0/1 GE1/0/1

S9300-A

S9300-C
GE1/0/2 GE1/0/1

GE1/0/1 GE1/0/2 GE1/0/3

OSPF

IS-IS

S9300 S9300-A S9300-B S9300-B S9300-C S9300-C S9300-C S9300-C

Interface GigabitEthernet1/0/1 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/1 GigabitEthernet1/0/2 GigabitEthernet1/0/3 GigabitEthernet1/0/4

VLANIF interface VLANIF 10 VLANIF 10 VLANIF 20 VLANIF 20 VLANIF 30 VLANIF 40 VLANIF 50

IP address 192.168.1.1/24 192.168.1.2/24 192.168.2.2/24 192.168.2.1/24 172.17.1.1/24 172.17.2.1/24 172.17.3.1/24

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

Specify the ID of the VLAN that each interface belongs to. Assign an IP address to each VLANIF interface. Configure basic IS-IS functions on S9300-B and S9300-C. Configure OSPF on S9300-A and S9300-B and import IS-IS routes.
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

10 Routing Policy Configuration

5.

Configure a routing policy on S9300-B and apply the routing policy when OSPF imports IS-IS routes, and check the routes.

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

IS-IS level of S9300-C being Level-2 and system ID being 0000.0000.0001, IS-IS level of S9300-B being Level-2, system ID being 0000.0000.0002, and number of the area where S9300-B and S9300-C reside being 10 S9300-A and S9300-B located in Area 0, that is, the backbone area Names of the filtering list and IP prefix list, cost of the route 172.17.1.0/24 being 100, and tag of the route 172.17.2.0/24 being 20

l l

Procedure
Step 1 Create a VLAN and add the corresponding interface to the VLAN.
<Quidway> system-view [Quidway] sysname S9300-A [S9300-A] interface GigabitEthernet 1/0/1 [S9300-A-GigabitEthernet1/0/1] port link-type access [S9300-A-GigabitEthernet1/0/1] quit [S9300-A] vlan 10 [S9300-A-vlan10] port GigabitEthernet 1/0/1 [S9300-A-vlan10] quit

The configurations of S9300-B, S9300-C, and S9300-D are the same as the configuration of S9300-A, and are not mentioned here. Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10 [S9300-A-Vlanif10] ip address 192.168.1.1 24 [S9300-A-Vlanif10] quit

The configurations of S9300-B, S9300-C, and S9300-D are the same as the configuration of S9300-A, and are not mentioned here. Step 3 Configure IS-IS. # Configure S9300-C.
[S9300-C] isis [S9300-C-isis-1] is-level level-2 [S9300-C-isis-1] network-entity 10.0000.0000.0001.00 [S9300-C-isis-1] quit [S9300-C] interface vlanif 20 [S9300-C-Vlanif20] isis enable [S9300-C-Vlanif20] quit [S9300-C] interface vlanif 30 [S9300-C-Vlanif30] isis enable [S9300-C-Vlanif30] quit [S9300-C] interface vlanif 40 [S9300-C-Vlanif30] isis enable [S9300-C-Vlanif30] quit [S9300-C] interface vlanif 50 [S9300-C-Vlanif30] isis enable [S9300-C-Vlanif30] quit

# Configure S9300-B.
[S9300-B] isis [S9300-B-isis-1] is-level level-2

Issue 04 (2010-01-08)

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

10-37

10 Routing Policy Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

[S9300-B-isis-1] network-entity 10.0000.0000.0002.00 [S9300-B-isis-1] quit [S9300-B] interface vlanif 20 [S9300-B-Vlanif20] isis enable [S9300-B-Vlanif20] quit

Step 4 Configure OSPF and import routes. # Configure S9300-A and enable OSPF.
[S9300-A] ospf [S9300-A-ospf-1] area 0 [S9300-A-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255 [S9300-A-ospf-1-area-0.0.0.0] quit [S9300-A-ospf-1] quit

# Configure S9300-B, enable OSPF, and import IS-IS routes.


[S9300-B] ospf [S9300-B-ospf-1] area 0 [S9300-B-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255 [S9300-B-ospf-1-area-0.0.0.0] quit [S9300-B-ospf-1] import-route isis 1 [S9300-B-ospf-1] quit

# Check the OSPF routing table of S9300-A, and you can view the imported routes.
[S9300-A] display ospf routing OSPF Process 1 with Router ID 192.168.1.1 Routing Tables Routing for Network Destination Cost Type 192.168.1.0/24 1 Stub Routing for ASEs Destination 192.168.2.0/24 172.17.1.0/24 172.17.2.0/24 172.17.3.0/24 Routing for NSSAs Destination Total Nets: 5 Intra Area: 1 Cost 1 1 1 1 Cost Type Type2 Type2 Type2 Type2 Type ASE: 4 NextHop 192.168.1.1 Tag 1 1 1 1 Tag NSSA: 0 AdvRouter 192.168.1.1 NextHop 192.168.1.2 192.168.1.2 192.168.1.2 192.168.1.2 NextHop Area 0.0.0.0 AdvRouter 192.168.1.2 192.168.1.2 192.168.1.2 192.168.1.2 AdvRouter

Inter Area: 0

Step 5 Set the filtering list. # Set ACL 2002 to match 172.17.2.0/24.
[S9300-B] acl number 2002 [S9300-B-acl-basic-2002] rule permit source 172.17.2.0 0.0.0.255 [S9300-B-acl-basic-2002] quit

# Set an IP prefix list named prefix-a to match 172.17.1.0/24.


[S9300-B] ip ip-prefix prefix-a index 10 permit 172.17.1.0 24

Step 6 Configure a Route-Policy.


[S9300-B] route-policy [S9300-B-route-policy] [S9300-B-route-policy] [S9300-B-route-policy] [S9300-B] route-policy [S9300-B-route-policy] [S9300-B-route-policy] isis2ospf permit node 10 if-match ip-prefix prefix-a apply cost 100 quit isis2ospf permit node 20 if-match acl 2002 apply tag 20

10-38

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


[S9300-B-route-policy] quit [S9300-B] route-policy isis2ospf permit node 30 [S9300-B-route-policy] quit

10 Routing Policy Configuration

Step 7 Apply the Route-Policy when routes are imported. # Configure S9300-B and apply the Route-Policy when routes are imported.
[S9300-B] ospf [S9300-B-ospf-1] import-route isis 1 route-policy isis2ospf [S9300-B-ospf-1] quit

# Check the OSPF routing table of S9300-A, and you can view that the cost of the route with the destination address as 172.17.1.0/24 is 100, and that the tag of the route destined for 172.17.2.0/24 is 20. Other routing attributes, however, do not change.
[S9300-A] display ospf routing OSPF Process 1 with Router ID 192.168.1.1 Routing Tables Routing for Network Destination Cost Type NextHop AdvRouter 192.168.1.0/24 1 Stub 192.168.1.1 192.168.1.1 Routing for ASEs Destination 192.168.2.0/24 172.17.1.0/24 172.17.2.0/24 172.17.3.0/24 Routing for NSSAs Destination Total Nets: 5 Intra Area: 1 Cost 1 100 1 1 Cost Type Type2 Type2 Type2 Type2 Type ASE: 4 Tag 1 1 20 1 Tag NSSA: 0 NextHop 192.168.1.2 192.168.1.2 192.168.1.2 192.168.1.2 NextHop

Area 0.0.0.0 AdvRouter 192.168.1.2 192.168.1.2 192.168.1.2 192.168.1.2 AdvRouter

Inter Area: 0

----End

Configuration Files
l

Configuration file of S9300-A


# sysname S9300-A # vlan batch 10 # interface Vlanif10 ip address 192.168.1.1 255.255.255.0 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # ospf 1 area 0.0.0.0 network 192.168.1.0 0.0.0.255 # return

Configuration file of S9300-B


# sysname S9300-B # vlan batch 10 20 # acl number 2002 rule 5 permit source 172.17.2.0 0.0.0.255

Issue 04 (2010-01-08)

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

10-39

10 Routing Policy Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

# isis 1 is-level level-2 network-entity 10.0000.0000.0002.00 # interface Vlanif10 ip address 192.168.1.2 255.255.255.0 # interface Vlanif20 ip address 192.168.2.2 255.255.255.0 isis enable 1 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet1/0/2 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # ospf 1 import-route isis 1 route-policy isis2ospf area 0.0.0.0 network 192.168.1.0 0.0.0.255 # route-policy isis2ospf permit node 10 if-match ip-prefix prefix-a apply cost 100 # route-policy isis2ospf permit node 20 if-match acl 2002 apply tag 20 # route-policy isis2ospf permit node 30 # ip ip-prefix prefix-a index 10 permit 172.17.1.0 24 # return l

Configuration file of S9300-C


# sysname S9300-C # vlan batch 20 30 40 50 # isis 1 is-level level-2 network-entity 10.0000.0000.0001.00 # interface Vlanif20 ip address 192.168.2.1 255.255.255.0 isis enable 1 # interface Vlanif30 ip address 172.17.1.1 255.255.255.0 isis enable 1 # interface Vlanif40 ip address 172.17.2.1 255.255.255.0 isis enable 1 # interface Vlanif50 ip address 172.17.3.1 255.255.255.0 isis enable 1 # interface GigabitEthernet1/0/1 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet1/0/2

10-40

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface GigabitEthernet1/0/3 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # interface GigabitEthernet1/0/4 port hybrid pvid vlan 50 port hybrid untagged vlan 50 # return

10 Routing Policy Configuration

10.12.3 Example for Configuring IP FRR on a Public Network


Networking Requirements
As shown in Figure 10-3, the backup outbound interface and the IP address of the backup next hop need to be configured on S9300-T so that link B is configured as the backup of link A. When link A fails, the traffic is quickly switched to link B. Figure 10-3 Networking diagram for configuring IP FRR on a public network

Internet

192.168.1.1/24 Router-C

100.55.1.1/24 Router-B

GE1/0/0 VLANIF30

GE1/0/1 VLANIF 40

GE1/0/1 VLANIF 20

GE1/0/0 VLANIF 10

S9300-C
GE1/0/3 VLANIF50 GE1/0/2 VALNIF70 GE1/0/2 VLANIF70

S9300-B
GE1/0/3 VLANIF60

GE1/0/0 VLANIF50

GE1/0/1 VLANIF60

S9300-A
S9300 S9300-A S9300-A S9300-B Interface GigabitEthernet1/0/0 GigabitEthernet2/0/0 GigabitEthernet1/0/0 VLANIF interface VLANIF 10 VLANIF 20 VLANIF 30 IP address 192.168.10.2/24 192.168.11.2/24 192.168.20.2/24

Issue 04 (2010-01-08)

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

10-41

10 Routing Policy Configuration


S9300-B S9300-C S9300-C S9300-C S9300-T S9300-T S9300-T GigabitEthernet2/0/0 GigabitEthernet1/0/0 GigabitEthernet2/0/0 GigabitEthernet3/0/0 GigabitEthernet1/0/0 GigabitEthernet2/0/0 GigabitEthernet3/0/0 VLANIF 40 VLANIF 60 VLANIF 20 VLANIF 40 VLANIF 50 VLANIF 10 VLANIF 30

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


192.168.21.2/24 172.17.1.1/24 192.168.11.1/24 192.168.21.1/24 172.16.1.1/24 192.168.10.1/24 192.168.20.2/24

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. Configure basic OSPF functions on each S9300. Set greater costs on VLANIF 30 of S9300-T and VLANIF 40 of S9300-C so that OSPF preferentially selects link A. Configure a routing policy on S9300-T, configure the nexthop and backup outbound interface, enable the IP FRR function on a public network, and check the information about the backup outbound interface and the backup nexthop. Check the information about the backup outbound interface and the backup next hop after IP FRR is disabled.

4.

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

Cost of the OSPF interface being 100 Name of the routing policy, IP address of the backup next hop 192.168.20.2, and backup outbound interface VLANIF 30

Procedure
Step 1 Assign an IP address to each interface. The configuration details are not mentioned here. Step 2 Configure OSPF on S9300-T, S9300-A, S9300-B, and S9300-C. The configuration details are not mentioned here. Step 3 Set the costs of OSPF interfaces. # Set the cost on VLANIF 30 of S9300-T so that OSPF preferentially selects link A.
<S9300-T> system-view [S9300-T] interface vlanif 30 [S9300-T-Vlanif30] ospf cost 100

# Set the cost on VLANIF 40 of S9300-C so that OSPF preferentially selects link A.
10-42 Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


<S9300-C> system-view [S9300-C] interface vlanif 40 [S9300-C-Vlanif40] ospf cost 100

10 Routing Policy Configuration

Step 4 Configure a routing policy and enable the IP FRR function. # Configure a Route-Policy, an IP address of the backup next hop, and a backup outbound interface on S9300-T.
<S9300-T> system-view [S9300-T] route-policy ip_frr_rp permit node 10 [S9300-T-route-policy] apply backup-nexthop 192.168.20.2 [S9300-T-route-policy] apply backup-interface vlanif 30

# Enable IP FRR on a public network.


[S9300-T] ip frr route-policy ip_frr_rp

Step 5 Check the information about a backup outbound interface and the IP address of the backup next hop. # Check the information about the backup outbound interface and the IP address of the backup next hop on S9300-T.
<S9300-T> display ip routing-table verbose Destination: 172.17.1.0/24 Protocol: OSPF Process ID: Preference: 10 Cost: NextHop: 192.168.10.2 Interface: RelyNextHop: 0.0.0.0 Neighbour: Label: NULL Tunnel ID: SecTunnel ID: BkNextHop: 192.168.20.2 BkInterface: BkLabel: 0 Tunnel ID: SecTunnel ID: State: Active Adv Age: Tag: 0

1 3 Vlanif10 0.0.0.0 0x0 0x0 Vlanif30 0x0 0x0 01h16m46s

Step 6 When the IP FRR function is not required, run the undo ip frr command to disable the function.
[S9300-T] undo ip frr

Step 7 Check information about the backup outbound interface and the IP address of the backup next hop after the IP FRR function is disabled.
<S9300-T> display ip routing-table verbose Destination: 172.17.1.0/24 Protocol: OSPF Process ID: Preference: 10 Cost: NextHop: 192.168.10.2 Interface: RelyNextHop: 0.0.0.0 Neighbour: Label: NULL Tunnel ID: SecTunnel ID: BkNextHop: 0.0.0.0 BkInterface: BkLabel: 0 Tunnel ID: SecTunnel ID: State: Active Adv Age: Tag: 0 1 3 Vlanif10 0.0.0.0 0x0 0x0 0x0 0x0 01h16m46s

----End

Configuration Files
l

Configuration file of S9300-T


# sysname S9300-T # vlan batch 10 30 50

Issue 04 (2010-01-08)

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

10-43

10 Routing Policy Configuration


# ip frr route-policy ip_frr_rp # interface Vlanif50 ip address 172.16.1.1 255.255.255.0 # interface Vlanif10 ip address 192.168.10.1 255.255.255.0 # interface Vlanif30 ip address 192.168.20.1 255.255.255.0 ospf cost 100 # interface GigabitEthernet1/0/0 port link-type access port defult vlan 50 # interface GigabitEthernet2/0/0 port link-type access port defult vlan 10 # interface GigabitEthernet3/0/0 port link-type access port defult vlan 30 # ospf 1 area 0.0.0.0 network 192.168.10.0 0.0.0.255 network 192.168.20.0 0.0.0.255 area 0.0.0.1 network 172.16.1.0 0.0.0.255 # route-policy ip_frr_rp permit node 10 apply backup-nexthop 192.168.20.2 apply backup-interface GigabitEthernet3/0/0 # return l

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Configuration file of S9300-A


# sysname S9300-A # vlan batch 10 20 # interface Vlanif10 ip address 192.168.10.2 255.255.255.0 # interface Vlanif20 ip address 192.168.11.2 255.255.255.0 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # ospf 1 area 0.0.0.0 network 192.168.10.0 0.0.0.255 network 192.168.11.0 0.0.0.255 # return

Configuration file of S9300-B


# sysname- S9300-B # vlan batch 30 40

10-44

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


# interface Vlanif30 ip address 192.168.20.2 255.255.255.0 # interface Vlanif40 ip address 192.168.21.2 255.255.255.0 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # ospf 1 area 0.0.0.0 network 192.168.20.0 0.0.0.255 network 192.168.21.0 0.0.0.255 # return l

10 Routing Policy Configuration

Configuration file of S9300-C


# sysname S9300-C # vlan batch 20 40 60 # interface Vlanif60 ip address 172.17.1.1 255.255.255.0 # interface Vlanif20 ip address 192.168.11.1 255.255.255.0 # interface Vlanif40 ip address 192.168.21.1 255.255.255.0 ospf cost 100 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 60 port hybrid untagged vlan 60 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet3/0/0 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # ospf 1 area 0.0.0.0 network 192.168.11.0 0.0.0.255 network 192.168.21.0 0.0.0.255 area 0.0.0.2 network 172.17.1.0 0.0.0.255 # return

10.12.4 Example for Configuring IP FRR on a Private Network


Networking Requirements
As shown in Figure 10-4, the backup outbound interface and the IP address of the backup next hop need to be configured on S9300-T so that link B is configured as the backup of link A. When link A fails, the traffic is quickly switched to link B.
Issue 04 (2010-01-08) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 10-45

10 Routing Policy Configuration

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

Figure 10-4 Networking diagram for configuring IP FRR on a private network


S9300-A
GE1/0/0 GE2/0/0 GE1/0/0 GE2/0/0 GE2/0/0 GE1/0/0

LinkA

S9300-T
GE3/0/0 GE1/0/0

S9300-C LinkB
GE3/0/0 GE2/0/0

S9300-B
S9300 S9300-A S9300-A S9300-B S9300-B S9300-C S9300-C S9300-C S9300-T S9300-T S9300-T Interface GigabitEthernet1/0/0 GigabitEthernet2/0/0 GigabitEthernet1/0/0 GigabitEthernet2/0/0 GigabitEthernet1/0/0 GigabitEthernet2/0/0 GigabitEthernet3/0/0 GigabitEthernet1/0/0 GigabitEthernet2/0/0 GigabitEthernet3/0/0 VLANIF interface VLANIF 10 VLANIF 20 VLANIF 30 VLANIF 40 VLANIF 60 VLANIF 20 VLANIF 40 VLANIF 50 VLANIF 10 VLANIF 30 IP address 192.168.10.2/24 192.168.11.2/24 192.168.20.2/24 192.168.21.2/24 172.17.1.1/24 192.168.11.1/24 192.168.21.1/24 172.16.1.1/24 192.168.10.1/24 192.168.20.1/24

Configuration Roadmap
The configuration roadmap is as follows: 1. 2. 3. 4. Configure basic OSPF functions on each S9300. Create VPN 1 on S9300-T and bind VLANIF 10 and VLANIF 30 to VPN1; configure OSPF multi-instance. Set greater costs on VLANIF 30 of S9300-T and VLANIF 40 of S9300-C so that OSPF preferentially selects link A. Enable the IP FRR function for S9300-T on a private network.

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

VPN instance name being VPN 1 on S9300-T, route-distinguisher being 100:1, VPN-target being 111:1, and area 0 and area 1 where OSPF is enabled OSPF costs of VLANIF 30 on S9300-T and VLANIF 40 on S9300-C being 100
Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. Issue 04 (2010-01-08)

10-46

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

10 Routing Policy Configuration

Procedure
Step 1 Assign an IP address to each interface. The configuration details are not mentioned here. Step 2 Configure OSPF on S9300-A, S9300-B, and S9300-C. The configuration details are not mentioned here. Step 3 Create VPN 1 and OSPF multi-instance on S9300-T. # Create VPN 1 on S9300-T and bind VLANIF 10 and VLANIF 30 to VPN 1.
<S9300-T> system-view [S9300-T] ip vpn-instance vpn1 [S9300-T-vpn-instance-vpn1] route-distinguisher 100:1 [S9300-T-vpn-instance-vpn1] vpn-target 111:1 [S9300-T-vpn-instance-vpn1] quit [S9300-T] interface vlanif 10 [S9300-T-Vlanif10] ip binding vpn-instance vpn1 [S9300-T-Vlanif10] ip address 192.168.10.1 24 [S9300-T-Vlanif10] quit [S9300-T] interface vlanif 30 [S9300-T-Vlanif30] ip binding vpn-instance vpn1 [S9300-T-Vlanif30] ip address 192.168.20.1 24

# Configure OSPF on S9300-T.


[S9300-T] ospf vpn-instance vpn1 [S9300-T-ospf-1] area 0 [S9300-T-ospf-1-area-0.0.0.0] network 192.168.10.0 0.0.0.255 [S9300-T-ospf-1-area-0.0.0.0] network 192.168.20.0 0.0.0.255 [S9300-T-ospf-1] area 1 [S9300-T-ospf-1-area-0.0.0.1] network 172.16.1.0 0.0.0.255

Step 4 Set the costs of OSPF interfaces. # Set the cost on VLANIF 30 of S9300-T so that OSPF preferentially selects link A.
[S9300-T] interface vlanif 30 [S9300-T-Vlanif30] ospf cost 100

# Set the cost on VLANIF 40 of S9300-C so that OSPF preferentially selects link A.
[S9300-C] interface vlanif 40 [S9300-C-Vlanif40] ospf cost 100

# Configure a Route-Policy, an IP address of the backup next hop, and a backup outbound interface on S9300-T.
[S9300-T] route-policy ip_frr_rp permit node 10 [S9300-T-route-policy] apply backup-nexthop 192.168.20.2 [S9300-T-route-policy] apply backup-interface vlanif 30

Step 5 Enable IP FRR on a private network.


[S9300-T] ip vpn-instance vpn1 [S9300-T-vpn-instance-vpn1] ip frr route-policy ip_frr_rp

# Check information about the backup outbound interface and the IP address of the backup next hop.
<S9300-T> display ip routing-table vpn-instance vpn1 verbose Destination: 172.17.1.0/24 Protocol: OSPF Process ID: 1 Preference: 10 Cost: 3 NextHop: 192.168.10.2 Interface: Vlanif20

Issue 04 (2010-01-08)

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

10-47

10 Routing Policy Configuration


RelyNextHop: 0.0.0.0 Label: NULL BkNextHop: 192.168.20.2 BkLabel: 0 State: Active Adv Tag: 0

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


Neighbour: Tunnel ID: SecTunnel ID: BkInterface: Tunnel ID: SecTunnel ID: Age: 0.0.0.0 0x0 0x0 Vlanif30 0x0 0x0 01h16m46s

Step 6 When the IP FRR function is not required, run the undo ip frr command to disable it.
[S9300-T-vpn-instance-vpn1] undo ip frr

Step 7 Check information about the backup outbound interface and the IP address of the backup next hop after the IP FRR function is disabled.
<S9300-T> display ip routing-table vpn-instance vpn1 verbose Destination: 172.17.1.0/24 Protocol: OSPF Process ID: 1 Preference: 10 Cost: 3 NextHop: 192.168.10.2 Interface: Vlanif10 RelyNextHop: 0.0.0.0 Neighbour: 0.0.0.0 Label: NULL Tunnel ID: 0x0 SecTunnel ID: 0x0 BkNextHop: 0.0.0.0 BkInterface: BkLabel: 0 Tunnel ID: 0x0 SecTunnel ID: 0x0 State: Active Adv Age: 01h16m46s Tag: 0

----End

Configuration Files
l

Configuration file of S9300-T


# sysname S9300-T # vlan batch 10 30 50 # ip vpn-instance vpn1 route-distinguisher 100:1 ip frr route-policy ip_frr_rp vpn-target 111:1 export-extcommunity vpn-target 111:1 import-extcommunity # interface Vlanif50 ip address 172.16.1.1 255.255.255.0 # interface Vlanif10 ip binding vpn-instance vpn1 ip address 192.168.10.1 255.255.255.0 # interface Vlanif30 ip binding vpn-instance vpn1 ip address 192.168.20.1 255.255.255.0 ospf cost 100 # interface GigabitEthernet1/0/0 port link-type access port defult vlan 50 # interface GigabitEthernet2/0/0 port link-type access port defult vlan 10 # interface GigabitEthernet3/0/0 port link-type access

10-48

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

Issue 04 (2010-01-08)

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing


port defult vlan 30 # ospf 1 vpn-instance vpn1 area 0.0.0.0 network 192.168.10.0 0.0.0.255 network 192.168.20.0 0.0.0.255 # route-policy ip_frr_rp permit node 10 apply backup-nexthop 192.168.20.2 apply backup-interface GigabitEthernet 3/0/0 l

10 Routing Policy Configuration

Configuration file of S9300-A


# sysname S9300-A # vlan batch 10 20 # interface Vlanif10 ip address 192.168.10.2 255.255.255.0 # interface Vlanif20 ip address 192.168.11.2 255.255.255.0 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # ospf 1 area 0.0.0.0 network 192.168.10.0 0.0.0.255 network 192.168.11.0 0.0.0.255 # return

Configuration file of S9300-B


# sysname S9300-B # vlan batch 30 40 # interface Vlanif30 ip address 192.168.20.2 255.255.255.0 # interface Vlanif40 ip address 192.168.21.2 255.255.255.0 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # ospf 1 area 0.0.0.0 network 192.168.20.0 0.0.0.255 network 192.168.21.0 0.0.0.255 # return

Configuration file of S9300-C


# sysname S9300-C #

Issue 04 (2010-01-08)

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

10-49

10 Routing Policy Configuration


vlan batch 20 60 40 # interface vlanif60 ip address 172.17.1.1 255.255.255.0 # interface Vlanif20 ip address 192.168.11.1 255.255.255.0 # interface vlanif40 ip address 192.168.21.1 255.255.255.0 ospf cost 100 # interface GigabitEthernet1/0/0 port hybrid pvid vlan 60 port hybrid untagged vlan 60 # interface GigabitEthernet2/0/0 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # interface GigabitEthernet3/0/0 port hybrid pvid vlan 40 port hybrid untagged vlan 40 # ospf 1 area 0.0.0.0 network 192.168.11.0 0.0.0.255 network 192.168.21.0 0.0.0.255 area 0.0.0.2 network 172.17.1.0 0.0.0.255 # return

Quidway S9300 Terabit Routing Switch Configuration Guide - IP Routing

10-50

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

Issue 04 (2010-01-08)

You might also like