HP A5830 Switch Series Layer 3 - IP Routing. Configuration Guide. Abstract

Similar documents
HP A5820X & A5800 Switch Series Layer 3 - IP Routing. Configuration Guide. Abstract

HP 5920 & 5900 Switch Series

HPE FlexNetwork HSR6800 Routers

HP 5920 & 5900 Switch Series

HPE FlexNetwork 5510 HI Switch Series

Contents. Configuring a default route 1 Introduction to default routes 1

H3C S10500 Switch Series

HP FlexFabric 7900 Switch Series

Configuring static routing

Operation Manual IPv4 Routing H3C S3610&S5510 Series Ethernet Switches. Table of Contents

IP Routing Volume Organization

HP FlexFabric 5700 Switch Series

HP 6125G & 6125G/XG Blade Switches

HP 7500 Switch Series

H3C MSR Series Routers

HP 5120 EI Switch Series

H3C S5130-EI Switch Series

Table of Contents 1 Static Routing Configuration 1-1

H3C S7500E Series Ethernet Switches. Layer 3 - IP Routing. Configuration Guide. Hangzhou H3C Technologies Co., Ltd.

H3C S5820X&S5800 Series Ethernet Switches

Table of Contents 1 Static Routing Configuration RIP Configuration 2-1

Table of Contents 1 Static Routing Configuration 1-1

Command Manual IPv4 Routing H3C S3610&S5510 Series Ethernet Switches. Table of Contents

Table of Contents 1 Static Routing Configuration 1-1

Operation Manual Routing Protocol. Table of Contents

HP Load Balancing Module

Configuring BGP community 43 Configuring a BGP route reflector 44 Configuring a BGP confederation 44 Configuring BGP GR 45 Enabling Guard route

HP A5820X & A5800 Switch Series MPLS. Configuration Guide. Abstract

H3C S10500 Switch Series

HP 5920 & 5900 Switch Series

HP FlexFabric 7900 Switch Series

Configuration prerequisites 45 Configuring BGP community 45 Configuring a BGP route reflector 46 Configuring a BGP confederation 46 Configuring BGP

HP FlexFabric 5930 Switch Series

Protecting an EBGP peer when memory usage reaches level 2 threshold 66 Configuring a large-scale BGP network 67 Configuring BGP community 67

HP Routing Switch Series

Configuring basic MBGP

Table of Contents. 2 Static Route Configuration Commands 2-1 Static Route Configuration Commands 2-1 delete static-routes all 2-1 ip route-static 2-1

Table of Contents. BGP Configuration 1

Table of Contents 1 MBGP Configuration 1-1

HP 5920 & 5900 Switch Series

Configuring OSPF network management 39 Enabling message logging 39 Enabling the advertisement and reception of opaque LSAs 40 Configuring OSPF to

Logging neighbor state changes 38 Configuring OSPF network management 39 Enabling message logging 39 Enabling the advertisement and reception of

HP FlexFabric Switch Series

Operation Manual BFD-GR H3C S3610&S5510 Series Ethernet Switches. Table of Contents

HP Routing Switch Series

Table of Contents 1 BGP Configuration 1-1

Table of Contents 1 OSPF Configuration 1-1

Routing Protocol Type Primarily IGP or EGP RIP Distance-Vector IGP EIGRP OSPF IS-IS BGP

Table of Contents 1 MSDP Configuration 1-1

H3C S5120-HI Switch Series

HPE FlexFabric 5940 Switch Series

Operation Manual BGP. Table of Contents

Contents. BGP commands 1

Contents. Configuring MSDP 1

HP MSR Router Series. EVI Configuration Guide(V7) Part number: b Software version: CMW710-R0304 Document version: 6PW

Configuring MSDP. Overview. How MSDP operates. MSDP peers

HP 6125G & 6125G/XG Blade Switches

HP A5830 Switch Series Layer 3 - IP Services. Configuration Guide. Abstract

HP 6125 Blade Switch Series

Configuring Advanced BGP

H3C S5120-SI Switch Series

Chapter 17 BGP4 Commands

Table of Contents 1 MSDP Configuration 1-1

H3C BGP Configuration Examples

CCNA 3 (v v6.0) Chapter 5 Exam Answers % Full

Configuring MSDP. MSDP overview. How MSDP works. MSDP peers

HP 6125 Blade Switch Series

HP 6125G & 6125G/XG Blade Switches

Chapter 13 Configuring BGP4

Configuring BGP on Cisco Routers Volume 1

debug ip ospf database external default-metric subnet area 0 stub distribute-list in Serial0/1

Symbols. Numerics I N D E X

HP 5920 & 5900 Switch Series

HP MSR Router Series. IPX Configuration Guide(V5) Part number: Software version: CMW520-R2513 Document version: 6PW

Contents. Configuring EVI 1

HP VPN Firewall Appliances

Vendor: Alcatel-Lucent. Exam Code: 4A Exam Name: Alcatel-Lucent Interior Routing Protocols and High Availability.

Contents. EVPN overview 1

HP A5500 EI & A5500 SI Switch Series Network Management and Monitoring. Configuration Guide. Abstract

FSOS IPv6 Routing Command Line Reference

OSPF. Unless otherwise noted, OSPF refers to OSPFv2 throughout this document.

HP A-MSR Router Series MPLS. Configuration Guide. Abstract

FiberstoreOS. IPv6 Routing Command Line Reference

FiberstoreOS V3.3 IPv6 Routing Command Line Reference

HP 5500 EI & 5500 SI Switch Series

Operation Manual - Network and Routing Protocol. Table of Contents

IS-IS basic configuration 37 DIS election configuration 41 Configuring IS-IS route redistribution 45 IS-IS GR configuration example 49 IS-IS FRR

HP 5120 SI Switch Series

HP 3600 v2 Switch Series

Operation Manual MCE H3C S3610&S5510 Series Ethernet Switches. Table of Contents

HP 5820X & 5800 Switch Series Network Management and Monitoring. Configuration Guide. Abstract

HP Load Balancing Module

BGP can also be used for carrying routing information for IPv6 prefix over IPv6 networks.

HP 5120 SI Switch Series

HP 5500 HI Switch Series

Implementing Cisco IP Routing (ROUTE)

HP Firewalls and UTM Devices

OSPFv3 Address Families

Organization of Product Documentation... xi

FiberstoreOS IP Routing Configuration Guide

Transcription:

HP A5830 Switch Series Layer 3 - IP Routing Configuration Guide Abstract This document describes the software features for the HP A Series products and guides you through the software configuration procedures. These configuration guides also provide configuration examples to help you apply software features to different network scenarios. This documentation is intended for network planners, field technical support and servicing engineers, and network administrators working with the HP A Series products. Part number: 5998-2064 Software version: Release 1109 Document version: 6W100-20110715

