0% found this document useful (0 votes)
7 views881 pages

Huawei CloudEngine Switches IP Routing Guide

This document is a configuration guide for IP Unicast Routing on Huawei's CloudEngine 8800, 7800, 6800, and 5800 series switches. It is intended for network engineers and covers topics such as static and dynamic routes, routing tables, and security conventions. The guide also includes command conventions, interface numbering, and configuration examples.

Uploaded by

mosabalinto
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views881 pages

Huawei CloudEngine Switches IP Routing Guide

This document is a configuration guide for IP Unicast Routing on Huawei's CloudEngine 8800, 7800, 6800, and 5800 series switches. It is intended for network engineers and covers topics such as static and dynamic routes, routing tables, and security conventions. The guide also includes command conventions, interface numbering, and configuration examples.

Uploaded by

mosabalinto
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CloudEngine 8800, 7800, 6800, and 5800 Series

Switches
V200R002C50

Configuration Guide - IP Unicast


Routing

Issue 06
Date 2018-11-26

HUAWEI TECHNOLOGIES CO., LTD.


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

Trademarks and Permissions

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

Notice
The purchased products, services and features are stipulated by the contract made between Huawei and the
customer. All or part of the products, services and features described in this document may not be within the
purchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information,
and recommendations in this document are provided "AS IS" without warranties, guarantees or
representations of any kind, either express or implied.

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

Huawei Technologies Co., Ltd.


Address: Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China

Website: [Link]

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. i


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing About This Document

About This Document

Intended Audience
This document is intended for network engineers responsible for CE series switches
configuration and management. You should be familiar with basic Ethernet knowledge and
have extensive experience in network deployment and management.

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

Symbol Description

Indicates a potentially hazardous situation


which, if not avoided, could result in
equipment damage, data loss, performance
deterioration, or unanticipated results.
NOTICE is used to address practices not
related to personal injury.

NOTE Calls attention to important information,


best practices and tips.
NOTE is used to address information not
related to personal injury, equipment
damage, and environment deterioration.

Command Conventions
The command conventions that may be found in this document are defined as follows.

Convention Description

Boldface The keywords of a command line are in boldface.

Italic Command arguments are in italics.

[] Items (keywords or arguments) in brackets [ ] are optional.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. ii


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing About This Document

Convention Description

{ x | y | ... } Optional items are grouped in braces and separated by


vertical bars. One item is selected.

[ x | y | ... ] Optional items are grouped in brackets and separated by


vertical bars. One item is selected or no item is selected.

{ x | y | ... }* Optional items are grouped in braces and separated by


vertical bars. A minimum of one item or a maximum of all
items can be selected.

[ x | y | ... ]* Optional items are grouped in brackets and separated by


vertical bars. Several items or no item can be selected.

&<1-n> The parameter before the & sign can be repeated 1 to n


times.

# A line starting with the # sign is comments.

Interface Numbering Conventions


Interface numbers used in this manual are examples. In device configuration, use the existing
interface numbers on devices.

Security Conventions
l Password setting
– When configuring a password, the cipher text is recommended. To ensure device
security, change the password periodically.
– When you configure a password in plain text that starts and ends with %^%#......%^
%# (the password can be decrypted by the device), the password is displayed in the
same manner as the configured one in the configuration file. Do not use this setting.
After the system master key is set using the set master-key command, do not start
and end the key with %@%# because the string starting and ending with %@%#
is considered as a valid cipher-text key.
– When you configure a password in cipher text, different features cannot use the
same cipher-text password. For example, the cipher-text password set for the AAA
feature cannot be used for other features.
– After the system software is downgraded and the switch restarts with the
configuration of the higher version, AAA, VTY, serial interface login, and SNMP
user passwords become invalid. As a result, users fail to log in to the switch using
the passwords and the switch is disconnected from the network management
system.
To address this problem, take the following measures:
i. If no password is configured for the console port, log in to the device through
the console port, and reconfigure AAA and password for users such as VTY

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. iii


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing About This Document

and SNMP users. For security purposes, the console port password is
recommended.
ii. If a password is configured for login through the console port, the password
becomes invalid after the downgrade and you cannot log in to the switch
through the console port. Perform the following steps:
1) Connect to the console port.
2) Power recycle the device. During the startup, enter Ctrl+B according to
the prompt to enter the BIOS menu. The default password is
Admin@[Link].
3) Select [Link] console password to delete and change the console port
password.
4) Restart the device, log in to the device through the console port, and
reconfigure the password for AAA, VTY, or SNMP user.
l Encryption algorithm
Currently, the device uses the following encryption algorithms: DES, 3DES, AES, DSA,
RSA, DH, ECDH, HMAC, SHA1, SHA2, PBKDF2, scrypt, and MD5. The encryption
algorithm depends on the applicable scenario. Use the recommended encryption
algorithm; otherwise, security defense requirements may be not met.
– For the symmetrical encryption algorithm, use AES with the key of 256 bits or
more.
– When you need to use an asymmetric cryptography, RSA (2048-bit or longer key)
is recommended. In addition, use different key pairs for encryption and signature.
– For the digital signature, RSA (2048-bit or longer key) or DSA (2048-bit or longer
key) is recommended.
– For key negotiation, DH (2048-bit or longer key) or ECDH (256-bit or longer key)
is recommended.
– For the hash algorithm, use SHA with the key of 256 bits or more.
– For the HMAC algorithm, use HMAC-SHA2.
– DES, 3DES, RSA and AES are reversible encryption algorithm. If protocols are
used for interconnection, the locally stored password must be reversible.
– SHA1, SHA2, and MD5 are irreversible encryption algorithm. When configuring a
password for local administrator, it is recommended that you use the SHA2
irreversible encryption algorithm.
– To prevent brute force cracking of the user password, the iteration algorithm is
added to the password on the basis of salts. The iteration algorithm uses PBKDF2
or scrypt key export algorithm.
– The ECB mode has a poor capability of defending against plaintext playback
attacks, so ECB is not recommended for password encryption.
– In SSH2.0, the symmetric cryptography using the CBC mode may undergo the
plaintext-recovery attack to cause a data leak. Therefore, the CBC mode is not
recommended for SSH2.0.
l Personal data
Some personal data (such as MAC or IP addresses of terminals) may be obtained or used
during operation or fault location of your purchased products, services, features, so you
have an obligation to make privacy policies and take measures according to the
applicable law of the country to protect personal data.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. iv


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing About This Document

l The terms mirrored port, port mirroring, traffic mirroring, and mirroring in this manual
are mentioned only to describe the product's function of communication error or failure
detection, and do not involve collection or processing of any personal information or
communication data of users.

Reference Standards and Protocols


To obtain reference standards and protocols, log in to Huawei official website, search for
"protocol compliance list", and download the Huawei CloudEngine Switches Protocol
Compliance List.

Declaration
l This manual is only a reference for you to configure your devices. The contents in the
manual, such as command line syntax, and command outputs, are based on the device
conditions in the lab. The manual provides instructions for general scenarios, but do not
cover all usage scenarios of all product models. The contents in the manual may be
different from your actual device situations due to the differences in software versions,
models, and configuration files. The manual will not list every possible difference. You
should configure your devices according to actual situations.
l The specifications provided in this manual are tested in lab environment (for example,
the tested device has been configured with a certain type of cards or only one protocol is
run on the device). Results may differ from the listed specifications when you attempt to
obtain the maximum values with multiple functions enabled on the device.
l In this document, public IP addresses may be used in feature introduction and
configuration examples and are for reference only unless otherwise specified.

Mappings between Product Software Versions and NMS


Versions
The mappings between product software versions and NMS versions are as follows.

CE8800, CE7800, CE6800, and NMS


CE5800 series switches
Product Software Version

V200R002C50 eSight V300R008C00/iManager U2000 V200R017C50

Mappings between Product Software Versions and


Controller Versions
The mappings between product software versions and Controller versions are as follows.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. v


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing About This Document

CE8800, CE7800, CE6800, and Controller


CE5800 series switches
Product Software Version

V200R002C50 Agile Controller-DCN V300R001C20

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. vi


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing Contents

Contents

About This Document.....................................................................................................................ii


1 IP Unicast Routing........................................................................................................................ 1
1.1 Overview of IP Unicast Routing.................................................................................................................................... 1
1.2 Understanding IP Unicast Routing................................................................................................................................. 2
1.2.1 Route Iteration............................................................................................................................................................. 2
1.2.2 Routers and Routing.................................................................................................................................................... 2
1.2.3 Static Routes and Dynamic Routes............................................................................................................................. 3
1.2.4 Routing Table and FIB Table.......................................................................................................................................4
1.2.5 Routing Protocol Preference........................................................................................................................................7
1.2.6 Route Metric................................................................................................................................................................ 9
1.2.7 Load Balancing and Route Backup............................................................................................................................. 9
1.2.8 ECMP Load Balancing Consistency..........................................................................................................................11
1.2.9 IP FRR....................................................................................................................................................................... 13
1.2.10 Route Convergence..................................................................................................................................................14
1.2.11 Default Routes......................................................................................................................................................... 16
1.2.12 Route Importing.......................................................................................................................................................16
1.2.13 Autonomous System................................................................................................................................................16
1.3 Displaying and Maintaining a Routing Table...............................................................................................................16
1.4 Maintaining the Routing Management Module............................................................................................................17
1.5 Configuring IPv4 FRR..................................................................................................................................................19
1.6 Configuring IPv6 FRR..................................................................................................................................................20
1.7 Configuring the ECMP Load Balancing Mode............................................................................................................ 21
1.8 Configuring an ECMP Load Balancing Mode for PPPoE Packets.............................................................................. 29
1.9 Enable ECMP Load Balancing Consistency................................................................................................................ 30
1.10 Configuring the Advertisement of IPv4 ARP Vlink Direct Routes........................................................................... 31
1.11 Configuring a Priority for Direct Subnet Routes on an Interface............................................................................... 33
1.12 Configuration Examples for IP Unicast Routing........................................................................................................34
1.12.1 Example for Configuring IPv4 FRR on the Public Network...................................................................................34

2 Static Route Configuration........................................................................................................ 41


2.1 Overview of Static Routes............................................................................................................................................ 41
2.2 Understanding Static Routes........................................................................................................................................ 42
2.2.1 Basic Concepts of Static Routes................................................................................................................................ 42

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. vii


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing Contents

2.2.2 BFD for Static Routes................................................................................................................................................43


2.2.3 NQA for Static Routes...............................................................................................................................................43
2.2.4 Permanent Advertisement of Static Routes............................................................................................................... 45
2.3 Application Scenarios for Static Routes....................................................................................................................... 46
2.3.1 Load Balancing and Route Backup........................................................................................................................... 46
2.3.2 Static Default Routes................................................................................................................................................. 48
2.4 Summary of Static Route Configuration Tasks............................................................................................................ 48
2.5 Licensing Requirements and Limitations for Static Routes......................................................................................... 52
2.6 Default Settings for Static Routes................................................................................................................................ 53
2.7 Configuring IPv4 Static Routes.................................................................................................................................... 53
2.7.1 Creating IPv4 Static Routes.......................................................................................................................................54
2.7.2 (Optional) Setting the Default Preference for an IPv4 Static Route..........................................................................55
2.7.3 (Optional) Configuring Static Route Selection Based on Iteration Depth................................................................ 55
2.7.4 (Optional) Configuring a Device to Iterate Static Routes to ARP Vlink Routes...................................................... 56
2.7.5 (Optional) Enabling the Function of Comparing the Costs of Inherited Routes During Static Route Selection...... 57
2.7.6 (Optional) Configuring Dynamic BFD for IPv4 Static Routes................................................................................. 57
2.7.7 (Optional) Configuring Static BFD for IPv4 Static Routes.......................................................................................58
2.7.8 (Optional) Configuring FRR for IPv4 Static Routes................................................................................................. 59
2.7.9 (Optional) Associating IPv4 Static Routes with NQA.............................................................................................. 60
2.7.10 Verifying the IPv4 Static Route Configuration........................................................................................................62
2.8 Configuring IPv6 Static Routes.................................................................................................................................... 62
2.8.1 Creating IPv6 Static Routes.......................................................................................................................................62
2.8.2 (Optional) Setting the Default Preference for IPv6 Static Routes.............................................................................64
2.8.3 (Optional) Configuring Dynamic BFD for IPv6 Static Routes................................................................................. 64
2.8.4 (Optional) Configuring Static BFD for IPv6 Static Routes.......................................................................................66
2.8.5 (Optional) Configuring FRR for IPv6 Static Routes................................................................................................. 67
2.8.6 (Optional) Associating IPv6 Static Routes with NQA.............................................................................................. 67
2.8.7 Verifying the IPv6 Static Route Configuration..........................................................................................................70
2.9 Configuration Examples for Static Routes................................................................................................................... 70
2.9.1 Example for Configuring IPv4 Static Routes............................................................................................................ 70
2.9.2 Example for Configuring IPv6 Static Routes............................................................................................................ 74
2.9.3 Example for Configuring Dynamic BFD for IPv4 Static Routes.............................................................................. 79
2.9.4 Example for Configuring Dynamic BFD for IPv6 Static Routes.............................................................................. 81
2.9.5 Example for Configuring Static BFD for IPv4 Static Routes................................................................................... 84
2.9.6 Example for Configuring Static BFD for IPv6 Static Routes................................................................................... 86
2.9.7 Example for Configuring FRR for IPv4 Static Routes on the Public Network.........................................................90
2.9.8 Example for Configuring NQA for IPv4 Static Routes.............................................................................................95

3 RIP Configuration..................................................................................................................... 103


3.1 Overview of RIP......................................................................................................................................................... 103
3.2 Understanding RIP..................................................................................................................................................... 104
3.2.1 RIP Fundamentals....................................................................................................................................................104
3.2.2 RIP-2 Enhanced Features........................................................................................................................................ 106

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. viii


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing Contents

3.2.3 Split Horizon and Poison Reverse........................................................................................................................... 108


3.2.4 Multi-Process and Multi-Instance........................................................................................................................... 109
3.2.5 BFD for RIP.............................................................................................................................................................109
3.2.6 RIP NSR...................................................................................................................................................................111
3.3 Summary of RIP Configuration Tasks........................................................................................................................ 111
3.4 Licensing Requirements and Limitations for RIP...................................................................................................... 115
3.5 Default Settings for RIP..............................................................................................................................................117
3.6 Configuring Basic RIP Functions............................................................................................................................... 117
3.6.1 Enabling RIP............................................................................................................................................................117
3.6.2 Enabling RIP on the Specified Network Segment...................................................................................................118
3.6.3 (Optional) Configuring RIP Neighbors on an NBMA Network..............................................................................119
3.6.4 (Optional) Specifying the RIP Version.................................................................................................................... 119
3.6.5 Verifying the Basic RIP Function Configuration.................................................................................................... 121
3.7 Configuring RIP-2...................................................................................................................................................... 121
3.7.1 Configuring RIP-2 Route Summarization............................................................................................................... 121
3.7.2 Configuring RIP-2 Packet Authentication...............................................................................................................122
3.7.3 Verifying the RIP-2 Configuration.......................................................................................................................... 124
3.8 Preventing Routing Loops.......................................................................................................................................... 124
3.8.1 Configuring Split Horizon....................................................................................................................................... 125
3.8.2 Configuring Poison Reverse.................................................................................................................................... 125
3.8.3 Verifying the RIP Routing Loop Prevention Configuration.................................................................................... 126
3.9 Controlling RIP Routing.............................................................................................................................................126
3.9.1 Configuring RIP Preference.................................................................................................................................... 127
3.9.2 Configuring Additional Metrics of an Interface...................................................................................................... 127
3.9.3 Setting the Maximum Number of Equal-Cost Routes.............................................................................................128
3.9.4 Verifying the RIP Routing Control Configuration.................................................................................................. 129
3.10 Controlling RIP Route Advertisement..................................................................................................................... 129
3.10.1 Configuring RIP to Advertise Default Routes.......................................................................................................129
3.10.2 Disabling an Interface from Sending Update Packets........................................................................................... 130
3.10.3 Configuring RIP to Import Routes........................................................................................................................ 131
3.10.4 Verifying the RIP Route Advertisement Control Configuration........................................................................... 132
3.11 Controlling Receiving of RIP Routing Information................................................................................................. 132
3.11.1 Disabling an Interface from Receiving RIP Update Packets.................................................................................133
3.11.2 Configuring RIP to Deny Host Routes.................................................................................................................. 133
3.11.3 Configuring RIP to Filter Received Routes...........................................................................................................134
3.11.4 Checking RIP Packets with Metric 0.....................................................................................................................135
3.11.5 Verifying the RIP Route Receiving Control Configuration...................................................................................135
3.12 Improving RIP Network Performance......................................................................................................................135
3.12.1 Configuring RIP Timers........................................................................................................................................ 136
3.12.2 Setting the Interval for Sending Update Packets and Maximum Number of Sent Packets...................................137
3.12.3 Setting the Maximum Length of RIP Packets....................................................................................................... 137
3.12.4 Configuring RIP to Check the Validity of Update Packets................................................................................... 138

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. ix


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing Contents

3.12.5 Configuring RIP Triggered Update....................................................................................................................... 139


3.12.6 Setting the Maximum Number of RIP Routes.......................................................................................................140
3.12.7 Verifying the RIP Network Performance Optimization Configuration................................................................. 140
3.13 Configuring BFD for RIP......................................................................................................................................... 141
3.13.1 Configuring Dynamic BFD for RIP...................................................................................................................... 141
3.13.2 Configuring Static BFD for RIP............................................................................................................................ 143
3.14 Configuring the Network Management Function for RIP........................................................................................145
3.15 Maintaining RIP....................................................................................................................................................... 145
3.15.1 Resetting RIP......................................................................................................................................................... 146
3.15.2 Clearing RIP Statistics...........................................................................................................................................146
3.16 Configuration Examples for RIP.............................................................................................................................. 146
3.16.1 Example for Configuring Basic RIP Functions..................................................................................................... 147
3.16.2 Example for Importing Routes to RIP................................................................................................................... 150
3.16.3 Example for Configuring Dynamic BFD for RIP................................................................................................. 154
3.17 Troubleshooting RIP.................................................................................................................................................160
3.17.1 Failed to Receive RIP Update Packets from Neighbors........................................................................................160
3.17.2 Failed to Send RIP Update Packets to Neighbors................................................................................................. 160
3.17.3 Route Flapping Occurs on a RIP Network............................................................................................................ 161

4 RIPng Configuration.................................................................................................................162
4.1 Overview of RIPng..................................................................................................................................................... 162
4.2 Understanding RIPng................................................................................................................................................. 163
4.2.1 Comparison Between RIPng and RIP..................................................................................................................... 163
4.3 Summary of RIPng Configuration Tasks....................................................................................................................163
4.4 Licensing Requirements and Limitations for RIPng.................................................................................................. 165
4.5 Default Settings for RIPng......................................................................................................................................... 167
4.6 Configuring Basic RIPng Functions...........................................................................................................................167
4.6.1 Enabling RIPng........................................................................................................................................................167
4.6.2 Enabling RIPng on Interfaces..................................................................................................................................168
4.6.3 Verifying the Basic RIPng Function Configuration................................................................................................ 169
4.7 Preventing Routing Loops.......................................................................................................................................... 169
4.7.1 Configuring Split Horizon....................................................................................................................................... 169
4.7.2 Configuring Poison Reverse.................................................................................................................................... 170
4.7.3 Verifying the RIPng Routing Loop Prevention Configuration................................................................................ 171
4.8 Controlling RIPng Routing.........................................................................................................................................171
4.8.1 Configuring RIPng Preference................................................................................................................................ 171
4.8.2 Configuring Additional Metrics of an Interface...................................................................................................... 172
4.8.3 Setting the Maximum Number of Equal-Cost Routes.............................................................................................173
4.8.4 Verifying the RIPng Routing Control Configuration.............................................................................................. 173
4.9 Controlling RIPng Route Advertisement................................................................................................................... 174
4.9.1 Configuring RIPng Route Summarization.............................................................................................................. 174
4.9.2 Advertising a Default Route.................................................................................................................................... 175
4.9.3 Configuring a RIPng Process to Import External Routes........................................................................................176

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. x


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing Contents

4.9.4 Verifying the RIPng Route Advertisement Control Configuration......................................................................... 177


4.10 Improving RIPng Network Performance..................................................................................................................177
4.10.1 Configuring RIPng Timers.................................................................................................................................... 177
4.10.2 Enabling Zero Field Check for RIPng Packets......................................................................................................178
4.10.3 Verifying the RIPng Network Performance Optimization Configuration............................................................. 179
4.11 Clearing RIPng......................................................................................................................................................... 179
4.12 Configuration Examples for RIPng.......................................................................................................................... 179
4.12.1 Example for Configuring Basic RIPng Functions................................................................................................. 180

5 OSPF Configuration..................................................................................................................184
5.1 Overview of OSPF......................................................................................................................................................185
5.2 Understanding OSPF.................................................................................................................................................. 185
5.2.1 OSPF Fundamentals................................................................................................................................................ 185
5.2.2 BFD for OSPF......................................................................................................................................................... 197
5.2.3 OSPF Smart-discover.............................................................................................................................................. 198
5.2.4 OSPF VPN...............................................................................................................................................................199
5.2.5 OSPF NSSA............................................................................................................................................................ 205
5.2.6 OSPF Fast Convergence.......................................................................................................................................... 207
5.2.7 OSPF Neighbor Relationship Flapping Suppression...............................................................................................207
5.2.8 Priority-based OSPF Convergence.......................................................................................................................... 213
5.2.9 OSPF-BGP Association...........................................................................................................................................213
5.2.10 OSPF GR............................................................................................................................................................... 214
5.2.11 OSPF-LDP Association......................................................................................................................................... 218
5.2.12 OSPF Database Overflow......................................................................................................................................219
5.2.13 OSPF Mesh-Group................................................................................................................................................ 220
5.3 Application Scenarios for OSPF.................................................................................................................................222
5.3.1 OSPF GR................................................................................................................................................................. 222
5.4 Summary of OSPF Configuration Tasks.................................................................................................................... 224
5.5 Licensing Requirements and Limitations for OSPF...................................................................................................228
5.6 Default Settings for OSPF.......................................................................................................................................... 229
5.7 Configuring Basic OSPF Functions........................................................................................................................... 230
5.7.1 Creating an OSPF Process....................................................................................................................................... 230
5.7.2 Creating an OSPF Area........................................................................................................................................... 231
5.7.3 Enabling OSPF........................................................................................................................................................ 231
5.7.4 (Optional) Creating OSPF Virtual Links................................................................................................................. 233
5.7.5 Verifying the Basic OSPF Function Configuration................................................................................................. 234
5.8 Setting Session Parameters for OSPF Neighbor or Adjacency Relationships........................................................... 234
5.8.1 Setting the OSPF Packet Retransmission Limit...................................................................................................... 234
5.8.2 Configuring an Interface to Fill in DD Packets with the Actual MTU................................................................... 235
5.8.3 Verifying the OSPF Session Parameter Settings..................................................................................................... 236
5.9 Configuring OSPF Attributes in Different Types of Networks.................................................................................. 236
5.9.1 Configuring Network Types of OSPF Interfaces.....................................................................................................237
5.9.2 (Optional) Setting the DR Priority for an OSPF Interface of the Broadcast or NBMA Network Type..................238

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. xi


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing Contents

5.9.3 Configuring P2MP Network Attributes...................................................................................................................239


5.9.4 Configuring a Neighbor on an NBMA Network..................................................................................................... 241
5.9.5 (Optional) Configuring the Interval for Sending Poll Packets on an NBMA Network...........................................241
5.9.6 Verifying the OSPF Attribute Configuration...........................................................................................................242
5.10 Configuring OSPF Stub Areas................................................................................................................................. 242
5.10.1 Defining the Current Area as a Stub Area............................................................................................................. 243
5.10.2 (Optional) Configuring Costs of Default Routes Sent to Stub Areas....................................................................244
5.10.3 Verifying the OSPF Stub Area Configuration....................................................................................................... 244
5.11 Configuring OSPF NSSAs........................................................................................................................................244
5.12 Adjusting OSPF Route Selection............................................................................................................................. 247
5.12.1 Setting the Link Cost for an OSPF Interface......................................................................................................... 247
5.12.2 Setting the Preference for Equal-cost OSPF Routes............................................................................................. 249
5.12.3 Setting the Maximum Number of Equal-Cost Routes...........................................................................................249
5.12.4 Configuring a Switch to Comply with External Route Selection Rules Defined in RFC 1583............................ 250
5.12.5 Verifying the OSPF Route Selection Adjustment Configuration.......................................................................... 251
5.13 Controlling OSPF Routing Information................................................................................................................... 251
5.13.1 Configuring OSPF to Import External Routes...................................................................................................... 251
5.13.2 Configuring OSPF to Advertise a Default Route to OSPF Areas......................................................................... 253
5.13.3 Configuring OSPF Route Aggregation..................................................................................................................254
5.13.4 Configuring OSPF to Filter Received Routes....................................................................................................... 255
5.13.5 Configuring OSPF to Filter the Routes to Be Advertised..................................................................................... 256
5.13.6 Configuring a Switch to Filter LSAs to Be Sent................................................................................................... 256
5.13.7 Configuring OSPF to Filter ABR Type3 LSAs..................................................................................................... 257
5.13.8 Verifying the OSPF Routing Information Control Configuration......................................................................... 258
5.14 Configuring OSPF IP FRR....................................................................................................................................... 258
5.14.1 Enabling OSPF IP FRR......................................................................................................................................... 259
5.14.2 (Optional) Binding IP FRR and BFD.................................................................................................................... 260
5.14.3 (Optional) Blocking FRR on an OSPF Interface...................................................................................................260
5.14.4 Verifying the OSPF IP FRR Configuration........................................................................................................... 261
5.15 Configuring BFD for OSPF......................................................................................................................................261
5.15.1 Configuring Global BFD....................................................................................................................................... 262
5.15.2 Configuring the BFD for OSPF Feature................................................................................................................263
5.15.3 (Optional) Preventing an Interface from Dynamically Setting Up a BFD Session...............................................263
5.15.4 (Optional) Configuring BFD on a Specified Interface.......................................................................................... 264
5.15.5 Verifying the BFD for OSPF Configuration..........................................................................................................265
5.16 Configuring OSPF Fast Convergence...................................................................................................................... 265
5.16.1 Setting the Convergence Priority of OSPF Routes................................................................................................266
5.16.2 Setting the Interval for Sending Hello Packets......................................................................................................267
5.16.3 Setting the Dead Time of a Neighbor Relationship...............................................................................................268
5.16.4 Configuring Smart-discover.................................................................................................................................. 269
5.16.5 Setting the Interval for Updating LSAs................................................................................................................. 270
5.16.6 Setting the Interval for Receiving LSAs................................................................................................................271

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. xii


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing Contents

5.16.7 Setting the Interval for SPF Calculations.............................................................................................................. 272


5.16.8 Configuring the Route Calculation Delay Function to Suppress Frequent LSA Flapping................................... 273
5.16.9 Disabling Active/Standby Switchover Upon Abnormal OSPF LSA Aging......................................................... 274
5.16.10 Disabling OSPF LSA Aging Management..........................................................................................................275
5.16.11 Verifying the OSPF Fast Convergence Configuration.........................................................................................275
5.17 Configuring Suppression of OSPF Neighbor Relationship Flapping.......................................................................275
5.18 Configuring the OSPF GR Helper............................................................................................................................277
5.19 Improving Stability of an OSPF Network................................................................................................................ 279
5.19.1 Setting the Preference of OSPF Routes................................................................................................................. 279
5.19.2 Configuring the Delay in Transmitting LSAs on an Interface...............................................................................280
5.19.3 Configuring the Interval for Retransmitting LSAs................................................................................................280
5.19.4 Configuring Secure Synchronization.....................................................................................................................281
5.19.5 Configuring a Stub Router.....................................................................................................................................282
5.19.6 Prohibiting an OSPF Interface from Sending and Receiving Protocol Packets.................................................... 282
5.19.7 Verifying the OSPF Network Stability Optimization Configuration.....................................................................283
5.20 Improving Security of an OSPF Network................................................................................................................ 283
5.20.1 Configuring OSPF GTSM..................................................................................................................................... 284
5.20.2 Configuring the Area Authentication Mode.......................................................................................................... 285
5.20.3 Configuring the Interface Authentication Mode....................................................................................................286
5.20.4 Verifying the OSPF Network Security Optimization Configuration.....................................................................287
5.21 Configuring the Network Management Function of OSPF......................................................................................288
5.22 Maintaining OSPF.................................................................................................................................................... 288
5.22.1 Clearing OSPF Information...................................................................................................................................288
5.22.2 Resetting OSPF Information................................................................................................................................. 289
5.23 Configuration Examples for OSPF...........................................................................................................................290
5.23.1 Example for Configuring Basic OSPF Functions..................................................................................................290
5.23.2 Example for Configuring OSPF Stub Areas..........................................................................................................296
5.23.3 Example for Configuring OSPF NSSAs............................................................................................................... 302
5.23.4 Example for Configuring DR Election of OSPF................................................................................................... 306
5.23.5 Example for Configuring Load Balancing Among OSPF Routes.........................................................................311
5.23.6 Example for Configuring OSPF IP FRR............................................................................................................... 316
5.23.7 Example for Configuring BFD for OSPF..............................................................................................................324
5.24 Troubleshooting OSPF............................................................................................................................................. 329
5.24.1 An OSPF Neighbor Relationship Cannot Be Established..................................................................................... 329
5.24.2 OSPF Cannot Find Routes of a Non-Local Area.................................................................................................. 331

6 OSPFv3 Configuration............................................................................................................. 333


6.1 Overview of OSPFv3..................................................................................................................................................334
6.2 Understanding OSPFv3.............................................................................................................................................. 334
6.2.1 OSPFv3 Fundamentals............................................................................................................................................ 334
6.2.2 OSPFv3 GR............................................................................................................................................................. 341
6.2.3 Association between OSPFv3 and BGP.................................................................................................................. 343
6.2.4 OSPFv3 Neighbor Relationship Flapping Suppression...........................................................................................345

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. xiii


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing Contents

6.2.5 OSPFv3 and OSPFv2 Comparison..........................................................................................................................349


6.3 Summary of OSPFv3 Configuration Tasks................................................................................................................ 351
6.4 Licensing Requirements and Limitations for OSPFv3...............................................................................................356
6.5 Default Settings for OSPFv3...................................................................................................................................... 357
6.6 Configuring Basic OSPFv3 Functions....................................................................................................................... 358
6.6.1 Enabling OSPFv3.................................................................................................................................................... 358
6.6.2 Enabling OSPFv3 on an Interface........................................................................................................................... 359
6.6.3 Entering the OSPFv3 Area View.............................................................................................................................360
6.6.4 Verifying the Basic OSPFv3 Function Configuration............................................................................................. 361
6.7 Establishing or Maintaining OSPFv3 Neighbor Relationship....................................................................................362
6.7.1 Configuring the Interval for Sending Hello Packets............................................................................................... 362
6.7.2 Configuring Dead Time of Neighbor Relationship................................................................................................. 363
6.7.3 Configuring the Interval for Retransmitting LSAs to Neighboring switchs........................................................... 364
6.7.4 Configuring the Delay for Transmitting LSAs on the Interface..............................................................................365
6.7.5 Verifying the OSPFv3 Neighbor Relationship Establishment and Maintenance Configuration.............................366
6.8 Configuring OSPFv3 Areas........................................................................................................................................367
6.8.1 Configuring OSPFv3 Stub Areas............................................................................................................................ 367
6.8.2 Configuring an OSPFv3 NSSA............................................................................................................................... 368
6.8.3 Verifying the OSPFv3 Area Configuration............................................................................................................. 369
6.9 Configuring OSPFv3 Route Attributes.......................................................................................................................370
6.9.1 Setting the Cost of the OSPFv3 Interface................................................................................................................370
6.9.2 Setting the Maximum Number of Equal-Cost Routes.............................................................................................371
6.9.3 Verifying the OSPFv3 Route Attribute Configuration............................................................................................ 372
6.10 Controlling OSPFv3 Routing Information............................................................................................................... 372
6.10.1 Configuring OSPFv3 Route Aggregation..............................................................................................................372
6.10.2 Configuring OSPFv3 to Filter the Received Routes............................................................................................. 374
6.10.3 Configuring OSPFv3 to Import External Routes.................................................................................................. 374
6.10.4 (Optional) Configuring OSPFv3 to Filter LSAs in an Area.................................................................................. 375
6.10.5 Verifying the OSPFv3 Routing Information Control Configuration..................................................................... 376
6.11 Configuring OSPFv3 Neighbor Relationship Flapping Suppression....................................................................... 377
6.12 Optimizing an OSPFv3 Network..............................................................................................................................379
6.12.1 Configuring the SPF Timer....................................................................................................................................379
6.12.2 Configuring a Route Calculation Delay to Suppress Frequent LSA Flapping......................................................380
6.12.3 Setting the Interval for Receiving LSAs................................................................................................................381
6.12.4 Configuring an Intelligent Timer for Generating LSAs........................................................................................ 381
6.12.5 Disabling OSPFv3 LSA Aging Management........................................................................................................382
6.12.6 Suppressing an Interface from Sending and Receiving OSPFv3 Packets............................................................. 383
6.12.7 Configuring DR Priority of an Interface................................................................................................................383
6.12.8 Configuring a Stub Router.....................................................................................................................................384
6.12.9 Ignoring MTU Check on DD Packets................................................................................................................... 385
6.12.10 Verifying the OSPFv3 Network Optimization Configuration............................................................................. 386
6.13 Configuring an OSPFv3 Dynamic Hostname.......................................................................................................... 386

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. xiv


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing Contents

6.14 Configuring OSPFv3 IP FRR................................................................................................................................... 387


6.15 Configuring BFD for OSPFv3..................................................................................................................................389
6.15.1 Configuring BFD Globally.................................................................................................................................... 390
6.15.2 Configuring BFD for OSPFv3...............................................................................................................................391
6.15.3 (Optional) Preventing an Interface from Dynamically Setting Up a BFD Session...............................................391
6.15.4 (Optional) Configuring BFD for a Specified Interface..........................................................................................392
6.15.5 Verifying the BFD for OSPFv3 Configuration......................................................................................................392
6.16 Configuring the OSPFv3 GR Helper........................................................................................................................393
6.17 Configuring OSPFv3 IPSec......................................................................................................................................394
6.17.1 Configuring Basic IPSec Functions.......................................................................................................................394
6.17.2 Configuring OSPFv3 IPSec Authentication.......................................................................................................... 396
6.17.3 Verifying the OSPFv3 IPSec Configuration.......................................................................................................... 398
6.18 Improving OSPFv3 Network Security..................................................................................................................... 398
6.19 Configuring the Network Management Function of OSPFv3..................................................................................400
6.19.1 Configuring OSPFv3 MIB Binding.......................................................................................................................400
6.19.2 Configuring OSPFv3 Trap.....................................................................................................................................401
6.19.3 Verifying the OSPFv3 Network Management Function Configuration................................................................ 401
6.20 Resetting OSPFv3.....................................................................................................................................................401
6.21 Configuration Examples for OSPFv3.......................................................................................................................402
6.21.1 Example for Configuring Basic OSPFv3 Functions..............................................................................................402
6.21.2 Example for Configuring OSPFv3 Route Summarization on an ABR................................................................. 406
6.21.3 Example for Configuring OSPFv3 Route Summarization on an ASBR............................................................... 418
6.21.4 Example for Configuring DR Election Through OSPFv3.....................................................................................426
6.21.5 Example for Configuring BFD for OSPFv3..........................................................................................................431

7 IPv4 IS-IS Configuration..........................................................................................................436


7.1 Overview of IS-IS.......................................................................................................................................................437
7.2 Understanding IS-IS................................................................................................................................................... 437
7.2.1 Basic Concepts of IS-IS...........................................................................................................................................437
7.2.2 IS-IS Fundamentals................................................................................................................................................. 443
7.2.3 IS-IS Authentication................................................................................................................................................ 449
7.2.4 IS-IS Route Leaking................................................................................................................................................ 450
7.2.5 IS-IS Overload......................................................................................................................................................... 451
7.2.6 IS-IS Network Convergence....................................................................................................................................452
7.2.7 IS-IS Administrative Tag.........................................................................................................................................454
7.2.8 IS-IS Wide Metric....................................................................................................................................................455
7.2.9 IS-IS LSP Fragment Extension................................................................................................................................456
7.2.10 IS-IS Host Name Mapping.................................................................................................................................... 459
7.2.11 IS-IS NSR.............................................................................................................................................................. 460
7.2.12 BFD for IS-IS........................................................................................................................................................ 461
7.2.13 IS-IS Auto FRR..................................................................................................................................................... 463
7.2.14 IS-IS Multi-Instance and Multi-Process................................................................................................................ 470
7.2.15 IS-IS Neighbor Relationship Flapping Suppression..............................................................................................470

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. xv


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing Contents

7.3 Summary of IS-IS Configuration Tasks..................................................................................................................... 477


7.4 Licensing Requirements and Limitations for IPv4 IS-IS........................................................................................... 481
7.5 Default Settings for IPv4 IS-IS...................................................................................................................................482
7.6 Configuring Basic IS-IS Functions.............................................................................................................................482
7.6.1 Creating IS-IS Processes......................................................................................................................................... 483
7.6.2 Configuring a NET.................................................................................................................................................. 483
7.6.3 Configuring the Device Level................................................................................................................................. 484
7.6.4 Establishing IS-IS Neighbor Relationships............................................................................................................. 485
7.6.5 Verifying the Basic IS-IS Function Configuration.................................................................................................. 488
7.7 Improving IS-IS Network Security.............................................................................................................................488
7.7.1 Configuring Interface Authentication......................................................................................................................489
7.7.2 Configuring Area or Domain Authentication.......................................................................................................... 490
7.7.3 Configuring the Optional Checksum....................................................................................................................... 492
7.7.4 Verifying the IS-IS Network Security Optimization Configuration........................................................................ 493
7.8 Controlling IS-IS Route Selection.............................................................................................................................. 493
7.8.1 Configuring a Preference Value for IS-IS................................................................................................................493
7.8.2 Configuring the Cost of an IS-IS Interface..............................................................................................................494
7.8.3 Configuring Principles for Using Equal-Cost IS-IS Routes.................................................................................... 497
7.8.4 Configuring IS-IS Route Leaking............................................................................................................................498
7.8.5 Verifying the IS-IS Route Selection Control Configuration....................................................................................499
7.9 Controlling IS-IS Route Exchange............................................................................................................................. 499
7.9.1 Configuring IS-IS to Advertise a Default Route..................................................................................................... 500
7.9.2 Configuring IS-IS to Import External Routes..........................................................................................................500
7.9.3 Configuring IS-IS to Advertise Specified External Routes to an IS-IS Routing Domain.......................................501
7.9.4 Adding Specified IS-IS Routes to the IP Routing Table......................................................................................... 502
7.9.5 Verifying the IS-IS Route Exchange Control Configuration...................................................................................502
7.10 Configuring IS-IS Route Summarization................................................................................................................. 503
7.11 Controlling IS-IS Route Convergence...................................................................................................................... 503
7.11.1 Configuring Attributes for Hello Packets.............................................................................................................. 504
7.11.2 Configuring Attributes for LSPs............................................................................................................................505
7.11.3 Configuring Attributes for CSNPs.........................................................................................................................512
7.11.4 Setting the SPF Calculation Interval......................................................................................................................513
7.11.5 Configuring Convergence Priorities for IS-IS Routes........................................................................................... 514
7.11.6 Verifying the IS-IS Route Convergence Control Configuration............................................................................515
7.12 Configuring IS-IS Neighbor Relationship Flapping Suppression............................................................................ 515
7.13 Configuring LSP Fragment Extension..................................................................................................................... 517
7.14 Configuring a Mesh Group on an NBMA Network................................................................................................. 518
7.15 Configuring IS-IS Reliability................................................................................................................................... 519
7.15.1 Enabling IS-IS Auto FRR......................................................................................................................................519
7.15.2 Configuring Static BFD for IS-IS..........................................................................................................................520
7.15.3 Configuring Dynamic BFD for IS-IS.................................................................................................................... 522
7.16 Configuring the Overload Bit for an IS-IS Device...................................................................................................524

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. xvi


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing Contents

7.17 Maintaining IS-IS..................................................................................................................................................... 525


7.17.1 Resetting IS-IS.......................................................................................................................................................525
7.17.2 Suppressing IS-IS.................................................................................................................................................. 526
7.17.3 Improving the Maintainability of IS-IS................................................................................................................. 527
7.18 Configuration Examples for IPv4 IS-IS................................................................................................................... 528
7.18.1 Example for Configuring Basic IS-IS Functions...................................................................................................528
7.18.2 Example for Configuring IS-IS DIS Election........................................................................................................533
7.18.3 Example for Configuring IS-IS to Interact with BGP........................................................................................... 539
7.18.4 Example for Configuring IS-IS Auto FRR............................................................................................................543
7.18.5 Example for Configuring Static BFD for IS-IS.....................................................................................................551
7.18.6 Example for Configuring Dynamic BFD for IS-IS............................................................................................... 555
7.19 Troubleshooting IS-IS...............................................................................................................................................561
7.19.1 Failed to Establish IS-IS Neighbor Relationships................................................................................................. 562
7.19.2 A Device Cannot Learn IS-IS Routes from Its Neighbor......................................................................................563

8 IPv6 IS-IS Configuration..........................................................................................................565


8.1 Overview of IS-IS.......................................................................................................................................................566
8.2 Understanding IPv6 IS-IS...........................................................................................................................................566
8.2.1 Comparison Between IS-IS IPv6 and IPv4 IS-IS.................................................................................................... 566
8.3 Summary of IPv6 IS-IS Configuration Tasks.............................................................................................................567
8.4 Licensing Requirements and Limitations for IPv6 IS-IS........................................................................................... 571
8.5 Default Settings for IPv6 IS-IS...................................................................................................................................572
8.6 Configuring Basic IPv6 IS-IS Functions.................................................................................................................... 573
8.6.1 Creating IS-IS Processes......................................................................................................................................... 573
8.6.2 Configuring a NET and Enabling IPv6 IS-IS.......................................................................................................... 574
8.6.3 Configuring the Device Level................................................................................................................................. 575
8.6.4 Establishing IS-IS Neighbor Relationships............................................................................................................. 575
8.6.5 Verifying the Basic IPv6 IS-IS Function Configuration..........................................................................................579
8.7 Improving IPv6 IS-IS Network Security.................................................................................................................... 579
8.7.1 Configuring Interface Authentication......................................................................................................................579
8.7.2 Configuring Area or Domain Authentication.......................................................................................................... 581
8.7.3 Verifying the IPv6 IS-IS Network Security Optimization Configuration............................................................... 583
8.8 Controlling IPv6 IS-IS Route Selection..................................................................................................................... 583
8.8.1 Configuring a Preference Value for IPv6 IS-IS....................................................................................................... 583
8.8.2 Configuring the Cost of an IS-IS Interface on IPv6 network.................................................................................. 584
8.8.3 Configuring Principles for Using Equal-Cost IPv6 IS-IS Routes........................................................................... 586
8.8.4 Configuring IPv6 IS-IS Route Leaking................................................................................................................... 587
8.8.5 Verifying the IPv6 IS-IS Route Selection Control Configuration........................................................................... 588
8.9 Controlling IPv6 IS-IS Route Exchange.................................................................................................................... 589
8.9.1 Configuring IS-IS to Advertise a Default Route..................................................................................................... 589
8.9.2 Configuring IS-IS to Import External Routes..........................................................................................................590
8.9.3 Configuring IS-IS to Advertise Specified External Routes to an IS-IS Routing Domain.......................................591
8.9.4 Adding Specified IS-IS Routes to the IPv6 Routing Table..................................................................................... 591

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. xvii


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing Contents

8.9.5 Verifying the IPv6 IS-IS Route Exchange Control Configuration.......................................................................... 592
8.10 Configuring IPv6 IS-IS Route Summarization.........................................................................................................592
8.11 Controlling IPv6 IS-IS Route Convergence............................................................................................................. 593
8.11.1 Configuring Attributes for Hello Packets.............................................................................................................. 593
8.11.2 Configuring Attributes for LSPs............................................................................................................................595
8.11.3 Configuring Attributes for CSNPs.........................................................................................................................600
8.11.4 Setting the SPF Calculation Interval......................................................................................................................601
8.11.5 Configuring Convergence Priorities for IS-IS Routes........................................................................................... 602
8.11.6 Verifying the IPv6 IS-IS Route Convergence Control Configuration................................................................... 603
8.12 Configuring LSP Fragment Extension..................................................................................................................... 603
8.13 Configuring a Mesh Group on an NBMA Network................................................................................................. 604
8.14 Configuring the Overload Bit for an IS-IS Device...................................................................................................605
8.15 Configuring Dynamic IPv6 BFD for IS-IS...............................................................................................................606
8.15.1 Configuring BFD Globally.................................................................................................................................... 607
8.15.2 Configuring IPv6 BFD for IS-IS Processes...........................................................................................................607
8.15.3 (Optional) Preventing an Interface from Dynamically Establishing an IPv6 BFD Session..................................608
8.15.4 (Optional) Configuring IPv6 BFD for a Specified Interface................................................................................. 609
8.15.5 Verifying the IPv6 BFD for IS-IS Configuration.................................................................................................. 609
8.16 Configuring IPv6 IS-IS Auto FRR........................................................................................................................... 610
8.17 Maintaining IS-IS..................................................................................................................................................... 611
8.17.1 Resetting IS-IS.......................................................................................................................................................611
8.17.2 Improving the Maintainability of IS-IS................................................................................................................. 612
8.18 Configuration Examples for IPv6 IS-IS................................................................................................................... 613
8.18.1 Example for Configuring Dynamic IPv6 BFD for IS-IS.......................................................................................613
8.18.2 Example for Configuring Basic IPv6 IS-IS Functions.......................................................................................... 619

9 BGP Configuration....................................................................................................................625
9.1 Overview of BGP....................................................................................................................................................... 626
9.2 Understanding BGP.................................................................................................................................................... 626
9.2.1 Basic Concepts of BGP........................................................................................................................................... 627
9.2.2 BGP Fundamentals.................................................................................................................................................. 628
9.2.3 Interaction Between BGP and an IGP..................................................................................................................... 631
9.2.4 BGP Security........................................................................................................................................................... 631
9.2.5 BGP Route Selection Rules and Load Balancing....................................................................................................632
9.2.6 Route Reflector........................................................................................................................................................636
9.2.7 BGP Confederation..................................................................................................................................................640
9.2.8 Route Summarization.............................................................................................................................................. 641
9.2.9 Route Dampening.................................................................................................................................................... 641
9.2.10 BMP.......................................................................................................................................................................643
9.2.11 BFD for BGP......................................................................................................................................................... 644
9.2.12 BGP Auto FRR...................................................................................................................................................... 645
9.2.13 BGP GR and NSR................................................................................................................................................. 646
9.2.14 BGP ORF...............................................................................................................................................................648

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. xviii


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing Contents

9.2.15 Dynamic Update Peer-Groups............................................................................................................................... 649


9.2.16 MP-BGP................................................................................................................................................................ 651
9.3 Summary of BGP Configuration Tasks...................................................................................................................... 652
9.4 Licensing Requirements and Limitations for BGP.....................................................................................................657
9.5 Default Settings for BGP............................................................................................................................................ 658
9.6 Configuring Basic BGP Functions............................................................................................................................. 659
9.6.1 (Optional) Configuring the Format of BGP 4-Byte AS Numbers...........................................................................659
9.6.2 Starting a BGP Process............................................................................................................................................660
9.6.3 Configuring BGP Peers........................................................................................................................................... 662
9.6.4 (Optional) Configuring a BGP Peer Group............................................................................................................. 664
9.6.5 Configuring BGP to Import Routes.........................................................................................................................665
9.6.6 Verifying the Basic BGP Function Configuration................................................................................................... 667
9.7 Configuring BGP Security..........................................................................................................................................667
9.7.1 Configuring MD5 Authentication........................................................................................................................... 668
9.7.2 Configuring Keychain Authentication.....................................................................................................................669
9.7.3 Configuring BGP GTSM.........................................................................................................................................669
9.7.4 Verifying the BGP Security Configuration..............................................................................................................670
9.8 Simplifying IBGP Network Connections................................................................................................................... 670
9.8.1 Configuring a BGP Route Reflector........................................................................................................................671
9.8.2 Configuring a BGP Confederation.......................................................................................................................... 672
9.9 Configuring BGP Route Selection and Load Balancing............................................................................................ 673
9.9.1 Configuring the BGP Priority..................................................................................................................................674
9.9.2 Configuring the Next_Hop Attribute.......................................................................................................................675
9.9.3 Configuring the PrefVal Attribute........................................................................................................................... 677
9.9.4 Configuring the Default Local_Pref Attribute.........................................................................................................678
9.9.5 Configuring the AS_Path Attribute......................................................................................................................... 679
9.9.6 Configuring the MED Attribute.............................................................................................................................. 681
9.9.7 Configuring the BGP Community Attribute........................................................................................................... 683
9.9.8 Configuring BGP Load Balancing.......................................................................................................................... 685
9.9.9 Configuring BGP ADD-PATH................................................................................................................................ 686
9.9.10 Verifying the BGP Route Selection and Load Balancing Configuration.............................................................. 688
9.10 Controlling the Receiving and Advertisement of BGP Routes................................................................................ 688
9.10.1 Configuring a Routing Policy................................................................................................................................692
9.10.2 Controlling the Advertisement of BGP Routes..................................................................................................... 692
9.10.3 Controlling the Receiving of BGP Routes............................................................................................................ 694
9.10.4 Configuring BGP Soft Reset................................................................................................................................. 696
9.10.5 Verifying the BGP Route Receiving and Advertisement Control Configuration..................................................698
9.11 Adjusting the BGP Network Convergence Speed.................................................................................................... 699
9.11.1 Configuring a BGP ConnectRetry Timer.............................................................................................................. 699
9.11.2 Configuring BGP Keepalive and Hold Timers......................................................................................................700
9.11.3 Configuring an Update Message Timer.................................................................................................................701
9.11.4 Disabling Rapid EBGP Connection Reset.............................................................................................................702

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. xix


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing Contents

9.11.5 Configuring BGP Route Dampening.....................................................................................................................703


9.11.6 Configuring BGP Iteration Suppression in Case of Next Hop Flapping...............................................................704
9.11.7 Enabling Slow Peer Detection............................................................................................................................... 706
9.11.8 Verifying the BGP Network Convergence Speed Adjustment Configuration.......................................................707
9.12 Configuring BGP Reliability.................................................................................................................................... 707
9.12.1 Configuring BFD for BGP.................................................................................................................................... 708
9.12.2 Configuring BGP Auto FRR................................................................................................................................. 709
9.12.3 Configuring the BGP GR Function....................................................................................................................... 710
9.13 Configuring BGP Route Summarization.................................................................................................................. 711
9.14 Configuring BGP to Advertise Default Routes to Peers.......................................................................................... 714
9.15 Configuring MP-BGP...............................................................................................................................................715
9.16 Configuring BMP..................................................................................................................................................... 716
9.17 Maintaining BGP...................................................................................................................................................... 717
9.17.1 Resetting BGP Connections.................................................................................................................................. 718
9.17.2 Clearing BGP Statistics......................................................................................................................................... 718
9.18 Configuration Examples for BGP.............................................................................................................................719
9.18.1 Example for Configuring Basic BGP Functions................................................................................................... 719
9.18.2 Example for Configuring Basic BGP4+ Functions............................................................................................... 725
9.18.3 Example for Configuring Basic MBGP Functions................................................................................................730
9.18.4 Example for Configuring BGP Load Balancing and the MED Attribute..............................................................739
9.18.5 Example for Configuring a BGP Route Reflector.................................................................................................745
9.18.6 Example for Configuring a BGP4+ Route Reflection...........................................................................................752
9.18.7 Example for Configuring a BGP Confederation................................................................................................... 757
9.18.8 Example for Configuring the BGP Community Attribute.....................................................................................764
9.18.9 Example for Configuring Prefix-based BGP ORF................................................................................................ 768
9.18.10 Example for Configuring BGP Route Dampening..............................................................................................772
9.18.11 Example for Configuring BFD for BGP..............................................................................................................777
9.18.12 Example for Configuring BFD for BGP4+......................................................................................................... 782
9.18.13 Example for Configuring BGP Auto FRR.......................................................................................................... 787

10 Routing Policy Configuration............................................................................................... 793


10.1 Overview of Routing Policies...................................................................................................................................793
10.2 Understanding Routing Policies............................................................................................................................... 794
10.3 Application Scenarios for Routing Policies..............................................................................................................797
10.4 Summary of Routing Policy Configuration Tasks....................................................................................................798
10.5 Licensing Requirements and Limitations for Routing Policies................................................................................799
10.6 Configuring Filters................................................................................................................................................... 801
10.6.1 Configuring IP Prefix Lists....................................................................................................................................801
10.6.2 Configuring an AS_Path Filter.............................................................................................................................. 802
10.6.3 Configuring a Community Filter........................................................................................................................... 802
10.6.4 Configuring an Extended Community Filter......................................................................................................... 803
10.6.5 Configuring an RD Filter.......................................................................................................................................804
10.7 Configuring a Routing Policy...................................................................................................................................805

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. xx


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing Contents

10.7.1 Creating a Routing Policy......................................................................................................................................805


10.7.2 (Optional) Configuring if-match Clauses.............................................................................................................. 806
10.7.3 (Optional) Configuring apply Clauses...................................................................................................................807
10.7.4 Verifying the Routing Policy Configuration..........................................................................................................809
10.8 Maintaining Routing Policies................................................................................................................................... 809
10.9 Configuration Examples for Routing Policies..........................................................................................................809
10.9.1 Example for Filtering the Routes to Be Received or Advertised.......................................................................... 810
10.9.2 Example for Applying a Routing Policy for Importing Routes.............................................................................815

11 PBR Configuration.................................................................................................................. 820


11.1 Overview of PBR......................................................................................................................................................820
11.2 Configuring NQA for PBR....................................................................................................................................... 822
11.3 Configuring PBR...................................................................................................................................................... 823
11.4 Configuring ACL-based Simplified PBR................................................................................................................. 830
11.5 Configuring ACL6-based Simplified PBR............................................................................................................... 833
11.6 Configuration Examples for PBR............................................................................................................................. 835
11.6.1 Example for Configuring PBR.............................................................................................................................. 835
11.6.2 Example for Configuring NQA for PBR............................................................................................................... 840
11.6.3 Example for Configuring ACL-based Simplified PBR......................................................................................... 852

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. xxi


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

1 IP Unicast Routing

About This Chapter

This chapter describes IP unicast routing and how it is a basic element of data communication
networks.

NOTE

The CE6810LI does not support IPv4 or IPv6 Layer 3 forwarding. After the IPv4 or IPv6 function is
enabled on an interface of the CE6810LI, the configured IPv4 or IPv6 address can only be used to
manage the switch.

1.1 Overview of IP Unicast Routing


1.2 Understanding IP Unicast Routing
1.3 Displaying and Maintaining a Routing Table
1.4 Maintaining the Routing Management Module

1.5 Configuring IPv4 FRR


1.6 Configuring IPv6 FRR
1.7 Configuring the ECMP Load Balancing Mode
1.8 Configuring an ECMP Load Balancing Mode for PPPoE Packets
1.9 Enable ECMP Load Balancing Consistency
1.10 Configuring the Advertisement of IPv4 ARP Vlink Direct Routes
1.11 Configuring a Priority for Direct Subnet Routes on an Interface
1.12 Configuration Examples for IP Unicast Routing

1.1 Overview of IP Unicast Routing


According to the destination address, routes are classified into one of the following types:

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 1


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

l Network segment route


The destination is a network segment. In this case, if the destination is an IPv4 address,
the subnet mask is less than 32 bits, and if the destination is an IPv6 address, the prefix
length is less than 128 bits.
l Host route
The destination is a host. In this case, if the destination is an IPv4 address, the subnet
mask is 32 bits, and if the destination is an IPv6 address, the prefix length is 128 bits.

According to whether the destination directly connects to a router, routes are classified into
one of the following types:
l Direct route
The router directly connects to the network where the destination is located.
l Indirect route
The router indirectly connects to the network where the destination is located.

According to the destination address type, routes are classified into one of the following
types:
l Unicast route
The destination address is a unicast address.
l Multicast route
The destination address is a multicast address.

1.2 Understanding IP Unicast Routing

1.2.1 Route Iteration


Routes can be used to forward traffic only when they have directly connected next hops.
However, this condition may not be met when routes are generated. The system then needs to
search for directly connected next hops and corresponding outbound interfaces. This process
is called route iteration. In most cases, BGP routes, static routes, and user network routes
(UNRs) do not have directly connected next hops, and route iteration is required. The
following examples demonstrate how route iteration generates an FIB entry.

A next-hop IP address of a BGP route is often the IP address of an indirectly connected peer's
loopback interface, and therefore the BGP route needs to be iterated. The system searches the
IP routing table for a direct route (an IGP route in most cases) that is destined for the next-hop
IP address of the BGP route and then adds the next-hop IP address and outbound interface of
the IGP route to the IP routing table. This generates a FIB entry.

A next-hop IP address of a BGP VPN route is often the IP address of an indirectly connected
PE's loopback interface, and the BGP route needs to be iterated to a tunnel. The system
searches the tunnel list for a tunnel that is destined for this loopback IP address and then adds
the tunnel information to the routing table. This generates a FIB entry.

1.2.2 Routers and Routing


On the Internet, network connecting devices such as hubs, bridges, switches, and routers
control traffic and ensure data transmission quality. Each of these devices serves a different

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 2


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

role, but for a common purpose: forming a functioning network. The following describes a
router's role in a network, and the purpose and nature of routes.

A router selects routes and forwards packets. Upon receiving a packet, a router selects a
proper path, which may have one or multiple hops, to send the packet to the next router
according to the destination address in the packet. The last router is responsible for sending
the packet to the destination host.

A route is a path along which packets are sent from the source to the destination. When
multiple routes are available to send packets from a router to the destination, the router can
select the optimal route from an IP routing table. Optimal route selection depends on routing
protocol preferences and metrics of routes. When multiple routes have the same routing
protocol preference and metric, load balancing can be implemented among these routes to
relieve network pressure. When multiple routes have different routing protocol preferences
and metrics, route backup can be implemented among these routes to improve network
reliability.

1.2.3 Static Routes and Dynamic Routes

Differences Between Static Routes and Dynamic Routes


Routing protocols are the rules used by routers to discover routes, generate routing tables, and
guide packet forwarding. Routes are classified into the following types according to their
origin:
l Direct routes: are discovered by link layer protocols.
l Static routes: are manually configured by network administrators.
l Dynamic routes: are discovered by dynamic routing protocols.

Static routes are easy to configure, have low system requirements, and apply to simple, stable,
and small networks. The disadvantage of static routes is that they require subsequent
maintenance as they cannot automatically adapt to network topology changes.

Dynamic routing protocols have routing algorithms. Therefore dynamic routes can
automatically adapt to network topology changes and apply to networks on which Layer 3
devices are deployed. The disadvantages of dynamic routes are that they are complex to
configure, have higher system requirements than static ones, and consume network and
system resources.

Classification of Dynamic Routing Protocols


Dynamic routing protocols are classified into types based on the following two criteria.

According to the application range, dynamic routing protocols are classified into the
following types:

l Interior Gateway Protocols (IGPs)


Run inside an autonomous system (AS), including RIP, OSPF, and IS-IS.
l Exterior Gateway Protocols (EGPs)
Run between ASs, including BGP.

According to the type of algorithm they use, dynamic routing protocols are classified into the
following types:

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 3


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

l Distance-vector routing protocols


Include RIP and BGP. BGP is also called a path-vector protocol.
l Link-state routing protocols
Include OSPF and IS-IS.
The preceding algorithms differ mainly in route discovery and calculation methods.

1.2.4 Routing Table and FIB Table


Routers forward packets based on routing tables and forwarding information base (FIB)
tables. Each router maintains at least one routing table and one FIB table. Routers select
routes based on routing tables and forward packets based on FIB tables.

Routing Table
Each router maintains a local core routing table (namely, an IP routing table), and each
routing protocol maintains its own routing table.
l Local core routing table
A router uses the local core routing table to store preferred routes. The router then sends
the preferred routes to the FIB table to guide packet forwarding. The router selects routes
according to the priorities of protocols and costs stored in the routing table.
NOTE

A router that supports Layer 3 Virtual Private Network (L3VPN) maintains a local core routing
table for each VPN instance.
l Protocol routing table
A protocol routing table stores routing information discovered by the protocol.
A routing protocol can import and advertise routes that are discovered by other routing
protocols. For example, if a router running the Open Shortest Path First (OSPF) protocol
needs to use OSPF to advertise direct routes, static routes, or Intermediate System-
Intermediate System (IS-IS) routes, the router must import the routes into the OSPF
routing table.

Routing Table Contents


You can run the display ip routing-table command on a router to view basic information
about the routing table of the router. The command output is as follows:
<HUAWEI> display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole
route
------------------------------------------------------------------------------
Routing Table: _public_
Destinations : 14 Routes : 14

Destination/Mask Proto Pre Cost Flags NextHop Interface

[Link]/0 Static 60 0 RD [Link] Vlanif20


[Link]/24 Direct 0 0 D [Link] Vlanif20
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/24 Direct 0 0 D [Link] LoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/23 Direct 0 0 D [Link] Vlanif20

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 4


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

[Link]/32 Direct 0 0 D [Link] InLoopBack0


[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/8 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0

A routing table contains the following key data for each IP packet:
l Destination: identifies the destination IP address or destination network address of an IP
packet.
l Mask: supplements the destination address to specially identify the address of the
network segment where the destination host or router resides.
The network segment address of a destination host or router is obtained through the
"AND" operation on the destination address and network mask. For example, if the
destination address is [Link] and the mask is [Link], the address of the network
segment where the host or router resides is [Link].
The network mask is composed of several consecutive 1s. These 1s can be expressed in
either the dotted decimal notation or the number of consecutive 1s in the mask. For
example, the network mask can be expressed either as [Link] or 24.
l Proto: indicates the protocol through which routes are learned.
l Pre: indicates the routing protocol preference of a route. There may multiple routes to the
same destination, which have different next hops and outbound interfaces. These routes
may be discovered by different routing protocols or manually configured. A router
selects the route with the highest preference (the smallest value) as the optimal route. For
the routing protocol preference, see 1.2.5 Routing Protocol Preference.
l Cost: indicates the route cost. When multiple routes to the same destination have the
same preference, the route with the lowest cost is selected as the optimal route.
NOTE

The Preference value is used to compare the preferences of different routing protocols, while the
Cost value is used to compare the preferences of different routes of the same routing protocol.
l NextHop: indicates the IP address of the next device that an IP packet passes through.
l Interface: indicates the outbound interface through which an IP packet is forwarded.
In Figure 1-1, the routing table of RouterA shows that it connects to three networks, so it has
three IP addresses and three outbound interfaces.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 5


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

Figure 1-1 Routing table

Routing Table [Link]/16


Destination Nexthop Interface
[Link]/16 [Link] GE1/0/0 RouterB
[Link]/16 [Link] GE2/0/0
[Link]/24
[Link]/16 [Link] GE3/0/0
GE1/0/0
[Link]/24
GE2/0/0 GE3/0/0
[Link]/24 [Link]/24
RouterA
RouterC
[Link]/24 RouterD
[Link]/24

[Link]/16
[Link]/16

Automatic Restoration After the Number of Routes Exceeds the Upper Limit
A local core routing table stores routes of different routing protocols. If the number of routes
in the local core routing table reaches the upper limit, no more route can be added to the table.
The local core routing table has the following route limitations:
l System route limit: specifies the maximum number of routes supported by the system.
l System route prefix limit: specifies the range of prefixes for all the routes supported by
the system.
l Multicast IGP route limit: specifies the maximum number of multicast IGP routes.
l Multi-topology route limit: specifies the maximum number of multi-topology routes.
l Private network route limit: specifies the maximum number of private network routes
supported by the system.
l VPN route limit: specifies the maximum number of VPN routes supported by the
system.
l VPN route prefix limit: specifies the range of prefixes for all the VPN routes supported
by the system.

If a protocol fails to add routes to the local core routing table due to a specific route limitation,
the system records the failure with the protocol name and routing table ID.

After routes of protocols are deleted from the local core routing table, and the number of
routes falls below the upper limit, the system prompts all the protocols that failed to add
routes to the local core routing table to re-add the routes to the local core routing table. This
process restores most of the routes in the local core routing table. The size of released table
space determines whether all routes in the local core routing table can be restored.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 6


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

Matching with FIB Table


After selecting an optimal route from the routing table, a router sends it to the FIB table.
When receives a packet, the router compares it against the FIB table to find the optimal route
to forward the packet.

Each entry in the FIB table contains the physical or logical interface through which a packet is
sent to a network segment or host to reach the next router. An entry can also indicate whether
the packet can be sent to a destination host in a directly connected network.

The router performs the "AND" operation on the destination address in the packet and the
network mask of each entry in the FIB table. The router then compares the result of the
"AND" operation with the entries in the FIB table to find a match and chooses the optimal
route to forward packets according to the longest match rule.

For example, assume that a router has the following routing table:
Routing Tables:
Destination/Mask Proto Pre Cost Flags NextHop Interface
[Link]/0 Static 60 0 D [Link] GigabitEthernet1/0/0
[Link]/16 Static 60 3 D [Link] GigabitEthernet1/0/0
[Link]/16 Static 60 50 D [Link] GigabitEthernet3/0/0
[Link]/24 Static 60 4 D [Link] GigabitEthernet2/0/0
[Link]/16 Direct 0 0 D [Link] GigabitEthernet4/0/0

After receiving a packet carrying the destination address [Link], the router searches the
following FIB table:
FIB Table:
Total number of Routes : 5
Destination/Mask Nexthop Flag TimeStamp Interface
TunnelID
[Link]/0 [Link] SU t[37] GigabitEthernet1/0/0
0x0
[Link]/16 [Link] DU t[37] GigabitEthernet1/0/0
0x0
[Link]/16 [Link] DU t[9992] GigabitEthernet3/0/0
0x0
[Link]/24 [Link] DU t[9992] GigabitEthernet2/0/0
0x0
[Link]/16 [Link] U t[9992] GigabitEthernet4/0/0
0x0

The router performs the "AND" operation on the destination address [Link] and the masks
0, 16, and 24 to obtain the network segment addresses: [Link]/0, [Link]/16, and [Link]/24.
The three addresses match three entries in the FIB table. The router chooses the entry
[Link]/24 according to the longest match rule, and forwards the packet through
GigabitEthernet2/0/0.

1.2.5 Routing Protocol Preference


Routing protocols (including static routing) may discover different routes to the same
destination, but not all routes are optimal. Only one routing protocol at a time determines the
optimal route to a destination. To select the optimal route, each routing protocol (including
static routing) is assigned a preference (a smaller value indicates a higher preference). When
multiple routing information sources coexist, the route discovered by the routing protocol
with the highest preference is selected as the optimal route and added to the local routing
table.

Routers define external preference and internal preference. In Table 1-1, the value 0 indicates
direct routes and the value 255 indicates routes learned from unreliable sources. A smaller

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 7


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

value indicates a higher preference. External preference is manually configured for each
routing protocol. Table 1-1 lists the default external preferences of routing protocols.

Table 1-1 Routing protocols and their default external preferences

Routing Protocol or Default External Preference


Route Type

Direct 0

OSPF 10

IS-IS 15

Static 60

RIP 100

OSPF ASE 150

OSPF NSSA 150

IBGP 255

EBGP 255

NOTE

Except the CE6810LI, other CE series switches allow users to manually configure the preference of
direct routes. In addition, the preference of each static route varies.

Internal preferences of routing protocols cannot be manually configured. Table 1-2 lists the
internal preferences of routing protocols.

Table 1-2 Internal preferences of routing protocols

Routing Protocol or Route Internal Preference


Type

Direct 0

OSPF 10

IS-IS Level-1 15

IS-IS Level-2 18

Static 60

RIP 100

OSPF ASE 150

OSPF NSSA 150

IBGP 200

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 8


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

Routing Protocol or Route Internal Preference


Type

EBGP 20

During route selection, a router first compares the external preferences of routes. When the
same external preference is set for different routing protocols, the router selects the optimal
route based on the internal preference. For example, assume that there are two routes to
[Link]/24: a static route and an OSPF route. Both routes have the same external preference:
5. In this case, the router determines the optimal route based on the internal preference listed
in Table 1-2. An OSPF route has an internal preference of 10, and a static route has an
internal preference of 60. This indicates that the OSPF route has a higher preference than the
static route, so the router selects the OSPF route as the optimal route.

1.2.6 Route Metric


A route metric specifies the cost of a route to a specified destination address. The following
factors often affect the route metric:
l Path length
Path length is the most common factor that affects the route metric. Link-state routing
protocols allow you to assign a link cost for each link to identify the path length of a
link. In this case, the path length is the sum of the link costs of all the links that packets
pass through. Distance-vector routing protocols use the hop count to identify the path
length. The hop count is the number of devices that packets pass through from the source
to the destination. For example, the hop count from a router to its directly connected
network is 0, and the hop count from a router to a network that can be reached through
just one other router is 1. Other lengths can be deduced in the same manner.
l Network bandwidth
Network bandwidth is the transmission capability of a link. For example, a 10-Gigabit
link has a higher transmission capability than a 1-Gigabit link. Although bandwidth
defines the maximum transmission rate of a link, routes over high-bandwidth links are
not necessarily better than routes over low-bandwidth links. For example, when a high-
bandwidth link is congested, forwarding packets over this link will require more time.
l Load
The load is the degree to which a network resource is busy. You can calculate the load by
calculating the CPU usage and packets processed per second. Continually monitoring the
CPU usage and packets processed per second helps you learn more about network usage.
l Communication cost
The communication cost is the operating cost of a route over a link. The communication
cost is another important indicator, especially if you do not care about network
performance but are concerned about the operating expenditure.

1.2.7 Load Balancing and Route Backup


When multiple routes have the same routing protocol preference and metric, these routes are
called equal-cost routes, among which load balancing can be implemented. When multiple
routes have different routing protocol preferences and metrics, route backup can be
implemented among these routes.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 9


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

Load Balancing
Routers support the multi-route mode, which allows you to configure multiple routes with the
same destination and preference. If the destinations and costs of multiple routes discovered by
the same routing protocol are the same, load balancing can be performed among the routes.

During load balancing, a router forwards packets based on the packets' 5-tuple (source IP
address, destination IP address, source port, destination port, and transport protocol). When
the 5-tuple information is the same, the router always chooses the next-hop address that is the
same as the last one to send packets. When the 5-tuple information is different, the router
forwards packets over idle paths.

Figure 1-2 Networking diagram of load balancing

RouterB
GE1/0/0

[Link]/24
P1~P6 [Link]/24
RouterA [Link]/24
[Link]/24
P1~P6 RouterD
GE2/0/0

RouterC

In the example shown in Figure 1-2, RouterA forwards the first packet P1 to [Link]/24
through GE1/0/0 and needs to forward subsequent packets to [Link]/24 and [Link]/24
respectively. The forwarding process is as follows:

l If RouterA finds that 5-tuple information of P2 destined for [Link]/24 is the same as
that of P1 destined for [Link]/24, it forwards P2 and subsequent packets destined for
[Link]/24 through GE1/0/0.
l If RouterA finds that 5-tuple information of P1 destined for [Link]/24 is different from
that of P1 destined for [Link]/24, it forwards P1 and subsequent packets destined for
[Link]/24 through GE2/0/0.
NOTE
When ECMP resources are insufficient on CE6880EI switches, only a single next hop in the new ECMP
load balancing forwarding group is used for packet forwarding. To check the specific forwarding path,
run the display ip fib command.

Route Backup
Route backup can improve network reliability. You can configure multiple routes to the same
destination as required. The route with the highest preference functions as the primary route,
and other routes with lower preferences function as backup routes.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 10


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

A router generally uses the primary route to forward data. When the primary link fails, the
primary route becomes inactive. The router selects a backup route with the highest preference
to forward data. In this manner, data is switched from the primary route to a backup route.
When the primary link recovers, the router selects the primary route to forward data again
because the primary route has the highest preference. Data is then switched back from the
backup route to the primary route.

1.2.8 ECMP Load Balancing Consistency


Equal-Cost Multi-Path routing (ECMP) implements load balancing and link backup. ECMP
applies to networks where the same destination address can be reachable through multiple
different links. Without the use of ECMP, packets destined for this destination address can be
forwarded though only one link, while other links are in backup state or invalid, and link
switching in the case of dynamic routes requires a specified period of time. ECMP ensures
that the packets are forwarded through multiple links, increasing transmission bandwidth and
providing data transmission without delay or packet loss.
In an ECMP scenario shown in Figure 1-3, when a link fails, all traffic will be load balancing
again using the hash algorithm to prevent traffic interruption. All the traffic will then be load
balanced among normal links. As a result, traffic forwarding paths may change. Requests of
the same user may be sent to different servers, greatly affecting the services in which sessions
need to be maintained.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 11


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

Figure 1-3 Traffic forwarding based on conventional ECMP hash calculation


Traffic fowarding path
before a link fault occurs

9
1 2

10 5
6

11 7
8

12 3 4

Traffic fowarding path after a


link fault occurs on SwitchD

7
10
1 2

8 4
11
5

12 6
9

ECMP load balancing consistency function provides a method to solve the preceding
problem. In Figure 1-4, this function enables hash calculation to be performed only for traffic
on the faulty link, without affecting traffic on other normal links. This function maintains
service sessions on normal links.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 12


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

Figure 1-4 Traffic forwarding based on hash calculation of ECMP load balancing consistency
Traffic fowarding path
before a link fault occurs

9
1 2

10 5
6

11 7
8

12 3 4

Traffic fowarding path after a


link fault occurs on SwitchD

9 5

1 2
10 8 4
6
7
12 11

1.2.9 IP FRR
Definition
When a router detects a fault at the physical or data link layer, IP fast reroute (FRR) enables
the router to report the fault to the upper-layer routing system, and to immediately use a
backup link to forward packets. IP FRR is a method that implements fast route backup.

Purpose
On traditional IP networks, when a fault occurs at the lower layer of the forwarding link, the
physical interface on the router becomes Down. After the router detects the fault, it informs
the upper-layer routing system to recalculate routes and then update routing information.
Usually, it takes the routing system several seconds to re-select an available route.
Second-level convergence is intolerable to services that are sensitive to delay and packet loss
because it may lead to service interruption. For example, Voice over Internet Protocol (VoIP)
services are only tolerant of millisecond-level interruption.
IP FRR resolves this by ensuring that the forwarding system rapidly detects a link fault and
then uses a backup route to restore services as soon as possible.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 13


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

IP FRR Classification and Implementation


IP FRR, which is designed for routes on IP networks, is classified into IP FRR on public
networks and IP FRR on private networks.

l IP FRR on public networks protects routers on public networks.


l IP FRR on private networks protects Customer Edges (CEs).

IP FRR is implemented as follows:

1. If the primary link is available, you can configure an IP FRR policy to provide the
forwarding information of the backup route to the forwarding engine.
2. If the forwarding engine detects a link fault, the engine uses the backup link to forward
traffic before the routes on the control plane converge.

IP FRR Typical Applications


In the example shown in Figure 1-5, IP FRR is configured to improve network reliability.
CE1 is dual-homed to PE1 and PE2 and has two outbound interfaces and two next hops
configured. That is, link B functions as the backup of link A. When link A fails, traffic can be
rapidly switched to link B.

Figure 1-5 IP FRR

IP forwarding
Link A
PE1

CE1 Link B
IP forwarding

PE2

1.2.10 Route Convergence

Definition
Route convergence is the action of recalculating routes to replace existing routes in the case of
network topology changes. The integration of multiple network services urgently requires
differentiated services. Routes for key services, such as Voice over IP (VoIP), video
conferences, and multicast services, need to be converged rapidly, while routes for common
services can be converged relatively slowly. In this case, the system needs to converge routes
based on their convergence priorities to improve network reliability.

Priority-based convergence is a mechanism that allows the system to converge routes based
on the convergence priority. You can set different convergence priorities for routes: critical,
high, medium, and low (in descending order of priority). The system then converges routes
according to the assigned scheduling weight to guide service forwarding.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 14


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

Principles
Routing protocols first compute and deliver routes of high convergence priority to the system.
You can reconfigure the scheduling weight values as required. Table 1-3 lists the default
convergence priorities of public routes.

Table 1-3 Default convergence priorities of public routes


Routing Protocol or Route Type Convergence Priority

Direct high

Static medium

32-bit host routes of OSPF and IS-IS medium

OSPF routes (excluding 32-bit host routes) low

IS-IS routes (excluding 32-bit host routes) low

RIP low

BGP low

NOTE

For private routes, only the convergence priorities of 32-bit OSPF and IS-IS host routes are identified as
medium, and the convergence priorities of the other routes are identified as low.

Priority-based Route Convergence


Figure 1-6 shows a networking arrangement for multicast services. OSPF and IS-IS run on
the network. The receiver connects to RouterA, and the multicast source server
[Link]/32 connects to RouterB. The route to the multicast source server must be
converged faster than other routes such as [Link]/24. You can set the convergence priority
of route [Link]/32 to be higher than that of route [Link]/24. When routes are
converged on the network, the route to the multicast source server [Link]/32 is
converged first. This ensures the transmission of multicast services.

Figure 1-6 Networking diagram of priority-based route convergence

IS-IS
[Link]/24
OSPF

OSPF

[Link]/32

User RouterA RouterB Source

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 15


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

1.2.11 Default Routes


Default routes are special routes used only when packets to be forwarded do not match any
routing entry in a routing table. If the destination address of a packet does not match any entry
in the routing table, the packet is sent through a default route. If no default route exists and the
destination address of the packet does not match any entry in the routing table, the packet is
discarded. An Internet Control Message Protocol (ICMP) packet is then sent, informing the
originating host that the destination host or network is unreachable.

In a routing table, a default route is the route to network [Link] (with the mask [Link]). You
can run the display ip routing-table command to check whether a default route is configured.
Generally, administrators can manually configure default static routes. Default routes can also
be generated through dynamic routing protocols such as OSPF and IS-IS.

1.2.12 Route Importing


Different routing protocols using different algorithms may discover different routes. If
multiple routing protocols run on a large network, the routing protocols need to re-advertise
the routes they discover.

Each routing protocol can import routes discovered by other routing protocols, direct routes,
and static routes.

1.2.13 Autonomous System


An Autonomous System (AS) is a set of IP networks and routers under one administration
entity and with common routing policies.

Each AS supports multiple IGPs. All the networks in an AS are assigned the same AS number
and managed by the same administration group. Two types of AS numbers are available: a 2-
byte AS number (with a number range from 1 to 65535) and a 4-byte AS number (with a
number range from 1 to 4294967295). Available AS numbers can become exhausted thereby
2-byte AS numbers need to be extended to 4-byte AS numbers. A 4-byte AS number is shown
in the X.Y format, where X ranges from 1 to 65535 and Y ranges from 0 to 65535.

Based on the network where they are used, AS numbers are classified into two types. Table
1-4 lists the two types of AS numbers and their ranges.

Table 1-4 AS number types and ranges

AS Number Type 2-Byte AS Number 4-Byte AS Number

Public AS number 1 to 64511 1 to 64511, 65536 to


4294967295

Private AS number 64512 to 65535 64512 to 65535

1.3 Displaying and Maintaining a Routing Table

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 16


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

Context
You can view routing table information to learn about the network topology and locate routing
faults. The following describes the commands used to display and maintain routing table
information.

The display commands can be used in all views. The reset commands are used in the user
view.

Procedure
l Run the display ip routing-table command to check brief information about the active
routes in the IPv4 routing table.
l Run the display ip routing-table verbose command to check detailed information about
the IPv4 routing table.
l Run the display ip routing-table ip-address [ mask | mask-length ] [ longer-match ]
[ verbose ] command to check detailed information about the routes with the specified
destination address in the IPv4 routing table.
l Run the display ip routing-table ip-address1 { mask1 | mask-length1 } ip-address2
{ mask2 | mask-length2 } [ verbose ] command to check detailed information about the
routes within the specified destination address range in the IPv4 routing table.
l Run the display ip routing-table ip-prefix ip-prefix-name [ verbose ] command to
check detailed information about the routes that match the specified IP prefix list in the
IPv4 routing table.
l Run the display ip routing-table protocol protocol [ inactive | verbose ] command to
check detailed information about the routes discovered by the specified routing protocol
in the IPv4 routing table.
l Run the display ip routing-table statistics command to check route statistics in the IPv4
routing table.
l Run the display ipv6 routing-table command to check brief information about the
active routes in the IPv6 routing table.
l Run the display ipv6 routing-table verbose command to check detailed information
about the IPv6 routing table.
l Run the display ipv6 routing-table protocol protocol [ inactive | verbose ] command to
check detailed information about the routes discovered by the specified routing protocol
in the IPv6 routing table.
l Run the display ipv6 routing-table statistics command to check route statistics in the
IPv6 routing table.
l Run the reset ip routing-table statistics protocol { all | protocol } command to clear
route statistics in the IPv4 routing table.
l Run the reset ipv6 routing-table statistics protocol { all | protocol } command to clear
route statistics in the IPv6 routing table.

----End

1.4 Maintaining the Routing Management Module

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 17


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

Context
The number of route prefixes that can be added to a routing table is limited. If the value
exceeds the limit, new prefixes cannot be added to the routing table, which may interrupt
services. To address this problem, configure an alarm threshold for the number of route
prefixes.
If the device imports a large number of routes, system performance may be affected when
services are being processed because the routes consume a lot of system resources. To
improve system reliability, configure a limit on the number of public route prefixes. When the
number of public route prefixes exceeds the limit, an alarm is generated, prompting you to
check whether unnecessary public route prefixes exist.

Procedure
l Configure two thresholds (one alarm threshold and one clear alarm threshold) for the
number of route prefixes on a device.
a. Run system-view
The system view is displayed.
b. Run either of the following commands as required:
n Run ip prefix-limit system threshold-alarm upper-limit upper-limit-value
lower-limit lower-limit-value
Two thresholds (one alarm threshold and one clear alarm threshold) for the
number of IPv4 route prefixes are configured on the device.
By default, the alarm threshold for IPv4 route prefixes is 80%, and the clear
alarm threshold for IPv4 route prefixes is 70%.
n Run ipv6 prefix-limit system threshold-alarm upper-limit upper-limit-value
lower-limit lower-limit-value
Two thresholds (one alarm threshold and one clear alarm threshold) for the
number of IPv6 route prefixes are configured on the device.
By default, the alarm threshold for IPv6 route prefixes is 80%, and the clear
alarm threshold for IPv6 route prefixes is 70%.
NOTE

When you configure upper-limit-value and lower-limit-value, note the following


suggestions:
l Set a value smaller than or equal to 95 for upper-limit-value.
l lower-limit-value must be smaller than upper-limit-value. Set lower-limit-value to a
value at least 10 smaller than upper-limit-value to prevent alarms from being
frequently generated and cleared due to route flapping.
c. Run commit
The configuration is committed.
l Configure a limit on the number of public route prefixes.
a. Run system-view
The system view is displayed.
b. Run either of the following commands as required:
n Run ip prefix-limit number { alert-percent [ route-unchanged ] | simply-
alert }
A limit on the number of IPv4 public route prefixes is configured.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 18


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

By default, the maximum number of IPv4 public route prefixes is not limited.
n Run ipv6 prefix-limit number { alert-percent [ route-unchanged ] | simply-
alert }
A limit on the number of IPv6 public route prefixes is configured.
By default, the maximum number of IPv6 public route prefixes is not limited.
alert-percent indicates the percentage of the maximum number of public route
prefixes that are supported. If you specify alert-percent in the command, an alarm is
generated when the number of public route prefixes exceeds the value calculated by
the following formula:
(number x alert-percent)/100
New public route prefixes can still be added to the routing table until the number of
public route prefixes reaches the value of number. Subsequent route prefixes are
then discarded.
If you specify simply-alert in the command, new public route prefixes can still be
added to the routing table and only an alarm is generated after the number of public
route prefixes exceeds the value of number. However, when the total number of
private and public route prefixes reaches the limit on the number of unicast route
prefixes specified in the PAF file, subsequent public route prefixes are discarded.
If you decrease the value of alert-percent after the number of public route prefixes
exceeds the value of number, whether the routing table remains unchanged is
determined by route-unchanged.
n If you specify route-unchanged in the command, the routing table remains
unchanged.
n If you do not specify route-unchanged in the command, the system deletes all
the routes from the routing table and re-adds routes.
NOTE

After the number of public route prefixes exceeds the limit, note the following rules:
l If you run the ip prefix-limit command to increase the value of number or run the
undo ip prefix-limit command to delete the limit, the device relearns IPv4 public
route prefixes.
l If you run the ipv6 prefix-limit command to increase the value of number or run the
undo ipv6 prefix-limit command to delete the limit, the device relearns IPv6 public
route prefixes.
l Direct and static routes can still be added to the IP routing table.
c. Run commit
The configuration is committed.
----End

1.5 Configuring IPv4 FRR

Applicable Environment
If a link failure occurs after FRR is enabled, the fault detection module reports the failure to
the upper-layer routing system. The FRR module immediately uses a backup link to forward
packets, minimizing the impact of the link failure on services. IPv4 FRR applies to the
services that are very sensitive to delay and packet loss on IPv4 networks.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 19


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

IPv4 FRR implements route backup among routes of different routing protocols and may
cause routing loops. Therefore, exercise caution when using IPv4 FRR.

Pre-configuration Tasks
Before configuring IPv4 FRR, complete the following task:

l Configuring link layer protocol parameters and assigning IPv4 addresses to interfaces to
ensure that the link layer protocol of the interfaces is Up
l Configuring IPv4 routes destined for the same destination address but discovered by
different routing protocols

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ip frr

IPv4 FRR is enabled.

By default, IPv4 FRR is disabled.

NOTE

When FRR is configured in both the system view and the routing protocol view, FRR configured in the
routing protocol view is used for route backup.

Step 3 Run commit

The configuration is committed.

----End

Verifying the Configuration


After IPv4 FRR is configured, run the following command to check the configuration.

Run the display ip routing-table verbose command to check detailed information about the
backup outbound interfaces and backup next hops of routes in the routing table.

1.6 Configuring IPv6 FRR

Applicable Environment
After IPv6 FRR is configured, if a link fault is detected at a lower layer (physical layer or link
layer), the fault is reported to the upper-layer routing system. Meanwhile, packets are
forwarded using a backup link to minimize the impact of the link fault on services. IPv6 FRR
is applicable to services that are very sensitive to the delay and packet loss on an IPv6
network.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 20


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

IPv6 FRR enables routes generated by different routing protocols to back up each other,
which may cause a loop. Therefore, exercise caution when configuring IPv6 FRR.
CE6810LI does not support IPv6 FRR.

Pre-configuration Tasks
Before configuring IPv6 FRR, complete the following tasks:
l Configuring link layer protocol parameters and assigning IPv6 addresses to interfaces to
ensure that the link layer protocol on the interfaces is Up
l Configuring IPv6 routes destined for the same destination address but discovered by
different routing protocols

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ipv6 frr
IPv6 FRR is enabled.
By default, IPv6 FRR is disabled.

NOTE

When IPv6 FRR is configured in both the system view and the routing protocol view, the IPv6 FRR
configuration in the routing protocol view takes effect.

Step 3 Run commit


The configuration is committed.

----End

Verifying the Configuration


Run the display ipv6 routing-table verbose command to check detailed information about
backup outbound interfaces and backup next hops of routes in the routing table.

1.7 Configuring the ECMP Load Balancing Mode

Context
Equal-Cost Multi-Path routing (ECMP) implements load balancing and link backup. ECMP
applies to the network where multiple links to the same destination are available. In the
traditional routing technology, packets are forwarded to the destination through one link only;
the other links are in backup or inactive state; switching between these links requires a certain
period when dynamic routes are used. Different from the traditional routing technology,
ECMP can use multiple links to increase transmission bandwidth and transmit data on a faulty

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 21


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

link without any delay or packet loss. ECMP is classified into per-flow load balancing and
per-packet load balancing. Per-flow load balancing can ensure the packet sequence and ensure
that the same data flow is forwarded using the same route and different data flows are
forwarded using different routes. Per-packet load balancing can improve ECMP bandwidth
efficiency to ensure even load balancing among equal-cost routes, but cannot prevent packet
mis-sequencing. To ensure packet sequencing, confirm that the device or terminal that
receives traffic supports packet reassembly in case of packet mis-sequencing.
Per-packet load balancing takes precedence over per-flow load balancing. When both of them
are configured, per-packet load balancing takes effect.
In per-packet load balancing, devices support the following load balancing modes:
l random mode: A route is randomly selected among multiple equal-cost routes to forward
packets. When the IP address and MAC address of known unicast packets remain
unchanged, configure random per-packet load balancing.
l round-robin mode: Each equal-cost route, in turn, is used to forward packets. When
known unicast packets have the similar length, configure round-robin per-packet load
balancing.
The CE6870EI and CE6880EI support only round-robin per-packet load balancing.
The CE8850EI, and CE8860EI support random per-packet load balancing and round-robin
per-packet load balancing. Other switches except those above do not support per-packet load
balancing.
In per-flow load balancing, devices support different load balancing modes for different
packets, as listed in Table 1-5, Table 1-6 and Table 1-7.

Table 1-5 Load balancing modes for different packets (only on the CE6870EI)
Packets (on the Inbound Default Load Balancing Configurable Load
Interface) Mode Balancing Mode

IPv4 packets src-ip, dst-ip, l4-src-port, src-ip, dst-ip, l4-src-port,


and l4-dst-port l4-dst-port, and protocol

IPv6 packets src-ip, dst-ip, l4-src-port, src-ip, dst-ip, and protocol


and l4-dst-port NOTE
IPv6 packet load balancing
modes, l4-src-port and l4-dst-
port are controlled by the l4-
src-port and l4-dst-port fields
of IPv4 packets. That is, when
the load balancing modes of
IPv4 packets include l4-src-
port or l4-dst-port, the l4-src-
port or l4-dst-port field also
participates in load balancing
of IPv6 packets.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 22


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

Packets (on the Inbound Default Load Balancing Configurable Load


Interface) Mode Balancing Mode

TRILL packets Ingress: Non-IP packets are src-ip, dst-ip, l4-src-port,


load balanced based on the l4-dst-port, protocol, vlan,
inner src-mac, vlan, and and src-interface
dst-mac. IP packets are load
balanced based on src-ip,
dst-ip, l4-src-port, and l4-
dst-port.

Transit/Egress: Packets are The load balancing mode


load balanced based on the cannot be configured.
inner src-mac and dst-mac.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 23


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

Packets (on the Inbound Default Load Balancing Configurable Load


Interface) Mode Balancing Mode

MPLS packets Ingress/Egress: top-label, top-label, 2nd-label, 3rd-


2nd-label, and fields in the label
inner IP header (src-ip, dst- NOTE
ip, l4-src-port, and l4-dst- l On a CE6870EI:
port or ipv6 src-ip, and
l If the CE6870EI
ipv6 dst-ip)
functions as an egress
Transit: top-label, 2nd- node, the load
label, and fields in the inner balancing mode based
IP header (src-ip, and dst-ip on fields in the inner
IP header (src-ip, dst-
or ipv6 src-ip, and ipv6 dst- ip, l4-src-port, and l4-
ip) dst-port or ipv6 src-ip
and ipv6 dst-ip) does
not need to be
configured, but the
fields that participate
in load balancing are
affected by the load
balancing mode
configuration of IPv4
packets and IPv6
packets. If the l4-src-
port and l4-dst-port
fields are specified in
the configured load
balancing mode,
packets may be unable
to be load balanced in
the configured load
balancing mode. To
prevent this problem,
cancel the
configuration of the l4-
src-port and l4-dst-
port fields in the load
balancing mode of
IPv4 packets.
l If the CE6870EI
functions as a transit
node, the load
balancing mode based
on fields in the inner
IP header (src-ip and
dst-ip or ipv6 src-ip
and ipv6 dst-ip) does
not need to be
configured, but the
fields that participate
in load balancing are
affected by the load
balancing mode
configuration of IPv4
packets and IPv6
packets.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 24


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

Table 1-6 Load balancing modes for different packets (only on the CE6880EI)
Packets (on the Inbound Default Load Balancing Configurable Load
Interface) Mode Balancing Mode

IP packets src-ip, dst-ip, l4-src-port, src-ip, dst-ip, l4-src-port,


l4-dst-port l4-dst-port, protocol, vlan,
src-interface, dscp

GRE packets, 6over4 Non-IP packets are load inner-src-ip, inner-dst-ip,


packets balanced based on the inner inner-l4-dport, inner-l4-
inner-src-ip, inner-dst-ip, sport
inner-l4-dport, inner-l4-
sport. IP packets are load
balanced based on src-ip,
dst-ip, l4-src-port, and l4-
dst-port.

Table 1-7 Load balancing modes for different packets(models excluding the CE6870EI and
CE6880EI)
Packets (on the Inbound Default Load Balancing Configurable Load
Interface) Mode Balancing Mode

IPv4 packets src-ip, dst-ip, l4-src-port, src-ip, dst-ip, l4-src-port,


and l4-dst-port l4-dst-port, protocol, vlan,
and src-interface

IPv6 packets src-ipv6, dst-ipv6, l4-src- src-ipv6, dst-ipv6, l4-src-


port, l4-dst-port port, l4-dst-port, protocol,
vlan, src-interface

TRILL packets Non-IP packets are load src-ip, dst-ip, l4-src-port,


balanced based on the inner l4-dst-port
src-mac, and dst-mac. IP
packets are load balanced
based on src-ip, dst-ip, l4-
src-port, and l4-dst-port.

MPLS packets src-ip and dst-ip src-ip, dst-ip, in-label, and


out-label

Procedure
l Configure ECMP load balancing (only on the CE6870EI).
a. Run system-view
The system view is displayed.
b. Run load-balance profile profile-name
An enhanced load balancing profile is created, and the load balancing profile view
is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 25


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

c. You can perform one, multiple, or none of the following operations.


n Run ip [ dst-ip | l4-dst-port | l4-src-port | protocol | src-ip ] *
The load balancing mode of IPv4 packets is set in the load balancing profile.
n Run ipv6 [ dst-ip | protocol | src-ip ] *
The load balancing mode of IPv6 packets is set in the enhanced load balancing
profile.
NOTE

IPv6 packet load balancing modes, l4-src-port and l4-dst-port are controlled by the l4-src-
port and l4-dst-port fields of IPv4 packets. That is, when the load balancing modes of IPv4
packets include l4-src-port or l4-dst-port, the l4-src-port or l4-dst-port field also
participates in load balancing of IPv6 packets.
n Run mpls [ 2nd-label | 3rd-label | top-label ] *
The load balancing mode of MPLS packets is set in the load balancing profile.
By default, load balancing of MPLS packets is based on the two outer labels
(top-label and 2nd-label) of each packet.
d. Run ecmp { src-interface | seed seed-data } *
The ECMP load balancing mode is set in the enhanced load balancing profile.
By default, the ECMP load balancing mode is seed.
e. Run ecmp universal-id universal-id
The hash algorithm offset of ECMP load balancing is set in the enhanced load
balancing profile.
By default, the hash algorithm offset of ECMP is 1.
f. Run ecmp hash-mode hashmode-id
The hash algorithm mode used in ECMP load balancing is configured.
By default, the hash algorithm mode used in ECMP load balancing is 2. Set the
hash algorithm mode to 3/4/5 for per-packet load balancing.
g. Run ecmp local-preference enable
Local traffic preferential forwarding is enabled.
By default, local traffic preferential forwarding is disabled.
h. Run commit
The configuration is committed.
l Configure the ECMP load balancing mode (on the CE6880EI).
a. Run system-view
The system view is displayed.
b. Run load-balance ecmp
The ECMP view is displayed.
c. Perform the following operations according to network packet types.
n Run ip { src-ip | dst-ip | vlan | l4-src-port | l4-dst-port | protocol | src-
interface | dscp } *
A load balancing mode is configured for IP packets in ECMP.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 26


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

n Run ip-tunnel { inner-src-ip | inner-dst-ip | inner-l4-sport | inner-l4-dport }


*

A load balancing mode is configured for GRE packets and 6over4 packets in
ECMP.
d. Run hashmode hashmode-id
The hash algorithm mode used in ECMP load balancing is configured.
By default, the hash algorithm mode used in ECMP load balancing is 0. Set the
hash algorithm mode to 1 for per-packet load balancing.
e. Run commit
The configuration is committed.
l Configure ECMP load balancing (on the CE8860EI and the CE8850EI).
Based on per-flow
a. Run system-view
The system view is displayed.
b. Run load-balance ecmp
The ECMP view is displayed.
c. You can configure different load balancing modes for different packets. Perform the
following operations according to network packet types.
n Run ipv4 { src-ip | dst-ip | vlan | l4-src-port | l4-dst-port | protocol | src-
interface } *
The load balancing mode is specified for IPv4 and TRILL packets.
n Run ipv6 { src-ipv6 | dst-ipv6 | vlan | l4-src-port | l4-dst-port | protocol |
src-interface } *
The load balancing mode is specified for IPv6 packets.
n Run mpls { src-ip | dst-ip | src-ipv6 | dst-ipv6 | in-label | out-label }
The load balancing mode is specified for MPLS packets.
NOTE

If src-ipv6 and dst-ipv6 are specified for ECMP load balancing of IPv6 packets, the switch
uses only the low 32 bits of the source and destination IPv6 addresses as the hash fields.
d. Run hashmode hashmode-id
The hash algorithm mode used in ECMP load balancing is configured.
By default, the hash algorithm mode used in ECMP load balancing is 4.
e. Run local-preference enable
Local traffic preferential forwarding is enabled.
By default, local traffic preferential forwarding is disabled.
f. Run commit
The configuration is committed.
Based on per-packet
a. Run system-view
The system view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 27


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

b. Run load-balance ecmp


The ECMP view is displayed.
c. Run load-balance { random | round-robin }
Random or round-robin per-packet load balancing is configured.

NOTE
If both per-packet load balancing and per-flow load balancing are configured in ECMP, per-
packet load balancing takes effect.
d. Run commit
The configuration is committed.
l Configure ECMP load balancing (models excluding the CE6870EI, CE6880EI,
CE8850EI, and CE8860EI).
a. Run system-view
The system view is displayed.
b. Run load-balance ecmp
The ECMP view is displayed.
c. You can configure different load balancing modes for different packets. Perform the
following operations according to network packet types.
n Run ipv4 { src-ip | dst-ip | vlan | l4-src-port | l4-dst-port | protocol | src-
interface } *
The load balancing mode is specified for IPv4 and TRILL packets.
n Run ipv6 { src-ipv6 | dst-ipv6 | vlan | l4-src-port | l4-dst-port | protocol |
src-interface } *
The load balancing mode is specified for IPv6 packets.
n Run mpls { src-ip | dst-ip | src-ipv6 | dst-ipv6 | in-label | out-label }
The load balancing mode is specified for MPLS packets.
Only the CE7855EI, CE7850EI, CE6860EI, CE6855HI, CE6856HI,
CE6851HI, CE6850HI, and CE6850U-HI support ECMP load balancing for
MPLS packets.
NOTE

If src-ipv6 and dst-ipv6 are specified for ECMP load balancing of IPv6 packets, the switch
uses only the low 32 bits of the source and destination IPv6 addresses as the hash fields.
d. Run hashmode hashmode-id
The hash algorithm mode used in ECMP load balancing is configured.
By default, the hash algorithm mode used in ECMP load balancing is 4.
e. Run local-preference enable
Local traffic preferential forwarding is enabled.
By default, local traffic preferential forwarding is disabled.
f. Run commit
The configuration is committed.
----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 28


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

Verifying the Configuration


Run the display port forwarding-path { src-ip src-ip-data [ ip-mask-len | source-ip-mask ] |
dst-ip dst-ip-data [ ip-mask-len | dst-ip-mask ] | src-mac src-mac-data | dst-mac dst-mac-
data | protocol { protocol-number | gre | icmp | igmp | ip | ipinip | ospf | tcp [ l4-src-port
src-port-data | l4-dst-port dst-port-data ]* | udp [ l4-src-port src-port-data | l4-dst-port dst-
port-data ] * } } * [ enhanced ] command to check the outbound interface of packets that
contain specified 5-tuple information, source MAC address, and destination MAC address.

1.8 Configuring an ECMP Load Balancing Mode for


PPPoE Packets
Context
By default, a CE switch except the CE6880EI processes received PPPoE packets as common
Ethernet packets. Figure 1-7 shows the format of PPPoE packets. The switch cannot identify
the 5-tuple information in PPPoE packets and performs the hash algorithm based on the outer
Ethernet frame of common Layer 2 packets by default. There are fewer variable fields of
Layer 2 Ethernet frames of PPPoE packets and only source MAC addresses of packets from
different users are different, so packets are often unevenly load balanced on an ECMP. To
improve load balancing, use inner information of PPPoE packets for load balancing.

Figure 1-7 Format of PPPoE packets

Destination Source Ether_ PPPoE Checks


Type Packets um Ethernet
address address

PPP
Version Type Code Session_ID Length PPPoE
Packet

IP
PPP PPP
Packet Padding

NOTE

The CE6880EI can identify PPPoE packets and load balance the PPPoE packets without configuring
ECMP load balancing.

Procedure
l (On a CE6870EI switch) Configure a load balancing mode for PPPoE packets.
a. Run system-view
The system view is displayed.
b. Run load-balance ecmp pppoe { session-id | l4-src-port { ppp-address-
compression | ppp-protocol-compression | both | none } }
A load balancing mode is configured for PPPoE packets.
By default, PPPoE packets are load balanced based on src-mac, dst-mac, and vlan.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 29


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

You can also specify session-id and l4-src-port to configure a load balancing mode
for PPPoE packets based on the session ID and transport-layer source interface of
the packets.
c. Run commit

The configuration is committed.


l (Models excluding the CE6870EI and CE6875EI) Configure a load balancing mode for
PPPoE packets.
a. Run system-view

The system view is displayed.


b. Run load-balance pppoe { session-id | l4-src-port { ppp-address-compression |
ppp-protocol-compression | both | none } }

A load balancing mode is configured for PPPoE packets.

By default, PPPoE packets are load balanced based on src-mac and dst-mac.

You can also specify session-id and l4-src-port to configure a load balancing mode
for PPPoE packets based on the session ID and transport-layer source interface of
the packets.

NOTE

Only the CE6850HI, CE6850U-HI, CE6851HI, CE6855HI, CE6856HI, CE6860EI,


CE7850EI, CE7855EI, CE8850EI, CE8860EI support this command.
c. Run commit

The configuration is committed.

----End

1.9 Enable ECMP Load Balancing Consistency

Context
Equal-Cost Multi-Path routing (ECMP) implements load balancing and link backup. ECMP
applies to the network where multiple links to the same destination are available. In the
traditional routing technology, packets are forwarded to the destination through one link only;
the other links are in backup or inactive state; switching between these links requires a certain
period when dynamic routes are used. Different from the traditional routing technology,
ECMP can use multiple links to increase transmission bandwidth and transmit data on a faulty
link without any delay or packet loss.

When one link of equal-cost multiple paths fails, all traffic needs to be load balanced again
based on hash calculation. ECMP load balancing consistency, however, ensures that hash
calculation is performed only for traffic on this faulty link, without affecting traffic on other
normal links. This function ensures normal operation of services, in which sessions need to be
maintained, on normal links.

NOTE
The CE6810LI, CE5855EI, CE5850EI, and CE5810EI do not support this function.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 30


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run load-balance ecmp stateful enable

The ECMP load balancing consistency function is enabled.

NOTE
When configuring this function, pay attention to the following points:
l To use this function, ensure that different destination addresses are reachable through the same or
completely different equal-cost multiple paths.
l After enabling this function, do not change the configured load balancing hash algorithm, hash
algorithm offset, and load balancing mode. Otherwise, this function may be unable to take effect.
l This function may be unable to take effect when outbound ports of equal-cost links are intermittently
disconnected.
l The ECMP load balancing consistency function only takes effect only for common IPv4 traffic, but
not for traffic transmitted over tunnels.
l The ECMP load balancing consistency function is unable to take effect for IPv6 traffic.

Step 3 Run commit

The configuration is committed.

----End

Verifying the Configuration


Run the display port forwarding-path { src-ip src-ip-data [ ip-mask-len | source-ip-mask ] |
dst-ip dst-ip-data [ ip-mask-len | dst-ip-mask ] | src-mac src-mac-data | dst-mac dst-mac-
data | protocol { protocol-number | gre | icmp | igmp | ip | ipinip | ospf | tcp [ l4-src-port
src-port-data | l4-dst-port dst-port-data ]* | udp [ l4-src-port src-port-data | l4-dst-port dst-
port-data ] * } } * [ enhanced ] command to check the outbound interface of packets that
contain specified 5-tuple information, source MAC address, and destination MAC address.

1.10 Configuring the Advertisement of IPv4 ARP Vlink


Direct Routes

Applicable Environment
IP packets are forwarded through a specified physical interface, but cannot be forwarded
through a VLANIF interface or a VBDIF interface. If packets reach a VLANIF interface or a
VBDIF interface, the device obtains information about the Layer 3 interfaces using IPv4 ARP
and generates relevant routing entries. The routes recorded by the routing entries are called
IPv4 ARP Vlink direct routes.

Before IPv4 ARP Vlink direct routes are advertised, a route-policy can be configured to filter
the advertised routes and only routes that match the route-policy can be advertised. In this
manner, data traffic can be precisely controlled.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 31


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

NOTE

CE6810LI does not support the advertisement of IPv4 ARP Vlink direct routes.

Pre-configuration Tasks
Before advertising IPv4 ARP Vlink direct routes on the public network, complete the
following task:

l Configuring parameters of a link layer protocol and assigning an IP address to each


interface to ensure that the link layer protocol on the interfaces is Up

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run arp direct-route enable

Advertising IPv4 ARP Vlink direct routes is enabled.

By default, ARP Vlink direct routes are not advertised.

NOTE

l In the scenarios that ARP Vlink direct routes have to be advertised to only certain VLAN or BD
users, you can run the arp direct-route enable command, with the parameter route-policy route-
policy-name specified. This configuration ensures that only filtered ARP Vlink direct routes are
advertised, the scale of the routing table is controlled, and the security of other sites in the VLAN or
BD is guaranteed.
l In other scenarios, ARP Vlink direct routes can be advertised as long as the arp direct-route enable
command is run.

After advertising IPv4 ARP Vlink direct routes is enabled, IPv4 ARP Vlink direct routes can
be advertised only if they are imported to a dynamic routing protocol. Perform the following
steps on the switch based on the type of the dynamic routing protocol:
l If RIP is used, run the import-route direct [ cost cost | route-policy route-policy-name ]
* command to import IPv4 ARP Vlink direct routes to RIP.
l If OSPF is used, run the import-route direct [ cost cost | route-policy route-policy-
name | tag tag | type type ] * command to import IPv4 ARP Vlink direct routes to OSPF.
l If IS-IS is used, run the import-route direct [ cost-type { external | internal } | cost
cost | tag tag | route-policy route-policy-name | [ level-1 | level-2 | level-1-2 ] ] *
command to import IPv4 ARP Vlink direct routes to IS-IS.
l If BGP is used, run the import-route direct [ med med | route-policy route-policy-
name ] * command to import IPv4 ARP Vlink direct routes to BGP.

Step 3 Run commit

The configuration is committed.

After advertising IPv4 ARP Vlink direct routes is enabled, IPv4 ARP Vlink direct routes can
be advertised only if they are imported to a dynamic routing protocol.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 32


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

Verifying the Configuration


Run the display ip routing-table verbose command to check information about advertised
IPv4 ARP Vlink direct routes.

1.11 Configuring a Priority for Direct Subnet Routes on an


Interface
Usage Scenario
In Figure 1-8, VM1 and VM2 communicates with each other. Before VM2 is migrated from
campus 1 to campus 2, VM1's traffic is forwarded to VM2 through DSW1. After VM2 is
migrated to campus 2, VM1's traffic is still forwarded along the original path because the
default priority of direct subnet routes is higher than that of static routes. To address this
problem, configure a static route on DSW1, with the VM traffic diverging device as the next
hop, and run the direct-route ip preference command to configure a priority for direct subnet
routes so that the static route takes precedence over direct subnet routes during route
selection. After receiving VM1's traffic, the VM traffic diverging device forwards it to the
new location of VM2, preventing a traffic interruption.

Figure 1-8 Networking for VM migration

DSW2

DSW1 VM traffic
diverging device

VM1 VM2 VM2

Campus 1 Campus 2

Traffic forwarding path before VM2's migration


Traffic forwarding path after VM2's migration

Pre-configuration Tasks
Before configuring a priority for direct subnet routes on an interface, configure link-layer
protocol parameters and IP addresses for interfaces and ensure that the link layer protocol of
each interface is Up.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 33


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-name
The interface view is displayed.
Step 3 Run direct-route ip preference preference-value
A priority is configured for direct subnet routes on the interface.
By default, the priority is 0.
Step 4 Run commit
The configuration is committed.

----End

1.12 Configuration Examples for IP Unicast Routing


This section only provides configuration examples for individual features. For details about
multi-feature configuration examples, feature-specific configuration examples, interoperation
examples, protocol or hardware replacement examples, and industry application examples, see
the Typical Configuration Examples.

1.12.1 Example for Configuring IPv4 FRR on the Public Network

Networking Requirements
As shown in Figure 1-9, OSPF is configured on SwitchT, SwitchA, and SwitchC, and IS-IS is
configured on SwitchT, SwitchB, and SwitchC. The default priority of OSPF routes is higher
than that of IS-IS routes. Therefore, the backup outbound interface and backup next hop can
be configured on SwitchT to ensure that Link B functions as a backup of Link A. Traffic must
be rapidly switched from link A to link B when a fault occurs on link A.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 34


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

Figure 1-9 Networking diagram of configuring IPv4 FRR on the public network

10GE1/0/1 10GE1/0/2
VLANIF20 VLANIF40
[Link]/24 [Link]/24
10GE1/0/2 10GE1/0/2
VLANIF20
SwitchA VLANIF40
[Link]/24 Link A [Link]/24

10GE1/0/1 SwitchT SwitchC 10GE1/0/1


VLANIF10 10GE1/0/3 Link B VLANIF60
[Link]/24 VLANIF30 10GE1/0/3 [Link]/24
SwitchB VLANIF50
[Link]/24
[Link]/24
10GE1/0/1 10GE1/0/2
VLANIF30 VLANIF50
[Link]/24 [Link]/24

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic OSPF functions on SwitchT, SwitchA and SwitchC.
2. Configure basic IS-IS functions on SwitchT, SwitchB and SwitchC.
3. Check routing information on SwitchT.
4. Enable public network IPv4 FRR on SwitchT, and check the backup outbound interface
and backup next hop.

Procedure
Step 1 Create VLANs and add interfaces to the VLANs.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchT
[*HUAWEI] commit
[~SwitchT] vlan batch 10 20 30
[*SwitchT] interface 10ge 1/0/1
[*SwitchT-10GE1/0/1] port link-type trunk
[*SwitchT-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchT-10GE1/0/1] quit
[*SwitchT] interface 10ge 1/0/2
[*SwitchT-10GE1/0/2] port link-type trunk
[*SwitchT-10GE1/0/2] port trunk allow-pass vlan 20
[*SwitchT-10GE1/0/2] quit
[*SwitchT] interface 10ge 1/0/3
[*SwitchT-10GE1/0/3] port link-type trunk
[*SwitchT-10GE1/0/3] port trunk allow-pass vlan 30
[*SwitchT-10GE1/0/3] quit
[*SwitchT] commit

The configurations of SwitchA, SwitchB, and SwitchC are similar to the configuration of
SwitchT, and are not mentioned here.
Step 2 Assign IPv4 addresses to VLANIF interfaces.
[~SwitchT] interface vlanif 10
[*SwitchT-Vlanif10] ip address [Link] 24

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 35


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

[*SwitchT-Vlanif10] quit
[*SwitchT] interface vlanif 20
[*SwitchT-Vlanif20] ip address [Link] 24
[*SwitchT-Vlanif20] quit
[*SwitchT] interface vlanif 30
[*SwitchT-Vlanif30] ip address [Link] 24
[*SwitchT-Vlanif30] quit
[*SwitchT] commit

The configurations of SwitchA, SwitchB, and SwitchC are similar to the configuration of
SwitchT, and are not mentioned here.
Step 3 Configure OSPF on SwitchT, SwitchA, and SwitchC.
# Configure SwitchT.
[~SwitchT] ospf
[*SwitchT-ospf-1] area 0
[*SwitchT-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchT-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchT-ospf-1-area-[Link]] commit
[~SwitchT-ospf-1-area-[Link]] quit
[~SwitchT-ospf-1] quit

# Configure SwitchA.
[~SwitchA] ospf
[*SwitchA-ospf-1] area 0
[*SwitchA-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchA-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchA-ospf-1-area-[Link]] commit
[~SwitchA-ospf-1-area-[Link]] quit
[~SwitchA-ospf-1] quit

# Configure SwitchC.
[~SwitchC] ospf
[*SwitchC-ospf-1] area 0
[*SwitchC-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchC-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchC-ospf-1-area-[Link]] commit
[~SwitchC-ospf-1-area-[Link]] quit
[~SwitchC-ospf-1] quit

Step 4 Configure IS-IS on SwitchT, SwitchB, and SwitchC.


# Configure SwitchT.
[~SwitchT] isis
[*SwitchT-isis-1] network-entity 10.0000.0000.0001.00
[*SwitchT-isis-1] quit
[*SwitchT] interface vlanif 10
[*SwitchT-Vlanif10] isis enable 1
[*SwitchT-Vlanif10] quit
[*SwitchT] interface vlanif 30
[*SwitchT-Vlanif30] isis enable 1
[*SwitchT-Vlanif30] commit
[~SwitchT-Vlanif30] return

# Configure SwitchB.
[~SwitchB] isis
[*SwitchB-isis-1] network-entity 10.0000.0000.0002.00
[*SwitchB-isis-1] quit
[*SwitchB] interface vlanif 30
[*SwitchB-Vlanif30] isis enable 1
[*SwitchB-Vlanif30] quit
[*SwitchB] interface vlanif 50
[*SwitchB-Vlanif50] isis enable 1

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 36


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

[*SwitchB-Vlanif50] commit
[~SwitchB-Vlanif50] quit

# Configure SwitchC.
[~SwitchC] isis
[*SwitchC-isis-1] network-entity 10.0000.0000.0003.00
[*SwitchC-isis-1] quit
[*SwitchC] interface vlanif 50
[*SwitchC-Vlanif50] isis enable 1
[*SwitchC-Vlanif50] quit
[*SwitchC] interface vlanif 60
[*SwitchC-Vlanif60] isis enable 1
[*SwitchC-Vlanif60] commit
[~SwitchC-Vlanif60] quit

Step 5 Check routing information.


# Check the routes to destination [Link] on SwitchT.
<SwitchT> display ip routing-table [Link] verbose
Route Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole
route
------------------------------------------------------------------------------
Routing Table : _public_
Summary Count : 2

Destination: [Link]/24
Protocol: OSPF Process ID: 1
Preference: 10 Cost: 3
NextHop: [Link] Neighbour: [Link]
State: Active Adv Age: 00h10m25s
Tag: 0 Priority: medium
Label: NULL QoSInfo: 0x0
IndirectID: 0xEF0000A2 Instance:
RelayNextHop: [Link] Interface: Vlanif20
TunnelID: 0x0 Flags: D

Destination: [Link]/24
Protocol: ISIS-L1 Process ID: 1
Preference: 15 Cost: 30
NextHop: [Link] Neighbour: [Link]
State: Inactive Adv Age: 00h09m05s
Tag: 0 Priority: medium
Label: NULL QoSInfo: 0x0
IndirectID: 0xEF000117
RelayNextHop: [Link] Interface: Vlanif30
TunnelID: 0x0 Flags:

The routing table contains two routes to [Link]/24. The default priority of OSPF routes is
higher than that of IS-IS routes. Therefore, the route with next hop [Link] is the optimal
route.
Step 6 Enable IPv4 FRR on the public network.
# Enable IPv4 FRR on the public network on SwitchT.
<SwitchT> system-view
[~SwitchT] ip frr
[*SwitchT] commit

# Check information about the backup outbound interface and backup next hop on SwitchT.
[SwitchT] display ip routing-table [Link] verbose
Route Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole
route
------------------------------------------------------------------------------
Routing Table : _public_
Summary Count : 2

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 37


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

Destination: [Link]/24
Protocol: OSPF Process ID: 1
Preference: 10 Cost: 3
NextHop: [Link] Neighbour: [Link]
State: Active Adv Age: 00h11m39s
Tag: 0 Priority: medium
Label: NULL QoSInfo: 0x0
IndirectID: 0xEF0000A2 Instance:
RelayNextHop: [Link] Interface: Vlanif20
TunnelID: 0x0 Flags: D
BkNextHop: [Link] BkInterface: Vlanif30
BkLabel: NULL SecTunnelID: 0x0
BkPETunnelID: 0x0 BkPESecTunnelID: 0x0
BkIndirectID: 0xEF000117

Destination: [Link]/24
Protocol: ISIS-L1 Process ID: 1
Preference: 15 Cost: 30
NextHop: [Link] Neighbour: [Link]
State: Inactive Adv Age: 00h10m19s
Tag: 0 Priority: medium
Label: NULL QoSInfo: 0x0
IndirectID: 0xEF000117
RelayNextHop: [Link] Interface: Vlanif30
TunnelID: 0x0 Flags:

The routing table contains the backup outbound interface and backup next hop of the route to
[Link]/24. The IS-IS route becomes the backup route.

----End

Configuration Files
l Configuration file of SwitchT
#
sysname SwitchT
#
vlan batch 10 20 30
#
ip frr
#
isis 1
network-entity 10.0000.0000.0001.00
#
interface Vlanif10
ip address [Link] [Link]
isis enable 1
#
interface Vlanif20
ip address [Link] [Link]
#
interface Vlanif30
ip address [Link] [Link]
isis enable 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 30
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 38


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

ospf 1
area [Link]
network [Link] [Link]
network [Link] [Link]
#
return
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 20 40
#
interface Vlanif20
ip address [Link] [Link]
#
interface Vlanif40
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
ospf 1
area [Link]
network [Link] [Link]
network [Link] [Link]
#
return
l Configuration file of SwitchB
#
sysname SwitchB
#
vlan batch 30 50
#
isis 1
network-entity 10.0000.0000.0002.00
#
interface Vlanif30
ip address [Link] [Link]
isis enable 1
#
interface Vlanif50
ip address [Link] [Link]
isis enable 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 50
#
return
l Configuration file of SwitchC
#
sysname SwitchC
#
vlan batch 40 50 60
#
isis 1
network-entity 10.0000.0000.0003.00
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 39


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 1 IP Unicast Routing

interface Vlanif40
ip address [Link] [Link]
#
interface Vlanif50
ip address [Link] [Link]
isis enable 1
#
interface Vlanif60
ip address [Link] [Link]
isis enable 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 60
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 50
#
ospf 1
area [Link]
network [Link] [Link]
network [Link] [Link]
#
return

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 40


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

2 Static Route Configuration

About This Chapter

This chapter provides an overview of the functions, purposes and use cases of static routes,
and explains how they can be configured.
2.1 Overview of Static Routes
2.2 Understanding Static Routes
2.3 Application Scenarios for Static Routes
2.4 Summary of Static Route Configuration Tasks
2.5 Licensing Requirements and Limitations for Static Routes
2.6 Default Settings for Static Routes
2.7 Configuring IPv4 Static Routes
2.8 Configuring IPv6 Static Routes
2.9 Configuration Examples for Static Routes

2.1 Overview of Static Routes


Static routes are applicable to simple networks. Proper static routes can improve network
performance and ensure bandwidth for important applications.

Definition
A static route is a route that, in most cases, manually configured by the network administrator
to allow network traffic to reach a target destination.

Purpose
Static routes are used in different ways on different types of networks.
l On simple networks, static routes can be used alone without the need for dynamic routes
to ensure network connectivity.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 41


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

l On complex networks, static routes can be used alongside dynamic routes to improve
network performance and ensure that bandwidth is available for important applications.
l Static routes associated with VPN instances are used to manage VPN routes.

2.2 Understanding Static Routes

2.2.1 Basic Concepts of Static Routes


A router forwards data packets based on routing entries in a routing table. These routing
entries can be manually configured or calculated using dynamic routing protocols. A static
route typically refers to a manually configured route.
Static routes use less bandwidth than dynamic routes and do not occupy CPU resources for
route calculation and update analysis. When a network fault occurs or the topology changes,
static routes cannot be automatically updated and must be manually reconfigured to adapt to
the network change. A static route has five parameters: destination IP address, mask,
outbound interface, next hop, and preference.

Destination Address and Mask


The destination IPv4 address of a static route is expressed in dotted decimal notation. The
mask of the route can be expressed either in dotted decimal notation or by the mask length.
The mask length is the number of consecutive 1s in the mask. For details about the destination
IPv6 address and mask of a static route, see "Basic IPv6 Configurations - Principles - IPv6
Addresses" in the Configuration Guide - IP Service. Setting the destination address and mask
to all 0s configures a default static route. For details about the default static route, see 2.3.2
Static Default Routes.

Outbound Interface and Next-Hop IP Address


When configuring a static route, you need to specify either the outbound interface or the next-
hop IP address depending on the outbound interface type.
l For a point-to-point (P2P) interface, you only need to specify an outbound interface. This
automatically sets the IP address of the remote interface connected to the outbound
interface as the next-hop address.
l For a non-broadcast multiple access (NBMA) interface such as an Asynchronous
Transfer Mode (ATM) interface, specify a next-hop IP address. This type of interfaces
support point-to-multipoint (P2MP) networks and require mappings between IP
addresses and link-layer addresses to be configured during the configuration of static
routes. In this case, no outbound interface needs to be specified.
l For a broadcast interface (such as an Ethernet interface) and a virtual template (VT)
interface, specify a next-hop IP address. Ethernet interfaces are broadcast interfaces, and
VT interfaces can be associated with several virtual access (VA) interfaces. If an
Ethernet interface or a VT interface is specified as the outbound interface, there will be
multiple next hops, and the system will not be able to decide which next hop to use.

Static Route Preference


Different static routes can be configured with different preference values. A smaller value
indicates a higher preference. Specifying the same preference value for static routes with the

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 42


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

same destination implements load balancing among these routes. Conversely, specifying
different preference values for static routes with the same destination implements route
backup among the routes. For details, see 2.3.1 Load Balancing and Route Backup.

2.2.2 BFD for Static Routes


Unlike dynamic routes, static routes do not have a dedicated fault detection mechanism. If a
link fault occurs on the network, the administrator needs to rectify it. Bidirectional
Forwarding Detection (BFD) for static routes can be used to bind a static route to a BFD
session so that the BFD session can detect the status of the link associated with the static
route. The detailed procedure is as follows:

l If the BFD session bound to a static route detects a link fault, BFD reports the fault to the
system. The system then sets the route to inactive, and this route is no longer available in
the IP routing table.
l If the BFD session bound to a static route detects that the faulty link has been re-
established, BFD reports a message to the system. The system then sets the route to
active, and this route becomes available in the IP routing table again.

For more details about BFD, see "BFD Configuration - Principles" in Configuration Guide -
Reliability.

2.2.3 NQA for Static Routes


As mentioned previously, static routes do not have a dedicated fault detection mechanism. If a
fault occurs on a non-directly connected link, the corresponding static route will not be
automatically deleted from the IP routing table. This cannot ensure in-time link switchover
and can interrupt services for a significant amount of time. The network administrator must
delete the corresponding static route to allow traffic to switch to an available link.

An effective method is required to detect faults in links related to static routes. BFD for static
routes is applicable only to the scenario where both communicating devices support BFD. If
either of the two communicating devices supports NQA, NQA for static routes can be used to
detect link faults.

NQA for static routes refers to the association between a static route and an NQA test
instance. The system can use the NQA test instance to check the link status and determines an
optimal route in time according to the NQA test result to prevent communication interruption
and ensure service quality. NQA for static routes functions as follows:
l If the NQA test instance detects a link fault, the system sets the static route to inactive.
The route becomes unavailable and is deleted from the IP routing table.
l If the NQA test instance finds that the link recovers, the system sets the static route to
active. The route becomes available and is added to the IP routing table.

For details about NQA, see "NQA Configuration - Principles" in the Configuration Guide -
Network Management and Monitoring.

NOTE

When a static route is associated with an NQA test instance, only ICMP test instances are used to test
whether there are reachable routes between the source and destination.
Each static route can be associated with only one NQA test instance.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 43


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Application Scenario
On the network shown in Figure 2-1, each access switch provides access services for 10
users, and a total of 100 users are connected to the network. Because dynamic routing
protocols are unavailable for communication between RouterB and users, static routes
destined for users are configured on RouterB. For network stability, RouterC, functioning as
the backup for RouterB, is configured with static routes to the same destination. RouterA,
RouterB, and RouterC run a dynamic routing protocol to learn routes from each other.
RouterB and RouterC import static routes using a dynamic routing protocol and have different
costs for these static routes. After the configuration is complete, RouterA can use the dynamic
routing protocol to learn routes destined for users from RouterB and RouterC. RouterA uses
the link related to the static route with a lower cost as the active link and the other link as the
standby link.
NQA for static routes is configured on RouterB. NQA tests are performed to check the active
link of RouterB → SwitchA → SwitchC (SwitchD). If the active link fails, the corresponding
static route is deleted from the routing table, and traffic diverts to the standby link of RouterC
→ SwitchB → SwitchC (SwitchD). If both links work properly, traffic travels along the active
link.

Figure 2-1 Networking diagram for applying NQA for static routes

IP Network

RouterA

RouterB RouterC
SwitchA SwitchB

......
SwitchC SwitchD

...... ......

Client 1 Client10 Client91 Client100

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 44


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

2.2.4 Permanent Advertisement of Static Routes


Permanent advertisement of static routes provides a low-cost and simple link detection
mechanism and improves compatibility between Huawei and non-Huawei devices. If service
traffic needs to be forwarded along a specified path, you can ping the destination addresses of
static routes to detect the link connectivity and monitor services.
Link connectivity determines the stability and availability of a network. Therefore, link
detection plays an important role in network maintenance. BFD, as a link detection
mechanism, is inapplicable to certain scenarios. For example, a simpler and more natural
method is required for link detection between ISPs.
After permanent advertisement of static routes is configured, the static routes that cannot be
advertised are still preferred and added to the routing table in the following cases:
l If an outbound interface configured with an IP address is specified for a static route, the
static route is always preferred and added to the routing table regardless of whether the
outbound interface is Up or Down.
l If no outbound interface is specified for a static route, the static route is always preferred
and added to the routing table regardless of whether the static route can be iterated to an
outbound interface.
In this way, you can enable IP packets to be always forwarded by controlling the preference
and prefix length of this static route. The permanent advertisement mechanism provides a way
for you to detect link connectivity.

A device enabled with this feature always stores static routes in its IP routing table, regardless
of whether the static routes are reachable. If a path is unreachable, the corresponding static
route may become a blackhole route.

Application Scenarios
In Figure 2-2, BR1, BR2, and BR3 belong to ISP1, ISP2, and ISP3 respectively. There are
two reachable links (Link A and Link B) between BR1 and BR2. ISP1, however, requires that
service traffic be forwarded to ISP2 over Link A without traveling through ISP3.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 45


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Figure 2-2 Networking diagram for applying permanent advertisement of static routes

ISP2

BR2
[Link]/24
LinkA

BR1

ISP1 BR3
LinkB
ISP3

The External Border Gateway Protocol (EBGP) peer relationship is established between BR1
and BR2. For service monitoring, a static route destined for the BGP peer (BR2) at
[Link]/24 is configured on BR1, and permanent advertisement of static routes is enabled.
The interface that connects BR1 to BR2 is specified as the outbound interface of the static
route. Then, the network monitoring system periodically pings [Link] to determine the
status of Link A.
If Link A works properly, ping packets are forwarded over Link A. If Link A becomes faulty,
although service traffic can reach BR2 over Link B, the static route is still preferred because
permanent advertisement of static routes is enabled. Therefore, ping packets are still
forwarded over Link A, but packet forwarding fails. This scenario is also applicable to BGP
packets. That is, a link fault causes the BGP peer relationship to be interrupted. The network
monitoring system detects service faults as returned in the ping result and prompts
maintenance engineers to rectify the faults before services are affected.

2.3 Application Scenarios for Static Routes

2.3.1 Load Balancing and Route Backup


Load Balancing
If the same preference is specified for multiple routes to the same destination, load balancing
is implemented.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 46


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Figure 2-3 Load balancing

RouterB

Preference=60

Preference=60
RouterA RouterC

RouterD

In Figure 2-3, there are two static routes with the same preference from RouterA to RouterC.
The two routes are stored in the routing table and used to forward data.

Route Backup
If different preferences are specified for multiple routes to the same destination, route backup
is implemented.

Figure 2-4 Route backup

RouterB

Preference=60

Preference=100
RouterA RouterC

RouterD

In Figure 2-4, there are two static routes with different preferences from RouterA to RouterC.
Static route B with the next hop RouterB has a higher preference, and its link therefore
functions as the active link. Static route D with the next hop RouterD has a lower preference,
and its link therefore functions as the standby link.
l In normal situations, static route B is activated, and the active link forwards data. Static
route D is not shown in the routing table.
l If a fault occurs on the active link, static route B is deleted from the routing table. Static
route D, functioning as the backup route, is activated, and the standby link forwards data.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 47


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

l When the active link restores, static route B is activated again, and the active link
forwards data. Static route D is deleted from the routing table and functions as the
backup route. Static route D is also called a floating static route.

2.3.2 Static Default Routes


A default route has all 0s as its destination IP address. The default route can be automatically
generated by a routing protocol or manually configured. The manually configured default
route simplifies network configuration. If the destination address of a packet fails to match
any entry in the routing table, the router selects the default route to forward the packet.

Figure 2-5 Networking diagram of static routes

2 4
RouterB
1 5

RouterA RouterC

In Figure 2-5, if no static default route is configured, you need to configure static routes
destined for networks 3, 4, and 5 on RouterA, configure static routes destined for networks 1
and 5 on RouterB, and configure static routes destined for networks 1, 2, and 3 on RouterC. In
this way, RouterA, RouterB, and RouterC can communicate with each other.
The next hop of the packets sent by RouterA to networks 3, 4, and 5 is RouterB. Therefore, a
default route configured on RouterA can replace the three static routes destined for networks
3, 4, and 5 in the preceding example. Similarly, just one default route from RouterC to
RouterB can replace the three static routes destined for networks 1, 2, and 3 in the preceding
example.

2.4 Summary of Static Route Configuration Tasks


Table 2-1 describes the static route configuration tasks.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 48


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Table 2-1 Static route configuration tasks


Scenario Description Task

Configuring static routes Static routes are manually l 2.7 Configuring IPv4
configured by the Static Routes
administrator to ensure l 2.8 Configuring IPv6
normal operation of simple Static Routes
networks and bandwidth for
important network
applications.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 49


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Scenario Description Task

Configuring fault detection In actual networking, static l 2.7.6 (Optional)


protocols for static routes routes are associated with Configuring Dynamic
fault detection protocols to BFD for IPv4 Static
improve network Routes
performance. l 2.7.7 (Optional)
l BFD for static routes: Configuring Static BFD
Unlike dynamic routing for IPv4 Static Routes
protocols, static routes l 2.8.4 (Optional)
do not have the detection Configuring Static BFD
mechanism. If a fault for IPv6 Static Routes
occurs on the network,
the administrator needs l 2.9.4 Example for
to rectify it. BFD for Configuring Dynamic
static routes enables a BFD for IPv6 Static
BFD session to detect the Routes
link status of the static l 2.7.9 (Optional)
route and performs Associating IPv4 Static
millisecond-level fault Routes with NQA
detection.
l NQA for static routes: In
actual networking, link
status must be detected
in real time to ensure
network stability, and a
link switchover can be
performed according to
link status changes. In
most cases, ARP and
BFD are used to detect
link status. IGP
convergence can also be
used. However, the
preceding solutions are
not applicable to the
following scenarios:
– If only one link rather
than links of every
user on the network
needs to be detected,
ARP detection is not
applicable.
– If any device on the
network does not
support BFD, BFD
detection cannot be
implemented.
– If either end of a link
is a Layer 2 device,

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 50


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Scenario Description Task

dynamic routing
protocols cannot be
configured and
therefore IGP
convergence cannot
be implemented.
NQA for static routes
only requires one end of
the interconnected
devices to support NQA
and can be used even if
there are Layer 2
devices. In this case, the
preceding issues are
resolved. When a link is
faulty, an NQA test
instance can immediately
detect the link change
and delete the static route
associated with the NQA
test instance from the IP
routing table, affecting
traffic forwarding.

Configuring FRR for static On traditional IP networks, l 2.7.8 (Optional)


routes it takes the routing system Configuring FRR for
several seconds to complete IPv4 Static Routes
route convergence after a l 2.8.5 (Optional)
link fault is detected. For Configuring FRR for
services that require low IPv6 Static Routes
delay and low packet loss
rate, the second-level
convergence time is
unacceptable as it may lead
to a service interruption. For
example, VoIP services can
tolerate only millisecond-
level network interruption.
When a fault is detected at
the physical layer or link
layer, FRR for static routes
implements millisecond-
level convergence, reducing
the impact on services.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 51


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

2.5 Licensing Requirements and Limitations for Static


Routes
Involved Network Elements
Other network elements are not required.

Licensing Requirements
Static routing is a basic feature of the CE8800, CE7800, CE6800, and CE5800 series switches
and is not under license control.

Version Requirements

Table 2-2 Products and minimum version supporting static routes

Product Minimum Version Required

CE8868EI V200R005C10

CE8861EI V200R005C10

CE8860EI V100R006C00

CE8850-32CQ-EI V200R002C50

CE8850-64CQ-EI V200R005C00

CE7850EI V100R003C00

CE7855EI V200R001C00

CE6810EI V100R003C00

CE6850EI V100R001C00

CE6850-48S6Q-HI V100R005C00

CE6850-48T6Q-HI/CE6850U-HI/ V100R005C10
CE6851HI

CE6855HI V200R001C00

CE6856HI V200R002C50

CE6857EI V200R005C10

CE6860EI V200R002C50

CE6865EI V200R005C00

CE6870-24S6CQ-EI/ V200R001C00
CE6870-48S6CQ-EI

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 52


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Product Minimum Version Required

CE6870-48T6CQ-EI V200R002C50

CE6875EI V200R003C00

CE6880EI V200R002C50

CE5880EI V200R005C10

CE5810EI V100R002C00

CE5850EI V100R001C00

CE5850HI V100R003C00

CE5855EI V100R005C10

Feature Limitations
During an upgrade from V200R001C00SPC100 to a later version, if a static route's next hop
is iterated to a remote VPN cross route and the next hop is a VXLAN tunnel, the static route
is inactive in the source version but will become active in the target version. This
modification will cause inconsistent traffic transmission paths before and after the upgrade.
To prevent this issue, check whether a static route's next hop is iterated to a remote VPN cross
route and the next hop is a VXLAN tunnel. If so, delete this static route.

The CE6810LI does not support IPv4 or IPv6 Layer 3 forwarding. After the IPv4 or IPv6
function is enabled on an interface of the CE6810LI, the configured IPv4 or IPv6 address can
only be used to manage the switch.

In versions earlier than V200R002C50, the CE5855EI does not support IPv6. However,
interfaces on the CE5855EI provide the IPv6 capability when the switch functions as a leaf
switch in a super virtual fabric (SVF) system and the SVF forwarding mode is set to
centralized or hybrid. In V200R002C50 and later versions, the CE5855EI supports IPv6.

2.6 Default Settings for Static Routes


Table 2-3 describes the default settings for static routes.

Table 2-3 Default settings for static routes

Parameter Default Setting

Static route preference 60

2.7 Configuring IPv4 Static Routes

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 53


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Pre-configuration Tasks
Before configuring IPv4 static routes, complete the following task:
l Configure link layer parameters and IP addresses for interfaces to ensure network-layer
communication between neighbor nodes.

Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying the IPv4
Static Route Configuration) in any sequence as required.

2.7.1 Creating IPv4 Static Routes

Context
When creating a static route, you can specify both the outbound interface and next hop.
Alternatively, you can specify only the outbound interface or next hop based on the outbound
interface type.
l Specify the outbound interface for a P2P interface.
l Specify the next hop for a non broadcast multiple access (NBMA) interface.
l Specify the next hop for a broadcast interface (for example, an Ethernet interface).
If you specify the same preference for static routes to the same destination, load balancing
among these routes is implemented. If you specify different preferences for static routes, route
backup among the routes is implemented.
If the destination IP address and mask are set to all 0s, an IPv4 static default route is
configured. By default, no IPv4 static default route is configured.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Configure IPv4 static routes.
l Run ip route-static ip-address { mask | mask-length } { nexthop-address | vpn-instance
vpn-instance-name nexthop-address } [ recursive-lookup host-route [ arp-vlink-
only ] ] [ preference preference | tag tag ] * [ bfd enable | track { bfd-session cfg-name
| nqa admin-name test-name } | inherit-cost | permanent ] [ description text ]
An IPv4 static route is configured on the public network.
l Run ip route-static ip-address { mask | mask-length } interface-type interface-number
[ nexthop-address ] [ preference preference | tag tag ] * [ bfd enable | track { bfd-
session cfg-name | nqa admin-name test-name } | permanent ] [ description text ]
An IPv4 static route is configured on the public network.
l Run ip route-static vpn-instance vpn-source-name destination-address { mask | mask-
length } interface-type interface-number [ nexthop-address ] [ preference preference |
tag tag ] * [ bfd enable | track { bfd-session cfg-name | nqa admin-name test-name } |
permanent ] [ description text ]
An IPv4 static route is configured in a VPN instance.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 54


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

l Run ip route-static vpn-instance vpn-source-name destination-address { mask | mask-


length } { vpn-instance vpn-destination-name nexthop-address | nexthop-address
[ public ] } [ recursive-lookup host-route [ arp-vlink-only ] ] [ preference preference |
tag tag ] * [ bfd enable | track { bfd-session cfg-name | nqa admin-name test-name } |
inherit-cost | permanent ] [ description text ]
An IPv4 static route is configured in a VPN instance.
Step 3 Run commit
The configuration is committed.

----End

2.7.2 (Optional) Setting the Default Preference for an IPv4 Static


Route
Context
The default preference of an IPv4 static route affects route selection. When an IPv4 static
route is configured, the default preference is used if no preference is specified for the static
route.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ip route-static default-preference preference
The default preference of static routes is set.
By default, the preference of static routes is 60.

NOTE

After the default preference is reconfigured, the new default preference is valid only for new IPv4 static
routes.

Step 3 Run commit


The configuration is committed.

----End

2.7.3 (Optional) Configuring Static Route Selection Based on


Iteration Depth
Context
Route iteration refers to the process of finding the directly-connected outbound interface
based on the next hop of a route. The iteration depth indicates the number of times the system
searches for routes. A smaller number of the times indicates a smaller iteration depth.
When there are multiple static routes with the same prefix but different iteration depths, the
system selects the static route with the smallest iteration depth as the active route and delivers

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 55


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

it to the FIB table after static route selection based on iteration depth is configured. The other
static routes then become inactive. A smaller iteration depth indicates a more stable route.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ip route-static selection-rule relay-depth

Static route selection based on iteration depth is configured.

By default, static routes are not selected based on iteration depth.

Step 3 Run commit

The configuration is committed.

----End

2.7.4 (Optional) Configuring a Device to Iterate Static Routes to


ARP Vlink Routes

Context
Configuring a device to iterate static routes to ARP Vlink routes prevents traffic loss caused
by a black-hole route in a scenario where a Layer 2 VPN accesses a Layer 3 VPN.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ip route recursive-lookup arp vlink-direct-route protocol static

The device is configured to iterate static routes to ARP Vlink routes.

By default, static routes cannot be iterated to ARP Vlink routes.

NOTE

To configure a device to iterate static routes to ARP Vlink routes, both the ip route-static with
recursive-lookup host-route [ arp-vlink-only ] specified and ip route recursive-lookup arp vlink-
direct-route protocol static commands must be run.

Step 3 Run commit

The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 56


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

2.7.5 (Optional) Enabling the Function of Comparing the Costs of


Inherited Routes During Static Route Selection
Context
By default, a device does not compare the costs of inherited routes during static route
selection, and static routes with different costs work in load-balancing mode. To enable the
device to compare the costs of inherited routes and select only the static route with the
smallest cost, configure the device to compare the costs of inherited routes during static route
selection.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ip route-static selection-rule compare-inherit-cost
The device is enabled to compare the costs of inherited routes during static route selection.
Step 3 Run commit
The configuration is committed.

----End

2.7.6 (Optional) Configuring Dynamic BFD for IPv4 Static Routes

Pre-configuration Tasks
Before configuring dynamic BFD for IPv4 static routes, complete the following task:
l Configure link layer parameters and IP addresses for interfaces to ensure that the link
layer protocol on the interfaces is Up.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run bfd
BFD is enabled globally.
Step 3 Run quit
Return to the system view.
Step 4 (Optional) Run ip route-static default-bfd [ min-rx-interval min-rx-interval ] [ min-tx-
interval min-tx-interval ] [ detect-multiplier multiplier ]
Global BFD parameters are configured for static routes.
By default, the values of min-rx-interval, min-tx-interval, and detect-multiplier are 1000
ms, 1000 ms, and 3 respectively.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 57


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Step 5 Run ip route-static bfd [ interface-type interface-number ] nexthop-address [ local-address


address ] [ min-rx-interval min-rx-interval | min-tx-interval min-tx-interval | detect-
multiplier multiplier ] *
BFD parameters are configured for an IPv4 static route.

NOTE

If interface-type interface-number is not specified, local-address address must be specified.


If none of min-rx-interval, min-tx-interval, and detect-multiplier is specified, the global default
values of BFD parameters are used.

Step 6 Run ip route-static ip-address { mask | mask-length } { nexthop-address | interface-type


interface-number [ nexthop-address ] } [ preference preference | tag tag ] * bfd enable
[ description text ]
A public network static IPv4 route is bound to a BFD session.

NOTE

When the type and number of the outbound interface of a static route are specified, and the VPN
instance name is specified, a static route searches the routing table of the VPN instance for an outbound
interface according to nexthop-address. Run the ip route-static vpn-instance vpn-source-name
destination-address { mask | mask-length } interface-type interface-number [ nexthop-address ]
[ preference preference | tag tag ] * bfd enable [ description text ] command to bind a dynamic BFD
session to static routes.

Step 7 Run commit


The configuration is committed.

----End

Verifying the Configuration


Run the following command to verify the configuration.
l Run the display bfd session { all | discriminator discr-value } [ verbose ] command to
check information about the BFD session.

2.7.7 (Optional) Configuring Static BFD for IPv4 Static Routes

Pre-configuration Tasks
Before configuring static BFD for IPv4 static routes, complete the following tasks:
l Configure link layer parameters and IP addresses for interfaces to ensure network-layer
communication between neighbor nodes.
l Configure BFD sessions.
For details, see "BFD Configuration" in the CloudEngine 8800, 7800, 6800, and 5800
Series Switches - Configuration Guide - Reliability.

Procedure
Step 1 Run system-view
The system view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 58


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Step 2 Run either of the following commands as required:


l Run ip route-static ip-address { mask | mask-length } { nexthop-address | interface-type
interface-number [ nexthop-address ] | vpn-instance vpn-instance-name nexthop-
address } track bfd-session cfg-name [ description text ]
A BFD session is bound to an IPv4 static route on the public network.
l Run ip route-static vpn-instance vpn-source-name destination-address { mask | mask-
length } { nexthop-address | interface-type interface-number [ nexthop-address ] | vpn-
instance vpn-instance-name nexthop-address } track bfd-session cfg-name
[ description text ]
A BFD session is bound to an IPv4 static route on the VPN network.
NOTE

Before binding a static route to a BFD session, ensure that the BFD session and the static route reside on
the same link.

Step 3 Run commit


The configuration is committed.

----End

Verifying the Configuration


Run the following commands to verify the configuration.
l Run the display bfd session all [ verbose ] command to check information about the
BFD session.

2.7.8 (Optional) Configuring FRR for IPv4 Static Routes

Pre-configuration Tasks
Before configuring FRR for IPv4 static routes, complete the following task:
l Configure link layer parameters and IP addresses for interfaces to ensure that the link
layer protocol on the interfaces is Up.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ip route-static frr [ vpn-instance vpn-instance-name ]
FRR is enabled for public network IPv4 static routes.

NOTE

FRR is implemented only on the static routes that are manually configured. That is, FRR cannot be
implemented on iterated next hops.
To implement route backup by configuring FRR for static routes, specify different preferences for these
static routes.
To enable FRR for an Ethernet interface's static route and other static routes, configure the outbound
interface and next hop.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 59


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Step 3 Run commit


The configuration is committed.

----End

Verifying the Configuration


Run the following commands to verify the configuration.
l Run the display ip routing-table verbose command to check detailed information about
the backup outbound interfaces and backup next hops of routes in the routing table.
l Run the display ip routing-table ip-address [ mask | mask-length ] [ longer-match ]
verbose command to check detailed information about the backup outbound interfaces
and backup next hops of the routes with specified destination address and mask in the
routing table.
l Run the display ip routing-table ip-address1 { mask1 | mask-length1 } ip-address2
{ mask2 | mask-length2 } verbose command to check detailed information about the
backup outbound interfaces and backup next hops of routes with specified IP address
range in the routing table.

2.7.9 (Optional) Associating IPv4 Static Routes with NQA

Pre-configuration Tasks
Before associating IPv4 static routes with NQA, complete the following task:
l Configure link layer parameters for interfaces to ensure that the link layer protocol on the
interfaces is Up.

Procedure
Step 1 Configure an ICMP NQA test instance.
1. Run system-view
The system view is displayed.
2. Run nqa test-instance admin-name test-name
An NQA test instance is created, and the view of the test instance is displayed.
3. Run test-type icmp
The test type is set to ICMP.

NOTE

When a static route is associated with an NQA test instance, only ICMP test instances are used to
test whether there are reachable routes between the source and destination.
4. Run destination-address ipv4 ip-address
The destination address is set.
In an NQA test instance, you can specify an NQA server by running the destination-
address command to configure a destination address for the NQA test instance.
5. (Optional) Run frequency interval

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 60


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

The interval for automatically performing an NQA test is set.


By default, no interval is set, that is, only one test is performed.
6. (Optional) Run probe-count number
The number of probes to be sent each time is set for the NQA test instance.
By default, the number of probes is 3.
By sending probes multiple times in an NQA test instance, you can accurately estimate
network quality based on the collected statistics.
7. Run start
The NQA test instance is started.
The start command can configure an NQA test instance to be started immediately, at a
specified time, after a specified delay, or every day. You can perform one of the
following operations as required:
– Run start now [ end { at [ yyyy/mm/dd ] hh:mm:ss | delay { seconds second |
hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ]
The NQA test instance is started immediately.
– Run start at [ yyyy/mm/dd ] hh:mm:ss [ end { at [ yyyy/mm/dd ] hh:mm:ss | delay
{ seconds second | hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ]
The NQA test instance is started at a specified time.
– Run start delay { seconds second | hh:mm:ss } [ end { at [ yyyy/mm/dd ] hh:mm:ss
| delay { seconds second | hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ]
The NQA test instance is started after a specified delay.
– Run start daily hh:mm:ss to hh:mm:ss [ begin { yyyy-mm-dd | yyyy/mm/dd } ]
[ end { yyyy-mm-dd | yyyy/mm/dd } ]
The NQA test instance is started every day.
8. Run commit
The configuration is committed.
9. Run quit
Return to the system view.
Step 2 Associate static routes with an NQA test instance.
1. Run ip route-static ip-address { mask | mask-length } { nexthop-address | interface-type
interface-number [ nexthop-address ] } [ preference preference | tag tag ] * track nqa
admin-name test-name [ description text ]
IPv4 static routes are associated with an NQA test instance.

NOTE

The destination address of an NQA test instance cannot be the destination address of an associated
static route.
If the static route associated with an NQA test instance is associated with another NQA test
instance, the static route is disassociated from the first NQA test instance.
2. Run commit
The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 61


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Verifying the Configuration


After IPv4 static routes are associated with NAQ, run the following commands to verify the
configuration.

l Run the display current-configuration | include nqa command to check the


configuration of association between static routes and NQA.
l Run the display nqa results [ collection ] [ test-instance admin-name test-name ]
command to check the NQA test result.
The NQA test result cannot be displayed automatically. You must run the display nqa
results command to view the NQA test result. By default, the command output shows
the results of the latest five NQA tests.

2.7.10 Verifying the IPv4 Static Route Configuration

Procedure
l Run the display static-route routing-table command to check information about static
routes.
l Run the display ip routing-table command to check brief information about the IPv4
routing table.
l Run the display ip routing-table verbose command to check detailed information about
the IPv4 routing table.

----End

2.8 Configuring IPv6 Static Routes

Pre-configuration Tasks
Before configuring IPv6 static routes, complete the following task:

l Configure link layer parameters and IPv6 addresses for interfaces to ensure network-
layer communication between neighbor nodes.

Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying the IPv6
Static Route Configuration) in any sequence as required.

2.8.1 Creating IPv6 Static Routes

Context
When creating IPv6 static routes, you can specify both the outbound interface and next hop.
Alternatively, you can specify only the outbound interface or next hop based on the outbound
interface type.
l Specify the outbound interface for a P2P interface.
l Specify the next hop for an NBMA interface.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 62


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

l Specify the outbound interface for a broadcast interface. If the next hop address is also
specified, it does not need to be a link-local address.
If you specify the same preference for IPv6 static routes to the same destination, load
balancing among these routes is implemented. If you specify different preferences for the
IPv6 static routes, route backup among the routes is implemented.
If the destination IP address and mask are set to all 0s, an IPv6 static default route is
configured. By default, no IPv6 static default route is configured.

NOTE

Before configuring IPv6 routes with prefixes longer than 64 bits on a switch, run the assign forward
ipv6 longer-mask resource command to specify the number of IPv6 addresses and routes with prefixes
longer than 64 bits supported by the switch.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Configure IPv6 static routes.
l Run ipv6 route-static dest-ipv6-address prefix-length { interface-type interface-number
[ nexthop-ipv6-address ] | vpn-instance vpn-instance-name nexthop-ipv6-address |
nexthop-ipv6-address } [ preference preference | tag tag ] * [ bfd enable | track { bfd-
session cfg-name | nqa admin-name test-name } ] [ description text ]
An IPv6 static route is configured on the public network.
l Run ipv6 route-static dest-ipv6-address prefix-length [ vpn-instance vpn-instance-
name ] nexthop-ipv6-address [ preference preference | tag tag ] * inherit-cost
[ description text ]
An IPv6 static route is configured on the public network.
l Run ipv6 route-static vpn-instance vpn-source-name dest-ipv6-address prefix-length
{ interface-type interface-number [ nexthop-ipv6-address ] | vpn-instance vpn-
destination-name nexthop-ipv6-address | nexthop-ipv6-address [ public ] } [ preference
preference | tag tag ] * [ bfd enable | track { bfd-session cfg-name | nqa admin-name
test-name } ] [ description text ]
An IPv6 static route is configured in a VPN instance.
l Run ipv6 route-static vpn-instance vpn-source-name dest-ipv6-address prefix-length
{ vpn-instance vpn-destination-name dest-ipv6-address | dest-ipv6-address [ public ] }
[ preference preference | tag tag ] * inherit-cost [ description text ]
An IPv6 static route is configured in a VPN instance.
Step 3 Run commit
The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 63


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

2.8.2 (Optional) Setting the Default Preference for IPv6 Static


Routes

Context
The default preference of IPv6 static routes affects route selection. When an IPv6 static route
is configured, the default preference is used if no preference is specified for the 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 IPv6 static routes is set.
By default, the preference of static routes is 60.
After the default preference is reconfigured, the new default preference is valid only for new
IPv6 static routes.
Step 3 Run commit
The configuration is committed.

----End

2.8.3 (Optional) Configuring Dynamic BFD for IPv6 Static Routes

Applicable Environment
Preferred IPv6 static routes are delivered to the forwarding table for packet forwarding. An
IPv6 static route, however, is incapable of detecting whether the link to the next hop is
working properly. Binding the IPv6 static route to a BFD session can address this problem,
because a BFD session is capable of detecting link changes and informing the routing
management module of the changes. If a BFD session detects that a link is interrupted, the
routing management module immediately withdraws the IPv6 static route that is bound to the
BFD session from the forwarding table and recalculates another active route. In this manner,
fast route convergence is implemented.

Pre-configuration Tasks
Before configuring dynamic BFD for IPv6 static routes, complete the following task:
l Configuring link layer protocol parameters and IPv6 addresses for interfaces to ensure
that the link layer protocol on the interfaces is Up

Procedure
Step 1 Run system-view
The system view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 64


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Step 2 Run bfd


Global BFD is enabled on the node.
Step 3 Run quit
Return to the system view.
Step 4 (Optional) Run ipv6 route-static default-bfd { min-rx-interval min-rx-interval | min-tx-
interval min-tx-interval | detect-multiplier multiplier }*
The global BFD parameters of the IPv6 static routes on the device are set.
The default values of the global BFD parameters min-rx-interval, min-tx-interval, and
multiplier are 1000 ms, 1000 ms, and 3 respectively.
Step 5 Run ipv6 route-static bfd [ interface-type interface-number ] nexthop-address [ local-
address ipv6-address ] [ detect-multiplier multiplier | min-rx-interval min-rx-interval | min-
tx-interval min-tx-interval ]*
The BFD parameters of an IPv6 static route are set.

NOTE

If interface-type interface-number is not set, local-address ipv6-address must be specified.


If none of min-rx-interval, min-tx-interval, and detect-multiplier is specified, the global default values of
the BFD parameters are used.

Step 6 Run ipv6 route-static dest-ipv6-address prefix-length { interface-type interface-number


[ nexthop-ipv6-address ] | vpn-instance vpn-instance-name nexthop-ipv6-address | nexthop-
ipv6-address } [ preference preference | tag tag ]* bfd enable [ description text ]
A BFD session is bound to an IPv6 static route.

NOTE

When the type and number of the outbound interface of a static route are specified, and the VPN
instance name is specified, a static route searches the routing table of the VPN instance for an outbound
interface according to nexthop-address. Run the ipv6 route-static vpn-instance vpn-source-name dest-
ipv6-address prefix-length { interface-type interface-number [ nexthop-ipv6-address ] | vpn-instance
vpn-destination-name nexthop-ipv6-address | nexthop-ipv6-address [ public ] } [ preference preference |
tag tag ]* bfd enable [ description text ] command to bind a dynamic BFD session to static routes.

Step 7 Run commit


The configuration is committed.

----End

Verifying the Configuration


Information about a BFD session can be viewed only after the parameters of the BFD session
are set and the BFD session is established.
Run the following commands to check the previous configuration.
l Run the display bfd session { all | discriminator discr-value } [ verbose ] command to
check information about BFD sessions.
l Run the display current-configuration | include bfd command to check configurations
of BFD for IPv6 static routes.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 65


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

2.8.4 (Optional) Configuring Static BFD for IPv6 Static Routes

Usage Scenario
To use BFD sessions to provide link detection for IPv6 static routes, you can bind IPv6 static
routes to BFD sessions. One IPv6 static route can be bound to one BFD session.

Optimal IPv6 static routes are delivered to the forwarding table for packet forwarding.
However, IPv6 static routes cannot detect the status of the link to the next hop. You can bind
IPv6 static routes to BFD sessions. A BFD session can quickly detect changes over a link and
inform the routing management system of the changes. The routing management system
immediately deletes the static route that is bound to the BFD session from the forwarding
table and recalculates another active route. In this manner, fast route convergence is
implemented.

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

l Configure link layer protocol parameters and IP addresses for interfaces and ensure that
the link layer protocol on the interfaces is Up.
l Configure a BFD Session. For details, see "BFD Configuration" in the CloudEngine
8800, 7800, 6800, and 5800 Series Switches Configuration Guide-Reliability

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run either of the following commands as required:


l Run ipv6 route-static dest-ipv6-address prefix-length { interface-type interface-number
[ nexthop-ipv6-address ] | vpn-instance vpn-instance-name nexthop-ipv6-address |
nexthop-ipv6-address } [ preference preference | tag tag ] * track bfd-session cfg-name
[ description text ]
A BFD session is bound to an IPv6 static route on the public network.
l Run ipv6 route-static vpn-instance vpn-source-name dest-ipv6-address prefix-length
{ interface-type interface-number [ nexthop-ipv6-address ] | vpn-instance vpn-
destination-name nexthop-ipv6-address | nexthop-ipv6-address [ public ] } [ preference
preference | tag tag ]* track bfd-session cfg-name [ description text ]
A BFD session is bound to an IPv6 static route on the VPN network.

Step 3 Run commit

The configuration is committed.

----End

Verifying the Configuration


Run the following commands to verify the configuration.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 66


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Information about a BFD session can be viewed only after parameters of the BFD session are
set and the BFD session is established.

l Run the display bfd session { all | discriminator discr-value } [ verbose ] command to
check information about BFD sessions.
l Run the display current-configuration | include bfd command to check configurations
of BFD for IPv6 static routes.

2.8.5 (Optional) Configuring FRR for IPv6 Static Routes

Pre-configuration Tasks
Before configuring FRR for IPv6 static routes, complete the following task:

l Configure link layer parameters and IPv6 addresses for interfaces to ensure that the link
layer protocol on the interfaces is Up.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ipv6 route-static frr

FRR is enabled for public network IPv6 static routes.

NOTE

To implement route backup by configuring FRR for ipv6 static routes, specify different preferences for
these static routes.

Step 3 Run commit

The configuration is committed.

----End

Verifying the Configuration


Run the display ipv6 routing-table verbose command to check information about the backup
outbound interfaces and backup next hops of static routes in the routing table.

2.8.6 (Optional) Associating IPv6 Static Routes with NQA

Pre-configuration Tasks
Before associating IPv6 static routes with NQA, complete the following task:

l Configure link layer parameters and IPv6 addresses for interfaces to ensure that the link
layer protocol on the interfaces is Up.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 67


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Procedure
Step 1 Configure an ICMP NQA test instance.
1. Run system-view

The system view is displayed.


2. Run nqa test-instance admin-name test-name

An NQA test instance is created, and the view of the test instance is displayed.
3. Run test-type icmp

The test type is set to ICMP.


4. Run destination-address ipv6 ipv6-address

A destination address is configured.

In an NQA test instance, you can specify an NQA server by running the destination-
address command to configure a destination address for the NQA test instance.
5. (Optional) Run frequency interval

The interval for automatically performing an NQA test is set.

By default, no interval is set, that is, only one test is performed.


6. (Optional) Run probe-count number

The number of probes to be sent each time is set for the NQA test instance.

By default, the number of probes is 3.

By sending probes multiple times in an NQA test instance, you can accurately estimate
network quality based on the collected statistics.
7. (Optional) Run interval seconds interval

The interval at which probe packets are sent is set.

The default interval is 4 seconds for an NQA ICMP test instance.

Set the interval based on network quality:


– If network quality is unsatisfactory, increase the interval to prevent network
deterioration caused during the operation of test instances.
– If network quality is satisfactory, decrease the interval to accelerate the running
speed of test instances.
8. (Optional) Run timeout time

A timeout period is set for the NQA test instance.

The default timeout period is 3 seconds.


9. (Optional) Run fail-percent percent

A probe failure percentage is set for the NQA test instance.

The default probe failure percentage is 100%. That is, the test is considered failed only
when all probes fail. You can set a probe failure percentage based on network quality.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 68


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

NOTE

no result may be returned if the following condition is met:


Interval at which the NQA test is automatically performed ≤ Interval at which probe packets are
sent x (Number of sent packets - 1) + Timeout period
The number of packets sent in an NQA ICMP test instance is the number of probes specified using
the probe-count number command.
10. Run start

The NQA test instance is started.

The start command can configure an NQA test instance to be started immediately, at a
specified time, or after a specified delay. You can perform one of the following
operations as required:
– Run start now [ end { at [ yyyy/mm/dd ] hh:mm:ss | delay { seconds second |
hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ]
The NQA test instance is started immediately.
– Run start at [ yyyy/mm/dd ] hh:mm:ss [ end { at [ yyyy/mm/dd ] hh:mm:ss | delay
{ seconds second | hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ]
The NQA test instance is started at a specified time.
– Run start delay { seconds second | hh:mm:ss } [ end { at [ yyyy/mm/dd ] hh:mm:ss
| delay { seconds second | hh:mm:ss } | lifetime { seconds second | hh:mm:ss } } ]
The NQA test instance is started after a specified delay.
– Run start daily hh:mm:ss to hh:mm:ss [ begin { yyyy-mm-dd | yyyy/mm/dd } ]
[ end { yyyy-mm-dd | yyyy/mm/dd } ]
The NQA test instance is started every day.
11. Run commit

The configuration is committed.


12. Run quit

Return to the system view.

Step 2 Associate static routes with an NQA test instance.


1. Run ipv6 route-static dest-ipv6-address prefix-length { interface-type interface-number
[ nexthop-ipv6-address ] | vpn-instance vpn-instance-name nexthop-ipv6-address |
nexthop-ipv6-address } [ preference preference | tag tag ]* track nqa admin-name test-
name [ description text ]

IPv6 static routes are associated with an NQA test instance.

NOTE

The destination address of an NQA test instance cannot be the destination address of an associated
IPv6 static route.
If the IPv6 static route associated with an NQA test instance is associated with another NQA test
instance, the IPv6 static route is disassociated from the first NQA test instance.
2. Run commit

The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 69


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Verifying the Configuration


After IPv6 static routes are associated with NAQ, run the following commands to verify the
configuration.
l Run the display current-configuration | include nqa command to check the
configuration of association between static routes and NQA.
l Run the display nqa results [ test-instance admin-name test-name ] command to check
the NQA test result.
The NQA test result cannot be displayed automatically. You must run the display nqa
results command to view the NQA test result. By default, the command output shows
the results of the latest five NQA tests.

2.8.7 Verifying the IPv6 Static Route Configuration


Procedure
l Run the display static-route ipv6 routing-table command to check information about
IPv6 static routes.
l Run the display ipv6 routing-table command to check brief information about the IPv6
routing table.
l Run the display ipv6 routing-table verbose command to check detailed information
about the IPv6 routing table.
----End

2.9 Configuration Examples for Static Routes


This section only provides configuration examples for individual features. For details about
multi-feature configuration examples, feature-specific configuration examples, interoperation
examples, protocol or hardware replacement examples, and industry application examples, see
the Typical Configuration Examples.

2.9.1 Example for Configuring IPv4 Static Routes


Networking Requirements
Servers on different network segments are connected using several Switchs. Every two
servers on different network segments can communicate with each other without using
dynamic routing protocols.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 70


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Figure 2-6 Networking diagram for configuring IPv4 static routes


Server2
[Link]/24
10GE1/0/3
VLANIF40
10GE1/0/1 [Link]/24
10GE1/0/2
VLANIF10 VLANIF20
[Link]/30 [Link]/30
SwitchB
SwitchA SwitchC
10GE1/0/1 10GE1/0/1
VLANIF10 VLANIF20
[Link]/30 [Link]/30
10GE1/0/2 10GE1/0/2
VLANIF30 VLANIF50
[Link]/24 Server1 Server3 [Link]/24
[Link]/24 [Link]/24

Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs, add interfaces to the VLANs, and assign IPv4 addresses to VLANIF
interfaces so that directly-connected interfaces can communicate with each other.
2. Configure the IPv4 default gateway on each server, and configure IPv4 static routes and
default routes on each Switch so that servers on different network segments can
communicate with each other.

Procedure
Step 1 Create VLANs and add interfaces to the VLANs.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan 10
[*SwitchA-vlan10] quit
[*SwitchA] vlan 30
[*SwitchA-vlan30] quit
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port default vlan 30
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit

The configurations of SwitchB and SwitchC are similar to that of SwitchA, and are not
mentioned here.
Step 2 Assign IPv4 addresses to the VLANIF interfaces.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ip address [Link] 30
[*SwitchA-Vlanif10] quit
[*SwitchA] interface vlanif 30

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 71


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

[*SwitchA-Vlanif30] ip address [Link] 24


[*SwitchA-Vlanif30] quit
[*SwitchA] commit

The configurations of SwitchB and SwitchC are similar to that of SwitchA, and are not
mentioned here.

Step 3 Configure servers.

Set the Server1 default gateway to [Link], the Server2 default gateway to [Link], and the
Server3 default gateway to [Link].

Step 4 Configure static routes.

# Configure an IPv4 default route on SwitchA.


[~SwitchA] ip route-static [Link] [Link] [Link]
[*SwitchA] commit

# Configure two IPv4 static routes on SwitchB.


[~SwitchB] ip route-static [Link] [Link] [Link]
[*SwitchB] ip route-static [Link] [Link] [Link]
[*SwitchB] commit

# Configure an IPv4 default route on SwitchC.


[~SwitchC] ip route-static [Link] [Link] [Link]
[*SwitchC] commit

Step 5 Verify the configuration.

# Check the IP routing table on SwitchA.


[~SwitchA] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R - relay, D - download to fib, T - to vpn-instance
------------------------------------------------------------------------------
Routing Table: _public_
Destinations : 10 Routes : 10

Destination/Mask Proto Pre Cost Flags NextHop Interface

[Link]/0 Static 60 0 RD [Link] Vlanif10


[Link]/24 Direct 0 0 D [Link] Vlanif30
[Link]/32 Direct 0 0 D [Link] Vlanif30
[Link]/30 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/8 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0

# Run the ping command to verify the connectivity.


[~SwitchA] ping [Link]
PING [Link]: 56 data bytes, press CTRL_C to break
Reply from [Link]: bytes=56 Sequence=1 ttl=254 time=62 ms
Reply from [Link]: bytes=56 Sequence=2 ttl=254 time=63 ms
Reply from [Link]: bytes=56 Sequence=3 ttl=254 time=63 ms
Reply from [Link]: bytes=56 Sequence=4 ttl=254 time=62 ms
Reply from [Link]: bytes=56 Sequence=5 ttl=254 time=62 ms

--- [Link] ping statistics ---


5 packet(s) transmitted
5 packet(s) received

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 72


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

0.00% packet loss


round-trip min/avg/max = 62/62/63 ms

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10 30
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif30
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port default vlan 30
#
ip route-static [Link] [Link] [Link]
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 10 20 40
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif20
ip address [Link] [Link]
#
interface Vlanif40
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/3
port default vlan 40
#
ip route-static [Link] [Link] [Link]
ip route-static [Link] [Link] [Link]
#
return

l Configuration file of SwitchC


#
sysname SwitchC
#
vlan batch 20 50
#
interface Vlanif20

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 73


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

ip address [Link] [Link]


#
interface Vlanif50
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/2
port default vlan 50
#
ip route-static [Link] [Link] [Link]
#
return

2.9.2 Example for Configuring IPv6 Static Routes

Networking Requirements
On an IPv6 network, hosts on different network segments are connected through several
Switches. Every two hosts on different network segments can communicate with each other
without using dynamic routing protocols.

Figure 2-7 Networking diagram for configuring IPv6 static routes


PC2
FC00:0:0:2002::2/64
10GE1/0/3
VLANIF30
FC00:0:0:2002::1/64
10GE1/0/1 10GE1/0/2
VLANIF20 VLANIF40
FC00:0:0:2004::2/64 FC00:0:0:2005::2/64
SwitchA SwitchB
SwitchC
10GE1/0/1 10GE1/0/1
10GE1/0/2 VLANIF20 VLANIF40
FC00:0:0:2004::1/64
VLANIF10 FC00:0:0:2005::1/64 10GE1/0/2
FC00:0:0:2001::1/64 VLANIF50
FC00:0:0:2003::1/64
PC1 PC3
FC00:0:0:2001::2/64 FC00:0:0:2003::2/64

Configuration Roadmap
The configuration roadmap is as follows:

1. Create VLANs, add interfaces to the VLANs, and assign IPv6 addresses to VLANIF
interfaces so that devices can communicate with each other.
2. Configure the IPv6 default gateway on each host, and configure IPv6 static routes and
default static routes on each Switch so that hosts on different network segments can
communicate with each other without using dynamic routing protocols.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 74


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Procedure
Step 1 Add interfaces to VLANs.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*SwitchA] vlan batch 10 20
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/2] commit
[~SwitchA-10GE1/0/2] quit
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 20
[*SwitchA-10GE1/0/1] commit
[~SwitchA-10GE1/0/1] quit

The configurations of SwitchB and SwitchC are similar to that of SwitchA. The detailed
configurations are not mentioned here.
Step 2 Assign IP addresses to the VLANIF interfaces.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ipv6 enable
[*SwitchA-Vlanif10] ipv6 address fc00:0:0:2001::1/64
[*SwitchA-Vlanif10] commit
[~SwitchA-Vlanif10] quit
[~SwitchA] interface vlanif 20
[*SwitchA-Vlanif20] ipv6 enable
[*SwitchA-Vlanif20] ipv6 address fc00:0:0:2004::1/64
[*SwitchA-Vlanif20] commit
[~SwitchA-Vlanif20] quit

The configurations of SwitchB and SwitchC are similar to that of SwitchA. The detailed
configurations are not mentioned here.
Step 3 Configure the host addresses and gateways.
Configure an IPv6 address for each host according to the networking diagram. Configure the
default gateway of PC1 to FC00:0:0:2001::1, that of PC2 to FC00:0:0:2002::1, and that of
Host3 to FC00:0:0:2003::1.
Step 4 Configure static IPv6 routes.

# Configure a default IPv6 route on SwitchA.


[~SwitchA] ipv6 route-static :: 0 vlanif20 fc00:0:0:2004::2
[*SwitchA] commit

# Configure two IPv6 static routes on SwitchB.


[~SwitchB] ipv6 route-static fc00:0:0:2001:: 64 vlanif20 fc00:0:0:2004::1
[*SwitchB] ipv6 route-static fc00:0:0:2003:: 64 vlanif40 fc00:0:0:2005::1
[*SwitchB] commit

# Configure a default IPv6 route on SwitchC.


[~SwitchC] ipv6 route-static :: 0 vlanif40 FC00:0:0:2005::2
[*SwitchC] commit

Step 5 Verify the configuration.


# Check the IPv6 routing table on SwitchA.
[~SwitchA] display ipv6 routing-table
Route

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 75


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Flags: R - relay, D - download to fib, B - black hole


route
---------------------------------------------------------------------------------
Routing Table :
_public_

Destinations : 6 Routes :
6

Destination : :: PrefixLength :
0
NextHop : FC00:0:0:2004::2 Preference :
60
Cost : 0 Protocol :
Static
RelayNextHop : :: TunnelID :
0x0
Interface : Vlanif20 Flags :
D

Destination : FC00:0:0:2001:: PrefixLength :


64
NextHop : FC00:0:0:2001::1 Preference :
0
Cost : 0 Protocol :
Direct
RelayNextHop : :: TunnelID :
0x0
Interface : Vlanif10 Flags :
D

Destination : FC00:0:0:2001::1 PrefixLength :


128
NextHop : ::1 Preference :
0
Cost : 0 Protocol :
Direct
RelayNextHop : :: TunnelID :
0x0
Interface : Vlanif10 Flags :
D

Destination : FC00:0:0:2004:: PrefixLength :


64
NextHop : FC00:0:0:2004::1 Preference :
0
Cost : 0 Protocol :
Direct
RelayNextHop : :: TunnelID :
0x0
Interface : Vlanif20 Flags :
D

Destination : FC00:0:0:2004::1 PrefixLength :


128
NextHop : ::1 Preference :
0
Cost : 0 Protocol :
Direct
RelayNextHop : :: TunnelID :
0x0
Interface : Vlanif20 Flags :
D

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 76


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Destination : FE80:: PrefixLength :


10
NextHop : :: Preference :
0
Cost : 0 Protocol :
Direct
RelayNextHop : :: TunnelID :
0x0
Interface : NULL0 Flags : D

# Run the ping command.


[~SwitchA] ping ipv6 fc00:0:0:2003::1
PING FC00:0:0:2003::1 : 56 data bytes, press CTRL_C to break
Reply from FC00:0:0:2003::1
bytes=56 Sequence=1 hop limit=63 time = 63 ms
Reply from FC00:0:0:2003::1
bytes=56 Sequence=2 hop limit=63 time = 62 ms
Reply from FC00:0:0:2003::1
bytes=56 Sequence=3 hop limit=63 time = 62 ms
Reply from FC00:0:0:2003::1
bytes=56 Sequence=4 hop limit=63 time = 63 ms
Reply from FC00:0:0:2003::1
bytes=56 Sequence=5 hop limit=63 time = 63 ms

--- fc00:0:0:2003::1 ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 62/62/63 ms

# Run the tracert command.


[~SwitchA] tracert ipv6 fc00:0:0:2003::1
traceroute to FC00:0:0:2003::1 30 hops max,60 bytes packet
1 FC00:0:0:2004::2 31 ms 32 ms 31 ms
2 FC00:0:0:2003::1 62 ms 63 ms 62 ms

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10 20
#
interface Vlanif10
ipv6 enable
ipv6 address FC00:0:0:2001::1/64
#
interface Vlanif20
ipv6 enable
ipv6 address FC00:0:0:2004::1/64
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 10
#
ipv6 route-static :: 0 vlanif20 FC00:0:0:2004::2
#
return

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 77


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 20 30 40
#
interface Vlanif20
ipv6 enable
ipv6 address FC00:0:0:2004::2/64
#
interface Vlanif30
ipv6 enable
ipv6 address FC00:0:0:2002::1/64
#
interface Vlanif40
ipv6 enable
ipv6 address FC00:0:0:2005::2/64
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 30
#
ipv6 route-static FC00:0:0:2001:: 64 Vlanif20 FC00:0:0:2004::1
ipv6 route-static FC00:0:0:2003:: 64 Vlanif40 FC00:0:0:2005::1
#
return

l Configuration file of SwitchC


#
sysname SwitchC
#
vlan batch 40 50
#
interface Vlanif40
ipv6 enable
ipv6 address FC00:0:0:2005::1/64
#
interface Vlanif50
ipv6 enable
ipv6 address FC00:0:0:2003::1/64
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 40
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 50
#
ipv6 route-static :: 0 Vlanif40 FC00:0:0:2005::2
#
return

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 78


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

2.9.3 Example for Configuring Dynamic BFD for IPv4 Static


Routes
Networking Requirements
As shown in Figure 2-8, a static route with destination address [Link]/24 is configured on
SwitchA, and a static route with destination address [Link]/24 is configured on SwitchB. To
improve convergence speed, users require link faults between SwitchA and SwitchB to be
detected at the millisecond level.

Figure 2-8 Networking diagram for configuring dynamic BFD for IPv4 static routes
10GE1/0/2 10GE1/0/1 10GE1/0/1 10GE1/0/2
VLANIF20 VLANIF10 VLANIF10 VLANIF30
[Link]/24 [Link]/24 [Link]/24 [Link]/24

SwitchA SwitchB

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure dynamic BFD for IPv4 static routes to implement millisecond-level link fault
detection between SwitchA and SwitchB. This configuration can improve convergence
speed of static routes.

Procedure
Step 1 Add interfaces to VLANs.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan 10
[*SwitchA-vlan10] quit
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA] vlan 20
[*SwitchA-vlan20] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 20
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit

The configuration of SwitchB is similar to that of SwitchA, and is not mentioned here.
Step 2 Assign IP addresses to the VLANIF interfaces.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ip address [Link] 24
[*SwitchA-Vlanif10] quit
[*SwitchA] interface vlanif 20
[*SwitchA-Vlanif20] ip address [Link] 24
[*SwitchA-Vlanif20] quit
[*SwitchA] commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 79


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

The configuration of SwitchB is similar to that of SwitchA, and is not mentioned here.
Step 3 Configure static routes.
# Configure a static route to [Link]/24 on SwitchA.
[~SwitchA] ip route-static [Link] 24 [Link]
[*SwitchA] commit

# Configure a static route to [Link]/24 on SwitchB.


[~SwitchB] ip route-static [Link] 24 [Link]
[*SwitchB] commit

Step 4 Configure dynamic BFD for static routes.


# Bind a static route to a BFD session on SwitchA.
[~SwitchA] bfd
[*SwitchA-bfd] quit
[*SwitchA] ip route-static bfd [Link] local-address [Link]
[*SwitchA] ip route-static [Link] 24 [Link] bfd enable
[*SwitchA] commit

# Bind a static route to a BFD session on SwitchB.


[~SwitchB] bfd
[*SwitchB-bfd] quit
[*SwitchB] ip route-static bfd [Link] local-address [Link]
[*SwitchB] ip route-static [Link] 24 [Link] bfd enable
[*SwitchB] commit

Step 5 Verify the configuration.


# When the configuration is complete, run the display bfd session all verbose command on
SwitchA and SwitchB. The command output shows that the BFD session is established, the
BFD session status is Up, and static routes are bound to BFD sessions.
Take the display on SwitchA as an example.
[~SwitchA] display bfd session all verbose
(w): State in WTR
(*): State is invalid
Total UP/DOWN Session Number : 1/0
--------------------------------------------------------------------------------
Name : dyn_16390 (Multiple Hops) State : Up
--------------------------------------------------------------------------------
Local Discriminator : 16390 Remote Discriminator : 16388
Session Detect Mode : Asynchronous Mode Without Echo Function
BFD Bind Type : Peer IP Address
Bind Session Type : Dynamic
Bind Peer IP Address : [Link]
Bind Interface : -
Bind Source IP Address : [Link]
FSM Board ID : 1 ToS-EXP : 7
Min Tx Interval (ms) : 1000 Min Rx Interval (ms) : 1000
Actual Tx Interval (ms): 1000 Actual Rx Interval (ms): 1000
WTR Interval (ms) : - Detect Interval (ms) : 3000
Local Detect Multi : 3 Active Multi : 3
Destination Port : 4784 TTL : 253
Process PST : Disable Config PST : Disable
Last Local Diagnostic : No Diagnostic
Bind Application : STATICRT
Session Description : -
--------------------------------------------------------------------------------

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 80


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10 20
#
bfd
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif20
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
ip route-static bfd [Link] local-address [Link]
ip route-static [Link] [Link] [Link] bfd enable
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 10 30
#
bfd
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif30
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
ip route-static bfd [Link] local-address [Link]
ip route-static [Link] [Link] [Link] bfd enable
#
return

2.9.4 Example for Configuring Dynamic BFD for IPv6 Static


Routes
Networking Requirements
As shown in Figure 2-9, SwitchA and SwitchB connect to each other and have static routes
configured between them. Customers require that a link fault between SwitchA and SwitchB
be detected within milliseconds and SwitchA and SwitchB dynamically update their routing
tables.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 81


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Figure 2-9 Networking diagram for configuring dynamic BFD for IPv6 static routes
10GE1/0/2 10GE1/0/1 10GE1/0/2
FC00:0:0:2007::1/64 FC00:0:0:2200::1/64 FC00:0:0:2008::1/64

SwitchA 10GE1/0/1 SwitchB


FC00:0:0:2200::2/64

Configuration Roadmap
To meet the preceding requirement, configure dynamic BFD for IPv6 static routes. The
configuration roadmap is as follows:
1. Configure dynamic BFD for IPv6 static routes so that link faults between SwitchA and
SwitchB can be detected within milliseconds to speed up route convergence.

Procedure
Step 1 Configure IPv6 addresses for interfaces. The configuration details are not provided here.

Step 2 Configure static IPv6 routes.


# Configure a static route destined for FC00:0:0:2008::1/64 on SwitchA.
[~SwitchA] ipv6 route-static fc00:0:0:2008:: 64 fc00:0:0:2200::2
[*SwitchA] commit

# Configure a static route destined for FC00:0:0:2007::1/64 on SwitchB.


[~SwitchB] ipv6 route-static fc00:0:0:2007:: 64 fc00:0:0:2200::1
[*SwitchB] commit

Step 3 Configure dynamic BFD for IPv6 static routes.


# Bind the static route to a BFD session on SwitchA.
[~SwitchA] bfd
[*SwitchA-bfd] quit
[*SwitchA] ipv6 route-static bfd fc00:0:0:2200::2 local-address fc00:0:0:2200::1
[*SwitchA] ipv6 route-static fc00:0:0:2008:: 64 fc00:0:0:2200::2 bfd enable
[*SwitchA] commit

# Bind the static route to a BFD session on SwitchB.


[~SwitchB] bfd
[*SwitchB-bfd] quit
[*SwitchB] ipv6 route-static bfd fc00:0:0:2200::1 local-address fc00:0:0:2200::2
[*SwitchB] ipv6 route-static fc00:0:0:2007:: 64 fc00:0:0:2200::1 bfd enable
[*SwitchB] commit

Step 4 Verify the configuration.


# After the configurations are complete, run the display bfd session all verbose command on
SwitchA or SwitchB. You can view that the BFD session is established and in Up state. The
static route is bound to the BFD session.
Take the display information on SwitchA as an example. The command output shows that a
BFD session is set up.
<SwitchA> display bfd session all verbose

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 82


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

(w): State in WTR


(*): State is invalid
Total UP/DOWN Session Number : 1/0
--------------------------------------------------------------------------------
Name : dyn_16385 (Multiple Hops) State : Up
--------------------------------------------------------------------------------
Local Discriminator : 16385 Remote Discriminator : 16385
Session Detect Mode : Asynchronous Mode Without Echo Function
BFD Bind Type : Peer IP Address
Bind Session Type : Dynamic
Bind Peer IP Address : FC00:0:0:2200::2
Bind Interface : -
Bind Source IP Address : FC00:0:0:2200::1
FSM Board ID : 3 ToS-EXP : 6
Min Tx Interval (ms) : 1000 Min Rx Interval (ms) : 1000
Actual Tx Interval (ms): 1000 Actual Rx Interval (ms): 1000
WTR Interval (ms) : - Detect Interval (ms) : -
Local Detect Multi : 3 Active Multi : -
Destination Port : 4784 TTL : 253
Process PST : Disable Config PST : Disable
Last Local Diagnostic : No Diagnostic
Bind Application : STATICRTV6
Session Description : -
--------------------------------------------------------------------------------

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
bfd
#
interface 10GE1/0/1
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:2200::1/64
#
interface 10GE1/0/2
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:2007::1/64
#
ipv6 route-static bfd FC00:0:0:2200::2 local-address FC00:0:0:2200::1
ipv6 route-static FC00:0:0:2008:: 64 FC00:0:0:2200::2 bfd enable
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
bfd
#
interface 10GE1/0/1
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:2200::2/64
#
interface 10GE1/0/2
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:2008::1/64
#
ipv6 route-static bfd FC00:0:0:2200::1 local-address FC00:0:0:2200::2
ipv6 route-static FC00:0:0:2007:: 64 FC00:0:0:2200::1 bfd enable

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 83


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

#
return

2.9.5 Example for Configuring Static BFD for IPv4 Static Routes
Networking Requirements
As shown in Figure 2-10, you can configure the default static route on SwitchA so that
SwitchA can connect to the external network. Millisecond-level link fault detection must be
implemented between SwitchA and SwitchB to improve convergence speed.

Figure 2-10 Networking diagram for configuring static BFD for static routes
10GE1/0/1 10GE1/0/1 10GE1/0/2
VLANIF10 VLANIF10 VLANIF20
[Link]/24 [Link]/24 [Link]/24

SwitchA SwitchB

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a BFD session between SwitchA and SwitchB.
2. Configure a default route from SwitchA to another device and bind a BFD session to the
default route. This configuration can implement millisecond-level link fault detection
and improve convergence speed of static routes.

Procedure
Step 1 Create VLANs, add interfaces to the VLANs, and assign IP addresses to the VLANIF
interfaces. (Details are not mentioned here.)
Step 2 Configure device names. (Details are not mentioned here.)

Step 3 Configure a BFD session between SwitchA and SwitchB.


# Create a BFD session on SwitchA.
<SwitchA> system-view
[~SwitchA] bfd
[*SwitchA-bfd] quit
[*SwitchA] bfd aa bind peer-ip [Link]
[*SwitchA-bfd-session-aa] discriminator local 10
[*SwitchA-bfd-session-aa] discriminator remote 20
[*SwitchA-bfd-session-aa] commit
[~SwitchA-bfd-session-aa] quit

# Create a BFD session on SwitchB.


<SwitchB> system-view
[~SwitchB] bfd
[*SwitchB-bfd] quit
[*SwitchB] bfd bb bind peer-ip [Link]
[*SwitchB-bfd-session-bb] discriminator local 20
[*SwitchB-bfd-session-bb] discriminator remote 10

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 84


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

[*SwitchB-bfd-session-bb] commit
[~SwitchB-bfd-session-bb] quit

Step 4 Configure a default static route and bind a BFD session to the default static route.
# Configure a default static route to the external network on SwitchA and bind the default
static route to the BFD session named aa.
[~SwitchA] ip route-static [Link] 0 [Link] track bfd-session aa
[*SwitchA] commit

Step 5 Verify the configuration.


# After the configuration is complete, run the display bfd session all command on SwitchA
and SwitchB. The command output shows that the BFD session has been established and its
status is Up. Run the display current-configuration | include bfd command. The command
output shows that the BFD session has been bound to the static route.
Take the display information on SwitchA as an example.
[~SwitchA] display bfd session all
S: Static session
D: Dynamic session
IP: IP session
IF: Single-hop session
PEER: Multi-hop session
AUTO: Automatically negotiated session
--------------------------------------------------------------------------------
Local Remote PeerIpAddr State Type InterfaceName
--------------------------------------------------------------------------------
10 20 [Link] Up S/IP-PEER -
--------------------------------------------------------------------------------
[~SwitchA] display current-configuration | include bfd
bfd
bfd aa bind peer-ip [Link]
ip route-static [Link] [Link] [Link] track bfd-session aa

# Check the IP routing table on SwitchA, and you can find that the static route exists in the
routing table.
[~SwitchA] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table: _Public_
Destinations : 3 Routes : 3
Destination/Mask Proto Pre Cost Flags NextHop Interface
[Link]/0 Static 60 0 RD [Link] Vlanif10
[Link]/24 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] Vlanif10

Run the shutdown command on 10GE1/0/1 of SwitchB to simulate a link fault.


[~SwitchB] interface 10GE 1/0/1
[~SwitchB-10GE1/0/1] shutdown
[*SwitchB-10GE1/0/1] commit

# Check the routing table on SwitchA, and you can find that the default static route [Link]/0
does not exist. This is because when the default static route is bound to a BFD session, BFD
rapidly notifies that the bound static route is unavailable after BFD detects a link fault.
[~SwitchA] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 85


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Routing Table: _Public_


Destinations : 2 Routes : 2
Destination/Mask Proto Pre Cost Flags NextHop Interface
[Link]/24 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] Vlanif10

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10
#
bfd
#
interface Vlanif10
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
ip route-static [Link] [Link] [Link] track bfd-session aa
#
bfd aa bind peer-ip [Link]
discriminator local 10
discriminator remote 20
#
return
l Configuration file of SwitchB
#
sysname SwitchB
#
vlan batch 10 20
#
bfd
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif20
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
bfd bb bind peer-ip [Link]
discriminator local 20
discriminator remote 10
#
return

2.9.6 Example for Configuring Static BFD for IPv6 Static Routes
Networking Requirements
As shown in Figure 2-11, SwitchA and SwitchB connect to each other and have static routes
configured between them. Customers require that a link fault between SwitchA and SwitchB

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 86


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

be detected within milliseconds and SwitchA and SwitchB dynamically update their routing
tables.

Figure 2-11 Networking diagram for configuring static BFD for IPv6 static routes
10GE1/0/1 10GE1/0/2
FC00:0:0:2001::1/64 FC00:0:0:2002::1/64
10GE1/0/1
SwitchA FC00:0:0:2001::2/64 SwitchB

Configuration Roadmap
To meet the preceding requirement, configure static BFD for IPv6 static routes. The
configuration roadmap is as follows:

1. Configure a BFD session between SwitchA and SwitchB to implement millisecond-level


fault detection.
2. Configure a static route from SwitchA to SwitchB and bind the static route to the BFD
session so that SwitchA and SwitchB can update their routing tables after a fault is
detected.

Procedure
Step 1 Configure IPv6 addresses for interfaces. The configuration details are not provided here.

Step 2 Configure a BFD session between SwitchA and SwitchB.

# On SwitchA, create a BFD session with SwitchB.


<SwitchA> system-view
[~SwitchA] bfd
[*SwitchA-bfd] quit
[*SwitchA] bfd aa bind peer-ipv6 fc00:0:0:2001::2
[*SwitchA-bfd-session-aa] discriminator local 10
[*SwitchA-bfd-session-aa] discriminator remote 20
[*SwitchA-bfd-session-aa] commit
[~SwitchA-bfd-session-aa] quit

# On SwitchB, create a BFD session with SwitchA.


<SwitchB> system-view
[~SwitchB] bfd
[*SwitchB-bfd] quit
[*SwitchB] bfd bb bind peer-ipv6 fc00:0:0:2001::1
[*SwitchB-bfd-session-bb] discriminator local 20
[*SwitchB-bfd-session-bb] discriminator remote 10
[*SwitchB-bfd-session-bb] commit
[~SwitchB-bfd-session-bb] quit

Step 3 Configure a default static route and bind the route to the BFD session.

# On SwitchA, configure a default static route to SwitchB and bind the route to the BFD
session named aa.
[~SwitchA] ipv6 route-static 0::0 0 fc00:0:0:2001::2 track bfd-session aa
[*SwitchA] commit
[~SwitchA] quit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 87


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Step 4 Verify the configuration.


# After the configurations are complete, run the display bfd session all command on SwitchA
or SwitchB. You can view that the BFD session has been established and in Up state. Run the
display current-configuration | include bfd command in the system view. You can view that
the default static route has already been bound to the BFD session.
Take the display on SwitchA as an example:
<SwitchA> display bfd session all
S: Static
session

D: Dynamic
session

IP: IP
session

IF: Single-hop
session

PEER: Multi-hop
session

LDP: LDP
session

LSP: Label switched


path

TE: Traffic
Engineering

AUTO: Automatically negotiated


session

VXLAN: VXLAN
session

VSI: VSI PW
session

(w): State in
WTR

(*): State is
invalid

Total UP/DOWN Session Number :


1/0

--------------------------------------------------------------------------------

Local Remote PeerIpAddr State Type


InterfaceName
--------------------------------------------------------------------------------

10 20
FC00:0:0:2004::2

Up S/IP-PEER
-
--------------------------------------------------------------------------------

<SwitchA> display current-configuration | include bfd


bfd
bfd aa bind peer-ipv6 FC00:0:0:2001::2
ipv6 route-static :: 0 FC00:0:0:2001::2 track bfd-session aa

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 88


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

# Check the IPv6 routing table on SwitchA. You can view that the default static route exists in
the routing table.
<SwitchA> display ipv6 routing-table
Route
Flags: R - relay, D - download to fib, B - black hole
route
----------------------------------------------------------------------------
Routing Table : _public_
Destinations : 5 Routes : 5

Destination : :: PrefixLength : 0
NextHop : FC00:0:0:2001::2 Preference : 60
Cost : 0 Protocol : Static
RelayNextHop : :: TunnelID : 0x0
Interface : 10GE1/0/1 Flags : RD

Destination : ::1 PrefixLength : 128


NextHop : ::1 Preference : 0
Cost : 0 Protocol : Direct
RelayNextHop : :: TunnelID : 0x0
Interface : InLoopBack0 Flags : D

Destination : FC00:0:0:2001:: PrefixLength : 64


NextHop : FC00:0:0:2001::1 Preference : 0
Cost : 0 Protocol : Direct
RelayNextHop : :: TunnelID : 0x0
Interface : 10GE1/0/1 Flags : D

Destination : FC00:0:0:2001::1 PrefixLength : 128


NextHop : ::1 Preference : 0
Cost : 0 Protocol : Direct
RelayNextHop : :: TunnelID : 0x0
Interface : 10GE1/0/1 Flags : D

Destination : FE80:: PrefixLength : 10


NextHop : :: Preference : 0
Cost : 0 Protocol : Direct
RelayNextHop : :: TunnelID : 0x0
Interface : NULL0 Flags : D

# Run the shutdown command on 10GE1/0/1 of SwitchB to simulate a link fault.


[~SwitchB] interface 10ge1/0/1
[~SwitchB-10GE1/0/1] shutdown
[*SwitchB-10GE1/0/1] commit

# Check the routing table on SwitchA. You can view that the default static route 0::0/0 does
not exist. This is because the default static route is bound to the BFD session. After BFD
detects a link fault, BFD rapidly notifies SwitchA that the static route is unavailable.
<SwitchA> display ipv6 routing-table
Route
Flags: R - relay, D - download to fib, B - black hole
route
----------------------------------------------------------------------------
Routing Table : _public_
Destinations : 1 Routes : 1

Destination : ::1 PrefixLength : 128


NextHop : ::1 Preference : 0
Cost : 0 Protocol : Direct
RelayNextHop : :: TunnelID : 0x0
Interface : InLoopBack0 Flags : D

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 89


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
bfd
#
interface 10GE1/0/1
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:2001::1/64
#
bfd aa bind peer-ipv6 FC00:0:0:2001::2
discriminator local 10
discriminator remote 20
#
ipv6 route-static :: 0 FC00:0:0:2001::2 track bfd-session aa
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
bfd
#
interface 10GE1/0/1
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:2001::2/64
#
interface 10GE1/0/2
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:2002::1/64
#
bfd bb bind peer-ipv6 FC00:0:0:2001::1
discriminator local 20
discriminator remote 10
#
return

2.9.7 Example for Configuring FRR for IPv4 Static Routes on the
Public Network
Networking Requirements
As shown in Figure 2-12, two static routes with next hops being SwitchA and SwitchB
respectively are configured on SwitchT. Link B functions as the backup of link A. If link A is
faulty, traffic can be switched to link B in a timely manner.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 90


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Figure 2-12 Networking diagram for configuring FRR for IPv4 static routes on the public
network
10GE1/0/1 10GE1/0/2
VLANIF20 VLANIF40
[Link]/24 [Link]/24
10GE1/0/2 10GE1/0/2
VLANIF20
SwitchA VLANIF40
[Link]/24 Link A [Link]/24

10GE1/0/1 SwitchT SwitchC 10GE1/0/1


VLANIF10 10GE1/0/3 Link B 10GE1/0/3 VLANIF60
[Link]/24 VLANIF30 VLANIF50 [Link]/24
SwitchB
[Link]/24 [Link]/24
10GE1/0/1 10GE1/0/2
VLANIF30 VLANIF50
[Link]/24 [Link]/24

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure two static routes with next hops being SwitchA and SwitchB respectively on
SwitchT so that the devices can communicate with each other.
2. Set a higher preference for link A on SwitchT to ensure that link A functions as the
primary link and link B functions as the backup of link A.
3. Enable FRR for static routes on SwitchT so that traffic can be quickly switched to link B
if link A is faulty.

Procedure
Step 1 Create VLANs, add interfaces to the VLANs, and assign IP addresses to the VLANIF
interfaces. (Details are not mentioned here.)
Step 2 Configure device names. (Details are not mentioned here.)

Step 3 Configure static routes.


# Configure static routes on SwitchA.
[~SwitchA] ip route-static [Link] 24 vlanif 20 [Link]
[*SwitchA] ip route-static [Link] 24 vlanif 40 [Link]
[*SwitchA] commit

# Configure static routes on SwitchB.


[~SwitchB] ip route-static [Link] 24 vlanif 30 [Link]
[*SwitchB] ip route-static [Link] 24 vlanif 50 [Link]
[*SwitchB] commit

Configure static routes on Switch C.


[~SwitchC] ip route-static [Link] 24 vlanif 40 [Link]
[*SwitchC] ip route-static [Link] 24 vlanif 50 [Link]
[*SwitchC] commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 91


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

# Configure static routes on SwitchT.


[~SwitchT] ip route-static [Link] 24 vlanif 20 [Link]
[*SwitchT] ip route-static [Link] 24 vlanif 30 [Link]
[*SwitchT] commit

# Check the IP routing table on SwitchT. You can view that the two static routes are in load
balancing mode.
[~SwitchT] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : _public_
Destinations : 11 Routes : 12

Destination/Mask Proto Pre Cost Flags NextHop Interface

[Link]/8 Direct 0 0 D [Link] InLoopBack0


[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/24 Static 60 0 D [Link] Vlanif20
Static 60 0 D [Link] Vlanif30
[Link]/24 Direct 0 0 D [Link] Vlanif20
[Link]/32 Direct 0 0 D [Link] Vlanif20
[Link]/32 Direct 0 0 D [Link] Vlanif20
[Link]/24 Direct 0 0 D [Link] Vlanif30
[Link]/32 Direct 0 0 D [Link] Vlanif30
[Link]/32 Direct 0 0 D [Link] Vlanif30

Step 4 Change the preferences of IPv4 static routes.

# Change the preferences of static routes on SwitchT.


[~SwitchT] ip route-static [Link] 24 vlanif 20 [Link] preference 40
[*SwitchT] commit

# Check the IP routing table on SwitchT, and you can view that preferences of the static
routes are changed.
[~SwitchT] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : _public_
Destinations : 10 Routes : 10

Destination/Mask Proto Pre Cost Flags NextHop Interface

[Link]/8 Direct 0 0 D [Link] InLoopBack0


[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/24 Static 40 0 D [Link] Vlanif20
[Link]/24 Direct 0 0 D [Link] Vlanif20
[Link]/32 Direct 0 0 D [Link] Vlanif20
[Link]/32 Direct 0 0 D [Link] Vlanif20
[Link]/24 Direct 0 0 D [Link] Vlanif30
[Link]/32 Direct 0 0 D [Link] Vlanif30
[Link]/32 Direct 0 0 D [Link] Vlanif30

Step 5 Enable FRR for IPv4 static routes.

# Enable FRR for static routes on SwitchT.


[~SwitchT] ip route-static frr
[*SwitchT] commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 92


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

# Check information about the backup outbound interface and backup next hop on SwitchT.
[~SwitchT] display ip routing-table [Link] verbose
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : _public_
Summary Count : 1

Destination: [Link]/24
Protocol: Static Process ID: 0
Preference: 40 Cost: 0
NextHop: [Link] Neighbour: [Link]
State: Active Adv Age: 00h00m03s
Tag: 0 Priority: medium
Label: NULL QoSInfo: 0x0
IndirectID: 0x31000032
RelayNextHop: [Link] Interface: Vlanif20
TunnelID: 0x0 Flags: D
BkNextHop: [Link] BkInterface: Vlanif30
BkLabel: NULL SecTunnelID: 0x0
BkPETunnelID: 0x0 BkPESecTunnelID: 0x0
BkIndirectID: 0x32000033

Step 6 If link A is faulty, traffic can be quickly switched to link B.


[~SwitchT] interface 10GE 1/0/2
[~SwitchT-10GE1/0/2] shutdown
[*SwitchT-10GE1/0/2] commit
[~SwitchT-10GE1/0/2] quit

# Check information about the route to [Link]/24 on SwitchT.


[~SwitchT] display ip routing-table [Link] verbose
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : _public_
Summary Count : 1

Destination: [Link]/24
Protocol: Static Process ID: 0
Preference: 60 Cost: 0
NextHop: [Link] Neighbour: [Link]
State: Active Adv Age: 00h00m07s
Tag: 0 Priority: medium
Label: NULL QoSInfo: 0x0
IndirectID: 0x32000033
RelayNextHop: [Link] Interface: Vlanif30
TunnelID: 0x0 Flags: D

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 20 40
#
interface Vlanif20
ip address [Link] [Link]
#
interface Vlanif40
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 93


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

port trunk allow-pass vlan 20


#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
ip route-static [Link] [Link] vlanif 20 [Link]
ip route-static [Link] [Link] vlanif 40 [Link]
#
return
l Configuration file of SwitchB
#
sysname SwitchB
#
vlan batch 30 50
#
interface Vlanif30
ip address [Link] [Link]
#
interface Vlanif50
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 50
#
ip route-static [Link] [Link] vlanif 30 [Link]
ip route-static [Link] [Link] vlanif 50 [Link]
#
return
l Configuration file of SwitchC
#
sysname SwitchC
#
vlan batch 40 50 60
#
interface Vlanif40
ip address [Link] [Link]
#
interface Vlanif50
ip address [Link] [Link]
#
interface Vlanif60
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 60
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 50
#
ip route-static [Link] [Link] vlanif 40 [Link]
ip route-static [Link] [Link] vlanif 50 [Link]
#
return
l Configuration file of SwitchT
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 94


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

sysname SwitchT
#
vlan batch 10 20 30
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif20
ip address [Link] [Link]
#
interface Vlanif30
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 30
#
ip route-static frr
ip route-static [Link] [Link] vlanif 20 [Link] preference 40
ip route-static [Link] [Link] vlanif 30 [Link]
#
return

2.9.8 Example for Configuring NQA for IPv4 Static Routes


Networking Requirements
As shown in Figure 2-13, static routes destined for clients are configured on SwitchB and
SwitchC. SwitchB is the master switch and SwitchC is the backup switch. Normally, traffic
must be forwarded along the primary link SwitchB→SwitchD. If the primary link fails, traffic
is switched to the backup link SwitchC→SwitchD.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 95


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Figure 2-13 Networking diagram for configuring NQA for static IPv4 routes

IP Network

10GE1/0/1 10GE1/0/2
VLANIF30 VLANIF40
[Link]/24 [Link]/24
SwitchA
10GE1/0/1 GE1/0/2
VLANIF30 VLANIF40
[Link]/24 [Link]/24
/3
SwitchB E 1/0 0 SwitchC
G 6
10GE1/0/2 10 10 ANIF .1/24 10GE1/0/1
GE VL 16.6
VLANIF10 V VLANIF20
17 LAN 1/0/3 2.
[Link]/24 2.1 IF 17 1 VLA [Link]/24
6.5 50 72 NI
VLANIF10 .1/ .16 F5 VLANIF20
24 60 .5. 0
[Link]/24 IF /24 2/2 [Link]/24
A N .2 4
VL 16.6
VLANIF70 2. VLANIF80
17
[Link]/24 SwitchD SwitchE [Link]/24

...... ......

Client1 Client10 Client91 Client100

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure IP addresses and OSPF on each switch, and configure the cost of each link so
that SwitchB functions as the master switch and SwitchC functions as the backup switch.
2. Create an ICMP NQA test instance to monitor the link between SwitchB and SwitchD,
and configure static routes destined for clients on SwitchB SwitchC. Associate the static
route with the NQA test instance to implement fast link fault detection and service
switchover.
NOTE

When a static route is associated with an NQA test instance, only ICMP test instances are used to test
whether there are reachable routes between the source and destination.

Procedure
Step 1 Create VLANs and add interfaces to the VLANs.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan 30
[*SwitchA-vlan30] quit
[*SwitchA] vlan 40
[*SwitchA-vlan40] quit
[*SwitchA] interface 10ge 1/0/1

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 96


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

[*SwitchA-10GE1/0/1] port link-type trunk


[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 30
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 40
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit

The configurations of SwitchB and SwitchC are similar to that of SwitchA, and are not
mentioned here.
Step 2 Assign IPv4 addresses to the VLANIF interfaces.
[~SwitchA] interface vlanif 30
[*SwitchA-Vlanif30] ip address [Link] 24
[*SwitchA-Vlanif30] quit
[*SwitchA] interface vlanif 40
[*SwitchA-Vlanif40] ip address [Link] 24
[*SwitchA-Vlanif40] quit
[*SwitchA] commit

The configurations of SwitchB and SwitchC are similar to that of SwitchA, and are not
mentioned here.
Step 3 Create an NQA test instance on SwitchB to test the link between SwitchB and SwitchD.
[~SwitchB] nqa test-instance user test
[*SwitchB-nqa-user-test] test-type icmp
[*SwitchB-nqa-user-test] destination-address ipv4 [Link]
[*SwitchB-nqa-user-test] frequency 10
[*SwitchB-nqa-user-test] probe-count 2
[*SwitchB-nqa-user-test] interval seconds 5
[*SwitchB-nqa-user-test] timeout 4
[*SwitchB-nqa-user-test] start now
[*SwitchB-nqa-user-test] commit
[~SwitchB-nqa-user-test] quit

Step 4 Configure IPv4 static routes.


# Configure an IPv4 static route on SwitchB and associate it with the NQA test instance.
[~SwitchB] ip route-static [Link] [Link] vlanif 10 [Link] track
nqa user test
[*SwitchB] commit

# Configure an IPv4 static route on SwitchC.


[~SwitchC] ip route-static [Link] [Link] vlanif 60 [Link]
[*SwitchC] commit

Step 5 Configure a dynamic routing protocol on SwitchA, SwitchB, and SwitchC. OSPF is used in
this example.
# Configure OSPF on SwitchA.
[~SwitchA] ospf 1
[*SwitchA-ospf-1] area [Link]
[*SwitchA-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchA-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchA-ospf-1-area-[Link]] quit
[*SwitchA-ospf-1] quit
[*SwitchA] commit

# Configure OSPF on SwitchB.


[~SwitchB] ospf 1
[*SwitchB-ospf-1] area [Link]
[*SwitchB-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchB-ospf-1-area-[Link]] quit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 97


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

[*SwitchB-ospf-1] quit
[*SwitchB] commit

# Configure OSPF on SwitchC.


[~SwitchC] ospf 1
[*SwitchC-ospf-1] area [Link]
[*SwitchC-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchC-ospf-1-area-[Link]] quit
[*SwitchC-ospf-1] quit
[*SwitchC] commit

Step 6 Configure OSPF on SwitchB and SwitchC to import static routes.


# Configure OSPF on SwitchB to import a static route, and set the cost of the static route to
10.
[~SwitchB] ospf 1
[*SwitchB-ospf-1] import-route static cost 10
[*SwitchB-ospf-1] commit
[~SwitchB-ospf-1] quit

# Configure OSPF on SwitchC to import a static route, and set the cost of the static route to
20.
[~SwitchC] ospf 1
[*SwitchC-ospf-1] import-route static cost 20
[*SwitchC-ospf-1] commit
[~SwitchC-ospf-1] quit

Step 7 Verify the configuration.


After the configuration is complete, run the display current-configuration | include nqa
command in the system view on SwitchB. The command output shows that the IPv4 static
route has been associated with the NQA test instance. Run the display nqa results command.
The command output shows that an NQA test instance has been created.
# Display configurations of NQA for IPv4 static routes.
[~SwitchB] display current-configuration | include nqa
ip route-static [Link] [Link] Vlanif 10 [Link] track nqa user test
nqa test-instance user test

# Display the NQA test results.


[~SwitchB] display nqa results test-instance user test

NQA entry(user, test) : test flag is active ,test type is ICMP


1 . Test 6645 result The test is finished
Send operation times: 2 Receive response times: 2
Completion:success RTD over thresholds number:0
Attempts number:1 Drop operation number:0
Disconnect operation number:0 Operation timeout number:0
System busy operation number:0 Connection fail number:0
Operation sequence errors number:0 RTT Stats errors number:0
Destination ip address:[Link]
Min/Max/Average completion Time: 1/1/1
Sum/Square-Sum completion time: 2/2
Last response packet receiving time: 2012-11-14 04:20:36.9
Lost packet ratio: 0 %

The command output shows "Lost packet ratio 0 %", indicating that the link is running
properly.
# Check the routing table on SwitchB.
[~SwitchB] display ip routing-table

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 98


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Proto: Protocol Pre: Preference


Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : _public_
Destinations : 15 Routes : 15

Destination/Mask Proto Pre Cost Flags NextHop Interface

[Link]/8 Direct 0 0 D [Link] InLoopBack0


[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/24 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/24 Direct 0 0 D [Link] Vlanif30
[Link]/32 Direct 0 0 D [Link] Vlanif30
[Link]/32 Direct 0 0 D [Link] Vlanif30
[Link]/24 OSPF 10 2 D [Link] Vlanif30
[Link]/24 Direct 0 0 D [Link] Vlanif50
[Link]/32 Direct 0 0 D [Link] Vlanif50
[Link]/32 Direct 0 0 D [Link] Vlanif50
[Link]/24 Static 60 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] InLoopBack0

The command output shows that the static route exists in the routing table.
# Check the routing table on SwitchA.
[~SwitchA] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : _public_
Destinations : 11 Routes : 11

Destination/Mask Proto Pre Cost Flags NextHop Interface

[Link]/8 Direct 0 0 D [Link] InLoopBack0


[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/24 Direct 0 0 D [Link] Vlanif30
[Link]/32 Direct 0 0 D [Link] Vlanif30
[Link]/32 Direct 0 0 D [Link] Vlanif30
[Link]/24 Direct 0 0 D [Link] Vlanif40
[Link]/32 Direct 0 0 D [Link] Vlanif40
[Link]/32 Direct 0 0 D [Link] Vlanif40
[Link]/24 O_ASE 150 10 D [Link] Vlanif30
[Link]/32 Direct 0 0 D [Link] InLoopBack0

The command output shows that a route to [Link]/24 exists in the routing table. The
route's next hop address is [Link] and cost is 10. Traffic is preferentially transmitted along
the link SwitchB->SwitchD.
# Shut down 10GE1/0/2 on SwitchB to simulate a link fault.
[~SwitchB] interface 10ge 1/0/2
[~SwitchB-10GE1/0/2] shutdown
[*SwitchB-10GE1/0/2] commit
[~SwitchB] quit

# Check the NQA test results.


[~SwitchB] display nqa results test-instance user test

NQA entry(user, test) : testflag is active ,testtype is ICMP


1 . Test 7160 result The test is finished
Send operation times: 2 Receive response times: 0

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 99


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

Completion:failed RTD over thresholds number:0


Attempts number:1 Drop operation number:0
Disconnect operation number:0 Operation timeout number:2
System busy operation number:0 Connection fail number:0
Operation sequence errors number:0 RTT Stats errors number:0
Destination ip address:[Link]
Min/Max/Average completion Time: 0/0/0
Sum/Square-Sum completion time: 0/0
Last response packet receiving time: 0000-00-00 00:00:00.0
Lost packet ratio: 100 %

The command output shows "Completion:failed" and "Lost packet ratio: 100 %," indicating
that the link is faulty.

# Check the routing table on SwitchB.


[~SwitchB] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : _public_
Destinations : 12 Routes : 12

Destination/Mask Proto Pre Cost Flags NextHop Interface

[Link]/8 Direct 0 0 D [Link] InLoopBack0


[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/24 Direct 0 0 D [Link] Vlanif30
[Link]/32 Direct 0 0 D [Link] Vlanif30
[Link]/32 Direct 0 0 D [Link] Vlanif30
[Link]/24 OSPF 10 2 D [Link] Vlanif30
[Link]/24 Direct 0 0 D [Link] Vlanif50
[Link]/32 Direct 0 0 D [Link] Vlanif50
[Link]/32 Direct 0 0 D [Link] Vlanif50
[Link]/24 O_ASE 150 20 D [Link] Vlanif30
[Link]/32 Direct 0 0 D [Link] InLoopBack0

The command output shows that the static route has been deleted.

# Check the routing table on SwitchA.


[~SwitchA] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : _public_
Destinations : 11 Routes : 11

Destination/Mask Proto Pre Cost Flags NextHop Interface

[Link]/8 Direct 0 0 D [Link] InLoopBack0


[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/24 Direct 0 0 D [Link] Vlanif30
[Link]/32 Direct 0 0 D [Link] Vlanif30
[Link]/32 Direct 0 0 D [Link] Vlanif30
[Link]/24 Direct 0 0 D [Link] Vlanif40
[Link]/32 Direct 0 0 D [Link] Vlanif40
[Link]/32 Direct 0 0 D [Link] Vlanif40
[Link]/24 O_ASE 150 20 D [Link] Vlanif40
[Link]/32 Direct 0 0 D [Link] InLoopBack0

On SwitchB, the NQA test instance is associated with a static route. When NQA detects a link
fault, it immediately notifies SwitchB that the static route bound to the link is unreachable.
SwitchA cannot learn the route to [Link]/24 from SwitchB, but it can learn the route to

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 100


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

[Link]/24 from SwitchC. Therefore, you can view that the route to [Link]/24 has a
next hop [Link] and cost 20. Service traffic is then switched to the link SwitchC-
>SwitchD.

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 30 40
#
interface Vlanif30
ip address [Link] [Link]
#
interface Vlanif40
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type
trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/2
port link-type
trunk
port trunk allow-pass vlan 40
#
ospf 1
area [Link]
network [Link] [Link]
network [Link] [Link]
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 10 30 50
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif30
ip address [Link] [Link]
#
interface Vlanif50
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type
trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/2
port link-type
trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/3
port link-type
trunk
port trunk allow-pass vlan 50
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 101


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 2 Static Route Configuration

ospf 1
import-route static cost 10
area [Link]
network [Link] [Link]
#
ip route-static [Link] [Link] Vlanif 10 [Link] track nqa user
test
#
nqa test-instance user test
test-type icmp
destination-address ipv4 [Link]
interval seconds 5
timeout 4
probe-count 2
frequency 10
start now
#
return

l Configuration file of Switch C


#
sysname SwitchC
#
vlan batch 20 40 60
#
interface Vlanif20
ip address [Link] [Link]
#
interface Vlanif40
ip address [Link] [Link]
#
interface Vlanif60
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type
trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/2
port link-type
trunk
port trunk allow-pass vlan 40
#
interface 10GE1/0/3
port link-type
trunk
port trunk allow-pass vlan 60
#
ospf 1
import-route static cost 20
area [Link]
network [Link] [Link]
#
ip route-static [Link] [Link] Vlanif 60 [Link]
#
return

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 102


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

3 RIP Configuration

About This Chapter

Routing Information Protocol (RIP) is widely used on small-sized networks to discover routes
and generate routing information.

3.1 Overview of RIP


3.2 Understanding RIP
3.3 Summary of RIP Configuration Tasks
3.4 Licensing Requirements and Limitations for RIP
3.5 Default Settings for RIP
3.6 Configuring Basic RIP Functions
3.7 Configuring RIP-2
3.8 Preventing Routing Loops
3.9 Controlling RIP Routing
3.10 Controlling RIP Route Advertisement
3.11 Controlling Receiving of RIP Routing Information
3.12 Improving RIP Network Performance
3.13 Configuring BFD for RIP
3.14 Configuring the Network Management Function for RIP
3.15 Maintaining RIP
3.16 Configuration Examples for RIP
3.17 Troubleshooting RIP

3.1 Overview of RIP

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 103


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Definition
Routing Information Protocol (RIP) is a simple Interior Gateway Protocol (IGP). RIP is a
Distance-Vector protocol that uses hop count to measure the distance between the local device
and the destination. RIP exchanges routing information using UDP packets on UDP port 520.

Two versions are available for RIP: RIP-1 and RIP-2. RIP-2 is an extension to RIP-1.

Purpose
RIP is easy to implement, and is easier to configure and manage than OSPF and IS-IS.
Therefore, RIP is applicable to small-sized networks, such as campus networks and simple
LANs. It is not suitable for complex environments or large-sized networks.

3.2 Understanding RIP

3.2.1 RIP Fundamentals


RIP is based on the Distance-Vector (DV) algorithm. RIP uses hop count (HC) to measure the
distance to the destination. The distance is called the metric value. In RIP, the default HC
from a router to its directly connected network is 0, and the HC from a router to a reachable
network through another router is 1. That is, the HC equals the number of routers passed from
the local network to the destination network. To speed up network convergence, RIP defines
the HC as an integer that ranges from 0 to 15. An HC 16 or greater is defined as infinity, that
is, the destination network or the host is unreachable. For this reason, RIP is not applied to
large-scale networks.

RIP Routing Table


When RIP starts on a router, the RIP routing table contains only the routes to the directly
connected interfaces. After neighboring routers on different network segments learn the
routing entries from each other, they can communicate with each other.

Figure 3-1 RIP routing table generation


RouterA RouterB

Request

Reponse

Figure 3-1 shows the process of RIP routing table generation.


l RIP starts, and then RouterA broadcasts Request packets to neighboring routers.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 104


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

l When receiving the Request packet, RouterB encapsulates its own RIP routing table into
the Response packet and broadcasts the Response packet to the network segment
connected to the interface receiving the Request packet.
l RouterA generates a routing table based on the Response packet sent from RouterB.

RIP Update and Maintenance


RIP uses four timers to update and maintain routing information:
l Update timer: When this timer expires, a router immediately sends an Update packet.
l Age timer: If a RIP device does not receive an Update packet from a neighbor within the
aging time, the RIP device considers the route unreachable.
l Garbage-collect timer: If a RIP device does not receive an Update packet of an
unreachable route within the timeout interval, the device deletes the routing entry from
the RIP routing table.
l Suppress timer: When a RIP device receives an Update packet with the Cost field being
16 from a neighbor, the route is suppressed and the suppress timer starts. To avoid route
flapping, the RIP device does not accept any Update packet before the suppress timer
expires even if the Cost field in an Update packet is smaller than 16. After the suppress
timer expires, the RIP device accepts new Update packets.
Relationships between RIP routes and timers:
l The interval for sending Update packets is determined by the Update timer, which is 30
seconds by default.
l Each routing entry has two timers: age timer and Garbage-collect timer. When a RIP
device adds a learned route to the local RIP routing table, the age timer starts for the
routing entry. If the RIP device does not receive an Update packet from the neighbor
within the age time, the RIP device sets the Cost value of the route to 16 (unreachable)
and starts the Garbage-collect timer. If the RIP device still does not receive an Update
packet within the Garbage-collect timer, the RIP device deletes the routing entry from
the RIP routing table.

Triggered Update
When routing information changes, a device immediately sends an Update packet to its
neighbors, without waiting for Update timer expiration. This function avoids loops.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 105


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Figure 3-2 Triggered update

The network to
[Link] fails The network to
[Link] fails

[Link]
E0 [Link]
RouterB
S0 S0 S1
RouterA

RouterC [Link]
E0 S0

The network to
[Link] fails
[Link]

As shown in Figure 3-2, RouterC first learns that network [Link] is unreachable.
l If RouterC does not support triggered update when detecting a link fault, it has to wait
until the Update timer expires. If RouterC receives an Update packet from RouterB
before its Update timer expires, RouterC learns a wrong route to network [Link]. In
this case, the next hops of the routes from RouterB or RouterC to network [Link] are
RouterC and RouterB respectively. A routing loop is generated.
l If RouterC supports triggered update when detecting a link fault, RouterC immediately
sends an Update packet to RouterB so that a routing loop is prevented.

3.2.2 RIP-2 Enhanced Features


Two versions are available for RIP: RIP-1 and RIP-2. RIP-2 is an extension to RIP-1.

Comparison Between RIP-1 and RIP-2


RIP version 1 (RIP-1) is a classful (as opposed to classless) routing protocol. It supports the
advertisement of protocol packets only in broadcast mode. Figure 3-3 shows the packet
format. The RIP-1 protocol packet does not carry any mask, so it can identify only the routes
of the natural network segment such as Class A, Class B, and Class C, and does not support
route aggregation or discontinuous subnet.
RIP version 2 (RIP-2), is a classless routing protocol. Figure 3-4 shows the packet format.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 106


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Figure 3-3 RIP-1 packet format

0 7 15 31
Header Command Version Must be zero
Address Family Identifier Must be zero
IP Address
Route
Entries Must be zero
Must be zero
Metric

Figure 3-4 RIP-2 packet format


0 7 15 31
Header Command Version Unused
Address Family Identifier Route Tag
IP Address
Route
Subnet Mask
Entries
Next Hop
Metric

Compared with RIP-1, RIP-2 has the following advantages:


l Supports route tag and can flexibly control routes on the basis of the tag in the routing
policy.
l Has packets that contain mask information and support route summarization and
Classless Inter-Domain Routing (CIDR).
l Supports the next hop address and can select the optimal next hop address in the
broadcast network.
l Supports sending update packets in multicast mode. Only RIP-2 routers can receive
protocol packets. This reduces resource consumption.
l Provides packets authentication to enhance security.

RIP-2 Route Summarization


When different subnet routes in the same natural network segment are transmitted to other
network segments, these routes are summarized into one route of the same segment. This
process is called route summarization.
RIP-1 packets do not carry mask information, so RIP-1 can advertise only the routes with
natural masks. Because RIP-2 packets carry mask information, RIP-2 supports subnetting.
RIP-2 route summarization improves extensibility and efficiency and minimizes the routing
table size of a large-sized network.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 107


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Route summarization is classified into two types:

l RIP process-based classful summarization


Summarized routes are advertised using nature masks. For example, route [Link]/24
(metric=2) and route [Link]/24 (metric=3) are summarized as a route [Link]/8
(metric=2) in the natural network segment. RIP-2 supports classful summarization to
obtain the optimal metric.
l Interface-based summarization
A user can specify a summarized address. For example, a route [Link]/16 (metric=2)
can be configured on the interface as a summarized route of route [Link]/24 (metric=2)
and route [Link]/24 (metric=3).

3.2.3 Split Horizon and Poison Reverse

Split Horizon
Split horizon ensures that a route learned by RIP on an interface is not sent to neighbors from
the interface. This feature reduces bandwidth consumption and avoids routing loops.

Split horizon provides two models for different networks: interface-based split horizon and
neighbor-based split horizon. Broadcast, P2P, and P2MP networks use interface-based split
horizon, as shown in Figure 3-5.

Figure 3-5 Interface-based split horizon

[Link]/8

RouterA RouterB

RouterA sends routing information destined for [Link]/8 to RouterB. If split horizon is not
configured, RouterB sends the route learned from RouterA back to RouterA. RouterA can
learn two routes destined for [Link]/8: a direct route with hop count 0 and a route with the
next hop RouterB and hop count 2.

However, only the direct route in the RIP routing table on RouterA is active. When the route
from RouterA to network [Link] is unreachable, RouterB does not receive the unreachable
message immediately and still notifies RouterA that network [Link]/8 is reachable.
Therefore, RouterA receives incorrect routing information that network [Link]/8 is
reachable through RouterB, and RouterB considers that network [Link]/8 is reachable
through RouterA. A routing loop is thus generated. With the split horizon feature, RouterB
does not send the route destined for [Link]/8 back to RouterA. Routing loops are avoided.

On a Non-Broadcast Multiple Access (NBMA) network, an interface connects to multiple


neighbors; therefore, split horizon is performed based on neighbors. Routes are advertised in
unicast mode. The routes received by an interface are differentiated by neighbors. The route
learned from a neighbor is not sent back through the same interface.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 108


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Figure 3-6 Neighbor-based split horizon

[Link]/8 [Link]/8

RouterA RouterB

RouterC

As shown in Figure 3-6, after split horizon is configured on an NBMA network, RouterA
sends route [Link]/16 learned from RouterB to RouterC, but does not send it to RouterB.

Poison Reverse
Poison reverse ensures that RIP sets the cost of the route learned from an interface of a
neighbor to 16 (unreachable) and then sends the route from the same interface back to the
neighbor. This feature deletes useless routes from the routing table and avoids routing loops.

Figure 3-7 Poison reverse

[Link]/8

RouterA RouterB

As shown in Figure 3-7, after receiving a route from RouterA, RouterB sends an unreachable
message (with the route Cost being 16) to RouterA. RouterA then does not learn the route
from RouterB. A routing loop is avoided.

3.2.4 Multi-Process and Multi-Instance


The multi-process feature associates a RIP process with multiple interfaces, ensuring that the
specific process performs all the protocol-related operations only on these interfaces. With the
multi-process feature, multiple RIP processes can run on a device independently. Route
exchange between RIP processes is similar to route exchange between routing protocols.
RIP multi-instance associates a VPN instance with a RIP process so that the VPN instance
can be associated with all interfaces on this process.

3.2.5 BFD for RIP


A link fault or topology change causes routers to recalculate routes. Therefore, route
convergence must be quick enough to ensure network performance. A solution to speed up
route convergence is to quickly detect faults and notify routing protocols of the faults.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 109


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Bidirectional Forwarding Detection (BFD) detects faults on links between neighboring


routers. Associated with a routing protocol, BFD can rapidly detect link faults and report the
faults to the protocol so that the protocol quickly triggers route convergence. Traffic loss
caused by topology changes is minimized. After RIP is associated with BFD, BFD rapidly
detects link faults and reports the faults to RIP so that RIP quickly responds to network
topology changes.
Table 3-1 lists the link fault detection mechanisms and convergence speed before and after
BFD is associated with RIP.

Table 3-1 BFD speeds up convergence


RIP and BFD Link Fault Detection Mechanism Convergence
Association Speed
Feature

Disabled The RIP age timer expires. By default, the Second-level (> 180
timeout interval is 180 seconds. seconds)

Enabled The BFD session goes Down. Second-level (< 30


seconds)

Principle
BFD is classified into static BFD and dynamic BFD:
l Static BFD
In static BFD, BFD session parameters (including local and remote discriminators) are
set manually using commands, and BFD session setup requests are manually delivered.
l Dynamic BFD
In dynamic BFD, BFD session setup is triggered by routing protocols. The local
discriminator is dynamically allocated and remote discriminator is obtained from the
peer. A routing protocol notifies BFD of the neighbor parameters (including destination
and source addresses), and then BFD sets up a session based on the received parameters.
When a link fault occurs, the protocol associated with BFD quickly detects that the BFD
session is Down, and switches traffic to the backup link. This feature minimizes data
loss.
A device can implement static BFD even if the peer device does not support BFD. Dynamic
BFD is more flexible than static BFD.

Application
After RIP is associated with BFD, BFD reports link faults to RIP within several milliseconds.
The RIP router then deletes the faulty links from the local routing table and starts the backup
link. This feature increases route convergence speed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 110


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Figure 3-8 RIP and BFD association network

RouterA RouterB RouterD


cost=1

0
=1
co

st
st

co
=1

RouterC

Implementation of RIP and BFD association:


l As shown in Figure 3-8, RouterA, RouterB, RouterC, and RouterD set up RIP neighbor
relationships. RouterB is the next hop on the route from RouterA to RouterD. RIP and
BFD association is configured on RouterA and RouterB.
l When the link between RouterA and RouterB is faulty, BFD quickly detects the fault and
notifies RouterA of the fault. RouterA deletes the route with RouterB as the next hop,
and then recalculates a route. The new route passes RouterC and RouterB and reaches
RouterD.
l When the link between RouterA and RouterB recovers, a session is set up again.
RouterA receives routing information from RouterB and selects the optimal route.

3.2.6 RIP NSR


The device with a distributed architecture supports RIP Non-stop Routing (NSR). RIP backs
up all route data from the Active Main Board (AMB) to the Standby Main Board (SMB).
Whenever the AMB fails, the SMB becomes active and takes over the AMB. RIP, therefore,
can keep the normal operation of services. RIP NSR ensures that real-time data is highly
synchronized between the AMB and SMB. Therefore, during the AMB/SMB switchover, the
neighbor will not detect the fault on the local device.

NOTE

NSR is enabled on the device by default and does not need to be configured.

3.3 Summary of RIP Configuration Tasks


Table 3-2 describes the RIP configuration tasks.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 111


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Table 3-2 RIP configuration tasks


Scenario Description Task

Configuring basic RIP Basic RIP functions include 3.6 Configuring Basic RIP
functions enabling RIP, specifying the Functions
network segment where RIP
runs, and specifying the RIP
version. The basic RIP
functions must be
configured before you use
the RIP features.

Configuring RIP-2 features RIP-2 is a classless routing 3.7 Configuring RIP-2


protocol, and the RIP-2
packets contain subnet
masks. Therefore, deploying
a RIP-2 network can save IP
addresses. Only RIP-2 can
be deployed on a network
where the IP addresses are
discontinuous, and RIP-1
cannot be used.
RIP-2 supports
authentication for protocol
packets and provides multi-
authentication modes to
enhance security.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 112


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Scenario Description Task

Preventing routing loops RIP is a routing protocol 3.8 Preventing Routing


based on the distance vector Loops
algorithm. RIP devices
advertise their local routing
tables to neighbors, so
routing loops may occur.
RIP uses split horizon and
poison reverse to prevent
routing loops:
l Split horizon: A route
learnt by RIP from an
interface is not sent to
neighbors from the
interface. This reduces
bandwidth consumption
and prevents routing
loops.
l Poison reverse: RIP sets
the cost of a route learnt
from an interface to 16
(an unreachable route),
and sends the route to
neighbors through the
interface. In this way,
RIP can delete useless
routes from the neighbor
routing table and prevent
routing loops.

Controlling RIP routing To use RIP more flexibly on 3.9 Controlling RIP
the existing network and Routing
meet various user
requirements, you can
configure different
parameters to control RIP
routing.

Controlling the advertising In practical applications, to 3.10 Controlling RIP


and receiving of RIP routes meet network requirements, Route Advertisement
you can configure different 3.11 Controlling Receiving
parameters to accurately of RIP Routing
control the advertising and Information
receiving of RIP routes.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 113


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Scenario Description Task

Improving RIP network In practical applications, 3.12 Improving RIP


performance you can configure special Network Performance
RIP functions to improve
RIP network performance.
l Adjusting the value of
the RIP timer to change
the RIP network
convergence rate.
l Adjusting the number
and interval of Update
packets sent by the
interface to reduce
device resource and
network bandwidth
consumption.
l Increasing the maximum
length of RIP packets to
add more routes to the
packets, which improves
bandwidth usage.
l Enabling the replay-
protect function to
ensure normal
communication between
neighboring devices after
the RIP process restarts.
l Checking packet validity
to meet network
requirements for high
security.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 114


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Scenario Description Task

Configuring BFD for RIP In general, RIP maintains 3.13 Configuring BFD for
neighbor relationships by RIP
periodically sending and
receiving Update packets. If
a device does not receive the
Update packet from a
neighbor in the aging time,
it considers the neighbor
Down. The default value of
the aging timer is 180
seconds, so RIP can detect a
link fault only after the fault
lasts for 180 seconds. If
high-speed data services are
deployed on the network, a
large amount of data will be
lost during this period.
BFD provides the
millisecond-level fault
detection mechanism. It can
detect faults on the protected
links or nodes immediately,
and report the faults to RIP.
BFD improves the RIP
process's response to
network topology changes,
which implements fast
convergence of RIP routes.

Configuring the Network By binding RIP to the MIB, 3.14 Configuring the
Management Function for you can view RIP Network Management
RIP information and configure Function for RIP
RIP through the NMS.

3.4 Licensing Requirements and Limitations for RIP


Involved Network Elements
Other network elements also need to support RIP.

Licensing Requirements
RIP is a basic feature of the CE8800, CE7800, CE6800, and CE5800 series switches and is
not under license control.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 115


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Version Requirements

Table 3-3 Products and minimum version supporting RIP


Product Minimum Version Required

CE8868EI V200R005C10

CE8861EI V200R005C10

CE8860EI V100R006C00

CE8850-32CQ-EI V200R002C50

CE8850-64CQ-EI V200R005C00

CE7850EI V100R003C00

CE7855EI V200R001C00

CE6810EI V100R003C00

CE6850EI V100R001C00

CE6850-48S6Q-HI V100R005C00

CE6850-48T6Q-HI/CE6850U-HI/ V100R005C10
CE6851HI

CE6855HI V200R001C00

CE6856HI V200R002C50

CE6857EI V200R005C10

CE6860EI V200R002C50

CE6865EI V200R005C00

CE6870-24S6CQ-EI/ V200R001C00
CE6870-48S6CQ-EI

CE6870-48T6CQ-EI V200R002C50

CE6875EI V200R003C00

CE6880EI V200R002C50

CE5880EI V200R005C10

CE5810EI V100R002C00

CE5850EI V100R001C00

CE5850HI V100R003C00

CE5855EI V100R005C10

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 116


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Feature Limitations
The CE6810LI does not support IPv4 Layer 3 forwarding. After the IPv4 function is enabled
on an interface of the CE6810LI, the configured IPv4 address can only be used to manage the
switch.

3.5 Default Settings for RIP


Table 3-4 describes the default settings for RIP.

Table 3-4 Default settings for RIP


Parameter Default Setting

Maximum number of equal-cost routes 16

RIP function Disabled

Split horizon Enabled

3.6 Configuring Basic RIP Functions

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

l Configuring IP addresses for interfaces to ensure network-layer communication between


neighbor nodes

Configuration Procedure
Enabling RIP is the prerequisite for setting RIP neighbors and RIP version on an NBMA
network.

3.6.1 Enabling RIP

Context
Enabling RIP is the prerequisite for all RIP-related configurations. If you run the RIP
commands in the interface view before enabling RIP, the configurations take effect only after
RIP is enabled.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run rip [ process-id ] [ vpn-instance vpn-instance-name ]

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 117


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

RIP is enabled and the RIP view is displayed.


If a VPN instance is specified, the RIP process belongs to this VPN instance. If no VPN
instance is specified, the RIP process belongs to a public network instance.
Step 3 (Optional) Run description text
Descriptions for RIP processes are configured.
Step 4 Run commit
The configuration is committed.
----End

3.6.2 Enabling RIP on the Specified Network Segment


Context
After enabling RIP, you need to specify the network segment in which RIP runs. RIP runs
only on the interfaces on the specified network segment. RIP does not receive, send, or
forward routes on the interfaces that do not reside on the specified network segment.

Procedure
l Enable RIP to send and receive routes on the specified network segment.
a. Run the system-view command to enter the system view.
b. Run the rip [ process-id ] command to enter the RIP view.
c. (Optional) Run the undo verify-source command to disable source check for RIP
packets.
If the IP addresses on two ends of a P2P link belong to different network segments,
the devices on the two ends cannot set up neighbor relationship unless source check
is disabled.
d. Run the network network-address command to enable RIP on the specified
network segment.
NOTE

l network-address specifies the address of a natural network segment.


l An interface can be associated with only one RIP process.
e. Run commit
The configuration is committed.
l Enable RIP to send and receive routes on all network segments connected to the
specified interface.
a. Run the system-view command to enter the system view.
b. Run the interface interface-type interface-number command to enter the interface
view.
c. On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute
configurations (for example, shutdown and description configurations).

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 118


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Alternatively, if configuration information supported by both Layer 2 and Layer 3


interfaces exists (for example, mode lacp and lacp system-id configurations), no
configuration that is not supported after the working mode of the interface is
switched can exist. If unsupported configurations exist on the interface, delete the
configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch
batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in
the system view to switch these interfaces to Layer 3 mode in batches.
d. Run the rip enable process-id command to enable RIP on all network segments
connected to the interface.
e. Run commit

The configuration is committed.

----End

3.6.3 (Optional) Configuring RIP Neighbors on an NBMA


Network

Context
Generally, RIP uses a broadcast or multicast address to send packets. If the link running RIP
does not support broadcast or multicast packets, specify the RIP neighbors on the two ends of
the link so that packets can be sent between the two ends in unicast mode.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run rip [ process-id ]

The RIP view is displayed.

Step 3 Run peer ip-address

The RIP neighbor is configured.

Step 4 Run commit

The configuration is committed.

----End

3.6.4 (Optional) Specifying the RIP Version

Context
RIP versions include RIP-1 and RIP-2. The two versions have different functions. The RIP
version must be set on the device running RIP. You only need to set the global RIP version
unless you want to specify a different RIP version on an interface.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 119


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Procedure
l Configure the global RIP version.
a. Run the system-view command to enter the system view.
b. Run the rip [ process-id ] command to enter the RIP view.
c. Run the version { 1 | 2 } command to set the global RIP version.
NOTE

By default, an interface sends only RIP-1 packets and receives both RIP-1 and RIP-2
packets.
d. Run commit
The configuration is committed.
l Configure the RIP version for an interface.
a. Run the system-view command to enter the system view.
b. Run the interface interface-type interface-number command to enter the interface
view.
c. On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute
configurations (for example, shutdown and description configurations).
Alternatively, if configuration information supported by both Layer 2 and Layer 3
interfaces exists (for example, mode lacp and lacp system-id configurations), no
configuration that is not supported after the working mode of the interface is
switched can exist. If unsupported configurations exist on the interface, delete the
configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch
batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in
the system view to switch these interfaces to Layer 3 mode in batches.
d. Run the rip version { 1 | 2 [ broadcast | multicast ] } command specify the RIP
version on the specified interface.
NOTE

l By default, an interface sends only RIP-1 packets and receives both RIP-1 and RIP-2
packets.
l If no RIP version number is configured in the interface view, the global RIP version is
used. The RIP version set on an interface takes precedence over the global RIP version.
e. Run commit
The configuration is committed.
----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 120


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

3.6.5 Verifying the Basic RIP Function Configuration

Procedure
l Run the display rip [ process-id | vpn-instance vpn-instance-name ] command to view
the running status and configurations of RIP.
l Run the display rip process-id route command to view all RIP routes learned from other
devices.
l Run the display default-parameter rip command to view default RIP configuration.
l Run the display rip process-id statistics interface { all | interface-type interface-
number [ verbose | neighbor neighbor-ip-address ] } command to view statistics on the
RIP interface.

----End

3.7 Configuring RIP-2

Pre-configuration Tasks
Before configuring RIP-2, complete the following task:

l Configuring Basic RIP Functions

Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying the RIP-2
Configuration) in any sequence as required.

3.7.1 Configuring RIP-2 Route Summarization

Context
A large RIP network must maintain large RIP routing tables, which occupy a lot of memory
on devices. Transmitting and processing the routing information requires many network
resources. Route summarization can reduce the routing table size and minimize impact of
route flapping on network.

RIP supports automatic summarization and manual summarization. Manual summarization


takes precedence over automatic summarization. To advertise all subnet routes, disable
automatic route summarization of RIP-2.

NOTE

By default, if split horizon or poison reverse has been configured, classful route summarization is
invalid. When summarized routes are sent to the natural network border, split horizon or poison reverse
must be disabled.

Procedure
l Configure automatic route summarization of RIP-2.
a. Run the system-view command to enter the system view.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 121


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

b. Run the rip [ process-id ] command to enter the RIP view.


c. Run the version 2 command to set the RIP version to RIP-2.
d. Run the summary command to enable automatic route summarization.
e. (Optional) Run the summary always command to enable automatic route
summarization. This command can enable automatic summarization of RIP-2 no
matter whether split horizon and poison reverse are enabled.
NOTE

The summary command is used in the RIP view to enable classful network-based route
summarization of RIP-2.
f. Run commit

The configuration is committed.


l Configure manual route summarization of RIP-2.
a. Run the system-view command to enter the system view.
b. Run the interface interface-type interface-number command to enter the interface
view.
c. On an Ethernet interface, run undo portswitch

The interface is switched to Layer 3 mode.

By default, an Ethernet interface works in Layer 2 mode.

The mode switching function takes effect when the interface only has attribute
configurations (for example, shutdown and description configurations).
Alternatively, if configuration information supported by both Layer 2 and Layer 3
interfaces exists (for example, mode lacp and lacp system-id configurations), no
configuration that is not supported after the working mode of the interface is
switched can exist. If unsupported configurations exist on the interface, delete the
configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch
batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in
the system view to switch these interfaces to Layer 3 mode in batches.
d. Run the rip summary-address ip-address mask [ avoid-feedback ] command to
configure RIP-2 to advertise the local summarization IP address.
NOTE

The rip summary-address ip-address mask [ avoid-feedback ] command is run in the


interface view to enable classless network-based route summarization of RIP-2.
e. Run commit

The configuration is committed.

----End

3.7.2 Configuring RIP-2 Packet Authentication

Context
On the RIP network requiring high security, configure RIP-2 packet authentication.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 122


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

RIP-2 can perform simple authentication or MD5 authentication on protocol packets. Simple
authentication uses the authentication key in plain text, so its security is lower than that of
MD5.

If plain is selected during the configuration of the RIP-2 packet authentication mode, the
password is saved in the configuration file in plain text. This brings security risks. It is
recommended that you select cipher to save the password in cipher text.

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 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Configure RIP-2 packet authentication.


l Run the rip authentication-mode simple { plain plain-text | [ cipher ] password-key }
command to set RIP-2 authentication to simple authentication.
l Run the following commands to set RIP-2 authentication to MD5 authentication.
– rip authentication-mode md5 usual { plain plain-text | [ cipher ] password-key }
– rip authentication-mode md5 nonstandard { keychain keychain-name | { plain
plain-text | [ cipher ] password-key } key-id }

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 123


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Simple and MD5 authentication has potential risks. HMAC-SHA256 cipher text
authentication is recommended.
If the MD5 authentication is used, you must set the packet format for MD5
authentication. If the usual keyword is specified, the MD5 cipher text authentication
packets use the universal format (private standard). If the nonstandard keyword is
specified, the MD5 cipher text authentication packets use the non-standard format (IETF
standard).

l Run the rip authentication-mode hmac-sha256 { plain plain-text | [ cipher ]


password-key } key-id command to set RIP-2 authentication to HMAC-SHA256
authentication.

Step 5 Run commit

The configuration is committed.

----End

3.7.3 Verifying the RIP-2 Configuration

Procedure
l Run the display rip [ process-id | vpn-instance vpn-instance-name ] command to view
the running status and configurations of RIP.
l Run the display rip process-id database [ verbose ] command to view all the active
routes in the RIP database.
l Run the display rip process-id route command to view all RIP routes learned from other
devices.
l Run the display rip process-id interface [ interface-type interface-number ] [ verbose ]
command to view information about the RIP interface.

----End

3.8 Preventing Routing Loops

Pre-configuration Tasks
Before configuring split horizon and poison reverse, complete the following task:

l Configuring Basic RIP Functions

Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying the RIP
Routing Loop Prevention Configuration) in any sequence as required.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 124


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

3.8.1 Configuring Split Horizon

Context
Split horizon can prevent routing loops.

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 On an Ethernet interface, run undo portswitch

The interface is switched to Layer 3 mode.

By default, an Ethernet interface works in Layer 2 mode.

The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run rip split-horizon

Split horizon is configured.

NOTE

l By default, split horizon is disabled for an NBMA network.


l If both split horizon and poison reverse are configured, only poison reverse takes effect.

Step 5 Run commit

The configuration is committed.

----End

3.8.2 Configuring Poison Reverse

Context
Poison reverse can prevent routing loops.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 125


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP 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 On an Ethernet interface, run undo portswitch

The interface is switched to Layer 3 mode.

By default, an Ethernet interface works in Layer 2 mode.

The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run rip poison-reverse

Poison reverse is enabled.

NOTE

If both split horizon and poison reverse are configured, only poison reverse takes effect.

Step 5 Run commit

The configuration is committed.

----End

3.8.3 Verifying the RIP Routing Loop Prevention Configuration

Procedure
l Run the display rip process-id interface [ interface-type interface-number ] [ verbose ]
command to view information about the RIP interface.

----End

3.9 Controlling RIP Routing

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

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 126


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

l Configuring Basic RIP Functions

Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying the RIP
Routing Control Configuration) in any sequence as required.

3.9.1 Configuring RIP Preference


Context
When different routing protocols discover the routes to the same destination, set the RIP
preference to select the required route.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run rip [ process-id ]
The RIP view is displayed.

Step 3 Run preference { preference | route-policy route-policy-name } *


The RIP preference is set.
By default, the RIP preference is 100.
Step 4 Run commit
The configuration is committed.

----End

3.9.2 Configuring Additional Metrics of an Interface


Context
Configuring the additional metrics on a RIP interface can change the route selection sequence.
The additional metric is the metric (hop count) to be added to the original metric of a RIP
route. You can specify commands to set additional metrics for incoming and outgoing RIP
routes.

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 On an Ethernet interface, run undo portswitch

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 127


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

The interface is switched to Layer 3 mode.


By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run the following commands as required:


l Run the rip metricin value command to set the additional metric for receiving routes.
l Run the rip metricout { value | { acl-number | acl-name acl-name | ip-prefix ip-prefix-
name } value1 } command to set the additional metric for advertising routes.
NOTE

l The rip metricin command is used to add an additional metric to an incoming route. After this route
is added to the routing table, its metric in the routing table changes. Running this command affects
route selection on the local device and other devices on the network.
l The rip metricout command is used to add an additional metric to an outgoing route. When this
route is advertised, an additional metric is added to this route, but the metric of the route in the
routing table does not change. Running this command does not affect route selection on the local
device but affects route selection on other devices in the network.

Step 5 Run commit


The configuration is committed.

----End

3.9.3 Setting the Maximum Number of Equal-Cost Routes


Context
By setting the maximum number of equal-cost RIP routes, you can change the number of
routes for load balancing.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run rip [ process-id ]
The RIP view is displayed.
Step 3 Run maximum load-balancing number
The maximum number of equal-cost routes is set. The default value is 32(64 on the
CE6870EI).

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 128


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Step 4 Run commit


The configuration is committed.

----End

3.9.4 Verifying the RIP Routing Control Configuration

Procedure
l Run the display rip [ process-id | vpn-instance vpn-instance-name ] command to view
the running status and configurations of RIP.
l Run the display rip process-id database [ verbose ] command to view all the active
routes in the RIP database.
l Run the display rip process-id route command to view all RIP routes learned from other
devices.
----End

3.10 Controlling RIP Route Advertisement

Pre-configuration Tasks
Before controlling RIP route advertisement, complete the following task:

l Configuring Basic RIP Functions

Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying the RIP
Route Advertisement Control Configuration) in any sequence as required.

3.10.1 Configuring RIP to Advertise Default Routes

Context
In a routing table, a default route is the route to the network segment [Link] (with the mask
being [Link]). If the destination address of a packet does not match any entry in the routing
table, the packet is sent along the default route.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run rip [ process-id ]
The RIP view is displayed.
Step 3 Run default-route originate [ cost cost | tag tag | { match default | route-policy route-
policy-name [ advertise-tag ] } [ avoid-learning ] ]*

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 129


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

The device is configured to originate a default route to neighbors.


Step 4 Run commit
The configuration is committed.

----End

3.10.2 Disabling an Interface from Sending Update Packets


Context
Routing loops can be avoided by disabling interfaces from sending Update packets.
There are two ways to prevent interfaces from sending Update packets:
l Suppress an interface in the RIP process view.
l Disable an interface from sending RIP packets in the interface view.
The configuration in the RIP process view has a higher priority than the configuration in the
interface view.

Procedure
l Configuration in a RIP process view
a. Run system-view
The system view is displayed.
b. Run rip [ process-id ]
The RIP view is displayed.
c. Run one of the following commands depending on the site requirements:
To disable all interfaces from sending Update packets, run silent-interface all
To disable an interface from sending Update packets, run silent-interface interface-
type interface-number
You can set an interface to silent so that it only receives Update packets to update
its routing table. The silent-interface command takes precedence over the undo rip
output command in the interface view.
By default, an interface can receive and send Update packets.

NOTE

If you want a small number of interfaces to send RIP packets in either broadcast or multicast
mode, you can run the silent-interface all command first to prevent all interfaces from
sending RIP packets in either broadcast or multicast mode and then run the silent-interface
disable interface-type interface-number command to restore the capability to send RIP
packets in either broadcast or multicast mode for the small number of interfaces.
d. Run commit
The configuration is committed.
l Configuration in the interface view
a. Run system-view
The system view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 130


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

b. Run interface interface-type interface-number


The interface view is displayed.
c. On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute
configurations (for example, shutdown and description configurations).
Alternatively, if configuration information supported by both Layer 2 and Layer 3
interfaces exists (for example, mode lacp and lacp system-id configurations), no
configuration that is not supported after the working mode of the interface is
switched can exist. If unsupported configurations exist on the interface, delete the
configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch
batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in
the system view to switch these interfaces to Layer 3 mode in batches.
d. Run undo rip output
The interface is disabled from sending RIP Update packets.
By running this command, you can specify whether to send RIP Update packets on
an interface. The silent-interface command takes precedence over the undo rip
output command. By default, an interface is allowed to send RIP Update packets.
e. Run commit
The configuration is committed.
----End

3.10.3 Configuring RIP to Import Routes


Context
A RIP process can import the routes learned by other RIP processes or routing protocols.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run rip [ process-id ]
The RIP view is displayed.
Step 3 (Optional) Run default-cost cost
The default metric for imported routes is set.
If the metric of imported routes is not specified in step 4, the default metric is used.
Step 4 Run import-route bgp [ permit-ibgp ] [ cost { cost | transparent } | route-policy route-
policy-name ] *

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 131


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Or run import-route { { static | direct } | { { rip | ospf | isis } [ process-id ] } } [ cost cost |
route-policy route-policy-name ] *

External routes are imported to RIP.

NOTE

When RIP imports IBGP routes, routing loops may occur. Configure this function with caution.

Step 5 (Optional) Run filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-name }


export [ protocol [ process-id ] | interface-type interface-number ]

The imported routes are filtered before being advertised.

The routing information advertised by RIP may contain the routing information imported
from other protocols. You can use the protocol parameter to filter the routing information
imported from a specified routing protocol. If the protocol parameter is not used, all the routes
advertised by RIP are filtered, including the imported routes and the local routes (direct
routes).

NOTE

RIP-2 defines a 16-bit tag, while other routing protocols define 32-bit tags. If the routes of other
protocols are imported to RIP and the tag is used in the routing policy, the tag value cannot exceed
65535. If the tag value exceeds 65535, the routing policy becomes invalid or the matching result is
incorrect.

Step 6 Run commit

The configuration is committed.

----End

3.10.4 Verifying the RIP Route Advertisement Control


Configuration

Procedure
l Run the display rip [ process-id | vpn-instance vpn-instance-name ] command to view
the running status and configurations of RIP.
l Run the display rip process-id database [ verbose ] command to view all the active
routes in the RIP database.
l Run the display rip process-id route command to view all RIP routes learned from other
devices.

----End

3.11 Controlling Receiving of RIP Routing Information

Pre-configuration Tasks
Before controlling receiving of RIP routing information, complete the following task:

l Configuring Basic RIP Functions

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 132


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying the RIP
Route Receiving Control Configuration) in any sequence as required.

3.11.1 Disabling an Interface from Receiving RIP Update Packets


Context
Routing loops can be avoided by disabling interfaces from receiving Update packets.

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 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run undo rip input


The interface is disabled from receiving RIP Update packets.
By default, an interface is allowed to receive RIP update packets.
Step 5 Run commit
The configuration is committed.

----End

3.11.2 Configuring RIP to Deny Host Routes


Context
In certain cases, the switch receives a large number of host routes with 32 bits from the same
network segment. These host routes are unnecessary for routing, and they waste network
resources. You can configure the switch to reject all the host routes it receives.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 133


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run rip [ process-id ]

The RIP view is displayed.

Step 3 Run undo host-route

Host routes are not added to the RIP routing table.

By default, host routes can be added to the routing table on the switch.

NOTE

The undo host-route command is invalid for RIP-2.

Step 4 Run commit

The configuration is committed.

----End

3.11.3 Configuring RIP to Filter Received Routes

Context
The filtering policy can be configured on the inbound interface by configuring the ACL and
IP prefix list to filter received routes. Only the routes not filtered out by the filtering policy
are added to the local routing table.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run rip [ process-id ]

The RIP view is displayed.

Step 3 Depending on type of desired filtering, run one of following commands to configure RIP to
filter the received routes:
l Run filter-policy { acl-number | acl-name acl-name } import [ interface-type interface-
number ]
The learned routing information is filtered based on an ACL.
l Run filter-policy gateway ip-prefix-name import
The routing information advertised by neighbors is filtered based on the IP prefix list.
l Run filter-policy ip-prefix ip-prefix-name [ gateway ip-prefix-name ] import
[ interface-type interface-number ]
The routes learned by the specified interface are filtered based on the IP prefix list and
neighbors.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 134


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Step 4 Run commit


The configuration is committed.

----End

3.11.4 Checking RIP Packets with Metric 0


Context
By default, the device does not accept the RIP packets with metric 0. Therefore, the RIP
interface discards all the RIP packets with metric 0. Some third-party devices on the network
accept the RIP packets with metric 0. To ensure that the Huawei devices can work with the
third-party devices, run the undo zero-metric-check command.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run rip [ process-id ]
A RIP process is created and the RIP view is displayed.
Step 3 Run undo zero-metric-check
Interfaces are allowed to accept the RIP packets with metric 0.
Step 4 Run commit
The configuration is committed.

----End

3.11.5 Verifying the RIP Route Receiving Control Configuration


Procedure
l Run the display rip [ process-id | vpn-instance vpn-instance-name ] command to check
the running status and configuration of RIP.
l Run the display rip process-id database [ verbose ] command to check all activated
RIP routes in the database.
l Run the display rip process-id interface [ interface-type interface-number ] [ verbose ]
command to check information about the RIP interface.
l Run the display rip process-id neighbor [ neighbor-address neighbor-address ]
[ verbose ] command to check information about RIP neighbors.
l Run the display rip process-id route command to check all the RIP routes that are
learned from other switchs.
----End

3.12 Improving RIP Network Performance

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 135


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Pre-configuration Tasks
Before improving RIP network performance, complete the following task:
l Configuring Basic RIP Functions

Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying the RIP
Network Performance Optimization Configuration) in any sequence as required.

3.12.1 Configuring RIP Timers


Context
RIP uses 4 timers: Update, Age, Suppress, and Garbage-collect. Changing the timer values
affects the convergence speed of RIP routes.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run rip [ process-id ]
The RIP view is displayed.
Step 3 Run timers rip update age suppress garbage-collect
RIP timers are configured.

NOTE

l RIP timers take effect immediately after being changed.


l Route flapping occurs if the values of the four timers are set improperly. The relationship between
the values is as follows: update must be smaller than age and suppress must be smaller than
garbage-collect. For example, if the update time is longer than the aging time, and a RIP route
changes within the update time, the switch cannot inform its neighbors of the change on time.
l You must configure RIP timers based on the network performance and uniformly on all the devices
running RIP. This avoids unnecessary network traffic or route flapping.

By default, the Update timer is 30s; the Age timer is 180s; the Suppress timer is 0s; the
Garbage-collect timer is four times the Update timer, namely, 120s.
In practice, the Garbage-collect timer is not fixed. If the Update timer is set to 30s, the
Garbage-collect timer may range from 90s to 120s.
Before permanently deleting an unreachable route from the routing table, RIP advertises this
route (with the metric being set to 16) by periodically sending Update packets four times.
Subsequently, all the neighbors know that this route is unreachable. Because a route may not
always become unreachable at the beginning of an Update period, the Garbage-collect timer is
actually three or four times the Update timer.
Step 4 Run commit
The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 136


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

3.12.2 Setting the Interval for Sending Update Packets and


Maximum Number of Sent Packets

Context
To limit memory resources occupied by RIP Update packets, set the interval for sending RIP
Update packets and the maximum number of Update packets to be sent at a time to
appropriate values.

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 On an Ethernet interface, run undo portswitch

The interface is switched to Layer 3 mode.

By default, an Ethernet interface works in Layer 2 mode.

The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run rip pkt-transmit { interval interval | number pkt-count | bandwidth bandwidth-value }
*

The interval for sending RIP Update packets and the maximum number of Update packets to
be sent at a time are set.

Step 5 Run commit

The configuration is committed.

----End

3.12.3 Setting the Maximum Length of RIP Packets

Context
By default, a RIP packet contains 25 routes. Increasing the maximum length of RIP packets
can add more routes to the packets. Large RIP packets improve bandwidth use efficiency.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 137


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Before using the rip max-packet-length command to increase packet length, ensure that the
peer interface accepts the RIP packets longer than 512 bytes.
After the packet length is increased, Huawei devices may fail to communicate with non-
Huawei devices. Therefore, use this command with caution.

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 On an Ethernet interface, run undo portswitch

The interface is switched to Layer 3 mode.

By default, an Ethernet interface works in Layer 2 mode.

The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run rip max-packet-length { value | mtu }

The maximum length of RIP packets is set.

mtu indicates the maximum RIP packet length.

By default, the maximum length of RIP packets is 512 bytes.

Step 5 Run commit

The configuration is committed.

----End

3.12.4 Configuring RIP to Check the Validity of Update Packets

Context
Checking RIP Update packet validity improves network security. Validity check includes zero
field check for RIP-1 packets and source address check for RIP Update packets.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 138


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

l In a RIP-1 packet, the values of some fields must be zero. These fields are zero fields.
After zero field check is enabled, the device checks the zero fields in the RIP-1 packets
and discards the packets in which the zero field values are not 0.
l This command verifies the source IP address of the received RIP packet. Specifically, the
command checks whether the IP address of the interface that sends the packet is in the
same network segment as the IP address of the interface that receives the packet. If the
addresses are not in the same network segment, the RIP packet will not be processed.

Procedure
l Configure the zero field check for RIPv1 packets.
a. Run system-view

The system view is displayed.


b. Run rip [ process-id ]

The RIP view is displayed.


c. Run checkzero

The zero field check is configured for RIP-1 packets.

Configuring the zero field check is invalid in RIP-2.


d. Run commit

The configuration is committed.


l Configure the source address check for RIP Update packets.
a. Run system-view

The system view is displayed.


b. Run rip [ process-id ]

The RIP view is displayed.


c. Run verify-source

The source IP address check is configured for RIP Update packets.


d. Run commit

The configuration is committed.

----End

3.12.5 Configuring RIP Triggered Update

Context
You can speed up network convergence by changing the values of triggered update timers.

Procedure
Step 1 Run system-view

The system view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 139


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Step 2 Run rip [ process-id ]


The RIP process is created and the RIP view is displayed.
Step 3 Run timers rip triggered { minimum-interval minimum-interval | incremental-interval
incremental-interval | maximum-interval maximum-interval } *
RIP triggered update timers are configured.
Step 4 Run commit
The configuration is committed.

----End

3.12.6 Setting the Maximum Number of RIP Routes

Context
You can set the maximum number of RIP routes to make full use of network resources and
improve network performance.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run rip [ process-id ]
The RIP process is created and the RIP view is displayed.
Step 3 Run maximum-routes max-number [ threshold threshold-value ]
The maximum number of routes is set.
Step 4 Run commit
The configuration is committed.

----End

3.12.7 Verifying the RIP Network Performance Optimization


Configuration

Procedure
l Run the display rip [ process-id | vpn-instance vpn-instance-name ] command to view
the running status and configurations of RIP.
l Run the display rip process-id database [ verbose ] command to view all the active
routes in the RIP database.
l Run the display rip process-id interface [ interface-type interface-number ] [ verbose ]
command to view information about the RIP interface.
l Run the display rip process-id neighbor [ neighbor-address neighbor-address ]
[ verbose ] command to view the RIP neighbor configuration.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 140


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

l Run the display rip process-id route command to view all RIP routes learned from other
devices.

----End

3.13 Configuring BFD for RIP

Pre-configuration Tasks
Before configuring BFD for RIP, complete the following task:

l Configuring Basic RIP Functions

Configuration Procedure
You can perform the following configuration tasks in any sequence as required.

3.13.1 Configuring Dynamic BFD for RIP

Applicable Environment
Generally, RIP uses timers to receive and send Update messages to maintain neighbor
relationships. If a RIP device does not receive an Update message from a neighbor after the
Age timer expires, the RIP device will announce that this neighbor goes Down. The default
value of the Age timer is 180s. If a link fault occurs, RIP can detect this fault after 180s. If
high-rate data services are deployed on a network, a great deal of data will be lost during the
aging time.

BFD provides millisecond-level fault detection. It can rapidly detect faults in protected links
or nodes and report them to RIP. This speeds up RIP processes' response to network topology
changes and achieves rapid RIP route convergence.

Either of the following methods can be used to configure BFD for RIP:
l Enable BFD in a RIP process: This method is recommended when BFD for RIP needs to
be enabled on most RIP interfaces.
l Enable BFD on RIP interfaces: This method is recommended when BFD for RIP needs
to be enabled on a small number of RIP interfaces.

Procedure
l Enable BFD in a RIP process.
a. Run system-view

The system view is displayed.


b. Run bfd

BFD is enabled globally.


c. Run quit

Return to the system view.


d. Run rip [ process-id ]

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 141


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

The RIP view is displayed.


e. Run bfd all-interfaces enable
BFD is enabled in the RIP process to establish a BFD session.
If BFD is enabled globally, RIP will use default BFD parameters to establish BFD
sessions on all the interfaces where RIP neighbor relationships are in the Up state.
f. (Optional) Run bfd all-interfaces { min-rx-interval min-receive-value | min-tx-
interval min-transmit-value | detect-multiplier detect-multiplier-value } *
The values of BFD parameters used to establish the BFD session are set.
BFD parameter values are determined by the actual network situation and network
reliability requirement.
n If links have a high reliability requirement, reduce the interval at which BFD
packets are sent.
n If links have a low reliability requirement, increase the interval at which BFD
packets are sent.
Running the bfd all-interfaces command changes BFD session parameters on all
RIP interfaces. The default detection multiplier and interval at which BFD packets
are sent are recommended.
g. (Optional) Perform the following operations to prevent an interface in the RIP
process from establishing a BFD session:
n Run the quit command to return to the system view.
n Run the interface interface-type interface-number command to enter the view
of a specified interface.
NOTE

On an Ethernet interface, run undo portswitch to switch the interface to Layer 3


mode.
n Run the rip bfd block command to prevent the interface from establishing a
BFD session.
h. Run commit
The configuration is committed.
l Enable BFD on RIP interfaces.
a. Run system-view
The system view is displayed.
b. Run bfd
BFD is enabled globally.
c. Run quit
Return to the system view.
d. Run interface interface-type interface-number
The view of the specified interface is displayed.
e. On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 142


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

The mode switching function takes effect when the interface only has attribute
configurations (for example, shutdown and description configurations).
Alternatively, if configuration information supported by both Layer 2 and Layer 3
interfaces exists (for example, mode lacp and lacp system-id configurations), no
configuration that is not supported after the working mode of the interface is
switched can exist. If unsupported configurations exist on the interface, delete the
configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch
batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in
the system view to switch these interfaces to Layer 3 mode in batches.
f. Run rip bfd enable

BFD is enabled on the interface to establish a BFD session.


g. (Optional) Run rip bfd { min-rx-interval min-receive-value | min-tx-interval min-
transmit-value | detect-multiplier detect-multiplier-value } *

The values of BFD parameters used to establish the BFD session are set.
h. Run commit

The configuration is committed.

----End

Verifying the Configuration


After enabling BFD for RIP at both ends of a link,
l Run the display rip process-id bfd session { interface interface-type interface-number |
neighbor-id | all } command. You can see that the BFDState field value on the local
switch is displayed Up.

3.13.2 Configuring Static BFD for RIP

Context
BFD provides link failure detection featuring light load and high speed. Static BFD for RIP is
a mode to implement the BFD function.

Establishing BFD sessions between RIP neighbors can rapidly detect faults on links and speed
up response of RIP to network topology changes.

Static BFD must be enabled using a command.

Procedure
Step 1 Enable BFD globally.
1. Run system-view

The system view is displayed.


2. Run bfd

BFD is enabled globally.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 143


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

3. Run quit

Return to the system view.

Step 2 Configure Static BFD.


1. Run bfd session-name bind peer-ip ip-address [ interface interface-type interface-
number ] [ source-ip ip-address ]

BFD binding is created.

If a peer IP address and a local interface are specified, BFD detects only a single-hop
link, that is, a route with the interface specified in the bfd command as the outbound
interface and with the peer IP address specified in the peer-ip command as the next-hop
address.
2. Set discriminators.
– Run discriminator local discr-value
The local discriminator is set.
– Run discriminator remote discr-value
The remote discriminator is set.

The local discriminator must be the remote discriminator of the device on the other end;
otherwise, a BFD session cannot be established. The local and remote discriminators
cannot be modified after being configured.

NOTE

local discr-value set on the local device is the same as that of remote discr-value set on the remote
[Link] discr-value set on the local device is the same as that of local discr-value set on the
remote device.
3. Run quit

Return to the system view.

Step 3 Enable static BFD on an interface.


1. Run interface interface-type interface-number

The view of the specified interface is displayed.


2. On an Ethernet interface, run undo portswitch

The interface is switched to Layer 3 mode.

By default, an Ethernet interface works in Layer 2 mode.

The mode switching function takes effect when the interface only has attribute
configurations (for example, shutdown and description configurations). Alternatively, if
configuration information supported by both Layer 2 and Layer 3 interfaces exists (for
example, mode lacp and lacp system-id configurations), no configuration that is not
supported after the working mode of the interface is switched can exist. If unsupported
configurations exist on the interface, delete the configurations first and then run the undo
portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system
view to switch these interfaces to Layer 3 mode in batches.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 144


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

3. Run rip bfd static


Static BFD is enabled on the interface.
4. Run quit
Return to the system view.
Step 4 Run commit
The configuration is committed.

----End

Verifying the Configuration


After configuring static BFD for RIP,
l Run the display rip process-id interface [ interface-type interface-number ] verbose
command to check BFD for RIP configurations on the specified interface.

3.14 Configuring the Network Management Function for


RIP

Pre-configuration Tasks
Before configuring the network management function for RIP, complete the following task:
l Configuring Basic RIP Functions

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run rip mib-binding process-id
RIP is bound to the MIB.
This command is used to bind a RIP process ID to MIBs and specify the ID of the RIP
process that accepts Simple Network Management Protocol (SNMP) requests.
Step 3 Run commit
The configuration is committed.

----End

Verifying the Configuration


l Run the display current-configuration command to view the binding relationships of
RIP.

3.15 Maintaining RIP

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 145


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

3.15.1 Resetting RIP

Context

The RIP neighbor relationship is deleted after you reset RIP connections with the reset rip
command. Exercise caution when running this command.

To reset RIP connections, run the following reset commands in the user view.

Procedure
l Run the reset rip { process-id | all } configuration command to reset the system
parameters of a RIP process. When a RIP process restarts, all the parameters of the
process retain the default values.

----End

3.15.2 Clearing RIP Statistics

Context

RIP information cannot be restored after it is cleared. Exercise caution when running the
commands.

To clear RIP statistics, run the following reset commands in the user view.

Procedure
l Run the reset rip { process-id | all } imported-routes command to clear the routes
imported from other routing protocols, including dynamic routes and direct routes, and
import the routes to RIP again.
l Run the reset rip { process-id | all } statistics command to clear the counters of a RIP
process. This command is used to recount statistics during debugging.

----End

3.16 Configuration Examples for RIP


This section only provides configuration examples for individual features. For details about
multi-feature configuration examples, feature-specific configuration examples, interoperation
examples, protocol or hardware replacement examples, and industry application examples, see
the Typical Configuration Examples.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 146


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

3.16.1 Example for Configuring Basic RIP Functions


Networking Requirements
As shown in Figure 3-9, SwitchA, SwitchB, SwitchC, and SwitchD are located on a small-
sized network, and they need to communicate with each other.

Figure 3-9 Network diagram of basic RIP functions


SwitchC

10GE1/0/2
VLANIF20
[Link]/24 10GE1/0/2
10GE1/0/1 VLANIF20 10GE1/0/3
VLANIF10 [Link]/24 VLANIF20
[Link]/24 [Link]/24
10GE1/0/1 10GE1/0/3
VLANIF10 VLANIF30
SwitchA SwitchD
[Link]/24 SwitchB10.1.1.1/24

Configuration Roadmap
The network size is small, so RIP-2 is recommended. The configuration roadmap is as
follows:
1. Configure a VLAN and an IP address for each interface to ensure network reachability.
2. Enable RIP on each switch to implement network connections between processes.
3. Configure RIP-2 on each switch to improve RIP performance.

Procedure
Step 1 Name the [Link] configuration procedure is not provided here.
Step 2 Configure a VLAN and an IP address for each interface. The configuration procedure is not
provided here.
Step 3 Specify the network segment where RIP needs to be enabled.
# Configure SwitchA.
[~SwitchA] rip
[*SwitchA-rip-1] network [Link]
[*SwitchA-rip-1] commit
[~SwitchA-rip-1] quit

# Configure SwitchB.
[~SwitchB] rip
[*SwitchB-rip-1] network [Link]
[*SwitchB-rip-1] network [Link]
[*SwitchB-rip-1] network [Link]
[*SwitchB-rip-1] commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 147


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

[~SwitchB-rip-1] quit

# Configure SwitchC.
[~SwitchC] rip
[*SwitchC-rip-1] network [Link]
[*SwitchC-rip-1] commit
[~SwitchC-rip-1] quit

# Configure SwitchD.
[~SwitchD] rip
[*SwitchD-rip-1] network [Link]
[*SwitchD-rip-1] commit
[~SwitchD-rip-1] quit

# Display the RIP routing table of SwitchA.


[~SwitchA] display rip 1 route
Route Flags: R - RIP
A - Aging, S - Suppressed, G - Garbage-collect
-------------------------------------------------------------------------
Peer [Link] on Vlanif10
Destination/Mask Nexthop Cost Tag Flags Sec
[Link]/8 [Link] 1 0 RA 14
[Link]/16 [Link] 1 0 RA 14

From the routing table, you can find that the routes advertised by RIP-1 use natural masks.
Step 4 Specify the RIP version.
# Configure RIP-2 on SwitchA.
[~SwitchA] rip
[*SwitchA-rip-1] version 2
[*SwitchA-rip-1] commit
[~SwitchA-rip-1] quit

# Configure RIP-2 on SwitchB.


[~SwitchB] rip
[*SwitchB-rip-1] version 2
[*SwitchB-rip-1] commit
[~SwitchB-rip-1] quit

# Configure RIP-2 on SwitchC.


[~SwitchC] rip
[*SwitchC-rip-1] version 2
[*SwitchC-rip-1] commit
[~SwitchC-rip-1] quit

# Configure RIP-2 on SwitchD.


[~SwitchD] rip
[*SwitchD-rip-1] version 2
[*SwitchD-rip-1] commit
[~SwitchD-rip-1] quit

Step 5 Verify the configuration.


# Display the RIP routing table of SwitchA.
[~SwitchA] display rip 1 route
Route Flags: R - RIP
A - Aging, S - Suppressed, G - Garbage-collect
-------------------------------------------------------------------------
Peer [Link] on Vlanif10
Destination/Mask Nexthop Cost Tag Flags Sec
[Link]/24 [Link] 1 0 RA 32

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 148


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

[Link]/24 [Link] 1 0 RA 32

The RIP routing table shows that the routes advertised by RIP-2 contain accurate subnet
masks.

----End

Configuration Files
l # Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10
#
interface Vlanif 10
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
rip 1
version 2
network [Link]
#
return

l # Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 10 20 30
#
interface Vlanif 10
ip address [Link] [Link]
#
interface Vlanif 20
ip address [Link] [Link]
#
interface Vlanif 30
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 30
#
rip 1
version 2
network [Link]
network [Link]
network [Link]
#
return

l # Configuration file of SwitchC


#
sysname SwitchC
#
vlan batch 20

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 149


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

#
interface Vlanif 20
ip address [Link] [Link]
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
rip 1
version 2
network [Link]
#
return

l # Configuration file of SwitchD


#
sysname SwitchD
#
vlan batch 30
#
interface Vlanif 30
ip address [Link] [Link]
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
rip 1
version 2
network [Link]
#
return

3.16.2 Example for Importing Routes to RIP


Networking Requirements
As shown in Figure 3-10, two RIP processes, RIP100 and RIP200, run on SwitchB. SwitchA
needs to communicate with network segment [Link]/24.

Figure 3-10 Network diagram of importing routes to RIP

10GE1/0/1 10GE1/0/2
VLANIF50 VLANIF30
[Link]/24 [Link]/24
10GE1/0/2 10GE1/0/1
VLANIF10 SwitchB VLANIF20
[Link]/24 [Link]/24 SwitchC
10GE1/0/2 10GE1/0/1
SwitchA VLANIF10 VLANIF20 10GE1/0/3
[Link]/24 [Link]/24 VLANIF40
RIP 100 [Link]/24
RIP 200

Configuration Roadmap
The configuration roadmap is as follows:

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 150


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

1. Enable RIP on each switch to implement network connections between processes.


2. On SwitchB, import routes between RIP100 and RIP200 and set the default metric of
routes imported from RIP200 to 3.
3. Configure an ACL on SwitchB to filter route [Link]/24 imported from RIP200.

Procedure
Step 1 Name the device. The configuration procedure is not provided here.

Step 2 Configure a VLAN and an IP address for each interface. The configuration procedure is not
provided here.

Step 3 Configure basic RIP functions.

# Enable RIP100 on SwitchA.


[~SwitchA] rip 100
[*SwitchA-rip-100] network [Link]
[*SwitchA-rip-100] network [Link]
[*SwitchA-rip-100] commit
[~SwitchA-rip-100] quit

# Enable RIP100 and RIP200 on SwitchB.


[~SwitchB] rip 100
[*SwitchB-rip-100] network [Link]
[*SwitchB-rip-100] commit
[~SwitchB-rip-100] quit
[~SwitchB] rip 200
[*SwitchB-rip-200] network [Link]
[*SwitchB-rip-200] commit
[~SwitchB-rip-200] quit

# Enable RIP200 on SwitchC.


[~SwitchC] rip 200
[*SwitchC-rip-200] network [Link]
[*SwitchC-rip-200] network [Link]
[*SwitchC-rip-200] network [Link]
[*SwitchC-rip-200] commit
[~SwitchC-rip-200] quit

# Display the routing table of SwitchA.


[~SwitchA] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table: _public_
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
[Link]/8 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/24 Direct 0 0 D [Link] Vlanif50
[Link]/32 Direct 0 0 D [Link] Vlanif50
[Link]/32 Direct 0 0 D [Link] Vlanif50
[Link]/24 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] InLoopBack0

The routing table of SwitchA does not contain the routes imported from other processes.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 151


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Step 4 Configure RIP to import external routes.


# On SwitchB, set the default metric of imported routes to 3 and configure the RIP processes
to import routes into each other's routing table.
[~SwitchB] rip 100
[~SwitchB-rip-100] default-cost 3
[*SwitchB-rip-100] import-route rip 200
[*SwitchB-rip-100] quit
[*SwitchB] rip 200
[*SwitchB-rip-200] import-route rip 100
[*SwitchB-rip-200] quit
[*SwitchB] commit

# Display the routing table of SwitchA after the routes are imported.
[~SwitchA] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table: _public_
Destinations : 13 Routes : 13

Destination/Mask Proto Pre Cost Flags NextHop Interface

[Link]/8 Direct 0 0 D [Link] InLoopBack0


[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/24 Direct 0 0 D [Link] Vlanif50
[Link]/32 Direct 0 0 D [Link] Vlanif50
[Link]/32 Direct 0 0 D [Link] Vlanif50
[Link]/24 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/24 RIP 100 4 D [Link] Vlanif10
[Link]/24 RIP 100 4 D [Link] Vlanif10
[Link]/24 RIP 100 4 D [Link] Vlanif10

The RIP routing table of SwitchA contains routes [Link]/24, [Link]/24, and
[Link]/24, which are learned by RIP200 on SwitchB.
Step 5 Configure RIP to filter imported routes.
# Configure an ACL on SwitchB and add a rule to the ACL. The rule denies the packets sent
from [Link]/24.
[~SwitchB] acl 2000
[*SwitchB-acl4-basic-2000] rule deny source [Link] [Link]
[*SwitchB-acl4-basic-2000] rule permit
[*SwitchB-acl4-basic-2000] quit

# Configure SwitchB to filter route [Link]/24 imported from RIP200.


[*SwitchB] rip 100
[*SwitchB-rip-100] filter-policy 2000 export
[*SwitchB-rip-100] quit
[*SwitchB] commit

Step 6 Verify the configuration.


# Display the RIP routing table of SwitchA after the routes are filtered.
[~SwitchA] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 152


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

------------------------------------------------------------------------------
Routing Table: _public_
Destinations : 12 Routes : 12

Destination/Mask Proto Pre Cost Flags NextHop Interface

[Link]/8 Direct 0 0 D [Link] InLoopBack0


[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/24 Direct 0 0 D [Link] Vlanif50
[Link]/32 Direct 0 0 D [Link] Vlanif50
[Link]/32 Direct 0 0 D [Link] Vlanif50
[Link]/24 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/24 RIP 100 4 D [Link] Vlanif10
[Link]/24 RIP 100 4 D [Link] Vlanif10

The RIP routing table of SwitchA does not contain the route originating from [Link]/24.

----End

Configuration Files
l # Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10 50
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif50
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 50
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 10
#
rip 100
network [Link]
network [Link]
#
return

l # Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 10 20
#
acl number 2000
rule 5 deny source [Link] [Link]
rule 10 permit
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif20
ip address [Link] [Link]
#
interface 10GE1/0/1

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 153


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

port link-type trunk


port trunk allow-pass vlan 20
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 10
#
rip 100
default-cost 3
network [Link]
filter-policy 2000 export
import-route rip 200
#
rip 200
network [Link]
import-route rip 100
#
return

l # Configuration file of SwitchC


#
sysname SwitchC
#
vlan batch 20 30 40
#
interface Vlanif20
ip address [Link] [Link]
#
interface Vlanif30
ip address [Link] [Link]
#
interface Vlanif40
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 40
#
rip 200
network [Link]
network [Link]
network [Link]
#
return

3.16.3 Example for Configuring Dynamic BFD for RIP


Networking Requirements
As shown in Figure 3-11, there are four switches that communicate using RIP on a small-
sized network. Services are transmitted through the primary link Switch A→Switch
B→Switch D. Reliability must be improved for data transmitted from Switch A to Switch B
so that services can be rapidly switched to another path for transmission when the primary
link fails.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 154


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Figure 3-11 Networking diagram for configuring BFD for RIP

10GE1/0/1 10GE1/0/1SwitchB10GE1/0/3
SwitchA VLANIF10 VLANIF10 VLANIF40
SwitchD
[Link]/24 [Link]/24 [Link]/24
10GE1/0/1
10GE1/0/2 10GE1/0/2 VLANIF40
VLANIF20 VLANIF30 [Link]/24
[Link]/24 [Link]/24
10GE1/0/2 10GE1/0/1
VLANIF20 VLANIF30
[Link]/24 SwitchC192.168.4.2/24

Configuration Roadmap
The configuration roadmap is as follows:

1. Configure a VLAN and an IP address for each interface to ensure network reachability.
2. Enable RIP on each switch to implement network connections between processes.
3. Configure BFD for RIP on interfaces at both ends of the link between Switch A and
Switch B. BFD can rapidly detect the link status and help RIP speed up route
convergence to implement fast link switching.

Procedure
Step 1 Configure a VLAN for each interface.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan batch 10 20
[*SwitchA] interface 10GE 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10GE 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 20
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit

The configurations of Switch B, Switch C and Switch D are similar to the configuration of
Switch A, and are not mentioned here.

Step 2 Configure IP address for each VLANIF interface.


[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ip address [Link] 24
[*SwitchA-Vlanif10] quit
[*SwitchA] interface vlanif 20
[*SwitchA-Vlanif20] ip address [Link] 24
[*SwitchA-Vlanif20] quit
[*SwitchA] commit

The configurations of Switch B, Switch C and Switch D are similar to the configuration of
Switch A, and are not mentioned here.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 155


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

Step 3 Configure basic RIP functions.


# Configure Switch A.
<SwitchA> system-view
[~SwitchA] rip 1
[*SwitchA-rip-1] version 2
[*SwitchA-rip-1] network [Link]
[*SwitchA-rip-1] network [Link]
[*SwitchA-rip-1] quit
[*SwitchA] commit

# Configure Switch B.
<SwitchB> system-view
[~SwitchB] rip 1
[*SwitchB-rip-1] version 2
[*SwitchB-rip-1] network [Link]
[*SwitchB-rip-1] network [Link]
[*SwitchB-rip-1] network [Link]
[*SwitchB-rip-1] quit
[*SwitchB] commit

# Configure Switch C.
<SwitchC> system-view
[~SwitchC] rip 1
[*SwitchC-rip-1] version 2
[*SwitchC-rip-1] network [Link]
[*SwitchC-rip-1] network [Link]
[*SwitchC-rip-1] quit
[*SwitchC] commit

# Configure Switch D.
<SwitchD> system-view
[~SwitchD] rip 1
[*SwitchD-rip-1] version 2
[*SwitchD-rip-1] network [Link]
[*SwitchD-rip-1] quit
[*SwitchD] commit

# After completing the preceding operations, run the display rip neighbor command. The
command output shows that Switch A, Switch B, and Switch C have established neighbor
relationships with each other. In the following example, the display on Switch A is used.
[~SwitchA] display rip 1 neighbor
---------------------------------------------------------------------
IP Address Interface Type Last-Heard Routes
---------------------------------------------------------------------
[Link] Vlanif10 RIP 0:0:14 2
[Link] Vlanif20 RIP 0:0:19 1

# Run the display ip routing-table command. The command output shows that the switches
have imported routes from each other. In the following example, the display on Switch A is
used.
[~SwitchA] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table: _public_
Destinations : 12 Routes : 13

Destination/Mask Proto Pre Cost Flags NextHop Interface

[Link]/8 Direct 0 0 D [Link] InLoopBack0


[Link]/32 Direct 0 0 D [Link] InLoopBack0

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 156


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

[Link]/32 Direct 0 0 D [Link] InLoopBack0


[Link]/24 RIP 100 1 D [Link] Vlanif10
[Link]/24 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/24 Direct 0 0 D [Link] Vlanif20
[Link]/32 Direct 0 0 D [Link] Vlanif20
[Link]/32 Direct 0 0 D [Link] Vlanif20
[Link]/24 RIP 100 1 D [Link] Vlanif20
RIP 100 1 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] InLoopBack0

The preceding command output shows that the next-hop address and outbound interface of the
route to destination [Link]/16 are [Link] and VLANIF10 respectively, and traffic is
transmitted over the active link Switch A->Switch B.
Step 4 Configure BFD in RIP processes.
# Configure BFD on all interfaces of Switch A.
[~SwitchA] bfd
[*SwitchA-bfd] quit
[*SwitchA] rip 1
[*SwitchA-rip-1] bfd all-interfaces enable
[*SwitchA-rip-1] bfd all-interfaces min-rx-interval 100 min-tx-interval 100
detect-multiplier 10
[*SwitchA-rip-1] quit
[*SwitchA] commit

The configuration of Switch B is similar to that of Switch A, and is not provided here.
# After completing the preceding operations, run the display rip bfd session command on
Switch A. The command output shows that Switch A and Switch B have established a BFD
session and the BFDState field value is displayed as Up. In the following example, the
display on Switch A is used.
[~SwitchA] display rip 1 bfd session all
Interface :Vlanif10
LocalIp :[Link] RemoteIp :[Link] BFDState :Up

Interface :Vlanif20
LocalIp :[Link] RemoteIp :[Link] BFDState :Down

Step 5 Verify the configuration.


# Run the shutdown command on 10GE1/0/0 of Switch B to simulate a fault in the active
link.

NOTE

The link fault is simulated to verify the configuration. In actual situations, the operation is not required.
[~SwitchB] interface 10GE 1/0/1
[~SwitchB-10GE1/0/1] shutdown
[*SwitchB-10GE1/0/1] commit

# Check the routing table of Switch A.


[~SwitchA] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table: _public_
Destinations : 9 Routes : 9

Destination/Mask Proto Pre Cost Flags NextHop Interface

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 157


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

[Link]/8 Direct 0 0 D [Link] InLoopBack0


[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/24 RIP 100 2 D [Link] Vlanif20
[Link]/24 Direct 0 0 D [Link] Vlanif20
[Link]/32 Direct 0 0 D [Link] Vlanif20
[Link]/32 Direct 0 0 D [Link] Vlanif20
[Link]/24 RIP 100 1 D [Link] Vlanif20
[Link]/32 Direct 0 0 D [Link] InLoopBack0

The preceding command output shows that the standby link Switch A->Switch C->Switch B
is used after the active link fails, and the next-hop address and outbound interface of the route
to destination [Link]/16 are [Link] and VLANIF20 respectively.

----End

Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10 20
#
bfd
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif20
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
rip 1
version 2
network [Link]
network [Link]
bfd all-interfaces enable
bfd all-interfaces min-tx-interval 100 min-rx-interval 100 detect-multiplier
10
#
return

l Configuration file of Switch B


#
sysname SwitchB
#
vlan batch 10 30 40
#
bfd
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif30
ip address [Link] [Link]
#
interface Vlanif40
ip address [Link] [Link]
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 158


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 40
#
rip 1
version 2
network [Link]
network [Link]
network [Link]
bfd all-interfaces enable
bfd all-interfaces min-tx-interval 100 min-rx-interval 100 detect-multiplier
10
#
return

l Configuration file of Switch C


#
sysname SwitchC
#
vlan batch 20 30
#
interface Vlanif20
ip address [Link] [Link]
#
interface Vlanif30
ip address [Link] [Link]
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
rip 1
version 2
network [Link]
network [Link]
#
return

l Configuration file of Switch D


#
sysname SwitchD
#
vlan batch 40
#
interface Vlanif40
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 40
#
rip 1
version 2
network [Link]
#
return

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 159


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

3.17 Troubleshooting RIP

3.17.1 Failed to Receive RIP Update Packets from Neighbors

Fault Description
A device cannot receive RIP Update packets from neighbors when the link runs properly.

Procedure
Step 1 Run the display current-configuration configuration rip command to check RIP
configurations.
l Check whether RIP has been enabled on the interface. Only the RIP-enabled interface
can receive RIP packets.
l Check whether the version number in the RIP packet sent by the peer interface matches
the version number in the RIP packet received by the local interface. If not, the two
interfaces cannot establish the RIP neighbor relationship.
Step 2 Run the display current-configuration interface interface-type interface-number command
to view the interface configuration.
l Check whether the undo rip input command has been executed on the interface. If the
command has been executed, the interface does not receive RIP packets.
l Check whether the authentication modes on the two ends of the link are the same. If the
authentication modes are different, the interface cannot receive RIP packets from the
peer.

----End

3.17.2 Failed to Send RIP Update Packets to Neighbors

Fault Description
A device cannot send RIP Update packets to neighbors when the link runs properly.

Procedure
Step 1 Run the display current-configuration configuration rip command to check RIP
configurations.
l Check whether RIP has been enabled on the interface. Only the RIP-enabled interface
can send RIP packets.
l Check whether the silent-interface command has been executed on the interface. If the
command has been executed, the interface does not send RIP packets.
Step 2 Run the display current-configuration interface interface-type interface-number command
to view the interface configuration.
l Check whether the undo rip output command has been executed on the interface. If the
command has been executed, the interface does not send RIP packets.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 160


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 3 RIP Configuration

l Check whether the authentication modes on the two ends of the link are the same. If the
authentication modes are different, the interface cannot send RIP packets to the peer.
l Check whether split horizon has been enabled on the interface. If split horizon has been
enabled, the interface cannot send the route learned by itself to neighbors.
NOTE

Split horizon is enabled on all interfaces by default, but the display current-configuration
command output does not show the split horizon option. If the command output for an interface
connected to an NBMA network does not contain the split horizon option, split horizon is disabled
on the interface.

----End

3.17.3 Route Flapping Occurs on a RIP Network


Fault Description
Route flapping occurs on a RIP network when the link runs properly. Some routes
intermittently disappear in the routing table.

Procedure
Step 1 Run the display rip command to check the configuration of RIP timers.
The RIP timers on the entire network must be consistent; otherwise, route flapping occurs.
The relationships between the timer values are update < age, suppress < garbage-collect.
Step 2 Run the timers rip update age suppress garbage-collect command to set the RIP timers.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 161


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 4 RIPng Configuration

4 RIPng Configuration

About This Chapter

RIPng is widely used on small-sized networks to discover routes and generate routing
information.

4.1 Overview of RIPng


4.2 Understanding RIPng
4.3 Summary of RIPng Configuration Tasks
4.4 Licensing Requirements and Limitations for RIPng
4.5 Default Settings for RIPng
4.6 Configuring Basic RIPng Functions
4.7 Preventing Routing Loops
4.8 Controlling RIPng Routing
4.9 Controlling RIPng Route Advertisement
4.10 Improving RIPng Network Performance
4.11 Clearing RIPng
4.12 Configuration Examples for RIPng

4.1 Overview of RIPng


Routing Information Protocol next generation (RIPng) is a simple Interior Gateway Protocol
(IGP). It is the extension of RIP on IPv6 networks. RIPng applies to small-scale networks,
such as campus networks and regional networks with simple structure. RIPng is widely used
on networks because of its simple implementation and ease of configuration and maintenance
compared to OSPFv3 and IPv6 IS-IS.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 162


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 4 RIPng Configuration

NOTE

RIPng does not have the security authentication mechanism. For security purposes, configure OSPFv3,
BGP4+, or IPv6 IS-IS.

4.2 Understanding RIPng


This section describes only the differences between RIP and RIPng. For details about the RIP
implementation, see 3.2 Understanding RIP.

4.2.1 Comparison Between RIPng and RIP


In addition to IPv4 networks, RIP is also applicable to IPv6 networks to provide accurate
route information for IPv6 packets. IETF has defined RIP next generation (RIPng) based on
RIP for IPv6 networks. RIPng is an important protocol for IPv6 networks.
RIPng made the following modifications to RIP:
l RIPng uses UDP port 521 to send and receive routing information.
l RIPng uses the destination addresses with 128-bit prefixes (mask length).
l RIPng uses 128-bit IPv6 addresses as next hop addresses.
l RIPng uses the local link address FE80::/10 as the source address to send RIPng Update
packets.
l RIPng periodically sends routing information in multicast mode and uses FF02::9 as
multicast address.
l A RIPng packet consists of a header and multiple route table entries (RTEs). In a RIPng
packet, the maximum number of RTEs depends on the MTU on the interface.

4.3 Summary of RIPng Configuration Tasks


After basic RIPng functions are configured, you can build a Layer 3 network using the RIPng
protocol. If other RIPng functions are required, configure them according to reference
sections.

NOTE

RIPng is a basic feature of the CE8800, CE7800, CE6800, and CE5800 series switches and is not under
license control.

Table 4-1 describes the RIPng configuration tasks.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 163


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 4 RIPng Configuration

Table 4-1 RIPng configuration tasks


Scenario Description Task

Configuring basic RIPng Basic RIPng functions 4.6 Configuring Basic


functions include enabling RIPng and RIPng Functions
enabling the RIPng process
on interfaces. The basic
RIPng functions must be
configured before you use
the RIPng features.

Preventing routing loops RIPng is a routing protocol 4.7 Preventing Routing


based on the distance vector Loops
algorithm. RIPng devices
advertise their local IPv6
routing tables to neighbors,
so routing loops may occur.
RIPng uses split horizon and
poison reverse to prevent
routing loops:
l Split horizon: A route
learnt by RIPng from an
interface is not sent to
neighbors from the
interface. This reduces
bandwidth consumption
and prevents routing
loops.
l Poison reverse: RIPng
sets the cost of a route
learnt from an interface
to 16 (an unreachable
route), and sends the
route to neighbors
through the interface. In
this way, RIPng can
delete useless routes
from the neighbor
routing table and prevent
routing loops.

Controlling RIPng routing To use RIPng more flexibly 4.8 Controlling RIPng
on the existing network and Routing
meet various user
requirements, you can
configure different
parameters to control RIPng
routing.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 164


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 4 RIPng Configuration

Scenario Description Task

Controlling the advertising In practical applications, to 4.9 Controlling RIPng


and receiving of RIPng meet network requirements, Route Advertisement
routes you can configure different
parameters to accurately
control the advertising and
receiving of RIPng routes.

Improving RIPng network In practical applications, 4.10 Improving RIPng


performance you can configure special Network Performance
RIPng functions to improve
RIPng network
performance.
l Adjusting the value of
the RIPng timer to
change the RIPng
network convergence
rate.
l Adjusting the number
and interval of Update
packets sent by the
interface to reduce
device resource and
network bandwidth
consumption.
l Checking the zero fields
in RIPng packets to meet
network requirements for
high security.

4.4 Licensing Requirements and Limitations for RIPng


Involved Network Elements
Other network elements also need to support RIPng.

Licensing Requirements
RIPng is a basic feature of CE8800, CE7800, CE6800, and CE5800 series switches and is not
under license control.

Version Requirements

Table 4-2 Products and minimum version supporting RIPng


Product Minimum Version Required

CE8868EI V200R005C10

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 165


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 4 RIPng Configuration

Product Minimum Version Required

CE8861EI V200R005C10

CE8860EI V100R006C00

CE8850-32CQ-EI V200R002C50

CE8850-64CQ-EI V200R005C00

CE7850EI V100R003C00

CE7855EI V200R001C00

CE6810EI V100R003C00

CE6850EI V100R001C00

CE6850-48S6Q-HI V100R005C00

CE6850-48T6Q-HI/CE6850U-HI/ V100R005C10
CE6851HI

CE6855HI V200R001C00

CE6856HI V200R002C50

CE6857EI V200R005C10

CE6860EI V200R002C50

CE6865EI V200R005C00

CE6870-24S6CQ-EI/ V200R001C00
CE6870-48S6CQ-EI

CE6870-48T6CQ-EI V200R002C50

CE6875EI V200R003C00

CE6880EI V200R002C50

CE5880EI V200R005C10

CE5810EI V100R002C00

CE5850EI V100R001C00

CE5850HI V100R003C00

CE5855EI V200R002C50

Feature Limitations
In versions earlier than V200R002C50, the CE5855EI does not support IPv6. However,
interfaces on a CE5855EI provide the IPv6 capability when the switch functions as a leaf
switch in a super virtual fabric (SVF) system and the SVF forwarding mode is set to
centralized or hybrid. In V200R002C50 and later versions, the CE5855EI supports IPv6.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 166


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 4 RIPng Configuration

4.5 Default Settings for RIPng


Table 4-3 describes the default settings for RIPng.

Table 4-3 Default settings for RIPng


Parameter Default Setting

Maximum number of equal-cost routes 16

RIPng function Disabled

4.6 Configuring Basic RIPng Functions


Basic RIPng functions include creating RIPng processes and enabling RIPng on interfaces.
The basic RIPng functions must be configured before you use RIPng features.

Pre-configuration Tasks
Before configuring basic RIPng functions, complete the following tasks:
l Enabling IPv6 on the switch
l Configuring IPv6 addresses for interfaces to ensure that neighboring nodes are reachable
at the network layer

Configuration Procedure
Creating RIPng processes is the prerequisite for enabling RIPng on interfaces.

4.6.1 Enabling RIPng


Context
Enabling RIPng is the prerequisite for all RIPng-related configurations. If you run the RIPng
commands in the interface view before enabling RIPng, the configurations take effect only
after RIPng is enabled.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ripng [ process-id ] [ vpn-instance vpn-instance-name ]
RIPng is enabled and the RIPng view is displayed.
If a VPN instance is specified, the RIPng process belongs to this VPN instance. If no VPN
instance is specified, the RIPng process belongs to a public network instance.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 167


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 4 RIPng Configuration

Step 3 (Optional) Run description text


Descriptions for RIPng processes are configured.
Step 4 Run commit
The configuration is committed.

----End

4.6.2 Enabling RIPng on Interfaces


Context
After RIPng is enabled on an interface, devices can exchange RIPng routing information
through this interface.

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 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ripng process-id enable


RIPng is enabled on the specified interface.

NOTE

If IPv6 is not enabled in the interface, this command cannot be run.

If RIPng needs to be enabled on multiple interfaces of a switch, repeat steps 2 and 3.


Step 5 Run commit
The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 168


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 4 RIPng Configuration

4.6.3 Verifying the Basic RIPng Function Configuration

Procedure
l Run the display ripng [ process-id | vpn-instance vpn-instance-name ] command to
check the configuration of the RIPng process.
l Run the display ripng process-id route [ destination-address destination-address
[ mask-length ] ] [ interface interface-type interface-number ] [ neighbor-address
neighbor-address ] command to check all the RIPng routes that are learned from other
switches.
l Run the display default-parameter ripng command to check the default RIPng
configuration.
l Run the display ripng process-id statistics interface { all | interface-type interface-
number [ neighbor neighbor-ipv6-address | verbose ] } command to check statistics
about RIPng interfaces.
----End

4.7 Preventing Routing Loops

Pre-configuration Tasks
Before configuring split horizon and poison reverse, complete the following task:
l 4.6 Configuring Basic RIPng Functions

Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying the RIPng
Routing Loop Prevention Configuration) in any sequence as required.

4.7.1 Configuring Split Horizon

Context
Split horizon can prevent routing loops.

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 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 169


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 4 RIPng Configuration

The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ripng split-horizon

Split horizon is configured.

NOTE

l By default, split horizon is enabled except on the NBMA network.


l If both split horizon and poison reverse are configured, only poison reverse takes effect.

Step 5 Run commit

The configuration is committed.

----End

4.7.2 Configuring Poison Reverse

Context
Poison reverse can prevent routing loops.

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 On an Ethernet interface, run undo portswitch

The interface is switched to Layer 3 mode.

By default, an Ethernet interface works in Layer 2 mode.

The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 170


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 4 RIPng Configuration

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ripng poison-reverse


Poison reverse is enabled.

NOTE

If both split horizon and poison reverse are configured, only poison reverse takes effect.

Step 5 Run commit


The configuration is committed.

----End

4.7.3 Verifying the RIPng Routing Loop Prevention Configuration


Procedure
l Run the display ripng process-id interface [ interface-type interface-number ]
[ verbose ] command to view information about the RIPng interface.
----End

4.8 Controlling RIPng Routing


You can control RIPng routing in a network with a complicated environment.

Pre-configuration Tasks
Before configuring RIPng route attributes, complete the following task:
l 4.6 Configuring Basic RIPng Functions

Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying the RIPng
Routing Control Configuration) in any sequence as required.

4.8.1 Configuring RIPng Preference


Context
When different routing protocols discover the routes to the same destination, set the RIPng
preference to select the required route.

Procedure
Step 1 Run system-view
The system view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 171


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 4 RIPng Configuration

Step 2 Run ripng [ process-id ] [ vpn-instance vpn-instance-name ]


The RIPng view is displayed.

Step 3 Run preference { preference | route-policy route-policy-name } *


The RIPng preference is set.
By default, the RIPng preference is 100.
Step 4 Run commit
The configuration is committed.

----End

4.8.2 Configuring Additional Metrics of an Interface


Context
Configuring the additional metrics on a RIPng interface can change the route selection
sequence.
The additional metric is the metric (hop count) to be added to the original metric of a RIPng
route. You can specify commands to set additional metrics for incoming and outgoing RIPng
routes.

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 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run the following commands as required:


l Run the ripng metricin value command to set the additional metric for receiving routes.
By default, an interface does not add the metric to a received RIPng route.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 172


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 4 RIPng Configuration

l Run the ripng metricout { value | { acl6-number | acl6-name acl6-name | ipv6-prefix


ipv6-prefix-name } value1 } command to set the additional metric for advertising routes.
By default, the metric that is added to the RIPng route sent by an interface is 1.
NOTE

l The ripng metricin command is used to add an additional metric to an incoming route. After this
route is added to the routing table, its metric in the routing table changes. Running this command
affects route selection on the local device and other devices on the network.
l The ripng metricout command is used to add an additional metric to an outgoing route. When this
route is advertised, an additional metric is added to this route, but the metric of the route in the
routing table does not change. Running this command does not affect route selection on the local
device but other devices on the network.

Step 5 Run commit


The configuration is committed.

----End

4.8.3 Setting the Maximum Number of Equal-Cost Routes


Context
By setting the maximum number of equal-cost RIPng routes, you can change the number of
routes for load balancing.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ripng [ process-id ] [ vpn-instance vpn-instance-name ]
RIPng is enabled and the RIPng view is displayed.
Step 3 Run maximum load-balancing number
The maximum number of equal-cost routes is set. The default value is 32(64 on the
CE6870EI).
Step 4 Run commit
The configuration is committed.

----End

4.8.4 Verifying the RIPng Routing Control Configuration


Procedure
l Run the display ripng [ process-id | vpn-instance vpn-instance-name ] command to
view the running status and configurations of RIPng.
l Run the display ripng process-id database [ verbose ] [ destination-address
destination-address [ mask-length ] ] [ interface interface-type interface-number
[ neighbor neighbor-address ] ] command to view all the active routes in the RIPng
database.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 173


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 4 RIPng Configuration

l Run the display ripng process-id route [ destination-address destination-address


[ mask-length ] ] [ interface interface-type interface-number ] [ neighbor-address
neighbor-address ] command to view all RIPng routes learned from other devices.
----End

4.9 Controlling RIPng Route Advertisement


On a complex network, RIPng route advertisement must be accurate.

Pre-configuration Tasks
Before controlling RIPng route advertisement, complete the following task:
l 4.6 Configuring Basic RIPng Functions

Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying the RIPng
Route Advertisement Control Configuration) in any sequence as required.

4.9.1 Configuring RIPng Route Summarization


Context
Route summarization can reduce the routing table size and minimize impact of route flapping
on 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 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 174


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 4 RIPng Configuration

Step 4 Run ripng summary-address ipv6-address prefix-length [ avoid-feedback ]

RIPng route summarization is configured.

By default, a RIPng router does not advertise summarized IPv6 addresses.

Step 5 Run commit

The configuration is committed.

----End

4.9.2 Advertising a Default Route

Context
In an IPv6 routing table, a default route is a route to network ::/0. If the destination address of
a packet does not match any entry in the routing table, the packet is sent through a default
route.

There are two methods to advertise RIPng default routes. You can configure a device to
advertise RIPng default routes according to networking requirements.

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 On an Ethernet interface, run undo portswitch

The interface is switched to Layer 3 mode.

By default, an Ethernet interface works in Layer 2 mode.

The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ripng default-route { only | originate } [ cost cost | tag tag ]*

The device is configured to advertise RIPng default routes.

By default, there is no default route in the RIPng routing domain.

Configure the device to advertise default routes according to networking requirements:

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 175


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 4 RIPng Configuration

l only: configures the device to advertise only IPv6 default routes (::/0), suppressing the
advertisement of other routes. If the local device is located on the network edge and the
details of the local network need to be hidden, you can set this parameter to enable the
devices on other networks to access the local network only through the local device.
l originate: configures the device to advertise IPv6 default routes (::/0) without affecting
the advertisement of other routes. If the local device is located on the network edge and
some details of the local network need to be hidden, you can set this parameter to enable
the devices on other networks to use the default route when connecting to certain devices
on the local network.
The device advertises generated RIPng default routes using Update packets through a
specified interface regardless of whether these routes exist in the local IPv6 routing table.
Step 5 Run commit
The configuration is committed.

----End

4.9.3 Configuring a RIPng Process to Import External Routes


Context
A RIPng process can import the routes learned by other processes or routing protocols to
enrich its routing information.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ripng [ process-id ] [ vpn-instance vpn-instance-name ]
The RIPng view is displayed.
Step 3 (Optional) Run default-cost cost
The default cost of external routes to be imported is set.
By default, the default cost of RIPng routes is 0.
If no cost is set for external routes to be imported, the default cost is used.

NOTE

When a RIPng process imports IBGP routes, routing loops may occur. Therefore, exercise caution
before you configure this function.

Step 4 Run import-route { direct | static | { isis | ospfv3 | ripng } [ process-id ] | bgp [ permit-
ibgp ] } [ cost cost | route-policy route-policy-name ] *
External routes are imported.
Step 5 Run commit
The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 176


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 4 RIPng Configuration

4.9.4 Verifying the RIPng Route Advertisement Control


Configuration
Procedure
l Run the display ripng process-id database [ verbose ] [ destination-address
destination-address [ mask-length ] ] [ interface interface-type interface-number
[ neighbor neighbor-address ] ] command to check all activated routes in the RIPng
database.
l Run the display ripng process-id route [ destination-address destination-address
[ mask-length ] ] [ interface interface-type interface-number ] [ neighbor-address
neighbor-address ] command to check all the RIPng routes that are learned from other
switchs.
----End

4.10 Improving RIPng Network Performance


You can adjust and optimize the RIPng network performance by configuring RIPng functions
in special network environments, such as configuring RIPng timers, setting the interval for
sending packets, and setting the maximum number of packets to be sent.

Pre-configuration Tasks
Before improving RIPng network performance, complete the following task:
l 4.6 Configuring Basic RIPng Functions

Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying the RIPng
Network Performance Optimization Configuration) in any sequence as required.

4.10.1 Configuring RIPng Timers


Context
RIPng uses 4 timers: Update, Age, Suppress, and Garbage-collect. Changing the timer values
affects the convergence speed of RIPng routes.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ripng [ process-id ] [ vpn-instance vpn-instance-name ]
The RIPng process is enabled and the RIPng view is displayed.
Step 3 Run timers ripng update age suppress garbage-collect
RIPng timers are configured.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 177


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 4 RIPng Configuration

NOTE

l RIPng timers take effect immediately after being changed.


l Route flapping occurs if the values of the four timers are set improperly. The relationship between
the values is as follows: update must be smaller than age and suppress must be smaller than
garbage-collect. For example, if the update time is longer than the aging time, and a RIPng route
changes within the update time, the switch cannot inform its neighbors of the change on time.
l You must configure RIPng timers based on the network performance and uniformly on all the
routers running RIPng. This avoids unnecessary network traffic or route flapping.

By default, the Update timer is 30s; the Age timer is 180s; the Suppress timer is 0s; the
Garbage-collect timer is four times the Update timer, namely, 120s.

In practice, the Garbage-collect timer is not fixed. If the Update timer is set to 30s, the
Garbage-collect timer may range from 90s to 120s.

Before permanently deleting an unreachable route from the routing table, RIPng advertises
this route (with the metric being set to 16) by periodically sending Update packets four times.
Subsequently, all the neighbors know that this route is unreachable. Because a route may not
always become unreachable at the beginning of an Update period, the Garbage-collect timer is
actually three or four times the Update timer.

Step 4 Run commit

The configuration is committed.

----End

4.10.2 Enabling Zero Field Check for RIPng Packets

Context
In a RIPng packet, some fields must be zero. These fields are called zero fields. When
receiving a packet, a RIPng process checks the zero fields of the packet. If the value of a zero
field in the packet is not 0, the RIPng process discards the packet.

Enabling zero field check on RIPng Update packets can improve network security.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ripng [ process-id ] [ vpn-instance vpn-instance-name ]

The RIPng view is displayed.

Step 3 Run checkzero

Zero field check is enabled for RIPng packets.

Step 4 Run commit

The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 178


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 4 RIPng Configuration

4.10.3 Verifying the RIPng Network Performance Optimization


Configuration

Procedure
l Run the display ripng [ process-id | vpn-instance vpn-instance-name ] command to
check the configuration of the RIPng process.
l Run the display ripng process-id database [ verbose ] [ destination-address
destination-address [ mask-length ] ] [ interface interface-type interface-number
[ neighbor neighbor-address ] ] command to check all activated routes in the RIPng
database.
l Run the display ripng process-id interface [ interface-type interface-number ]
[ verbose ] command to check information about the RIPng interface.
l Run the display ripng process-id neighbor [ neighbor-address neighbor-address ]
[ verbose ] command to check information about RIPng neighbors.
l Run the display ripng process-id route [ destination-address destination-address
[ mask-length ] ] [ interface interface-type interface-number ] [ neighbor-address
neighbor-address ] command to check all the RIPng routes that are learned from other
switches.

----End

4.11 Clearing RIPng


Context

RIPng information cannot be restored after it is cleared. Exercise caution when running the
commands.

Procedure
l Run the reset ripng process-id statistics interface { all | interface-type interface-
number [ neighbor neighbor-ipv6-address ] } command in the user view to clear
statistics about the counter that is maintained by a specified RIPng process.

----End

4.12 Configuration Examples for RIPng


This section only provides configuration examples for individual features. For details about
multi-feature configuration examples, feature-specific configuration examples, interoperation
examples, protocol or hardware replacement examples, and industry application examples, see
the Typical Configuration Examples.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 179


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 4 RIPng Configuration

4.12.1 Example for Configuring Basic RIPng Functions


Networking Requirements
As shown in Figure 4-1, it is required that RIPng be enabled on all interfaces of Switch A,
Switch B, Switch C, and Switch D and the switches communicate through RIPng.

Figure 4-1 Networking diagram of configuring basic RIPng functions


Switch C

10GE1/0/2
VLANIF200
FC00:0:0:2::2/64
10GE1/0/2
VLANIF200
10GE1/0/1 10GE1/0/3
FC00:0:0:2::1/64
VLANIF100 VLANIF300
FC00:0:0:1::1/64 FC00:0:0:3::2/64
10GE1/0/1 10GE1/0/3
Switch A VLANIF100 VLANIF300 Switch D
FC00:0:0:1::2/64 FC00:0:0:3::1/64
Switch B

Configuration Notes
When configuring basic RIPng functions, note the following:
l RIPng takes effect only after IPv6 is enabled on interfaces.
l Enable RIPng on switches and configure RIPng basic functions.

Procedure
Step 1 Configure IPv6 addresses for interfaces. The configuration details are not described here.

Step 2 Configure basic RIPng functions.


# Configure Switch A.
[~SwitchA] ripng 1
[*SwitchA-ripng-1] quit
[*SwitchA] interface vlanif 100
[*SwitchA-Vlanif100] ipv6 enable
[*SwitchA-Vlanif100] ripng 1 enable
[*SwitchA-Vlanif100] quit
[*SwitchA] commit

# Configure Switch B.
[~SwitchB] ripng 1
[*SwitchB-ripng-1] quit
[*SwitchB] interface vlanif 100
[*SwitchB-Vlanif100] ipv6 enable
[*SwitchB-Vlanif100] ripng 1 enable

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 180


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 4 RIPng Configuration

[*SwitchB-Vlanif100] quit
[*SwitchB] interface vlanif 200
[*SwitchB-Vlanif200] ipv6 enable
[*SwitchB-Vlanif200] ripng 1 enable
[*SwitchB-Vlanif200] quit
[*SwitchB] interface vlanif 300
[*SwitchB-Vlanif300] ipv6 enable
[*SwitchB-Vlanif300] ripng 1 enable
[*SwitchB-Vlanif300] quit
[*SwitchB] commit

# Configure Switch C.
[~SwitchC] ripng 1
[*SwitchC-ripng-1] quit
[*SwitchC] interface vlanif 200
[*SwitchC-Vlanif200] ipv6 enable
[*SwitchC-Vlanif200] ripng 1 enable
[*SwitchC-Vlanif200] quit
[*SwitchC] commit

# Configure Switch D.
[~SwitchD] ripng 1
[*SwitchD-ripng-1] quit
[*SwitchD] interface vlanif 300
[*SwitchD-Vlanif300] ipv6 enable
[*SwitchD-Vlanif300] ripng 1 enable
[*SwitchD-Vlanif300] quit
[*SwitchD] commit

Step 3 Verify the configuration.


# View RIPng neighbors of Switch A.
[~SwitchA] display ripng 1 neighbor
Neighbor : FE80::225:9EFF:FE01:21C Vlanif100
Protocol : RIPNG

The command output shows that Switch A has established the neighbor relationship with
Switch B on the network.
# View RIPng routing information of Switch A.
[~SwitchA] display ripng 1 route
Route Flags: A - Aging, S - Suppressed, G - Garbage-collect
----------------------------------------------------------------------------
Peer FE80::225:9EFF:FE01:21C on Vlanif100
Dest
FC00:0:0:2::/64,
via FE80::225:9EFF:FE01:21C, cost 1, tag 0, A, 4 Sec
Dest
FC00:0:0:3::/64,
via FE80::225:9EFF:FE01:21C, cost 1, tag 0, A, 4 Sec

The command output shows that Switch A has learned routing information on the network.

----End

Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 100
#
interface Vlanif 100

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 181


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 4 RIPng Configuration

ipv6 enable
ipv6 address FC00:0:0:1::1/64
ripng 1 enable
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 100
#
ripng 1
#
return
l Configuration file of Switch B
#
sysname SwitchB
#
vlan batch 100 200 300
#
interface Vlanif 100
ipv6 enable
ipv6 address FC00:0:0:1::2/64
ripng 1 enable
#
interface Vlanif 200
ipv6 enable
ipv6 address FC00:0:0:2::1/64
ripng 1 enable
#
interface Vlanif 300
ipv6 enable
ipv6 address FC00:0:0:3::1/64
ripng 1 enable
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 100
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 200
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 300
#
ripng 1
#
return
l Configuration file of Switch C
#
sysname SwitchC
#
vlan batch 200
#
interface Vlanif 200
ipv6 enable
ipv6 address FC00:0:0:2::2/64
ripng 1 enable
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 200
#
ripng 1
#
return
l Configuration file of Switch D
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 182


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 4 RIPng Configuration

sysname SwitchD
#
vlan batch 300
#
interface Vlanif 300
ipv6 enable
ipv6 address FC00:0:0:3::2/64
ripng 1 enable
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 300
#
ripng 1
#
return

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 183


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

5 OSPF Configuration

About This Chapter

You can build an OSPF network to discover and calculate routes in an autonomous system
(AS). OSPF applies to large networks composed of several hundreds of devices.

5.1 Overview of OSPF


5.2 Understanding OSPF
5.3 Application Scenarios for OSPF
5.4 Summary of OSPF Configuration Tasks
5.5 Licensing Requirements and Limitations for OSPF
5.6 Default Settings for OSPF
5.7 Configuring Basic OSPF Functions
5.8 Setting Session Parameters for OSPF Neighbor or Adjacency Relationships
5.9 Configuring OSPF Attributes in Different Types of Networks
5.10 Configuring OSPF Stub Areas
5.11 Configuring OSPF NSSAs
5.12 Adjusting OSPF Route Selection
5.13 Controlling OSPF Routing Information
5.14 Configuring OSPF IP FRR
5.15 Configuring BFD for OSPF
5.16 Configuring OSPF Fast Convergence
5.17 Configuring Suppression of OSPF Neighbor Relationship Flapping
5.18 Configuring the OSPF GR Helper
5.19 Improving Stability of an OSPF Network

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 184


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

5.20 Improving Security of an OSPF Network


5.21 Configuring the Network Management Function of OSPF
5.22 Maintaining OSPF
5.23 Configuration Examples for OSPF
5.24 Troubleshooting OSPF

5.1 Overview of OSPF

Definition
The Open Shortest Path First (OSPF) protocol, developed by the Internet Engineering Task
Force (IETF), is a link-state Interior Gateway Protocol (IGP).
At present, OSPF Version 2, defined in RFC 2328, is intended for IPv4; OSPF Version 3,
defined in RFC 2740, is intended for IPv6. Unless otherwise stated, OSPF stated in this
document refers to OSPF Version 2.

Purpose
Before the emergence of OSPF, the Routing Information Protocol (RIP) is widely used on
networks as an IGP.
RIP is a routing protocol based on the distance vector algorithm. Due to its problems of slow
convergence, routing loops, and poor scalability, RIP is gradually replaced by OSPF.
As a link-state protocol, OSPF can solve many problems encountered by RIP. Additionally,
OSPF features the following advantages:
l Receives and sends packets in multicast mode to reduce load on routers that do not run
OSPF.
l Supports Classless Inter-domain Routing (CIDR).
l Supports load balancing among equal-cost routes.
l Supports packet encryption.
With the preceding advantages, OSPF is widely accepted and used as an IGP.

5.2 Understanding OSPF

5.2.1 OSPF Fundamentals


OSPF has the following functions:
l Divides an Autonomous System (AS) into one or more logical areas.
l Advertises routes by sending Link State Advertisements (LSAs).
l Exchanges OSPF packets between devices in an OSPF area to synchronize routing
information.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 185


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

l Encapsulates OSPF packets into IP packets and sends the packets in unicast or multicast
mode.

Packet Types

Table 5-1 Packet types


Packet Type Function

Hello packet Hello packets are sent periodically to discover and


maintain OSPF neighbor relationships.

Database Description (DD) packet DD packets contain brief information about the local
link-state database (LSDB) and thereby synchronize
LSDBs on two devices.

Link State Request (LSR) packet LSR packets are sent to request the required LSAs
from neighbors.
LSR packets are sent only after DD packets are
exchanged successfully.

Link State Update (LSU) packet LSU packets are sent to transfer LSAs required by
neighbors.

Link State Acknowledgement LSAck packets are sent to acknowledge LSA


(LSAck) packet receipts.

LSA Types

Table 5-2 LSA types


LSA Type Function

Router-LSA (Type 1) Describes the link status and link cost of a router. It is
generated by every router and advertised in the area where
the router resides.

Network-LSA (Type 2) Describes the link status of all routers on the local network
segment. Network-LSAs are generated by a designated
router (DR) and advertised in the area where the DR resides.

Network-summary-LSA Describes routes to a specific network segment in an area.


(Type 3) Network-summary-LSAs are generated by an Area Border
Router (ABR) and advertised in all areas except totally stub
areas and Not-So-Stubby Areas (NSSAs).

ASBR-summary-LSA Describes routes to an Autonomous System Boundary


(Type 4) Router (ASBR). ASBR-summary-LSAs are generated by an
ABR and advertised to all related areas except the area
where the ASBR resides.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 186


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

LSA Type Function

AS-external-LSA (Type 5) Describes routes to a destination outside an AS. AS-


external-LSAs are generated by an ASBR and advertised to
all areas except stub areas and NSSAs.

NSSA-LSA (Type 7) Describes routes to a destination outside an AS. NSSA-


LSAs are generated by an ASBR and advertised in NSSAs
only.

Opaque-LSA (Type 9/Type Provides a universal mechanism for OSPF extension.


10/Type 11) l Type 9 LSAs are advertised only on the network segment
where the interface originating Type 9 LSAs resides.
Grace LSAs used to support GR are a type of Type 9
LSAs.
l Type 10 LSAs are advertised inside an OSPF area. LSAs
used to support TE are a type of Type 10 LSAs.
l Type 11 LSAs are advertised within an AS. At present,
there are no applications of Type 11 LSAs.

Router Types
Figure 5-1 lists common router types used in OSPF.

Figure 5-1 Router types


IS-IS ASBR

Area1 Area4

Internal Router Backbone Router

Area0

Area2 ABR Area3

Table 5-3 Router types

Router Type Description

Internal router All interfaces on an internal router belong to the same


OSPF area.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 187


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Router Type Description

Area Border Router (ABR) An ABR belongs to two or more areas, one of which must
be the backbone area.
An ABR is used to connect the backbone area and non-
backbone areas. It can be physically or logically connected
to the backbone area.

Backbone router At least one interface on a backbone router needs to belong


to the backbone area.
Internal routers in Area 0 and all ABRs are backbone
routers.

ASBR (AS Boundary An ASBR exchanges routing information with other ASs.
Router) An ASBR does not necessarily reside on the border of an
AS. It can be an internal router or an ABR. An OSPF
device importing external routing information will become
an ASBR.

Route Types
Inter-area and intra-area routes in an AS describe the internal network structure of the AS. AS
external routes describe the routes to destinations outside an AS. OSPF classifies the imported
AS external routes into Type 1 and Type 2.
Table 5-4 lists route types in descending order of priority.

Table 5-4 Route types


Route Type Description

Intra-area route Indicates routes within an area.

Inter-area route Indicates routes between areas.

Type 1 external route Type 1 external routes have high reliability.


Cost of a Type 1 external route = Cost of the route from a
local router to an ASBR + Cost of the route from the
ASBR to the destination of the Type 1 external route

Type 2 external route Type 2 external routes have low reliability, and therefore
OSPF considers that the cost of the route from an ASBR
to the destination of a Type 2 external route is much
greater than that of any internal route to the ASBR.
Cost of a Type 2 external route = Cost of the route from
the ASBR to the destination of the Type 2 external route

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 188


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Area Types

Table 5-5 Area types


Area Type Function

Common area By default, an OSPF area is a common area. Common areas include
standard areas and backbone areas.
l A standard area is the most common area and transmits intra-
area routes, inter-area routes, and external routes.
l A backbone area connects all the other OSPF areas. It is usually
identified by Area 0.

Stub area A stub area does not advertise AS external routes, but only intra-
area and inter-area routes.
Compared with a non-stub area, routers in a stub area maintain
fewer routing entries and transmit less routing information.
To ensure the reachability of AS external routes, the ABR in a stub
area advertises Type 3 LSAs carrying default routes within the
entire stub area. All AS external routes must be advertised by the
ABR.

Totally stub area A totally stub area does not advertise AS external routes or inter-
area routes, but only intra-area routes.
Compared with a non-stub area, routers in a totally stub area
maintain fewer routing entries and transmit less routing
information.
To ensure the reachability of AS external routes and inter-area
routes, the ABR in a totally stub area advertises Type 3 LSAs
carrying default routes within the entire totally stub area. All AS
external and inter-area routes must be advertised by the ABR.

NSSA An NSSA can import AS external routes. An ASBR uses Type 7


LSAs to advertise the imported AS external routes to the entire
NSSA. These Type 7 LSAs are translated into Type 5 LSAs on an
ABR, and are then flooded in the entire OSPF AS.
An NSSA has the characteristics of the stub areas in the same AS.
An ABR in an NSSA advertises Type 7 LSAs carrying default
routes within the entire NSSA. All inter-area routes must be
advertised by the ABR.

Totally NSSA A totally NSSA can import AS external routes. An ASBR uses
Type 7 LSAs to advertise the imported AS external routes to the
entire NSSA. These Type 7 LSAs are translated into Type 5 LSAs
on an ABR, and are then flooded in the entire OSPF AS.
A totally NSSA has the characteristics of the totally stub areas in
the same AS.
An ABR in a totally NSSA advertises Type 3 and Type 7 LSAs
carrying default routes to the entire totally NSSA. All inter-area
routes must be advertised by the ABR.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 189


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Network Types
Table 5-6 lists four OSPF network types that are classified based on link layer protocols.

Table 5-6 Network types


Network Type Description

Broadcast If a network uses Ethernet or Fiber Distributed Data Interface


(FDDI) as the link layer protocol, OSPF defaults it to a
broadcast network.
On a broadcast network:
l Hello packets, LSU packets, and LSAck packets are usually
transmitted in multicast mode. The address [Link] is an IP
multicast address reserved for an OSPF device; the address
[Link] is an IP multicast address reserved for an OSPF DR
or backup designated router (BDR).
l DD and LSR packets are transmitted in unicast mode.

Non-Broadcast Multi- If a network uses frame relay (FR) or X.25 as the link layer
Access (NBMA) protocol, OSPF defaults it to an NBMA network.
On an NBMA network, protocol packets such as Hello packets,
DD packets, LSR packets, LSU packets, and LSAck packets are
sent in unicast mode.

Point-to-Multipoint OSPF does not default any network to a P2MP network


(P2MP) regardless of its link layer protocol. Therefore, a P2MP network
must be forcibly changed from another network type. It is a
common practice to change a non-fully meshed NBMA network
to a P2MP network.
On a P2MP network:
l Hello packets are sent in multicast mode using the multicast
address [Link].
l Other types of protocol packets, such as DD packets, LSR
packets, LSU packets, and LSAck packets, are sent in unicast
mode.

Point-to-point (P2P) If a network uses PPP, HDLC, or LAPB as the link layer
protocol, OSPF defaults it to a P2P network.
On a P2P network, protocol packets, such as Hello packets, DD
packets, LSR packets, LSU packets, and LSAck packets, are sent
in multicast mode using the multicast address [Link].

Stub Area
Stub areas are specific areas where ABRs do not flood the received AS external routes. In
stub areas, routers maintain fewer routing entries and transmit less routing information.

Configuring a stub area is optional. Not every area can be configured as a stub area. A stub
area is usually a non-backbone area with only one ABR and is located on the AS border.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 190


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

To ensure the reachability of the routes to destinations outside an AS, the ABR in a stub area
generates a default route and advertises the route to non-ABRs in the same stub area.

When configuring a stub area, note that:

l The backbone area cannot be configured as a stub area.


l To configure an area as a stub area, you must configure stub area attributes on all routers
in the area.
l There should be no ASBR in a stub area, indicating that AS external routes cannot be
transmitted in the stub area.
l Virtual connections cannot cross a stub area.

NSSA
NSSAs are a special type of OSPF areas. There are many similarities between an NSSA and a
stub area. Both of them do not advertise external routes received from other OSPF areas. The
difference between them is that a stub area cannot import AS external routes, whereas an
NSSA can import AS external routes and advertise them to the entire AS.

After an area is configured as an NSSA, an ABR in the NSSA generates a default route and
advertises the route to other routers in the NSSA. This ensures the reachability of routes to
destinations outside an AS.

When configuring an NSSA, note that:

l The backbone area cannot be configured as an NSSA.


l To configure an area as an NSSA, you must configure NSSA attributes on all routers in
the area.
l Virtual connections cannot cross an NSSA.

Neighbor State Machine


To exchange routing information on an OSPF network, neighbor routers must establish
adjacencies. The differences between neighbor relationships and adjacencies are described as
follows:
l Neighbor relationship: After the local router starts, it sends a Hello packet on an OSPF
interface to a remote router. After the remote router receives the packet, it checks
whether the parameters carried in the packet are consistent with its own parameters. If
the parameters carried in the packet are consistent with its own parameters, the local and
remote routers establish a neighbor relationship.
l Adjacency: After the local and remote routers establish a neighbor relationship, they
exchange DD packets and LSAs to establish an adjacency.

OSPF has eight state machines: Down, Attempt, Init, 2-way, Exstart, Exchange, Loading, and
Full.

l Down: It is in the initial stage of setting up sessions between neighbors. The state
machine is Down when a router fails to receive Hello packets from its neighbor before
the dead interval expires.
l Attempt: It occurs only on an NBMA network. The state machine is Attempt when a
neighbor does not reply with Hello packets after the dead interval has expired. The local
router, however, keeps sending Hello packets to the neighbor at every poll interval.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 191


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

l Init: The state machine is Init when a router receives Hello packets.
l 2-way: The state machine is 2-way when the Hello packets received by a router contain
its own router ID. The state machine will remain in the 2-way state if no neighbor
relationship is established, and will become Exstart if a neighbor relationship is
established.
l Exstart: The state machine is Exstart when the two neighbors start to negotiate the
master/slave status and determine the sequence numbers of DD packets.
l Exchange: The state machine is Exchange when a router starts to exchange DD packets
with its neighbor after the master/slave status negotiation is completed.
l Loading: The state machine is Loading after a router has finished exchanging DD
packets with its neighbor.
l Full: The state machine is Full when the LSA retransmission list is empty.

OSPF Packet Authentication


OSPF supports packet authentication. Only the OSPF packets that have been authenticated
can be received. If OSPF packets are not authenticated, a neighbor relationship cannot be
established.

A router supports two authentication methods:

l Area-based authentication
l Interface-based authentication

When both area-based and interface-based authentication methods are configured, interface-
based authentication takes effect.

OSPF Route Summarization


Route summarization means that an ABR in an area summarizes the routes with the same
prefix into one route and advertises the summarized route to other areas.

Route summarization between areas reduces the amount of routing information to be


transmitted, reducing the size of routing tables and improving device performance.

Route summarization can be carried out by an ABR or an ASBR:

l Route summarization on an ABR:


When an ABR in an area advertises routing information to other areas, it generates Type
3 LSAs by network segment. If this area contains consecutive network segments, you
can run a command to summarize these network segments into one network segment.
The ABR only sends one summarized LSA, and will not send the LSAs that belong to
the summarized network segment specified in the command.
l Route summarization on an ASBR:
If the local device is an ASBR and route summarization is configured, the ASBR will
summarize the imported Type 5 LSAs within the aggregated address range. After an
NSSA is configured, the ASBR also summarizes the imported Type 7 LSAs within the
aggregated address range.
If the local device functions both as an ASBR and an ABR, the device summarizes the
Type 5 LSAs that are translated from Type 7 LSAs.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 192


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

OSPF Default Route


A default route has an all-0 destination address and an all-0 mask. If a router cannot find a
route in its routing table for forwarding packets, it can forward packets using a default route.
Due to hierarchical management of OSPF routes, the priority of a Type 3 default route is
higher than that of a Type 5 or Type 7 default route.
OSPF default routes are usually used in the following cases:
l An ABR advertises a default route through Type 3 Summary LSAs to instruct routers
within an area to forward packets between areas.
l An ASBR advertises a default route through Type 5 ASE LSAs or Type 7 NSSA LSAs
to instruct routers in an AS to forward packets to other ASs.
OSPF default routes are advertised according to the following rules:
l An OSPF router advertises an LSA that describes a default route only when an interface
on the OSPF router is connected to a network outside the area.
l If an OSPF router has advertised an LSA carrying information about a type of default
route, the OSPF router does not learn this type of default routes advertised by other
routers. This means that the OSPF router no longer calculates such routes received from
other routers, but stores the LSAs describing such routes in its LSDB.
l The route on which default external route advertisement depends cannot be a route in the
local OSPF AS, namely, the one learned by the local OSPF process. This is because
default external routes are used to guide packet forwarding outside an AS, whereas
routes within an AS have next hops pointing to devices within the AS.
Table 5-7 lists rules for advertising default routes in different areas.

Table 5-7 Rules for advertising OSPF default routes in different areas
Area Type Function

Common area By default, devices in a common OSPF area do not automatically


generate LSAs describing default routes, even if the common OSPF
area has default routes.
When a default route on the network is generated by another
routing process (not an OSPF process), the device that generates
the default route must advertise the default route in the entire OSPF
AS. (You need to run commands to configure an ASBR to generate
a default route. After the configuration, the ASBR generates a Type
5 ASE LSA describing the default route and advertises the LSA to
the entire OSPF AS.)

Stub area A stub area does not allow AS external routes (Type 5 LSAs) to be
transmitted within the area.
All routers within the stub area must learn AS external routes from
the ABR. The ABR automatically generates a Summary LSA (Type
3 LSA) describing a default route and advertises it to the entire stub
area. Then all routes to destinations outside an AS can be learned
from the ABR.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 193


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Area Type Function

Totally stub area A totally stub area does not allow AS external routes (Type 5
LSAs) or inter-area routes (Type 3 LSAs) to be transmitted within
the area.
All routers within the totally stub area must learn AS external
routes and other areas' routes from the ABR. The ABR
automatically generates a Summary LSA (Type 3 LSA) describing
a default route and advertises it to the entire totally stub area. Then,
all routes to destinations outside an AS and to destinations in other
areas can be learned from the ABR.

NSSA An NSSA allows its ASBRs to import a small number of AS


external routes, but does not advertise ASE LSAs (Type 5 LSAs)
received from other areas within the NSSA. This means that AS
external routes can be learned only from ASBRs in the NSSA.
Devices in an NSSA do not automatically generate default routes.
Use either of the following methods as required:
l If external routes to the outside of the AS need to be advertised
through an ASBR in the NSSA and other external routes need to
be through other areas, no operations are required. The ABR
automatically generates a Type 7 LSA describing a default route
and advertises this LSA in the entire NSSA.
l If all external routes need to be advertised through an ASBR in
the NSSA, you need to run commands to configure the ASBR to
generate a Type 7 LSA describing a default route and advertise
this LSA in the entire NSSA.
The difference between the two methods is as follows:
l An ABR will generate a Type 7 LSA describing a default route
regardless of whether the routing table contains a default route.
l An ASBR will generate a Type 7 LSA describing a default route
only when the routing table contains a default route.
A default route is flooded only in the local NSSA but not flooded in
the entire OSPF AS. If routers in the local NSSA cannot find routes
to the outside of the AS, the routers can forward packets to the
outside of the AS through an ASBR. Packets of other OSPF areas,
however, cannot be sent to the outside of the AS through this
ASBR. Type 7 LSAs describing default routes will not be translated
into Type 5 LSAs describing default routes and then flooded in the
entire OSPF AS.

Totally NSSA A totally NSSA does not allow AS external routes (Type 5 LSAs)
or inter-area routes (Type 3 LSAs) to be transmitted within the area.
All routers within the totally NSSA must learn AS external routes
from the ABR. The ABR automatically generates a Summary LSA
describing a default route and advertises it to the entire totally
NSSA. Then all external routes received from other areas and inter-
area routes can be advertised within the totally NSSA.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 194


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

OSPF Route Filtering


OSPF supports route filtering using routing policies. By default, OSPF does not filter routes.
Routing policies used by OSPF include route-policy, access-list, and prefix-list.
OSPF route filtering can be used for:
l Importing routes
OSPF can import routes learned by other routing protocols. You can configure routing
policies to filter the imported routes so that OSPF can import only the routes that match
specific conditions.
l Advertising imported routes
OSPF advertises the imported routes to its neighbors.
You can configure filtering rules to filter the routes to be advertised. The filtering rules
can be configured only on ASBRs.
If OSPF imports a large number of external routes and advertises them to a device with a
smaller routing table capacity, the device may restart unexpectedly. To address this
problem, you can configure a limit on the number of LSAs that can be generated for
imported external routes in an OSPF process.
l Learning routes
Filtering rules can be configured to allow OSPF to filter the received intra-area, inter-
area, and AS external routes.
After receiving routes, an OSPF device adds only the routes that match the filtering rules
to the local routing table, but can still advertise all routes from the OSPF routing table.
l Learning inter-area LSAs
You can run a command to configure an ABR to filter the Summary LSAs entering the
local area. This configuration takes effect only on ABRs because only ABRs can
advertise Summary LSAs.

Table 5-8 Differences between filtering for inter-area LSA learning and filtering for
route learning
Filtering for Inter- Filtering for Route Learning
area LSA Learning

Directly filters the Filters the routes that are calculated based on LSAs, but does
LSAs entering the not filter LSAs. This means that all incoming LSAs are
local area. learned, but only routes matching filtering conditions are
added to the local routing table.

l Advertising inter-area LSAs


You can run commands to configure an ABR to filter outgoing Summary LSAs. This
configuration takes effect only on ABRs.

OSPF Multi-Process
OSPF supports multi-process. Multiple OSPF processes can run on the same router, and they
are independent from each other. Route exchanges between different OSPF processes are
similar to route exchanges between different routing protocols.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 195


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Each interface on a router can belong to only one OSPF process.


A typical application of OSPF multi-process is that OSPF runs between PEs and CEs in a
VPN, whereas OSPF is used as an IGP on the backbone of the VPN. Two OSPF processes on
the same PE are independent from each other.

OSPF RFC 1583 Compatibility


RFC 1583 is an earlier version of OSPFv2.
When OSPF calculates external routes, routing loops may occur due to differences of route
selection rules between RFC 2328 and RFC 1583. To prevent routing loops, both
communication ends must use the same route selection rules.
l If RFC 1583 compatibility is enabled, OSPF uses the route selection rules defined in
RFC 1583.
l If RFC 1583 compatibility is disabled, OSPF uses the route selection rules defined in
RFC 2328.
OSPF calculates external routes based on Type 5 LSAs. If a router enabled with RFC 1583
compatibility receives a Type 5 LSA:
l The router selects a route to the ASBR that originates the LSA or a route to the
forwarding address (FA) described in the LSA.
l The router selects external routes to the same destination.
By default, OSPF uses the route selection rules defined in RFC 1583.

OSPF Database Overflow


OSPF requires that devices in the same area have the same LSDB. As the number of routes
increase continually, some devices cannot carry excess routing information due to limited
system resources. This situation is called an OSPF database overflow.
You can configure stub areas or NSSAs to prevent resource exhaustion caused by increasing
routing information. However, configuring stub areas or NSSAs cannot prevent an OSPF
database overflow caused by a sharp increase in dynamic routes. To resolve this issue, you
can set the maximum number of external routes supported by the LSDB. In this way, the size
of the LSDB can be limited dynamically.

NOTE
Each device in an OSPF AS must be configured with the same maximum number of external routes.

When the number of external routes in an LSDB reaches the maximum number, the device
enters the overflow state and starts the overflow timer at the same time. The device
automatically exits the overflow state after the overflow timer expires. Table 5-9 describes the
operations performed by the device when it enters or exits the overflow state.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 196


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Table 5-9 Operations performed by a device when it enters or exits the overflow state
Phase OSPF Processing Procedure

Staying at the overflow state Deletes self-generated non-default external routes and
stops advertising non-default external routes.
Discards newly received non-default external routes and
does not reply with Link State Acknowledgment (LSAck)
packets.
Checks whether the number of external routes is still
greater than the configured maximum number when the
overflow timer expires, and performs the following
operation accordingly:
l Restarts the timer if the number of external routes is
still greater than the configured maximum number.
l Exits the overflow state if the number of external routes
is less than the configured maximum number.

Exiting the overflow state Ends the overflow timer.


Advertises non-default external routes.
Accepts newly received non-default external routes and
replies with LSAck packets.

5.2.2 BFD for OSPF

Definition
Bidirectional Forwarding Detection (BFD) is a mechanism to detect communication faults
between forwarding engines.
To be specific, BFD detects connectivity of a data protocol on a path between two systems.
The path can be a physical link, a logical link, or a tunnel.
In BFD for OSPF, a BFD session is associated with OSPF. The BFD session can quickly
detect a link fault and then notify OSPF of the fault. This speeds up OSPF's response to the
change of the network topology.

Purpose
A link fault or a topology change may cause devices to re-calculate routes. Therefore, the
convergence of routing protocols must be as quick as possible to improve the network
performance.
Link faults are unavoidable. Therefore, a feasible solution is required to detect faults fast and
notify routing protocols of the faults immediately. With BFD being associated with OSPF,
once a fault occurs on a link between neighbors, BFD can speed up the OSPF convergence.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 197


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Table 5-10 Comparison before and after BFD for OSPF is enabled

Associated Link Fault Detection Mechanism Convergence


with BFD Speed

No An OSPF dead timer expires. The default At the second level


value of the dead timer is 40s.

Yes A BFD session goes Down. At the millisecond


level

Implementation

Figure 5-2 BFD for OSPF

RouterA RouterB GE3/0/0


[Link]/24
GE2/0/0 GE2/0/0
[Link]/24 [Link]/24 GE1/0/0
GE1/0/0 [Link]/24
[Link]/24

GE1/0/0 GE2/0/0
[Link]/24 [Link]/24
Area0
RouterC

Figure 5-2 shows the implementation of BFD for OSPF.

1. OSPF neighbor relationships are established between three routers.


2. After the status of a neighbor relationship reaches Full, BFD is instructed to establish a
BFD session.
3. The outbound interface from Router A to Router B is GE 2/0/0. When the link fails,
BFD immediately detects the fault and then notifies Router A of the fault.
4. Router A processes the event that a neighbor relationship becomes Down and re-
calculates routes. After calculation, the outbound interface becomes GE 1/0/0 on Router
C. Traffic from Router A passes through Router C to get to Router B.

5.2.3 OSPF Smart-discover

Definition
Generally, routers periodically send Hello packets through OSPF interfaces. That is, a Router
sends Hello packets at the Hello interval controlled by a Dead timer. Because Hello packets
are sent at a fixed interval, the establishment of OSPF neighbor relationships is slowed down.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 198


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Enabling Smart-discover can speed up the establishment of OSPF neighbor relationships in


specific scenarios.

Table 5-11 OSPF Smart-discover


Smart-discover Configured Processing

No l Hello packets are sent only when the Hello timer


expires.
l The gap between the sending of two Hello packets
is the Hello interval.
l Neighbors keep waiting to receive Hello packets
within the Hello interval.

Yes l Hello packets are sent directly regardless of


whether the Hello timer expires.
l Neighbors can receive packets rapidly and perform
status transition immediately.

Implementation
In the following scenarios, an interface enabled with Smart-discover can send Hello packets
to neighbors without waiting for the expiration of the Hello timer:

l The neighbor status becomes 2-way for the first time.


l The neighbor status changes from 2-way or a higher state to Init.

5.2.4 OSPF VPN

Definition
As an extension of OSPF, OSPF VPN multi-instance enables Provider Edges (PEs) and
Customer Edges (CEs) in VPNs to run OSPF for interworking and use OSPF to learn and
advertise routes.

Purpose
As a widely used IGP, in most cases, OSPF runs in VPNs. If OSPF runs between PEs and
CEs, PEs can advertise VPN routes to CEs using OSPF, CEs do not need to support other
routing protocols for interworking with PEs, simplifying the management and configuration
of CEs.

Running OSPF Between PEs and CEs


In BGP/MPLS VPN, routing information is transmitted between PEs using Multi-Protocol
BGP (MP-BGP), whereas routes are learned and advertised between PEs and CEs using
OSPF.

Running OSPF between PEs and CEs has the following benefits:

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 199


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

l OSPF is used within a site to learn routes. Running OSPF between PEs and CEs can
reduce the protocol types that CEs must support, lowering the requirements on CEs.
l Similarly, running OSPF both in a site and between PEs and frees network administrators
from getting familiarity with multiple protocols, simplifying the workload of them.
l When a network using OSPF but not VPN on the backbone network begins to use BGP/
MPLS VPN, running OSPF between PEs and CEs facilitates the transition.

As shown in Figure 5-3, CE1, CE3, and CE4 belong to VPN 1, and the numbers following
OSPF refer to the IDs of OSPF multi-instance processes running on PEs.

Figure 5-3 Running OSPF between PEs and CEs


VPN1 VPN1
Site1 Site3
Area1
Area0
CE1 CE3

Area0 Area0
MPLS VPN
OSPF 100 VPN1
OSPF 100 VPN1 Backbone

Area1 PE1 PE2 Area1


OSPF 200 VPN2 OSPF 200 VPN1

CE2 CE4
Area1 Area2
Site2 VPN1 Site4
VPN2

To advertise routes of CE1 to CE3 and CE4:

1. PE1 imports OSPF routes of CE1 into BGP and generates BGP VPNv4 routes.
2. PE1 advertises BGP VPNv4 routes to PE2 using MP-BGP.
3. PE2 imports BGP VPNv4 routes into OSPF, and then advertises these routes to CE3 and
CE4.

The process of advertising routes of CE4 or CE3 to CE1 is similar to the preceding process.

Configuring OSPF Areas Between PEs and CEs


OSPF areas between PEs and CEs can be either non-backbone areas or backbone areas (Area
0). A PE can only be an area border router (ABR).

In the extended application of OSPF VPN, the MPLS VPN backbone network serves as Area
0. OSPF requires that backbone areas (Area 0) be contiguous. Therefore, Area 0 in all VPN
sites must be connected to the MPLS VPN backbone network. If a VPN site has OSPF Area
0, the PEs that CEs access must be connected to the backbone area of this VPN site through
the MPLS VPN backbone network. If no physical link is available to directly connect PEs to
Area 0 in the VPN site, a virtual link can be used to implement logical connection between
them, as shown in Figure 5-4.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 200


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Figure 5-4 Configuring OSPF areas between PEs and CEs

VPN
PE1 backbone PE2

Area0 Area0
Area1
Virtual link

CE1 CE2 Area0


Site1 Site2
Area0

A non-backbone area (Area 1) is configured between PE1 and CE1, and a backbone area
(Area 0) is configured in Site 1. As a result, the backbone area in Site 1 is isolated from the
VPN backbone area. Therefore, a virtual link is configured between PE1 and CE1 to ensure
that backbone areas are contiguous.

OSPF Domain ID
If inter-area routes are advertised between local and remote OSPF areas, these areas are
considered to be in the same OSPF domain.

l Domain IDs identify and differentiate domains.


l Each OSPF domain has one or more domain IDs, one of which is a primary ID with the
others being secondary IDs.
l If an OSPF instance does not have a specified domain ID, NULL is used as its domain
ID.

Before a PE advertises the BGP routes learned from remote PEs to CEs, the PE checks the
domain IDs carried in the BGP routes to determine the type of OSPF routes (Type 3, Type 5,
or Type 7) to be advertised.

l If local domain IDs are the same as or compatible with the remote domain IDs carried in
the BGP routes, the PE advertises Type 3 routes.
l Otherwise, the PE advertises Type 5 or Type 7 routes.

Table 5-12 Domain ID


Comparison Between Local and Identical Type of Routes to Be
Remote Domain IDs Local and Advertised
Remote
Domain
IDs

Both the local and remote domain IDs are Yes Inter-area route
NULL.

The remote domain ID is the same as the Yes Inter-area route


local primary domain ID or one of the local
secondary domain IDs.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 201


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Comparison Between Local and Identical Type of Routes to Be


Remote Domain IDs Local and Advertised
Remote
Domain
IDs

The remote domain ID is different from the No If the local area is not an
local primary domain ID and all local NSSA, external routes are
secondary domain IDs. generated.
If the local area is an NSSA,
NSSA routes are generated.

Routing Loop Prevention


Routing loops may occur between PEs and CEs if OSPF and BGP learn routes from each
other.

Figure 5-5 OSPF VPN routing loop

PE1

VPN
backbone

vpn1 site1 [Link]/32

CE1

PE2

As shown in Figure 5-5, on PE1, OSPF imports a BGP route whose destination address is
[Link]/32, and then generates a Type 5 or Type 7 LSA and advertises it to CE1. Then, CE1
learns an OSPF route with the destination address and next hop being [Link]/32 and PE1
respectively. CE1 advertises the route to PE2. In this manner, PE2 learns an OSPF route with
the destination address and next hop being [Link]/32 and CE1 respectively.
Similarly, CE1 also learns an OSPF route with the destination address and next hop being
[Link]/32 and PE2 respectively. PE1 learns an OSPF route with the destination address and
next hop being [Link]/32 and CE1 respectively.
As a result, CE1 has two equal-cost routes with next hops being PE1 and PE2 respectively,
and the next hops of the routes from PE1 and PE2 to [Link]/32 are CE1. A routing loop
occurs.
In addition, the preference of an OSPF route is higher than that of a BGP route. Therefore, on
PE1 and PE2, BGP routes to [Link]/32 are replaced by OSPF routes. That is, the OSPF
routes with the destination address and next hop being [Link]/32 and CE1 respectively are
active in the routing tables of PE1 and PE2.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 202


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

The BGP routes then become inactive, and therefore the LSAs generated when OSPF imports
the routes are deleted. As a result, the active OSPF routes are withdrawn, and the BGP route
becomes active again. The above process occurs repeatedly, leading to route flapping.
OSPF VPN provides a solution to this problem, as shown in Table 5-13.

Table 5-13 Routing loop prevention


Feature Definition Function

DN-bit To prevent routing loops, an OSPF When a PE advertises


multi-instance process uses one bit as generated Type 3, Type 5, or
a flag bit, which is called the DN-bit. Type 7 LSAs to CEs, it sets
the DN bit of these LSAs to
1 and retains the default
value 0 for the DN bit of
other LSAs.
When calculating routes, the
OSPF multi-instance
process of the PE ignores
LSAs with the DN bit set to
1. This prevents the PE from
learning the self-originated
LSAs from CEs, thereby
avoiding routing loops.

VPN route tag The VPN route tag is carried in Type When a PE detects that the
5 or Type 7 LSAs generated by PEs VPN route tag in the
according to received BGP private incoming LSA is the same
routes. as that in the local LSA, the
The VPN route tag is valid only on PE ignores this LSA. This
the PEs that receive BGP routes and prevents routing loops.
generate OSPF LSAs. It is not
transmitted in BGP extended
community attributes.

Default route A default route is a route with an all-0 PEs do not calculate default
destination address and an all-0 routes.
subnet mask. Default routes are used to
forward traffic from CEs or
from sites where CEs reside
to the VPN backbone
network.

Disabling Routing Loop Prevention

Exercise caution when disabling routing loop prevention as it increases the likelihood of
routing loops.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 203


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

During BGP or OSPF route exchanges, routing loop prevention prevents OSPF routing loops
in VPN sites.
In the inter-AS VPN Option A scenario, if OSPF is running between ASBRs to transmit VPN
routes, the routing loop prevention mechanism disables the remote ASBR from learning the
OSPF routes sent by the local ASBR.
Figure 5-6 illustrates an inter-AS VPN in Option A mode. OSPF runs between PE1 and CE1.
Assume that CE1 sends VPN routes to CE2.

Figure 5-6 Networking diagram of an inter-AS VPN deployed in Option A mode

VPN1
CE1 VPN1
BGP/MPLS CE3
BGP/MPLS
backbone backbone
PE1 AS: 100 AS: 200
PE3
ASBR1 ASBR2
MP-IBGP MP-IBGP
OSPF

PE2
PE4
CE4
CE2
VPN2 VPN2

1. PE1 learns routes to CE1 through the OSPF process within a VPN instance, imports
these routes into MP-BGP, and then sends the MP-BGP routes to ASBR1.
2. After receiving the MP-BGP routes, ASBR1 imports them into the OSPF process in a
VPN instance and generates Type 3, Type 5, or Type 7 LSAs with the DN-bit set to 1.
3. When learning these LSAs using OSPF, ASBR2 checks the DN-bit in the LSAs. When
detecting that the DN-bit in the LSAs is 1, ASBR2 ignores these LSAs.
Due to the routing loop prevention mechanism, ASBR2 cannot learn the OSPF routes sent
from ASBR1, causing CE1 to be unable to communicate with CE3.
The following methods are provided to resolve this problem:
l Method 1: Disable devices from setting the DN-bit to 1 when importing BGP routes into
OSPF. For example, ASBR1 is disabled from setting the DN-bit to 1 when importing
BGP routes into OSPF. When ASBR2 receives these routes and detects that the DN-bit
in the LSAs carrying these routes is 0, ASBR2 uses these LSAs to calculate routes.
l Method 2: Disable devices from checking the DN-bit in received LSAs. For example,
ASBR2 is disabled from checking the DN-bit in received LSAs. ASBR1 sets the DN-bit
to 1 in LSAs when importing MP-BGP routes into OSPF. ASBR2, however, does not
check the DN-bit when receiving these LSAs and uses these LSAs to calculate routes.
The two methods can be used more flexibly based on specific types of LSAs. For Type 3
LSAs, you can configure a sender to determine whether to set the DN bit to 1 or configure a

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 204


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

receiver to determine whether to check the DN bit in the Type 3 LSAs based on the router ID
of the device that generates the LSAs.

In an inter-AS VPN Option A scenario, as shown in Figure 5-7, four ASBRs are fully meshed
and run OSPF. ASBR2 may receive Type 3, Type 5, or Type 7 LSAs generated on ASBR4. If
ASBR2 is disabled from checking the DN-bit in the LSAs, ASBR2 will accept the Type 3
LSAs, and routing loops will occur, as described in Figure 5-7. ASBR2 will deny the Type 5
or Type 7 LSAs, because the VPN route tags carried in the LSAs are the same as the default
VPN route tag of the OSPF process on ASBR2.

To address the routing loop problem caused by Type 3 LSAs, you can disable the check of the
DN-bit only for the Type 3 LSAs that are generated by devices with the router ID [Link] or
[Link]. With the check disabled in such a way, if ASBR2 receives Type 3 LSAs sent by
ASBR4 with the router ID [Link], ASBR2 will check the DN-bit and deny these Type 3
LSAs because the DN-bit is set to 1.

Figure 5-7 Networking diagram of fully meshed ASBRs in the inter-AS VPN Option A
scenario
OSPF Router ID OSPF Router ID
[Link] [Link]
ASBR1 ASBR2

OSPF
AS: 100 AS: 200

ASBR3 ASBR4
OSPF Router ID OSPF Router ID
[Link] [Link]

Multi-VPN-Instance CE
OSPF multi-instance generally runs on PEs. The devices that run OSPF multi-instance within
LANs of users are called multi-VPN-instance CEs (MCEs).

Compared with OSPF multi-instance running on PEs, MCEs have the following
characteristics:

l Support of OSPF-BGP synchronization is not required.


l A separate OSPF instance is created for each service. That is, different virtual CEs
transmit traffic for different services. This is a low-cost solution for LAN security issues.
l Different OSPF multi-instances are implemented on a CE. To implement OSPF multi-
instances, routing loop detection needs to be disabled and route calculation is performed
directly. That is, MCEs also use the received LSAs with the DN bit set to 1 for route
calculations.

5.2.5 OSPF NSSA

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 205


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Definition
To prevent a large number of external routes from consuming the bandwidth and storage
resources of routers in an area, OSPF defines stub areas prohibited from importing external
routes. However, stub areas cannot meet the requirements of the scenario that requires the
import of external routes while preventing resources from being consumed by external
resources. OSPF defines the NSSA to meet the requirements.
NSSAs are a new type of OSPF areas.
An NSSA is similar to a stub area in many ways. The difference between an NSSA and a stub
area is that an NSSA can import AS external routes and advertise them to the entire OSPF
AS, but do not learn external routes received from other areas on the OSPF network.

Figure 5-8 NSSA


RIP RIP
Type5 Type5 NSSA Area

Type5 Type5 Type7


ASBR Area2 Area0 Area1 ASBR
ABR ABR

N-bit
All routers in an area must be configured with the same area type. In OSPF, the N-bit, carried
in a Hello packet, is used to identify the area type supported by a router. OSPF neighbor
relationships cannot be established between routers configured with different area types.
Some manufacturers do not comply with the standard. They set the N-bit in both OSPF Hello
and DD packets. To allow Huawei devices to interwork with these manufacturers' devices, set
the N-bit in OSPF DD packets on Huawei devices.

Type 7 LSA
l Type 7 LSAs are a new type of LSAs that can be used only in NSSAs. Type 7 LSAs
describe imported external routes.
l Type 7 LSAs are generated by an ASBR in an NSSA and flooded only in the NSSA
where the ASBR resides.
l When the ABRs in the NSSA receive these Type 7 LSAs, they translate some of the
Type 7 LSAs into Type 5 LSAs to advertise AS external routes to other areas on the
OSPF network.

Translating Type 7 LSAs Into Type 5 LSAs


To advertise the external routes imported by an NSSA to other areas, Type 7 LSAs need to be
translated into Type 5 LSAs.
l The Propagate bit (P-bit) in a Type 7 LSA indicates that whether the router needs to
translate Type 7 LSAs into Type 5 LSAs.
l By default, the ABR with the largest router ID in an NSSA is selected for translating
Type 7 LSAs into Type 5 LSAs.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 206


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

l Only the Type 7 LSAs in which the P-bit is set to 1 and the FA is not 0 can be translated
into Type 5 LSAs. The FA indicates that the packet to a specific destination address will
be forwarded to the address specified by the FA.
l The P-bit in the Type 7 LSAs generated by ABRs is not set to 1.

Preventing Loops Caused by Default Routes


There may be multiple ABRs in an NSSA. To prevent routing loops, these ABRs do not
calculate default routes advertised by each other.

5.2.6 OSPF Fast Convergence


OSPF fast convergence is an extended feature of OSPF to speed up route convergence. The
characteristics of OSPF fast convergence are as follows:
l 5.2.8 Priority-based OSPF Convergence
l When certain routes on the network change, only the changed routes are recalculated.
This is called Partial Route Calculation (PRC).
l An intelligent timer is used to implement LSA management (the generation and receipt
of LSAs). With the intelligent timer, OSPF can respond to infrequent changes quickly,
whereas suppress impacts caused by frequent changes.
To avoid excessive consumption of device resources due to network connections or
frequent route flapping, RFC 2328 defines the following rules:
– After an LSA is generated, it cannot be generated again within 1 second. An LSA is
updated at an interval of 5 seconds.
– The interval for receiving LSAs is 1 second.
On a stable network where routes need to fast converge, you can use intelligent timers to
set the intervals for updating and receiving LSAs to 0 seconds. In this way, topology or
route changes can be advertised to the network or be immediately detected, thereby
speeding up route convergence on the network.
l An intelligent timer is used control route calculations.
When the network topology changes, OSPF devices need to recalculate routes. This
means that frequent changes in the network topology will affect the performance of
devices. To address issue, RFC 2328 requires that a delay timer be used for route
calculations. That is, route calculations are performed only after the delay timer expires.
However, the delay suggested by RFC 2328 has a fixed value, and cannot ensure both
fast response to topology changes and effective suppression of flapping.
With an intelligent timer, the delay in route calculation can be flexibly set as desired. In
this way, OSPF can quickly respond to infrequent changes, whereas suppress impacts
caused by frequent changes.
l 5.2.3 OSPF Smart-discover

5.2.7 OSPF Neighbor Relationship Flapping Suppression


OSPF neighbor relationship flapping suppression works by delaying OSPF neighbor
relationship reestablishment or setting the link cost to the maximum value (65535).

Background
If an interface carrying OSPF services alternates between Up and Down, OSPF neighbor
relationship flapping occurs on the interface. During the flapping, OSPF frequently sends

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 207


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Hello packets to reestablish the neighbor relationship, synchronizes LSDBs, and recalculates
routes. In this process, a large number of packets are exchanged, adversely affecting stability
of existing neighbor relationships, OSPF services, and other OSPF-dependent services, such
as LDP and BGP. OSPF neighbor relationship flapping suppression can address this problem
by delaying OSPF neighbor relationship reestablishment or preventing service traffic from
passing through flapping links.

Related Concepts
Flapping_event: is reported when the status of a neighbor relationship on an interface last
changes from Full to ExStart or Down. A flapping_event triggers flapping detection.
Flapping_count: indicates the number of times flapping has occurred.
Detect-interval: indicates the flapping detection interval. This interval is used to determine
whether to trigger a valid flapping_event.
Threshold: indicates the threshold upon which flapping suppression is triggered. When the
flapping_count exceeds the threshold, flapping suppression takes effect.
Resume-interval: is used to determine whether flapping suppression exits. If the interval
between two valid flapping_events is longer than the resume-interval, flapping suppression
exits.

Implementation
Flapping detection
OSPF interfaces start a flapping counter. If the interval between two flapping_events is
shorter than the detect-interval, a valid flapping_event is recorded, and the flapping_count
increments by 1. When the flapping_count exceeds the threshold, the system determines that
flapping occurs, triggers flapping suppression, and sets the flapping_count to 0. If the interval
between two valid flapping_events is longer than the resume-interval before the
flapping_count reaches the threshold again, the system sets the flapping_count to 0. An
interface starts the suppression timer when the status of the neighbor relationship last changes
to ExStart or Down.
The detect-interval, threshold, and resume-interval are configurable.

NOTE
The value of resume-interval must be greater than that of detecting-interval.
Flapping suppression
Flapping suppression works in either Hold-down or Hold-max-cost mode on an interface:
l Hold-down mode: In the case of frequent flooding and topology changes, the interface
prevents the neighbor relationship from being reestablished during the suppression
period, which minimizes LSDB synchronization attempts and packet exchanges.
l Hold-max-cost mode: If the traffic forwarding path changes frequently, the interface uses
65535 as the cost of the flapping link during the suppression period, which prevents
traffic from passing through the flapping link.
Flapping suppression can work first in Hold-down mode and then in Hold-max-cost mode
after the Hold-down mode exits.
By default, the Hold-max-cost mode takes effect. The mode and suppression period can be
changed manually using commands.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 208


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

NOTE
When an interface enters the flapping suppression state, all neighbor relationships on the interface enter
the state accordingly.
Exiting flapping suppression
An interface exits flapping suppression in any of following scenarios:
l The suppression timer expires.
l The corresponding OSPF process is reset.
l A user runs commands to force the interface to exit flapping suppression.

Typical Scenarios
Basic scenario
In Figure 5-9, the traffic forwarding path is Router A -> Router B -> Router C -> Router E
before a link failure occurs. After the link between Router B and Router C fails, the
forwarding path switches to Router A -> Router B -> Router D -> Router E. If the neighbor
relationship between Router B and Router C frequently flaps at the early stage of the path
switchover, the forwarding path will be switched frequently, causing traffic loss and affecting
network stability. If the neighbor relationship flapping meets suppression conditions, flapping
suppression takes effect.
l If flapping suppression works in Hold-down mode, the neighbor relationship between
Router B and Router C is prevented from being reestablished during the suppression
period, in which traffic is forwarded along the path Router A -> Router B -> Router D ->
Router E.
l If flapping suppression works in Hold-max-cost mode, 65535 is used as the cost of the
link between Router B and Router C during the suppression period, and traffic is
forwarded along the path Router A -> Router B -> Router D -> Router E.

Figure 5-9 Flapping suppression in a basic scenario

Router C

cost=10 cost=10

Router A Router B Router E


cost=100 cost=100

Router D

Single-forwarding path scenario


When only one forwarding path exists on the network, the flapping of the neighbor
relationship between any two devices on the path will interrupt traffic forwarding. In Figure
5-10, the traffic forwarding path is Router A -> Router B -> Router C -> Router E. If the

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 209


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

neighbor relationship between Router B and Router C flaps and the flapping meets
suppression conditions, flapping suppression takes effect. However, if the neighbor
relationship between Router B and Router C is prevented from being reestablished, the whole
network will be divided. Therefore, the Hold-max-cost mode (rather than the Hold-down
mode) is recommended. If flapping suppression works in Hold-max-cost mode, 65535 is used
as the cost of the link between Router B and Router C during the suppression period. After the
network stabilizes and the suppression timer expires, the link is restored.

NOTE

By default, the Hold-max-cost mode takes effect.

Figure 5-10 Flapping suppression in a single-forwarding path scenario

Router A Router E

cost=65535

Router B Router C

Broadcast scenario
In Figure 5-11, four devices are deployed on the same broadcast network using switches, and
the devices are broadcast network neighbors. If Router C flaps due to a link failure and Router
A and Router B were deployed at different time (Router A was deployed earlier for example)
or the flapping suppression parameters on Router A and Router B are different, Router A first
detects the flapping and suppresses Router C. Consequently, the Hello packets sent by Router
A do not carry Router C's router ID. However, Router B has not detected the flapping yet and
still considers Router C a valid node. As a result, the DR candidates identified by Router A
are Router B and Router D, whereas the DR candidates identified by Router B are Router A,
Router C, and Router D. Different DR candidates result in different DR election results,
which may lead to route calculation errors. To prevent this problem in scenarios where an
interface has multiple neighbors, such as on a broadcast, P2MP, or NBMA network, all
neighbors on the interface are suppressed when the status of a neighbor relationship last
changes to ExStart or Down. Specifically, if Router C flaps, Router A, Router B, and Router
D on the broadcast network are all suppressed. After the network stabilizes and the
suppression timer expires, Router A, Router B, and Router D are restored to the normal state.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 210


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Figure 5-11 Flapping suppression on a broadcast network

Router A Router B

Router C Router D

Multi-area scenario
In Figure 5-12, Router A, Router B, Router C, Router E, and Router F are connected in area
1, and Router B, Router D, and Router E are connected in the backbone area (Area 0). Traffic
from Router A to Router F is preferentially forwarded along an intra-area route. That is, the
forwarding path is Router A -> Router B -> Router C -> Router E -> Router F. When the
neighbor relationship between Router B and Router C flaps and the flapping meets
suppression conditions, flapping suppression takes effect in the default mode (Hold-max-
cost). Consequently, 65535 is used as the cost of the link between Router B and Router C.
However, the forwarding path remains unchanged because intra-area routes take precedence
over inter-area routes during route selection according to OSPF route selection rules. To
prevent traffic loss in multi-area scenarios, you need to configure the Hold-down mode to
prevent the neighbor relationship between Router B and Router C from being reestablished
during the suppression period. During this period, traffic is forwarded along the path Router A
-> Router B -> Router D -> Router E -> Router F.

NOTE

By default, the Hold-max-cost mode takes effect. The mode can be changed to Hold-down manually
using commands.

Figure 5-12 Flapping suppression in a multi-area scenario

Router C
Router A Router F

cost=10 cost=10
Area 1

Device
Area Router B Device
Router E
Area 0 B
0 cost=10
cost=10 cost=10

Router D

Scenario with both LDP-IGP synchronization and OSPF neighbor relationship flapping
suppression configured

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 211


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

In Figure 5-13, if the link between PE1 and P1 fails, an LDP LSP switchover is implemented
immediately, causing the original LDP LSP to be deleted before a new LDP LSP is
established. To prevent traffic loss, LDP-IGP synchronization needs to be configured. With
LDP-IGP synchronization, 65535 is used as the cost of the new LSP to be established. After
the new LSP is established, the original cost takes effect. Consequently, the original LSP is
deleted, and LDP traffic is forwarded along the new LSP.
Both LDP-IGP synchronization and OSPF neighbor relationship flapping suppression work in
either Hold-down or Hold-max-cost mode. If both functions are configured, the Hold-down
mode takes precedence over the Hold-max-cost mode, followed by the configured link cost.
Table 5-14 lists the suppression modes that take effect in different situations.

Table 5-14 Rules for selecting suppression modes in different situations


LDP-IGP LDP-IGP LDP-IGP Exiting LDP-IGP
Synchronization/ Synchronization Synchronization Synchronization
OSPF Neighbor in Hold-down in Hold-max-cost Suppression
Relationship Mode Mode
Flapping
Suppression
Mode

OSPF Neighbor Hold-down Hold-down Hold-down


Relationship
Flapping
Suppression in
Hold-down Mode

OSPF Neighbor Hold-down Hold-max-cost Hold-max-cost


Relationship
Flapping
Suppression in
Hold-max-cost
Mode

Exiting OSPF Hold-down Hold-max-cost Exiting LDP-IGP


Neighbor synchronization and
Relationship OSPF neighbor
Flapping relationship flapping
Suppression suppression

For example, in Figure 5-13, the link between PE1 and P1 frequently flaps, and both LDP-
IGP synchronization and OSPF neighbor relationship flapping suppression are configured. In
this case, the suppression mode is selected based on the above rules. No matter which mode
(Hold-down or Hold-max-cost) is selected, the traffic is switched to the forwarding path PE1 -
> P4 -> P3 -> PE2.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 212


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Figure 5-13 Scenario with both LDP-IGP synchronization and OSPF neighbor relationship
flapping suppression configured

P1 P2

cost=10
cost=10 cost=10

CE1 PE1 PE2 CE2


cost=100 cost=100
cost=100

P4 P3

Scenario with both bit-error-triggered protection switching and OSPF neighbor


relationship flapping suppression configured

If a link has a poor link quality, services transmitted along it may be adversely affected. If bit-
error-triggered protection switching is configured and the bit error rate (BER) along a link
exceeds a specified value, a bit error event is reported, and the cost of the link is set to 65535,
triggering route reselection. Consequently, service traffic is switched to the backup link. If
both bit-error-triggered protection switching and OSPF neighbor relationship flapping
suppression are configured, they both take effect. The Hold-down mode takes precedence
over the Hold-max-cost mode, followed by the configured link cost.

5.2.8 Priority-based OSPF Convergence

Priority-based OSPF convergence ensures that specific routes converge first when a great
number of routes need to converge. Different routes can be configured with different
convergence priorities. This allows important routes to converge first and therefore improves
network reliability.

By using priority-based OSPF convergence, you can assign a higher convergence priority to
routes for key services so that these routes can converge fast and the impact on key services is
reduced.

5.2.9 OSPF-BGP Association

Definition
When a new device is deployed in a network or a device is restarted, network traffic may be
lost during BGP convergence. This is because IGP convergence is faster than BGP
convergence.

This problem can be solved through the synchronization between OSPF and BGP.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 213


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Purpose
If a backup link exists, during traffic switchback, BGP traffic is lost because BGP route
convergence is slower than OSPF route convergence.
As shown in Figure 5-14, Router A, Router B, Router C, and Router D run OSPF and
establish IBGP connections. Router C functions as the backup of Router B. When the network
is stable, BGP and OSPF routes converge completely on the device.
Normally, traffic from Router A to [Link]/30 passes through Router B. When Router B
becomes faulty, traffic is switched to Router C. After Router B recovers, traffic is switched
back to Router B. During this process, packet loss occurs.
This is because when traffic is switched back to Router B, IGP (OSPF) route convergence is
faster than BGP route convergence. Consequently, convergence of OSPF routes is already
complete when BGP route convergence is still going on. As a result, Router B does not know
the route to [Link]/30.
Therefore, when packets from Router A to [Link]/30 arrive at Router B, they are discarded
because Router B does not have the route to [Link]/30.

Figure 5-14 OSPF-BGP association


RouterC
RouterF
POS2/0/0 POS1/0/0
[Link]/30 [Link]/30 POS1/0/0
[Link]/30
POS1/0/0 POS2/0/0
POS2/0/0 [Link]/30 [Link]/30
[Link]/30 EBGP
RouterA RouterD RouterE
POS1/0/0 POS3/0/0
[Link]/30 [Link]/30 POS1/0/0
POS2/0/0 [Link]/30
[Link]/30
POS1/0/0 POS2/0/0
[Link]/30 [Link]/30
AS 10 RouterB AS 20

Implementation
A device enabled with OSPF-BGP association remains as a stub router within the configured
synchronization period. That is, the link cost in the LSA advertised by the device is set to the
maximum value of 65535. Therefore, the device instructs other OSPF devices not to use it for
data forwarding.
As shown in Figure 5-14, OSPF-BGP association is enabled on Router B. In this situation,
before BGP route convergence is complete, Router A continues to use the backup link passing
through Router C instead of forwarding traffic to Router B until BGP route convergence on
Router B is complete.

5.2.10 OSPF GR
Routers generally operate with the control plane and forwarding plane separated. When the
network topology remains stable, a restart of the control plane does not affect the forwarding

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 214


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

plane, and the forwarding plane can still forward data properly. This separation ensures non-
stop service forwarding.
In graceful restart (GR) mode, the forwarding plane continues to direct data forwarding after a
routing protocol restarts. The actions on the control plane, such as re-establishment of
neighbor relationships and route calculations, do not affect the forwarding plane. Network
reliability is improved because service interruption caused by route flapping is prevented.

Basic Concepts of OSPF GR


GR is a technology used to ensure normal traffic forwarding and non-stop forwarding of key
services during the restart of routing protocols.
Unless otherwise stated, GR described in this section refers to the GR technology defined in
RFC 3623.
GR is one of high availability (HA) technologies, comprising a set of comprehensive
techniques, such as fault-tolerant redundancy, link protection, faulty node recovery, and traffic
engineering. As a fault-tolerant redundancy technology, GR is widely used to ensure non-stop
forwarding of key services during active/standby switchover and system upgrade.
The following concepts are involved in GR:
l Grace-LSA
OSPF supports GR by flooding Grace-LSAs. Grace-LSAs are used to inform neighbors
of the GR time, cause, and interface address when the GR starts and ends.
l Role of a router during GR
– Restarter: is the router that restarts. The Restarter can be configured to support
totally GR or partly GR.
– Helper: is the router that helps the Restarter. The Helper can be configured to
support planned GR or unplanned GR or to selectively support GR based on a
configured policy.
l Conditions that cause GR
– Unknown: indicates that GR is triggered for an unknown reason.
– Software restart: indicates that GR is triggered by commands.
– Software reload/upgrade: indicates that GR is triggered by software restart or
upgrade.
– Switch to redundant control processor: indicates that GR is triggered by an
abnormal active/standby switchover.
l GR period
The GR period cannot exceed 1800 seconds. OSPF routers can exit GR before GR
timeout regardless of successful or failed GR.

Classification of OSPF GR
l Totally GR: When a neighbor of a router does not support GR, the router exits GR.
l Partly GR: When a neighbor does not support GR, only the interface associated with this
neighbor exits GR, whereas the other interfaces perform GR normally.
l Planned GR: Commands are manually configured to restart a router or perform an active/
standby switchover for the router. Before the restart or switchover, the Restarter sends a
Grace-LSA.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 215


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

l Unplanned GR: A router restarts or performs an active/standby switchover due to a fault.


The router performs the switchover, without sending a Grace-LSA in advance, and then
enters the GR state after the standby board goes Up. The process of unplanned GR after
the standby board goes Up is the same as that of planned GR.

GR Process
l A router starts GR.
In planned GR mode, when commands are run to trigger an active/standby switchover,
the Restarter sends a Grace-LSA to all neighbors to notify them of the GR start, period,
and cause, and then performs the switchover.
In unplanned GR, the Restarter does not send any Grace-LSA.
The Restarter sends a Grace-LSA immediately after the standby board goes Up,
informing neighbors of the GR start, period, and cause. The Restarter then sends five
consecutive Grace-LSAs to each neighbor to ensure that neighbors can receive a Grace-
LSA. Sending five consecutive Grace-LSAs is proposed by vendors and has not been
defined by OSPF.
The Grace-LSA is sent to notify neighbors that the Restarter enters GR. During GR,
neighbors keep neighbor relationships with the Restarter so that other routers cannot
detect the switchover of the Restarter.
l Figure 5-15 shows the GR process.

Figure 5-15 OSPF GR process


Update the GR
period for the
received
Grace-LSAs

l The router exits GR.

Table 5-15 Reasons that a router exits GR


Executi Restarter Helper
on of
GR

Success Before GR times out, the Restarter re- After the Helper receives the
establishes neighbor relationships with Grace-LSA with the Age being
all neighbors existing before the active/ 3600s from the Restarter, the
standby switchover. neighbor relationship between
the Helper and Restarter enters
the Full state.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 216


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Executi Restarter Helper


on of
GR

Failure l GR times out, and all neighbor l The Helper does not receive
relationships are not recovered. a Grace-LSA from Restarter
l Router-LSAs or Network-LSAs sent before the neighbor
by the Helper causes the bidirectional relationship expires.
check failure on the Restarter. l The status of the interface
l The status of the interface that that functions as the Helper
functions as the Restarter changes. changes.
l The Restarter receives one-way Hello l The Helper receives LSAs
packets from the Helper. inconsistent with those in
the local LSDB from
l The Restarter receives the Grace- another router. This
LSA that is generated by another situation can be excluded
router on the same network segment. after the Helper is
Only one router can perform GR on configured not to perform
the same network segment at a time. strict LSA check.
l The Restarter's neighbors on the l The Helper receives Grace-
same network segment have different LSAs from two routers on
DRs or BDRs (because of the the same network segment
topology changes). at the same time.
l Neighbor relationships
between the Helper and
other neighbors change.

Comparison Between GR Mode and Non-GR Mode

Table 5-16 Comparison of an active/standby switchover in GR mode and non-GR mode


Switchover in Non-GR Mode Switchover in GR Mode

l OSPF neighbor relationships are re- l OSPF neighbor relationships are re-
established. established.
l Routes are recalculated. l Routes are recalculated.
l The forwarding table changes. l The forwarding table remains unchanged.
l The entire network detects the route l Except for neighbors of the device where
changes, and route flapping occurs for the active/standby switchover occurs, other
a short period of time. routers do not detect route changes.
l Packets are lost during forwarding, l No packets are lost during forwarding, and
and services are interrupted. services are not affected.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 217


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

5.2.11 OSPF-LDP Association


Definition
In a network that uses primary and backup links, when the faulty primary link recovers, traffic
is switched from the backup link back to the primary link.
IGP route convergence completes before an LDP session is established. Consequently, the
original LSP is deleted before a new LSP is established and LSP traffic is interrupted.

Purpose
As shown in Figure 5-16, the primary link adopts the path PE1→P1→P2→P3→PE2, and the
backup link adopts the path PE1→P1→P4→P3→PE2.
When the primary link is faulty, traffic is switched to the backup link. After the primary link
recovers, traffic is switched back to the primary link. During this process, traffic is interrupted
for a long period of time.

Figure 5-16 OSPF-LDP association


P2

PE1 P1 P3 PE2

Primary link
Backup link
P4

Associating Label Distribution Protocol (LDP) and IGP on P1 and P2 can shorten traffic
interruption caused by traffic switchback from the backup link to the primary link.

Table 5-17 OSPF-LDP association


OSPF-LDP Association Traffic Interruption Period

No Seconds

Yes Milliseconds

Implementation
IGP-LDP association delays route switchback by suppressing the establishment of IGP
neighbor relationships until LDP convergence is complete. That is, before an LSP on the

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 218


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

primary link is established, the backup link continues to forward traffic. After an LSP is
established on the primary link, traffic is switched back to the primary link.
LDP-IGP association involves three timers:
l Hold-down
l Hold-max-cost
l Delay
After the primary link recovers on a router, the router responds as follows:
1. Starts the hold-down timer. The IGP interface does not establish IGP neighbor
relationships but waits for the establishment of an LDP session. The Hold-down timer
specifies the period that the IGP interface waits.
2. Starts the Hold-max-cost timer after the Hold-down timer expires. The Hold-max-cost
timer specifies the interval for advertising the maximum link cost of the interface in an
LSA to the primary link.
3. After an LDP session is re-established for the primary link, starts the Delay timer to wait
for the establishment of an LSP.
4. After the Delay timer expires, LDP notifies IGP that synchronization is complete
regardless of the IGP status.

5.2.12 OSPF Database Overflow

Definition
OSPF requires that routers in the same area have the same Link-State Database (LSDB).
If the number of routes on a network increases, routers may fail to carry so much routing
information due to limited system resources. This is known as an OSPF database overflow.

Purpose
Configuring stub areas or NSSAs partially addresses database overflows. However, stub areas
or NSSAs fail to resolve the problem of an unexpected increase in dynamic routes. To
dynamically limit the LSDB capacity and thereby prevent database overflows, you can set the
maximum number of external LSAs allowed in the LSDB.

Implementation
To prevent database overflow, you can set the maximum number of non-default external
routes on a router.
All routers on the OSPF network must be configured with the same upper limit. If the number
of external routes on a router reaches the upper limit, the router enters the Overflow state and
starts an overflow timer. The router automatically exits the overflow state after the timer
expires. By default, the timer value is 5 seconds.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 219


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Table 5-18 OSPF database overflow phases

Overflow Phase OSPF Processing

Entering the overflow state A router deletes all non-default external routes generated
by itself.

Staying at the overflow state l The router does not generate non-default external
routes.
l The router discards the newly received non-default
external routes, and does not reply with LSAck packets.
l When the overflow timer expires, the router checks
whether the number of external routes still exceeds the
upper limit and performs the following operations
accordingly:
– If the number of external routes still exceeds the
upper limit, the router restarts the timer.
– If the number of external routes is less than the
upper limit, the router exits the overflow state.

Exiting the overflow state l The router resets the overflow timer.
l The router generates non-default routes.
l The router learns the newly received non-default
external routes, and replies with LSAck packets.
l The router prepares to enter the overflow state in case
of future occurrences.

5.2.13 OSPF Mesh-Group

Definition
In scenarios with multiple concurrent links, you can deploy OSPF mesh-group to classify
links into a mesh group. This allows OSPF to flood LSAs to only one link selected from the
mesh group. OSPF mesh-group prevents repetitive flooding that burdens the system.

The mesh-group feature is disabled by default.

Purpose
After receiving or generating an LSA, an OSPF process floods the LSA. If there are multiple
concurrent links, OSPF floods the LSA to each link and sends Update messages. Flooding
more than one LSA is unnecessary as only one is valid.

In this scenario, if there are 2000 concurrent links, OSPF floods each LSA 2000 times. Only
one flooding, however, is valid. The other 1999 times are useless repetition.

To prevent this unnecessary burden on the system, you can enable mesh-group to classify
multiple concurrent links between a router and its neighbor into a group and then select a
primary link for flooding.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 220


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Implementation
As shown in Figure 5-17, Router A and Router B are connected through three links and
establish an OSPF neighbor relationship. After receiving a new LSA from interface 4, Router
A floods the LSA to Router B through interfaces 1, 2, and 3.
This flooding causes a heavy load on the concurrent links. For the neighbor with concurrent
links, only a primary link is selected to flood the LSA.

Figure 5-17 LSA flooding with OSPF mesh-group disabled

1 LSA

LSA 4 2 LSA

RouterA 3 LSA RouterB

If there are multiple concurrent links between a device with OSPF mesh-group enabled and its
neighbor, the device floods received LSAs only to the primary link, as shown in Figure 5-18.

Figure 5-18 LSA flooding with OSPF mesh-group enabled

1 LSA

LSA 4 2 LSA

3 LSA
RouterA RouterB

As defined in OSPF, LSAs can be flooded to a link only when the neighbor status reaches
Exchange or a higher state. When the status of the interface on the primary link is lower than
Exchange, OSPF reselects a primary link from concurrent links for flooding LSAs. After
receiving LSAs flooded by Router A through link 1, Router B no longer floods the LSAs to
Router A through link 2 and link 3.
The Router ID of a neighbor uniquely identifies a mesh group. Interfaces connected to the
same neighbor with a state higher than Exchange belong to the same mesh group.
In Figure 5-19, a mesh group of Router A resides in Area 0, which contains the links of
interface 1 and interface 2. More than one neighbor of interface 3 resides on the broadcast
link. Therefore, interface 3 cannot be added to the mesh group.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 221


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Figure 5-19 Scenario where an interface cannot be added to a mesh group

4 2
RouterB
RouterA 3

Area0

NOTE

If a router with OSPF mesh-group enabled has the same router ID as its directly connected neighbor,
LSDBs cannot be synchronized and routes cannot be calculated correctly. In such a scenario, you need
to reconfigure the router ID of the neighbor. (The configuration with the same router ID for two different
devices is a configuration error.)

5.3 Application Scenarios for OSPF

5.3.1 OSPF GR
In Figure 5-20, Router A, Router B, Router C, and Router D run OSPF for interworking, and
Router A and Router B are enabled with GR. When Router A restarts, Router B helps Router
A perform GR, without notifying other neighbors that the Router A restarts. OSPF GR
ensures uninterrupted network traffic.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 222


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Figure 5-20 OSPF GR

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. s 223


oe r RouterC
r B d oute
te R A
R ou tify uter
Set up a n o o
t R
neighbor no that tarts
C es
CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

5.4 Summary of OSPF Configuration Tasks


Table 5-19 describes the OSPF configuration tasks.

Table 5-19 OSPF configuration tasks


Scenario Description Task

Configuring basic ospf The configuration of basic 5.7 Configuring Basic


functions OSPF functions is the OSPF Functions
foundation of the OSPF 5.8 Setting Session
network and the Parameters for OSPF
precondition for other OSPF Neighbor or Adjacency
functions. Relationships
5.9 Configuring OSPF
Attributes in Different
Types of Networks

Configuring OSPF areas l In a stub area, the area 5.10 Configuring OSPF
border router (ABR) Stub Areas
does not transmit learned 5.11 Configuring OSPF
autonomous system (AS) NSSAs
external routes. This
reduces entries in the
routing table on the ABR
in the stub area and the
amount of routing
information transmitted.
l An NSSA is a new type
of OSPF areas. Neither
an NSSA nor a stub area
transmits routes learned
from other areas in the
AS where it resides.
Different from a stub
area, an NSSA allows
AS external routes to be
imported and advertised
in the entire AS.

Adjusting OSPF route To meet various user 5.12 Adjusting OSPF


selection requirements, you can adjust Route Selection
OSPF parameters to flexibly
control OSPF routing.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 224


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Scenario Description Task

Controlling OSPF routing To meet network 5.13 Controlling OSPF


information requirements, you can Routing Information
configure different
parameters to accurately
control the advertisement
and receipt of OSPF routes.

Controlling the convergence To enable OSPF to quickly 5.16 Configuring OSPF


speed of OSPF routes detect changes in the Fast Convergence
network topology, you can
speed up OSPF route
convergence. To decrease
the impact of route flapping
on the network and relieve
loads on devices, you can
lower the convergence speed
of OSPF routes.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 225


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Scenario Description Task

Improving reliability of an l OSPF IP FRR pre- 5.14 Configuring OSPF IP


OSPF network computes a backup link FRR
by using the Loop-Free 5.15 Configuring BFD for
Alternate (LFA) OSPF
algorithm, and then adds
both the backup and 5.18 Configuring the
primary links to the OSPF GR Helper
forwarding table. In the
case of failures, OSPF IP
FRR can fast switch
traffic to the backup link
before routes on the
control plane converge.
This prevents traffic
interruption, protects
traffic, and thereby
improves reliability of an
OSPF network.
l By default, on broadcast
networks, the interval for
sending Hello packets is
10 seconds; on NBMA
networks, the interval for
sending Hello packets is
30 seconds. The interval
for declaring a neighbor
Down, that is, the dead
time after which a
neighbor relationship
becomes invalid, is four
times the interval for
sending Hello packets. If
a switch does not receive
a Hello packet from its
neighbor within the dead
time, the switch deletes
the neighbor. That is, the
switch detects neighbor
faults at the second level.
This causes a large
number of packets to be
lost on a high-speed
network.
Bidirectional Forwarding
Detection (BFD) is
introduced to solve the
above problem in the
existing detection
mechanism. BFD

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 226


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Scenario Description Task

ensures that the detection


interval is improved to
the millisecond level.
Instead of replacing the
Hello mechanism of
OSPF, BFD works with
OSPF to fast detect
adjacency faults. In
addition, BFD instructs
OSPF to recalculate
corresponding routes to
ensure correct packet
forwarding.
l When a switch restarts or
performs an active/
standby switchover, it
directly ages all routing
entries in the Forward
Information Base (FIB)
table. This results in
route interruption. In
addition, neighboring
switches remove this
switch from the neighbor
list, and notify other
switches. This causes
SPF re-calculation. If
this switch recovers
within a few seconds, the
neighbor relationship
becomes unstable,
resulting in route
flapping.
After being enabled with
OSPF Graceful Restart
(GR), a switch can
ensure non-stop packet
forwarding in the event
of a restart caused by an
abnormality. In such a
case, route flapping is
avoided during the short
restart of the switch.

Improving stability of an You can improve stability of 5.19 Improving Stability of


OSPF network an OSPF network to reduce an OSPF Network
route flapping on the OSPF
network and enable devices
to work in a normal state for
a long period of time.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 227


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Scenario Description Task

Improving security of an On a network demanding 5.20 Improving Security of


OSPF network high security, you can an OSPF Network
configure OSPF
authentication and adopt the
GTSM mechanism to
improve the security of the
OSPF network.

5.5 Licensing Requirements and Limitations for OSPF


Involved Network Elements
Other network elements also need to support OSPF.

Licensing Requirements
OSPF is a basic feature of the CE8800, CE7800, CE6800, and CE5800 series switches and is
not under license control.

Version Requirements

Table 5-20 Products and minimum version supporting OSPF


Product Minimum Version Required

CE8868EI V200R005C10

CE8861EI V200R005C10

CE8860EI V100R006C00

CE8850-32CQ-EI V200R002C50

CE8850-64CQ-EI V200R005C00

CE7850EI V100R003C00

CE7855EI V200R001C00

CE6810EI V100R003C00

CE6850EI V100R001C00

CE6850-48S6Q-HI V100R005C00

CE6850-48T6Q-HI/CE6850U-HI/ V100R005C10
CE6851HI

CE6855HI V200R001C00

CE6856HI V200R002C50

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 228


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Product Minimum Version Required

CE6857EI V200R005C10

CE6860EI V200R002C50

CE6865EI V200R005C00

CE6870-24S6CQ-EI/ V200R001C00
CE6870-48S6CQ-EI

CE6870-48T6CQ-EI V200R002C50

CE6875EI V200R003C00

CE6880EI V200R002C50

CE5880EI V200R005C10

CE5810EI V100R002C00

CE5850EI V100R001C00

CE5850HI V100R003C00

CE5855EI V100R005C10

Feature Limitations
The CE6810LI does not support IPv4 Layer 3 forwarding. After the IPv4 function is enabled
on an interface of the CE6810LI, the configured IPv4 address can only be used to manage the
switch.

5.6 Default Settings for OSPF


Table 5-21 describes the default settings for OSPF.

Table 5-21 Default settings for OSPF


Parameter Default Setting

OSPF Disabled

Interval for sending Hello By default, on P2P and broadcast interfaces, the interval
packets for sending Hello packets is 10 seconds; on P2MP and
NBMA interfaces, the interval is 30 seconds.

Dead interval of OSPF neighbor By default, on P2P and broadcast interfaces, the dead
relationships interval after which an OSPF neighbor relationship
expires is 40 seconds; on P2MP and NBMA interfaces,
the interval is 120 seconds.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 229


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Parameter Default Setting

Period during which a device 500 seconds


acts as a stub router

Bandwidth reference value used 100 Mbit/s


to calculate a link cost

5.7 Configuring Basic OSPF Functions

Pre-configuration Tasks
Before configuring basic OSPF functions, complete the following task:

l Configuring IP addresses for interfaces to ensure that neighboring nodes are reachable at
the network layer

5.7.1 Creating an OSPF Process

Context
To run OSPF, a switch needs to have a router ID. A router ID is a 32-bit unsigned integer,
which uniquely identifies a switch in an AS. To ensure stability of OSPF, you need to
manually configure a router ID for each device during network planning.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *

An OSPF process is created, and the OSPF view is displayed.

l The parameter process-id specifies the ID of an OSPF process. The default value is 1.
The switch supports OSPF multi-process. You can create different processes for different
types of services. The OSPF process ID is valid only in the local area, and does not
affect packet exchange with other switches. Therefore, different switches can also
exchange packets even though they have different process IDs.
l The parameter router-id router-id specifies the router ID of a switch.
By default, the system automatically selects the IP address of an interface on the current
device as the router ID. The largest IP address among loopback addresses is selected as
the router ID preferentially. If no loopback interface is configured, the largest IP address
among interfaces is selected as the router ID. When manually setting a router ID, ensure
that the router ID of each device is unique in the AS. Typically, you can use the IP
address of an interface on the device as the router ID.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 230


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

NOTE
The router ID of each OSPF process must be unique on the OSPF network; otherwise, OSPF
neighbor relationships cannot be set up and the problem of incorrect routing information will
occur. Configuring a unique router ID for each OSPF process on each OSPF device is
recommended to ensure stability.
l The parameter vpn-instance vpn-instance-name specifies the name of a VPN instance.
If a VPN instance is specified, the OSPF process belongs to the specified VPN instance;
otherwise, the OSPF process belongs to a public network instance.

Step 3 Run commit

The configuration is committed.

----End

5.7.2 Creating an OSPF Area

Context
More and more devices are deployed with the expansion of the network scale. As a result,
each device has to maintain a large LSDB, which becomes a heavy burden. OSPF solves this
problem by dividing an AS into areas. An area is regarded as a logical device group. Each
group is identified by an area ID. The borders of an area are devices, rather than links. A
network segment (or a link) belongs to only one area; that is, each OSPF interface must be
specified to an area.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *

An OSPF process is enabled, and the OSPF view is displayed.

Step 3 Run area area-id

An OSPF area is created and the area view is displayed.

Areas are not equally important. The area with ID 0 is called the backbone area. The
backbone area is responsible for forwarding inter-area routing information. In addition,
routing information between non-backbone areas must be forwarded through the backbone
area.

Step 4 Run commit

The configuration is committed.

----End

5.7.3 Enabling OSPF

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 231


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Context
After creating an OSPF process, you need to configure the network segments included in
areas. A network segment can belong to only one area. That is, you need to specify an area for
each interface that runs OSPF. In this document, a network segment refers to the network
segment where the IP address of an OSPF interface resides.
OSPF checks the network mask carried in a received Hello packet. If the network mask
carried in a received Hello packet is different from that of the local device, the Hello packet is
discarded. Therefore, the OSPF neighbor relationship cannot be established.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run area area-id
The OSPF area view is displayed.
Step 4 OSPF can be enabled in an OSPF area or on a specific interface.
l Enable OSPF in an OSPF area, run network ip-address wildcard-mask
Network segments belonging to the area are configured.
OSPF can properly run on an interface only when the following conditions are met:
– The IP address mask length of the interface is greater than or equal to the mask
length specified in the network command.
– The primary IP address of the interface belongs to the network segment specified in
the network command.
By default, OSPF advertises the IP address of a loopback interface as a 32-bit host route,
which is irrelevant to the mask length configured on the loopback interface. To advertise
routes to the network segment of the loopback interface, configure the network type as
NBMA or broadcast in the interface view. For details, see 5.9.1 Configuring Network
Types of OSPF Interfaces.
l Enable OSPF on an interface. Run the following command in the system view:
a. Run interface interface-type interface-number
The interface view is displayed.
b. (On an Ethernet interface), run undo portswitch
The interface is switched to Layer 3 [Link] default, an Ethernet interface works
in Layer 2 [Link] an Ethernet interface already has Layer 2 configuration, this
command fails to be executed on the interface. Before running this command on the
interface, delete all the Layer 2 configuration of the interface.
NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch
batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in
the system view to switch these interfaces to Layer 3 mode in batches.
c. Run ospf enable process-id area area-id

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 232


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

OSPF is enabled on the interface.


Step 5 Run commit
The configuration is committed.

----End

5.7.4 (Optional) Creating OSPF Virtual Links

Context
After OSPF areas are defined, OSPF route updates between non-backbone areas are
implemented through a backbone area. Therefore, OSPF requires that all non-backbone areas
maintain connectivity with the backbone area and that the backbone areas in different OSPF
areas maintain connectivity with each other. However, it is not true in real world due to
certain restrictions. To resolve this problem, you can configure OSPF virtual links.
Perform the following steps on a switch running OSPF.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run area area-id
The OSPF area view is displayed.
Step 4 Run vlink-peer router-id [ smart-discover | hello hello-interval | retransmit retransmit-
interval | trans-delay trans-delay-interval | dead dead-interval | [ simple [ plain plain-text |
[ cipher ] cipher-text ] | { md5 | hmac-md5 | hmac-sha256 } [ key-id { plain plain-text |
[ cipher ] cipher-text } ] | authentication-null | keychain keychain-name ] ] *
A virtual link is created.
This command must also be configured on the neighboring switch.

If plain is selected, the password is saved in plain text in the configuration file, which brings
security risks. It is recommended that you select cipher to store the password in cipher text.
MD5 authentication and HMAC-MD5 authentication have potential security risks. HMAC-
SHA256 authentication is recommended.

Step 5 Run commit


The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 233


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Follow-up Procedure
Different default MTUs may be used on devices provided by different vendors. Therefore, the
MTU needs to be set to 0 by default in DD packets sent by interfaces. This ensures
consistency. For details, see Configuring an Interface to Fill in the DD Packet with the
Actual MTU.

5.7.5 Verifying the Basic OSPF Function Configuration

Prerequisites
All configuration of basic OSPF function is complete.

Procedure
l Run the display ospf [ process-id ] peer command in any view to check OSPF neighbor
information.
l Run the display ospf [ process-id ] interface command in any view to check OSPF
interface information.
l Run the display ospf [ process-id ] routing command in any view to check OSPF
routing table information.
----End

5.8 Setting Session Parameters for OSPF Neighbor or


Adjacency Relationships

Pre-configuration Tasks
Before setting session parameters for OSPF neighbor or adjacency relationships, complete the
following tasks:
l Configuring a link layer protocol
l Configuring IP addresses for interfaces to ensure that neighboring nodes are reachable at
the network layer
l Configuring basic OSPF functions

Configuration Procedure
Perform one or more of the following configuration tasks (excluding the task of Verifying the
OSPF Session Parameter Settings) as required.

5.8.1 Setting the OSPF Packet Retransmission Limit

Context
After an OSPF switch sends a DD packet, an LSU packet, or an LSR packet, if it does not
receive an LSAck packet within a specified period, it retransmits the packet. After the number

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 234


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

of packet retransmissions reaches a specified limit, the OSPF switch tears down the adjacency
relationship.

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 OSPF packet retransmission limit is set.

By default, no limit is set for OSPF packet retransmissions. The default maximum number of
packet retransmissions is 30.

Step 4 Run commit

The configuration is committed.

----End

5.8.2 Configuring an Interface to Fill in DD Packets with the


Actual MTU

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run interface interface-type interface-number

The OSPF interface view is displayed.

Step 3 On an Ethernet interface, run undo portswitch

The interface is switched to Layer 3 mode.

By default, an Ethernet interface works in Layer 2 mode.

The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 235


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Step 4 Run ospf mtu-enable


The interface is configured to fill in DD packets with the actual MTU and check whether the
MTU in DD packets received from a neighbor exceeds the MTU of the local end.
By default, the MTU in DD packets sent by an interface is 0.

Setting the MTU in a DD packet will lead to the re-establishment of the neighbor relationship.

Step 5 Run commit


The configuration is committed.

----End

5.8.3 Verifying the OSPF Session Parameter Settings

Prerequisites
All settings of session parameters of OSPF neighbor or adjacency relationships are complete.

Procedure
l Run the display ospf [ process-id ] peer command to check OSPF neighbor information.
l Run the display ospf [ process-id ] brief command to check OSPF brief information.
l Run the display ospf [ process-id ] retrans-queue [ interface-type interface-number ]
[ neighbor-id] command to check the OSPF retransmission list.
----End

5.9 Configuring OSPF Attributes in Different Types of


Networks

Applicable Environment
According to the types of link layer protocols, OSPF classifies networks into the following
types:
l P2MP: OSPF does not default any network to a P2MP network regardless of its link
layer protocol. Therefore, a P2MP network must be forcibly changed from another
network type.
l NBMA: If the link layer protocol is FR, X.25, OSPF defaults the network type to
NBMA.
l Broadcast: If the link layer protocol is Ethernet or FDDI, OSPF defaults the network
type to broadcast.
l P2P: If the link layer protocol is PPP, HDLC, or LAPB, OSPF defaults the network type
to P2P.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 236


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Without changing the layer protocols, you can change network types and configure OSPF
features to flexibly build networks.

Pre-configuration Tasks
Before configuring OSPF attributes in different types of networks, complete the following
tasks:
l Configuring IP addresses for interfaces to ensure that neighboring nodes are reachable at
the network layer
l Configuring basic OSPF functions

Configuration Procedure

Figure 5-21 Flowchart of configuring OSPF attributes in different types of networks

For a P2P network For a P2MP network For an NBMA network For a broadcast network

Set the network type Set the network type Set the network type Set the network type
of the OSPF interface of the OSPF interface of the OSPF interface of the OSPF interface
to P2P to P2MP to NBMA to broadcast

Disable OSPF from


Set the DR Priority for
checking the network Configure neighbors
the OSPF interface
mask

Set the interval for


sending poll packets

Set the DR priority for


the OSPF interface
Mandatory
procedure
Optional
procedure

5.9.1 Configuring Network Types of OSPF Interfaces


Context
You can configure one of the following network types for an interface as required:
l P2MP: OSPF does not default any network to a P2MP network regardless of its link
layer protocol. Therefore, a P2MP network must be forcibly changed from another
network type.
l NBMA: An NBMA network must be fully meshed. That is, any two switches on an
NBMA network must be directly reachable. However, it is not true in most cases. In such
a case, you need to forcibly change the network type using commands.
l Broadcast: To speed up establishment of neighbor relationships, you can change the
network type from broadcast to P2P.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 237


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run interface interface-type interface-number

The OSPF interface view is displayed.

Step 3 On an Ethernet interface, run undo portswitch

The interface is switched to Layer 3 mode.

By default, an Ethernet interface works in Layer 2 mode.

The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ospf network-type { broadcast | nbma | p2mp | p2p [ peer-ip-ignore ] }

The network type of the OSPF interface is configured.

By default, the network type of an interface depends on the physical interface. For example,
the network type of an Ethernet interface is broadcast.

Configuring a new network type for an interface will cause the OSPF session on the interface
to be reestablished.

NOTE

Generally, the network types of OSPF interfaces on both ends of a link must be the same. Otherwise,
route calculation errors occur.

Step 5 Run commit

The configuration is committed.

----End

5.9.2 (Optional) Setting the DR Priority for an OSPF Interface of


the Broadcast or NBMA Network Type

Procedure
Step 1 Run system-view

The system view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 238


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Step 2 Run interface interface-type interface-number

The OSPF interface view is displayed.

Step 3 On an Ethernet interface, run undo portswitch

The interface is switched to Layer 3 mode.

By default, an Ethernet interface works in Layer 2 mode.

The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ospf dr-priority priority

The DR priority of the OSPF interface is set. A larger value indicates a higher priority.

By default, the DR priority of an interface is 1.

Step 5 Run commit

The configuration is committed.

----End

Follow-up Procedure

Restarting or shutting down an interface will interrupt the OSPF neighbor relationships
between devices. Therefore, exercise caution when performing the operation.

Reconfiguring the DR priority for a device does not change the DR or BDR on the network
where the device is deployed. The DR or BDR can be reelected using the following methods.
This, however, will result in the interruption of OSPF adjacency relationships between
devices. Therefore, the following methods are used only when necessary.

l Restart the OSPF processes on all switches.


l Run the shutdown and then undo shutdown commands on interfaces where OSPF
neighbor relationships are established.

5.9.3 Configuring P2MP Network Attributes

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 239


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Procedure
Step 1 Disable OSPF from checking the network mask in a packet.
1. Run system-view
The system view is displayed.
2. Run interface interface-type interface-number
The interface view is displayed.
3. On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute
configurations (for example, shutdown and description configurations). Alternatively, if
configuration information supported by both Layer 2 and Layer 3 interfaces exists (for
example, mode lacp and lacp system-id configurations), no configuration that is not
supported after the working mode of the interface is switched can exist. If unsupported
configurations exist on the interface, delete the configurations first and then run the undo
portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system
view to switch these interfaces to Layer 3 mode in batches.
4. Run ospf network-type p2mp
The network type of the OSPF interface is configured.
A P2MP network must be forcibly changed from another network type. For details, see
Configuring Network Types for OSPF Interfaces.
5. Run ospf p2mp-mask-ignore
OSPF is disabled from checking the network mask in a packet on the P2MP network.
6. Run commit
The configuration is committed.
Step 2 Configure the switch to filter the LSAs to be sent.
When multiple links exist between two switches, you can configure the local switch to filter
the LSAs to be sent. This can reduce unnecessary retransmission of LSAs and thereby save
bandwidth resources.
1. Run quit
The system view is displayed.
2. Run ospf [ process-id ]
The OSPF process view is displayed.
3. Run filter-lsa-out peer ip-address { all | { summary [ acl { acl-number | acl-name } ] |
ase [ acl { acl-number | acl-name } ] | nssa [ acl { acl-number | acl-name } ] } * }
The local switch is configured to filter the LSAs to be sent on the P2MP network.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 240


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

By default, a device does not filter the LSAs to be sent.


4. Run commit

The configuration is committed.

----End

5.9.4 Configuring a Neighbor on an NBMA Network

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ospf [ process-id ]

The OSPF process view is displayed.

Step 3 Run peer ip-address [ dr-priority priority ]

A neighbor is configured on the NBMA network.

l The parameter ip-address specifies the IP address of the neighbor.


l The parameter dr-priority priority specifies the DR priority of the neighbor. A larger
value indicates a higher priority.

Step 4 Run commit

The configuration is committed.

----End

5.9.5 (Optional) Configuring the Interval for Sending Poll Packets


on an NBMA Network

Context
On an NBMA network, devices establish neighbor relationships by sending Hello packets.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run interface interface-type interface-number

The OSPF interface view is displayed.

Step 3 On an Ethernet interface, run undo portswitch

The interface is switched to Layer 3 mode.

By default, an Ethernet interface works in Layer 2 mode.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 241


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ospf timer poll interval

The interval for sending Poll packets on the NBMA interface is set.

The parameter interval specifies the interval for sending Poll packets on the NBMA interface.

Step 5 Run commit

The configuration is committed.

----End

5.9.6 Verifying the OSPF Attribute Configuration

Prerequisites
All configuration of OSPF attributes in different types of networks is complete.

Procedure
l Run the display ospf [ process-id ] interface command to check OSPF interface
information.
l Run the display ospf [ process-id ] peer command to check OSPF neighbor information.
l Run the display ospf brief command to check the interval for sending Poll Hello packets
on an NBMA network.

----End

5.10 Configuring OSPF Stub Areas

Applicable Environment
Dividing an AS into different areas can reduce the number of LSAs transmitted on a network
and enhance OSPF extensibility. For some non-backbone areas on the border of an AS, you
can configure these areas as stub areas to further reduce the size of the routing tables and the
number of transmitted LSAs.

Pre-configuration Tasks
Before configuring OSPF stub areas, complete the following tasks:

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 242


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

l Configuring IP addresses for interfaces to ensure that neighboring nodes are reachable at
the network layer
l Configuring basic OSPF functions

Configuration Procedure

Figure 5-22 Flowchart of configuring OSPF stub areas

Configure OSPF stub areas

Configure metrics of default routes


sent to stub areas

Mandatory
procedure
Optional
procedure

5.10.1 Defining the Current Area as a Stub Area

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run area area-id
The OSPF area view is displayed.
Step 4 Run stub [ no-summary ]
The current area is configured as a stub area.
If the parameter no-summary is specified, an ABR is disabled from sending summary LSAs
to a stub area. The parameter no-summary takes effect in the area only when the stub
command is configured on an ABR.
To configure an area as a stub area, you need to run the stub command on all switches in the
area.
AS external routes carried in Type 5 LSAs cannot be advertised within a stub area. Therefore,
the switches in a stub area learn AS external routes from an ABR. The ABR automatically
generates a summary LSA (Type 3 LSA) with the link state ID being [Link] and the network
mask being [Link] and then advertises the LSA in the entire stub area.
Step 5 Run commit
The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 243


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

5.10.2 (Optional) Configuring Costs of Default Routes Sent to


Stub Areas

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ospf [ process-id ]

The OSPF process view is displayed.

Step 3 Run area area-id

The OSPF area view is displayed.

Step 4 Run stub [ no-summary ]

The current area is configured as a stub area.

Step 5 Run default-cost cost

The cost of the default route sent to the stub area is set.

The parameter cost specifies the cost of the Type 3 default route sent to the stub area. The
default cost is 1.

This command applies only to the ABR that is connected to a stub area.

Step 6 Run commit

The configuration is committed.

----End

5.10.3 Verifying the OSPF Stub Area Configuration

Prerequisites
All configuration of OSPF stub areas is complete.

Procedure
l Run the display ospf [ process-id ] peer command to check OSPF neighbor information.
l Run the display ospf [ process-id ] routing command to check OSPF routing table
information.

----End

5.11 Configuring OSPF NSSAs

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 244


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Applicable Environment
An excessive number of entries in a routing table wastes network resources and causes high
CPU usage. To reduce entries in a routing table, you can configure a non-backbone area on
the border of an AS as a stub area or an NSSA. For details about how to configure an OSPF
stub area, see 5.10 Configuring OSPF Stub Areas.

An NSSA is a special type of OSPF area. Neither an NSSA nor a stub area transmits routes
learned from other areas in the AS where it resides. Different from a stub area, an NSSA
allows AS external routes to be imported and advertised in the entire AS.

An OSPF stub area can save system resources but cannot import external routes. An NSSA
can be applied to the scenario where AS external routes need to be imported without
consuming excessive system resources.

Type 7 LSAs are used to carry imported AS external routing information in an NSSA. Type 7
LSAs are generated by an ASBR in an NSSA and flooded only in the NSSA where the ASBR
resides. The ABR in an NSSA selectively translates received Type 7 LSAs into Type 5 LSAs
to advertise AS external routes to other areas over the OSPF network.

NOTE

l A Type 7 LSA is a new type of LSA that has been introduced to support NSSAs and describe
imported external routes.
l Type 7 LSAs can be used to carry default route information to guide traffic to other ASs.

Pre-configuration Tasks
Before configuring an NSSA, complete the following tasks:

l Configuring IP addresses for interfaces to ensure that neighboring switches are reachable
at the network layer
l Configuring basic OSPF functions

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ospf [ process-id ]

The OSPF process view is displayed.

Step 3 Run area area-id

The OSPF area view is displayed.

Step 4 Run nssa [ default-route-advertise [ backbone-peer-ignore ] | no-import-route | no-


summary | set-n-bit | suppress-forwarding-address | translator-always | translator-
interval interval-value | zero-address-forwarding ] *

The area is configured as an NSSA.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 245


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

NOTE

l To configure an area as an NSSA, you need to run the nssa command on all devices in the area.
l Configuring or deleting NSSA attributes may update the routing information in the area and
interrupt neighbor relationships. NSSA attributes can be reconfigured or deleted only after the
routing update is complete.

Parameters in the nssa command are described as follows:


l The default-route-advertise parameter is used to configure the ASBR to generate a
Type 7 LSA carrying a default route and advertise it to the NSSA.
An ABR generates a Type 7 LSA carrying a default route regardless of whether a default
route exists in the routing table on the ABR. However, an ASBR generates a Type 7 LSA
carrying a default route only when a default route exists in the routing table.
l If an ASBR also functions as an ABR, the no-import-route parameter can be configured
to prevent external routes imported using the import-route command from being
advertised to the NSSA.
l The no-summary parameter is used to disable an ABR from transmitting summary
LSAs (Type 3 LSAs) to the NSSA.
l If the set-n-bit parameter is specified, the N-bit is set in DD packets during
synchronization between the switch and neighboring switches.
l If the suppress-forwarding-address parameter is specified, the forwarding address (FA)
of a Type 5 LSA translated from a Type 7 LSA by the NSSA ABR is set to [Link].
l If multiple ABRs are deployed in the NSSA, the system automatically selects an ABR
(generally the switch with the largest router ID) as the translator to convert Type 7 LSAs
into Type 5 LSAs. You can specify the translator-always parameter on an ABR to
specify the ABR as an all-the-time translator. To implement load balancing on two
ABRs, you can specify the translator-always parameter on two ABRs to specify them
both as all-the-time translators. You can use this command to pre-configure a fixed
translator to prevent LSA flooding caused by translator role changes.
l The translator-interval parameter is used to ensure uninterrupted services when
translator roles change. The value of interval-value must be greater than the flooding
period.
l If the zero-address-forwarding parameter is specified, the FAs of generated NSSA
LSAs are set to [Link] when external routes are imported to the ABR in an NSSA.
Step 5 (Optional) Run default-cost cost
The cost of a Type 3 default route that the ABR sends to the NSSA is set.
To ensure the reachability of AS external routes, the ABR in an NSSA generates a default
route and advertises this route to other switches in the NSSA. You can change the cost of the
default route sent to an NSSA to adjust default route selection.
By default, the cost of the default route that an ABR sends to the NSSA is 1.
Step 6 Run commit
The configuration is committed.

----End

Verifying the Configuration

Run either of the following commands to check OSPF LSDB information:

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 246


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

l display ospf [ process-id ] lsdb [ brief ]


l display ospf [ process-id ] lsdb [ { [ { router | network | summary | asbr | ase | nssa |
opaque-link | opaque-area | opaque-as } [ link-state-id ] ] [ originate-router
[ advertising-router-id ] | hostname hostname | self-originate ] } ] [ age { min-value
min-age-value | max-value max-age-value } * ]
l display ospf [ process-id ] lsdb [ { [ { router | network | summary | asbr | ase | nssa |
opaque-link | opaque-area | opaque-as } [ link-state-id ] ] [ originate-router
[ advertising-router-id ] | self-originate ] } ] [ age { min-value min-age-value | max-
value max-age-value } * ] [ resolve-hostname ]

Run either of the following commands to check OSPF routing table information:

l display ospf [ process-id ] routing [ ip-address [ mask | mask-length ] ] [ interface


interface-type interface-number ] [ nexthop nexthop-address ]
l display ospf [ process-id ] routing router-id [ router-id ]

Run the display ospf [ process-id ] interface [ all | interface-type interface-number ]


[ verbose ] command to check OSPF interface information.

5.12 Adjusting OSPF Route Selection

Applicable Environment
To meet various requirements, such as flexible networking or load balancing optimization on
complex networks, you can adjust OSPF parameters.

Pre-configuration Tasks
Before adjusting OSPF route selection, complete the following tasks:

l Configuring IP addresses for interfaces to ensure that neighboring nodes are reachable at
the network layer
l Configuring basic OSPF functions

Configuration Procedure
Perform one or more of the following configuration tasks (excluding the task of Verifying the
OSPF Route Selection Adjustment Configuration) as required.

5.12.1 Setting the Link Cost for an OSPF Interface

Context
You can set the link cost using the ospf cost cost command. If you do not set the link cost of
an OSPF interface using the command, OSPF can automatically calculate the link cost for the
interface based on the interface bandwidth.

The calculation formula is as follows:

Link cost of an interface = Bandwidth reference value/Interface bandwidth

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 247


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

The integer part of the calculation result is used as the link cost of the interface. If the
calculated result is less than 1, the cost value is 1. Changing the bandwidth reference value
can change the link cost of an interface.

Procedure
l Setting the link cost for an OSPF interface
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The OSPF interface view is displayed.
c. On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute
configurations (for example, shutdown and description configurations).
Alternatively, if configuration information supported by both Layer 2 and Layer 3
interfaces exists (for example, mode lacp and lacp system-id configurations), no
configuration that is not supported after the working mode of the interface is
switched can exist. If unsupported configurations exist on the interface, delete the
configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch
batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in
the system view to switch these interfaces to Layer 3 mode in batches.
d. Run ospf cost cost
The link cost of the OSPF interface is set.
e. Run commit
The configuration is committed.
l Changing the bandwidth reference value
a. Run system-view
The system view is displayed.
b. Run ospf [ process-id ]
The OSPF process view is displayed.
c. Run bandwidth-reference value
The bandwidth reference value is changed.
The parameter value specifies the bandwidth reference value used to calculate the
link cost, in Mbit/s.
d. Run commit
The configuration is committed.
----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 248


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

5.12.2 Setting the Preference for Equal-cost OSPF Routes

Context
After OSPF calculates equal-cost routes, you can run the nexthop command to select the
route with the highest preference from the equal-cost routes as the next hop. A smaller value
of weight indicates a higher route preference. The default weight is 255. If OSPF discovers
equal-cost routes and the number of equal-cost routes is less than or equal to that specified in
the maximum load-balancing number command, OSPF performs load balancing among
these equal-cost routes.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ospf [ process-id ]

The OSPF process view is displayed.

Step 3 Run nexthop ip-address weight value

The preference is set for an equal-cost route.

l The parameter ip-address specifies the next-hop address of the equal-cost route.
l The parameter value specifies the weight of the next hop. The default value is 255. A
smaller value of weight indicates a higher route preference.

Step 4 Run commit

The configuration is committed.

----End

5.12.3 Setting the Maximum Number of Equal-Cost Routes

Context
A CE8800, CE7800, CE6800, and CE5800 series switches supports load balancing among
equal-cost routes. That is, you can configure multiple routes, which have the same destination
and preference.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ospf [ process-id ]

The OSPF process view is displayed.

Step 3 Run maximum load-balancing number

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 249


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

The maximum number of equal-cost routes is set. The default value is 32 (64 on the
CE6870EI).

NOTE

When the number of equal-cost routes is greater than the number specified in the maximum load-
balancing command, OSPF selects valid routes for load balancing according to the following criteria:
1. Route preference: Routes with higher preferences are selected for load balancing.
2. Interface index: If routes have the same preference, routes with larger interface indexes are selected
for load balancing.
3. Next-hop IP address: If routes have the same preference and same interface index, routes with larger
next-hop IP addresses are selected for load balancing.

Step 4 Run commit

The configuration is committed.

----End

5.12.4 Configuring a Switch to Comply with External Route


Selection Rules Defined in RFC 1583

Context
All devices in an OSPF routing domain must be configured with the same route selection
rules. At present, most OSPF routing domains adopt the route selection rules defined in RFC
2328.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ospf [ process-id ]

The OSPF process view is displayed.

Step 3 (Optional) Run rfc1583 compatible

The switch is configured to comply with the route selection rules defined in RFC 1583.

By default, the routing rules defined in RFC 1583 are used.


l If route selection rules defined in RFC 1583 are enabled, a device selects a route to the
destination based on the route cost.
l If route selection rules defined in RFC 1583 are disabled, a device selects a route to the
destination based on the route type. In the case of the same route type, the device selects
a route based on the route cost.

NOTE

On a network, if not all switches use the route selection rules defined in RFC 1583, external loops may
occur.

Step 4 Run commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 250


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

The configuration is committed.

----End

5.12.5 Verifying the OSPF Route Selection Adjustment


Configuration

Prerequisites
All configuration of adjusting OSPF route selection is complete.

Procedure
l Run the display ospf [ process-id ] interface command to check OSPF interface
information.
l Run the display ospf [ process-id ] routing command to check OSPF routing table
information.
----End

5.13 Controlling OSPF Routing Information

Pre-configuration Tasks
Before controlling OSPF routing information, complete the following tasks:
l Configuring IP addresses for interfaces to ensure that neighboring nodes are reachable at
the network layer
l Configuring basic OSPF functions

Configuration Procedure
Perform one or more of the following configuration tasks (excluding the task of Verifying the
OSPF Routing Information Control Configuration) as required.

5.13.1 Configuring OSPF to Import External Routes

Context
OSPF can ensure loop-free intra-area and inter-area routes; however, OSPF cannot protect
external routes against loops. Therefore, when configuring OSPF to import external routes,
you need to avoid the loops caused by manual configurations.
Perform the following steps on a switch that functions as an ASBR running OSPF:

Procedure
l Configuring OSPF to import routes discovered by other protocols
a. Run system-view
The system view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 251


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

b. Run ospf [ process-id ]

The OSPF process view is displayed.


c. Run import-route { bgp [ permit-ibgp ] | direct | rip [ process-id-rip ] | static |
isis [ process-id-isis ] | ospf [ process-id-ospf ] } [ cost cost | route-policy route-
policy-name | tag tag | type type ] *

OSPF is configured to import routes discovered by other protocols.


d. Run commit

The configuration is committed.


l Setting parameters for OSPF to import routes
a. Run system-view

The system view is displayed.


b. Run ospf [ process-id ]

The OSPF process view is displayed.


c. Run default { cost { cost-value | inherit-metric } | tag tag | type type } *

The default parameter values (route cost, tag, and type) are set for OSPF to import
routes.

n The parameter cost cost-value specifies the default cost of external routes
imported by OSPF.
n The parameter inherit-metric indicates that the cost carried in an imported
route itself is inherited. If the cost is not specified in an imported route, the
default cost set using the default command is used as the cost of the imported
route.

When OSPF is configured to import external routes, you can assign default values
to some additional parameters, such as route cost, tag, and type. The route tag
identifies protocol-related information. For example, it can be used to differentiate
AS numbers when OSPF receives BGP routes.

By default, the cost of external routes imported by OSPF is 1; the type of imported
external routes is Type 2; the tag value is 1.
NOTE

You can run one of the following commands, listed in descending order of priority, to set the
cost of imported external routes:
l Run the apply cost command in the route-policy view to set the cost of imported
external routes.
l Run the import-route command in the OSPF view to set the cost of imported external
routes.
l Run the default command to set the default cost of imported external routes.
d. Run import-route limit limit-number [ threshold-alarm { upper-limit upper-
limit-value | lower-limit lower-limit-value } * ]

A limit is configured on the number of LSAs that can be generated by an OSPF


process for imported external routes.

By default, the number of LSAs generated by an OSPF process for imported


external routes is not limited.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 252


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

If OSPF imports a large number of external routes and advertises them to a device
with a smaller routing table capacity, the device may restart unexpectedly. To
address this problem, run the import-route limit command to configure a limit on
the number of LSAs generated when an OSPF process imports external routes.
Check the overload status based on the value of the Current status field in the
display ospf brief command output.
n Normal: The number of LSAs generated when an OSPF process imports
external routes is less than or equal to the lower alarm threshold (in
percentage) multiplied by the maximum number allowed.
n Approach limit: The number of LSAs generated when an OSPF process
imports external routes is approaching (reaching or exceeding 90% of) the
upper alarm threshold.
n Exceed limit: The number of LSAs generated when an OSPF process imports
external routes has reached or exceeded the maximum number allowed.
Ensure that upper-limit-value is greater than or equal to lower-limit-value.
e. Run lsdb-overflow-limit number
The maximum number of external routes supported in an OSPF LSDB is set.
By default, the maximum number of external routes supported in an OSPF LSDB is
not limited.
The lsdb-overflow-limit command is run to ensure that the number of routes is
limited within a proper range. If the number of external routes imported by OSPF
exceeds the configured maximum number, the device deletes self-generated non-
default external routes to ensure the proper forwarding of other external routes.
f. Run commit
The configuration is committed.
----End

5.13.2 Configuring OSPF to Advertise a Default Route to OSPF


Areas

Context
In a routing table, a default route is the route with both the destination and mask being [Link].
You can run the display ip routing-table command to check whether a default route is
configured. If the destination address of a packet does not match any entry in the routing
table, the packet is sent using a default route. If the destination address of a packet does not
match any entry in the routing table and no default route exists, the packet is discarded. An
Internet Control Message Protocol (ICMP) packet is then sent, informing the originating host
that the destination host or network is unreachable.

Procedure
l Configuring OSPF to advertise a default route to OSPF areas
a. Run system-view
The system view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 253


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

b. Run ospf [ process-id ]


The OSPF process view is displayed.
c. Run the following commands as required:
n Run default-route-advertise [ [ always | permit-calculate-other ] | cost cost |
type type | route-policy route-policy-name | distribute-delay delay-time ] *
Or run default-route-advertise [ permit-calculate-other | cost cost | type
type | route-policy route-policy-name | distribute-delay delay-time | permit-
ibgp ] *
OSPF is configured to advertise a default route to OSPF areas.
○ always: indicates that an LSA describing a default route is generated and
then advertised regardless of whether there are active default routes of
other OSPF processes in the routing table of the local device.
○ permit-calculate-other: indicates that the local router is still allowed to
calculate the default routes advertised by other switches after adverting its
default route.
○ route-policy route-policy-name: indicates that, when there are matched
default routing entries generated by other OSPF processes in the routing
table of the local device, the local device advertises default routes
according to the parameters in a configured routing policy.
n Run default-route-advertise summary cost cost
The default cost of a summary LSA (Type 3 LSA) is set.
Before setting the parameter, you need to configure VPN information.
Otherwise, this command cannot be run.
NOTE

l An ASE LSA that describes a default route is generated and then advertised only when
there are active default routes of other OSPF processes in the routing table of the local
device.
l Before advertising a default route, OSPF compares the preferences of default routes.
Therefore, if a static default route is configured on an OSPF switch, to add the default
route advertised by OSPF to the current routing table, ensure that the preference of the
configured static default route is lower than that of the default route advertised by OSPF.
d. Run commit
The configuration is committed.
----End

5.13.3 Configuring OSPF Route Aggregation

Context
Perform the following steps on an OSPF switch.

Procedure
l Configuring ABR route aggregation
a. Run system-view
The system view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 254


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

b. Run ospf [ process-id ]

The OSPF process view is displayed.


c. Run area area-id

The OSPF area view is displayed.


d. Run abr-summary

ABR route aggregation is configured.


e. Run commit

The configuration is committed.


l Configuring ASBR route aggregation
a. Run system-view

The system view is displayed.


b. Run ospf [ process-id ]

The OSPF process view is displayed.


c. Run asbr-summary ip-address mask [ not-advertise | tag tag | cost cost |
distribute-delay interval ] *

ASBR route aggregation is configured.


d. Run commit

The configuration is committed.

----End

5.13.4 Configuring OSPF to Filter Received Routes

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ospf [ process-id ]

The OSPF process view is displayed.

Step 3 Run filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-name | route-policy


route-policy-name [ secondary ] } import

OSPF is configured to filter received routes.

l The parameter acl-number specifies the number of a basic ACL.


l The parameter acl-name acl-name specifies the name of an ACL.
l The parameter ip-prefix ip-prefix-name specifies the name of an IP prefix list.

OSPF is a link-state dynamic routing protocol, with routing information carried in LSAs.
Therefore, the filter-policy import command cannot be used to filter advertised or received
LSAs.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 255


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

The filter-policy import command is used to filter the routes calculated by OSPF. Only
routes that pass the filtering criteria are added to the routing table. Routes that do not pass the
filtering criteria are not added to the OSPF routing table but can be advertised.
Step 4 Run commit
The configuration is committed.

----End

5.13.5 Configuring OSPF to Filter the Routes to Be Advertised

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run filter-policy { acl-number | acl-name acl-name | ip-prefix ip-prefix-name } export
[ protocol [ process-id ] ]
OSPF is configured to filter the routes imported through the import-route command. Only
the routes that pass the filtering criteria are advertised.
l The parameter acl-number specifies the number of a basic ACL.
l The parameter acl-name acl-name specifies the name of an ACL.
l The parameter ip-prefix ip-prefix-name specifies the name of an IP prefix list.
You can specify the parameter protocol [ process-id ] to filter the routes of a certain routing
protocol or a certain OSPF process. If the parameter protocol [ process-id ] is not specified,
OSPF filters all imported routes.

NOTE

l The import-route command cannot be used to import external default routes.


l Only the external routes that passing the filtering criteria are advertised through Type 5 LSAs
generated by OSPF.

Step 4 Run commit


The configuration is committed.

----End

5.13.6 Configuring a Switch to Filter LSAs to Be Sent

Context
When multiple links exist between two switches, you can configure the local switch to filter
the LSAs to be sent. This prevents unnecessary transmissions of LSAs and saves bandwidth
resources.
Perform the following steps on a switch running OSPF.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 256


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF 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 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ospf filter-lsa-out { all | { summary [ acl { acl-number | acl-name } ] | ase [ acl { acl-
number | acl-name } ] | nssa [ acl { acl-number | acl-name } ] } * }
The switch is configured to filter the LSAs to be sent.
By default, the LSAs to be sent are not filtered.

----End

5.13.7 Configuring OSPF to Filter ABR Type3 LSAs

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run area area-id
The OSPF area view is displayed.
Step 4 Run the following commands to configure OSPF to filter incoming or outgoing Type 3 LSAs
generated by ABRs as required.
l Run filter { acl-number | acl-name acl-name | ip-prefix ip-prefix-name | route-policy
route-policy-name } export
OSPF is configured to filter the summary LSAs leaving the local area.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 257


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

l Run filter { acl-number | acl-name acl-name | ip-prefix ip-prefix-name | route-policy


route-policy-name } import [ include-abr-summary ]
OSPF is configured to filter the summary LSAs entering the local area.

Step 5 Run commit

The configuration is committed.

----End

5.13.8 Verifying the OSPF Routing Information Control


Configuration

Prerequisites
All configuration of controlling OSPF routing information is complete.

Procedure
l Run the display ospf [ process-id ] lsdb command to check OSPF LSDB information.

----End

5.14 Configuring OSPF IP FRR

Pre-configuration Tasks
Before configuring OSPF IP FRR, complete the following tasks:

l Configuring IP addresses for interfaces to ensure that neighboring nodes are reachable at
the network layer
l Configuring basic OSPF functions

Configuration Procedure

Figure 5-23 Flowchart for configuring OSPF IP FRR

Enable OSPF IP FRR

Block FRR on a specified


OSPF interface

Mandatory
procedure
Optional
procedure

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 258


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

5.14.1 Enabling OSPF IP FRR

Context
FRR calculation consumes a large number of CPU resources. If the device is running features
with higher priorities than FRR calculation, you need to delay FRR calculation.

Perform the following steps on a switch that needs to protect traffic to be forwarded.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] *

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

Step 3 Run frr

The OSPF IP FRR view is displayed.

Step 4 Run loop-free-alternate

OSPF IP FRR is enabled to generate a loop-free backup path.

NOTE

OSPF can generate a loop-free backup path only when the OSPF IP FRR traffic protection inequality is
met.

Step 5 (Optional) Run frr-policy route route-policy route-policy-name

An OSPF IP FRR filtering policy is configured.

After an OSPF IP FRR filtering policy is configured, only OSPF backup routes that pass the
filtering criteria defined in the policy can be added to the forwarding table.

Step 6 (Optional) Run tiebreaker { node-protecting | lowest-cost } preference preference

The solution of selecting a backup path for OSPF IP FRR is set.

By default, the solution of selecting a backup path for OSPF IP FRR is node-protection path
first. In some cases, the solution needs to be changed to smallest-cost path first because of
data forwarding capacity or link cost consideration. By default, the higher-cost path is
selected as the backup path. To change the solution of selecting a backup path for OSPF IP
FRR to smallest-cost path first, run the tiebreaker command. After the command is run, the
smallest-cost path is selected as the backup path.

Step 7 Run commit

The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 259


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

5.14.2 (Optional) Binding IP FRR and BFD

Context
After the parameter frr-binding is set to bind the BFD status to the link status of an interface,
link failures can be detected rapidly. This ensures that traffic is rapidly switched to the backup
link if the primary link fails.

Pre-configuration Tasks
Before binding IP FRR and BFD, complete the following tasks:

l 5.15.1 Configuring Global BFD


l 5.15.2 Configuring the BFD for OSPF Feature or 5.15.4 (Optional) Configuring
BFD on a Specified Interface

Procedure
l Bind IP FRR and BFD in an OSPF process.
a. Run system-view

The system view is displayed.


b. Run ospf

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


c. Run bfd all-interfaces frr-binding

IP FRR and BFD are bound in the OSPF process.


d. Run commit

The configuration is committed.


l Bind IP FRR and BFD on a specified OSPF interface.
a. Run system-view

The system view is displayed.


b. Run interface interface-type interface-number

The interface view is displayed.


c. Run ospf bfd frr-binding

IP FRR and BFD are bound on the interface.

NOTE

The BFD configuration on an interface takes precedence over that in an OSPF process.
d. Run commit

The configuration is committed.

----End

5.14.3 (Optional) Blocking FRR on an OSPF Interface

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 260


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run interface interface-type interface-number

The view of an OSPF interface enabled with FRR is displayed.

Step 3 On an Ethernet interface, run undo portswitch

The interface is switched to Layer 3 mode.

By default, an Ethernet interface works in Layer 2 mode.

The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ospf frr block

FRR is blocked on the OSPF interface.

Step 5 Run commit

The configuration is committed.

----End

5.14.4 Verifying the OSPF IP FRR Configuration

Prerequisites
All OSPF IP FRR configuration is complete.

Procedure
l Run the display ospf [ process-id ] routing command to check the information about the
primary link and backup link of a route after OSPF IP FRR is configured.

----End

5.15 Configuring BFD for OSPF

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 261


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Applicable Environment
A link fault or a topology change causes devices to recalculate routes. Therefore, the
convergence of routing protocols must be speed up to improve the network performance.

Link faults are inevitable. Therefore, a feasible solution is required to fast detect faults and
notify routing protocols of the faults immediately. If BFD is associated with routing protocols,
once a link fault occurs, BFD can speed up the convergence of routing protocols.

Pre-configuration Tasks
Before configuring BFD for OSPF, complete the following tasks:

l Configuring IP addresses for interfaces to ensure that neighboring nodes are reachable at
the network layer
l 5.7 Configuring Basic OSPF Functions

Configuration Procedure

Figure 5-24 Flowchart of configuring BFD for OSPF

Configure global BFD

Configure BFD for OSPF

Prevent an interface from dynamically


setting up a BFD session

Configure BFD on the specified


interface

Mandatory procedure
Optional procedure

5.15.1 Configuring Global BFD

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run bfd

BFD is configured globally and the global BFD view is displayed.

Step 3 Run commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 262


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

The configuration is committed.

----End

5.15.2 Configuring the BFD for OSPF Feature

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
BFD for OSPF is enabled to establish BFD sessions.
If all the interfaces in a certain process are configured with BFD and their neighbor
relationships are in Exstart state, OSPF establishes BFD sessions on all the interfaces in the
process.
To set parameters for BFD sessions, run the bfd all-interfaces { min-rx-interval receive-
interval | min-tx-interval transmit-interval | detect-multiplier multiplier-value | frr-
binding } * command.
l The parameter min-rx-interval receive-interval specifies the expected minimum interval
for receiving BFD packets from a neighbor.
l The parameter min-tx-interval transmit-interval specifies the minimum interval for
sending BFD packets to a neighbor.
l The parameter detect-multiplier multiplier-value specifies the local detection multiplier.
l The parameter frr-binding indicates that the status of the BFD session is bound to OSPF
IP FRR.

NOTE

If only the bfd all-interfaces { min-rx-interval receive-interval | min-tx-interval transmit-interval |


detect-multiplier multiplier-value | frr-binding } * command is run to set BFD parameters but the bfd
all-interfaces enable command is not run, BFD is not enabled.

Step 4 Run commit


The configuration is committed.

----End

5.15.3 (Optional) Preventing an Interface from Dynamically


Setting Up a BFD Session

Context
After the bfd all-interfaces enable command is run in an OSPF process, BFD sessions are
established on all OSPF interfaces with the neighbor relationships being in Full state in the
process.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 263


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The view of the interface enabled with BFD for OSPF is displayed.
Step 3 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ospf bfd block


The interface is prevented from dynamically setting up a BFD session.
Step 5 Run commit
The configuration is committed.

----End

5.15.4 (Optional) Configuring BFD on a Specified Interface

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The view of the interface enabled with BFD for OSPF is displayed.
Step 3 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 264


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ospf bfd enable

BFD is enabled on the interface to establish a BFD session.

If all interfaces in a certain process are configured with BFD and their neighbor relationships
are in Exstart state, OSPF establishes BFD sessions on all the interfaces in the process using
default BFD parameters.

To set parameters for BFD sessions, run the ospf bfd { min-rx-interval receive-interval |
min-tx-interval transmit- interval | detect-multiplier multiplier-value } * command.

NOTE

l The BFD configuration on an interface takes precedence over that in a process. That is, if BFD is
enabled on an interface, BFD parameters set on the interface are used to establish BFD sessions.
l If only the ospf bfd { min-rx-interval receive-interval | min-tx-interval transmit- interval | detect-
multiplier multiplier-value } * command is run to set BFD parameters but the ospf bfd enable
command is not run, BFD is not enabled on the interface.

Step 5 Run commit

The configuration is committed.

----End

5.15.5 Verifying the BFD for OSPF Configuration

Prerequisites
All configuration of BFD for OSPF is complete.

Procedure
l Run either of the following commands to check the BFD session information:
– display ospf [process-id ] bfd session interface-type interface-number [ router-id ]
– display ospf [process-id ] bfd session { router-id | all }

----End

5.16 Configuring OSPF Fast Convergence

Pre-configuration Tasks
Before configuring OSPF fast convergence, complete the following tasks:

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 265


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

l Configuring a link layer protocol


l Configuring IP addresses for interfaces to ensure that neighboring nodes are reachable at
the network layer
l Configuring basic OSPF functions

Configuration Procedure
Perform one or more of the following configuration tasks (excluding the task of Verifying the
OSPF Fast Convergence Configuration) as required.

5.16.1 Setting the Convergence Priority of OSPF Routes

Context
With the integration of network services, different services such as data, voice, and video run
on the same network infrastructure, but them have different requirements on the network. For
Video on Demand (VoD) services, the route convergence speed of the multicast source server
is the most critical factor that affects multicast services. It is required that the routes to the
multicast source converge rapidly when network faults occur. On the BGP or MPLS VPN
bearer network where OSPF is used to implement the IP connectivity of the backbone
network, end-to-end routes between PEs need to converge rapidly.

You can set the convergence priority of certain OSPF routes to a larger value so that these
routes converge preferentially. This shortens the interruption of key services and improves the
reliability of the entire 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 prefix-priority { critical | high | medium } ip-prefix ip-prefix-name

The convergence priority of certain OSPF routes is set.

After the convergence priority of certain OSPF routes is set, OSPF can calculate and flood
LSAs, and synchronize LSDBs according to the priority. This speeds up the route
convergence. When an LSA meets multiple priorities, the highest priority takes effect. Before
a convergence priority is set, OSPF calculates LSAs based on the routes carried in them,
namely, in the sequence of intra-area routes, inter-area routes, and AS external routes. This
command makes OSPF calculate the three types of routes separately according to the
specified route calculation priorities. Convergence priorities include critical, high, medium,
and low. During LSA flooding, LSAs are placed into the corresponding critical, high,
medium, and low queues based on their priorities, which speeds up the processing of high-
priority LSAs.

NOTE

This command takes effect only on the public network.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 266


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Step 4 Run commit


The configuration is committed.

----End

5.16.2 Setting the Interval for Sending Hello Packets

Context
Hello packets are commonly used. They are periodically sent on OSPF interfaces to establish
and maintain neighbor relationships. The intervals set on interfaces that need to establish an
OSPF neighbor relationship need to be the same. Otherwise, the interfaces cannot establish
the OSPF neighbor relationship.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The OSPF interface view is displayed.
Step 3 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ospf timer hello interval [ conservative ]


The interval for sending Hello packets is set on the OSPF interface.
By default, the interval for sending Hello packets on a P2P or broadcast interface is 10s; the
interval for sending Hello packets on a P2MP or NBMA interface is 30s; the dead time of the
OSPF neighbor on an interface is four times the interval for sending Hello packets on the
same interface.
To speed up OSPF convergence in the case of a link failure, you are advised to configure BFD
for OSPF. For details, see Configuring BFD for OSPF. If the remote end does not support
BFD for OSPF or you do not want to configure BFD for OSPF, specify conservative when
you run the ospf timer hello command. The conservative mode is recommended so that the
value of the dead timer configured using the ospf timer dead command takes effect even

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 267


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

when the value is less than 10s. Otherwise, if the actual dead timer that takes effect due to the
protection mechanism of a device is greater than 10s, services may be affected.

NOTE
The interval must be longer than or equal to the active/standby switchover period. Otherwise, a protocol
intermittent interruption may occur during the switchover. The default interval for sending Hello packets is
recommended.

Step 5 Run commit


The configuration is committed.

----End

5.16.3 Setting the Dead Time of a Neighbor Relationship

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The OSPF interface view is displayed.
Step 3 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ospf timer dead interval


The dead time after which the neighbor relationship on the interface expires is set.
By default, the dead time of a neighbor relationship is 40s on a P2P or broadcast interface,
and 120s on a P2MP or NBMA interface; the dead time of the neighbor relationship on an
interface is four times the interval for sending Hello packets on the same interface.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 268


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

NOTE

If the dead interval of an OSPF neighbor is shorter than 10s, the session may be closed. Therefore, if
dead interval is shorter than 10s, the actual dead interval of an OSPF neighbor is not shorter than 10s. If
the conservative mode is configured using the ospf timer hello command, the configured dead timer
takes effect even when its value is less than 10s.
Both the hello timer and the dead timer are restored to their respective default values upon a change of
the network type.

Step 5 Run commit


The configuration is committed.

----End

5.16.4 Configuring Smart-discover

Context
Without Smart-discover being configured, when the neighbor status of a switch changes or the
DR/BDR on a multi-access network (broadcast or NBMA network) changes, the switch does
not send Hello packets to its neighbor until the Hello timer expires. This slows down the
establishment of neighbor relationships between devices. After Smart-discover is configured,
the switch can send Hello packets to its neighbor immediately without waiting for the
expiration of the Hello timer. This speeds up the establishment of neighbor relationships and
therefore implements fast convergence on OSPF networks.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The OSPF interface view is displayed.
Step 3 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ospf smart-discover


Smart-discover is configured on the interface.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 269


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Step 5 Run commit

The configuration is committed.

----End

5.16.5 Setting the Interval for Updating LSAs

Context
In OSPF, the interval for updating LSAs is defined as 5s. This aims to prevent network
connections or frequent route flapping from consuming excessive network bandwidth or
device resources.

On a stable network where routes need to fast converge, you can cancel the interval for
updating LSAs by setting the interval to 0s. In this manner, changes of the topology or the
routes can be immediately advertised on the network through LSAs, thereby speeding up
route convergence on the network.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ospf [ process-id ]

The OSPF process view is displayed.

Step 3 Run lsa-originate-interval { 0 | { intelligent-timer max-interval start-interval hold-interval |


other-type interval } * }

The interval for updating LSAs is set.

l The parameter intelligent-timer indicates that an intelligent timer is used to update


OSPF Type-1 LSA (Router LSA), Type-2 LSA (Network LSA), Type-5 LSA (AS-
external-LSA), and Type-7 LSA (NSSA LSA).
l The parameter max-interval specifies the maximum interval for updating LSAs, in
milliseconds.
l The parameter start-interval specifies the initial interval for updating LSAs, in
milliseconds.
l The parameter hold-interval specifies the hold interval for updating LSAs, in
milliseconds.
l The parameter other-type interval specifies the interval for updating OSPF Type-3 LSAs
(Network-summary-LSAs), Type-4 LSAs (ASBR-summary-LSAs), and Type-10 LSAs
(Opaque LSAs).

By default, an intelligent timer is enabled. After an intelligent timer is enabled, the default
maximum interval for updating LSAs is 5000 ms, the default initial interval is 500 ms, and the
default hold interval is 1000 ms. The mechanism of the intelligent timer is as follows:
1. The initial interval for updating LSAs is specified by start-interval.
2. The interval for the nth (n ≥ 2) LSA update is equal to hold-interval x 2(n-2).

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 270


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

3. When the interval specified by hold-interval x 2(n-2) reaches the maximum interval
specified by max-interval, OSPF uses the maximum interval to update LSAs.
4. If no flapping occurs within the interval specified by max-interval that starts upon the
end of the last LSA update, the intelligent timer exits.
5. If no flapping occurs in the last update interval but flapping occurs in the current update
interval, the LSA update is delayed for a period specified by start-interval. After the
LSA update is complete, the current interval is used for the next LSA update.
Step 4 (Optional) Run lsa-originate-interval suppress-flapping suppress-interval [ threshold
threshold ]
The maximum LSA suppression period is configured.
If frequent LSA flapping occurs, the larger value between lsa-originate-interval suppress-
flapping and lsa-originate-interval is used as the value of the suppression timer.
By default, if a device receives an LSA, it delays route calculation for 10s in route flapping
scenarios.
Step 5 Run commit
The configuration is committed.

----End

5.16.6 Setting the Interval for Receiving LSAs

Context
In OSPF, the interval for receiving LSAs is defined as 1s. This aims to prevent network
connections or frequent route flapping from consuming excessive network bandwidth or
device resources.
On a stable network where routes need to fast converge, you can cancel the interval for
receiving LSAs by setting the interval to 0s. In this manner, changes of the topology or the
routes can be immediately advertised on the network through LSAs, thereby speeding up
route convergence on the network.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run lsa-arrival-interval { interval | intelligent-timer max-interval start-interval hold-
interval }
The interval for receiving LSAs is set.
l The parameter interval specifies the interval for receiving LSAs, in seconds.
l The parameter intelligent-timer indicates that an intelligent timer is used to set the
interval for receiving router LSAs or network LSAs.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 271


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

l The parameter max-interval specifies the maximum interval for receiving LSAs, in
milliseconds.
l The parameter start-interval specifies the initial interval for receiving LSAs, in
milliseconds.
l The parameter hold-interval specifies the hold interval for receiving LSAs, in
milliseconds.

On a stable network where routes need to fast converge, you can set the interval for receiving
LSAs to 0s so that changes of the topology or the routes can be detected immediately.

By default, an intelligent timer is enabled. After an intelligent timer is enabled, the default
maximum interval for receiving LSAs is 1000 ms, the default initial interval is 500 ms, and
the default hold interval is 500 ms. The mechanism of the intelligent timer is as follows:
1. The initial interval for receiving LSAs is specified by start-interval.
2. The interval for the nth (n ≥ 2) LSA receipt is equal to hold-interval x 2(n-2).
3. When the interval specified by hold-interval x 2(n-2) reaches the maximum interval
specified by max-interval, OSPF uses the maximum interval to receive LSAs.
4. If no flapping occurs within the interval specified by max-interval that starts upon the
end of the last LSA receipt, the intelligent timer exits.
5. If no flapping occurs in the last interval but flapping occurs in the current interval, the
LSA receipt is delayed for a period specified by start-interval. After LSA receipt is
complete, the current interval is used for the next LSA receipt.

Step 4 (Optional) Run lsa-arrival-interval suppress-flapping suppress-interval [ threshold


threshold ]

The maximum LSA suppression period is configured.

If frequent LSA flapping occurs, the larger value between lsa-arrival-interval suppress-
flapping and lsa-arrival-interval is used as the value of the suppression timer.

By default, if a device receives an LSA, it delays route calculation for 10s in route flapping
scenarios.

Step 5 Run commit

The configuration is committed.

----End

5.16.7 Setting the Interval for SPF Calculations

Context
When an OSPF LSDB changes, the shortest paths need to be recalculated. If a network
changes frequently, shortest paths are calculated frequently, consuming many system
resources and degrading the system performance. By configuring an intelligent timer to set a
proper interval for SPF calculations, you can prevent excessive consumption of system
memory and bandwidth resources.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 272


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run spf-schedule-interval{ interval1 | intelligent-timer max-interval start-interval hold-
interval [ conservative ] | millisecond interval2 }
The interval for SPF calculations is set.
l The parameter interval1 specifies the interval for SPF calculations, in seconds.
l The parameter intelligent-timer indicates that an intelligent timer is used to set the
interval for SPF calculations.
l The parameter max-interval specifies the maximum interval for SPF calculations, in
milliseconds.
l The parameter start-interval specifies the initial interval for SPF calculations, in
milliseconds.
l The parameter hold-interval specifies the hold interval for SPF calculations, in
milliseconds.
l The parameter millisecond interval2 specifies the interval for SPF calculations, in
milliseconds.
By default, an intelligent timer is enabled. After an intelligent timer is set, the maximum
interval for SPF calculations is 5000 ms, the initial interval is 50 ms, and the hold interval is
200 ms.
The mechanism of the intelligent timer is as follows:
1. The initial interval for SPF calculations is specified by start-interval.
2. The interval for the nth (n ≥ 2) SPF calculation is equal to hold-interval x 2(n-2).
3. When the interval specified by hold-interval x 2(n-2) reaches the maximum interval
specified by max-interval, OSPF uses the maxe fanimum interval to perform SPF
calculations.
4. If no flapping occurs within the interval specified by max-interval that starts upon the
end of the last SPF calculation, the intelligent timer exits.
5. If no flapping occurs in the last calculation interval but flapping occurs in the current
calculation interval, the SPF calculation is delayed for a period specified by start-
interval. After the SPF calculation is complete, the current interval is used for the next
SPF calculation.
Step 4 Run commit
The configuration is committed.

----End

5.16.8 Configuring the Route Calculation Delay Function to


Suppress Frequent LSA Flapping

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 273


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Context
Frequent OSPF LSA flapping on the remote device may lead to route flapping on the local
device, affecting services. To address this problem, run the maxage-lsa route-calculate-delay
command to configure the local device to delay route calculation in the case of frequent OSPF
LSA flapping, which suppresses route flapping locally.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run maxage-lsa route-calculate-delay delay-interval
The route calculation delay function is configured to suppress frequent OSPF LSA flapping.
Step 4 Run commit
The configuration is committed.

----End

5.16.9 Disabling Active/Standby Switchover Upon Abnormal


OSPF LSA Aging

Context
If the aging timer expires on the local device due to an abnormality, the local device
incorrectly clears all Router LSAs from the remote device, which causes route flapping and
service interruptions. To resolve this issue, active/standby switchover upon abnormal OSPF
LSA aging is automatically enabled. Active/standby switchover is triggered to restore
network connections and service traffic when the following condition is met:
(Number of incorrectly cleared Router LSAs/Total number of Router LSAs) x 100% ≥ 80%
(Router LSAs are those sent by the remote device to the local device.)
To disable function of triggering an active/standby switchover upon abnormal OSPF LSA
aging, run the ospf maxage-lsa auto-protect disable command.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ospf maxage-lsa auto-protect disable
The active/standby switchover upon abnormal OSPF LSA aging is disabled.
By default, active/standby switchover upon abnormal OSPF LSA aging is enabled.
Step 3 Run commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 274


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

The configuration is committed.


----End

5.16.10 Disabling OSPF LSA Aging Management

Context
If an exception occurs on the age field of LSAs, LSAs may be aged unexpectedly, causing
LSA flapping or a route calculation error. For example, if the abnormal aging time is 2500s
and the actual aging time is 500s, LSAs are aged prematurely. To address this problem, OSPF
LSA aging management is enabled by default. If the aging time in a received LSA is greater
than 1800s, OSPF considers the LSA abnormal and changes the aging time to 1700s until the
aging time values of all LSAs in the area become the same. In this case, routes can be
calculated correctly.
By default, the OSPF LSA aging management function is enabled. To disable this function,
run the lsa-age refresh disable command.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run lsa-age refresh disable
OSPF LSA aging management is disabled.
Step 3 Run commit
The configuration is committed.
----End

5.16.11 Verifying the OSPF Fast Convergence Configuration

Prerequisites
All configuration of OSPF fast convergence is complete.

Procedure
l Run the display ospf [ process-id ] brief command to check OSPF brief information.
----End

5.17 Configuring Suppression of OSPF Neighbor


Relationship Flapping

Context
If an interface carrying OSPF services alternates between Up and Down, OSPF neighbor
relationship flapping occurs on the interface. During the flapping, OSPF frequently sends

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 275


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Hello packets to reestablish the neighbor relationship, synchronizes LSDBs, and recalculates
routes. In this process, a large number of packets are exchanged, adversely affecting neighbor
relationship stability, OSPF services, and other OSPF-dependent services, such as LDP and
BGP. Suppression of OSPF neighbor relationship flapping can address this problem by
delaying OSPF neighbor relationship reestablishment or preventing service traffic from
passing through flapping links.

Pre-configuration Tasks
Before configuring OSPF neighbor relationship flapping suppression, complete the following
tasks:
l Configuring an IP address for each interface to ensure that neighboring routers are
reachable at the network layer
l Configuring basic OSPF functions

Procedure
Step 1 Run system-view
The system view is displayed.
By default, suppression of OSPF neighbor relationship flapping is enabled globally. To
disable this function globally, run the suppress-flapping peer disable command in the OSPF
view.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
To disable this function on a specified interface, run the ospf suppress-flapping peer disable
command in the interface view.
Step 3 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ospf suppress-flapping peer hold-down interval


The Hold-down mode is configured, and its duration is set.
Flapping suppression works in either Hold-down or Hold-max-cost mode.
l Hold-down mode: In the case of frequent flooding and topology changes during neighbor
relationship establishment, interfaces prohibit neighbor relationship reestablishment

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 276


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

during Hold-down suppression, which minimizes LSDB synchronization attempts and


packet exchanges.
l Hold-max-cost mode: If the traffic forwarding path changes frequently, interfaces use the
maximum value 65535 as the cost of the flapping link during Hold-max-cost
suppression, which prevents traffic from passing through the flapping link.
Flapping suppression can work first in Hold-down mode and then in Hold-max-cost mode
after the Hold-down mode exits.
By default, the Hold-down mode is disabled, and the Hold-max-cost mode is enabled.
To disable the Hold-max-cost mode, run the ospf suppress-flapping peer hold-max-cost
disable command.
Step 5 Run ospf suppress-flapping peer { detecting-interval detecting-interval | threshold
threshold | resume-interval resume-interval } *
Detection parameters are configured for suppressing OSPF neighbor relationship flapping.
l The parameter resume-interval resume-interval specifies the interval for exiting the
suppression of OSPF neighbor relationship flapping.
If the interval between two successive neighbor status changes from Full to ExStart or
Down is longer than resume-interval, the flapping_count is reset to 0.
l If flapping suppression works in Hold-max-cost mode, resume-interval indicates the
duration of this mode.
NOTE

The value of resume-interval must be greater than that of detecting-interval.

Flapping suppression detection parameters can be set based on the network requirements on a
specified interface. By default, the detection interval of flapping suppression is 60s, the
suppression threshold is 10, and the interval for exiting suppression is 120s. Default values
are recommended for the detection parameters.
Step 6 Run commit
The configuration is committed.
----End

Verifying the Configuration


Run the display ospf [ process-id ] interface interface-type interface-number verbose
command to check the status of OSPF neighbor relationship flapping suppression.

5.18 Configuring the OSPF GR Helper

Applicable Environment
Graceful Restart (GR) is a technology used to ensure normal traffic forwarding and non-stop
forwarding of key services during the restart of routing protocols. GR is one of high
availability (HA) technologies, comprising a set of comprehensive techniques, such as fault-
tolerant redundancy, link protection, faulty node recovery, and traffic engineering. As a fault-
tolerant redundancy technology, GR is widely used to ensure non-stop forwarding of key
services during active/standby switchover and system upgrade.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 277


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

NOTE

The CE8800, CE7800, CE6800, and CE5800 series switches support only the GR Helper role.

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

l Configuring IP addresses for interfaces to ensure that neighboring nodes are reachable at
the network layer
l Configuring basic OSPF functions

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.

Opaque LSAs provide the following generic mechanisms for OSPF extension:
l OSPF uses Type 9 LSAs to support GR.
l OSPF uses Type 10 LSAs to support TE.

Therefore, before configuring OSPF GR, you need to enable the opaque LSA capability using
the opaque-capability enable command.

Step 4 Rungraceful-restart [ helper-role { { { { ip-prefix ip-prefix-name | acl-number acl-number


| acl-name acl-name } | ignore-external-lsa | planned-only } * } | never } ]

The GR session parameters are set on the Helper.

l The ACL parameters and ip-prefix parameters are used to configure a filtering policy so
that the local switch can enter the Helper mode only after the neighbor passes the
filtering criteria defined in the policy.
l If the parameter ignore-external-lsa is specified, the Helper does not check AS-external
LSAs. By default, the Helper checks AS-external LSAs.
l If parameter planned-only is specified, the Helper supports only planned GR. By
default, the Helper supports both planned GR and unplanned GR.
l If the parameter never is specified, the switch does not support the Helper mode.

----End

Verifying the Configuration


Run the display ospf [ process-id ] graceful-restart [ verbose ] command to check the OSPF
GR status.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 278


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

5.19 Improving Stability of an OSPF Network

Applicable Environment
By configuring timers, you can reduce the number of unnecessary packets transmitted on a
network and reduce the load on devices to improve the network performance.

Pre-configuration Tasks
Before improving stability of an OSPF network, complete the following task:

Configuring basic OSPF functions

Configuration Procedure
Perform one or more of the following configuration tasks (excluding the task of Verifying the
OSPF Network Stability Optimization Configuration) as required.

5.19.1 Setting the Preference of OSPF Routes

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ospf [ process-id ]

The OSPF process view is displayed.

Step 3 Run preference [ ase | inter | intra ] { preference | route-policy route-policy-name } *

The preference of OSPF routes is set.

l The parameter ase is used to set the preference of AS-external routes.


l The parameter
inter is used to set the preference of inter-area routes.
l The parameter
intra is used to set the preference of intra-area routes.
l The parameter preference specifies the preference of OSPF routes. A smaller value of
preference indicates a higher preference.
l The parameter route-policy route-policy-name indicates that a routing policy is used to
set the preference of specified routes.

By default, the preference of OSPF routes is 10. When the parameter ase is specified, the
default preference of AS-external routes is 150.

Step 4 Run commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 279


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

The configuration is committed.

----End

5.19.2 Configuring the Delay in Transmitting LSAs on an


Interface

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The OSPF interface view is displayed.
Step 3 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ospf trans-delay interval


The delay in transmitting LSAs is set on the interface.
By default, the delay is 1s.
Step 5 Run commit
The configuration is committed.

----End

5.19.3 Configuring the Interval for Retransmitting LSAs

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 280


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

The OSPF interface view is displayed.


Step 3 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ospf timer retransmit interval


The interval for retransmitting LSAs between adjacencies is set.
By default, the interval is 5s.

NOTE

You are not advised to set the interval for retransmitting LSAs between adjacencies to a small value.
Generally, the interval needs to be greater than the round trip time of a packet transmitted between two
adjacencies. Otherwise, certain LSAs are retransmitted unnecessarily.

Step 5 Run commit


The configuration is committed.

----End

5.19.4 Configuring Secure Synchronization

Context
When devices in an area just finish synchronizing the LSDBs, the LSDBs are still different
from each other. As a result, route flapping occurs. You can configure secure synchronization
to solve this problem. This, however, may delay the establishment of OSPF adjacencies.

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 safe-sync enable
Secure synchronization is configured.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 281


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Step 4 Run commit


The configuration is committed.

----End

5.19.5 Configuring a Stub Router

Context
A stub router is used to control traffic and instructs other OSPF routers not to use it to forward
data. Other OSPF routers can have a route to the stub router.
In the Router LSAs generated by a stub router, the costs of all links are set to the maximum
value (65535).

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ospf [ process-id ]
The OSPF process view is displayed.
Step 3 Run stub-router [ on-startup [ interval ] ]
A stub router is configured.
The parameter on-startup [ interval ] specifies the interval during which the switch acts as a
stub router. By default, the interval is 500 seconds.

NOTE

A stub router configured using this command bears no similarity to a switch in a stub area.

Step 4 Run commit


The configuration is committed.

----End

5.19.6 Prohibiting an OSPF Interface from Sending and Receiving


Protocol Packets

Context
To prevent devices on other networks from obtaining local OSPF routing information, and to
prevent the local device from receiving the routing update information advertised by other
devices on the same network, you can prohibit an OSPF interface from sending and receiving
protocol packets.
After an OSPF interface is prohibited from sending and receiving OSPF packets, the interface
can still advertise its direct routes, but not Hello packets. Therefore, no neighbor relationship
can be set up between the device and other devices through this interface.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 282


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

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 silent-interface { all | interface-type interface-number }

The OSPF interface is prohibited from sending and receiving OSPF packets.

By default, an interface is allowed to send and receive OSPF packets.

You can prohibit an interface from sending and receiving OSPF packets in different OSPF
processes, but the silent-interface command is valid only for the OSPF interface in the local
process.

----End

5.19.7 Verifying the OSPF Network Stability Optimization


Configuration

Prerequisites
All configuration of improving the stability of an OSPF network is complete.

Procedure
l Run the display ospf [ process-id ] brief command to check OSPF brief information.
l Run the display ip routing-table command to check OSPF routing table information.

----End

5.20 Improving Security of an OSPF Network

Applicable Environment
With the increase in attacks on TCP/IP networks and the defects in the TCP/IP protocol suite,
network attacks have an increasingly great impact on the network security. Especially, attacks
on network devices will cause the crash of the network. By configuring GTSM and
authentication, you can improve the security of an OSPF network.

The CE8800, CE7800, CE6800, and CE5800 series switches support the following
authentication modes:
l Simple authentication
l MD5 authentication
l HMAC-MD5 authentication
l Keychain authentication

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 283


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

NOTE

The CE8800, CE7800, CE6800, and CE5800 series switches support OSPF GTSM. For details about
OSPF GTSM, see the CloudEngine 8800, 7800, 6800, and 5800 Series Switches Configuration Guide -
Security.

Pre-configuration Tasks
Before improving security of an OSPF network, complete the following tasks:
l Configuring IP addresses for interfaces to ensure that neighboring nodes are reachable at
the network layer
l Configuring basic OSPF functions

Configuration Procedure
Perform one or more of the following configuration tasks (excluding the task of Verifying the
OSPF Network Security Optimization Configuration) as required.

5.20.1 Configuring OSPF GTSM

Context
To apply GTSM, you need to enable GTSM on both ends of an OSPF connection.
The valid TTL range of packets is [255 -hops + 1, 255].
GTSM checks the TTL values of only the packets that match the GTSM policy. For the
packets that do not match the GTSM policy, you can configure the policy to pass or drop
them. If the default action on such packets is set to drop, you need to configure all switch
connections in the GTSM policy. If packets sent from a switch do not match the GTSM
policy, they are dropped, and thereby no connection can be established. This ensures security
but reduces the ease of use.
You can enable the log function to record the information about dropped packets to facilitate
fault locating.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ospf valid-ttl-hops hops [ nonstandard-multicast ] [ vpn-instance vpn-instance-name ]
OSPF GTSM is configured.

NOTE

The ospf valid-ttl-hops command has two functions:


l Enabling OSPF GTSM
l Configuring the valid TTL range
The parameter vpn-instance is valid only for the latter function.
Therefore, if only a private network policy or only a public network policy is configured, you are
advised to set the default action to be performed on the packets that do not match the GTSM policy to
pass. This prevents the OSPF packets of other processes from being discarded incorrectly.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 284


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Step 3 Run commit

The configuration is committed.

----End

5.20.2 Configuring the Area Authentication Mode

Context
In area authentication, all switches in an area must use the same authentication mode and
password. For example, all devices in Area 0 use simple authentication and the password of
abc.

If plain is selected in the area authentication configuration, the password is stored in plain
text in the configuration file, which brings security risks. It is recommended that you select
cipher to store the password in cipher text.
Simple authentication, MD5 authentication, and HMAC-MD5 cipher text authentication have
potential security risks. HMAC-SHA256 cipher text authentication is recommended.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ospf [ process-id ]

The OSPF process view is displayed.

Step 3 Run area area-id

The OSPF area view is displayed.

Step 4 Run any of the following commands to configure an authentication mode of the OSPF area as
required:
l Run authentication-mode simple [ plain plain-text | [ cipher ] cipher-text ]
Simple authentication is configured for the OSPF area.
– plain: indicates that the password is stored in plain text.
– cipher: indicates that the password is stored in cipher text. In MD5 or HMAC-MD5
authentication, the password is stored in cipher text by default.
l Run authentication-mode { md5 | hmac-md5 | hmac-sha256 } [ key-id { plain plain-
text | [ cipher ] cipher-text } ]
The specified authentication mode is configured for the OSPF area.
– md5: indicates the MD5 cipher text authentication mode.
– hmac-md5: indicates the HMAC-MD5 cipher text authentication mode.
– hmac-sha256: indicates the HMAC-SHA256 cipher text authentication mode.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 285


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

– key-id: specifies the ID of the authentication key.


l Run authentication-mode keychain keychain-name
Keychain authentication is configured for the OSPF area.
NOTE

Before using keychain authentication, you need to configure keychain information in the system
view. To establish an OSPF neighbor relationship, you need to ensure that key-id, algorithm, and
key-string in the local ActiveSendKey are the same as those in the remote ActiveRecvKey.

Step 5 Run commit


The configuration is committed.

----End

5.20.3 Configuring the Interface Authentication Mode

Context
Interface authentication, using an authentication mode and a password, is performed among
neighboring switches. The priority of interface authentication is higher than that of area
authentication.

If plain is selected in the interface authentication configuration, the password is stored in


plain text in the configuration file, which brings security risks. It is recommended that you
select cipher to store the password in cipher text.
Simple authentication, MD5 authentication, and HMAC-MD5 cipher text authentication have
potential security risks. HMAC-SHA256 cipher text authentication is recommended.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The OSPF interface view is displayed.
Step 3 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 286


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run any of the following commands to configure an interface authentication mode as
required:
l Run ospf authentication-mode simple [ plain plain-text | [ cipher ] cipher-text ]
Simple authentication is configured for the OSPF interface.
– simple: indicates simple authentication.
– plain: indicates that the password is stored in plain text. In simple authentication,
the password is stored in plain text by default.
– cipher: indicates that the password is stored in cipher text. In MD5 or HMAC-MD5
authentication, the password is stored in cipher text by default.
l Run ospf authentication-mode { md5 | hmac-md5 | hmac-sha256 } [ key-id { plain
plain-text | [ cipher ] cipher-text } ]
The specified authentication mode is configured for the OSPF interface.
– md5: indicates the MD5 cipher text authentication mode.
– hmac-md5: indicates the HMAC-MD5 cipher text authentication mode.
– hmac-sha256: indicates the HMAC-SHA256 cipher text authentication mode.
l Run ospf authentication-mode null
No authentication is performed on the OSPF interface.
l Run ospf authentication-mode keychain keychain-name
Keychain authentication is configured for the OSPF interface.
NOTE

Before using keychain authentication, you need to configure keychain information in the system
view. To establish an OSPF neighbor relationship, you need to ensure that key-id, algorithm, and
key-string in the local ActiveSendKey are the same as those in the remote ActiveRecvKey.

Step 5 Run commit

The configuration is committed.

----End

5.20.4 Verifying the OSPF Network Security Optimization


Configuration

Prerequisites
All configuration of improving the security of an OSPF network is complete.

Procedure
l Run the display ospf [ process-id ] brief command to check the packet authentication
information.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 287


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

5.21 Configuring the Network Management Function of


OSPF

Applicable Environment
Through the Simple Network Management Protocol (SNMP), the OSPF Management
Information Base (MIB) manages multicast information exchanged between the NMS and
agents.

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

l Configuring a link layer protocol


l Configuring IP addresses for interfaces to ensure that neighboring nodes are reachable at
the network layer
l Configuring basic OSPF functions

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run ospf mib-binding process-id

The OSPF process is bound to the MIB.

Step 3 Run commit

The configuration is committed.

----End

Verifying the Configuration


l Run the display ospf [ process-id ] brief command to check brief information about the
binding between the OSPF process and the MIB.

5.22 Maintaining OSPF

5.22.1 Clearing OSPF Information

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 288


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Context

OSPF information cannot be restored after you clear it. Therefore, confirm the action before
you use the commands.

To clear OSPF information, run the following reset commands in the user view.

Procedure
l Run the reset ospf [ process-id ] counters [ neighbor [ interface-type interface-number ]
[ router-id ] ] command to reset OSPF counters.
– The parameter counters is used to clear OSPF counters.
– The parameter neighbor specifies neighbor information on a specified interface.
l Run the reset ospf [ process-id ] counters maxage-lsa command to delete the counter
statistics about router LSAs that have aged.
l Run the reset ospf [ process-id ] redistribution command in the user view to re-import
routes.
l Run the reset gtsm statistics { all | slot-id } command in the user view to clear the
GTSM statistics on the device.
l Run the reset ospf [ process-id ] frr command in the user view to perform OSPF IP FRR
calculation again.
l Run the reset ospf process-id suppress-flappingpeer [ interface-type interface-number ]
[ notify-peer command to force the interface to exit OSPF neighbor relationship
flapping suppression.
NOTE

An interface exits flapping suppression in any of following scenarios:


l The suppression timer expires.
l The corresponding OSPF process is reset.
l An OSPF neighbor is restarted using the reset ospf peer command.
l OSPF neighbor relationship flapping suppression is disabled globally using the suppress-
flapping peer disable command in the OSPF view.
l The interface is forced to exit flapping suppression using the reset ospf suppress-flapping
peer command.
If notify-peer is specified in the reset ospf suppress-flapping peer command run on a device, the
device sends Hello packets with HelloInterval and RouterDeadInterval being 0s to its neighbors
to instruct them to exit OSPF neighbor relationship flapping suppression too. If the neighbors fail
to receive such Hello packets, the function of notify-peer does not take effect. To force the
neighbors to exit OSPF neighbor relationship flapping suppression, run the reset ospf suppress-
flapping peer command on them.
l Run the reset ospf [ process-id ] peer [ interface-type interface-number ] router-id
command to restart OSPF neighbors.

----End

5.22.2 Resetting OSPF Information

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 289


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Context

Running the reset ospf command will tear down OSPF adjacencies between switches.
Therefore, confirm the action before you use the command.

To reset OSPF connections, run the following reset command in the user view.

Procedure
l Run the reset ospf [ process-id ] process command in the user view to restart the OSPF
process.
----End

5.23 Configuration Examples for OSPF


This section only provides configuration examples for individual features. For details about
multi-feature configuration examples, feature-specific configuration examples, interoperation
examples, protocol or hardware replacement examples, and industry application examples, see
the Typical Configuration Examples.

5.23.1 Example for Configuring Basic OSPF Functions

Networking Requirements
As shown in Figure 5-25, all switches run OSPF, and the entire AS is partitioned into three
areas. Switch A and Switch B function as ABRs to forward routes between areas.
After the configuration is complete, each switch should learn the routes to all network
segments in the AS.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 290


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Figure 5-25 Networking diagram for configuring basic OSPF functions


Area0
10GE1/0/1
VLANIF10
[Link]/24
SwitchA 10GE1/0/1 SwitchB
10GE1/0/2 10GE1/0/2
VLANIF10
VLANIF20 VLANIF30
[Link]/24
[Link]/24 [Link]/24
10GE1/0/1 10GE1/0/1
VLANIF20 VLANIF30
[Link]/24 [Link]/24
SwitchC SwitchD
10GE1/0/2 10GE1/0/2
VLANIF40 VLANIF50
[Link]/24 [Link]/24
10GE1/0/1 10GE1/0/1
VLANIF40 VLANIF50
[Link]/24 [Link]/24
SwitchE SwitchF
Area1 Area2

Configuration Roadmap
The configuration roadmap is as follows:
1. Enable OSPF on each switch.
2. Specify network segments in different areas.

Procedure
Step 1 Assign an IP address to each interface. The configuration details are not mentioned here.

Step 2 Configure basic OSPF functions.


# Configure Switch A.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] router id [Link]
[*SwitchA] ospf 1
[*SwitchA-ospf-1] area 0
[*SwitchA-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchA-ospf-1-area-[Link]] quit
[*SwitchA-ospf-1] area 1
[*SwitchA-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchA-ospf-1-area-[Link]] quit
[*SwitchA-ospf-1] commit
[~SwitchA-ospf-1] quit

# Configure Switch B.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 291


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

<HUAWEI> system-view
[~HUAWEI] sysname SwitchB
[*HUAWEI] commit
[~SwitchB] router id [Link]
[*SwitchB] ospf 1
[*SwitchB-ospf-1] area 0
[*SwitchB-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchB-ospf-1-area-[Link]] quit
[*SwitchB-ospf-1] area 2
[*SwitchB-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchB-ospf-1-area-[Link]] quit
[*SwitchB-ospf-1] commit
[~SwitchB-ospf-1] quit

# Configure Switch C.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchC
[*HUAWEI] commit
[~SwitchC] router id [Link]
[*SwitchC] ospf 1
[*SwitchC-ospf-1] area 1
[*SwitchC-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchC-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchC-ospf-1-area-[Link]] commit
[~SwitchC-ospf-1-area-[Link]] quit
[~SwitchC-ospf-1] quit

# Configure Switch D.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchD
[*HUAWEI] commit
[~SwitchD] router id [Link]
[*SwitchD] ospf 1
[*SwitchD-ospf-1] area 2
[*SwitchD-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchD-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchD-ospf-1-area-[Link]] commit
[~SwitchD-ospf-1-area-[Link]] quit
[~SwitchD-ospf-1] quit

# Configure Switch E.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchE
[*HUAWEI] commit
[~SwitchE] router id [Link]
[*SwitchE] ospf 1
[*SwitchE-ospf-1] area 1
[*SwitchE-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchE-ospf-1-area-[Link]] commit
[~SwitchE-ospf-1-area-[Link]] quit
[~SwitchE-ospf-1] quit

# Configure Switch F.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchF
[*HUAWEI] commit
[~SwitchF] router id [Link]
[*SwitchF] ospf 1
[*SwitchF-ospf-1] area 2
[*SwitchF-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchF-ospf-1-area-[Link]] commit
[~SwitchF-ospf-1-area-[Link]] quit
[~SwitchF-ospf-1] quit

Step 3 Verify the configuration.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 292


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

# Display the OSPF neighbors of Switch A.


[~SwitchA] display ospf peer
OSPF Process 1 with Router ID [Link]
Area [Link] interface [Link](Vlanif10)'s neighbors
Router ID: [Link] Address : [Link]
State : Full Mode : Nbr is Master Priority: 1
DR : [Link] BDR : [Link] MTU : 0
Dead timer due (in seconds) : 36
Retrans timer interval : 5
Neighbor up time : 02h29m06s
Authentication Sequence : 0

Area [Link] interface [Link](Vlanif20)'s neighbors


Router ID: [Link] Address : [Link]
State : Full Mode : Nbr is Master Priority: 1
DR : [Link] BDR : [Link] MTU : 0
Dead timer due (in seconds) : 33
Retrans timer interval : 5
Neighbor up time : 02h28m52s
Authentication Sequence : 0

# Display the OSPF routing information on Switch A.


[~SwitchA] display ospf routing

OSPF Process 1 with Router ID [Link]

Routing for Network


--------------------------------------------------------------------------------
Destination Cost Type NextHop AdvRouter Area
[Link]/24 2 Transit [Link] [Link] [Link]

[Link]/24 3 Inter-area [Link] [Link] [Link]

[Link]/24 1 Direct [Link] [Link] [Link]

[Link]/24 1 Direct [Link] [Link] [Link]

[Link]/24 2 Inter-area [Link] [Link] [Link]

Total Nets: 5
Intra Area: 3 Inter Area: 2 ASE: 0 NSSA: 0

# Display the LSDB of Switch A.


[~SwitchA] display ospf lsdb

OSPF Process 1 with Router ID [Link]


Link State Database

Area: [Link]
Type LinkState ID AdvRouter Age Len Sequence Metric
Router [Link] [Link] 93 48 80000004 1
Router [Link] [Link] 92 48 80000004 1
Sum-Net [Link] [Link] 1287 28 80000002 2
Sum-Net [Link] [Link] 1716 28 80000001 1
Sum-Net [Link] [Link] 1336 28 80000001 2
Sum-Net [Link] [Link] 87 28 80000002 1

Area: [Link]
Type LinkState ID AdvRouter Age Len Sequence Metric
Router [Link] [Link] 1420 48 80000002 1
Router [Link] [Link] 1294 60 80000003 1
Router [Link] [Link] 1296 36 80000002 1
Network [Link] [Link] 1294 32 80000001 0
Sum-Net [Link] [Link] 1325 28 80000001 3
Sum-Net [Link] [Link] 1717 28 80000001 1
Sum-Net [Link] [Link] 1717 28 80000001 2

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 293


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

# Display the routing table on Switch D and perform the ping operation to test the
connectivity.
[~SwitchD] display ospf routing

OSPF Process 1 with Router ID [Link]

Routing for Network


--------------------------------------------------------------------------------
Destination Cost Type NextHop AdvRouter Area
[Link]/24 4 Inter-area [Link] [Link] [Link]

[Link]/24 1 Direct [Link] [Link] [Link]

[Link]/24 2 Inter-area [Link] [Link] [Link]

[Link]/24 3 Inter-area [Link] [Link] [Link]

[Link]/24 1 Direct [Link] [Link] [Link]

Total Nets: 5
Intra Area: 2 Inter Area: 3 ASE: 0 NSSA: 0
[~SwitchD] ping [Link]
PING [Link]: 56 data bytes, press CTRL_C to break
Reply from [Link]: bytes=56 Sequence=1 ttl=253 time=62 ms
Reply from [Link]: bytes=56 Sequence=2 ttl=253 time=16 ms
Reply from [Link]: bytes=56 Sequence=3 ttl=253 time=62 ms
Reply from [Link]: bytes=56 Sequence=4 ttl=253 time=94 ms
Reply from [Link]: bytes=56 Sequence=5 ttl=253 time=63 ms
--- [Link] ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 16/59/94 ms

----End

Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10 20
#
router id [Link]
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif20
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
ospf 1
area [Link]
network [Link] [Link]
area [Link]
network [Link] [Link]
#
return

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 294


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

l Configuration file of Switch B


#
sysname SwitchB
#
vlan batch 10 30
#
router id [Link]
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif30
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
ospf 1
area [Link]
network [Link] [Link]
area [Link]
network [Link] [Link]
#
return

l Configuration file of Switch C


#
sysname SwitchC
#
vlan batch 20 40
#
router id [Link]
#
interface Vlanif20
ip address [Link] [Link]
#
interface Vlanif40
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
ospf 1
area [Link]
network [Link] [Link]
network [Link] [Link]
#
return

l Configuration file of Switch D


#
sysname SwitchD
#
vlan batch 30 50
#
router id [Link]
#
interface Vlanif30
ip address [Link] [Link]

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 295


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

#
interface Vlanif50
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 50
#
ospf 1
area [Link]
network [Link] [Link]
network [Link] [Link]
#
return

l Configuration file of Switch E


#
sysname SwitchE
#
vlan batch 40
#
router id [Link]
#
interface Vlanif40
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 40
#
ospf 1
area [Link]
network [Link] [Link]
#
return

l Configuration file of Switch F


#
sysname SwitchF
#
vlan batch 50
#
router id [Link]
#
interface Vlanif50
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 50
#
ospf 1
area [Link]
network [Link] [Link]
#
return

5.23.2 Example for Configuring OSPF Stub Areas

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 296


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Networking Requirements
As shown in Figure 5-26, all switches run OSPF, and the entire AS is partitioned into three
areas. Switch A and Switch B function as ABRs to advertise routes between areas; Switch D
functions as the ASBR to import external routes (static routes).
It is required to configure Area 1 as a stub area to reduce the LSAs advertised to this area,
which is expected not to affect the route reachability.

Figure 5-26 Networking diagram for configuring an OSPF stub area


Area0
10GE1/0/1
VLANIF10
[Link]/24
SwitchA 10GE1/0/1 SwitchB
10GE1/0/2 10GE1/0/2
VLANIF10
VLANIF20 VLANIF30
[Link]/24
[Link]/24 [Link]/24
10GE1/0/1 10GE1/0/1
VLANIF20 VLANIF30
[Link]/24 [Link]/24
SwitchC SwitchD
10GE1/0/2 10GE1/0/2
Stub VLANIF40 VLANIF50
ASBR
[Link]/24 [Link]/24
10GE1/0/1 10GE1/0/1
VLANIF40 VLANIF50
[Link]/24 [Link]/24
SwitchE SwitchF
Area1 Area2

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic OSPF functions on each switch to realize interconnection.
2. Configure static routes on Switch D and import them into OSPF.
3. Configure Area 1 as a stub area by running the stub command on all switches in Area 1,
and check the OSPF routing information on Switch C.
4. Disable Switch A from advertising Type 3 LSAs to the stub area, and check the OSPF
routing information on Switch C.

Procedure
Step 1 Assign an IP address to each interface. The configuration details are not mentioned here.
Step 2 Configure basic OSPF functions. For details, see 5.23.1 Example for Configuring Basic
OSPF Functions.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 297


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Step 3 Configure static routes on Switch D and import them into OSPF.
[~SwitchD] ip route-static [Link] 24 null 0
[*SwitchD] ospf 1
[*SwitchD-ospf-1] import-route static type 1
[*SwitchD-ospf-1] commit
[~SwitchD-ospf-1] quit

# Display ABR and ASBR information on Switch C.


[~SwitchC] display ospf abr-asbr
OSPF Process 1 with Router ID [Link]
Routing Table to ABR and ASBR
Type Destination Area Cost NextHop RtType
Intra-area [Link] [Link] 1 [Link] ABR
Inter-area [Link] [Link] 3 [Link] ASBR

# Display the OSPF routing table on Switch C.

NOTE

If Switch C resides in a common area, external routes exist in the routing table.
[~SwitchC] display ospf routing

OSPF Process 1 with Router ID [Link]

Routing for Network


--------------------------------------------------------------------------------
Destination Cost Type Next-Hop AdvRouter Area
[Link]/24 1 Direct [Link] [Link]
[Link]

[Link]/24 4 Inter-area [Link] [Link]


[Link]

[Link]/24 2 Inter-area [Link] [Link]


[Link]

[Link]/24 1 Direct [Link] [Link]


[Link]

[Link]/24 3 Inter-area [Link] [Link]


[Link]

Routing for ASEs


--------------------------------------------------------------------------------
Destination Cost Type Tag NextHop AdvRouter
[Link]/24 4 Type1 1 [Link] [Link]

Total Nets: 6
Intra Area: 2 Inter Area: 3 ASE: 1 NSSA: 0

Step 4 Configure Area 1 as a stub area.


# Configure Switch A.
[~SwitchA] ospf 1
[*SwitchA-ospf-1] area 1
[*SwitchA-ospf-1-area-[Link]] stub
[*SwitchA-ospf-1-area-[Link]] commit
[~SwitchA-ospf-1-area-[Link]] quit
[~SwitchA-ospf-1] quit

# Configure Switch C.
[~SwitchC] ospf 1
[*SwitchC-ospf-1] area 1
[*SwitchC-ospf-1-area-[Link]] stub
[*SwitchC-ospf-1-area-[Link]] commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 298


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

[~SwitchC-ospf-1-area-[Link]] quit
[~SwitchC-ospf-1] quit

# Configure Switch E.
[~SwitchE] ospf 1
[*SwitchE-ospf-1] area 1
[*SwitchE-ospf-1-area-[Link]] stub
[*SwitchE-ospf-1-area-[Link]] commit
[~SwitchE-ospf-1-area-[Link]] quit
[~SwitchE-ospf-1] quit

# Display the routing table on Switch C.

NOTE

After the area where Switch C resides is configured as a stub area, a default route exists in the routing
table, and no AS external route exists in the routing table.
[~SwitchC] display ospf routing

OSPF Process 1 with Router ID [Link]

Routing for Network


--------------------------------------------------------------------------------
Destination Cost Type Next-Hop AdvRouter Area
[Link]/0 2 Inter-area [Link] [Link] [Link]

[Link]/24 1 Direct [Link] [Link]


[Link]

[Link]/24 4 Inter-area [Link] [Link]


[Link]

[Link]/24 2 Inter-area [Link] [Link]


[Link]

[Link]/24 1 Direct [Link] [Link]


[Link]

[Link]/24 3 Inter-area [Link] [Link]


[Link]

Total Nets: 6
Intra Area: 2 Inter Area: 4 ASE: 0 NSSA: 0

Step 5 # Disable Switch A from advertising Type 3 LSAs to the stub area.
[~SwitchA] ospf
[*SwitchA-ospf-1] area 1
[*SwitchA-ospf-1-area-[Link]] stub no-summary
[*SwitchA-ospf-1-area-[Link]] commit
[~SwitchA-ospf-1-area-[Link]] quit

Step 6 Verify the configuration.


# Display the OSPF routing table on Switch C.
[~SwitchC] display ospf routing

OSPF Process 1 with Router ID [Link]

Routing for Network


--------------------------------------------------------------------------------
Destination Cost Type Next-Hop AdvRouter Area
[Link]/0 2 Inter-area [Link] [Link]
[Link]

[Link]/24 1 Direct [Link] [Link]


[Link]

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 299


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

[Link]/24 1 Direct [Link] [Link]


[Link]

Total Nets: 3
Intra Area: 2 Inter Area: 1 ASE: 0 NSSA: 0

NOTE

After the advertisement of summary LSAs to the stub area is disabled, the routing entries on devices in
the stub area are further reduced, and only a default route to a destination outside the stub area is
reserved.

----End

Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10 20
#
router id [Link]
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif20
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
ospf 1
area [Link]
network [Link] [Link]
area [Link]
network [Link] [Link]
stub no-summary
#
return

NOTE

Configuration files of Switch B and Switch F are similar to the configuration file of Switch A, and
are not mentioned here.
l Configuration file of Switch C
#
sysname SwitchC
#
vlan batch 20 40
#
router id [Link]
#
interface Vlanif20
ip address [Link] [Link]
#
interface Vlanif40
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 300


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
ospf 1
area [Link]
network [Link] [Link]
network [Link] [Link]
stub
#
return

l Configuration file of Switch D


#
sysname SwitchD
#
vlan batch 30 50
#
router id [Link]
#
interface Vlanif30
ip address [Link] [Link]
#
interface Vlanif50
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 50
#
ospf 1
import-route static type 1
area [Link]
network [Link] [Link]
network [Link] [Link]
#
ip route-static [Link] [Link] NULL0
#
return

l Configuration file of Switch E


#
sysname SwitchE
#
vlan batch 40
#
router id [Link]
#
interface Vlanif40
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 40
#
ospf 1
area [Link]
network [Link] [Link]
stub
#
return

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 301


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

5.23.3 Example for Configuring OSPF NSSAs

Networking Requirements
As shown in Figure 5-27, OSPF is enabled on all Switches and the AS is divided into three
areas. Switch A and Switch B function as ABRs to advertise routes between areas; Switch D
functions as the ASBR to import external routes (static routes).

It is required to configure Area 1 as an NSSA and configure Switch C as an ASBR to import


external routes (static routes). In addition, the routing information needs to be transmitted
correctly in the AS.

Figure 5-27 Networking diagram for configuring an NSSA

Area0
10GE1/0/1
VLANIF10
[Link]/24
SwitchA 10GE1/0/1 SwitchB
10GE1/0/2 10GE1/0/2
VLANIF10
VLANIF20 VLANIF30
[Link]/24
[Link]/24 [Link]/24
10GE1/0/1 10GE1/0/1
VLANIF20 VLANIF30
[Link]/24 [Link]/24
SwitchC SwitchD
10GE1/0/2 10GE1/0/2
NSSA VLANIF40 VLANIF50
ASBR
[Link]/24 [Link]/24
10GE1/0/1 10GE1/0/1
VLANIF40 VLANIF50
[Link]/24 [Link]/24
SwitchE SwitchF
Area1 Area2

Configuration Roadmap
The configuration roadmap is as follows:

1. Enable OSPF on each Switch and configure basic OSPF functions.


2. Configure static routes on Switch D and import them into OSPF.
3. Configure Area 1 as an NSSA and check the OSPF routing information on Switch C.
You need to run the nssa command on all devices in Area 1.
4. Configure static routes on Switch C, import them into OSPF, and check the OSPF
routing information on Switch D.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 302


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Procedure
Step 1 Configure the VLAN for each interface.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan batch 10 20
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 20
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit

The configurations of Switch B, Switch C, Switch D, Switch E, and Switch F are similar to
the configuration of Switch A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ip address [Link] 24
[*SwitchA-Vlanif10] quit
[*SwitchA] interface vlanif 20
[*SwitchA-Vlanif20] ip address [Link] 24
[*SwitchA-Vlanif20] quit
[*SwitchA] commit

The configurations of Switch B, Switch C, Switch D, Switch E, and Switch F are similar to
the configuration of Switch A, and are not mentioned here.
Step 3 Configure basic OSPF functions. For details, see 5.23.1 Example for Configuring Basic
OSPF Functions.
Step 4 Configure Switch D to import static routes. For details, see 5.23.2 Example for Configuring
OSPF Stub Areas.
Step 5 Configure Area 1 as an NSSA.
# Configure Switch A.
[~SwitchA] ospf
[*SwitchA-ospf-1] area 1
[*SwitchA-ospf-1-area-[Link]] nssa default-route-advertise no-summary
[*SwitchA-ospf-1-area-[Link]] quit
[*SwitchA-ospf-1] quit
[*SwitchA] commit

# Configure Switch C.
[~SwitchC] ospf
[*SwitchC-ospf-1] area 1
[*SwitchC-ospf-1-area-[Link]] nssa
[*SwitchC-ospf-1-area-[Link]] quit
[*SwitchC-ospf-1] quit
[*SwitchC] commit

# Configure Switch E.
[~SwitchE] ospf
[*SwitchE-ospf-1] area 1
[*SwitchE-ospf-1-area-[Link]] nssa
[*SwitchE-ospf-1-area-[Link]] quit
[*SwitchE-ospf-1] quit
[*SwitchE] commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 303


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

NOTE

You are advised to specify the default-route-advertise and no-summary keywords in the nssa
command run on the ABR (Switch A) to reduce the entries in the routing table of devices in the NSSA.
On other devices in the NSSA, you need to run only the nssa command without specifying the two
keywords.

# Display the OSPF routing table on Switch C.


[~SwitchC] display ospf routing

OSPF Process 1 with Router ID [Link]

Routing for Network


-----------------------------------------------------------------------------
Destination Cost Type NextHop AdvRouter Area
[Link]/0 2 Inter-area [Link] [Link] [Link]

[Link]/24 1 Direct [Link] [Link] [Link]

[Link]/24 1 Direct [Link] [Link] [Link]

Total Nets: 3
Intra Area: 2 Inter Area: 1 ASE: 0 NSSA: 0

Step 6 Configure static routes on Switch C and import them into OSPF.

# Import static routes on Switch C.


[~SwitchC] ip route-static [Link] 8 null 0
[*SwitchC] ospf
[*SwitchC-ospf-1] import-route static
[*SwitchC-ospf-1] quit
[*SwitchC] commit

Step 7 Verify the configuration.

# Display the OSPF routing table on Switch D.


[~SwitchD] display ospf routing

OSPF Process 1 with Router ID [Link]

Routing for Network


----------------------------------------------------------------------------
Destination Cost Type NextHop AdvRouter Area
[Link]/24 4 Inter-area [Link] [Link] [Link]

[Link]/24 1 Direct [Link] [Link] [Link]

[Link]/24 2 Inter-area [Link] [Link] [Link]

[Link]/24 3 Inter-area [Link] [Link] [Link]

[Link]/24 1 Direct [Link] [Link] [Link]

Routing for ASEs


-----------------------------------------------------------------------------
Destination Cost Type Tag NextHop AdvRouter
[Link]/8 1 Type2 1 [Link] [Link]

Total Nets: 6
Intra Area: 2 Inter Area: 3 ASE: 1 NSSA: 0

In the routing table on Switch D, you can find that an AS external route is imported to the
NSSA.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 304


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10 20
#
router id [Link]
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif20
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
ospf 1
area [Link]
network [Link] [Link]
area [Link]
network [Link] [Link]
nssa default-route-advertise no-summary
#
return

NOTE

Configuration files of Switch B, Switch D, and Switch F are similar to the configuration file of
Switch A, and are not mentioned here.
l Configuration file of Switch C
#
sysname SwitchC
#
vlan batch 20 40
#
router id [Link]
#
interface Vlanif20
ip address [Link] [Link]
#
interface Vlanif40
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
ospf 1
import-route static
area [Link]
network [Link] [Link]
network [Link] [Link]
nssa
#
ip route-static [Link] [Link] NULL0

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 305


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

#
return

l Configuration file of Switch E


#
sysname SwitchE
#
vlan batch 40
#
router id [Link]
#
interface Vlanif40
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 40
#
ospf 1
area [Link]
network [Link] [Link]
nssa
#
return

5.23.4 Example for Configuring DR Election of OSPF

Networking Requirements
As shown in Figure 5-28, Switch A has the highest priority of 100 on the network and is
elected as the DR; Switch C has the second highest priority of 2 and is elected as the BDR;
Switch B has a priority of 0 and therefore cannot be elected as the DR or BDR; Switch D is
not configured with a priority and therefore uses the default priority of 1.

Figure 5-28 Networking diagram for configuring DR election of an OSPF process


SwitchA SwitchB

10GE1/0/1 10GE1/0/1
VLANIF10 VLANIF10
[Link]/24 [Link]/24
10GE1/0/1 10GE1/0/1
VLANIF10 VLANIF10
[Link]/24 [Link]/24

SwitchC SwitchD

Configuration Roadmap
The configuration roadmap is as follows:

1. Configure the ID of the VLAN to which each interface belongs.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 306


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

2. Configure a VLANIF interface for each VLAN and assign an IP address to each
VLANIF interface.
3. Configure a router ID, enable OSPF, and specify network segments on each Switch.
4. Check the DR/BDR status of each Switch using its default DR priority.
5. Set the DR priority of the interface on each Switch and check the DR/BDR status on
each Switch.

Procedure
Step 1 Configure the VLAN for each interface.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan 10
[*SwitchA-vlan10] quit
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA] commit

The configurations of Switch B, Switch C, and Switch D are similar to the configuration of
Switch A, and are not mentioned here.
Step 2 Configure a VLANIF interface for each VLAN and assign an IP address to each VLANIF
interface.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ip address [Link] 24
[*SwitchA-Vlanif10] commit
[~SwitchA-Vlanif10] quit

The configurations of Switch B, Switch C, and Switch D are similar to the configuration of
Switch A, and are not mentioned here.
Step 3 Configure basic OSPF functions.
# Configure Switch A.
[~SwitchA] router id [Link]
[*SwitchA] ospf
[*SwitchA-ospf-1] area 0
[*SwitchA-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchA-ospf-1-area-[Link]] quit
[*SwitchA-ospf-1] quit
[*SwitchA] commit

# Configure Switch B.
[~SwitchB] router id [Link]
[*SwitchB] ospf
[*SwitchB-ospf-1] area 0
[*SwitchB-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchB-ospf-1-area-[Link]] quit
[*SwitchB-ospf-1] quit
[*SwitchB] commit

# Configure Switch C.
[~SwitchC] router id [Link]
[*SwitchC] ospf
[*SwitchC-ospf-1] area 0
[*SwitchC-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchC-ospf-1-area-[Link]] quit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 307


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

[*SwitchC-ospf-1] quit
[*SwitchC] commit

# Configure Switch D.
[~SwitchD] router id [Link]
[*SwitchD] ospf
[*SwitchD-ospf-1] area 0
[*SwitchD-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchD-ospf-1-area-[Link]] quit
[*SwitchD-ospf-1] quit
[*SwitchD] commit

# Display the neighbor information on Switch A to check the DR and BDR status.
[~SwitchA] display ospf peer

OSPF Process 1 with Router ID [Link]


Area [Link] interface [Link](Vlanif10)'s neighbors
Router ID: [Link] Address: [Link] GR State: Normal
State: Full Mode:Nbr is Master Priority: 1
DR: [Link] BDR: [Link] MTU: 0
Dead timer due in 32 sec
Neighbor is up for 00:00:00
Authentication Sequence: [~ 0 ]

Router ID: [Link] Address: [Link] GR State: Normal


State: Full Mode:Nbr is Master Priority: 1
DR: [Link] BDR: [Link] MTU: 0
Dead timer due in 37 sec
Neighbor is up for 00:04:06
Authentication Sequence: [~ 0 ]

Router ID: [Link] Address: [Link] GR State: Normal


State: Full Mode:Nbr is Master Priority: 1
DR: [Link] BDR: [Link] MTU: 0
Dead timer due in 37 sec
Neighbor is up for 00:03:53
Authentication Sequence: [~ 0 ]

As shown in the neighbor information on Switch A, the DR priority of Switch A is the default
value of 1 and its neighbor status indicates that Switch D functions as the DR and Switch C
functions as the BDR.

NOTE

When switches have the same DR priority, the switch with a higher router ID is elected as the DR. After
DR/BDR election is complete, a new switch cannot become the DR even if it has the highest DR
priority.

Step 4 Set the DR priority on each VLANIF interface.


# Configure Switch A.
[~SwitchA] interface Vlanif 10
[~SwitchA-Vlanif10] ospf dr-priority 100
[*SwitchA-Vlanif10] quit
[*SwitchA] commit

Configure Switch B.
[~SwitchB] interface Vlanif 10
[~SwitchB-Vlanif10] ospf dr-priority 0
[*SwitchB-Vlanif10] quit
[*SwitchB] commit

# Configure Switch C.
[~SwitchC] interface Vlanif 10
[~SwitchC-Vlanif10] ospf dr-priority 2

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 308


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

[*SwitchC-Vlanif10] quit
[*SwitchC] commit

# Check the DR/BDR status.


[~SwitchD] display ospf peer

OSPF Process 1 with Router ID [Link]


Area [Link] interface [Link](Vlanif10)'s neighbors
Router ID: [Link] Address: [Link] GR State: Normal
State: Full Mode:Nbr is Slave Priority: 100
DR: [Link] BDR: [Link] MTU: 0
Dead timer due in 31 sec
Neighbor is up for 00:11:17
Authentication Sequence: [~ 0 ]

Router ID: [Link] Address: [Link] GR State: Normal


State: Full Mode:Nbr is Slave Priority: 0
DR: [Link] BDR: [Link] MTU: 0
Dead timer due in 35 sec
Neighbor is up for 00:11:19
Authentication Sequence: [~ 0 ]

Router ID: [Link] Address: [Link] GR State: Normal


State: Full Mode:Nbr is Slave Priority: 2
DR: [Link] BDR: [Link] MTU: 0
Dead timer due in 33 sec
Neighbor is up for 00:11:15
Authentication Sequence: [~ 0 ]

NOTE

The DR priorities configured on interfaces do not take effect immediately.

Step 5 Restart the OSPF processes.

In the user view of each Switch, run the reset ospf 1 process command simultaneously to
restart the OSPF processes.

Step 6 Verify the configuration.

# Check the OSPF neighbor status.


[~SwitchD] display ospf peer

OSPF Process 1 with Router ID [Link]


Area [Link] interface [Link](Vlanif10)'s neighbors
Router ID: [Link] Address: [Link] GR State: Normal
State: Full Mode:Nbr is Slave Priority: 100
DR: [Link] BDR: [Link] MTU: 0
Dead timer due in 35 sec
Neighbor is up for 00:07:19
Authentication Sequence: [~ 0 ]

Router ID: [Link] Address: [Link] GR State: Normal


State: Full Mode:Nbr is Master Priority: 0
DR: [Link] BDR: [Link] MTU: 0
Dead timer due in 35 sec
Neighbor is up for 00:00:00
Authentication Sequence: [~ 0 ]

Router ID: [Link] Address: [Link] GR State: Normal


State: Full Mode:Nbr is Slave Priority: 2
DR: [Link] BDR: [Link] MTU: 0
Dead timer due in 37 sec
Neighbor is up for 00:07:17
Authentication Sequence: [~ 0 ]

# Check the OSPF interface status.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 309


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

[~SwitchA] display ospf interface

OSPF Process 1 with Router ID [Link]

Area: [Link] (MPLS TE not enabled)

Interface IP Address Type State Cost Pri


Vlanif10 [Link] Broadcast DR 1 1
[~SwitchB] display ospf interface

OSPF Process 1 with Router ID [Link]

Area: [Link] (MPLS TE not enabled)

Interface IP Address Type State Cost Pri


Vlanif10 [Link] Broadcast DROther 1 0

If all neighbors are in Full state, the local device establishes adjacencies with all its neighbors.
If a neighbor stays in 2-way state, neither the local device nor the neighbor is the DR or BDR,
and therefore they do not need to exchange LSAs.
If the OSPF interface of a device is in DROther state, the device is neither the DR nor the
BDR.

----End

Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10
#
router id [Link]
#
interface Vlanif10
ip address [Link] [Link]
ospf dr-priority 100
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
ospf 1
area [Link]
network [Link] [Link]
#
return

l Configuration file of Switch B


#
sysname SwitchB
#
vlan batch 10
#
router id [Link]
#
interface Vlanif10
ip address [Link] [Link]
ospf dr-priority 0
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 310


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

ospf 1
area [Link]
network [Link] [Link]
#
return

l Configuration file of Switch C


#
sysname SwitchC
#
vlan batch 10
#
router id [Link]
#
interface Vlanif10
ip address [Link] [Link]
ospf dr-priority 2
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
ospf 1
area [Link]
network [Link] [Link]
#
return

l Configuration file of Switch D


#
sysname SwitchD
#
vlan batch 10
#
router id [Link]
#
interface Vlanif10
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
ospf 1
area [Link]
network [Link] [Link]
#
return

5.23.5 Example for Configuring Load Balancing Among OSPF


Routes
Networking Requirements
As shown in Figure 5-29, the networking requirements are as follows:
l Switch A, Switch B, Switch C, and Switch D connect to each other through OSPF.
l Switch A, Switch B, Switch C, and Switch D belong to Area 0.
l Load balancing is configured so that the traffic from Switch A can be sent to Switch D
through Switch B or Switch C.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 311


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Figure 5-29 Networking diagram for configuring load balancing among OSPF routes
SwitchC
10GE1/0/1 10GE1/0/2
VLANIF10 VLANIF30
[Link]/24 [Link]/24
10GE1/0/1 10GE1/0/1
VLANIF10 VLANIF30
10GE1/0/3 [Link]/24
VLANIF50 [Link]/24
[Link]/24
SwitchA SwitchD
10GE1/0/3
10GE1/0/2 10GE1/0/2 VLANIF60
VLANIF20 VLANIF40 [Link]/24
[Link]/24 [Link]/24
10GE1/0/1 10GE1/0/2
VLANIF20 VLANIF40
[Link]/24 [Link]/24

SwitchB

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic OSPF functions on each Switch to implement interconnection.
2. Disable load balancing on Switch A and then check the routing table on Switch A.
3. (Optional) Set weights of equal-cost routes on Switch A.

Procedure
Step 1 Configure the VLAN for each interface.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan batch 10 20 50
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 20
[*SwitchA-10GE1/0/2] quit
[*SwitchA] interface 10ge 1/0/3
[*SwitchA-10GE1/0/3] port link-type trunk
[*SwitchA-10GE1/0/3] port trunk allow-pass vlan 50
[*SwitchA-10GE1/0/3] quit
[*SwitchA] commit

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

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 312


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

[*SwitchA-Vlanif10] quit
[*SwitchA] interface vlanif 20
[*SwitchA-Vlanif20] ip address [Link] 24
[*SwitchA-Vlanif20] quit
[*SwitchA] interface vlanif 50
[*SwitchA-Vlanif50] ip address [Link] 24
[*SwitchA-Vlanif50] quit
[*SwitchA] commit

The configurations of Switch B, Switch C, and Switch D are similar to the configuration of
Switch A, and are not mentioned here.
Step 3 Configure basic OSPF functions. For details, see 5.23.1 Example for Configuring Basic
OSPF Functions.
Step 4 Disable load balancing on Switch A.
[~SwitchA] ospf
[*SwitchA-ospf-1] maximum load-balancing 1
[*SwitchA-ospf-1] quit
[*SwitchA] commit

# View the routing table of Switch A.


[~SwitchA] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table: _public_
Destinations : 16 Routes : 16

Destination/Mask Proto Pre Cost Flags NextHop Interface

[Link]/24 Direct 0 0 D [Link] Vlanif10


[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/24 Direct 0 0 D [Link] Vlanif20
[Link]/32 Direct 0 0 D [Link] Vlanif20
[Link]/32 Direct 0 0 D [Link] Vlanif20
[Link]/8 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/24 Direct 0 0 D [Link] Vlanif50
[Link]/32 Direct 0 0 D [Link] Vlanif50
[Link]/32 Direct 0 0 D [Link] Vlanif50
[Link]/24 OSPF 10 3 D [Link] Vlanif10
[Link]/24 OSPF 10 2 D [Link] Vlanif10
[Link]/24 OSPF 10 2 D [Link] Vlanif20
[Link]/32 Direct 0 0 D [Link] InLoopBack0

As shown in the routing table, if the maximum number of equal-cost routes for load balancing
is set to 1, OSPF selects [Link] as the next hop to the destination network [Link].

NOTE

OSPF selects the next hop randomly among equal-cost routes.

Step 5 Restore the default number of equal-cost routes for load balancing on Switch A.
[~SwitchA] ospf
[*SwitchA-ospf-1] undo maximum load-balancing
[*SwitchA-ospf-1] quit
[*SwitchA] commit

# Display the routing table on Switch A.


[~SwitchA] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 313


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

relay, D - download to fib, T - to vpn-instance, B - black hole route


----------------------------------------------------------------------------
Routing Table: _public_
Destinations : 16 Routes : 17

Destination/Mask Proto Pre Cost Flags NextHop Interface

[Link]/24 Direct 0 0 D [Link] Vlanif10


[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/24 Direct 0 0 D [Link] Vlanif20
[Link]/32 Direct 0 0 D [Link] Vlanif20
[Link]/32 Direct 0 0 D [Link] Vlanif20
[Link]/8 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/24 Direct 0 0 D [Link] Vlanif50
[Link]/32 Direct 0 0 D [Link] Vlanif50
[Link]/32 Direct 0 0 D [Link] Vlanif50
[Link]/24 OSPF 10 3 D [Link] Vlanif10
OSPF 10 3 D [Link] Vlanif20
[Link]/24 OSPF 10 2 D [Link] Vlanif10
[Link]/24 OSPF 10 2 D [Link] Vlanif20
[Link]/32 Direct 0 0 D [Link] InLoopBack0

As shown in the routing table, when the default settings of load balancing are restored, both
next hops of Switch A, namely, [Link] and [Link], become valid routes. This is because
the default number of equal-cost routes is 32.
Step 6 (Optional) Set weights of equal-cost routes on Switch A.
If you do not want to implement load balancing between Switch B and Switch C, set weights
for the equal-cost routes to specify the next hop.
[~SwitchA] ospf
[~SwitchA-ospf-1] nexthop [Link] weight 1
[*SwitchA-ospf-1] quit
[*SwitchA] commit

# Display the routing table on Switch A.


[~SwitchA] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table: _public_
Destinations : 16 Routes : 16

Destination/Mask Proto Pre Cost Flags NextHop Interface


[Link]/24 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/24 Direct 0 0 D [Link] Vlanif20
[Link]/32 Direct 0 0 D [Link] Vlanif20
[Link]/32 Direct 0 0 D [Link] Vlanif20
[Link]/8 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/24 Direct 0 0 D [Link] Vlanif50
[Link]/32 Direct 0 0 D [Link] Vlanif50
[Link]/32 Direct 0 0 D [Link] Vlanif50
[Link]/24 OSPF 10 3 D [Link] Vlanif20
[Link]/24 OSPF 10 2 D [Link] Vlanif10
[Link]/24 OSPF 10 2 D [Link] Vlanif20
[Link]/32 Direct 0 0 D [Link] InLoopBack0

As shown in the routing table, after weights are set for the equal-cost routes, the preference of
the route with the next hop being [Link] (the weight is 1) is higher than that of the route

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 314


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

with the next hop being [Link]. Therefore, OSPF selects the route with the next hop being
[Link] as the optimal route.

----End

Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10 20 50
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif20
ip address [Link] [Link]
#
interface Vlanif50
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 50
#
ospf 1 router-id [Link]
nexthop [Link] weight 1
area [Link]
network [Link] [Link]
network [Link] [Link]
network [Link] [Link]
#
return

l Configuration file of Switch B


#
sysname SwitchB
#
vlan batch 20 40
#
interface Vlanif20
ip address [Link] [Link]
#
interface Vlanif40
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
ospf 1 router-id [Link]
area [Link]
network [Link] [Link]
network [Link] [Link]

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 315


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

#
return

l Configuration file of Switch C


sysname SwitchC
#
vlan batch 10 30
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif30
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
ospf 1 router-id [Link]
area [Link]
network [Link] [Link]
network [Link] [Link]
#
return

l Configuration file of Switch D


#
sysname SwitchD
#
vlan batch 30 40 60
#
interface Vlanif30
ip address [Link] [Link]
#
interface Vlanif40
ip address [Link] [Link]
#
interface Vlanif60
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 60
#
ospf 1 router-id [Link]
area [Link]
network [Link] [Link]
network [Link] [Link]
network [Link] [Link]
#
return

5.23.6 Example for Configuring OSPF IP FRR

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 316


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Networking Requirements
When a fault occurs on the primary link T, traffic is switched to a backup link. In such a
scenario, two problems arise:
l It takes hundreds of milliseconds for the traffic to be switched to a backup link during
OSPF fault restoration, which leads to service interruption.
l Traffic may be switched to a link passing through Switch A, but Switch A is an ASBR
and is not expected to function as a backup device.
When a fault occurs on the network, OSPF IP FRR can fast switch traffic to a backup link
without waiting for route convergence. This ensures uninterrupted traffic transmission. In
addition, you can also configure Switch A (ASBR) to detour around the backup link.
As shown in Figure 5-30:
l All switches run OSPF.
l Link costs meet the OSPF IP FRR traffic protection inequality.
l When the primary link T fails, Switch S immediately switches traffic to the backup link.
The traffic is forwarded through Switch N.
l Based on the network plan, the link where Switch A resides does not function as an FRR
backup link.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 317


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Figure 5-30 Networking diagram for configuring OSPF IP FRR

IS-IS
network

Issue 06 (2018-11-26) Copyright © Huawei Technologies


OSPF network Co., Ltd. 318
Area0
10GE1/0/1 10GE1/0/2
c
10 os
t= t=
o s SwitchA 15
OSPF
c
ASBR
CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Table 5-22 Data preparation


Switch Router ID Interface VLANIF IP Address
Interface

Switch S [Link] 10GE1/0/1 VLANIF 10 [Link]/24

10GE1/0/2 VLANIF 20 [Link]/24

10GE1/0/3 VLANIF 30 [Link]/24

Switch A [Link] 10GE1/0/1 VLANIF 10 [Link]/24

10GE1/0/2 VLANIF 40 [Link]/24

Switch N [Link] 10GE1/0/1 VLANIF 30 [Link]/24

10GE1/0/2 VLANIF 60 [Link]/24

Switch E [Link] 10GE1/0/1 VLANIF 40 [Link]/24

10GE1/0/2 VLANIF 20 [Link]/24

10GE1/0/3 VLANIF 60 [Link]/24

10GE1/0/4 VLANIF 70 [Link]/24

Configuration Notes
When configuring OSPF IP FRR, note that:
Before configuring OSPF IP FRR, if an interface is expected not to be an interface of a back
link, you need to block FRR on the interface.
During the configuration of OSPF IP FRR, the lower layer needs to fast respond to a link
change so that traffic can be rapidly switched to the backup link. After the bfd all-interfaces
frr-binding command is run, the BFD session status is associated with the link status of an
interface (when the BFD session goes Down, the link status of the interface becomes Down)
so that link faults can be rapidly detected.

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic OSPF functions on each switch.
2. Configure BFD for OSPF on all devices in Area 0.
3. Set the costs of links to ensure that link T is preferred to transmit traffic.
4. Block FRR on a specified interface of Switch S.
5. Enable OSPF IP FRR on Switch S to protect the traffic forwarded by Switch S.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 319


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Procedure
Step 1 Assign an IP address to each interface. The configuration details are not mentioned here.

Step 2 Configure basic OSPF functions. For details, see 5.23.1 Example for Configuring Basic
OSPF Functions.

Step 3 Configure BFD for OSPF on all devices in Area 0. For details, see 5.23.7 Example for
Configuring BFD for OSPF.

Step 4 Set the costs of links to ensure that link T is preferred to transmit traffic.

# Configure Switch S.
[~SwitchS] interface vlanif 10
[*SwitchS-Vlanif10] ospf cost 10
[*SwitchS-Vlanif10] quit
[*SwitchS] interface vlanif 20
[*SwitchS-Vlanif20] ospf cost 15
[*SwitchS-Vlanif20] quit
[*SwitchS] interface vlanif 30
[*SwitchS-Vlanif30] ospf cost 10
[*SwitchS-Vlanif30] quit
[*SwitchS] commit

# Configure Switch A.
[~SwitchA] interface vlanif 40
[*SwitchA-Vlanif40] ospf cost 15
[*SwitchA-Vlanif40] quit
[*SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ospf cost 10
[*SwitchA-Vlanif10] quit
[*SwitchA] commit

# Configure Switch N.
[~SwitchN] interface vlanif 30
[*SwitchN-Vlanif30] ospf cost 10
[*SwitchN-Vlanif30] quit
[*SwitchN] interface vlanif 60
[*SwitchN-Vlanif60] ospf cost 10
[*SwitchN-Vlanif60] quit
[*SwitchN] commit

# Configure Switch E.
[~SwitchE] interface vlanif 20
[*SwitchE-Vlanif20] ospf cost 15
[*SwitchE-Vlanif20] quit
[*SwitchE] interface vlanif 40
[*SwitchE-Vlanif30] ospf cost 15
[*SwitchE-Vlanif30] quit
[*SwitchE] interface vlanif 60
[*SwitchE-Vlanif40] ospf cost 10
[*SwitchE-Vlanif40] quit
[*SwitchE] interface vlanif 70
[*SwitchE-Vlanif70] ospf cost 5
[*SwitchE-Vlanif70] quit
[*SwitchE] commit

Step 5 Block FRR on a specified interface of Switch S.


[~SwitchS] interface vlanif 10
[~SwitchS-Vlanif10] ospf frr block
[*SwitchS-Vlanif10] quit
[*SwitchS] commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 320


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Step 6 Enable OSPF IP FRR on Switch S.


[~SwitchS] ospf
[*SwitchS-ospf-1] frr
[*SwitchS-ospf-1-frr] loop-free-alternate
[*SwitchS-ospf-1-frr] commit

Step 7 Verify the configuration.


# Run the display ospf routing router-id command on Switch S to view routing information.
[~SwitchS-ospf-1-frr] display ospf routing [Link]

Flags: A - Added to URT, S - Secondary route

OSPF Process 1 with Router ID [Link]

Destination :
[Link]/32

AdverRouter : [Link] Area :


[Link]
Cost : 3 Type :
Stub
NextHop : [Link] Interface :
Vlanif20
Priority :
Low

Backup NextHop : [Link] Backup Interface :


Vlanif30
Backup Type : LFA LINK-
NODE

Flags : A/-

The preceding display shows that a backup route is generated on Switch S.


----End

Configuration Files
l Configuration file of Switch S
#
sysname SwitchS
#
vlan batch 10 20 30
#
bfd
#
interface Vlanif10
ip address [Link] [Link]
ospf cost 10
ospf frr block
#
interface Vlanif20
ip address [Link] [Link]
ospf cost 15
#
interface Vlanif30
ip address [Link] [Link]
ospf cost 10
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 321


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

port trunk allow-pass vlan 20


#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 30
#
ospf 1 router-id [Link]
bfd all-interfaces enable
bfd all-interfaces frr-binding
frr
loop-free-alternate
area [Link]
network [Link] [Link]
network [Link] [Link]
network [Link] [Link]
#
return
l Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10 40
#
bfd
#
interface Vlanif10
ip address [Link] [Link]
ospf cost 10
#
interface Vlanif40
ip address [Link] [Link]
ospf cost 15
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
ospf 1 router-id [Link]
bfd all-interfaces enable
bfd all-interfaces frr-binding
area [Link]
network [Link] [Link]
network [Link] [Link]
#
return
l Configuration file of Switch N
#
sysname SwitchN
#
vlan batch 30 60
#
bfd
#
interface Vlanif30
ip address [Link] [Link]
ospf cost 10
#
interface Vlanif60
ip address [Link] [Link]
ospf cost 10
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 30

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 322


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 60
#
ospf 1 router-id [Link]
bfd all-interfaces enable
bfd all-interfaces frr-binding
frr
area [Link]
network [Link] [Link]
network [Link] [Link]
#
return

l Configuration file of Switch E


#
sysname SwitchE
#
vlan batch 20 40 60 70
#
bfd
#
interface Vlanif20
ip address [Link] [Link]
ospf cost 15
#
interface Vlanif40
ip address [Link] [Link]
ospf cost 15
#
interface Vlanif60
ip address [Link] [Link]
ospf cost 10
#
interface Vlanif70
ip address [Link] [Link]
ospf cost 5
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 40
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 60
#
interface 10GE1/0/4
port link-type trunk
port trunk allow-pass vlan 70
#
ospf 1 router-id [Link]
bfd all-interfaces enable
bfd all-interfaces frr-binding
area [Link]
network [Link] [Link]
network [Link] [Link]
network [Link] [Link]
network [Link] [Link]
#
return

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 323


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

5.23.7 Example for Configuring BFD for OSPF


Networking Requirements
As shown in Figure 5-31, the networking requirements are as follows:
l Switch A, Switch B, and Switch C run OSPF.
l BFD for OSPF is enabled on Switch A, Switch B, and Switch C.
l Service traffic is transmitted over the primary link Switch A→Switch B. The link Switch
A→Switch C→Switch B is a backup link.
l BFD is configured on interfaces connecting Switch A and Switch B. When a fault occurs
on the link between the Switch es, BFD can quickly detect the fault and notify OSPF of
the fault. Then, the service traffic is transmitted over the backup link.

Figure 5-31 Networking diagram for configuring BFD for OSPF

10GE1/0/3
SwitchA SwitchBVLANIF40
[Link]/24
10GE1/0/2 10GE1/0/2
10GE1/0/1 VLANIF20 VLANIF20 10GE1/0/1
VLANIF10 [Link]/24 [Link]/24 VLANIF30
[Link]/24 [Link]/24

10GE1/0/1 10GE1/0/2
VLANIF10 VLANIF30 Area0
[Link]/24 [Link]/24
SwitchC

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic OSPF functions on each switch.
2. Enable global BFD.
3. Enable BFD for OSPF on Switch A and Switch B.

Procedure
Step 1 Create VLANs and add corresponding interfaces to the VLANs.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan 10
[*SwitchA-vlan10] quit
[*SwitchA] vlan 20

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 324


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

[*SwitchA-vlan20] quit
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 20
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit

The configurations of Switch B and Switch C are similar to the configuration of Switch A,
and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ip address [Link] 24
[*SwitchA-Vlanif10] quit
[*SwitchA] interface vlanif 20
[*SwitchA-Vlanif20] ip address [Link] 24
[*SwitchA-Vlanif20] quit
[*SwitchA] commit

The configurations of Switch B and Switch C are similar to the configuration of Switch A,
and are not mentioned here.
Step 3 Configure basic OSPF functions. For details, see 5.23.1 Example for Configuring Basic
OSPF Functions.
Step 4 Configure BFD for OSPF.
# Enable global BFD on Switch A.
[~SwitchA] bfd
[*SwitchA-bfd] quit
[*SwitchA] ospf
[*SwitchA-ospf-1] bfd all-interfaces enable
[*SwitchA-ospf-1] quit
[*SwitchA] commit

# Enable global BFD on Switch B.


[~SwitchB] bfd
[*SwitchB-bfd] quit
[*SwitchB] ospf
[*SwitchB-ospf-1] bfd all-interfaces enable
[*SwitchB-ospf-1] quit
[*SwitchB] commit

# Enable global BFD on Switch C.


[~SwitchC] bfd
[*SwitchC-bfd] quit
[*SwitchC] ospf
[*SwitchC-ospf-1] bfd all-interfaces enable
[*SwitchC-ospf-1] quit
[*SwitchC] commit

# Run the display ospf bfd session all command on Switch A and Switch B to verify that the
BFD state is Up on both devices.
The following provides the configuration on Switch A:
[~SwitchA] display ospf bfd session all
OSPF Process 1 with Router ID [Link]
Area [Link] interface [Link](Vlanif20)'s BFD Sessions

NeighborId:[Link] AreaId:[Link]

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 325


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Interface:Vlanif20
BFDState:Up rx :1000 tx :
1000
Multiplier:3 BFD Local Dis:16385 LocalIpAdd:
[Link]
RemoteIpAdd:[Link] Diagnostic Info:No diagnostic
information

Area [Link] interface [Link](Vlanif10)'s BFD Sessions

NeighborId:[Link] AreaId:[Link]
Interface:Vlanif10
BFDState:Up rx :1000 tx :
1000
Multiplier:3 BFD Local Dis:16385 LocalIpAdd:
[Link]
RemoteIpAdd:[Link] Diagnostic Info:No diagnostic
information

Total UP/DOWN/UNKNOWN BFD Session Number : 2 / 0 / 0

Step 5 Configure BFD on interfaces.


# Configure BFD on VLANIF 20 of Switch A, set the minimum intervals for sending and
receiving packets to 100 ms, and set the local detection time multiplier to 4.
[~SwitchA] interface vlanif 20
[*SwitchA-Vlanif20] ospf bfd enable
[*SwitchA-Vlanif20] ospf bfd min-tx-interval 100 min-rx-interval 100 detect-
multiplier 4
[*SwitchA-Vlanif20] quit
[*SwitchA] commit

# Configure BFD on VLANIF 20 of Switch B, set the minimum intervals for sending and
receiving packets to 100 ms, and set the local detection time multiplier to 4.
[*SwitchB] interface vlanif 20
[*SwitchB-Vlanif20] ospf bfd enable
[*SwitchB-Vlanif20] ospf bfd min-tx-interval 100 min-rx-interval 100 detect-
multiplier 4
[*SwitchB-Vlanif20] quit
[*SwitchB] commit

# Run the display ospf bfd session all command on Switch A and Switch B to verify that, on
both devices, the minimum intervals for sending and receiving packets are 100 ms and that
the local detection multiplier is 4.
The following provides the configuration on Switch B:
[~SwitchB] display ospf bfd session all

OSPF Process 1 with Router ID [Link]


Area [Link] interface [Link](Vlanif20)'s BFD Sessions

NeighborId:[Link] AreaId:[Link]
Interface:Vlanif20
BFDState:Up rx :100 tx :
100
Multiplier:4 BFD Local Dis:16385 LocalIpAdd:
[Link]
RemoteIpAdd:[Link] Diagnostic Info:No diagnostic
information

Area [Link] interface [Link](Vlanif30)'s BFD Sessions

NeighborId:[Link] AreaId:[Link]
Interface:Vlanif30
BFDState:Up rx :100 tx :
100

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 326


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Multiplier:4 BFD Local Dis:16385 LocalIpAdd:


[Link]
RemoteIpAdd:[Link] Diagnostic Info:No diagnostic
information

Total UP/DOWN/UNKNOWN BFD Session Number : 2 / 0 / 0

Step 6 Verify the configuration.


# Run the shutdown command on VLANIF 20 of Switch B to simulate a fault on the primary
link.
[~SwitchB] interface vlanif 20
[~SwitchB-Vlanif20] shutdown
[*SwitchB-Vlanif20] commit

# Display the routing table on Switch A.


[~SwitchA] display ospf routing

OSPF Process 1 with Router ID [Link]

Routing for Network


Destination Cost Type NextHop AdvRouter Area
[Link]/24 3 Stub [Link] [Link] [Link]
[Link]/24 1 Stub [Link] [Link] [Link]
[Link]/24 2 Transit [Link] [Link] [Link]
[Link]/24 1 Transit [Link] [Link] [Link]

Total Nets: 4 Intra Area: 4 Inter Area: 0 ASE: 0 NSSA: 0

As shown in the OSPF routing table, the backup link Switch A→Switch C→Switch B takes
effect after the primary link fails. The next hop address of the route to [Link]/24 becomes
[Link].

----End

Configuration Files
l Configuration file of Switch A
#
sysname SwitchA
#
vlan batch 10 20
#
router id [Link]
#
bfd
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif20
ip address [Link] [Link]
ospf bfd enable
ospf bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
ospf 1
bfd all-interface enable

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 327


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

area [Link]
network [Link] [Link]
network [Link] [Link]
#
return
l Configuration file of Switch B
#
sysname SwitchB
#
vlan batch 20 30 40
#
router id [Link]
#
bfd
#
interface Vlanif20
ip address [Link] [Link]
ospf bfd enable
ospf bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4
#
interface Vlanif30
ip address [Link] [Link]
#
interface Vlanif40
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 40
#
ospf 1
bfd all-interface enable
area [Link]
network [Link] [Link]
network [Link] [Link]
network [Link] [Link]
#
return
l Configuration file of Switch C
#
sysname SwitchC
#
vlan batch 10 30
#
router id [Link]
#
bfd
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif30
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 328


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

port trunk allow-pass vlan 30


#
ospf 1
bfd all-interface enable
area [Link]
network [Link] [Link]
network [Link] [Link]
#
return

5.24 Troubleshooting OSPF

5.24.1 An OSPF Neighbor Relationship Cannot Be Established


Fault Symptom
An OSPF neighbor relationship cannot be established between two devices.

Procedure
Step 1 Check whether the physical status and protocol status of interfaces on both ends are Up and
stable, whether packet loss occurs on the interfaces, and whether the two devices can ping
each other with large packets.
If the physical status of the interfaces is not Up or is unstable (interfaces flap for example),
check the physical link and link layer protocol and ensure that the physical status and protocol
status of the interfaces are Up and that the interfaces have no error packet statistics.
You can perform a ping test for a long time to check whether any packet loss occurs on the
interfaces and ping with large packets (longer than 1500 bytes) to check whether the two
devices can ping each other with large packets.
Step 2 Check whether the OSPF processes on the two devices have the same router ID.
Run the display ospf [ process-id ] brief command on the two devices to check the OSPF
process router IDs.
Each router ID must be unique on the entire network. Otherwise, devices on both ends cannot
establish OSPF neighbor relationships and routing information errors will occur. You need to
configure a unique router ID for each OSPF process on the devices.
If the OSPF processes on the two devices have the same router ID, run the ospf [ process-id ]
router-id router-id command in the system view to change the router ID for one of the OSPF
processes and ensure that the OSPF processes on the two devices have different router IDs.
After the router ID is changed for one of the processes, you must run the reset ospf [ process-
id ] process command in the user view to make the new router ID take effect.
Step 3 Check whether the two devices have the same OSPF area ID.
Run the display ospf [ process-id ] brief command on the two devices to check the OSPF
area IDs.
If the two devices have different OSPF area IDs, run the area area-id command in the OSPF
view to change one of the OSPF area IDs and ensure that the two devices have the same
OSPF area ID.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 329


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Step 4 Check whether OSPF interfaces on both ends have the same network type.
Run the display ospf [ process-id ] interface command on the two devices to check the OSPF
interface network types.
The network types of the OSPF interfaces on both ends of a link must be the same; otherwise,
the two interfaces cannot establish an OSPF neighbor relationship.
If the network types of the two OSPF interfaces are different, run the ospf network-type
{ broadcast | nbma | p2mp | p2p } command in the view of one of the OSPF interfaces to
change the network type of the interface and ensure that the two OSPF interfaces have the
same network type.

NOTE

If the network types of OSPF interfaces on both ends are NBMA, you must run the peer ip-address [ dr-
priority priority ] command in the OSPF view to configure NBMA neighbors.

Step 5 Check whether OSPF interfaces on both ends have the same IP address mask.
Run the display current-configuration interface interface-type interface-number command
on the two devices to check the IP address of the specified OSPF interface.
The IP address masks of the OSPF interfaces on both ends of a link must be the same;
otherwise, the two interfaces cannot establish an OSPF neighbor relationship. On a P2MP
network, however, you can run the ospf p2mp-mask-ignore command in the OSPF interface
view to disable a device from checking the network mask so that an OSPF neighbor
relationship can be established.
If the two OSPF interfaces have different IP address masks, run the ip address ip-address
{ mask | mask-length } command in the view of one of the OSPF interfaces to change the IP
address mask of the interface and ensure that the two OSPF interfaces have the same IP
address mask.
Step 6 Check whether IP addresses of the two OSPF interfaces on both ends belong to the network
segment specified in the network command.
Run the display current-configuration interface interface-type interface-number command
on both ends to check the IP addresses of the OSPF interfaces and run the display current-
configuration configuration ospf command on both ends to check the OSPF process
configuration.
OSPF can run on an interface only when the following conditions are met:
l The mask length of the interface's IP address is longer than or equal to that specified in
the network command. OSPF uses reverse mask. For example [Link] indicates that
the mask length is 24 bits.
l The primary IP address of the interface belongs to the network segment specified in the
network command.
If the IP address of an interface does not meet the preceding conditions, run the ip address ip-
address { mask | mask-length } command in the OSPF interface view to change the IP address
of the interface or run the network command in the view of the area that the OSPF process
belongs to change the configured network segment so that the IP address of the interface can
meet the preceding conditions.
Step 7 Check whether the DR priorities of OSPF interfaces on both ends are 0.
Run the display ospf [ process-id ] interface command on the two devices to check the OSPF
interface DR priority.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 330


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

On a broadcast or NBMA network, there must be at least one OSPF interface with a non-zero
DR priority to ensure that the DR can be elected. Otherwise, the neighbor status of devices on
both ends can be only 2-way.

If the DR priorities of the two OSPF interfaces are both 0, run the ospf dr-priority priority
command in the OSPF interface view to change the DR priority and ensure that there is at
least one OSPF interface with a non-zero DR priority.

Step 8 Run commit

The configuration is committed.

----End

5.24.2 OSPF Cannot Find Routes of a Non-Local Area

Symptom
When the link is normal, OSPF cannot find routes of a non-local area.

Procedure
Step 1 Check whether the area where the device resides is connected to the backbone area.

Run the display ospf [ process-id ] brief command on the ABR in the area where the device
resides to check area configuration.

OSPF requires that all non-backbone areas keep connectivity with the backbone area.

If no backbone area information is configured on the ABR, run the area area-id command in
the OSPF view to modify the OSPF area information and ensure that at least one interface on
the ABR runs in the backbone area.

NOTE

If some non-backbone areas cannot be connected to the backbone area due to networking restrictions,
configure OSPF virtual links.

Step 2 Check whether the area where the device resides is a totally stub area.

Run the display current-configuration configuration ospf [ process-id ] command on the


device to check the OSPF process configuration.

If you specify the parameter no-summary (run the stub no-summary command in the OSPF
area view) when configuring a non-backbone area as a stub area on the ABR, the area is
configured as a totally stub area.

A totally stub area allows only intra-area routes to be advertised within the area.

If the area where the device resides is configured as a totally stub area, perform the following
configurations based on service requirements:
l To restore the totally stub area to a common area, run the undo stub command in the
OSPF area view on all devices in the area.
l To restore a totally stub area to a stub area, run the undo stub command in the OSPF
area view on the ABR in the area and then run the stub command.

Step 3 Check whether the area where the device resides is a totally NSSA.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 331


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 5 OSPF Configuration

Run the display current-configuration configuration ospf [ process-id ] command on the


device to check the OSPF process configuration.
If you specify the parameter no-summary (run the nssa no-summary command in the OSPF
area view) when configuring a non-backbone area as an NSSA on the ABR, the area is
configured as a totally NSSA.
A totally NSSA allows only intra-area routes to be advertised within the area.
If the area where the device resides is configured as a totally NSSA, perform the following
configurations based on service requirements:
l To restore the totally NSSA to a common area, run the undo nssa command in the OSPF
area view on all devices in the area.
l To restore the totally NSSA to an NSSA, run the undo nssa command in the OSPF area
view on the ABR in the area and then run the nssa command.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 332


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

6 OSPFv3 Configuration

About This Chapter

By building Open Shortest Path First Version 3 (OSPFv3) networks, you can enable OSPFv3
to discover and calculate routes in ASs. OSPFv3 is applicable to a large-scale network that
consists of hundreds of switches.

6.1 Overview of OSPFv3


6.2 Understanding OSPFv3
6.3 Summary of OSPFv3 Configuration Tasks
6.4 Licensing Requirements and Limitations for OSPFv3
6.5 Default Settings for OSPFv3
6.6 Configuring Basic OSPFv3 Functions
6.7 Establishing or Maintaining OSPFv3 Neighbor Relationship
6.8 Configuring OSPFv3 Areas
6.9 Configuring OSPFv3 Route Attributes
6.10 Controlling OSPFv3 Routing Information
6.11 Configuring OSPFv3 Neighbor Relationship Flapping Suppression
6.12 Optimizing an OSPFv3 Network
6.13 Configuring an OSPFv3 Dynamic Hostname
6.14 Configuring OSPFv3 IP FRR
6.15 Configuring BFD for OSPFv3
6.16 Configuring the OSPFv3 GR Helper
6.17 Configuring OSPFv3 IPSec
6.18 Improving OSPFv3 Network Security
6.19 Configuring the Network Management Function of OSPFv3

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 333


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

6.20 Resetting OSPFv3


6.21 Configuration Examples for OSPFv3

6.1 Overview of OSPFv3

Definition
The Open Shortest Path First (OSPF) protocol is a link-state Interior Gateway Protocol (IGP)
developed by the Internet Engineering Task Force (IETF).

OSPF Version 3 (OSPFv3), as defined in RFC 2740 and expanded in RFC 5340, is a
modification of OSPFv2 allowing IPv6 support.

Purpose
The primary purpose of OSPFv3 is to develop a routing protocol independent of any specific
network layer. The internal routing information of OSPFv3 is redesigned to serve this
purpose.

OSPFv3 and OSPFv2 differ as follows:

l •OSPFv3 is used in IPv6, while OSPFv2 is used in IPv4.


OSPFv3 does not insert IP-based data in the header of an IP packet or Link State
Advertisement (LSA).
l •OSPFv3 uses protocol-independent information to execute crucial tasks that originally
required the use of the data in the IP packet header, for example, to identify LSAs that
advertise routing data.

6.2 Understanding OSPFv3

6.2.1 OSPFv3 Fundamentals

Running on IPv6, OSPFv3 (defined in RFC 2740) is an independent routing protocol whose
functions are enhanced on the basis of OSPFv2.

l The working principles of Hello messages, state machines, link-state databases (LSDBs),
flooding, and route calculation are the same in OSPFv3 and OSPFv2.
l OSPFv3 divides an Autonomous System (AS) into one or more logical areas and
advertises routes through LSAs.
l OSPFv3 ensures routing information consistency by exchanging OSPFv3 packets
between routers within an OSPFv3 area.
l OSPFv3 packets are encapsulated into IPv6 packets, which can be transmitted in unicast
or multicast mode.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 334


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Packet Types
Packet Type Description

Hello packet Hello packets are sent regularly to discover and


maintain OSPFv3 neighbor relationships.

Database Description (DD) A DD packet contains the summary of the local LSDB.
packet It is exchanged between two OSPFv3 routers to update
the LSDBs.

Link State Request (LSR) packet LSR packets are sent to the neighbor to request the
required LSAs.
An OSPFv3 router sends LSR packets to its neighbor
only after they exchange DD packets.

Link State Update (LSU) packet The LSU packet is used to transmit required LSAs to
the neighbor.

Link State Acknowledgment The LSAck packet is used to acknowledge the received
(LSAck) packet LSA packets.

LSA Types
LSA Type Description

Router-LSA (Type1) Generated by a router for each area to which an OSPFv3


interface belongs, the router LSA describes the status and
costs of links of the router and is advertised in the area
where the OSPFv3 interface belongs.

Network-LSA (Type2) Generated by a designated router (DR), the network LSA


describes the link status and is broadcast in the area that the
DR belongs to.

Inter-Area-Prefix-LSA Generated on the area border router (ABR), an inter-area


(Type3) prefix LSA describes the route of a certain network
segment within the local area and is used to inform other
areas of the route.

Inter-Area-Router-LSA Generated on the ABR, an inter-area router LSA describes


(Type4) the route to the autonomous system boundary router
(ASBR) and is advertised to all related areas except the
area that the ASBR belongs to.

AS-external-LSA (Type5) Generated on the ASBR, the AS-external LSA describes


the route to a destination outside the AS and is advertised
to all areas except the stub area and NSSA.

NSSA-LSA (Type7) Describes routes to a destination outside the AS. It is


generated by an ASBR and advertised in NSSAs only.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 335


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

LSA Type Description

Link-LSA (Type8) Each router generates a link LSA for each link. A link LSA
describes the link-local address and IPv6 address prefix
associated with the link and the link option set in the
network LSA. It is transmitted only on the link.

Intra-Area-Prefix-LSA Each router or DR generates one or more intra-area prefix


(Type9) LSAs and transmits it in the local area.
l An LSA generated on a router describes the IPv6
address prefix associated with the router LSA.
l An LSA generated on a DR describes the IPv6 address
prefix associated with the network LSA.

Router Types

Figure 6-1 Router types

IS-IS ASBR

Area1 Area4
Internal Backbone
Router Router
Area0

Area2 ABR Area3

Table 6-1 Router types


Router Type Description

Internal router All interfaces on an internal router belong to the same


OSPFv3 area.

Area border router (ABR) An ABR can belong to two or more areas, but one of the
areas must be a backbone area.
An ABR is used to connect the backbone area and the non-
backbone areas. It can be physically or logically connected
to the backbone area.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 336


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Router Type Description

Backbone router At least one interface on a backbone router belongs to the


backbone area.
All ABRs and internal routers in Area 0, therefore, are
backbone routers.

AS boundary router (ASBR) A router that exchanges routing information with other ASs
is called an ASBR.
An ASBR may not locate on the boundary of an AS. It can
be an internal router or an ABR.

Route Types
Inter-area routes and intra-area routes describe the network structure of an AS. External routes
describe how to select a route to the destination outside an AS. OSPFv3 classifies the
imported AS external routes into Type 1 routes and Type 2 routes.
Table 6-2 lists route types in a descending order of priority.

Table 6-2 Route types


Route Type Description

Intra-area route Indicates routes within an area.

Inter-area route Indicates routes between areas.

Type1 external routes Because of the high reliability of Type 1 external routes,
the calculated cost of external routes is equal to that of AS
internal routes, and can be compared with the cost of
OSPFv3 routes.
That is, the cost of a Type1 external route equals the cost of
the route from the router to the corresponding ASBR plus
the cost of the route from the ASBR to the destination
address.

Type2 external routes Because of the low reliability of Type2 external routes, the
cost of the route from the ASBR to a destination outside
the AS is considered far greater than the cost of any
internal path to an ASBR.
Therefore, OSPFv3 only takes the cost of the route from
the ASBR to a destination outside the AS into account
when calculating route costs. That is, the cost of a Type2
external route equals the cost of the route from the ASBR
to the destination of the route.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 337


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Area Types

Table 6-3 Area types


Area Type Description

Totally stub area A totally stub area allows the Type3 default routes advertised by
the ABR, and disallows the routes outside the AS and inter-area
routes.

Stub area A stub area allows inter-area routes, which is different from a
totally stub area.

NSSA Imports routes outside an AS, which is different from a stub area.
An ASBR advertises Type7 LSAs in the local area. These Type 7
LSAs are translated into Type 5 LSAs on an ABR, and are then
flooded in the entire OSPFv3 AS.

Network Types
OSPFv3 classifies networks into the following types according to link layer protocols.

Table 6-4 Network types


Network Type Description

Broadcast If the link layer protocol is Ethernet or FDDI, OSPFv3 defaults


the network type to broadcast.
In this type of networks, the following situations occur:
l Hello messages, LSU packets, and LSAck packets are
transmitted in multicast mode (FF02::5 is the reserved IPv6
multicast address of the OSPFv3 router; FF02::6 is the
reserved IPv6 multicast address of the OSPFv3 DR or BDR).
l DD packets and LSR packets are transmitted in unicast
mode.

Non-broadcast Multiple If the link layer protocol is frame relay, ATM, or X.25, OSPFv3
Access (NBMA) defaults the network type to NBMA.
In this type of networks, protocol packets such as Hello
messages, DD packets, LSR packets, LSU packets, and LSAck
packets, are transmitted in unicast mode.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 338


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Network Type Description

Point-to-Multipoint Regardless of the link layer protocol, OSPFv3 does not default
(P2MP) the network type to P2MP. A P2MP network must be forcibly
changed from other network types. The common practice is to
change a non-fully connected NBMA to a P2MP network.
In this type of networks, the following situations occur:
l Hello messages are transmitted in multicast mode with the
multicast address as FF02::5.
l Other protocol packets, including DD packets, LSR packets,
LSU packets, and LSAck packets, are transmitted in unicast
mode.

Point-to-point (P2P) If the link layer protocol is PPP, HDLC, or LAPB, OSPFv3
defaults the network type to P2P.
In this type of network, the protocol packets, including Hello
messages, DD packets, LSR packets, LSU packets, and LSAck
packets, are transmitted to the multicast address FF02::5.

Stub Area
A stub area is a special area where the ABRs do not flood the received external routes. In stub
areas, the size of the routing table of the routers and the routing information in transmission
are reduced.
Configuring a stub area is optional. Not all areas can be configured as stub areas. Usually, a
stub area is a non-backbone area with only one ABR and is located at the AS boundary.
To ensure the reachability of a destination outside the AS, the ABR in the stub area generates
a default route and advertises it to the non-ABR routers in the stub area.
Note the following when configuring a stub area:
l The backbone area cannot be configured as a stub area.
l If an area needs to be configured as a stub area, all the routers in this area must be
configured with the stub command.
l An ASBR cannot exist in a stub area. That is, external routes are not flooded in the stub
area.
l A virtual link cannot pass through the stub area.

OSPFv3 Route Summarization


Routing information can be decreased after route aggregation so that the size of routing tables
is reduced, which improves the performance of routers.
The procedure for OSPFv3 route aggregation is as follows:
l Route summarization on an ABR
An ABR can summarize routes with the same prefix into one route and advertise the
summarized route in other areas.
When sending routing information to other areas, an ABR generates Type 3 LSAs based
on IPv6 prefixes. If consecutive IPv6 prefixes exist in an area and route summarization is

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 339


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

enabled on the ABR of the area, the IPv6 prefixes can be summarized into one prefix. If
there are multiple LSAs that have the same prefix, the ABR summarizes these LSAs and
advertises only one summarized LSA. The ABR does not advertise any specific LSAs.
l Route summarization on an ASBR
An ASBR can summarize imported routes with the same prefix into one route and then
advertise the summarized route to other areas.
After being enabled with route summarization, an ASBR summarizes imported Type 5
LSAs within the summarized address range. After route summarization, the ASBR does
not generate a separate Type 5 LSA for each specific prefix within the configured range.
Instead, the ASBR generates a Type 5 LSA for only the summarized prefix. In an NSSA,
an ASBR summarizes multiple imported Type 7 LSAs within the summarized address
range into one Type 7 LSA.

OSPFv3 Virtual Link


A virtual link refers to a logical channel established between two ABRs through a non-
backbone area.
l A virtual link must be set up on both ends of the link; otherwise, it does not take effect.
l The transmit area refers to the area that provides an internal route of a non-backbone
area for both the ends of the virtual link.
In actual applications, the physical connectivity between non-backbone areas and the
backbone area cannot be ensured owing to various limitations. To solve this problem, you can
configure OSPFv3 virtual links.
The virtual link is similar to a point-to-point connection between two ABRs. Similar to
physical interfaces, the interfaces on the virtual link can be configured with parameters such
as the hello interval.

Figure 6-2 OSPFv3 virtual link

Area0 Area2
Virtual Link
ABR Area1 ABR

Transit Area

As shown in Figure 6-2, OSPFv3 packets transmitted between two ABRs are only forwarded
by the OSPFv3 devices that reside between the two ABRs. The OSPFv3 devices detect that
they are not the destinations of the packets, so they forward the packets as common IP
packets.

OSPFv3 Multi-Process
OSPFv3 supports multi-process. More than one OSPFv3 process can run on the same router
because processes are independent of each other. Route interaction between different OSPFv3
processes is similar to the route interaction between different routing protocols.
An interface of a router belongs to only a certain OSPFv3 process.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 340


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

6.2.2 OSPFv3 GR
Graceful restart (GR) is a technology used to ensure normal traffic forwarding when a routing
protocol restarts and guarantee that key services are not affected in the process.
GR is one of the high availability (HA) technologies, which comprise a series of
comprehensive technologies such as fault-tolerant redundancy, link protection, faulty node
recovery, and traffic engineering. As a redundancy technology, GR is widely used to ensure
uninterrupted forwarding of key data in active/standby switchover and system upgrade.
If GR is not enabled, the active/standby switchover occurring owing to various causes leads to
transient interruption of data forwarding, and as a result, route flapping occurs on the whole
network. Such route flapping and service interruption are unacceptable on a large-scale
network, especially on a carrier network.
In GR mode, the forwarding plane continues to direct data forwarding once a restart occurs,
and the actions on the control plane, such as reestablishment of neighbor relationships and
route calculation, do not affect the forwarding plane. In this manner, service interruption
caused by route flapping is prevented so that the network reliability is improved.

Basic Concepts
l Grace-LSA
– OSPFv3 supports GR by flooding Grace-LSAs on the link.
– Grace-LSAs are used to inform the neighbor of the GR time, cause, and interface
instance ID when GR starts and ends.
l Router function
– A router can function as a GR restarter.
– A router can function as a GR helper.
l GR implementation
– Planned-GR: This refers to the smooth restart of OSPFv3 through the reset ospfv3
graceful-restart command. In this mode, a Grace-LSA is sent to the neighbor
before the restart.
– Unplanned-GR: This refers to the active/standby switchover triggered by router
faults like power down, dead loop, exception or reset in master.
Unlike planned-GR, no Grace-LSA is sent before the active/standby switchover in
unplanned GR mode. Instead, the switchover is directly performed. When the
standby board becomes Up, a Grace-LSA is sent and the GR process starts. The
following procedure is the same as that of planned GR.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 341


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

GR Process

Figure 6-3 OSPFv3 planned-GR process (reset ospfv3 graceful-restart)


RouterA RouterB

Restarter Helper

Restart the OSPFv3 Grace-LSA


process in GR mode Enter the Helper
and enter the GR state LSAck state

Send Hello packets, negotiate with


neighbors by exchanging DD packets,
and synchronize LSDBs
Synchronize LSDBs with
Full the Restarter
Exit from the GR state, Flush Grace-LSA
recalculate routes, and Exit from the Helper state
generate LSAs and generate Router-LSAs

Figure 6-4 OSPFv3 unplanned-GR process (active/standby switchover)

RouterA RouterB

Restarter Helper

Master/slave Grace-LSA
Enter the Helper state
switchover is complete
LSAck
Responds to LSAs
with LSAcks
Send Hello packets, negotiate with
neighbors by exchanging DD
packets, and synchronize LSDBs Synchronize LSDBs
Full
with the Restarter
Exit from the GR state, Flush Grace-LSA Exit from the Helper
recalculate routes, and
state and generate
generate LSAs
Router-LSAs

l On the GR restarter:
1. In planned-GR mode, the GR restarter sends a Grace-LSA to all neighbors to inform
them of the start of a GR process and the period and cause of this process.
In unplanned GR mode, a Grace-LSA is sent to each neighbor immediately after the
standby board is Up to inform the neighbors of the start of a GR process and the period
and cause of the process.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 342


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

2. The GR restarter performs negotiation with neighbors again to set up new neighbor
relationships.
3. When all the neighbor relationships between the GR restarter and the original neighbors
enter the Full state:
– The GR restarter exits from the GR process and OSPFv3 recalculates routes.
– The GR restarter updates the routing table on the main control board and the FIBs
on interface boards and deletes invalid routing entries.
– The GR restarter sends a Grace-LSA whose aging time is 3600 seconds to instruct
the GR helper to exit from the GR process.
Now, the GR process is complete.
4. If errors occur during a GR process, the GR timer expires, or the neighbor relationship
fails to enter the Full state during a GR process, the GR restarter exits from the process
and OSPFv3 is restarted in non-GR mode. In this case, packets are lost.
l On the GR helper:
1. If a router is configured to support the GR process on its neighbor, the router enters the
helper mode after receiving a Grace-LSA.
2. The GR helper maintains its neighbor relationship with the GR restarter, and the status of
the neighbor relationship does not change.
3. If the GR helper continues to receive Grace-LSAs whose GR period is different from
that on the GR helper, the GR helper updates its GR period.
4. Being informed of the successful GR process through a Grace-LSA whose aging time is
3600 seconds from the GR restarter, the GR helper exits from the GR process.
5. If errors occur during a GR process, the GR helper exits from the helper state and deletes
invalid routes after route calculation.

Comparison between the GR Mode and the Non-GR Mode

Table 6-5 Comparison between the OSPFv3 GR mode and the OSPFv3 non-GR mode

Active/Standby Switchover in Non- Active/Standby Switchover in GR Mode


GR Mode

l OSPFv3 neighbor relationships are l OSPFv3 neighbor relationships are


reestablished. reestablished.
l Routes are recalculated. l Routes are recalculated.
l The forwarding table changes. l The forwarding table remains the same.
l Route changes are sensed on the l Except the neighbor of the device where
network and route flapping occurs the active/standby switchover occurs, other
over a short period of time. routers do not sense the route changes.
l Packets are lost during forwarding, l No packets are lost during forwarding, and
and services are interrupted. services are not affected.

6.2.3 Association between OSPFv3 and BGP

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 343


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

When a new router is deployed in the network or a router is restarted, the network traffic may
be lost during BGP convergence. This is because IGP convergence is quicker than BGP
convergence. This problem can be solved through the association between OSPFv3 and BGP.

If a router on a BGP network recovers from a fault, BGP convergence is performed again and
certain packets may be lost during the convergence.

As shown in Figure 6-5, traffic from RouteA to RouterD passes through RouterC, and
traverses a BGP network.

Figure 6-5 Traffic traversing a BGP network

Router Nexthop RouterB


BGP FC00:0:0:1::1 RouterD
OSPFv3 RouterD RouterC
RouterD

RouterA
OSPFv3
BGP Routes
FC00:0:0:1::1/128
RouterC

If a fault occurs on RouterC, traffic is redirected to RouterB after rerouting. Packets are lost
when RouterC is restored to the normal status.

Because OSPFv3 convergence is quicker than BGP convergence, OSPFv3 convergence is


complete when RouterC recovers. The next hop of the route from RouterA to RouterD is
RouterC, which, however, does not know the route to RouterD since BGP convergence on
RouterC is not complete.

When the packets destined for RouterD are transmitted from RouterA to RouterC, they are
discarded by RouterC because RouterC has no route to RouterD, as shown in Figure 6-6.

Figure 6-6 Packet loss during the restart of the device not enabled with association between
OSPFv3 and BGP

RouterB
Router Nexthop
BGP FC00:0:0:1::1 RouterD
BGP Routes
OSPFv3 RouterD RouterC FC00:0:1::1/128

RouterA
OSPFv3 RouterD

RouterC

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 344


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Process of Association between OSPFv3 and BGP


When a router enabled with association between OSPFv3 and BGP restarts, the router
advertises a message in the local OSPFv3 area to instruct other routers not to use it as a transit
router.
At the same time, the router sets the largest weight value of 65535 in its LSAs to ensure that it
is not used by other routers as the transit router. The BGP route, however, can still reach the
router.

6.2.4 OSPFv3 Neighbor Relationship Flapping Suppression


OSPFv3 neighbor relationship flapping suppression works by delaying OSPFv3 neighbor
relationship reestablishment or setting the link cost to the maximum value (65535).

Background
If the status of an interface carrying OSPFv3 services alternates between Up and Down,
OSPFv3 neighbor relationship flapping occurs on the interface. During the flapping, OSPFv3
frequently sends Hello packets to reestablish the neighbor relationship, synchronizes LSDBs,
and recalculates routes. In this process, a large number of packets are exchanged, adversely
affecting neighbor relationship stability, OSPFv3 services, and other OSPFv3-dependent
services, such as LDP and BGP. OSPFv3 neighbor relationship flapping suppression can
address this problem by delaying OSPFv3 neighbor relationship reestablishment or preventing
service traffic from passing through flapping links.

Related Concepts
Flapping_event: reported when the status of a neighbor relationship on an interface last
changes from Full to a non-Full state. The flapping_event triggers flapping detection.
Flapping_count: number of times flapping has occurred.
Detect-interval: detection interval. The interval is used to determine whether to trigger a
valid flapping_event.
Threshold: flapping suppression threshold. When the flapping_count reaches or exceeds
threshold, flapping suppression takes effect.
Resume-interval: interval for exiting from OSPFv3 neighbor relationship flapping
suppression. If the interval between two successive valid flapping_events is longer than
resume-interval, the flapping_count is reset.

Implementation
Flapping detection
Each OSPFv3 interface on which OSPFv3 neighbor relationship flapping suppression is
enabled starts a flapping counter. If the interval between two successive neighbor status
changes from Full to a non-Full state is shorter than detecting-interval, a valid
flapping_event is recorded, and the flapping_count increases by 1. When the flapping_count
reaches or exceeds threshold, flapping suppression takes effect. If the interval between two
successive neighbor status changes from Full to a non-Full state is longer than resume-
interval, the flapping_count is reset.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 345


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

The detecting-interval, threshold, and resume-interval are configurable.

NOTE
The value of resume-interval must be greater than that of detecting-interval.
Flapping suppression
Flapping suppression works in either Hold-down or Hold-max-cost mode.
l Hold-down mode: In the case of frequent flooding and topology changes during neighbor
relationship establishment, interfaces prevent neighbor relationships from being
reestablished during the suppression period, which minimizes LSDB synchronization
attempts and packet exchanges.
l Hold-max-cost mode: If the traffic forwarding path changes frequently, interfaces use
65535 as the cost of the flapping link during Hold-max-cost suppression, which prevents
traffic from passing through the flapping link.
Flapping suppression can also work first in Hold-down mode and then in Hold-max-cost
mode.
By default, the Hold-max-cost mode takes effect. The mode and suppression duration can be
changed manually.
If an attack causes frequent neighbor relationship flapping, Hold-down mode can minimize
the impact of the attack.

NOTE
When an interface enters the flapping suppression state, all neighbor relationships on the interface enter
the state accordingly.
Exiting from flapping suppression
Interfaces exit from flapping suppression in the following scenarios:
l The suppression timer expires.
l The corresponding OSPFv3 process is reset.
l An OSPF neighbor is reset.
l A command is run to exit from flapping suppression.

Typical Scenarios
Basic scenario
In Figure 6-7, the traffic forwarding path is Router A -> Router B -> Router C -> Router E
before a link failure occurs. After the link between Router B and Router C fails, the
forwarding path switches to Router A -> Router B -> Router D -> Router E. If the neighbor
relationship between Router B and Router C frequently flaps at the early stage of the path
switchover, the forwarding path will be switched frequently, causing traffic loss and affecting
network stability. If the neighbor relationship flapping meets suppression conditions, flapping
suppression takes effect.
l If flapping suppression works in Hold-down mode, the neighbor relationship between
Router B and Router C is prevented from being reestablished during the suppression
period, in which traffic is forwarded along the path Router A -> Router B -> Router D ->
Router E.
l If flapping suppression works in Hold-max-cost mode, 65535 is used as the cost of the
link between Router B and Router C during the suppression period, and traffic is
forwarded along the path Router A -> Router B -> Router D -> Router E.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 346


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Figure 6-7 Flapping suppression in a basic scenario

Router C

cost=10 cost=10

Router A Router B Router E


cost=100 cost=100

Router D

Single-forwarding path scenario


When only one forwarding path exists on the network, the flapping of the neighbor
relationship between any two devices on the path will interrupt traffic forwarding. In Figure
6-8, the traffic forwarding path is Router A -> Router B -> Router C -> Router E. If the
neighbor relationship between Router B and Router C flaps, and the flapping meets
suppression conditions, flapping suppression takes effect. However, if the neighbor
relationship between Router B and Router C is prevented from being reestablished, the whole
network will be divided. Therefore, Hold-max-cost mode (rather than Hold-down mode) is
recommended. If flapping suppression works in Hold-max-cost mode, 65535 is used as the
cost of the link between Router B and Router C during the suppression period. After the
network stabilizes and the suppression timer expires, the link is restored.

NOTE

By default, the Hold-max-cost mode takes effect.

Figure 6-8 Flapping suppression in a single-forwarding path scenario

Router A Router E

cost=65535

Router B Router C

Broadcast scenario
In Figure 6-9, four devices are deployed on the same broadcast network using switches, and
the devices are broadcast network neighbors. If Router C flaps due to a link failure, and
Router A and Router B were deployed at different time (Router A was deployed earlier for
example) or the flapping suppression parameters on Router A and Router B are different,

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 347


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Router A first detects the flapping and suppresses Router C. Consequently, the Hello packets
sent by Router A do not carry Router C's router ID. However, Router B has not detected the
flapping yet and still considers Router C a valid node. As a result, the DR candidates
identified by Router A are Router B and Router D, whereas the DR candidates identified by
Router B are Router A, Router C, and Router D. Different DR candidates result in a different
DR election result, which may lead to route calculation errors. To prevent this problem in
scenarios where an interface has multiple neighbors, such as on a broadcast, P2MP, or NBMA
network, all neighbors on the interface are suppressed when the status of a neighbor
relationship last changes to ExStart or Down. Specifically, if Router C flaps, Router A,
Router B, and Router D on the broadcast network are all suppressed. After the network
stabilizes and the suppression timer expires, Router A, Router B, and Router D are restored to
normal status.

Figure 6-9 Flapping suppression on a broadcast network

Router A Router B

Router C Router D

Multi-area scenario
In Figure 6-10, Router A, Router B, Router C, Router E, and Router F are connected in area
1, and Router B, Router D, and Router E are connected in backbone area 0. Traffic from
Router A to Router F is preferentially forwarded along an intra-area route, and the forwarding
path is Router A -> Router B -> Router C -> Router E -> Router F. When the neighbor
relationship between Router B and Router C flaps and the flapping meets suppression
conditions, flapping suppression takes effect in the default mode (Hold-max-cost).
Consequently, 65535 is used as the cost of the link between Router B and Router C. However,
the forwarding path remains unchanged because intra-area routes take precedence over inter-
area routes during route selection according to OSPFv3 route selection rules. To prevent
traffic loss in multi-area scenarios, configure Hold-down mode to prevent the neighbor
relationship between Router B and Router C from being reestablished during the suppression
period. During this period, traffic is forwarded along the path Router A -> Router B -> Router
D -> Router E -> Router F.

NOTE

By default, the Hold-max-cost mode takes effect. The mode can be changed to Hold-down manually.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 348


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Figure 6-10 Flapping suppression in a multi-area scenario

Router C
Router A Router F

cost=10 cost=10
Area 1

Device
Area Router B Device
Router E
Area 0 B
0 cost=10
cost=10 cost=10

Router D

6.2.5 OSPFv3 and OSPFv2 Comparison


The following aspects of OSPFv3 and OSPFv2 are the same:
l Network type and interface type
l Interface state machine and neighbor state machine
l LSDB
l Flooding mechanism
l Hello, DD, LSR, LSU, and LSAck packets
l Route calculation
The following aspects of OSPFv3 and OSPFv2 are different:
l •OSPFv3 runs on IPv6, which is based on links rather than network segments.
This means that there is no need to configure OSPFv3 on interfaces in the same network
segment. It is only necessary that the interfaces enabled with OSPFv3 are on the same
link. Interfaces can also set up OSPFv3 sessions without IPv6 global addresses.
l OSPFv3 does not depend on IP addresses.
This separates topology calculation from IP addresses. OSPFv3 calculates a topology
without knowing the IPv6 global address, which only applies to virtual link interfaces for
packet forwarding.
l OSPFv3 packets and the LSA format have the following changes:
– OSPFv3 packets do not contain IP addresses.
– OSPFv3 router LSAs and network LSAs do not contain IP addresses, which are
advertised by Link LSAs and Intra Area Prefix LSAs.
– In OSPFv3, router IDs, area IDs, and LSA link state IDs no longer indicate IP
addresses, but the IPv4 address format is still reserved.
– In broadcast, NBMA, or P2MP networks, neighbors are identified by router IDs
instead of IP addresses.
l In OSPFv3, information about the flooding scope is added in the LSA Type field.
This allows OSPFv3 routers to process LSAs of unidentified types, which makes
processing more flexible.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 349


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

– OSPFv3 stores or floods unidentified packets, whereas OSPFv2 discards.


– OSPFv3 floods packets in an OSPF area or on a link. It sets the U flag bit of packets
(the flooding area is based on the link local) so that unidentified packets are stored
or forwarded to the stub area.
For example, RouterA and RouterB can identify LSAs of a certain type. They are
connected through RouterC, which, however, cannot identify this type of LSAs. When
RouterA floods an LSA of this type, RouterC can still flood the received LSA to
RouterB although it does not identify this LSA. RouterB then processes the LSA.
If OSPFv2 is run, RouterC discards the unidentified LSA so that the LSA cannot reach
RouterB.
l OSPFv3 supports multi-process on a link.
Only one OSPFv2 process can be configured on a physical interface.
In OSPFv3, one physical interface can be configured with multiple processes that are
identified by different instance IDs. That is, multiple OSPFv3 instances can run on one
physical link. They establish neighbor relationships with the other end of the link and
transmit packets to the other end without interfering with each other.
The resources of a link can be shared among OSPFv3 instances that simulate multiple
OSPFv3 routers, which improves the utilization of limited router resources.
l OSPFv3 uses IPv6 link-local addresses.
IPv6 implements neighbor discovery and automatic configuration based on link-local
addresses. Routers running IPv6 do not forward IPv6 packets whose destination address
is a link-local address. Those packets can only be exchanged on the same link. The
unicast link-local address starts from FE80/10.
As a routing protocol running on IPv6, OSPFv3 also uses link-local addresses to
maintain neighbor relationships and update LSDBs. Except Vlink interfaces, all OSPFv3
interfaces use link-local addresses as the source address and that of the next hop to
transmit OSPFv3 packets.
The advantages are as follows:
– OSPFv3 can calculate the topology without knowing the global IPv6 addresses so
that topology calculation is not based on IP addresses.
– The packets flooded on a link are not transmitted to other links, which prevents
unnecessary flooding and saves bandwidth.
l OSPFv3 packets do not contain authentication fields.
OSPFv3 directly adopts IPv6 authentication and security measures and does not need to
perform authentication. It only focuses on the processing of packets.
l OSPFv3 supports two new LSAs.
– Link LSA: A router floods a link LSA on the link where it resides to advertise its
link-local address and the configured global IPv6 address.
– Intra Area Prefix LSA: A router advertises an intra-area prefix LSA in the local
OSPF area to inform the other routers in the area or the network, which can be a
broadcast network or an NBMA network, of its IPv6 global address.
l OSPFv3 identifies neighbors based on router IDs only.
On broadcast, NBMA, and P2MP networks, OSPFv2 identifies neighbors based on IPv4
addresses of interfaces.
OSPFv3 identifies neighbors based on router IDs only. Thus, even if global IPv6
addresses are not configured or they are configured in different network segments,

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 350


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

OSPFv3 can still establish and maintain neighbor relationships so that topology
calculation is not based on IP addresses.

6.3 Summary of OSPFv3 Configuration Tasks


After basic OSPFv3 functions are configured, you can build a basic OSPFv3 network. If other
OSPFv3 functions are required, configure them according to reference sections. Table 6-6
describes the OSPFv3 configuration tasks.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 351


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Table 6-6 OSPFv3 configuration tasks


Scenario Description Task

Constructing a basic Before configuring OSPFv3, l 6.6 Configuring Basic


OSPFv3 network you must enable the OSPFv3 Functions
OSPFv3 process and specify l 6.7 Establishing or
the router ID. Other Maintaining OSPFv3
OSPFv3 functions then can Neighbor Relationship
be configured or take effect.
In practical applications,
establishing or maintaining
OSPFv3 neighbor
relationships is an important
precondition for the
construction of OSPFv3
networks. By implementing
the configuration tasks in
this section, you can:
l Change the OSPFv3
packet timer to adjust the
OSPFv3 network
convergence rate and
network load brought by
protocol packets.
l Configure the limit for
OSPFv3 retransmission
times. When
retransmitting packets,
OSPFv3 disconnects
from its neighbor if the
retransmission times
exceed the limit. This
prevents neighbors from
dead loops caused by
consecutive
retransmission when the
neighbor does not
receive the packet.
l Increase the OSPFv3
network convergence
rate by adjusting the
LSA updating and
receiving intervals.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 352


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Scenario Description Task

Configuring OSPFv3 special After the basic OSPFv3 l 6.8 Configuring


area attributes network is constructed, OSPFv3 Areas
OSPFv3 special area
attributes can be flexibly
used to deploy the OSPFv3
network according to actual
needs.
l OSPFv3 stub area: A
stub area is a special area
where ABRs do not
advertise the received
external routes. In a stub
area, the device routing
table size and routing
information in
transmission are greatly
reduced. To ensure the
reachability of a
destination outside the
AS, the ABR in the stub
area generates a default
route and advertises it to
the non-ABR routers in
the stub area.
l OSPFv3 NSSA: An
NSSA is also a special
area that resembles a
stub area in many ways.
The difference between
the two areas is that the
NSSA can introduce and
advertise routes outside
the AS to the entire
OSPF AS, without
learning external routes
sent from other areas on
the OSPF network.
l OSPFv3 virtual link: All
the non-backbone areas
need to be connected to
the backbone area in the
OSPFv3 deployment.
Otherwise, some areas
will be unreachable.
However, in actual
applications, physical
connectivity between the
non-backbone area and
backbone area cannot be

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 353


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Scenario Description Task

ensured because of
various limitations. In
this case, OSPFv3 virtual
links can be configured
between the ABRs in the
new non-backbone area
and those in the
backbone area.

Configuring OSPFv3 route In practical applications, to 6.9 Configuring OSPFv3


attributes meet the requirements of Route Attributes
complex network
environment, configure the
OSPFv3 route attributes to
change the OSPFv3 route
selection policies.

Controlling OSPFv3 routing In practical applications, to 6.10 Controlling OSPFv3


information meet the network Routing Information
requirements, configure
filtering of received and
advertised routes and route
aggregation, and control the
number of external routes
from the LSDB to
implement accurate control
of OSPFv3 routing
information.

Adjusting and optimizing Change the OSPFv3 packet 6.12 Optimizing an


OSPFv3 networks timer to adjust the OSPFv3 OSPFv3 Network
network convergence rate
and network load brought by
protocol packets. On some
low-rate links, the delay of
LSA transmission by
interfaces must be
considered. Adjust the SPF
calculation interval to
restrict resource
consumption caused by
frequent network changes.

Configuring OSPFv3 To facilitate network 6.13 Configuring an


dynamic host names planning, configure OSPFv3 OSPFv3 Dynamic
dynamic host names that are Hostname
easy to memorize to identify
routers.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 354


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Scenario Description Task

Configuring OSPFv3 IP With the development of 6.14 Configuring OSPFv3


FRR networks, Voice over IP IP FRR
(VoIP) and online video
services require high-quality
real-time transmission.
Nevertheless, if an OSPFv3
fault occurs, it takes more
than 50 ms to recover the
link from the fault, which
fails to meet the
requirements for real-time
services on the network.
Traditional OSPFv3 fault
recovery requires the
following processes to
switch traffic to a new link:
detecting the fault (at the
millisecond level), reporting
the fault to the routing
control plane (at the
millisecond level),
generating and flooding new
topology information (at the
tens-of-milliseconds level),
triggering SPF calculation
(at the tens-of-milliseconds
level), and notifying and
installing a new route (at the
hundreds-of-milliseconds
level).
With the pre-calculated
standby link, OSPFv3 IP
FRR can quickly switch
traffic to the standby link
without interrupting the
traffic when faults occur on
the active link. This protects
the traffic and greatly
improves the OSPFv3
network reliability.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 355


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Scenario Description Task

Configuring OSPFv3 GR To prevent route flapping 6.16 Configuring the


and interruption of traffic OSPFv3 GR Helper
forwarding caused by
OSPFv3 restart, enable the
OSPFv3 GR features.
After OSPFv3 is restarted,
the GR Restarter and the GR
Helper re-establish the
neighbor relationship,
exchange routing
information, synchronize the
database, and update the
routing table and forwarding
table. This implements
OSPFv3 fast convergence.

Configuring the OSPFv3 OSPFv3 supports the 6.19 Configuring the


network management network management Network Management
function function. You can bind Function of OSPFv3
OSPFv3 MIB to a process.
In addition, OSPFv3 also
supports fault and log
functions.

6.4 Licensing Requirements and Limitations for OSPFv3


Involved Network Elements
Other network elements also need to support OSPFv3.

Licensing Requirements
OSPFv3 is a basic feature of CE8800, CE7800, CE6800, and CE5800 series switches and is
not under license control.

Version Requirements

Table 6-7 Products and minimum version supporting OSPFv3


Product Minimum Version Required

CE8868EI V200R005C10

CE8861EI V200R005C10

CE8860EI V100R006C00

CE8850-32CQ-EI V200R002C50

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 356


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Product Minimum Version Required

CE8850-64CQ-EI V200R005C00

CE7850EI V100R003C00

CE7855EI V200R001C00

CE6810EI V100R003C00

CE6850EI V100R001C00

CE6850-48S6Q-HI V100R005C00

CE6850-48T6Q-HI/CE6850U-HI/ V100R005C10
CE6851HI

CE6855HI V200R001C00

CE6856HI V200R002C50

CE6857EI V200R005C10

CE6860EI V200R002C50

CE6865EI V200R005C00

CE6870-24S6CQ-EI/ V200R001C00
CE6870-48S6CQ-EI

CE6870-48T6CQ-EI V200R002C50

CE6875EI V200R003C00

CE6880EI V200R002C50

CE5880EI V200R005C10

CE5810EI V100R002C00

CE5850EI V100R001C00

CE5850HI V100R003C00

CE5855EI V200R002C50

Feature Limitations
In versions earlier than V200R002C50, the CE5855EI does not support IPv6. However,
interfaces on a CE5855EI provide the IPv6 capability when the switch functions as a leaf
switch in a super virtual fabric (SVF) system and the SVF forwarding mode is set to
centralized or hybrid. In V200R002C50 and later versions, the CE5855EI supports IPv6.

6.5 Default Settings for OSPFv3


Table 6-8 describes the default settings for OSPFv3.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 357


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Table 6-8 Default settings for OSPFv3


Parameter Default Setting

OSPFv3 Disabled

The interval of sending Hello For the interface of the broadcast type, the interval for
packets sending Hello packets is 10 seconds.

The dead interval of the The dead interval of OSPFv3 neighbor is 40 seconds for
OSPFv3 neighbor the interface of broadcast type.

The period during which a 500 seconds


switch keeps acting as a stub
router.

The bandwidth reference value 100 Mbit/s


used to calculate the link cost.

6.6 Configuring Basic OSPFv3 Functions

Applicable Environment
Before building OSPFv3 networks, you need to configure basic OSPFv3 functions. That is,
you must enable OSPFv3 and specify the interface, area ID and router ID before configuring
other functions.

Pre-configuration Tasks
Before configuring basic OSPFv3 functions, complete the following tasks:
l Enabling IPv6 capabilities
l Making the network layers of the adjacent nodes accessible

6.6.1 Enabling OSPFv3

Context
OSPFv3 supports multiple processes. Multiple OSPFv3 processes running on one switch 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 switchs.
In the format of an IPv4 address, a router ID is a 32-bit unsigned integer that uniquely
identifies a switch 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 switchs in an AS
are different. When multiple processes are enabled on a switch, 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.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 358


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Do as follows on the switch that runs OSPFv3.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ospfv3 [ process-id ] [ vpn-instance vpn-instance-name ]
OSPFv3 is enabled and the OSPFv3 view is displayed.
If a VPN instance is specified, the OSPFv3 process belongs to the specified VPN instance.
Otherwise, the OSPFv3 process belongs to the public network instances.
Step 3 Run router-id router-id
A Router ID is set.
If a router ID conflict occurs, perform either of the following operations:
l Reconfigure a router ID.
l Run the undo ospfv3 router-id auto-recover disable command to enable the router ID
automatic recovery function. After the function is enabled, the system automatically
allocates a new router ID.
NOTE

– If the automatic recovery function is enabled and a router ID conflict occurs between indirectly
connected switches in one OSPF area, the system replaces the conflicted router ID with a newly
calculated one. The automatic recovery function takes effect on both configured and automatically
generated router IDs.
– The system can replace a router ID in a maximum of three attempts in case the router ID conflict
persists.

Step 4 Run commit


The configuration is committed.

----End

6.6.2 Enabling OSPFv3 on an Interface

Context
After enabling OSPFv3 in the system view, you need to enable OSPFv3 on the interface.
Because an interface has multiple instances, you need to specify which instance of the
interface is enabled in the OSPFv3 process when 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 switch that runs OSPFv3.

Procedure
Step 1 Run system-view
The system view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 359


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Step 2 Run interface interface-type interface-number


The interface view is displayed.
Step 3 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ospfv3 process-id area area-id [ instance instance-id ]


OSPFv3 is enabled 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.
Step 5 (Optional) Run the ospfv3 network-type { broadcast | nbma | p2mp [ non-broadcast ] |
p2p } [ instance instance-id ] command to configure the network type of an interface.
NOTE

When an interface supports multi-instances, you must specify the value of instance-id when enabling OSPFv3
on the interface. If the value of instance-id is not specified, the default value 0 is adopted. In this case, the
configured network type of an interface mismatches the actual network type of the interface. This step is
mandatory in such a case.

Step 6 Run commit


The configuration is committed.

----End

6.6.3 Entering the OSPFv3 Area View

Context
When configuring the switchs in the same area, uniformly plan the configuration data..
Otherwise, neighbor switchs cannot exchange information with each other. This causes
congestion of routing information or routing loops.
Do as follows on the switch that runs OSPFv3.

Procedure
Step 1 Run system-view

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 360


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

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 entered as a decimal integer or in the IPv4 address format. However, it is
displayed in the IPv4 address format.

Step 4 Run commit

The configuration is committed.

----End

6.6.4 Verifying the Basic OSPFv3 Function Configuration

Prerequisites
The configurations for the Basic OSPFv3 Functions are complete.

Procedure
l Run the display ospfv3 [ process-id ] command to check the summary information about
the OSPFv3 process.
l Run the display ospfv3 [ process-id ] interface [ [ area area-id ] [ interface-type
interface-number ] | no-peer ] command to check the OSPFv3 interface information.
l Run the commands as follow to check the LSDB information about OSPFv3:
– display ospfv3 [ process-id ] lsdb [ area area-id ] [ originate-router advertising-
router-id | self-originate ] [ { external | grace | inter-prefix | inter-router | intra-
prefix | link | network | router | router-information | nssa } [ link-state-id ] ]
[ resolve-hostname | age { min-value min-age-value | max-value max-age-value }
*]

– display ospfv3 [ process-id ] lsdb [ area area-id ] hostname hostname [ { external


| grace | inter-prefix | inter-router | intra-prefix | link | network | router | router-
information | nssa } [ link-state-id ] ] [ age { min-value min-age-value | max-
value max-age-value }* ]
l Run the commands as follow to check the OSPFv3 routing table:
– display ospfv3 [ process-id ] routing [ [ ipv6-address prefix-length ] | ase-routes |
inter-routes | intra-routes | nssa-routes ] [ verbose ] [ age { min-value min-age-
value | max-value max-age-value } * ]
– display ospfv3 [ process-id ] routing statistics
l Run the display default-parameter ospfv3 command to check the default OSPFv3
configuration.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 361


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

6.7 Establishing or Maintaining OSPFv3 Neighbor


Relationship

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 posed by
protocol packets by modifying OSPFv3 timers.
l Enable OSPFv3 to be disconnected from its neighbor when the number of OSPFv3
packet retransmissions exceeds the threshold by configuring Retransmission Limitation
for OSPFv3. This prevents non-stop packet retransmissions if the neighbor does not
receive packets.
l 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:

l 6.6 Configuring Basic OSPFv3 Functions

6.7.1 Configuring the Interval for Sending Hello Packets

Context
Hello packets are periodically sent to the neighbor switch 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 be consistent. The value of the Hello timer is inversely proportional to the route
convergence speed and network load.

Do as follows on the switch 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 On an Ethernet interface, run undo portswitch

The interface is switched to Layer 3 mode.

By default, an Ethernet interface works in Layer 2 mode.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 362


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ospfv3 timer hello interval [ conservative ] [ instance instance-id ]


The interval for sending Hello packets is set on the interface.
To speed up OSPFv3 convergence in the case of a link failure, Configuring BFD for
OSPFv3 is recommended. If the remote end does not support BFD for OSPFv3 or you do not
want to configure BFD for OSPFv3, specify conservative when you run the ospfv3 timer
hello command. If the conservative mode is configured, the value configured for the dead
timer using the ospfv3 timer dead command takes effect even when the value is less than
10s; if the value configured for the dead timer is greater than 10s, services may be affected.

NOTE
The interval must be longer than or equal to the active/standby switchover period. Otherwise, a protocol
intermittent interruption may occur during the switchover. The default interval for sending Hello packets is
recommended.

Step 5 Run commit


The configuration is committed.

----End

6.7.2 Configuring Dead Time of Neighbor Relationship

Context
If a switch does not receive any Hello packet from its neighbor during a specified period, the
neighbor switch 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.
Do as follows on the switch 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 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 363


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

By default, an Ethernet interface works in Layer 2 mode.


The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ospfv3 timer dead interval [ instance instance-id ]


The dead time of the neighbor relationship is specified.

NOTE

If the dead interval of an OSPFv3 neighbor is shorter than 10s, the session may be closed. Therefore, if
dead interval is shorter than 10s, the actual dead interval of an OSPFv3 neighbor is not shorter than 10s.
If the conservative mode is configured using the ospfv3 timer hello command, the configured dead
timer takes effect even when its value is less than 10s.

Step 5 Run commit


The configuration is committed.

----End

6.7.3 Configuring the Interval for Retransmitting LSAs to


Neighboring switchs

Context
Do as follows on the switch 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 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 364


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ospfv3 timer retransmit interval [ instance instance-id ]

The interval for retransmitting LSAs to the adjacent routers is set.

The value of seconds must be greater than a round trip of one packet transmitted between two
switchs.

NOTE

Do not set a value which is too small, for the interval between LSA retransmissions. Otherwise,
unnecessary retransmissions may occur.

Step 5 Run commit

The configuration is committed.

----End

6.7.4 Configuring the Delay for Transmitting LSAs on the


Interface

Context
The LSA ages out in the LSDB of a local switch 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 switch 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 On an Ethernet interface, run undo portswitch

The interface is switched to Layer 3 mode.

By default, an Ethernet interface works in Layer 2 mode.

The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 365


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ospfv3 trans-delay interval [ instance instance-id ]

The delay in transmitting LSAs on the interface is set.

Step 5 Run commit

The configuration is committed.

----End

6.7.5 Verifying the OSPFv3 Neighbor Relationship Establishment


and Maintenance Configuration

Prerequisites
The configurations for the Establishing or Maintaining OSPFv3 Neighbor Relationship are
complete.

Procedure
l Run the display ospfv3 [ process-id ] command to check the summary information about
the OSPFv3 process.
l Run the display ospfv3 [ process-id ] interface [ [ area area-id ] [ interface-type
interface-number ] | no-peer ] command to check the OSPFv3 interface information.
l Run the commands as follow to check the LSDB information about OSPFv3:
– display ospfv3 [ process-id ] lsdb [ area area-id ] [ originate-router advertising-
router-id | self-originate ] [ { external | grace | inter-prefix | inter-router | intra-
prefix | link | network | router | router-information | nssa } [ link-state-id ] ]
[ resolve-hostname | age { min-value min-age-value | max-value max-age-value }
*]

– display ospfv3 [ process-id ] lsdb [ area area-id ] hostname hostname [ { external


| grace | inter-prefix | inter-router | intra-prefix | link | network | router | router-
information | nssa } [ link-state-id ] ] [ age { min-value min-age-value | max-
value max-age-value }* ]
l Run the commands as follow to check the OSPFv3 routing table:
– display ospfv3 [ process-id ] routing [ [ ipv6-address prefix-length ] | ase-routes |
inter-routes | intra-routes | nssa-routes ] [ verbose ] [ age { min-value min-age-
value | max-value max-age-value } * ]
– display ospfv3 [ process-id ] routing statistics
l Run the display default-parameter ospfv3 command to check the default OSPFv3
configuration.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 366


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

6.8 Configuring OSPFv3 Areas

Applicable Environment
To reduce the number of LSAs in the network and enhance OSPFv3 extensibility, define
OSPFv3 areas. For some non-backbone areas at the edge of ASs, you can define them as stub
areas for further reducing the size of the routing table and the number of LSAs.

Pre-configuration Tasks
Before configuring OSPFv3 area attributes, complete the following tasks:

l 6.6 Configuring Basic OSPFv3 Functions

6.8.1 Configuring OSPFv3 Stub Areas

Context
Do as follows on each switch 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.
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
switchs in the stub area.
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. The stub area without AS-
external-LSAs or Summary-LSAs is called a totally stub area.
Step 6 Run commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 367


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

The configuration is committed.

----End

6.8.2 Configuring an OSPFv3 NSSA

Context
An excessive number of entries in a routing table cause high CPU usage. To reduce the
number of entries in a routing table, configure a non-backbone area on the border of an AS as
a stub area or an NSSA to reduce the amount of routing information to be transmitted. For
details on how to configure an OSPFv3 stub area, see Configuring OSPF Stub Areas.

OSPFv3 stub areas cannot import or transmit external routes. If you need to import external
routes to an area and prevent these routes from consuming resources, configure the area as an
NSSA. NSSAs can import AS external routes and advertise them within the entire AS,
without learning external routes from other areas in the AS, which reduces bandwidth and
storage resource consumption on the device.

An NSSA requires NSSA attributes on all the devices in this area.

Pre-configuration Tasks
Before configuring an OSPFv3 NSSA, complete the following tasks:

l Configure an IP address for each interface to ensure that neighboring routers can use the
IP addresses to communicate with each other.
l Configure basic OSPFv3 functions.

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 area area-id

The OSPFv3 area view is displayed.

Step 4 Run nssa [ default-route-advertise [ cost cost | type type | tag tag ] * | no-import-route | no-
summary | translator-always | translator-interval translator-interval | set-n-bit ] *

The specified area is configured as an NSSA.

The usage scenarios of the nssa command are as follows:

l If default-route-advertise is set, Type 7 LSAs carrying the default route will be


generated, regardless of whether the route ::/0 exists in the routing table on an ABR;
such LSAs are generated only when the route ::/0 exists in the routing table on an ASBR.
l If an ASBR also functions as an ABR, setting no-import-route prevents external routes
imported using the import-route command from being advertised to the NSSA.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 368


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

l To reduce the number of LSAs to be transmitted to the NSSA, set no-summary on an


ABR to prevent the ABR from transmitting Summary LSAs (Type 3 LSAs) to the
NSSA.
l If set-n-bit is set, the DD packets sent by the device carry the N-bit being 1.
l If multiple ABRs are deployed in the NSSA, the system automatically selects an ABR
(generally the device with the largest router ID) as a translator to convert Type 7 LSAs
into Type 5 LSAs. You can also set translator-always on an ABR to specify the ABR as
an all-the-time translator. To specify two ABRs for load balancing, set translator-
always on the two ABRs to specify them as all-the-time translators, which prevents LSA
flooding caused by translator role changes.
l The translator-interval parameter is used to ensure uninterrupted services when
translator roles change. The value of translator-interval must be greater than the
flooding interval.
Step 5 Run commit
The configuration is committed.

----End

6.8.3 Verifying the OSPFv3 Area Configuration

Prerequisites
The configurations for the OSPFv3 Areas are complete.

Procedure
l Run the display ospfv3 [ process-id ] command to check the summary information about
the OSPFv3 process.
l Run the display ospfv3 [ process-id ] interface [ [ area area-id ] [ interface-type
interface-number ] | no-peer ] command to check the OSPFv3 interface information.
l Run the commands as follow to check the LSDB information about OSPFv3:
– display ospfv3 [ process-id ] lsdb [ area area-id ] [ originate-router advertising-
router-id | self-originate ] [ { external | grace | inter-prefix | inter-router | intra-
prefix | link | network | router | router-information | nssa } [ link-state-id ] ]
[ resolve-hostname | age { min-value min-age-value | max-value max-age-value }
*]

– display ospfv3 [ process-id ] lsdb [ area area-id ] hostname hostname [ { external


| grace | inter-prefix | inter-router | intra-prefix | link | network | router | router-
information | nssa } [ link-state-id ] ] [ age { min-value min-age-value | max-
value max-age-value }* ]
l Run the commands as follow to check the OSPFv3 routing table:
– display ospfv3 [ process-id ] routing [ [ ipv6-address prefix-length ] | ase-routes |
inter-routes | intra-routes | nssa-routes ] [ verbose ] [ age { min-value min-age-
value | max-value max-age-value } * ]
– display ospfv3 [ process-id ] routing statistics
l Run the display default-parameter ospfv3 command to check the default OSPFv3
configuration.
----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 369


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

6.9 Configuring OSPFv3 Route Attributes

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 Set the cost on the OSPFv3 interface.
l Configure load balancing among equal-cost routes.

Pre-configuration Tasks
Before configuring OSPFv3 route attributes, complete the following tasks:
l 6.6 Configuring Basic OSPFv3 Functions

6.9.1 Setting the Cost of the OSPFv3 Interface

Context
You can control route calculation by setting the link cost of OSPFv3 on different interfaces.
Do as follows on the switch 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 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 370


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Step 4 Run ospfv3 cost cost [ instance instance-id ]


The cost is set on the OSPFv3 interface.
By default, the link cost on an OSPFv3 interface is 1.
Step 5 Run commit
The configuration is committed.

----End

6.9.2 Setting the Maximum Number of Equal-Cost Routes

Context
Do as follows on the switch 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
The maximum number of equal-cost routes is set. The default value is 32 (64 on the
CE6870EI).
If the number of equal-cost routes is greater than number specified in the maximum load-
balancing number command, routes are selected for load balancing based on the following
criteria:
1. Route priority: Routes with smaller priority values are selected for load balancing.
2. Interface index: If routes have the same priority, those with greater interface index values
are selected for load balancing.
3. Next hop IP address: If routes have the same priority and interface index, those with
larger IP addresses are selected for load balancing.
Step 4 (Optional) Run nexthop router-id interface-type interface-number weight value
The preference for equal-cost routes is set.
OSPFv3 selects a next hop from these equal-cost routes according to the weight. The smaller
the weight is, the higher the route preference is.
By default, the preference is not set for equal-cost routes. That is, equal-cost routes forward
packets at the same time for load balancing.
Step 5 Run commit
The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 371


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

6.9.3 Verifying the OSPFv3 Route Attribute Configuration

Prerequisites
The configurations for the OSPFv3 Route Attributes are complete.

Procedure
l Run the display ospfv3 [ process-id ] interface [ [ area area-id ] [ interface-type
interface-number ] | no-peer ] command to check the OSPFv3 interface information.
l Run the commands as follow to check the LSDB information about OSPFv3:
– display ospfv3 [ process-id ] lsdb [ area area-id ] [ originate-router advertising-
router-id | self-originate ] [ { external | grace | inter-prefix | inter-router | intra-
prefix | link | network | router | router-information | nssa } [ link-state-id ] ]
[ resolve-hostname | age { min-value min-age-value | max-value max-age-value }
*]

– display ospfv3 [ process-id ] lsdb [ area area-id ] hostname hostname [ { external


| grace | inter-prefix | inter-router | intra-prefix | link | network | router | router-
information | nssa } [ link-state-id ] ] [ age { min-value min-age-value | max-
value max-age-value } * ]
l Run the commands as follow to check the OSPFv3 routing table:
– display ospfv3 [ process-id ] routing [ ipv6-address prefix-length | abr-routes |
asbr-routes | intra-routes | inter-routes | ase-routes | nssa-routes ] [ verbose ]
[ age { min-value min-age-value | max-value max-age-value } * ]
– display ospfv3 [ process-id ] routing statistics
----End

6.10 Controlling OSPFv3 Routing Information

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.

Pre-configuration Tasks
Before controlling OSPFv3 routing information, complete the following tasks:
l 6.6 Configuring Basic OSPFv3 Functions

6.10.1 Configuring OSPFv3 Route Aggregation

Context
If multiple continuous network segments exist in this area, use the abr-summary command to
summarize them into one network segment. In this way, the ABR only sends an LSA after
summarization. No LSA that belongs to the summarization network segment is separately
transmitted, reducing the LSDB size of other areas.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 372


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

When a large number of routes are imported, use the asbr-summary command to summarize
the imported routes and set the delay for advertising the summarized route. In this manner, the
summarized route advertised each time contains more valid routing information, and network
flapping caused by incorrect routing information is avoided.

Procedure
l Configure route summarization on an ABR.

Do as follows on the ABR that runs OSPFv3:

a. Run system-view

The system view is displayed.


b. Run ospfv3 [ process-id ]

The OSPFv3 view is displayed.


c. Run area area-id

The OSPFv3 area view is displayed.


d. Run abr-summary ipv6-address prefix-length [ cost cost | not-advertise ] *

Route summarization is configured in the OSPFv3 area.

cost cost set the cost of a summarized route. By default, the cost of a summarized
route is the maximum cost among those of routes that are summarized. The value
ranges from 1 to 16777214.

If not-advertise is set, no routing information of the network segment is advertised.


l Configure route summarization on an ASBR.

Do as follows on the ASBR that runs OSPFv3:

a. Run system-view

The system view is displayed.


b. Run ospfv3 [ process-id ]

The OSPFv3 view is displayed.


c. Run asbr-summary ipv6-address summary-prefix-length [ cost summary-cost | tag
summary-tag | distribute-delay dist-delay-interval | not-advertise ] *

Route summarization is configured on the ASBR.

cost cost specifies the cost of a summarized route. By default, the cost of a
summarized route is the maximum cost among those of routes that are summarized.
The value ranges from 1 to 16777214.

tag tag specifies the tag used to control route advertisement. The value of this
parameter ranges from 0 to 4294967295.

If not-advertise is specified in the command, the summarized IPv6 route that


matches a specified IPv6 prefix or prefix length is not advertised.

distribute-delay interval specifies the delay for advertising a summarized route.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 373


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

6.10.2 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 switch 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 | acl6-name acl6-name | ipv6-prefix ipv6-prefix-name |
route-policy route-policy-name } import
OSPFv3 is configured to filter the imported routes.
Using the filter-policy command, you can only filter the routes calculated by OSPFv3. Routes
that do not pass the filtering are neither added to the OSPFv3 routing table nor advertised.
Step 4 Run commit
The configuration is committed.

----End

6.10.3 Configuring OSPFv3 to Import External Routes

Context
OSPFv3 is a link-state routing protocol and cannot directly filter advertised LSAs, therefore
OSPFv3 must filter routes when importing them. In this way, only the routes that pass the
filtering criteria can be advertised.
Carry out the following steps on the switch 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 default { cost cost | tag tag | type type }*


Default parameters of imported routes are set.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 374


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Step 4 Run import-route { bgp [ permit-ibgp ] | direct | ripng help-process-id | static | isis help-
process-id | ospfv3 help-process-id } [ cost cost | type type | tag tag | route-policy route-
policy-name ]*
External routes are imported.

NOTE

Importing IBGP routes in an OSPFv3 process may lead to routing loops.


After the import-route command is executed on an OSPFv3 switch to import external routes, the switch
becomes an ASBR.

Step 5 (Optional) Run default-route-advertise [ [ always | permit-calculate-other ] | cost cost |


type type | tag tag | distribute-delay delay | route-policy route-policy-name ]*
Default routes are advertised to the OSPFv3 routing area.
Step 6 (Optional) Run filter-policy { acl6-number | acl6-name acl6-name | ipv6-prefix ipv6-prefix-
name } export [ protocol [ process-id ] ]
Imported external routes are filtered.
To filter a certain type of routes, you must specify protocol. If protocol is not specified,
OSPFv3 filters all imported routes.

NOTE

The filter-policy command takes effect only for the routes imported by an ASBR using the import-
route command. That is, the ASBR filters routes when importing the 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 command does not takes effect.

Step 7 Run import-route limit limit-number [ threshold-alarm { upper-limit upper-limit-value |


lower-limit lower-limit-value } * ]
A limit is configured on the number of LSAs generated when an OSPFv3 process imports
external routes.
If OSPFv3 imports a large number of external routes and advertises them to a device with a
smaller routing table capacity, the device may restart unexpectedly. To address this problem,
run the import-route limit command to configure a limit on the number of LSAs generated
when an OSPFv3 process imports external routes.
Ensure that upper-limit-value is greater than or equal to lower-limit-value.
Step 8 Run commit
The configuration is committed.

----End

6.10.4 (Optional) Configuring OSPFv3 to Filter LSAs in an Area


Context
After filtering conditions are set for the incoming or outgoing Type 3 LSAs (Inter-Area-Prefix
LSAs) in an area, only the Type 3 LSAs that meet the filtering conditions can be received or
advertised. This filters unnecessary LSAs, reduces the LSDB size, and increases network
convergence.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 375


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

This function is applicable only to the ABR.

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 area area-id
The OSPFv3 area view is displayed.
Step 4 Filter incoming or outgoing Type 3 LSAs in the area.
l Filter incoming Type 3 LSAs in the area.
Run the filter { acl6-number | acl6-name acl6-name | ipv6-prefix ipv6-prefix-name |
route-policy route-policy-name } import command to filter incoming Type 3 LSAs in
the area.
l Filter outgoing Type 3 LSAs in the area.
Run the filter { acl6-number | acl6-name acl6-name | ipv6-prefix ipv6-prefix-name |
route-policy route-policy-name } export command to filter outgoing Type 3 LSAs in the
area.
Step 5 Run commit
The configuration is committed.

----End

6.10.5 Verifying the OSPFv3 Routing Information Control


Configuration

Prerequisites
The configurations for Controlling OSPFv3 Routing Information are complete.

Procedure
l Run the display ospfv3 [ process-id ] command to check the summary information about
the OSPFv3 process.
l Run the display ospfv3 [ process-id ] interface [ [ area area-id ] [ interface-type
interface-number ] | no-peer ] command to check the OSPFv3 interface information.
l Run the commands as follow to check the LSDB information about OSPFv3:
– display ospfv3 [ process-id ] lsdb [ area area-id ] [ originate-router advertising-
router-id | self-originate ] [ { external | grace | inter-prefix | inter-router | intra-
prefix | link | network | router | router-information | nssa } [ link-state-id ] ]
[ resolve-hostname | age { min-value min-age-value | max-value max-age-value }
*]

– display ospfv3 [ process-id ] lsdb [ area area-id ] hostname hostname [ { external


| grace | inter-prefix | inter-router | intra-prefix | link | network | router | router-

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 376


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

information | nssa } [ link-state-id ] ] [ age { min-value min-age-value | max-


value max-age-value }* ]
l Run the commands as follow to check the OSPFv3 routing table:
– display ospfv3 [ process-id ] routing [ [ ipv6-address prefix-length ] | ase-routes |
inter-routes | intra-routes | nssa-routes ] [ verbose ] [ age { min-value min-age-
value | max-value max-age-value } * ]
– display ospfv3 [ process-id ] routing statistics
l Run the display default-parameter ospfv3 command to check the default OSPFv3
configuration.
----End

6.11 Configuring OSPFv3 Neighbor Relationship Flapping


Suppression

Context
If an interface carrying OSPFv3 services alternates between Up and Down, OSPFv3 neighbor
relationship flapping occurs on the interface. During the flapping, OSPFv3 frequently sends
Hello packets to reestablish the neighbor relationship, synchronizes LSDBs, and recalculates
routes. In this process, a large number of packets are exchanged, adversely affecting neighbor
relationship stability, OSPFv3 services, and other OSPFv3-dependent services, such as LDP
and BGP. OSPFv3 neighbor relationship flapping suppression can address this problem by
delaying OSPFv3 neighbor relationship reestablishment or preventing service traffic from
passing through flapping links.

Pre-configuration Tasks
Before configuring OSPFv3 neighbor relationship flapping suppression, complete the
following tasks:
l Configure an IP address for each interface to ensure that neighboring routers are
reachable at the network layer.
l Configure basic OSPFv3 functions.

Procedure
Step 1 Run system-view
The system view is displayed.
By default, OSPFv3 neighbor relationship flapping suppression is enabled globally. To disable
this function globally, run the suppress-flapping peer disable command in the OSPFv3 view.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
By default, OSPFv3 neighbor relationship flapping suppression is enabled on all interfaces in
the same OSPFv3 process. To disable the function from one of the interfaces, run the ospfv3
suppress-flapping peer disable command.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 377


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Step 3 On an Ethernet interface, run undo portswitch


The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ospfv3 suppress-flapping peer hold-down interval [ instance instance-id ]


The Hold-down mode is configured, and its duration is set.
Flapping suppression works in either Hold-down or Hold-max-cost mode.
l Hold-down mode: In the case of frequent flooding and topology changes during neighbor
relationship establishment, interfaces prevent neighbor relationship reestablishment
during Hold-down suppression, which minimizes LSDB synchronization attempts and
packet exchanges.
l Hold-max-cost mode: If the traffic forwarding path changes frequently, interfaces use
65535 as the cost of the flapping link during Hold-max-cost suppression, which prevents
traffic from passing through the flapping link.
Flapping suppression can also work first in Hold-down mode and then in Hold-max-cost
mode.
By default, the Hold-down mode is disabled, and the Hold-max-cost mode is enabled.
To disable the Hold-max-cost mode, run the ospfv3 suppress-flapping peer hold-max-cost
disable [ instance instance-id ] command.
Step 5 Run ospfv3 suppress-flapping peer { detecting-interval detecting-interval | threshold
threshold | resume-interval resume-interval } * [ instance instance-id ]
Detection parameters are configured for OSPFv3 neighbor relationship flapping suppression.
Each OSPFv3 interface on which OSPFv3 neighbor relationship flapping suppression is
enabled starts a flapping counter. If the interval between two successive neighbor status
changes from Full to a non-Full state is shorter than detecting-interval, a valid flapping_event
is recorded, and the flapping_count increases by 1. When the flapping_count reaches or
exceeds threshold, flapping suppression takes effect. If the interval between two successive
neighbor status changes from Full to a non-Full state is longer than resume-interval, the
flapping_count is reset.

NOTE
The value of resume-interval must be greater than that of detecting-interval.

By default, the detection interval of OSPFv3 neighbor relationship flapping suppression is


60s, the suppression threshold is 10, and the interval for exiting from suppression is 120s.
Using the default detection parameters is recommended.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 378


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Step 6 Run commit


The configuration is committed.

----End

Verifying the Configuration


Run the display ospfv3 [ process-id ] interface [ [ area area-id ] [ interface-type interface-
number ] | no-peer ] command to check the status of OSPFv3 neighbor relationship flapping
suppression.

6.12 Optimizing an OSPFv3 Network

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 6.6 Configuring Basic OSPFv3 Functions

6.12.1 Configuring the SPF Timer

Context
When the OSPFv3 link state database (LSDB) changes, SPF calculation needs to be
performed again. A shorter SPF calculation interval can increase the network convergence
speed, but also occupies more resources. If the network changes frequently, the bandwidth
may be used up. A longer SPF calculation interval occupies less resources, which prevents the
bandwidth from being used up due to frequent network changes. However, the network
convergence speed becomes slower in this scenario. Set the interval based on the actual
network.
Do as follows on the switch that runs OSPFv3.

Procedure
l Configure an SPF normal timer.
a. Run system-view
The system view is displayed.
b. Run ospfv3 [ process-id ]
The OSPFv3 view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 379


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

c. Run spf timers delay-interval hold-interval

An SPF normal timer is configured.


d. Run commit

The configuration is committed.


l Configure an SPF intelligent timer.
a. Run system-view

The system view is displayed.


b. Run ospfv3 [ process-id ]

The OSPFv3 view is displayed.


c. Run spf-schedule-interval { delay-interval hold-interval | intelligent-timer max-
interval start-interval hold-interval-1 }

An SPF intelligent timer is configured.


d. Run commit

The configuration is committed.

----End

6.12.2 Configuring a Route Calculation Delay to Suppress


Frequent LSA Flapping

Context
Frequent OSPFv3 LSA flapping may lead to route flapping, adversely affecting services. To
address this problem, run the maxage-lsa route-calculate-delay command to configure the
device to delay route calculation when it receives a MaxAge Router LSA, which suppresses
the frequent OSPFv3 LSA flapping that may occur.

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 maxage-lsa route-calculate-delay delay-interval

A route calculation delay is configured and will be triggered when the device receives a
MaxAge Router LSA.

By default, the delay is 20s.

Step 4 Run commit

The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 380


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Verifying the Configuration


Run the display ospfv3 [ process-id ] statistics maxage-lsa command to display information
about MaxAge Router LSAs.

6.12.3 Setting the Interval for Receiving LSAs

Context
When a network is unstable, control the minimum interval for receiving the same LSA
update. To prevent unnecessary LSA updates caused by network changes, by default, an
intelligent timer is enabled. The interval for receiving LSAs is expressed in milliseconds. The
maximum interval for updating LSAs is 1000 milliseconds (ms), the initial interval is 500 ms,
and the Holdtime interval is 500 ms.
Do as follows on the switch 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 lsa-arrival-interval { interval | intelligent-timer max-interval start-interval hold-
interval }
The interval for receiving LSAs is set.
Step 4 (Optional) Run lsa-arrival-interval suppress-flapping suppress-interval
The maximum OSPFv3 LSA suppression period is configured.
If frequent OSPFv3 LSA flapping occurs, the larger value between lsa-arrival-interval
suppress-flapping and lsa-arrival-interval is used to suppress LSA flapping.
By default, if the device receives an LSA, it delays route calculation for 10s.
Step 5 Run commit
The configuration is committed.

----End

6.12.4 Configuring an Intelligent Timer for Generating LSAs

Context
Setting the millisecond-level interval for generating the same LSA speeds up network
convergence. When a network becomes unstable, reduce the interval for generating the same
LSA by using an intelligent timer.
Do as follows on the switch that runs OSPFv3.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 381


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

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 lsa-originate-interval { 0 | intelligent-timer max-interval start-interval hold-interval
[ other-type interval ] | other-type interval [ intelligent-timer max-interval start-interval
hold-interval ] }
The interval for updating OSPFv3 LSAs by using an SPF intelligent timer is set.
By default, the maximum interval for updating LSAs is 5000 ms, the initial interval for
updating LSAs is 500 ms, the hold interval for updating LSAs is 1000 ms.
Step 4 (Optional) Run lsa-originate-interval suppress-flapping suppress-interval
The maximum OSPFv3 LSA suppression period is configured.
If frequent OSPFv3 LSA flapping occurs, the larger value between lsa-originate-interval
suppress-flapping and lsa-originate-interval is used to suppress LSA flapping.
By default, if the device receives an LSA, it delays route calculation for 10s.
Step 5 Run commit
The configuration is committed.

----End

6.12.5 Disabling OSPFv3 LSA Aging Management

Context
If an exception occurs in the age field of LSAs, LSAs may be aged unexpectedly, causing
LSA flapping or a route calculation error. For example, if the abnormal aging time is 2500s
and the actual aging time is 500s, LSAs are aged prematurely. To address this problem,
OSPFv3 LSA aging management is enabled by default. If the aging time in a received LSA is
greater than 1800s, OSPFv3 considers the LSA abnormal and changes the aging time to 1700s
until the aging time values of all LSAs in the area become the same. In this case, routes can be
calculated correctly.
By default, the OSPFv3 LSA aging management function is enabled. To disable this function,
run the lsa-age refresh disable command.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run lsa-age refresh disable
OSPFv3 LSA aging management is disabled.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 382


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Step 3 Run commit


The configuration is committed.

----End

6.12.6 Suppressing an Interface from Sending and Receiving


OSPFv3 Packets

Context
To prevent a switch from advertising routes to the switch on a certain network and from
importing the routes of other switchs, you can suppress the interface on which OSPFv3 is
enabled from receiving and sending OSPFv3 packets.
Do as follows on the switch 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 { all | interface-type interface-number }
The interface is suppressed from sending and receiving OSPFv3 packets.
Step 4 Run commit
The configuration is committed.

----End

Follow-up Procedure
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 switch. No OSPFv3 neighbor relationship can
be set up on the interface. Therefore, the OSPFv3 adaptability is enhanced.

6.12.7 Configuring DR Priority of an Interface

Context
The DR priority on a switch interface qualifies the interface for the DR election. If the DR
priority is 0, the switch cannot be elected as a DR or BDR.
Do as follows on the switch that runs OSPFv3.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 383


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 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 On an Ethernet interface, run undo portswitch

The interface is switched to Layer 3 mode.

By default, an Ethernet interface works in Layer 2 mode.

The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ospfv3 dr-priority priority [ instance instance-id ]

The DR priority of the interface is set.

Step 5 Run commit

The configuration is committed.

----End

Follow-up Procedure
After the DR priority is changed, you can re-elect a DR or BDR through the following
methods, which, however, will result in the interruption of the OSPFv3 neighbor relationship
between switchs and therefore are used only when necessary.

l Restarting all switchs.


l Running the shutdown and undo shutdown commands on the interface on which the
OSPFv3 neighbor relationship is set up.

6.12.8 Configuring a Stub Router

Context
A stub router is used to control traffic and instructs other OSPFv3 routers not to use it to
forward data. Other OSPF routers can have a route to the stub router.

Do as follows on the switch that runs OSPFv3:

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 384


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

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-router [ on-startup [ interval ] ]
The switch is configured as a stub router.

NOTE

A stub router configured using this command bears no similarity to a switch in a stub area.

Step 4 Run commit


The configuration is committed.

----End

6.12.9 Ignoring MTU Check on DD Packets

Context
Do as follows on the switch 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 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run ospfv3 mtu-ignore [ instance instance-id ]

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 385


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

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.

Step 5 Run commit

The configuration is committed.

----End

6.12.10 Verifying the OSPFv3 Network Optimization


Configuration

Prerequisites
The configurations for Optimizing an OSPFv3 Network are complete.

Procedure
l Run the display ospfv3 [ process-id ] command to check the summary information about
the OSPFv3 process.
l Run the display ospfv3 [ process-id ] interface [ [ area area-id ] [ interface-type
interface-number ] | no-peer ] command to check the OSPFv3 interface information.
l Run the commands as follow to check the LSDB information about OSPFv3:
– display ospfv3 [ process-id ] lsdb [ area area-id ] [ originate-router advertising-
router-id | self-originate ] [ { external | grace | inter-prefix | inter-router | intra-
prefix | link | network | router | router-information | nssa } [ link-state-id ] ]
[ resolve-hostname | age { min-value min-age-value | max-value max-age-value }
*]

– display ospfv3 [ process-id ] lsdb [ area area-id ] hostname hostname [ { external


| grace | inter-prefix | inter-router | intra-prefix | link | network | router | router-
information | nssa } [ link-state-id ] ] [ age { min-value min-age-value | max-
value max-age-value }* ]
l Run the commands as follow to check the OSPFv3 routing table:
– display ospfv3 [ process-id ] routing [ [ ipv6-address prefix-length ] | ase-routes |
inter-routes | intra-routes | nssa-routes ] [ verbose ] [ age { min-value min-age-
value | max-value max-age-value } * ]
– display ospfv3 [ process-id ] routing statistics
l Run the display default-parameter ospfv3 command to check the default OSPFv3
configuration.

----End

6.13 Configuring an OSPFv3 Dynamic Hostname


Compared with router IDs, Open Shortest Path First (OSPFv3) dynamic hostnames are easier
to memorize. Therefore, using dynamic hostnames to identify routers can facilitate network
management.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 386


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Pre-configuration Tasks
Before configuring a dynamic hostname, complete the following tasks:
l Configure an IP address for each interface to ensure that neighboring routers can use the
IP addresses to communicate with each other.
l 6.6 Configuring Basic OSPFv3 Functions

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 hostname [ hostname ]
An OSPFv3 dynamic hostname is configured.

NOTE
If you specify hostname in hostname command, hostname is advertised as the dynamic hostname. If no
hostname is specified in hostname command, the hostname specified in the sysname command is
advertised as the dynamic hostname.

Step 4 Run commit


The configuration is committed.

----End

Verifying the Configuration


Run the display ospfv3 hostname-table command to check OSPFv3 hostname information.

6.14 Configuring OSPFv3 IP FRR

Applicable Environment
With the development of networks, Voice over IP (VoIP) and on-line video services require
high-quality real-time transmission. Nevertheless, if an OSPFv3 fault occurs, traffic can be
switched to a new link after far more than 50 ms, which does not meet the requirement for
real-time services on the network.
Normally, traffic can be switched to a new link after the following processes: fault detection
in milliseconds, notifying the fault to the routing control plane in milliseconds, generating and
flooding new topology information in tens of milliseconds, triggering SPF calculation in tens
of milliseconds, and notifying and installing a new route in hundreds of milliseconds. As a
result, all the processes take far more than 50 milliseconds.
With OSPFv3 IP FRR that calculates a backup link in advance, devices can rapidly switch
traffic to the backup link without interrupting services when the primary link becomes faulty.
This protects traffic and greatly improves the reliability of OSPFv3 networks.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 387


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Pre-configuration Tasks
Before Configuring OSPFv3 IP FRR, complete the following tasks:
l 6.6 Configuring Basic OSPFv3 Functions
l (Optional) Configuring Global BFD
l (Optional) Configuring BFD for OSPF Feature or (Optional) Configuring BFD on
the Specified Interface

Procedure
Step 1 Enabling OSPFv3 IP FRR
1. Run system-view
The system view is displayed.
2. Run ospfv3 [ process-id ]
An OSPFv3 process is enabled, and the OSPFv3 view is displayed.
3. Run frr
The OSPFv3 IP FRR view is displayed.
4. Run loop-free-alternate
OSPFv3 IP FRR is enabled, and a loop-free backup link is generated.

NOTE

OSPFv3 can generate a loop-free backup link only when the OSPFv3 IP FRR traffic protection
inequality is met.
5. (Optional) Run frr-policy route route-policy route-policy-name
An OSPFv3 IP FRR filtering policy is configured.
After the OSPFv3 IP FRR filtering policy is configured, only the OSPFv3 backup routes
that match the filtering conditions of the policy can be added to the forwarding table.
6. (Optional) Run tiebreaker { node-protecting | lowest-cost } preference preference
The solution of selecting a backup path for OSPFv3 IP FRR is set.
By default, the solution of selecting a backup path for OSPFv3 IP FRR is node-
protection path first. In some cases, the solution needs to be changed to smallest-cost
path first because of data forwarding capacity or link cost consideration. By default, the
bigger-cost path is selected as the backup path. To change the solution of selecting a
backup path for OSPFv3 IP FRR to smallest-cost path first, run the tiebreaker
command. After the command is run, smallest-cost path is selected as the backup path.
7. Run commit
The configuration is committed.
Step 2 (Optional) Blocking FRR on an OSPFv3 Interface
1. In system view, run: interface interface-type interface-number
The view of the OSPFv3 interface running FRR is displayed.
2. Run ospfv3 frr block [ instance instance-id ]
FRR is blocked on the OSPFv3 interface.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 388


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

3. Run commit

The configuration is committed.

Step 3 (Optional) Binding IP FRR and BFD


OSPFv3 IP FRR requires the lower layer to fast respond to the link change so that traffic can
be rapidly switched to the backup link if the primary link fails.
1. Bind IP FRR and BFD in an OSPFv3 process.
– Run system-view
The system view is displayed.
– Run ospfv3
An OSPFv3 process is enabled, and the OSPFv3 view is displayed.
– Run bfd all-interfaces frr-binding
IP FRR and BFD are bound in the OSPFv3 process.
– Run commit
The configuration is committed.
2. Bind IP FRR and BFD on a specified OSPFv3 interface.
– Run system-view
The system view is displayed.
– Run interface interface-type interface-number
An interface view is displayed.
– Run ospfv3 bfd frr-binding
IP FRR and BFD are bound on the interface.
– Run commit
The configuration is committed.

----End

Verifying the Configuration


Run the display ospfv3 [ process-id ] routing verbose command to view the primary link and
backup link after OSPFv3 IP FRR is enabled.

6.15 Configuring BFD for OSPFv3

Usage Scenario
To speed up OSPFv3 convergence when the link status changes, you can configure BFD for
OSPFv3 links.

BFD detects links much faster than keep-alive protocols do. If OSPFv3 is bound to BFD
sessions, BFD can notify OSPFv3 of link failures immediately, and then OSPFv3 perform
route calculation and convergence in the new network topology.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 389


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Pre-configuration Tasks
Before configuring BFD for OSPFv3, complete the following tasks:
l Configure basic OSPFv3 functions.

Configuration Procedure

Figure 6-11 Flowchart for configuring BFD for OSPFv3

Configure global BFD

Configure BFD for OSPFv3

Prevent an interface from


dynamically setting up a BFD session

Configure BFD on the specified


interface

Mandatory procedure
Optional procedure

6.15.1 Configuring BFD Globally

Context
On the two devices that need to establish a BFD session, you can configure BFD for all the
interfaces in a certain OSPFv3 process.

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 bfd all-interfaces enable
BFD for OSPFv3 is enabled to establish a BFD session.
By default, BFD is disabled in an OSPFv3 process.
Step 4 Run commit
The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 390


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

6.15.2 Configuring BFD for OSPFv3

Context
After enabling BFD for OSPFv3, you need to configure BFD parameters in the OSPFv3
process.

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 bfd all-interfaces { min-receive-interval receive-interval | min-transmit-interval


transmit-interval | detect-multiplier multiplier-value | frr-binding } *

OSPFv3 BFD parameters are configured.

By default, BFD parameters are not configured in an OSPFv3 process.

Step 4 Run commit

The configuration is committed.

----End

6.15.3 (Optional) Preventing an Interface from Dynamically


Setting Up a BFD Session

Context
After the bfd all-interfaces enable command is used in an OSPFv3 process, the following
situations occur:

l On a P2P network, all OSPFv3 interfaces whose neighbor status is Up set up dynamic
BFD sessions.
l On a broadcast network, all OSPFv3 interfaces whose neighbor status is Up set up
dynamic sessions between DRs and non-DRs.

To prevent certain interfaces from setting up dynamic BFD sessions, perform the following
steps on the interfaces:

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run interface interface-type interface-number

The interface view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 391


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Step 3 Run ospfv3 bfd block


The interface is prevented from dynamically setting up BFD sessions.
Step 4 Run commit
The configuration is committed.

----End

6.15.4 (Optional) Configuring BFD for a Specified Interface


Context
To configure BFD only on a specified interface, or enable an interface to detect link failures
faster after BFD for OSPFv3 is enabled globally, perform the following steps on the interface:

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 bfd enable
BFD is enabled on the interface to establish a BFD session.
When BFD is configured globally and the neighbor status is Full, OSPFv3 establishes BFD
sessions on all the neighbors in the process using default BFD parameters.
You can run the ospfv3 bfd { min-transmit-interval min-transmit-value | min-receive-
interval min-receive-value | detect-multiplier multiplier-value | frr-binding } * [ instance
instance-id ] command to set parameters for BFD sessions.

NOTE

l The BFD configured on an interface takes precedence over that configured in a process. Specifically,
if BFD is enabled on an interface, BFD parameters on the interface are used to establish BFD
sessions.
l If the parameters of a BFD session are set but the ospfv3 bfd enable command is not run, BFD
cannot be enabled.

Step 4 Run commit


The configuration is committed.

----End

6.15.5 Verifying the BFD for OSPFv3 Configuration


Procedure
l Run the display ospfv3 [ process-id ] bfd session [ interface-type interface-number ]
[ neighbor-id ] [ verbose ] command to check information about the BFD session.
----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 392


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

6.16 Configuring the OSPFv3 GR Helper

Context
GR is a technology used to ensure normal traffic forwarding and non-stop forwarding of key
services during the restart of routing protocols. GR is one of high availability (HA)
technologies. HA technologies comprise a set of comprehensive techniques, such as fault-
tolerant redundancy, link protection, faulty node recovery, and traffic engineering. As a fault-
tolerant redundancy technology, GR is widely used to ensure non-stop forwarding of key
services during the master/slave switchover and system upgrade.

NOTE

The switch can be configured as a GR helper rather than a GR restarter.

Pre-configuration Tasks
Before configuring OSPFv3 GR, complete the following tasks:

l Configuring a link layer protocol


l Configuring IP addresses for interfaces to ensure that neighboring nodes are reachable at
the network layer
l 6.6 Configuring Basic OSPFv3 Functions

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 helper-role [ { ip-prefix ip-prefix-name | acl-number acl-number | acl-name acl-


name } | max-grace-period period | planned-only | lsa-checking-ignore ]*

OSPFv3 GR is enabled.

By default, the OSPFv3 GR helper function is disabled.

Step 4 Run commit

The configuration is committed.

----End

Verifying the Configuration


Run the display ospfv3 [ process-id ] graceful-restart-information command to view the
OSPFv3 GR status.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 393


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

6.17 Configuring OSPFv3 IPSec


OSPFv3 IPSec provides a complete set of IPSec mechanisms to authenticate sent and
received OSPFv3 packets, protecting devices against forged OSPFv3 packets.

Pre-configuration Tasks
Before Configuring OSPFv3 IPSec, complete the following task:
6.6 Configuring Basic OSPFv3 Functions

6.17.1 Configuring Basic IPSec Functions

Context
IPsec can be configured to prevent protocol packets from being intercepted or faked on a
simple network.
A security association (SA) must be established so that IPSec can protect protocol packets.
An SA is a unidirectional logical connection set up for security purpose and specifies the
elements used by two IPSec peers (two parties that use the IPSec protocol to protect protocol
packets between them). The elements of an SA include the following:
l Security protocol
l Authentication or encryption algorithm supported by the security protocol
l Protocol packet encapsulation mode
l Security parameter index (SPI) of the SA
l Authentication key or encryption key of the SA
The first three elements are specified in an IPSec proposal. To configure IPSec functions, first
configure an IPSec proposal on the IPSec peers, and then configure an SA.

Procedure
Step 1 Configure an IPSec proposal.
1. Run system-view
The system view is displayed.
2. Run ipsec proposal proposal-name
An IPSec proposal is created and the IPSec proposal view is displayed.
3. Run transform { ah | esp }
A security protocol is specified for the IPSec proposal.
By default, the security protocol used by an IPSec proposal is the Encapsulation Security
Protocol (ESP).
4. An authentication or encryption algorithm is configured.
– If AH is used, you can only configure the AH-specific authentication algorithm
because AH only authenticates packets.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 394


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Run the ah authentication-algorithm { md5 | sha1 | sha2-256 | sha2-384 |


sha2-512 } command to specify the authentication algorithm for the AH protocol.
By default, no authentication algorithm is used for AH.
– When ESP is specified, ESP can authenticate, or encrypt and authenticate packets.
Configure the ESP-specific authentication or encryption algorithm.
n Run the esp authentication-algorithm { md5 | sha1 | sha2-256 | sha2-384 |
sha2-512 } command to specify the authentication algorithm for the ESP
protocol.
By default, no authentication algorithm is used for ESP.
n Run the esp encryption-algorithm { 3des | aes { 128 | 192 | 256 } | des |
null } command to specify the encryption algorithm for the ESP protocol.
By default, no encryption algorithm is used for ESP. If encryption is not
required, specify null.
5. Run encapsulation-mode transport

A packet encapsulation mode is specified for the security protocol.

By default, the packet encapsulation mode is tunnel.

NOTE

Currently, only the transport mode is supported on the device.


In transport mode, the packet encryption device and decryption device must be the originator and
receiver of packets.
The MD5, SHA-1, DES and 3DES algorithms are not recommended because they cannot meet
your security defense requirements.
6. Run quit

Return to the system view.


7. Run commit

The configuration is committed.

Step 2 Configure an IPSec SA.


1. Run ipsec sa sa-name

An IPSec SA is created and the IPSec SA view is displayed.

By default, no IPSec SA exists in the system.


2. Run proposal proposal-name

The IPSec proposal is bound to the IPSec SA.

By default, an IPSec policy does not reference any IPSec proposal.

NOTE

An IPSec can use only one IPSec proposal. To bind a new IPSec proposal to the IPSec SA, delete
the original IPSec proposal.
3. Run sa spi { inbound | outbound } { ah | esp } spi-number

An SPI is configured for the SA.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 395


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

NOTE

– An SPI uniquely identifies an SA. Each SA must be configured with an inbound SPI and an
outbound SPI. The outbound SPI on the local end must be the same as the inbound SPI on the
remote end.
– The security protocol (AH or ESP) you select when configuring the SPI must be the same as
that used in the IPSec proposal bound to the SA.
4. Configure a key according to the security protocol used in the IPSec proposal bound to
the SA.
– If the AH protocol is used, you can configure an authentication key that is a
hexadecimal number or a character string.
n Run the sa authentication-hex { inbound | outbound } ah [ cipher ] hex-
string command to configure a hexadecimal authentication key.
n Run the sa string-key { inbound | outbound } ah [ cipher ] string-key
command to configure a character string as the authentication key.
– If the ESP protocol is used, you can run one of the following commands to
configure the authentication key or the encryption key. You can also configure both
the authentication key and encryption key. If the two keys are configured at the
same time, they can only be hexadecimal keys.
n Run the sa authentication-hex { inbound | outbound } esp [ cipher ] hex-
string command to configure a hexadecimal authentication key.
n Run the sa string-key { inbound | outbound } esp [ cipher ] string-key
command to configure a character string as the authentication key.
n Run the sa encryption-hex { inbound | outbound } esp [ cipher ] hex-string
command to configure a hexadecimal encryption key.
NOTE

– The security protocol (AH or ESP) you select when configuring the key must be the same as
that used in the IPSec proposal bound to the SA.
– The outbound key on the local end must be the same as the inbound key on the remote end.
– The IPSec peers must use the authentication or encryption key in the same format. For
example, if the key on one end is a character string but the key on the other end is a
hexadecimal number, the IPSec tunnel cannot be set up.
– If you configure multiple keys in different formats, the last configured key takes effect.
5. Run quit
Return to the system view.
6. Run commit
The configuration is committed.

----End

6.17.2 Configuring OSPFv3 IPSec Authentication


Context
Do as follows on the switch that runs OSPFv3.
NOTE

To ensure the device forwarding, you are advised to configure OSPFv3 IPSec on all the devices running
OSPFv3.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 396


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Procedure
l OSPFv3 uses the SA to authenticate packets in the specified OSPFv3 process.
a. Run system-view

The system view is displayed.


b. Run ospfv3 [ process-id ]

The OSPFv3 process view is displayed.


c. Run ipsec sa sa-name

An SA is configured in the OSPFv3 process.

By default, no SA is configured in the OSPFv3 process.

An OSPFv3 process can be associated with multiple OSPFv3 areas. An SA applied


in the OSPFv3 process can be used in the associated areas.
d. Run commit

The configuration is committed.


l OSPFv3 uses the SA to authenticate packets in the specified OSPFv3 area.
a. Run system-view

The system view is displayed.


b. Run ospfv3 [ process-id ]

The OSPFv3 process view is displayed.


c. Run area area-id

The OSPFv3 area view is displayed.


d. Run ipsec sa sa-name

An SA is configured in the OSPFv3 area.

By default, no SA is configured in the OSPFv3 area.

NOTE

The SA configured on an OSPFv3 area takes precedence over that configured in an OSPFv3
process.
e. Run commit

The configuration is committed.


l OSPFv3 uses the SA to authenticate packets sent and received by the interface.
a. Run system-view

The system view is displayed.


b. Run interface interface-type interface-number

The interface view is displayed.


c. On an Ethernet interface, run undo portswitch

The interface is switched to Layer 3 mode.

By default, an Ethernet interface works in Layer 2 mode.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 397


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

The mode switching function takes effect when the interface only has attribute
configurations (for example, shutdown and description configurations).
Alternatively, if configuration information supported by both Layer 2 and Layer 3
interfaces exists (for example, mode lacp and lacp system-id configurations), no
configuration that is not supported after the working mode of the interface is
switched can exist. If unsupported configurations exist on the interface, delete the
configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch
batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in
the system view to switch these interfaces to Layer 3 mode in batches.
d. Run ospfv3 ipsec sa sa-name
An SA is configured on the interface.
By default, no SA is configured in the OSPFv3 interface.

NOTE

The SA configured on an OSPFv3 interface takes precedence over that configured in an


OSPFv3 process and an OSPFv3 area.
e. Run commit
The configuration is committed.
----End

6.17.3 Verifying the OSPFv3 IPSec Configuration

Procedure
l Run the display ipsec proposal [ name proposal-name ] command to check IPSec
proposal information.
l Run the display ipsec sa [ name sa-name ] [ brief ] command to check information
about a Security Association (SA).
l Run the display ipsec statistics [ sa-name sa-name ] [ slot slot-number ] command to
check statistics about packets processed by IPSec.
----End

6.18 Improving OSPFv3 Network Security


In OSPFv3 authentication, an authentication field is added to each OSPFv3 packet for
encryption. When a local device receives an OSPFv3 packet from a remote device, the local
device discards the packet if the authentication password carried in the packet is different
from the local one, which protects the local device against potential attacks. Therefore,
OSPFv3 authentication improves network security.

Procedure
l Configure OSPFv3 area authentication.
a. Run system-view

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 398


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

The system view is displayed.


b. Run ospfv3 [ process-id ]

The OSPFv3 process view is displayed.


c. Run area area-id

The OSPFv3 area view is displayed.


d. Run authentication-mode hmac-sha256 key-id key-id { plain plain-text |
[ cipher ] cipher-text }

OSPFv3 area authentication is configured.

NOTE

If you use OSPFv3 area authentication, the authentication and password configurations on all
switch in the same area must be the same.
e. Run commit

The configuration is committed.


l Configure OSPFv3 process authentication.
a. Run system-view

The system view is displayed.


b. Run ospfv3 [ process-id ]

The OSPFv3 process view is displayed.


c. Run authentication-mode hmac-sha256 key-id key-id { plain plain-text |
[ cipher ] cipher-text }

OSPFv3 process authentication is configured.


d. Run commit

The configuration is committed.


l Configure OSPFv3 interface authentication.
a. Run system-view

The system view is displayed.


b. Run interface interface-type interface-number

The interface view is displayed.


c. On an Ethernet interface, run undo portswitch

The interface is switched to Layer 3 mode.

By default, an Ethernet interface works in Layer 2 mode.

The mode switching function takes effect when the interface only has attribute
configurations (for example, shutdown and description configurations).
Alternatively, if configuration information supported by both Layer 2 and Layer 3
interfaces exists (for example, mode lacp and lacp system-id configurations), no
configuration that is not supported after the working mode of the interface is
switched can exist. If unsupported configurations exist on the interface, delete the
configurations first and then run the undo portswitch command.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 399


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch
batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in
the system view to switch these interfaces to Layer 3 mode in batches.
d. Run ospfv3 authentication-mode hmac-sha256 key-id key-id { plain plain-text |
[ cipher ] cipher-text } [ instance instance-id ]

OSPFv3 interface authentication is configured.

NOTE

OSPFv3 interface authentication takes precedence over OSPFv3 area authentication.


If you use OSPFv3 interface authentication, the authentication and password configurations on all
the interfaces on the same network segment must be the same.
e. Run commit

The configuration is committed.

----End

6.19 Configuring the Network Management Function of


OSPFv3

Applicable Environment
OSPFv3 supports the network management function. You can bind OSPFv3 MIB and a
certain OSPFv3 process. In addition, OSPFv3 also supports the trap function and the log
function.

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

l 6.6 Configuring Basic OSPFv3 Functions

6.19.1 Configuring OSPFv3 MIB Binding

Context
When multiple OSPFv3 processes are enabled, you can configure OSPFv3 MIB to select the
process to be processed, that is, configure OSPFv3 MIB to select the process to which it is
bound.

Do as follows on the OSPFv3 switch.

Procedure
Step 1 Run system-view

The system view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 400


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Step 2 Run ospfv3 mib-binding process-id

OSPFv3 MIB binding OSPFv3 process is configured.

Step 3 Run commit

The configuration is committed.

----End

6.19.2 Configuring OSPFv3 Trap

Context
Do as follows on the OSPFv3 switch.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run snmp-agent trap enable feature-name ospfv3 [ trap-name { ifconfigerror |


ifrxbadpacket | ifstatechange | nbrrestarthelperstatuschange | ospfv3nbrstatechange |
hwospfv3peerflappingsuppressstatuschange } ]

The trap function for the OSPFv3 module is enabled.

Step 3 Run commit

The configuration is committed.

----End

6.19.3 Verifying the OSPFv3 Network Management Function


Configuration

Prerequisites
The configurations of the network management function of OSPFv3 are complete.

Procedure
l Run the display current-configuration command to check the configuration currently
validated on the switch.

----End

6.20 Resetting OSPFv3

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 401


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Context

The OSPFv3 adjacency is removed when you reset the OSPFv3 connection. Exercise caution
when running this command.

After modifying the OSPFv3 routing policy or protocol, reset the OSPFv3 connection to
validate the modification. To reset OSPFv3 connections, run the following reset ospfv3
command in the user view.

Procedure
l To validate the new configuration, run the following commands:
– reset ospfv3 { process-id | all }
– reset ospfv3 { process-id | all } counters [ neighbor [ interface-type interface-
number ] [ router-id ] ]
– reset ospfv3 { process-id | all } counters maxage-lsa
– reset ospfv3 process-id suppress-flapping peer [interface-type interface-number ]
[ notify-peer ]
– reset ospfv3 { process-id | all } peer [ interface-type interface-number ] router-id
----End

6.21 Configuration Examples for OSPFv3


This section only provides configuration examples for individual features. For details about
multi-feature configuration examples, feature-specific configuration examples, interoperation
examples, protocol or hardware replacement examples, and industry application examples, see
the Typical Configuration Examples.

6.21.1 Example for Configuring Basic OSPFv3 Functions


Networking Requirements
As shown in Figure 6-12, all switchs run OSPFv3. The entire autonomous system is divided
into three areas. Switch B and Switch C serve as ABRs to forward the inter-area routes.
After the configuration, each router should learn the routes from the AS to all network
segments.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 402


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Figure 6-12 Networking diagram of configuring OSPFv3 areas

Area0 10GE1/0/1
SwitchB VLANIF10 SwitchC
FC00:0:0:1000::2/64
10GE1/0/1
10GE1/0/2 VLANIF10
10GE1/0/2
VLANIF20 FC00:0:0:1000::1/64
VLANIF30
FC00:0:0:1001::1/64 FC00:0:0:1002::1/64
10GE1/0/2 10GE1/0/1
VLANIF20 VLANIF30
FC00:0:0:1001::2/64 FC00:0:0:1002::2/64
SwitchA SwitchD
10GE1/0/1
VLANIF40
FC00:0:0:2000::1/64
Area2
Area1

Configuration Roadmap
The configuration roadmap is as follows:
1. Enable basic OSPFv3 functions on each switch.
2. Check the routing list and LSDB.

Procedure
Step 1 Assign an IPv6 address to each interface. The detailed configuration is not mentioned here.

Step 2 Configure basic OSPFv3 functions.


# Configure Switch A.
[~SwitchA] ospfv3
[*SwitchA-ospfv3-1] router-id [Link]
[*SwitchA-ospfv3-1] quit
[*SwitchA] interface vlanif 20
[*SwitchA-Vlanif20] ospfv3 1 area 1
[*SwitchA-Vlanif20] quit
[*SwitchA] interface vlanif 40
[*SwitchA-Vlanif40] ospfv3 1 area 1
[*SwitchA-Vlanif40] quit
[*SwitchA] commit

# Configure Switch B.
[~SwitchB] ospfv3
[*SwitchB-ospfv3-1] router-id [Link]

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 403


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

[*SwitchB-ospfv3-1] quit
[*SwitchB] interface vlanif 10
[*SwitchB-Vlanif10] ospfv3 1 area 0
[*SwitchB-Vlanif10] quit
[*SwitchB] interface vlanif 20
[*SwitchB-Vlanif20] ospfv3 1 area 1
[*SwitchB-Vlanif20] quit
[*SwitchB] commit

# Configure Switch C.
[~SwitchC] ospfv3
[*SwitchC-ospfv3-1] router-id [Link]
[*SwitchC-ospfv3-1] quit
[*SwitchC] interface vlanif 10
[*SwitchC-Vlanif10] ospfv3 1 area 0
[*SwitchC-Vlanif10] quit
[*SwitchC] interface vlanif 30
[*SwitchC-Vlanif30] ospfv3 1 area 2
[*SwitchC-Vlanif30] quit
[*SwitchC] commit

# Configure Switch D.
[~SwitchD] ospfv3
[*SwitchD-ospfv3-1] router-id [Link]
[*SwitchD-ospfv3-1] quit
[*SwitchD] interface vlanif 30
[*SwitchD-Vlanif30] ospfv3 1 area 2
[*SwitchD-Vlanif30] quit
[*SwitchD] commit

Step 3 Verify the configuration.


#View the neighbors of Switch B, and you can see that the status of the neighbor relationship
between Switch B and other devices is Full.
[~SwitchB] display ospfv3 peer
OSPFv3 Process (1)
Total number of peer(s): 2
Peer(s) in full state: 2
OSPFv3 Area ([Link])
Neighbor ID Pri State Dead Time Interface Instance ID
[Link] 1 Full/DR 00:00:32 Vlanif10 0
OSPFv3 Area ([Link])
Neighbor ID Pri State Dead Time Interface Instance ID
[Link] 1 Full/Backup 00:00:34 Vlanif20 0

# Display the OSPFv3 neighbors of SwitchC.


[~SwitchC] display ospfv3 peer
OSPFv3 Process (1)
Total number of peer(s): 2
Peer(s) in full state: 2
OSPFv3 Area ([Link])
Neighbor ID Pri State Dead Time Interface Instance ID
[Link] 1 Full/Backup 00:00:37 Vlanif10 0
OSPFv3 Area ([Link])
Neighbor ID Pri State Dead Time Interface Instance ID
[Link] 1 Full/DR 00:00:33 Vlanif30 0

# Display the OSPFv3 routing table of SwitchD.


[~SwitchD] display ospfv3 routing

Codes : E2 - Type 2 External, E1 - Type 1 External, IA - Inter-Area,


N - NSSA
Flags : A - Added to URT6

OSPFv3 Process (1)

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 404


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Destination Metric
Next-hop
IA FC00:0:0:1000::/64 2
via FE80::225:9EFF:FE01:211, Vlanif30, Flags : A
IA FC00:0:0:1001::/64 3
via FE80::225:9EFF:FE01:211, Vlanif30, Flags : A
FC00:0:0:1002::/64 1
directly connected, Vlanif30, Flags : A
IA FC00:0:0:2000::/64 4
via FE80::225:9EFF:FE01:211, Vlanif30, Flags : A

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 20 40
#
ospfv3 1
router-id [Link]
area [Link]
#
interface Vlanif20
ipv6 enable
ipv6 address FC00:0:0:1001::2/64
ospfv3 1 area [Link]
#
interface Vlanif40
ipv6 enable
ipv6 address FC00:0:0:2000::1/64
ospfv3 1 area [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 40
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 10 20
#
ospfv3 1
router-id [Link]
area [Link]
area [Link]
#
interface Vlanif10
ipv6 enable
ipv6 address FC00:0:0:1000::1/64
ospfv3 1 area [Link]
#
interface Vlanif20
ipv6 enable
ipv6 address FC00:0:0:1001::1/64
ospfv3 1 area [Link]
#
interface 10GE1/0/1
port link-type trunk

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 405


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

port trunk allow-pass vlan 10


#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
return
l Configuration file of SwitchC
#
sysname SwitchC
#
vlan batch 10 30
#
ospfv3 1
router-id [Link]
area [Link]
area [Link]
#
interface Vlanif10
ipv6 enable
ipv6 address FC00:0:0:1000::2/64
ospfv3 1 area [Link]
#
interface Vlanif30
ipv6 enable
ipv6 address FC00:0:0:1002::1/64
ospfv3 1 area [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
return
l Configuration file of SwitchD
#
sysname SwitchD
#
vlan batch 30
#
ospfv3 1
router-id [Link]
area [Link]
#
interface Vlanif30
ipv6 enable
ipv6 address FC00:0:0:1002::2/64
ospfv3 1 area [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
return

6.21.2 Example for Configuring OSPFv3 Route Summarization on


an ABR
Networking Requirements
Routes with the same IPv6 prefix can be summarized into one route. On a large-scale OSPFv3
network, route lookup may slow down because of the large size of the routing table. To reduce

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 406


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

the routing table size and simplify management, configure route summarization. With route
summarization, if a link connected to a device within an IPv6 address range that has been
summarized alternates between Up and Down, the link status change is not advertised to the
devices beyond the IPv6 address range. This prevents route flapping and improves network
stability.
In Figure 6-13, all devices run OSPFv3. To reduce the routing table size, simplify route
management, and improve network stability, it is required that the ABR be configured to
summarize the routes with the same prefix (FC00:0:0::) into route FC00:0:0::/48 and advertise
it only to area 0.

Figure 6-13 Example for configuring OSPFv3 route summarization on an ABR

SwitchC

10
FC GE 1 FC
00
00 /0/ :0: 10G
:0: 1 0:1 E
0:1
00 00 1/0
3:: Area 0 SwitchB
3::
1/6 2/6 /3
4 4 10GE 1/0/1
FC00:0:0:1001::1/64
Area 1 10GE 1/0/1
FC00:0:0:1001::2/64
/2
/ 64 E 1/0 64
1 :: 1 G 2/
1 /0/ 002 10 02:: ABR
1 10
GE :0: :0:
10 00:0 : 0
FC 00
FC

SwitchA

Configuration Roadmap
The configuration roadmap is as follows:
1. Assign an IP address to each interface to ensure that devices on the network can
communicate with each other.
2. Configure basic OSPFv3 functions on all devices.
3. Configure OSPFv3 route summarization on the ABR.

Procedure
Step 1 Configure an IP address for each interface.
# Configure SwitchA. The configurations of SwitchB, SwitchC are similar to the
configuration of SwitchA.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 407


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

[*HUAWEI] commit
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] undo portswitch
[*SwitchA-10GE1/0/1] ipv6 enable
[*SwitchA-10GE1/0/1] ipv6 address fc00:0:0:1002::1 64
[*SwitchA-10GE1/0/1] quit
[*SwitchA] commit

# Configure the ABR.


<HUAWEI> system-view
[~HUAWEI] sysname ABR
[*HUAWEI] commit
[~ABR] interface 10ge 1/0/1
[~ABR-10GE1/0/1] undo portswitch
[*ABR-10GE1/0/1] ipv6 enable
[*ABR-10GE1/0/1] ipv6 address fc00:0:0:1001::2 64
[*ABR-10GE1/0/1] quit
[*ABR] interface 10ge 1/0/2
[*ABR-10GE1/0/2] undo portswitch
[*ABR-10GE1/0/2] ipv6 enable
[*ABR-10GE1/0/2] ipv6 address fc00:0:0:1002::2 64
[*ABR-10GE1/0/2] quit
[*ABR] interface 10ge 1/0/3
[*ABR-10GE1/0/3] undo portswitch
[*ABR-10GE1/0/3] ipv6 enable
[*ABR-10GE1/0/3] ipv6 address fc00:0:0:1003::2 64
[*ABR-10GE1/0/3] quit
[*ABR] commit

Step 2 Configure basic OSPFv3 functions.


# Configure SwitchA.
[~SwitchA] ospfv3 1
[*SwitchA-ospfv3-1] router-id [Link]
[*SwitchA-ospfv3-1] area [Link]
[*SwitchA-ospfv3-1-area-[Link]] quit
[*SwitchA-ospfv3-1] quit
[*SwitchA] commit
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] ospfv3 1 area 1
[*SwitchA-10GE1/0/1] quit
[*SwitchA] commit

# Configure SwitchB.
[~SwitchB] ospfv3 1
[*SwitchB-ospfv3-1] router-id [Link]
[*SwitchB-ospfv3-1] area [Link]
[*SwitchB-ospfv3-1-area-[Link]] quit
[*SwitchB-ospfv3-1] quit
[*SwitchB] commit
[~SwitchB] interface 10ge 1/0/1
[~SwitchB-10GE1/0/1] ospfv3 1 area 0
[*SwitchB-10GE1/0/1] quit
[*SwitchB] commit

# Configure SwitchC.
[~SwitchC] ospfv3 1
[*SwitchC-ospfv3-1] router-id [Link]
[*SwitchC-ospfv3-1] area [Link]
[*SwitchC-ospfv3-1-area-[Link]] quit
[*SwitchC-ospfv3-1] quit
[*SwitchC] commit
[~SwitchC] interface 10ge 1/0/1
[~SwitchC-10GE1/0/1] ospfv3 1 area 1
[*SwitchC-10GE1/0/1] quit
[*SwitchC] commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 408


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

# Configure the ABR.


[~ABR] ospfv3 1
[*ABR-ospfv3-1] router-id [Link]
[*ABR-ospfv3-1] area [Link]
[*ABR-ospfv3-1-area-[Link]] quit
[*ABR-ospfv3-1] area [Link]
[*ABR-ospfv3-1-area-[Link]] quit
[*ABR-ospfv3-1] quit
[*ABR] commit
[~ABR] interface 10ge 1/0/1
[~ABR-10GE1/0/1] ospfv3 1 area 0
[*ABR-10GE1/0/1] quit
[*ABR] interface 10ge 1/0/2
[*ABR-10GE1/0/2] ospfv3 1 area 1
[*ABR-10GE1/0/2] quit
[*ABR] interface 10ge 1/0/3
[*ABR-10GE1/0/3] ospfv3 1 area 1
[*ABR-10GE1/0/3] quit
[*ABR] commit

# Run the display ospfv3 peer command to check whether the ABR establishes an OSPFv3
neighbor relationship with SwitchA, SwitchB, and SwitchC. The following example uses the
command output on the ABR:
[~ABR] display ospfv3 peer

OSPFv3 Process
(1)

Total number of peer(s):


3

Peer(s) in full state:


3

OSPFv3 Area
([Link])

Neighbor ID Pri State Dead Time Interface Instance


ID
[Link] 1 Full/Backup 00:00:39 10GE1/0/1
0
OSPFv3 Area
([Link])

Neighbor ID Pri State Dead Time Interface Instance


ID
[Link] 1 Full/Backup 00:00:31 10GE1/0/2
0
[Link] 1 Full/Backup 00:00:32 10GE1/0/3
0

# Run the display ospfv3 lsdb command on the ABR to check the OSPFv3 LSDB
information. The Inter-area-prefix LSA field in the LSDB of area 1 shows that no
summarization is performed for the routes. Therefore, the routes advertised to area 0 are not
summarized.
[~ABR] display ospfv3 lsdb

OSPFv3 Router with ID ([Link]) (Process


1)

Link-LSA (Interface
10GE1/0/1)

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 409


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Link State ID Origin Router Age Seq# CkSum


Prefix
[Link] [Link] 190 0x80000001 0x7edd
1
[Link] [Link] 1125 0x80000001 0xd1c8
1

Link-LSA (Interface
10GE1/0/2)

Link State ID Origin Router Age Seq# CkSum


Prefix
[Link] [Link] 391 0x80000002 0x854f
1
[Link] [Link] 938 0x80000002 0x56f3
1

Link-LSA (Interface
10GE1/0/3)

Link State ID Origin Router Age Seq# CkSum


Prefix
[Link] [Link] 692 0x80000001 0xc969
1
[Link] [Link] 885 0x80000002 0x2e65
1

Router-LSA (Area
[Link])

Link State ID Origin Router Age Seq# CkSum


Link
[Link] [Link] 150 0x80000002 0x7782
1
[Link] [Link] 149 0x80000005 0x2738
1

Network-LSA (Area
[Link])

Link State ID Origin Router Age Seq#


CkSum
[Link] [Link] 149 0x80000002
0x38ec

Inter-Area-Prefix-LSA (Area
[Link])

Link State ID Origin Router Age Seq#


CkSum
[Link] [Link] 938 0x80000001
0xd0fd
[Link] [Link] 885 0x80000001
0xd8f3

Intra-Area-Prefix-LSA (Area
[Link])

Link State ID Origin Router Age Seq# CkSum Prefix


Reference
[Link] [Link] 149 0x80000002 0x635f 1 Network-
LSA

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 410


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Router-LSA (Area
[Link])

Link State ID Origin Router Age Seq# CkSum


Link
[Link] [Link] 391 0x80000002 0x696a
1
[Link] [Link] 687 0x80000002 0x46d7
1
[Link] [Link] 390 0x80000003 0x5602
2

Network-LSA (Area
[Link])

Link State ID Origin Router Age Seq#


CkSum
[Link] [Link] 686 0x80000001
0x41df
[Link] [Link] 401 0x80000001
0x976a

Inter-Area-Prefix-LSA (Area
[Link])

Link State ID Origin Router Age Seq#


CkSum
[Link] [Link] 950 0x80000001
0xc808

Intra-Area-Prefix-LSA (Area
[Link])

Link State ID Origin Router Age Seq# CkSum Prefix


Reference
[Link] [Link] 697 0x80000001 0xad12 1 Network-
LSA
[Link] [Link] 401 0x80000001 0xfc9d 1 Network-
LSA
[~ABR] display ospfv3 lsdb inter-
prefix

OSPFv3 Router with ID ([Link]) (Process


1)

Inter-Area-Prefix-LSA (Area
[Link])

LS Age:
1006

LS Type: Inter-Area-Prefix-
LSA

Link State ID:


[Link]

Originating Router:
[Link]

LS Seq Number:

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 411


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

0x80000001

Retransmit Count:
0

Checksum:
0xd0fd

Length:
36

Metric:
1

Prefix:
FC00:0:0:1002::/64

Prefix Options: 0
(-|-|-|-|-)

LS Age:
953

LS Type: Inter-Area-Prefix-
LSA

Link State ID:


[Link]

Originating Router:
[Link]

LS Seq Number:
0x80000001

Retransmit Count:
0

Checksum:
0xd8f3

Length:
36

Metric:
1

Prefix:
FC00:0:0:1003::/64

Prefix Options: 0
(-|-|-|-|-)

Inter-Area-Prefix-LSA (Area
[Link])

LS Age:
1007

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 412


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

LS Type: Inter-Area-Prefix-
LSA

Link State ID:


[Link]

Originating Router:
[Link]

LS Seq Number:
0x80000001

Retransmit Count:
0

Checksum:
0xc808

Length:
36

Metric:
1

Prefix: FC00:0:0:1001::/64
Prefix Options: 0
(-|-|-|-|-)

Step 3 Configure the ABR to summarize the routes with the same prefix in area 1 into route
FC00:0:0::/48.
[~ABR] ospfv3 1
[*ABR-ospfv3-1] area [Link]
[*ABR-ospfv3-1-area-[Link]] abr-summary fc00:0:0:: 48
[*ABR-ospfv3-1-area-[Link]] quit
[*ABR-ospfv3-1] quit
[*ABR] commit

Step 4 Verify the configuration.

Run the display ospfv3 lsdb command on the ABR to check the OSPFv3 LSDB information.
The following command output shows that the routes with the same prefix in area 1 have been
summarized into route FC00:0:0::/48 and that the summarized route is advertised to area 0.
[~ABR] display ospfv3 lsdb

OSPFv3 Router with ID ([Link]) (Process


1)

Link-LSA (Interface
10GE1/0/1)

Link State ID Origin Router Age Seq# CkSum


Prefix
[Link] [Link] 675 0x80000001 0x7edd
1
[Link] [Link] 1610 0x80000001 0xd1c8
1

Link-LSA (Interface
10GE1/0/2)

Link State ID Origin Router Age Seq# CkSum

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 413


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Prefix
[Link] [Link] 876 0x80000002 0x854f
1
[Link] [Link] 1423 0x80000002 0x56f3
1

Link-LSA (Interface
10GE1/0/3)

Link State ID Origin Router Age Seq# CkSum


Prefix
[Link] [Link] 1177 0x80000001 0xc969
1
[Link] [Link] 1370 0x80000002 0x2e65
1

Router-LSA (Area
[Link])

Link State ID Origin Router Age Seq# CkSum


Link
[Link] [Link] 635 0x80000002 0x7782
1
[Link] [Link] 634 0x80000005 0x2738
1

Network-LSA (Area
[Link])

Link State ID Origin Router Age Seq#


CkSum
[Link] [Link] 634 0x80000002
0x38ec

Inter-Area-Prefix-LSA (Area
[Link])

Link State ID Origin Router Age Seq#


CkSum
[Link] [Link] 20 0x80000001
0x17d7

Intra-Area-Prefix-LSA (Area
[Link])

Link State ID Origin Router Age Seq# CkSum Prefix


Reference
[Link] [Link] 634 0x80000002 0x635f 1 Network-
LSA

Router-LSA (Area
[Link])

Link State ID Origin Router Age Seq# CkSum


Link
[Link] [Link] 876 0x80000002 0x696a
1
[Link] [Link] 1172 0x80000002 0x46d7
1
[Link] [Link] 875 0x80000003 0x5602
2

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 414


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Network-LSA (Area
[Link])

Link State ID Origin Router Age Seq#


CkSum
[Link] [Link] 1171 0x80000001
0x41df
[Link] [Link] 875 0x80000001
0x976a

Inter-Area-Prefix-LSA (Area
[Link])

Link State ID Origin Router Age Seq#


CkSum
[Link] [Link] 1438 0x80000001
0xc808

Intra-Area-Prefix-LSA (Area
[Link])

Link State ID Origin Router Age Seq# CkSum Prefix


Reference
[Link] [Link] 1185 0x80000001 0xad12 1 Network-
LSA
[Link] [Link] 889 0x80000001 0xfc9d 1 Network-
LSA
[~ABR] display ospfv3 lsdb inter-prefix

OSPFv3 Router with ID ([Link]) (Process


1)

Inter-Area-Prefix-LSA (Area
[Link])

LS Age:
76

LS Type: Inter-Area-Prefix-
LSA

Link State ID:


[Link]

Originating Router:
[Link]

LS Seq Number:
0x80000001

Retransmit Count:
0

Checksum:
0x17d7

Length:
36

Metric:
1

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 415


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Prefix:
FC00::/48

Prefix Options: 0
(-|-|-|-|-)

Inter-Area-Prefix-LSA (Area
[Link])

LS Age:
1480

LS Type: Inter-Area-Prefix-
LSA

Link State ID:


[Link]

Originating Router:
[Link]

LS Seq Number:
0x80000001

Retransmit Count:
0

Checksum:
0xc808

Length:
36

Metric:
1

Prefix:
FC00:0:0:1001::/64

Prefix Options: 0
(-|-|-|-|-)

# Run the display ospfv3 abr-summary-list command on the ABR to check information
about the summarized route.
[~ABR] display ospfv3 abr-summary-list

OSPFv3 Process
(1)

Area ID :
[Link]

Prefix Prefix-Len Matched


Status
FC00:: 48 2 [Active]
Advertised

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 416


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Configuration Files
l SwitchA configuration file
#
sysname SwitchA
#
ospfv3 1
router-id [Link]
area [Link]
#
interface 10GE 1/0/1
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:1002::1/64
ospfv3 1 area [Link]
#
return

l SwitchB configuration file


#
sysname SwitchB
#
ospfv3 1
router-id [Link]
area [Link]
#
interface 10GE 1/0/1
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:1001::1/64
ospfv3 1 area [Link]
#
return

l SwitchC configuration file


#
sysname SwitchC
#
ospfv3 1
router-id [Link]
area [Link]
#
interface 10GE 1/0/1
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:1003::1/64
ospfv3 1 area [Link]
#
return

l ABR configuration file


#
sysname ABR
#
ospfv3 1
router-id [Link]
area [Link]
area [Link]
abr-summary FC00:: 48
#
interface 10GE 1/0/1
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:1001::2/64
ospfv3 1 area [Link]
#
interface 10GE 1/0/2
undo portswitch
ipv6 enable

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 417


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

ipv6 address FC00:0:0:1002::2/64


ospfv3 1 area [Link]
#
interface 1/0/3
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:1003::2/64
ospfv3 1 area [Link]
#
return

6.21.3 Example for Configuring OSPFv3 Route Summarization on


an ASBR

Networking Requirements
Routes with the same IPv6 prefix can be summarized into one route. On a large-scale OSPFv3
network, route lookup may slow down because of the large size of the routing table. To reduce
the routing table size and simplify management, configure route summarization. With route
summarization, if a link connected to a device within an IPv6 address range that has been
summarized alternates between Up and Down, the link status change is not advertised to the
devices beyond the IPv6 address range. This prevents route flapping and improves network
stability.

In Figure 6-14, both the ASBR and SwitchA run OSPFv3. The ASBR imports three static
routes with the same prefix: FC00:0:0:1001::1/96,C00:0:0:1002::1/96,00:0:0:1003::1/96. To
reduce the routing table size, simplify route management, and improve network stability, it is
required that the ASBR be configured to summarize the three static routes into route
FC00::/16 and advertise it only to area 0.

Figure 6-14 Example for configuring OSPFv3 route summarization on an ASBR

FC00:0:0:1001::1/96
Area 0

ASBR
10GE1/0/1
FC00:0:0:1002::1/96 FC00:0:0:1000::1/64
SwitchA
10GE1/0/1
FC00:0:0:1000::2/64

FC00:0:0:1003::1/96

Configuration Roadmap
The configuration roadmap is as follows:

1. Assign an IP address to each interface to ensure that devices on the network can
communicate with each other.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 418


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

2. Configure basic OSPFv3 functions on the ASBR and SwitchA.


3. Configure three static routes and import them to OSPFv3.
4. Configure OSPFv3 route summarization on the ASBR.

Procedure
Step 1 Configure an IP address for each interface.
# Configure SwitchA.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] undo portswitch
[*SwitchA-10GE1/0/1] ipv6 enable
[*SwitchA-10GE1/0/1] ipv6 address fc00:0:0:1000::1 64
[*SwitchA-10GE1/0/1] quit
[*SwitchA] commit

# Configure the ASBR.


<HUAWEI> system-view
[~HUAWEI] sysname ASBR
[*HUAWEI] commit
[~ASBR] interface 10ge 1/0/1
[~ASBR-10GE1/0/1] undo portswitch
[*ASBR-10GE1/0/1] ipv6 enable
[*ASBR-10GE1/0/1] ipv6 address fc00:0:0:1000::2 64
[*ASBR-10GE1/0/1] quit
[*ASBR] commit

Step 2 Configure basic OSPFv3 functions.


# Configure SwitchA.
[~SwitchA] ospfv3 1
[*SwitchA-ospfv3-1] router-id [Link]
[*SwitchA-ospfv3-1] area [Link]
[*SwitchA-ospfv3-1-area-[Link]] quit
[*SwitchA-ospfv3-1] quit
[*SwitchA] commit
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] ospfv3 1 area 0
[*SwitchA-10GE1/0/1] quit
[*SwitchA] commit

# Configure the ASBR.


[~ASBR] ospfv3 1
[*ASBR-ospfv3-1] router-id [Link]
[*ASBR-ospfv3-1] area [Link]
[*ASBR-ospfv3-1-area-[Link]] quit
[*ASBR-ospfv3-1] quit
[*ASBR] commit
[~ASBR] interface 10ge 1/0/1
[~ASBR-10GE1/0/1] ospfv3 1 area 0
[*ASBR-10GE1/0/1] quit
[*ASBR] commit

# Run the display ospfv3 peer command to check whether an OSPFv3 neighbor relationship
is established between Switch A and the ASBR. The following example uses the command
output on the ASBR:
[~ASBR] display ospfv3
peer

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 419


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

OSPFv3 Process
(1)

Total number of peer(s):


1

Peer(s) in full state:


1

OSPFv3 Area
([Link])

Neighbor ID Pri State Dead Time Interface Instance


ID
[Link] 1 Full/Backup 00:00:39 10GE1/0/1
0

Step 3 Configure three static routes


(FC00:0:0:1001::1/96,FC00:0:0:1002::1/96,FC00:0:0:1003::1/96) and import them to
OSPFv3.
[~ASBR] ipv6 route-static fc00:0:0:1001::1 96 NULL0
[*ASBR] ipv6 route-static fc00:0:0:1002::1 96 NULL0
[*ASBR] ipv6 route-static fc00:0:0:1003::1 96 NULL0
[*ASBR] commit
[~ASBR] ospfv3 1
[*ASBR-ospfv3-1] import-route static
[*ASBR-ospfv3-1] quit
[~ASBR] commit

# Run the display ospfv3 lsdb command on the ASBR to check the OSPFv3 LSDB
information. The AS-external LSA field information shows the three static
routes:FC00:0:0:1001::/96,FC00:0:0:1002::/96 and FC00:0:0:1003::/96.
[~ASBR] display ospfv3 lsdb

OSPFv3 Router with ID ([Link]) (Process


1)

Link-LSA (Interface
10GE1/0/1)

Link State ID Origin Router Age Seq# CkSum


Prefix
[Link] [Link] 354 0x80000001 0x81ba
1
[Link] [Link] 334 0x80000001 0xe7b5
1

Router-LSA (Area
[Link])

Link State ID Origin Router Age Seq# CkSum


Link
[Link] [Link] 295 0x80000002 0xf138
1
[Link] [Link] 15 0x80000003 0x1a4e
1

Network-LSA (Area
[Link])

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 420


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Link State ID Origin Router Age Seq#


CkSum
[Link] [Link] 294 0x80000001
0xe64c

Intra-Area-Prefix-LSA (Area
[Link])

Link State ID Origin Router Age Seq# CkSum Prefix


Reference
[Link] [Link] 294 0x80000001 0x3b93 1 Network-
LSA

AS-External-
LSA

Link State ID Origin Router Age Seq# CkSum


Type
[Link] [Link] 10 0x80000001 0x164b
E2
[Link] [Link] 10 0x80000001 0x1e41
E2
[Link] [Link] 10 0x80000001 0x2637
E2
[~ASBR] display ospfv3 lsdb external

OSPFv3 Router with ID ([Link]) (Process


1)

AS-External-
LSA

LS Age:
69

LS Type: AS-External-
LSA

Link State ID:


[Link]

Originating Router:
[Link]

LS Seq Number:
0x80000001

Retransmit Count:
0

Checksum:
0x164b

Length:
48

Flags: (E|-|
T)

Metric Type: 2 (Larger than any link state


path)

Metric:

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 421


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Prefix:
FC00:0:0:1001::/96

Prefix Options: 0
(-|-|-|-|-)

Tag:
1

LS Age:
69

LS Type: AS-External-
LSA

Link State ID:


[Link]

Originating Router:
[Link]

LS Seq Number:
0x80000001

Retransmit Count:
0

Checksum:
0x1e41

Length:
48

Flags: (E|-|
T)

Metric Type: 2 (Larger than any link state


path)

Metric:
1

Prefix:
FC00:0:0:1002::/96

Prefix Options: 0
(-|-|-|-|-)

Tag:
1

LS Age:
69

LS Type: AS-External-
LSA

Link State ID:


[Link]

Originating Router:
[Link]

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 422


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

LS Seq Number:
0x80000001

Retransmit Count:
0

Checksum:
0x2637

Length:
48

Flags: (E|-|
T)

Metric Type: 2 (Larger than any link state


path)

Metric:
1

Prefix:
FC00:0:0:1003::/96

Prefix Options: 0
(-|-|-|-|-)

Tag:
1

Step 4 Configure route summarization on the ASBR.


# Configure the ASBR to summarize the three static routes into route FC00::/16.
[~ASBR] ospfv3 1
[*ASBR-ospfv3-1] asbr-summary fc00:: 16
[*ASBR-ospfv3-1] quit
[*ASBR] commit

Step 5 Verify the configuration.


Run the display ospfv3 lsdb command on the ASBR to check the OSPFv3 LSDB
information. The following command output shows that the three static routes have been
summarized into route FC00::/16.
[~ASBR] display ospfv3 lsdb

OSPFv3 Router with ID ([Link]) (Process


1)

Link-LSA (Interface
10GE1/0/1)

Link State ID Origin Router Age Seq# CkSum


Prefix
[Link] [Link] 488 0x80000001 0x81ba
1
[Link] [Link] 468 0x80000001 0xe7b5
1

Router-LSA (Area
[Link])

Link State ID Origin Router Age Seq# CkSum


Link

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 423


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

[Link] [Link] 429 0x80000002 0xf138


1
[Link] [Link] 149 0x80000003 0x1a4e
1

Network-LSA (Area
[Link])

Link State ID Origin Router Age Seq#


CkSum
[Link] [Link] 428 0x80000001
0xe64c

Intra-Area-Prefix-LSA (Area
[Link])

Link State ID Origin Router Age Seq# CkSum Prefix


Reference
[Link] [Link] 428 0x80000001 0x3b93 1 Network-
LSA

AS-External-
LSA

Link State ID Origin Router Age Seq# CkSum


Type
[Link] [Link] 11 0x80000001 0x8962
E2
[~ASBR] display ospfv3 lsdb external

OSPFv3 Router with ID ([Link]) (Process


1)

AS-External-
LSA

LS Age:
54

LS Type: AS-External-
LSA

Link State ID:


[Link]

Originating Router:
[Link]

LS Seq Number:
0x80000001

Retransmit Count:
0

Checksum:
0x8962

Length:
36

Flags: (E|-|
T)

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 424


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

Metric Type: 2 (Larger than any link state


path)

Metric:
2

Prefix:
FC00::/16

Prefix Options: 0
(-|-|-|-|-)

Tag:
1

# Run the display ospfv3 asbr-summary command on the ASBR to check information about
the summarized route.
[~ASBR] display ospfv3 asbr-summary

OSPFv3 Process
(1)

Prefix Prefix-Len Matched


Status
FC00:: 16 3 [Active]
Advertised

----End

Configuration Files
l Switch A configuration file
#
sysname SwitchA
#
ospfv3 1
router-id [Link]
area [Link]
#
interface 10GE 1/0/1
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:1000::1/64
ospfv3 1 area [Link]
#
return

l ASBR configuration file


#
sysname ASBR
#
ospfv3 1
router-id [Link]
import-route static
asbr-summary FC00:: 16
area [Link]
#
interface 10GE 1/0/1
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:1000::2/64
ospfv3 1 area [Link]
#
ipv6 route-static FC00:0:0:1001:: 96 NULL0

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 425


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

ipv6 route-static FC00:0:0:1002:: 96 NULL0


ipv6 route-static FC00:0:0:1003:: 96 NULL0
#
return

6.21.4 Example for Configuring DR Election Through OSPFv3

Networking Requirements
As shown in Figure 6-15, the priority of SwitchA is 100, which is the highest priority on the
network; therefore, SwitchA is elected as the DR. SwitchC, which has the second highest
priority 2, is elected as the BDR. The priority of SwitchB is 0, which means that it cannot
become the DR. SwitchD is not configured with a priority, that is, SwitchD uses the default
priority, namely, 1.

Figure 6-15 Networking diagram for configuring DR election through OSPFv3

SwitchA SwitchB

10GE1/0/1 10GE1/0/1
VLANIF10 VLANIF10
FC00:0:0:1001::1/64 FC00:0:0:1001::2/64
10GE1/0/1 10GE1/0/1
VLANIF10 VLANIF10
FC00:0:0:1001::3/64 FC00:0:0:1001::4/64

SwitchC SwitchD

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure IPv6 addresses for interfaces.
2. Configure the router ID of each Switch, enable OSPFv3, and specify the network
segments.
3. Check the DR/BDR status of each Switch when the default priority is used.
4. Set the DR priority of the interface on each Switch and check whether the Switch
becomes the DR or BDR.

Procedure
Step 1 Add interfaces to VLANs.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 426


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

[*HUAWEI] commit
[~SwitchA] vlan 10
[*SwitchA-vlan10] quit
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA] commit

The configurations of SwitchB, SwitchC, SwitchD are similar to the configuration of SwitchA
and are not mentioned here.

Step 2 Assign IPv6 addresses to the VLANIF interfaces.


[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ipv6 enable
[*SwitchA-Vlanif10] ipv6 address fc00:0:0:1001::1/64
[*SwitchA-Vlanif10] quit
[*SwitchA] commit

The configurations of SwitchB, SwitchC, SwitchD are similar to the configuration of SwitchA
and are not mentioned here.

Step 3 Configure the basic OSPFv3 functions.

# On SwitchA, enable OSPFv3 and set the router ID to [Link].


[~SwitchA] ospfv3
[*SwitchA-ospfv3-1] router-id [Link]
[*SwitchA-ospfv3-1] quit
[*SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ospfv3 1 area 0
[*SwitchA-Vlanif10] quit
[*SwitchA] commit

# On SwitchB, enable OSPFv3 and set the router ID to [Link].


[~SwitchB] ospfv3
[*SwitchB-ospfv3-1] router-id [Link]
[*SwitchB-ospfv3-1] quit
[*SwitchB] interface vlanif 10
[*SwitchB-Vlanif10] ospfv3 1 area 0
[*SwitchB-Vlanif10] quit
[*SwitchB] commit

# On SwitchC, enable OSPFv3 and set the router ID to [Link].


[~SwitchC] ospfv3
[*SwitchC-ospfv3-1] router-id [Link]
[*SwitchC-ospfv3-1] quit
[*SwitchC] interface vlanif 10
[*SwitchC-Vlanif10] ospfv3 1 area 0
[*SwitchC-Vlanif10] quit
[*SwitchC] commit

# On SwitchD, enable OSPFv3 and set the router ID to [Link].


[~SwitchD] ospfv3
[*SwitchD-ospfv3-1] router-id [Link]
[*SwitchD-ospfv3-1] quit
[*SwitchD] interface vlanif 10
[*SwitchD-Vlanif10] ospfv3 1 area 0
[*SwitchD-Vlanif10] quit
[*SwitchD] commit

Check the neighbors of SwitchA. You can view the DR priority and the neighbor status. By
default, the DR priority is 1. Now SwitchD functions as the DR and SwitchC functions as the
BDR.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 427


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

NOTE

When the priorities of two Switches are the same, the Switch that has a greater router ID is elected as the
DR. If the VLANIF interface of an Switch becomes the DR, the other broadcast interfaces of this Switch
have a high priority in the future DR election. That is, the Switch still functions as the DR. The DR
cannot be preempted.
[~SwitchA] display ospfv3 peer

OSPFv3 Process (1)


Total number of peer(s): 3
Peer(s) in full state: 2
OSPFv3 Area ([Link])
Neighbor ID Pri State Dead Time Interface Instance ID
[Link] 1 2-Way/DROther 00:00:32 Vlanif10 0
[Link] 1 Full/Backup 00:00:36 Vlanif10 0
[Link] 1 Full/DR 00:00:38 Vlanif10 0

# View the neighbors of SwitchD, and you can see that the status of the neighbor relationship
between SwitchD and other devices is Full.
[~SwitchD] display ospfv3 peer

OSPFv3 Process (1)


Total number of peer(s): 3
Peer(s) in full state: 3
OSPFv3 Area ([Link])
Neighbor ID Pri State Dead Time Interface Instance ID
[Link] 1 Full/DROther 00:00:32 Vlanif10 0
[Link] 1 Full/DROther 00:00:35 Vlanif10 0
[Link] 1 Full/Backup 00:00:30 Vlanif10 0

Step 4 Configure the DR priorities of interfaces.


# Configure the DR priority of SwitchA to 100.
[~SwitchA] interface vlanif 10
[~SwitchA-Vlanif10] ospfv3 dr-priority 100
[*SwitchA-Vlanif10] quit
[*SwitchA] commit

# Configure the DR priority of SwitchB to 0.


[~SwitchB] interface vlanif 10
[~SwitchB-Vlanif10] ospfv3 dr-priority 0
[*SwitchB-Vlanif10] quit
[*SwitchB] commit

# Configure the DR priority of SwitchC to 2.


[~SwitchC] interface vlanif 10
[~SwitchC-Vlanif10] ospfv3 dr-priority 2
[*SwitchC-Vlanif10] quit
[*SwitchC] commit

# View the neighbors of SwitchA, and you can see that the other DR priority is updated but
the DR and BDR are unchanged.
[~SwitchA] display ospfv3 peer

OSPFv3 Process (1)


Total number of peer(s): 3
Peer(s) in full state: 2
OSPFv3 Area ([Link])
Neighbor ID Pri State Dead Time Interface Instance ID
[Link] 0 2-Way/DROther 00:00:34 Vlanif10 0
[Link] 2 Full/Backup 00:00:38 Vlanif10 0
[Link] 1 Full/DR 00:00:31 Vlanif10 0

# View the neighbors of SwitchD, and you can see that the other DR priority is updated.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 428


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

[~SwitchD] display ospfv3 peer

OSPFv3 Process (1)


Total number of peer(s): 3
Peer(s) in full state: 3
OSPFv3 Area ([Link])
Neighbor ID Pri State Dead Time Interface Instance ID
[Link] 100 Full/DROther 00:00:36 Vlanif10 0
[Link] 0 Full/DROther 00:00:30 Vlanif10 0
[Link] 2 Full/Backup 00:00:36 Vlanif10 0

Step 5 Perform DR/BDR election again.


# Restart OSPFv3 processes to re-elect the DR and BDR.
Step 6 Verify the configuration.
# View the neighbors of SwitchA, and you can see that SwitchC is the BDR.
[~SwitchA] display ospfv3 peer

OSPFv3 Process (1)


Total number of peer(s): 3
Peer(s) in full state: 3
OSPFv3 Area ([Link])
Neighbor ID Pri State Dead Time Interface Instance ID
[Link] 0 Full/DROther 00:00:31 Vlanif10 0
[Link] 2 Full/Backup 00:00:36 Vlanif10 0
[Link] 1 Full/DROther 00:00:39 Vlanif10 0

# View the neighbors of SwitchD, and you can see that SwitchA is the DR.
[~SwitchD] display ospfv3 peer

OSPFv3 Process (1)


Total number of peer(s): 3
Peer(s) in full state: 2
OSPFv3 Area ([Link])
Neighbor ID Pri State Dead Time Interface Instance ID
[Link] 100 Full/DR 00:00:39 Vlanif10 0
[Link] 0 2-Way/DROther 00:00:35 Vlanif10 0
[Link] 2 Full/Backup 00:00:39 Vlanif10 0

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10
#
ospfv3 1
router-id [Link]
area [Link]
#
interface Vlanif10
ipv6 enable
ipv6 address FC00:0:0:1001::1/64
ospfv3 1 area [Link]
ospfv3 dr-priority 100
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 429


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 10
#
ospfv3 1
router-id [Link]
area [Link]
#
interface Vlanif10
ipv6 enable
ipv6 address FC00:0:0:1001::2/64
ospfv3 1 area [Link]
ospfv3 dr-priority 0
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return

l Configuration file of SwitchC


#
sysname SwitchC
#
vlan batch 10
#
ospfv3 1
router-id [Link]
area [Link]
#
interface Vlanif10
ipv6 enable
ipv6 address FC00:0:0:1001::3/64
ospfv3 1 area [Link]
ospfv3 dr-priority 2
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return

l Configuration file of SwitchD


#
sysname SwitchD
#
vlan batch 10
#
ospfv3 1
router-id [Link]
area [Link]
#
interface Vlanif10
ipv6 enable
ipv6 address FC00:0:0:1001::4/64
ospfv3 1 area [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 430


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

6.21.5 Example for Configuring BFD for OSPFv3


Networking Requirements
As shown in Figure 6-16, OSPFv3 is run among SwitchA, SwitchB, and SwitchC. Service
traffic is forwarded along the primary link SwitchA→SwitchB. The link
SwitchA→SwitchC→SwitchB is used as a backup. Customers require that a fault on the
primary link be detected in milliseconds so that service traffic can be fast switched to the
backup link when the primary link fails.

Figure 6-16 Networking diagram for configuring BFD for OSPFv3


SwitchA 10GE1/0/3 SwitchB10GE1/0/2
FC00:0:0:2001::2/64 FC00:0:0:2004::1/64
10GE1/0/3
10GE1/0/1 FC00:0:0:2001::3/64 10GE1/0/1
FC00:0:0:2003::1/64 FC00:0:0:2002::1/64

10GE1/0/1 10GE1/0/3
FC00:0:0:2003::3/64 FC00:0:0:2002::2/64

SwitchC

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic OSPFv3 functions on each switch to make the primary link transmit
service traffic properly.
2. Configure OSPFv3 BFD so that traffic can be fast switched to the backup link when the
primary link fails.

Procedure
Step 1 Configure IPv6 addresses for interfaces of all switches.
# Configure SwitchA. The configurations of SwitchB, and SwitchC are similar to the
configuration of SwitchA. The detailed configurations are not mentioned here.
<HUAWEI> system-view
[~HUAWEI] sysname switchA
[*HUAWEI] commit
[~SwitchA] interface 10ge 1/0/1
[~switchA-10GE1/0/1] undo portswitch
[*SwitchA-10GE1/0/1] ipv6 enable
[*SwitchA-10GE1/0/1] ipv6 address fc00:0:0:2003::1 64
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/3
[*switchA-10GE1/0/3] undo portswitch
[*SwitchA-10GE1/0/3] ipv6 enable
[*SwitchA-10GE1/0/3] ipv6 address fc00:0:0:2001::3 64
[*SwitchA-10GE1/0/3] quit
[*SwitchA] commit

Step 2 Configure basic OSPFv3 functions.


# Configure SwitchA.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 431


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

[~SwitchA] ospfv3
[*SwitchA-ospfv3-1] router-id [Link]
[*SwitchA-ospfv3-1] quit
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] ospfv3 1 area [Link]
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/3
[*SwitchA-10GE1/0/3] ospfv3 1 area [Link]
[*SwitchA-10GE1/0/3] quit
[*SwitchA] commit

# Configure SwitchB.
[~SwitchB] ospfv3 1
[*SwitchB-ospfv3-1] router-id [Link]
[*SwitchB-ospfv3-1] quit
[*SwitchB] interface 10ge 1/0/1
[*SwitchB-10GE1/0/1] ospfv3 1 area [Link]
[*SwitchB-10GE1/0/1] quit
[*SwitchB] interface 10ge 1/0/2
[*SwitchB-10GE1/0/2] ospfv3 1 area [Link]
[*SwitchB-10GE1/0/2] quit
[*SwitchB] interface 10ge 1/0/3
[*SwitchB-10GE1/0/3] ospfv3 1 area [Link]
[*SwitchB-10GE1/0/3] quit
[*SwitchB] commit

# Configure SwitchC.
[~SwitchC] ospfv3 1
[*SwitchC-ospfv3-1] router-id [Link]
[*SwitchC-ospfv3-1] quit
[*SwitchC] interface 10ge 1/0/1
[*SwitchC-10GE1/0/1] ospfv3 1 area [Link]
[*SwitchC-10GE1/0/1] quit
[*SwitchC] interface 10ge 1/0/3
[*SwitchC-10GE1/0/3] ospfv3 1 area [Link]
[*SwitchC-10GE1/0/3] quit
[*SwitchC] commit

# After the preceding configurations are complete, run the display ospfv3 peer verbose
command, and you can view that neighbor relationships are established between SwitchA and
SwitchB, and between SwitchB and SwitchC. Take the display on SwitchA as an example:
[SwitchA] display ospfv3 peer verbose

OSPFv3 Process (1)


Neighbor [Link] is Full, interface address FE80::252:7500:1B12:2401
In the area [Link] via interface 10GE1/0/1
DR Priority is 1 DR is [Link] BDR is [Link]
Options is 0x000013 (-|-|-|-|-|-|R|-|-|E|V6)
Dead timer due in 00:00:39
Neighbour is up for 00h28m50s
Link State Request List 0
Link State Retransmission List 0
Neighbour Event: 6
Neighbour If Id : 0x49
Neighbor [Link] is Full, interface address FE80::769D:8F00:1C4C:DAD2
In the area [Link] via interface 10GE1/0/3
DR Priority is 1 DR is [Link] BDR is [Link]
Options is 0x000013 (-|-|-|-|-|-|R|-|-|E|V6)
Dead timer due in 00:00:29
Neighbour is up for 16h41m02s
Link State Request List 0
Link State Retransmission List 0
Neighbour Event: 7
Neighbour If Id : 0x04

# Check information about the OSPFv3 routing table on SwitchA, and you can view the
routing entries to SwitchB and SwitchC.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 432


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

[SwitchA] display ospfv3 routing

Codes : E2 - Type 2 External, E1 - Type 1 External, IA - Inter-Area,


N - NSSA
Flags : A - Added to URT6

OSPFv3 Process (1)


Destination Metric
Next-hop
FC00:0:0:2001::/64 1
directly connected, 10GE1/0/3, Flags : A
FC00:0:0:2002::/64 2
via FE80::252:7500:1B12:2401, 10GE1/0/1, Flags : A
FC00:0:0:2003::/64 1
directly connected, 10GE1/0/1, Flags : A
FC00:0:0:2004::/64 2
via FE80::769D:8F00:1C4C:DAD2, 10GE1/0/3, Flags : A

In the OSPFv3 routing table, you can view that the next hop of the route to
FC00:0:0:2004::1/64 is 10GE1/0/3, and traffic is transmitted on the primary link
SwitchA→SwitchB.
Step 3 Configure OSPFv3 BFD.
# Enable BFD globally on SwitchA.
[~SwitchA] bfd
[*SwitchA-bfd] quit
[*SwitchA] ospfv3
[*SwitchA-ospfv3-1] bfd all-interfaces enable
[*SwitchA-ospfv3-1] bfd all-interfaces min-transmit-interval 100 min-receive-
interval 100 detect-multiplier 4
[*SwitchA-ospfv3-1] quit
[*SwitchA] commit

# Enable BFD globally on SwitchB.


[~SwitchB] bfd
[*SwitchB-bfd] quit
[*SwitchB] ospfv3
[*SwitchB-ospfv3-1] bfd all-interfaces enable
[*SwitchB-ospfv3-1] bfd all-interfaces min-transmit-interval 100 min-receive-
interval 100 detect-multiplier 4
[*SwitchB-ospfv3-1] quit
[*SwitchB] commit

# Enable BFD globally on SwitchC.


[~SwitchC] bfd
[*SwitchC-bfd] quit
[*SwitchC] ospfv3
[*SwitchC-ospfv3-1] bfd all-interfaces enable
[*SwitchC-ospfv3-1] bfd all-interfaces min-transmit-interval 100 min-receive-
interval 100 detect-multiplier 4
[*SwitchC-ospfv3-1] quit
[*SwitchC] commit

After the preceding configurations are complete, run the display ospfv3 bfd session
command on SwitchA or SwitchB, and you can view that the status of the BFD session is Up.
Take the display on SwitchB as an example:
[SwitchB] display ospfv3 bfd session verbose
* - STALE

OSPFv3 Process 1 with Router ID [Link]

Neighbor-Id: [Link] BFD Status: Up


Interface: 10GE1/0/1 Instance : 0

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 433


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

IPv6-Local-Address: FE80::769D:8F00:84C:DAD2
IPv6-Remote-Address: FE80::252:7500:812:2401

Neighbor-Id: [Link] BFD Status: Up


Interface: 10GE1/0/3 Instance : 0
IPv6-Local-Address: FE80::769D:8F00:1C4C:DAD2
IPv6-Remote-Address: FE80::220B:C700:3739:1302

Total UP/DOWN/UNKNOWN BFD Session Number : 2 / 0 / 0

Step 4 Verify the configuration.


# Run the shutdown command on 10GE1/0/3 of SwitchB to simulate a primary link fault.
[~SwitchB] interface 10ge 1/0/3
[~SwitchB-10GE1/0/3] shutdown
[*SwitchB-10GE1/0/3] commit

# Check the routing table on SwitchA. In the routing table, you can view that the backup link
SwitchA-SwitchC-SwitchB transmits traffic after the primary link fails, and the next hop of
the route to FC00:0:0:2004::1/64 becomes 10GE1/0/1.
[SwitchA] display ospfv3 routing

Codes : E2 - Type 2 External, E1 - Type 1 External, IA - Inter-Area,


N - NSSA
Flags : A - Added to URT6

OSPFv3 Process (1)


Destination Metric
Next-hop
FC00:0:0:2002::/64 2
via FE80::252:7500:1B12:2401, 10GE1/0/1, Flags : A
FC00:0:0:2003::/64 1
directly connected, 10GE1/0/1, Flags : A
FC00:0:0:2004::/64 3
via FE80::252:7500:1B12:2401, 10GE1/0/1, Flags : A

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
bfd
#
ospfv3 1
router-id [Link]
bfd all-interfaces enable
bfd all-interfaces min-transmit-interval 100 min-receive-interval 100 detect-
multiplier 4
area [Link]
#
interface 10GE1/0/1
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:2003::1/64
ospfv3 1 area [Link]
#
interface 10GE1/0/3
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:2001::3/64
ospfv3 1 area [Link]
#
return

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 434


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 6 OSPFv3 Configuration

l Configuration file of SwitchB


#
sysname SwitchB
#
bfd
#
ospfv3 1
router-id [Link]
bfd all-interfaces enable
bfd all-interfaces min-transmit-interval 100 min-receive-interval 100 detect-
multiplier 4
area [Link]
#
interface 10GE1/0/1
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:2002::1/64
ospfv3 1 area [Link]
#
interface 10GE1/0/2
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:2004::1/64
ospfv3 1 area [Link]
#
interface 10GE1/0/3
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:2001::2/64
ospfv3 1 area [Link]
#
return

l Configuration file of SwitchC


#
sysname SwitchC
#
bfd
#
ospfv3 1
router-id [Link]
bfd all-interfaces enable
bfd all-interfaces min-transmit-interval 100 min-receive-interval 100 detect-
multiplier 4
area [Link]
#
interface 10GE1/0/1
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:2003::3/64
ospfv3 1 area [Link]
#
interface 10GE1/0/3
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:2002::2/64
ospfv3 1 area [Link]
#
return

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 435


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

7 IPv4 IS-IS Configuration

About This Chapter

You can build an IPv4 IS-IS network to allow IS-IS to discover and calculate routes in an
autonomous system (AS).

7.1 Overview of IS-IS


7.2 Understanding IS-IS
7.3 Summary of IS-IS Configuration Tasks
7.4 Licensing Requirements and Limitations for IPv4 IS-IS
7.5 Default Settings for IPv4 IS-IS
7.6 Configuring Basic IS-IS Functions
7.7 Improving IS-IS Network Security
7.8 Controlling IS-IS Route Selection
7.9 Controlling IS-IS Route Exchange
7.10 Configuring IS-IS Route Summarization
7.11 Controlling IS-IS Route Convergence
7.12 Configuring IS-IS Neighbor Relationship Flapping Suppression
7.13 Configuring LSP Fragment Extension
7.14 Configuring a Mesh Group on an NBMA Network
7.15 Configuring IS-IS Reliability
7.16 Configuring the Overload Bit for an IS-IS Device
7.17 Maintaining IS-IS
7.18 Configuration Examples for IPv4 IS-IS
7.19 Troubleshooting IS-IS

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 436


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

7.1 Overview of IS-IS

Definition
Intermediate System-to-Intermediate System (IS-IS) is an Interior Gateway Protocol (IGP)
that runs within an autonomous system (AS). IS-IS is also a link-state routing protocol, using
the shortest path first (SPF) algorithm to calculate routes.

Purpose
IS-IS is a dynamic routing protocol initially designed by the International Organization for
Standardization (ISO) for its Connectionless Network Protocol (CLNP).
To support IP routing, the Internet Engineering Task Force (IETF) extended and modified IS-
IS in RFC 1195. This modification enables IS-IS to apply to TCP/IP and OSI environments.
This type of IS-IS is called Integrated IS-IS or Dual IS-IS.

NOTE
IS-IS stated in this document refers to Integrated IS-IS, unless otherwise stated.

In addition to IPv4 networks, IS-IS also applies to IPv6 networks to provide accurate routing
information for IPv6 packets. IS-IS has good scalability, supports IPv6 network layer
protocols, and is capable of discovering, generating, and forwarding IPv6 routes.

7.2 Understanding IS-IS

7.2.1 Basic Concepts of IS-IS


IS-IS Topology Structure
Overall IS-IS Topology
IS-IS uses a two-level hierarchy (backbone area and non-backbone area) to support large-
scale routing networks. Generally, Level-1 routers are deployed in non-backbone areas,
whereas Level-2 and Level-1-2 routers are deployed in backbone areas. Each non-backbone
area connects to the backbone area through a Level-1-2 router.
Figure 7-1 shows a network that runs IS-IS. The network is similar to an OSPF network
typology with multiple areas. The backbone area contains all the routers in Area 1 and
Level-1-2 routers in other areas.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 437


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Figure 7-1 IS-IS topology I

Area2

Area3
L1
L1/2
L2 L1/2
L2
backbone Area1

L2 L2

L1
L1/2 L1/2
L1 L1
L1
L1
Area4 Area5

Figure 7-2 shows another type of IS-IS topology. In this topology, Level-2 routers belong to
different areas. All the physically contiguous Level-1-2 and Level-2 routers form the
backbone area of IS-IS.

Figure 7-2 IS-IS topology II

Area1
L1
L2
L1
L1/2
Area2 L1/2 L1
Area4

L2
L2 Area3

The two types of topologies show the differences between IS-IS and OSPF:
l In IS-IS, each router belongs to only one area. In OSPF, different interfaces of a router
may belong to different areas.
l In IS-IS, no area is defined as the backbone area. In OSPF, Area 0 is defined as the
backbone area.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 438


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

l In IS-IS, Level-1 and Level-2 routes are calculated using the SPF algorithm to generate
the shortest path tree (SPT). In OSPF, the SPF algorithm is used only in the same area,
and inter-area routes are forwarded by the backbone area.

IS-IS Router Types


l Level-1 router
A Level-1 router manages intra-area routing. It establishes neighbor relationships with
only the Level-1 and Level-1-2 routers in the same area and maintains a Level-1 link
state database (LSDB). The LSDB contains intra-area routing information. A packet to a
destination outside this area is forwarded to the nearest Level-1-2 router.
l Level-2 router
A Level-2 router manages inter-area routing. It can establish neighbor relationships with
Level-2 or Level-1-2 routers in different areas and maintains a Level-2 LSDB. The
LSDB contains inter-area routing information.
All Level-2 routers form the backbone network of the routing domain. They establish
Level-2 neighbor relationships and are responsible for inter-area communication.
Level-2 routers in the routing domain must be physically contiguous to ensure the
continuity of the backbone network. Only Level-2 routers can exchange data packets or
routing information with routers outside the routing domain.
l Level-1-2 router
A router that belongs to both a Level-1 area and a Level-2 area is called a Level-1-2
router. It can establish Level-1 neighbor relationships with Level-1 and Level-1-2 routers
in the same area. It can also establish Level-2 neighbor relationships with Level-2 and
Level-1-2 routers in different areas. A Level-1 router must be connected to other areas
through a Level-1-2 router.
A Level-1-2 router maintains two LSDBs: a Level-1 LSDB and a Level-2 LSDB. The
Level-1 LSDB saves for intra-area routing and the Level-2 LSDB saves for inter-area
routing.
IS-IS Network Types

IS-IS supports only two types of networks. In terms of physical links, IS-IS networks can be
classified into the following link types:

l Broadcast: such as Ethernet and Token-Ring


l Point-to-point: such as PPP and HDLC
NOTE

For a Non-Broadcast Multi-Access (NBMA) network such as the ATM, you should configure its Layter
3 sub-interfaces as P2P interfaces.
IS-IS cannot run on Point to MultiPoint (P2MP) networks.
DIS and Pseudonode

In a broadcast network, IS-IS needs to elect a Designated Intermediate System (DIS) from all
the routers. DISs are used to create and update pseudonodes and generate link state protocol
data units (LSPs) of pseudonodes to describe available network devices.

The pseudonode is used to simulate the virtual node in the broadcast network and is not an
actual router. In IS-IS, a pseudonode is identified by the system ID of the DIS and the 1-byte
Circuit ID (its value is not 0).

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 439


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Figure 7-3 Pseudonode


L1 L1 L1 L1

Pseudonode

L1 DIS L1 L1 DIS L1

Physical connection

Virtual connection

As shown in Figure 7-3, the use of pseudonodes simplifies the network topology and shortens
LSPs. When the network changes, the number of generated LSPs is reduced, and the SPF
consumes fewer resources.
Level-1 and Level-2 DISs are elected separately. You can configure different priorities for
DISs of different levels. The router with the highest priority is elected as the DIS. If there are
multiple routers with the same highest priority on a broadcast network, the one with the
highest MAC address is chosen. The DISs of different levels can be the same router or
different routers.
DIS election in IS-IS differs from designated router (DR) election in OSPF:
l On an IS-IS broadcast network, the router with priority 0 also takes part in DIS election.
In OSPF, the router with priority 0 does not take part in DR election.
l In IS-IS, when a new router that meets the requirements of being a DIS connects to a
broadcast network, the router is elected as the new DIS, and the previous pseudonode is
deleted. This causes a new flooding of LSPs. In OSPF, when a new router connects to a
network, it is not immediately elected as the DR even if it has the highest DR priority.
l On an IS-IS broadcast network, routers (including non-DIS routers) of the same level on
a network segment set up adjacencies. In OSPF, routers set up adjacencies with only the
DR and backup designated router (BDR).

NOTE

On an IS-IS broadcast network, although all the routers set up adjacencies with each other, the LSDBs
are synchronized by the DISs.

IS-IS Address Structure


The network service access point (NSAP) is an address defined by the OSI to locate
resources. Figure 7-4 shows the NSAP address structure. The NSAP is composed of the
initial domain part (IDP) and the domain specific part (DSP). The lengths of the IDP and the
DSP are variable. The maximum length of the NSAP is 20 bytes and its minimum length is 8
bytes.
l The IDP is similar to the network ID in an IP address. It is defined by the ISO and
consists of the authority and format identifier (AFI) and the initial domain identifier
(IDI). The AFI indicates the address allocation authority and address format, and the IDI
identifies a domain.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 440


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

l The DSP is similar to the subnet ID and host address in an IP address. The DSP consists
of the High Order DSP (HODSP), system ID, and NSAP Selector (SEL). The HODSP is
used to divide areas, the system ID identifies a host, and the SEL indicates the service
type.

Figure 7-4 IS-IS address structure

IDP DSP

AFI IDI High Order DSP System ID SEL(1 octet)

Area Address

l Area Address
The IDP and the HODSP of the DSP identify a routing domain and the areas in a routing
domain. Therefore, the combination of the IDP and HODSP is called an area address,
which is similar to an area number in OSPF. The area addresses of routers in the same
Level-1 area must be the same, while the area addresses of routers in the Level-2 area
can be different.
In general, a router can be configured with only one area address. The area address of all
nodes in an area must be the same. In the implementation of a device, an IS-IS process
can be configured with a maximum of three area addresses to support seamless
combination, division, and transformation of areas.
l System ID
A system ID uniquely identifies a host or a router in an area. In the device, the fixed
length of the system ID is 48 bits (6 bytes).
In actual applications, a router ID corresponds to a system ID. If a router takes the IP
address [Link] of Loopback 0 as its router ID, its system ID used in IS-IS can be
obtained in the following way:
– Extend each part of IP address [Link] to 3 bits and add 0 to the front of any
part that is shorter than 3 bits. Then the IP address is extended as [Link].
– Divide the extended address 1921.6800.1001 into three parts, each of which
consists of four decimal digits. Then system ID 1921.6800.1001 is obtained.
You can specify a system ID in many ways. You need to ensure that the system ID
uniquely identifies a host or a router.
l SEL
The role of an SEL is similar to that of the "protocol identifier" of IP. A transport
protocol matches an SEL. The SEL is always "00" in IP.
A network entity title (NET) indicates network layer information about an IS. A NET can be
regarded as a special NSAP. The NET length is the same as the NSAP length. Its maximum
length is 20 bytes and minimum length is 8 bytes. When configuring IS-IS on a router, you
only need to configure a NET but not an NSAP.
Assume that there is a NET: [Link].1234.5678.9abc.00. In the NET, the area address is
[Link], the system ID is 1234.5678.9abc, and the SEL is 00.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 441


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

IS-IS PDU Types


IS-IS PDUs include Hello PDUs, link state PDUs (LSPs), and sequence number PDUs
(SNPs).
l Hello PDU
Hello packets, also called IS-IS Hello PDUs (IIH), are used to set up and maintain
neighbor relationships. Among them, Level-1 LAN IIHs apply to the Level-1 routers on
broadcast LANs; Level-2 LAN IIHs apply to the Level-2 routers on broadcast LANs;
and P2P IIHs apply to non-broadcast networks. Hello packets on different networks have
different formats. Compared to a LAN IIH, a P2P IIH does not have the Priority and
LAN ID fields, but has a Local Circuit ID field. The Priority field indicates the DIS
priority on a broadcast network, the LAN ID field indicates the system ID of the DIS and
pseudonode, and the Local Circuit ID indicates the local link ID.
l LSP
LSPs are used to exchange link state information. There are two types of LSPs: Level-1
and Level-2. Level-1 IS-IS transmits Level-1 LSPs; Level-2 IS-IS transmits Level-2
LSPs; and Level-1-2 IS-IS can transmit both Level-1 and Level-2 LSPs.
The meanings of major fields in an LSP are as follows:
– ATT field: When a Level-1-2 IS-IS transmits Level-1 LSPs in a Level-1 area,
Level-1 IS-IS in the area can communicate with devices in other areas through the
Level-1-2 IS-IS if the ATT bit is set in the Level-1 LSPs.
– OL field: indicates the LSDB overload.
LSPs with the overload bit are still flooded on the network, but these LSPs are
ignored during the calculation of the routes that pass through a router in overload
state. After the overload bit is set on a router, other routers ignore the router when
performing SPF calculation and consider only the direct routes of the router. For
details, see "IS-IS Overload" in Principles.
– IS Type field: indicates the type of IS-IS that generates the LSP. The value 01
indicates Level-1, and the value 11 indicates Level-2.
l SNP
SNPs describe the LSPs in all or some databases to help synchronize and maintain all
LSDBs.
SNPs include complete SNPs (CSNPs) and partial SNPs (PSNPs). They are further
classified into Level-1 CSNPs, Level-2 CSNPs, Level-1 PSNPs, and Level-2 PSNPs.
A CSNP contains the summary of all LSPs in an LSDB. This maintains LSDB
synchronization between neighboring routers. On a broadcast network, the DIS
periodically sends CSNPs. The default interval for sending CSNPs is 10 seconds. On a
point-to-point link, CSNPs are sent only when the neighbor relationship is established
for the first time.
A PSNP lists only the sequence number of recently received LSPs. A PSNP can
acknowledge multiple LSPs at one time. If an LSDB is not updated, the PSNP is also
used to request a neighbor to send a new LSP.
The variable length fields in an IS-IS PDU are multiple type-length-values (TLVs). Figure
7-5 shows the TLV format. A TLV is also called a code-length-value (CLV).

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 442


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Figure 7-5 TLV format


No. of Octets
Type 1
Length 1
Value Length

TLVs vary according to PDU types, as shown in Table 7-1.

Table 7-1 PDU types and TLV names

TLV Type Name Applied PDU Type

1 Area Addresses IIH, LSP

2 IS Neighbors (LSP) LSP

4 Partition Designated Level2 IS L2 LSP

6 IS Neighbors (MAC Address) LAN IIH

7 IS Neighbors (SNPA Address) LAN IIH

8 Padding IIH

9 LSP Entries SNP

10 Authentication Information IIH, LSP, SNP

128 IP Internal Reachability Information LSP

129 Protocols Supported IIH, LSP

130 IP External Reachability Information L2 LSP

131 Inter-Domain Routing Protocol Information L2 LSP

132 IP Interface Address IIH, LSP

TLVs with the type value ranging from 1 to 10 are defined in ISO 10589, and the other TLVs
are defined in RFC 1195.

7.2.2 IS-IS Fundamentals


IS-IS is a link-state routing protocol. Each router generates an LSP that contains link state
information about all the IS-IS interfaces on the router. The router can establish IS-IS
neighbor relationships with neighboring devices and update its LSDB to synchronize the local
LSDB with the LSDBs of all the other devices on the IS-IS network. Based on the local
LSDB, the router uses the SPF algorithm to calculate IS-IS routes. If the router finds that an
IS-IS route is the optimal route to a destination, the router adds the route to the local IP
routing table to guide packet forwarding.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 443


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Establishment of IS-IS Neighbor Relationship


Two IS-IS routers need to establish a neighbor relationship before exchanging packets to
implement routing. On different networks, the modes for establishing IS-IS neighbors are
different.

l Establishment of a neighbor relationship on a broadcast link


Figure 7-6 uses Level-2 routers as an example to describe the process of establishing a
neighbor relationship on a broadcast link. The process of establishing a neighbor
relationship between Level-1 routers is the same as the process of establishing a
neighbor relationship between Level-2 routers.

Figure 7-6 Process of establishing a neighbor relationship on a broadcast link


RouterA RouterB

SYS id:1111.1111.1111 SYS id:2222.2222.2222


L2 LAN IIH
( sys id:1111.1111.1111 neighbor:null ) neighbor RouterA
L2 LAN IIH initialized
neighbor RouterB ( sys id:2222.2222.2222 neighbor:Router A )
established L2 LAN IIH
( sys id:1111.1111.1111 neighbor:Router B )
neighbor RouterA
L2 LAN IIH established

L2 LAN IIH

a. RouterA broadcasts a Level-2 LAN IS-IS Hello PDU (IIH) with no neighbor ID
specified.
b. RouterB receives this packet and sets the status of the neighbor relationship with
RouterA to Initial. RouterB then responds to RouterA with a Level-2 LAN IIH,
indicating that RouterA is a neighbor of RouterB.
c. RouterA receives this packet and sets the status of the neighbor relationship with
RouterB to Up. RouterA then sends RouterB a Level-2 LAN IIH indicating that
RouterB is a neighbor of RouterA.
d. RouterB receives this packet and sets the status of the neighbor relationship with
RouterA to Up. RouterA and RouterB establish a neighbor relationship
successfully.
The network is a broadcast network, so a DIS needs to be elected. After the neighbor
relationship is established, routers wait for two intervals before sending Hello packets to
elect the DIS. The IIH packets exchanged by the routers contain the Priority field. The
router with the highest priority is elected as the DIS. If the routers have the same priority,
the router with the largest interface MAC address is elected as the DIS.
l Establishment of a neighbor relationship on a P2P link

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 444


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Unlike the establishment of a neighbor relationship on a broadcast link, the


establishment of a neighbor relationship on a P2P link is classified into two modes: two-
way mode and three-way mode.
– Two-way mode
Upon receiving a P2P IIH from a neighbor, a router considers the neighbor Up and
establishes a neighbor relationship with the neighbor.
– Three-way mode
A neighbor relationship is established after P2P IIHs are sent for three times. The
establishment of a neighbor relationship on a P2P link is similar to that on a
broadcast link.
Two-way mode has distinct disadvantages. For example, when two or more links exist
between two routers, the two routers can still establish a neighbor relationship if one link
is Down and the other is Up in the same direction. The parameters of the link in Up state
are used in SPF calculation. As a result, the router that does not detect the fault of the
link in Down state still tries to forward packets over this link. Three-way mode addresses
such problems on unreliable P2P links. In three-way mode, a router considers the
neighbor Up only after confirming that the neighbor receives the packet sent by itself,
and then establishes a neighbor relationship with the neighbor.

Basic rules for establishing an IS-IS neighbor relationship are as follows:


l Only neighboring routers of the same level can set up the neighbor relationship with each
other.
l For Level-1 routers, their area IDs must be the same
l Network types of IS-IS interfaces on both ends of a link must be consistent.
NOTE
Ethernet interfaces can be simulated as P2P interfaces to establish a neighbor relationship on a P2P
link.
l IP addresses of IS-IS interfaces on both ends of a link must be on the same network
segment.
IS-IS runs on the data-link layer and was initially designed for CLNP. Therefore, the
establishment of an IS-IS neighbor relationship is not related to IP addresses. In the
implementation of a device, IS-IS runs only over IP. Therefore, IS-IS needs to check the
IP address of its neighbor. If secondary IP addresses are assigned to the interfaces, the
routers can still set up the IS-IS neighbor relationship, but only when either the primary
IP addresses or secondary IP addresses are on the same network segment.
NOTE

When IP addresses of IS-IS interfaces on both ends of a link are on different network segments, a
neighbor relationship can still be established on the two interfaces if the interfaces are configured
not to check the IP addresses in received Hello packets. You can configure P2P interfaces not to
check the IP addresses in received Hello packets. Before configuring Ethernet interfaces not to
check the IP addresses, simulate Ethernet interfaces as P2P interfaces.

Process of Exchanging IS-IS LSPs


Causes of LSP generation

All routers in the IS-IS routing domain can generate LSPs. The following events trigger the
generation of a new LSP:

l Neighbor is Up or Down.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 445


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

l Related interface goes Up or Down.


l Imported IP routes change.
l Inter-area IP routes change.
l Interface is assigned a new metric value.
l Periodic updates occur.
Processing of a new LSP received from a neighbor
1. The router installs the LSP to its LSDB and marks it for flooding.
2. The router sends the LSP to all interfaces except the interface that initially received the
LSP.
3. The neighbors flood the LSP to their neighbors.
LSP flooding

In LSP flooding, a router sends an LSP to its neighbors and then the neighbors send the
received LSP to their respective neighbors except the router that first sends the LSP. In this
manner, the LSP is flooded among the routers of the same level. LSP flooding allows each
router of the same level to have the same LSP information and synchronize its LSDB with
each other.

Each LSP has a 4-byte sequence number. When a router is started, the sequence number of the
first LSP sent by the router is 1. When a new LSP is generated, the sequence number of the
LSP is equal to the sequence number of the previous LSP plus 1. The greater the sequence
number, the newer the LSP.

Process of synchronizing LSDBs between a newly added router and DIS on a broadcast
link

Figure 7-7 Process of updating LSDBs on a broadcast link


RouterA

RouterC

RouterB( DIS)

1 LSP
Router C.00-00
CSNP
Router A.00-00 2
Router B.00-00
Router B.01-00 PSNP
Router C.00-00 3 Router A.00-00
Router B.00-00
Router B.01-00
LSP 4
Router A.00-00
Router B.00-00
Router B.01-00

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 446


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

1. As shown in Figure 7-7, a new router (RouterC) sends a Hello packet to establish
neighbor relationships with the other routers in the broadcast domain.
2. RouterC establishes neighbor relationships with RouterA and RouterB, waits for the
timeout of the LSP refresh timer, and then sends its LSP to a multicast address (01-80-
C2-00-00-14 in a Level-1 area and 01-80-C2-00-00-15 in a Level-2 area). All neighbors
on the network can receive the LSP.
3. The DIS on the network segment adds the received LSP to its LSDB. After the CSNP
timer expires, the DIS sends CSNPs to synchronize the LSDBs on the network.
4. RouterC receives the CSNPs from the DIS, checks its LSDB, and sends a PSNP to
request the LSPs it does not have.
5. The DIS receives the PSNP and sends RouterC the required LSPs for LSDB
synchronization.
The process of updating the LSDB of the DIS is as follows:
1. When the DIS receives an LSP, it searches the LSDB to check whether the same LSP
exists. If the DIS does not find the same LSP in its LSDB, the DIS adds the LSP to its
LSDB and broadcasts the content of the new LSDB.
2. If the sequence number of the received LSP is greater than that of the corresponding LSP
in the LSDB, the DIS replaces the existing LSP with the received LSP and broadcasts the
contents of the new LSDB. If the sequence number of the received LSP is smaller than
that of the corresponding LSP in the LSDB, the DIS sends its LSP in the LSDB through
the inbound interface of the received LSP.
3. If the sequence number of the received LSP is the same as that of the corresponding LSP
in the LSDB, the DIS compares the remaining lifetime of the two LSPs. If the remaining
lifetime of the received LSP is smaller than that of the corresponding LSP in the LSDB,
the DIS replaces the existing LSP with the received LSP and broadcasts the contents of
the new LSDB. If the remaining lifetime of the received LSP is greater than that of the
corresponding LSP, the DIS sends its LSP in the LSDB through the inbound interface of
the received LSP.
4. If the sequence number and remaining lifetime of the received LSP are the same as those
of the corresponding LSP in the LSDB, the DIS compares the checksum of the two
LSPs. If the checksum of the received LSP is greater than that of the corresponding LSP
in the LSDB, the DIS replaces the existing LSP with the received LSP and broadcasts the
content of the new LSDB. If the checksum of the received LSP is smaller than that of the
corresponding LSP, the DIS sends its LSP in the LSDB through the inbound interface of
the received LSP.
5. If the sequence number, remaining lifetime, and checksum of the received LSP are the
same as those of the corresponding LSP in the LSDB, the DIS does not forward the
received LSP.
Process of synchronizing the LSDB on a P2P link

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 447


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Figure 7-8 Process of updating LSDBs on a P2P link


RouterA RouterB
PPP

LSP
Router A.00-00
PSNP
Router A.00-00
Retransmission
times out
LSP Resend
Router A.00-00 response packet
PSNP
Router A.00-00

1. RouterA establishes a neighbor relationship with RouterB.


2. RouterA and RouterB send a CSNP to each other. If the LSDB of the neighbor and the
received CSNP are not synchronized, the neighbor sends a PSNP to request the required
LSP.
3. Figure 7-8 assumes that RouterB requests the required LSP from RouterA. RouterA
sends the required LSP to RouterB, starts the LSP retransmission timer, and waits for a
PSNP from RouterB as an acknowledgement for the received LSP.
4. If RouterA does not receive a PSNP from RouterB after the LSP retransmission timer
expires, RouterA resends the LSP until it receives a PSNP from RouterB.
NOTE

A PSNP on a P2P link is used as follows:


l An ACK packet to acknowledge the received LSP.
l A request packet to acquire LSPs.

The process of updating LSDBs on a P2P link is as follows:


1. If the sequence number of the received LSP is smaller than that of the corresponding
LSP in the LSDB, the router directly sends its LSP to the neighbor and waits for a PSNP
from the neighbor. If the sequence number of the received LSP is greater than that of the
corresponding LSP in the LSDB, the router adds the received LSP to its LSDB, sends a
PSNP to acknowledge the received LSP, and then sends the received LSP to all its
neighbors except the neighbor that sends the LSP.
2. If the sequence number of the received LSP is the same as that of the corresponding LSP
in the LSDB, the router compares the remaining lifetime of the two LSPs. If the received
LSP has a smaller remaining lifetime than that of the corresponding LSP in the LSDB,
the router adds the received LSP to its LSDB, sends a PSNP to acknowledge the received
LSP, and then sends the received LSP to all its neighbors except the neighbor that sends
the LSP. If the received LSP has a greater remaining lifetime than that of the
corresponding LSP in the LSDB, the router directly sends its LSP to the neighbor and
waits for a PSNP from the neighbor.
3. If the sequence number and remaining lifetime of the received LSP are the same as those
of the corresponding LSP in the LSDB, the router compares the checksum of the two

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 448


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

LSPs. If the received LSP has a greater checksum than that of the corresponding LSP in
the LSDB, the router adds the received LSP to its LSDB, sends a PSNP to acknowledge
the received LSP, and then sends the received LSP to all its neighbors except the
neighbor that sends the LSP. If the received LSP has a smaller checksum than that of the
corresponding LSP in the LSDB, the router directly sends its LSP to the neighbor and
waits for a PSNP from the neighbor.
4. If the sequence number, remaining lifetime, and checksum of the received LSP and the
corresponding LSP in the LSDB are the same, the router does not forward the received
LSP.

7.2.3 IS-IS Authentication


To ensure network security, IS-IS authentication encrypts IS-IS packets by adding the
authentication field to packets. When a local router receives IS-IS packets from a remote
router, the local router discards the packets if the authentication passwords do not match. This
protects the local router.

Authentication Types
Based on the types of packets, the authentication is classified as follows:
l Interface authentication: authenticates Level-1 and Level-2 Hello packets sent and
received on IS-IS interfaces using the specified authentication mode and password.
NOTE

You can configure a router to perform interface authentication in the following ways:
l A router sends authentication packets carrying the authentication TLV and verifies the
authentication information about the received packets.
l A router sends authentication packets carrying the authentication TLV but does not verify the
authentication information about the received packets.
l Area authentication: authenticates Level-1 LSPs and Level-1 SNPs transmitted in an IS-
IS area using the specified authentication mode and password.
l Routing domain authentication: authenticates Level-2 LSPs and Level-2 SNPs
transmitted in an IS-IS routing domain using the specified authentication mode and
password.
NOTE

In area authentication and routing domain authentication, you can configure a router to
authenticate LSPs and SNPs separately in the following ways:
l A router sends LSPs and SNPs carrying the authentication TLV and verifies the authentication
information about the received LSPs and SNPs.
l A router sends LSPs carrying the authentication TLV and verifies the authentication
information about the received LSPs. The router sends SNPs carrying the authentication TLV
but does not verify the authentication information about the received SNPs.
l A router sends LSPs carrying the authentication TLV and verifies the authentication
information about the received LSPs. The router sends SNPs without the authentication TLV
and does not verify the authentication information about the received SNPs.
l A router sends LSPs and SNPs carrying the authentication TLV but does not verify the
authentication information about the received LSPs and SNPs.

Based on the authentication modes of packets, authentication is classified into the following
types:
l Plain text authentication: is a simple authentication mode in which passwords are
directly added to packets. This authentication is insecure.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 449


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

l MD5 authentication: uses the MD5 algorithm to encrypt passwords before they are
added to packets, which improves password security.
l Keychain authentication: further improves network security with configurable key chain
that changes with time.

Mode in Which Authentication Information Is Carried


IS-IS provides a TLV to carry authentication information, with the type of the TLV specified
as 10.
l Type: is defined by the ISO as 10, with a length of 1 byte.
l Length: indicates the length of the authentication TLV, which is 1 byte.
l Value: indicates the authentication contents of 1 to 254 bytes, including the
authentication type and password.
The authentication type is 1 byte:
– Type 0 is reserved.
– Type 1 indicates plain text authentication.
– Type 54 indicates MD5 authentication.
– Type 255 indicates routing domain private authentication methods.

7.2.4 IS-IS Route Leaking


Normally, Level-1 routers manage routes in Level-1 areas. All Level-2 and Level-1-2 routers
form a contiguous backbone area. Level-1 areas can only connect to the backbone area, but
cannot connect to each other.
A Level-1-2 router encapsulates learned Level-1 routing information into a Level-2 LSP and
floods the Level-2 LSP to other Level-2 and Level-1-2 routers. Then Level-1-2 and Level-2
routers know routing information about the entire IS-IS routing domain. To reduce the size of
routing tables, a Level-1-2 router, by default, does not advertise the learned routing
information of other Level-1 areas and the backbone area to its Level-1 area. In this case,
Level-1 routers cannot know routing information outside the local area. As a result, Level-1
routers cannot select the optimal route to the destination outside the local area.
IS-IS route leaking can solve this problem. You can configure access control lists (ACLs) and
routing policies and mark routes with tags on Level-1-2 routers to select eligible routes. Then
a Level-1-2 router can advertise routing information of other Level-1 areas and backbone area
to its Level-1 area.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 450


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Figure 7-9 IS-IS route leaking

RouterA RouterC
L1 L1/2
cost 50
cost 10

cost 10 cost 10
RouterE RouterF
L2 L2
cost 10 cost 10
Area20

RouterB RouterD
L1 Area10 L1/2

In Figure 7-9, RouterA sends a packet to RouterF. The selected optimal route should be
RouterA->RouterB->RouterD->RouterE->RouterF. This is because the cost of this route is
40, which is smaller than the cost (70) of the other route (RouterA->RouterC->RouterE-
>RouterF). However, when you check the route on RouterA to view the path of the packets
sent to RouterF, the selected route is RouterA->RouterC->RouterE->RouterF but not the
optimal route from RouterA to RouterF.
RouterA (Level-1 router) does not know routes outside its area, so it sends packets outside its
area through the default route generated by the nearest Level-1-2 router. Therefore, the
optimal route is not used to forward the packets.
If route leaking is enabled on Level-1-2 routers (RouterC and RouterD), Level-1 routers in
Area 10 can know routes outside Area 10 and passing through the two Level-1-2 routers.
After route calculation, the forwarding path becomes RouterA->RouterB->RouterD-
>RouterE->RouterF, which is the optimal route from RouterA to RouterF.

7.2.5 IS-IS Overload


IS-IS Overload allows a device to use the IS-IS overload bit to identify the overload state. The
IS-IS overload bit is the OL field in an IS-IS LSP. After the overload bit is set on a device,
other devices ignore this device when performing SPF calculation and consider only the direct
routes of the device.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 451


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Figure 7-10 IS-IS Overload

RouterD RouterE

[Link]/24
Overload
RouterA RouterC

RouterB

As shown in Figure 7-10, RouterB forwards the packets sent from RouterA to network
segment [Link]/24. If the overload bit in the LSP sent from RouterB is set to 1, RouterA
considers the LSDB of RouterB incomplete and sends packets to [Link]/24 through RouterD
and RouterE. This process does not affect the packets sent to the directly connected network
segment of RouterB.
If a device cannot store new LSPs and fails to synchronize the LSDB, the routes calculated by
this device are incorrect. In this situation, the device enters the overload state and does not
calculate the routes passing through this device; however, the direct routes of the device are
still valid.
A device may enter the overload state because of device abnormalities or is manually
configured to enter the overload state. When an IS-IS device on the network needs to be
upgraded or maintained, isolate this device from the network temporarily and set the overload
bit on the device to prevent other devices from using this device to forward traffic.
NOTE

l If the system enters the overload state because of an abnormality, the system deletes all the imported
or leaked routes.
l If the system is configured to enter the overload state, the system determines whether to delete all
the imported or leaked routes based on the configuration.

7.2.6 IS-IS Network Convergence


Fast convergence and priority-based convergence can improve IS-IS network convergence.
Fast convergence speeds up network convergence by fast calculating routes, while priority-
based convergence sets different convergence priorities for routes to improve network
convergence.

Fast Convergence
IS-IS fast convergence is an extended feature of IS-IS that is implemented to speed up the
convergence of routes. Fast convergence includes the following:
l Incremental SPF (I-SPF): recalculates only the routes of the changed nodes rather than
all the nodes when the network topology changes. This speeds up the calculation of
routes.
In ISO 10589, the SPF algorithm is used to calculate routes. When a node changes on the
network, this algorithm is used to recalculate all routes. The calculation takes a long time
and consumes too many CPU resources, which affects the convergence speed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 452


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

I-SPF improves this algorithm. Except for the first time, only changed nodes instead of
all nodes are involved in calculation. The shortest path tree (SPT) generated is the same
as that generated by the previous algorithm. This decreases CPU usage and speeds up
network convergence.
l Partial Route Calculation (PRC): calculates only the changed routes when the routes on
the network change.
Similar to I-SPF, PRC calculates only the changed routes, but it does not calculate the
shortest path. It updates routes based on the SPT calculated by I-SPF.
In route calculation, a leaf represents a route, and a node represents a router. If the SPT
changes after I-SPF calculation, PRC processes all the leaves only on the 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. PRC updates only the routes of this interface, consuming less CPU
resources.
PRC working with I-SPF further improves the convergence performance of the network.
It is an improvement of the original SPF algorithm.
l Intelligent timer: applies to LSP generation and SPF calculation. The first timeout period
of the intelligent timer is fixed. Before the intelligent timer expires, if an event that
triggers the timer occurs, the next timeout period of the intelligent timer increases.
Although the route calculation algorithm is improved, the long interval for triggering
route calculation affects the convergence speed. Frequent network changes also consume
too many CPU resources. The SPF intelligent timer addresses both of these problems. In
general, an IS-IS network is stable under normal conditions. The probability of the
occurrence of many network changes is very minimal, and IS-IS does not calculate
routes frequently. The period for triggering the route calculation is very short
(milliseconds). If the topology of the network changes very often, the intelligent timer
increases the interval for the calculation times to avoid too much CPU consumption. The
original mechanism uses a timer with uniform intervals, which makes fast convergence
and low CPU consumption impossible to achieve.
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 LSP generation timer is designed as an intelligent timer to respond
to emergencies (such as the interface is Up or Down) quickly and speed up the network
convergence.
l LSP fast flooding: speeds up the flooding of LSPs.
In most cases, when an IS-IS router receives new LSPs from other routers, it updates the
LSPs in its LSDB and periodically floods the updated LSPs according to a timer.
LSP fast flooding speeds up LSDB synchronization because it allows a device to flood
fewer LSPs than the specified number before route calculation when the device receives
one or more new LSPs. This mechanism also speeds up network convergence.

Priority-based Convergence
Priority-based IS-IS convergence ensures that specific routes are converged first when a great
number of routes need to be converged. You can assign a high convergence priority to routes
for key services so that these routes are converged quickly. This reduces the impact of route
convergence on key services. Different routes can be set with different convergence priorities
so that important routes can be converged first. This improves network reliability.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 453


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

7.2.7 IS-IS Administrative Tag


Administrative tags control the advertisement of IP prefixes in an IS-IS routing domain to
simplify route management. You can use administrative tags to control the import of routes of
different levels and different areas and control IS-IS multi-instances running on the same
router.

Figure 7-11 IS-IS networking

RouterD L1
Area2 RouterC
Area3
L1 L1/2 L1/2
L2
L2
Area1

L2 L2
Area5
RouterA L1
L1/2 L1/2
L1 L1
L1
L1
Area4 RouterB

In Figure 7-11, RouterA in Area 4 needs to communicate with RouterB in Area 5, RouterC in
Area 3, and RouterD in Area 2. To ensure information security, it is required that other routers
in Level-1 areas (Areas 2, 3, and 5) should not receive the packets sent from RouterA. To
meet this requirement, configure the same administrative tag for IS-IS interfaces on RouterB,
RouterC, and RouterD and configure the Level-1-2 router in Area 4 to leak only the routes
matching the configured administrative tag from Level-2 to Level-1 areas. This allows
RouterA to communicate with only RouterB, RouterC, and RouterD. Figure 7-12 shows the
topology formed on RouterA.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 454


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Figure 7-12 IS-IS administrative tag application

RouterD L1
Area2 RouterC
Area3

L1/2 L1/2
L2
L2
Area1

L2 L2
Area5
RouterA
L1/2 L1/2
L1
L1
L1
Area4 RouterB

The value of an administrative tag is associated with certain attributes. If the cost-style is
wide, wide-compatible or compatible, when IS-IS advertises an IP address prefix with these
attributes, IS-IS adds the administrative tag to the TLV in the prefix. The tag is flooded along
with the prefix throughout the routing domain.

7.2.8 IS-IS Wide Metric


In ISO 10589, the maximum IS-IS interface metric value can only be 63 and the IS-IS cost
style is narrow. A small range of metrics cannot meet the requirements on large-scale
networks. Therefore, in RFC 3784, the maximum IS-IS interface metric value can reach
16777215, and the maximum IS-IS route metric value can reach 4261412864; in this case, the
IS-IS cost style is wide.
l The following lists the TLVs used in narrow mode:
– TLV 128 (IP Internal Reachability TLV): carries IS-IS routes in a routing domain.
– TLV 130 (IP External Reachability TLV): carries IS-IS routes outside a routing
domain.
– TLV 2 (IS Neighbors TLV): carries neighbor information.
l The following lists the TLVs used in wide mode:
– TLV 135 (Extended IP Reachability TLV): replaces the earlier IP reachability TLV
and carries IS-IS routing information. This TLV expands the route metric and
carries sub-TLVs.
– TLV 22 (IS Extended Neighbors TLV): carries neighbor information.
Table 7-2 lists the cost styles of received and sent IS-IS routing information. The cost styles
of received and sent IS-IS routing information vary according to the cost style configured on a
device.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 455


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Table 7-2 Cost styles of received and sent IS-IS routing information

Cost Style Configured Cost Style for Received Cost Style for Sent IS-IS
on a Device IS-IS Routing Routing Information
Information

narrow narrow narrow

narrow-compatible narrow&wide narrow

compatible narrow&wide narrow&wide

wide-compatible narrow&wide wide

wide wide wide

NOTE

When the cost-style is set to compatible, IS-IS sends the information in narrow mode and then in wide
mode.
IS-IS in wide mode and IS-IS in narrow mode cannot communicate. If IS-IS in wide mode and IS-IS in
narrow mode need to communicate, you must change the mode to enable all routers on the network to
receive packets sent by other routers.

7.2.9 IS-IS LSP Fragment Extension


When an IS-IS router needs to advertise the LSPs that contain much information, the IS-IS
router generates multiple LSP fragments to carry more IS-IS information.

IS-IS LSP fragments are identified by the LSP Number field in their LSP IDs. This field is of
1 byte. An IS-IS process can generate a maximum of 256 LSP fragments; therefore, only a
limited number of routes can be carried.

As defined in RFC 3786, virtual system IDs can be configured and virtual LSPs that carry
routing information can be generated for IS-IS.

Concepts
l Originating system: is a router that runs the IS-IS protocol. A single IS-IS process can
function as multiple virtual routers to advertise LSPs, and the originating system refers to
the IS-IS process.
l Normal System-ID: is the system ID of the originating system.
l Virtual System: is the system identified by the additional system ID to generate extended
LSP fragments. These fragments carry additional system IDs in their LSP IDs.
l Additional System-ID: is assigned by network administrators to identify a virtual system.
A maximum of 256 extended LSP fragments can be generated for each additional system
ID.
NOTE
Like a normal system ID, an additional system ID must be unique in a routing domain.
l TLV 24 (IS Alias ID TLV): describes the relationship between the originating system
and virtual system.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 456


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Principles
In IS-IS, each system ID identifies a system, which can generate a maximum of 256 LSP
fragments. In addition, another virtual systems can be configured. Therefore, an IS-IS process
can generate more LSP fragments.
After LSP fragment extension is configured, the system prompts you to restart the IS-IS
process if information is lost because LSPs overflow. After being restarted, the originating
system loads as much routing information to LSPs, adds the overloaded information to the
LSPs of the virtual system for transmission, and uses TLV 24 to notify other routers of its
relationship with the virtual system.

Operating Modes
An IS-IS router can run the LSP fragment extension feature in two modes.

Figure 7-13 IS-IS LSP fragment extension

RouterA1

RouterB RouterA

RouterA2

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 457


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

O Usag Principles Example Precautions


pe e
rat Scena
in rio
g
M
od
e

M Some Virtual systems In Figure 7-13, The LSP sent by a


od router participate in SPF RouterB does not virtual system contains
e-1 s on calculation. The support LSP fragment the same area address
the originating system extension, and RouterA and overload bit as
netwo advertises LSPs is configured to support those in a common
rk do containing information LSP fragment LSP. If the LSPs sent
not about links to each extension in mode-1. by a virtual system
suppor virtual system. RouterA1 and contain TLVs specified
t LSP Similarly, each virtual RouterA2 are virtual in other features, these
fragm system advertises LSPs systems of RouterA TLVs must be the same
ent containing information and send LSPs carrying as those in common
extens about links to the some routing LSPs.
ion. originating system. information of The virtual system
Virtual systems look RouterA. After carries neighbor
like the physical receiving LSPs from information indicating
routers that connect to RouterA, RouterA1, that the neighbor is the
the originating system. and RouterA2, RouterB originating system,
Mode-1 is a considers that there are with the metric equal
transitional mode for three individual routers to the maximum value
the earlier versions that at the remote end and minus 1. The
do not support LSP calculates routes. originating system
fragment extension. In Because the cost of the carries neighbor
earlier versions, IS-IS route from RouterA to information indicating
cannot identify the IS RouterA1 and the cost that the neighbor is the
Alias ID TLV and of the route from virtual system, with the
processes the received RouterA to RouterA2 metric 0. This ensures
LSP that is advertised are both 0, the cost of that the virtual system
by a virtual system as the route from RouterB is the downstream node
an LSP advertised by to RouterA is the same of the originating
an IS-IS process. as the cost of the route system when other
from RouterB to routers calculate
RouterA1. routes.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 458


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

O Usag Principles Example Precautions


pe e
rat Scena
in rio
g
M
od
e

M All Virtual systems do not In Figure 7-13, -


od the participate in SPF RouterB supports LSP
e-2 router calculation. All the fragment extension,
s on routers on the network and RouterA is
the know that the LSPs configured to support
netwo generated by virtual LSP fragment
rk systems actually extension in mode-2.
suppor belong to the RouterA1 and
t LSP originating system. RouterA2 are virtual
fragm An IS-IS router systems of RouterA
ent working in mode-2 can and send LSPs carrying
extens identify the IS Alias ID some routing
ion. TLV, which is used as a information of
reference for RouterA. When
calculating the SPT receiving LSPs from
and routes. RouterA1 and
RouterA2, RouterB
obtains the IS Alias ID
TLV and knows that
the originating system
of RouterA1 and
RouterA2 is RouterA.
RouterB then considers
that information
advertised by RouterA1
and RouterA2 belongs
to RouterA.

NOTE

When the originating system and virtual system send the LSPs with fragment number 0, the LSPs must
carry the IS Alias ID TLV to indicate the originating system regardless of the operation mode (mode-1
or mode-2).

7.2.10 IS-IS Host Name Mapping


The IS-IS host name mapping mechanism maps host names to system IDs for IS-IS devices,
including dynamic host name mapping and static host name mapping. Dynamic host name
mapping takes precedence over static host name mapping. When both a dynamic host name
and a static host name are configured, the dynamic host name takes effect.
On an IS-IS router where host name exchange is disabled, information about IS-IS neighbors
and LSDBs shows that each device in an IS-IS routing domain is identified by a system ID
with 12-digit hexadecimal number, for example, [Link].1234. This device identification

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 459


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

method is complex and not easy to use. The host name exchange mechanism facilitates IS-IS
network management and maintenance.

The system ID is replaced by a host name in the following situations:


l When an IS-IS neighbor is displayed, the system ID of the IS-IS neighbor is replaced by
its host name. When the neighbor is the DIS, the system ID of the DIS is also replaced
by its host name.
l When an LSP in the IS-IS LSDB is displayed, the system ID in the LSP ID is replaced
by the host name of the IS-IS device that advertises the LSP.
l When details about the IS-IS LSDB are displayed, the Host Name field is added to the
LSP generated by the device where dynamic host name exchange is enabled, and the
system ID in the Host Name field is replaced by the dynamic host name of the device
that generates the LSP.

Dynamic Host Name Mapping


On a device where dynamic host name mapping is enabled, dynamic host name information is
advertised as TLV 137 (Dynamic Hostname TLV) in LSPs. When you run IS-IS commands
on other devices to view IS-IS information, the system ID of the local device is replaced by
the configured host name. The host name is easier to identify and memorize than the system
ID.

The Dynamic Hostname TLV is optional and can be inserted anywhere in an LSP. The value
of this TLV cannot be empty. A device can determine whether to send LSPs carrying TLV
137, while the device that receives LSPs can determine whether to ignore TLV 137 or whether
to obtain TLV 137 for its mapping table.

Static Host Name Mapping


Static host name mapping allows you to configure the mapping between host names and
system IDs of other IS-IS devices on a device. Static host name mapping takes effect only on
the local device and is not advertised using LSPs.

7.2.11 IS-IS NSR


As networks develop, the demand for data, audio, and video services is growing, which
imposes increasing requirements on IP network reliability. If an AMB/SMB switchover is
performed on a device due to a maintenance operation or a single point of failure, routes may
fail to converge, which may result in traffic loss or even a network breakdown. Non-stop
routing (NSR) can address this problem and ensure uninterrupted forwarding of key services.

With Routing Information Protocol next generation (IS-IS) NSR, IS-IS real-time data is
synchronized between the AMB and SMB. After an AMB/SMB switchover is performed on a
device, the SMB takes over services from the AMB, and neighbors are unaware of the local
fault. After the switchover, the new AMB recovers IS-IS immediately based on the
synchronized IS-IS real-time data. Therefore, neighbors are unaware of the switchover as
well. IS-IS NSR requires synchronization of the following data:

l All configuration data, such as information about neighbors, timer parameters, and
process configurations.
l Dynamic data, such as the interface parameters and state, and information about
neighbors and the link state database (LSDB).

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 460


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

NOTE

NSR is enabled on the device by default and does not need to be configured.

7.2.12 BFD for IS-IS


In IS-IS, the interval for sending Hello packets is 10s, and the holddown time for keeping the
neighbor relationship is three times the interval for sending Hello packets. If a router does not
receive a Hello packet from its neighbor within the holddown time, the router deletes the
corresponding neighbor relationship. This indicates that the router detects neighbor faults in
seconds. Second-level fault detection, however, may result in heavy packet loss on high-speed
networks.
Bidirectional forwarding detection (BFD) provides light-load and millisecond-level link fault
detection to prevent heavy packet loss. BFD is not used to substitute the Hello mechanism of
IS-IS but helps IS-IS rapidly detect the faults on neighbors or links and instructs IS-IS to
recalculate routes for packet forwarding.
In Figure 7-14, basic IS-IS functions are configured on every router, and BFD for IS-IS is
enabled on RouterA and RouterB.

Figure 7-14 BFD for IS-IS

Router A Router D Router B

Primary Path

Backup Path

Probed Path
Router C

When a fault occurs on the primary link, BFD fast detects the fault and reports it to IS-IS. IS-
IS sets the neighbors of the interface on the faulty link to Down, which triggers topology
calculation, and updates LSPs so that neighbors such as RouterC can receive the updated
LSPs from RouterB. This process implements fast network convergence.

Classification of BFD for IS-IS


BFD for IS-IS includes static BFD for IS-IS and dynamic BFD for IS-IS.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 461


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Table 7-3 Two implementation modes for BFD for IS-IS


Impleme Principles Differences
ntation
Mode

Static BFD BFD session parameters, l Static BFD can be manually


for IS-IS including local and remote controlled and is easy to deploy. To
discriminators, are manually save memory and ensure reliability
configured using commands, and of key links, deploy BFD on
the requests for establishing BFD specified links.
sessions are manually delivered. l Establishing and deleting BFD
sessions need to be manually
triggered and lack flexibility.
Configuration errors may occur. For
example, if an incorrect local or
remote discriminator is configured, a
BFD session cannot work properly.

Dynamic BFD sessions are dynamically Dynamic BFD is more flexible than
BFD for created but not manually static BFD. In dynamic BFD, routing
IS-IS configured. When detecting protocols trigger the setup of BFD
faults, BFD informs IS-IS of the sessions, preventing the configuration
faults through the routing errors caused by manual configuration.
management (RM) module. IS-IS Dynamic BFD is easy to configure and
then turns the neighbors Down, applies to the scenarios where BFD
rapidly advertises the changed needs to be configured on the entire
LSPs, and performs incremental network.
SPF. This implements fast route
convergence.

NOTE

BFD uses local and remote discriminators to differentiate multiple BFD sessions between the same pair
of systems.
Because IS-IS establishes only single-hop neighbors, BFD for IS-IS detects only single-hop links
between IS-IS neighbors.

Establishment and Deletion of BFD Sessions


The RM module provides related services for association with the BFD module for IS-IS.
Through RM, IS-IS prompts BFD to set up or tear down BFD sessions by sending notification
messages. In addition, BFD events are transmitted to IS-IS through RM.
Conditions for setting up a BFD session
l Basic IS-IS functions are configured on each router and IS-IS is enabled on the interfaces
of the routers.
l BFD is globally enabled on each router, and BFD is enabled on a specified interface or
process.
l BFD is enabled on interfaces or processes, and the neighbors are Up. A DIS needs to be
elected on a broadcast network.
Process of setting up a BFD session

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 462


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

l P2P network
After the conditions for setting up a BFD session are satisfied, IS-IS instructs BFD
through RM to directly set up a BFD session between neighbors.
l Broadcast network
After the conditions for establishing BFD sessions are met, and the DIS is elected, IS-IS
instructs BFD through RM to establish a BFD session between the DIS and each router.
No BFD session is established between non-DISs.
NOTE

On a broadcast network, routers (including non-DIS routers) of the same level on a network
segment can establish neighbor relationships. In the implementation of BFD for IS-IS, however,
BFD sessions are established only between a DIS and a non-DIS. On a P2P network, BFD
sessions are directly established between neighbors.
If a Level-1-2 neighbor relationship is set up between two routers on a link, IS-IS sets up two BFD
sessions for the Level-1 and Level-2 neighbors on a broadcast network, but sets up only one BFD
session on a P2P network.
Conditions for tearing down a BFD session
l P2P network
When a neighbor relationship that was set up on P2P interfaces by IS-IS is down (that is,
the neighbor relationship is not in the Up state) or when the IP protocol type of a
neighbor is deleted, IS-IS tears down the BFD session.
l Broadcast network
When a neighbor relationship that was set up on P2P interfaces by IS-IS is torn down
(that is, the neighbor relationship is not in the Up state), when the IP protocol type of a
neighbor is deleted, or when the DIS is re-elected, IS-IS tears down the BFD session.
NOTE

After dynamic BFD is globally disabled in an IS-IS process, the BFD sessions on all the interfaces in
this IS-IS process are deleted.

IS-IS Responding to BFD Session Down Event


When detecting a link failure, BFD generates a Down event, and then notifies RM of the
event. RM then instructs IS-IS to deletes the neighbor relationship. IS-IS recalculates routes
to speed up route convergence on the entire network.
When both the local router and its neighbor are Level-1-2 routers, they establish two
neighbors of different levels. Then IS-IS establishes two BFD sessions for the Level-1
neighbor and Level-2 neighbor respectively. When BFD detects a link failure, it generates a
Down event and informs the RM module of the event. The RM module then instructs IS-IS to
delete the neighbor relationship of a specific level.

7.2.13 IS-IS Auto FRR


With the development of networks, the services such as Voice over IP (VoIP) and online video
services require high-quality real-time transmission. Nevertheless, if an IS-IS link fault
occurs, traffic can be switched to a new link only after the processes, including fault
detection, LSP update, LSP flooding, route calculation, and FIB entry delivery, are complete.
As a result, it takes much more than 50 ms to rectify the fault, which cannot meet the
requirement for real-time transmission services on the network.
Complying with RFC 5286 (Basic Specification for IP Fast Reroute Loop-Free Alternates),
IS-IS Auto FRR protects traffic when links or nodes become faulty. IS-IS Auto FRR allows

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 463


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

the forwarding system to rapidly detect such faults and take measures to restore services as
soon as possible.
In most cases, you can bind BFD to IS-IS Auto FRR to ensure that the fault recovery time is
within 50 ms. When BFD detects a link fault on an interface, the BFD session goes Down,
triggering FRR on the interface. Subsequently, traffic is switched from the faulty link to the
backup link, which protects services.

Principles
IS-IS Auto FRR pre-computes a backup link by using the Loop-Free Alternate (LFA)
algorithm, and then adds the backup link and the primary link to the forwarding table. In the
case of an IS-IS network failure, IS-IS Auto FRR can fast switch traffic to the backup link
before routes on the control plane converge. This ensures normal transmission of traffic and
improves the reliability of the IS-IS network.
The backup link is calculated through the LFA algorithm. With the neighbor that can provide
the backup link being the root, the shortest path to the destination node is calculated by a
device through the SPF algorithm. Then, the loop-free backup link is calculated according to
the inequality defined in RFC 5286.
IS-IS Auto FRR can filter backup routes that need to be added to the IP routing table. Only
the backup routes matching the filtering policy are added to the IP routing table. In this
manner, users can flexibly control the addition of IS-IS backup routes to the IP routing table.

Applications
IS-IS Auto FRR support traffic engineering (TE) links, including the following types:
l IP protecting TE
As shown in Figure 7-15, the TE tunnel has the smallest IS-IS cost among the paths
from RouterS to RouterD. Therefore, RouterS selects the TE tunnel as the primary path
to RouterD. The path RouterS->RouterN->RouterD has the second smallest cost.
According to the LFA algorithm, RouterS selects the path RouterS->RouterN->RouterD
as the backup path. The outbound interface of the backup path is the interface that
connects RouterS to RouterN.
NOTE

If the outbound interface of the backup link is the actual outbound interface of the TE tunnel, IP
protecting TE fails.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 464


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Figure 7-15 IP protecting TE


RouterS TE Tunnel: IS-IS cost = 1 RouterD

IS-IS cost = 13
IS
-IS
co

=1
st

st
=

co
10

-IS
IS
RouterN

Traffic in normal

Traffic in case of failure

l TE protecting IP
As shown in Figure 7-16, the physical path RouterS-->RouterN-->RouterD has the
smallest IS-IS metric among the paths from RouterS to RouterD. Therefore, RouterS
prefers the path RouterS-->RouterN-->RouterD as the primary path from RouterS to
RouterD. The IS-IS cost of the TE tunnel is 12, and the explicit path of the TE tunnel is
the direct link from RouterS to RouterD. The IS-IS metric of the direct link from
RouterS to RouterD is 13, which is greater than the IS-IS metric of the TE tunnel.
Therefore, IS-IS selects the TE tunnel as the backup path. TE protecting IP is
implemented.

Figure 7-16 TE protecting IP


RouterS TE Tunnel: IS-IS cost = 12 RouterD

IS-IS cost = 13
1
=
st
IS

co
-IS

-IS
co

IS
st
=
10

RouterN
Traffic in normal
Traffic in case of failure

IS-IS Auto FRR traffic protection is classified into link protection and link-node dual
protection.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 465


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Figure 7-17 IS-IS Auto FRR link protection


cost = 10

RouterS RouterD

co

10
st

=
=

st
10

co
RouterN

Figure 7-18 IS-IS Auto FRR link-node dual protection


RouterE
5

co
=

st
st

=
co

10

RouterS RouterD
co

10
st

=
=

st
10

co

RouterN

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 466


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Table 7-4 IS-IS Auto FRR traffic protection


Tra Object Condition Application Example
ffic Protecte
Pro d
tec
tio
n
Ty
pe

Lin Traffic The link cost must satisfy the following In Figure 7-17, traffic is
k passing inequality: transmitted from RouterS to
pro through a Distance_opt(N,D) < Distance_opt(N,S) RouterD. The link cost
tect specific + Distance_opt(S,D) satisfies the link protection
ion link inequality. When the
primary link fails, RouterS
switches the traffic to the
backup link RouterS-
>RouterN so that the traffic
can be further transmitted
along downstream paths.
This ensures that the traffic
interruption time is within
50 ms.

Lin Next-hop Link-node dual protection must satisfy In Figure 7-18, traffic is
k- node or the following conditions: transmitted along the path
nod link from l The link cost must satisfy the RouterS->RouterE-
e the local following inequality: >RouterD. The link cost
dua node to satisfies the link protection
l the next- Distance_opt(N,D) < inequality. When RouterE or
pro hop Distance_opt(N,S) + the link between RouterS
tect node. Distance_opt(S,D) and RouterE fails, RouterS
ion Node l The interface cost of the router must switches the traffic to the
protectio satisfy the following inequality: backup link RouterS-
n takes Distance_opt(N,D) < >RouterN so that the traffic
preceden Distance_opt(N,E) + can be further transmitted
ce over Distance_opt(E,D) along downstream paths.
link This ensures that the traffic
protectio interruption time is within
n. 50 ms.

NOTE

In Table 7-4, Distance_opt(X,Y) indicates the cost of the optimal path between node X and node Y. S
indicates the source node of traffic; E indicates the faulty node; N indicates the node on the backup link;
D indicates the destination node of traffic.

IS-IS FRR in a Multi-Source Routing Scenario


IS-IS LFA FRR uses the SPF algorithm to calculate the shortest path to the destination node,
with each neighbor that provides a backup link as the root node. The backup next hop is node-

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 467


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

based, which applies to single-source routing scenarios. With the diversification of networks,
multi-source routing scenarios appear, where multiple nodes advertise the same route. Such
multi-source routing scenarios do not meet single-source LFA conditions. As a result, the
backup next hop cannot be calculated. IS-IS FRR for multi-source routing scenarios can
address this problem by using a routing source to protect the primary routing source and
improve network reliability.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 468


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Figure 7-19 Networking for IS-IS FRR in a multi-source routing scenario

SwitchB

C
5

os
st=

st=
SwitchB

t=
Co

Co

0
Cost=20

Cost=20
SwitchA SwitchA

0
st=
Co

Co

Co
st=

st=
10

10
SwitchC
SwitchC

(a) (b)

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 469


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

In Figure 7-19(a), the cost of the link between SwitchA and SwitchB is 5, whereas the cost of
the link between SwitchA and SwitchC is 10. Both SwitchB and SwitchC advertise the route
[Link]/24. IS-IS FRR is enabled on SwitchA. However, single-source LFA conditions are
not met. As a result, SwitchA fails to calculate the backup next hop of the route [Link]/24.
IS-IS FRR for multi-source routing scenarios can address this problem.
In Figure 7-19(b), a virtual node is simulated between SwitchB and SwitchC and is connected
to SwitchB and SwitchC. The cost of the link from SwitchB or SwitchC to the virtual node is
0, whereas the cost of the link from the virtual node to SwitchB or SwitchC is the maximum
value. After the virtual node advertises the route [Link]/24, SwitchA uses the LFA algorithm
to calculate the backup next hop of the virtual node. Then the route [Link]/24 inherits the
backup next hop from the virtual node. In this example, the primary link to the virtual node is
the one from SwitchA to SwitchB, and the backup link is the one from SwitchA to SwitchC.

7.2.14 IS-IS Multi-Instance and Multi-Process


On a VPN-supporting device, you can associate multiple VPN instances with multiple IS-IS
processes to implement IS-IS multi-instance. IS-IS multi-process allows you to create
multiple IS-IS processes in the same VPN (or on the public network). These IS-IS processes
are independent of each other. Route exchange between IS-IS processes is similar to route
exchange between routing protocols.
Each IS-IS process can be bound to a specified VPN instance. A typical application is as
follows: In a VPN, IS-IS runs between PEs and CEs and also runs on the VPN backbone
network. On the PEs, the two IS-IS processes are independent of each other.
IS-IS multi-instance and multi-process have the following characteristics:
l IS-IS multi-processes share an RM routing table. IS-IS multi-instances use the RM
routing tables in VPNs, and each VPN has its own RM routing table.
l IS-IS multi-process allows a set of interfaces to be associated with a specified IS-IS
process. This ensures that the specified IS-IS process performs all the protocol
operations only on this set of interfaces. In this manner, multiple IS-IS processes can
work on a single router and each process is responsible for managing a unique set of
interfaces.
l When creating an IS-IS process, you can bind it to a VPN instance to associate the IS-IS
process with the VPN instance. The IS-IS process accepts and processes only the events
related to the VPN instance. When the bound VPN instance is deleted, the IS-IS process
is also deleted.

7.2.15 IS-IS Neighbor Relationship Flapping Suppression


IS-IS neighbor relationship flapping suppression works by delaying IS-IS neighbor
relationship reestablishment or setting the link cost to the maximum value (16777214 for
wide mode and 63 for narrow mode).

Background
If an interface transmitting IS-IS services alternates between Up and Down, IS-IS neighbor
relationship flapping occurs on the interface. During the flapping, IS-IS frequently sends
Hello packets to reestablish the neighbor relationship, synchronizes LSDBs, and recalculates
routes. In this process, a large number of packets are exchanged, adversely affecting neighbor
relationship stability, IS-IS services, and other IS-IS-dependent services, such as LDP and

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 470


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

BGP. IS-IS neighbor relationship flapping suppression can address this problem by delaying
IS-IS neighbor relationship reestablishment or preventing service traffic from passing through
flapping links.

Related Concepts
Flapping_event: reported when the status of a neighbor relationship on an interface last
changes from Up to Init or Down. The flapping_event triggers flapping detection.

Flapping_count: number of times flapping has occurred.

Detect-interval: interval at which flapping is detected. The interval is used to determine


whether to trigger a valid flapping_event.

Threshold: flapping suppression threshold. When the flapping_count exceeds the threshold,
flapping suppression takes effect.

Resume-interval: interval used to determine whether flapping suppression exits. If the


interval between two valid flapping_events is longer than the resume-interval, flapping
suppression exits.

Implementation
Flapping detection

IS-IS interfaces start a flapping counter. If the interval between two flapping_events is shorter
than the detect-interval, a valid flapping_event is recorded, and the flapping_count increases
by 1. When the flapping_count exceeds the threshold, the system determines that flapping
occurs, and therefore triggers flapping suppression, and sets the flapping_count to 0. If the
interval between two valid flapping_events is longer than the resume-interval before the
flapping_count reaches the threshold again, the system sets the flapping_count to 0 again.
Interfaces start the suppression timer when the status of a neighbor relationship last changes
to ExStart or Down.

The detect-interval, threshold, and resume-interval are configurable.

NOTE
The value of resume-interval must be greater than that of detecting-interval.
Flapping suppression

Flapping suppression works in either Hold-down or Hold-max-cost mode.

l Hold-down mode: In the case of frequent flooding and topology changes during neighbor
relationship establishment, interfaces prevent neighbor relationships from being
reestablished during the suppression period, which minimizes LSDB synchronization
attempts and packet exchanges.
l Hold-max-cost mode: If the traffic forwarding path changes frequently, interfaces use the
maximum cost of the flapping link during the suppression period, which prevents traffic
from passing through the flapping link.

Flapping suppression can also work first in Hold-down mode and then in Hold-max-cost
mode.

By default, the Hold-max-cost mode takes effect. The mode and suppression period can be
changed manually.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 471


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

NOTE
When an interface enters the flapping suppression state, all neighbor relationships on the interface enter
the state accordingly.
Exiting from flapping suppression

Interfaces exit from flapping suppression in the following scenarios:

l The suppression timer expires.


l The corresponding IS-IS process is reset.
l A command is run to exit from flapping suppression.
l Three Hello packets in which the padding TLV carries a sub-TLV with the value being
251 are sent consecutively to notify the peer device to forcibly exit flapping suppression.

Typical Scenarios
Basic scenario

In Figure 7-20, the traffic forwarding path is Router A -> Router B -> Router C -> Router E
before a link failure occurs. After the link between Router B and Router C fails, the
forwarding path switches to Router A -> Router B -> Router D -> Router E. If the neighbor
relationship between Router B and Router C frequently flaps at the early stage of the path
switchover, the forwarding path will be switched frequently, causing traffic loss and affecting
network stability. If the neighbor relationship flapping meets suppression conditions, flapping
suppression takes effect.

l If flapping suppression works in Hold-down mode, the neighbor relationship between


Router B and Router C is prevented from being reestablished during the suppression
period, in which traffic is forwarded along the path Router A -> Router B -> Router D ->
Router E.
l If flapping suppression works in Hold-max-cost mode, the maximum cost is used as the
cost of the link between Router B and Router C during the suppression period, and traffic
is forwarded along the path Router A -> Router B -> Router D -> Router E.

Figure 7-20 Flapping suppression in a basic scenario

Router C

cost=10 cost=10

Router A Router B Router E

cost=100 cost=100

Router D

Single-forwarding path scenario

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 472


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

When only one forwarding path exists on the network, the flapping of the neighbor
relationship between any two devices on the path will interrupt traffic forwarding. In Figure
7-21, the traffic forwarding path is Router A -> Router B -> Router C -> Router E. If the
neighbor relationship between Router B and Router C flaps, and the flapping meets
suppression conditions, flapping suppression takes effect. However, if the neighbor
relationship between Router B and Router C is prevented from being reestablished, the whole
network will be divided. Therefore, Hold-max-cost mode (rather than Hold-down mode) is
recommended. If flapping suppression works in Hold-max-cost mode, the maximum cost is
used as the cost of the link between Router B and Router C during the suppression period.
After the network stabilizes and the suppression timer expires, the link is restored.

NOTE

By default, the Hold-max-cost mode takes effect.

Figure 7-21 Flapping suppression in a single-forwarding path scenario

Router A Router E

cost=65535

Router B Router C

Broadcast scenario
In Figure 7-22, four devices are deployed on the same broadcast network using switches, and
the devices are broadcast network neighbors. If Router C flaps due to a link failure, and
Router A and Router B were deployed at different time (Router A was deployed earlier for
example) or the flapping suppression parameters on Router A and Router B are different,
Router A first detects the flapping and suppresses Router C. Consequently, the Hello packets
sent by Router A do not carry Router C's router ID. However, Router B has not detected the
flapping yet and still considers Router C a valid node. As a result, the DR candidates
identified by Router A are Router B and Router D, whereas the DR candidates identified by
Router B are Router A, Router C, and Router D. Different DR candidates result in a different
DR election result, which may lead to route calculation errors. To prevent this problem in
scenarios where an interface has multiple neighbors, such as on a broadcast, P2MP, or NBMA
network, all neighbors on the interface are suppressed when the status of a neighbor
relationship last changes to ExStart or Down. Specifically, if Router C flaps, Router A,
Router B, and Router D on the broadcast network are all suppressed. After the network
stabilizes and the suppression timer expires, Router A, Router B, and Router D are restored to
normal status.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 473


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Figure 7-22 Flapping suppression on a broadcast network

Router A Router B

Router C Router D

Scenario of multi-level networking


In Figure 7-23, Router A, Router B, Router C, Router E, and Router F are connected on
Level 1 (Area 1), and Router B, Router D, and Router E are connected on Level 2 (Area 0).
Traffic from Router A to Router F is preferentially forwarded along an intra-area route, and
the forwarding path is Router A -> Router B -> Router C -> Router E -> Router F. When the
neighbor relationship between Router B and Router C flaps and the flapping meets
suppression conditions, flapping suppression takes effect in the default mode (Hold-max-
cost). Consequently, the maximum cost is used as the cost of the link between Router B and
Router C. However, the forwarding path remains unchanged because intra-area routes take
precedence over inter-area routes during route selection according to IS-IS route selection
rules. To prevent traffic loss in multi-area scenarios, configure Hold-down mode to prevent
the neighbor relationship between Router B and Router C from being reestablished during the
suppression period. During this period, traffic is forwarded along the path Router A -> Router
B -> Router D -> Router E -> Router F.

NOTE

By default, the Hold-max-cost mode takes effect. The mode can be changed to Hold-down manually.

Figure 7-23 Flapping suppression in a multi-area scenario

Router C
Router A Router F

cost=10 cost=10
Level-1

Device
Area Router B Device
Router E
Level-2 B
0 cost=10 cost=10

Router D

Scenario with both LDP-IGP synchronization and IS-IS neighbor relationship flapping
suppression configured

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 474


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

In Figure 7-24, if the link between PE1 and P1 fails, an LDP LSP switchover is implemented
immediately, causing the original LDP LSP to be deleted before a new LDP LSP is
established. To prevent traffic loss, LDP-IGP synchronization needs to be configured. With
LDP-IGP synchronization, the maximum cost is used as the cost of the new LSP to be
established. After the new LSP is established, the original cost takes effect. Consequently, the
original LSP is deleted, and LDP traffic is forwarded along the new LSP.
LDP-IGP synchronization and IS-IS neighbor relationship flapping suppression work in either
Hold-down or Hold-max-cost mode. If both functions are configured, Hold-down mode takes
precedence over Hold-max-cost mode, followed by the configured link cost. Table 7-5 lists
the suppression modes that take effect in different situations.

Table 7-5 Principles for selecting the suppression modes that take effect in different situations
LDP-IGP LDP-IGP LDP-IGP Exited from LDP-
Synchronization/I Synchronization Synchronization IGP
S-IS Neighbor Hold-down Mode Hold-max-cost Synchronization
Relationship Mode Suppression
Flapping
Suppression
Mode

IS-IS Neighbor Hold-down Hold-down Hold-down


Relationship
Flapping
Suppression Hold-
down Mode

IS-IS Neighbor Hold-down Hold-max-cost Hold-max-cost


Relationship
Flapping
Suppression Hold-
max-cost Mode

Exited from IS-IS Hold-down Hold-max-cost Exited from LDP-


Neighbor IGP synchronization
Relationship and IS-IS neighbor
Flapping relationship flapping
Suppression suppression

For example, the link between PE1 and P1 frequently flaps in Figure 7-24, and both LDP-
IGP synchronization and IS-IS neighbor relationship flapping suppression are configured. In
this case, the suppression mode is selected based on the preceding principles. No matter
which mode (Hold-down or Hold-max-cost) is selected, the forwarding path is PE1 -> P4 ->
P3 -> PE2.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 475


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Figure 7-24 Scenario with both LDP-IGP synchronization and IS-IS neighbor relationship
flapping suppression configured

P1 P2

cost=10
cost=10 cost=10

CE1 PE1 PE2 CE2


cost=100 cost=100
cost=100

P4 P3

Scenario with both bit-error-triggered protection switching and IS-IS neighbor


relationship flapping suppression configured
If a link has poor link quality, services transmitted along it may be adversely affected. If bit-
error-triggered protection switching is configured and the bit error rate (BER) along a link
exceeds a specified value, a bit error event is reported, and the maximum cost is used as the
cost of the link, triggering route reselection. Consequently, service traffic is switched to the
backup link. If both bit-error-triggered protection switching and IS-IS neighbor relationship
flapping suppression are configured, they both take effect. Hold-down mode takes precedence
over Hold-max-cost mode, followed by the configured link cost.
Scenario with both Link-bundle and IS-IS neighbor relationship flapping suppression
configured
When the service traffic rate exceeds the capacity of the link, multiple links must be used. If
one of the links between two devices is faulty, traffic is switched to another link. Because of
limited forwarding capacity on the new link, excessive traffic is discarded. If the number of
faulty links reaches the upper threshold, the maximum cost is used as the cost of all links in
the link bundle to switch all service traffic to the backup nodes. When both link-bundle and
neighbor relationship flapping suppression are configured, if the number of flapping links
reaches the upper threshold, the maximum cost must be configured as the cost of all other
links in the link bundle to prevent service loss caused by user traffic congestion. As shown in
Figure 7-25, two parallel links exist between Router A and Router C. If Link 1 is faulty and
Link 2 bears all service traffic, traffic loss occurs. If both link-bundle and neighbor
relationship flapping suppression are configured and Link 1 flaps, the maximum cost must be
configured for Link 2 to avoid service traffic congestion. Only the Hold-max-cost mode
therefore can be configured for neighbor relationship flapping suppression to switch the
traffic forwarding path to Router A->Router B->Router C.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 476


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Figure 7-25 Scenario with both Link-bundle and IS-IS neighbor relationship flapping
suppression configured

Router B

Router A
cost=100 cost=100
Network
cost=10
cost=10 Link 2

Link 1

Router C

7.3 Summary of IS-IS Configuration Tasks


Table 7-6 describes the IS-IS configuration tasks.

Table 7-6 IS-IS configuration tasks


Scenario Description Task

Configuring basic IS-IS To deploy the IS-IS protocol 7.6 Configuring Basic IS-
functions on IPv4 networks, configure IS Functions
basic IS-IS functions to
enable communication
between different nodes on
the network. Other IS-IS
features can only be
configured after the basic
functions are configured.

Configuring IS-IS network On IS-IS networks, 7.7 Improving IS-IS


security unauthorized users can Network Security
attack the IS-IS network by
modifying data packets or
forging authorized users. To
ensure security of services
carried on IS-IS networks,
configure the area or domain
authentication and interface
authentication.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 477


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Scenario Description Task

Configuring IS-IS route If multiple redundant links 7.8 Controlling IS-IS


selection are available in the network Route Selection
using the IS-IS protocol, the
route in the IS-IS routing
table may not be the
expected optimal route. This
does not meet the network
planning and traffic
management requirements.
To optimize the IS-IS
network and facilitate traffic
management, more accurate
control of the routes on the
network is required.

Configuring IS-IS routing In practical applications, to 7.9 Controlling IS-IS


information exchange meet network requirements, Route Exchange
configure route policies to
accurately control
advertising and receiving of
IS-IS routing information.

Configuring IS-IS route Route aggregation allows 7.10 Configuring IS-IS


aggregation multiple routes with the Route Summarization
same IP prefix to be
aggregated into one route.
Route aggregation on a large
IS-IS network can
effectively reduce entries in
the routing table. This
minimizes system resource
consumption and facilitates
management. In addition, if
a link in the aggregated IP
address segment frequently
alternates between Up and
Down, devices outside this
segment will not be affected
by the change. This prevents
route flapping and improves
network stability.

Configuring IS-IS route To enable IS-IS to rapidly 7.11 Controlling IS-IS


convergence detect the network changes, Route Convergence
speed up the IS-IS network
convergence. To minimize
the effect on networks from
route flapping and reduce
load on the device, slow
down the IS-IS network
convergence.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 478


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Scenario Description Task

Configuring LSP fragment When information contained 7.13 Configuring LSP


extension in the LSP data packet Fragment Extension
Protocol Data Unit (PDU) to
be advertised by IS-IS
increases greatly, the IS-IS
device will generate
multiple LSP fragments to
carry and advertise more
information.

Configuring mesh groups On the NBMA network, 7.14 Configuring a Mesh


when an interface of the Group on an NBMA
switch receives a new LSP, Network
the LSP is flooded to other
interfaces of the switch. On
highly-connected networks
that have multiple P2P links,
this processing method
results in repeated LSP
flooding and wastes
bandwidth resources.
To solve this problem, create
a mesh group and add some
interfaces to the group. The
switch never floods the
LSPs received at interfaces
in the mesh group to other
interfaces from the same
group, and only floods the
LSPs to interfaces from
other groups or interfaces
that are not configured to
any mesh groups.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 479


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Scenario Description Task

Configuring IS-IS reliability To ensure rapid recovery 7.15 Configuring IS-IS


from failures on networks Reliability
using the IS-IS protocol,
adopt the solution of fast
fault detection and standby
link switchover. However,
the IS-IS fault detection
mechanism and link
switchover require a long
period of time, which fails
to meet the requirements of
services that are highly
sensitive to packet loss and
packet delay.
To meet requirements of
these services, use BFD for
IS-IS to implement fast fault
detection and use IS-IS Auto
FRR and IS-IS GR helper to
implement fast switchover.
This improves IS-IS
reliability.

Configuring IS-IS overload If the system cannot store 7.16 Configuring the
new LSPs or synchronize Overload Bit for an IS-IS
the LSDB normally, the Device
calculated routing
information will be
incorrect. In this case, the
system can enter the
overload state. Routes
reached through the device
will not be calculated, but
routes directly connected to
the device will not be
ignored.
When an IS-IS device on the
network requires upgrade or
maintenance, the device
needs to be temporarily
isolated from the network.
To prevent other devices
from forwarding traffic
through this node, set the
overload bit for the device
in question.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 480


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

7.4 Licensing Requirements and Limitations for IPv4 IS-IS


Involved Network Elements
Other network elements also need to support IPv4 IS-IS.

Licensing Requirements
IPv4 IS-IS is a basic feature of the CE8800, CE7800, CE6800, and CE5800 series switches
and is not under license control.

Version Requirements

Table 7-7 Products and minimum version supporting IPv4 IS-IS

Product Minimum Version Required

CE8868EI V200R005C10

CE8861EI V200R005C10

CE8860EI V100R006C00

CE8850-32CQ-EI V200R002C50

CE8850-64CQ-EI V200R005C00

CE7850EI V100R003C00

CE7855EI V200R001C00

CE6810EI V100R003C00

CE6850EI V100R001C00

CE6850-48S6Q-HI V100R005C00

CE6850-48T6Q-HI/CE6850U-HI/ V100R005C10
CE6851HI

CE6855HI V200R001C00

CE6856HI V200R002C50

CE6857EI V200R005C10

CE6860EI V200R002C50

CE6865EI V200R005C00

CE6870-24S6CQ-EI/ V200R001C00
CE6870-48S6CQ-EI

CE6870-48T6CQ-EI V200R002C50

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 481


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Product Minimum Version Required

CE6875EI V200R003C00

CE6880EI V200R002C50

CE5880EI V200R005C10

CE5810EI V100R002C00

CE5850EI V100R001C00

CE5850HI V100R003C00

CE5855EI V100R005C10

Feature Limitations
The CE6810LI does not support IPv4 Layer 3 forwarding. After the IPv4 function is enabled
on an interface of the CE6810LI, the configured IPv4 address can only be used to manage the
switch.

7.5 Default Settings for IPv4 IS-IS


Table 7-8 describes the default settings for IPv4 IS-IS.

Table 7-8 Default settings for IPv4 IS-IS

Parameter Default Setting

IS-IS Disabled

DIS priority 64

Device level Level-1-2

Interval for sending Hello packets 10s

Minimum interval for sending LSPs 50 ms

Maximum number of LSPs to be sent 10

Interval for updating LSPs 900s

Maximum lifetime of LSPs 1200s

Bandwidth reference value 100 Mbit/s

7.6 Configuring Basic IS-IS Functions

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 482


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Pre-configuration Tasks
Before configuring basic IS-IS functions, complete the following task:

l Configuring IP addresses for interfaces to ensure that neighboring nodes are reachable at
the network layer

Configuration Procedure
Creating an IS-IS process is the prerequisite for configuring a network entity title (NET),
configuring the device level, and establishing an IS-IS neighbor relationship.

7.6.1 Creating IS-IS Processes

Context
Creating IS-IS processes is the prerequisite for performing IS-IS configurations.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run isis [ process-id ] [ vpn-instance vpn-instance-name ]

An IS-IS process is created, and the IS-IS view is displayed.

If a VPN instance is specified, the IS-IS process belongs to the specified VPN instance.
Otherwise, the IS-IS process belongs to the public network instances.

Step 3 (Optional) Run description description

Description for the IS-IS process is configured.

Step 4 Run commit

The configuration is committed.

----End

7.6.2 Configuring a NET

Context
NET is the special form of the network service access point (NSAP). After the IS-IS view is
displayed, IS-IS can start only when a NET is configured for an IS-IS process.

Generally, you only need to configure one NET for an IS-IS process. When an area needs to
be redefined, for example, the area needs to be merged with other areas or divided into sub-
areas, configure multiple NETs to ensure route correctness. A maximum of three area
addresses can be configured for an IS-IS process. Therefore, a maximum of three NETs can
be configured for an IS-IS process. When configuring multiple NETs, ensure that their system
IDs are the same.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 483


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run isis [ process-id ]
The IS-IS process view is displayed.
Step 3 Run network-entity net
A NET is configured.

NOTE

Configuring loopback interface addresses based on NETs is recommended to ensures that a NET is
unique on the network. If NETs are not unique, route flapping will easily occur.
An area ID uniquely identifies an area in the same IS-IS domain. All routers in the same Level-1 area
must share the same area ID, while routers in the same Level-2 area can have different area IDs.

Step 4 Run commit


The configuration is committed.

----End

7.6.3 Configuring the Device Level


Context
Configure the device level according to network planning requirements:
l When the level of a device is Level-1, the device establishes neighbor relationships with
only Level-1 and Level-1-2 routers in the same area and maintains only Level-1 LSDBs.
l When the level of a device is Level-2, the device can establish neighbor relationship with
Level-2 routers in the same area or different areas and with Level-1-2 routers in different
areas and maintain only Level-2 LSDB.
l When the level of a device is Level-1-2, the device can establish Level-1 neighbor
relationships with Level-1 and Level-1-2 routers in the same area. It can also establish
Level-2 neighbor relationships with Level-2 and Level-1-2 routers in different areas. A
Level-1-2 router maintains two LSDBs: a Level-1 LSDB and a Level-2 LSDB. The
Level-1 LSDB saves for intra-area routing and the Level-2 LSDB saves for inter-area
routing.

If the levels of IS-IS devices are changed during network operation, the IS-IS process will be
restarted and IS-IS neighbor relationships will be disconnected. Setting the levels of devices
when configuring IS-IS is recommended.

Procedure
Step 1 Run system-view
The system view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 484


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Step 2 Run isis [ process-id ]


The IS-IS process view is displayed.
Step 3 Run is-level { level-1 | level-1-2 | level-2 }
The level of the switch is configured.
By default, the level of the switch is Level-1-2.
Step 4 Run commit
The configuration is committed.

----End

7.6.4 Establishing IS-IS Neighbor Relationships


Context
The methods to establish IS-IS neighbor relationships on a broadcast network and a P2P
network are different. Therefore, you need to set different IS-IS attributes for interfaces of
different types:
l On a broadcast network, IS-IS needs to select the designated intermediate system (DIS).
You can set the DIS priority for IS-IS interfaces to enable the device with the highest
DIS priority to be elected as the DIS.
l On a P2P network, IS-IS does not need to select the DIS. Therefore, the DIS priority
does not need to be configured for interfaces. To ensure P2P link reliability, configure
IS-IS to establish a neighbor relationship on two P2P interfaces in 3-way mode for
unidirectional link fault detection.
Generally, IS-IS checks the IP addresses of received Hello packets. A neighbor
relationship can be established only when the source IP address carried in a received
Hello packet and the address of the interface that receives the Hello packet are on the
same network segment. If the IP addresses of the two P2P interfaces are on different
network segments, and the isis peer-ip-ignore command is run on the two interfaces, IS-
IS does not check the peer IP address. The neighbor relationship can be correctly
established on the two P2P interfaces.

Procedure
l Establish an IS-IS neighbor relationship on a broadcast link.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute
configurations (for example, shutdown and description configurations).
Alternatively, if configuration information supported by both Layer 2 and Layer 3

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 485


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

interfaces exists (for example, mode lacp and lacp system-id configurations), no
configuration that is not supported after the working mode of the interface is
switched can exist. If unsupported configurations exist on the interface, delete the
configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch
batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in
the system view to switch these interfaces to Layer 3 mode in batches.
d. Run isis enable [ process-id ]

IS-IS is enabled on the interface.

After this command is run, IS-IS establishes neighbor relationships and floods LSPs
through this interface.
NOTE

Loopback interfaces are not used to establish neighbor relationships. If IS-IS is enabled on a
loopback interface, IS-IS advertises the routes of the network segment where the interface
resides through other IS-IS interfaces.
e. Run isis circuit-level [ level-1 | level-1-2 | level-2 ]

The level of the interface is configured.

By default, the level of an interface is level-1-2.

When two Level-1-2 devices establish IS-IS neighbor relationship, they establish
both Level-1 and Level-2 neighbor relationships. To allow the two Level-1-2
devices to establish only Level-1 or Level-2 neighbor relationship, change the level
of interfaces.

NOTE

Changing the level of an IS-IS interface is valid only when the level of the IS-IS device is
Level-1-2. If the level of the device is not Level-1-2, the level of the device determines the
level of the established neighbor relationship.
f. (Optional) Run isis dis-priority priority [ level-1 | level-2 ]

The DIS priority is set for the interface. A larger value indicates a higher priority.

By default, the DIS priority of Level-1 and Level-2 broadcast interfaces is 64.

Level-1-2 broadcast interfaces select the DIS using Level-1 and Level-2 separately.
To select the DIS only for Level-1 or Level-2 interfaces, specify the level.
g. (Optional) Run isis silent

The interface is suppressed.

By default, an IS-IS interface is not suppressed.

When an IS-IS interface is suppressed, the interface no longer sends or receives IS-
IS packets. The routes of the network segment where the interface resides, however,
can still be advertised to other IS-IS devices within the same AS.
h. Run commit

The configuration is committed.


l Establish an IS-IS neighbor relationship on a P2P link.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 486


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute
configurations (for example, shutdown and description configurations).
Alternatively, if configuration information supported by both Layer 2 and Layer 3
interfaces exists (for example, mode lacp and lacp system-id configurations), no
configuration that is not supported after the working mode of the interface is
switched can exist. If unsupported configurations exist on the interface, delete the
configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch
batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in
the system view to switch these interfaces to Layer 3 mode in batches.
d. Run isis enable [ process-id ]
IS-IS is enabled on the interface.
e. Run isis circuit-level [ level-1 | level-1-2 | level-2 ]
The level of the interface is configured.
By default, the level of an interface is level-1-2.
f. Run isis circuit-type p2p
The network type of the interface is set to P2P.
By default, the network type of an interface is determined by the physical type of
the interface.
When the network type of an IS-IS interface changes, the interface configuration
changes accordingly:
n After a broadcast interface is simulated as a P2P interface using the isis
circuit-type p2p command, the interval for sending Hello packets, the number
of Hello packets that IS-IS does not receive from a neighbor before the
neighbor is declared Down, interval for retransmitting LSPs on a P2P link, and
various IS-IS authentication modes are restored to the default settings; other
configurations such as the DIS priority, DIS name, and interval for sending
CSNPs on a broadcast network become invalid.
n After the undo isis circuit-type command is run to restore the default network
type of an IS-IS interface, the interval for sending Hello packets, number of
Hello packets that IS-IS does not receive from a neighbor before the neighbor
is declared Down, interval for retransmitting LSPs on a P2P link, various IS-IS
authentication modes, DIS priority, and interval for sending CSNPs on a
broadcast network are restored to the default settings.
g. Run isis ppp-negotiation { 2-way | 3-way [ only ] }

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 487


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

The negotiation mode is specified for the interface.

By default, the negotiation mode is 3-way.


h. Run isis peer-ip-ignore

IS-IS is configured not to check the IP addresses of received Hello packets.

By default, IS-IS checks the IP addresses of received Hello packets.


i. Run isis ppp-osicp-check

OSICP negotiation status check is configured on the interface.

By default, the OSICP negotiation status of a PPP interface does not affect the
status of an IS-IS interface.

NOTE

This command applies only to PPP interfaces and is invalid for other P2P interfaces.
After this command is run, the OSICP negotiation status of a PPP interface affects the status
of an IS-IS interface. When PPP detects that the OSI network fails, the link status of the IS-
IS interface goes Down and the routes of the network segment where the interface resides
are not advertised through LSPs.
j. Run commit

The configuration is committed.

----End

7.6.5 Verifying the Basic IS-IS Function Configuration

Procedure
l Run the display isis peer [ verbose ] [ process-id | vpn-instance vpn-instance-name |
interface interface-type interface-number ] [ peer-system-id system-id ] command to
check information about IS-IS neighbors.
l Run the display isis interface [ verbose ] [ vpn-instance vpn-instance-name ] command
to check information about IS-IS interfaces.
l Run the display isis route [ process-id | vpn-instance vpn-instance-name ] [ ipv4 ]
[ verbose | [ level-1 | level-2 ] | ip-address [ mask | mask-length ] ] * command to check
information about IS-IS routes.

----End

7.7 Improving IS-IS Network Security

Pre-configuration Tasks
Before improving IS-IS network security, complete the following task:

l 7.6 Configuring Basic IS-IS Functions

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 488


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying the IS-IS
Network Security Optimization Configuration) in any sequence as required.

7.7.1 Configuring Interface Authentication


Context
Generally, the IS-IS packets to be sent are not encapsulated with authentication information,
and the received packets are not authenticated. If a user sends malicious packets to attack a
network, information on the entire network may be stolen. Therefore, you can configure IS-IS
authentication to improve the network security.
After the IS-IS interface authentication is configured, authentication information can be
encapsulated into the Hello packet to confirm the validity and correctness of neighbor.

If plain is selected during the configuration of the authentication mode for the IS-IS interface,
the password is saved in the configuration file in plain text. This brings security risks. It is
recommended that you select cipher to save the password in cipher text.
Simple authentication and MD5 authentication have potential security risks. HMAC-SHA256
authentication mode is recommended.

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 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run any of the following command to configure the authentication mode of the IS-IS
interface as required:

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 489


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

l Run isis authentication-mode simple { plain plain-text | [ cipher ] plain-cipher-text }


[ level-1 | level-2 ] [ ip | osi ] [ send-only ]
Simple authentication is configured for the IS-IS interface.
l Run isis authentication-mode md5 { plain plain-text | [ cipher ] plain-cipher-text }
[ level-1 | level-2 ] [ ip | osi ] [ send-only ]
MD5 authentication is configured for the IS-IS interface.
l Run isis authentication-mode hmac-sha256 key-id key-id { plain plain-text | [ cipher ]
plain-cipher-text } [ level-1 | level-2 ] [ send-only ]
HMAC-SHA256 authentication is configured for the IS-IS interface.
l Run isis authentication-mode keychain keychain-name [ level-1 | level-2 ] [ send-
only ]
Keychain authentication is configured for the IS-IS interface.

By default, an IS-IS interface does not authenticate received Hello packets and no
authentication password is configured on the interface.

NOTE

Use the send-only parameter according to network requirements:


l If the send-only parameter is specified, the device only encapsulates the Hello packets to be sent
with authentication information rather than checks whether the received Hello packets pass the
authentication. When the Hello packets do not need to be authenticated on the local device and
pass the authentication on the remote device, the two devices can establish the neighbor
relationship.
l If the send-only parameter is not specified, ensure that passwords of all interfaces with the same
level on the same network are the same.
NOTE

If keychain authentication is used, the encryption algorithm must be configured to HMAC-MD5 or


HMAC-SHA-256 [Link]-MD5 encryption algorithm have potential security risks. HMAC-
SHA256 encryption algorithm is recommended.

Step 5 Run commit

The configuration is committed.

----End

7.7.2 Configuring Area or Domain Authentication

Context
Generally, the IS-IS packets to be sent are not encapsulated with authentication information,
and the received packets are not authenticated. If a user sends malicious packets to attack a
network, information on the entire network may be stolen. Therefore, you can configure IS-IS
authentication to improve the network security.

The area authentication password is encapsulated into Level-1 IS-IS packets. Only the packets
that pass the area authentication can be accepted. Therefore, you must configure IS-IS area
authentication on all the IS-IS devices in the specified Level-1 area to authenticate the
Level-1 area.

The domain authentication password is encapsulated into Level-2 IS-IS packets. Only the
packets that pass the domain authentication can be accepted. Therefore, you must configure

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 490


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

IS-IS domain authentication on all the IS-IS devices in the Level-2 area to authenticate
Level-2 area.

If plain is selected during the configuration of the area authentication mode or domain
authentication mode, the password is saved in the configuration file in plain text. This brings
security risks. It is recommended that you select cipher to save the password in cipher text.
Simple and MD5 authentication authentication have potential security risks. HMAC-SHA256
authentication mode is recommended.

NOTE

When configuring IS-IS authentication, the area or domain authentication modes and passwords of the
routers in the same area must be consistent so that IS-IS packets can be flooded normally.
Whether IS-IS packets can pass area or domain authentication does not affect the establishment of
Level-1 or Level-2 neighbor relationships.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run isis [ process-id ]
The IS-IS process view is displayed.
Step 3 Perform the following operations at any sequence as required.
l Run area-authentication-mode { { simple | md5 } { plain plain-text | [ cipher ] plain-
cipher-text } [ ip | osi ] | keychain keychain-name } [ snp-packet { authentication-
avoid | send-only } | all-send-only ]
The area authentication mode is configured.
By default, the system neither encapsulates generated Level-1 packets with
authentication information nor authenticates received Level-1 packets.
l Run domain-authentication-mode { { simple | md5 } { plain plain-text | [ cipher ]
plain-cipher-text } [ ip | osi ] | keychain keychain-name } [ snp-packet
{ authentication-avoid | send-only } | all-send-only ]
The domain authentication mode is configured.
By default, the system neither encapsulates generated Level-2 packets with
authentication information nor authenticates received Level-2 packets.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 491


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

NOTE

l After the domain-authentication-mode command is run, IS-IS does not process received
unauthenticated Level-1 LSPs that have been stored in the local LSDB and newly received
unauthenticated Level-1 LSPs and SNPs that have not been stored in the local LSDB. Those packets
are discarded automatically after being aged out. To prevent those packets from being discarded due
to this command configuration, specify the send-only parameter in the command.
l The authentication involves the following situations:
– The device encapsulates the authentication mode into LSPs and SNPs to be sent and checks
whether the received packets pass authentication. Then, the device discards the packets that do
not pass the authentication. In this case, the parameter snp-packet or all-send-only is not
specified.
– The device encapsulates authentication information into LSPs to be sent and checks whether
the received LSPs pass the authentication; the device neither encapsulates the SNPs to be sent
with authentication information nor checks whether the received SNPs pass the authentication.
In this case, the parameter snp-packet authentication-avoid needs to be specified.
– The device encapsulates the LSPs and SNPs to be sent with authentication information; the
device, however, checks the authentication mode of only the received LSPs rather than the
received SNPs. In this case, the parameter snp-packet send-only needs to be specified.
– The device encapsulates the LSPs and SNPs to be sent with authentication information, but
does not check whether the received LSPs or SNPs pass the authentication. In this case, the
parameter all-send-only needs to be specified.
NOTE

If keychain authentication is used, the encryption algorithm must be configured to HMAC-MD5 or


HMAC-SHA-256 algorithm.

Step 4 Run commit


The configuration is committed.

----End

7.7.3 Configuring the Optional Checksum


Context
When a network is running, Intermediate System to Intermediate System (IS-IS) routers may
be attacked or IS-IS packets may be modified. As a result, important network information
may be intercepted, causing serious loss to the network. The optional checksum encapsulates
optional checksum TLVs into the Complete Sequence Numbers Protocol Data Units (CSNPs),
Partial Sequence Number Protocol Data Units (PSNPs), and Hello packets sent by IS-IS
routers. When the peer device receives the encapsulated packets, it checks whether TLVs
carried in the packets are correct. If TLVs are not correct, the peer device discards the packets
for network security.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run isis
An IS-IS process is created and the IS-IS view is displayed.
Step 3 Run optional-checksum enableIS-IS optional checksum is enabled.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 492


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

NOTE

If MD5 authentication or keychain authentication with valid MD5 authentication is configured on an IS-
IS interface or area, IS-IS routers send Hello packets and SNP packets carrying no checksum TLVs and
verify the checksum of the received packets.

Step 4 Run commit

The configuration is committed.

----End

7.7.4 Verifying the IS-IS Network Security Optimization


Configuration

Procedure
l Run the display isis lsdb verbose command to check the detailed information in the IS-
IS LSDB.

----End

7.8 Controlling IS-IS Route Selection

Pre-configuration Tasks
Before configuring IS-IS route selection, complete the following task:

l 7.6 Configuring Basic IS-IS Functions

Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying the IS-IS
Route Selection Control Configuration) in any sequence as required.

7.8.1 Configuring a Preference Value for IS-IS

Context
If multiple routes to the same destination are discovered by different routing protocols
running on the same device, the route discovered by the protocol with the highest preference
is selected.

To prefer a route discovered by IS-IS, configure a higher preference value for IS-IS. In
addition, a routing policy can be configured to increase the preferences of specified IS-IS
routes, without affecting route selection.

Procedure
Step 1 Run system-view

The system view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 493


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Step 2 Run isis [ process-id ]

The IS-IS view is displayed.

Step 3 Run preference { preference | route-policy route-policy-name } *

The IS-IS preference value is configured.

The default IS-IS preference value is 15. A smaller preference value indicates a higher
preference.

Step 4 Run commit

The configuration is committed.

----End

7.8.2 Configuring the Cost of an IS-IS Interface

Context
The costs of IS-IS interfaces can be determined in the following modes in descending order
by priority:
l Interface cost: is configured for a specified interface.
l Global cost: is configured for all interfaces.
l Automatically calculated cost: is automatically calculated based on the interface
bandwidth.

If no cost is configured for an IS-IS interface, the IS-IS interface uses the default cost 10 and
cost style narrow.

If you want to change the cost style of IS-IS devices, running the command while configuring
basic IS-IS functions is recommended. If the cost style of IS-IS devices is changed during
network operation, the IS-IS process is restarted and the neighbor relationship is re-
established.

Procedure
Step 1 Configure the IS-IS cost style.
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 style is configured.

By default, the cost style of routes received and sent by an IS-IS device is narrow.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 494


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

4. Run commit
The configuration is committed.
The cost range of an interface and a route received by the interface vary with the cost type.
l If the cost style is narrow, the cost of an interface ranges from 1 to 63. The maximum
cost of a route received by the interface is 1023.
l If the cost style 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.
l If the cost style is wide-compatible or wide, the cost of the interface ranges from 1 to
16777215. When the cost is 16777215, the neighbor TLV generated on the link cannot
be used for route calculation but for the transmission of TE information. The maximum
cost of a received route is 0xFFFFFFFF.
Step 2 Configure the cost of an IS-IS interface.
Perform any of the following operations to configure the cost of an IS-IS interface.
Configure the cost of a specified 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. On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute
configurations (for example, shutdown and description configurations). Alternatively, if
configuration information supported by both Layer 2 and Layer 3 interfaces exists (for
example, mode lacp and lacp system-id configurations), no configuration that is not
supported after the working mode of the interface is switched can exist. If unsupported
configurations exist on the interface, delete the configurations first and then run the undo
portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system
view to switch these interfaces to Layer 3 mode in batches.
4. Run isis cost cost [ level-1 | level-2 ]
The cost of the IS-IS interface is configured.
By default, the link cost of an IS-IS interface is 10.

NOTE

To change the cost of a loopback interface, run the isis cost command only in the interface view.
5. Run commit
The configuration is committed.
Configure the global IS-IS cost.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 495


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 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 circuit-cost { cost | maximum } [ level-1 | level-2 ]

The global IS-IS cost is configured.

By default, no global cost is configured.


4. Run commit

The configuration is committed.


Enable IS-IS to automatically calculate the interface cost.
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

The reference value of the bandwidth is configured. By default, the bandwidth reference
value is 100 Mbit/s.
4. Run auto-cost enable

The interface is configured to automatically calculate its cost.


5. Run commit

The configuration is committed.

The bandwidth reference value set using the bandwidth-reference command takes effect
only when the cost style is wide or wide-compatible. In this case, the interface cost is
calculated using the following formula:

Cost of each interface = (Bandwidth-reference/Interface bandwidth) × 10

If the cost-style is narrow, narrow-compatible, or compatible, the cost of each interface is


based on costs listed in Table 7-9.

Table 7-9 Mapping between IS-IS interface costs and interface bandwidth
Cost Bandwidth Range

60 Interface bandwidth ≤ 10 Mbit/s

50 10 Mbit/s < interface bandwidth ≤ 100 Mbit/s

40 100 Mbit/s < interface bandwidth ≤ 155 Mbit/s

30 155 Mbit/s < interface bandwidth ≤ 622 Mbit/s

20 622 Mbit/s < Interface bandwidth ≤ 2.5 Gbit/s

10 2.5 Gbit/s < Interface bandwidth

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 496


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

----End

7.8.3 Configuring Principles for Using Equal-Cost IS-IS Routes

Context
If there are redundant IS-IS links, multiple routes may have an equal cost. Choose either of
the following methods to use these equal-cost IS-IS routes:
l Configure load balancing for equal-cost IS-IS routes so that traffic will be evenly
balanced among these links.
This mechanism increases the link bandwidth usage and prevents network congestion
caused by link overload. However, this mechanism may make traffic management more
difficult because traffic will be randomly forwarded.
l Configure preference values for equal-cost IS-IS routes so that only the route with the
highest preference will be used and the others function as backups.
This configuration facilitates traffic management and improves the network reliability,
without the need to change original configurations.

Procedure
l Configure equal-cost IS-IS routes to work in load-balancing mode.
a. Run system-view
The system view is displayed.
b. Run isis [ process-id ]
The IS-IS view is displayed.
c. Run maximum load-balancing number
The maximum number of load-balancing equal-cost IS-IS routes is set.
By default, load balancing is supported and a maximum of 32(64 on the CE6870EI)
equal-cost routes can participate in load balancing.

NOTE

When the number of equal-cost routes is greater than number specified in the maximum
load-balancing command, valid routes are selected for load balancing based on the
following criteria:
1. Route preference: Routes with higher preferences are selected for load balancing.
2. Interface index: If routes have the same priorities, routes with higher interface index
values are selected for load balancing.
3. Next hop IP address: If routes have the same priorities and interface index values, routes
with larger IP address are selected for load balancing.
d. Run commit
The configuration is committed.
l Configure preference values for equal-cost IS-IS routes.
a. Run system-view
The system view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 497


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

b. Run isis [ process-id ]

The IS-IS view is displayed.


c. Run nexthop ip-address weight value

A preference value is configured for an equal-cost IS-IS route.

By default, no preference is set for equal-cost IS-IS routes. A smaller value


indicates a higher priority.
d. Run commit

The configuration is committed.

----End

7.8.4 Configuring IS-IS Route Leaking

Context
If multiple Level-1-2 devices in a Level-1 area are connected to devices in the Level-2 area, a
Level-1 LSP sent by each Level-1-2 device carries an ATT flag bit of 1. This Level-1 area
will have multiple routes to the Level-2 area and to other Level-1 areas.

By default, routes in a Level-1 area can be leaked into the Level-2 area so that Level-1-2 and
Level-2 devices can learn about the topology of the entire network. Devices in a Level-1 area
are unaware of the entire network topology because they only maintain LSDBs in the local
Level-1 area. Therefore, a device in a Level-1 area can forward traffic to a Level-2 device
only through the nearest Level-1-2 device. The route used may not be the optimal route to the
destination.

To enable a device in a Level-1 area to select the optimal route, configure IPv4 IS-IS route
leaking so that specified routes in the Level-2 area can be leaked into the local Level-1 area.

Routes of services deployed only in the local Level-1 area do not need to be leaked into the
Level-2 area. A policy can be configured to leak only desired routes into the Level-2 area.

Procedure
l Specify routes in the Level-2 area and other Level-1 areas that can be leaked into the
local Level-1 area.
a. Run system-view

The system view is displayed.


b. Run isis [ process-id ]

The IS-IS view is displayed.


c. Run import-route isis level-2 into level-1 [ tag tag | filter-policy { acl-number |
acl-name acl-name | ip-prefix ip-prefix-name | route-policy route-policy-name } |
direct { allow-filter-policy | allow-up-down-bit } * ] *

Routes that meet the specified conditions in the Level-2 areas are leaked into the
local Level-1 area.

By default, routes in the Level-2 area are not leaked into Level-1 areas.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 498


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

NOTE

The command is run on the Level-1-2 device that is connected to an external area.
d. Run commit

The configuration is committed.


l Configure routes in Level-1 areas to leak into the Level-2 area.
a. Run system-view

The system view is displayed.


b. Run isis [ process-id ]

The IS-IS view is displayed.


c. Run import-route isis level-1 into level-2 [ tag tag | filter-policy { acl-number |
acl-name acl-name | ip-prefix ip-prefix-name | route-policy route-policy-name } |
direct allow-filter-policy ] *

Routes that meet the specifies conditions in Level-1 areas are leaked into the
Level-2 area.

By default, all routes in a Level-1 area are leaked into the Level-2 area.

NOTE

The command is run on the Level-1-2 device that is connected to an external area.
d. Run commit

The configuration is committed.

----End

7.8.5 Verifying the IS-IS Route Selection Control Configuration

Procedure
l Run the display isis route [ process-id | vpn-instance vpn-instance-name ] [ ipv4 ]
[ verbose | [ level-1 | level-2 ] | ip-address [ mask | mask-length ] ] * command to check
IS-IS routing information.
l Run the display isis lsdb [ { level-1 | level-2 } | verbose | { local | lsp-id | is-name
symbolic-name } ] * [ process-id | vpn-instance vpn-instance-name ] command to check
information in the IS-IS LSDB.

----End

7.9 Controlling IS-IS Route Exchange

Pre-configuration Tasks
Before controlling IS-IS route exchange, complete the following task:

l 7.6 Configuring Basic IS-IS Functions

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 499


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying the IS-IS
Route Exchange Control Configuration) in any sequence as required.

7.9.1 Configuring IS-IS to Advertise a Default Route

Context
If IS-IS is configured to advertise a default route on a border device that has external routes,
the device advertises a default route [Link]/0 in the IS-IS routing domain. All traffic destined
for other routing domains is first forwarded to the border device.

Configuring a static default route can also allow all the traffic to be first forwarded to a border
device, which then forwards the traffic outside an IS-IS routing domain. However, this
method leads to heavy workload in configuration and management when a large number of
devices are deployed on the network.

In addition, advertising default routes using IS-IS is flexible. If multiple border devices are
deployed, a routing policy can be configured to allow only the border device that meets the
specified conditions to advertise a default route, preventing routing blackholes.

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 advertise a default route.

By default, IS-IS does not advertise a default route.

Step 4 Run commit

The configuration is committed.

----End

7.9.2 Configuring IS-IS to Import External Routes

Context
After IS-IS is configured to advertise a default route on a border device in an IS-IS routing
domain, all the traffic destined outside the IS-IS routing domain is forwarded through the
border device. This burdens the border device because other devices in the IS-IS routing
domain do not have the routes destined outside the domain. If multiple border devices are
deployed in the IS-IS routing domain, optimal routes to other routing domains need to be
selected.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 500


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

To ensure optimal routes are selected, all the other devices in the IS-IS routing domain must
learn all or some external routes.

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 Configure IS-IS to import external routes.


l When you need to set the cost of imported routes, run the import-route { direct | static |
{ ospf | rip | isis } [ process-id ] | bgp } [ cost-type { external | internal } | cost cost |
tag tag | route-policy route-policy | [ level-1 | level-2 | level-1-2 ] ] * command to
configure IS-IS to import external routes.
l When you need to retain the original cost of imported routes, run the import-route
{ { ospf | rip | isis } [ process-id ] | bgp | direct } inherit-cost [ { level-1 | level-2 |
level-1-2 } | tag tag | route-policy route-policy ] * command to configure IS-IS to import
external routes. In this case, the source routing protocol of imported routes cannot be
static.
NOTE

IS-IS will advertise all imported external routes to the IS-IS routing domain by default.

Step 4 Run commit

The configuration is committed.

----End

7.9.3 Configuring IS-IS to Advertise Specified External Routes to


an IS-IS Routing Domain

Context
When the local IS-IS device advertises imported external routes to other IS-IS devices,
routing policies can be configured to advertise only the external routes that meet specified
conditions if these devices do not require all the imported external routes.

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 | acl-name acl-name | ip-prefix ip-prefix-name | route-policy


route-policy-name } export [ protocol [ process-id ] ]

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 501


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

IS-IS is configured to advertise the external routes that meet specified conditions to the IS-IS
routing domain.
Step 4 Run commit
The configuration is committed.

----End

7.9.4 Adding Specified IS-IS Routes to the IP Routing Table

Context
Only routes in an IP routing table can be used to forward IP packets. An IS-IS route can take
effect only after this IS-IS route has been successfully added to an IP routing table.
If an IS-IS route does not need to be added to a routing table, specify conditions, such as a
basic ACL, IP prefix, and routing policy, to filter routes so that only IS-IS routes that meet the
specified conditions can added to an IP routing table. IS-IS routes that do not meet the
specified conditions cannot be added to the IP routing table and cannot be selected to forward
IP packets.

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 | acl-name acl-name | ip-prefix ip-prefix-name | route-policy
route-policy-name } import
Conditions for filtering IS-IS routes are configured.
Step 4 Run commit
The configuration is committed.

----End

7.9.5 Verifying the IS-IS Route Exchange Control Configuration

Procedure
l Run the display isis lsdb [ { level-1 | level-2 } | verbose | { local | lsp-id | is-name
symbolic-name } ] * [ process-id | vpn-instance vpn-instance-name ] command to check
IS-IS LSDB information.
l Run the display isis route [ process-id | vpn-instance vpn-instance-name ] [ ipv4 ]
[ verbose | [ level-1 | level-2 ] | ip-address [ mask | mask-length ] ] * command to check
IS-IS routing information.
l Run the display ip routing-table [ verbose ] command to check the IP routing table.
----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 502


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

7.10 Configuring IS-IS Route Summarization

Pre-configuration Tasks
Before configuring IS-IS route summarization, complete the following task:
l 7.6 Configuring Basic IS-IS Functions

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 ip-address mask [ avoid-feedback | generate_null0_route | tag tag | [ level-1
| level-1-2 | level-2 ] ] *
The specified IS-IS routes are summarized into one IS-IS route.

NOTE

After route summarization is configured on a device, the local routing table still contains all specific
routes before the summarization. The routing tables on other devices contain only the summary route,
and the summary route is deleted only after all its specific routes are deleted.

Step 4 Run commit


The configuration is committed.

----End

Verifying the Configuration


l Run the display isis route command to check summary routes in the IS-IS routing table.
l Run the display ip routing-table [ verbose ] command to check summary routes in the
IP routing table.

7.11 Controlling IS-IS Route Convergence

Pre-configuration Tasks
Before configuring IS-IS route convergence, complete the following task:
l 7.6 Configuring Basic IS-IS Functions

Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying the IS-IS
Route Convergence Control Configuration) in any sequence as required.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 503


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

7.11.1 Configuring Attributes for Hello Packets

Context
IS-IS maintains neighbor relationships between neighbors by sending and receiving Hello
packets. If the local device does not receive Hello packets from its neighbor within a specified
period, the device considers the neighbor Down.

In IS-IS, you can set the interval for sending Hello packets and the holding multiplier of
neighboring devices to control the holdtime of neighbor relationships between the local
device and neighbors.
l If the interval for sending Hello packets is too short, more system resources are
consumed to send Hello packets, causing a heavy CPU load.
l If the holdtime of neighboring devices is too long, the local device needs to spend much
time detecting the failure of neighbors, slowing down IS-IS route convergence. If the
holdtime of neighboring devices is too short, some Hello packets may be lost or become
incorrect because of network transmission delay and errors. This will cause neighbor
relationships to frequently alternate between Up and Down and lead to route flapping on
the IS-IS network.
NOTE

You are advised to set the same interval for sending Hello packets and same holding multiplier of
neighboring devices on all the devices on the IS-IS network. This method prevents IS-IS route
convergence from being slowed down when some devices detect link failures at a lower speed
than other devices.

Procedure
l Configure the interval for sending Hello packets.
a. Run system-view

The system view is displayed.


b. Run interface interface-type interface-number

The interface view is displayed.


c. (On an Ethernet interface), run undo portswitch

The interface is switched to Layer 3 mode.

By default, an Ethernet interface works in Layer 2 mode.


If an Ethernet interface already has Layer 2 configuration, this command fails to be
executed on the interface. Before running this command on the interface, delete all
the Layer 2 configuration of the interface.
NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch
batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in
the system view to switch these interfaces to Layer 3 mode in batches.
d. Run isis timer hello hello-interval [ level-1 | level-2 ] [ conservative ]

The interval for sending Hello packets is set on an interface.

By default, the interval for sending Hello packets 10 seconds.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 504


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

NOTE

Parameters level-1 and level-2 are configured only on a broadcast interface. Level-1 and
Level-2 Hello packets are sent separately and their intervals must be set respectively. There
is only one Hello packet on a point-to-point link. Therefore, level-1 and level-2 parameters
are not used.
e. Run commit
The configuration is committed.
l Set the holding multiplier for neighboring devices.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. (On an Ethernet interface), run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
If an Ethernet interface already has Layer 2 configuration, this command fails to be
executed on the interface. Before running this command on the interface, delete all
the Layer 2 configuration of the interface.
NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch
batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in
the system view to switch these interfaces to Layer 3 mode in batches.
d. Run isis timer holding-multiplier number [ level-1 | level-2 ]
The holding multiplier of neighboring devices is set.
The default holding multiplier is 3. The holdtime of neighbor relationships is three
times the interval for sending Hello packets.

NOTE

Parameters level-1 and level-2 are configured only on a broadcast interface. Level-1 and
Level-2 Hello packets are sent separately and their intervals must be set respectively. There
is only one Hello packet on a point-to-point link. Therefore, level-1 and level-2 parameters
are not used.
e. Run commit
The configuration is committed.
----End

7.11.2 Configuring Attributes for LSPs


Context
LSPs are used to exchange link state information. You can configure attributes for LSPs to
control the length and maximum lifetime of LSPs. To accelerate network convergence, you
can enable LSP fast flooding or reduce the minimum interval for sending LSPs and the
interval for updating LSPs to speed up LSP flooding. However, CPU resources will be
consumed too much if the network topology changes frequently. In this situation, configure

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 505


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

the intelligent timer for generating LSPs. This timer can fast respond to emergencies, speed
up network convergence, and improve CPU resource efficiency because its interval becomes
longer when the network changes frequently.

Configured Function Usage Scenario


Parameters

Set the Set the size When the volume of link status information increases, the
maximum for LSPs to length of LSPs to be generated can be increased to carry
length for be more information in each LSP.
LSPs generated
and LSPs to
be received.

Set the Set the When a switch generates the system LSP, it fills in the
maximum maximum maximum lifetime for this LSP. After this LSP is received
lifetime for lifetime for by other switchs, the lifetime of the LSP is reduced
LSPs LSPs to gradually. If the switch does not receive any more update
ensure the LSPs and the lifetime of the LSP is reduced to 0, the LSP
validity of will be deleted from the LSDB 60s later if no more
an LSP updated LSPs are received.
before its
updated
LSP is
received.

Set the Set the On an IS-IS network, LSDB synchronization is


refresh refresh implemented through LSP flooding. During LSP flooding,
interval for interval for a switch sends an LSP to its neighbors and then the
LSPs LSPs to neighbors send the received LSP to their respective
synchronize neighbors except the switch that first sends the LSP. In this
LSDBs. manner, the LSP is flooded among the switchs of the same
level. LSP flooding allows each switch of the same level
to have the same LSP information and synchronize its
LSDB with each other.

Set the Set the Reducing the minimum interval for sending LSPs speeds
minimum interval for up LSP flooding.
interval at sending an
which LSPs LSP during
are sent LSP update.

Configure the Control the On an IS-IS network, if the local routing information
intelligent interval for changes, a switch needs to generate a new LSP to notify
timer used to generating this change. If the local routing information changes
generate LSPs LSPs frequently, a large number of new LSPs are generated,
intelligently which occupies a lot of system resources and decreases
to speed up system performance. To speed up network convergence
route and prevent system performance from being affected,
convergenc configure an intelligent timer for generating LSPs. This
e and timer can adjust the delay in generating LSPs based on the
reduce routing information change frequency.
system
load.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 506


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Configured Function Usage Scenario


Parameters

Enable LSP Control the When an IS-IS switch receives new LSPs from other
fast flooding number of switchs, it switch updates the LSPs in the local LSDB and
LSPs periodically floods out the updated LSPs according to a
flooded timer. LSP fast flooding updates the preceding method.
each time When a device configured with LSP fast flooding receives
on an one or more new LSPs. it floods out the LSPs with a
interface to number smaller than the specified number before
speed up calculating routes. This speeds up LSDB synchronization.
IS-IS
network
convergenc
e.

Set an Control the On a point-to-point network, devices at both ends of a link


interval at interval for synchronize LSDBs with each other by flooding LSPs.
which LSPs retransmitti The device at one end of the link sends an LSP. If the
are ng LSPs to device at the other end receives this LSP, it replies with a
retransmitted ensure PSNP. If the device that has sent an LSP does not receive a
over a P2P LSDB PSNP from the other end in a period of time, the device
link synchroniza will retransmit the LSP.
tion on a
P2P
network.

Set the LSP Set the LSP The LSP remaining lifetime specifies the remaining
Remaining Remaining validity time of an LSP. When the remaining lifetime of an
Lifetime for Lifetime for LSP is 0, this LSP is deleted. If the LSP remaining lifetime
LSPs LSPs to is incorrect, LSPs will be too fast or too slow to be aged
ensure the out. As a result, routes cannot be converged. To address
routes can this issue, manually set the LSP remaining lifetime.
be
calculated
correctly.

Procedure
l Set the maximum length for LSPs.
a. Run system-view
The system view is displayed.
b. Run isis [ process-id ]
The IS-IS view is displayed.
c. Set the maximum length for LSPs.
n Run lsp-length originate max-size
The maximum length is set for each generated LSP.
n Run lsp-length receive max-size
The maximum length is set for each received LSP.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 507


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

By default, the IS-IS system generates and receives 1497-byte LSPs.

NOTE

Ensure that the value of max-size for LSPs to be generated must be smaller than or equal to
the value of max-size for LSPs to be received.
The value of max-size set through the lsp-length command must meet the following
requirements; otherwise, the MTU status on the interface is considered Down.
l The MTU of an Ethernet interface must be greater than or equal to the sum of the
value of max-size and 3.
l The MTU of a P2P interface must be greater than or equal to the value of max-size.
d. Run commit
The configuration is committed.
l Set the maximum lifetime for LSPs.
a. Run system-view
The system view is displayed.
b. Run isis [ process-id ]
The IS-IS view is displayed.
c. Run timer lsp-max-age age-time
The maximum lifetime is set for LSPs.
By default, the maximum lifetime of LSPs is 1200 seconds.
d. Run commit
The configuration is committed.
l Set the refresh interval for LSPs.
a. Run system-view
The system view is displayed.
b. Run isis [ process-id ]
The IS-IS view is displayed.
c. Run timer lsp-refresh refresh-time
A refresh interval is set for LSPs.
By default, the LSP refresh interval is 900s.

NOTE

Ensure that the LSP refresh interval is more than 300s shorter than the maximum LSP
lifetime. This allows new LSPs to reach all devices in an area before existing LSPs expire.
The larger a network, the greater the deviation between the LSP refresh interval and the
maximum LSP lifetime.
d. Run commit
The configuration is committed.
l Set the minimum interval at which LSPs are sent.
a. Run system-view
The system view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 508


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

b. Run interface interface-type interface-number


The interface view is displayed.
c. (On an Ethernet interface), run: undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
If an Ethernet interface already has Layer 2 configuration, this command fails to be
executed on the interface. Before running this command on the interface, delete all
the Layer 2 configuration of the interface.
NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch
batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in
the system view to switch these interfaces to Layer 3 mode in batches.
d. Run isis timer lsp-throttle throttle-interval [ count count ]
The minimum interval for sending LSPs on an IS-IS interface and the maximum
number of LSPs sent within the interval are set.
By default, the minimum interval for sending LSPs is 50 ms, and the maximum
number of LSPs sent each time is 10.
e. Run commit
The configuration is committed.
l Configure the intelligent timer used to generate LSPs.
a. Run system-view
The system view is displayed.
b. Run isis [ process-id ]
The IS-IS view is displayed.
c. Run timer lsp-generation max-interval [ init-interval [ incr-interval ] ] [ level-1 |
level-2 ]
The intelligent timer used to generate LSPs is set.
If no level is configured, both Level-1 and Level-2 are configured.
The intelligent timer involves three parameters, and the parameters are described as
follows:
n When only max-interval is specified, the intelligent timer functions as an
ordinary one-time triggering timer.
n When both init-interval and incr-interval are specified, the delay in generating
an LSP for the first time is determined by init-interval, and the delay in
generating an LSP with the same LSP ID for the second time is determined by
incr-interval. Subsequently, each time routes change, the delay in generating
an LSP doubles the last delay until the delay reaches the value specified by
max-interval. If the local routing information keeps being updated within the
max-interval period, the delay remains at max-interval until the time the local
routing information is not updated within the max-interval period or the IS-IS
process is restarted. Then the delay decreases to init-interval.
n When init-interval is specified but incr-interval is not, the delay in generating
an LSP for the first time is determined by init-interval, and the delay in

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 509


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

generating subsequent LSPs is determined by max-interval. If the local routing


information keeps being updated within the max-interval period, the delay
remains at max-interval until the time the local routing information is not
updated within the max-interval period or the IS-IS process is restarted. Then
the delay decreases to init-interval.
d. Run suppress-flapping lsp-generation timer delay-interval [ threshold threshold-
value ]
A period is specified for the system to delay generating the same LSP during route
flapping.
By default, the system delays generating the same LSP for 10s during route
flapping.
e. Run commit
The configuration is committed.
l Enable LSP fast flooding.
a. Run system-view
The system view is displayed.
b. Run isis [ process-id ]
The IS-IS view is displayed.
c. Run flash-flood [ lsp-count | max-timer-interval interval | [ level-1 | level-2 ] ] *
The LSP fast flooding is enabled.
The lsp-count parameter specifies the number of LSPs flooded each time, which is
applicable to all interfaces. If the number of LSPs to be sent is greater than the
value of lsp-count, lsp-count takes effect. If the number of LSPs to be sent is
smaller than the value of lsp-count, LSPs of the actual number are sent. If a timer is
configured and the configured timer does not expire before the route calculation, the
LSPs are flooded immediately when being received; otherwise, the LSPs are sent
when the timer expires.
When LSP fast flooding is enabled, Level-1 LSPs and Level-2 LSPs are fast
flooded by default if no level is specified.
d. Run suppress-flapping lsp-flood timer delay-interval [ threshold threshold-
value ]
A period is specified for the system to delay LSP flooding during route flapping.
By default, if route flapping occurs, the system delays LSP flooding for 10s.
e. Run commit
The configuration is committed.
l Set an interval at which LSPs are retransmitted over a P2P link.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. (On an Ethernet interface), run: undo portswitch

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 510


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

The interface is switched to Layer 3 mode.


By default, an Ethernet interface works in Layer 2 mode.
If an Ethernet interface already has Layer 2 configuration, this command fails to be
executed on the interface. Before running this command on the interface, delete all
the Layer 2 configuration of the interface.
NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch
batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in
the system view to switch these interfaces to Layer 3 mode in batches.
d. (Optional) Run isis circuit-type p2p
A broadcast interface is simulated as a P2P interface.

NOTE

If the interface type is P2P, this step is not required.


e. Run isis timer lsp-retransmit retransmit-interval
The interval at which LSPs are retransmitted over a P2P link is set.
By default, the interval for retransmitting LSPs over a P2P link is 5 seconds.
f. Run commit
The configuration is committed.
l Configure automatic IS-IS LSP Remaining Lifetime adjustment..
a. Run system-view
The system view is displayed.
b. Run isis [ process-id ]
The IS-IS view is displayed.
c. (Optional) Run undo lsp-remaining-lifetime refresh disable
Automatic IS-IS LSP Remaining Lifetime adjustment is enabled.
By default, automatic IS-IS LSP Remaining Lifetime adjustment is enabled.
If the automatic IS-IS LSP Remaining Lifetime adjustment is enabled, go to 4.
d. Run lsp-remaining-lifetime refresh timer { refreshvalue | lsp-max-age }
An IS-IS LSP Remaining Lifetime value is set.
By default, the IS-IS LSP Remaining Lifetime value is the maximum LSP age.
e. Run commit
The configuration is committed.
----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 511


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

7.11.3 Configuring Attributes for CSNPs

Context
Complete sequence number PDUs (CSNPs) contains the summary of all the LSPs in an LSDB
to ensure LSDB synchronization between neighbors. CSNPs are processed differently on
broadcast and P2P links.
l On a broadcast link, CSNPs are periodically sent by a DIS device. If a device detects that
its LSDB is not synchronized with that on its neighboring device, the device will send
PSNPs to apply for missing LSPs.
l On a P2P link, CSNPs are sent only during initial establishment of neighboring
relationships.

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 On an Ethernet interface, run undo portswitch

The interface is switched to Layer 3 mode.

By default, an Ethernet interface works in Layer 2 mode.

The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run isis timer csnp csnp-interval [ level-1 | level-2 ]

The interval at which CSNPs are sent is set on the specified interface.

By default, the interval at which CSNPs are sent on a broadcast network is 10 seconds.

NOTE

Configure Level-1 and Level-2 only when a broadcast interface is specified.

Step 5 Run commit

The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 512


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

7.11.4 Setting the SPF Calculation Interval

Context
A network change always triggers IS-IS to perform SPF calculation. Frequent SPF calculation
will consume excessive CPU resources, affecting services.
To solve this problem, configure an intelligent timer to control the interval for SPF
calculation. For example, to speed up IS-IS route convergence, set the interval for SPF
calculation to a small value and set the interval to a large value after the IS-IS network
becomes stable.

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 timer spf max-interval [ init-interval [ incr-interval ] ]
The SPF intelligent timer is configured.
By default, no SPF intelligent timer is configured and the maximum delay in SPF calculation
is 5 seconds.
The delay for SPF calculation is described as follows:
l The delay for the first SPF calculation is init-interval; the delay for the second SPF
calculation is incr-interval. From the third time on, the delay for SPF calculation doubles
each time until the delay reaches [Link] network flapping persists within the
max-interval period, max-interval is used as the delay for SPF calculation. If network
flapping does not occur within the max-interval period or if the IS-IS process is restarted,
init-interval is used as the delay for SPF calculation.
l If incr-interval is not specified, the delay for SPF calculation for the first time is init-
interval. From the second time on, the delay is max-interval. If the local routing
information keeps being updated within the max-interval period, the delay remains at
max-interval until the time the local routing information is not updated within the max-
interval period or the IS-IS process is restarted. Then the delay decreases to init-interval.
l When only max-interval is specified, the intelligent timer functions as an ordinary one-
time triggering timer.
Step 4 Run suppress-flapping route-calculate timer delay-interval
A period is specified for the device to delay route calculation when the device receives an
LSP during route flapping.
By default, if the device receives an LSP during route flapping, it delays route calculation for
10s.
Step 5 Run timer purge-zero-lsp route-calculate-delay delay-interval
A period is specified for the device to delay route calculation when the device receives a
purge LSP.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 513


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

By default, if the device receives a purge LSP, it delays route calculation for 10s.

Step 6 Run commit

The configuration is committed.

----End

7.11.5 Configuring Convergence Priorities for IS-IS Routes

Context
Devices allow you to configure the highest convergence priority for specific IS-IS routes so
that these IS-IS routes will be converged first when a network topology changes.

The application rules of the convergence priorities for IS-IS routes are as follows:
l Existing IS-IS routes are converged based on the priorities configured in the prefix-
priority command.
l New IS-IS routes are converged based on the priorities configured in the prefix-priority
command.
l If an IS-IS route conforms to the matching rules of multiple convergence priorities, the
highest convergence priority is used.
l The convergence priority of a Level-1 IS-IS route is higher than that of a Level-2 IS-IS
route.

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 prefix-priority [ level-1 | level-2 ] { critical | high | medium } { ip-prefix prefix-name |
tag tag-value }

Convergence priorities are set for IS-IS routes.

By default, the convergence priority of 32-bit host routes is medium, and the convergence
priority of the other IS-IS routes is low.

NOTE

The prefix-priority command is only applicable to the public network.


After the prefix-priority command is run, the convergence priority of 32-bit host routes is low, and the
convergence priorities of the other routes are determined as specified in the prefix-priority command.

Step 4 Run commit

The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 514


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

7.11.6 Verifying the IS-IS Route Convergence Control


Configuration

Procedure
l Run the display isis interface [ verbose ] [ vpn-instance vpn-instance-name ] command
to check IS-IS packet information.
l Run the display isis route [ process-id | vpn-instance vpn-instance-name ] [ ipv4 ]
[ verbose | [ level-1 | level-2 ] | ip-address [ mask | mask-length ] ] * [ | count ] command
to check information about IS-IS routes.
----End

7.12 Configuring IS-IS Neighbor Relationship Flapping


Suppression

Usage Scenario
If an interface transmitting IS-IS services alternates between Up and Down, IS-IS neighbor
relationship flapping occurs on the interface. During the flapping, IS-IS reestablishes the
neighbor relationship and recalculates routes. In this process, a large number of packets are
exchanged, adversely affecting neighbor relationship stability, IS-IS services, and other IS-IS-
dependent services, such as LDP and BGP. IS-IS neighbor relationship flapping suppression
can address this problem by delaying IS-IS neighbor relationship reestablishment or
preventing service traffic from passing through flapping links.

Pre-configuration Tasks
Before configuring IS-IS neighbor relationship flapping suppression, complete the following
tasks:
l Configure an IP address for each interface to ensure that neighboring routers are
reachable at the network layer.
l Configuring Basic IPv4 IS-IS Functions.

Procedure
Step 1 Run system-view
The system view is displayed.
By default, IS-IS neighbor relationship flapping suppression is enabled globally. To disable
this function globally, run the suppress-flapping peer disable command in the IS-IS view.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
By default, IS-IS neighbor relationship flapping suppression is enabled on all interfaces in the
same IS-IS process. To disable the function from one of the interfaces, run the isis suppress-
flapping peer disable command.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 515


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Step 3 On an Ethernet interface, run undo portswitch


The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run isis suppress-flapping peer hold-down interval


The Hold-down mode is configured, and its duration is set.
Flapping suppression works in either Hold-down or Hold-max-cost mode.
l Hold-down mode: In the case of frequent flooding and topology changes during neighbor
relationship establishment, interfaces prevent neighbor relationship reestablishment
during Hold-down suppression, which minimizes synchronization attempts and packet
exchanges.
l Hold-max-cost mode: If the traffic forwarding path changes frequently, interfaces use the
maximum value (16777214 for the wide mode and 63 for the narrow mode) as the cost
of the flapping link during Hold-max-cost suppression, which prevents traffic from
passing through the flapping link.
Flapping suppression can also work first in Hold-down mode and then in Hold-max-cost
mode.
By default, the Hold-down mode is disabled, and the Hold-max-cost mode is enabled.
To disable this mode, run the isis suppress-flapping peer hold-max-cost disable command.
Step 5 Run isis suppress-flapping peer { detecting-interval detecting-interval | threshold
threshold | resume-interval resume-interval } *
Detection parameters are configured for IS-IS neighbor relationship flapping suppression.
Each IS-IS interface on which IS-IS neighbor relationship flapping suppression is enabled
starts a flapping counter. If the interval between two successive neighbor status changes from
Full to a non-Full state is shorter than detecting-interval, a valid flapping_event is recorded,
and the flapping_count increases by 1. When the flapping_count reaches or exceeds threshold,
flapping suppression takes effect. If the interval between two successive neighbor status
changes from Full to a non-Full state is longer than resume-interval, the flapping_count is
reset.

NOTE

The value of resume-interval must be greater than that of detecting-interval.

By default, the detection interval of IS-IS neighbor relationship flapping suppression is 60s,
the suppression threshold is 10, and the interval for exiting from suppression is 120s. Using
the default detection parameters is recommended.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 516


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Step 6 Run commit


The configuration is committed.

----End

Verifying the Configuration


Run the display isis interface interface-type interface-number [ verbose ] command to check
the status of IS-IS neighbor relationship flapping suppression.

7.13 Configuring LSP Fragment Extension

Pre-configuration Tasks
Before configuring LSP fragment extension, complete the following task:
l 7.6.1 Creating IS-IS Processes
NOTE

When a new device connects to an IS-IS network, you are advertised to configure LSP fragment
extension and virtual systems before establishing IS-IS neighbors or importing routes. If you establish
IS-IS neighbors or import routes, which causes IS-IS to carry much information that cannot be loaded
through 256 fragments, you must configure LSP fragment extension and virtual systems. The
configurations, however, take effect only after you restart the IS-IS process.

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 lsp-fragments-extend [ [ level-1 | level-2 | level-1-2 ] | [ mode-1 | mode-2 ] ] *


LSP fragment extension is enabled in an IS-IS process.
By default, LSP fragment extension is disabled in an IS-IS process.
If the mode or level is not specified during the configuration of LSP fragment extension,
mode-1 and level-1-2 are used by default.

NOTE

If there are devices of other manufacturers on the network, LSP fragment extension must be set to
mode-1. Otherwise, devices of other manufacturers cannot identify LSPs.

Step 4 Run virtual-system virtual-system-id


A virtual system is configured.
By default, no virtual system is configured.
To configure a switch to generate extended LSP fragments, you must configure at least one
virtual system. The ID of the virtual system must be unique in the domain.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 517


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

An IS-IS process can be configured with up to 99 virtual system IDs.


Step 5 Run commit
The configuration is committed.

----End

Verifying the Configuration


Run the following commands to check IS-IS process statistics.
l display isis statistics [ updated-lsp [ history ] ] [ level-1 | level-2 | level-1-2 ] [ process-
id | vpn-instance vpn-instance-name ]
l display isis process-id statistics [ [ [ updated-lsp [ history ] ] [ level-1 | level-2 |
level-1-2 ] ] | [ packet ] ]

7.14 Configuring a Mesh Group on an NBMA Network

Pre-configuration Tasks
Before configuring a mesh group, complete the following task:
l 7.6 Configuring Basic IS-IS Functions

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 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run isis mesh-group { mesh-group-number | mesh-blocked }


The interface is added to a mesh group.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 518


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

When mesh-blocked is configured on an interface, the interface is blocked and cannot flood
LSPs outside. All the interfaces added to a mesh group implement global LSDB
synchronization through CSNP and PSNP mechanisms.
Step 5 Run commit
The configuration is committed.

----End

Verifying the Configuration


Run the following commands to check IS-IS process statistics.
l display isis statistics [ updated-lsp [ history ] ] [ level-1 | level-2 | level-1-2 ] [ process-
id | vpn-instance vpn-instance-name ]
l display isis process-id statistics [ [ [ updated-lsp [ history ] ] [ level-1 | level-2 |
level-1-2 ] ] | [ packet ] ]

7.15 Configuring IS-IS Reliability

Pre-configuration Tasks
Before configuring IS-IS reliability, complete the following task:
l 7.6 Configuring Basic IS-IS Functions

Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying the IS-IS
Reliability Configuration) in any sequence as required.

7.15.1 Enabling IS-IS Auto FRR


Context
At present, the VoIP and on-line video services require high-quality real-time transmission.
Nevertheless, if an IS-IS fault occurs, multiple processes, including fault detection, LSP
update, LSP flooding, route calculation, and FIB entry delivery, must be performed to switch
the traffic to a new link. As a result, it takes much more than 50 ms to recover the link from
the fault, which cannot meet the requirement for real-time services on the network.
After the BFD session status is bound to IS-IS Auto FRR, traffic can be fast switched from
the faulty link to the backup link. This ensures that the traffic interruption time is within 50
ms, which protects traffic and improves IS-IS network reliability.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run isis [ process-id ]

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 519


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

The IS-IS process is enabled and the IS-IS view is displayed.


Step 3 Run frr
The IS-IS FRR view is displayed.
Step 4 (Optional) Run frr-policy route route-policy route-policy-name
Backup routes are filtered using a filtering policy. Only backup routes that have passed the
filtering policy are added to the routing table.
Step 5 Run loop-free-alternate [ level-1 | level-2 | level-1-2 ]
IS-IS Auto FRR is enabled and the loop-free backup route is created.
By default, IS-IS Auto FRR is disabled from calculating loop-free backup routes using the
loop-free alternate (LFA) algorithm.
If the IS-IS level is not specified, IS-IS Auto FRR is enabled on Level-1 and Level-2 to create
the backup route.
Step 6 (Optional) Run the following command in the interface view: isis lfa-backup [ level-1 |
level-2 | level-1-2 ] disable
The interface is disabled from participating in LFA calculation.
By default, an IS-IS interface can participate in LFA calculation.
During network deployment, to facilitate traffic management and fast determine the traffic
forwarding path when the primary link fails, disable some interfaces from participating in
LFA calculation.
Step 7 Run commit
The configuration is committed.

----End

Verifying the Configuration


l Run the display isis route [ process-id | vpn-instance vpn-instance-name ] [ ipv4 ]
[ verbose | [ level-1 | level-2 ] | ip-address [ mask | mask-length ] ] * command to check
information about the primary link and backup link generated by IS-IS Auto FRR.
l Run the display isis spf-tree verbose command to check the traffic protection type of
IS-IS Auto FRR.

7.15.2 Configuring Static BFD for IS-IS


Context
On an IS-IS network, a device periodically sends Hello packets to detect the neighbor status
change. By default, the device considers a neighbor Down when it does not receive a Hello
packet from the neighbor after sending three Hello packets (30 seconds). This IS-IS fault
detection mechanism, however, cannot provide high reliability for the network that requires
fast network convergence and no packet loss. BFD for IS-IS can solve this problem. BFD is a
millisecond-level fault detection mechanism. It can detect faults on the link between IS-IS
neighbors within 50 ms. Therefore, BFD can speed up IS-IS route convergence, ensures fast
link switchover, and reduces traffic loss.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 520


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Compared to dynamic BFD, static BFD has the following characteristics:


l Static BFD can be manually controlled and is easy to deploy. To save memory and
ensure reliability of key links, BFD can be deployed on specified links.
l Establishing and deleting BFD sessions need to be manually triggered and lack
flexibility. Configuration errors may occur. For example, if an incorrect local or remote
discriminator is configured, a BFD session cannot work properly.

NOTE

A BFD session currently does not detect route switching. If the change of bound peer IP address causes
a route to switch to another link, the BFD session is negotiated again only when the original link fails.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run bfd
BFD is enabled globally.
Step 3 Run quit
The system view is displayed.
Step 4 Run bfd session-name bind peer-ip ip-address [ interface interface-type interface-number ]
BFD is enabled between the specified interface and peer router.
If a peer IP address and a local interface are specified in the bfd command, BFD monitors
only a single-hop link with the interface specified in the bfd command as the outbound
interface and with the peer IP address specified in the peer-ip command as the next-hop
address.
Step 5 Set discriminators.
l Run discriminator local discr-value
A local discriminator is set.
l Run discriminator remote discr-value
A remote discriminator is set.
The local discriminator of a device must be the remote discriminator of the device on the
other end; otherwise, a BFD session cannot be established. In addition, the local and remote
discriminators cannot be modified after being configured.

NOTE

The local discriminator of the local device must be the same as the remote discriminator of the remote
device, and the remote discriminator of the local device must be the same as the local discriminator of
the remote device.

Step 6 Run quit


The system view is displayed.
Step 7 Run interface interface-type interface-number
The view of the specified interface is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 521


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Step 8 On an Ethernet interface, run undo portswitch


The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 9 Run isis bfd static


Static IPv4 BFD is enabled on the specified interface.
Step 10 Run commit
The configuration is committed.

----End

Verifying the Configuration


You can check information about a BFD session only after parameters of the BFD session are
configured and the BFD session is established.
l Run the display isis [ process-id | vpn-instance vpn-instance-name ] bfd session { peer
ip-address | all | interface interface-type interface-number } command to check
information about the BFD session.
l Run the display isis interface verbose command. The command output shows that the
status of static BFD for IS-IS process is Yes.

7.15.3 Configuring Dynamic BFD for IS-IS

Context
On an IS-IS network, a device periodically sends Hello packets to detect the neighbor status
change. By default, the device considers a neighbor Down when it does not receive a Hello
packet from the neighbor after sending three Hello packets (30 seconds). This IS-IS fault
detection mechanism, however, cannot provide high reliability for the network that requires
fast network convergence and no packet loss. BFD for IS-IS can solve this problem. BFD is a
millisecond-level fault detection mechanism. It can detect faults on the link between IS-IS
neighbors within 50 ms. Therefore, BFD can speed up IS-IS route convergence, ensures fast
link switchover, and reduces traffic loss.
Dynamic BFD for IS-IS implements dynamic setup of BFD sessions. When a new IS-IS
neighbor relationship is set up, BFD is notified of the neighbor parameters and the detection
parameters (including source and destination IP addresses). Then a BFD session will be
established based on the received neighbor parameters.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 522


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Dynamic BFD is more flexible than static BFD. In dynamic BFD, routing protocols trigger
the setup of BFD sessions, preventing the configuration errors caused by manual
configuration. Dynamic BFD is easy to configure and applies to the scenarios where BFD
needs to be configured on the entire network. Dynamic BFD for IS-IS can fast detect neighbor
status changes and implement fast network convergence.

NOTE

A BFD session currently does not detect route switching. If the change of bound peer IP address causes
a route to switch to another link, the BFD session is negotiated again only when the original link fails.
The priority of BFD configured on an interface is higher than that of BFD configured for a process. If
BFD session parameters are configured for both a process and an interface, the parameters on the
interface will be used to establish a dynamic BFD session.

Procedure
l Configure dynamic BFD for IS-IS in a specified IS-IS process.
a. Run system-view
The system view is displayed.
b. Run bfd
BFD is enabled globally.
c. Run quit
The system view is displayed.
d. Run isis process-id
The IS-IS view is displayed.
e. Run bfd all-interfaces enable
BFD for IS-IS is enabled to establish a BFD session.
This command enables an IS-IS process to use default BFD parameters to create
BFD sessions on all the interfaces in the IS-IS process.
f. (Optional) Run bfd all-interfaces { min-rx-interval receive-interval | min-tx-
interval transmit-interval | detect-multiplier multiplier-value | frr-binding } *
The parameters for establishing BFD sessions are set for all interfaces.
The command execution result is applicable to BFD session parameters on all IS-IS
interfaces.
g. (Optional) Run the following command in the interface view: isis bfd block
The interface is prohibited from dynamically establishing a BFD session.
By default, an interface can dynamically establish BFD sessions.
h. Run commit
The configuration is committed.
l Configure dynamic BFD for IS-IS on a specified interface.
a. Run system-view
The system view is displayed.
b. Run bfd

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 523


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

BFD is enabled globally.


c. Run quit
The system view is displayed.
d. Run interface interface-type interface-number
The interface view is displayed.
e. On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute
configurations (for example, shutdown and description configurations).
Alternatively, if configuration information supported by both Layer 2 and Layer 3
interfaces exists (for example, mode lacp and lacp system-id configurations), no
configuration that is not supported after the working mode of the interface is
switched can exist. If unsupported configurations exist on the interface, delete the
configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch
batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in
the system view to switch these interfaces to Layer 3 mode in batches.
f. Run isis bfd enable
BFD is enabled on the interface to establish a BFD session.
After BFD is configured globally and the neighbor status is Up (on a broadcast
network, DIS is in the Up state), default BFD parameters will be used to establish
BFD sessions on the specified interface.
g. (Optional) Run isis bfd { min-rx-interval receive-interval | min-tx-interval
transmit-interval | detect-multiplier multiplier-value | frr-binding } *
Run this command when BFD session parameters need to be configured for a
specified interface.
h. (Optional) Run isis bfd block
The interface is prohibited from dynamically establishing a BFD session.
i. Run commit
The configuration is committed.
----End

Verifying the Configuration


After BFD is enabled on both ends of a link, run the display isis [ process-id | vpn-instance
vpn-instance-name ] bfd session { peer ip-address | all | interface interface-type interface-
number } command. The command output shows that BFD status is up.

7.16 Configuring the Overload Bit for an IS-IS Device

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 524


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Pre-configuration Tasks
Before configuring the overload bit for an IS-IS device, complete the following task:
l 7.6 Configuring Basic IS-IS Functions

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 [ timeout1 | start-from-nbr system-id [ timeout1 [ timeout2 ] ]
| wait-for-bgp [ timeout1 ] ] [ send-sa-bit [ timeout3 ] ] ][ allow { interlevel | external }* ]
The overload bit for non-pseudonode LSPs is configured.
Step 4 Run commit
The configuration is committed.

----End

Verifying the Configuration


l Run the display isis lsdb [ [ level-1 | level-2 ] | verbose | [ local | lsp-id | is-name
symbolic-name ] ] * [ process-id | vpn-instance vpn-instance-name ] command to check
information in the IS-IS LSDB.

7.17 Maintaining IS-IS

7.17.1 Resetting IS-IS


Context
To reset IS-IS, reset IS-IS data structure, neighbor relationship and packets

The IS-IS data structure cannot be restored after you reset it. All the previous structure
information and the neighbor relationship are reset. Exercise caution when running this
command.
The specified IS-IS neighbor relationship is deleted after you reset a specified IS-IS neighbor.
Exercise caution when running this command.

Procedure
l Reset IS-IS data structure.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 525


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Run the reset isis all[ process-id | vpn-instance vpn-instance-name ] command to reset
IS-IS data structure.
l Reset IS-IS neighbor relationship.

Run the reset isis peer system-id [ process-id | vpn-instance vpn-instance-name ]


command to reset a specific IS-IS neighbor.

After the IS-IS routing policy or the protocol changes, you can reset a specific IS-IS
neighbor to validate the new configuration.
l Reset IS-IS statistics

Run the reset isis error [ process-id | vpn-instance vpn-instance-name ] or reset isis
error interface interface-type interface-number command to clear information about
incorrect LSPs and Hello packets received by the specified interface or process.

Run the reset isis statistics { packet | socket } [ interface [ interface-type interface-
number ] ] command to clear IS-IS statistics on the specified interface.

Run the reset isis [ process-id ]statistics packet [ lsp ] or reset isis statistics packet lsp
[ process-id ] command to clear IS-IS statistics on the specified process.

Run the reset isis process-id suppress-flapping peer [ interface-type interface-number ]


[ notify-peer ] command to exit from IS-IS neighbor relationship flapping suppression.

----End

7.17.2 Suppressing IS-IS

Context
By suppressing IS-IS, you can disable an IS-IS process temporarily without affecting the IS-
IS configuration.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run isis [ process-id ]

An IS-IS process is created, and the IS-IS view is displayed.

Step 3 Run shutdown

The IS-IS process is disabled temporarily.

After the IS-IS process is disabled temporarily, you can still perform the IS-IS configuration
but the configuration does not take effect. You can run the undo shutdown command to
cancel the suppression.

Step 4 Run commit

The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 526


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

7.17.3 Improving the Maintainability of IS-IS


Context
The administrator can improve the maintainability of IS-IS using either of the following
methods:
l Configuring IS-IS host name mapping: Through this function, the administrator can use
a simple name to replace the system ID. After IS-IS host name mapping is configured,
the dynamic name is displayed in the IS-IS information to replace the system ID when
the display command is executed. This improves the maintainability of IS-IS networks.
l Configuring IS-IS to add the POI TLV to a PURGE packet: When the value of the
Remaining Lifetime field in an LSP packets is 0, this packet is invalid and called a
PURGE packet. PURGE packets do not record information about the devices generating
these packets. Therefore, when a network is faulty, the packet source cannot be located.
To solve this problem, IS-IS can be configured to add the POI TLV to a PURGE packet
so that the PURGE packet contains information about its generating device. If the
dynamic host name function is configured locally, the host name TLV is also added to
the PURGE packet to facilitate fault location.

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 Configure IS-IS host name mapping.
l Run is-name symbolic-name
IS-IS dynamic host name mapping is configured and a host name is configured for the
local device.
This configuration is dynamic configuration. Therefore, the configured host name
symbolic-name is advertised through an LSP to other IS-IS devices in the same area.
When you use IS-IS display commands to view IS-IS information on other IS-IS
devices, the system ID of the local device is replaced by the configured host name.
l Run is-name map system-id symbolic-name
IS-IS static host name mapping is configured and a host name is configured for the
remote device.
This configuration is static configuration and takes effect only on the local device.
Therefore, the configured host name symbolic-name is not advertised through an LSP.
Step 4 (Optional) Run purge-originator-identification enable
IS-IS is configured to add POI TLV to Purge packets. If a dynamic hostname has been
configured for the local device, the hostname TLV is also added to the Purge packets.
Step 5 Run commit
The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 527


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

7.18 Configuration Examples for IPv4 IS-IS


This section only provides configuration examples for individual features. For details about
multi-feature configuration examples, feature-specific configuration examples, interoperation
examples, protocol or hardware replacement examples, and industry application examples, see
the Typical Configuration Examples.

7.18.1 Example for Configuring Basic IS-IS Functions

Networking Requirements
As shown in Figure 7-26, there are four devices (SwitchA, SwitchB, SwitchC, and SwitchD)
on the network. The four devices need to communicate with each other. SwitchA and SwitchB
can only process a small amount of data because they have lower performance than the other
two devices.

Figure 7-26 Networking diagram of configuring basic IS-IS functions

IS-IS
Area10 10GE1/0/2
VLANIF40
10GE1/0/1 10GE1/0/3 [Link]/16
SwitchA VLANIF10 VLAN30 SwitchD
L1 [Link]/24 [Link]/24 L2
10GE1/0/1 SwitchC 10GE1/0/1
VLANIF10 10GE1/0/2 VLANIF30
L1/2
[Link]/24 VLANIF20 [Link]/24
[Link]/24 10GE1/0/1
VLANIF20
[Link]/24 IS-IS
SwitchB Area20
L1

Configuration Roadmap
The configuration roadmap is as follows:
1. Enable IS-IS on each device so that the devices can be interconnected. Configure
SwitchA and SwitchB as Level-1 devices to enable them to maintain less data.

Procedure
Step 1 Configure VLANs that each interface belongs to.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 528


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

[~SwitchA] vlan 10
[*SwitchA-vlan10] quit
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] commit
[~SwitchA-10GE1/0/1] quit

The configurations of SwitchB, SwitchC, and SwitchD are similar to the configuration of
SwitchA, and are not mentioned here.
Step 2 Assign the IP addresses for VLANIF interfaces.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ip address [Link] 24
[*SwitchA-Vlanif10] commit
[~SwitchA-Vlanif10] quit

The configurations of SwitchB, SwitchC, and SwitchD are similar to the configuration of
SwitchA, and are not mentioned here.
Step 3 Configure basic IS-IS functions.
# Configure SwitchA.
[~SwitchA] isis 1
[*SwitchA-isis-1] is-level level-1
[*SwitchA-isis-1] network-entity 10.0000.0000.0001.00
[*SwitchA-isis-1] quit
[*SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] isis enable 1
[*SwitchA-Vlanif10] commit
[~SwitchA-Vlanif10] quit

# Configure SwitchB.
[~SwitchB] isis 1
[*SwitchB-isis-1] is-level level-1
[*SwitchB-isis-1] network-entity 10.0000.0000.0002.00
[*SwitchB-isis-1] quit
[*SwitchB] interface vlanif 20
[*SwitchB-Vlanif20] isis enable 1
[*SwitchA-Vlanif20] commit
[~SwitchB-Vlanif20] quit

# Configure SwitchC.
[~SwitchC] isis 1
[*SwitchC-isis-1] network-entity 10.0000.0000.0003.00
[*SwitchC-isis-1] quit
[*SwitchC] interface vlanif 10
[*SwitchC-Vlanif10] isis enable 1
[*SwitchC-Vlanif10] quit
[*SwitchC] interface vlanif 20
[*SwitchC-Vlanif20] isis enable 1
[*SwitchC-Vlanif20] quit
[*SwitchC] interface vlanif 30
[*SwitchC-Vlanif30] isis enable 1
[*SwitchC-Vlanif30] commit
[~SwitchC-Vlanif30] quit

# Configure SwitchD.
[~SwitchD] isis 1
[*SwitchD-isis-1] is-level level-2
[*SwitchD-isis-1] network-entity 20.0000.0000.0004.00
[*SwitchD-isis-1] quit
[*SwitchD] interface vlanif 30
[*SwitchD-Vlanif30] isis enable 1
[*SwitchD-Vlanif30] quit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 529


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

[*SwitchD] interface vlanif 40


[*SwitchD-Vlanif40] isis enable 1
[*SwitchD-Vlanif40] commit
[~SwitchD-Vlanif40] quit

Step 4 Verify the configuration.


# View the IS-IS LSDB information of each switch.
[~SwitchA] display isis lsdb

Database Information for ISIS(1)


--------------------------------------------------------------------------------

Level-1 Link State Database

*(In TLV)-Leaking Route, *(By LSPID)-Self LSP, +-Self LSP(Extended),


ATT-Attached, P-Partition, OL-Overload

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

Total LSP(s): 3
[~SwitchB] display isis lsdb

Database Information for ISIS(1)


--------------------------------------------------------------------------------

Level-1 Link State Database

*(In TLV)-Leaking Route, *(By LSPID)-Self LSP, +-Self LSP(Extended),


ATT-Attached, P-Partition, OL-Overload

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

Total LSP(s): 3
[~SwitchC] display isis lsdb

Database Information for ISIS(1)


--------------------------------------------------------------------------------

Level-1 Link State Database

*(In TLV)-Leaking Route, *(By LSPID)-Self LSP, +-Self LSP(Extended),


ATT-Attached, P-Partition, OL-Overload

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
0000.0000.0003.00-00* 0x00000008 0x3340 569 111 1/0/0

Total LSP(s): 3

Level-2 Link State Database

*(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

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 530


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

-------------------------------------------------------------------------------
0000.0000.0003.00-00* 0x00000008 0x55bb 650 100 0/0/0
0000.0000.0004.00-00 0x00000005 0x651 629 84 0/0/0

Total LSP(s): 2
[~SwitchD] display isis lsdb

Database Information for ISIS(1)


--------------------------------------------------------------------------------

Level-2 Link State Database

*(In TLV)-Leaking Route, *(By LSPID)-Self LSP, +-Self LSP(Extended),


ATT-Attached, P-Partition, OL-Overload

LSPID Seq Num Checksum HoldTime Length ATT/P/OL


-------------------------------------------------------------------------------
0000.0000.0003.00-00 0x00000008 0x55bb 644 100 0/0/0
0000.0000.0004.00-00* 0x00000005 0x651 624 84 0/0/0

Total LSP(s): 2

# View the IS-IS routing information of each switch. The routing table of a Level-1 device
contains a default route with the next hop as a Level-1-2 device. The routing table of a
Level-2 device contains all Level-1 and Level-2 routes.
[~SwitchA] display isis route

Route Information for ISIS(1)


--------------------------------------------------------------------------------

Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,


U-Up/Down Bit Set

ISIS(1) Level-1 Forwarding Table


--------------------------------------------------------------------------------

IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags


--------------------------------------------------------------------------
[Link]/0 10 NULL Vlanif10 [Link] A/-/-/-
[Link]/24 10 NULL - Direct D/-/L/-
[Link]/24 20 NULL Vlanif10 [Link] A/-/-/-
[Link]/24 20 NULL Vlanif10 [Link] A/-/-/-
[~SwitchC] display isis route

Route Information for ISIS(1)


--------------------------------------------------------------------------------

Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,


U-Up/Down Bit Set

ISIS(1) Level-1 Forwarding Table


--------------------------------------------------------------------------------

IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags


-------------------------------------------------------------------------
[Link]/24 10 NULL - Direct D/-/L/-
[Link]/24 10 NULL - Direct D/-/L/-
[Link]/24 10 NULL - Direct D/-/L/-

ISIS(1) Level-2 Forwarding Table


--------------------------------------------------------------------------------

IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags


-------------------------------------------------------------------------
[Link]/24 10 NULL - Direct D/-/L/-
[Link]/24 10 NULL - Direct D/-/L/-
[Link]/16 20 NULL Vlanif30 [Link] A/-/-/-

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 531


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

[Link]/24 10 NULL - Direct D/-/L/-


[~SwitchD] display isis route

Route Information for ISIS(1)


--------------------------------------------------------------------------------

Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,


U-Up/Down Bit Set

ISIS(1) Level-1 Forwarding Table


--------------------------------------------------------------------------------

IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags


--------------------------------------------------------------------------
[Link]/24 20 NULL Vlanif30 [Link] A/-/-/-
[Link]/24 20 NULL Vlanif30 [Link] A/-/-/-
[Link]/16 10 NULL - Direct D/-/L/-
[Link]/24 10 NULL - Direct D/-/L/-

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10
#
isis 1
is-level level-1
network-entity 10.0000.0000.0001.00
#
interface Vlanif10
ip address [Link] [Link]
isis enable 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 20
#
isis 1
is-level level-1
network-entity 10.0000.0000.0002.00
#
interface Vlanif20
ip address [Link] [Link]
isis enable 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
return

l Configuration file of SwitchC


#
sysname SwitchC
#
vlan batch 10 20 30
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 532


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

isis 1
network-entity 10.0000.0000.0003.00
#
interface Vlanif10
ip address [Link] [Link]
isis enable 1
#
interface Vlanif20
ip address [Link] [Link]
isis enable 1
#
interface Vlanif30
ip address [Link] [Link]
isis enable 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 30
#
return

l Configuration file of SwitchD


#
sysname SwitchD
#
vlan batch 30 40
#
isis 1
is-level level-2
network-entity 20.0000.0000.0004.00
#
interface Vlanif30
ip address [Link] [Link]
isis enable 1
#
interface Vlanif40
ip address [Link] [Link]
isis enable 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
return

7.18.2 Example for Configuring IS-IS DIS Election

Networking Requirements
In Figure 7-27, four switches on the broadcast network communicate using IS-IS. SwitchA
and SwitchB are Level-1-2 devices, SwitchC is a Level-1 device, and SwitchD is a Level-2
device. SwitchA with high performance needs to be configured as a Level-2 DIS.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 533


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Figure 7-27 Networking diagram of configuring IS-IS DIS election

SwitchA SwitchB
L1/L2 L1/L2

10GE1/0/1 10GE1/0/1
VLANIF10 VLANIF10
[Link]/24 [Link]/24

10GE1/0/1 10GE1/0/1
VLANIF10 VLANIF10
[Link]/24 [Link]/24

SwitchC SwitchD
L1 L2

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure IS-IS to enable network interconnectivity.
2. Set the DIS priority of SwitchA to 100 so that SwitchA can be elected as a Level-2 DIS.

Procedure
Step 1 Configure an IPv4 address for each interface. The configuration details are not described here.

Step 2 View the MAC address of the VLANIF interface on each switch. When each VLANIF
interface has the same DIS priority, the switch with a larger interface MAC address is elected
as the DIS.
# View the MAC address of VLANIF10 on SwitchA.
[~SwitchA] display arp interface vlanif 10
ARP Entry Types: D - Dynamic, S - Static, I - Interface
EXP: Expire-time
IP ADDRESS MAC ADDRESS EXP(M) TYPE/VLAN INTERFACE VPN-INSTANCE
-------------------------------------------------------------------------
[Link] 00e0-fc10-afec I Vlanif10
-------------------------------------------------------------------------
Total:1 Dynamic:0 Static:0 Interface:1

# View the MAC address of VLANIF10 on SwitchB.


[~SwitchB] display arp interface vlanif 10
ARP Entry Types: D - Dynamic, S - Static, I - Interface
EXP: Expire-time
IP ADDRESS MAC ADDRESS EXP(M) TYPE/VLAN INTERFACE VPN-INSTANCE
-------------------------------------------------------------------------
[Link] 00e0-fccd-acdf I Vlanif10
-------------------------------------------------------------------------
Total:1 Dynamic:0 Static:0 Interface:1

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 534


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

# View the MAC address of VLANIF10 on SwitchC.


[~SwitchC] display arp interface vlanif 10
ARP Entry Types: D - Dynamic, S - Static, I - Interface
EXP: Expire-time
IP ADDRESS MAC ADDRESS EXP(M) TYPE/VLAN INTERFACE VPN-INSTANCE
-------------------------------------------------------------------------
[Link] 00e0-fc50-25fe I Vlanif10
-------------------------------------------------------------------------
Total:1 Dynamic:0 Static:0 Interface:1

# View the MAC address of VLANIF10 on SwitchD.


[~SwitchD] display arp interface vlanif 10
ARP Entry Types: D - Dynamic, S - Static, I - Interface
EXP: Expire-time
IP ADDRESS MAC ADDRESS EXP(M) TYPE/VLAN INTERFACE VPN-INSTANCE
-------------------------------------------------------------------------
[Link] 00e0-fcfd-305c I Vlanif10
-------------------------------------------------------------------------
Total:1 Dynamic:0 Static:0 Interface:1

Step 3 Configure IS-IS protocol.

# Configure SwitchA.
[~SwitchA] isis 1
[*SwitchA-isis-1] network-entity 10.0000.0000.0001.00
[*SwitchA-isis-1] quit
[*SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] isis enable 1
[*SwitchA-Vlanif10] commit
[~SwitchA-Vlanif10] quit

# Configure SwitchB.
[~SwitchB] isis 1
[*SwitchB-isis-1] network-entity 10.0000.0000.0002.00
[*SwitchB-isis-1] quit
[*SwitchB] interface vlanif 10
[*SwitchB-Vlanif10] isis enable 1
[*SwitchB-Vlanif10] commit
[~SwitchB-Vlanif10] quit

# Configure SwitchC.
[~SwitchC] isis 1
[*SwitchC-isis-1] network-entity 10.0000.0000.0003.00
[*SwitchC-isis-1] is-level level-1
[*SwitchC-isis-1] quit
[*SwitchC] interface vlanif 10
[*SwitchC-Vlanif10] isis enable 1
[*SwitchC-Vlanif10] commit
[~SwitchC-Vlanif10] quit

# Configure SwitchD.
[~SwitchD] isis 1
[*SwitchD-isis-1] network-entity 10.0000.0000.0004.00
[*SwitchD-isis-1] is-level level-2
[*SwitchD-isis-1] quit
[*SwitchD] interface vlanif 10
[*SwitchD-Vlanif10] isis enable 1
[*SwitchD-Vlanif10] commit
[~SwitchD-Vlanif10] quit

# Check IS-IS neighbor information on SwitchA.


[~SwitchA] display isis peer

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 535


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Peer Information for ISIS(80)


--------------------------------------------------------------------------------

System ID Interface Circuit ID State HoldTime(s) Type PRI


--------------------------------------------------------------------------------
0000.0000.0002 Vlanif10 0000.0000.0002.01 Up 8 L1(L1L2) 64
0000.0000.0003 Vlanif10 0000.0000.0002.01 Up 29 L1 64
0000.0000.0002 Vlanif10 0000.0000.0002.01 Up 6 L2(L1L2) 64
0000.0000.0004 Vlanif10 0000.0000.0002.01 Up 27 L2 64

Total Peer(s): 4

# View IS-IS interface information on SwitchA.


[~SwitchA] display isis interface

Interface Information for ISIS(1)


--------------------------------------------------------------------------------
Interface ID IPV4 State IPV6 State MTU Type DIS
Vlanif10 001 Up Mtu:Up/Lnk:Dn/IP:Dn 1497 L1/L2 No/No

# View IS-IS interface information on SwitchB.


[~SwitchB] display isis interface

Interface Information for ISIS(1)


--------------------------------------------------------------------------------
Interface ID IPV4 State IPV6 State MTU Type DIS
Vlanif10 001 Up Mtu:Up/Lnk:Dn/IP:Dn 1497 L1/L2 Yes/No

# View IS-IS interface information on SwitchD.


[~SwitchD] display isis interface

Interface Information for ISIS(1)


--------------------------------------------------------------------------------
Interface ID IPV4 State IPV6 State MTU Type DIS
Vlanif10 001 Up Mtu:Up/Lnk:Dn/IP:Dn 1497 L1/L2 No/Yes

As shown in the preceding interface information, when the default DIS priority is used, the
IS-IS interface on SwitchB has the largest MAC address among all the interfaces on the
Level-1 Switchs. Therefore, SwitchB is elected as a Level-1 DIS. The IS-IS interface on
SwitchD has the largest MAC address among all the interfaces on the Level-2 Switchs.
Therefore, SwitchD is elected as a Level-2 DIS. Level-1 and Level-2 pseudonodes are
0000.0000.0002.01 and 0000.0000.0004.01 respectively.

Step 4 Configure the DIS priority of SwitchA.


[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] isis dis-priority 100
[*SwitchA-Vlanif10] commit

# View IS-IS neighbor information on SwitchA.


[~SwitchA] display isis peer

Peer Information for ISIS(80)


--------------------------------------------------------------------------------

System ID Interface Circuit ID State HoldTime(s) Type PRI


--------------------------------------------------------------------------------
0000.0000.0002 Vlanif10 0000.0000.0001.01 Up 23 L1(L1L2) 64
0000.0000.0003 Vlanif10 0000.0000.0001.01 Up 27 L1 64
0000.0000.0002 Vlanif10 0000.0000.0001.01 Up 23 L2(L1L2) 64
0000.0000.0004 Vlanif10 0000.0000.0001.01 Up 23 L2 64

Total Peer(s): 4

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 536


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Step 5 Verify the configuration.


# View IS-IS interface information on SwitchA.
[~SwitchA] display isis interface

Interface Information for ISIS(1)


--------------------------------------------------------------------------------
Interface ID IPV4 State IPV6 State MTU Type DIS
Vlanif10 001 Up Mtu:Up/Lnk:Dn/IP:Dn 1497 L1/L2 Yes/Yes

As shown in the preceding information, after the DIS priority of the IS-IS interface on Switch
is changed, SwitchA becomes a Level-1-2 DIS (DR) immediately and its pseudonode is
0000.0000.0001.01.
# View IS-IS neighbor and interface information on SwitchB.
[~SwitchB] display isis peer

Peer Information for ISIS(1)


--------------------------------------------------------------------------------

System ID Interface Circuit ID State HoldTime(s) Type PRI


--------------------------------------------------------------------------------
0000.0000.0001 Vlanif10 0000.0000.0001.01 Up 8 L1(L1L2) 100
0000.0000.0003 Vlanif10 0000.0000.0001.01 Up 22 L1 64
0000.0000.0001 Vlanif10 0000.0000.0001.01 Up 8 L2(L1L2) 100
0000.0000.0004 Vlanif10 0000.0000.0001.01 Up 26 L2 64

Total Peer(s): 4
[~SwitchB] display isis interface

Interface Information for ISIS(1)


--------------------------------------------------------------------------------
Interface ID IPV4 State IPV6 State MTU Type DIS
Vlanif10 001 Up Mtu:Up/Lnk:Dn/IP:Dn 1497 L1/L2 No/No

# View IS-IS neighbor and interface information on SwitchD.


[~SwitchD] display isis peer

Peer Information for ISIS(1)


--------------------------------------------------------------------------------

System ID Interface Circuit ID State HoldTime(s) Type PRI


--------------------------------------------------------------------------------
0000.0000.0001 Vlanif10 0000.0000.0001.01 Up 8 L2 100
0000.0000.0002 Vlanif10 0000.0000.0001.01 Up 22 L2 64

Total Peer(s): 2
[~SwitchD] display isis interface

Interface Information for ISIS(1)


--------------------------------------------------------------------------------
Interface ID IPV4 State IPV6 State MTU Type DIS
Vlanif10 001 Up Mtu:Up/Lnk:Dn/IP:Dn 1497 L1/L2 No/No

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10
#
isis 1

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 537


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

network-entity 10.0000.0000.0001.00
#
interface Vlanif10
ip address [Link] [Link]
isis enable 1
isis dis-priority 100
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 10
#
isis 1
network-entity 10.0000.0000.0002.00
#
interface Vlanif10
ip address [Link] [Link]
isis enable 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return

l Configuration file of SwitchC


#
sysname SwitchC
#
vlan batch 10
#
isis 1
is-level level-1
network-entity 10.0000.0000.0003.00
#
interface Vlanif10
ip address [Link] [Link]
isis enable 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return

l Configuration file of SwitchD


#
sysname SwitchD
#
vlan batch 10
#
isis 1
is-level level-2
network-entity 10.0000.0000.0004.00
#
interface Vlanif10
ip address [Link] [Link]
isis enable 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 538


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

#
return

7.18.3 Example for Configuring IS-IS to Interact with BGP


Networking Requirements
As shown in Figure 7-28, Switch A and Switch B belong to the same AS, and the IS-IS
neighbor relationship is established between Switch A and Switch B. An EBGP connection is
established between Switch B and Switch C. Switch A, Switch B, and Switch C need to
communicate with each other. Besides, the metric of routes need to be changed when AS
65009 sends the routes to AS 65008.

Figure 7-28 Networking diagram of configuring IS-IS to interact with BGP

Loopback0 Loopback0
[Link]/32 [Link]/32
10GE1/0/1 10GE1/0/2 10GE1/0/1
VLANIF10 VLANIF20 VLANIF20
[Link]/24 [Link]/24 [Link]/24
10GE1/0/1
SwitchA VLANIF10 SwitchB SwitchC
[Link]/24
AS65008 AS65009

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure IP addresses for interfaces, and enable IS-IS and BGP to ensure that there are
reachable routes inside each AS.
2. Configure IS-IS and BGP to import routes from each other on Switch B to ensure that
there are routes on each network segment. Configure a route-policy to change the metric
of imported routes when IS-IS imports BGP routes.

Procedure
Step 1 Configure VLANs that each interface belongs to.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchB
[*HUAWEI] commit
[~SwitchB] vlan batch 10 20
[*SwitchB] interface 10ge 1/0/1
[*SwitchB-10GE1/0/1] port link-type trunk
[*SwitchB-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchB-10GE1/0/1] quit
[*SwitchB] interface 10ge 1/0/2
[*SwitchB-10GE1/0/2] port link-type trunk
[*SwitchB-10GE1/0/2] port trunk allow-pass vlan 20
[*SwitchB-10GE1/0/2] quit
[*SwitchB] commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 539


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

The configurations of SwitchA and SwitchC are similar to the configuration of SwitchA, and
are not mentioned here.
Step 2 Assign the IP addresses for VLANIF interfaces.
[~SwitchB] interface vlanif 10
[*SwitchB-Vlanif10] ip address [Link]/24
[*SwitchB-Vlanif10] quit
[*SwitchB] interface vlanif 20
[*SwitchB-Vlanif20] ip address [Link]/24
[*SwitchB-Vlanif20] quit
[*SwitchB] commit

The configurations of SwitchA and SwitchC are similar to the configuration of SwitchA, and
are not mentioned here.
Step 3 Configure basic IS-IS functions.
# Configure SwitchA.
[~SwitchA] isis 1
[*SwitchA-isis-1] network-entity 10.0000.0000.0001.00
[*SwitchA-isis-1] quit
[*SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] isis enable 1
[*SwitchA-Vlanif10] quit
[*SwitchA] commit

# Configure SwitchB.
[~SwitchB] isis 1
[*SwitchB-isis-1] network-entity 10.0000.0000.0002.00
[*SwitchB-isis-1] quit
[*SwitchB] interface vlanif 10
[*SwitchB-Vlanif10] isis enable 1
[*SwitchB-Vlanif10] quit
[*SwitchB] interface vlanif 20
[*SwitchB-Vlanif20] isis enable 1
[*SwitchB-Vlanif20] quit
[*SwitchB] commit

Step 4 Establish an EBGP connection.


# Configure SwitchB.
[~SwitchB] bgp 65008
[*SwitchB-bgp] router-id [Link]
[*SwitchB-bgp] peer [Link] as-number 65009
[*SwitchB-bgp] ipv4-family unicast
[*SwitchB-bgp-af-ipv4] network [Link] [Link]
[*SwitchB-bgp-af-ipv4] commit
[~SwitchB-bgp-af-ipv4] quit
[~SwitchB-bgp] quit

Configure SwitchC.
[~SwitchC] bgp 65009
[*SwitchC-bgp] router-id [Link]
[*SwitchC-bgp] peer [Link] as-number 65008
[*SwitchC-bgp] ipv4-family unicast
[*SwitchC-bgp-af-ipv4] network [Link] [Link]
[*SwitchC-bgp-af-ipv4] commit
[~SwitchC-bgp-af-ipv4] quit
[~SwitchC-bgp] quit

Step 5 Configure IS-IS to import BGP routes.


# Configure a static route on SwitchC.
[~SwitchC] ip route-static [Link] 32 NULL 0

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 540


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

[*SwitchC] commit

# On SwitchC, configure BGP to import the static route.


[~SwitchC] bgp 65009
[~SwitchC-bgp] import-route static
[*SwitchC-bgp] quit
[*SwitchC] commit

# On SwitchB, configure IS-IS to import the BGP route.


[~SwitchB] isis 1
[~SwitchB-isis-1] import-route bgp
[*SwitchB-isis-1] quit
[*SwitchB] commit

# View the routing table of SwitchA, and you can see that IS-IS successfully imports BGP
route [Link]/32.
[~SwitchA] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table: _public_
Destinations : 6 Routes : 6

Destination/Mask Proto Pre Cost Flags NextHop Interface

[Link]/24 Direct 0 0 D [Link] Vlanif10


[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/8 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/32 ISIS-L2 15 74 D [Link] Vlanif10

# On Switch B, configure the AS_Path filter, and apply the filter in route-policy RTC.
[~SwitchB] ip as-path-filter 1 permit 65009
[*SwitchB] route-policy RTC permit node 0
[*SwitchB-route-policy] if-match as-path-filter 1
[*SwitchB-route-policy] apply cost 20
[*SwitchB-route-policy] quit
[*SwitchB] commit

# On SwitchB, configure IS-IS to import the BGP route.


[~SwitchB] isis 1
[~SwitchB-isis-1] import-route bgp route-policy RTC
[*SwitchB-isis-1] quit
[*SwitchB] commit

# View the routing table of SwitchA, and you can see that the AS_Path filter is successfully
applied and the cost of imported route [Link]/32 changes from 74 to 94.
[~SwitchA] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table: _public_
Destinations : 6 Routes : 6

Destination/Mask Proto Pre Cost Flags NextHop Interface

[Link]/24 Direct 0 0 D [Link] Vlanif10


[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/8 Direct 0 0 D [Link] InLoopBack0

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 541


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

[Link]/32 Direct 0 0 D [Link] InLoopBack0


[Link]/32 ISIS-L2 15 94 D [Link] Vlanif10

Step 6 Configure BGP to import IS-IS routes.


[~SwitchB] bgp 65008
[~SwitchB-bgp] import-route isis 1
[*SwitchB-bgp] quit
[*SwitchB] commit

# View the routing table of SwitchC, and you can see that BGP successfully imports IS-IS
route [Link]/24.
[~SwitchC] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table: _public_
Destinations : 7 Routes : 7

Destination/Mask Proto Pre Cost Flags NextHop Interface

[Link]/24 EBGP 255 0 D [Link] Vlanif20


[Link]/24 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] Vlanif20
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/8 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Static 60 0 D [Link] NULL0

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10
#
isis 1
network-entity 10.0000.0000.0001.00
#
interface Vlanif10
ip address [Link] [Link]
isis enable 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 10 20
#
isis 1
network-entity 10.0000.0000.0002.00
import-route bgp route-policy RTC
#
interface Vlanif10
ip address [Link] [Link]
isis enable 1
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 542


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

interface Vlanif20
ip address [Link] [Link]
isis enable 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface LoopBack0
ip address [Link] [Link]
#
bgp 65008
router-id [Link]
peer [Link] as-number 65009
#
ipv4-family unicast
network [Link] [Link]
import-route isis 1
peer [Link] enable
#
route-policy RTC permit node 0
if-match as-path-filter 1
apply cost 20
#
ip as-path-filter 1 index 10 permit 65009
#
return

l Configuration file of SwitchC


#
sysname SwitchC
#
vlan batch 20
#
interface Vlanif20
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface LoopBack0
ip address [Link] [Link]
#
bgp 65009
router-id [Link]
peer [Link] as-number 65008
#
ipv4-family unicast
network [Link] [Link]
import-route static
peer [Link] enable
#
ip route-static [Link] [Link] NULL0
#
return

7.18.4 Example for Configuring IS-IS Auto FRR

Networking Requirements
As shown in Figure 7-29, four devices (Switch A, Switch B, Switch C, and Switch D)
communicate using IS-IS. The reliability of data forwarding from Switch A to Switch D

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 543


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

needs to be improved. When the primary link fails, traffic is transmitted to the backup link in
milliseconds.

Figure 7-29 Networking diagram of configuring IS-IS Auto FRR

SwitchC
10GE1/0/1
L1/2 10GE1/0/2
VLANIF10 VLANIF50
[Link]/24 [Link]/24
10GE1/0/1 10GE1/0/1
VLANIF10

10

co
VLANFI50 10GE1/0/3

st
=
[Link]/24 st Link T [Link]/24

=
VLANIF40
co

10
SwitchA SwitchD [Link]/24
L1/2 L1/2 cost = 10
co

10GE1/0/2

10
10GE1/0/2
st

VLANIF30
t=
=

VLANIF20
30

s
co
[Link]/24 [Link]/24
10GE1/0/1 10GE1/0/2
VLANIF20 VLANIF30
[Link]/24 [Link]/24
SwitchB
L1/2

Configuration Roadmap
The configuration roadmap is as follows:

1. Set a larger link cost on VLANIF 20 of Switch A, and ensure that Link T is
preferentially selected for data forwarding from Switch A to Switch D.
2. Configure IS-IS Auto FRR on Switch A to allow traffic to be fast switched to the backup
link without waiting for route convergence when a fault occurs on Link T. This improves
the reliability of data forwarding.

Procedure
Step 1 Configure VLANs that each interface belongs to.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan batch 10 20
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 20
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 544


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

The configurations of SwitchB, SwitchC, and SwitchD are similar to the configuration of
SwitchA, and are not mentioned here.
Step 2 Configure the IP addresses of each VLANIF interface.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ip address [Link] 24
[*SwitchA-Vlanif10] quit
[*SwitchA] interface vlanif 20
[*SwitchA-Vlanif20] ip address [Link] 24
[*SwitchA-Vlanif20] quit
[*SwitchA] commit

The configurations of SwitchB, SwitchC, and SwitchD are similar to the configuration of
SwitchA, and are not mentioned here.
Step 3 Configure basic IS-IS functions.
# Configure SwitchA.
[~SwitchA] isis 1
[*SwitchA-isis-1] is-level level-1-2
[*SwitchA-isis-1] network-entity 10.0000.0000.0001.00
[*SwitchA-isis-1] quit
[*SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] isis enable 1
[*SwitchA-Vlanif10] quit
[*SwitchA] interface vlanif 20
[*SwitchA-Vlanif20] isis enable 1
[*SwitchA-Vlanif20] quit
[*SwitchA] commit

# Configure SwitchB.
[~SwitchB] isis 1
[*SwitchB-isis-1] is-level level-1-2
[*SwitchB-isis-1] network-entity 10.0000.0000.0002.00
[*SwitchB-isis-1] quit
[*SwitchB] interface vlanif 20
[*SwitchB-Vlanif20] isis enable 1
[*SwitchB-Vlanif20] quit
[*SwitchB] interface vlanif 30
[*SwitchB-Vlanif30] isis enable 1
[*SwitchB-Vlanif30] quit
[*SwitchB] commit

# Configure SwitchC.
[~SwitchC] isis 1
[*SwitchC-isis-1] is-level level-1-2
[*SwitchC-isis-1] network-entity 10.0000.0000.0003.00
[*SwitchC-isis-1] quit
[*SwitchC] interface vlanif 10
[*SwitchC-Vlanif10] isis enable 1
[*SwitchC-Vlanif10] quit
[*SwitchC] interface vlanif 50
[*SwitchC-Vlanif50] isis enable 1
[*SwitchC-Vlanif50] quit
[*SwitchC] commit

# Configure SwitchD.
[~SwitchD] isis 1
[*SwitchD-isis-1] is-level level-1-2
[*SwitchD-isis-1] network-entity 10.0000.0000.0004.00
[*SwitchD-isis-1] quit
[*SwitchD] interface vlanif 50
[*SwitchD-Vlanif50] isis enable 1
[*SwitchD-Vlanif50] quit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 545


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

[*SwitchD] interface vlanif 30


[*SwitchD-Vlanif30] isis enable 1
[*SwitchD-Vlanif30] quit
[*SwitchD] interface vlanif 40
[*SwitchD-Vlanif40] isis enable 1
[*SwitchD-Vlanif40] quit
[*SwitchD] commit

Step 4 Set the interface cost of VLANIF 20 on SwitchA to 30, and then check the routing
information.
# Set the interface cost of VLANIF 20 on SwitchA to 30.
[~SwitchA] interface vlanif 20
[~SwitchA-Vlanif20] isis cost 30
[*SwitchA-Vlanif20] quit
[*SwitchA] return

# Check information about the link from SwitchA to SwitchD. Link T has a lower cost, and so
IS-IS optimally selects Link T to send traffic that is forwarded by SwitchA.
<SwitchA> display isis route [Link] verbose

Route Information for ISIS(1)


--------------------------------------------------------------------------------

Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,


U-Up/Down Bit Set

ISIS(1) Level-1 Forwarding Table


--------------------------------------------------------------------------------

IPV4 Dest : [Link]/24 Int. Cost : 30 Ext. Cost : NULL


Admin Tag : - Src Count : 1 Flags : A/-/L/-
Priority : Low
NextHop : Interface : ExitIndex :
[Link] Vlanif10 0x00000003

ISIS(1) Level-2 Forwarding Table


--------------------------------------------------------------------------------
--------------------------------

IPV4 Dest : [Link]/24 Int. Cost : 30 Ext. Cost : NULL


Admin Tag : - Src Count : 3 Flags : -/-/-/-
Priority : Low

As shown in the command output, traffic from SwitchA to SwitchD is only forwarded through
Link T.
Step 5 Enable IS-IS Auto FRR on SwitchA, and then check the routing information.
# Enable IS-IS Auto FRR on SwitchA.
<SwitchA> system-view
[~SwitchA] isis 1
[~SwitchA-isis-1] frr
[*SwitchA-isis-1-frr] loop-free-alternate
[*SwitchA-isis-1-frr] commit

# Check the routing information from SwitchA to SwitchD. You can find that IS-IS creates a
backup link because IS-IS Auto FRR is enabled.
<SwitchA> display isis route [Link] verbose

Route Information for ISIS(1)

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 546


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 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-1 Forwarding Table


--------------------------------------------------------------------------------

IPV4 Dest : [Link]/24 Int. Cost : 30 Ext. Cost : NULL


Admin Tag : - Src Count : 1 Flags : A/-/L/-
Priority : Low
NextHop : Interface : ExitIndex :
[Link] Vlanif10 0x00000003
(B)[Link] Vlanif20 0x00000004

ISIS(1) Level-2 Forwarding Table


--------------------------------

IPV4 Dest : [Link]/24 Int. Cost : 30 Ext. Cost : NULL


Admin Tag : - Src Count : 3 Flags : -/-/-/-
Priority : Low

# Check the protection type for the traffic from SwitchA to SwitchD.
<SwitchA> display isis spf-tree systemid 0000.0000.0004 verbose

Shortest Path Tree for ISIS(1)


------------------------------------------------------------------------------

ISIS(1) Level-1 Shortest Path Tree


------------------------------------------------------------------------------
0000.0000.0004.00
Distance : 20
Distance-URT : 20
Flags : SPT/V4_Islt/
V6_Islt
IPv4 Nexthops-URT : 1
(1) [Link] IF:Vlanif10 NBR:0000.0000.0003.00
(B) [Link] IF:Vlanif20 NBR:0000.0000.0002.00
TYPE:LOOP-FREE PROTECT:LINK-NODE
IPv4 Nexthops-MIGP : 0
IPv6 Nexthops : 0
Neighbors: 2 (Children:1 Parents:1 Others:0)
(1) 0000.0000.0003.02
Cost : 10
Flags : Parent

(2) 0000.0000.0004.03
Cost : 10
Flags : Child

ISIS(1) Level-2 Shortest Path Tree


------------------------------------------------------------------------------
0000.0000.0004.00
Distance : 20
Distance-URT : 20
Flags : SPT/V4_Islt/
V6_Islt
IPv4 Nexthops-URT : 1
(1) [Link] IF:Vlanif10 NBR:0000.0000.0003.00
(B) [Link] IF:Vlanif20 NBR:0000.0000.0002.00
TYPE:LOOP-FREE PROTECT:LINK-NODE
IPv4 Nexthops-MIGP : 0

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 547


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

IPv6 Nexthops : 0
Neighbors: 2 (Children:1 Parents:1 Others:0)
(1) 0000.0000.0003.02
Cost : 10
Flags : Parent

(2) 0000.0000.0004.03
Cost : 10
Flags : Child

As shown in the preceding command output, link-node dual protection is performed on the
traffic from SwitchA to SwitchD.
# Run the display fib [Link] verbose command on SwitchA to check the forwarding
entry of traffic from SwitchA to SwitchD.
<SwitchA> display fib [Link] verbose
Route Entry Count: 1
Destination: [Link] Mask : [Link]
Nexthop : [Link] OutIf : Vlanif10
LocalAddr : [Link] LocalMask: [Link]
Flags : DGU Age : 6sec
ATIndex : 0 Slot : 0
LspFwdFlag : 0 LspToken : 0x0
InLabel : NULL OriginAs : 0
BGPNextHop : [Link] PeerAs : 0
QosInfo : 0x0 OriginQos: 0x0
NexthopBak : [Link] OutIfBak : Vlanif20
LspTokenBak: 0x0 InLabelBak : NULL
LspToken_ForInLabelBak : 0x0
EntryRefCount : 0
VlanId : 0x0
BgpKey : 0
BgpKeyBak : 0
LspType : 0 Label_ForLspTokenBak : 0
MplsMtu : 0 Gateway_ForLspTokenBak : [Link]
NextToken : 0x0 IfIndex_ForLspTokenBak : 0
Label_NextToken : 0 Label : 0
LspBfdState : 0

As shown in the command output, the outbound interface of the primary link from SwitchA to
SwitchD is Vlanif10. The backup link follows the route with Vlanif20 as the outbound
interface and [Link] as the next hop.
Step 6 Verify the configuration.
# Run the shutdown command on Vlanif50 of SwitchC to shut down the link.
[~SwitchC] interface vlanif 50
[~SwitchC-Vlanif50] shutdown
[*SwitchC-Vlanif50] commit

# Run the display fib [Link] verbose command on SwitchA to check information about
the route from SwitchA to SwitchD.
<SwitchA> display ip fib slot 1 [Link] verbose
FIB Table : _public_
Total number of Routes : 1

Destination: [Link] Mask : [Link]


Nexthop : [Link] OutIf : Vlanif20
LocalAddr : [Link] LocalMask: [Link]
Flags : DGU Age : 124sec
ATIndex : 0 Slot : 1
LspFwdFlag : 0 LspToken : 0x0
InLabel : 0x0 OriginAs : 0
BGPNextHop : 0 PeerAs : 0

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 548


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

QosInfo : 0 OriginQos: 0
VlanId : 0
BgpKey : 0
BgpKeyBak : 0
NexthopBak : [Link] OutIfBak : [No Intf]
LspTokenBak: 0x0 InLabelBak : 0x0
LspToken_ForInLabelBak : 0x0
Nexthop_ForLspTokenBak : [Link]
OutIf_ForLspTokenBak : [No Intf]
Nexthop_ForLspToken_ForInLabelBak : [Link]
OutIf_ForLspToken_ForInLabelBak : [No Intf]
LspType : 0 Label_ForLspTokenBak : 0x0
MplsMtu : 0 Gateway_ForLspTokenBak : [Link]
NextToken : 0 IfIndex_ForLspTokenBak : 0
Label_NextToken : 0 Label : 0
LspBfdState : 0

As shown in the command output, the traffic forwarded by the SwitchA is switched to the
backup link with outbound interface Vlanif20 and next hop [Link].

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10 20
#
isis 1
network-entity 10.0000.0000.0001.00
frr
loop-free-alternate level-1
loop-free-alternate level-2
#
interface Vlanif10
ip address [Link] [Link]
isis enable 1
#
interface Vlanif20
ip address [Link] [Link]
isis enable 1
isis cost 30
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 20 30
#
isis 1
network-entity 10.0000.0000.0002.00
#
interface Vlanif20
ip address [Link] [Link]
isis enable 1
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 549


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

interface Vlanif30
ip address [Link] [Link]
isis enable 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
return
l Configuration file of SwitchC
#
sysname SwitchC
#
vlan batch 10 50
#
isis 1
network-entity 10.0000.0000.0003.00
#
interface Vlanif10
ip address [Link] [Link]
isis enable 1
#
interface Vlanif50
shutdown
ip address [Link] [Link]
isis enable 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 50
#
return
l Configuration file of SwitchD
#
sysname SwitchD
#
vlan batch 30 40 50
#
isis 1
network-entity 10.0000.0000.0004.00
#
interface Vlanif50
ip address [Link] [Link]
isis enable 1
#
interface Vlanif30
ip address [Link] [Link]
isis enable 1
#
interface Vlanif40
ip address [Link] [Link]
isis enable 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 50
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 30

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 550


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 40
#
return

7.18.5 Example for Configuring Static BFD for IS-IS


Networking Requirements
As shown in Figure 7-30, three routers are interconnected using IS-IS, and RouterA and
RouterB communicate with each other through a Layer 2 switch. When a link between
RouterA and RouterB fails, the two routers can respond to the fault rapidly.

Figure 7-30 Networking diagram of configuring static BFD for IS-IS

10GE1/0/1 10GE1/0/2
VLANIF10 VLANIF20
[Link]/24 [Link]/24

10GE1/0/1
10GE1/0/1
SwitchA VLANIF20 SwitchC
VLANIF10 SwitchB
[Link]/24
[Link]/24

NOTE

BFD for IS-IS cannot be used to detect the multi-hop link between RouterA and RouterC, because the
IS-IS neighbor relationship cannot be established between RouterA and RouterC.

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure IP addresses for interfaces and enable IS-IS on each router to ensure reachable
routes between the routers.
2. Enable static BFD for IS-IS on RouterA and RouterB so that routers can rapidly detect
link faults.

Procedure
Step 1 Configure VLANs that each interface belongs to.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan batch 10
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA] commit

The configurations of SwitchB, SwitchC, and SwitchD are similar to the configuration of
SwitchA, and are not mentioned here.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 551


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Step 2 Assign the IP addresses for VLANIF interfaces.


[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ip address [Link] 24
[*SwitchA-Vlanif10] quit
[*SwitchA] commit

The configurations of SwitchB, SwitchC, and SwitchD are similar to the configuration of
SwitchA, and are not mentioned here.
Step 3 Configure basic IS-IS functions.
# Configure SwitchA.
[~SwitchA] isis 1
[*SwitchA-isis-1] is-level level-2
[*SwitchA-isis-1] network-entity aa.1111.1111.1111.00
[*SwitchA-isis-1] quit
[*SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] isis enable 1
[*SwitchA-Vlanif10] quit
[*SwitchA] commit

# Configure SwitchB.
[~SwitchB] isis 1
[*SwitchB-isis-1] is-level level-2
[*SwitchB-isis-1] network-entity aa.2222.2222.2222.00
[*SwitchB-isis-1] quit
[*SwitchB] interface vlanif 10
[*SwitchB-Vlanif10] isis enable 1
[*SwitchB-Vlanif10] quit
[*SwitchB] interface vlanif 20
[*SwitchB-Vlanif20] isis enable 1
[*SwitchB-Vlanif20] quit
[*SwitchB] commit

# Configure SwitchC.
[~SwitchC] isis 1
[*SwitchC-isis-1] is-level level-2
[*SwitchC-isis-1] network-entity aa.3333.3333.3333.00
[*SwitchC-isis-1] quit
[*SwitchC] interface vlanif 20
[*SwitchC-Vlanif20] isis enable 1
[*SwitchC-Vlanif20] quit
[*SwitchC] commit

# After the preceding configurations, you can see that the neighbor relationship is established
between SwitchA and SwitchB.
[~SwitchA] display isis peer
Peer information for ISIS(1)
----------------------------
System Id Interface Circuit Id State HoldTime Type PRI
2222.2222.2222 Vlanif10 0000000001 Up 23s L2 64

The IS-IS routing table of SwitchA contains the routes to SwitchB and SwitchC.
[~SwitchA] display isis route

Route Information for ISIS(1)


--------------------------------------------------------------------------------

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


--------------------------------------------------------------------------------

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 552


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags


-------------------------------------------------------------------------
[Link]/24 10 NULL Vlanif10 Direct D/-/L/-
[Link]/24 20 NULL Vlanif10 [Link] A/-/L/-

Step 4 Configure BFD.


# Enable BFD on SwitchA and configure a BFD session.
[~SwitchA] bfd
[*SwitchA-bfd] quit
[*SwitchA] bfd atob bind peer-ip [Link] interface vlanif 10
[*SwitchA-bfd-session-atob] discriminator local 1
[*SwitchA-bfd-session-atob] discriminator remote 2
[*SwitchA-bfd-session-atob] commit
[*SwitchA-bfd-session-atob] quit
[*SwitchA] commit

# Enable BFD on SwitchA and configure a BFD session.


[~SwitchB] bfd
[*SwitchB-bfd] quit
[*SwitchB] bfd btoa bind peer-ip [Link] interface vlanif 10
[*SwitchB-bfd-session-btoa] discriminator local 2
[*SwitchB-bfd-session-btoa] discriminator remote 1
[*SwitchB-bfd-session-btoa] quit
[*SwitchB] commit

After the preceding configurations, run the display bfd session command on SwitchA or
SwitchB, and you can see that the status of the BFD session is Up.
The following uses the display on SwitchA as an example.
[~SwitchA] display bfd session all
S: Static session
D: Dynamic session
IP: IP session
IF: Single-hop session
PEER: Multi-hop session
AUTO: Automatically negotiated session
Total UP/DOWN Session Number : 1/0
------------------------------------------------------------------------
Local Remote PeerIpAddr State Type InterfaceName
------------------------------------------------------------------------
1 2 [Link] Up S/IP-IF Vlanif10
------------------------------------------------------------------------

Step 5 Enable IS-IS fast detect.


# Configure SwitchA.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] isis bfd static
[*SwitchA-Vlanif10] quit
[*SwitchA] return

# Configure SwitchB.
[~SwitchB] interface Vlanif 10
[*SwitchB-Vlanif10] isis bfd static
[*SwitchB-Vlanif10] quit
[*SwitchB] commit

Step 6 Verify the configuration.


# Enable debugging on SwitchA.
<SwitchA> debugging isis adjacency
<SwitchA> debugging isis circuit-information

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 553


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

<SwitchA> terminal debugging

# Run the shutdown command on 10GE1/0/1 of SwitchB to simulate a link fault.


[~SwitchB] interface 10ge 1/0/1
[~SwitchB-10GE1/0/1] shutdown
[*SwitchB-10GE1/0/1] commit

# On SwitchA, you can view the following log information, which indicates that IS-IS deletes
the neighbor relationship with SwitchB after being notified by BFD of the fault.
#80/active/IsisAdjacencyChange/Major/occurredTime:2011-03-09 04:17:07/-/-/alarmI
D:0x0001009e/CID=0x80e703ff:ISIS adjacency state change. (SysInstance=1,
SysLevel=1, CircI
ndex=2, CircIfIndex=20, LspId=2222.2222.2222.00.00, AdjState=1, IfIndex=20, IfNa
me=Vlanif10, Reason=BFD detected that the neighbor went Down, SubReason=14)

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10
#
bfd
#
isis 1
is-level level-2
network-entity aa.1111.1111.1111.00
#
interface Vlanif10
ip address [Link] [Link]
isis enable 1
isis bfd static
#
bfd atob bind peer-ip [Link] interface Vlanif10
discriminator local 1
discriminator remote 2
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 10 20
#
bfd
#
isis 1
is-level level-2
network-entity aa.2222.2222.2222.00
#
interface Vlanif10
ip address [Link] [Link]
isis enable 1
isis bfd static
#
interface Vlanif20
ip address [Link] [Link]
isis enable 1

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 554


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

#
bfd btoa bind peer-ip [Link] interface Vlanif10
discriminator local 2
discriminator remote 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
return

l Configuration file of SwitchC


#
sysname SwitchC
#
vlan batch 20
#
isis 1
is-level level-2
network-entity aa.3333.3333.3333.00
#
interface Vlanif20
ip address [Link] [Link]
isis enable 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
return

7.18.6 Example for Configuring Dynamic BFD for IS-IS

Networking Requirements
As shown in Figure 7-31, three devices are interconnected using IS-IS, and SwitchA and
SwitchB communicate with each other through a Layer 2 switch. When the link that passes
through the switch between SwitchA and SwitchB fails, the two devices need to rapidly
respond to the fault, and traffic can be switched to the link that passes through SwitchC for
forwarding.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 555


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Figure 7-31 Networking diagram of configuring dynamic BFD for IS-IS

10GE1/0/2 10GE1/0/2 10GE1/0/3


SwitchA VLANIF20 VLANIF20 SwitchB VLANIF40
[Link]/24 [Link]/24 [Link]/24

10GE1/0/1 10GE1/0/1
VLANIF10 VLANIF30
[Link]/24 [Link]/24

10GE1/0/1 10GE1/0/2
VLANIF10 VLANIF30
[Link]/24 [Link]/24

SwitchC

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure IP addresses for interfaces and enable IS-IS on each device to ensure
reachable routes between the devices.
2. Set the IS-IS interface cost to control route selection of the devices to make the link that
passes through the switch from SwitchA to SwitchB as the primary link and the link that
passes through SwitchC as the backup link.
3. Configure dynamic BFD for IS-IS on SwitchA, SwitchB, and SwitchC so that link faults
can be detected rapidly and traffic can be switched to the backup link for forwarding.

Procedure
Step 1 Configure VLANs that each interface belongs to.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan batch 10 20
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10GE 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 20
[*SwitchA-10GE1/0/2] commit
[~SwitchA-10GE1/0/2] quit

The configurations of SwitchB, SwitchC, and SwitchD are similar to the configuration of
SwitchA, and are not mentioned here.
Step 2 Assign the IP addresses for VLANIF interfaces.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ip address [Link] 24
[*SwitchA-Vlanif10] quit
[*SwitchA] interface vlanif 20

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 556


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

[*SwitchA-Vlanif20] ip address [Link] 24


[*SwitchA-Vlanif20] quit
[*SwitchA-Vlanif20] commit

The configurations of SwitchB, SwitchC, and SwitchD are similar to the configuration of
SwitchA, and are not mentioned here.
Step 3 Configure basic IS-IS functions.
# Configure SwitchA.
[~SwitchA] isis
[*SwitchA-isis-1] is-level level-2
[*SwitchA-isis-1] network-entity 10.0000.0000.0001.00
[*SwitchA-isis-1] quit
[*SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] isis enable 1
[*SwitchA-Vlanif10] quit
[*SwitchA] interface vlanif 20
[*SwitchA-Vlanif20] isis enable 1
[*SwitchA-Vlanif20] commit
[~SwitchA-Vlanif20] quit

# Configure SwitchB.
[~SwitchB] isis
[*SwitchB-isis-1] is-level level-2
[*SwitchB-isis-1] network-entity 10.0000.0000.0002.00
[*SwitchB-isis-1] quit
[*SwitchB] interface vlanif 30
[*SwitchB-Vlanif30] isis enable 1
[*SwitchB-Vlanif30] quit
[*SwitchB] interface vlanif 20
[*SwitchB-Vlanif20] isis enable 1
[*SwitchB-Vlanif20] quit
[*SwitchB] interface vlanif 40
[*SwitchB-Vlanif40] isis enable 1
[*SwitchB-Vlanif40] commit
[~SwitchB-Vlanif40] quit

# Configure SwitchC.
[~SwitchC] isis
[*SwitchC-isis-1] is-level level-2
[*SwitchC-isis-1] network-entity 10.0000.0000.0003.00
[*SwitchC-isis-1] quit
[*SwitchC] interface vlanif 10
[*SwitchC-Vlanif10] isis enable 1
[*SwitchC-Vlanif10] quit
[*SwitchC] interface vlanif 30
[*SwitchC-Vlanif30] isis enable 1
[*SwitchC-Vlanif30] commit
[~SwitchC-Vlanif30] quit

# switchs learn routes from each other. The following uses the routing table of SwitchA as an
example.
[~SwitchA] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table: _public_
Destinations : 8 Routes : 9
Destination/Mask Proto Pre Cost Flags NextHop Interface
[Link]/24 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/24 ISIS 15 20 D [Link] Vlanif10
[Link]/24 Direct 0 0 D [Link] Vlanif10

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 557


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

[Link]/32 Direct 0 0 D [Link] InLoopBack0


[Link]/8 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/24 ISIS 15 20 D [Link] Vlanif20

As shown in the routing table, the next-hop address of the route to [Link]/24 is [Link],
and traffic is transmitted on the primary link SwitchA→SwitchB.
Step 4 Set the interface cost.
# Configure SwitchA.
[~SwitchA] interface vlanif 20
[~SwitchA-Vlanif20] isis cost 5
[*SwitchA-Vlanif20] commit
[~SwitchA-Vlanif20] quit

# Configure SwitchB.
[~SwitchB] interface vlanif 20
[~SwitchB-Vlanif20] isis cost 5
[*SwitchB-Vlanif20] commit
[~SwitchB-Vlanif20] quit

Step 5 Configure BFD for IS-IS processes.


# Enable BFD for IS-IS on SwitchA.
[~SwitchA] bfd
[*SwitchA-bfd] quit
[*SwitchA] isis
[*SwitchA-isis-1] bfd all-interfaces enable
[*SwitchA-isis-1] commit
[~SwitchA-isis-1] quit

# Enable BFD for IS-IS on SwitchB.


[~SwitchB] bfd
[*SwitchB-bfd] quit
[*SwitchB] isis
[*SwitchB-isis-1] bfd all-interfaces enable
[*SwitchB-isis-1] commit
[~SwitchB-isis-1] quit

# Enable BFD for IS-IS on SwitchC.


[~SwitchC] bfd
[*SwitchC-bfd] quit
[*SwitchC] isis
[*SwitchC-isis-1] bfd all-interfaces enable
[*SwitchC-isis-1] commit
[~SwitchC-isis-1] quit

# After the preceding configurations, run the display isis bfd session all command on
SwitchA, SwitchB, and SwitchC. You can see that the BFD session status is Up.
The following uses the display on SwitchA as an example.
[~SwitchA] display isis bfd session all
BFD session information for ISIS(1)
-----------------------------------
Peer System ID : 0000.0000.0002 Interface : Vlanif20
TX : 1000 BFD State : up Peer IP Address : [Link]
RX : 1000 LocDis : 16385 Local IP Address: [Link]
Multiplier : 3 RemDis : 16388 Type : L2
Diag : No diagnostic information

Peer System ID : 0000.0000.0003 Interface : Vlanif10


TX : 1000 BFD State : up Peer IP Address : [Link]

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 558


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

RX : 1000 LocDis : 16386 Local IP Address: [Link]


Multiplier : 3 RemDis : 16387 Type : L2
Diag : No diagnostic information

Total BFD session(s): 2

As shown in the preceding display, the status of the BFD session between SwitchA and
SwitchB and that between SwitchA and SwitchC is Up.
Step 6 Configure BFD for IS-IS interfaces.
# Configure BFD on VLANIF 20 of SwitchA, set the minimum interval for sending packets
to 100 ms, the minimum interval for receiving packets to 100 ms, and the local detection
multiplier to 4.
[~SwitchA] interface vlanif 20
[~SwitchA-Vlanif20] isis bfd enable
[*SwitchA-Vlanif20] isis bfd min-tx-interval 100 min-rx-interval 100 detect-
multiplier 4
[*SwitchA-Vlanif20] commit
[~SwitchA-Vlanif20] quit

# Configure BFD on VLANIF 20 of SwitchB, set the minimum interval for sending packets to
100 ms, the minimum interval for receiving packets to 100 ms, and the local detection
multiplier to 4.
[~SwitchB] interface vlanif 20
[~SwitchB-Vlanif20] isis bfd enable
[*SwitchB-Vlanif20] isis bfd min-tx-interval 100 min-rx-interval 100 detect-
multiplier 4
[*SwitchB-Vlanif20] commit
[~SwitchB-Vlanif20] quit

# After the preceding configurations, run the display isis bfd session all command on
SwitchA or SwitchB. You can see that the BFD parameters have taken effect. The following
uses the display on SwitchB as an example.
[~SwitchB] display isis bfd session all
BFD session information for ISIS(1)
-----------------------------------
Peer System ID : 0000.0000.0001 Interface : Vlanif20
TX : 100 BFD State : up Peer IP Address : [Link]
RX : 100 LocDis : 16385 Local IP Address: [Link]
Multiplier : 4 RemDis : 16385 Type : L2
Diag : No diagnostic information

Peer System ID : 0000.0000.0003 Interface : Vlanif30


TX : 10 BFD State : up Peer IP Address : [Link]
RX : 10 LocDis : 16385 Local IP Address: [Link]
Multiplier : 4 RemDis : 16385 Type : L2
Diag : No diagnostic information

Total BFD session(s): 2

Step 7 # Run the shutdown command on 10GE1/0/2 of SwitchB to simulate a primary link failure.
[~SwitchB] interface 10ge 1/0/2
[~SwitchB-10GE1/0/2] shutdown
[*SwitchB-10GE1/0/2] commit

Step 8 Verify the configuration.


# View the routing table of SwitchA.
[~SwitchA] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 559


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

------------------------------------------------------------------------------
Routing Table : _public_
Destinations : 9 Routes : 9

Destination/Mask Proto Pre Cost Flags NextHop Interface

[Link]/24 Direct 0 0 D [Link] Vlanif10


[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/24 ISIS 15 20 D [Link] Vlanif10
[Link]/8 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/24 ISIS 15 30 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] InLoopBack0

As shown in the routing table, the backup link SwitchA→SwitchC→SwitchB takes effect
after the primary link fails, and the next-hop address of the route to [Link]/24 becomes
[Link].

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
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 [Link] [Link]
isis enable 1
#
interface Vlanif20
ip address [Link] [Link]
isis enable 1
isis cost 5
isis bfd enable
isis bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 20 30 40
#
bfd
#
isis 1

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 560


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

is-level level-2
bfd all-interfaces enable
network-entity 10.0000.0000.0002.00
#
interface Vlanif20
ip address [Link] [Link]
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 [Link] [Link]
isis enable 1
#
interface Vlanif40
ip address [Link] [Link]
isis enable 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 40
#
return

l Configuration file of SwitchC


#
sysname SwitchC
#
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 [Link] [Link]
isis enable 1
#
interface Vlanif30
ip address [Link] [Link]
isis enable 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
return

7.19 Troubleshooting IS-IS

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 561


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

7.19.1 Failed to Establish IS-IS Neighbor Relationships

Fault Symptom
IS-IS neighbor relationship fails to be established when the link is working properly.

Procedure
Step 1 Check whether devices on both ends of the link have the matching IS-IS levels.
l Run the display current-configuration configuration isis | include is-level command
to check the level configurations of IS-IS processes on both ends.
l Run the display current-configuration interface interface-type interface-number |
include isis circuit-level command to check the IS-IS level configuration of the
specified interface.

IS-IS neighbor relationship can be established when IS-IS interfaces on both ends of the link
have the matching IS-IS levels.

NOTE

If you cannot view the IS-IS level of an interface using the display current-configuration interface
interface-type interface-number | include isis circuit-level command, the interface uses the default IS-IS
level. To view the default IS-IS level, run the display default-parameter isis command to check the
Circuit-Level field.
Requirements on the IS-IS levels of interfaces on both ends of a link are as follows:
l If the IS-IS level of the local interface is Level-1, the IS-IS level of the remote interface must be
Level-1 or Level-1-2.
l If the IS-IS level of the local interface is Level-2, the IS-IS level of the remote interface must be
Level-2 or Level-1-2.
l If the IS-IS level of the local interface is Level-1-2, the IS-IS level of the remote interface can be
Level-1, Level-2, or Level-1-2.

If the IS-IS levels of interfaces on both ends of a link do not match, perform either of the
following operations to change the IS-IS level:
l Run the is-level command in the IS-IS view to change the global IS-IS level.
l Run the isis circuit-level command in the interface view to change the interface IS-IS
level.

Step 2 Check whether devices on both ends of the link have the matching area addresses.

Run the display current-configuration configuration isis command to check area address
information.

NOTE

If IS-IS Level-1 neighbor relationship needs to be established between devices on both ends, ensure that
the two devices reside in the same area.
A maximum of three area addresses can be configured for an IS-IS process. Devices on both ends can
establish IS-IS Level-1 neighbor relationship when the two devices have a same area address.
When IS-IS Level-2 neighbor relationship needs to established between the two devices, the two devices
can have the same or different area addresses.

If the area addresses of the two devices are different, run the network-entity command in the
IS-IS view to set the same area address for the two devices.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 562


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

Step 3 Check whether devices on both ends of the link have the authentication mode.
Run the display current-configuration interface interface-type interface-number | include
isis authentication-mode command to check the IS-IS authentication modes of the interfaces
on both ends of the link.
If the two interfaces use different authentication modes, run the isis authentication-mode
command in the view of one interface to ensure that this interface has the same authentication
mode and password as the other interface.
Step 4 Run commit
The configuration is committed.

----End

7.19.2 A Device Cannot Learn IS-IS Routes from Its Neighbor

Fault Symptom
A device cannot learn IS-IS routes from its neighbor when its link is working properly.

Procedure
Step 1 Check whether IS-IS neighbor relationship has been established between the device and its
neighbor.
Run the display isis peer command on each device on the link to check whether IS-IS
neighbor relationship has been established.
If IS-IS neighbor relationship is not established, rectify the fault according to 7.19.1 Failed to
Establish IS-IS Neighbor Relationships.
Step 2 Check whether the IS-IS routing table of the device is correct.
Run the display isis route command on the device to check the IS-IS routing table.
1. If the IS-IS routing table contains specified routes, run the display ip routing-table ip-
address [ mask | mask-length ] verbose command to check whether the IP routing table
contains routes with higher protocol preference than IS-IS routes.
NOTE

If the State field of a route displays Active Adv, the route is active. If there are routes that have
the same prefix but are discovered by different routing protocols, routes with higher protocol
preference are preferred as active routes.
2. If the IP routing table contains routes with higher protocol preference than IS-IS routes,
modify the configuration based on network planning.
Step 3 Check whether the device and its neighbor have the matching IS-IS cost style.
Run the display current-configuration configuration isis command on the device and its
neighbor to check the IS-IS cost style.
The device can learn IS-IS routes from its neighbor when it has the same IS-IS cost style as its
neighbor.
The IS-IS cost style of a device can be set as follows:
l narrow: indicates that the device can receive and send packets with cost style narrow.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 563


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 7 IPv4 IS-IS Configuration

l narrow-compatible: indicates that the device can receive packets with cost style narrow
or wide but sends only packets with cost style narrow.
l compatible: indicates that the device can receive and send packets with cost style narrow
or wide.
l wide-compatible: indicates that the device can receive packets with cost style narrow or
wide but sends only packets with cost style wide.
l wide: indicates that the device can receive and send packets with cost style wide.
If the IS-IS cost styles of both ends are set to narrow and wide (or wide-compatible)
respectively, the two ends cannot communicate.
If the IS-IS cost styles of both ends are set to narrow-compatible and wide respectively, the
two ends cannot communicate either.
If the device and its neighbor have mismatching IS-IS cost styles, run the cost-style command
on the device to modify the configuration.
Step 4 Run commit
The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 564


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

8 IPv6 IS-IS Configuration

About This Chapter

You can build an IPv6 IS-IS network to allow IS-IS to discover and calculate routes in an
autonomous system (AS). IS-IS applies to large and medium networks.

8.1 Overview of IS-IS


8.2 Understanding IPv6 IS-IS
8.3 Summary of IPv6 IS-IS Configuration Tasks
8.4 Licensing Requirements and Limitations for IPv6 IS-IS
8.5 Default Settings for IPv6 IS-IS
8.6 Configuring Basic IPv6 IS-IS Functions
8.7 Improving IPv6 IS-IS Network Security
8.8 Controlling IPv6 IS-IS Route Selection
8.9 Controlling IPv6 IS-IS Route Exchange
8.10 Configuring IPv6 IS-IS Route Summarization
8.11 Controlling IPv6 IS-IS Route Convergence
8.12 Configuring LSP Fragment Extension
8.13 Configuring a Mesh Group on an NBMA Network
8.14 Configuring the Overload Bit for an IS-IS Device
8.15 Configuring Dynamic IPv6 BFD for IS-IS
8.16 Configuring IPv6 IS-IS Auto FRR
8.17 Maintaining IS-IS
8.18 Configuration Examples for IPv6 IS-IS

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 565


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

8.1 Overview of IS-IS

Definition
Intermediate System-to-Intermediate System (IS-IS) is an Interior Gateway Protocol (IGP)
that runs within an autonomous system (AS). IS-IS is also a link-state routing protocol, using
the shortest path first (SPF) algorithm to calculate routes.

Purpose
IS-IS is a dynamic routing protocol initially designed by the International Organization for
Standardization (ISO) for its Connectionless Network Protocol (CLNP).

To support IP routing, the Internet Engineering Task Force (IETF) extended and modified IS-
IS in RFC 1195. This modification enables IS-IS to apply to TCP/IP and OSI environments.
This type of IS-IS is called Integrated IS-IS or Dual IS-IS.

NOTE
IS-IS stated in this document refers to Integrated IS-IS, unless otherwise stated.

In addition to IPv4 networks, IS-IS also applies to IPv6 networks to provide accurate routing
information for IPv6 packets. IS-IS has good scalability, supports IPv6 network layer
protocols, and is capable of discovering, generating, and forwarding IPv6 routes.

8.2 Understanding IPv6 IS-IS

8.2.1 Comparison Between IS-IS IPv6 and IPv4 IS-IS


IS-IS is a link-state dynamic routing protocol initially designed by the OSI. To support IPv4
routing, IS-IS is applied to IPv4 networks and called as Integrated IS-IS.

As IPv6 networks are built, IS-IS also needs to provide accurate routing information for IPv6
packet forwarding. IS-IS has good scalability, supports IPv6 network layer protocols, and is
capable of discovering, generating, and forwarding IPv6 routes.

Extended IS-IS for IPv6 is defined in the draft-ietf-isis-ipv6-05 of the IETF. To process and
calculate IPv6 routes, IS-IS uses two new TLVs and one network layer protocol identifier
(NLPID).

The two TLVs are as follows:

l TLV 236 (IPv6 Reachability): describes network reachability by defining the route prefix
and metric.
l TLV 232 (IPv6 Interface Address): is similar to the IP Interface Address TLV of IPv4,
except that it changes a 32-bit IPv4 address to a 128-bit IPv6 address.

The NLPID is an 8-bit field that identifies the protocol packets of the network layer. The
NLPID of IPv6 is 142 (0x8E). If IS-IS supports IPv6, it advertises routing information
through the NLPID value.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 566


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

8.3 Summary of IPv6 IS-IS Configuration Tasks


After basic IPv6 IS-IS functions are configured, you can build a Layer 3 network using the
IPv6 IS-IS protocol. If other IPv6 IS-IS functions are required, configure them according to
reference sections.

NOTE

IPv6 IS-IS is a basic feature of CE8800, CE7800, CE6800, and CE5800 series switches and is not under
license control.

Table 8-1 describes the IS-IS configuration tasks.

Table 8-1 IS-IS configuration tasks

Scenario Description Task

Configuring basic IPv6 IS- To deploy the IS-IS protocol 8.6 Configuring Basic IPv6
IS functions on IPv6 networks, configure IS-IS Functions
basic IS-IS functions to
enable communication
between different nodes on
the network. Other IS-IS
features can only be
configured after the basic
functions are configured.

Configuring IPv6 IS-IS On IS-IS networks, 8.7 Improving IPv6 IS-IS


network security unauthorized users can Network Security
attack the IS-IS network by
modifying data packets or
forging authorized users. To
ensure security of services
carried on IS-IS networks,
configure the area or domain
authentication and interface
authentication.

Configuring IPv6 IS-IS If multiple redundant links 8.8 Controlling IPv6 IS-IS
route selection are available in the network Route Selection
using the IS-IS protocol, the
route in the IS-IS routing
table may not be the
expected optimal route. This
does not meet the network
planning and traffic
management requirements.
To optimize the IS-IS
network and facilitate traffic
management, more accurate
control of the routes on the
network is required.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 567


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

Scenario Description Task

Configuring IPv6 IS-IS In practical applications, to 8.9 Controlling IPv6 IS-IS


routing information meet network requirements, Route Exchange
exchange configure route policies to
accurately control
advertising and receiving of
IS-IS routing information.

Configuring IPv6 IS-IS Route aggregation allows 8.10 Configuring IPv6 IS-
route aggregation multiple routes with the IS Route Summarization
same IP prefix to be
aggregated into one route.
Route aggregation on a large
IS-IS network can
effectively reduce entries in
the routing table. This
minimizes system resource
consumption and facilitates
management. In addition, if
a link in the aggregated IP
address segment frequently
alternates between Up and
Down, devices outside this
segment will not be affected
by the change. This prevents
route flapping and improves
network stability.

Configuring IPv6 IS-IS To enable IS-IS to rapidly 8.11 Controlling IPv6 IS-
route convergence detect the network changes, IS Route Convergence
speed up the IS-IS network
convergence. To minimize
the effect on networks from
route flapping and reduce
load on the device, slow
down the IS-IS network
convergence.

Configuring LSP fragment When information contained 8.12 Configuring LSP


extension in the LSP data packet Fragment Extension
Protocol Data Unit (PDU) to
be advertised by IS-IS
increases greatly, the IS-IS
device will generate
multiple LSP fragments to
carry and advertise more
information.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 568


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

Scenario Description Task

Configuring mesh groups On the NBMA network, 8.13 Configuring a Mesh


when an interface of the Group on an NBMA
switch receives a new LSP, Network
the LSP is flooded to other
interfaces of the switch. On
highly-connected networks
that have multiple P2P links,
this processing method
results in repeated LSP
flooding and wastes
bandwidth resources.
To solve this problem, create
a mesh group and add some
interfaces to the group. The
switch never floods the
LSPs received at interfaces
in the mesh group to other
interfaces from the same
group, and only floods the
LSPs to interfaces from
other groups or interfaces
that are not configured to
any mesh groups.

Configuring BFD for IPv6 To ensure rapid recovery 8.15 Configuring Dynamic
IS-IS from failures on networks IPv6 BFD for IS-IS
using the IS-IS protocol,
adopt the solution of fast
fault detection and standby
link switchover. However,
the IS-IS fault detection
mechanism and link
switchover require a long
period of time, which fails
to meet the requirements of
services that are highly
sensitive to packet loss and
packet delay. To ensure that
users of delay-sensitive
services such as voice
service do not detect the
service interruption,
associate IS-IS with BFD to
implement fast fault
detection.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 569


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

Scenario Description Task

Configuring IPv6 IS-IS auto With the development of 8.16 Configuring IPv6 IS-
FRR networks, Voice over IP IS Auto FRR
(VoIP) and online video
services require high-quality
real-time transmission.
Nevertheless, if an IS-IS
fault occurs, multiple
processes including fault
detection, LSP update, LSP
flooding, route calculation,
and FIB entry delivery must
be performed to switch
traffic to a new link. As a
result, the traffic
interruption time is much
longer than 50 ms, which
cannot meet the requirement
for real-time services.
IS-IS auto FRR can rapidly
switch traffic to the standby
link, avoiding traffic
interruption. This protects
the traffic and improves
reliability of the IS-IS
network. As a result, IS-IS
auto FRR is applicable to
services that are highly
sensitive to packet delay and
packet loss.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 570


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

Scenario Description Task

Configuring IPv6 IS-IS If the system cannot store 8.14 Configuring the
overload new LSPs or synchronize Overload Bit for an IS-IS
the LSDB normally, the Device
calculated routing
information will be
incorrect. In this case, the
system can enter the
overload state. Routes
reached through the device
will not be calculated, but
routes directly connected to
the device will not be
ignored.
When an IS-IS device on the
network requires upgrade or
maintenance, the device
needs to be temporarily
isolated from the network.
To prevent other devices
from forwarding traffic
through this node, set the
overload bit for the device
in question.

8.4 Licensing Requirements and Limitations for IPv6 IS-IS


Involved Network Elements
Other network elements also need to support IPv6 IS-IS.

Licensing Requirements
IPv6 IS-IS is a basic feature of CE8800, CE7800, CE6800, and CE5800 series switches and is
not under license control.

Version Requirements

Table 8-2 Products and minimum version supporting IPv6 IS-IS


Product Minimum Version Required

CE8868EI V200R005C10

CE8861EI V200R005C10

CE8860EI V100R006C00

CE8850-32CQ-EI V200R002C50

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 571


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

Product Minimum Version Required

CE8850-64CQ-EI V200R005C00

CE7850EI V100R003C00

CE7855EI V200R001C00

CE6810EI V100R003C00

CE6850EI V100R001C00

CE6850-48S6Q-HI V100R005C00

CE6850-48T6Q-HI/CE6850U-HI/ V100R005C10
CE6851HI

CE6855HI V200R001C00

CE6856HI V200R002C50

CE6857EI V200R005C10

CE6860EI V200R002C50

CE6865EI V200R005C00

CE6870-24S6CQ-EI/ V200R001C00
CE6870-48S6CQ-EI

CE6870-48T6CQ-EI V200R002C50

CE6875EI V200R003C00

CE6880EI V200R002C50

CE5880EI V200R005C10

CE5810EI V100R002C00

CE5850EI V100R001C00

CE5850HI V100R003C00

CE5855EI V200R002C50

Feature Limitations
In versions earlier than V200R002C50, the CE5855EI does not support IPv6. However,
interfaces on a CE5855EI provide the IPv6 capability when the switch functions as a leaf
switch in a super virtual fabric (SVF) system and the SVF forwarding mode is set to
centralized or hybrid. In V200R002C50 and later versions, the CE5855EI supports IPv6.

8.5 Default Settings for IPv6 IS-IS


Table 8-3 describes the default settings for IPv6 IS-IS.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 572


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

Table 8-3 Default settings for IPv6 IS-IS


Parameter Default Setting

IS-IS Disabled

DIS priority 64

Device level Level-1-2

Interval for sending Hello packets 10s

Minimum interval for sending LSPs 50 ms

Maximum number of LSPs to be sent 10

Interval for updating LSPs 900s

Maximum lifetime of LSPs 1200s

Bandwidth reference value 100 Mbit/s

8.6 Configuring Basic IPv6 IS-IS Functions

Pre-configuration Tasks
Before configuring basic IPv6 IS-IS functions, complete the following tasks:
l Configuring IPv6 addresses for interfaces to ensure that neighboring nodes are reachable
at the network layer

Configuration Procedure
Creating an IS-IS process is the prerequisite for configuring a network entity title (NET),
configuring the device level, and establishing an IS-IS neighbor relationship.

8.6.1 Creating IS-IS Processes


Context
Creating IS-IS processes is the prerequisite for performing the IS-IS configuration.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run isis [ process-id ] [ vpn-instance vpn-instance-name ]
An IS-IS process is created, and the IS-IS view is displayed.
If a VPN instance is specified, the IS-IS process belongs to the specified VPN instance.
Otherwise, the IS-IS process belongs to the public network instances.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 573


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

Step 3 (Optional) Run description description

Description for the IS-IS process is configured.

Step 4 Run commit

The configuration is committed.

----End

8.6.2 Configuring a NET and Enabling IPv6 IS-IS

Context
NET is the special form of the network service access point (NSAP). After the IS-IS view is
displayed, IS-IS can start only when a NET is configured for an IS-IS process.

Generally, you only need to configure one NET for an IS-IS process. When an area needs to
be redefined, for example, the area needs to be merged with other areas or divided into sub-
areas, configure multiple NETs to ensure route correctness. A maximum of three area
addresses can be configured for an IS-IS process. Therefore, a maximum of three NETs can
be configured for an IS-IS process. When configuring multiple NETs, ensure that their system
IDs are the same.

IS-IS can run on an IPv6 topology only when IPv6 is enabled on an IS-IS process.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run isis [ process-id ]

The IS-IS process view is displayed.

Step 3 Run network-entity net

A NET is configured.

NOTE

Configuring loopback interface addresses based on NETs is recommended to ensures that a NET is
unique on the network. If NETs are not unique, route flapping will easily occur.
An area ID is used to uniquely identify an area in the same IS-IS domain. All routers in the same
Level-1 area must share the same area ID, while routers in the same Level-2 area can have different area
IDs.

Step 4 Run ipv6 enable

IPv6 is enabled for the IS-IS process.

Step 5 Run commit

The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 574


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

8.6.3 Configuring the Device Level

Context
Configure the device level according to network planning requirements:
l When the level of a device is Level-1, the device establishes neighbor relationships with
only Level-1 and Level-1-2 routers in the same area and maintains only Level-1 LSDBs.
l When the level of a device is Level-2, the device can establish neighbor relationship with
Level-2 routers in the same area or different areas and with Level-1-2 routers in different
areas and maintain only Level-2 LSDB.
l When the level of a device is Level-1-2, the device can establish neighbor relationships
with Level-1 and Level-2 routers and maintain Level-1 and Level-2 LSDBs.

If the levels of IS-IS devices are changed during network operation, the IS-IS process will be
restarted and IS-IS neighbor relationships will be disconnected. Setting the levels of devices
when configuring IS-IS is recommended.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run isis [ process-id ]

The IS-IS process view is displayed.

Step 3 Run is-level { level-1 | level-1-2 | level-2 }

The level of the switch is configured.

By default, the level of the switch is Level-1-2.

Step 4 Run commit

The configuration is committed.

----End

8.6.4 Establishing IS-IS Neighbor Relationships

Context
The methods to establish IS-IS neighbor relationships on a broadcast network and a P2P
network are different. Therefore, you need to set different IS-IS attributes for interfaces of
different types:
l On a broadcast network, IS-IS needs to select the designated intermediate system (DIS).
You can set the DIS priority for IS-IS interfaces to enable the device with the highest
DIS priority to be elected as the DIS.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 575


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

l On a P2P network, IS-IS does not need to select the DIS. Therefore, the DIS priority
does not need to be configured for interfaces. To ensure P2P link reliability, configure
IS-IS to establish neighbor relationships on P2P interfaces in 3-way mode for
unidirectional link fault detection.
Generally, IS-IS checks the IP addresses of received Hello packets. Neighbor
relationships can be established only when the IP address carried in a received Hello
packet and the address of the interface that receives the Hello packet are on the same
network segment. If the IP addresses of the two P2P interfaces are on different network
segments, and the isis peer-ip-ignore command is run on the two interfaces, IS-IS does
not check the peer IP address. The neighbor relationship can be correctly established on
the two P2P interfaces.

Procedure
l Establish an IS-IS neighbor relationship on a broadcast link.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute
configurations (for example, shutdown and description configurations).
Alternatively, if configuration information supported by both Layer 2 and Layer 3
interfaces exists (for example, mode lacp and lacp system-id configurations), no
configuration that is not supported after the working mode of the interface is
switched can exist. If unsupported configurations exist on the interface, delete the
configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch
batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in
the system view to switch these interfaces to Layer 3 mode in batches.
d. Run ipv6 enable
IPv6 is enabled on the interface.
e. Run isis ipv6 enable [ process-id ]
IPv6 is enabled on the interface.
After this command is run, IS-IS establishes neighbor relationships and floods LSPs
through this interface.
NOTE

Loopback interfaces are not used to establish neighbor relationships. If IS-IS is enabled on a
loopback interface, IS-IS advertises the routes of the network segment where the interface
resides through other IS-IS interfaces.
f. Run isis circuit-level [ level-1 | level-1-2 | level-2 ]
The level of the interface is configured.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 576


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

By default, the level of an interface is Level-1-2.


When two Level-1-2 devices establish IS-IS neighbor relationship, they establish
both Level-1 and Level-2 neighbor relationships. To allow the two Level-1-2
devices to establish only Level-1 or Level-2 neighbor relationship, change the level
of interfaces.

NOTE

Changing the level of an IS-IS interface is valid only when the level of the IS-IS device is
Level-1-2. If the level of the device is not Level-1-2, the level of the device determines the
level of the established neighbor relationship.
g. (Optional) Run isis dis-priority priority [ level-1 | level-2 ]
The DIS priority is set for the interface. A larger value indicates a higher priority.
By default, the DIS priority of Level-1 and Level-2 broadcast interfaces is 64.
h. (Optional) Run isis silent
The interface is suppressed.
By default, an IS-IS interface is not suppressed.
When an IS-IS interface is suppressed, the interface no longer sends or receives IS-
IS packets. The routes of the network segment where the interface resides, however,
can still be advertised to other IS-IS devices within the same AS.
i. Run commit
The configuration is committed.
l Establish an IS-IS neighbor relationship on a P2P link.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute
configurations (for example, shutdown and description configurations).
Alternatively, if configuration information supported by both Layer 2 and Layer 3
interfaces exists (for example, mode lacp and lacp system-id configurations), no
configuration that is not supported after the working mode of the interface is
switched can exist. If unsupported configurations exist on the interface, delete the
configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch
batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in
the system view to switch these interfaces to Layer 3 mode in batches.
d. Run ipv6 enable
IPv6 is enabled on the interface.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 577


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

e. Run isis ipv6 enable [ process-id ]

IPv6 IS-IS is enabled on the interface.


f. Run isis circuit-level [ level-1 | level-1-2 | level-2 ]

The level of the interface is configured.

By default, the level of an interface is Level-1-2.


g. Run isis circuit-type p2p

The network type of the interface is set to P2P.

By default, the network type of an interface is determined by the physical type of


the interface.

When the network type of an IS-IS interface changes, the interface configuration
changes accordingly:
n After a broadcast interface is simulated as a P2P interface using the isis
circuit-type p2p command, the interval for sending Hello packets, number of
Hello packets that IS-IS does not receive from a neighbor before the neighbor
is declared Down, interval for retransmitting LSPs on a P2P link, and various
IS-IS authentication modes are restored to the default settings; other
configurations such as the DIS priority, DIS name, and interval for sending
CSNPs on a broadcast network become invalid.
n After the undo isis circuit-type command is run to restore the default network
type of an IS-IS interface, the interval for sending Hello packets, number of
Hello packets that IS-IS does not receive from a neighbor before the neighbor
is declared Down, interval for retransmitting LSPs on a P2P link, various IS-IS
authentication modes, DIS priority, and interval for sending CSNPs on a
broadcast network are restored to the default settings.
h. Run isis ppp-negotiation { 2-way | 3-way [ only ] }

The negotiation mode is specified for the interface.

By default, the negotiation mode is 3-way.


i. Run isis peer-ip-ignore

IS-IS is configured not to check the IP addresses of received Hello packets.

By default, IS-IS checks the IP addresses of received Hello packets.


j. Run isis ppp-osicp-check

OSICP negotiation status check is configured on the interface.

By default, the OSICP negotiation status of a PPP interface does not affect the
status of an IS-IS interface.

NOTE

This command applies only to PPP interfaces and is invalid for other P2P interfaces.
After this command is run, the OSICP negotiation status of a PPP interface affects the status
of an IS-IS interface. When PPP detects that the OSI network fails, the link status of the IS-
IS interface goes Down and the routes of the network segment where the interface resides
are not advertised through LSPs.
k. Run commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 578


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

The configuration is committed.


----End

8.6.5 Verifying the Basic IPv6 IS-IS Function Configuration


Procedure
l Run the display isis peer [ verbose ] [ process-id | vpn-instance vpn-instance-name |
interface interface-type interface-number ] [ peer-system-id system-id ] command to
check information about IS-IS neighbors.
l Run the display isis interface [ verbose ] [ vpn-instance vpn-instance-name ] command
to check information about IS-IS interfaces.
l Run the display isis route [ process-id | vpn-instance vpn-instance-name ] ipv6
[ verbose | [ level-1 | level-2 ] | ipv6-address [ prefix-length ] ] * command to check
information about IS-IS routes.
----End

8.7 Improving IPv6 IS-IS Network Security

Pre-configuration Tasks
Before improving IS-IS network security, complete the following task:
l 8.6 Configuring Basic IPv6 IS-IS Functions

Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying the IPv6
IS-IS Network Security Optimization Configuration) in any sequence as required.

8.7.1 Configuring Interface Authentication


Context
Generally, the IS-IS packets to be sent are not encapsulated with authentication information,
and the received packets are not authenticated. If a user sends malicious packets to attack a
network, information on the entire network may be stolen. Therefore, you can configure IS-IS
authentication to improve the network security.
After the IS-IS interface authentication is configured, authentication information can be
encapsulated into the Hello packet to confirm the validity and correctness of neighbor
relationships.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 579


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

If plain is selected during the configuration of the authentication mode for the IS-IS interface,
the password is saved in the configuration file in plain text. This brings security risks. It is
recommended that you select cipher to save the password in cipher text.
Simple and MD5 authentication authentication have potential security risks. HMAC-SHA256
authentication mode is recommended.

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 On an Ethernet interface, run undo portswitch

The interface is switched to Layer 3 mode.

By default, an Ethernet interface works in Layer 2 mode.

The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run any of the following command to configure the authentication mode of the IS-IS
interface as required:
l Run isis authentication-mode simple { plain plain-text | [ cipher ] plain-cipher-text }
[ level-1 | level-2 ] [ ip | osi ] [ send-only ]
Simple authentication is configured for the IS-IS interface.
l Run isis authentication-mode md5 { plain plain-text | [ cipher ] plain-cipher-text }
[ level-1 | level-2 ] [ ip | osi ] [ send-only ]
MD5 authentication is configured for the IS-IS interface.
l Run isis authentication-mode keychain keychain-name [ level-1 | level-2 ] [ send-
only ]
Keychain authentication is configured for the IS-IS interface.

By default, an IS-IS interface does not authenticate received Hello packets and no
authentication password is configured on the interface.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 580


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

NOTE

Use the send-only parameter according to network requirements:


l If the send-only parameter is specified, the device only encapsulates the Hello packets to be sent
with authentication information rather than checks whether the received Hello packets pass the
authentication. When the Hello packets do not need to be authenticated on the local device and
pass the authentication on the remote device, the two devices can establish the neighbor
relationship.
l If the send-only parameter is not specified, ensure that passwords of all interfaces with the same
level on the same network are the same.
Parameters level-1 and level-2 apply only to the VLANIF interfaces on which IS-IS is enabled using the
isis ipv6 enable command.
NOTE

If keychain authentication is used, the encryption algorithm must be configured to HMAC-MD5 or


HMAC-SHA-256 algorithm.

Step 5 Run commit


The configuration is committed.

----End

8.7.2 Configuring Area or Domain Authentication


Context
Generally, the IS-IS packets to be sent are not encapsulated with authentication information,
and the received packets are not authenticated. If a user sends malicious packets to attack a
network, information on the entire network may be stolen. Therefore, you can configure IS-IS
authentication to improve the network security.
The area authentication password is encapsulated into Level-1 IS-IS packets. Only the packets
that pass the area authentication can be accepted. Therefore, you must configure IS-IS area
authentication on all the IS-IS devices in the specified Level-1 area to authenticate the
Level-1 area.
The domain authentication password is encapsulated into Level-2 IS-IS packets. Only the
packets that pass the domain authentication can be accepted. Therefore, you must configure
IS-IS domain authentication on all the IS-IS devices in the Level-2 area to authenticate
Level-2 area.

If plain is selected during the configuration of the area authentication mode or domain
authentication mode, the password is saved in the configuration file in plain text. This brings
security risks. It is recommended that you select cipher to save the password in cipher text.
Simple and MD5 authentication authentication have potential security risks. HMAC-SHA256
authentication mode is recommended.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 581


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

NOTE

When configuring IS-IS authentication, the area or domain authentication modes and passwords of the
routers in the same area must be consistent so that IS-IS packets can be flooded normally.
Whether IS-IS packets can pass area or domain authentication does not affect the establishment of
Level-1 or Level-2 neighbor relationships.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run isis [ process-id ]
The IS-IS process view is displayed.
Step 3 Perform the following operations at any sequence as required.
l Run area-authentication-mode { { simple | md5 } { plain plain-text | [ cipher ] plain-
cipher-text } [ ip | osi ] | keychain keychain-name } [ snp-packet { authentication-
avoid | send-only } | all-send-only ]
The area authentication mode is configured.
By default, the system neither encapsulates generated Level-1 packets with
authentication information nor authenticates received Level-1 packets.
l Run domain-authentication-mode { { simple | md5 } { plain plain-text | [ cipher ]
plain-cipher-text } [ ip | osi ] | keychain keychain-name } [ snp-packet
{ authentication-avoid | send-only } | all-send-only ]
The domain authentication mode is configured.
By default, the system neither encapsulates generated Level-2 packets with
authentication information nor authenticates received Level-2 packets.
NOTE

The authentication involves the following situations:


l The device encapsulates the authentication mode into LSPs and SNPs to be sent and checks whether
the received packets pass authentication. Then, the device discards the packets that do not pass the
authentication. In this case, the parameter snp-packet or all-send-only is not specified.
l The device encapsulates authentication information into LSPs to be sent and checks whether the
received LSPs pass the authentication; the device neither encapsulates the SNPs to be sent with
authentication information nor checks whether the received SNPs pass the authentication. In this
case, the parameter snp-packet authentication-avoid needs to be specified.
l The device encapsulates the LSPs and SNPs to be sent with authentication information; the device,
however, checks the authentication mode of only the received LSPs rather than the received SNPs.
In this case, the parameter snp-packet send-only needs to be specified.
l The device encapsulates the LSPs and SNPs to be sent with authentication information, but does not
check whether the received LSPs or SNPs pass the authentication. In this case, the parameter all-
send-only needs to be specified.
NOTE

If keychain authentication is used, the encryption algorithm must be configured to HMAC-MD5 or


HMAC-SHA-256 algorithm.

Step 4 Run commit


The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 582


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

8.7.3 Verifying the IPv6 IS-IS Network Security Optimization


Configuration

Procedure
l Run the display isis lsdb verbose command to check the detailed information in the IS-
IS LSDB.
----End

8.8 Controlling IPv6 IS-IS Route Selection

Pre-configuration Tasks
Before configuring IS-IS route selection, complete the following task:
l 8.6 Configuring Basic IPv6 IS-IS Functions

Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying the IPv6
IS-IS Route Selection Control Configuration) in any sequence as required.

8.8.1 Configuring a Preference Value for IPv6 IS-IS

Context
If multiple routes to the same destination are discovered by different routing protocols
running on the same device, the route discovered by the protocol with the highest preference
is selected.
To prefer an IPv6 route discovered by IS-IS, configure a higher preference value for IPv6 IS-
IS route. In addition, a routing policy can be configured to increase the preferences of
specified IPv6 IS-IS routes, without affecting route selection.

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 ipv6 preference { route-policy route-policy-name | preference }*


The IPv6 IS-IS route preference value is configured.
The default IPv6 IS-IS route preference value is 15. A smaller preference value indicates a
higher preference.
Step 4 Run commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 583


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

The configuration is committed.

----End

8.8.2 Configuring the Cost of an IS-IS Interface on IPv6 network


Context
The costs of IS-IS interfaces can be determined in the following modes in descending order
by priority:
l Interface cost: is configured for a specified interface.
l Global cost: is configured for all interfaces.
l Automatically calculated cost: is automatically calculated based on the interface
bandwidth.
If no cost is configured for an IS-IS interface, the IS-IS interface uses the default cost 10 and
cost style narrow.

If you want to change the cost style of IS-IS devices, running the command while configuring
basic IS-IS functions is recommended. If the cost style of IS-IS devices is changed during
network operation, the IS-IS process is restarted and the neighbor relationship is re-
established.

Procedure
Step 1 Configure the IS-IS cost style.
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 style is configured.
By default, the cost style of routes received and sent by an IS-IS device is narrow.
4. Run commit
The configuration is committed.
The cost range of an interface and a route received by the interface vary with the cost type.
l If the cost style is narrow, the cost of an interface ranges from 1 to 63. The maximum
cost of a route received by the interface is 1023.
l If the cost style 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.
l If the cost style is wide-compatible or wide, the cost of the interface ranges from 1 to
16777215. When the cost is 16777215, the neighbor TLV generated on the link cannot

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 584


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

be used for route calculation but for the transmission of TE information. The maximum
cost of a received route is 0xFFFFFFFF.
Step 2 Configure the cost of an IS-IS interface on IPv6 network.
Perform any of the following operations to configure the cost of an IS-IS interface on IPv6
network.
Configure the cost of a specified IS-IS interface on IPv6 network.
1. Run system-view
The system view is displayed.
2. Run interface interface-type interface-number
The interface view is displayed.
3. On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute
configurations (for example, shutdown and description configurations). Alternatively, if
configuration information supported by both Layer 2 and Layer 3 interfaces exists (for
example, mode lacp and lacp system-id configurations), no configuration that is not
supported after the working mode of the interface is switched can exist. If unsupported
configurations exist on the interface, delete the configurations first and then run the undo
portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system
view to switch these interfaces to Layer 3 mode in batches.
4. Run isis ipv6 cost cost [ level-1 | level-2 ]
The cost of the IS-IS interface on IPv6 network is configured.
By default, the cost of an IS-IS interface on IPv6 network is 10.
5. Run commit
The configuration is committed.
Configure the global IS-IS interface cost on IPv6 network.
1. Run system-view
The system view is displayed.
2. Run isis [ process-id ]
The IS-IS view is displayed.
3. Run ipv6 circuit-cost cost [ level-1 | level-2 ]
The global IS-IS interface cost on IPv6 network is configured.
By default, the configured cost is applicable to all Level-1 and Level-2 IPv6 interfaces.
The default cost is 10.

4. Run commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 585


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

The configuration is committed.


Enable IS-IS interface to automatically calculate the interface cost on IPv6 network.
1. Run system-view
The system view is displayed.
2. Run isis [ process-id ]
The IS-IS view is displayed.
3. Run ipv6 bandwidth-reference value
The reference value of the bandwidth is configured. By default, the bandwidth reference
value is 100 Mbit/s.
4. Run ipv6 auto-cost enable
The interface is configured to automatically calculate its cost on IPv6 network.
5. Run commit
The configuration is committed.
The bandwidth reference value set using the ipv6 bandwidth-reference command takes
effect only when the cost style is wide or wide-compatible. In this case, the interface cost is
calculated using the following formula:
Cost of each interface = (Bandwidth-reference/Interface bandwidth) × 10
If the cost-style is narrow, narrow-compatible, or compatible, the cost of each interface is
based on costs listed in Table 8-4.

Table 8-4 Mapping between IS-IS interface costs and interface bandwidth
Cost Bandwidth Range

60 Interface bandwidth ≤ 10 Mbit/s

50 10 Mbit/s < interface bandwidth ≤ 100 Mbit/s

40 100 Mbit/s < interface bandwidth ≤ 155 Mbit/s

30 155 Mbit/s < interface bandwidth ≤ 622 Mbit/s

20 622 Mbit/s < Interface bandwidth ≤ 2.5 Gbit/s

10 2.5 Gbit/s < Interface bandwidth

----End

8.8.3 Configuring Principles for Using Equal-Cost IPv6 IS-IS


Routes
Context
If there are redundant IS-IS links, multiple routes may have an equal cost.
Configure load balancing for equal-cost IS-IS routes so that traffic will be evenly balanced
among these links. This mechanism increases the link bandwidth usage and prevents network

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 586


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

congestion caused by link overload. However, this mechanism may make traffic management
more difficult because traffic will be randomly forwarded.

Procedure
l Configure equal-cost IS-IS routes to work in load-balancing mode.
a. Run system-view

The system view is displayed.


b. Run isis [ process-id ]

The IS-IS view is displayed.


c. Run ipv6 maximum load-balancing number

The maximum number of load-balancing equal-cost IPv6 IS-IS routes is set.

By default, load balancing is supported and a maximum of 32 equal-cost routes can


participate in load balancing.

NOTE

When the number of equal-cost routes is greater than number specified in the ipv6
maximum load-balancing command, valid routes are selected for load balancing based on
the following criteria:
1. Route preference: Routes with higher preferences are selected for load balancing.
2. Interface index: If routes have the same priorities, routes with higher interface index
values are selected for load balancing.
3. Next hop IP address: If routes have the same priorities and interface index values, routes
with larger IP address are selected for load balancing.
d. Run commit

The configuration is committed.

----End

8.8.4 Configuring IPv6 IS-IS Route Leaking

Context
If multiple Level-1-2 devices in a Level-1 area are connected to devices in the Level-2 area, a
Level-1 LSP sent by each Level-1-2 device carries an ATT flag bit of 1. This Level-1 area
will have multiple routes to the Level-2 area and to other Level-1 areas.

By default, routes in a Level-1 area can be leaked into the Level-2 area so that Level-1-2 and
Level-2 devices can learn about the topology of the entire network. Devices in a Level-1 area
are unaware of the entire network topology because they only maintain LSDBs in the local
Level-1 area. Therefore, a device in a Level-1 area can forward traffic to a Level-2 device
only through the nearest Level-1-2 device. The route used may not be the optimal route to the
destination.

To enable a device in a Level-1 area to select the optimal route, configure IPv6 IS-IS route
leaking so that specified routes in the Level-2 area can be leaked into the local Level-1 area.

Routes of services deployed only in the local Level-1 area do not need to be leaked into the
Level-2 area. A policy can be configured to leak only desired routes into the Level-2 area.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 587


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

Procedure
l Specify IPv6 IS-IS routes in the Level-2 area and other Level-1 areas that can be leaked
into the local Level-1 area.
a. Run system-view
The system view is displayed.
b. Run isis [ process-id ]
The IS-IS view is displayed.
c. Run ipv6 import-route isis level-2 into level-1 [ tag tag | filter-policy { acl6-
number | acl6-name acl6-name | ipv6-prefix ipv6-prefix-name | route-policy route-
policy-name } | direct { allow-filter-policy | allow-up-down-bit } * ] *
IPv6 IS-IS routes in the Level-2 area and other Level-1 areas that meet the specified
conditions are leaked into the local Level-1 area.
By default, IPv6 IS-IS routes in the Level-2 area are not leaked into Level-1 areas.

NOTE

The command is run on the Level-1-2 device that is connected to an external area.
d. Run commit
The configuration is committed.
l Configure IPv6 IS-IS routes in Level-1 areas to leak into the Level-2 area.
a. Run system-view
The system view is displayed.
b. Run isis [ process-id ]
The IS-IS view is displayed.
c. Run ipv6 import-route isis level-1 into level-2 [ tag tag | filter-policy { acl6-
number | acl6-name acl6-name | ipv6-prefix ipv6-prefix-name | route-policy route-
policy-name } | direct allow-filter-policy ] *
IPv6 IS-IS routes that meet the specifies conditions in Level-1 areas are leaked into
the Level-2 area.
By default, all Level-1 IPv6 IS-IS routing information, excluding information about
default routes, is leaked to Level-2 areas.

NOTE

The command is run on the Level-1-2 device that is connected to an external area.

----End

8.8.5 Verifying the IPv6 IS-IS Route Selection Control


Configuration
Procedure
l Run the display isis route [ process-id | vpn-instance vpn-instance-name ] ipv6
[ verbose | [ level-1 | level-2 ] | ipv6-address [ prefix-length ] ] * command to check IS-IS
routing information.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 588


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

l Run the display isis lsdb [ { level-1 | level-2 } | verbose | { local | lsp-id | is-name
symbolic-name } ] * [ process-id | vpn-instance vpn-instance-name ] command to check
information in the IS-IS LSDB.
----End

8.9 Controlling IPv6 IS-IS Route Exchange

Pre-configuration Tasks
Before controlling IS-IS route exchange, complete the following task:
l 8.6 Configuring Basic IPv6 IS-IS Functions

Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying the IPv6
IS-IS Route Exchange Control Configuration) in any sequence as required.

8.9.1 Configuring IS-IS to Advertise a Default Route

Context
If IS-IS is configured to advertise a default route on a border device that has external routes,
the device advertises a default route ::/0 in the IS-IS routing domain. All traffic destined for
other routing domains is first forwarded to the border device.
NOTE

Configuring a static default route can also allow all the traffic to be first forwarded to a border device,
which then forwards the traffic outside an IS-IS routing domain. However, this method leads to heavy
workload in configuration and management when a large number of devices are deployed on the
network.
In addition, advertising default routes using IS-IS is flexible. If multiple border devices are deployed, a
routing policy can be configured to allow only the border device that meets the specified conditions to
advertise a default route, preventing routing blackholes.

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 ipv6 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 advertise a default IPv6 route.
By default, IS-IS does not advertise a default route.
Step 4 Run commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 589


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

The configuration is committed.

----End

8.9.2 Configuring IS-IS to Import External Routes


Context
After IS-IS is configured to advertise a default route on a border device in an IS-IS routing
domain, all the traffic destined outside the IS-IS routing domain is forwarded through the
border device. This burdens the border device because other devices in the IS-IS routing
domain do not have the routes destined outside the domain. If multiple border devices are
deployed in the IS-IS routing domain, optimal routes to other routing domains need to be
selected.
To ensure optimal routes are selected, all the other devices in the IS-IS routing domain must
learn all or some external routes.

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 Configure IS-IS to import external routes.
l When you need to set the cost of imported routes, run the ipv6 import-route { static |
direct | { ospfv3 | ripng | isis } [ process-id ] | bgp [ permit-ibgp ] } [ cost cost | tag tag
| route-policy route-policy-name | [ level-1 | level-2 | level-1-2 ] ] * command to
configure IS-IS to import external IPv6 routes.
l When you need to retain the original cost of imported routes, run the ipv6 import-route
{ direct | { ospfv3 | ripng | isis } [ process-id ] | bgp [ permit-ibgp ] } inherit-cost [ tag
tag | route-policy route-policy-name | [ level-1 | level-2 | level-1-2 ] ] * command to
configure IS-IS to import external IPv6 routes. In this case, the source routing protocol
of imported routes cannot be static.
NOTE

IS-IS will advertise all imported external routes to the IS-IS routing domain by default.

Step 4 Run commit


The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 590


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

8.9.3 Configuring IS-IS to Advertise Specified External Routes to


an IS-IS Routing Domain
Context
When the local IS-IS device advertises imported external routes to other IS-IS devices,
routing policies can be configured to advertise only the external routes that meet specified
conditions if these devices do not require all the imported external routes.

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 ipv6 filter-policy { acl6-number | acl6-name acl6-name | ipv6-prefix ipv6-prefix-name |
route-policy route-policy-name } export [ protocol [ process-id ] ]
IS-IS is configured to advertise the external IPv6 routes that meet specified conditions to the
IS-IS routing domain.
Step 4 Run commit
The configuration is committed.

----End

8.9.4 Adding Specified IS-IS Routes to the IPv6 Routing Table


Context
Only routes in an IPv6 routing table can be used to forward IPv6 packets. An IS-IS route can
take effect only after this IS-IS route has been successfully added to an IPv6 routing table.
If an IS-IS route does not need to be added to a routing table, specify conditions, such as IPv6
prefix, and routing policy, to filter routes so that only IS-IS routes that meet the specified
conditions can added to an IPv6 routing table. IS-IS routes that do not meet the specified
conditions cannot be added to the IPv6 routing table and cannot be selected to forward IPv6
packets.

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 ipv6 filter-policy { acl6-number | acl6-name acl6-name | ipv6-prefix ipv6-prefix-name |
route-policy route-policy-name } import

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 591


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

Conditions for filtering IS-IS routes are configured.

Step 4 Run commit

The configuration is committed.

----End

8.9.5 Verifying the IPv6 IS-IS Route Exchange Control


Configuration

Procedure
l Run the display isis lsdb [ { level-1 | level-2 } | verbose | { local | lsp-id | is-name
symbolic-name } ] * [ process-id | vpn-instance vpn-instance-name ] command to check
IS-IS LSDB information.
l Run the display isis route [ process-id | vpn-instance vpn-instance-name ] ipv6
[ verbose | [ level-1 | level-2 ] | ipv6-address [ prefix-length ] ] * command to check IS-IS
routing information.
l Run the display ipv6 routing-table command to check the IPv6 routing table.

----End

8.10 Configuring IPv6 IS-IS Route Summarization

Pre-configuration Tasks
Before configuring IS-IS route summarization, complete the following task:

l 8.6 Configuring Basic IPv6 IS-IS Functions

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 ipv6 summary ipv6-address prefix-length [ avoid-feedback | generate_null0_route |


tag tag | [ level-1 | level-1-2 | level-2 ] ] *

The specified IPv6 IS-IS routes are summarized into one IS-IS route.

NOTE

After route summarization is configured on a device, the local routing table still contains all specific
routes before the summarization. The routing tables on other devices contain only the summary route,
and the summary route is deleted only after all its specific routes are deleted.

Step 4 Run commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 592


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

The configuration is committed.

----End

Verifying the Configuration


l Run the display isis route command to check summary routes in the IS-IS routing table.
l Run the display ipv6 routing-table [ verbose ] command to check summary routes in
the IPv6 routing table.

8.11 Controlling IPv6 IS-IS Route Convergence

Pre-configuration Tasks
Before configuring IS-IS route convergence, complete the following task:
l 8.6 Configuring Basic IPv6 IS-IS Functions

Configuration Procedure
You can perform the following configuration tasks (excluding the task of Verifying the IPv6
IS-IS Route Convergence Control Configuration) in any sequence as required.

8.11.1 Configuring Attributes for Hello Packets


Context
IS-IS maintains neighbor relationships between neighbors by sending and receiving Hello
packets. If the local device does not receive Hello packets from its neighbor within a specified
period, the device considers the neighbor Down.
In IS-IS, you can set the interval for sending Hello packets and the holding multiplier of
neighboring devices to control the holdtime of neighbor relationships between the local
device and neighbors.
l If the interval for sending Hello packets is too short, more system resources are
consumed to send Hello packets, causing a heavy CPU load.
l If the holdtime of neighboring devices is too long, the local device needs to spend much
time detecting the failure of neighbors, slowing down IS-IS route convergence. If the
holdtime of neighboring devices is too short, some Hello packets may be lost or become
incorrect because of network transmission delay and errors. This will cause neighbor
relationships to frequently alternate between Up and Down and lead to route flapping on
the IS-IS network.
NOTE

You are advised to set the same interval for sending Hello packets and same holding multiplier of
neighboring devices on all the devices on the IS-IS network. This method prevents IS-IS route
convergence from being slowed down when some devices detect link failures at a lower speed
than other devices.

Procedure
l Configure the interval for sending Hello packets.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 593


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. (On an Ethernet interface), run: undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
If an Ethernet interface already has Layer 2 configuration, this command fails to be
executed on the interface. Before running this command on the interface, delete all
the Layer 2 configuration of the interface.
NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch
batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in
the system view to switch these interfaces to Layer 3 mode in batches.
d. Run isis timer hello hello-interval [ level-1 | level-2 ] [ conservative ]
The interval for sending Hello packets is set on an interface.
By default, the interval for sending Hello packets 10 seconds.

NOTE

Parameters level-1 and level-2 are configured only on a broadcast interface. Level-1 and
Level-2 Hello packets are sent separately and their intervals must be set respectively. There
is only one Hello packet on a point-to-point link. Therefore, level-1 and level-2 parameters
are not used.
e. Run commit
The configuration is committed.
l Set the holding multiplier for neighboring devices.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. (On an Ethernet interface), run: undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
If an Ethernet interface already has Layer 2 configuration, this command fails to be
executed on the interface. Before running this command on the interface, delete all
the Layer 2 configuration of the interface.
NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch
batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in
the system view to switch these interfaces to Layer 3 mode in batches.
d. Run isis timer holding-multiplier number [ level-1 | level-2 ]
The holding multiplier of neighboring devices is set.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 594


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

The default holding multiplier is 3. The holdtime of neighbor relationships is three


times the interval for sending Hello packets.

NOTE

Parameters level-1 and level-2 are configured only on a broadcast interface. Level-1 and
Level-2 Hello packets are sent separately and their intervals must be set respectively. There
is only one Hello packet on a point-to-point link. Therefore, level-1 and level-2 parameters
are not used.
e. Run commit
The configuration is committed.
----End

8.11.2 Configuring Attributes for LSPs


Context
LSPs are used to exchange link state information. You can configure attributes for LSPs to
control the length and maximum lifetime of LSPs. To accelerate network convergence, you
can enable LSP fast flooding or reduce the minimum interval for sending LSPs and the
interval for updating LSPs to speed up LSP flooding. However, CPU resources will be
consumed too much if the network topology changes frequently. In this situation, configure
the intelligent timer for generating LSPs. This timer can fast respond to emergencies, speed
up network convergence, and improve CPU resource efficiency because its interval becomes
longer when the network changes frequently.

Configured Function Usage Scenario


Parameters

Set the Set the size When the volume of link status information increases, the
maximum for LSPs to length of LSPs to be generated can be increased to carry
length for be more information in each LSP.
LSPs generated
and LSPs to
be received.

Set the Set the When a switch generates the system LSP, it fills in the
maximum maximum maximum lifetime for this LSP. After this LSP is received
lifetime for lifetime for by other switchs, the lifetime of the LSP is reduced
LSPs LSPs to gradually. If the switch does not receive any more update
ensure the LSPs and the lifetime of the LSP is reduced to 0, the LSP
validity of will be deleted from the LSDB 60s later if no more
an LSP updated LSPs are received.
before its
updated
LSP is
received.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 595


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

Configured Function Usage Scenario


Parameters

Set the Set the On an IS-IS network, LSDB synchronization is


refresh refresh implemented through LSP flooding. During LSP flooding,
interval for interval for a switch sends an LSP to its neighbors and then the
LSPs LSPs to neighbors send the received LSP to their respective
synchronize neighbors except the switch that first sends the LSP. In this
LSDBs. manner, the LSP is flooded among the switchs of the same
level. LSP flooding allows each switch of the same level
to have the same LSP information and synchronize its
LSDB with each other.

Set the Set the Reducing the minimum interval for sending LSPs speeds
minimum interval for up LSP flooding.
interval at sending an
which LSPs LSP during
are sent LSP update.

Configure the Control the On an IS-IS network, if the local routing information
intelligent interval for changes, a switch needs to generate a new LSP to notify
timer used to generating this change. If the local routing information changes
generate LSPs LSPs frequently, a large number of new LSPs are generated,
intelligently which occupies a lot of system resources and decreases
to speed up system performance. To speed up network convergence
route and prevent system performance from being affected,
convergenc configure an intelligent timer for generating LSPs. This
e and timer can adjust the delay in generating LSPs based on the
reduce routing information change frequency.
system
load.

Enable LSP Control the When an IS-IS switch receives new LSPs from other
fast flooding number of switchs, it switch updates the LSPs in the local LSDB and
LSPs periodically floods out the updated LSPs according to a
flooded timer. LSP fast flooding updates the preceding method.
each time When a device configured with LSP fast flooding receives
on an one or more new LSPs. it floods out the LSPs with a
interface to number smaller than the specified number before
speed up calculating routes. This speeds up LSDB synchronization.
IS-IS
network
convergenc
e.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 596


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

Configured Function Usage Scenario


Parameters

Set an Control the On a point-to-point network, devices at both ends of a link


interval at interval for synchronize LSDBs with each other by flooding LSPs.
which LSPs retransmitti The device at one end of the link sends an LSP. If the
are ng LSPs to device at the other end receives this LSP, it replies with a
retransmitted ensure PSNP. If the device that has sent an LSP does not receive a
over a P2P LSDB PSNP from the other end in a period of time, the device
link synchroniza will retransmit the LSP.
tion on a
P2P
network.

Procedure
l Set the maximum length for LSPs.
a. Run system-view

The system view is displayed.


b. Run isis [ process-id ]

The IS-IS view is displayed.


c. Set the maximum length for LSPs.
n Run lsp-length originate max-size
The maximum length is set for each generated LSP.
n Run lsp-length receive max-size
The maximum length is set for each received LSP.

By default, the IS-IS system generates and receives 1497-byte LSPs.

NOTE

Ensure that the value of max-size for LSPs to be generated must be smaller than or equal to
the value of max-size for LSPs to be received.
The value of max-size set through the lsp-length command must meet the following
requirements; otherwise, the MTU status on the interface is considered Down.
l The MTU of an Ethernet interface must be greater than or equal to the sum of the
value of max-size and 3.
l The MTU of a P2P interface must be greater than or equal to the value of max-size.
d. Run commit

The configuration is committed.


l Set the maximum lifetime for LSPs.
a. Run system-view

The system view is displayed.


b. Run isis [ process-id ]

The IS-IS view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 597


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

c. Run timer lsp-max-age age-time


The maximum lifetime is set for LSPs.
By default, the maximum lifetime of LSPs is 1200 seconds.
d. Run commit
The configuration is committed.
l Set the refresh interval for LSPs.
a. Run system-view
The system view is displayed.
b. Run isis [ process-id ]
The IS-IS view is displayed.
c. Run timer lsp-refresh refresh-time
A refresh interval is set for LSPs.
By default, the LSP refresh interval is 900s.

NOTE

Ensure that the LSP refresh interval is more than 300s shorter than the maximum LSP
lifetime. This allows new LSPs to reach all devices in an area before existing LSPs expire.
The larger a network, the greater the deviation between the LSP refresh interval and the
maximum LSP lifetime.
d. Run commit
The configuration is committed.
l Set the minimum interval at which LSPs are sent.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. (On an Ethernet interface), run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
If an Ethernet interface already has Layer 2 configuration, this command fails to be
executed on the interface. Before running this command on the interface, delete all
the Layer 2 configuration of the interface.
NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch
batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in
the system view to switch these interfaces to Layer 3 mode in batches.
d. Run isis timer lsp-throttle throttle-interval [ count count ]
The minimum interval for sending LSPs on an IS-IS interface and the maximum
number of LSPs sent within the interval are set.
By default, the minimum interval for sending LSPs is 50 ms, and the maximum
number of LSPs sent each time is 10.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 598


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

e. Run commit
The configuration is committed.
l Configure the intelligent timer used to generate LSPs.
a. Run system-view
The system view is displayed.
b. Run isis [ process-id ]
The IS-IS view is displayed.
c. Run timer lsp-generation max-interval [ init-interval [ incr-interval ] ] [ level-1 |
level-2 ]
The intelligent timer used to generate LSPs is set.
If no level is configured, both Level-1 and Level-2 are configured.
By default, the maximum delay in generating LSPs is 2 seconds.
The intelligent timer involves three parameters, and the parameters are described as
follows:
n When only max-interval is specified, the intelligent timer functions as an
ordinary one-time triggering timer.
n When both init-interval and incr-interval are specified, the delay in generating
an LSP for the first time is determined by init-interval, and the delay in
generating an LSP with the same LSP ID for the second time is determined by
incr-interval. Subsequently, each time routes change, the delay in generating
an LSP doubles the last delay until the delay reaches the value specified by
max-interval. If the local routing information keeps being updated within the
max-interval period, the delay remains at max-interval until the time the local
routing information is not updated within the max-interval period or the IS-IS
process is restarted. Then the delay decreases to init-interval.
n When init-interval is specified but incr-interval is not, the delay in generating
an LSP for the first time is determined by init-interval, and the delay in
generating subsequent LSPs is determined by max-interval. If the local routing
information keeps being updated within the max-interval period, the delay
remains at max-interval until the time the local routing information is not
updated within the max-interval period or the IS-IS process is restarted. Then
the delay decreases to init-interval.
d. Run commit
The configuration is committed.
l Enable LSP fast flooding.
a. Run system-view
The system view is displayed.
b. Run isis [ process-id ]
The IS-IS view is displayed.
c. Run flash-flood [ lsp-count | max-timer-interval interval | [ level-1 | level-2 ] ] *
The LSP fast flooding is enabled.
The lsp-count parameter specifies the number of LSPs flooded each time, which is
applicable to all interfaces. If the number of LSPs to be sent is greater than the

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 599


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

value of lsp-count, lsp-count takes effect. If the number of LSPs to be sent is


smaller than the value of lsp-count, LSPs of the actual number are sent. If a timer is
configured and the configured timer does not expire before the route calculation, the
LSPs are flooded immediately when being received; otherwise, the LSPs are sent
when the timer expires.
When LSP fast flooding is enabled, Level-1 LSPs and Level-2 LSPs are fast
flooded by default if no level is specified.
d. Run commit
The configuration is committed.
l Set an interval at which LSPs are retransmitted over a P2P link.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. (On an Ethernet interface), run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
If an Ethernet interface already has Layer 2 configuration, this command fails to be
executed on the interface. Before running this command on the interface, delete all
the Layer 2 configuration of the interface.
NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch
batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in
the system view to switch these interfaces to Layer 3 mode in batches.
d. (Optional) Run isis circuit-type p2p
A broadcast interface is simulated as a P2P interface.

NOTE

If the interface type is P2P, this step is not required.


e. Run isis timer lsp-retransmit retransmit-interval
The interval at which LSPs are retransmitted over a P2P link is set.
By default, the interval for retransmitting LSPs over a P2P link is 5 seconds.
f. Run commit
The configuration is committed.
----End

8.11.3 Configuring Attributes for CSNPs


Context
Complete sequence number PDUs (CSNPs) contains the summary of all the LSPs in an LSDB
to ensure LSDB synchronization between neighbors. CSNPs are processed differently on
broadcast and P2P links.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 600


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

l On a broadcast link, CSNPs are periodically sent by a DIS device. If a device detects that
its LSDB is not synchronized with that on its neighboring device, the device will send
PSNPs to apply for missing LSPs.
l On a P2P link, CSNPs are sent only during initial establishment of neighboring
relationships.

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 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run isis timer csnp csnp-interval [ level-1 | level-2 ]


The interval at which CSNPs are sent is set on the specified interface.
By default, the interval at which CSNPs are sent is 10 seconds.

NOTE

Configure Level-1 and Level-2 only when a broadcast interface is specified.

Step 5 Run commit


The configuration is committed.

----End

8.11.4 Setting the SPF Calculation Interval


Context
A network change always triggers IS-IS to perform SPF calculation. Frequent SPF calculation
will consume excessive CPU resources, affecting services.
To solve this problem, configure an intelligent timer to control the interval for SPF
calculation. For example, to speed up IS-IS route convergence, set the interval for SPF

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 601


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

calculation to a small value and set the interval to a large value after the IS-IS network
becomes stable.

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 timer spf max-interval [ init-interval [ incr-interval ] ]
The SPF intelligent timer is configured.
By default, no SPF intelligent timer is configured and the maximum delay in SPF calculation
is 5 seconds.
The intelligent timer changes as follows:
l The delay in the first SPF calculation is determined by init-interval; the delay in the
second SPF calculation is determined by incr-interval. From the third time on, the delay
in SPF calculation increases twice every time until the delay reaches the value specified
by max-interval. After the delay remains at the value specified by max-interval for three
times or the IS-IS process is restarted, the delay decreases to the value specified by init-
interval.
l If incr-interval is not specified, the delay in SPF calculation for the first time is
determined by init-interval. From the second time on, the delay in SPF calculation is
determined by max-interval. After the delay remains at the value specified by max-
interval for three times or the IS-IS process is restarted, the delay decreases to the value
specified by init-interval.
l When only max-interval is specified, the intelligent timer functions as an ordinary one-
time triggering timer.
Step 4 Run commit
The configuration is committed.

----End

8.11.5 Configuring Convergence Priorities for IS-IS Routes


Context
Devices allow you to configure the highest convergence priority for specific IS-IS routes so
that these IS-IS routes will be converged first when a network topology changes.
The application rules of the convergence priorities for IS-IS routes are as follows:
l Existing IS-IS routes are converged based on the priorities configured in the ipv6 prefix-
priority command.
l New IS-IS routes are converged based on the priorities configured in the ipv6 prefix-
priority command.
l If an IS-IS route conforms to the matching rules of multiple convergence priorities, the
highest convergence priority is used.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 602


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

l The convergence priority of a Level-1 IS-IS route is higher than that of a Level-2 IS-IS
route.

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 ipv6 prefix-priority [ level-1 | level-2 ] { critical | high | medium } { ipv6-prefix
prefix-name | tag tag-value }

Convergence priorities are set for IS-IS routes.

By default, the convergence priority of 32-bit host routes is medium, and the convergence
priority of the other IS-IS routes is low.

NOTE

The ipv6 prefix-priority command is only applicable to the public network.


After the ipv6 prefix-priority command is run, the convergence priority of 32-bit host routes is low, and
the convergence priorities of the other routes are determined as specified in the ipv6 prefix-priority
command.

Step 4 Run commit

The configuration is committed.

----End

8.11.6 Verifying the IPv6 IS-IS Route Convergence Control


Configuration

Procedure
l Run the display isis interface [ verbose ] [ vpn-instance vpn-instance-name ] command
to check IS-IS packet information.
l Run the display isis route [ process-id | vpn-instance vpn-instance-name ] ipv6
[ verbose | [ level-1 | level-2 ] | ipv6-address [ prefix-length ] ] * command to check the
information of IS-IS routes.

----End

8.12 Configuring LSP Fragment Extension

Pre-configuration Tasks
Before configuring LSP fragment extension, complete the following task:

l 8.6.1 Creating IS-IS Processes

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 603


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

NOTE

When a new device connects to an IS-IS network, you are advertised to configure LSP fragment
extension and virtual systems before establishing IS-IS neighbors or importing routes. If you establish
IS-IS neighbors or import routes, which causes IS-IS to carry much information that cannot be loaded
through 256 fragments, you must configure LSP fragment extension and virtual systems. The
configurations, however, take effect only after you restart the IS-IS process.

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 lsp-fragments-extend [ [ level-1 | level-2 | level-1-2 ] | [ mode-1 | mode-2 ] ] *


LSP fragment extension is enabled in an IS-IS process.
By default, LSP fragment extension is disabled in an IS-IS process.
If the mode or level is not specified during the configuration of LSP fragment extension,
mode-1 and level-1-2 are used by default.

NOTE

If there are devices of other manufacturers on the network, LSP fragment extension must be set to
mode-1. Otherwise, devices of other manufacturers cannot identify LSPs.

Step 4 Run virtual-system virtual-system-id


A virtual system is configured.
By default, no virtual system is configured.
To configure a switch to generate extended LSP fragments, you must configure at least one
virtual system. The ID of the virtual system must be unique in the domain.
An IS-IS process can be configured with up to 99 virtual system IDs.
Step 5 Run commit
The configuration is committed.

----End

Verifying the Configuration


Run the following commands to check IS-IS process statistics.
l display isis statistics [ level-1 | level-2 | level-1-2 ] [ process-id | vpn-instance vpn-
instance-name ]
l display isis process-id statistics [ [ level-1 | level-2 | level-1-2 ] | [ packet ] ]

8.13 Configuring a Mesh Group on an NBMA Network

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 604


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

Pre-configuration Tasks
Before configuring a mesh group, complete the following task:
l 8.6 Configuring Basic IPv6 IS-IS Functions

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 On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
The mode switching function takes effect when the interface only has attribute configurations
(for example, shutdown and description configurations). Alternatively, if configuration
information supported by both Layer 2 and Layer 3 interfaces exists (for example, mode lacp
and lacp system-id configurations), no configuration that is not supported after the working
mode of the interface is switched can exist. If unsupported configurations exist on the
interface, delete the configurations first and then run the undo portswitch command.

NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run isis mesh-group { mesh-group-number | mesh-blocked }


The interface is added to a mesh group.
When mesh-blocked is configured on an interface, the interface is blocked and cannot flood
LSPs outside. All the interfaces added to a mesh group implement global LSDB
synchronization through CSNP and PSNP mechanisms.
Step 5 Run commit
The configuration is committed.

----End

Verifying the Configuration


Run the following commands to check IS-IS process statistics.
l display isis statistics [ level-1 | level-2 | level-1-2 ] [ process-id | vpn-instance vpn-
instance-name ]
l display isis process-id statistics [ [ level-1 | level-2 | level-1-2 ] | packet ]

8.14 Configuring the Overload Bit for an IS-IS Device

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 605


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

If an IS-IS device needs to be temporarily isolated, configure the IS-IS device to enter the
overload state to prevent other devices from forwarding traffic to this IS-IS device and
prevent blackhole routes.

Pre-configuration Tasks
Before configuring the overload bit for an IS-IS device, complete the following task:

l 8.6 Configuring Basic IPv6 IS-IS Functions

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 [ timeout1 | start-from-nbr system-id [ timeout1 [ timeout2 ] ]


| wait-for-bgp [ timeout1 ] ] [ send-sa-bit [ timeout3 ] ] ][ allow { interlevel | external }* ]

The overload bit for non-pseudonode LSPs is configured.

Step 4 Run commit

The configuration is committed.

----End

Verifying the Configuration


l Run the display isis lsdb [ [ level-1 | level-2 ] | verbose | [ local | lsp-id | is-name
symbolic-name ] ] * [ process-id | vpn-instance vpn-instance-name ] command to check
information in the IS-IS LSDB.

8.15 Configuring Dynamic IPv6 BFD for IS-IS

Applicable Environment
If the requirement for data transmission is high and IS-IS convergence needs to be accelerated
when the link status changes, you can configure dynamic BFD on IS-IS links. BFD can
provide link failure detection featuring light load and high speed (at the millisecond level).
With dynamic BFD, routing protocols can dynamically trigger the establishment of BFD
sessions.

Dynamic BFD needs to be configured based on the actual network environment. If the time
parameters are set improperly, network flapping may occur.

Pre-configuration Tasks
Before configuring dynamic IPv6 BFD for IS-IS, complete the following tasks:

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 606


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

l Configuring IP addresses for interfaces to ensure that neighboring nodes are reachable at
the network layer
l Configuring Basic IPv6 IS-IS Functions

Configuration Procedure

Figure 8-1 Flowchart for configuring dynamic IPv6 BFD for IS-IS

Configure global BFD

Configure IPv6 BFD for an


IS-IS process

Disable an interface from


dynamically creating IPv6
BFD sessions

Configure IPv6 BFD on a


specified interface

Mandatory
procedure
Optional
procedure

8.15.1 Configuring BFD Globally

Before configuring dynamic BFD for IS-IS, you need to enable BFD globally.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run bfd

BFD is configured globally.

Step 3 Run commit

The configuration is committed.

----End

8.15.2 Configuring IPv6 BFD for IS-IS Processes

By configuring IPv6 BFD for an IS-IS process, you can set parameters for dynamic BFD
sessions and enable dynamic IPv6 BFD for IS-IS on all IS-IS interfaces.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 607


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 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 ipv6 bfd all-interfaces enable
IPv6 BFD is enabled in the IS-IS process to establish BFD sessions.
When global IPv6 BFD is enabled in the IS-IS process and the neighbor IPv6 status is Up, IS-
IS adopts default BFD parameters to establish BFD sessions on all the interfaces.
Step 4 (Optional) Run ipv6 bfd all-interfaces { min-rx-interval receive-interval | min-tx-interval
transmit-interval | detect-multiplier multiplier-value | frr-binding } *
IPv6 BFD parameters are configured for setting up BFD sessions.
l min-rx-interval receive-interval: specifies the minimum interval at which BFD packets
are received from the peer end.
l min-tx-interval transmit-interval: specifies the minimum interval at which BFD packets
are sent to the peer end.
l detect-multiplier multiplier-value: specifies the local detection time multiplier, which
determines the neighbor holdtime.
l frr-binding: indicates that the status of the IPv6 BFD session is bound to IPv6 IS-IS
Auto FRR.
Step 5 Run commit
The configuration is committed.

----End

8.15.3 (Optional) Preventing an Interface from Dynamically


Establishing an IPv6 BFD Session
You can disable certain IS-IS interfaces from dynamically establishing IPv6 BFD sessions.

Context
After the ipv6 bfd all-interfaces enable command is used for an IS-IS process on a P2P
network, all IS-IS interfaces whose neighbors are Up establish dynamic BFD sessions; all IS-
IS interfaces whose neighbors are Up on a broadcast network establish BFD sessions between
DISs and non-DISs. If you do not expect certain IS-IS interfaces to establish dynamic BFD
sessions, you can disable these interfaces from dynamically establishing BFD sessions. Do as
follows to disable the specified interface from dynamically establishing BFD sessions:

Procedure
Step 1 Run system-view
The system view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 608


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

Step 2 Run interface interface-type interface-number

The interface view is displayed.

Step 3 Run isis ipv6 bfd block

The interface is prevented from dynamically establishing a BFD session.

Step 4 Run commit

The configuration is committed.

----End

8.15.4 (Optional) Configuring IPv6 BFD for a Specified Interface

You can configure IPv6 BFD parameters on a specified interface. The priority of IPv6 BFD
parameters on an interface is higher than that of IPv6 BFD parameters in the process.

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

IPv6 BFD is enabled on the interface to establish IPv6 BFD sessions.

After IPv6 BFD is globally enabled in an IS-IS process, default IPv6 BFD parameters are
used for establishing IPv6 BFD sessions.

Step 4 (Optional) Run isis ipv6 bfd { min-rx-interval receive-interval | min-tx-interval transmit-
interval | detect-multiplier multiplier-value | frr-binding } *

IPv6 BFD parameters are configured for setting up BFD sessions.

By default, the minimum interval at which IPv6 BFD packets are sent or received is 1000, in
milliseconds; the IPv6 BFD local detection multiplier is 3.

NOTE

The priority of IPv6 BFD configured on an interface is higher than that of IPv6 BFD configured for a
process. That is, if BFD is also enabled on an interface, the parameters on the interface are preferentially
used to establish a dynamic BFD session.

Step 5 Run commit

The configuration is committed.

----End

8.15.5 Verifying the IPv6 BFD for IS-IS Configuration

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 609


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

Prerequisites
The configurations of dynamic IPv6 BFD for IS-IS are complete.

Procedure
l Run the display isis ipv6 bfd [ process-id | vpn-instance vpn-instance-name ] session
{ all | peer ipv6-address | interface interface-type interface-number } command to check
information about an IPv6 BFD session for IS-IS.
l Run the display isis ipv6 bfd [ process-id | vpn-instance vpn-instance-name ] interface
command to check the information about an interface enabled with IPv6 BFD for IS-IS.
----End

8.16 Configuring IPv6 IS-IS Auto FRR


Applicable Environment
As the network keeps developing, services such as Voice over IP (VoIP) and on-line video
services require high-quality real-time transmission. Nevertheless, if an IS-IS fault occurs,
traffic can be switched to a new link only after the following processes: fault detection, LSP
update, LSP flooding, route calculation, and FIB entry delivery. As a result, traffic is
interrupted for much more than 50 ms, which cannot meet the requirement for real-time
services on the network.
With IPv6 IS-IS Auto FRR, devices can rapidly switch traffic from faulty links to backup
links without interrupting the traffic. This protects traffic and greatly improves the reliability
of IS-IS networks.
IPv6 IS-IS Auto FRR is applicable to the services that are very sensitive to packet delay and
packet loss.

Pre-configuration Tasks
Before configuring IPv6 IS-IS Auto FRR, complete the following task:
Configuring Basic IPv6 IS-IS Functions

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run isis [ process-id ]
The IS-IS process is enabled and the IS-IS view is displayed.
Step 3 Run ipv6 frr
The IPv6 IS-IS FRR view is displayed.
Step 4 (Optional) Run frr-policy route route-policy route-policy-name
Backup routes are filtered using a filtering policy. Only backup routes that have passed the
filtering policy are added to the routing table.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 610


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

Step 5 Run loop-free-alternate [ level-1 | level-2 | level-1-2 ]

IPv6 IS-IS Auto FRR is enabled and the loop-free backup route is created.

If the IS-IS level is not specified, IPv6 IS-IS Auto FRR is enabled on Level-1 and Level-2 to
create the backup route.

Step 6 Run commit

The configuration is committed.

----End

Verifying the Configuration


Run the display isis route [ process-id | vpn-instance vpn-instance-name ] ipv6 [ verbose |
[ level-1 | level-2 ] | ipv6-address [ prefix-length ] ] * command to check information about the
primary link and backup link after IPv6 IS-IS Auto FRR is enabled.

8.17 Maintaining IS-IS

8.17.1 Resetting IS-IS

Context
To reset IS-IS, reset IS-IS data structure, neighbor relationship and packets

The IS-IS data structure cannot be restored after you reset it. All the previous structure
information and the neighbor relationship are reset. Exercise caution when running this
command.
The specified IS-IS neighbor relationship is deleted after you reset a specified IS-IS neighbor.
Exercise caution when running this command.

Procedure
l Reset IS-IS data structure.

Run the reset isis all[ process-id | vpn-instance vpn-instance-name ] command to reset
IS-IS data structure.
l Reset IS-IS neighbor relationship.

Run the reset isis peer system-id [ process-id | vpn-instance vpn-instance-name ]


command to reset a specific IS-IS neighbor.

After the IS-IS routing policy or the protocol changes, you can reset a specific IS-IS
neighbor to validate the new configuration.
l Reset IS-IS statistics

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 611


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

Run the reset isis error [ process-id | vpn-instance vpn-instance-name ] or reset isis
error interface interface-type interface-number command to clear information about
incorrect LSPs and Hello packets received by the specified interface or process.

Run the reset isis statistics { packet | socket } [ interface [ interface-type interface-
number ] ] command to clear IS-IS statistics on the specified interface.

Run the reset isis [ process-id ]statistics packet [ lsp ] or reset isis statistics packet lsp
[ process-id ] command to clear IS-IS statistics on the specified process.

Run the reset isis process-id suppress-flapping peer [ interface-type interface-number ]


[ notify-peer ] command to exit from IS-IS neighbor relationship flapping suppression.

----End

8.17.2 Improving the Maintainability of IS-IS

Context
The administrator can improve the maintainability of IS-IS using either of the following
methods:
l Configuring IS-IS host name mapping: Through this function, the administrator can use
a simple name to replace the system ID. After IS-IS host name mapping is configured,
the dynamic name is displayed in the IS-IS information to replace the system ID when
the display command is executed. This improves the maintainability of IS-IS networks.
l Configuring IS-IS to add the POI TLV to a PURGE packet: When the value of the
Remaining Lifetime field in an LSP packets is 0, this packet is invalid and called a
PURGE packet. PURGE packets do not record information about the devices generating
these packets. Therefore, when a network is faulty, the packet source cannot be located.
To solve this problem, IS-IS can be configured to add the POI TLV to a PURGE packet
so that the PURGE packet contains information about its generating device. If the
dynamic host name function is configured locally, the host name TLV is also added to
the PURGE packet to facilitate fault location.

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 Configure IS-IS host name mapping.


l Run is-name symbolic-name
IS-IS dynamic host name mapping is configured and a host name is configured for the
local device.
This configuration is dynamic configuration. Therefore, the configured host name
symbolic-name is advertised through an LSP to other IS-IS devices in the same area.
When you use IS-IS display commands to view IS-IS information on other IS-IS
devices, the system ID of the local device is replaced by the configured host name.
l Run is-name map system-id symbolic-name

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 612


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

IS-IS static host name mapping is configured and a host name is configured for the
remote device.
This configuration is static configuration and takes effect only on the local device.
Therefore, the configured host name symbolic-name is not advertised through an LSP.
Step 4 (Optional) Run purge-originator-identification enable
IS-IS is configured to add POI TLV to Purge packets. If a dynamic hostname has been
configured for the local device, the hostname TLV is also added to the Purge packets.
Step 5 Run commit
The configuration is committed.

----End

8.18 Configuration Examples for IPv6 IS-IS


This section only provides configuration examples for individual features. For details about
multi-feature configuration examples, feature-specific configuration examples, interoperation
examples, protocol or hardware replacement examples, and industry application examples, see
the Typical Configuration Examples.

8.18.1 Example for Configuring Dynamic IPv6 BFD for IS-IS

Networking Requirements
As shown in Figure 8-2, IS-IS is run among SwitchS, SwitchD, and SwitchN. Service traffic
is forwarded along the primary link SwitchS→SwitchD. The link
SwitchS→SwitchN→SwitchD is used as a backup. Customers require that a fault on the
primary link be detected in milliseconds so that service traffic can be fast switched to the
backup link when the primary link fails.

Figure 8-2 Networking diagram for configuring dynamic IPv6 BFD for IS-IS
SwitchS 10GE1/0/1 10GE1/0/1SwitchD10GE1/0/3
FC00:0:0:1::1/64 FC00:0:0:1::2/64 FC00:0:0:4::1/64

10GE1/0/2 10GE1/0/2
FC00:0:0:2::1/64 FC00:0:0:3::2/64

10GE1/0/1 10GE1/0/2
FC00:0:0:2::2/64 FC00:0:0:3::1/64

SwitchN

Configuration Roadmap
The configuration roadmap is as follows:

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 613


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

1. Configure basic IPv6 IS-IS functions on each switch to ensure IPv6 connectivity.
2. Set link cost values for IS-IS interfaces on each switch to make the path
SwitchS→SwitchD become the primary and the path SwitchS→SwitchN→SwitchD
become the backup.
3. Enable BFD globally on each switch to detect faults on the primary link in milliseconds.
4. Enable IPv6 BFD for IS-IS in the IS-IS view on each switch so that service traffic can be
fast switched to the backup link when the primary link fails.

Procedure
Step 1 Enable the IPv6 forwarding capability and configure IPv6 addresses for interfaces.
# Take configurations on SwitchS as an example. The configurations on other switches are
similar to these on SwitchS and are not provided here.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchS
[*HUAWEI] commit
[~SwitchS] interface 10ge 1/0/1
[*SwitchS-10GE1/0/1] undo portswitch
[*SwitchS-10GE1/0/1] ipv6 enable
[*SwitchS-10GE1/0/1] ipv6 address fc00:0:0:1::1 64
[*SwitchS-10GE1/0/1] quit
[*SwitchS] interface 10ge 1/0/2
[*SwitchS-10GE1/0/2] undo portswitch
[*SwitchS-10GE1/0/2] ipv6 enable
[*SwitchS-10GE1/0/2] ipv6 address fc00:0:0:2::1 64
[*SwitchS-10GE1/0/2] commit
[~SwitchS-10GE1/0/2] quit

Step 2 Configure basic IPv6 IS-IS functions.


# Configure SwitchS.
[~SwitchS] isis 10
[*SwitchS-isis-10] is-level level-2
[*SwitchS-isis-10] network-entity 10.0000.0000.0001.00
[*SwitchS-isis-10] ipv6 enable
[*SwitchS-isis-10] quit
[*SwitchS] interface 10ge 1/0/1
[*SwitchS-10GE1/0/1] isis ipv6 enable 10
[*SwitchS-10GE1/0/1] quit
[*SwitchS] interface 10ge 1/0/2
[*SwitchS-10GE1/0/2] isis ipv6 enable 10
[*SwitchS-10GE1/0/2] commit
[~SwitchS-10GE1/0/2] quit

# Configure SwitchN.
[~SwitchN] isis 10
[*SwitchN-isis-10] is-level level-2
[*SwitchN-isis-10] network-entity 10.0000.0000.0002.00
[*SwitchN-isis-10] ipv6 enable
[*SwitchN-isis-10] quit
[*SwitchN] interface 10ge 1/0/1
[*SwitchN-10GE1/0/1] isis ipv6 enable 10
[*SwitchN-10GE1/0/1] quit
[*SwitchN] interface 10ge 1/0/2
[*SwitchN-10GE1/0/2] isis ipv6 enable 10
[*SwitchN-10GE1/0/2] commit
[~SwitchN-10GE1/0/2] quit

# Configure SwitchD.
[~SwitchD] isis 10
[*SwitchD-isis-10] is-level level-2

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 614


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

[*SwitchD-isis-10] network-entity 10.0000.0000.0003.00


[*SwitchD-isis-10] ipv6 enable
[*SwitchD-isis-10] quit
[*SwitchD] interface 10ge 1/0/1
[*SwitchD-10GE1/0/1] isis ipv6 enable 10
[*SwitchD-10GE1/0/1] quit
[*SwitchD] interface 10ge 1/0/2
[*SwitchD-10GE1/0/2] isis ipv6 enable 10
[*SwitchD-10GE1/0/2] quit
[*SwitchD] interface 10ge 1/0/3
[*SwitchD-10GE1/0/3] isis ipv6 enable 10
[*SwitchD-10GE1/0/3] commit
[~SwitchD-10GE1/0/3] quit

# After the configurations are complete, run the display ipv6 routing-table command. You
can view that the switches have learnt IPv6 routes from each other.
Step 3 Set link cost values for IS-IS interfaces.
# Configure SwitchS.
[~SwitchS] interface 10ge 1/0/1
[~SwitchS-10GE1/0/1] isis cost 1 level-2
[*SwitchS-10GE1/0/1] quit
[*SwitchS] interface 10ge 1/0/2
[*SwitchS-10GE1/0/2] isis cost 10 level-2
[*SwitchS-10GE1/0/2] commit
[~SwitchS-10GE1/0/2] quit

# Configure SwitchN.
[~SwitchN] interface 10ge 1/0/1
[~SwitchN-10GE1/0/1] isis cost 10 level-2
[*SwitchN-10GE1/0/1] quit
[*SwitchN] interface 10ge 1/0/2
[*SwitchN-10GE1/0/2] isis cost 10 level-2
[*SwitchN-10GE1/0/2] commit
[~SwitchN-10GE1/0/2] quit

# Configure SwitchD.
[~SwitchD] interface 10ge 1/0/1
[~SwitchD-10GE1/0/1] isis cost 1 level-2
[*SwitchD-10GE1/0/1] quit
[*SwitchD] interface 10ge 1/0/2
[*SwitchD-10GE1/0/2] isis cost 10 level-2
[*SwitchD-10GE1/0/2] commit
[~SwitchD-10GE1/0/2] quit

Step 4 Configure IPv6 BFD for IS-IS.


# Enable IPv6 BFD for IS-IS globally on SwitchS, SwitchN, and SwitchD, and set the
minimum intervals for sending and receiving BFD packets to 150 milliseconds and the local
detection multiplier to 3.
# Configure SwitchS.
[~SwitchS] bfd
[*SwitchS-bfd] quit
[*SwitchS] isis 10
[*SwitchS-isis-10] ipv6 enable topology standard
[*SwitchS-isis-10] ipv6 bfd all-interfaces enable
[*SwitchS-isis-10] ipv6 bfd all-interfaces min-tx-interval 150 min-rx-interval 150
[*SwitchS-isis-10] commit
[~SwitchS-isis-10] quit

# Configure SwitchN.
[~SwitchN] bfd
[*SwitchN-bfd] quit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 615


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

[*SwitchN] isis 10
[*SwitchN-isis-10] ipv6 enable topology standard
[*SwitchN-isis-10] ipv6 bfd all-interfaces enable
[*SwitchN-isis-10] ipv6 bfd all-interfaces min-tx-interval 150 min-rx-interval 150
[*SwitchN-isis-10] commit
[~SwitchN-isis-10] quit

# Configure SwitchD.
[~SwitchD] bfd
[*SwitchD-bfd] quit
[*SwitchD] isis 10
[*SwitchD-isis-10] ipv6 enable topology standard
[*SwitchD-isis-10] ipv6 bfd all-interfaces enable
[*SwitchD-isis-10] ipv6 bfd all-interfaces min-tx-interval 150 min-rx-interval 150
[*SwitchD-isis-10] commit
[~SwitchD-isis-10] quit

# After the configurations are complete, run the display isis ipv6 bfd session all command on
SwitchS or SwitchD. You can view that IPv6 BFD parameters already take effect. Take the
display on SwitchS as an example:
[~SwitchS] display isis ipv6 bfd 10 session all

IPv6 BFD session information for ISIS(10)


------------------------------------------------------------------------------
Peer System ID : 0000.0000.0003 Type : L2
Interface : 10GE1/0/1
IPv6 BFD State : up TX : 150 RX : 150 Multiplier : 3

LocDis : 16386 Local IPv6 Address: FE80::E0:2F47:B103:1


RemDis : 16386 Peer IPv6 Address : FE80::E0:2F47:B107:1
Diag : No diagnostic information
Peer System ID : 0000.0000.0002 Type : L2
Interface : 10GE1/0/2
IPv6 BFD State : up TX : 150 RX : 150 Multiplier :
3

LocDis : 16386 Local IPv6 Address: FE80::C964:0:B203:1


RemDis : 16386 Peer IPv6 Address : FE80::C964:0:B8B6:1
Diag : No diagnostic information
Total BFD session(s): 2

Step 5 Verify the configuration.

# On SwitchS, run the display ipv6 routing-table fc00:0:0:4::1 64 command to view the
IPv6 routing table. You can view that the next hop address of the route to FC00:0:0:4::/64 is
FE80::E0:2F47:B107:1 and the outbound interface is 10GE1/0/1.
[~SwitchS] display ipv6 routing-table fc00:0:0:4::1 64
Route
Flags: R - relay, D - download to fib, B - black hole
route
---------------------------------------------------------------------------------
Routing Table : _public_
Summary Count : 1

Destination : FC00:0:0:4:: PrefixLength : 64


NextHop : FE80::E0:2F47:B107:1 Preference : 15
Cost : 11 Protocol : ISIS-L2
RelayNextHop : :: TunnelID : 0x0
Interface : 10GE1/0/1 Flags : D

# Run the shutdown command on 10GE1/0/1 of SwitchD to simulate a primary link fault.
[~SwitchD] interface 10ge 1/0/1
[~SwitchD-10GE1/0/1] shutdown
[*SwitchD-10GE1/0/1] commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 616


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

# On SwitchS, run the display ipv6 routing-table fc00:0:0:4::1 64 command to view the
IPv6 routing table.
[~SwitchS] display ipv6 routing-table fc00:0:0:4::1 64
Route
Flags: R - relay, D - download to fib, B - black hole
route
---------------------------------------------------------------------------------
Routing Table : _public_
Summary Count : 1

Destination : FC00:0:0:4:: PrefixLength : 64


NextHop : FE80::C964:0:B8B6:1 Preference : 15
Cost : 30 Protocol : ISIS-L2
RelayNextHop : :: TunnelID : 0x0
Interface : 10GE1/0/2 Flags : D

In the IPv6 routing table, you can view that the backup link transmits traffic after the primary
link fails, the next hop address of the route to FC00:0:0:4::/64 becomes
FE80::C964:0:B8B6:1, and the outbound interface becomes 10GE1/0/2.
# Run the display isis ipv6 bfd session all command on SwitchS, and you can view that only
one BFD session is established between SwitchS and SwitchN and its status is Up.
[~SwitchS] display isis ipv6 bfd 10 session all

IPv6 BFD session information for ISIS(10)


------------------------------------------------------------------------------
Peer System ID : 0000.0000.0002 Type : L2
Interface : 10GE1/0/2
IPv6 BFD State : up TX : 150 RX : 150 Multiplier : 3

LocDis : 16386 Local IPv6 Address: FE80::C964:0:B203:1


RemDis : 16386 Peer IPv6 Address : FE80::C964:0:B8B6:1
Diag : No diagnostic information
Total BFD session(s): 1

----End

Configuration Files
l Configuration file of the SwitchS
#
sysname SwitchS
#
bfd
#
isis 10
is-level level-2
network-entity 10.0000.0000.0001.00
#
ipv6 enable topology standard
ipv6 bfd all-interfaces enable
ipv6 bfd all-interfaces min-tx-interval 150 min-rx-interval 150
#
#
interface 10GE1/0/1
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:1::1/64
isis ipv6 enable 10
isis cost 1 level-2
#
interface 10GE1/0/2
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:2::1/64

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 617


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

isis ipv6 enable 10


isis cost 10 level-2
#
return
l Configuration file of the SwitchN
#
sysname SwitchN
#
bfd
#
isis 10
is-level level-2
network-entity 10.0000.0000.0002.00
#
ipv6 enable topology standard
ipv6 bfd all-interfaces enable
ipv6 bfd all-interfaces min-tx-interval 150 min-rx-interval 150
#
#
interface 10GE1/0/1
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:2::2/64
isis ipv6 enable 10
isis cost 10 level-2
#
interface 10GE1/0/2
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:3::1/64
isis ipv6 enable 10
isis cost 10 level-2
#
return
l Configuration file of SwitchD
#
sysname SwitchD
#
bfd
#
isis 10
is-level level-2
network-entity 10.0000.0000.0003.00
#
ipv6 enable topology standard
ipv6 bfd all-interfaces enable
ipv6 bfd all-interfaces min-tx-interval 150 min-rx-interval 150
#
#
interface 10GE1/0/1
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:1::2/64
isis ipv6 enable 10
isis cost 1 level-2
#
interface 10GE1/0/2
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:3::2/64
isis ipv6 enable 10
isis cost 10 level-2
#
interface 10GE1/0/3
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:4::1/64
isis ipv6 enable 10

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 618


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

#
return

8.18.2 Example for Configuring Basic IPv6 IS-IS Functions

Networking Requirements
As shown in Figure 8-3:

l Switch A, Switch B, Switch C, and Switch D belong to the same AS. It is required that
IS-IS run on them to implement IPv6 interworking.
l Switch A, Switch B, and Switch C belong to Area 10, and Switch D belongs to Area 20.
l Switch A and Switch B are Level-1 devices; Switch C is a Level-1-2 device; Switch D is
a Level-2 device.

Figure 8-3 Networking diagram for configuring basic IPv6 IS-IS functions

10GE1/0/1
VLANIF10
SwitchA FC00:0:0:11::2/64
L1
IS-IS 10GE1/0/1 10GE1/0/2
VLANIF40
Area10 VLANIF10 10GE1/0/3
FC00:0:0:20::1/64
FC00:0:0:11::1/64 VLANIF30
FC00:0:0:30::1/64
10GE1/0/2 10GE1/0/1
VLANIF20 VLANIF30 SwitchD
SwitchC
FC00:0:0:12::1/64 FC00:0:0:30::2/64 L2
L1/L2
10GE1/0/1
VLANIF20 IS-IS
FC00:0:0:12::2/64 Area20
SwitchB
L1

Configuration Roadmap
The configuration roadmap is as follows:

1. Enable the IPv6 forwarding capability on each Switch, and configure an IPv6 address for
each interface.
2. Enable IS-IS, configure the level, and specify the NET on each Switch.

Procedure
Step 1 Configure VLANs that interfaces belong to.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 619


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

<HUAWEI> system-view
[~HUAWEI] sysname switchA
[*HUAWEI] commit
[~switchA] vlan batch 10
[*switchA] interface 10ge 1/0/1
[*switchA-10GE1/0/1] port link-type trunk
[*switchA-10GE1/0/1] port trunk allow-pass vlan 10
[*switchA-10GE1/0/1] commit
[~switchA-10GE1/0/1] quit

The configurations of SwitchB, SwitchC and SwitchD are similar to the configuration of
SwitchA. The detailed configurations are not mentioned here.
Step 2 Enable the IPv6 forwarding capability, and configure an IPv6 address for each interface. Take
the display on Switch A as an example. The configurations of the other three Switches are the
same as that of Switch A, and are not mentioned here.
[~switchA] interface vlanif 10
[~switchA-Vlanif10] ipv6 enable
[*switchA-Vlanif10] ipv6 address FC00:0:0:11::2 64
[*switchA-Vlanif10] commit
[~switchA-Vlanif10] quit

Step 3 Configure IS-IS.


# Configure switch A.
[~switchA] isis 1
[*switchA-isis-1] is-level level-1
[*switchA-isis-1] network-entity 10.0000.0000.0001.00
[*switchA-isis-1] ipv6 enable
[*switchA-isis-1] quit
[*switchA] interface vlanif 10
[*switchA-Vlanif10] isis ipv6 enable 1
[*switchA-Vlanif10] commit
[~switchA-Vlanif10] quit

# Configure switch B.
[~switchB] isis 1
[*switchB-isis-1] is-level level-1
[*switchB-isis-1] network-entity 10.0000.0000.0002.00
[*switchB-isis-1] ipv6 enable
[*switchB-isis-1] quit
[*switchB] interface vlanif 20
[*switchB-Vlanif20] isis ipv6 enable 1
[*switchB-Vlanif20] commit
[~switchB-Vlanif20] quit

# Configure switch C.
[~switchC] isis 1
[*switchC-isis-1] ipv6 enable
[*switchC-isis-1] network-entity 10.0000.0000.0003.00
[*switchC-isis-1] quit
[*switchC] interface vlanif 10
[*switchC-Vlanif10] isis ipv6 enable 1
[*switchC-Vlanif10] quit
[*switchC] interface vlanif 20
[*switchC-Vlanif20] isis ipv6 enable 1
[*switchC-Vlanif20] quit
[*switchC] interface vlanif 30
[*switchC-Vlanif30] isis ipv6 enable 1
[*switchC-Vlanif30] isis circuit-level level-2
[*switchC-Vlanif30] commit
[~switchC-Vlanif30] quit

# Configure switch D.
[~switchD] isis 1

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 620


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

[*switchD-isis-1] is-level level-2


[*switchD-isis-1] network-entity 20.0000.0000.0001.00
[*switchD-isis-1] ipv6 enable
[*switchD-isis-1] quit
[*switchD] interface vlanif 30
[*switchD-Vlanif30] isis ipv6 enable 1
[*switchD-Vlanif30] quit
[*switchD] interface vlanif 40
[*switchD-Vlanif40] isis ipv6 enable 1
[*switchD-Vlanif40] commit
[~switchD-Vlanif40] quit

Step 4 Verify the configuration.


# View the IS-IS routing table of switch A. You can view that switch A has the routes to each
network segment of the Level-1 area.
[switchA] display isis route

Route Information for


ISIS(1)

--------------------------------------------------------------------------------

Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP


Shortcut,
U-Up/Down Bit
Set

ISIS(1) Level-1 Forwarding


Table

--------------------------------------------------------------------------------

IPV6 Dest. ExitInterface NextHop


Cost
--------------------------------------------------------------------------------

::/0 Vlanif10 FE80::220B:C7FF:FE39:130C 10


A/-/-
FC00:0:0:11::/6 Vlanif10 Direct 10 D/
L/-
4

FC00:0:0:12::/6 Vlanif10 FE80::220B:C7FF:FE39:130C 20


A/-/-
4

# View detailed information about IS-IS neighbors on switch C.


[switchC] display isis peer

Peer Information for


ISIS(1)

--------------------------------------------------------------------------------

System ID Interface Circuit ID State HoldTime(s) Type


PRI
--------------------------------------------------------------------------------

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 621


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

0000.0000.0002 Vlanif20 0000.0000.0002.01 Up 8 L1


64
0000.0000.0001 Vlanif30 0000.0000.0001.01 Up 9 L2
64
0000.0000.0001 Vlanif10 0000.0000.0003.01 Up 22 L1 64

# View detailed information about the IS-IS LSDB of switch C.


[switchC] display isis lsdb

Database Information for


ISIS(1)

--------------------------------------------------------------------------------

Level-1 Link State


Database

*(In TLV)-Leaking Route, *(By LSPID)-Self LSP, +-Self


LSP(Extended),
ATT-Attached, P-Partition, OL-
Overload

LSPID Seq Num Checksum HoldTime(s) Length ATT/P/


OL
--------------------------------------------------------------------------------

0000.0000.0001.00-00 0x0000000b 0xc229 373 86


0/0/0
0000.0000.0002.00-00 0x00000008 0x08e4 431 86
0/0/0
0000.0000.0002.01-00 0x00000008 0xd3ed 431 55
0/0/0
0000.0000.0003.00-00* 0x0000000c 0x8af5 489 143
1/0/0
0000.0000.0003.01-00* 0x0000000a 0xa21b 489 55
0/0/0

Total LSP(s):
5

Level-2 Link State


Database

*(In TLV)-Leaking Route, *(By LSPID)-Self LSP, +-Self


LSP(Extended),
ATT-Attached, P-Partition, OL-
Overload

LSPID Seq Num Checksum HoldTime(s) Length ATT/P/


OL
--------------------------------------------------------------------------------

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 622


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

0000.0000.0001.00-00 0x00000009 0x7883 557 116


0/0/0
0000.0000.0001.01-00 0x00000007 0xcef3 557 55
0/0/0
0000.0000.0003.00-00* 0x00000008 0x158d 489 146
0/0/0

Total LSP(s): 3

----End

Configuration Files
l Configuration file of switch A
#
sysname switchA
#
vlan batch 10
#
isis 1
is-level level-1
network-entity 10.0000.0000.0001.00
#
ipv6 enable topology standard
#
#
interface Vlanif10
ipv6 enable
ipv6 address FC00:0:0:11::2/64
isis ipv6 enable 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return

l Configuration file of switch B


#
sysname switchB
#
vlan batch 20
#
isis 1
is-level level-1
network-entity 10.0000.0000.0002.00
#
ipv6 enable topology standard
#
#
interface Vlanif20
ipv6 enable
ipv6 address FC00:0:0:12::2/64
isis ipv6 enable 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
return

l Configuration file of switch C


#
sysname switchC
#
vlan batch 10 20 30
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 623


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 8 IPv6 IS-IS Configuration

isis 1
network-entity 10.0000.0000.0003.00
#
ipv6 enable topology standard
#
#
interface Vlanif10
ipv6 enable
ipv6 address FC00:0:0:11::1/64
isis ipv6 enable 1
#
interface Vlanif20
ipv6 enable
ipv6 address FC00:0:0:12::1/64
isis ipv6 enable 1
#
interface Vlanif30
ipv6 enable
ipv6 address FC00:0:0:30::1/64
isis ipv6 enable 1
isis circuit-level level-2
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 30
#
return

l Configuration file of switch D


#
sysname switchD
#
vlan batch 30 40
#
isis 1
is-level level-2
network-entity 20.0000.0000.0001.00
#
ipv6 enable topology standard
#
#
interface Vlanif30
ipv6 enable
ipv6 address FC00:0:0:30::2/64
isis ipv6 enable 1
#
interface Vlanif40
ipv6 enable
ipv6 address FC00:0:0:20::1/64
isis ipv6 enable 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
return

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 624


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

9 BGP Configuration

About This Chapter

The Border Gateway Protocol (BGP) is used between Autonomous Systems (ASs) to transmit
routing information. BGP applies to large and complex networks.

9.1 Overview of BGP


9.2 Understanding BGP
9.3 Summary of BGP Configuration Tasks
9.4 Licensing Requirements and Limitations for BGP
9.5 Default Settings for BGP
9.6 Configuring Basic BGP Functions
9.7 Configuring BGP Security
9.8 Simplifying IBGP Network Connections
9.9 Configuring BGP Route Selection and Load Balancing
9.10 Controlling the Receiving and Advertisement of BGP Routes
9.11 Adjusting the BGP Network Convergence Speed
9.12 Configuring BGP Reliability
9.13 Configuring BGP Route Summarization
9.14 Configuring BGP to Advertise Default Routes to Peers
9.15 Configuring MP-BGP
9.16 Configuring BMP
9.17 Maintaining BGP
9.18 Configuration Examples for BGP

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 625


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

9.1 Overview of BGP

Definition
The Border Gateway Protocol (BGP) is a path vector protocol that allows devices between
Autonomous Systems (ASs) to communicate and selects optimal routes. BGP-1 (defined in
RFC 1105), BGP-2 (defined in RFC 1163), and BGP-3 (defined in RFC 1267) are three
earlier versions of BGP. BGP-4 (defined in RFC 1771) has been used since 1994. Since 2006,
unicast IPv4 networks have been using BGP-4 defined in RFC 4271, and other networks
(such as IPv6 networks) have been using MP-BGP defined in RFC 4760.

MP-BGP is an extension of BGP-4 and applies to different networks; however, the original
message exchange and routing mechanisms of BGP-4 are not changed. MP-BGP applications
on IPv6 unicast and IPv4 multicast networks are called BGP4+ and Multicast BGP (MBGP)
respectively.

Purpose
A network is divided into different ASs to facilitate the management over the network. In
1982, the Exterior Gateway Protocol (EGP) was developed to dynamically exchange routing
information between ASs. EGP advertises only reachable routes but does not select optimal
routes or prevent routing loops. Therefore, EGP cannot meet network management
requirements.

BGP was designed to replace EGP. Different from EGP, BGP can select optimal routes,
prevent routing loops, transmit routing information efficiently, and maintain a large number of
routes.

Although BGP is used to transmit routing information between ASs, BGP is not the best
choice in some scenarios. For example, on the egress connecting a data center to the Internet,
static routes instead of BGP are used to prevent a huge number of Internet routes from
affecting the data center internal network.

Benefits
BGP ensures high network security, flexibility, stability, reliability, and efficiency:
l BGP uses authentication and Generalized TTL Security Mechanism (GTSM) to ensure
network security.
l BGP provides routing policies to allow for flexible route selection.
l BGP provides 9.2.8 Route Summarization and 9.2.9 Route Dampening to prevent
route flapping and improve network stability.
l BGP uses the Transport Control Protocol (TCP) with port number 179 as the transport
layer protocol and supports 9.2.11 BFD for BGP, 9.2.12 BGP Auto FRR, and 9.2.13
BGP GR and NSR to improve network reliability.

9.2 Understanding BGP

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 626


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

9.2.1 Basic Concepts of BGP

Autonomous System
An Autonomous System (AS) is a group of Internet Protocol (IP) networks that are controlled
by one entity, typically an Internet service provider (ISP), and that have the same routing
policy. Each AS is assigned a unique AS number, which identifies an AS on a BGP network.
Two types of AS numbers are available: 2-byte AS numbers and 4-byte AS numbers. A 2-
byte AS number ranges from 1 to 65535, and a 4-byte AS number ranges from 1 to
4294967295. Devices supporting 4-byte AS numbers are compatible with devices supporting
2-byte AS numbers.

BGP Classification
As shown in Figure 9-1, BGP is classified into two types according to where it runs: Internal
BGP (IBGP) and External BGP (EBGP).

Figure 9-1 BGP operating mode

AS200

IBGP
EBGP EBGP

AS100 AS300
Internet

l EBGP: runs between ASs. To prevent routing loops between ASs, a BGP device discards
the routes with the local AS number when receiving the routes from EBGP peers.
l IBGP: runs within an AS. To prevent routing loops within an AS, a BGP device does not
advertise the routes learned from an IBGP peer to the other IBGP peers and establishes
full-mesh connections with all the IBGP peers. To address the problem of too many
IBGP connections between IBGP peers, BGP uses 9.2.6 Route Reflector and 9.2.7 BGP
Confederation.
NOTE
If a BGP device needs to advertise the route received from an EBGP peer outside an AS through
another BGP device, IBGP is recommended.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 627


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Device Roles in BGP Message Exchange


There are two device roles in BGP message exchange:

l Speaker: The device that sends BGP messages is called a BGP speaker. The speaker
receives and generates new routes, and advertises the routes to other BGP speakers.
l Peer: The speakers that exchange messages with each other are called BGP peers. A
group of peers sharing the same policies can form a peer group.

BGP Router ID
The BGP router ID is a 32-bit value that is often represented by an IPv4 address to identify a
BGP device. It is carried in the Open message sent during the establishment of a BGP session.
When two BGP peers need to establish a BGP session, they each require a unique router ID.
Otherwise, the two peers cannot establish a BGP session.

The BGP router ID of a device must be unique on a BGP network. It can be manually
configured or selected from IPv4 addresses on the device. By default, an IPv4 address of a
loopback interface on a device is used as the BGP router ID. If no loopback interface is
configured on the device, the system selects the largest IPv4 address from all IPv4 addresses
of interfaces as the BGP router ID. Once the BGP router ID is selected, the system retains this
router ID even if a larger IPv4 address is configured on the device later. The system changes
the BGP router ID only when the corresponding IPv4 address is deleted.

9.2.2 BGP Fundamentals

BGP peer establishment, update, and deletion involve five types of messages, six state
machine states, and five route exchange rules.

BGP Messages
BGP peers exchange the following messages, among which Keepalive messages are
periodically sent and other messages are triggered by events.

l Open message: is used to establish BGP peer relationships.


l Update message: is used to exchange routes between BGP peers.
l Notification message: is used to terminate BGP connections.
l Keepalive message: is used to maintain BGP connections.
l Route-refresh message: is used to request the peer to resend routes if routing policies are
changed. Only the BGP devices supporting route-refresh can send and respond to Route-
refresh messages.

BGP State Machine


As shown in Figure 9-2, a BGP device uses a finite state machine (FSM) to determine its
operations with peers. The FSM has six states: Idle, Connect, Active, OpenSent,
OpenConfirm, and Established. Three common states are involved in BGP peer
establishment: Idle, Active, and Established.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 628


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Figure 9-2 BGP state machine

Idle

Connect Retry Start


Timeout
Error
Connect
TCP Failed
TCP
Active Established

Error
OpenSent
TCP
Established Receive
Correct Open
Error
OpenConfirm

Receive Correct
Keepalive
Error
Issue 06 (2018-11-26) Established
Copyright © Huawei Technologies Co., Ltd. 629
CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

1. The Idle state is the initial BGP state. In Idle state, the BGP device refuses all connection
requests from neighbors. The BGP device initiates a TCP connection with its BGP peer
and changes its state to Connect only after receiving a Start event from the system.
NOTE

l The Start event occurs when an operator configures a BGP process or resets an existing BGP
process or when the router software resets a BGP process.
l If an error occurs at any state of the FSM, for example, the BGP device receives a Notification
message or TCP connection termination notification, the BGP device returns to the Idle state.
2. In Connect state, the BGP device starts the Connect Retry timer and waits to establish a
TCP connection.
– If the TCP connection is established, the BGP device sends an Open message to the
peer and changes to the OpenSent state.
– If the TCP connection fails to be established, the BGP device moves to the Active
state.
– If the BGP device does not receive a response from the peer before the Connect
Retry timer expires, the BGP device attempts to establish a TCP connection with
another peer and stays in Connect state.
3. In Active state, the BGP device keeps trying to establish a TCP connection with the peer.
– If the TCP connection is established, the BGP device sends an Open message to the
peer, closes the Connect Retry timer, and changes to the OpenSent state.
– If the TCP connection fails to be established, the BGP device stays in Active state.
– If the BGP device does not receive a response from the peer before the Connect
Retry timer expires, the BGP device returns to the Connect state.
4. In OpenSent state, the BGP device waits for an Open message from the peer and then
checks the validity of the received Open message, including the AS number, version, and
authentication password.
– If the received Open message is valid, the BGP device sends a Keepalive message
and changes to the OpenConfirm state.
– If the received Open message is invalid, the BGP device sends a Notification
message to the peer and returns to the Idle state.
5. In OpenConfirm state, the BGP device waits for a Keepalive or Notification message
from the peer. If the BGP device receives a Keepalive message, it transits to the
Established state. If it receives a Notification message, it returns to the Idle state.
6. In Established state, the BGP device exchanges Update, Keepalive, Route-refresh, and
Notification messages with the peer.
– If the BGP device receives a valid Update or Keepalive message, it considers that
the peer is working properly and maintains the BGP connection with the peer.
– If the BGP device receives an invalid Update or Keepalive message, it sends a
Notification message to the peer and returns to the Idle state.
– If the BGP device receives a Route-refresh message, it does not change its status.
– If the BGP device receives a Notification message, it returns to the Idle state.
– If the BGP device receives a TCP connection termination notification, it terminates
the TCP connection with the peer and returns to the Idle state.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 630


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Route Exchange Rules


A BGP device adds optimal routes to the BGP routing table to generate BGP routes. After
establishing a BGP peer relationship with a peer, the BGP device follows the following rules
to exchange routes with the peer:

l Advertises the BGP routes received from IBGP peers only to its EBGP peers.
l Advertises the BGP routes received from EBGP peers to its EBGP peers and IBGP
peers.
l Advertises the optimal route to its peers when there are multiple valid routes to the same
destination.
l Sends only updated BGP routes when BGP routes change.
l Accepts all the routes sent from its peers.

9.2.3 Interaction Between BGP and an IGP

BGP and Interior Gateway Protocols (IGPs) use different routing tables. To enable different
ASs to communicate, you need to configure interaction between BGP and IGPs so that BGP
routes can be imported into IGP routing tables and IGP routes can also be imported into BGP
routing tables.

Importing IGP Routes into BGP Routing Tables


BGP does not discover routes and so needs to import the routes discovered by IGPs into BGP
routing tables so that different ASs can communicate. When an AS needs to advertise routes
to another AS, an Autonomous System Boundary Router (ASBR) imports IGP routes into its
BGP routing table. To better plan the network, you can use routing policies to filter routes and
set route attributes when BGP imports IGP routes. Alternatively, you can set the multi-exit
discriminator (MED) to help EBGP peers select the best path for traffic entering an AS.

BGP imports routes in either import or network mode:

l In import mode, BGP imports IGP routes, including RIP, OSPF, and IS-IS routes, into
BGP routing tables based on protocol type. To ensure the validity of imported IGP
routes, BGP can also import static routes and direct routes in import mode.
l In network mode, BGP imports the routes in the IP routing table one by one into BGP
routing tables. The network mode is more accurate than the import mode.

Importing BGP Routes into IGP Routing Tables


When an AS needs to import routes from another AS, an ASBR imports BGP routes into its
IGP routing table. To prevent a large number of BGP routes from affecting devices within the
AS, IGPs can use routing policies to filter routes and set route attributes when importing BGP
routes.

9.2.4 BGP Security

BGP uses authentication, Generalized TTL Security Mechanism (GTSM), and Resource
Public Key Infrastructure (RPKI) to ensure exchange security between BGP peers.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 631


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

BGP Authentication
BGP authentication includes Message Digest 5 (MD5) authentication and keychain
authentication, which improve communication security between BGP peers. In MD5
authentication, you can only set the authentication password for a TCP connection. In
keychain authentication, you can set the authentication password for a TCP connection and
authenticate BGP messages.

BGP GTSM
BGP GTSM checks whether the time to live (TTL) value in the IP packet header is within a
predefined range and permits or discards the packets of which the TTL values are out of the
predefined range. In this way, BGP GTSM protects services above the IP layer and enhances
system security.

Assume that the TTL value range of packets from BGP peers is set to 254-255. When an
attacker forges valid BGP packets and keeps sending these packets to attack a device, the TTL
values of these packets are smaller than 254. If BGP GTSM is disabled on the device, the
device finds that these packets are destined for itself and sends the packets to the control plane
for processing. Then the control plane needs to process a large number of such attack packets,
causing high CPU usage. If BGP GTSM is enabled on the device, the system checks the TTL
values in all BGP packets and discards the attack packets of which the TTL values are smaller
than 254. This prevents network attack packets from consuming CPU resources.

9.2.5 BGP Route Selection Rules and Load Balancing

There may be multiple routes to the same destination in a BGP routing table. BGP will select
one route as the optimal route and advertise it to peers. To select the optimal route among
these routes, BGP compares the BGP attributes of the routes in sequence based on route
selection rules.

BGP Attributes
Route attributes describe routes. BGP route attributes are classified into the following types.
Table 9-1 lists common BGP attributes.

l Well-known mandatory attribute


All BGP devices can identify this type of attributes, which must be carried in Update
messages. Without this type of attributes, errors occur in routing information.
l Well-known discretionary attribute
All BGP devices can identify this type of attributes, which are optional in Update
messages. Without this type of attributes, errors do not occur in routing information.
l Optional transitive attribute
BGP devices may not identify this type of attributes but still accept them and advertise
them to peers.
l Optional non-transitive attribute
BGP devices may not identify this type of attributes. If a BGP device does not identify
this type of attributes, it ignores them and does not advertise them to peers.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 632


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Table 9-1 Common BGP attributes


Attribute Type

Origin Well-known mandatory

AS_Path Well-known mandatory

Next_Hop Well-known mandatory

Local_Pref Well-known discretionary

Community Optional transitive

MED Optional non-transitive

Originator_ID Optional non-transitive

Cluster_List Optional non-transitive

The following describes common BGP route attributes:


l Origin
The Origin attribute defines the origin of a route and marks the path of a BGP route. The
Origin attribute is classified into three types:
– IGP
A route with IGP as the Origin attribute is of the highest priority. The Origin
attribute of the routes imported into a BGP routing table using the network
command is IGP.
– EGP
A route with EGP as the Origin attribute is of the second highest priority. The
Origin attribute of the routes obtained through EGP is EGP.
– Incomplete
A route with Incomplete as the Origin attribute is of the lowest priority. The Origin
attribute of the routes learned by other means is Incomplete. For example, the
Origin attribute of the routes imported by BGP using the import-route command is
Incomplete.
l AS_Path
The AS_Path attribute records all the ASs that a route passes through from the source to
the destination in the vector order. To prevent inter-AS routing loops, a BGP device does
not receive the routes of which the AS_Path list contains the local AS number.
When a BGP speaker advertises an imported route:
– If the route is advertised to EBGP peers, the BGP speaker creates an AS_Path list
containing the local AS number in an Update message.
– If the route is advertised to IBGP peers, the BGP speaker creates an empty AS_Path
list in an Update message.
When a BGP speaker advertises a route learned in the Update message sent by another
BGP speaker:
– If the route is advertised to EBGP peers, the BGP speaker adds the local AS number
to the leftmost of the AS_Path list. According to the AS_Path list, the BGP speaker

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 633


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

that receives the route can learn about the ASs through which the route passes to
reach the destination. The number of the AS that is nearest to the local AS is placed
on the top of the AS_Path list. The other AS numbers are listed according to the
sequence in which the route passes through ASs.
– If the route is advertised to IBGP peers, the BGP speaker does not change the
AS_Path attribute of the route.
l Next_Hop
The Next_Hop attribute records the next hop that a route passes through. The Next_Hop
attribute of BGP is different from that of an IGP because it may not be the neighbor IP
address. A BGP speaker processes the Next_Hop attribute based on the following rules:
– When advertising a route to an EBGP peer, the BGP speaker sets the Next_Hop
attribute of the route to the address of the local interface through which the BGP
peer relationship is established with the peer.
– When advertising a locally originated route to an IBGP peer, the BGP speaker sets
the Next_Hop attribute of the route to the address of the local interface through
which the BGP peer relationship is established with the peer.
– When advertising a route learned from an EBGP peer to an IBGP peer, the BGP
speaker does not change the Next_Hop attribute of the route.
l Local_Pref
The Local_Pref attribute indicates the BGP preference of a device and helps determine
the optimal route when traffic leaves an AS. When a BGP device obtains multiple routes
to the same destination address but with different next hops from different IBGP peers,
the BGP device prefers the route with the highest Local_Pref value. The Local_Pref
attribute is exchanged only between IBGP peers and is not advertised to other ASs. The
Local_Pref attribute can be manually configured. If no Local_Pref attribute is configured
for a route, the Local_Pref attribute of the route uses the default value 100.
l MED
The multi-exit discriminator (MED) attribute helps determine the optimal route when
traffic enters an AS. When a BGP device obtains multiple routes to the same destination
address but with different next hops from EBGP peers, the BGP device selects the route
with the smallest MED value as the optimal route.
The MED attribute is exchanged only between two neighboring ASs. The AS that
receives the MED attribute does not advertise it to any other ASs. The MED attribute can
be manually configured. If no MED attribute is configured for a route, the MED attribute
of the route uses the default value 0.
l Community
The Community attribute identifies the BGP routes with the same characteristics,
simplifies the applications of routing policies, and facilitates route maintenance and
management.
The Community attribute includes self-defined community attributes and well-known
community attributes. Table 9-2 lists well-known community attributes.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 634


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Table 9-2 Well-known community attributes


Community Value Description
Attribute

Internet 0 (0x00000000) A BGP device can advertise the received


route with the Internet attribute to all peers.

No_Advertise 4294967042 A BGP device does not advertise the


(0xFFFFFF02) received route with the No_Advertise
attribute to any peer.

No_Export 4294967041 A BGP device does not advertise the


(0xFFFFFF01) received route with the No_Export attribute
to devices outside the local AS.

No_Export_Subco 4294967043 A BGP device does not advertise the


nfed (0xFFFFFF03) received route with the
No_Export_Subconfed attribute to devices
outside the local AS or to devices outside
the local sub-AS.

l Originator_ID and Cluster_List


The Originator_ID attribute and Cluster_List attribute help eliminate loops in route
reflector scenarios. For details, see 9.2.6 Route Reflector.

BGP Route Selection Policies


When there are multiple routes to the same destination, BGP compares the following
attributes in sequence to select the optimal route:
1. Prefers the route with the largest PrefVal value.
The PrefVal attribute is a Huawei proprietary attribute and is valid only on the device
where it is configured.
2. Prefers the route with the highest Local_Pref value.
If a route does not have the Local_Pref attribute, the Local_Pref attribute of the route
uses the default value 100.
3. Prefers the manually summarized route, automatically summarized route, route imported
using the network command, route imported using the import-route command, and
route learned from peers. These routes are in descending order of priority.
4. Prefers the route with the shortest AS_Path.
5. Prefers the route whose Origin attribute is of the highest priority. The three types of
Origin attributes are listed as follows in descending order of priority: IGP, EGP, and
Incomplete.
6. Prefers the route with the lowest MED value if routes are received from the same AS.
7. Prefers EBGP routes, IBGP routes, LocalCross routes, and RemoteCross routes, which
are listed in descending order of priority.
LocalCross allows a PE to add the VPNv4 route of a VPN instance to the routing table of
the VPN instance if the export RT of the VPNv4 route matches the import RT of another
VPN instance on the PE. RemoteCross allows a local PE to add the VPNv4 route learned
from a remote PE to the routing table of a VPN instance on this local PE if the export RT
of the VPNv4 route matches the import RT of the VPN instance.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 635


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

8. Prefers the route with the lowest IGP metric to the BGP next hop.
NOTE

If there are multiple routes to the same destination, an IGP calculates the route metric using its
routing algorithm.
9. Prefers the route with the shortest Cluster_List.
10. Prefers the route advertised by the device with the smallest router ID.
If a route carries the Originator_ID attribute, BGP prefers the route with the smallest
Originator_ID without comparing the router ID.
11. Prefers the route learned from the peer with the lowest IP address.

BGP Load Balancing


When there are multiple equal-cost routes to the same destination, you can perform load
balancing among these routes to load balance traffic. Equal-cost BGP routes can be generated
for traffic load balancing only when the first eight route attributes described in "BGP Route
Selection Policies" are the same among the routes.

9.2.6 Route Reflector


To ensure connectivity between IBGP peers, you need to establish full-mesh connections
between IBGP peers. If there are n devices in an AS, n(n-1)/2 IBGP connections need to be
established. When there are a large number of devices, many network resources and CPU
resources are consumed. A route reflector (RR) can be used between IBGP peers to solve this
problem.

Roles in RR
As shown in Figure 9-3, the following roles are involved in RR scenarios in an AS.

Figure 9-3 Networking diagram of the RR

Route Reflector Non-Client


IBGP IBGP

Client1
Cluster1 IBGP
IBGP

AS65000
Client2 Client3

l Route reflector (RR): a BGP device that can reflect the routes learned from an IBGP peer
to other IBGP peers. An RR is similar to a designated router (DR) on an OSPF network.
l Client: an IBGP device of which routes are reflected by the RR to other IBGP devices. In
an AS, clients only need to directly connect to the RR.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 636


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

l Non-client: an IBGP device that is neither an RR nor a client. In an AS, a non-client


must establish full-mesh connections with the RR and all the other non-clients.
l Originator: a device that originates routes in an AS. The Originator_ID attribute helps
eliminate routing loops in a cluster.
l Cluster: a set of the RR and clients. The Cluster_List attribute helps eliminate routing
loops between clusters.

RR Principles
Clients in a cluster only need to exchange routing information with the RR in the same
cluster. Therefore, clients only need to establish IBGP connections with the RR. This reduces
the number of IBGP connections in the cluster. As shown in Figure 9-3, in AS 65000,
Cluster1 is comprised of an RR and three clients. The number of IBGP connections in AS
65000 is then reduced from 10 to 4, which simplifies the device configuration and reduces the
loads on the network and CPU.
The RR allows a BGP device to advertise the BGP routes learned from an IBGP peer to other
IBGP peers, and uses the Cluster_List and Originator_ID attributes to eliminate routing loops.
The RR advertises routes to IBGP peers based on the following rules:
l The RR advertises the routes learned from a non-client to all the clients.
l The RR advertises the routes learned from a client to all the other clients and all the non-
clients.
l The RR advertises the routes learned from an EBGP peer to all the clients and non-
clients.

Cluster_List Attribute
An RR and its clients form a cluster, which is identified by a unique cluster ID in an AS. To
prevent routing loops between clusters, an RR uses the Cluster_List attribute to record the
cluster IDs of all the clusters that a route passes through.
l When a route is reflected by an RR for the first time, the RR adds the local cluster ID to
the top of the cluster list. If there is no cluster list, the RR creates a Cluster_List attribute.
l When receiving an updated route, the RR checks the cluster list of the route. If the
cluster list contains the local cluster ID, the RR discards the route. If the cluster list does
not contain the local cluster ID, the RR adds the local cluster ID to the cluster list and
then reflects the route.

Backup RR
To ensure network reliability and prevent single points of failures, redundant RRs are required
in a cluster. An RR allows a BGP device to advertise the routes received from an IBGP peer
to other IBGP peers. Therefore, routing loops may occur between RRs in the same cluster. To
solve this problem, all the RRs in the cluster must use the same cluster ID.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 637


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Figure 9-4 Backup RR

RR1 RR2
IBGP

Cluster
IBGP IBGP IBGP

Client1 Client2 Client3


AS65000

As shown in Figure 9-4, RR1 and RR2 reside in the same cluster and have the same cluster
ID configured.
l When Client1 receives an updated route from an EBGP peer, Client1 advertises this
route to RR1 and RR2 using IBGP.
l After RR1 and RR2 receive this route, they add the local cluster ID to the top of the
cluster list of the route and then reflect the route to other clients (Client2 and Client3)
and to each other.
l After RR1 and RR2 receive the reflected route from each other, they check the cluster
list of the route, finding that the cluster list contains their local cluster IDs. RR1 and RR2
discard this route to prevent routing loops.

RRs of Multiple Clusters in an AS


There may be multiple clusters in an AS. RRs of the clusters establish IBGP peer
relationships. When RRs reside at different network layers, an RR at the lower network layer
can be configured as a client to implement hierarchical RR. When RRs reside at the same
network layer, RRs of different clusters can establish full-mesh connections to implement flat
RR.
Hierarchical RR

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 638


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Figure 9-5 Hierarchical RR

ISP

EBGP EBGP

RR-1 RR-1

Client/
Cluster1 RR-2
Client
Cluster2
AS100
Client Client

In practice, hierarchical RR is often used. As shown in Figure 9-5, the ISP provides Internet
routes to AS 100. AS 100 is divided into two clusters, Cluster1 and Cluster2. Four devices in
Cluster1 are core routers and use a backup RR to ensure reliability.
Flat RR

Figure 9-6 Flat RR

Cluster 4
Cluster 3
Client Client Client Client
Client

Client RR
RR

RR RR Client

Client
Client Client Client
AS100 Cluster 1 Cluster 2

As shown in Figure 9-6, the backbone network is divided into multiple clusters. RRs of the
clusters are non-clients and establish full-mesh connections with each other. Although each

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 639


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

client only establishes an IBGP connection with its RR, all the RRs and clients can receive all
routing information.

9.2.7 BGP Confederation

In addition to a route reflector, the confederation is another method that reduces the number of
IBGP connections in an AS. A confederation divides an AS into sub-ASs. Full-mesh IBGP
connections are established in each sub-AS. EBGP connections are established between sub-
ASs. ASs outside a confederation still consider the confederation as an AS. After a
confederation divides an AS into sub-ASs, it assigns a confederation ID (the AS number) to
each router within the AS. This brings two benefits. First, original IBGP attributes are
retained, including the Local_Pref attribute, MED attribute, and Next_Hop attribute.
Secondly, confederation-related attributes are automatically deleted when being advertised
outside a confederation. Therefore, the administrator does not need to configure the rules for
filtering information such as sub-AS numbers at the egress of a confederation.

Figure 9-7 Networking diagram of a confederation

EBGP EBGP

IBGP IBGP AS65003

AS65001 AS65002 AS100

As shown in Figure 9-7, AS 100 is divided into three sub-ASs after a confederation is
configured: AS65001, AS65002, and AS65003. The AS number AS 100 is used as the
confederation ID. The number of IBGP connections in AS 100 is then reduced from 10 to 4,
which simplifies the device configuration and reduces the loads on the network and CPU. In
addition, BGP devices outside AS 100 only know the existence of AS 100 but not the
confederation within AS 100. Therefore, the confederation does not increase the CPU load.

Comparisons Between a Route Reflector and a Confederation


Table 9-3 compares a route reflector and a confederation in terms of the configuration, device
connection, and applications.

Table 9-3 Comparisons between a route reflector and a confederation

Route Reflector Confederation

Retains the existing network topology and Requires the logical topology to be changed.
ensures compatibility.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 640


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Route Reflector Confederation

Requires only a route reflector to be Requires all devices to be reconfigured.


configured because clients do not need to
know that they are clients of a route
reflector.

Requires full-mesh connections between Does not require full-mesh connections


clusters. between sub-ASs of a confederation
because the sub-ASs are special EBGP
peers.

Applies to medium and large networks. Applies to large networks.

9.2.8 Route Summarization


The BGP routing table of each device on a large network is large. This burdens devices,
increases the route flapping probability, and affects network stability.
Route summarization is a mechanism that combines multiple routes into one route. This
mechanism allows a BGP device to advertise only the summarized route but not all the
specific routes to peers, therefore reducing the size of the BGP routing table. If the
summarized route flaps, the network is not affected, so network stability is improved.
BGP supports automatic summarization and manual summarization on IPv4 networks, and
supports only manual summarization on IPv6 networks.
l Automatic summarization: summarizes the routes imported by BGP. After automatic
summarization is configured, BGP summarizes routes based on the natural network
segment and advertises only the summarized route to peers. For example, BGP
summarizes [Link]/24 and [Link]/24 (two Class A addresses with a non-natural
mask) into [Link]/8 (Class A address with a natural mask).
l Manual summarization: summarizes routes in the local BGP routing table. Manual
summarization can help control the attributes of the summarized route and determine
whether to advertise specific routes.
To prevent routing loops caused by route summarization, BGP uses the AS_Set attribute. The
AS_Set attribute is an unordered set of all ASs that a route passes through. When the
summarized route enters an AS in the AS_Set attribute again, BGP finds that the local AS
number has been recorded in the AS_Set attribute of the route and discards this route to
prevent a routing loop.

9.2.9 Route Dampening


When BGP is used on complex networks, route flapping occurs frequently. To prevent
frequent route flapping, BGP uses route dampening to suppress unstable routes.
Route flapping is a process of adding a route to an IP routing table and then withdrawing this
route. When route flapping occurs, a BGP device sends an Update message to its neighbors.
The devices that receive the Update message need to recalculate routes and modify routing
tables. Frequent route flapping consumes lots of bandwidths and CPU resources and even
affects normal network operation.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 641


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Figure 9-8 Networking diagram of BGP route dampening

Penalty value

Suppress value

Reuse value
Suppress time

Time

Half-life

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 642


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Route dampening measures the stability of a route using a penalty value. A larger penalty
value indicates a less stable route. As shown in Figure 9-8, each time route flapping occurs,
BGP increases the penalty of this route by a value of 1000. When the penalty value of a route
exceeds the suppression threshold, BGP suppresses this route, and does not add it to the IP
routing table or advertise any Update message to peers. After a route is suppressed for a
period of time (half life), the penalty value is reduced by half. When the penalty value of a
route decreases to the reuse threshold, the route is reusable and is added to the routing table.
At the same time, BGP advertises an Update message to peers. The suppression time is the
period from when a route is suppressed to when the route is reusable.

Route dampening applies only to EBGP routes but not IBGP routes. IBGP routes may include
the routes of the local AS, and an IGP network requires that the routing tables of devices
within an AS be the same. If IBGP routes were dampened, routing tables on devices are
inconsistent when these devices have different dampening parameters. Therefore, route
dampening does not apply to IBGP routes.

9.2.10 BMP
The BGP Monitoring Protocol (BMP) is designed to monitor BGP running status, such as
BGP peer relationship establishment and termination and route updates.

Without BMP, manual query is required if you want to know about BGP running status. With
BMP, a router can be connected to a monitoring server and configured to report BGP routing
information, device vendor information and version, and BGP peer information to the server
for monitoring, which improves the network monitoring efficiency. BMP facilitates the
monitoring of BGP running status and reports security threats in real time so that preventive
measures can be taken promptly.

BMP Messages
Routers send BMP packets carrying Initiation, Peer Up Notification (PU), Route Monitoring
(RM), Peer Down Notification (PD), Status Report (SR), or Termination messages to the
monitoring server to report BGP running statistics. The functions of these messages are listed
as follows:

l Initiation message: Reports to the monitoring server such information as the router
vendor and its software version.
l PU message: Notifies the monitoring server that a BGP peer relationship has been
established.
l RM message: Sends to the monitoring server all routes received from BGP peers and
notifies the server of route addition or deletion in real time.
l PD message: Notifies the monitoring server that a BGP peer has been disconnected.
l SR message: Reports router running statistics to the monitoring server.
l Termination message: Reports to the monitoring server the cause of BMP session
termination.
NOTE

BMP sessions are unidirectional. Routers send messages to the monitoring server but ignore messages
replied by the server.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 643


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Implementation
In Figure 9-9, a TCP connection is established between the monitoring server and PE1 and
between the monitoring server and PE2. PE1 and PE2 send unsolicited BMP packets to the
monitoring server to report BGP running statistics. After receiving these BMP packets, the
monitoring server parses them and displays the BGP running status in the monitoring view.
The BMP packets carry headers. By analyzing the headers, the monitoring server can decide
which BGP peers have advertised the routes carried in these packets.

When establishing a connection between a router and a monitoring server, note the following
rules:

l You can specify a port for the TCP connection between the router and the monitoring
server.
l One router can connect to multiple monitoring servers, and one monitoring server can
also connect to multiple routers.
l In each BMP instance, one router can connect to only one monitoring server.
l The monitoring server monitors all BGP peers. Specifying the BGP peer to be monitored
is not supported.

Figure 9-9 Networking with BMP


Monitoring
server

PE2

P P CE2

CE1 PE1 P P

BGP running statistics

9.2.11 BFD for BGP

BGP periodically sends messages to peers to detect the status of the peers. It takes more than
1 second for this detection mechanism to detect a fault. When data is transmitted at gigabit
rates, long-time fault detection will cause packet loss. This cannot meet high reliability
requirements of networks. Bidirectional Forwarding Detection (BFD) provides the
millisecond-level fault detection for BGP to improve network reliability.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 644


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Figure 9-10 Networking diagram of BFD for BGP

EBGP
AS100 AS200
RouterA RouterB

As shown in Figure 9-10, RouterA belongs to AS 100 and RouterB belongs to AS 200.
RouterA and RouterB are directly connected and establish the EBGP peer relationship. BFD
for BGP is configured on RouterA and RouterB. When a fault occurs on the link between
RouterA and RouterB, BFD can rapidly detect that the BFD session changes from Up to
Down and notify RouterA and RouterB of this fault. RouterA and RouterB process the
neighbor Down event and select routes again using BGP.

9.2.12 BGP Auto FRR


BGP Auto Fast Reroute (FRR) is a protection measure against link failures. It applies to the
network topology with primary and backup links and provides sub-second-level switching
between two BGP peers or two next hops.
After BGP Auto FRR is enabled on a device, the device selects the optimal route from the
routes that carry the same prefix and are learned from multiple peers as the primary link to
forward packets, and uses the second optimal route as the backup link. When the primary link
becomes faulty, the system rapidly responds to the notification that the BGP route becomes
unreachable, and then switches traffic from the primary link to the backup link. After BGP
convergence is complete, BGP Auto FRR uses the optimal route selected by BGP to guide
traffic forwarding. For details about Auto FRR, see "Auto FRR" in Feature Description - IP
Routing.

Application Scenarios
As shown in Figure 9-11, RouterD advertises a learned BGP route to RouterB and RouterC in
AS 100; RouterB and RouterC then advertise the BGP route to RouterA through a route
reflector. RouterA receives two routes whose next hops are RouterB and RouterC
respectively. Then RouterA selects a route according to the configured policy. Assume that
the route sent from RouterB, namely LinkB, is preferred. The route sent from RouterC,
namely LinkC, then functions as the backup link.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 645


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Figure 9-11 Networking diagram of BGP Auto FRR


Loopback1
[Link]/32
RR
Loopback1 RouterB
[Link]/32
LinkB

AS100 AS200
RouterA LinkC RouterD

RouterC
RR
Loopback1
[Link]/32

When a router along LinkB fails or faults occur on LinkB, the next hop of the route from
RouterA to RouterB becomes invalid. If BGP Auto FRR is enabled on RouterA, the
forwarding plane quickly switches traffic sent from RouterA to RouterD to LinkC. This
prevents traffic loss. In addition, RouterA reselects the route sent from RouterC and updates
the FIB table.

9.2.13 BGP GR and NSR


BGP graceful restart (GR) and non-stop routing (NSR) are high availability solutions that
minimize the impact of device failures on user services.

BGP GR
BGP GR ensures that the forwarding plane continues to guide data forwarding during a device
restart or active/standby switchover. The operations on the control plane, such as
reestablishing peer relationships and performing route calculation, do not affect the
forwarding plane. This mechanism prevents service interruptions caused by route flapping
and improves network reliability.
GR concepts are as follows:
l GR restarter: is the device that is restarted by the administrator or triggered by failures to
perform GR.
l GR helper: is the neighbor that helps the GR restarter to perform GR.
l GR time: is the time during which the GR helper retains forwarding information after
detecting the restart or active/standby switchover of the GR restarter.
The BGP GR process is as follows:
1. Using the BGP capability negotiation mechanism, the GR restarter and helper know each
other's GR capability and establish a GR session.
2. When detecting the restart or active/standby switchover of the GR restarter, the GR
helper does not delete the routing information and forwarding entries of the GR restarter

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 646


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

or notify other neighbors of the restart or switchover, but waits to reestablish a BGP
connection with the GR restarter.
3. The GR restarter reestablishes neighbor relationships with all GR helpers before the GR
time expires.

BGP NSR
NSR is a reliability technique that prevents neighbors from detecting the control plane
switchover. It applies to the devices that have the active and standby MPUs configured.
Compared to GR, NSR does not require the help of neighbors and does not need to deal with
interoperability issues. For details about NSR, see "NSR" in the Configuration Guide -
Reliability - Introduction to Reliability .

NOTE

NSR is enabled on the device by default and does not need to be configured.

Comparisons Between Active/Standby Switchovers with and Without GR and


NSR

Table 9-4 Comparisons between active/standby switchovers with and without GR and NSR

Active/Standby Active/Standby Active/Standby


Switchover Without GR Switchover in GR Mode Switchover in NSR
and NSR Mode

The BGP peer relationship The BGP peer relationship The BGP peer relationship
is reestablished. is reestablished. is reestablished.

Routes are recalculated. Routes are recalculated. Routes are recalculated.

The forwarding table The forwarding table The forwarding table


changes. remains unchanged. remains unchanged.

Traffic is lost during No traffic is lost during No traffic is lost during


forwarding, and services are forwarding, and services are forwarding, and services are
interrupted. not affected. not affected.

The network detects route Except the neighbors of the The network does not detect
changes, and route flapping device where the active/ route changes.
occurs for a short period of standby switchover occurs,
time. other routers do not detect
route changes.

- The GR restarter requires Neighbors do not need to


neighbors to support the GR support the NSR function.
helper function. The GR
helper function does not
allow multiple neighbors to
perform active/standby
switchovers in GR mode
simultaneously.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 647


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

9.2.14 BGP ORF

RFC 5291 and RFC 5292 define the prefix-based BGP outbound route filtering (ORF)
capability to advertise required BGP routes. BGP ORF allows a device to send prefix-based
import policies in a Route-refresh message to BGP peers. BGP peers construct export policies
based on these import policies to filter routes before sending these routes, which has the
following advantages:
l Prevents the local device from receiving a large number of unnecessary routes.
l Reduces CPU usage of the local device.
l Simplifies the configuration of BGP peers.
l Improves link bandwidth efficiency.

Application Scenarios
BGP ORF applies to the scenario where a device wants BGP peers to send only required
routes, and BGP peers do not want to maintain different export policies for different devices.

Figure 9-12 Inter-AS EBGP peers

AS 100 AS 200

RouterA RouterB

As shown in Figure 9-12, after negotiating the prefix-based ORF capability with RouterB,
RouterA adds the local prefix-based import policies to a Route-refresh message and sends the
message to RouterB. RouterB constructs export policies based on the received Route-refresh
message and sends required routes to RouterA using a Route-refresh message. RouterA
receives only required routes, and RouterB does not need to maintain routing policies. This
reduces the configuration workload.

Figure 9-13 Intra-AS route reflector

AS 100
RR

RouterA RouterB

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 648


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

As shown in Figure 9-13, there is a route reflector (RR) in AS 100. RouterA and RouterB are
the clients of the RR. RouterA, RouterB, and the RR negotiate the prefix-based ORF
capability. RouterA and RouterB then add the local prefix-based import policies to Route-
refresh messages and send the messages to the RR. The RR constructs export policies based
on the received import policies and reflects required routes in Route-refresh messages to
RouterA and RouterB. RouterA and RouterB receive only required routes, and the RR does
not need to maintain routing policies. This reduces the configuration workload.

9.2.15 Dynamic Update Peer-Groups


Currently, the rapid growth in the size of the routing table and the complexity of the network
topology require BGP to support more peers. Especially in the case of a large number of peers
and routes, high-performance grouping and forwarding are required when a router needs to
send routes to a large number of BGP peers, most of which share the same outbound policies.
The dynamic update peer-groups feature treats all the BGP peers with the same outbound
policies as an update-group. In this case, routes are grouped uniformly and then sent
separately. That is, each route to be sent is grouped once and then sent to all peers in the
update-group, improving grouping efficiency exponentially. For example, a route reflector
(RR) has 100 clients and needs to reflect 100,000 routes to these clients. If the RR sends the
routes grouped per peer to 100 clients, the total number of times that all routes are grouped is
10,000,000 (100,000 x 100). After the dynamic update peer-groups feature is used, the total
number of grouping times changes to 100,000 (100,000 x 1), improving grouping
performance by a factor of 100.

Application Scenarios
BGP uses the dynamic update peer-groups technology when a large number of peers and
routes exist and most peers share the same outbound policies, improving BGP route grouping
and forwarding performance. The dynamic update peer-groups feature applies to the
following scenarios:
l International gateway
As shown in Figure 9-14, the Internet gateway (IGW) router sends routes to all
neighboring ASs. If the IGW router supports the dynamic update peer-groups feature, its
BGP route forwarding performance will be greatly improved.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 649


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Figure 9-14 Networking diagram of the international gateway

AS1000
AS200
AS65001

AS30
Internet Route
IGW
Router

AS100

AS65002

AS120

l RR
As shown in Figure 9-15, RRs send routes to all clients. If the RRs support the dynamic
update peer-groups feature, their BGP route forwarding performance will be greatly
improved.

Figure 9-15 Networking diagram of RRs

AS100
RR1 RR2

IBGP IBGP

Client Client Client Client Client Client

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 650


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

l ASBR
As shown in Figure 9-16, RouterB, as an Autonomous System Boundary Router
(ASBR), sends all the routes received from an EBGP peer RouterA to all IBGP peers. If
RouterB supports the dynamic update peer-groups feature, its BGP route forwarding
performance will be greatly improved.

Figure 9-16 Networking diagram of a PE connecting to multiple IBGP peers

AS200
RouterC
IBGP
AS100 RouterD

RouterA
EBGP
RouterB RouterE
IBGP
RouterF

9.2.16 MP-BGP

Traditional BGP-4 manages only IPv4 routing information. Inter-AS transmission of other
network layer protocol packets (such as IPv6 and multicast packets) is limited. To support
multiple network layer protocols, Multiprotocol BGP (MP-BGP) is designed in RFC 4760 as
an extension to BGP-4. MP-BGP uses extended attributes and address families to support
IPv6, multicast, and VPN, without changing the existing BGP packet forwarding or routing
mechanism.

MP-BGP is called BGP4+ on IPv6 unicast networks or called Multicast BGP (MBGP) on
IPv4 multicast networks. MP-BGP establishes separate topologies for IPv6 unicast networks
and IPv4 multicast networks, and stores IPv6 unicast and IPv4 multicast routing information
in different routing tables. This ensures that routing information of IPv6 unicast networks and
IPv4 multicast networks is separated from each other, and allows routes of different networks
to be maintained using different routing policies.

Extended Attributes
In BGP, an Update message carries three IPv4-related attributes: NLRI, Next_Hop, and
Aggregator.

To support multiple network layer protocols, BGP requires NLRI and Next_Hop attributes to
carry information about network layer protocols. Therefore, MP-BGP uses the following new
optional non-transitive attributes:

l MP_REACH_NLRI: indicates the multiprotocol reachable NLRI. It is used to advertise


reachable routes and next hop information.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 651


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

l MP_UNREACH_NLRI: indicates the multiprotocol unreachable NLRI. It is used to


withdraw unreachable routes.

Address Families
MP-BGP uses address families to differentiate network layer protocols. Currently, devices
support the following address family views:
l BGP-IPv4 unicast address family view
l BGP-IPv4 multicast address family view
l BGP-VPN instance IPv4 address family view
l BGP-IPv6 unicast address family view
l BGP-VPN instance IPv6 address family view
l BGP-VPNv6 address family view

9.3 Summary of BGP Configuration Tasks


Table 9-5 describes the BGP configuration tasks.

NOTE

If BGP is configured on an IPv6 network, all the peer addresses specified in the Peer command must be
IPv6 addresses.

Table 9-5 BGP configuration tasks


Scenario Description Task

Configuring basic BGP The configuration of basic 9.6 Configuring Basic BGP
functions BGP functions is the Functions
foundation of the BGP
network construction and
the precondition for other
BGP functions.

Configuring BGP security On BGP networks, 9.7 Configuring BGP


unauthorized users can Security
attack the BGP network by
modifying data packets or
forging authorized users. To
ensure security of services
carried on BGP networks,
configure BGP MD5
authentication or BGP
keychain authentication.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 652


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Scenario Description Task

Simplifying IBGP network Because routes received 9.8 Simplifying IBGP


connections from an IBGP peer will not Network Connections
be sent to other IBGP peers,
fully-meshed connections
must be established on the
IBGP network. However,
when the number of devices
is large, peer configuration
is very complex on the
fully-meshed IBGP
network, and the
consumption of network
resources and device CPU
resources will increase. To
reduce the number of IBGP
network connections and
better plan the network,
configure the route reflector
and confederation.

Configuring BGP route In a BGP routing table, 9.9 Configuring BGP


selection and load balancing multiple routes to the same Route Selection and Load
destination may exist. To Balancing
guide route selection, BGP
defines next-hop policies
and route selection rules.
The priority of next-hop
policies is higher than that
of BGP route selection
rules. After the next-hop
policies are performed, BGP
selects routes according to
the route selection rules.
Usually there are multiple
valid routes to the same
destination on the network.
If BGP only advertises the
optimal route to its peer,
unbalanced traffic on
different routes will occur.
The BGP load-balancing
configuration can balance
load on different routes and
reduce network congestion.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 653


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Scenario Description Task

Controlling the advertising With the expansion of the 9.10 Controlling the
and receiving of BGP routes network scale, the sharp Receiving and
increase of routing tables Advertisement of BGP
leads to greater load on Routes
networks and increasing
network security problems.
To solve this problem, filter
routes according to the
routing policies and only
send and receive required
BGP routes. In addition,
multiple routes to the same
destination may exist. If
these routes need to pass
through different ASs, direct
service traffic to specific
ASs or filter the routes to be
advertised.

Adjusting the BGP network To enable BGP to rapidly 9.11 Adjusting the BGP
convergence speed detect network changes, Network Convergence
speed up the BGP network Speed
convergence. To minimize
the effect on networks from
route flapping and reduce
load on the device, slow
down the BGP network
convergence.

Configuring BGP reliability To avoid long service 9.12 Configuring BGP


interruption when faults Reliability
occur on BGP networks,
adopt the solution of
standby link. However, the
BGP mechanism requires
more than 1 second to detect
the faults and perform an
active/standby switchover.
To ensure that users of
delay-sensitive services such
as the voice service do not
detect the service
interruption, associate BGP
tracking, BGP, and BFD to
implement fast fault
detection, and meanwhile
use BGP Auto FRR and
BGP GR to perform a fast
switchover after the fault
detection.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 654


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Scenario Description Task

Configuring BGP route The BGP routing table on a 9.13 Configuring BGP
summarization medium or large BGP Route Summarization
network contains a large
number of routing entries.
Storing the routing table
consumes a large number of
memory resources, and
transmitting and processing
the routing information
consumes a large number of
network resources. Route
summarization can reduce
the size of a routing table,
prevent specific routes from
being advertised, and
minimize the impact of
route flapping on networks.
Although BGP automatic
route summarization is easy
to configure, it only
summarizes routes
according to the natural
network segment. BGP
manual route summarization
can be used with flexible
routing policies to enable
BGP to effectively transmit
and control routes.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 655


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Scenario Description Task

Configuring BGP to The BGP routing table on a 9.14 Configuring BGP to


advertise default routes to medium or large BGP Advertise Default Routes
peers network contains a large to Peers
number of routing entries.
Storing the routing table
consumes a large number of
memory resources, and
transmitting and processing
the routing information
consumes a large number of
network resources. If
multiple routes in a peer
BGP routing table are sent
only from a local device,
configure the local device to
send a default route to its
peer. In this case, the local
device will send a default
route with the next-hop
address as the local address
to its peer, regardless of
whether there is a default
route in the local routing
table. After the local device
is configured to send only
the default route to its peer
using the routing policies,
the number of network
routes is greatly reduced and
the peer memory resources
and network resources are
largely saved.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 656


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Scenario Description Task

Configuring MP-BGP Traditional BGP-4 only 9.15 Configuring MP-BGP


manages IPv4 unicast
routing information and
does not support route
transmission between ASs
of other networks such as
IPv6 and multicast
networks. To support
multiple types of network
layer protocols, the Internet
Engineering Task Force
(IETF) extends BGP-4 to
Multiprotocol Extensions
for BGP-4 (MP-BGP)
defined in RFC 4760. MP-
BGP is called BGP4+ on
IPv6 networks or Multicast
BGP (MBGP) on multicast
networks.

9.4 Licensing Requirements and Limitations for BGP

Involved Network Elements


Other network elements are required to support BGP.

Licensing Requirements
BGP4/BGP4+ feature is a basic feature of CE8800, CE7800, CE6800, and CE5800 series
switches and is not under license control.

Version Requirements

Table 9-6 Products and minimum version supporting BGP


Product Minimum Version Required

CE8868EI V200R005C10

CE8861EI V200R005C10

CE8860EI V100R006C00

CE8850-32CQ-EI V200R002C50

CE8850-64CQ-EI V200R005C00

CE7850EI V100R003C00

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 657


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Product Minimum Version Required

CE7855EI V200R001C00

CE6810EI V100R003C00

CE6850EI V100R001C00

CE6850-48S6Q-HI V100R005C00

CE6850-48T6Q-HI/CE6850U-HI/ V100R005C10
CE6851HI

CE6855HI V200R001C00

CE6856HI V200R002C50

CE6857EI V200R005C10

CE6860EI V200R002C50

CE6865EI V200R005C00

CE6870-24S6CQ-EI/ V200R001C00
CE6870-48S6CQ-EI

CE6870-48T6CQ-EI V200R002C50

CE6875EI V200R003C00

CE6880EI V200R002C50

CE5880EI V200R005C10

CE5810EI V100R002C00

CE5850EI V100R001C00

CE5850HI V100R003C00

CE5855EI V100R005C10

Feature Limitations
The CE6810LI does not support IPv4 or IPv6 Layer 3 forwarding. After the IPv4 or IPv6
function is enabled on an interface of the CE6810LI, the configured IPv4 or IPv6 address can
only be used to manage the switch.
In versions earlier than V200R002C50, the CE5855EI does not support IPv6. However,
interfaces on the CE5855EI provide the IPv6 capability when the switch functions as a leaf
switch in a super virtual fabric (SVF) system and the SVF forwarding mode is set to
centralized or hybrid. In V200R002C50 and later versions, the CE5855EI supports IPv6.
The CE5855EI does not support the BMP configuration.

9.5 Default Settings for BGP

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 658


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Table 9-7 describes the default settings for BGP.

Table 9-7 Default settings for BGP


Parameter Default Setting

BGP Disabled

Keepalive message interval 60s

Hold time 180s

9.6 Configuring Basic BGP Functions


Before building a BGP network, you need to configure basic BGP functions.

Pre-configuration Tasks
Before configuring basic BGP functions, complete the following task:
l Configuring IP addresses for interfaces to ensure network-layer communication between
neighbor nodes

Configuration Procedure
Perform the following operations in sequence and as required.

9.6.1 (Optional) Configuring the Format of BGP 4-Byte AS


Numbers
Context
By default, a BGP 4-byte AS number is displayed in dotted notation (x.y). To use integral 4-
byte AS numbers, perform this configuration task to display 4-byte AS numbers as integers.
Assume that a 4-byte AS number in dotted notation is x.y. Following is the conversion
relationship between an integral 4-byte AS number and a 4-byte AS number in dotted
notation:
Integral 4-byte AS number = x x 65536 + y
For example, if a 4-byte AS number in dotted notation is 2.3, the corresponding integral 4-
byte AS number is 131075 (2 x 65536 + 3).

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 659


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Changing the format of 4-byte AS numbers will affect matching results of AS_Path regular
expressions and extended community attribute filters. Therefore, if the system is using an
AS_Path regular expression or an extended community attribute filter as an import or export
policy, you must reconfigure an AS_Path regular expression using the ip as-path-filter
command or an extended community attribute filter using the ip extcommunity-filter
command after changing the format of 4-byte AS numbers. This reconfiguration ensures that
routes match the import or export policy.
l If integral 4-byte AS numbers are configured, you must change 4-byte AS numbers in
AS_Path regular expressions and extended community attribute filters to integral 4-byte
AS numbers.
l If 4-byte AS numbers in dotted notation are configured, you must change 4-byte AS
numbers in AS_Path regular expressions and extended community attribute filters to 4-
byte AS numbers in dotted notation.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run as-notation plain
BGP 4-byte AS numbers are configured to display as integers.

NOTE

After you run the as-notation plain command, BGP 4-byte AS numbers are displayed as integers in
display commands but are still displayed in dotted notation in the configuration file.

Step 3 Run commit


The configuration is committed.

----End

9.6.2 Starting a BGP Process

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run bgp { as-number-plain | as-number-dot }
BGP is started, the local AS number is specified, and the BGP view is displayed.

After BGP peers are configured, changing the router ID of a BGP peer resets BGP peer
relationships.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 660


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Step 3 Run router-id ipv4-address

A router ID is set.

NOTE

By default, BGP automatically selects the router ID in the system view. If the IP address of a physical
interface is used as the router ID, route flapping occurs when the IP address of the physical interface
changes. To enhance network stability, configuring the address of a loopback interface as the router ID is
recommended. For router ID selection rules in the system view, see descriptions in Command Reference
about the router-id command.
By default, the Cluster_List attribute takes precedence over the router ID during BGP route selection. To
enable the router ID to take precedence over the Cluster_List attribute during BGP route selection, run
the bestroute routerid-prior-clusterlist command.
If the device does not have an IPv4 interface, it needs to be configured with a router ID.

Step 4 (Optional) Run shutdown

All sessions between the device and its BGP peers are terminated.

During the system upgrade or maintenance, you can run the shutdown command to terminate
all sessions between a device and its BGP peers to prevent possible BGP route flapping from
affecting the network.

After the upgrade or maintenance, run the undo shutdown command to restore the BGP peer
sessions; otherwise, BGP functions will be affected.

Step 5 (Optional) Run prefix memory-limit

BGP memory protection is configured.

When the memory usage reaches the overload threshold, if a BGP peer continues sending
BGP routes, the device restarts and performs an active/standby switchover. In this case, the
system becomes unstable. After BGP memory protection is configured, the device does not
receive routes and reports alarms when the memory usage reaches the overload threshold.

Step 6 (Optional) Run advertise lowest-priority on-startup

BGP is configured to minimize the priorities of the BGP routes to be advertised.

If the BGP routes advertised by a device when the device is delivering ARP entries after a
restart are selected as optimal routes, traffic loss may occur. To prevent this problem, run the
advertise lowest-priority on-startup command before the device is restarted to configure
BGP to minimize the priorities of the BGP routes to be advertised. After the command is run,
the MED and Local_Pref of the BGP routes to be advertised are 4294967295 (maximum
value) and 0 (minimum value), respectively. The configuration prevents the BGP routes from
being preferentially selected. To restore the priorities of these BGP routes after ARP entries
are delivered, run the reset bgp advertise lowest-priority on-startup command.

NOTE

If the advertise lowest-priority on-startup command is run after BGP configurations are committed,
the configuration of this command takes effect only after the reboot command is run. If the advertise
lowest-priority on-startup command and BGP configurations are committed as a whole, the
configuration of this command takes effect immediately.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 661


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Step 7 (Optional) Run advertise lowest-priority all-address-family peer-up [ delay delay ]

BGP is configured to minimize the priorities of the routes to be advertised to BGP peers when
the peers go Up from Down.

If the advertise lowest-priority all-address-family peer-up command is not run, BGP routes
with unchanged priorities are advertised to peers when the peers go Up from Down. After the
peers receive the routes, traffic may be switched back to the original paths. Consequently,
lengthy packet loss may occur. To address this problem, run the advertise lowest-priority all-
address-family peer-up command. After the command is run, routes advertised to the peers
carry the lowest priorities (largest MED value and smallest Local_Pref value) until delay
expires.

NOTE
To restore the priorities of the routes to be advertised to BGP peers when the peers go Up from Down,
run the reset bgp advertise lowest-priority all-address-family peer-up command.

Step 8 Run commit

The configuration is committed.

----End

9.6.3 Configuring BGP Peers

Context
During the configuration of BGP peers, if the AS number of the specified peer is the same as
the local AS number, an IBGP peer is configured. If the AS number of the specified peer is
different from the local AS number, an EBGP peer is configured. To enhance the stability of
BGP connections, you are advised to use the reachable loopback interface addresses to
establish BGP connections.

When loopback interface addresses are used to establish a BGP connection, run the peer
connect-interface command on both ends of the BGP connection to ensure the correctness of
interfaces and addresses on the TCP connection. If the command is run on only one end, the
BGP connection may fail to be established.

When loopback interface addresses are used to establish an EBGP connection, the peer ebgp-
max-hop command with hop-count greater than or equal to 2 must be run. Otherwise, the
EBGP connection cannot be established.

To perform the same configuration on a large number of peers, configure a BGP peer group
according to 9.6.4 (Optional) Configuring a BGP Peer Group to reduce the configuration
workload.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run bgp { as-number-plain | as-number-dot }

The BGP view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 662


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Step 3 Run peer { ipv4-address | ipv6-address } as-number as-number

The BGP peer is created.

By default, no BGP peer is created.

Step 4 (Optional) Run peer ipv4-address connect-interface { interface-type interface-number


[ ipv4-source-address ] | ipv4-source-address }

Or run peer ipv6-address connect-interface interface-type interface-number [ ipv6-source-


address ]

A source interface and a source IP address are specified for the peer to establish a TCP
connection.

By default, BGP uses the interface that is directly connected to the peer to establish a TCP
connection.
NOTE

After peer connect-interface is configured for an EBGP peer, the supernet routes received from the
EBGP peer are all in inactive state.

Step 5 (Optional) Run peer { ipv4-address | ipv6–address | group-name } tcp-mss tcp-mss-number

The TCP MSS value used when the local device establishes TCP connections with a peer or
peer group is configured.

You can run the peer tcp-mss command to configure a TCP MSS value used for TCP
connection establishment so that it is used to encapsulate BGP packets when the path MTU is
unavailable. Such configuration improves network performance.

Step 6 (Optional) Run peer { ipv4-address | ipv6-address } ebgp-max-hop [ hop-count ]

The maximum number of hops allowed for the establishment of an EBGP connection is set.

By default, the maximum number of hops allowed for an EBGP connection is 1. That is, an
EBGP connection must be established on a directly connected physical link.

Step 7 (Optional) Run peer { ipv4-address | ipv6-address } description description-text

The description of the peer is configured.

NOTE

If a BGP peer is configured on an IPv4 unicast network, steps 8 and 9 are not required. If a BGP peer is
configured on an IPv4 multicast network and an IPv6 unicast network, steps 8 and 9 are required.

Step 8 (Optional) Run the following commands as required.


l Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
l Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.

Step 9 (Optional) Run peer { ipv4-address | ipv6-address } enable

MP-BGP is enabled on the BGP peers to configure them as MP-BGP peers.

Step 10 Run commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 663


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

The configuration is committed.

----End

9.6.4 (Optional) Configuring a BGP Peer Group

Context
A large BGP network has a large number of peers. It is difficult to configure and maintain
these peers. You can add the BGP peers with the same configurations to a BGP peer group
and then configure the BGP peers in batches. This simplifies peer management and improves
route advertisement efficiency.

NOTE

l If a function is configured on a peer and its peer group, the function configured on the peer takes
precedence over that configured on the peer group.
l When loopback interface or Layer 3 sub-interface addresses are used to establish a BGP connection, you
are advised to perform step 6 on both ends of the BGP connection simultaneously to ensure the correct
establishment of the connection. If step 6 is performed on only one end, the BGP connection may fail to
be established (the CE6810LI does not support Layer 3 sub-interfaces).
l When loopback interfaces are used to establish an EBGP connection, step 7 is required and hop-count in
the peer ebgp-max-hop command must be greater than or equal to 2. Otherwise, the EBGP connection
cannot be established.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run bgp { as-number-plain | as-number-dot }

The BGP view is displayed.

Step 3 Run group group-name [ external | internal ]

A BGP peer group is created.

NOTE

The AS number of an IBGP peer group is the local AS number. Therefore, step 4 is not required.

Step 4 Run peer group-name as-number as-number

An AS number is configured for the EBGP peer group.

NOTE

To add an EBGP peer to a peer group, configure the EBGP peer according to 9.6.3 Configuring BGP
Peers and then perform step 5.
To add an IBGP peer to a peer group, perform step 5. The system creates an IBGP peer in the BGP view
and sets its AS number as the AS number of the peer group.

Step 5 Run peer { ipv4-address | ipv6-address } group group-name

A peer is added to the peer group.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 664


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

NOTE

You can repeat step 5 to add multiple peers to a peer group.

Step 6 (Optional) Run peer group-name connect-interface interface-type interface-number [ ipv4-


source-address ]

Or run peer group-name connect-interface interface-type interface-number [ ipv6-source-


address ]

A source interface and a source IP address are specified for the peer to establish a TCP
connection.

By default, the outbound interface of a BGP packet serves as the source interface of the BGP
packet.

Step 7 (Optional) Run peer group-name ebgp-max-hop [ hop-count ]

The maximum number of hops allowed for the establishment of an EBGP connection is set.

By default, the maximum number of hops allowed for an EBGP connection is 1. That is, an
EBGP connection must be established on a directly connected physical link.

Step 8 (Optional) Run peer group-name description description-text

The description is configured for the peer group.

NOTE

If a BGP peer group is configured on an IPv4 unicast network, steps 9 and 10 are not required. If a BGP
peer group is configured on an IPv4 multicast network and an IPv6 unicast network, steps 9 and 10 are
required.

Step 9 (Optional) Run the following commands as required.


l Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
l Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.

Step 10 Run peer group-name enable

MP-BGP is enabled on the BGP peers to configure them as MP-BGP peers.

Step 11 Run commit

The configuration is committed.

----End

9.6.5 Configuring BGP to Import Routes

Context
BGP cannot discover routes and needs to import routes such as IGP routes into BGP routing
tables so that the imported routes can be transmitted within an AS or between ASs. BGP
imports routes in either import or network mode:

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 665


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

l In import mode, BGP imports IGP routes, including RIP, OSPF, and IS-IS routes, into
BGP routing tables based on protocol type. To ensure the validity of imported IGP
routes, BGP can also import static routes and direct routes in import mode.
l In network mode, BGP imports the routes in the IP routing table one by one into BGP
routing tables. The network mode is more accurate than the import mode.

Procedure
l In import mode
a. Run system-view
The system view is displayed.
b. Run bgp { as-number-plain | as-number-dot }
The BGP view is displayed.
c. Enter the corresponding address family view based on network type to configure
BGP devices on networks.
n Run ipv4-family unicast
The BGP-IPv4 unicast address family view is displayed.
n Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
n Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
n Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
n Run ipv6-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv6 address family view is displayed.
d. Run import-route protocol [ process-id ] [ med med | route-policy route-policy-
name ] *
BGP is configured to import routes of other routing protocols.
e. (Optional) Run default-route imported
BGP is allowed to import default routes from the local IP routing table.
By default, BGP does not add default routes to BGP routing tables.
f. Run commit
The configuration is committed.
l In network mode
a. Run system-view
The system view is displayed.
b. Run bgp { as-number-plain | as-number-dot }
The BGP view is displayed.
c. Enter the corresponding address family view based on network type to configure
BGP devices on networks.
n Run ipv4-family unicast

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 666


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

The BGP-IPv4 unicast address family view is displayed.


n Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
n Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
n Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
n Run ipv6-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv6 address family view is displayed.
d. Run network ipv4-address [ mask | mask-length ] [ route-policy route-policy-
name ]network ipv6-address prefix-length [ route-policy route-policy-name ]

BGP is configured to import routes from the IPv4 or IPv6 routing table one by one.
e. Run commit

The configuration is committed.

----End

9.6.6 Verifying the Basic BGP Function Configuration

Procedure
l Run the display bgp peer [ verbose ] command to check information about all BGP
peers.
l Run the display bgp peer ipv4-address { log-info | verbose } command to check
information about the specified BGP peer.
l Run the display bgp routing-table [ ipv4-address [ { mask | mask-length } [ longer-
prefixes ] ] ] command to check BGP routing information.
l Run the display bgp group [ group-name ] command to check information about the
specified BGP peer group.
l Run the display bgp multicast peer [ [ peer-address ] verbose | peer-address
{ statistics | verbose } ] command to check information about the specified MBGP peer.
l Run the display bgp multicast group [ group-name ] command to check information
about an MBGP peer group.
l Run the display bgp multicast network command to check the routing information that
MBGP advertises.
l Run the display bgp multicast routing-table [ ip-address [ mask-length [ longer-
prefixes ] | mask [ longer-prefixes ] ] ] command to check the MBGP routing
information of a specified network in the MBGP routing table.

----End

9.7 Configuring BGP Security

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 667


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Pre-configuration Tasks
Configuring connection authentication, BGP GTSM, and RPKI for BGP peers can improve
BGP network security.
Before configuring BGP security, complete the following task:

l Configuring Basic BGP Functions

Configuration Procedure
You can perform the following configuration tasks as required. The following configuration
tasks (excluding the task of Verifying the BGP Security Configuration) can be performed in
any sequence.

9.7.1 Configuring MD5 Authentication

Context
BGP uses TCP as the transmission protocol, and considers a packet valid as long as the source
address, destination address, source port, destination port, and TCP sequence number of the
packet are correct. However, most parameters in a packet may be easily obtained by attackers.
To protect BGP from attacks, use MD5 authentication or keychain authentication between
BGP peers to reduce the possibility of attacks. The MD5 algorithm is easy to configure and
generates a single password that can only be manually changed.

If simple is selected during the configuration of the MD5 authentication password, the
password is saved in the configuration file in plain text. This brings security risks. It is
recommended that you select cipher to save the password in cipher text. MD5 authentication
has potential security risks.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run bgp { as-number-plain | as-number-dot }
The BGP view is displayed.
Step 3 Run peer { ipv4-address | group-name | ipv6-address } password { cipher cipher-password |
simple simple-password }
The MD5 authentication password is set.

NOTE

l To prevent the MD5 password set on BGP peers from being decrypted, update the MD5 password
periodically.
l BGP MD5 authentication and BGP keychain authentication are mutually exclusive, and only either
of them can be configured for a BGP peer.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 668


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Step 4 Run commit

The configuration is committed.

----End

9.7.2 Configuring Keychain Authentication

Context
BGP uses TCP as the transmission protocol, and considers a packet valid as long as the source
address, destination address, source port, destination port, and TCP sequence number of the
packet are correct. However, most parameters in a packet may be easily obtained by attackers.
To protect BGP from attacks, use MD5 authentication or keychain authentication between
BGP peers to reduce the possibility of attacks. The keychain algorithm is complex to
configure and generates a set of passwords. Keychain authentication allows automatically
changing a password based on the configuration. Therefore, keychain authentication applies
to networks requiring high security.

NOTE

Before configuring BGP keychain authentication, configure a keychain corresponding to keychain-


name. Otherwise, the TCP connection cannot be established. For details about configuring a keychain,
see "Keychain Configuration" in the CloudEngine 8800, 7800, 6800, and 5800 Series Configuration
Guide - Security Configuration.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run bgp { as-number-plain | as-number-dot }

The BGP view is displayed.

Step 3 Run peer { ipv4-address | group-name | ipv6-address } keychain keychain-name

Keychain authentication is configured.

NOTE

l You must configure keychain authentication on both ends of the BGP connection. Encryption
algorithms and passwords configured on both ends must be the same; otherwise, the TCP connection
cannot be established between BGP peers and BGP messages cannot be transmitted. SHA256 and
HMAC-SHA256 encryption algorithms are recommended in keychain authentication.
l BGP MD5 authentication and BGP keychain authentication are mutually exclusive, and only either
of them can be configured for a BGP peer.

Step 4 Run commit

The configuration is committed.

----End

9.7.3 Configuring BGP GTSM

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 669


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Context
To protect a device against the attacks of forged BGP packets, you can configure GTSM to
check whether the TTL value in the IP packet header is within the specified range. If the TTL
value of a packet is within the specified range, the packet is allowed to pass through.
Otherwise, the packet is discarded to protect the device.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run bgp { as-number-plain | as-number-dot }

The BGP view is displayed.

NOTE

The configurations of GTSM and peer ebgp-max-hop affect the TTL values of BGP packets, which
may cause a conflict between TTL values. Therefore, you can configure only either of the two functions
for a peer or peer group.

Step 3 Run peer { group-name | ipv4-address | ipv6-address } valid-ttl-hops [ hops ]

BGP GTSM is configured.

By default, GTSM is not configured on any BGP peer or peer group.

Step 4 Run commit

The configuration is committed.

----End

9.7.4 Verifying the BGP Security Configuration

Procedure
l Run the display bgp peer verbose command to check detailed authentication
information about the specified BGP peer.

----End

9.8 Simplifying IBGP Network Connections

Pre-configuration Tasks
Configuring a route reflector and a confederation on an IBGP network can simplify IBGP
network connections.

Before simplifying IBGP network connections, complete the following configuration task:

l Configuring Basic BGP Functions

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 670


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Configuration Procedure
Perform the following configuration tasks in any sequence as required.

9.8.1 Configuring a BGP Route Reflector

Context
To ensure the connectivity between IBGP peers within an AS, you need to establish full-mesh
connections between the IBGP peers. When there are many IBGP peers, it is costly to
establish a fully-meshed network. A route reflector (RR) can solve this problem.

A cluster ID can help prevent routing loops between multiple RRs within a cluster and
between clusters. When a cluster has multiple RRs, the same cluster ID must be configured
for all the RRs within the cluster.

If full-mesh IBGP connections are established between clients of multiple RRs, route
reflection between clients is not required and wastes bandwidth resources. In this case,
prohibit route reflection between clients to reduce the network burden.

Within an AS, an RR transmits routing information and forwards traffic. When an RR


connects to a large number of clients and non-clients, many CPU resources are consumed if
the RR transmits routing information and forwards traffic simultaneously. This also reduces
route transmission efficiency. To improve route transmission efficiency, prohibit BGP from
adding preferred routes to IP routing tables on the RR to enable the RR only to transmit
routing information.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run bgp { as-number-plain | as-number-dot }

BGP is enabled and the BGP view is displayed.

Step 3 Enter the corresponding address family view based on network type to configure BGP devices
on networks.
l Run ipv4-family unicast
The BGP-IPv4 unicast address family view is displayed.
l Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
l Run ipv4-family vpnv4 [ unicast ]
The BGP-VPNv4 address family view is displayed.
l Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
l Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
l Run ipv6-family vpnv6 [ unicast ]
The BGP-VPNv6 address family view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 671


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

l Run ipv6-family vpn-instance vpn-instance-name


The BGP-VPN instance IPv6 address family view is displayed.
Step 4 Run peer { group-name | ipv4-address | ipv6-address } reflect-client
An RR and its client are configured.
By default, an RR and its client are not configured.
Step 5 (Optional) Run reflector cluster-id cluster-id
A cluster ID is configured for the RR.
By default, each RR uses its router ID as the cluster ID.
Step 6 (Optional) Run undo reflect between-clients
Route reflection is prohibited between clients.
By default, route reflection is allowed between clients.
Step 7 (Optional) Run routing-table rib-only [ route-policy route-policy-name ]
BGP is prohibited from adding preferred routes to IP routing tables.
By default, BGP adds preferred routes to IP routing tables.

NOTE

The routing-table rib-only command can be executed only in the BGP view, BGP-IPv4 unicast address
family view, and BGP-IPv6 unicast address family view.

Step 8 Run commit


The configuration is committed.

----End

Verifying the Configuration


l Run the display bgp group [ group-name ] command to check information about the
specified BGP peer group.
l Run the display bgp routing-table [ ipv4-address [ { mask | mask-length } [ longer-
prefixes ] ] ] command to check routing information in a BGP routing table.
l Run the display bgp multicast routing-table [ ip-address [ mask-length [ longer-
prefixes ] | mask [ longer-prefixes ] ] ] command to check the MBGP routing table.

9.8.2 Configuring a BGP Confederation

Context
A confederation divides an AS into sub-ASs. Within each sub-AS, IBGP peers establish full-
mesh connections or have an RR configured. Sub-ASs establish EBGP connections. On a
large BGP network, configuring a confederation can reduce the number of IBGP connections,
simplify routing policy management, and improve route advertisement efficiency.
Other devices may implement the confederation not in accordance with RFC 3065. You can
configure confederation compatibility to make standard devices compatible with nonstandard
devices.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 672


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

NOTE

BGP peers within a BGP confederation do not change the next hop of BGP routes to their local IP
addresses before advertising the routes to each other, unless the peer next-hop-local command is run.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run bgp { as-number-plain | as-number-dot }

BGP is enabled and the BGP view is displayed.

Step 3 Run confederation id { as-number-plain | as-number-dot }

A confederation ID is configured.

By default, no BGP confederation is configured.

An old speaker that has a 2-byte AS number cannot be in the same confederation with a new
speaker that has a 4-byte AS number. Otherwise, a routing loop may occur. This is because
the AS4_Path attribute does not support confederations.

Step 4 Run confederation peer-as { as-number-plain | as-number-dot } &<1-32>

A sub-AS number is configured for a confederation.

By default, no sub-AS number of the confederation is configured.

Step 5 (Optional) Run confederation nonstandard

Confederation compatibility is configured.

By default, confederations comply with RFC 3065.

Step 6 Run commit

The configuration is committed.

----End

Verifying the Configuration


l Run the display bgp peer [ ipv4-address ] verbose command to check detailed
information about BGP peers.
l Run the display bgp routing-table [ ipv4-address [ { mask | mask-length } [ longer-
prefixes ] ] ] command to check routing information in a BGP routing table.

9.9 Configuring BGP Route Selection and Load Balancing

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 673


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Pre-configuration Tasks
BGP has many route attributes. These attributes can be configured to change the route
selection result.
Before configuring BGP route attributes, complete the following task:
l Configuring Basic BGP Functions

Configuration Procedure
Perform the following configuration tasks as required. The following configuration tasks
(excluding the task of Verifying the BGP Route Selection and Load Balancing Configuration)
can be performed in any sequence. For detailed route selection rules, see 9.2.5 BGP Route
Selection Rules and Load Balancing.

9.9.1 Configuring the BGP Priority

Context
The routing protocols may share and select routing information because switches may run
multiple dynamic routing protocols at the same time. The system sets a default priority for
each routing protocol. When multiple routing protocols are used to select routes, the route
selected by the routing protocol with a higher priority takes effect.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run bgp { as-number-plain | as-number-dot }
The BGP view is displayed.
Step 3 Enter the corresponding address family view based on network type to configure BGP devices
on networks.
l Run ipv4-family unicast
The BGP-IPv4 unicast address family view is displayed.
l Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
l Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
l Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
l Run ipv6-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv6 address family view is displayed.
Step 4 Run preference { external internal local | route-policy route-policy-name }
The BGP priority is set.
The default BGP priority is 255.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 674


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

The smaller the preference value, the higher the preference.


BGP has the following types of routes:
l EBGP routes learned from peers in other ASs
l IBGP routes learned from peers in the same AS
l Locally originated routes (A locally originated route is a route summarized by using the
summary automatic command or the aggregate command.)
Different preference values can be set for these three types of routes.
In addition, a routing policy can also be used to set the preferences for the routes that match
the policy. The routes that do not match the policy use the default preference.

NOTE

You cannot use the peer route-policy command on BGP peers to apply routing policies to set the BGP
priority.

Step 5 Run commit


The configuration is committed.

----End

9.9.2 Configuring the Next_Hop Attribute

Context
When an Autonomous System Boundary Router (ASBR) forwards the route learned from an
EBGP peer to an IBGP peer, the ASBR does not change the next hop of the route by default.
When the IBGP peer receives this route, it finds the next hop unreachable, sets the route to
inactive, and does not use this route to guide traffic forwarding. To enable the IBGP peer to
use this route to guide traffic forwarding, configure the ASBR to set its IP address as the next
hop of the route when the ASBR forwards this route to the IBGP peer. After the IBGP peer
receives the route from the ASBR, it finds the next hop of the route reachable, sets the route
to active, and uses this route to guide traffic forwarding.
When a BGP route changes, BGP needs to iterate the indirect next hop of the route again. If
no restriction is imposed on the iterated route, BGP may iterate the next hop to an incorrect
forwarding path, causing traffic loss. To prevent traffic loss, configure routing policy-based
route iteration.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run bgp { as-number-plain | as-number-dot }
The BGP view is displayed.
Step 3 Enter the corresponding address family view based on network type to configure BGP devices
on networks.
l Run ipv4-family unicast

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 675


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

The BGP-IPv4 unicast address family view is displayed.


l Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
l Run ipv4-family vpnv4 [ unicast ]
The BGP-VPNv4 address family view is displayed.
l Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
l Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
l Run ipv6-family vpnv6 [ unicast ]
The BGP-VPNv6 address family view is displayed.
l Run ipv6-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv6 address family view is displayed.

Step 4 Perform any of the following operations as required:


l Run peer { ipv4-address | group-name | ipv6-address } next-hop-local
A BGP device is configured to set its IP address as the next hop when the device
advertises routes to an IBGP peer or an IBGP peer group.
By default, a BGP device does not change the next-hop address when advertising routes
to its IBGP peers.
l Run nexthop recursive-lookup route-policy route-policy-name
Routing-policy-based next hop iteration is configured.
By default, routing-policy-based next hop iteration is not configured.
l Run the following command in the IPv4 unicast address family view: peer { ipv4-
address | group-name } next-hop-invariable
The device is prevented from changing the next-hop address of a route imported from an
IGP before advertising the route to an IBGP peer.
By default, a device changes the next-hop address of a route imported from an IGP to the
address of the interface connecting the device to its peer when advertising the route to an
IBGP peer.
l Run the following command in the IPv4 unicast address family view: nexthop third-
party
The device is prevented from changing the next-hop address of a route when the device
advertises the route to a peer in the specified scenarios.
The default configurations are as follows:
– Before advertising a route that is learned from a directly connected peer to a
directly connected EBGP peer, the device changes the next hop of the route to the
IP address of the local interface that is used to establish the BGP peer relationship
with the EBGP peer.
– Before advertising a locally imported route to a directly connected IBGP or EBGP
peer, the device changes the next hop of the route to the IP address of the local
interface that is used to establish the BGP peer relationship with the IBGP or EBGP
peer.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 676


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

NOTE

The nexthop recursive-lookup route-policy route-policy-name command does not take effect for the
routes received from directly connected EBGP peers.

Step 5 Run commit

The configuration is committed.

----End

9.9.3 Configuring the PrefVal Attribute

Context
The PrefVal attribute is a Huawei proprietary attribute and is valid only on the device where it
is configured. When a BGP routing table contains multiple routes to the same destination,
BGP prefers the route with the highest PrefVal.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run bgp { as-number-plain | as-number-dot }

The BGP view is displayed.

Step 3 Enter the corresponding address family view based on network type to configure BGP devices
on networks.
l Run ipv4-family unicast
The BGP-IPv4 unicast address family view is displayed.
l Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
l Run ipv4-family vpnv4 [ unicast ]
The BGP-VPNv4 address family view is displayed.
l Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
l Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
l Run ipv6-family vpnv6 [ unicast ]
The BGP-VPNv6 address family view is displayed.
l Run ipv6-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv6 address family view is displayed.

Step 4 Run peer { group-name | ipv4-address | ipv6-address } preferred-value value

The PrefVal attribute is configured for all the routes learned from a specified peer.

By default, the PrefVal of a route learned from a peer is 0.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 677


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Step 5 Run commit

The configuration is committed.

----End

9.9.4 Configuring the Default Local_Pref Attribute

Context
The Local_Pref attribute is used to determine the optimal route for outgoing traffic of an AS.
When a BGP device obtains multiple routes to the same destination address but with different
next hops from different IBGP peers, the BGP device prefers the route with the highest
Local_Pref value.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run bgp { as-number-plain | as-number-dot }

The BGP view is displayed.

Step 3 Enter the corresponding address family view based on network type to configure BGP devices
on networks.
l Run ipv4-family unicast
The BGP-IPv4 unicast address family view is displayed.
l Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
l Run ipv4-family vpnv4 [ unicast ]
The BGP-VPNv4 address family view is displayed.
l Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
l Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
l Run ipv6-family vpnv6 [ unicast ]
The BGP-VPNv6 address family view is displayed.
l Run ipv6-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv6 address family view is displayed.

Step 4 Run default local-preference local-preference

The default Local_Pref attribute is configured.

By default, the Local_Pref attribute is 100.

Step 5 Run commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 678


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

The configuration is committed.

----End

9.9.5 Configuring the AS_Path Attribute

Context
The AS_Path attribute records all the ASs that a route passes through from the source to the
destination in the vector order. You can configure the AS_Path attribute to implement flexible
route selection.
l By default, BGP compares the AS_Path lists of routes and prefers the route. When the
AS_Path attribute is not required in route selection, configure BGP not to compare the
AS_Path lists of routes during route selection.
l By default, BGP detects routing loops based on AS number. However, to ensure correct
route transmission on a hub-and-spoke network, you need to configure all the BGP peers
that VPN routes advertised from a hub CE to a spoke CE pass through to accept the
routes with a repeated AS number.
l Public AS numbers can be used on the Internet, but private AS numbers cannot because
they may cause routing loops. To prevent routing loops, configure the AS_Path attribute
to carry only public AS numbers in EBGP Update messages.
l When the AS_Path attribute is reconstructed or summarized routes are generated, you
can set the maximum number of AS numbers in the AS_Path attribute. Then a BGP
device checks whether the number of AS numbers in the AS_Path attribute of a route
exceeds the maximum value. If so, the BGP device discards the route.
l A device usually supports only one BGP process. This indicates that a device supports
only one AS number. In some cases, for example, when network migration changes an
AS number, you can set a fake AS number to ensure successful network migration.
l BGP checks the first AS number in the AS_Path list that is carried in the Update
message sent by an EBGP peer. If the first AS number specifies the AS where the EBGP
peer resides, BGP accepts the Update message. Otherwise, BGP rejects the Update
message and interrupts the EBGP connection. If you do not want BGP to check the first
AS number, disable BGP from checking the first AS number.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run route-policy route-policy-name { deny | permit } node node
A node is configured for a route-policy, and the view of the route-policy is displayed.
Step 3 (Optional) Configure matching rules for the route-policy to change only the community
attributes of the routes that meet matching rules.
By default, all routes meet matching rules. For details, see 10.7.2 (Optional) Configuring if-
match Clauses.
Step 4 Run apply as-path { { as-number-plain | as-number-dot } &<1-10> { additive | overwrite |
delete } | none overwrite }

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 679


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

The AS_Path attribute is set for BGP routes.

Step 5 Run quit

Return to the system view.

Step 6 Run bgp { as-number-plain | as-number-dot }

The BGP view is displayed.

Step 7 Enter the corresponding address family view based on network type to configure BGP devices
on networks.
l Run ipv4-family unicast
The BGP-IPv4 unicast address family view is displayed.
l Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
l Run ipv4-family vpnv4 [ unicast ]
The BGP-VPNv4 address family view is displayed.
l Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
l Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
l Run ipv6-family vpnv6 [ unicast ]
The BGP-VPNv6 address family view is displayed.
l Run ipv6-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv6 address family view is displayed.

Step 8 Add the AS_Path attribute to routes.


NOTE

The import-route and network commands cannot be executed in the BGP-VPNv4 address family view
or BGP-VPNv6 address family view.
l Run peer { ipv4-address | group-name | ipv6-address } route-policy route-policy-name
export
The AS_Path attribute is added to the routes advertised to BGP peers or peer groups.
l Run peer { ipv4-address | group-name | ipv6-address } route-policy route-policy-name
import
The AS_Path attribute is added to the routes received from BGP peers or peer groups.
l Run import-route protocol [ process-id ] [ med med | route-policy route-policy-name ]
*

The AS_Path attribute is added to the routes imported by BGP in import mode.
l Run network { ipv4-address [ mask | mask-length ] | ipv6-address prefix-length }
[ route-policy route-policy-name ]
The AS_Path attribute is added to the routes imported by BGP in network mode.

Step 9 (Optional) Run any of the following commands to configure the AS_Path attribute as
required.
l Run bestroute as-path-ignore

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 680


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

BGP is configured not to compare the AS_Path attributes of routes during route
selection.
By default, BGP compares the AS_Path attributes of routes during route selection.
l Run peer { ipv4-address | group-name | ipv6-address } allow-as-loop [ number ]
Repeated local AS numbers are allowed in routes.
By default, repeated local AS numbers are not allowed.
l Run peer { group-name | ipv4-address | ipv6-address } public-as-only [ force
[ replace ] [ include-peer-as ] | limited [ replace ] [ include-peer-as ] ]
BGP is configured to carry only public AS numbers in the AS_Path attribute in an EBGP
Update message.
By default, the AS_Path attribute can carry both public and private AS numbers in an
EBGP Update message.
l Return to the BGP view to configure the AS_Path attribute.
a. Run quit
Return to the BGP view.
b. (Optional) Run any of the following commands to configure the AS_Path attribute
as required.
n Run as-path-limit [ as-path-limit-num ]
The maximum number of AS numbers in the AS_Path attribute is set.
By default, the maximum number of AS numbers in the AS_Path attribute is
255.
n Run peer { ipv4-address | group-name | ipv6-address } local-as { as-number-
plain | as-number-dot } [ dual-as ] [ prepend-global-as ] [ prepend-local-as ]
A fake AS number is configured for an EBGP peer group.
The peer local-as command can be used to hide the actual AS number of a
BGP device. EBGP peers in other ASs will use the fake AS number of this
BGP device to set up EBGP peer relationships with this device.
By default, EBGP peers establish a connection using the actual AS number.
n Run undo check-first-as
BGP is configured not to check the first AS number in the AS_Path list that is
carried in the Update message sent by an EBGP peer.
By default, BGP checks the first AS number in the AS_Path list that is carried
in the Update message sent by an EBGP peer.
NOTE

○ Running the undo check-first-as command increases the probability of routing


loops. Therefore, exercise caution when using this command.
○ After the configuration is complete, run the refresh bgp command in the user view
if you want to check the received routes again.

Step 10 Run commit


The configuration is committed.

----End

9.9.6 Configuring the MED Attribute

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 681


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Context
The multi-exit discriminator (MED) helps determine the optimal route for incoming traffic of
an AS. It is similar to the metric used in IGP. When a BGP device obtains multiple routes to
the same destination address but with different next hops from EBGP peers, the BGP device
selects the route with the smallest MED value as the optimal route.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run bgp { as-number-plain | as-number-dot }

The BGP view is displayed.

Step 3 Enter the corresponding address family view based on network type to configure BGP devices
on networks.
l Run ipv4-family unicast
The BGP-IPv4 unicast address family view is displayed.
l Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
l Run ipv4-family vpnv4 [ unicast ]
The BGP-VPNv4 address family view is displayed.
l Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
l Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
l Run ipv6-family vpnv6 [ unicast ]
The BGP-VPNv6 address family view is displayed.
l Run ipv6-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv6 address family view is displayed.

Step 4 Perform any of the following operations as required:


NOTE

The bestroute med-none-as-maximum and compare-different-as-med commands cannot be executed


in the BGP-VPNv4 address family view or BGP-VPNv6 address family view.
l Run default med med
The default MED value is set.
By default, the MED is 0.
l Run bestroute med-none-as-maximum
BGP defines the MED value as the maximum value if a route does not have the MED
attribute.
By default, BGP uses the default MED value when a route does not have the MED
attribute.
l Run compare-different-as-med

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 682


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

BGP is allowed to compare the MED values of routes received from EBGP peers in any
AS.
By default, BGP compares only the MEDs of the routes received from EBGP peers
within the same AS.
l Run bestroute med-plus-igp [ igp-multiplier igp-multiplier | med-multiplier med-
multiplier ] *
The sums of MED multiplied by a MED multiplier and IGP cost multiplied by an IGP
cost multiplier are compared.
By default, the MED and IGP cost of each route are used as separate route selection
criteria.
Step 5 Run commit
The configuration is committed.

----End

9.9.7 Configuring the BGP Community Attribute

Context
The Community attribute is a private BGP route attribute. It is transmitted between BGP
peers and is not restricted within an AS. The Community attribute allows a group of BGP
devices in multiple ASs to share the same routing policies, which simplifies routing policy
applications and facilitates routing policy management and maintenance. A BGP device can
add or change the community attributes of routes to be advertised.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run route-policy route-policy-name { deny | permit } node node
A node is configured for a route-policy, and the view of the route-policy is displayed.
Step 3 (Optional) Configure matching rules for the route-policy to change only the community
attributes of the routes that meet matching rules.
By default, all routes meet matching rules. For details, see 10.7.2 (Optional) Configuring if-
match Clauses.
Step 4 Run either of the following commands to configure the Community attribute.
l Run apply community { community-number | aa:nn | internet | no-advertise | no-
export | no-export-subconfed } &<1-32> [ additive ]
Common community attributes are configured for BGP routes.
NOTE
You can run this command to configure a maximum of 32 community attributes at a time.
l Run apply extcommunity { rt { as-number:nn | ipv4-address:nn } } &<1-16>
[ additive ]
An extended community attribute (route-target) is configured.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 683


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Extended community attributes are extensions to community attributes in services.


Currently, only the route-target attribute is supported in VPN.

Step 5 Run quit

Return to the system view.

Step 6 Run bgp { as-number-plain | as-number-dot }

The BGP view is displayed.

Step 7 Enter the corresponding address family view based on network type to configure BGP devices
on networks.
l Run ipv4-family unicast
The BGP-IPv4 unicast address family view is displayed.
l Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
l Run ipv4-family vpnv4 [ unicast ]
The BGP-VPNv4 address family view is displayed.
l Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
l Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
l Run ipv6-family vpnv6 [ unicast ]
The BGP-VPNv6 address family view is displayed.
l Run ipv6-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv6 address family view is displayed.

Step 8 Add the Community attribute to routes.


NOTE

The import-route and network commands cannot be executed in the BGP-VPNv4 address family view
or BGP-VPNv6 address family view.
l Run peer { ipv4-address | group-name | ipv6-address } route-policy route-policy-name
export
The Community attribute is added to the routes advertised to BGP peers or peer groups.
l Run peer { ipv4-address | group-name | ipv6-address } route-policy route-policy-name
import
The Community attribute is added to the routes received from BGP peers or peer groups.
l Run import-route protocol [ process-id ] route-policy route-policy-name
The Community attribute is added to the routes imported by BGP in import mode.
l Run network { ipv4-address [ mask | mask-length ] | ipv6-address prefix-length route-
policy route-policy-name
The Community attribute is added to the routes imported by BGP in network mode.
NOTE

Step 9 is required only when the Community attribute needs to be added to the routes advertised to BGP
peers or peer groups.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 684


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Step 9 (Optional) Allow BGP to advertise community attributes when BGP adds community
attributes to the routes advertised to BGP peers or peer groups.
l Run peer { ipv4-address | group-name | ipv6-address } advertise-community
BGP is allowed to advertise community attributes to BGP peers or peer groups.
By default, BGP does not advertise community attributes to any peer or peer group.
l Run peer { ipv4-address | group-name | ipv6-address } advertise-ext-community
BGP is allowed to advertise extended community attributes to BGP peers or peer groups.
By default, BGP does not advertise extended community attributes to any peer or peer
group.

Step 10 Run commit

The configuration is committed.

----End

9.9.8 Configuring BGP Load Balancing

Context
On large networks, there may be multiple valid routes to the same destination. BGP, however,
advertises only the optimal route to its peers. This may result in unbalanced traffic on
different routes. Configuring BGP load balancing enables traffic to be load balanced and
network congestion to be reduced.

Equal-cost BGP routes can be generated for traffic load balancing only when the first eight
route attributes described in "BGP Route Selection Policies" are the same. Change load
balancing rules by adjusting some configurations, for example, ignoring the comparison of the
AS_Path attribute or IGP metric attribute. When adjusting these configurations, ensure that
these configurations do not result in routing loops.

Local cross routes and routes imported between public network and VPN instances do not
support load balancing.

NOTE

If BGP load balancing is configured, the local device changes the next-hop address of routes to its
address when advertising routes to IBGP peer groups, regardless of whether the peer next-hop-local
command is used.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run bgp { as-number-plain | as-number-dot }

The BGP view is displayed.

Step 3 Run ipv4-family unicast

The IPv4 unicast address family view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 685


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

NOTE

The BGP-IPv4 unicast address family view is used as an example, and you can also configure load
balancing in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv6 unicast address family
view, BGP-VPN instance IPv4 address family view, BGP multi-instance VPN instance IPv4 address
family view, or BGP-VPN instance IPv6 address family view.

Step 4 Run maximum load-balancing [ ebgp | ibgp ] number [ ecmp-nexthop-changed ]


The maximum number of BGP routes to be used for load balancing is set.
By default, the maximum number of BGP routes to be used for load balancing is 1, indicating
that load balancing is not implemented.

NOTE

On a public network, if the routes to the same destination implement load balancing, the system will
determine the optimal route type. If the optimal routes are IBGP routes, only IBGP routes carry out load
balancing. If the optimal routes are EBGP routes, only EBGP routes carry out load balancing. This
means that load balancing cannot be implemented among IBGP and EBGP routes with the same
destination address.

Configuring BGP not to compare the AS_Path attributes or IGP metric attributes of the routes
to be used for load balancing may cause routing loops.

Step 5 (Optional) Change load balancing rules:


l Run the load-balancing as-path-ignore command to prevent the device from comparing
AS_Path attributes when selecting routes for load balancing.
By default, BGP compares the AS_Path attributes of the routes to be used for load
balancing.
l Run the load-balancing igp-metric-ignore command to prevent the device from
comparing IGP metric attributes when selecting routes for load balancing.
By default, BGP compares the IGP metric attributes of the routes to be used for load
balancing.
NOTE

The address family views supported by the preceding commands are different. When running any of the
commands, ensure that the command is run in the correct address family view.
Change load balancing rules based on network requirements and exercise caution when running the
commands.

Step 6 Run commit


The configuration is committed.

----End

9.9.9 Configuring BGP ADD-PATH

Usage Scenario
In a scenario with an RR and clients, if the RR has multiple routes to the same destination
(with the same prefix), the RR selects an optimal route from these routes and then sends only

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 686


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

the optimal route to its clients. Therefore, the clients have only one route to the destination. If
a link along this route fails, route convergence takes a long time, which cannot meet the
requirements for high reliability.
To address this issue, deploy the BGP ADD-PATH feature on the RR. With BGP ADD-PATH,
the RR can send two or more routes with the same prefix to a specified IBGP peer. These
routes can back up each other or load-balance traffic, which ensures high reliability in data
transmission. The BGP ADD-PATH feature does not affect BGP route selection rules.

NOTE

The RR can send ADD-PATH routes only to IBGP peers.

Enable BGP ADD-PATH on the RR, enable the RR to send ADD-PATH routes to a specified
IBGP peer, configure the number of routes that the RR can send to the IBGP peer, and enable
the IBGP peer to receive BGP ADD-PATH routes from the RR so that such routes are
available to the IBGP peer. In Figure 9-17, you can enable BGP ADD-PATH on the RR and
enable SwitchA to receive BGP ADD-PATH routes from the RR. Then SwitchA can receive
two routes destined for [Link]/32, with next hops of [Link] and [Link]. The two routes can
back up each other or load-balance traffic.

Figure 9-17 Networking for configuring BGP ADD-PATH

AS 65008
[Link]/24
SwitchC
[Link]/32
SwitchA SwitchD
RR
AS 65009
[Link]/24

SwitchB

Pre-configuration Tasks
Before configuring BGP ADD-PATH, configure basic BGP functions.

Procedure
l Perform the following steps on the RR:
a. Run system-view
The system view is displayed.
b. Run bgp as-number
The BGP view is displayed.
c. Run bestroute add-path path-number path-number
BGP ADD-PATH is enabled, and the number of routes that the RR can select is
configured.
d. Run peer { ipv4-address1 | group-name1 } capability-advertise add-path send
The RR is enabled to send ADD-PATH routes to the specified IBGP peer
(SwitchA).

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 687


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

e. Run peer { ipv4-address1 | group-name1 } advertise add-path path-number


path-number
The number of routes that the RR can send to the IBGP peer is configured.
f. Run commit
The configuration is committed.
l Perform the following steps on SwitchA:
a. Run system-view
The system view is displayed.
b. Run bgp as-number
The BGP view is displayed.
c. Run peer { ipv4-address2 | group-name2 } capability-advertise add-path receive
SwitchA is enabled to receive ADD-PATH routes from the RR.
d. Run commit
The configuration is committed.
----End

9.9.10 Verifying the BGP Route Selection and Load Balancing


Configuration

Procedure
l Run the display bgp routing-table different-origin-as command to check the routes
with the same destination address but different origin ASs.
l Run the display bgp routing-table regular-expression as-regular-expression command
to check information about routes that match the AS regular expression.
l Run the display bgp routing-table [ ipv4-address [ { mask | mask-length } [ longer-
prefixes ] ] ] command to check routing information in a BGP routing table.
l Run the display bgp routing-table community [ community-number | aa:nn | internet |
no-advertise | no-export | no-export-subconfed ] &<1-33> [ whole-match ] command
to check routing information with the specified BGP community.
l Run the display bgp routing-table community-filter { { community-filter-name | basic-
community-filter-number } [ whole-match ] | advanced-community-filter-number }
command to check information about routes matching a specified BGP community filter.
l Run the display bgp multicast routing-table [ ip-address [ mask-length [ longer-
prefixes ] | mask [ longer-prefixes ] ] ] command to check the MBGP routing table.
l Run the display bgp multicast routing-table statistics command to check statistics
about the MBGP routing table.
----End

9.10 Controlling the Receiving and Advertisement of BGP


Routes

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 688


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Pre-configuration Tasks
Controlling the receiving and advertisement of BGP routes can reduce the routing table size
and improve network security.
Before controlling the receiving and advertisement of BGP routes, complete the following
task:
l Configuring Basic BGP Functions

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 689


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Configuration Procedure

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 690


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Figure 9-18 Flowchart of controlling the receiving and advertisement of BGP routes

Configure a routing policy

Control the advertisement Control the receiving of


of BGP routes BGP routes

Configure BGP soft reset

Required steps

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 691


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

9.10.1 Configuring a Routing Policy

Context
Before controlling the receiving and advertisement of BGP routes, configure routing policies
or filters of routing policies for route selection. For details, see "10 Routing Policy
Configuration" in the CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Routing.

9.10.2 Controlling the Advertisement of BGP Routes

Context
There are usually a large number of routes in a BGP routing table. Transmitting a great deal of
routing information brings a heavy load to devices. Routes to be advertised need to be
controlled to address this problem. You can configure devices to advertise only routes that
these devices want to advertise or routes that their peers require. Multiple routes to the same
destination may exist and traverse different ASs. Routes to be advertised need to be filtered in
order to direct routes to specific ASs.

Procedure
l Configure a BGP device to advertise routes to all peers or peer groups.
You can configure a BGP device to filter routes to be advertised.
a. Run system-view
The system view is displayed.
b. Run bgp as-number
The BGP view is displayed.
c. Enter the corresponding address family view based on network type to configure
BGP devices on networks.
n Run ipv4-family unicast
The BGP-IPv4 unicast address family view is displayed.
n Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
n Run ipv4-family vpnv4 [ unicast ]
The BGP-VPNv4 address family view is displayed.
n Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
n Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
n Run ipv6-family vpnv6 [ unicast ]
The BGP-VPNv6 address family view is displayed.
d. Perform either of the following operations to configure the BGP device to advertise
routes to all peers or peer groups:

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 692


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

n To filter routes based on an ACL, run the filter-policy { acl-number | acl-


name acl-name } export [ protocol [ process-id ] ] or the filter-policy { acl6-
number | acl6-name acl6-name } export [ protocol [ process-id ] ] command.
n To filter routes based on an IP prefix list, run the filter-policy ip-prefix ip-
prefix-name export [ protocol [ process-id ] ] or the filter-policy ipv6-prefix
ipv6-prefix-name export [ protocol [ process-id ] ] command.
NOTE

If an ACL has been referenced in the filter-policy command but no VPN instance is
specified in the ACL rule, BGP will filter routes including public and private network routes
in all address families. If a VPN instance is specified in the ACL rule, only the data traffic
from the VPN instance will be filtered, and no route of this VPN instance will be filtered.
e. Run commit

The configuration is committed.


l Configure a BGP device to advertise routes to a specific peer or peer group.
a. Run system-view

The system view is displayed.


b. Run bgp { as-number-plain | as-number-dot }

The BGP view is displayed.


c. Enter the corresponding address family view based on network type to configure
BGP devices on networks.
n Run ipv4-family unicast
The BGP-IPv4 unicast address family view is displayed.
n Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
n Run ipv4-family vpnv4 [ unicast ]
The BGP-VPNv4 address family view is displayed.
n Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
n Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
n Run ipv6-family vpnv6 [ unicast ]
The BGP-VPNv6 address family view is displayed.
n Run ipv6-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv6 address family view is displayed.
d. Perform any of the following operations to configure the BGP device to advertise
routes to a specific peer or peer group:
n To filter routes based on an ACL, run the peer { group-name | ipv4-address |
ipv6-address } filter-policy { acl-number | acl-name acl-name | acl6-number |
acl6-name acl6-name } export command.
n To filter routes based on an IP prefix list, run the peer { ipv4-address | group-
name } ip-prefix ip-prefix-name export or the peer { group-name | ipv6-
address } ipv6-prefix ipv6-prefix-name export command.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 693


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

n To filter routes based on an AS_Path filter, run the peer { ipv4-address |


group-name | ipv6-address } as-path-filter { as-path-filter-number | as-path-
filter-name } export command.
n To filter routes based on a route-policy, run the peer { ipv4-address | group-
name | ipv6-address } route-policy route-policy-name export command.
NOTE

The routing policy applied in the peer route-policy export command does not support a
specific interface as one matching rule. That is, the routing policy does not support the if-
match interface command.
e. Run commit
The configuration is committed.
----End

9.10.3 Controlling the Receiving of BGP Routes

Context
When a BGP device is attacked or network configuration errors occur, the BGP device will
receive a large number of routes from its peer. As a result, many device resources are
consumed. Therefore, the administrator must limit the resources used by the device based on
network planning and device capacity. BGP provides peer-based route control to limit the
number of routes to be sent by a peer. This addresses the preceding problem.

Procedure
l Configure a BGP device to receive routes from all its peers or peer groups.
a. Run system-view
The system view is displayed.
b. Run bgp { as-number-plain | as-number-dot }
The BGP view is displayed.
c. Enter the corresponding address family view based on network type to configure
BGP devices on networks.
n Run ipv4-family unicast
The BGP-IPv4 unicast address family view is displayed.
n Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
n Run ipv4-family vpnv4 [ unicast ]
The BGP-VPNv4 address family view is displayed.
n Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
n Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
n Run ipv6-family vpnv6 [ unicast ]
The BGP-VPNv6 address family view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 694


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

n Run ipv6-family vpn-instance vpn-instance-name


The BGP-VPN instance IPv6 address family view is displayed.
d. Perform either of the following operations to configure the BGP device to filter the
routes received from all its peers or peer groups:
n To filter routes based on an ACL, run the filter-policy { acl-number | acl-
name acl-name } import or the filter-policy { acl6-number | acl6-name acl6-
name } import command.
n To filter routes based on an IP prefix list, run the filter-policy ip-prefix ip-
prefix-name import or the filter-policy ipv6-prefix ipv6-prefix-name import
command.
NOTE

If an ACL has been referenced in the filter-policy command but no VPN instance is
specified in the ACL rule, BGP will filter routes including public and private network routes
in all address families. If a VPN instance is specified in the ACL rule, only the data traffic
from the VPN instance will be filtered, and no route of this VPN instance will be filtered.
e. Run commit
The configuration is committed.
l Configure a BGP device to receive routes from a specific peer or peer group.
a. Run system-view
The system view is displayed.
b. Run bgp as-number
The BGP view is displayed.
c. Enter the corresponding address family view based on network type to configure
BGP devices on networks.
n Run ipv4-family unicast
The BGP-IPv4 unicast address family view is displayed.
n Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
n Run ipv4-family vpnv4 [ unicast ]
The BGP-VPNv4 address family view is displayed.
n Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
n Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
n Run ipv6-family vpnv6 [ unicast ]
The BGP-VPNv6 address family view is displayed.
n Run ipv6-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv6 address family view is displayed.
d. Perform any of the following operations to configure the BGP device to filter the
routes received from a specific peer or peer group:
n To filter routes based on an ACL, run the peer { group-name | ipv4-address |
ipv6-address } filter-policy { acl-number | acl-name acl-name | acl6-number |
acl6-name acl6-name } import command.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 695


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

n To filter routes based on an IP prefix list, run the peer { ipv4-address | group-
name } ip-prefix ip-prefix-name import or the peer { group-name | ipv6-
address } ipv6-prefix ipv6-prefix-name import command.
n To filter routes based on an AS_Path filter, run the peer { ipv4-address |
group-name | ipv6-address } as-path-filter { as-path-filter-number | as-path-
filter-name } import command.
n To filter routes based on a route-policy, run the peer { ipv4-address | group-
name | ipv6-address } route-policy route-policy-name import command.
NOTE

The routing policy applied in the peer route-policy import command does not support a
specific interface as one matching rule. That is, the routing policy does not support the if-
match interface command.

If the number of routes received by the local device exceeds the upper limit and the
peer route-limit command is used for the first time, the local device and its peer
reestablish the peer relationship, regardless of whether alert-only is set.

e. (Optional) Run peer { ipv4-address | group-name | ipv6-address } route-limit limit


[ percentage ] [ alert-only | idle-forever | idle-timeout minutes ]

The maximum number of routes that can be received from the peer or peer group is
set.
f. Run commit

The configuration is committed.

----End

9.10.4 Configuring BGP Soft Reset

Context
After changing a BGP import policy, you must reset BGP connections for the new import
policy to take effect. This, however, interrupts these BGP connections temporarily. BGP
route-refresh allows the system to softly reset BGP connections to refresh a BGP routing table
without tearing down any BGP connection. If a device's peer does not support route-refresh,
configure the device to remain all routing updates received from the peer so that the device
can refresh its routing table without tearing down the BGP connection with the peer.

Procedure
l If a device's peer supports route-refresh, configure the device to softly reset the BGP
connection with the peer and update the BGP routing table.
a. Run system-view
The system view is displayed.
b. Run bgp { as-number-plain | as-number-dot }
The BGP view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 696


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

c. (Optional) Run peer { ipv4-address | group-name } capability-advertise route-


refreshpeer ipv6-address capability-advertise { 4-byte-as | route-refresh }or run:
Route-refresh is enabled.
By default, route-refresh is enabled.
d. Run commit
The configuration is committed.
e. Run quit
Return to the system view.
f. Run quit
Return to the user view.
g. Run refresh bgp [ vpn-instance vpn-instance-name ipv4-family | vpnv4 ] { all |
ipv4-address | group group-name | external | internal } { export | import }
or run:
refresh bgp ipv6 { all | group group-name | ipv6-address | external |
internal } { export | import }

BGP soft reset is configured.


l If a device's peer does not support route-refresh, configure the device to remain all
routing updates received from the peer so that the device can refresh its routing table
without tearing down the BGP connection with the peer.
a. Run system-view
The system view is displayed.
b. Run bgp { as-number-plain | as-number-dot }
The BGP view is displayed.
c. Enter the corresponding address family view based on network type to configure
BGP devices on networks.
n Run ipv4-family unicast
The BGP-IPv4 unicast address family view is displayed.
n Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
n Run ipv4-family vpnv4 [ unicast ]
The BGP-VPNv4 address family view is displayed.
n Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
n Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
n Run ipv6-family vpnv6 [ unicast ]
The BGP-VPNv6 address family view is displayed.
n Run ipv6-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv6 address family view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 697


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

If the peer keep-all-routes command is used on the device for the first time, the
sessions between the device and its peers are reestablished.
The refresh bgp command takes effect when the peer keep-all-routes command is
used on the device supporting route-refresh.

d. Run peer { ipv4-address | group-name | ipv6-address } keep-all-routes


The device is configured to store all the routing updates received from its peers or
peer groups.
By default, the device stores only the routing updates that are received from peers
or peer groups and match a configured import policy.
e. Run commit
The configuration is committed.
----End

9.10.5 Verifying the BGP Route Receiving and Advertisement


Control Configuration

Procedure
l Run the display ip as-path-filter [ as-path-filter-number | as-path-filter-name ]
command to check information about a configured AS_Path filter.
l Run the display ip community-filter [ basic-comm-filter-num | adv-comm-filter-num |
comm-filter-name ] command to check information about a configured community filter.
l Run the display ip extcommunity-filter [ basic-extcomm-filter-num | advanced-
extcomm-filter-num | extcomm-filter-name ] command to check information about a
configured extended community filter.
l Run the display bgp routing-table as-path-filter { as-path-filter-number | as-path-
filter-name } command to check information about routes matching a specified AS_Path
filter.
l Run the display bgp routing-table community-filter { { community-filter-name | basic-
community-filter-number } [ whole-match ] | advanced-community-filter-number }
command to check information about routes matching a specified BGP community filter.
l Run the display bgp routing-table peer ipv4-address received-routes [ active ]
[ statistics ] command to check information about routes received by a BGP device from
its peers.
l Run the display bgp multicast routing-table different-origin-as command to check
information about MBGP routes with different origin ASs.
l Run the display bgp multicast routing-table regular-expression as-regular-expression
to check information about MBGP routes matching the AS regular expression.
l Run the display bgp multicast routing-table as-path-filter { as-path-filter-number | as-
path-filter-name } command to check information about MBGP routes matching the
AS_Path filter.
l Run the display bgp multicast routing-table community-filter { { community-filter-
name | basic-community-filter-number } [ whole-match ] | advanced-community-filter-

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 698


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

number } command to check information about routes matching a specified MBGP


community filter.
l Run the display bgp multicast routing-table peer peer-address { advertised-routes |
received-routes [ active ] } [ statistics ] command to check information about routes
that are sent by and received from the specified MBGP peer.
l Run the display bgp multicast network command to check the routing information that
MBGP advertises.
----End

9.11 Adjusting the BGP Network Convergence Speed

Pre-configuration Tasks
You can configure BGP timers, disable rapid EBGP connection reset, and configure BGP
route dampening to speed up BGP network convergence and improve BGP security.
Before adjusting the BGP network convergence speed, complete the following task:
l Configuring Basic BGP Functions

Configuration Procedure
You can perform the following configuration tasks as required. The following configuration
tasks (excluding the task of Verifying the BGP Network Convergence Speed Adjustment
Configuration) can be performed in any sequence.

9.11.1 Configuring a BGP ConnectRetry Timer

Context
After BGP initiates a TCP connection, the ConnectRetry timer will be stopped if the TCP
connection is established successfully. If the first attempt to establish a TCP connection fails,
BGP tries again to establish the TCP connection after the ConnectRetry timer expires.
l Setting a short ConnectRetry interval reduces the period BGP waits between attempts to
establish a TCP connection. This speeds up the establishment of the TCP connection.
l Setting a long ConnectRetry interval suppresses routing flapping caused by peer
relationship flapping.
A ConnectRetry timer can be configured either for all peers or peer groups, or for a specific
peer or peer group. A ConnectRetry timer configured for a specific peer takes precedence
over that configured for the peer group of this peer. In addition, a ConnectRetry timer
configured for a specific peer or peer group takes precedence over that configured for all
peers or peer groups.

Procedure
l Configure a BGP ConnectRetry timer for all peers or peer groups.
a. Run system-view
The system view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 699


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

b. Run bgp { as-number-plain | as-number-dot }

The BGP view is displayed.


c. Run timer connect-retry connect-retry-time

A BGP ConnectRetry timer is configured for all peers or peer groups.

By default, the ConnectRetry timer value is 32s.


d. Run commit

The configuration is committed.


l Configure a ConnectRetry timer for a specific peer or peer group.
a. Run system-view

The system view is displayed.


b. Run bgp { as-number-plain | as-number-dot }

The BGP view is displayed.


c. Run peer { group-name | ipv4-address | ipv6-address } timer connect-retry
connect-retry-time

A ConnectRetry timer is configured for a specific peer or peer group.

By default, the ConnectRetry timer value is 32s.


d. Run commit

The configuration is committed.

----End

9.11.2 Configuring BGP Keepalive and Hold Timers

Context
Keepalive messages are used by BGP to maintain peer relationships.

l If short Keepalive time and holdtime are set, BGP can detect a link fault quickly. This
speeds up BGP network convergence, but increases the number of Keepalive messages
on the network and loads of devices, and consumes more network bandwidth resources.
l If long Keepalive time and holdtime are set, the number of Keepalive messages on the
network is reduced, loads of devices are reduced, and less network bandwidth is
consumed. If the Keepalive time is too long, BGP is unable to detect link status changes
in a timely manner. This is unhelpful for implementing rapid BGP network convergence
and may cause many packets to be lost.

Keepalive and hold timers can be configured either for all peers or peer groups, or for a
specific peer or peer group. Keepalive and hold timers configured for a specific peer take
precedence over those configured for the peer group of this peer. In addition, Keepalive and
hold timers configured for a specific peer or peer group take precedence over those
configured for all peers or peer groups.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 700


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Changing timer values using the timer command or the peer timer command interrupts BGP
peer relationships between switchs.
Setting the Keepalive time to 20s is recommended. If the Keepalive time is smaller than 20s,
sessions between peers may be closed.

Procedure
l Configure BGP timers for all peers or peer groups.
a. Run system-view

The system view is displayed.


b. Run bgp { as-number-plain | as-number-dot }

The BGP view is displayed.


c. Run timer keepalive keepalive-time hold hold-time

BGP timers are configured.

The proper maximum interval at which Keepalive messages are sent is one third the
holdtime. By default, the Keepalive time is 60s and the holdtime is 180s.
d. Run commit

The configuration is committed.


l Configure BGP timers for a specific peer or peer group.
a. Run system-view

The system view is displayed.


b. Run bgp as-number

The BGP view is displayed.


c. Run peer { ipv4-address | group-name | ipv6-address } timer keepalive keepalive-
time hold hold-time

The Keepalive and hold timers are configured for a specific peer or peer group.

The proper maximum interval at which Keepalive messages are sent is one third the
holdtime. By default, the Keepalive time is 60s and the holdtime is 180s.
d. Run commit

The configuration is committed.

----End

9.11.3 Configuring an Update Message Timer

Context
BGP does not periodically update a routing table. When BGP routes change, BGP updates the
changed BGP routes in the BGP routing table by sending Update messages.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 701


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

l If a short Update message interval is set, BGP can fast detect route changes. This speeds
up BGP network convergence, but increases the number of Update messages on the
network and loads of devices, and consumes more network bandwidth resources.
l If a long Update message interval is set, the number of Update messages on the network
is reduced, loads of devices are reduced, and less network bandwidth is consumed. This
avoids network flapping. If the Update message interval is too long, BGP is unable to
detect route changes in a timely manner. This is unhelpful for implementing rapid BGP
network convergence and may cause many packets to be lost.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run bgp { as-number-plain | as-number-dot }

The BGP view is displayed.

Step 3 Enter the corresponding address family view based on network type to configure BGP devices
on networks.
l Run ipv4-family unicast
The BGP-IPv4 unicast address family view is displayed.
l Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
l Run ipv4-family vpnv4 [ unicast ]
The BGP-VPNv4 address family view is displayed.
l Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
l Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
l Run ipv6-family vpnv6 [ unicast ]
The BGP-VPNv6 address family view is displayed.
l Run ipv6-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv6 address family view is displayed.

Step 4 Run peer { ipv4-address | group-name | ipv6-address } route-update-interval interval

An Update message timer is configured.

By default, the interval at which Update messages are sent to IBGP peers is 15s, and the
interval at which Update messages are sent to EBGP peers is 30s.

Step 5 Run commit

The configuration is committed.

----End

9.11.4 Disabling Rapid EBGP Connection Reset

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 702


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Context
Rapid EBGP connection reset is enabled by default. This allows BGP to immediately respond
to a fault on an interface and delete the direct EBGP sessions on the interface without waiting
for the hold timer to expire and implements rapid BGP network convergence.

If the status of an interface used to establish an EBGP connection changes frequently, the
EBGP session will be deleted and reestablished repeatedly, causing network flapping. Rapid
EBGP connection reset can be disabled in such a situation. BGP will delete direct EBGP
sessions on the interface until the hold timer expires. This suppresses BGP network flapping
and reduces network bandwidth consumption.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run bgp { as-number-plain | as-number-dot }

The BGP view is displayed.

Step 3 Run undo ebgp-interface-sensitive

Rapid EBGP connection reset is disabled.

By default, rapid EBGP connection reset is enabled.

NOTE

Rapid EBGP connection reset enables BGP to quickly respond to interface faults but does not enable
BGP to quickly respond to interface recovery. After the interface recovers, BGP uses its state machine to
restore relevant sessions.
Rapid EBGP connection reset is disabled in a situation where the status of an interface used to establish
an EBGP connection changes frequently. If the status of the interface becomes stable, run the ebgp-
interface-sensitive command to enable rapid EBGP connection reset to implement rapid BGP network
convergence.

Step 4 Run commit

The configuration is committed.

----End

9.11.5 Configuring BGP Route Dampening

Context
A route is considered to be flapping when it repeatedly appears and then disappears in the
routing table. BGP generally applies to complex networks where routes change frequently.
Frequent route flapping consumes lots of bandwidths and CPU resources and even affects
normal network operation. BGP route dampening prevents frequent route flapping.

BGP can differentiate routes based on policies and use different route dampening parameters
to suppress different routes. For example, on a network, you can set a long suppression time
for routes with a long mask and set a short suppression time for routes with a short mask
(such as 8-bit mask).

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 703


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run bgp { as-number-plain | as-number-dot }

The BGP view is displayed.

Step 3 Enter the corresponding address family view based on network type to configure BGP devices
on networks.
l Run ipv4-family unicast
The BGP-IPv4 unicast address family view is displayed.
l Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
l Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
l Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
l Run ipv6-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv6 address family view is displayed.

Step 4 Run dampening [ half-life-reach reuse suppress ceiling | route-policy route-policy-name ] *


[ update-standard ]

BGP route dampening parameters are configured.

NOTE

The dampening command is valid only for EBGP routes.

Step 5 Run commit

The configuration is committed.

----End

9.11.6 Configuring BGP Iteration Suppression in Case of Next


Hop Flapping

Usage Scenario
If a large number of routes are iterated to the same next hop that flaps frequently, the system
will be busy processing changes of these routes, which consumes excessive system resources
and leads to high CPU usage. To address this problem, configure BGP iteration suppression in
case of next hop flapping.

By default, BGP iteration suppression in case of next hop flapping is enabled. After this
function is enabled, BGP calculates the penalty value that starts from 0 by comparing the
flapping interval with configured intervals if next hop flapping occurs. When the penalty
value exceeds 10, BGP suppresses route iteration to the corresponding next hop.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 704


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP 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 Enter the corresponding address family view based on network type to configure BGP devices
on networks.
l Run ipv4-family unicast
The BGP-IPv4 unicast address family view is displayed.
l Run ipv4-family vpnv4 [ unicast ]
The BGP-VPNv4 address family view is displayed.
l Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
l Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
l Run ipv6-family vpnv6 [ unicast ]
The BGP-VPNv6 address family view is displayed.
l Run ipv6-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv6 address family view is displayed.

Step 4 Run undo nexthop recursive-lookup restrain disable

BGP iteration suppression in case of next hop flapping is enabled.

If you do not care about whether the system is busy processing route selection and
advertisement and the possible high CPU usage, run the nexthop recursive-lookup restrain
disable command to disable BGP iteration suppression in case of next hop flapping.

Step 5 Run quit

Return to the BGP view.

Step 6 Run nexthop recursive-lookup restrain suppress-interval add-count-time hold-interval


hold-count-time clear-interval clear-count-time

The intervals for increasing, retaining, and clearing the penalty value are configured for BGP
iteration suppression in case of next hop flapping.

By default, the intervals for increasing, retaining, and clearing the penalty value for BGP
iteration suppression in case of next hop flapping are 60s, 120s, and 600s, respectively.

Step 7 Run commit

The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 705


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

9.11.7 Enabling Slow Peer Detection


Context
An update peer-group may consist of multiple BGP peers. If a network problem (congestion
for example) occurs and slows down the speed at which the local device advertises routes to a
BGP peer in the update peer-group, the speed at which the local device advertises routes to
other BGP peers in the update peer-group is affected. To address this problem, run the slow-
peer detection command to enable slow peer detection.
After slow peer detection is enabled, the local device calculates the difference between the
time taken to send packets to each BGP peer and the shortest time taken to send packets to a
BGP peer in the group. If the difference between the time taken to send packets to BGP peer 1
and the shortest time is greater than the threshold, the local device considers BGP peer 1 as a
slow peer and removes it from the update peer-group, which prevents this slow peer from
affecting route advertisement to other peers in the group.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run bgp { as-number-plain | as-number-dot }
The BGP view is displayed.
Step 3 (Optional) Enter the corresponding address family view based on network type to configure
BGP devices on networks.
l Run ipv4-family unicast
The BGP-IPv4 unicast address family view is displayed.
l Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
l Run ipv4-family vpnv4 [ unicast ]
The BGP-VPNv4 address family view is displayed.
l Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
l Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
l Run ipv6-family vpnv6 [ unicast ]
The BGP-VPNv6 address family view is displayed.
l Run ipv6-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv6 address family view is displayed.
If none of the following commands is run, the BGP-IPv4 unicast address family view is
displayed by default.
Step 4 Run slow-peer detection threshold threshold-value
Slow peer detection is enabled.
By default, slow peer detection is enabled.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 706


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

threshold threshold-value specifies a slow peer detection threshold. If the difference between
the time taken to send packets to BGP peer 1 and the shortest time taken to send packets to
BGP peer 2 is greater than the threshold threshold-value, the local device considers BGP
peer 1 as a slow peer and removes it from the update peer-group. If threshold threshold-value
is not specified in the command, the default value (300s) is used.

Step 5 Run commit

The configuration is committed.

----End

9.11.8 Verifying the BGP Network Convergence Speed


Adjustment Configuration

Procedure
l Run the display bgp peer [ verbose ] command to check information about all BGP
peers.
l Run the display bgp group [ group-name ] command to check information about the
specified BGP peer group.
l Run the display bgp routing-table dampened command to check dampened BGP
routes.
l Run the display bgp routing-table dampening parameter command to check
configured BGP route dampening parameters.
l Run the following commands to check route flapping statistics:
– display bgp routing-table flap-info [ regular-expression as-regular-expression ]
– display bgp routing-table flap-info [ as-path-filter { as-path-filter-number | as-
path-filter-name } | network-address [ { mask | mask-length } [ longer-match ] ] ]
l Run the display bgp multicast routing-table dampened command to check dampened
MBGP routes.
l Run the display bgp multicast routing-table dampening parameter command to
check MBGP route dampening parameters.
l Run the following commands to check statistics about flapping MBGP routes:
– display bgp multicast routing-table flap-info [ ip-address [ mask [ longer-
match ] | mask-length [ longer-match ] ] | as-path-filter { as-path-filter-number |
as-path-filter-name } ]
– display bgp multicast routing-table flap-info regular-expression as-regular-
expression
l Run the display bgp slow-peer command to check information about slow BGP peers.

----End

9.12 Configuring BGP Reliability

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 707


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Pre-configuration Tasks
You can configure BFD for BGP, BGP Auto FRR, and BGP GR to speed up BGP network
convergence and improve BGP reliability.
Before configuring BGP reliability, complete the following task:
l Configuring Basic BGP Functions

Configuration Procedure
You can perform the following configuration tasks as required. The following configuration
tasks can be performed in any sequence.

9.12.1 Configuring BFD for BGP

Context
BGP periodically sends Keepalive messages to its peers to detect the status of its peers. It
takes more than 1 second for this detection mechanism to detect a fault. When data is
transmitted at gigabit rates, long-time fault detection will cause packet loss. This cannot meet
high reliability requirements of carrier-class networks. BFD for BGP can solve this problem.
BFD is a millisecond-level fault detection mechanism. It can detect faults on the link between
BGP peers within 50 ms. Therefore, BFD speeds up BGP route convergence, ensures fast link
switching, and reduces traffic loss.
When a peer joins a peer group on which BFD is enabled, BFD also takes effect on the peer
and a BFD session is created on the peer. To prevent BFD from taking effect on the peer, run
the peer bfd block command.
By default, Huawei devices establish multi-hop IBGP sessions with each other. When a
Huawei device communicates with a non-Huawei device that establishes a single-hop IBGP
session by default, you are advised to configure only association between IGP and BFD or
association between IBGP and BFD.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run bfd
Global BFD is enabled on the local device.
Step 3 Run quit
Return to the system view.
Step 4 Run bgp { as-number-plain | as-number-dot }
The BGP view is displayed.
Step 5 Run peer { group-name | ipv4-address | ipv6-address } bfd enable [ single-hop-prefer ]
BFD is configured for the peer or peer group, and default BFD parameters are used to
establish BFD sessions.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 708


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

If BFD is configured for a peer group, BFD sessions are created for the peers on which the
peer bfd block command is not used.
Step 6 Run peer { group-name | ipv4-address | ipv6-address } bfd { min-tx-interval min-tx-interval
| min-rx-interval min-rx-interval | detect-multiplier multiplier } *
BFD session parameters are configured.
Step 7 (Optional) Run peer { ipv4-address | ipv6-address } bfd block
The peer is disabled from inheriting the BFD function of the peer group to which the peer
belongs.

NOTE

l BFD sessions are established when they are in Established state.


l If BFD parameters are configured on a peer, BFD sessions are established using these parameters.
l The peer { ipv4-address | ipv6-address } bfd block and peer { ipv4-address | ipv6-address } bfd
enable commands are mutually exclusive.

Step 8 Run commit


The configuration is committed.

----End

Verifying the Configuration


l Run the display bgp bfd session { [ vpnv4 vpn-instance vpn-instance-name ] peer
ipv4-address | all } command to check information about the BFD sessions established
between BGP peers.
l Run the display bgp [ vpnv4 vpn-instance vpn-instance-name ] peer [ [ ipv4-address ]
verbose ] command to check information about BGP peers.
l Run the display bgp group [ group-name ] command to check information about the
specified BGP peer group.
l Run the display bgp vpnv4 { all | vpn-instance vpn-instance-name } group [ group-
name ] command to check information about the BGP VPNv4 peer group.

9.12.2 Configuring BGP Auto FRR

Context
On a traditional IP network, it often takes the routing system several seconds to complete
route convergence after a link fault is detected. This convergence speed cannot meet
requirements of the services that require a low delay and low packet loss rate because it may
lead to service interruption. For example, Voice over Internet Protocol (VoIP) services are
only tolerant of millisecond-level interruption. BGP Auto Fast Reroute (FRR) implements
route convergence at the millisecond level after a fault is detected at the physical layer or link
layer. BGP Auto FRR reduces the impact of link faults on services.

Procedure
Step 1 Run system-view
The system view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 709


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Step 2 Run bgp { as-number-plain | as-number-dot }

The BGP view is displayed.

Step 3 Enter the corresponding address family view based on network type to configure BGP devices
on networks.
l Run ipv4-family unicast
The BGP-IPv4 unicast address family view is displayed.
l Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
l Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
l Run ipv6-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv6 address family view is displayed.

Step 4 Run auto-frr

BGP Auto FRR is enabled for unicast routes.

By default, BGP Auto FRR is disabled for unicast routes.

Step 5 Run commit

The configuration is committed.

----End

Verifying the Configuration


l Run the display ip routing-table [ vpn-instance vpn-instance-name ] [ ipv4-address
[ mask | mask-length ] [ longer-match ] ] verbose command to check backup forwarding
information about routes in the IP routing table.

9.12.3 Configuring the BGP GR Function

Context
BGP restart causes peer relationship reestablishment and traffic interruption. Graceful restart
(GR) ensures uninterrupted traffic interruption in the case of BGP restart.

NOTE

Currently, devices support only the GR helper function, and the GR restarter function is implemented
using non-stop routing (NSR). NSR does not need to be configured.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run bgp { as-number-plain | as-number-dot }

The BGP view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 710


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Step 3 Run graceful-restart


BGP GR is enabled.
By default, BGP GR is disabled.
Step 4 (Optional) Run graceful-restart timer wait-for-rib timer
The time during which the restarting speaker and receiving speaker wait for End-of-RIB
messages is set.
By default, the time for waiting for End-of-RIB messages is 600 seconds.
Step 5 (Optional) Run graceful-restart peer-reset
The device is enabled to reset a BGP session in GR mode.
By default, a device is disabled from resetting a BGP connection in GR mode.
Step 6 (Optional) Run graceful-restart timer restart time
The maximum delay to reestablish a BGP session after a peer detects the restart of the local
device is set.
By default, the maximum delay to reestablish a BGP session after a peer detects the restart of
the local device is 150 seconds.
Step 7 Run commit
The configuration is committed.

----End

Verifying the Configuration


l Run the display bgp peer verbose command to check detailed information about BGP
GR.

9.13 Configuring BGP Route Summarization

Pre-configuration Tasks
On IPv4 networks, BGP supports automatic route summarization and manual route
summarization. Manual route summarization takes precedence over automatic route
summarization.
Before configuring BGP route summarization, complete the following task:
l Configuring Basic BGP Functions

Procedure
l Configure automatic route summarization.
a. Run system-view
The system view is displayed.
b. Run bgp { as-number-plain | as-number-dot }

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 711


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

The BGP view is displayed.


c. Enter the corresponding address family view based on network type to configure
BGP devices on networks.
n Run ipv4-family unicast
The BGP-IPv4 unicast address family view is displayed.
n Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
n Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
d. Run summary automatic
BGP summarizes subnet routes based on natural mask.

NOTE

The command summarizes the routes imported by BGP. These routes can be direct routes, static
routes, RIP routes, OSPF routes, or IS-IS routes. The command, however, is invalid for the routes
imported using the network command.
e. Run commit
The configuration is committed.
l Configure IPv4 manual route summarization.
a. Run system-view
The system view is displayed.
b. Run bgp { as-number-plain | as-number-dot }
The BGP view is displayed.
c. Enter the corresponding address family view based on network type to configure
BGP devices on networks.
n Run ipv4-family unicast
The BGP-IPv4 unicast address family view is displayed.
n Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
n Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
d. Perform any of the following operations to configure manual route summarization:
n To advertise the summarized routes and specific routes, run the aggregate
ipv4-address { mask | mask-length } command.
n To advertise only the summarized routes, run the aggregate ipv4-address
{ mask | mask-length } detail-suppressed command.
n To advertise the summarized routes and specific routes that meet the specified
route-policy, run the aggregate ipv4-address { mask | mask-length } suppress-
policy route-policy-name command.
n To advertise the summarized routes of which the AS_Set attribute helps detect
routing loops, run the aggregate ipv4-address { mask | mask-length } as-set
command.
n To set attributes for the summarized routes, run the aggregate ipv4-address
{ mask | mask-length } attribute-policy route-policy-name command.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 712


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

n To summarize the specific routes that meet the specified route-policy, run the
aggregate ipv4-address { mask | mask-length } origin-policy route-policy-
name command.
NOTE

IPv4 manual route summarization is valid for the routes in the local BGP routing table. For
example, if the local BGP routing table does not contain routes with mask longer than 16 bits,
such as [Link]/24, BGP will not generate an aggregated route for it even if the aggregate
[Link] 16 command is used.
e. Run commit
The configuration is committed.
l Configure IPv6 manual route summarization.
a. Run system-view
The system view is displayed.
b. Run bgp { as-number-plain | as-number-dot }
The BGP view is displayed.
c. Enter the corresponding address family view based on network type to configure
BGP devices on networks.
n Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
n Run ipv6-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv6 address family view is displayed.
d. Perform any of the following operations to configure manual route summarization:
n To advertise the summarized routes and specific routes, run the aggregate
ipv6-address { mask | mask-length } command.
n To advertise only the summarized routes, run the aggregate ipv6-address
{ mask | mask-length } detail-suppressed command.
n To advertise the summarized routes and specific routes that meet the specified
route-policy, run the aggregate ipv6-address { mask | mask-length } suppress-
policy route-policy-name command.
n To advertise the summarized routes of which the AS_Set attribute helps detect
routing loops, run the aggregate ipv6-address { mask | mask-length } as-set
command.
n To set attributes for the summarized routes, run the aggregate ipv6-address
{ mask | mask-length } attribute-policy route-policy-name command.
n To summarize the specific routes that meet the specified route-policy, run the
aggregate ipv6-address { mask | mask-length } origin-policy route-policy-
name command.
NOTE

IPv6 manual route summarization is valid for the routes in the local BGP routing table. For
example, if the local BGP routing table does not contain routes with mask longer than 64 bits,
such as fc00:1::1/128, BGP will not generate an aggregated route for it even if the aggregate
fc00:1::1 64 command is used.
e. Run commit
The configuration is committed.
----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 713


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Verifying the Configuration


l Run the display bgp routing-table [ ipv4-address [ { mask | mask-length } [ longer-
prefixes ] ] ] command to check information about summarized routes.
l Run the display bgp multicast routing-table [ ip-address [ mask-length [ longer-
prefixes ] | mask [ longer-prefixes ] ] ] command to check the MBGP routing table.

9.14 Configuring BGP to Advertise Default Routes to


Peers

Context
If a BGP device needs to send multiple routes to its peer, the BGP device can be configured to
send only a default route with the local address as the next-hop address to its peer, regardless
of whether there are default routes in the local routing table. This function reduces the number
of network routes and saves memory and network resources.

Default routes are commonly used on a network that meets the following conditions:

l Each device has multiple EBGP peers and receives all routes on the network from each
EBGP peer.
l There are multiple route reflectors (RRs), and each RR receives all routes on the
network.

If load balancing is not implemented on the network, a BGP peer receives at most one copy of
active routes on the network. If load balancing is implemented on the network, the number of
active routes received by a BGP peer will be increased by multiple times, causing the number
of routes on the network to sharply increase. To greatly reduce the number of routes on such a
network, configure a BGP device to advertise only default routes to its BGP peer and use
default routes for traffic load balancing.

Before configuring BGP to send default routes to peers, complete the following task:

l Configuring Basic BGP Functions

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run bgp { as-number-plain | as-number-dot }

The BGP view is displayed.

Step 3 Enter the corresponding address family view based on network type to configure BGP devices
on networks.
l Run ipv4-family unicast
The BGP-IPv4 unicast address family view is displayed.
l Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 714


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

l Run ipv4-family vpn-instance vpn-instance-name


The BGP-VPN instance IPv4 address family view is displayed.
l Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
l Run ipv6-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv6 address family view is displayed.

Step 4 Run either of the following commands to configure a BGP device to send default routes to a
peer or peer group.
l Run peer { group-name | ipv4-address | ipv6-address } default-route-advertise [ route-
policy route-policy-name ] [ conditional-route-match-all { ipv4-address1 { mask1 |
mask-length1 } } &<1-4> | conditional-route-match-any { ipv4-address2 { mask2 |
mask-length2 } } &<1-4> ]
NOTE

The conditional-route-match-all and conditional-route-match-any keywords are not supported in the IPv4
multicast address family view or the IPv6 address family view.

Step 5 Run commit

The configuration is committed.

----End

Verifying the Configuration


l Run the display bgp routing-table [ ipv4-address [ mask | mask-length [ longer-
prefixes ] ] ] command to check received BGP default routes.
l Run the display bgp multicast routing-table [ ip-address [ mask-length [ longer-
prefixes ] | mask [ longer-prefixes ] ] ] command to check received MBGP default
routes.

9.15 Configuring MP-BGP

Pre-configuration Tasks
Multiprotocol BGP (MP-BGP) enables BGP to support IPv4 unicast networks, IPv4 multicast
networks, and IPv6 unicast networks.

Before configuring MP-BGP, complete the following task:

l 9.6.2 Starting a BGP Process

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run bgp { as-number-plain | as-number-dot }

BGP is started, the local AS number is specified, and the BGP view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 715


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Step 3 Enter the corresponding address family view based on network type to configure BGP devices
on networks.
l Run ipv4-family unicast
The BGP-IPv4 unicast address family view is displayed.
l Run ipv4-family vpnv4
The BGP-VPNv4 address family view is displayed.
l Run ipv4-family vpn-instance vpn-instance-name
The BGP-VPN instance IPv4 address family view is displayed.
l Run ipv4-family multicast
The BGP-IPv4 multicast address family view is displayed.
l Run ipv6-family [ unicast ]
The BGP-IPv6 unicast address family view is displayed.
NOTE

Different extended BGP functions must be configured in their respective address family views, while
common BGP functions are configured in the BGP view.

Step 4 Configure the following MBGP features supported by the Switch:


l 9.6 Configuring Basic BGP Functions
l 9.7.1 Configuring MD5 Authentication and 9.7.2 Configuring Keychain
Authentication (BGP security)
l 9.8 Simplifying IBGP Network Connections
l 9.9 Configuring BGP Route Selection and Load Balancing
l 9.10 Controlling the Receiving and Advertisement of BGP Routes
l 9.11 Adjusting the BGP Network Convergence Speed
l 9.12 Configuring BGP Reliability
l 9.13 Configuring BGP Route Summarization
l 9.14 Configuring BGP to Advertise Default Routes to Peers

----End

9.16 Configuring BMP


Context
The BGP Monitoring Protocol (BMP) monitors BGP running status, such as BGP peer
relationship establishment and termination and route updates. Without BMP, manual query is
required if you want to know about BGP running status. To improve the network monitoring
efficiency, you can configure BMP on a router to use a monitoring server on the network to
monitor BGP running status.

NOTE

The CE6810LI does not support the BMP configuration.

Pre-configuration Tasks
Before configuring BMP, configure basic BGP functions.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 716


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run bmp
BMP is started and the BMP view is displayed.
Step 3 (Optional) Run statistics-timer time
An interval is set, at which the router sends BGP running statistics to a monitoring server.
Configure the interval based on the network stability requirements. If BGP requires high
stability, configure a small interval. However, if the router sends BGP running statistics
frequently, a large amount of bandwidth resources will be consumed.
The default interval is 3600s. Retaining the default value is recommended.
Step 4 (Optional) Run route-mode { pre-policy | post-policy }
Whether statistics about all received routes or only accepted routes are sent to the monitoring
server is set.
By default, statistics about only the accepted routes (routes that match the import policy) are
sent to the monitoring server.

NOTE

If you specify pre-policy in the command, run the keep-all-routes command or the peer keep-all-
routes command in the BGP view to save the routes carried in the BGP Update messages that are
advertised by all BGP peers or peer groups after BGP connections are established.

Step 5 Run session { ipv4-address | ipv6-address }


An IPv4 address of the monitoring server is specified for TCP connections to be set up
between the router and the monitoring server.
Step 6 Run tcp connect port port-number [ password md5 cipher-password ]
Parameters are configured for TCP connections to be set up between the router and the
monitoring server.
Step 7 Run commit
The configuration is committed.

NOTE

After configuring BMP session parameters, run the reset bmp session command in the user view to
reset the BMP session for the new BMP session parameters to take effect.

----End

Verifying the Configuration


Run the display bmp session command to check BMP session configurations.

9.17 Maintaining BGP

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 717


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

9.17.1 Resetting BGP Connections

Context

Running the reset bgp command to reset BGP connections will interrupt BGP peer
relationships between BGP devices. Exercise caution when you use this command.

When the BGP routing policy changes, for example, the switch does not support the route-
refresh capability, reset BGP connections to make the modification take effect.

Procedure
l To reset all BGP connections, run the reset bgp all command in the user view.
l To reset the BGP connection with a specified AS, run the reset bgp { as-number-plain |
as-number-dot } command in the user view.
l To reset the BGP connection with a specified peer, run the reset bgp ipv4-address
command in the user view.
l To reset all EBGP connections, run the reset bgp external command in the user view.
l To reset the BGP connection with a specified peer group, run the reset bgp group
group-name command in the user view.
l To reset all IBGP connections, run the reset bgp internal command in the user view.
l To reset the MBGP connection with a specified peer, run the reset bgp multicast peer-
address command in the user view.
l To reset all MBGP connections, run the reset bgp multicast all command in the user
view.
l To reset the MBGP connection with all the peers in a specified peer group, run the reset
bgp multicast group group-name command in the user view.
l To reset all external connections, run the reset bgp multicast external command in the
user view.
l To reset all internal connections, run the reset bgp multicast internal command in the
user view.
----End

9.17.2 Clearing BGP Statistics

Context

BGP statistics cannot be restored after being cleared. Exercise caution when you clear BGP
statistics.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 718


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Procedure
l To clear route flapping statistics, run the reset bgp flap-info [ regexp as-path-regexp |
as-path-filter { as-path-filter-number | as-path-filter-name } | network-address [ mask |
mask-length ] ] command in the user view.
l To clear route flapping statistics on a specified peer, run the reset bgp ipv4-address flap-
info command in the user view.
l To clear route dampening statistics and release suppressed routes, run the reset bgp
dampening [ ipv4-address [ mask | mask-length ] ] command in the user view.
l To clear MBGP route dampening statistics, run the reset bgp multicast dampening [ ip-
address [ mask | mask-length ] ] command in the user view.
l To clear MBGP route flapping statistics, run the reset bgp multicast flap-info [ ip-
address [ mask | mask-length ] | as-path-filter { as-path-list-number | as-path-list-
name } | regrexp regrexp ] command in the user view.

----End

9.18 Configuration Examples for BGP


This section only provides configuration examples for individual features. For details about
multi-feature configuration examples, feature-specific configuration examples, interoperation
examples, protocol or hardware replacement examples, and industry application examples, see
the Typical Configuration Examples.

9.18.1 Example for Configuring Basic BGP Functions

Networking Requirements
As shown in Figure 9-19, BGP runs between Switches; an EBGP connection is established
between SwitchA and SwitchB; IBGP full-mesh connections are established between
SwitchB, SwitchC, and SwitchD.

Figure 9-19 Networking diagram of configuring basic BGP functions

10GE1/0/1 SwitchC
10GE1/0/2 10GE1/0/2 VLANIF20
VLANIF50 10GE1/0/1 VLANIF2010.1.3.2/24 10GE1/0/2
[Link]/8 VLANIF10 [Link]/24 VLANIF40
[Link]/24 [Link]/24

10GE1/0/1 SwitchB10GE1/0/3 10GE1/0/2


SwitchAVLANIF10
VLANIF30 VLANIF40
[Link]/24 [Link]/24
[Link]/24 10GE1/0/1
VLANIF30
AS65008 AS65009
[Link]/24 SwitchD

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 719


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure IBGP connections between SwitchB, SwitchC, and SwitchD.
2. Configure an EBGP connection between SwitchA and SwitchB.

Procedure
Step 1 Configure the VLAN to which each interface belongs.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan batch 10 50
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 50
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit

The configurations of SwitchB, SwitchC, and SwitchD are similar to the configuration of
SwitchA, and are not mentioned here.
Step 2 Configure VLANIF interfaces and assign IP addresses to the VLANIF interfaces.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ip address [Link] 24
[*SwitchA-Vlanif10] quit
[*SwitchA] interface vlanif 50
[*SwitchA-Vlanif50] ip address [Link] 8
[*SwitchA-Vlanif50] quit
[*SwitchA] commit

The configurations of SwitchB, SwitchC, and SwitchD are similar to the configuration of
SwitchA, and are not mentioned here.
Step 3 Configure IBGP connections.
# Configure SwitchB.
[~SwitchB] bgp 65009
[*SwitchB-bgp] router-id [Link]
[*SwitchB-bgp] peer [Link] as-number 65009
[*SwitchB-bgp] peer [Link] as-number 65009
[*SwitchB-bgp] quit
[*SwitchB] commit

# Configure SwitchC.
[~SwitchC] bgp 65009
[*SwitchC-bgp] router-id [Link]
[*SwitchC-bgp] peer [Link] as-number 65009
[*SwitchC-bgp] peer [Link] as-number 65009
[*SwitchC-bgp] quit
[*SwitchC] commit

# Configure SwitchD.
[~SwitchD] bgp 65009
[*SwitchD-bgp] router-id [Link]
[*SwitchD-bgp] peer [Link] as-number 65009
[*SwitchD-bgp] peer [Link] as-number 65009

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 720


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

[*SwitchD-bgp] quit
[*SwitchD] commit

Step 4 Configure an EBGP connection.


# Configure SwitchA.
[~SwitchA] bgp 65008
[*SwitchA-bgp] router-id [Link]
[*SwitchA-bgp] peer [Link] as-number 65009
[*SwitchA-bgp] quit
[*SwitchA] commit

# Configure SwitchB.
[~SwitchB] bgp 65009
[~SwitchB-bgp] peer [Link] as-number 65008
[*SwitchB-bgp] quit
[*SwitchB] commit

# View the status of BGP peers.


[~SwitchB] display bgp peer
BGP local router ID : [Link]
Local AS number : 65009
Total number of peers : 3 Peers in established state : 3

Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv

[Link] 4 65009 49 62 0 00:44:58 Established 0


[Link] 4 65009 56 56 0 00:40:54 Established 0
[Link] 4 65008 49 65 0 00:44:03 Established 1

The preceding command output shows that BGP connections have been established between
SwitchB and other Switches.
Step 5 Configure SwitchA to advertise route [Link]/8.
# Configure SwitchA to advertise route [Link].
[~SwitchA] bgp 65008
[~SwitchA-bgp] ipv4-family unicast
[~SwitchA-bgp-af-ipv4] network [Link] [Link]
[*SwitchA-bgp-af-ipv4] quit
[*SwitchA-bgp] quit
[*SwitchA] commit

# View the BGP routing table of SwitchA.


[~SwitchA] display bgp routing-table
BGP Local router ID is [Link]
Status codes: * - valid, > - best, d - damped, x - best external, a - add path,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 1
Network NextHop MED LocPrf PrefVal Path/Ogn

*> [Link] [Link] 0 0 i

# View the BGP routing table of SwitchB.


[~SwitchB] display bgp routing-table
BGP Local router ID is [Link]
Status codes: * - valid, > - best, d - damped, x - best external, a - add path,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 1
Network NextHop MED LocPrf PrefVal Path/Ogn

*> [Link] [Link] 0 0 65008i

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 721


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

# View the BGP routing table of SwitchC.


[~SwitchC] display bgp routing-table
BGP Local router ID is [Link]
Status codes: * - valid, > - best, d - damped, x - best external, a - add path,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 1
Network NextHop MED LocPrf PrefVal Path/Ogn

i [Link] [Link] 0 100 0 65008i

The preceding command output shows that SwitchC has learned the route to destination
[Link] in AS 65008. The route, however, is invalid because the next hop [Link] of this
route is unreachable.
Step 6 Configure BGP to import direct routes.
# Configure SwitchB.
[~SwitchB] bgp 65009
[~SwitchB-bgp] ipv4-family unicast
[*SwitchB-bgp-af-ipv4] import-route direct
[*SwitchB-bgp-af-ipv4] quit
[*SwitchB-bgp] quit
[*SwitchB] commit

# View the BGP routing table of SwitchA.


[~SwitchA] display bgp routing-table
BGP Local router ID is [Link]
Status codes: * - valid, > - best, d - damped, x - best external, a - add path,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 4
Network NextHop MED LocPrf PrefVal Path/Ogn

*> [Link] [Link] 0 0 i


*> [Link]/24 [Link] 0 0 65009?
*> [Link]/24 [Link] 0 0 65009?
[Link] [Link] 0 0 65009?

# View the BGP routing table of SwitchC.


[~SwitchC] display bgp routing-table
BGP Local router ID is [Link]
Status codes: * - valid, > - best, d - damped, x - best external, a - add path,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 4
Network NextHop MED LocPrf PrefVal Path/Ogn

* i [Link] [Link] 0 100 0 65008i


*>i [Link]/24 [Link] 0 100 0 ?
i [Link]/24 [Link] 0 100 0 ?
*>i [Link] [Link] 0 100 0 ?

The preceding command output shows that the route to destination [Link] becomes valid
because the next-hop address of this route is the address of SwitchA.
# Run the ping [Link] command on SwitchC.
[~SwitchC] ping [Link]
PING [Link]: 56 data bytes, press CTRL_C to break
Reply from [Link]: bytes=56 Sequence=1 ttl=254 time=31 ms
Reply from [Link]: bytes=56 Sequence=2 ttl=254 time=47 ms
Reply from [Link]: bytes=56 Sequence=3 ttl=254 time=31 ms
Reply from [Link]: bytes=56 Sequence=4 ttl=254 time=16 ms
Reply from [Link]: bytes=56 Sequence=5 ttl=254 time=31 ms

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 722


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

--- [Link] ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 16/31/47 ms

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10 50
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif50
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 50
#
bgp 65008
router-id [Link]
peer [Link] as-number 65009
#
ipv4-family unicast
network [Link]
peer [Link] enable
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 10 20 30
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif20
ip address [Link] [Link]
#
interface Vlanif30
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 30
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 723


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

bgp 65009
router-id [Link]
peer [Link] as-number 65009
peer [Link] as-number 65009
peer [Link] as-number 65008
#
ipv4-family unicast
import-route direct
peer [Link] enable
peer [Link] enable
peer [Link] enable
#
return
l Configuration file of SwitchC
#
sysname SwitchC
#
vlan batch 20 40
#
interface Vlanif20
ip address [Link] [Link]
#
interface Vlanif40
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
bgp 65009
router-id [Link]
peer [Link] as-number 65009
peer [Link] as-number 65009
#
ipv4-family unicast
peer [Link] enable
peer [Link] enable
#
return
l Configuration file of SwitchD
#
sysname SwitchD
#
vlan batch 30 40
#
interface Vlanif30
ip address [Link] [Link]
#
interface Vlanif40
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
bgp 65009
router-id [Link]
peer [Link] as-number 65009
peer [Link] as-number 65009
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 724


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

ipv4-family unicast
peer [Link] enable
peer [Link] enable
#
return

9.18.2 Example for Configuring Basic BGP4+ Functions

Networking Requirements
As shown in Figure 9-20, there are two ASs: 65008 and 65009. SwitchA belongs to AS
65008, and SwitchB, SwitchC, and SwitchD belong to AS 65009. A routing Protocol is
required to exchange the routing information between the two ASs.

Figure 9-20 Networking diagram of configuring basic BGP4+ functions

10 LA
AN 1/0/3
0

G NIF
V
IF3
AS 65009

E1 5
AS 65008

0 10GE

/0 0
/2 V
SwitchC

VL

10 LA
G NIF
AN 0/3

E1 5
IF3
VL E1/

/0 0
/2
10GE1/0/1
G

VLANIF10
10

10GE1/0/2 10GE1/0/2
10GE1/0/1 10GE1/0/1
VLANIF20 VLANIF20
VLANIF40 VLANIF40

SwitchA SwitchB SwitchD

Table 9-8

Switch Interface IPv6 Address

SwitchA VLANIF10 FC00:0:0:80::1/64

VLANIF20 FC00:0:0:100::2/64

SwitchB VLANIF20 FC00:0:0:100::1/64

VLANIF30 FC00:0:0:93::1/64

VLANIF40 FC00:0:0:91::1/64

SwitchC VLANIF30 FC00:0:0:93::2/64

VLANIF50 FC00:0:0:92::1/64

SwitchD VLANIF40 FC00:0:0:91::2/64

VLANIF50 FC00:0:0:92::2/64

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 725


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure IBGP connections between SwitchB, SwitchC, and SwitchD.
2. Configure an EBGP connection between SwitchA and SwitchB.

Procedure
Step 1 Add interfaces to VLANs.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan batch 10 20
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA]interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 20
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit

The configurations of SwitchB, SwitchC, and SwitchD are similar to the configuration of
SwitchA, 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 SwitchA. The configurations of other Switches are similar to
the configuration of SwitchA, and are not mentioned here.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ipv6 enable
[*SwitchA-Vlanif10] ipv6 address fc00:0:0:80::1/64
[*SwitchA-Vlanif10] quit
[*SwitchA] interface vlanif 20
[*SwitchA-Vlanif20] ipv6 enable
[*SwitchA-Vlanif20] ipv6 address fc00:0:0:100::2/64
[*SwitchA-Vlanif20] quit
[*SwitchA] commit

Step 3 Configure IBGP.


# Configure SwitchB.
[~SwitchB] bgp 65009
[*SwitchB-bgp] router-id [Link]
[*SwitchB-bgp] peer fc00:0:0:91::2 as-number 65009
[*SwitchB-bgp] peer fc00:0:0:93::2 as-number 65009
[*SwitchB-bgp] ipv6-family unicast
[*SwitchB-bgp-af-ipv6] peer fc00:0:0:91::2 enable
[*SwitchB-bgp-af-ipv6] peer fc00:0:0:93::2 enable
[*SwitchB-bgp-af-ipv6] network fc00:0:0:91:: 64
[*SwitchB-bgp-af-ipv6] network fc00:0:0:93:: 64
[*SwitchB-bgp-af-ipv6] quit
[*SwitchB-bgp] quit
[*SwitchB] commit

# Configure SwitchC.
[~SwitchC] bgp 65009
[*SwitchC-bgp] router-id [Link]
[*SwitchC-bgp] peer fc00:0:0:93::1 as-number 65009
[*SwitchC-bgp] peer fc00:0:0:92::2 as-number 65009
[*SwitchC-bgp] ipv6-family unicast
[*SwitchC-bgp-af-ipv6] peer fc00:0:0:93::1 enable

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 726


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

[*SwitchC-bgp-af-ipv6] peer fc00:0:0:92::2 enable


[*SwitchC-bgp-af-ipv6] network fc00:0:0:93:: 64
[*SwitchC-bgp-af-ipv6] network fc00:0:0:92:: 64
[*SwitchC-bgp-af-ipv6] quit
[*SwitchC-bgp] quit
[*SwitchC] commit

# Configure SwitchD.
[~SwitchD] bgp 65009
[*SwitchD-bgp] router-id [Link]
[*SwitchD-bgp] peer fc00:0:0:91::1 as-number 65009
[*SwitchD-bgp] peer fc00:0:0:92::1 as-number 65009
[*SwitchD-bgp] ipv6-family unicast
[*SwitchD-bgp-af-ipv6] peer fc00:0:0:91::1 enable
[*SwitchD-bgp-af-ipv6] peer fc00:0:0:92::1 enable
[*SwitchD-bgp-af-ipv6] network fc00:0:0:92:: 64
[*SwitchD-bgp-af-ipv6] network fc00:0:0:91:: 64
[*SwitchD-bgp-af-ipv6] quit
[*SwitchD-bgp] quit
[*SwitchD] commit

Step 4 Configure the EBGP connection.


# Configure SwitchA.
[~SwitchA] bgp 65008
[*SwitchA-bgp] router-id [Link]
[*SwitchA-bgp] peer fc00:0:0:100::1 as-number 65009
[*SwitchA-bgp] ipv6-family unicast
[*SwitchA-bgp-af-ipv6] peer fc00:0:0:100::1 enable
[*SwitchA-bgp-af-ipv6] network fc00:0:0:100:: 64
[*SwitchA-bgp-af-ipv6] network fc00:0:0:80:: 64
[*SwitchA-bgp-af-ipv6] quit
[*SwitchA-bgp] quit
[*SwitchA] commit

# Configure SwitchB.
[~SwitchB] bgp 65009
[~SwitchB-bgp] peer fc00:0:0:100::2 as-number 65008
[*SwitchB-bgp] ipv6-family unicast
[*SwitchB-bgp-af-ipv6] peer fc00:0:0:100::2 enable
[*SwitchB-bgp-af-ipv6] network fc00:0:0:100:: 64
[*SwitchB-bgp-af-ipv6] quit
[*SwitchB-bgp] quit
[*SwitchB] commit

# View the status of the BGP4+ peers.


[~SwitchB] display bgp ipv6 peer
BGP local router ID : [Link]
Local AS number : 65009
Total number of peers : 3
Peers in established state : 3

Peer V AS MsgRcvd MsgSent OutQ Up/Down State


PrefRcv
FC00:0:0:91::2 4 65009 10 12 0 00:05:59
Established 2
FC00:0:0:93::2 4 65009 4 4 0 00:00:11
Established 2
FC00:0:0:100::2 4 65008 8 10 0 00:03:57
Established 1

The preceding information shows that the BGP4+ connections between SwitchB and other
Switches are set up.
# Display the routing table of SwitchA.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 727


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

[~SwitchA] display bgp ipv6 routing-table


BGP Local router ID is [Link]
Status codes: * - valid, > - best, d - damped, h - history,
i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete

Total Number of Routes: 6


*> Network : FC00:0:0:80:: PrefixLen : 64
NextHop : :: LocPrf :
MED : 0 PrefVal : 0
Label :
Path/Ogn : i
*> Network : FC00:0:0:91:: PrefixLen : 64
NextHop : FC00:0:0:100::1 LocPrf :
MED : 0 PrefVal : 0
Label :
Path/Ogn : 65009i
*> Network : FC00:0:0:92:: PrefixLen : 64
NextHop : FC00:0:0:100::1 LocPrf :
MED : PrefVal : 0
Label :
Path/Ogn : 65009i
*> Network : FC00:0:0:93:: PrefixLen : 64
NextHop : FC00:0:0:100::1 LocPrf :
MED : 0 PrefVal : 0
Label :
Path/Ogn : 65009i
*> Network : FC00:0:0:100:: PrefixLen : 64
NextHop : :: LocPrf :
MED : 0 PrefVal : 0
Label :
Path/Ogn : i
*
NextHop : FC00:0:0:100::1 LocPrf :
MED : 0 PrefVal : 0
Label :
Path/Ogn : 65009i

The routing table shows that SwitchA has learned the route from AS 65009. AS 65008 and
AS 65009 can exchange their routing information.

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10 20
#
interface Vlanif10
ipv6 enable
ipv6 address FC00:0:0:80::1/64
#
interface Vlanif20
ipv6 enable
ipv6 address FC00:0:0:100::2/64
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 728


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

bgp 65008
router-id [Link]
peer FC00:0:0:100::1 as-number 65009
#
ipv4-family unicast
#
ipv6-family unicast
network FC00:0:0:80:: 64
network FC00:0:0:100:: 64
peer FC00:0:0:100::1 enable
#
return
l Configuration file of SwitchB
#
sysname SwitchB
#
vlan batch 20 30 40
#
interface Vlanif20
ipv6 enable
ipv6 address FC00:0:0:100::1/64
#
interface Vlanif30
ipv6 enable
ipv6 address FC00:0:0:93::1/64
#
interface Vlanif40
ipv6 enable
ipv6 address FC00:0:0:91::1/64
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 40
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 30
#
bgp 65009
router-id [Link]
peer FC00:0:0:91::2 as-number 65009
peer FC00:0:0:93::2 as-number 65009
peer FC00:0:0:100::2 as-number 65008
#
ipv4-family unicast
#
ipv6-family unicast
network FC00:0:0:91:: 64
network FC00:0:0:93:: 64
network FC00:0:0:100:: 64
peer FC00:0:0:91::2 enable
peer FC00:0:0:93::2 enable
peer FC00:0:0:100::2 enable
#
return
l Configuration file of SwitchC
#
sysname SwitchC
#
vlan batch 30 50
#
interface Vlanif30
ipv6 enable
ipv6 address FC00:0:0:93::2/64

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 729


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

#
interface Vlanif50
ipv6 enable
ipv6 address FC00:0:0:92::1/64
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 50
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 30
#
bgp 65009
router-id [Link]
peer FC00:0:0:92::2 as-number 65009
peer FC00:0:0:93::1 as-number 65009
#
ipv4-family unicast
#
ipv6-family unicast
network FC00:0:0:92:: 64
network FC00:0:0:93:: 64
peer FC00:0:0:92::2 enable
peer FC00:0:0:93::1 enable
#
return

l Configuration file of SwitchD


#
sysname SwitchD
#
vlan batch 40 50
#
interface Vlanif40
ipv6 enable
ipv6 address FC00:0:0:91::2/64
#
interface Vlanif50
ipv6 enable
ipv6 address FC00:0:0:92::2/64
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 40
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 50
#
bgp 65009
router-id [Link]
peer FC00:0:0:91::1 as-number 65009
peer FC00:0:0:92::1 as-number 65009
#
ipv4-family unicast
#
ipv6-family unicast
network FC00:0:0:91:: 64
network FC00:0:0:92:: 64
peer FC00:0:0:91::1 enable
peer FC00:0:0:92::1 enable
#
return

9.18.3 Example for Configuring Basic MBGP Functions

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 730


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Networking Requirements
As shown in Figure 9-21, the receiver receives VoD information in multicast mode. The
receiver and the source reside in different ASs. Multicast routing information needs to be
transmitted between ASs.

Figure 9-21 Networking diagram of configuring MBGP

AS100 AS200
SwitchD
Loopback0
10GE1/0/2
10GE1/0/1

Source SwitchA SwitchB 10GE1/0/2

10GE1/0/2 10GE1/0/1 10GE1/0/1


10GE1/0/3
Loopback0 Loopback0

10GE1/0/1
10GE1/0/3
SwitchC Loopback0
10GE1/0/2
Receiver

MBGP peers

Table 9-9 Data preparation


Switch Interface VLANIF Interface IP Address

SwitchA 10GE1/0/1 VLANIF100 [Link]/24

10GE1/0/2 VLANIF101 [Link]/24

Loopback0 - [Link]/32

SwitchB 10GE1/0/1 VLANIF100 [Link]/24

10GE1/0/2 VLANIF200 [Link]/24

10GE1/0/3 VLANIF300 [Link]/24

Loopback0 - [Link]/32

SwitchC 10GE1/0/1 VLANIF400 [Link]/24

10GE1/0/2 VLANIF102 [Link]/24

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 731


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Switch Interface VLANIF Interface IP Address

10GE1/0/3 VLANIF300 [Link]/24

Loopback0 - [Link]/32

SwitchD 10GE1/0/1 VLANIF400 [Link]/24

10GE1/0/2 VLANIF200 [Link]/24

Loopback0 - [Link]/32

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure MBGP peers for inter-AS multicast transmission.
2. Configure the routes advertised by MBGP.
3. Enable the multicast function on each switch.
4. Configure basic PIM-SM functions on each switch in ASs and enable IGMP on receiver-
side interfaces.
5. Configure a BSR boundary on the interfaces that connect to two ASs.
6. Configure MSDP peers to transmit inter-domain multicast source information.

Procedure
Step 1 Assign IP addresses to the interfaces on each switch and configure OSPF in ASs.
# Configure IP addresses and masks for the interfaces on each switch according to Figure
9-21 and configure OSPF on the switches in ASs. Ensure that SwitchB, SwitchC, and
SwitchD can communicate with the receiver at the network layer, learn routes to the loopback
interfaces of each other, and dynamically update routes using a unicast routing protocol.
Configure OSPF process 1. The configuration procedure is not mentioned here.
Step 2 Configure BGP, enable the MBGP protocol, and configure MBGP peers.
# Configure BGP and the MBGP peer on SwitchA.
[~SwitchA] bgp 100
[*SwitchA-bgp] peer [Link] as-number 200
[*SwitchA-bgp] ipv4-family multicast
[*SwitchA-bgp-af-multicast] peer [Link] enable
[*SwitchA-bgp-af-multicast] quit
[*SwitchA-bgp] quit
[*SwitchA] commit

# Configure BGP and the MBGP peer on SwitchB.


[~SwitchB] bgp 200
[*SwitchB-bgp] peer [Link] as-number 100
[*SwitchB-bgp] peer [Link] as-number 200
[*SwitchB-bgp] peer [Link] as-number 200
[*SwitchB-bgp] ipv4-family multicast
[*SwitchB-bgp-af-multicast] peer [Link] enable
[*SwitchB-bgp-af-multicast] peer [Link] enable
[*SwitchB-bgp-af-multicast] peer [Link] enable
[*SwitchB-bgp-af-multicast] quit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 732


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

[*SwitchB-bgp] quit
[*SwitchB] commit

# Configure BGP and the MBGP peer on SwitchC.


[~SwitchC] bgp 200
[*SwitchC-bgp] peer [Link] as-number 200
[*SwitchC-bgp] peer [Link] as-number 200
[*SwitchC-bgp] ipv4-family multicast
[*SwitchC-bgp-af-multicast] peer [Link] enable
[*SwitchC-bgp-af-multicast] peer [Link] enable
[*SwitchC-bgp-af-multicast] quit
[*SwitchC-bgp] quit
[*SwitchC] commit

# Configure BGP and the MBGP peer on SwitchD.


[~SwitchD] bgp 200
[*SwitchD-bgp] peer [Link] as-number 200
[*SwitchD-bgp] peer [Link] as-number 200
[*SwitchD-bgp] ipv4-family multicast
[*SwitchD-bgp-af-multicast] peer [Link] enable
[*SwitchD-bgp-af-multicast] peer [Link] enable
[*SwitchD-bgp-af-multicast] quit
[*SwitchD-bgp] quit
[*SwitchD] commit

Step 3 Configure the routes to be advertised by MBGP.


# Configure the routes to be advertised on SwitchA.
[~SwitchA] bgp 100
[~SwitchA-bgp] import-route direct
[*SwitchA-bgp] ipv4-family multicast
[*SwitchA-bgp-af-multicast] import-route direct
[*SwitchA-bgp-af-multicast] quit
[*SwitchA-bgp] quit
[*SwitchA] commit

# Configure the routes to be advertised on SwitchB.


[~SwitchB] bgp 200
[~SwitchB-bgp] import-route direct
[*SwitchB-bgp] import-route ospf 1
[*SwitchB-bgp] ipv4-family multicast
[*SwitchB-bgp-af-multicast] import-route direct
[*SwitchB-bgp-af-multicast] import-route ospf 1
[*SwitchB-bgp-af-multicast] quit
[*SwitchB-bgp] quit
[*SwitchB] commit

# Configure the routes to be advertised on SwitchC. The configuration of SwitchD is similar


to the configuration of SwitchC, and is not mentioned here.
[~SwitchC] bgp 200
[~SwitchC-bgp] import-route direct
[*SwitchC-bgp] ipv4-family multicast
[*SwitchC-bgp-af-multicast] import-route direct
[*SwitchC-bgp-af-multicast] import-route ospf 1
[*SwitchC-bgp-af-multicast] quit
[*SwitchC-bgp] quit
[*SwitchC] commit

Step 4 Enable multicast on all switches and PIM-SM on all interfaces. Enable IGMP on the
interfaces connected to the receivers (VLANIF 102 on SwitchC in this example).
# Configure SwitchA.
[~SwitchA] multicast routing-enable
[*SwitchA] interface vlanif 100

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 733


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

[*SwitchA-Vlanif100] pim sm
[*SwitchA-Vlanif100] quit
[*SwitchA] interface vlanif 101
[*SwitchA-Vlanif101] pim sm
[*SwitchA-Vlanif101] quit
[*SwitchA] commit

# Configure SwitchB.
[~SwitchB] multicast routing-enable
[*SwitchB] interface vlanif 100
[*SwitchB-Vlanif100] pim sm
[*SwitchB-Vlanif100] quit
[*SwitchB] interface vlanif 200
[*SwitchB-Vlanif200] pim sm
[*SwitchB-Vlanif200] quit
[*SwitchB] interface vlanif 300
[*SwitchB-Vlanif300] pim sm
[*SwitchB-Vlanif300] quit
[*SwitchB] commit

# Configure SwitchC.
[~SwitchC] multicast routing-enable
[*SwitchC] interface vlanif 400
[*SwitchC-Vlanif400] pim sm
[*SwitchC-Vlanif400] quit
[*SwitchC] interface vlanif 102
[*SwitchC-Vlanif102] pim sm
[*SwitchC-Vlanif102] igmp enable
[*SwitchC-Vlanif102] quit
[*SwitchC] interface vlanif 300
[*SwitchC-Vlanif300] pim sm
[*SwitchC-Vlanif300] quit
[*SwitchC] commit

# Configure SwitchD.
[~SwitchD] multicast routing-enable
[*SwitchD] interface vlanif 400
[*SwitchD-Vlanif400] pim sm
[*SwitchD-Vlanif400] quit
[*SwitchD] interface vlanif 200
[*SwitchD-Vlanif200] pim sm
[*SwitchD-Vlanif200] quit
[*SwitchD] commit

Step 5 Configure the BSR and RP within each AS.


# Configure C-BSR and C-RP on interface Loopback0 on SwitchA.
[~SwitchA] interface loopback 0
[*SwitchA-LoopBack0] ip address [Link] [Link]
[*SwitchA-LoopBack0] pim sm
[*SwitchA-LoopBack0] quit
[*SwitchA] pim
[*SwitchA-pim] c-bsr loopback 0
[*SwitchA-pim] c-rp loopback 0
[*SwitchA-pim] quit
[*SwitchA] commit

# Configure C-BSR and C-RP on interface Loopback0 on SwitchB.


[~SwitchB] interface loopback 0
[*SwitchB-LoopBack0] ip address [Link] [Link]
[*SwitchB-LoopBack0] pim sm
[*SwitchB-LoopBack0] quit
[*SwitchB] pim
[*SwitchB-pim] c-bsr loopback 0
[*SwitchB-pim] c-rp loopback 0

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 734


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

[*SwitchB-pim] quit
[*SwitchB] commit

Step 6 Configure a BSR boundary on the interfaces that connect to two ASs.

# Configure VLANIF 100 as the BSR boundary on SwitchA.


[~SwitchA] interface vlanif 100
[~SwitchA-Vlanif100] pim bsr-boundary
[*SwitchA-Vlanif100] quit
[*SwitchA] commit

# Configure VLANIF 100 as the BSR boundary on SwitchB.


[~SwitchB] interface vlanif 100
[~SwitchB-Vlanif100] pim bsr-boundary
[*SwitchB-Vlanif100] quit
[*SwitchB] commit

Step 7 Configure MSDP peers.

# Configure SwitchA.
[~SwitchA] msdp
[*SwitchA-msdp] peer [Link] connect-interface vlanif100
[*SwitchA-msdp] quit
[*SwitchA] commit

# Configure SwitchB.
[~SwitchB] msdp
[*SwitchB-msdp] peer [Link] connect-interface vlanif100
[*SwitchB-msdp] quit
[*SwitchB] commit

Step 8 Verify the configuration.

# Run the display bgp multicast peer command to view the MBGP peer relationship
between switches. For example, information about the MBGP peer relationship on SwitchA is
as follows:
[~SwitchA] display bgp multicast peer
BGP local router ID : [Link]
Local AS number : 100
Total number of peers : 1 Peers in established state : 1
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
[Link] 4 200 82 75 0 00:30:29 Established 17

The preceding information shows that SwitchA has established an MBGP peer relationship
with SwitchB in AS 200.

# Run the display msdp brief command to view information about the MSDP peer
relationship between switches. For example, brief information about the MSDP peer
relationship on SwitchB is as follows:
[~SwitchB] display msdp brief
MSDP Peer Brief Information of VPN-Instance: public net
---------------------------------------------------------------------------------

Configured Up Listen Connect Shutdown Down


1 1 0 0 0 0
---------------------------------------------------------------------------------

Peer's Address State Up/Down time AS SA Count Reset Count


[Link] Up 00:07:17 100 3
0

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 735


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

The preceding information shows that SwitchB has established an MSDP peer relationship
with Switch in AS 100.
----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 100 to 101
#
multicast routing-enable
#
interface Vlanif100
ip address [Link] [Link]
pim bsr-boundary
pim sm
#
interface Vlanif101
ip address [Link] [Link]
pim sm
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 100
#
interface 10GE1/0/2
port default vlan 101
#
interface LoopBack0
ip address [Link] [Link]
pim sm
#
pim
c-bsr LoopBack0
c-rp LoopBack0
#
bgp 100
peer [Link] as-number 200
#
ipv4-family unicast
import-route direct
peer [Link] enable
#
ipv4-family multicast
peer [Link] enable
#
msdp
peer [Link] connect-interface Vlanif100
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 100 200 300
#
multicast routing-enable
#
interface Vlanif100
ip address [Link] [Link]
pim bsr-boundary
pim sm
#
interface Vlanif200

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 736


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

ip address [Link] [Link]


pim sm
#
interface Vlanif300
ip address [Link] [Link]
pim sm
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 100
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 200
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 300
#
interface LoopBack0
ip address [Link] [Link]
pim sm
#
pim
c-bsr LoopBack0
c-rp LoopBack0
#
ospf 1
area [Link]
network [Link] [Link]
network [Link] [Link]
network [Link] [Link]
#
bgp 200
peer [Link] as-number 100
peer [Link] as-number 200
peer [Link] as-number 200
#
ipv4-family unicast
import-route direct
import-route ospf 1
peer [Link] enable
peer [Link] enable
peer [Link] enable
#
ipv4-family multicast
import-route direct
import-route ospf 1
peer [Link] enable
peer [Link] enable
peer [Link] enable
#
msdp
peer [Link] connect-interface Vlanif100
#
return
l Configuration file of SwitchC
#
sysname SwitchC
#
vlan batch 102 300 400
#
multicast routing-enable
#
interface Vlanif102
ip address [Link] [Link]
pim sm
igmp enable
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 737


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

interface Vlanif300
ip address [Link] [Link]
pim sm
#
interface Vlanif400
ip address [Link] [Link]
pim sm
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 400
#
interface 10GE1/0/2
port default vlan 102
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 300
#
interface LoopBack0
ip address [Link] [Link]
pim sm
#
ospf 1
area [Link]
network [Link] [Link]
network [Link] [Link]
network [Link] [Link]
network [Link] [Link]
#
bgp 200
peer [Link] as-number 200
peer [Link] as-number 200
#
ipv4-family unicast
import-route ospf 1
peer [Link] enable
peer [Link] enable
#
ipv4-family multicast
import-route ospf 1
peer [Link] enable
peer [Link] enable
#
return
l Configuration file of SwitchD
#
sysname SwitchD
#
vlan batch 200 400
#
multicast routing-enable
#
interface Vlanif200
ip address [Link] [Link]
pim sm
#
interface Vlanif400
ip address [Link] [Link]
pim sm
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 400
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 200
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 738


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

interface LoopBack0
ip address [Link] [Link]
#
ospf 1
area [Link]
network [Link] [Link]
network [Link] [Link]
network [Link] [Link]
#
bgp 200
peer [Link] as-number 200
peer [Link] as-number 200
#
ipv4-family unicast
import-route ospf 1
peer [Link] enable
peer [Link] enable
#
ipv4-family multicast
import-route ospf 1
peer [Link] enable
peer [Link] enable
#
return

9.18.4 Example for Configuring BGP Load Balancing and the


MED Attribute
Networking Requirements
As shown in Figure 9-22, BGP is configured on all switches; SwitchA resides in AS 65008;
SwitchB and SwitchC reside in AS 65009. EBGP connections are established between
SwitchA and SwitchB, and between SwitchA and SwitchC. An IBGP connection is
established between SwitchB and SwitchC. Load balancing needs to be implemented between
AS 65008 and AS 65009. After a period, traffic from AS 65008 to AS 65009 needs to first
pass through SwitchC.

Figure 9-22 Networking diagram of BGP route selection

10GE1/0/1
VLANIF10
AS 65008 [Link]/24
SwitchB
10GE1/0/1
VLANIF10
10GE1/0/2
[Link]/24
EBGP VLANIF30
SwitchA IBGP [Link]/24
AS 65009
10GE1/0/2 10GE1/0/2
VLANIF20 EBGP
VLANIF30
[Link]/24 [Link]/24
10GE1/0/1 SwitchC
VLANIF20
[Link]/24

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 739


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Configuration Roadmap
The configuration roadmap is as follows:

1. Configure load balancing on SwitchA.


2. Set the MED value on SwitchA to enable traffic from AS 65008 to AS 65009 to first
pass through SwitchC.

Procedure
Step 1 Configure the VLAN to which each interface belongs.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan batch 10 20
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 20
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit

The configurations of SwitchB and SwitchC are similar to the configuration of SwitchA, and
are not mentioned here.

Step 2 Configure VLANIF interfaces and assign IP addresses to the VLANIF interfaces.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ip address [Link] 24
[*SwitchA-Vlanif10] quit
[*SwitchA] interface vlanif 20
[*SwitchA-Vlanif20] ip address [Link] 24
[*SwitchA-Vlanif20] quit
[*SwitchA] commit

The configurations of SwitchB and SwitchC are similar to the configuration of SwitchA, and
are not mentioned here.

Step 3 Configure BGP connections.

# Configure SwitchA.
[~SwitchA] bgp 65008
[*SwitchA-bgp] router-id [Link]
[*SwitchA-bgp] peer [Link] as-number 65009
[*SwitchA-bgp] peer [Link] as-number 65009
[*SwitchA-bgp] quit
[*SwitchA] commit

# Configure SwitchB.
[~SwitchB] bgp 65009
[*SwitchB-bgp] router-id [Link]
[*SwitchB-bgp] peer [Link] as-number 65008
[*SwitchB-bgp] peer [Link] as-number 65009
[*SwitchB-bgp] ipv4-family unicast
[*SwitchB-bgp-af-ipv4] network [Link] [Link]
[*SwitchB-bgp-af-ipv4] quit
[*SwitchB-bgp] quit
[*SwitchB] commit

# Configure SwitchC.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 740


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

[~SwitchC] bgp 65009


[*SwitchC-bgp] router-id [Link]
[*SwitchC-bgp] peer [Link] as-number 65008
[*SwitchC-bgp] peer [Link] as-number 65009
[*SwitchC-bgp] ipv4-family unicast
[*SwitchC-bgp-af-ipv4] network [Link] [Link]
[*SwitchC-bgp-af-ipv4] quit
[*SwitchC-bgp] quit
[*SwitchC] commit

# View the BGP routing table of SwitchA.


[~SwitchA] display bgp routing-table
BGP Local router ID is [Link]
Status codes: * - valid, > - best, d - damped,h - history,
i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete

Total Number of Routes: 2


Network NextHop MED LocPrf PrefVal Path/Ogn

*> [Link]/24 [Link] 0 0 65009i


* [Link] 0 0 65009i
[~SwitchA] display ip routing-
table

Proto: Protocol Pre:


Preference

Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole
route
------------------------------------------------------------------------------

Routing Table :
_public_

Destinations : 12 Routes :
12

Destination/Mask Proto Pre Cost Flags NextHop


Interface

[Link]/24 EBGP 255 0 RD [Link]


Vlanif10
[Link]/32 Direct 0 0 D [Link]
LoopBack0
[Link]/8 Direct 0 0 D [Link]
InLoopBack0
[Link]/32 Direct 0 0 D [Link]
InLoopBack0
[Link]/32 Direct 0 0 D [Link]
InLoopBack0
[Link]/24 Direct 0 0 D [Link]
Vlanif10
[Link]/32 Direct 0 0 D [Link]
Vlanif10
[Link]/32 Direct 0 0 D [Link]
Vlanif10
[Link]/24 Direct 0 0 D [Link]
Vlanif20
[Link]/32 Direct 0 0 D [Link]
Vlanif20
[Link]/32 Direct 0 0 D [Link]
Vlanif20
[Link]/32 Direct 0 0 D [Link]
InLoopBack0

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 741


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

In the BGP routing table, there are two valid routes to destination [Link]/24. The route with
next-hop address [Link] is the optimal route because the router ID of SwitchB is the
smallest.
Step 4 Configure load balancing.
# Configure SwitchA.
[~SwitchA] bgp 65008
[~SwitchA-bgp] ipv4-family unicast
[~SwitchA-bgp-af-ipv4] maximum load-balancing 2
[*SwitchA-bgp-af-ipv4] quit
[*SwitchA-bgp] quit
[*SwitchA] commit

# View the BGP routing table of SwitchA.


[~SwitchA] display bgp routing-table
BGP Local router ID is [Link]
Status codes: * - valid, > - best, d - damped, h - history,
i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete

Total Number of Routes: 2


Network NextHop MED LocPrf PrefVal Path/Ogn

*> [Link]/24 [Link] 0 0 65009i


*> [Link] 0 0 65009i
[~SwitchA] display ip routing-
table

Proto: Protocol Pre:


Preference

Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole
route
------------------------------------------------------------------------------

Routing Table :
_public_

Destinations : 12 Routes :
13

Destination/Mask Proto Pre Cost Flags NextHop


Interface

[Link]/24 EBGP 255 0 RD [Link]


Vlanif10
EBGP 255 0 RD [Link]
Vlanif20
[Link]/32 Direct 0 0 D [Link]
LoopBack0
[Link]/8 Direct 0 0 D [Link]
InLoopBack0
[Link]/32 Direct 0 0 D [Link]
InLoopBack0
[Link]/32 Direct 0 0 D [Link]
InLoopBack0
[Link]/24 Direct 0 0 D [Link]
Vlanif10
[Link]/32 Direct 0 0 D [Link]
Vlanif10
[Link]/32 Direct 0 0 D [Link]
Vlanif10

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 742


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

[Link]/24 Direct 0 0 D [Link]


Vlanif20
[Link]/32 Direct 0 0 D [Link]
Vlanif20
[Link]/32 Direct 0 0 D [Link]
Vlanif20
[Link]/32 Direct 0 0 D [Link]
InLoopBack0

In the BGP routing table, BGP route [Link]/24 has two next hops: [Link] and
[Link]. Both of them are optimal routes.

Step 5 Configure the MED attribute.

# Set the MED value for the route sent from SwitchB to SwitchA using a route-policy.
[~SwitchB] route-policy 10 permit node 10
[*SwitchB-route-policy] apply cost 100
[*SwitchB-route-policy] quit
[*SwitchB] bgp 65009
[*SwitchB-bgp] peer [Link] route-policy 10 export
[*SwitchB-bgp] quit
[*SwitchB] commit

# View the BGP routing table of SwitchA.


[~SwitchA] display bgp routing-table
BGP Local router ID is [Link]
Status codes: * - valid, > - best, d - damped, h - history,
i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 2
Network NextHop MED LocPrf PrefVal Path/Ogn

*> [Link]/24 [Link] 0 0 65009i


* [Link] 100 0 65009i
[~SwitchA] display ip routing-
table

Proto: Protocol Pre:


Preference

Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole
route
------------------------------------------------------------------------------

Routing Table :
_public_

Destinations : 26 Routes :
26

Destination/Mask Proto Pre Cost Flags NextHop


Interface

[Link]/24 EBGP 255 0 RD [Link]


Vlanif20
[Link]/32 Direct 0 0 D [Link]
LoopBack0
[Link]/8 Direct 0 0 D [Link]
InLoopBack0
[Link]/32 Direct 0 0 D [Link]
InLoopBack0
[Link]/32 Direct 0 0 D [Link]
InLoopBack0

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 743


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

[Link]/24 Direct 0 0 D [Link]


Vlanif10
[Link]/32 Direct 0 0 D [Link]
Vlanif10
[Link]/32 Direct 0 0 D [Link]
Vlanif10
[Link]/24 Direct 0 0 D [Link]
Vlanif20
[Link]/32 Direct 0 0 D [Link]
Vlanif20
[Link]/32 Direct 0 0 D [Link]
Vlanif20
[Link]/32 Direct 0 0 D [Link]
InLoopBack0

In the BGP routing table, the MED value of the route with next hop [Link] (SwitchB) is
100, and the MED value of the route with next hop [Link] is 0. Therefore, the route with
the smaller MED value is preferred.

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10 20
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif20
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
bgp 65008
router-id [Link]
peer [Link] as-number 65009
peer [Link] as-number 65009
#
ipv4-famlily unicast
maximum load-balancing 2
peer [Link] enable
peer [Link] enable
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 10 30
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif30
ip address [Link] [Link]
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 744


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
bgp 65009
router-id [Link]
peer [Link] as-number 65009
peer [Link] as-number 65008
#
ipv4-family unicast
default med 100
network [Link] [Link]
peer [Link] enable
peer [Link] enable
peer [Link] route-policy 10 export
#
route-policy 10 permit node 10
apply cost 100
#
return
l Configuration file of SwitchC
#
sysname SwitchC
#
vlan batch 20 30
#
interface Vlanif20
ip address [Link] [Link]
#
interface Vlanif30
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
bgp 65009
router-id [Link]
peer [Link] as-number 65009
peer [Link] as-number 65008
#
ipv4-family unicast
network [Link] [Link]
peer [Link] enable
peer [Link] enable
#
return

9.18.5 Example for Configuring a BGP Route Reflector

Networking Requirements
As shown in Figure 9-23, eight Switches need to form an IBGP network. Full-mesh BGP
connections have been established between SwitchB, SwitchD, and SwitchE. Users require
that the IBGP network be formed without interrupting full-mesh BGP connections between
SwitchB, SwitchD, and SwitchE and require simplified device configuration and
management.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 745


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Figure 9-23 Networking diagram of configuring a BGP route reflector

AS 65010
10GE1/0/3
10GE1/0/1 10GE1/0/2

SwitchA

SwitchB 10GE1/0/1 10GE1/0/1 SwitchC SwitchH


Cluster1 10GE1/0/5
10GE1/0/3
10GE1/0/2 10GE1/0/2 10GE1/0/1
10GE1/0/4 10GE1/0/3 10GE1/0/4

10GE1/0/1 10GE1/0/1 10GE1/0/1


10GE1/0/1
10GE1/0/2
10GE1/0/2
SwitchD SwitchE Cluster2SwitchF SwitchG

Table 9-10 Data preparation

Switch Interface VLANIF Interface IP Address

SwitchA 10GE 1/0/1 VLANIF 10 [Link]/24

SwitchA 10GE 1/0/2 VLANIF 30 [Link]/24

SwitchA 10GE 1/0/3 VLANIF 100 [Link]/24

SwitchB 10GE 1/0/1 VLANIF 10 [Link]/24

SwitchB 10GE 1/0/2 VLANIF 20 [Link]/24

SwitchB 10GE 1/0/3 VLANIF 40 [Link]/24

SwitchB 10GE 1/0/4 VLANIF 50 [Link]/24

SwitchC 10GE 1/0/1 VLANIF 30 [Link]/24

SwitchC 10GE 1/0/2 VLANIF 20 [Link]/24

SwitchC 10GE 1/0/3 VLANIF 70 [Link]/24

SwitchC 10GE 1/0/4 VLANIF 80 [Link]/24

SwitchC 10GE 1/0/5 VLANIF 90 [Link]/24

SwitchD 10GE 1/0/1 VLANIF 40 [Link]/24

SwitchD 10GE 1/0/2 VLANIF 60 [Link]/24

SwitchE 10GE 1/0/1 VLANIF 50 [Link]/24

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 746


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Switch Interface VLANIF Interface IP Address

SwitchE 10GE 1/0/2 VLANIF 60 [Link]/24

SwitchF 10GE 1/0/1 VLANIF 70 [Link]/24

SwitchG 10GE 1/0/1 VLANIF 80 [Link]/24

SwitchH 10GE 1/0/1 VLANIF 90 [Link]/24

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure SwitchB as the route reflector of Cluster1 and SwitchD and SwitchE as the
clients of SwitchB. Prohibit communication between the clients to form an IBGP
network without interrupting full-mesh BGP connections between SwitchB, SwitchD,
and SwitchE.
2. Configure SwitchC as the route reflector of Cluster2 and SwitchF, SwitchG, and
SwitchH as the clients of SwitchC to simplify device configuration and management.

Procedure
Step 1 Configure the VLAN to which each interface belongs.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan batch 10 30 100
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 30
[*SwitchA-10GE1/0/2] quit
[*SwitchA] interface 10ge 1/0/3
[*SwitchA-10GE1/0/3] port link-type trunk
[*SwitchA-10GE1/0/3] port trunk allow-pass vlan 100
[*SwitchA-10GE1/0/3] quit
[*SwitchA] commit

The configurations of SwitchB, SwitchC, SwitchD, SwitchE, SwitchF, SwitchG, and SwitchH
are similar to the configuration of SwitchA, and are not mentioned here.
Step 2 Configure VLANIF interfaces and assign IP addresses to the VLANIF interfaces.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ip address [Link] 24
[*SwitchA-Vlanif10] quit
[*SwitchA] interface vlanif 30
[*SwitchA-Vlanif30] ip address [Link] 24
[*SwitchA-Vlanif30] quit
[*SwitchA] interface vlanif 100
[*SwitchA-Vlanif100] ip address [Link] 24
[*SwitchA-Vlanif100] quit
[*SwitchA] commit

The configurations of SwitchB, SwitchC, SwitchD, SwitchE, SwitchF, SwitchG, and SwitchH
are similar to the configuration of SwitchA, and are not mentioned here.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 747


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Step 3 Configure IBGP connections between clients, non-clients, and route reflectors.

# Configure SwitchF.
[~SwitchF] bgp 65010
[*SwitchF-bgp] router-id [Link]
[*SwitchF-bgp] peer [Link] as-number 65010
[*SwitchF-bgp] quit
[*SwitchF] commit

The configurations of SwitchA, SwitchB, SwitchC, SwitchD, SwitchE, SwitchG, and


SwitchH are similar to the configuration of SwitchF, and are not mentioned here.

Step 4 Configure a route reflector on SwitchB and SwitchC.

# Configure SwitchB.
[~SwitchB] bgp 65010
[*SwitchB–bgp] router-id [Link]
[*SwitchB–bgp] group in_rr internal
[*SwitchB–bgp] peer [Link] group in_rr
[*SwitchB–bgp] peer [Link] group in_rr
[*SwitchB–bgp] ipv4-family unicast
[*SwitchB–bgp-af-ipv4] peer in_rr reflect-client
[*SwitchB–bgp-af-ipv4] undo reflect between-clients
[*SwitchB–bgp-af-ipv4] reflector cluster-id 1
[*SwitchB–bgp-af-ipv4] commit
[~SwitchB–bgp-af-ipv4] quit

# Configure SwitchC.
[~SwitchC] bgp 65010
[*SwitchC-bgp] router-id [Link]
[*SwitchC-bgp] group in_rr internal
[*SwitchC-bgp] peer [Link] group in_rr
[*SwitchC-bgp] peer [Link] group in_rr
[*SwitchC-bgp] peer [Link] group in_rr
[*SwitchC-bgp] ipv4-family unicast
[*SwitchC-bgp-af-ipv4] peer in_rr reflect-client
[*SwitchC-bgp-af-ipv4] reflector cluster-id 2
[*SwitchC-bgp-af-ipv4] commit
[~SwitchC-bgp-af-ipv4] quit

# View the BGP routing table of SwitchD.


[~SwitchD] display bgp routing-table [Link]
BGP local router ID : [Link]
Local AS number : 65010
Paths: 1 available, 0 best, 0 select, 0 best-external, 0 add-path
BGP routing table entry information of [Link]/24:
From: [Link] ([Link])
Route Duration: 00h00m14s
Relay IP Nexthop: [Link]
Relay IP Out-Interface:
Original nexthop: [Link]
Qos information : 0x0
AS-path Nil, origin igp, MED 0, localpref 100, pref-val 0, internal, pre 255
Originator: [Link]
Cluster list: [Link]
Not advertised to any peer yet

In the BGP routing table, you can see that SwitchD has learned from SwitchB the route
advertised from SwitchA, and see the Originator_ID and Cluster_List attributes of the route.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 748


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10 30 100
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif30
ip address [Link] [Link]
#
interface Vlanif100
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 100
#
bgp 65010
router-id [Link]
peer [Link] as-number 65010
peer [Link] as-number 65010
#
ipv4-family unicast
network [Link] [Link]
peer [Link] enable
peer [Link] enable
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 10 20 40 50
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif20
ip address [Link] [Link]
#
interface Vlanif40
ip address [Link] [Link]
#
interface Vlanif50
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/3
port link-type trunk

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 749


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

port trunk allow-pass vlan 40


#
interface 10GE1/0/4
port link-type trunk
port trunk allow-pass vlan 50
#
bgp 65010
router-id [Link]
peer [Link] as-number 65010
peer [Link] as-number 65010
group in_rr internal
peer [Link] as-number 65010
peer [Link] group in_rr
peer [Link] as-number 65010
peer [Link] group in_rr
#
ipv4-family unicast
undo reflect between-clients
reflector cluster-id 1
peer [Link] enable
peer [Link] enable
peer in_rr enable
peer in_rr reflect-client
peer [Link] enable
peer [Link] group in_rr
peer [Link] enable
peer [Link] group in_rr
#
return
l Configuration file of SwitchC
#
sysname SwitchC
#
vlan batch 20 30 70 80 90
#
interface Vlanif20
ip address [Link] [Link]
#
interface Vlanif30
ip address [Link] [Link]
#
interface Vlanif70
ip address [Link] [Link]
#
interface Vlanif80
ip address [Link] [Link]
#
interface Vlanif90
ip address 10.1. [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 70
#
interface 10GE1/0/4
port link-type trunk
port trunk allow-pass vlan 80
#
interface 10GE1/0/5
port link-type trunk
port trunk allow-pass vlan 90

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 750


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

#
bgp 65010
router-id [Link]
peer [Link] as-number 65010
peer [Link] as-number 65010
group in_rr internal
peer [Link] as-number 65010
peer [Link] group in_rr
peer [Link] as-number 65010
peer [Link] group in_rr
peer [Link] as-number 65010
peer [Link] group in_rr
#
ipv4-family unicast
reflector cluster-id 2
peer [Link] enable
peer [Link] enable
peer in_rr enable
peer in_rr reflect-client
peer [Link] enable
peer [Link] group in_rr
peer [Link] enable
peer [Link] group in_rr
peer [Link] enable
peer [Link] group in_rr
#
return

l Configuration file of SwitchD


#
sysname SwitchD
#
vlan batch 40 60
#
interface Vlanif40
ip address [Link] [Link]
#
interface Vlanif60
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 40
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 60
#
bgp 65010
router-id [Link]
peer [Link] as-number 65010
peer [Link] as-number 65010
#
ipv4-family unicast
peer [Link] enable
peer [Link] enable
#
return

NOTE

The configuration files of the other switches are similar to the configuration file of SwitchD, and are not
mentioned here.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 751


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

9.18.6 Example for Configuring a BGP4+ Route Reflection


Networking Requirements
As shown in Figure 9-24, four devices belong to two ASs. You are required to perform
simplified configuration to ensure that the two ASs communicate with each other.

Figure 9-24 Networking diagram of configuring the BGP4+ route reflectors


SwitchC
AS 200
AS 100

FC

10 NI ::1
0
VL :0:10 10G NIF4 ::2/6
GE F4 /64 /0/1
4
0:0
00 AN 0/2

/6

A
4

1/ 0
00 AN 0/1

0:1 IF30
10 ::2/6

::1
FC VL E1/
0:1 IF30

0/
01
VL E1/
10GE1/0/1

1
01
G

2
VLANIF10

FC
10

:0:
FC00:0:0:1::1/64

:0:

00
VL :0:10
E
10GE1/0/2

:0
A
1
FC
VLANIF20
FC00:0:0:100::1/64

2
0
10GE1/0/2
SwitchA VLANIF20 SwitchB

4
FC00:0:0:100::2/64 SwitchD

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic BGP4+ functions to allow BGP neighbors to communicate.
2. Configure SwitchC as a route reflector so that no IBGP connection needs to be
established between SwitchB and SwitchD. This simplifies the configuration.

Procedure
Step 1 Add interfaces to VLANs.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan batch 10 20
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA]interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 20
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit

The configurations of SwitchB, SwitchC, SwitchD are similar to the configuration of


SwitchA, and are not mentioned here.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 752


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Step 2 Enable the IPv6 forwarding capability, and assign an IPv6 address for each interface. The
following is the configuration of SwitchA. The configurations of other Switches are similar to
the configuration of SwitchA, and are not mentioned here.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ipv6 enable
[*SwitchA-Vlanif10] ipv6 address fc00:0:0:1::1/64
[*SwitchA] interface vlanif 20
[*SwitchA-Vlanif20] ipv6 enable
[*SwitchA-Vlanif20] ipv6 address fc00:0:0:100::1/64
[*SwitchA-Vlanif20] quit
[*SwitchA] commit

Step 3 Configure the basic BGP4+ functions.

# Configure SwitchA.
[~SwitchA] bgp 100
[*SwitchA-bgp] router-id [Link]
[*SwitchA-bgp] peer fc00:0:0:100::2 as-number 200
[*SwitchA-bgp] ipv6-family unicast
[*SwitchA-bgp-af-ipv6] peer fc00:0:0:100::2 enable
[*SwitchA-bgp-af-ipv6] network fc00:0:0:1:: 64
[*SwitchA-bgp-af-ipv6] network fc00:0:0:100:: 64
[*SwitchA-bgp-af-ipv6] quit
[*SwitchA-bgp] quit
[*SwitchA] commit

# Configure SwitchB.
[~SwitchB] bgp 200
[*SwitchB-bgp] router-id [Link]
[*SwitchB-bgp] peer fc00:0:0:100::1 as-number 100
[*SwitchB-bgp] peer fc00:0:0:101::1 as-number 200
[*SwitchB-bgp] ipv6-family unicast
[*SwitchB-bgp-af-ipv6] peer fc00:0:0:100::1 enable
[*SwitchB-bgp-af-ipv6] peer fc00:0:0:101::1 enable
[*SwitchB-bgp-af-ipv6] network fc00:0:0:100:: 64
[*SwitchB-bgp-af-ipv6] network fc00:0:0:101:: 64
[*SwitchB-bgp-af-ipv6] quit
[*SwitchB-bgp] quit
[*SwitchB] commit

# Configure SwitchC.
[~SwitchC] bgp 200
[*SwitchC-bgp] router-id [Link]
[*SwitchC-bgp] peer fc00:0:0:101::2 as-number 200
[*SwitchC-bgp] peer fc00:0:0:102::2 as-number 200
[*SwitchC-bgp] ipv6-family unicast
[*SwitchC-bgp-af-ipv6] peer fc00:0:0:101::2 enable
[*SwitchC-bgp-af-ipv6] peer fc00:0:0:102::2 enable
[*SwitchC-bgp-af-ipv6] network fc00:0:0:101:: 64
[*SwitchC-bgp-af-ipv6] network fc00:0:0:102:: 64
[*SwitchC-bgp-af-ipv6] quit
[*SwitchC-bgp] quit
[*SwitchC] commit

# Configure SwitchD.
[~SwitchD] bgp 200
[*SwitchD-bgp] router-id [Link]
[*SwitchD-bgp] peer fc00:0:0:102::1 as-number 200
[*SwitchD-bgp] ipv6-family unicast
[*SwitchD-bgp-af-ipv6] peer fc00:0:0:102::1 enable
[*SwitchD-bgp-af-ipv6] network fc00:0:0:102:: 64
[*SwitchD-bgp-af-ipv6] quit
[*SwitchD-bgp] quit
[*SwitchD] commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 753


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Step 4 Configure the route reflector.


# Configure SwitchC as the route reflector and SwitchB and SwitchD as the clients.
[~SwitchC] bgp 200
[~SwitchC-bgp] ipv6-family unicast
[~SwitchC-bgp-af-ipv6] peer fc00:0:0:101::2 reflect-client
[*SwitchC-bgp-af-ipv6] peer fc00:0:0:102::2 reflect-client
[*SwitchC-bgp-af-ipv6] commit

# View the routing table of SwitchB.


[~SwitchB] display bgp ipv6 routing-table
BGP Local router ID is [Link]
Status codes: * - valid, > - best, x - best external, h - history,
i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 6
*> Network : FC00:0:0:1:: PrefixLen : 64
NextHop : FC00:0:0:100::1 LocPrf :
MED : 0 PrefVal : 0
Label :
Path/Ogn : 100 i
*> Network : FC00:0:0:100:: PrefixLen : 64
NextHop : :: LocPrf :
MED : 0 PrefVal : 0
Label :
Path/Ogn : i

NextHop : FC00:0:0:100::1 LocPrf :


MED : 0 PrefVal : 0
Label :
Path/Ogn : 100 i
*> Network : FC00:0:0:101:: PrefixLen : 64
NextHop : :: LocPrf :
MED : 0 PrefVal : 0
Label :
Path/Ogn : i
i
NextHop : FC00:0:0:101::1 LocPrf : 100
MED : 0 PrefVal : 0
Label :
Path/Ogn : i
*>i Network : FC00:0:0:102:: PrefixLen : 64
NextHop : FC00:0:0:101::1 LocPrf : 100
MED : 0 PrefVal : 0
Label :
Path/Ogn : i

# View the routing table of SwitchD.


[~SwitchD] display bgp ipv6 routing-table
BGP Local router ID is [Link]
Status codes: * - valid, > - best, x - best external, h - history,
i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete

Total Number of Routes: 5


*>i Network : FC00:0:0:1:: PrefixLen : 64
NextHop : FC00:0:0:100::1 LocPrf : 100
MED : 0 PrefVal : 0
Label :
Path/Ogn : 100 i
*>i Network : FC00:0:0:100:: PrefixLen : 64
NextHop : FC00:0:0:101::2 LocPrf : 100
MED : 0 PrefVal : 0
Label :
Path/Ogn : i
*>i Network : FC00:0:0:101:: PrefixLen : 64
NextHop : FC00:0:0:102::1 LocPrf : 100

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 754


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

MED : 0 PrefVal : 0
Label :
Path/Ogn : i
*> Network : FC00:0:0:102:: PrefixLen : 64
NextHop : :: LocPrf :
MED : 0 PrefVal : 0
Label :
Path/Ogn : i
i
NextHop : FC00:0:0:102::1 LocPrf : 100
MED : 0 PrefVal : 0
Label :
Path/Ogn : i

The routing tables show that SwitchD and SwitchB have learned the routing information
advertised by SwitchA from SwitchC.

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10 20
#
interface Vlanif10
ipv6 enable
ipv6 address FC00:0:0:1::1/64
#
interface Vlanif20
ipv6 enable
ipv6 address FC00:0:0:100::1/64
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
bgp 100
router-id [Link]
peer FC00:0:0:100::2 as-number 200
#
ipv4-family unicast
#
ipv6-family unicast
network FC00:0:0:1:: 64
network FC00:0:0:100:: 64
peer FC00:0:0:100::2 enable
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 20 30
#
interface Vlanif20
ipv6 enable
ipv6 address FC00:0:0:100::2/64
#
interface Vlanif30
ipv6 enable

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 755


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

ipv6 address FC00:0:0:101::2/64


#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
bgp 200
router-id [Link]
peer FC00:0:0:100::1 as-number 100
peer FC00:0:0:101::1 as-number 200
#
ipv4-family unicast
#
ipv6-family unicast
network FC00:0:0:100:: 64
network FC00:0:0:101:: 64
peer FC00:0:0:100::1 enable
peer FC00:0:0:101::1 enable
#
return
l Configuration file of SwitchC
#
sysname SwitchC
#
vlan batch 30 40
#
interface Vlanif30
ipv6 enable
ipv6 address FC00:0:0:101::1/64
#
interface Vlanif40
ipv6 enable
ipv6 address FC00:0:0:102::1/64
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 40
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
bgp 200
router-id [Link]
peer FC00:0:0:101::2 as-number 200
peer FC00:0:0:102::2 as-number 200
#
ipv4-family unicast
#
ipv6-family unicast
network FC00:0:0:101:: 64
network FC00:0:0:102:: 64
peer FC00:0:0:101::2 enable
peer FC00:0:0:101::2 reflect-client
peer FC00:0:0:102::2 enable
peer FC00:0:0:102::2 reflect-client
#
return
l Configuration file of SwitchD
#
sysname SwitchD
#
vlan batch 40
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 756


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

interface Vlanif40
ipv6 enable
ipv6 address FC00:0:0:102::2/64
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 40
#
bgp 200
router-id [Link]
peer FC00:0:0:102::1 as-number 200
#
ipv4-family unicast
#
ipv6-family unicast
network FC00:0:0:102:: 64
peer FC00:0:0:102::1 enable
#
return

9.18.7 Example for Configuring a BGP Confederation

Networking Requirements
As shown in Figure 9-25, there are multiple BGP switches in AS 200. It is required that the
number of IBGP connections be reduced.

Figure 9-25 Networking diagram of configuring a BGP confederation

AS 200
AS 65002 AS 65003
SwitchB SwitchC

10GE1/0/1 10GE1/0/1

10GE1/0/2

10GE1/0/1 SwitchD
AS 100 10GE1/0/1
10GE1/0/5
10GE1/0/2 10GE1/0/3
10GE1/0/4
SwitchA
10GE1/0/2
10GE1/0/1
SwitchF 10GE1/0/1 10GE1/0/2

SwitchE
AS 65001

Switch Interface VLANIF IP Address


Interface

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 757


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

SwitchA 10GE 1/0/1 VLANIF 10 [Link]/24

SwitchA 10GE 1/0/2 VLANIF 20 [Link]/24

SwitchA 10GE 1/0/3 VLANIF 30 [Link]/24

SwitchA 10GE 1/0/4 VLANIF 40 [Link]/24

SwitchA 10GE 1/0/5 VLANIF 60 [Link]/24

SwitchB 10GE 1/0/1 VLANIF 10 [Link]/24

SwitchC 10GE 1/0/1 VLANIF 20 [Link]/24

SwitchD 10GE 1/0/1 VLANIF 30 [Link]/24

SwitchD 10GE 1/0/2 VLANIF 50 [Link]/24

SwitchE 10GE 1/0/1 VLANIF 40 [Link]/24

SwitchE 10GE 1/0/2 VLANIF 50 [Link]/24

SwitchF 10GE 1/0/1 VLANIF 60 [Link]/24

SwitchF 10GE 1/0/2 VLANIF 70 [Link]/24

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a BGP confederation on each switch in AS 200 to divide AS 200 into three
sub-ASs: AS 65001, AS 65002, and AS 65003. Three switches in AS 65001 establish
full-mesh IBGP connections to reduce the number of IBGP connections.

Procedure
Step 1 Configure the VLAN to which each interface belongs.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan batch 10 20 30 40 60
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 20
[*SwitchA-10GE1/0/2] quit
[*SwitchA] interface 10ge 1/0/3
[*SwitchA-10GE1/0/3] port link-type trunk

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 758


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

[*SwitchA-10GE1/0/3] port trunk allow-pass vlan 30


[*SwitchA-10GE1/0/3] quit
[*SwitchA] interface 10ge 1/0/4
[*SwitchA-10GE1/0/4] port link-type trunk
[*SwitchA-10GE1/0/4] port trunk allow-pass vlan 40
[*SwitchA-10GE1/0/4] quit
[*SwitchA] interface 10ge 1/0/5
[*SwitchA-10GE1/0/5] port link-type trunk
[*SwitchA-10GE1/0/5] port trunk allow-pass vlan 60
[*SwitchA-10GE1/0/5] quit
[*SwitchA] commit

The configurations of SwitchB, SwitchC, SwitchD, SwitchE, and SwitchF are similar to the
configuration of SwitchA, and are not mentioned here.
Step 2 Configure VLANIF interfaces and assign IP addresses to the VLANIF interfaces.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ip address [Link] 24
[*SwitchA-Vlanif10] quit
[*SwitchA] interface vlanif 20
[*SwitchA-Vlanif20] ip address [Link] 24
[*SwitchA-Vlanif20] quit
[*SwitchA] interface vlanif 30
[*SwitchA-Vlanif30] ip address [Link] 24
[*SwitchA-Vlanif30] quit
[*SwitchA] interface vlanif 40
[*SwitchA-Vlanif40] ip address [Link] 24
[*SwitchA-Vlanif40] quit
[*SwitchA] interface vlanif 60
[*SwitchA-Vlanif60] ip address [Link] 24
[*SwitchA-Vlanif60] quit
[*SwitchA] commit

The configurations of SwitchB, SwitchC, SwitchD, SwitchE, and SwitchF are similar to the
configuration of SwitchA, and are not mentioned here.
Step 3 Configure a BGP confederation.
# Configure SwitchA.
[~SwitchA] bgp 65001
[*SwitchA-bgp] router-id [Link]
[*SwitchA-bgp] confederation id 200
[*SwitchA-bgp] confederation peer-as 65002 65003
[*SwitchA-bgp] peer [Link] as-number 65002
[*SwitchA-bgp] peer [Link] as-number 65003
[*SwitchA-bgp] ipv4-family unicast
[*SwitchA-bgp-af-ipv4] peer [Link] next-hop-local
[*SwitchA-bgp-af-ipv4] peer [Link] next-hop-local
[*SwitchA-bgp-af-ipv4] commit
[~SwitchA-bgp-af-ipv4] quit
[~SwitchA-bgp] quit

# Configure SwitchB.
[~SwitchB] bgp 65002
[*SwitchB-bgp] router-id [Link]
[*SwitchB-bgp] confederation id 200
[*SwitchB-bgp] confederation peer-as 65001 65003
[*SwitchB-bgp] peer [Link] as-number 65001
[*SwitchB-bgp] commit
[~SwitchB-bgp] quit

# Configure SwitchC.
[~SwitchC] bgp 65003
[*SwitchC-bgp] router-id [Link]
[*SwitchC-bgp] confederation id 200
[*SwitchC-bgp] confederation peer-as 65001 65002

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 759


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

[*SwitchC-bgp] peer [Link] as-number 65001


[*SwitchC-bgp] commit
[~SwitchC-bgp] quit

Step 4 Configure IBGP connections within AS 65001.

# Configure SwitchA.
[~SwitchA] bgp 65001
[~SwitchA-bgp] peer [Link] as-number 65001
[*SwitchA-bgp] peer [Link] as-number 65001
[*SwitchA-bgp] ipv4-family unicast
[*SwitchA-bgp-af-ipv4] peer [Link] next-hop-local
[*SwitchA-bgp-af-ipv4] peer [Link] next-hop-local
[*SwitchA-bgp-af-ipv4] commit
[~SwitchA-bgp-af-ipv4] quit
[~SwitchA-bgp] quit

# Configure SwitchD.
[~SwitchD] bgp 65001
[*SwitchD-bgp] router-id [Link]
[*SwitchD-bgp] peer [Link] as-number 65001
[*SwitchD-bgp] peer [Link] as-number 65001
[*SwitchD-bgp] commit
[~SwitchD-bgp] quit

# Configure SwitchE.
[~SwitchE] bgp 65001
[*SwitchE-bgp] router-id [Link]
[*SwitchE-bgp] peer [Link] as-number 65001
[*SwitchE-bgp] peer [Link] as-number 65001
[*SwitchE-bgp] commit
[~SwitchE-bgp] quit

Step 5 Configure EBGP connections between AS 100 and AS200.

# Configure SwitchA.
[~SwitchA] bgp 65001
[*SwitchA-bgp] peer [Link] as-number 100
[*SwitchA-bgp] commit
[~SwitchA-bgp] quit

# Configure SwitchF.
[~SwitchF] bgp 100
[*SwitchF-bgp] router-id [Link]
[*SwitchF-bgp] peer [Link] as-number 200
[*SwitchF-bgp] ipv4-family unicast
[*SwitchF-bgp-af-ipv4] network [Link] [Link]
[*SwitchF-bgp-af-ipv4] commit
[~SwitchF-bgp-af-ipv4] quit
[~SwitchF-bgp] quit

Step 6 Verify the configuration.

# View the BGP routing table of SwitchB.


[~SwitchB] display bgp routing-table
BGP Local router ID is [Link]
Status codes: * - valid, > - best, d - damped, h - history,
i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 1
Network NextHop MED LocPrf PrefVal Path/Ogn
*>i [Link]/24 [Link] 0 100 0 (65001) 100i
[~SwitchB] display bgp routing-table [Link]

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 760


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

BGP local router ID : [Link]


Local AS number : 65002
Paths: 1 available, 1 best, 1 select, 0 best-external, 0 add-path
BGP routing table entry information of [Link]/24:
From: [Link] ([Link])
Route Duration: 00h12m29s
Relay IP Nexthop: [Link]
Relay IP Out-Interface: Vlanif10
Original nexthop: [Link]
Qos information : 0x0
AS-path (65001) 100, origin igp, MED 0, localpref 100, pref-val 0, valid,
external-confed, best, select, active, pre 255
Not advertised to any peer yet

# View the BGP routing table of SwitchD.


[~SwitchD] display bgp routing-table
BGP Local router ID is [Link]
Status codes: * - valid, > - best, d - damped, h - history,
i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 1
Network NextHop MED LocPrf PrefVal Path/Ogn
*>i [Link]/24 [Link] 0 100 0 100i
[~SwitchD] display bgp routing-table [Link]
BGP local router ID : [Link]
Local AS number : 65001
Paths: 1 available, 1 best, 1 select, 0 best-external, 0 add-path
BGP routing table entry information of [Link]/24:
From: [Link] ([Link])
Route Duration: 00h23m57s
Relay IP Nexthop: [Link]
Relay IP Out-Interface: Vlanif10
Original nexthop: [Link]
Qos information : 0x0
AS-path 100, origin igp, MED 0, localpref 100, pref-val 0, valid, internal-
confed, best, select, active, pre 255
Not advertised to any peer yet

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10 20 30 40 60
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif20
ip address [Link] [Link]
#
interface Vlanif30
ip address [Link] [Link]
#
interface Vlanif40
ip address [Link] [Link]
#
interface Vlanif60
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 761


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/4
port link-type trunk
port trunk allow-pass vlan 40
#
interface 10GE1/0/5
port link-type trunk
port trunk allow-pass vlan 60
#
bgp 65001
router-id [Link]
confederation id 200
confederation peer-as 65002 65003
peer [Link] as-number 65002
peer [Link] as-number 65003
peer [Link] as-number 65001
peer [Link] as-number 65001
peer [Link] as-number 100
#
ipv4-family unicast
peer [Link] enable
peer [Link] next-hop-local
peer [Link] enable
peer [Link] next-hop-local
peer [Link] enable
peer [Link] next-hop-local
peer [Link] enable
peer [Link] next-hop-local
peer [Link] enable
#
return
l Configuration file of SwitchB
#
sysname SwitchB
#
vlan batch 10
#
interface Vlanif10
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
bgp 65002
router-id [Link]
confederation id 200
confederation peer-as 65001 65003
peer [Link] as-number 65001
#
ipv4-family unicast
peer [Link] enable
#
return
l Configuration file of SwitchC
#
sysname SwitchC
#
vlan batch 20
#
interface Vlanif20

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 762


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

ip address [Link] [Link]


#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
bgp 65003
router-id [Link]
confederation id 200
confederation peer-as 65001 65002
peer [Link] as-number 65001
#
ipv4-family unicast
peer [Link] enable
#
return
l Configuration file of SwitchD
#
sysname SwitchD
#
vlan batch 30 50
#
interface Vlanif30
ip address [Link] [Link]
#
interface Vlanif50
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 50
#
bgp 65001
router-id [Link]
peer [Link] as-number 65001
peer [Link] as-number 65001
#
ipv4-family unicast
peer [Link] enable
peer [Link] enable
#
return
l Configuration file of SwitchE
#
sysname SwitchE
#
vlan batch 40 50
#
interface Vlanif40
ip address [Link] [Link]
#
interface Vlanif50
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 40
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 50
#
bgp 65001
router-id [Link]

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 763


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

peer [Link] as-number 65001


peer [Link] as-number 65001
#
ipv4-family unicast
peer [Link] enable
peer [Link] enable
#
return

l Configuration file of SwitchF


#
sysname SwitchF
#
vlan batch 60 70
#
interface Vlanif60
ip address [Link] [Link]
#
interface Vlanif70
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 60
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 70
#
bgp 100
router-id [Link]
peer [Link] as-number 200
#
ipv4-family unicast
network [Link] [Link]
peer [Link] enable
#
return

9.18.8 Example for Configuring the BGP Community Attribute

Networking Requirements
As shown in Figure 9-26, EBGP connections are established between SwitchB and SwitchA,
and between SwitchB and SwitchC. It is required that AS 20 not advertise the routes
advertised by AS 10 to AS 30.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 764


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Figure 9-26 Networking diagram of configuring the BGP Community attribute

10GE1/0/2 10GE1/0/1
VLANIF20 VLANIF10
[Link]/24 [Link]/24

AS 10 SwitchA

10GE1/0/2 10GE1/0/3
VLANIF20 VLANIF30
[Link]/24 [Link]/24

10GE1/0/3
SwitchB VLANIF30 SwitchC
AS 20 [Link]/24 AS 30

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a route-policy on SwitchA to advertise the No_Export attribute so that AS 20
does not advertise the routes advertised by AS 10 to AS 30.

Procedure
Step 1 Configure the VLANs to which interfaces belong and assign IP addresses to VLANIF
interfaces.
# Configure SwitchC.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchC
[*HUAWEI] commit
[~SwitchC] vlan 30
[*SwitchC-vlan30] quit
[*SwitchC] interface 10ge 1/0/3
[*SwitchC-10GE1/0/3] port link-type trunk
[*SwitchC-10GE1/0/3] port trunk allow-pass vlan 30
[*SwitchC-10GE1/0/3] quit
[*SwitchC] interface vlanif 30
[*SwitchC-Vlanif30] ip address [Link] [Link]
[*SwitchC-Vlanif30] quit
[*SwitchC] commit

The configurations of SwitchA and SwitchB are similar to the configuration of SwitchC, and
are not mentioned here.
Step 2 Configure EBGP connections.
# Configure SwitchA.
[~SwitchA] bgp 10
[*SwitchA-bgp] router-id [Link]
[*SwitchA-bgp] peer [Link] as-number 20
[*SwitchA-bgp] ipv4-family unicast
[*SwitchA-bgp-af-ipv4] network [Link] [Link]
[*SwitchA-bgp-af-ipv4] commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 765


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

[~SwitchA-bgp-af-ipv4] quit

# Configure SwitchB.
[~SwitchB] bgp 20
[*SwitchB-bgp] router-id [Link]
[*SwitchB-bgp] peer [Link] as-number 10
[*SwitchB-bgp] peer [Link] as-number 30
[*SwitchB-bgp] commit
[~SwitchB-bgp] quit

# Configure SwitchC.
[~SwitchC] bgp 30
[*SwitchC-bgp] router-id [Link]
[*SwitchC-bgp] peer [Link] as-number 20
[*SwitchC-bgp] commit
[~SwitchC-bgp] quit

# View the BGP routing table of SwitchB.


[~SwitchB] display bgp routing-table [Link]
BGP local router ID : [Link]
Local AS number : 20
Paths: 1 available, 1 best, 1 select, 0 best-external, 0 add-path
BGP routing table entry information of [Link]/24:
From: [Link] ([Link])
Route Duration: 0d00h00m37s
Direct Out-interface: Vlanif20
Original nexthop: [Link]
Qos information : 0x0
AS-path 10, origin igp, MED 0, pref-val 0, valid, external, best, select, pre 255
Advertised to such 2 peers:
[Link]
[Link]

The preceding command output shows that SwitchB has advertised the received route to
SwitchC in AS 30.
# View the BGP routing table of SwitchC.
[~SwitchC] display bgp routing-table
BGP Local router ID is [Link]
Status codes: * - valid, > - best, d - damped, h - history,
i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 1
Network NextHop MED LocPrf PrefVal Path/Ogn
*> [Link]/24 [Link] 0 20 10i

The preceding command output shows that SwitchC has learned the route to [Link]/24 from
SwitchB.
Step 3 Configure the BGP Community attribute.
# Configure a route-policy on SwitchA to prevent SwitchB from advertising the routes
advertised by SwitchA to AS 30.
[~SwitchA] route-policy comm_policy permit node 10
[*SwitchA-route-policy] apply community no-export
[*SwitchA-route-policy] commit
[~SwitchA-route-policy] quit

# Apply the route-policy.


[~SwitchA] bgp 10
[~SwitchA-bgp] ipv4-family unicast
[~SwitchA-bgp-af-ipv4] peer [Link] route-policy comm_policy export
[*SwitchA-bgp-af-ipv4] peer [Link] advertise-community

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 766


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

[*SwitchA-bgp-af-ipv4] commit

# View the BGP routing table of SwitchB.


[~SwitchB] display bgp routing-table [Link]
BGP local router ID : [Link]
Local AS number : 20
Paths: 1 available, 1 best, 1 select, 0 best-external, 0 add-path
BGP routing table entry information of [Link]/24:
From: [Link] ([Link])
Route Duration: 0d00h00m12s
Direct Out-interface: Vlanif20
Original nexthop: [Link]
Qos information : 0x0
Community:no-export
AS-path 10, origin igp, MED 0, pref-val 0, valid, external, best, select, pre 255
Not advertised to any peers yet

In the BGP routing table of SwitchB, you can view the configured Community attribute.
There is no route to [Link]/24 in the BGP routing table of SwitchC.

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10 20
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif20
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
bgp 10
router-id [Link]
peer [Link] as-number 20
#
ipv4-family unicast
network [Link] [Link]
peer [Link] enable
peer [Link] route-policy comm_policy export
peer [Link] advertise-community
#
route-policy comm_policy permit node 10
apply community no-export
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 20 30
#
interface Vlanif20
ip address [Link] [Link]

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 767


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

#
interface Vlanif30
ip address [Link] [Link]
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 30
#
bgp 20
router-id [Link]
peer [Link] as-number 10
peer [Link] as-number 30
#
ipv4-family unicast
peer [Link] enable
peer [Link] enable
#
return

l Configuration file of SwitchC


#
sysname SwitchC
#
vlan batch 30
#
interface Vlanif30
ip address [Link] [Link]
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 30
#
bgp 30
router-id [Link]
peer [Link] as-number 20
#
ipv4-family unicast
peer [Link] enable
#
return

9.18.9 Example for Configuring Prefix-based BGP ORF

Networking Requirements
As shown in Figure 9-27, PE1 and PE2 belong to AS 100. PE2 needs to advertise only the
routes that match the import policy of PE1 without having to maintain export policies.

Figure 9-27 Networking diagram of configuring prefix-based BGP ORF

10GE1/0/1
AS 100
VLANIF10
[Link]/24
10GE1/0/1
PE1 VLANIF10 PE2
[Link]/24

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 768


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure prefix-based BGP ORF so that PE2 can advertise only the routes that match
the import policy of PE1 without having to maintain export policies.

Procedure
Step 1 Configure the VLANs to which interfaces belong and assign IP addresses to VLANIF
interfaces.
# Configure PE1.
<HUAWEI> system-view
[~HUAWEI] sysname PE1
[*HUAWEI] commit
[~PE1] vlan 10
[*PE1-vlan10] quit
[*PE1] interface 10ge 1/0/1
[*PE1-10GE1/0/1] port link-type trunk
[*PE1-10GE1/0/1] port trunk allow-pass vlan 10
[*PE1-10GE1/0/1] quit
[*PE1] interface vlanif 10
[*PE1-Vlanif10] ip address [Link] [Link]
[*PE1-Vlanif10] quit
[*PE1] commit

The configuration of PE2 is similar to that of PE1 and is not mentioned here.
Step 2 Configure IPv4 unicast neighbors.
# Configure PE1.
[~PE1] bgp 100
[*PE1-bgp] peer [Link] as-number 100
[*PE1-bgp] commit
[~PE1-bgp] quit

The configuration of PE2 is similar to that of PE1 and is not mentioned here.
Step 3 Apply the prefix-based import policy on PE1.
# Configure PE1.
[~PE1] ip ip-prefix 1 permit [Link] 24 greater-equal 32
[*PE1] bgp 100
[*PE1-bgp] peer [Link] ip-prefix 1 import
[*PE1-bgp] commit
[~PE1-bgp] quit

# Configure PE2.
[~PE2] ip route-static [Link] [Link] NULL0
[*PE2] ip route-static [Link] [Link] NULL0
[*PE2] ip route-static [Link] [Link] NULL0
[*PE2] bgp 100
[*PE2-bgp] import-route static
[*PE2-bgp] commit
[~PE2-bgp] quit

# View the routes sent by PE2.


[~PE2] display bgp routing-table peer [Link] advertised-routes
BGP Local router ID is [Link]
Status codes: * - valid, > - best, d - damped, h - history,
i - internal, s - suppressed, S - Stale

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 769


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Origin : i - IGP, e - EGP, ? - incomplete

Total Number of Routes: 3


Network NextHop MED LocPrf PrefVal Path/Ogn

*> [Link]/32 [Link] 0 0 ?


*> [Link]/32 [Link] 0 0 ?
*> [Link]/32 [Link] 0 0 ?

# View the routes received on PE1.


[~PE1] display bgp routing-table peer [Link] received-routes
BGP Local router ID is [Link]
Status codes: * - valid, > - best, d - damped, h - history,
i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete

Total Number of Routes: 1


Network NextHop MED LocPrf PrefVal Path/Ogn

*>i [Link]/32 [Link] 0 100 0 ?

When prefix-based BGP ORF is disabled, PE2 sends three routes [Link], [Link], and
[Link], but PE1 accepts only one route [Link] because PE1 applies the prefix-based import
policy to the three routes.
Step 4 Enable prefix-based BGP ORF.
# Configure PE1.
[~PE1] bgp 100
[~PE1-bgp] peer [Link] capability-advertise orf ip-prefix both
[*PE1-bgp] commit
[~PE1-bgp] quit

# Configure PE2.
[~PE2] bgp 100
[~PE2-bgp] peer [Link] capability-advertise orf ip-prefix both
[*PE2-bgp] commit
[~PE2-bgp] quit

Step 5 Verify the configuration.


# View prefix-based BGP ORF negotiation information.
<PE1> display bgp peer [Link] verbose

BGP Peer is [Link], remote AS 100


Type: IBGP link
BGP version 4, Remote router ID [Link]
Update-group ID: 2
BGP current state: Established, Up for 00h01m22s
BGP current event: KATimerExpired
BGP last state: OpenConfirm
BGP Peer Up count: 8
Received total routes: 1
Received active routes total: 1
Advertised total routes: 0
Port: Local - 54845 Remote - 179
Configured: Connect-retry Time: 32 sec
Configured: Active Hold Time: 180 sec Keepalive Time:60 sec
Received : Active Hold Time: 180 sec
Negotiated: Active Hold Time: 180 sec Keepalive Time:60 sec
Peer optional capabilities:
Peer supports bgp multi-protocol extension
Peer supports bgp route refresh capability
Peer supports bgp outbound route filter capability
Support Address-Prefix: IPv4-UNC address-family, rfc-compatible, both

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 770


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Peer supports bgp 4-byte-as capability


Address family IPv4 Unicast: advertised and received
Received
Total messages 5
Update messages 1
Open messages 1
KeepAlive messages 2
Notification messages 0
Refresh messages 1
Sent
Total messages 4
Update messages 0
Open messages 1
KeepAlive messages 2
Notification messages 0
Refresh messages 1
Authentication type configured: None
Last keepalive received: 2013-09-21 18:54:57+00:00
Last keepalive sent:2013-09-21 18:54:57
Last update received:2013-09-21 18:54:57
Last update sent:2013-09-21 18:54:57
Last refresh received:2013-09-21 18:54:57
Last refresh sended:2013-09-21 18:54:57
Minimum route advertisement interval is 15 seconds
Optional capabilities:
Route refresh capability has been enabled
Outbound route filter capability has been enabled
Enable Address-Prefix: IPv4-UNC address-family, rfc-compatible, both
4-byte-as capability has been enabled
Peer Preferred Value: 0
Routing policy configured:
No import update filter list
No export update filter list
Import prefix list is: 1
No export prefix list
No import route policy
No export route policy
No import distribute policy
No export distribute policy

# View the routes sent by PE2.


<PE2> display bgp routing-table peer [Link] advertised-routes

BGP Local router ID is [Link]


Status codes: * - valid, > - best, d - damped, h - history,
i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete

Total Number of Routes: 1


Network NextHop MED LocPrf PrefVal Path/Ogn

*> [Link]/32 [Link] 0 0 ?

# # View the routes accepted by PE1.


<PE1> display bgp routing-table peer [Link] received-routes

BGP Local router ID is [Link]


Status codes: * - valid, > - best, d - damped, h - history,
i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete

Total Number of Routes: 1


Network NextHop MED LocPrf PrefVal Path/Ogn

*>i [Link]/32 [Link] 0 100 0 ?

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 771


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

After prefix-based BGP ORF is enabled, PE2 sends only one route [Link] based on the
prefix-based import policy provided by PE1.
----End

Configuration Files
l Configuration file of PE1
#
sysname PE1
#
vlan batch 10
#
interface Vlanif10
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
bgp 100
peer [Link] as-number 100
#
ipv4-family unicast
peer [Link] enable
peer [Link] ip-prefix 1 import
peer [Link] capability-advertise orf ip-prefix both
#
ip ip-prefix 1 index 10 permit [Link] 24 greater-equal 32 less-equal 32
#
return
l Configuration file of PE2
#
sysname PE2
#
vlan batch 10
#
interface Vlanif10
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
bgp 100
peer [Link] as-number 100
#
ipv4-family unicast
import-route static
peer [Link] enable
peer [Link] capability-advertise orf ip-prefix both
#
ip route-static [Link] [Link] NULL0
ip route-static [Link] [Link] NULL0
ip route-static [Link] [Link] NULL0
#
return

9.18.10 Example for Configuring BGP Route Dampening

Networking Requirements
As shown in Figure 9-28, BGP is configured on all Switches. SwitchA resides in AS 100,
SwitchB resides in AS 200, and SwitchC resides in AS 300. EBGP runs between SwitchC and

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 772


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

SwitchA, and between SwitchC and SwitchB. SwitchC must apply different route dampening
policies to routes of different EBGP peers to suppress unstable routes and improve network
stability.

Figure 9-28 Networking diagram of configuring BGP route dampening

10GE1/0/2 10GE1/0/1
VLANIF20 VLANIF40
[Link]/24 [Link]/24
AS 200 SwitchB

10GE1/0/2 10GE1/0/1
VLANIF20 VLANIF10 10GE1/0/2
[Link]/24 AS 300 [Link]/24 VLANIF30
[Link]/8
10GE1/0/1
SwitchC VLANIF10 SwitchA
[Link]/24 AS 100

Configuration Roadmap
The configuration roadmap is as follows:

1. Configure a route dampening policy on SwitchC.


2. Apply the route dampening policy to flapping routes on SwitchC to suppress unstable
routes and improve network stability.

Procedure
Step 1 Configure the VLAN to which each interface belongs.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan batch 10 30
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 30
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit

The configurations of SwitchB and SwitchC are similar to the configuration of SwitchA, and
are not mentioned here.

Step 2 Configure VLANIF interfaces and assign IP addresses to the VLANIF interfaces.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ip address [Link] 24
[*SwitchA-Vlanif10] quit
[*SwitchA] interface vlanif 30
[*SwitchA-Vlanif30] ip address [Link] 8

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 773


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

[*SwitchA-Vlanif30] quit
[*SwitchA] commit

The configurations of SwitchB and SwitchC are similar to the configuration of SwitchA, and
are not mentioned here.
Step 3 Configure BGP connections.
# Configure SwitchA.
[~SwitchA] bgp 100
[*SwitchA-bgp] router-id [Link]
[*SwitchA-bgp] peer [Link] as-number 300
[*SwitchA-bgp] ipv4-family unicast
[*SwitchA-bgp-af-ipv4] network [Link] [Link]
[*SwitchA-bgp-af-ipv4] commit
[~SwitchA-bgp-af-ipv4] quit
[~SwitchA-bgp] quit

# Configure SwitchB.
[~SwitchB] bgp 200
[*SwitchB-bgp] router-id [Link]
[*SwitchB-bgp] peer [Link] as-number 300
[*SwitchB-bgp] ipv4-family unicast
[*SwitchB-bgp-af-ipv4] network [Link] [Link]
[*SwitchB-bgp-af-ipv4] commit
[~SwitchB-bgp-af-ipv4] quit
[~SwitchB-bgp] quit

# Configure SwitchC.
[~SwitchC] bgp 300
[*SwitchC-bgp] router-id [Link]
[*SwitchC-bgp] peer [Link] as-number 100
[*SwitchC-bgp] peer [Link] as-number 200
[*SwitchC-bgp] commit
[~SwitchC-bgp] quit

# View the BGP peers of SwitchC.


[~SwitchC] display bgp peer

BGP local router ID : [Link]


Local AS number : 300
Total number of peers : 3 Peers in established state : 3

Peer V AS MsgRcvd MsgSent OutQ Up/Down State


PrefRcv
[Link] 4 100 3 3 0 00:00:01 Established 0
[Link] 4 200 3 3 0 00:00:00 Established 0

The preceding command output shows that the status of BGP connections of SwitchC is
Established.
Step 4 Configure a BGP route dampening policy.
# Configure an IP prefix list prefix-a on SwitchC to allow routes with prefix [Link]/8 to pass
through.
[~SwitchC] ip ip-prefix prefix-a index 10 permit [Link] 8
[*SwitchC] commit

# Configure an IP prefix list prefix-b on SwitchC to allow routes with prefix [Link]/24 to
pass through.
[~SwitchC] ip ip-prefix prefix-b index 20 permit [Link] 24
[*SwitchC] commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 774


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

# Configure a route-policy dampen-policy on SwitchC to apply different route dampening


policies to routes with different prefixes.
[~SwitchC] route-policy dampen-policy permit node 10
[*SwitchC-route-policy] if-match ip-prefix prefix-a
[*SwitchC-route-policy] apply dampening 10 1000 2000 5000
[*SwitchC-route-policy] commit
[~SwitchC-route-policy] quit
[~SwitchC] route-policy dampen-policy permit node 20
[*SwitchC-route-policy] if-match ip-prefix prefix-b
[*SwitchC-route-policy] apply dampening 10 800 3000 10000
[*SwitchC-route-policy] commit
[~SwitchC-route-policy] quit

# Apply the route dampening policy to flapping routes.


[~SwitchC] bgp 300
[~SwitchC-bgp] ipv4-family unicast
[~SwitchC-bgp-af-ipv4] dampening route-policy dampen-policy
[*SwitchC-bgp-af-ipv4] commit
[~SwitchC-bgp] quit

# View the configured BGP route dampening parameters on SwitchC.


[~SwitchC] display bgp routing-table dampening parameter

Maximum Suppress Time(in second) : 3973


Ceiling Value : 16000
Reuse Value : 750
HalfLife Time(in second) : 900
Suppress-Limit : 2000
Route-policy : dampen-policy

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10 30
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif30
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
bgp 100
router-id [Link]
peer [Link] as-number 300
#
ipv4-family unicast
network [Link] [Link]
peer [Link] enable
#
return

l Configuration file of SwitchB

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 775


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

#
sysname SwitchB
#
vlan batch 20 40
#
interface Vlanif20
ip address [Link] [Link]
#
interface Vlanif40
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 40
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
bgp 200
router-id [Link]
peer [Link] as-number 300
#
ipv4-family unicast
network [Link] [Link]
peer [Link] enable
#
return
l Configuration file of SwitchC
#
sysname SwitchC
#
vlan batch 10 20
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif20
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
bgp 300
router-id [Link]
peer [Link] as-number 100
peer [Link] as-number 200
#
ipv4-family unicast
dampening route-policy dampen-policy
peer [Link] enable
peer [Link] enable
#
route-policy dampen-policy permit node 10
if-match ip-prefix prefix-a
apply dampening 10 1000 2000 5000
#
route-policy dampen-policy permit node 20
if-match ip-prefix prefix-b
apply dampening 10 800 3000 10000
#
ip ip-prefix prefix-a index 10 permit [Link] 8
ip ip-prefix prefix-b index 20 permit [Link] 24
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 776


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

return

9.18.11 Example for Configuring BFD for BGP

Networking Requirements
As shown in Figure 9-29, SwitchA belongs to AS 100, and SwitchB and SwitchC belong to
AS 200. EBGP connections are established between SwitchA and SwitchB, and between
SwitchA and SwitchC.
Service traffic is transmitted along the primary link SwitchA→SwitchB. The link
SwitchA→SwitchC→SwitchB functions as the backup link.
Use BFD to monitor the BGP peer relationship between SwitchA and SwitchB. When a fault
occurs on the link between SwitchA and SwitchB, BFD can rapidly detect the fault and notify
BGP. Then traffic is transmitted on the backup link.

Figure 9-29 Networking diagram of configuring BFD for BGP

10GE1/0/2 10GE1/0/3
VLANIF20 SwitchB VLANIF40
AS 100 [Link]/24 [Link]/24
10GE1/0/2
VLANIF20
[Link]/24 10GE1/0/1
VLANIF30
EBGP
SwitchA [Link]/24
AS 200 IBGP
10GE1/0/1 10GE1/0/2
EBGP
VLANIF10 VLANIF30
[Link]/24 [Link]/24
10GE1/0/1
VLANIF10
SwitchC
[Link]/24

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic BGP functions on each switch.
2. Configure the MED attribute to control route selection.
3. Enable BFD on SwitchA and SwitchB.

Procedure
Step 1 Configure the VLAN to which each interface belongs.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 777


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

[*HUAWEI] commit
[~SwitchA] vlan batch 10 20
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 20
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit

The configurations of SwitchB and SwitchC are similar to the configuration of SwitchA, and
are not mentioned here.
Step 2 Configure VLANIF interfaces and assign IP addresses to the VLANIF interfaces.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ip address [Link] 24
[*SwitchA-Vlanif10] quit
[*SwitchA] interface vlanif 20
[*SwitchA-Vlanif20] ip address [Link] 24
[*SwitchA-Vlanif20] quit
[*SwitchA] commit

The configurations of SwitchB and SwitchC are similar to the configuration of SwitchA, and
are not mentioned here.
Step 3 Configure basic BGP functions, establish EBGP connections between SwitchA and SwitchB
and between SwitchA and SwitchC, and establish an IBGP connection between SwitchB and
SwitchC.
# Configure SwitchA.
[~SwitchA] bgp 100
[*SwitchA-bgp] router-id [Link]
[*SwitchA-bgp] peer [Link] as-number 200
[*SwitchA-bgp] peer [Link] as-number 200
[*SwitchA-bgp] commit
[~SwitchA-bgp] quit

# Configure SwitchB.
[~SwitchB] bgp 200
[*SwitchB-bgp] router-id [Link]
[*SwitchB-bgp] peer [Link] as-number 100
[*SwitchB-bgp] peer [Link] as-number 200
[*SwitchB-bgp] import-route direct
[*SwitchB-bgp] commit
[~SwitchB-bgp] quit

# Configure SwitchC.
[~SwitchC] bgp 200
[*SwitchC-bgp] router-id [Link]
[*SwitchC-bgp] peer [Link] as-number 100
[*SwitchC-bgp] peer [Link] as-number 200
[*SwitchC-bgp] commit
[~SwitchC-bgp] quit

# View the BGP peer status on SwitchA, finding that BGP peers have been established.
<SwitchA> display bgp peer
BGP local router ID : [Link]
Local AS number : 100
Total number of peers : 2 Peers in established state : 2
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
[Link] 4 200 2 5 0 00:01:25 Established 0
[Link] 4 200 2 4 0 00:00:55 Established 0

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 778


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Step 4 Configure the MED attribute.

# Set the MED values for the routes sent from SwitchB and SwitchC to SwitchA using a
route-policy.

# Configure SwitchB.
[~SwitchB] route-policy 10 permit node 10
[*SwitchB-route-policy] apply cost 100
[*SwitchB-route-policy] commit
[~SwitchB-route-policy] quit
[~SwitchB] bgp 200
[~SwitchB-bgp] peer [Link] route-policy 10 export
[*SwitchB-bgp] commit

# Configure SwitchC.
[~SwitchC] route-policy 10 permit node 10
[*SwitchC-route-policy] apply cost 150
[*SwitchC-route-policy] commit
[~SwitchC-route-policy] quit
[~SwitchC] bgp 200
[~SwitchC-bgp] peer [Link] route-policy 10 export
[*SwitchC-bgp] commit

# View all BGP routing information on SwitchA.


<SwitchA> display bgp routing-table
BGP Local router ID is [Link]
Status codes: * - valid, > - best, d - damped, h - history,
i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 5
Network NextHop MED LocPrf PrefVal Path/Ogn
*> [Link]/24 [Link] 150 0 200?
*> [Link]/24 [Link] 100 0 200i
* [Link] 150 0 200i
*> [Link] [Link] 100 0 200?
[Link] 150 0 200?

In the BGP routing table, you can view that the next-hop address of the route to [Link]/24
is [Link], and traffic is transmitted on the primary link SwitchA→SwitchB.

Step 5 Configure BFD, and set the interval for sending BFD packets, the interval for receiving BFD
packets, and the local detection multiplier.

# Enable BFD on SwitchA, and set the minimum intervals for sending and receiving BFD
packets to 100 ms and the local detection multiplier to 4.
[~SwitchA] bfd
[*SwitchA-bfd] quit
[*SwitchA] bgp 100
[*SwitchA-bgp] peer [Link] bfd enable
[*SwitchA-bgp] peer [Link] bfd min-tx-interval 100 min-rx-interval 100
detect-multiplier 4
[*SwitchA-bgp] commit

# Enable BFD on SwitchB, and set the minimum intervals for sending and receiving BFD
packets to 100 ms and the local detection multiplier to 4.
[~SwitchB] bfd
[*SwitchB-bfd] quit
[*SwitchB] bgp 200
[*SwitchB-bgp] peer [Link] bfd enable
[*SwitchB-bgp] peer [Link] bfd min-tx-interval 100 min-rx-interval 100
detect-multiplier 4
[*SwitchB-bgp] commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 779


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

# View all the BFD sessions set up by BGP on SwitchA.


<SwitchA> display bgp bfd session all
--------------------------------------------------------------------------------
Local_Address Peer_Address Interface
[Link] [Link] Vlanif20
Tx-interval(ms) Rx-interval(ms) Multiplier Session-State
100 100 4 Up
--------------------------------------------------------------------------------

Step 6 Verify the configuration.


# Run the shutdown command on 10GE1/0/2 of SwitchB to simulate a primary link fault.
[~SwitchB] interface 10ge 1/0/2
[~SwitchB-10GE1/0/2] shutdown
[*SwitchB-10GE1/0/2] commit

# View the BGP routing table of SwitchA.


<SwitchA> display bgp routing-table
BGP Local router ID is [Link]
Status codes: * - valid, > - best, d - damped, h - history,
i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 3
Network NextHop MED LocPrf PrefVal Path/Ogn
*> [Link]/24 [Link] 150 0 200?
*> [Link]/24 [Link] 150 0 200i
[Link] [Link] 150 0 200?

In the BGP routing table, you can view that the backup link SwitchA→SwitchC→SwitchB
takes effect after the primary link fails, and the next-hop address of the route to [Link]/24
becomes [Link].

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
router id [Link]
#
vlan batch 10 20
#
bfd
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif20
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
bgp 100
router-id [Link]
peer [Link] as-number 200
peer [Link] bfd min-tx-interval 100 min-rx-interval 100 detect-

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 780


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

multiplier 4
peer [Link] bfd enable
peer [Link] as-number 200
#
ipv4-family unicast
peer [Link] enable
peer [Link] enable
#
return
l Configuration file of SwitchB
#
sysname SwitchB
#
router id [Link]
#
vlan batch 20 30 40
#
bfd
#
interface Vlanif20
ip address [Link] [Link]
#
interface Vlanif30
ip address [Link] [Link]
#
interface Vlanif40
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 40
#
bgp 200
router-id [Link]
peer [Link] as-number 200
peer [Link] as-number 100
peer [Link] bfd min-tx-interval 100 min-rx-interval 100 detect-
multiplier 4
peer [Link] bfd enable
#
ipv4-family unicast
import-route direct
peer [Link] enable
peer [Link] enable
peer [Link] route-policy 10 export
#
route-policy 10 permit node 10
apply cost 100
#
return
l Configuration file of SwitchC
#
sysname SwitchC
#
router id [Link]
#
vlan batch 10 30
#
bfd
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 781


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif30
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
bgp 200
router-id [Link]
peer [Link] as-number 200
peer [Link] as-number 100
#
ipv4-family unicast
network [Link] [Link]
peer [Link] enable
peer [Link] enable
peer [Link] route-policy 10 export
#
route-policy 10 permit node 10
apply cost 150
#
return

9.18.12 Example for Configuring BFD for BGP4+

Networking Requirements
As shown in Figure 9-30, SwitchA belongs to AS 100, and SwitchB and SwitchC belong to
AS 200. SwitchA establishes EBGP connections with both SwitchB and SwitchC.

Service traffic is forwarded along the primary link SwitchA→SwitchB. The link
SwitchA→SwitchC→SwitchB is used as a backup. Customers require that a fault on the
primary link be detected in milliseconds so that service traffic can be fast switched to the
backup link if the primary link fails.

Figure 9-30 Networking diagram of configuring BFD for BGP4+

10GE1/0/3
FC00:0:0:7::1/64
10GE1/0/2
FC00:0:0:8::2/64
EBGP
AS 100 10GE1/0/1 SwitchB 10GE1/0/1
FC00:0:0:8::1/64
FC00:0:0:9::1:1/64
SwitchA IBGP
AS 200
10GE1/0/2
FC00:0:0:10::1/64 10GE1/0/1
FC00:0:0:9::1:2/64
EBGP
10GE1/0/2
FC00:0:0:10::2/64
SwitchC

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 782


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic BGP4+ functions on all switches so that they can establish BGP peer
relationships with each other.
2. Configure MED-based route selection on SwitchA and SwitchB to forward traffic on the
primary link between SwitchA and SwitchB.
3. Enable BFD on SwitchA and SwitchB to detect faults in milliseconds so that service
traffic can be fast switched to the backup link if the primary link fails.

Procedure
Step 1 Configure IPv6 addresses for interfaces of all switches. The configuration details are not
provided here.
Step 2 Configure basic BGP4+ functions, establish EBGP connections between SwitchA and
SwitchB and between SwitchA and SwitchC, and establish an IBGP connection between
SwitchB and SwitchC.
# Configure SwitchA.
[~SwitchA] bgp 100
[*SwitchA-bgp] router-id [Link]
[*SwitchA-bgp] peer fc00:0:0:8::2 as-number 200
[*SwitchA-bgp] peer fc00:0:0:10::2 as-number 200
[*SwitchA-bgp] ipv6-family unicast
[*SwitchA-bgp-af-ipv6] peer fc00:0:0:8::2 enable
[*SwitchA-bgp-af-ipv6] peer fc00:0:0:10::2 enable
[*SwitchA-bgp-af-ipv6] commit
[~SwitchA-bgp-af-ipv6] quit
[~SwitchA-bgp] quit

# Configure SwitchB.
[~SwitchB] bgp 200
[*SwitchB-bgp] router-id [Link]
[*SwitchB-bgp] peer fc00:0:0:8::1 as-number 100
[*SwitchB-bgp] peer fc00:0:0:9::1:2 as-number 200
[*SwitchB-bgp] ipv6-family unicast
[*SwitchB-bgp-af-ipv6] peer fc00:0:0:8::1 enable
[*SwitchB-bgp-af-ipv6] peer fc00:0:0:9::1:2 enable
[*SwitchB-bgp-af-ipv6] network fc00:0:0:7:: 64
[*SwitchB-bgp-af-ipv6] commit
[~SwitchB-bgp-af-ipv6] quit
[~SwitchB-bgp] quit

# Configure SwitchC.
[~SwitchC] bgp 200
[*SwitchC-bgp] router-id [Link]
[*SwitchC-bgp] peer fc00:0:0:10::1 as-number 100
[*SwitchC-bgp] peer fc00:0:0:9::1:1 as-number 200
[*SwitchC-bgp] ipv6-family unicast
[*SwitchC-bgp-af-ipv6] peer fc00:0:0:10::1 enable
[*SwitchC-bgp-af-ipv6] peer fc00:0:0:9::1:1 enable
[*SwitchC-bgp-af-ipv6] commit
[~SwitchC-bgp-af-ipv6] quit
[~SwitchC-bgp] quit

# Run the display bgp ipv6 peer command on SwitchA. The command output shows that
BGP peer relationships have been established.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 783


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

[SwitchA] display bgp ipv6 peer


BGP local router ID : [Link]
Local AS number : 100
Total number of peers : 2
Peers in established state : 2

Peer V AS MsgRcvd MsgSent OutQ Up/Down State


PrefRcv
FC00:0:0:8::2 4 200 5 6 0 00:01:28
Established 1
FC00:0:0:10::2 4 200 4 5 0 00:00:04
Established 1

Step 3 Configure the MED attribute.


Set the MED values of routes sent from SwitchB and SwitchC to SwitchA through routing
policies.
# Configure SwitchB.
[~SwitchB] route-policy 10 permit node 10
[*SwitchB-route-policy] apply cost 100
[*SwitchB-route-policy] quit
[*SwitchB] bgp 200
[*SwitchB-bgp] ipv6-family unicast
[*SwitchB-bgp-af-ipv6] peer fc00:0:0:8::1 route-policy 10 export
[*SwitchB-bgp-af-ipv6] quit
[*SwitchB-bgp] quit
[*SwitchB] commit

# Configure SwitchC.
[~SwitchC] route-policy 10 permit node 10
[*SwitchC-route-policy] apply cost 150
[*SwitchC-route-policy] quit
[*SwitchC] bgp 200
[*SwitchC-bgp] ipv6-family unicast
[*SwitchC-bgp-af-ipv6] peer fc00:0:0:10::1 route-policy 10 export
[*SwitchC-bgp-af-ipv6] quit
[*SwitchC-bgp] quit
[*SwitchC] commit

# Check the BGP routing table on SwitchA.


[SwitchA] display bgp ipv6 routing-table
BGP Local router ID is [Link]
Status codes: * - valid, > - best, d - damped, h - history,
i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete

Total Number of Routes: 2


*> Network : FC00:0:0:7:: PrefixLen : 64
NextHop : FC00:0:0:8::2 LocPrf :
MED : 100 PrefVal : 0
Label :
Path/Ogn : 200i
*
NextHop : FC00:0:0:10::2 LocPrf :
MED : 150 PrefVal : 0
Label :
Path/Ogn : 200i

In the BGP routing table, you can view that the next-hop address of the route to
FC00:0:0:7::1/64 is FC00:0:0:8::2, and traffic is transmitted on the primary link
SwitchA→SwitchB.
Step 4 Configure BFD, and set the intervals at which BFD packets are sent and received and the
local detection multiplier.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 784


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

# Configure BFD on SwitchA, and set the minimum intervals for sending and receiving BFD
packets to both 100 ms and the local detection multiplier to 4.
[~SwitchA] bfd
[*SwitchA-bfd] quit
[*SwitchA] bgp 100
[*SwitchA-bgp] peer fc00:0:0:8::2 bfd enable
[*SwitchA-bgp] peer fc00:0:0:8::2 bfd min-tx-interval 100 min-rx-interval 100
detect-multiplier 4
[*SwitchA-bgp] quit
[*SwitchA] commit

# Configure BFD on SwitchB, and set the minimum intervals for sending and receiving BFD
packets to both 100 ms and the local detection multiplier to 4.
[~SwitchB] bfd
[*SwitchB-bfd] quit
[*SwitchB] bgp 200
[*SwitchB-bgp] peer fc00:0:0:8::1 bfd enable
[*SwitchB-bgp] peer fc00:0:0:8::1 bfd min-tx-interval 100 min-rx-interval 100
detect-multiplier 4
[*SwitchB-bgp] commit
[~SwitchB-bgp] quit

# Check all BFD sessions on SwitchA.


[SwitchA] display bgp ipv6 bfd session all
--------------------------------------------------------------------------------
Local_Address : FC00:0:0:8::1
Peer_Address : FC00:0:0:8::2
Tx-interval(ms): 100 Rx-interval(ms): 100
Multiplier : 4 Interface : 10GE1/0/1
Session-State : Up
Wtr-interval(m): 0

--------------------------------------------------------------------------------

Step 5 Verify the configuration.

# Run the shutdown command on 10GE1/0/2 of SwitchB to simulate a primary link fault.
[~SwitchB] interface 10ge 1/0/2
[~SwitchB-10GE1/0/2] shutdown
[*SwitchB-10GE1/0/2] commit

# Check the BGP routing table on SwitchA.


[SwitchA] display bgp ipv6 routing-table
BGP Local router ID is [Link]
Status codes: * - valid, > - best, d - damped, h - history,
i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete

Total Number of Routes: 1


*> Network : FC00:0:0:7:: PrefixLen : 64
NextHop : FC00:0:0:10::2 LocPrf :
MED : 150 PrefVal : 0
Label :
Path/Ogn : 200i

In the BGP routing table, you can view that the backup link SwitchA-SwitchC-SwitchB
transmits traffic after the primary link fails, and the next-hop address of the route to
FC00:0:0:7::1/64 becomes FC00:0:0:10::2.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 785


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
bfd
#
interface 10GE1/0/1
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:8::1/64
#
interface 10GE1/0/2
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:10::1/64
#
bgp 100
router-id [Link]
peer FC00:0:0:8::2 as-number 200
peer FC00:0:0:8::2 bfd min-tx-interval 100 min-rx-interval 100 detect-
multiplier 4
peer FC00:0:0:8::2 bfd enable
peer FC00:0:0:10::2 as-number 200
#
ipv4-family unicast
#
ipv6-family unicast
peer FC00:0:0:8::2 enable
peer FC00:0:0:10::2 enable
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
bfd
#
interface 10GE1/0/1
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:9::1:1/64
#
interface 10GE1/0/2
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:8::2/64
#
interface 10GE1/0/3
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:7::1/64
#
bgp 200
router-id [Link]
peer FC00:0:0:8::1 as-number 100
peer FC00:0:0:8::1 bfd min-tx-interval 100 min-rx-interval 100 detect-
multiplier 4
peer FC00:0:0:8::1 bfd enable
peer FC00:0:0:9::1:2 as-number 200
#
ipv4-family unicast
#
ipv6-family unicast
network FC00:0:0:7:: 64
peer FC00:0:0:8::1 enable
peer FC00:0:0:8::1 route-policy 10 export

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 786


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

peer FC00:0:0:9::1:2 enable


#
route-policy 10 permit node 10
apply cost 100
#
return

l Configuration file of SwitchC


#
sysname SwitchC
#
interface 10GE1/0/1
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:9::1:2/64
#
interface 10GE1/0/2
undo portswitch
ipv6 enable
ipv6 address FC00:0:0:10::2/64
#
bgp 200
router-id [Link]
peer FC00:0:0:9::1:1 as-number 200
peer FC00:0:0:10::1 as-number 100
#
ipv4-family unicast
#
ipv6-family unicast
peer FC00:0:0:9::1:1 enable
peer FC00:0:0:10::1 enable
peer FC00:0:0:10::1 route-policy 10 export
#
route-policy 10 permit node 10
apply cost 150
#
return

9.18.13 Example for Configuring BGP Auto FRR

Networking Requirements
As shown in Figure 9-31, SwitchA belongs to AS 100; SwitchB, SwitchC, and SwitchD
belong to AS 200 and establish IBGP connections. Routes from SwitchA to SwitchD must
have backup forwarding information so that traffic can be fast switched to the backup link
after a fault is detected. This improves network reliability.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 787


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

Figure 9-31 Networking diagram of configuring BGP Auto FRR

10GE1/0/1 SwitchB
AS 200
AS 100 VLANIF10
[Link]/24
10GE1/0/1 10GE1/0/1
VLANIF10 10GE1/0/2 VLANIF30
[Link]/24 VLANIF30 [Link]/24
[Link]/24
SwitchA SwitchD
10GE1/0/2 10GE1/0/2
10GE1/0/2
VLANIF20 VLANIF40
VLANIF40
[Link]/24 [Link]/24
[Link]/24
10GE1/0/1
VLANIF20
[Link]/24
SwitchC

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a route-policy on SwitchB and SwitchC to change the MED values of routes
to SwitchD to facilitate route selection.
2. Configure BGP Auto FRR on SwitchA so that traffic can be fast switched to the backup
link when a fault is detected.

Procedure
Step 1 Configure the VLAN to which each interface belongs.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan batch 10 20
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 20
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit

The configurations of SwitchB, SwitchC, and SwitchD are similar to the configuration of
SwitchA, and are not mentioned here.
Step 2 Configure VLANIF interfaces and assign IP addresses to the VLANIF interfaces.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ip address [Link] 24
[*SwitchA-Vlanif10] quit
[*SwitchA] interface vlanif 20
[*SwitchA-Vlanif20] ip address [Link] 24
[*SwitchA-Vlanif20] quit
[*SwitchA] commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 788


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

The configurations of SwitchB, SwitchC, and SwitchD are similar to the configuration of
SwitchA, and are not mentioned here.
Step 3 Establish EBGP connections between SwitchA and SwitchB, and between SwitchA and
SwitchC, and establish IBGP connections between SwitchD and SwitchB, and between
SwitchD and SwitchC.
# Configure SwitchA.
<SwitchA> system-view
[~SwitchA] bgp 100
[*SwitchA-bgp] router-id [Link]
[*SwitchA-bgp] peer [Link] as-number 200
[*SwitchA-bgp] peer [Link] as-number 200
[*SwitchA-bgp] commit

The configurations of SwitchB and SwitchC are similar to the configuration of SwitchA, and
are not mentioned here.
# Configure SwitchD.
<SwitchD> system-view
[~SwitchD] bgp 200
[*SwitchD-bgp] router-id [Link]
[*SwitchD-bgp] peer [Link] as-number 200
[*SwitchD-bgp] peer [Link] as-number 200
[*SwitchD-bgp] commit

The configurations of SwitchB and SwitchC are similar to the configuration of SwitchD, and
are not mentioned here.
Step 4 Configure a route-policy on SwitchB and SwitchC so that routes to SwitchD have different
MED values.
# Configure a route-policy on SwitchB.
<SwitchB> system-view
[~SwitchB] route-policy rtb permit node 10
[*SwitchB-route-policy] apply cost 80
[*SwitchB-route-policy] quit
[*SwitchB] bgp 200
[*SwitchB-bgp] ipv4-family unicast
[*SwitchB-bgp-af-ipv4] peer [Link] route-policy rtb export
[*SwitchB-bgp-af-ipv4] commit
[~SwitchB-bgp-af-ipv4] quit

# Configure a route-policy on SwitchC.


<SwitchC> system-view
[~SwitchC] route-policy rtc permit node 10
[*SwitchC-route-policy] apply cost 120
[*SwitchC-route-policy] quit
[*SwitchC] bgp 200
[*SwitchC-bgp] ipv4-family unicast
[*SwitchC-bgp-af-ipv4] peer [Link] route-policy rtc export
[*SwitchC-bgp-af-ipv4] commit
[~SwitchC-bgp-af-ipv4] quit

# Advertise a route to [Link]/32 on SwitchD.


[~SwitchD] bgp 200
[*SwitchD-bgp] ipv4-family unicast
[*SwitchD-bgp] network [Link] 32
[*SwitchD-bgp] commit

# Run the display ip routing-table verbose command on SwitchA to check detailed


information about the route to [Link]/32.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 789


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

<SwitchA> display ip routing-table [Link] 32 verbose


Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : _public_
Summary Count : 1

Destination: [Link]/32
Protocol: EBGP Process ID: 0
Preference: 255 Cost: 80
NextHop: [Link] Neighbour: [Link]
State: Active Adv Age: 00h00m12s
Tag: 0 Priority: low
Label: NULL QoSInfo: 0x0
IndirectID: 0x4
RelayNextHop: [Link] Interface: Vlanif10
TunnelID: 0x0 Flags: D

The MED value of the route learned from SwitchB is smaller. Therefore, SwitchA selects the
path SwitchA→SwitchB→SwitchD as the route to [Link]/32. Because FRR is not
configured, no backup forwarding information is available.
Step 5 Enable BGP Auto FRR on SwitchA, and check the routing information.
# Enable BGP Auto FRR on SwitchA.
<SwitchA> system-view
[~SwitchA] bgp 100
[~SwitchA-bgp] ipv4-family unicast
[~SwitchA-bgp-af-ipv4] auto-frr
[*SwitchA-bgp-af-ipv4] commit
[~SwitchA-bgp-af-ipv4] quit

# After the configuration, run the display ip routing-table verbose command on SwitchA to
check the routing information.
<SwitchA> display ip routing-table [Link] 32 verbose
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : _public_
Summary Count : 1

Destination: [Link]/32
Protocol: EBGP Process ID: 0
Preference: 255 Cost: 80
NextHop: [Link] Neighbour: [Link]
State: Active Adv Age: 00h52m45s
Tag: 0 Priority: low
Label: NULL QoSInfo: 0x0
IndirectID: 0x4
RelayNextHop: [Link] Interface: Vlanif10
TunnelID: 0x0 Flags: D
BkNextHop: [Link] BkInterface: Vlanif20
BkLabel: NULL SecTunnelID: 0x0
BkPETunnelID: 0x0 BkPESecTunnelID: 0x0
BkIndirectID: 0x2

The preceding command output shows that SwitchA has a backup next hop and a backup
outbound interface for the route to [Link]/32.
----End

Configuration Files
l Configuration file of SwitchA
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 790


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

sysname SwitchA
#
vlan batch 10 20
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif20
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
bgp 100
router-id [Link]
peer [Link] as-number 200
peer [Link] as-number 200
#
ipv4-family unicast
peer [Link] enable
peer [Link] enable
auto-frr
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 10 30
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif30
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
bgp 200
router-id [Link]
peer [Link] as-number 100
peer [Link] as-number 200
#
ipv4-family unicast
peer [Link] enable
peer [Link] enable
peer [Link] route-policy rtb export
#
route-policy rtb permit node 10
apply cost 80
#
return

l Configuration file of SwitchC


#
sysname SwitchC

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 791


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 9 BGP Configuration

#
vlan batch 20 40
#
interface Vlanif20
ip address [Link] [Link]
#
interface Vlanif40
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
bgp 200
router-id [Link]
peer [Link] as-number 100
peer [Link] as-number 200
#
ipv4-family unicast
peer [Link] enable
peer [Link] enable
peer [Link] route-policy rtc export
#
route-policy rtc permit node 10
apply cost 120
#
return

l Configuration file of SwitchD


#
sysname SwitchD
#
vlan batch 30 40
#
interface Vlanif30
ip address [Link] [Link]
#
interface Vlanif40
ip address [Link] [Link]
#
interface LoopBack1
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
bgp 200
router-id [Link]
peer [Link] as-number 200
peer [Link] as-number 200
#
ipv4-family unicast
peer [Link] enable
peer [Link] enable
network [Link] [Link]
#
return

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 792


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

10 Routing Policy Configuration

About This Chapter

Routing policies, when applied to routing information, change the paths through which
network traffic passes.

10.1 Overview of Routing Policies


10.2 Understanding Routing Policies
10.3 Application Scenarios for Routing Policies
10.4 Summary of Routing Policy Configuration Tasks
10.5 Licensing Requirements and Limitations for Routing Policies
10.6 Configuring Filters
10.7 Configuring a Routing Policy
10.8 Maintaining Routing Policies
10.9 Configuration Examples for Routing Policies

10.1 Overview of Routing Policies

Definition
Routing policies are used to filter routes and set route attributes. By changing the attributes of
a route, a route policy can change the path that network traffic passes through.

Purpose
When advertising, receiving, and importing routes, routing protocols implement certain
policies to filter routes and change the attributes of the routes based on the following
networking requirements:

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 793


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

l Control route receiving and advertising.


Only required and valid routes are received or advertised. This reduces the size of the
routing table and improves network security.
l Control route importing.
A routing protocol may import routes discovered by other routing protocols. Only routes
that satisfy certain conditions are imported to meet the requirements of the protocol.
l Modify attributes of specified routes.
Attributes of routes that are filtered by a routing policy are modified to meet the
requirements of the local device.

Benefits
Routing policies offer the following benefits:
l System resources are saved by controlling the size of the routing table.
l Network security is improved by controlling the route receiving, advertising and
importing.
l Network performance is improved by modifying the attributes of routes for proper traffic
planning.

10.2 Understanding Routing Policies


A routing policy uses different matching rules and modes to select routes and change route
attributes. Six different filters in the routing policy can be used independently to filter routes
in specific scenarios. If the device supports the Border Gateway Protocol (BGP) to Interior
Gateway Protocol (IGP) function, the BGP private attributes can serve as matching rules
when the IGP imports BGP routes.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 794


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

Implementation of Routing Policies

Figure 10-1 Working mechanism of a routing policy

Routing
policy
Succeed in
If match matching all Apply Successfully
clauses. Matching Permit
Node 1 If match Apply pass the
mode
…… …… routing policy.
Fail to match Deny
a clause. Denied

……
Succeed in
matching all
If match Matching Permit Apply Successfully
clauses.
Node N If match mode Apply pass the
…… …… routing policy.
Fail to match
Deny
a clause. Denied

Denied

Figure 10-1 shows that a routing policy consists of N nodes (N ≥ 1). Each node has its own
set of if-match clauses that must be matched in order to accept a policy. The if-match clauses
define matching rules related to route attributes and six filters. The system checks routes in
the nodes of a routing policy in ascending order of node IDs.
When a route matches all if-match clauses in a node, the route enters the matching mode
without other nodes checking. The two supported matching modes are:
l permit: A route is permitted, and actions defined by apply clauses are performed on the
route to set its attributes.
l deny: A route is denied.
If a route does not match any if-match clause in a node, the route is passed to the next node.
If the route does not match all of the If-match clauses in any one of the nodes, the route is
filtered out.

Filters
The six filters specified in if-match clauses in a routing policy are access control list (ACL),
IP prefix list, AS_Path filter, community filter, extended community filter, and route
distinguisher (RD) filter. These filters have their own matching rules and modes and can be
used independently to filter routes in specific situations. The following offers a brief
explanation to each of these filters.
ACL
ACLs filter routes based on the inbound interface, source or destination IP address, source or
destination port number, and protocol of packets. They can be used independently when

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 795


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

routing protocols advertise and receive routes. The if-match clauses in a routing policy
support only basic ACLs.
ACLs can be used in not only a routing policy but other scenarios. For details, see
"Understanding ACLs" in the Configuration Guide - Security - ACL Configuration.
IP Prefix List
IP prefix lists filter routes based on the IP prefixes of the source IP address, destination IP
address, and next-hop IP address of packets. They can be used independently when routing
protocols advertise and receive routes.
Each IP prefix list consists of multiple indexes, and each index matches a node. An IP prefix
list checks routes in the nodes of a routing policy in ascending order of node IDs. If a route
matches one node, the route is not checked by additional nodes. If a route does not match any
one of the nodes, the route is filtered out.
The IP prefix list supports exact matching or matching within a specified mask length.

NOTE

When an IP address is [Link] (a wildcard address), all routes in the mask length range are permitted or
denied.

AS_Path Filter
The AS_Path filter uses the AS_Path attribute of BGP to filter routes. It can be used
independently when BGP advertises and receives routes.
The AS_Path attribute records all ASs that a BGP route passes through. For details about the
AS_Path attribute, see "Understanding BGP - BGP Concepts" in the Configuration Guide - IP
Routing - BGP Configuration.
Community Filter
The community filter uses the community attribute of BGP to filter routes. It can be used
independently when BGP advertises and receives routes.
The BGP community attribute identifies a group of routes with the same properties. For
details about the community attribute, see "Understanding BGP - BGP Concepts" in the
Configuration Guide - IP Routing - BGP Configuration.
Extended Community Filter
The extended community filter uses the extended community attribute of BGP to filter routes.
It can be used independently when VPN targets are used to identify routes in a VPN.
Currently, the extended community filter applies only to the VPN target attribute in a VPN.
On a BGP/MPLS IP VPN, VPN targets are used to control the advertising and receiving of
VPN routing information between sites. For details about the VPN target attribute, see
"Understanding BGP/MPLS IP VPN - Concepts" in the Configuration Guide - VPN - BGP/
MPLS IP VPN Configuration.
RD Filter
The RD filter uses the RD attribute in a VPN to filter routes. It can be used independently
when the RD attribute is used to identify routes in a VPN.
A VPN instance uses RDs to separate address spaces and distinguish the IP prefixes with the
same address space. For details about the RD attribute, see "Understanding BGP/MPLS IP
VPN - Concepts" in the Configuration Guide - VPN - BGP/MPLS IP VPN Configuration.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 796


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

BGP to IGP Function


The BGP to IGP function enables IGPs to identify private attributes of BGP such as the
community, extended community, and AS_Path attributes.
Routing policies can be used when an IGP imports BGP routes. BGP private attributes can be
used as matching rules in routing policies only when the device supports the BGP to IGP
function. When the device does not support the BGP to IGP function, the IGP cannot identify
private attributes of BGP routes. Therefore, matching rules do not take effect.

10.3 Application Scenarios for Routing Policies

Filtering Specific Routes


Figure 10-2 shows an OSPF-enabled network where RouterA receives routes from the
Internet and advertises some of the routes to RouterB. Networking configurations to consider
are as follows:
l RouterA advertises only routes [Link]/24, [Link]/24, and [Link]/24 to
RouterB.
l RouterC accepts only the route [Link]/24.
l RouterD accepts all the routes advertised by RouterB.

Figure 10-2 Networking diagram for filtering received and advertised routes

RouterC

OSPF Internet
[Link]/24
[Link]/24
[Link]/24
[Link]/24
RouterB [Link]/24
RouterA

RouterD

The following two approaches can be used to meet the preceding network requirements:
l Use IP prefix lists.
– Configure an IP prefix list on RouterA and configure the IP prefix list as an export
policy of RouterA to be used by OSPF.
– Configure another IP prefix list on RouterC and configure the IP prefix list as an
import policy of RouterC to be used by OSPF.
l Use routing policies.
– Configure a routing policy (the matching rules can be the IP prefix list, cost, or
route tag) on RouterA and configure this routing policy as an export policy of
RouterA to be used by OSPF.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 797


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

– Configure another routing policy on RouterC. Configure this routing policy as an


import policy of RouterC to be used by OSPF.
Compared with an IP prefix list, a routing policy allows route attributes to be modified
and can be used to control routes more flexibly, but it is more complex to configure.

Transparently Transmitting Routes of Other Protocols Through an OSPF AS


On the network shown in Figure 10-3, an autonomous system (AS) runs OSPF and functions
as a transit AS for other areas. Routes from the IS-IS area connected to RouterA need to be
transparently transmitted through the OSPF AS to the IS-IS area connected to RouterD.

Figure 10-3 Networking diagram for transparently transmitting routes of other protocols
through an OSPF AS

RouterA RouterB
IS-IS RIP-2

OSPF

IS-IS
RIP-2
RouterC RouterD

To meet the preceding requirements, configure a routing policy on RouterA to set a tag for the
imported IS-IS routes. RouterD then identifies the IS-IS routes from OSPF routes based on
the tag.

10.4 Summary of Routing Policy Configuration Tasks


Table 10-1 describes the routing policy configuration tasks. After routing policies are
configured, apply them only when using routing protocols to advertise, receive, or import
routes to implement the route filtering and attribute configuration functions.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 798


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

Table 10-1 Summary of routing policy configuration tasks

Scenario Description Task

Configuring filters Routing policy filters include: 10.6 Configuring


ACLs, IP prefix lists, AS_path Filters
filters, community filters,
extended community filters, and
RD filters. These routing policy
filters can be applied to the if-
match clauses of a routing
policy and can also be used
separately in specific situations.

Configuring routing policies To reduce network burden and 10.7 Configuring a


ensure network security, apply Routing Policy
the routing policies with if-
match clauses in the following
situations:
l Importing routes
l Advertising and receiving
routes
l Filtering routes using the RT
and RD attributes in the
VPN

10.5 Licensing Requirements and Limitations for Routing


Policies

Involved Network Elements


Other network elements are not required.

Licensing Requirements
Routing policy is a basic feature of a switch and is not under license control.

Version Requirements

Table 10-2 Products and minimum version supporting routing policies

Product Minimum Version Required

CE8868EI V200R005C10

CE8861EI V200R005C10

CE8860EI V100R006C00

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 799


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

Product Minimum Version Required

CE8850-32CQ-EI V200R002C50

CE8850-64CQ-EI V200R005C00

CE7850EI V100R003C00

CE7855EI V200R001C00

CE6810EI V100R003C00

CE6850EI V100R001C00

CE6850-48S6Q-HI V100R005C00

CE6850-48T6Q-HI/CE6850U-HI/ V100R005C10
CE6851HI

CE6855HI V200R001C00

CE6856HI V200R002C50

CE6857EI V200R005C10

CE6860EI V200R002C50

CE6865EI V200R005C00

CE6870-24S6CQ-EI/ V200R001C00
CE6870-48S6CQ-EI

CE6870-48T6CQ-EI V200R002C50

CE6875EI V200R003C00

CE6880EI V200R002C50

CE5880EI V200R005C10

CE5810EI V100R002C00

CE5850EI V100R001C00

CE5850HI V100R003C00

CE5855EI V100R005C10

Feature Limitations
In versions earlier than V200R002C50, the CE5855EI does not support IPv6. However,
interfaces on a CE5855EI provide the IPv6 capability when the switch functions as a leaf
switch in a super virtual fabric (SVF) system and the SVF forwarding mode is set to
centralized or hybrid. In V200R002C50 and later versions, the CE5855EI supports IPv6.
The CE6810LI does not support IPv4 or IPv6 Layer 3 forwarding. After the IPv4 or IPv6
function is enabled on an interface of the CE6810LI, the configured IPv4 or IPv6 address can
only be used to manage the switch.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 800


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

10.6 Configuring Filters

Pre-configuration Tasks
Before configuring filters, configure routing protocols.

Configuration Procedure
Configure each of the filters in any sequence based on network requirements.

10.6.1 Configuring IP Prefix Lists

Context
Configuring IP prefix lists controls the advertising and receiving of routes based on the
destination address.

If an IP prefix list is not used together with the if-match clauses in a routing policy, you must
set at least one node to the permit mode in the IP prefix list. If no node is set to the permit
mode, all routes are filtered out.

Procedure
Step 1 Configure an IPv4 prefix list.
1. Run system-view

The system view is displayed.


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.


3. Run commit

The configuration is committed.

Step 2 Configure an IPv6 prefix list.


1. Run system-view

The system view is displayed.


2. Run ip ipv6-prefix ipv6-prefix-name [ index index-number ] { permit | deny } ipv6-
address prefix-length [ greater-equal greater-equal-value ] [ less-equal less-equal-
value ]

An IPv6 prefix list is configured.


3. Run commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 801


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

The configuration is committed.

----End

Verifying the Configuration


l Run the display ip ip-prefix [ ip-prefix-name ] command to check information about the
IPv4 prefix list.
l Run the display ip ipv6-prefix [ ipv6-prefix-name ] command to check information
about the IPv6 prefix list.

10.6.2 Configuring an AS_Path Filter


Context
An AS_Path filter is used to filter routes based on the AS_Path attributes of BGP routes. If
you do not want to receive routes of a specified AS number, configure an AS_Path filter
based on the specified AS number. On a complex network, multiple ACLs or IP prefix lists
must be configured to filter BGP routes. This can be a complicated process; configuring an
AS_Path filter can simplify the configuration.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ip as-path-filter { as-path-filter-number | as-path-filter-name } [ index index-number ]
{ permit | deny } regular-expression
An AS_Path filter is configured.
In the preceding command, regular-expression indicates that the AS_Path filter uses a regular
expression to define matching rules. For details about regular expressions, see "Overview of
CLIs" in CloudEngine 8800, 7800, 6800, and 5800 Series Switches - Configuration Guide -
Basic Configuration.
Step 3 Run commit
The configuration is committed.

----End

Verifying the Configuration


l Run the display ip as-path-filter [ as-path-filter-number | as-path-filter-name ]
command to check information about the configured AS_Path filter.

10.6.3 Configuring a Community Filter


Context
The community attribute identifies routes with the same characteristics without considering IP
prefixes and AS numbers. Configuring community filters and community attributes simplifies
route management when it is inconvenient to use the IP prefix list or AS_Path filter. For

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 802


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

example, a company branch needs to receive routes only from its headquarters and from
branches in adjacent countries. In this case, you can configure different community attributes
for the branches. Routes in the original branch can then be managed based on community
attributes, without considering IP prefixes and AS numbers of routes in different countries.
Community filters are classified into basic and advanced community filters. An advanced
community filter supports regular expressions and is more flexible than a basic community
filter.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ip community-filter
A community filter is configured.
l To configure a basic community filter, run the ip community-filter { basic comm-filter-
name | basic-comm-filter-num } [ index index-number ] { permit | deny } [ community-
number | aa:nn | internet | no-export-subconfed | no-advertise | no-export ] &<1-20>
command.
l To configure an advanced community filter, run the ip community-filter { advanced
comm-filter-name | adv-comm-filter-num } [ index index-number ] { permit | deny }
regular-expression command.
In the preceding command, regular-expression indicates that the community filter uses a
regular expression to define matching rules. For details about regular expressions, see
"Overview of CLIs" in CloudEngine 8800, 7800, 6800, and 5800 Series Switches -
Configuration Guide - Basic Configuration.
Step 3 Run commit
The configuration is committed.

----End

Verifying the Configuration


l Run the display ip community-filter [ basic-comm-filter-num | adv-comm-filter-num |
comm-filter-name ] command to check information about the configured community
filter.

10.6.4 Configuring an Extended Community Filter


Context
You can use an extended community filter when using the route target (RT) attribute to filter
routes in a VPN scenario.

Procedure
Step 1 Run system-view
The system view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 803


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

Step 2 Run ip extcommunity-filter { basic-extcomm-filter-num | basic basic-extcomm-filter-name }


[ index index-number ] { deny | permit } { rt { as-number:nn | 4as-number:nn | ipv4-
address:nn } } &<1-16>ip extcommunity-filter { advanced-extcomm-filter-num | advanced
advanced-extcomm-filter-name } [ index index-number ] { deny | permit } regular-
expression
or
An extended community filter is configured.
Step 3 Run ip extcommunity-list soo basic basic-extcomm-filter-name [ index index-number ]
{ permit | deny } { site-of-origin } &<1-16>ip extcommunity-list soo advance advanced-
extcomm-filter-name [ index index-number ] { permit | deny } regular-expression
or
An SoO extended community attribute is configured.
Step 4 Run commit
The configuration is committed.

----End

Verifying the Configuration


Run the display ip extcommunity-filter [ basic-extcomm-filter-num | advanced-extcomm-
filter-num | extcomm-filter-name ] command to check information about the configured
extended community filter.
Run the display ip extcommunity-list soo [ extcomm-filter-name ] command to check
information about the configured SoO extended community attribute.

10.6.5 Configuring an RD Filter


Context
You can use an RD filter when using the RD attribute to filter routes in a VPN scenario.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ip rd-filter rd-filter-number { deny | permit } route-distinguisher &<1-10>
An RD filter is configured.
Step 3 Run commit
The configuration is committed.

----End

Verifying the Configuration


l Run the display ip rd-filter [ rd-filter-number ] command to check information about
the configured RD filter.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 804


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

10.7 Configuring a Routing Policy

Pre-configuration Tasks
Each node of a routing policy can have a unique set of if-match and apply clauses.

Before configuring a routing policy, configure routing protocols.

Configuration Procedure
Before configuring the if-match and apply clauses, you must configure a routing policy. You
can configure the if-match and apply clauses in any sequence based on network
requirements.

10.7.1 Creating a Routing Policy

Context
A routing policy can consist of multiple matching rules and actions.

You must set at least one node to the permit mode in a routing policy; otherwise, all routes
are filtered out.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run route-policy route-policy-name { permit | deny } node node

A routing policy is created, and the routing policy view is displayed.

When a routing policy is used to filter routes, it checks nodes in the routing policy in
ascending order according to node ID. Therefore, it starts route matching from the smallest
node ID. If a route matches a node in the routing policy, the system does not continue to
check other nodes. If a route fails to match all the nodes in the routing policy, the route is
filtered out.

Step 3 (Optional) Run description text

A description of the routing policy is configured.

Step 4 Run commit

The configuration is committed.

----End

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 805


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

10.7.2 (Optional) Configuring if-match Clauses

Context
An if-match clause defines matching rules related to route filters and attributes in a routing
policy.
If no if-match clause is configured in a node of a routing policy, all routes match this node. If
one or more if-match clauses are configured in a node, the relationship between the clauses is
"AND". This means that a route matches this node only when it matches all the if-match
clauses in this node.
If multiple if-match as-path-filter, if-match community-filter, if-match extcommunity-
filter, if-match interface, or if-match route-type clauses are configured, the relationship
between these clauses is "OR", such as if multiple if-match as-path-filter clauses are
configured in a node. The relationship of the five clauses independently is "AND", and the
relationship between these clauses and other if-match clauses is also "AND".

NOTE

If an if-match clause defines a filter that is not configured, all routes match this if-match clause by
default.
The if-match acl and if-match ip-prefix commands cannot be used together in the same node. When
both the commands are used in a node, the most recently configured one overrides the previously
configured one.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run route-policy route-policy-name { permit | deny } node node
The routing policy view is displayed.
Step 3 Configure if-match clauses in any sequence for the routing policy based on network
requirements.
l Run if-match acl { acl-number | acl-name }
An if-match clause is configured to match the basic ACL.
l Run if-match as-path-filter { as-path-filter-number &<1-16> | as-path-filter-name }
An if-match clause is configured to match AS_Path filters.
l Run either of the following commands as required to configure an if-match clause to
match community filters:
– if-match community-filter { basic-comm-filter-num [ whole-match ] | adv-comm-
filter-num } &<1-16>
– if-match community-filter comm-filter-name [ whole-match ]
l Run if-match extcommunity-filter { { basic-extcomm-filter-num | adv-extcomm-filter-
num } &<1-16> | extcomm-filter-name }
An if-match clause is configured to match extended community filters.
l Run if-match extcommunity-list soo extcomm-filter-name
An if-match clause is configured to match the SoO extended community attribute.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 806


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

l Run if-match cost cost


An if-match clause is configured to match the cost of routes.
l Run if-match interface { interface-type interface-number } &<1-16>
An if-match clause is configured to match outbound interfaces of routes.
l Run if-match ip { next-hop | route-source } { acl { acl-number | acl-name } | ip-prefix
ip-prefix-name }
An if-match clause is configured to match the next-hop or source address of IPv4 routes.
l Run if-match ipv6 { address | next-hop | route-source } { acl { acl-number | acl-
name } | prefix-list ipv6-prefix-name }
An if-match clause is configured to match the destination, next-hop, or source address of
IPv6 routes.
l Run if-match ip-prefix ip-prefix-name
An if-match clause is configured to match the IP prefix list.
l Run if-match rd-filter rd-filter-number
An if-match clause is configured to match the RD filter.
l Run the following commands as required to match types of routes:
– Run if-match route-type { external-type1 | external-type1or2 | external-type2 |
internal | nssa-external-type1 | nssa-external-type1or2 | nssa-external-type2 }
An if-match clause is configured to match a specified type of OSPF routes.
– Run if-match route-type { is-is-level-1 | is-is-level-2 }
An if-match clause is configured to match a specified type of IS-IS routes.
– Run if-match route-type { ibgp | ebgp }
An if-match clause is configured to match a specified type of BGP routes.
l Run if-match tag tag
An if-match clause is configured to match the tag of routes.

Step 4 Run commit

The configuration is committed.

----End

10.7.3 (Optional) Configuring apply Clauses

Context
An apply clause specifies the action of setting attributes for routes that have matched a
routing policy node. If a node does not have an apply clause configured, the node will only
filter routes. If one or more apply clauses are configured in a node, all the apply clauses are
applied to routes that match the node.

Procedure
Step 1 Run system-view

The system view is displayed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 807


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

Step 2 Run route-policy route-policy-name { permit | deny } node node

The routing policy view is displayed.

Step 3 According to network requirements, configure apply clauses for the routing policy.
l Run apply as-path { { as-number-plain | as-number-dot } &<1-10> { additive |
overwrite | delete } | none overwrite }
An apply clause is configured to set the AS_Path attribute of BGP routes.
l Run apply comm-filter { basic-comm-filter-number | adv-comm-filter-number | comm-
filter-name } delete
An apply clause is configured to delete the specified community attribute of BGP routes.
NOTE

To delete several community attributes, you can run the ip community-filter command several
times to configure these community attributes in a community filter one by one, and then apply a
routing policy with the apply comm-filter delete command configured to delete all community
attributes in the community filter.
l Run apply community none
An apply clause is configured to delete all community attributes of BGP routes.
l Run apply community { community-number | aa:nn | internet | no-advertise | no-
export | no-export-subconfed } &<1-32> [ additive ]
An apply clause is configured to set the community attributes of BGP routes.
l Run apply cost { [ apply-type ] cost | inherit }
An apply clause is configured to set the route cost.
l Run apply cost-type { external | internal | type-1 | type-2 | internal-inc-ibgp }
An apply clause is configured to set the cost type of routes.
l Run apply dampening half-life-reach reuse suppress ceiling
An apply clause is configured to set the dampening parameters of EBGP routes.
l Run apply extcommunity { rt { as-number:nn | ipv4-address:nn } } &<1-16>
[ additive ]
An apply clause is configured to set the RT extended community attributes of BGP
routes.
l Run apply extcommunity soo { source-of-origin } &<1-16> additive
An apply clause is configured to set the SoO extended community attributes of BGP
routes.
l Run apply ip-address next-hop { ipv4-address | peer-address }
An apply clause is configured to set the next-hop address of IPv4 routes.
l Run apply isis { level-1 | level-1-2 | level-2 }
An apply clause is configured to set the IS-IS route level.
l Run apply local-preference [ + | - ] preference
An apply clause is configured to set the local preference of BGP routes.
l Run apply mpls-lablel
An apply clause is configured to set the MPLS label.
l Run apply origin { egp { as-number-plain | as-number-dot } | igp | incomplete }
An apply clause is configured to set the origin attribute of BGP routes.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 808


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

l Run apply ospf { backbone | stub-area }


An apply clause is configured to import routes to the specified OSPF area.
l Run apply preference preference
An apply clause is configured to set the route preference.
l Run apply preferred-value preferred-value
An apply clause is configured to set the preferred value of BGP routes.
l Run apply tag tag
An apply clause is configured to set the route tag.
Step 4 Run commit
The configuration is committed.

----End

10.7.4 Verifying the Routing Policy Configuration

Procedure
l Run the display route-policy [ route-policy-name ] command to verify the configuration
of the routing policy.
----End

10.8 Maintaining Routing Policies

Context

The IP prefix list statistics cannot be restored after being cleared. Exercise caution when
running these commands.

Procedure
l Run the reset ip ip-prefix [ ip-prefix-name ] command in the user view to clear IPv4
prefix list statistics.
l Run the reset ip ipv6-prefix [ ipv6-prefix-name ] command in the user view to clear
IPv6 prefix list statistics.
----End

10.9 Configuration Examples for Routing Policies


This section only provides configuration examples for individual features. For details about
multi-feature configuration examples, feature-specific configuration examples, interoperation

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 809


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

examples, protocol or hardware replacement examples, and industry application examples, see
the Typical Configuration Examples.

10.9.1 Example for Filtering the Routes to Be Received or


Advertised
Networking Requirements
Figure 10-4 shows how on an OSPF configured network, SwitchA receives routes from the
Internet and provides these routes for the OSPF network. A user wants the network segments
[Link]/24, [Link]/24, and [Link]/24 to be advertised on the OSPF configured
network, and SwitchC to access only the network segment [Link]/24.

Figure 10-4 Networking diagram for filtering the received and advertised routes

SwitchC
10GE1/0/1
VLANIF20
10GE1/0/2 [Link]/24
VLANIF20 10GE1/0/1
[Link]/24 VLANIF10 SwitchA
[Link]/24
OSPF SwitchB [Link]/24 [Link]/24
10GE1/0/1 [Link]/24
10GE1/0/3 VLANIF10 [Link]/24
VLANIF30 [Link]/24 [Link]/24
[Link]/24 10GE1/0/1
VLANIF30
[Link]/24
SwitchD

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a routing policy on SwitchA and apply the routing policy during route
advertisement. When routes are advertised, the routing policy allows SwitchA to provide
routes from network segments [Link]/24, [Link]/24, and [Link]/24 for
SwitchB, and allows devices on the OSPF network to access only the three network
segments.
2. Configure a routing policy on SwitchC and apply the routing policy during route
importing. When routes are imported, the routing policy allows SwitchC to receive only
the routes from, and therefore access, the network segment [Link]/24.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 810


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

Procedure
Step 1 Add interfaces to VLANs.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan 10
[*SwitchA-vlan10] quit
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA] commit

The configurations of SwitchB, SwitchC, and SwitchD are similar to the configuration of
SwitchA, and are not described here.
Step 2 Assign IP addresses to VLANIF interfaces.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ip address [Link] 24
[*SwitchA-Vlanif10] quit
[*SwitchA] commit

The configurations of SwitchB, SwitchC, and SwitchD are similar to the configuration of
SwitchA, and are not described here.
Step 3 Configure basic OSPF functions.
# Configure SwitchA.
[~SwitchA] ospf
[*SwitchA-ospf-1] area 0
[*SwitchA-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchA-ospf-1-area-[Link]] quit
[*SwitchA-ospf-1] quit
[*SwitchA] commit

# Configure SwitchB.
[~SwitchB] ospf
[*SwitchB-ospf-1] area 0
[*SwitchB-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchB-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchB-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchB-ospf-1-area-[Link]] quit
[*SwitchB-ospf-1] quit
[*SwitchB] commit

# Configure SwitchC.
[~SwitchC] ospf
[*SwitchC-ospf-1] area 0
[*SwitchC-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchC-ospf-1-area-[Link]] quit
[*SwitchC-ospf-1] quit
[*SwitchC] commit

# Configure SwitchD.
[~SwitchD] ospf
[*SwitchD-ospf-1] area 0
[*SwitchD-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchD-ospf-1-area-[Link]] quit
[*SwitchD-ospf-1] quit
[*SwitchD] commit

Step 4 Configure five static routes on SwitchA and import these routes into OSPF.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 811


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

[~SwitchA] ip route-static [Link] 24 NULL 0


[*SwitchA] ip route-static [Link] 24 NULL 0
[*SwitchA] ip route-static [Link] 24 NULL 0
[*SwitchA] ip route-static [Link] 24 NULL 0
[*SwitchA] ip route-static [Link] 24 NULL 0
[*SwitchA] commit
[~SwitchA] ospf
[~SwitchA-ospf-1] import-route static
[*SwitchA-ospf-1] quit
[*SwitchA] commit

# Check the IP routing table on SwitchB. You will see that the five static routes are imported
into OSPF.
[~SwitchB] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 13 Routes : 13
Destination/Mask Proto Pre Cost Flags NextHop Interface
[Link]/8 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/24 O_ASE 150 1 D [Link] Vlanif10
[Link]/24 O_ASE 150 1 D [Link] Vlanif10
[Link]/24 O_ASE 150 1 D [Link] Vlanif10
[Link]/24 O_ASE 150 1 D [Link] Vlanif10
[Link]/24 O_ASE 150 1 D [Link] Vlanif10
[Link]/24 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/24 Direct 0 0 D [Link] Vlanif20
[Link]/32 Direct 0 0 D [Link] Vlanif20
[Link]/24 Direct 0 0 D [Link] Vlanif30
[Link]/32 Direct 0 0 D [Link] Vlanif30

Step 5 Configure a routing policy for advertising routes.


# Configure an IP prefix list named a2b on SwitchA.
[~SwitchA] ip ip-prefix a2b index 10 permit [Link] 24
[*SwitchA] ip ip-prefix a2b index 20 permit [Link] 24
[*SwitchA] ip ip-prefix a2b index 30 permit [Link] 24
[*SwitchA] commit

# Configure a routing policy on SwitchA for advertising routes, and use the IP prefix list a2b
to filter routes.
[~SwitchA] ospf
[~SwitchA-ospf-1] filter-policy ip-prefix a2b export static
[*SwitchA-ospf-1] commit

# Check the IP routing table on SwitchB. You will see that SwitchB receives only three routes
defined in the IP prefix list a2b.
[~SwitchB] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 11 Routes : 11

Destination/Mask Proto Pre Cost Flags NextHop Interface

[Link]/8 Direct 0 0 D [Link] InLoopBack0


[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/24 O_ASE 150 1 D [Link] Vlanif10
[Link]/24 O_ASE 150 1 D [Link] Vlanif10

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 812


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

[Link]/24 O_ASE 150 1 D [Link] Vlanif10


[Link]/24 Direct 0 0 D [Link] Vlanif10
[Link]/32 Direct 0 0 D [Link] Vlanif10
[Link]/24 Direct 0 0 D [Link] Vlanif20
[Link]/32 Direct 0 0 D [Link] Vlanif20
[Link]/24 Direct 0 0 D [Link] Vlanif30
[Link]/32 Direct 0 0 D [Link] Vlanif30

Step 6 Configure a routing policy for receiving routes.


# Configure an IP prefix list named in on SwitchC.
[~SwitchC] ip ip-prefix in index 10 permit [Link] 24
[*Switchc] commit

# Configure a routing policy on SwitchC for receiving routes, and use the IP prefix list in to
filter routes.
[~SwitchC] ospf
[~SwitchC-ospf-1] filter-policy ip-prefix in import
[*SwitchC] commit

# Check the IP routing table on SwitchC. You will see that SwitchC receives only one route
defined in the IP prefix list in.
[~SwitchC] display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R -
relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 5 Routes : 5

Destination/Mask Proto Pre Cost Flags NextHop Interface

[Link]/8 Direct 0 0 D [Link] InLoopBack0


[Link]/32 Direct 0 0 D [Link] InLoopBack0
[Link]/24 O_ASE 150 1 D [Link] Vlanif20
[Link]/24 Direct 0 0 D [Link] Vlanif20
[Link]/32 Direct 0 0 D [Link] Vlanif20

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10
#
interface Vlanif10
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
ospf 1
filter-policy ip-prefix a2b export static
import-route static
area [Link]
network [Link] [Link]
#
ip ip-prefix a2b index 10 permit [Link] 24
ip ip-prefix a2b index 20 permit [Link] 24
ip ip-prefix a2b index 30 permit [Link] 24
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 813


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

ip route-static [Link] [Link] NULL0


ip route-static [Link] [Link] NULL0
ip route-static [Link] [Link] NULL0
ip route-static [Link] [Link] NULL0
ip route-static [Link] [Link] NULL0
#
return
l Configuration file of SwitchB
#
sysname SwitchB
#
vlan batch 10 20 30
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif20
ip address [Link] [Link]
#
interface Vlanif30
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 30
#
ospf 1
area [Link]
network [Link] [Link]
network [Link] [Link]
network [Link] [Link]
#
return
l Configuration file of SwitchC
#
sysname SwitchC
#
vlan batch 20
#
interface Vlanif20
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
ospf 1
filter-policy ip-prefix in import
area [Link]
network [Link] [Link]
#
ip ip-prefix in index 10 permit [Link] 24
#
return
l Configuration file of SwitchD
#
sysname SwitchD
#
vlan batch 30
#

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 814


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

interface Vlanif30
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
ospf 1
area [Link]
network [Link] [Link]
#
return

10.9.2 Example for Applying a Routing Policy for Importing


Routes

Networking Requirements
In Figure 10-5, SwitchB exchanges routing information with SwitchA through OSPF, and
with SwitchC through IS-IS. A user wants SwitchB to import IS-IS routes into the OSPF
network. The user also wants the route to [Link]/24 that is imported into the OSPF
network to have a low preference and the route to [Link]/24 to have a tag, making it easy
to reference by a routing policy.

Figure 10-5 Networking diagram for applying a routing policy for importing routes

OSPF IS-IS 10GE1/0/2


VLANIF30
10GE1/0/1 SwitchB 10GE1/0/1
[Link]/24
VLANIF10 VLANIF20 10GE1/0/3
[Link]/24 [Link]/24 VLANIF40
10GE1/0/1 10GE1/0/2 [Link]/24
SwitchA VLANIF10 VLANIF20 SwitchC 10GE1/0/4
[Link]/24 [Link]/24 VLANIF50
[Link]/24

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a routing policy on SwitchB, set the cost of the route to [Link]/24 to 100,
and apply the routing policy when OSPF imports IS-IS routes. The routing policy allows
the route to [Link]/24 to have a low preference.
2. Configure the routing policy on SwitchB, set the tag of the route to [Link]/24 to 20,
and apply the routing policy when OSPF imports IS-IS routes. This allows the tag of the
route to [Link]/24 to take effect, making it easy to reference by a routing policy.

Procedure
Step 1 Add interfaces to VLANs.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 815


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

[*HUAWEI] commit
[~SwitchA] vlan 10
[*SwitchA-vlan10] quit
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchA-10GE1/0/1] quit
[*SwitchA] commit

The configurations of SwitchB and SwitchC are similar to the configuration of SwitchA, and
are not described here.
Step 2 Assign IP addresses to VLANIF interfaces.
[~SwitchA] interface vlanif 10
[*SwitchA-Vlanif10] ip address [Link] 24
[*SwitchA-Vlanif10] quit
[*SwitchA] commit

The configurations of SwitchB and SwitchC are similar to the configuration of SwitchA, and
are not described here.
Step 3 Configure IS-IS.
# Configure SwitchC.
[~SwitchC] isis
[*SwitchC-isis-1] is-level level-2
[*SwitchC-isis-1] network-entity 10.0000.0000.0001.00
[*SwitchC-isis-1] quit
[*SwitchC] interface vlanif 20
[*SwitchC-Vlanif20] isis enable
[*SwitchC-Vlanif20] quit
[*SwitchC] interface vlanif 30
[*SwitchC-Vlanif30] isis enable
[*SwitchC-Vlanif30] quit
[*SwitchC] interface vlanif 40
[*SwitchC-Vlanif40] isis enable
[*SwitchC-Vlanif40] quit
[*SwitchC] interface vlanif 50
[*SwitchC-Vlanif50] isis enable
[*SwitchC-Vlanif50] quit
[*SwitchC] commit

# Configure Switch B.
[~SwitchB] isis
[*SwitchB-isis-1] is-level level-2
[*SwitchB-isis-1] network-entity 10.0000.0000.0002.00
[*SwitchB-isis-1] quit
[*SwitchB] interface vlanif 20
[*SwitchB-Vlanif20] isis enable
[*SwitchB-Vlanif20] quit
[*SwitchB] commit

Step 4 Configure OSPF and import routes.


# Configure SwitchA and enable OSPF.
[~SwitchA] ospf
[*SwitchA-ospf-1] area 0
[*SwitchA-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchA-ospf-1-area-[Link]] quit
[*SwitchA-ospf-1] quit
[*SwitchA] commit

# Configure SwitchB, enable OSPF, and import IS-IS routes.


[~SwitchB] ospf
[*SwitchB-ospf-1] area 0

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 816


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

[*SwitchB-ospf-1-area-[Link]] network [Link] [Link]


[*SwitchB-ospf-1-area-[Link]] quit
[*SwitchB-ospf-1] import-route isis 1
[*SwitchB-ospf-1] quit
[*SwitchB] commit

# Check the OSPF routing table on SwitchA. You will see the imported routes.
[~SwitchA] display ospf routing

OSPF Process 1 with Router ID [Link]


Routing Tables

Routing for Network


Destination Cost Type NextHop AdvRouter Area
[Link]/24 1 Stub [Link] [Link] [Link]

Routing for ASEs


Destination Cost Type Tag NextHop AdvRouter
[Link]/24 1 Type2 1 [Link] [Link]
[Link]/24 1 Type2 1 [Link] [Link]
[Link]/24 1 Type2 1 [Link] [Link]
[Link]/24 1 Type2 1 [Link] [Link]

Total Nets: 5
Intra Area: 1 Inter Area: 0 ASE: 4 NSSA: 0

Step 5 Configure a filtering list.


# Set ACL 2002 to match [Link]/24.
[~SwitchB] acl number 2002
[*SwitchB-acl-basic-2002] rule permit source [Link] [Link]
[*SwitchB-acl-basic-2002] quit
[*SwitchB] commit

# Configure the IP prefix list named prefix-a to match [Link]/24.


[~SwitchB] ip ip-prefix prefix-a index 10 permit [Link] 24
[*SwitchB] commit

Step 6 Configure a routing policy.


[~SwitchB] route-policy isis2ospf permit node 10
[*SwitchB-route-policy] if-match ip-prefix prefix-a
[*SwitchB-route-policy] apply cost 100
[*SwitchB-route-policy] quit
[*SwitchB] route-policy isis2ospf permit node 20
[*SwitchB-route-policy] if-match acl 2002
[*SwitchB-route-policy] apply tag 20
[*SwitchB-route-policy] quit
[*SwitchB] route-policy isis2ospf permit node 30
[*SwitchB-route-policy] quit
[*SwitchB] commit

Step 7 Apply the routing policy when routes are imported.


# Configure SwitchB and apply the routing policy when routes are imported.
[~SwitchB] ospf
[*SwitchB-ospf-1] import-route isis 1 route-policy isis2ospf
[*SwitchB-ospf-1] quit
[*SwitchB] commit

# Check the OSPF routing table on SwitchA. You will see that the cost of the route to
[Link]/24 is 100, the tag of the route to [Link]/24 is 20, and other route attributes
remain unchanged.
[~SwitchA] display ospf routing

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 817


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

OSPF Process 1 with Router ID [Link]


Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
[Link]/24 1 Stub [Link] [Link] [Link]

Routing for ASEs


Destination Cost Type Tag NextHop AdvRouter
[Link]/24 100 Type2 1 [Link] [Link]
[Link]/24 1 Type2 20 [Link] [Link]
[Link]/24 1 Type2 1 [Link] [Link]
[Link]/24 1 Type2 1 [Link] [Link]

Total Nets: 5
Intra Area: 1 Inter Area: 0 ASE: 4 NSSA: 0

----End

Configuration Files
l Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 10
#
interface Vlanif10
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
ospf 1
area [Link]
network [Link] [Link]
#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 10 20
#
acl number 2002
rule 5 permit source [Link] [Link]
#
isis 1
is-level level-2
network-entity 10.0000.0000.0002.00
#
interface Vlanif10
ip address [Link] [Link]
#
interface Vlanif20
ip address [Link] [Link]
isis enable 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
ospf 1
import-route isis 1 route-policy isis2ospf

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 818


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 10 Routing Policy Configuration

area [Link]
network [Link] [Link]
#
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 [Link] 24
#
return

l Configuration file of SwitchC


#
sysname SwitchC
#
vlan batch 20 30 40 50
#
isis 1
is-level level-2
network-entity 10.0000.0000.0001.00
#
interface Vlanif20
ip address [Link] [Link]
isis enable 1
#
interface Vlanif30
ip address [Link] [Link]
isis enable 1
#
interface Vlanif40
ip address [Link] [Link]
isis enable 1
#
interface Vlanif50
ip address [Link] [Link]
isis enable 1
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
interface 10GE1/0/3
port link-type trunk
port trunk allow-pass vlan 40
#
interface 10GE1/0/4
port link-type trunk
port trunk allow-pass vlan 50
#
return

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 819


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

11 PBR Configuration

About This Chapter

Configuring policy-based routing (PBR) improves the network security and implements load
balancing.

NOTE

The CE6810LI does not support IPv4 or IPv6 Layer 3 forwarding. After the IPv4 or IPv6 function is
enabled on an interface of the CE6810LI, the configured IPv4 or IPv6 address can only be used to
manage the switch.
The CE6880EI does not support ACL-based simplified PBR.
The CE6880EI does not support IPv6-based PBR, and the CE5810EI, and CE6880EI do not support low
priority of the PBR.

11.1 Overview of PBR


11.2 Configuring NQA for PBR
11.3 Configuring PBR
11.4 Configuring ACL-based Simplified PBR
11.5 Configuring ACL6-based Simplified PBR
11.6 Configuration Examples for PBR

11.1 Overview of PBR


Definition
PBR is a mechanism that makes routing selection based on user-defined policies.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 820


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

NOTE

l The main differences between PBR and routing policy are as follows:
l PBR implements routing based on data packets. It routes data packets based on user-defined
policies instead of following the routes in the existing routing table.
l Routing policies implement routing based on routing information. Routing policies are used to
filter routes and set route attributes. You can change route attributes (including reachability) to
change a route over which network traffic is transmitted.

Purpose
Traditionally, to determine the routes used to forward packets, a device searches its IP routing
table based on the destination address carried in the packets. Currently, more users require
that devices route packets based on self-defined policies. PBR allows network administrators
to make user-defined policies to change packet routes based on source addresses, packet size,
and link quality in addition to destination addresses.

Benefits
PBR has the following advantages:

l Allows network administrators to define policies for routing packets, improving


flexibility and controllability of route selection.
l Enables different data flows to be forwarded on different links, increasing link usage.
l Allows cost-effective links to be used for transmitting service data without affecting
service quality, reducing the cost of enterprise data services.

Implementation
PBR applies only to forwarded packets, but not to locally generated packets such as local ping
packets. PBR is valid only for IP packets.

The device does not support PBR-based tracert. When the device receives a tracert packet, it
discards the packet if it has only PBR but not a routing entry for the destination IP address of
the packet.

PBR is implemented based on the redirection action configured in a traffic behavior and takes
effect only on incoming packets of interfaces. By default, a device forwards packets to the
next hop found in its routing table. If PBR is configured, the device forwards packets to the
next hop specified by PBR. You can also specify a low priority for a policy-based route to
enable the device to forward packets matching PBR to the next hop/outbound interface of the
specific route in its routing table. When the specific route becomes invalid, the device
forwards packets to the next hop/outbound interface specified by PBR. When both the next
hop of the specific route and next hop specified by PBR become invalid, and the routing table
has default routes, the device continues forwarding packets according to the matching default
route.

When the device forwards packets to the next hop specified by PBR, the device triggers ARP
learning if it has no ARP entry corresponding to the IP address of the specified next hop. If
the device cannot learn this ARP entry, it forwards packets to the next hop found in the
routing table. If the device has this ARP entry, it forwards packets to the next hop specified by
PBR.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 821


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

11.2 Configuring NQA for PBR


As network service requirements vary widely and service data is stored in a centralized
manner, network services increasingly depend on high link quality. PBR allows network
administrators to make user-defined policies to change packet forwarding paths based on
source and destination addresses of packets. PBR does not have a dedicated detection
mechanism. If a non-directly connected link becomes faulty, the redirection next-hop address
in PBR will not change automatically and needs to be changed by network administrators.
This process delays link switchovers and may cause lengthy service interruptions.

To address this issue, an efficient method is required to detect the redirection link quality in
PBR. Smart policy-based routing (SPBR) is such a method that is implemented using NQA
for PBR. NQA for PBR uses an NQA test instance to detect the link status and determine
whether PBR takes effect according to the test results. SPBR actively detects the link quality
and matches service requirements to select an optimal link to forward service data, preventing
network blackholes and flappings.

NQA for PBR binds an NQA test instance to PBR and uses the NQA test instance to detect
the redirection next-hop link status in PBR. According to the NQA test results, the system
determines whether the PBR configuration takes effect, preventing communication
interruptions and ensuring service quality. When configuring NQA for PBR, pay attention to
the following points:
l If no NQA test instance exist or the NQA test instance type is not ICMP, link detection
and the PBR configuration will fail.
l If an NQA test instance is bound to PBR successfully, and link detection is normal, PBR
takes effect.
l If an NQA test instance is bound to PBR successfully, but link detection fails
continuously, PBR automatically becomes ineffective.
l If an NQA test instance is bound to PBR successfully, and the link fault is rectified, PBR
automatically takes effect.

For details about NQA, see "NQA Configuration - Principles" in the Configuration Guide -
Network Management and Monitoring Configuration.

NOTE

Only an ICMP NQA test instance can be bound to PBR.


The NQA test instance bound to PBR cannot be deleted and its type cannot be changed.

Application Scenario
As shown in Figure 11-1, each access switch is connected to N clients. Network
administrators configure PBR on SwitchA to redirect packets from the previous forwarding
path SwitchA→SwitchB→RouterB (RouterA) to a new path SwitchA→SwitchC→RouterC
(RouterA) and bind an NQA test instance to PBR to detect the link status of the new path. If
the NQA test instance finds that the link of the new path is working properly, packets can be
forwarded normally. If the NQA test instance finds that the link of the new path is Down and
the number of detection times exceeds the specified value, the PBR configuration
automatically becomes ineffective, and packets are forwarded along the previous forwarding
path.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 822


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

Figure 11-1 NQA for PBR application

Network

RouterA

RouterB RouterC

SwitchB
SwitchC

SwitchA

Tenant 1's Tenant 2's …… Tenant N's


Server Server Server

11.3 Configuring PBR

Context
PBR can redirect the Layer 3 packets received on an interface to a specified next hop address.

By configuring the redirection action, the device redirects packets matching traffic
classification rules to the next hop address.

A traffic policy containing the redirection action can only be used in the inbound direction.

Pre-configuration Tasks
Before configuring PBR, complete the following tasks:
l Configure IP addresses and routing protocols for interfaces to ensure routing
connectivity.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 823


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

l Configure an ACL if the ACL needs to be used to classify traffic.

Procedure
1. Configure a traffic classifier.
a. Run system-view
The system view is displayed.
b. Run traffic classifier classifier-name [ type { and | or } ]
A traffic classifier is created and the traffic classifier view is displayed, or the view
of an existing traffic classifier is displayed.
and is the logical operator between the rules in a traffic classifier, which means
that:
n If a traffic classifier contains ACL rules, packets match the traffic classifier
only if they match one ACL rule and all the non-ACL rules.
n If a traffic classifier does not contain any ACL rules, packets match the traffic
classifier only if they match all the rules in the classifier.
The logical operator or means that packets match a traffic classifier if they match
one or more rules in the classifier.
By default, the relationship between rules in a traffic classifier is or.
c. Run if-match
Matching rules are defined for the traffic classifier.
For details about matching rules in a traffic classifier, see "Configuring a Traffic
Classifier" in "MQC Configuration" of the CloudEngine 8800, 7800, 6800, and
5800 Series Switches Configuration Guide - QoS Configuration Guide.
d. Run commit
The configuration is committed.
e. Run quit
Exit from the traffic classifier view.
2. Configure a traffic behavior.
NOTE

l After the TRILL gateway function is configured, when the policy is applied in VLANIF
interface of a CE VLAN, the device does not support traffic action of PBR to specify the low-
precedence.
l The CE5810EI, and CE6880EI do not support traffic action of PBR to specify the low-
precedence.
l Only the CE6855HI, CE6856HI and CE7855EI can import VXLAN service traffic through
PBR. You are advised to run the redirect remote command to configure PBR.

a. Run traffic behavior behavior-name


A traffic behavior is created and the traffic behavior view is displayed, or the view
of an existing traffic behavior is displayed.
b. Run the following commands as required.
n Run redirect [ vpn-instance vpn-instance-name ] nexthop ip-address
&<1-16> [ fail-action discard ] [ low-precedence [ source vpn-instance vpn-
instance-name ] ]

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 824


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

Or run redirect ipv6 [ vpn-instance vpn-instance-name ] nexthop ipv6-


address &<1-16> [ fail-action discard ] [ low-precedence [ source vpn-
instance vpn-instance-name ] ]
The device is configured to redirect packets matching traffic classification
rules to a next hop IP address in a traffic behavior. This action only takes effect
in Layer 3 forwarding.
○ If multiple next hop IP addresses are configured, the device redirects
packets in active/standby mode. The device determines the primary path
and backup paths according to the sequence in which next hop IP
addresses have been configured. The next hop IP address that is
configured first has the highest priority and this next hop is used as the
primary path. Other next hops are used as backup paths. When the
primary path is Down, the backup path with the highest priority is used as
the primary path. When the high-priority link is recovered, traffic is
switched to the high-priority link; when all redirected links are
unavailable, packets are forwarded according to the destination address.
○ By default, if all the configured next hops are unreachable, packets are
forwarded according to the destination address. If the fail-action discard
parameter is configured, packets are discarded if all the configured next
hops are unreachable.
○ After you specify the low-precedence parameter, the device forwards
packets matching PBR to the next hop/outbound interface of the specific
route in its routing table. When the specific route becomes invalid, the
device forwards packets to the next hop/outbound interface specified by
PBR. When both the next hop of the specific route and next hop specified
by PBR become invalid, and the routing table has default routes, the
device continues forwarding packets according to the matching default
route.
n Run redirect load-balance [ vpn-instance vpn-instance-name ] nexthop { ip-
address [ track nqa admin-name test-name [ reaction probe-failtimes fail-
times ] ] } &<1-16> [ fail-action discard ] [ low-precedence [ source vpn-
instance vpn-instance-name ] ]
Or run redirect ipv6 load-balance [ vpn-instance vpn-instance-name ]
nexthop { ipv6-address [ track nqa admin-name test-name [ reaction probe-
failtimes fail-times ] ] } &<1-16> [ fail-action discard ] [ low-precedence
[ source vpn-instance vpn-instance-name ] ]
The device is configured to redirect packets matching traffic classification
rules to multiple next hop IP addresses. This action only takes effect in Layer 3
forwarding.
○ If the outbound interface corresponding to a next hop IP address becomes
Down or a route changes, the device switches traffic to the outbound
interface corresponding to an available next hop.
○ If the device has no ARP entry matching the specified next hop IP
address, the redirect load-balance command can be used but redirection
does not take effect. The device still forwards packets to the original
destination until the device has the corresponding ARP entry.
○ If an NQA test instance is configured to detect the link for the redirection
next hop IP address and the number of NQA link detection failures is
larger than or equal to the configured maximum value, the current next
hop will be cancelled. If multiple next hops work in load balancing mode,

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 825


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

this next hop will not participate in load balancing and the remaining
reachable next hops perform load balancing. If multiple next hops work
in active/standby mode, traffic will be automatically switched to the next
reachable next hop.
○ By default, if all the configured next hops are unreachable, packets are
forwarded according to the destination address. If the fail-action discard
parameter is configured, packets are discarded if all the configured next
hops are unreachable.
○ After you specify the low-precedence parameter, the device forwards
packets matching PBR to the next hop/outbound interface of the specific
route in its routing table. When the specific route becomes invalid, the
device forwards packets to the next hop/outbound interface specified by
PBR. When both the next hop of the specific route and next hop specified
by PBR become invalid, and the routing table has default routes, the
device continues forwarding packets according to the matching default
route.
n Run redirect remote [ vpn-instance vpn-instance-name ] ip-address [ track
nqa admin-name test-name [ reaction probe-failtimes fail-times ] ] [ exact ]
[ low-precedence [ source vpn-instance vpn-instance-name ] ]
The action that redirects packets to the remote next hop is created in the traffic
behavior.
○ To redirect packets to the IP address of the indirectly-connected next hop,
run the redirect remote command. When ip-address specifies the IP
address of the indirectly-connected next hop for redirection, the device
examines the IP routing table. If the IP routing table contains a route to
the IP address, the device forwards the packets according to the route.
○ If an NQA test instance is specified to detect the link for the redirection
next hop IP address and the number of NQA link detection failures is
larger than or equal to the configured maximum value, the current next
hop will be cancelled.
○ When exact is specified, the device redirects packets only when the IP
routing table contains the 32-bit host route matching ip-address. For
example, when redirect remote [Link] exact is configured, the IP
routing table of the device must contain a route to [Link]/32; otherwise,
the device cannot redirect packets.
○ After you specify the low-precedence parameter, the device forwards
packets matching PBR to the next hop/outbound interface of the specific
route in its routing table. When the specific route becomes invalid, the
device forwards packets to the next hop/outbound interface specified by
PBR. When both the next hop of the specific route and next hop specified
by PBR become invalid, and the routing table has default routes, the
device continues forwarding packets according to the matching default
route.
NOTE

After the TRILL gateway function is configured, when the policy is applied in VLANIF
interface of a CE VLAN, the device does not support traffic action of PBR to specify the
low-precedence.
c. Run commit
The configuration is committed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 826


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

d. Run quit
Exit from the traffic behavior view.
e. Run quit
Exit from the system view.
3. Configure a traffic policy.
a. Run system-view
The system view is displayed.
b. Run traffic policy policy-name
A traffic policy is created and the traffic policy view is displayed, or the view of an
existing traffic policy is displayed.
c. Run classifier classifier-name behavior behavior-name [ precedence precedence-
value ]
A traffic behavior is bound to a traffic classifier in the traffic policy.
d. Run commit
The configuration is committed.
e. Run quit
Exit from the traffic policy view.
f. Run quit
Exit from the system view.
4. Apply the traffic policy.
NOTE

l For details about the configuration guidelines of applying traffic policies in different views on
the CE switches excluding CE6870EI, see Licensing Requirements and Limitations for MQC
(CE Switches Excluding CE6870EI and CE6875EI).
l For details about the configuration guidelines of applying traffic policies in different views on
the CE6870EI, see Licensing Requirements and Limitations for MQC (CE6870EI and
CE6875EI).
l If a traffic policy needs to be applied to multiple VLANs and interfaces or multiple traffic
classifiers for matching packets from different source IP addresses need to be bound to the
same traffic policy, you are advised to add these VLANs, source IP addresses, and interfaces
to the same QoS group and apply the traffic policy to the QoS group.
– Applying a traffic policy to an interface
i. Run system-view
The system view is displayed.
ii. Run interface interface-type interface-number
The interface view is displayed.
NOTE
PBR for VXLAN packets on a VXLAN Layer 3 gateway takes effect only on BDIF
interfaces.
iii. Run traffic-policy policy-name inbound
A traffic policy is applied to the interface.
iv. Run commit
The configuration is committed.
– Applying a traffic policy to a VLAN

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 827


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

i. Run system-view
The system view is displayed.
ii. Run vlan vlan-id
The VLAN view is displayed.
iii. Run traffic-policy policy-name inbound
A traffic policy is applied to the VLAN.
After a traffic policy is applied, the system performs traffic policing for the
packets that belong to a VLAN and match traffic classification rules in the
inbound direction.
iv. Run commit
The configuration is committed.
– Applying a traffic policy to the system
i. Run system-view
The system view is displayed.
ii. Run traffic-policy policy-name global [ slot slot-id ] inbound
A traffic policy is applied to the system.
iii. Run commit
The configuration is committed.
– Applying a traffic policy in a VPN instance
i. Run system-view
The system view is displayed.
ii. (Optional) Run qos port-group group-id
A QoS interface group is created and its view is displayed.
iii. (Optional) Run group-member { interface-type interface-number1 [ to
interface-type interface-number2 ] }
Interfaces are added to the QoS interface group.
iv. (Optional) Run quit
Exit from the QoS interface group view.
v. Run ip vpn-instance vpn-instance-name
A VPN instance is created and its view is displayed.
vi. Run traffic-policy policy-name inbound [ exclude qos port-group group-id ]
The traffic policy is applied to the VPN instance.
vii. Run commit
The configuration is committed.
– Applying a traffic policy to a QoS group
i. Run system-view
The system view is displayed.
ii. Run qos group group-name
The QoS group view is displayed.
iii. Run the following commands as required.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 828


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

○ Run the group-member interface { interface-type interface-number1


[ to interface-type interface-number2 ] } &<1-8> command to add
interfaces to the QoS group.
○ (Only for CE6880EI) Run the group-member vlan { vlan-id1 [ to vlan-
id2 ] } &<1-8> command to add VLANs to the QoS group.
○ (Models excluding the CE6870EI) Run the group-member ip source ip-
address { mask | mask-length } command to add source IP addresses to
the QoS group.
iv. Run traffic-policy policy-name inbound
A traffic policy is applied to a QoS group.
v. Run commit
The configuration is committed.
– Applying a traffic policy to a BD
i. Run system-view
The system view is displayed.
ii. Run bridge-domain bd-id
The BD view is displayed.
iii. Run traffic-policy policy-name inbound
A traffic policy is applied to the BD.
iv. Run commit
The configuration is committed.

Verifying the Configuration


l Run the display traffic classifier [ classifier-name ] command to check the traffic
classifier configuration.
l Run the display traffic behavior [ behavior-name ] command to check the traffic
behavior configuration on the device.
l Run the display traffic policy [ policy-name [ classifier classifier-name ] ] command to
check the traffic policy configuration.
l Run the display traffic-policy applied-record [ policy-name ] [ global [ slot slot-id ] |
interface interface-type interface-number | vlan vlan-id | vpn-instance vpn-instance-
name | qos group group-id | bridge-domain bd-id ] [ inbound | outbound ] command
to check the application record of a specified traffic policy.
l Run the display system tcam fail-record [ slot slot-id ] command to display TCAM
delivery failures.
l Run the display system tcam service brief [ slot slot-id ] command to display the group
index and rule count occupied by different services.
l Run the display system tcam service { cpcar slot slot-id | service-name slot slot-id
[ chip chip-id ] } command to display IDs of entries that deliver services on the specified
chip or in the specified slot.
l (For CE6870EI) Run the display system tcam match-rules slot slot-id [ [ ingress |
egress | group group-id ] | [ chip chip-id ] ] * command to display matched entries.
l (For CE6880EI switches) Run the display system tcam match-rules slot slot-id chip
chip-id index index-id command to display matched entries.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 829


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

l (Models excluding the CE6870EI and CE6880EI) Run the display system tcam match-
rules slot slot-id [ [ ingress | egress | group group-id ] | [ delay-time time-value ] ] *
command to display matched entries.

11.4 Configuring ACL-based Simplified PBR

Pre-configuration Tasks
You can configure ACL-based simplified PBR to redirect Layer 3 packets that match ACL
rules to a specified next-hop IP address.
Before configuring ACL-based simplified PBR, complete the following tasks:
l Configure link layer attributes of interfaces to ensure proper operation of interfaces.
l Configure ACL rules.

Context
To control traffic that enters a network, configure an ACL rule to match packets based on
packet information including the source IP address, fragment flag, destination IP address,
source port number, and source MAC address, and then configure an ACL-based simplified
traffic policy to filter the packets that match the ACL rule. Compared with PBR, ACL-based
simplified PBR does not require a traffic classifier, traffic behavior, or traffic policy, resulting
in easy configuration. However, ACL-based simplified PBR matches packets only based on
ACL rules, so it does not support so many types of matching rules as a traffic policy.
If ACL-based simplified traffic policies are configured in the system view, VLAN view, and
interface view, the precedence of these policies is: interface view > VLAN view > system
view.

Procedure
l Configure redirection globally.
a. Run system-view
The system view is displayed.
b. Run the following commands as required.
n Run traffic-redirect acl { { { basic-acl | acl-name } | { advanced-acl | acl-
name } } | { l2-acl | acl-name } } * [ vpn-instance vpn-instance-name ]
nexthop ip-address [ track nqa admin-name test-name [ reaction probe-
failtimes fail-times ] ] [ fail-action discard ] global [ slotslot-id ] inbound
Packets are redirected to a specified next-hop IP address.
This action takes effect only in Layer 3 forwarding. By default, if the
configured next hop is unreachable, packets are forwarded based on their
destination address. If the fail-action discard parameter is configured, packets
are discarded if the configured next hop is unreachable.
n Run traffic-redirect acl { { { basic-acl | acl-name } | { advanced-acl | acl-
name } } | { l2-acl | acl-name } } * remote [ vpn-instance vpn-instance-
name ] ip-address [ track nqa admin-name test-name [ reaction probe-
failtimes fail-times ] ] [ exact ] global [ slot slot-id ] inbound
Packets are redirected to a remote next hop.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 830


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

This action takes effect only in Layer 3 forwarding.


c. Run commit
The configuration is committed.
l Configure redirection in a VLAN.
a. Run system-view
The system view is displayed.
b. Run vlan vlan-id
The VLAN view is displayed.
c. Run the following commands as required.
n Run traffic-redirect acl { { { basic-acl | acl-name } | { advanced-acl | acl-
name } } | { l2-acl | acl-name } } * [ vpn-instance vpn-instance-name ]
nexthop ip-address [ track nqa admin-name test-name [ reaction probe-
failtimes fail-times ] ] [ fail-action discard ] inbound
Packets are redirected to a specified next-hop IP address.
This action takes effect only in Layer 3 forwarding. By default, if the
configured next hop is unreachable, packets are forwarded based on their
destination address. If the fail-action discard parameter is configured, packets
are discarded if the configured next hop is unreachable.
n Run traffic-redirect acl { { { basic-acl | acl-name } | { advanced-acl | acl-
name } } | { l2-acl | acl-name } } * remote [ vpn-instance vpn-instance-
name ] ip-address [ track nqa admin-name test-name [ reaction probe-
failtimes fail-times ] ] [ exact ] inbound
Packets are redirected to a specified remote next hop.
This action takes effect only in Layer 3 forwarding.
d. Run commit
The configuration is committed.
l Configure redirection on an interface.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. Run the following commands as required.
n Run traffic-redirect acl { { { basic-acl | acl-name } | { advanced-acl | acl-
name } } | { l2-acl | acl-name } } * [ vpn-instance vpn-instance-name ]
nexthop ip-address [ track nqa admin-name test-name [ reaction probe-
failtimes fail-times ] ] [ fail-action discard ] inbound
Packets are redirected to a specified next-hop IP address.
This action takes effect only in Layer 3 forwarding. By default, if the
configured next hop is unreachable, packets are forwarded based on their
destination address. If the fail-action discard parameter is configured, packets
are discarded if the configured next hop is unreachable.
n Run traffic-redirect acl { { { basic-acl | acl-name } | { advanced-acl | acl-
name } } | { l2-acl | acl-name } } * remote [ vpn-instance vpn-instance-

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 831


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

name ] ip-address [ track nqa admin-name test-name [ reaction probe-


failtimes fail-times ] ] [ exact ] inbound
Packets are redirected to a remote next hop.
This action takes effect only in Layer 3 forwarding.
d. Run commit
The configuration is committed.
l Configure packet filtering in a QoS group.
a. Run system-view
The system view is displayed.
b. Run qos group group-name
The QoS group view is displayed.
c. Run the following commands as required.
n Run the group-member interface { interface-type interface-number1 [ to
interface-type interface-number2 ] } &<1-8> command to add interfaces to the
QoS group.
n (For the CE6870EI) Run the group-member vlan { vlan-id1 [ to vlan-id2 ] }
&<1-8> command to add VLANs to the QoS group.
n (For the non-CE6870EI) Run the group-member ip source ip-address { mask
| mask-length } command to add source IP addresses to the QoS group.
d. Run the following commands as required.
n Run traffic-redirect acl { { { basic-acl | acl-name } | { advanced-acl | acl-
name } } | { l2-acl | acl-name } } * [ vpn-instance vpn-instance-name ]
nexthop ip-address [ track nqa admin-name test-name [ reaction probe-
failtimes fail-times ] ] [ fail-action discard ] inbound
Packets are redirected to a specified next-hop IP address.
This action takes effect only in Layer 3 forwarding. By default, if the
configured next hop is unreachable, packets are forwarded based on their
destination address. If the fail-action discard parameter is configured, packets
are discarded if the configured next hop is unreachable.
n Run traffic-redirect acl { { { basic-acl | acl-name } | { advanced-acl | acl-
name } } | { l2-acl | acl-name } } * remote [ vpn-instance vpn-instance-
name ] ip-address [ track nqa admin-name test-name [ reaction probe-
failtimes fail-times ] ] [ exact ] inbound
Packets are redirected to a remote next hop.
This action takes effect only in Layer 3 forwarding.
e. Run commit
The configuration is committed.
----End

Verifying the Configuration


Run the display traffic-policy applied-record traffic-redirect [ [ global [ slot slot-id ] |
interface interface-type interface-number | vlan vlan-id | qos group group-id ] [ inbound ] ]
command to check the application records of a specified traffic policy.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 832


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

Follow-up Procedure
For the CE6870EI, if a low-priority traffic policy takes effect before you apply a high-priority
traffic policy, ACL rules may be slow to take effect. Consequently, service processing will be
delayed. You can run the traffic-policy fast-mode command in the system view to enable fast
delivery of ACLs. This ensures that ACL rules take effect rapidly and services can be
processed in real time.

11.5 Configuring ACL6-based Simplified PBR

Pre-configuration Tasks
Before configuring ACL6-based simplified PBR, complete the following tasks:
l Configure link layer attributes of interfaces to ensure proper operation of interfaces.
l Configure ACL6 rules.

Context
To control traffic that enters a network, configure an ACL6 rule to match packets based on
packet information including the source IP address, fragment flag, destination IP address,
source port number, and source MAC address, and then configure an ACL6-based simplified
traffic policy to filter the packets that match the ACL6 rule. Compared with PBR, ACL6-
based simplified PBR does not require a traffic classifier, traffic behavior, or traffic policy,
resulting in easy configuration. However, ACL6-based simplified PBR matches packets only
based on ACL6 rules, so it does not support so many types of matching rules as a traffic
policy.

If ACL6-based simplified traffic policies are configured in the system view, VLAN view, and
interface view, the precedence of these policies is: interface view > VLAN view > system
view.

Procedure
l Configure redirection globally.
a. Run system-view

The system view is displayed.


b. Run traffic-redirect ipv6 acl { { basic-acl | acl-name } | { advanced-acl | acl-
name } } [ vpn-instance vpn-instance-name ] nexthop ipv6-address [ track nqa
admin-name test-name [ reaction probe-failtimes fail-times ] ] [ fail-action
discard ] global [ slot slot-id ] inbound

Packets are redirected to a specified next-hop IP address.

This action takes effect only in Layer 3 forwarding. By default, if the configured
next hop is unreachable, packets are forwarded based on their destination address. If
the fail-action discard parameter is configured, packets are discarded if the
configured next hop is unreachable.
c. Run commit

The configuration is committed.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 833


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

l Configure redirection in a VLAN.


a. Run system-view
The system view is displayed.
b. Run vlan vlan-id
The VLAN view is displayed.
c. Run traffic-redirect ipv6 acl { { basic-acl | acl-name } | { advanced-acl | acl-
name } } [ vpn-instance vpn-instance-name ] nexthop ipv6-address [ track nqa
admin-name test-name [ reaction probe-failtimes fail-times ] ] [ fail-action
discard ] inbound
Packets are redirected to a specified next-hop IP address.
This action takes effect only in Layer 3 forwarding. By default, if the configured
next hop is unreachable, packets are forwarded based on their destination address. If
the fail-action discard parameter is configured, packets are discarded if the
configured next hop is unreachable.
d. Run commit
The configuration is committed.
l Configure redirection on an interface.
a. Run system-view
The system view is displayed.
b. Run interface interface-type interface-number
The interface view is displayed.
c. Run traffic-redirect ipv6 acl { { basic-acl | acl-name } | { advanced-acl | acl-
name } } [ vpn-instance vpn-instance-name ] nexthop ipv6-address [ track nqa
admin-name test-name [ reaction probe-failtimes fail-times ] ] [ fail-action
discard ] inbound
Packets are redirected to a specified next-hop IP address.
This action takes effect only in Layer 3 forwarding. By default, if the configured
next hop is unreachable, packets are forwarded based on their destination address. If
the fail-action discard parameter is configured, packets are discarded if the
configured next hop is unreachable.
d. Run commit
The configuration is committed.
----End

Verifying the Configuration


Run the display traffic-policy applied-record traffic-redirect [ [ global [ slot slot-id ] |
interface interface-type interface-number | vlan vlan-id | qos group group-id ] [ inbound ] ]
command to check the application records of a specified traffic policy.

Follow-up Procedure
For the CE6870EI, if a low-priority traffic policy takes effect before you apply a high-priority
traffic policy, ACL rules may be slow to take effect. Consequently, service processing will be

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 834


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

delayed. You can run the traffic-policy fast-mode command in the system view to enable fast
delivery of ACLs. This ensures that ACL rules take effect rapidly and services can be
processed in real time.

11.6 Configuration Examples for PBR


This section only provides configuration examples for individual features. For details about
multi-feature configuration examples, feature-specific configuration examples, interoperation
examples, protocol or hardware replacement examples, and industry application examples, see
the Typical Configuration Examples.

11.6.1 Example for Configuring PBR


Networking Requirements
On a data center network shown in Figure 11-2, tenants are dual-homed to external network
devices through Switch. Packets that tenants send are distinguished based on VLAN IDs.
Packets from tenant 1 are marked with VLAN 100 and those from tenant 2 are marked with
VLAN 200. Packets from the two tenants reach external network devices through the gateway
[Link]/24.
To enable packets from tenant 1 to reach external network devices through the gateway
[Link]/24, you can configure PBR to ensure tenant experience. Table 11-1 lists the PBR
configuration parameters.

Table 11-1 Parameters for configuring PBR


Device Interface VLANIF IP Address

Switch 10GE1/0/1 100 [Link]/24

Switch 10GE1/0/2 200 [Link]/24

Switch 10GE1/0/3 300 [Link]/24

Switch 10GE1/0/4 400 [Link]/24

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 835


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

Figure 11-2 Networking for configuring PBR

Network

RouterA RouterB
[Link]/24 [Link]/24

10GE1/0/3 10GE1/0/4
Switch
10GE1/0/1 10GE1/0/2

10GE1/0/2 10GE1/0/2

SwitchA SwitchB
10GE1/0/1 10GE1/0/1

Direction of packets in VLAN 100


before the re-direction
Direction of packets in VLAN 100
after the re-direction
Tenant 1's Tenant 2's
Direction of packets in VLAN 200
Server Server

Configuration Roadmap
Redirection is used to implement PBR so that Switch can provide differentiated services. The
configuration roadmap is as follows:
1. Create VLANs and configure interfaces so that Switch can connect to the external
network devices.
2. Configure a traffic classifier to classify packets based on VLAN IDs.
3. Configure a traffic behavior to redirect the packets with VLAN ID 100 to [Link]/24.
4. Configure a traffic policy, and bind the traffic classifier and traffic behavior to the traffic
policy. Apply the traffic policy to the inbound direction of 10GE1/0/1 on Switch to
implement PBR for tenant 1.

Procedure
Step 1 Create VLANs and configure interfaces and the default route to allow all packets to access the
external network devices through the gateway [Link]/24.
# Create VLAN 100 on SwitchA.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan 100
[*SwitchA-vlan100] quit
[*SwitchA] commit

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 836


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

# Configure 10GE1/0/2 on SwitchA as a trunk interface. Add 10GE1/0/1 and 10GE1/0/2 to


VLAN 100.
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] port default vlan 100
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 100
[*SwitchA-10GE1/0/2] quit
[*SwitchA] commit

# Create VLAN 200 on SwitchB.


<HUAWEI> system-view
[~HUAWEI] sysname SwitchB
[*HUAWEI] commit
[~SwitchB] vlan 200
[*SwitchB-vlan200] quit
[*SwitchB] commit

# Configure 10GE1/0/2 on SwitchB as a trunk interface. Add 10GE1/0/1 and 10GE1/0/2 to


VLAN 200.
[~SwitchB] interface 10ge 1/0/1
[~SwitchB-10GE1/0/1] port default vlan 200
[*SwitchB-10GE1/0/1] quit
[*SwitchB] interface 10ge 1/0/2
[*SwitchB-10GE1/0/2] port link-type trunk
[*SwitchB-10GE1/0/2] port trunk allow-pass vlan 200
[*SwitchB-10GE1/0/2] quit
[*SwitchB] commit

# Create VLAN 100, VLAN 200, VLAN 300, and VLAN 400 on Switch.
<HUAWEI> system-view
[~HUAWEI] sysname Switch
[*HUAWEI] commit
[~Switch] vlan batch 100 200 300 400
[*Switch] commit

# Configure 10GE1/0/1 and 10GE1/0/2 on Switch as trunk interfaces. Add 10GE1/0/1 to


VLAN 100, 10GE1/0/2 to VLAN 200, 10GE1/0/3 to VLAN 300, and 10GE1/0/4 to VLAN
400.
[~Switch] interface 10ge 1/0/1
[~Switch-10GE1/0/1] port link-type trunk
[*Switch-10GE1/0/1] port trunk allow-pass vlan 100
[*Switch-10GE1/0/1] quit
[*Switch] interface 10ge 1/0/2
[*Switch-10GE1/0/2] port link-type trunk
[*Switch-10GE1/0/2] port trunk allow-pass vlan 200
[*Switch-10GE1/0/2] quit
[*Switch] interface 10ge 1/0/3
[*Switch-10GE1/0/3] port default vlan 300
[*Switch-10GE1/0/3] quit
[*Switch] interface 10ge 1/0/4
[*Switch-10GE1/0/4] port default vlan 400
[*Switch-10GE1/0/4] quit
[*Switch] commit

# Create VLANIF 100, VLANIF 200, VLANIF 300, and VLANIF 400 on Switch and
configure IP addresses for them.
[~Switch] interface vlanif 100
[*Switch-Vlanif100] ip address [Link] 24
[*Switch-Vlanif100] quit
[*Switch] interface vlanif 200

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 837


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

[*Switch-Vlanif200] ip address [Link] 24


[*Switch-Vlanif200] quit
[*Switch] interface vlanif 300
[*Switch-Vlanif300] ip address [Link] 24
[*Switch-Vlanif300] quit
[*Switch] interface vlanif 400
[*Switch-Vlanif400] ip address [Link] 24
[*Switch-Vlanif400] quit
[*Switch] commit

# Configure the default route on Switch to allow all packets to access the external network
devices through the gateway [Link]/24.
[~Switch] ip route-static [Link] [Link] [Link]
[*Switch] commit

Step 2 Configure a traffic classifier.


# On Switch, create traffic classifier c1 to match packets with VLAN ID 100.
[~Switch] traffic classifier c1
[*Switch-classifier-c1] if-match vlan 100
[*Switch-classifier-c1] quit
[*Switch] commit

Step 3 Configure a traffic behavior.


# On Switch, create traffic behavior b1 to specify redirection to the gateway [Link]/24.
[~Switch] traffic behavior b1
[*Switch-behavior-b1] redirect nexthop [Link]
[*Switch-behavior-b1] quit
[*Switch] commit

Step 4 Configure a traffic policy and apply the traffic policy to interfaces.
# Create a traffic policy p1 on the Switch and bind the traffic policy to the traffic classifier
and traffic behavior.
[~Switch] traffic policy p1
[*Switch-trafficpolicy-p1] classifier c1 behavior b1
[*Switch-trafficpolicy-p1] quit
[*Switch] commit

# Apply the traffic policy p1 to the inbound direction of 10GE1/0/1.


[~Switch] interface 10ge 1/0/1
[~Switch-10GE1/0/1] traffic-policy p1 inbound
[*Switch-10GE1/0/1] quit
[*Switch] commit

Step 5 Verify the configuration.


# View the traffic classifier configuration.
<Switch> display traffic classifier
Traffic Classifier Information:
Classifier: c1
Type: OR
Rule(s) :
if-match vlan 100

Total classifier number is 1

# View the traffic policy configuration.


<Switch> display traffic policy p1
Traffic Policy Information:
Policy: p1

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 838


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

Classifier: c1
Type: OR
Behavior: b1
Redirect:
Redirect nexthop
[Link]

----End

Configuration Files
l Configuration file of Switch
#
sysname Switch
#
vlan batch 100 200 300 400
#
traffic classifier c1 type or
if-match vlan 100
#
traffic behavior b1
redirect nexthop [Link]
#
traffic policy p1
classifier c1 behavior b1 precedence 5
#
interface Vlanif100
ip address [Link] [Link]
#
interface Vlanif200
ip address [Link] [Link]
#
interface Vlanif300
ip address [Link] [Link]
#
interface Vlanif400
ip address [Link] [Link]
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 100
traffic-policy p1 inbound
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 200
#
interface 10GE1/0/3
port default vlan 300
#
interface 10GE1/0/4
port default vlan 400
#
ip route-static [Link] [Link] [Link]
#
return

l Configuration file of SwitchA


#
sysname SwitchA
#
vlan batch 100
#
interface 10GE1/0/1
port default vlan 100
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 100

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 839


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

#
return

l Configuration file of SwitchB


#
sysname SwitchB
#
vlan batch 200
#
interface 10GE1/0/1
port default vlan 200
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 200
#
return

11.6.2 Example for Configuring NQA for PBR


Networking Requirements
As shown in Figure 11-3, each access switch is connected to N users. SwitchA functions as
the forwarding device and connects to RouterA through two links, namely, a low-speed link
with the gateway [Link]/24 and a high-speed link with the gateway [Link]/24. Network
administrators want some packets forwarded over the low-speed link to RouterA to be
transmitted over the high-speed link while requiring high link reliability. To meet this
requirement, you can configure PBR on SwitchA to redirect packets from the previous
forwarding path SwitchA→SwitchB→RouterB (RouterA) to a new path
SwitchA→SwitchC→RouterC (RouterA) and bind an NQA test instance to PBR to detect the
link status of the new path. If the NQA test instance finds that the link of the new path is
working properly, packets can be forwarded normally. If the NQA test instance finds that the
link of the new path is Down and the number of link detection times exceeds the specified
value, the PBR configuration will automatically become ineffective, and packets will be
forwarded along the previous forwarding path.
Network administrators want the packets that carry the source IP address [Link]/24
and are forwarded by SwitchA to be transmitted over the high-speed link and the other
packets forwarded by SwitchA to be transmitted over the low-speed link.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 840


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

Figure 11-3 Configuring NQA for PBR

Network
RouterA

RouterB RouterC
[Link]/24
[Link]/24
Area 0
10GE 1/0/2 10GE 1/0/2
[Link]/24 [Link]/24
SwitchB SwitchC
10GE 1/0/1
10GE 1/0/1
VLANIF 100
VLANIF 200
[Link]/24
[Link]/24
10GE 1/0/1
SwitchA
10GE 1/0/2
VLANIF 100
VLANIF 200
[Link]/24
[Link]/24
10GE 1/0/3
VLANIF 300
[Link]/24
10GE 1/0/1
VLANIF 300
[Link]/24
SwitchD

……

Tenant 1's Tenant 2's Tenant N's


Server Server Server

Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs, configure interfaces, and enable OSPF on each switch to connect the
users to the external network device (RouterA).
2. Configure an ACL to match the packets with the source IP address [Link]/24.
3. Configure a traffic classifier to match the ACL so that SwitchA can differentiate packets.
4. Configure a traffic behavior to redirect the packets that match the ACL to [Link]/24.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 841


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

5. Configure a traffic policy, bind the traffic classifier and traffic behavior to it, and apply it
to the inbound direction of 10GE1/0/3 on SwitchA to implement PBR.

Procedure
Step 1 Create VLANs, configure interfaces, and enable basic OSPF functions.
# Configure SwitchA.
# Create VLANs and add interfaces to respective VLANs on SwitchA.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan batch 100 200 300
[*SwitchA] commit
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 100
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 200
[*SwitchA-10GE1/0/2] quit
[*SwitchA] interface 10ge 1/0/3
[*SwitchA-10GE1/0/3] port link-type trunk
[*SwitchA-10GE1/0/3] port trunk allow-pass vlan 300
[*SwitchA-10GE1/0/3] quit
[*SwitchA] commit

# Configure an IP address for each VLANIF interface on SwitchA.


[~SwitchA] interface vlanif 100
[*SwitchA-Vlanif100] ip address [Link] 24
[*SwitchA-Vlanif100] quit
[*SwitchA] interface vlanif 200
[*SwitchA-Vlanif200] ip address [Link] 24
[*SwitchA-Vlanif200] quit
[*SwitchA] interface vlanif 300
[*SwitchA-Vlanif300] ip address [Link] 24
[*SwitchA-Vlanif300] quit
[*SwitchA] commit

# Enable OSPF on SwitchA.


[~SwitchA] router id [Link]
[*SwitchA] ospf 1
[*SwitchA-ospf-1] area 0
[*SwitchA-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchA-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchA-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchA-ospf-1-area-[Link]] quit
[*SwitchA-ospf-1] quit
[*SwitchA] commit

# Configure SwitchB. The configurations of SwitchC and SwitchD are similar to that of
SwitchB, and are not mentioned here.
# Create VLANs and add interfaces to respective VLANs on SwitchB.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchB
[*HUAWEI] commit
[~SwitchB] vlan batch 100
[*SwitchB] quit
[*SwitchB] interface 10ge 1/0/1
[*SwitchB-10GE1/0/1] port link-type trunk

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 842


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

[*SwitchB-10GE1/0/1] port trunk allow-pass vlan 100


[*SwitchB-10GE1/0/1] quit
[*SwitchB] interface vlanif 100
[*SwitchB-Vlanif100] ip address [Link] 24
[*SwitchB-Vlanif100] quit
[*SwitchB] interface 10ge 1/0/2
[*SwitchB-10GE1/0/2] undo portswitch
[*SwitchB-10GE1/0/2] ip address [Link] 24
[*SwitchB-10GE1/0/2] quit
[*SwitchB] commit

# Enable OSPF on SwitchB.


[~SwitchB] router id [Link]
[*SwitchB] ospf 1
[*SwitchB-ospf-1] area 0
[*SwitchB-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchB-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchB-ospf-1-area-[Link]] quit
[*SwitchB] commit

Step 2 Configure an NQA test instance.

# Enable the NQA client and create an ICMP NQA test instance on SwitchA.
[~SwitchA] nqa test-instance admin icmp
[*SwitchA-nqa-admin-icmp] test-type icmp
[*SwitchA-nqa-admin-icmp] destination-address ipv4 [Link]
[*SwitchA-nqa-admin-icmp] frequency 10
[*SwitchA-nqa-admin-icmp] probe-count 2
[*SwitchA-nqa-admin-icmp] interval seconds 5
[*SwitchA-nqa-admin-icmp] timeout 4
[*SwitchA-nqa-admin-icmp] start now
[*SwitchA-nqa-admin-icmp] quit
[*SwitchA] commit

Step 3 Configure an ACL.

# Create an advanced ACL 3001 on SwitchA to allow packets with the source IP address
[Link]/24 to pass through.
[~SwitchA] acl 3001
[*SwitchA-acl4-advance-3001] rule permit ip source [Link] [Link]
[*SwitchA-acl4-advance-3001] quit
[*SwitchA] commit

Step 4 Configure a traffic classifier.

# Create a traffic classifier c1, and bind c1 to ACL 3001.

[~SwitchA] traffic classifier c1


[*SwitchA-classifier-c1] if-match acl 3001
[*SwitchA-classifier-c1] quit
[*SwitchA] commit

Step 5 Configure a traffic behavior.

# Create a traffic behavior b1 on SwitchA to redirect packets to [Link]/24.


[~SwitchA] traffic behavior b1
[*SwitchA-behavior-b1] redirect remote [Link] track nqa admin icmp reaction
probe-failtimes 3
[*SwitchA-behavior-b1] quit
[*Switch] commit

Step 6 Configure a traffic policy and apply the traffic policy to an interface.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 843


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

# Create a traffic policy p1 on SwitchA, and bind the traffic classifier and traffic behavior to
the traffic policy.
[~SwitchA] traffic policy p1
[*SwitchA-trafficpolicy-p1] classifier c1 behavior b1
[*SwitchA-trafficpolicy-p1] quit
[*SwitchA] commit

# Apply the traffic policy p1 to the inbound direction on 10GE1/0/3.


[~SwitchA] interface 10ge 1/0/3
[*SwitchA-10GE1/0/3] traffic-policy p1 inbound
[*SwitchA-10GE1/0/3] quit
[*SwitchA] commit

Step 7 Verify the configuration.

# Check the configuration of NQA for PBR.


[~SwitchA] display current-configuration | include nqa
redirect remote [Link] track nqa admin icmp reaction probe-failtimes 3
nqa test-instance admin icmp

# Check the NQA test results.


[~SwitchA] display nqa results test-instance admin icmp

NQA entry(admin, icmp): test flag is active, test type is


ICMP
1 . Test 73 result The test is
finished

Send operation times: 2 Receive response times:


2
Completion: success RTD over thresholds number:
0
Attempts number: 1 Drop operation number:
0
Disconnect operation number: 0 Operation timeout number:
0
System busy operation number: 0 Connection fail number:
0
Operation sequence errors number: 0 RTT Status errors number:
0
Destination IP address:
[Link]

Min/Max/Average completion time:


4/4/4

Sum/Square-Sum completion time:


8/32

Last response packet receiving time: 2015-09-10


08:58:07.8
Lost packet ratio:
0 %

2 . Test 74 result The test is


finished

Send operation times: 2 Receive response times:


2
Completion: success RTD over thresholds number:
0
Attempts number: 1 Drop operation number:
0
Disconnect operation number: 0 Operation timeout number:

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 844


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

0
System busy operation number: 0 Connection fail number:
0
Operation sequence errors number: 0 RTT Status errors number:
0
Destination IP address:
[Link]

Min/Max/Average completion time:


4/4/4

Sum/Square-Sum completion time:


8/32

Last response packet receiving time: 2015-09-10


08:58:17.7
Lost packet ratio:
0 %

3 . Test 75 result The test is


finished

Send operation times: 2 Receive response times:


2
Completion: success RTD over thresholds number:
0
Attempts number: 1 Drop operation number:
0
Disconnect operation number: 0 Operation timeout number:
0
System busy operation number: 0 Connection fail number:
0
Operation sequence errors number: 0 RTT Status errors number:
0
Destination IP address:
[Link]

Min/Max/Average completion time:


4/4/4

Sum/Square-Sum completion time:


8/32

Last response packet receiving time: 2015-09-10


08:58:27.7
Lost packet ratio:
0 %

4 . Test 76 result The test is


finished

Send operation times: 2 Receive response times:


2
Completion: success RTD over thresholds number:
0
Attempts number: 1 Drop operation number:
0
Disconnect operation number: 0 Operation timeout number:
0
System busy operation number: 0 Connection fail number:
0
Operation sequence errors number: 0 RTT Status errors number:
0
Destination IP address:
[Link]

Min/Max/Average completion time:


4/4/4

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 845


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

Sum/Square-Sum completion time:


8/32

Last response packet receiving time: 2015-09-10


08:58:37.6
Lost packet ratio:
0 %

5 . Test 77 result The test is


finished

Send operation times: 2 Receive response times:


2
Completion: success RTD over thresholds number:
0
Attempts number: 1 Drop operation number:
0
Disconnect operation number: 0 Operation timeout number:
0
System busy operation number: 0 Connection fail number:
0
Operation sequence errors number: 0 RTT Status errors number:
0
Destination IP address:
[Link]

Min/Max/Average completion time:


4/4/4

Sum/Square-Sum completion time:


8/32

Last response packet receiving time: 2015-09-10


08:58:47.6
Lost packet ratio:
0 %

# Check the ACL configuration.


[~SwitchA] display acl 3001
Advanced ACL 3001, 1
rule

ACL's step is
5

rule 5 permit ip source [Link] [Link] (0 times


matched)

# Check the traffic classifier configuration.


[~SwitchA] display traffic classifier
Traffic Classifier
Information:

Classifier:
c1

Type:
OR

Rule(s):

if-match acl
3001

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 846


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

Total classifier number is


1

# Check the traffic policy configuration.


[~SwitchA] display traffic policy
Traffic Policy
Information:

Policy:
p1

Classifier:
c1

Type:
OR

Behavior:
b1

Redirect:

Redirect remote [Link] track nqa admin icmp reaction probe-failtimes


3

Total policy number is


1

----End

Configuration Files
l SwitchA configuration file
#
sysname SwitchA
#

router id
[Link]

#
vlan batch 100 200
#

acl number
3001

rule 5 permit ip source [Link]


[Link]

traffic classifier c1 type


or

if-match acl
3001

traffic behavior
b1

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 847


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

redirect remote [Link] track nqa admin icmp reaction probe-failtimes


3
#

traffic policy
p1

classifier c1 behavior b1 precedence


5

interface
Vlanif100

ip address [Link]
[Link]

interface
Vlanif200

ip address [Link]
[Link]

interface
Vlanif300

ip address [Link]
[Link]

interface
GE1/0/1

port link-type
trunk

port trunk allow-pass vlan


100

interface
GE1/0/2

port link-type
trunk

port trunk allow-pass vlan


200

interface
GE1/0/3

port link-type
trunk

port trunk allow-pass vlan


300

traffic-policy p1
inbound

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 848


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

ospf
1

area
[Link]

network [Link]
[Link]

network [Link]
[Link]

network [Link]
[Link]

nqa test-instance admin


icmp

test-type
icmp

destination-address ipv4
[Link]

interval seconds
5

timeout
4

probe-count
2

frequency
10

start
now

#
return
l SwitchB configuration file
#
sysname SwitchB
#

router id
[Link]

#
vlan batch 100
#

interface
Vlanif100

ip address [Link]
[Link]

interface
GE1/0/1

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 849


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

port link-type
trunk

port trunk allow-pass vlan


100

interface
GE1/0/2

undo
portswitch

ip address [Link]
[Link]

ospf
1

area
[Link]

network [Link]
[Link]

network [Link]
[Link]

#
return
l SwitchC configuration file
#
sysname SwitchC
#

router id
[Link]

#
vlan batch 200
#

interface
Vlanif200

ip address [Link]
[Link]

interface
GE1/0/1

port link-type
trunk

port trunk allow-pass vlan


200

interface
GE1/0/2

undo
portswitch

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 850


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

ip address [Link]
[Link]

ospf
1

area
[Link]

network [Link]
[Link]

network [Link]
[Link]

#
return

l SwitchD configuration file


#
sysname SwitchD
#

router id
[Link]

#
vlan batch 300
#

interface
Vlanif300

ip address [Link]
[Link]

interface
GE1/0/1

port link-type
trunk

port trunk allow-pass vlan


300

ospf
1

area
[Link]

network [Link]
[Link]

#
return

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 851


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

11.6.3 Example for Configuring ACL-based Simplified PBR


Networking Requirements
As shown in Figure 11-4, each access switch connects to N users. SwitchA functions as the
forwarding device and connects to RouterA through two links: a low-speed link with the
gateway address [Link]/24 and a high-speed link with the gateway address [Link]/24.
Network administrators want to switch some of the packets destined for RouterA from the
low-speed link to the high-speed link without compromising link reliability. To meet this
requirement, configure PBR on SwitchA to redirect packets from the path
SwitchA→SwitchB→RouterB (RouterA) to the path SwitchA→SwitchC→RouterC
(RouterA).
Network administrators want the packets that carry the source IP address [Link]/24
and are forwarded by SwitchA to be transmitted over the high-speed link and the other
packets forwarded by SwitchA to be transmitted over the low-speed link.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 852


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

Figure 11-4 Networking diagram for ACL-based simplified PBR

Network
RouterA

RouterB RouterC
[Link]/24
[Link]/24
Area 0
10GE 1/0/2 10GE 1/0/2
[Link]/24 [Link]/24
SwitchB SwitchC
10GE 1/0/1
10GE 1/0/1
VLANIF 100
VLANIF 200
[Link]/24
[Link]/24
10GE 1/0/1
SwitchA
10GE 1/0/2
VLANIF 100
VLANIF 200
[Link]/24
[Link]/24
10GE 1/0/3
VLANIF 300
[Link]/24
10GE 1/0/1
VLANIF 300
[Link]/24
SwitchD

……
User 1 User 2 User N

Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs, configure interfaces, and enable OSPF on each switch to connect the
users to the external network device (RouterA).
2. Configure an ACL to match the packets with the source IP address [Link]/24.
3. Configure an ACL-based simplified traffic policy to redirect the packets that match the
ACL to [Link]/24.

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 853


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

Procedure
Step 1 Create VLANs, add interfaces to VLANs, and configure basic OSPF functions.
# Configure SwitchA.
# Create VLANs and add interfaces to respective VLANs on SwitchA.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchA
[*HUAWEI] commit
[~SwitchA] vlan batch 100 200 300
[*SwitchA] commit
[~SwitchA] interface 10ge 1/0/1
[~SwitchA-10GE1/0/1] port link-type trunk
[*SwitchA-10GE1/0/1] port trunk allow-pass vlan 100
[*SwitchA-10GE1/0/1] quit
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 200
[*SwitchA-10GE1/0/2] quit
[*SwitchA] interface 10ge 1/0/3
[*SwitchA-10GE1/0/3] port link-type trunk
[*SwitchA-10GE1/0/3] port trunk allow-pass vlan 300
[*SwitchA-10GE1/0/3] quit
[*SwitchA] commit

# Configure an IP address for each VLANIF interface on SwitchA.


[~SwitchA] interface vlanif 100
[*SwitchA-Vlanif100] ip address [Link] 24
[*SwitchA-Vlanif100] quit
[*SwitchA] interface vlanif 200
[*SwitchA-Vlanif200] ip address [Link] 24
[*SwitchA-Vlanif200] quit
[*SwitchA] interface vlanif 300
[*SwitchA-Vlanif300] ip address [Link] 24
[*SwitchA-Vlanif300] quit
[*SwitchA] commit

# Enable OSPF on SwitchA.


[~SwitchA] router id [Link]
[*SwitchA] ospf 1
[*SwitchA-ospf-1] area 0
[*SwitchA-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchA-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchA-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchA-ospf-1-area-[Link]] quit
[*SwitchA-ospf-1] quit
[*SwitchA] commit

# Configure a default route on SwitchA to enable all packets to be forwarded through


SwitchB and arrive at RouterA through the gateway [Link]/24.
[~SwitchA] ip route-static [Link] [Link] [Link]
[*HUAWEI] commit

# Configure SwitchB.
# Create VLANs and add interfaces to respective VLANs on SwitchB.
<HUAWEI> system-view
[~HUAWEI] sysname SwitchB
[*HUAWEI] commit
[~SwitchB] vlan batch 100
[*SwitchB] quit
[*SwitchB] interface 10ge 1/0/1
[*SwitchB-10GE1/0/1] port link-type trunk

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 854


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

[*SwitchB-10GE1/0/1] port trunk allow-pass vlan 100


[*SwitchB-10GE1/0/1] quit
[*SwitchB] interface vlanif 100
[*SwitchB-Vlanif100] ip address [Link] 24
[*SwitchB-Vlanif100] quit
[*SwitchB] router id [Link]
[*SwitchB] ospf 1
[*SwitchB-ospf-1] area 0
[*SwitchB-ospf-1-area-[Link]] network [Link] [Link]
[*SwitchB-ospf-1-area-[Link]] quit
[*SwitchB] interface 10ge 1/0/2
[*SwitchB-10GE1/0/2] undo portswitch
[*SwitchB-10GE1/0/2] ip address [Link] 24
[*SwitchB-10GE1/0/2] ospf enable 1 area 0
[*SwitchB-10GE1/0/2] quit
[*SwitchB] commit

# The configurations of SwitchC and SwitchD are similar to that of SwitchB, and are not
mentioned here.

Step 2 Configure an ACL.

# Create an advanced ACL 3001 on SwitchA to allow packets with the source IP address
[Link]/24 to pass through.
[~SwitchA] acl 3001
[*SwitchA-acl4-advance-3001] rule permit ip source [Link] [Link]
[*SwitchA-acl4-advance-3001] quit
[*SwitchA] commit

Step 3 Configure ACL-based simplified PBR to redirect packets to a specified remote next hop.

# Create an ACL-based simplified traffic policy on SwitchA. The traffic policy uses ACL
3001 to match packets.

[~SwitchA] traffic-redirect acl 3001 remote [Link] global inbound


[*SwitchA] commit

Step 4 Verify the configuration.

# Verify the ACL configuration.


[~SwitchA] display acl 3001
Advanced ACL 3001, 1
rule

ACL's step is
5

rule 5 permit ip source [Link] [Link] (0 times


matched)

# Check the use records of the traffic policy.


[~SwitchA] display traffic-policy applied-record

Total records :
1

-------------------------------------------------------------------------------

Policy Type/Name Apply Parameter Slot


State
-------------------------------------------------------------------------------

traffic-redirect Global inbound 4


success

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 855


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

------------------------------------------------------------------------------

----End

Configuration files
l SwitchA configuration file
#
sysname SwitchA
#

router id
[Link]

#
vlan batch 100 200 300
#

acl number
3001

rule 5 permit ip source [Link]


[Link]

traffic-redirect acl 3001 remote [Link] global


inbound

interface
Vlanif100

ip address [Link]
[Link]

interface
Vlanif200

ip address [Link]
[Link]

interface
Vlanif300

ip address [Link]
[Link]

interface
GE1/0/1

port link-type
trunk

port trunk allow-pass vlan


100

interface

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 856


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

GE1/0/2

port link-type
trunk

port trunk allow-pass vlan


200

interface
GE1/0/3

port link-type
trunk

port trunk allow-pass vlan


300

traffic-policy p1
inbound

ospf
1

area
[Link]

network [Link]
[Link]

network [Link]
[Link]

network [Link]
[Link]

#
ip route-static [Link] [Link] [Link]
#
return
l SwitchB configuration file
#
sysname SwitchB
#

router id
[Link]

#
vlan batch 100
#

interface
Vlanif100

ip address [Link]
[Link]

interface
GE1/0/1

port link-type
trunk

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 857


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

port trunk allow-pass vlan


100

interface
GE1/0/2

undo
portswitch

ip address [Link] [Link]


ospf enable 1 area
[Link]

ospf
1

area
[Link]

network [Link]
[Link]

#
return
l SwitchC configuration file
#
sysname SwitchC
#

router id
[Link]

#
vlan batch 200
#

interface
Vlanif200

ip address [Link]
[Link]

interface
GE1/0/1

port link-type
trunk

port trunk allow-pass vlan


200

interface
GE1/0/2

undo
portswitch

ip address [Link] [Link]


ospf enable 1 area
[Link]

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 858


CloudEngine 8800, 7800, 6800, and 5800 Series Switches
Configuration Guide - IP Unicast Routing 11 PBR Configuration

ospf
1

area
[Link]

network [Link]
[Link]

#
return

l SwitchD configuration file


#
sysname SwitchD
#

router id
[Link]

#
vlan batch 300
#

interface
Vlanif300

ip address [Link]
[Link]

interface
GE1/0/1

port link-type
trunk

port trunk allow-pass vlan


300

ospf
1

area
[Link]

network [Link]
[Link]

#
return

Issue 06 (2018-11-26) Copyright © Huawei Technologies Co., Ltd. 859

You might also like