Legal and notice information Copyright 2011 Hewlett-Packard Development Company, L.P. No part of this documentation may be reproduced or transmitted in any form or by any means without prior written consent of Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. HEWLETT-PACKARD COMPANY MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein.

Contents Layer 3 IP Routing Configuration Guide 1 IP routing basics 1 Routing table 1 Example 2 Dynamic routing protocols 2 Routing preference 3 Load sharing 4 Route backup 4 Route recursion 4 Route redistribution 4 Displaying and maintaining a routing table 4 Configuring static routing 6 Static route 6 Default route 6 Destination address and mask 6 Output interface and next hop address 6 Other attributes 7 Prerequisites 7 Procedure 7 Configuring BFD for static routes 8 Enabling BFD control packet mode 8 Configuring BFD echo packet mode 9 Configuring static route FRR 9 Procedure 10 Displaying and maintaining static routes 10 Static route configuration examples 11 Basic static route configuration example 11 Static route FRR configuration example 13 BFD for static routes configuration example (direct session) 15 BFD for static routes configuration example (indirect session) 17 RIP routing 20 Overview 20 Routing table 20 RIP timers 20 Routing loops 21 Operation 21 Versions 21 Message format 22 Supported features 23 Protocols and standards 23 Required and optional configuration tasks 24 Configuring RIP basic functions 25 Prerequisites 25 Procedure 25 Configuring route control 26 Configuring additional routing metrics 27 Configuring RIPv2 route summarization 27 Advertising a summary route 28 iii

Disabling host route reception 28 Advertising a default route 28 Configuring inbound or outbound route filtering 29 Configuring RIP priority 30 Configuring RIP route redistribution 30 Tuning and optimizing RIP networks 31 Configuring RIP timers 31 Configuring split horizon and poison reverse 31 Configuring the maximum number of load balanced routes 32 Enabling zero field check on incoming RIPv1 messages 32 Enabling source IP address check on incoming RIP updates 33 Configuring RIP-to-MIB binding 33 Configuring RIPv2 message authentication 33 Specifying a RIP neighbor 34 Configuring the RIP packet sending rate 34 Configuring RIP FRR 34 Configuring BFD for RIP 35 Single-hop detection in BFD echo packet mode 36 Bi-directional detection in BFD control packet mode 36 Displaying and maintaining RIP 37 RIP configuration examples 37 Configuring RIP version 37 Configuring RIP route redistribution 39 Configuring an additional metric for a RIP interface 41 Configuring RIP to advertise a summary route 43 Configuring RIP FRR example 45 Configuring BFD for RIP (single-hop detection in BFD echo packet mode) 47 Configuring BFD for RIP (bidirectional detection in BFD control packet mode) 50 Troubleshooting 53 No RIP updates received 53 Route oscillation occurred 54 Configuring OSPF 55 Overview 55 Basic concepts 55 Area based OSPF network partition 57 Router types 60 OSPF network classification 61 DR and BDR 62 OSPF packet formats 63 Supported features 71 Protocols and standards 72 Configuration task list 72 Enabling OSPF 74 Prerequisites 74 Procedure 74 Configuring OSPF areas 75 Prerequisites 75 Configuring a stub area 75 Configuring an NSSA area 76 Configuring a virtual link 77 Configuring OSPF network types 77 Prerequisites 77 Configuring the OSPF network type for an interface as broadcast 78 Configuring the OSPF network type for an interface as NBMA 78 iv

Configuring the OSPF network type for an interface as P2MP 79 Configuring the OSPF network type for an interface as P2P 79 Configuring OSPF route control 80 Prerequisites 80 Configuring OSPF route summarization 80 Configuring OSPF inbound route filtering 81 Configuring ABR Type-3 LSA filtering 81 Configuring an OSPF cost for an interface 82 Configuring the maximum number of OSPF routes 83 Configuring the maximum number of load-balanced routes 83 Configuring OSPF preference 83 Configuring OSPF route redistribution 84 Advertising a host route 85 Tuning and optimizing OSPF networks 85 Prerequisites 85 Configuring OSPF packet timers 86 Specifying LSA transmission delay 86 Specifying SPF calculation interval 87 Specifying the LSA arrival interval 87 Specifying the LSA generation interval 87 Disabling interfaces from receiving and sending OSPF packets 88 Configuring stub routers 88 Configuring OSPF authentication 89 Adding the interface MTU into DD packets 89 Configuring the maximum number of external LSAs in LSDB 90 Enabling compatibility with RFC 1583 90 Logging neighbor state changes 91 Configuring OSPF network management 91 Enabling message logging 92 Enabling the advertisement and reception of opaque LSAs 92 Configuring OSPF to give priority to receiving and processing hello packets 92 Configuring the LSU transmit rate 93 Enabling OSPF ISPF 93 Configuring OSPF FRR 93 Introduction 93 Prerequisites 94 Configuring OSPF FRR to automatically calculate a backup next hop 94 Configuring OSPF FRR to designate a backup next hop with a routing policy 94 Configuring OSPF Graceful Restart 95 Configuring the OSPF GR Restarter 95 Configuring the OSPF GR Helper 96 Triggering OSPF Graceful Restart 97 Configuring OSPF NSR 97 Configuring BFD for OSPF 97 Configuring control packet bidirectional detection 98 Configuring echo packet single-hop detection 98 Displaying and maintaining OSPF 98 OSPF configuration examples 100 Configuring OSPF basic functions 100 Configuring OSPF route redistribution 103 Configuring OSPF to advertise a summary route 105 Configuring an OSPF stub area 107 Configuring an OSPF NSSA area 110 Configuring OSPF DR election 112 Configuring OSPF virtual links 116 v

Configuring OSPF Graceful Restart 118 Configuring OSPF NSR 121 Configuring route filtering 122 Configuring OSPF FRR 125 Configuring BFD for OSPF 127 Troubleshooting OSPF configuration 132 No OSPF neighbor relationship established 132 Incorrect routing information 132 Configuring IS-IS 134 IS-IS overview 134 Basic concepts 134 IS-IS area 136 IS-IS network type 138 IS-IS PDU format 139 Supported IS-IS features 145 Protocols and standards 147 Configuration task list 147 Configuring IS-IS basic functions 148 Prerequisites 148 Enabling IS-IS 148 Configuring the IS level and circuit level 149 Configuring the network type of an interface as P2P 149 Configuring IS-IS routing information control 150 Prerequisites 150 Configuring IS-IS link cost 150 Specifying a priority for IS-IS 152 Configuring the maximum number of equal cost routes 152 Configuring IS-IS route summarization 152 Advertising a default route 153 Configuring IS-IS route redistribution 153 Configuring IS-IS route filtering 153 Configuring IS-IS route leaking 154 Tuning and optimizing IS-IS networks 155 Prerequisites 155 Specifying intervals for sending IS-IS hello and CSNP packets 155 Specifying the IS-IS hello multiplier 155 Configuring a DIS priority for an interface 155 Disabling an interface from sending or receiving IS-IS packets 156 Enabling an interface to send small hello packets 156 Configuring LSP parameters 156 Configuring SPF parameters 159 Assigning a high priority to IS-IS routes 159 Setting the LSDB overload bit 160 Configuring system ID to host name mapping 160 Enabling the logging of neighbor state changes 161 Enhancing IS-IS network security 161 Prerequisites 161 Configuring neighbor relationship authentication 162 Configuring area authentication 162 Configuring routing domain authentication 162 Configuring IS-IS GR 164 Configuring IS-IS NSR 164 Configuring IS-IS FRR 165 Enabling IS-IS SNMP trap 166 vi

Binding an IS-IS process with MIBs 167 Configuring BFD for IS-IS 167 Displaying and maintaining IS-IS 167 IS-IS configuration examples 168 IS-IS basic configuration 0 168 DIS election configuration 173 Configuring IS-IS route redistribution 177 IS-IS Graceful Restart configuration example 181 IS-IS NSR configuration example 182 IS-IS FRR configuration example 185 IS-IS authentication configuration example 187 Configuring BFD for IS-IS 189 Configuring BGP 194 Overview 194 Message formats 194 Path attributes 197 BGP route selection 201 ibgp and IGP synchronization 203 Settlements for issues in large scale BGP networks 203 BGP GR 206 MP-BGP 207 Protocols and standards 207 Configuration task list 208 Configuring BGP basic functions 210 Prerequisites 210 Creating a BGP connection 210 Specifying the source interface for TCP connections 211 Allowing an ebgp connection to an indirectly connected peer or peer group 211 Controlling route generation 212 Prerequisites 212 Injecting a local network 212 Configuring BGP route redistribution 212 Enabling default route redistribution into BGP 213 Controlling route distribution and reception 213 Prerequisites 213 Configuring BGP route summarization 213 Advertising a default route to a peer or peer group 214 Configuring BGP route distribution/reception filtering policies 215 Enabling BGP and IGP route synchronization 216 Limiting prefixes received from a peer or peer group 217 Configuring BGP route dampening 217 Configuring a shortcut route 217 Configuring BGP route attributes 218 Prerequisites 218 Specifying a preferred value for routes received 218 Configuring preferences for BGP routes 218 Configure the default local preference 219 Configuring the MED attribute 219 Configuring the next hop attribute 221 Configuring the AS-PATH attribute 222 Tuning and optimizing BGP networks 223 Prerequisites 223 Configuring the BGP keepalive interval and holdtime 223 Configuring the interval for sending the same update 225 vii

Configuring BGP soft-reset 225 Enabling the BGP ORF capability 226 Enabling 4-byte AS number suppression 227 Enabling quick ebgp session re-establishment 228 Enabling MD5 authentication for TCP connections 228 Configuring BGP load balancing 228 Forbidding session establishment with a peer or peer group 228 Configuring a large scale BGP network 229 Prerequisites 229 Configuring BGP peer groups 229 Configuring BGP community 231 Configuring a BGP route reflector 231 Configuring a BGP confederation 232 Configuring BGP GR 233 Enabling trap 234 Enabling logging of peer state changes 234 Configuring BFD for BGP 234 Displaying and maintaining BGP 235 Displaying BGP 235 Resetting BGP connections 236 Clearing BGP information 236 BGP configuration examples 237 BGP basic configuration 237 BGP and IGP synchronization configuration 241 BGP load balancing configuration 244 BGP community configuration 246 BGP route reflector configuration 248 BGP confederation configuration 250 BGP path selection configuration 254 BGP GR configuration 257 Configuring BFD for BGP 258 Troubleshooting BGP 263 BGP peer relationship not established 263 Configuring IPv6 static routing 264 Overview 264 Static route features 264 Default IPv6 route 264 Configuring an IPv6 static route 264 Prerequisites 264 Procedure 264 Displaying and maintaining IPv6 static routes 265 IPv6 static routing configuration example 265 Configuring RIPng 268 Overview 268 Working mechanism 268 RIPng packet format 269 RIPng packet processing procedure 270 Protocols and standards 270 Configuration task list 270 Configuring RIPng basic functions 271 Prerequisites 271 Procedure 271 Configuring RIPng route control 271 Configuring an additional routing metric 272 viii

Configuring RIPng route summarization 272 Advertising a default route 272 Configuring a RIPng route filtering policy 272 Configuring a priority for RIPng 273 Configuring RIPng route redistribution 273 Tuning and optimizing the RIPng network 273 Configuring RIPng timers 274 Configuring split horizon and poison reverse 274 Configuring zero field check on RIPng packets 275 Configuring the maximum number of equal cost routes for load balancing 275 Displaying and maintaining RIPng 275 RIPng configuration examples 276 Configure RIPng basic functions 276 Configuring RIPng route redistribution 279 Configuring OSPFv3 282 Overview 282 Packets 282 LSA types 283 Timers 283 Supported features 284 Protocols and standards 284 Configuration task list 284 Enabling OSPFv3 285 Prerequisites 285 Procedure 285 Configuring OSPFv3 area parameters 286 Prerequisites 286 Configuring an OSPFv3 stub area 286 Configuring an OSPFv3 virtual link 287 Configuring OSPFv3 network types 287 Prerequisites 287 Configuring the OSPFv3 network type for an interface 287 Configuring an NBMA or P2MP neighbor 288 Configuring OSPFv3 routing information control 288 Prerequisites 288 Configuring OSPFv3 route summarization 288 Configuring OSPFv3 inbound route filtering 289 Configuring an OSPFv3 cost for an interface 289 Configuring the maximum number of OSPFv3 load-balanced routes 290 Configuring a priority for OSPFv3 290 Configuring OSPFv3 route redistribution 290 Tuning and optimizing OSPFv3 networks 291 Prerequisites 291 Configuring OSPFv3 timers 292 Configuring a DR priority for an interface 292 Ignoring MTU check for DD packets 293 Disable interfaces from receiving and sending OSPFv3 packets 293 Enable the logging of neighbor state changes 293 Configuring OSPFv3 GR 294 Configuring GR Restarter 295 Configuring GR Helper 295 Configuring BFD for OSPFv3 295 Displaying OSPFv3 296 OSPFv3 configuration examples 297 ix

Configuring OSPFv3 areas 297 Configuring OSPFv3 DR election 300 Configuring OSPFv3 route redistribution 304 Configuring OSPFv3 GR 307 Configuring BFD for OSPFv3 308 Troubleshooting OSPFv3 configuration 311 No OSPFv3 neighbor relationship established 311 Incorrect routing information 312 Configuring IPv6 IS-IS 313 Overview 313 Configuring IPv6 IS-IS basic functions 313 Prerequisites 313 Procedure 313 Configuring IPv6 IS-IS routing information control 314 Prerequisites 314 Procedure 314 Configuring BFD for IPv6 IS-IS 315 Displaying and maintaining IPv6 IS-IS 316 IPv6 IS-IS configuration examples 317 IPv6 IS-IS basic configuration example 317 Configuring BFD for IPv6 IS-IS 321 Configuring IPv6 BGP 326 Overview 326 Configuration task list 326 Configuring IPv6 BGP basic functions 327 Prerequisites 327 Specifying an IPv6 BGP peer 328 Injecting a local IPv6 route 328 Configuring a preferred value for routes from a peer or peer group 328 Specifying the source interface for establishing TCP connections 329 Allowing the establishment of an indirect ebgp connection 329 Configuring a description for an IPv6 peer or peer group 329 Disabling session establishment to an IPv6 peer or peer group 330 Logging IPv6 peer or peer group state changes 330 Controlling route distribution and reception 330 Prerequisites 331 Configuring IPv6 BGP route redistribution 331 Configuring IPv6 BGP route summarization 332 Advertising a default route to an IPv6 peer or peer group 332 Configuring outbound route filtering 332 Configuring inbound route filtering 333 Configuring IPv6 BGP and IGP route synchronization 334 Configuring route dampening 334 Configuring IPv6 BGP route attributes 334 Prerequisites 335 Configuring IPv6 BGP preference and default LOCAL_PREF and NEXT_HOP attributes 335 Configuring the MED attribute 335 Configuring the AS_PATH attribute 336 Tuning and optimizing IPv6 BGP networks 336 Prerequisites 337 Configuring IPv6 BGP timers 338 Configuring IPv6 BGP soft reset 338 Enabling the IPv6 BGP ORF capability 339 Enabling 4-byte AS number suppression 340 x

Configuring the maximum number of load-balanced routes 341 Enabling MD5 authentication for TCP connections 341 Configuring a large-scale IPv6 BGP network 341 Prerequisites 342 Configuring IPv6 BGP peer group 342 Configuring IPv6 BGP community 343 Configuring an IPv6 BGP route reflector 344 Configuring BFD for IPv6 BGP 344 Displaying and maintaining IPv6 BGP 345 Displaying BGP 345 Resetting IPv6 BGP connections 347 Clearing IPv6 BGP information 347 IPv6 BGP configuration examples 347 IPv6 BGP basic configuration 347 IPv6 BGP route reflector configuration 349 BFD for IPv6 BGP configuration 351 Troubleshooting IPv6 BGP configuration 355 No IPv6 BGP peer relationship established 355 Configuring routing policy 357 Overview 357 Applications 357 Routing policy implementation 357 Filters 357 Configuration task list 359 Defining filters 359 Prerequisites 359 Defining an IP-prefix list 359 Defining an AS path list 360 Defining a community list 360 Defining an extended community list 361 Configuring a routing policy 361 Prerequisites 361 Creating a routing policy 361 Defining if-match clauses 362 Defining apply clauses 364 Defining a continue clause 365 Displaying and maintaining the routing policy 366 Routing policy configuration examples 366 Applying a routing policy to IPv4 route redistribution 366 Applying a routing policy to IPv6 route redistribution 369 Applying a routing policy to filter received BGP routes 371 Troubleshooting routing policy configuration 373 IPv4 routing information filtering failure 373 IPv6 routing information filtering failure 374 Configuring PBR 375 Overview 375 Using a PBR policy 375 Using a QoS policy 375 PBR modes 375 Concepts 375 QoS mode 376 Configuring PBR (using a PBR policy) 377 Defining a policy 377 Configuring local PBR 378 xi

Configuring interface PBR 378 PBR and track 379 Configuring PBR (using a QoS policy) 379 Configuring a QoS policy 379 Applying the QoS policy 380 Displaying and maintaining PBR configuration 381 PBR configuration (using a PBR policy) 381 PBR configuration (using a QoS policy) 381 PBR configuration examples 382 Configuring local PBR based on packet type 382 Configuring interface PBR based on packet type 384 IPv4 PBR configuration example (using a QoS policy) (by using a QoS policy) 385 IPv6 PBR configuration example (using a QoS policy) 386 Support and other resources 387 Contacting HP 387 Subscription service 388 Related information 388 Documents 388 Websites 388 Conventions 388 Index 391 xii

Layer 3 IP Routing Configuration Guide This document uses the following references: The term router in this document refers to both routers and Layer 3 switches. The types of interfaces that appear in any figures other than the network diagrams for configuration examples are for illustration only. Some of them might be unavailable on your switch. The term interface in the routing features refers to Layer 3 interfaces, including VLAN interfaces and route-mode (or Layer 3) Ethernet ports. You can set an Ethernet port to operate in route mode by using the port link-mode route command (see Layer 2 LAN Switching Configuration Guide). This chapter focuses on unicast routing protocols. For more information about multicast routing protocols, see IP Multicast Configuration Guide. For more information about these commands, see Layer 3 IP Routing Command Reference. IP routing basics Upon receiving a packet, a router determines the optimal route based on the destination address and forwards the packet to the next router in the path. When the packet reaches the last router, it then forwards the packet to the destination host. Routing provides the path information that guides the forwarding of packets. Routes can be divided into the following categories by destination: Network route Destination is a network. The subnet mask is less than 32 bits. Host route Destination is a host. The subnet mask is 32 bits. Routes can be divided into the following types based on whether the destination is directly connected to the router: Routing table Direct route Destination is directly connected to the router. Indirect route Destination is not directly connected to the router. A router selects optimal routes from the routing table and sends them to the FIB table to guide packet forwarding. Each router maintains a routing table and a FIB table. Routes in a routing table can be divided into the following categories by origin: Direct routes Routes discovered by data link protocols, also known as interface routes Static routes Routes manually configured. Static routes are easy to configure and require less system resources. They work well in small and stable networks. Static routes cannot adjust to network changes. You must manually configure the routes again, whenever the network topology changes. Dynamic routes Routes discovered dynamically by routing protocols 1

Example Each entry in the FIB table specifies a physical interface, which packets destined for a certain address use to reach the next hop (the next router) or the directly connected destination. For more information about the FIB table, see Layer 3 IP Services Configuration Guide. Display brief information for a routing table using the display ip routing-table command: <Sysname> display ip routing-table Routing Tables: Public Destinations : 7 Routes : 7 Destination/Mask Proto Pre Cost NextHop Interface 1.1.1.0/24 Direct 0 0 1.1.1.1 Vlan11 2.2.2.0/24 Static 60 0 12.2.2.2 Vlan12 80.1.1.0/24 OSPF 10 2 80.1.1.1 Vlan13 (Part of the output information is omitted) A route entry includes the following key items: Destination Destination IP address or destination network. Mask Network mask, which specifies (along with the destination address) the address of the destination network. A logical AND operation between the destination address and the network mask yields the address of the destination network. For example, if the destination address is 129.102.8.10 and the mask 255.255.0.0, the address of the destination network is 129.102.0.0. A network mask is made up of a certain number of consecutive 1s. It can be expressed in dotted decimal format or by the number of the 1s. Pre Route preference. Among routes to the same destination, the one with the highest preference is optimal. Cost Route with the smallest cost becomes the optimal route when multiple routes to a destination have the same preference. NextHop IP address of the next hop Interface Interface through which a matching IP packet is forwarded Dynamic routing protocols Based on dynamic routing protocols, dynamic routing can detect network topology changes and recalculate the routes, so it is suitable for large networks. However, dynamic routing is difficult to configure, imposes higher requirements on the system, and consumes network resources. Dynamic routing protocols can be classified based on different criteria, as shown in Table 1. An AS refers to a group of routers sharing the same routing policy and working under the same administration. 2

Table 1 Dynamic routing protocols Criterion Optional scope. Routing algorithm. Destination address type. IP version. Categories IGPs Work within an AS. Examples include RIP, OSPF, and IS-IS. EGPs Work between ASs. The most popular one is BGP. Distance-vector protocols RIP and BGP. BGP is also considered a path-vector protocol. Link-state protocols OSPF and IS-IS. Unicast routing protocols RIP, OSPF, BGP, and IS-IS. Multicast routing protocols PIM-SM and PIM-DM. IPv4 routing protocols RIP, OSPF, BGP, and IS-IS. IPv6 routing protocols RIPng, OSPFv3, IPv6 BGP, and IPv6 IS-IS. Routing preference Different routing protocols can find different routes to the same destination. However, not all of those routes are optimal. Routing protocols, direct routes, and static routes are assigned different preferences for route selection. The route with the highest preference is preferred. The preference of a direct route is always 0 and cannot be changed. You can manually configure preferences for any other route type, and each static route can be configured with a different preference. Table 2 lists the types of routes and the default preferences. The smaller the preference value, the higher the preference. Table 2 Dynamic routing protocols Routing approach Preference Direct route 0 OSPF 10 IS-IS 15 Static route 60 RIP 100 OSPF ASE 150 OSPF NSSA 150 ibgp 255 ebgp 255 Unknown (route from an untrusted source) 256 3

Load sharing A routing protocol can be configured with multiple equal-cost routes to the same destination. These routes have the same preference and are used to accomplish load sharing if there is no route with a higher preference available. Routing protocols supporting load sharing include static routing/ipv6 static routing, RIP/RIPng, OSPF/OSPFv3, BGP/IPv6 BGP, and IS-IS/IPv6 IS-IS. Route backup Route backup can help improve network reliability. With route backup, you can configure multiple routes to the same destination, expecting the one with the highest preference to be the main route and all the rest to be backup routes. Under normal circumstances, packets are forwarded through the main route. When the link fails, the route with the highest preference among the backup routes is selected to forward packets. When the link recovers, the route selection process is performed again and the main route is selected again to forward packets. Route recursion The next hops of some BGP routes (except ebgp routes) and static routes are not always directly connected. The outgoing interface to reach the next hop must be available. Route recursion is used to find the outgoing interface based on the next hop information of the route. Link-state routing protocols, such as OSPF and IS-IS, do not need route recursion because they obtain next hop information through route calculation. Route redistribution Different routing protocols running on a network learn route information from each other through route redistribution. Each routing protocol can redistribute routes from other protocols, direct routes, and static routes. For more information, see relevant protocols in this configuration guide. Displaying and maintaining a routing table Task Command Remarks Display information about the routing table. Display information about routes permitted by an IPv4 basic ACL. Display information about routes to the specified destination. Display information about routes with destination addresses in the specified range. display ip routing-table [ verbose ] [ { begin exclude include } regularexpression ] display ip routing-table acl acl-number [ verbose ] [ { begin exclude include } regular-expression ] display ip routing-table ip-address [ mask mask-length ] [ longer-match ] [ verbose ] [ { begin exclude include } regular-expression ] display ip routing-table ip-address1 { mask mask-length } ip-address2 { mask mask-length } [ verbose ] [ { begin exclude include } regular-expression ] Available in any view. Available in any view. Available in any view. Available in any view. 4

Task Command Remarks Display routing information permitted by an IPv4 prefix list. Display routes of a routing protocol. Display statistics about the routing table. Clear statistics for the routing table. Display IPv6 routing table information. Display routing information permitted by an IPv6 ACL. Display routing information for a specified destination IPv6 address. Display IPv6 routing information for an IPv6 address range. Display routing information permitted by an IPv6 prefix list. Display IPv6 routing information of a routing protocol. Display IPv6 routing statistics. Clear specified IPv6 routing statistics. display ip routing-table ip-prefix ipprefix-name [ verbose ] [ { begin exclude include } regular-expression ] display ip routing-table protocol protocol [ inactive verbose ] [ { begin exclude include } regularexpression ] [ { begin exclude include } regular-expression ] [ { begin exclude include } regular-expression ] display ip routing-table statistics [ { begin exclude include } regularexpression ] reset ip routing-table statistics protocol { protocol all } display ipv6 routing-table [ verbose ] [ { begin exclude include } regularexpression ] display ipv6 routing-table acl acl6- number [ verbose ] [ { begin exclude include } regular-expression ] display ipv6 routing-table ipv6-address prefix-length [ longer-match ] [ verbose ] [ { begin exclude include } regularexpression ] display ipv6 routing-table ipv6-address1 prefix-length1 ipv6-address2 prefixlength2 [ verbose ] [ { begin exclude include } regular-expression ] display ipv6 routing-table ipv6-prefix ipv6-prefix-name [ verbose ] [ { begin exclude include } regular-expression ] display ipv6 routing-table protocol protocol [ inactive verbose ] [ { begin exclude include } regularexpression ] display ipv6 routing-table statistics [ { begin exclude include } regularexpression ] reset ipv6 routing-table statistics protocol { protocol all } Available in any view. Available in any view. Available in any view. Available in user view. Available in any view. Available in any view. Available in any view. Available in any view. Available in any view. Available in any view. Available in any view. Available in user view. 5

Configuring static routing Static route Static routes are manually configured. If a network topology is simple, you only need to configure static routes for the network to work properly. The proper configuration and usage of static routes can improve network performance and ensure bandwidth for important network applications. The disadvantage of using static routes is that they cannot adapt to network topology changes. If a fault or a topological change occurs in the network, the relevant routes are unreachable and the network breaks. When this happens, the network administrator must modify the static routes manually. When configuring a static route, the static route does not take effect if you specify the next hop address first and then configure it as the IP address of a local interface, such as Ethernet interface and VLAN interface. If you do not specify the preference when configuring a static route, the system uses the default preference. Reconfiguring the default preference applies only to newly created static routes. Default route Without a default route, a packet that does not match any routing entries is discarded. A default route is used to forward packets that do not match any routing entry. Configure the route in either of the following ways: As network administrator, configure a default route with both the destination and mask as 0.0.0.0. The router forwards any packet whose destination address fails to match any entry in the routing table to the next hop of the default static route. Some dynamic routing protocols, such as OSPF, RIP, and IS-IS, can also generate a default route. For example, an upstream router running OSPF can generate a default route and advertise it to other routers that install the default route with the upstream router as the next hop. If the destination IP address and mask are both configured as 0.0.0.0 with the ip route-static command, then the route is the default route. Destination address and mask In the ip route-static command, an IPv4 address is in dotted decimal format. A mask can be either in dotted decimal format or in the form of mask length the number of consecutive 1s in the mask. Output interface and next hop address When configuring a static route, specify either the output interface, next hop address, or both, depending on the specific occasion. The next hop address cannot be a local interface IP address or the route configuration will not take effect. Each route lookup operation has to find the next hop to resolve the destination link layer address. 6

When specifying the output interface, observe the following rules: Other attributes A Null 0 output interface requires no next hop address. Specifying a broadcast interface (such as an Ethernet interface or VLAN interface) as the output interface requires specification of the corresponding next hop for the output interface. To maintain more flexible route management policies, configure different priorities for different static routes. For example, specifying the same priority for different routes to the same destination enables load sharing, but specifying different priorities for different routes enables route backup. Prerequisites Procedure Before configuring a static route, configure the following: Physical parameters Link-layer attributes Addresses for related interfaces Step Command Remarks 1. Enter system view. system-view 2. Configure a static route. 3. Configure the default preference for static routes. ip route-static dest-address { mask masklength } { next-hop-address [ track trackentry-number ] interface-type interfacenumber [ next-hop-address ] } [ preference preference-value ] [ tag tag-value ] [ permanent ] [ description description-text ] ip route-static default-preference defaultpreference-value Required. The preference for static routes defaults to 60, tag defaults to 0, and no description information is configured. Do not specify the permanent and track keywords simultaneously. If the outgoing interface is down, the permanent static route is still active. Optional. Defaults to 60. 7

Configuring BFD for static routes IMPORTANT: If route flaps occur, enabling BFD could worsen them. BFD provides a general-purpose, standard, medium-, and protocol-independent fast failure detection mechanism. It can uniformly and quickly detect the failures of the bidirectional forwarding paths between two routers for protocols, such as routing protocols. For more information about BFD, see High Availability Configuration Guide. A dynamic routing protocol notifies BFD of its neighbor information. BFD uses such information to establish sessions with neighbors by sending BFD control packets. Static routing has no neighbor discovery mechanism. This section describes how static routing implements BFD. Enabling BFD control packet mode To use BFD control packets for bidirectional detection between two devices, enable BFD control packet mode for the static route of each device destined for the peer. To configure a static route and enable a BFD control packet mode for it, specify an outbound interface and a direct next hop. BFD establishes a direct session by specifying an indirect next hop and a specific BFD packet source address, or establishes an indirect session for the static route. Enabling a direct session Step Command Remarks 1. Enter system view. system-view 2. Configure a static route and enable BFD control packet mode for it. ip route-static dest-address { mask mask-length } interfacetype interface-number next-hop-address bfd control-packet [ preference preference-value ] [ tag tag-value ] [ description description-text ] Required. Enabling an indirect session Step Command Remarks 1. Enter system view. system-view 2. Configure a static route and enable BFD control packet mode for the route. ip route-static dest-address { mask mask-length } next-hopaddress bfd control-packet bfd-source ip-address [ preference preference-value ] [ tag tag-value ] [ description descriptiontext ] Required. 8

Configuring BFD echo packet mode With BFD echo packet mode enabled for a static route, the local device sends BFD echo packets to the peer, which loops it back to test the link. For echo mode, only one end needs to establish the BFD session and you must configure the source address of the echo packets. BFD cannot be used for a static route where the outbound interface includes the spoofing attribute. Step Command Remarks 1. Enter system view. system-view 2. Configure the source address of echo packets. 3. Enable BFD echo packet mode for static routes. bfd echo-source-ip ip-address ip route-static dest-address { mask mask-length } interfacetype interface-number next-hop-address bfd echo-packet [ preference preference-value ] [ tag tag-value ] [ description description-text ] Required. Defaults to unconfigured. Required. Configuring static route FRR When a link or a router fails, the packets on the path are discarded or a routing loop occurs. To avoid these issues, enable static route FRR. Figure 1 Network diagram for static route FRR Backup nexthop: Router C Router A Router B Nexthop: Router D Router E As shown in Figure 1, if a link fails, FRR designates a backup next hop by using a routing policy for routes matching the specified criteria. Packets are directed to the backup next hop to avoid traffic interruption. Reference a routing policy when configuring static route FRR. Static route FRR takes effect only for static routes that have both the outbound interface and next hop specified Use the apply fast-reroute backup-interface command to specify a backup next hop in a routing policy. For more information about the command and routing policy configurations, see Routing policy configuration. 9

Procedure IMPORTANT: Do not use FRR and BFD at the same time. Step Command Remarks 1. Enter system view. system-view 2. Configure the source address of echo packets. 3. Configure static route FRR. bfd echo-source-ip ip-address ip route-static fast-reroute routepolicy route-policy-name Required. Not configured by default. Required. Not configured by default. Displaying and maintaining static routes Task Command Remarks Display information of static routes. Delete all static routes. display ip routing-table protocol static [ inactive verbose ] [ { begin exclude include } regularexpression ] delete static-routes all Available in any view. Available in system view. For more information about the display ip routing-table protocol static [ inactive verbose ] [ { begin exclude include } regular-expression ] command, see Layer 3 IP Routing Command Reference. 10

Static route configuration examples Basic static route configuration example Network requirements The IP addresses and masks of the switches and hosts are shown in Figure 2. Static routes are required for interconnection between any two hosts. Figure 2 Network diagram for static route configuration Host B 1.1.6.2/24 Vlan-int500 1.1.4.2/30 Vlan-int100 1.1.6.1/24 Switch B Vlan-int600 1.1.5.5/30 Vlan-int500 1.1.4.1/30 Vlan-int600 1.1.5.6/30 Host A 1.1.2.2/24 Vlan-int300 1.1.2.3/24 Switch A Vlan-int900 1.1.3.1/24 Switch C Host C 1.1.3.2/24 Procedure 1. Configure IP addresses for interfaces. (Details not shown) 2. Configure static routes. # Configure a default route on Switch A. <SwitchA> system-view [SwitchA] ip route-static 0.0.0.0 0.0.0.0 1.1.4.2 # Configure two static routes on Switch B. <SwitchB> system-view [SwitchB] ip route-static 1.1.2.0 255.255.255.0 1.1.4.1 [SwitchB] ip route-static 1.1.3.0 255.255.255.0 1.1.5.6 # Configure a default route on Switch C <SwitchC> system-view [SwitchC] ip route-static 0.0.0.0 0.0.0.0 1.1.5.5 3. Configure the hosts. The default gateways for hosts A, B, and C are 1.1.2.3, 1.1.6.1 and 1.1.3.1, respectively. The configuration procedure is not shown. 4. Display the configuration. # Display the IP routing table of Switch A. [SwitchA] display ip routing-table Routing Tables: Public 11

Destinations : 7 Routes : 7 Destination/Mask Proto Pre Cost NextHop Interface 0.0.0.0/0 Static 60 0 1.1.4.2 Vlan500 1.1.2.0/24 Direct 0 0 1.1.2.3 Vlan300 1.1.2.3/32 Direct 0 0 127.0.0.1 InLoop0 1.1.4.0/30 Direct 0 0 1.1.4.1 Vlan500 1.1.4.1/32 Direct 0 0 127.0.0.1 InLoop0 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 # Display the IP routing table of Switch B. [SwitchB] display ip routing-table Routing Tables: Public Destinations : 10 Routes : 10 Destination/Mask Proto Pre Cost NextHop Interface 1.1.2.0/24 Static 60 0 1.1.4.1 Vlan500 1.1.3.0/24 Static 60 0 1.1.5.6 Vlan600 1.1.4.0/30 Direct 0 0 1.1.4.2 Vlan500 1.1.4.2/32 Direct 0 0 127.0.0.1 InLoop0 1.1.5.4/30 Direct 0 0 1.1.5.5 Vlan600 1.1.5.5/32 Direct 0 0 127.0.0.1 InLoop0 127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0 127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0 1.1.6.0/24 Direct 0 0 1.1.6.1 Vlan100 1.1.6.1/32 Direct 0 0 127.0.0.1 InLoop0 # Use the ping command on Host B to check the reachability of Host A, assuming Windows XP runs on the two hosts. C:\Documents and Settings\Administrator>ping 1.1.2.2 Pinging 1.1.2.2 with 32 bytes of data: Reply from 1.1.2.2: bytes=32 time=1ms TTL=255 Reply from 1.1.2.2: bytes=32 time=1ms TTL=255 Reply from 1.1.2.2: bytes=32 time=1ms TTL=255 Reply from 1.1.2.2: bytes=32 time=1ms TTL=255 Ping statistics for 1.1.2.2: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 1ms, Maximum = 1ms, Average = 1ms # Use the tracert command on Host B to check the reachability of Host A. C:\Documents and Settings\Administrator>tracert 1.1.2.2 Tracing route to 1.1.2.2 over a maximum of 30 hops 12

1 <1 ms <1 ms <1 ms 1.1.6.1 2 <1 ms <1 ms <1 ms 1.1.4.1 3 1 ms <1 ms <1 ms 1.1.2.2 Trace complete. Static route FRR configuration example Network requirements Switch S, Switch A, and Switch D are interconnected through static routes, as illustrated in Figure 3. Configure static route FRR so that when the link between Switch S and Switch D fails, traffic can be switched to Link B immediately. Figure 3 Network diagram for static route FRR configuration Switch A Loop 0 1.1.1.1/32 Switch S Vlan-int100 12.12.12.1/24 Vlan-int200 13.13.13.1/24 Vlan-int100 12.12.12.2/24 Link B Link A Vlan-int101 24.24.24.2/24 Vlan-int101 24.24.24.4/24 Vlan-int200 13.13.13.2/24 Switch D Loop 0 4.4.4.4/32 Configuration procedure 1. Configure IP addresses for the interfaces on each switch and configure static routes. Follow Figure 3 to configure the IP address and subnet mask of each interface on the switches. (Details not shown) Configure static routes on Switch S, Switch A, and Switch D so that Switch S can reach Loopback 0 on Switch D and Switch D can reach Loopback 0 on Switch S. # Configure a static route on Switch S. <SwitchS> system-view [SwitchS] ip route-static 4.4.4.4 32 vlan-interface 200 13.13.13.2 [SwitchS] ip route-static 4.4.4.4 32 vlan-interface 100 12.12.12.2 preference 65 # Configure a static route on Switch D. <SwitchD> system-view [SwitchD] ip route-static 1.1.1.1 32 vlan-interface 200 13.13.13.1 [SwitchD] ip route-static 1.1.1.1 32 vlan-interface 101 24.24.24.2 preference 65 # Configure a static route on Switch A. <SwitchA> system-view [SwitchA] ip route-static 4.4.4.4 32 vlan-interface 101 24.24.24.4 [SwitchA] ip route-static 1.1.1.1 32 vlan-interface 100 12.12.12.1 2. Configure static route FRR. # Configure Switch S. [SwitchS] bfd echo-source-ip 1.1.1.1 [SwitchS] ip ip-prefix abc index 10 permit 4.4.4.4 32 13

Verification [SwitchS] route-policy frr permit node 10 [SwitchS-route-policy] if-match ip-prefix abc [SwitchS-route-policy] apply fast-reroute backup-interface vlan-interface 100 backupnexthop 12.12.12.2 [SwitchS-route-policy] quit [SwitchS] ip route-static fast-reroute route-policy frr # Configure Switch D. [SwitchD] bfd echo-source-ip 4.4.4.4 [SwitchD] ip ip-prefix abc index 10 permit 1.1.1.1 32 [SwitchD] route-policy frr permit node 10 [SwitchD-route-policy] if-match ip-prefix abc [SwitchD-route-policy] apply fast-reroute backup-interface vlan-interface 101 backupnexthop 24.24.24.2 [SwitchD-route-policy] quit [SwitchD] ip route-static fast-reroute route-policy frr # Display route 4.4.4.4/32 on Switch S to view the backup next hop information. [SwitchS] display ip routing-table 4.4.4.4 verbose Routing Table : Public Summary Count : 1 Destination: 4.4.4.4/32 Protocol: Static Process ID: 0 Preference: 60 Cost: 0 IpPrecedence: QosLcId: NextHop: 13.13.13.2 Interface: vlan 200 BkNextHop: 12.12.12.2 BkInterface: vlan 100 RelyNextHop: 0.0.0.0 Neighbor : 0.0.0.0 Tunnel ID: 0x0 Label: NULL BKTunnel ID: 0x0 BKLabel: NULL State: Active Adv Age: 00h01m27s Tag: 0 # Display route 1.1.1.1/32 on Switch D to view the backup next hop information. [SwitchD] display ip routing-table 1.1.1.1 verbose Routing Table : Public Summary Count : 1 Destination: 1.1.1.1/32 Protocol: Static Process ID: 0 Preference: 60 Cost: 0 IpPrecedence: QosLcId: NextHop: 13.13.13.1 Interface: vlan 200 BkNextHop: 24.24.24.2 BkInterface: vlan 101 RelyNextHop: 0.0.0.0 Neighbor : 0.0.0.0 Tunnel ID: 0x0 Label: NULL BKTunnel ID: 0x0 BKLabel: NULL State: Active Adv Age: 00h01m27s 14

Tag: 0 BFD for static routes configuration example (direct session) Network requirements As shown in Figure 4, configure a static route to subnet 120.1.1.0/24 on Switch A and configure a static route to subnet 121.1.1.0/24 on Switch B. Enable BFD for both routes so that when the link between Switch A and Switch B through the Layer 2 switch fails, BFD can detect the failure immediately and Switch A and Switch B can communicate through Switch C. Figure 4 Network diagram for configuring BFD for static routes (direct session) 121.1.1.0/24 120.1.1.0/24 Switch A Vlan-int10 L2 Switch Vlan-int10 Switch B Vlan-int11 BFD Vlan-int13 Vlan-int11 Vlan-int13 Switch C Device Interface IP address Device Interface IP address Switch A Vlan-int10 12.1.1.1/24 Switch B Vlan-int10 12.1.1.2/24 Vlan-int11 10.1.1.102/24 Vlan-int13 13.1.1.1/24 Switch C Vlan-int11 10.1.1.100/24 Configuration procedure Vlan-int13 13.1.1.2/24 1. Configure IP addresses for the interfaces. (Details not shown) 2. Configure BFD. # Configure static routes on Switch A and enable BFD control packet mode for the static route through the Layer 2 switch. <SwitchA> system-view [SwitchA] interface vlan-interface10 [SwitchA-vlan-interface10] bfd min-transmit-interval 500 [SwitchA-vlan-interface10] bfd min-receive-interval 500 [SwitchA-vlan-interface10] bfd detect-multiplier 9 [SwitchA-vlan-interface10] quit [SwitchA] ip route-static 120.1.1.0 24 vlan-interface 10 12.1.1.2 bfd control-packet [SwitchA] ip route-static 120.1.1.0 24 vlan-interface 11 10.1.1.100 preference 65 [SwitchA] quit # Configure static routes on Switch B and enable BFD control packet mode for the static route through the Layer 2 switch. <SwitchB> system-view [SwitchB] interface vlan-interface10 [SwitchB-vlan-interface10] bfd min-transmit-interval 500 [SwitchB-vlan-interface10] bfd min-receive-interval 500 15

[SwitchB-vlan-interface10] bfd detect-multiplier 9 [SwitchB-vlan-interface10]] quit [SwitchB] ip route-static 121.1.1.0 24 vlan-interface 10 12.1.1.1 bfd control-packet [SwitchB] ip route-static 121.1.1.0 24 vlan-interface 13 13.1.1.2 preference 65 [SwitchB] quit Verification The following operations are performed on Switch A. The operations on Switch B are similar. <SwitchA> display bfd session Total Session Num: 1 Init Mode: Active Session Working Under Ctrl Mode: LD/RD SourceAddr DestAddr State Holdtime Interface 4/7 12.1.1.1 12.1.1.2 Up 2000ms Vlan10 # Display the static route information of Switch A. <SwitchA> display ip routing-table protocol static Public Routing Table : Static Summary Count : 2 Static Routing table Status : < Active> Summary Count : 1 Destination/Mask Proto Pre Cost NextHop Interface 120.1.1.0/24 Static 60 0 12.1.1.2 Vlan10 Direct Routing table Status : <Inactive> Summary Count : 1 Destination/Mask Proto Pre Cost NextHop Interface 120.1.1.0/24 Static 65 0 10.1.1.100 Vlan11 # Enable BFD debugging on Switch A. When the link between Switch A and Layer 2 switch fails, Switch A can detect the failure. <SwitchA> debugging bfd event <SwitchA> debugging bfd scm <SwitchA> terminal debugging %Jul 27 10:18:18:672 2007 SwitchA BFD/4/LOG:Sess[12.1.1.1/12.1.1.2, Vlan10,Ctrl], Sta: UP->DOWN, Diag: 1 *Jul 27 10:18:18:672 2007 SwitchA BFD/7/EVENT:Send sess-down Msg, [Src:12.1.1.1,Dst:12.1.1.2, Vlan10,Ctrl], instance:0, protocol:static *Jul 27 10:18:19:172 2007 SwitchA BFD/7/EVENT:Receive Delete-sess, [Src:12.1.1.1,Dst:12.1.1.2, Vlan10,Ctrl], Direct, Instance:0x0, Proto:STATIC *Jul 27 10:18:19:172 2007 SwitchA BFD/7/EVENT:Notify driver to stop receiving bfd control packet # Display the static route information on Switch A again. Switch A communicates with Switch B over the static route passing Switch C now. <SwitchA> display ip routing-table protocol static Public Routing Table : Static Summary Count : 2 16

Static Routing table Status : < Active> Summary Count : 1 Destination/Mask Proto Pre Cost NextHop Interface 120.1.1.0/24 Static 65 0 10.1.1.100 Vlan11 Static Routing table Status : < Inactive> Summary Count : 1 Destination/Mask Proto Pre Cost NextHop Interface 120.1.1.0/24 Static 60 0 12.1.1.2 Vlan10 BFD for static routes configuration example (indirect session) Network requirements As shown in Figure 5, Switch A has a route to interface Loopback1 (2.2.2.9/32) on Switch B, with outbound interface VLAN-interface 10. Switch B has a route to interface Loopback1 (1.1.1.9/32) on Switch A, with outbound interface VLAN-interface 12. Switch D has a route to 1.1.1.9/32, with outbound interface VLAN-interface 10, and a route to 2.2.2.9/32, with outbound interface VLAN-interface 12. Configure a static route to subnet 120.1.1.0/24 on Switch A and configure a static route to subnet 121.1.1.0/24 on Switch B. Enable BFD for both routes so that when the link between Switch A and Switch B through Switch D fails, BFD can detect the failure immediately and Switch A and Switch B can communicate through Switch C. Figure 5 Network diagram for configuring BFD for static routes (indirect session) 121.1.1.0/24 Loop1 Loop1 1.1.1.9/32 2.2.2.9/32 120.1.1.0/24 Switch D Switch A Vlan-int11 Vlan-int10 Vlan-int10 BFD Vlan-int12 Vlan-int12 Vlan-int13 Switch B Vlan-int11 Vlan-int13 Switch C Device Interface IP address Device Interface IP address Switch A Vlan-int10 12.1.1.1/24 Switch B Vlan-int12 11.1.1.1/24 Vlan-int11 10.1.1.102/24 Vlan-int13 13.1.1.1/24 Loop1 1.1.1.9/32 Loop1 2.2.2.9/32 Switch C Vlan-int11 10.1.1.100/24 Switch D Vlan-int10 12.1.1.2/24 Vlan-int13 13.1.1.2/24 Vlan-int12 11.1.1.2/24 Procedure 1. Configure IP addresses for the interfaces. (Details not shown) 2. Configure BFD. # Configure static routes on Switch A and enable BFD control packet mode for the static route through Switch D. 17