Configuring static routing

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

Table of Contents 1 Static Routing Configuration 1-1

Table of Contents 1 Static Routing Configuration 1-1

HPE FlexNetwork HSR6800 Routers

Table of Contents 1 Static Routing Configuration 1-1

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

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

HP 5920 & 5900 Switch Series

IP Routing Volume Organization

HP 5920 & 5900 Switch Series

HP FlexFabric 7900 Switch Series

HPE FlexNetwork 5510 HI Switch Series

HP 5120 EI Switch Series

H3C S10500 Switch Series

H3C MSR Series Routers

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

HP FlexFabric 5700 Switch Series

H3C S5130-EI Switch Series

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

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

H3C S5120-HI Switch Series

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

H3C S5120-SI Switch Series

HP 6125G & 6125G/XG Blade Switches

HP 7500 Switch Series

Contents. Configuring GRE 1

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

H3C S5820X&S5800 Series Ethernet Switches

Configuring MPLS L2VPN

H3C S10500 Switch Series

HP 5920 & 5900 Switch Series

HP 6125 Blade Switch Series

Table of Contents 1 GRE Configuration Point to Multi-Point GRE Tunnel Configuration 2-1

Layer 3 - IP Routing Command Reference

Contents. Configuring GRE 1

Using ping, tracert, and system debugging

NOTE: The S9500E switch series supports HDLC encapsulation only on POS interfaces. Enabling HDLC encapsulation on an interface

Configuring MPLS L2VPN

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

Operation Manual Routing Protocol. Table of Contents

Configuring MPLS L2VPN

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

HP 5920 & 5900 Switch Series

Configuring IP addressing

Configuring basic MBGP

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

Configuring VPLS. VPLS overview. Operation of VPLS. Basic VPLS concepts

HP A-F1000-A-EI_A-F1000-S-EI VPN Firewalls

Configuring Static Routing

HP FlexFabric 7900 Switch Series

OSPF. About OSPF. CLI Book 1: Cisco ASA Series General Operations CLI Configuration Guide, 9.4 1

Contents. EVPN overview 1

HP Routing Switch Series

Implementing Static Routes

Configuring Virtual Private LAN Services

Implementing Static Routes on Cisco IOS XR Software

Basic MPLS commands. display mpls forwarding ilm. Syntax. Views. Predefined user roles. Parameters. Usage guidelines. Examples

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 1 System Maintenance and Debugging Commands 1-1

H3C S7500E-X OSPF Configuration Examples

HP FlexFabric 5930 Switch Series

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

Table of Contents Chapter 1 Tunneling Configuration

Table of Contents Chapter 1 IP Addressing Configuration

Table of Contents 1 IPv6 Configuration IPv6 Application Configuration 2-1

H3C SR6600 Routers. MPLS Configuration Guide. Hangzhou H3C Technologies Co., Ltd.

Table of Contents 1 System Maintaining and Debugging 1-1

Table of Contents 1 IPv6 Configuration IPv6 Application Configuration 2-1

Connecting to a Service Provider Using External BGP

H3C Firewall and UTM Devices L2TP VPN Virtual Firewall Configuration Examples (Comware V5)

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

Contents. Ping, tracert, and system debugging commands 1. debugging 1 display debugging 1 ping 2 ping ipv6 5 tracert 7 tracert ipv6 10

HPE FlexFabric 5940 Switch Series

Configuring PIM snooping

IPv6 Switching: Provider Edge Router over MPLS

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

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

Operation Manual BGP. Table of Contents

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

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

Implementing MPLS VPNs over IP Tunnels

Accurate study guides, High passing rate! IT TEST BOOK QUESTION & ANSWER. Ittestbook provides update free of charge in one year!

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

HP 6125G & 6125G/XG Blade Switches

Configuring MPLS, MPLS VPN, MPLS OAM, and EoMPLS

HP High-End Firewalls

Ping, tracert and system debugging commands

GRE Tunnel with VRF Configuration Example

HP 5130 EI Switch Series

Connecting to a Service Provider Using External BGP

HP 6125 Blade Switch Series

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

H3C BGP Configuration Examples

HP Routing Switch Series

Table of Contents 1 System Maintaining and Debugging Commands 1-1

CCIE Service Provider Sample Lab. Part 2 of 7

Contents. Configuring EVI 1

OSPF Commands. Cisco IOS IP Command Reference, Volume 2 of 3: Routing Protocols IP2R-61

H3C S10500 IP Unnumbered Configuration Examples

Contents. IP addressing configuration commands 1 display ip interface 1 display ip interface brief 3 ip address 5

Transcription:

Contents Configuring static routing 1 Introduction 1 Static route 1 Default route 1 Static route configuration items 1 Configuring a static route 2 Configuration prerequisites 2 Configuration procedure 2 Detecting reachability of the static route s next hop 3 Detecting next hop reachability through BFD 3 Detecting next hop reachability through track 4 Configuring BFD for static routes 5 BFD control packet mode 5 BFD echo packet mode 6 Configuring static route FRR 7 Displaying and maintaining static routes 8 Static route configuration examples 8 Basic static route configuration example 8 Static route FRR configuration example 11 BFD for static routes configuration example (direct session) 12 BFD for static routes configuration example (indirect session) 15 i

Configuring static routing Introduction Static route Static routes are manually configured. If a network s 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 routes will be unreachable and the network breaks. The network administrator has to modify the static routes manually. 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 match no entry in the routing table. It can be configured in either of the following ways: The network administrator can configure a default route with both destination and mask being 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, which install the default route with the next hop being the upstream router. Static route configuration items Before you configure a static route, you must know the following concepts: Destination address and mask In the ip route-static command, an IPv4 address is in dotted decimal format and 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; otherwise, the route configuration will not take effect. In fact, each route lookup operation has to find the next hop to resolve the destination link layer address. When you specify the output interface, follow these guidelines: If the output interface is a Null 0 interface, no next hop address is required. If the output interface is a point-to-point interface, no next hop address is required. You need not change the configuration even if the peer s address changes. For example, a PPP interface 1

obtains the peer s IP address through PPP negotiation, so you need only specify the output interface. If the output interface is an NBMA or P2MP interface, which support point-to-multipoint network, the IP address to link layer address mapping must be established. Therefore, H3C recommends you to configure both the next hop IP address and the output interface. H3C does not recommend you to specify a broadcast interface (such as an Ethernet interface or VLAN interface) as the output interface, because a broadcast interface may have multiple next hops. If you have to do so, you must specify the corresponding next hop for the output interface. Other attributes You can configure different priorities for different static routes so that route management policies can be more flexible. For example, specifying the same priority for different routes to the same destination enables load sharing, but specifying different priorities for these routes enables route backup. Configuring a static route Configuration prerequisites Before you configure a static route, complete the following tasks: Configure the physical parameters for related interfaces. Configure the link-layer attributes for related interfaces. Configure the IP addresses for related interfaces. Configuration procedure To configure a static route: Step Command Remarks 1. Enter system view. system-view N/A 2. Configure a static route. Approach 1: ip route-static dest-address { mask mask-length } { next-hop-address [ track track-entry-number ] interface-type interface-number [ next-hop-address ] vpn-instance d-vpn-instance-name next-hop-address [ track track-entry-number ] } [ preference preference-value ] [ tag tag-value ] [ permanent ] [ description description-text ] Approach 2: ip route-static vpn-instance s-vpn-instance-name&<1-6> dest-address { mask mask-length } { next-hop-address [ public ] [ track track-entry-number ] interface-type interface-number [ next-hop-address ] vpn-instance d-vpn-instance-name next-hop-address track track-entry-number } [ preference preference-value ] [ tag tag-value ] [ permanent ] [ description description-text ] By default, preference for static routes is 60, tag is 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. 2

Step Command Remarks 3. Configure the default preference for static routes. ip route-static default-preference default-preference-value Optional. 60 by default. NOTE: When you configure 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 default preference will be used. Reconfiguring the default preference applies only to newly created static routes. You can flexibly control static routes by configuring tag values and using the tag values in the routing policy. If the destination IP address and mask are both configured as 0.0.0.0 with the ip route-static command, the route is the default route. For detailed information about track, see High Availability Configuration Guide. Detecting reachability of the static route s next hop If a static route fails due to a topology change or a fault, traffic over the route is interrupted. To improve reliability, the system must detect the reachability of the static route s next hop and switch to a backup route once the next hop is unreachable. There are two methods for this purpose. Only one of the two methods can be used at a time. Detecting next hop reachability through BFD Bidirectional forwarding detection (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 upper-layer protocols, such as routing protocols and Multiprotocol Label Switching (MPLS). For more information about BFD, see High Availability Configuration Guide. After a static route is configured, you can enable BFD to detect the reachability of the static route's next hop. Network requirements To detect the reachability of the static route's next hop through BFD, you must enable BFD first. For BFD configuration, see High Availability Configuration Guide. Configuration procedure To detect reachability of the static route s next hop through BFD: Step Command Remarks 1. Enter system view. system-view N/A 3

Step Command Remarks 2. Detect reachability of the static route s next hop through BFD. Approach 1: ip route-static dest-address { mask mask-length } interface-type interface-number next-hop-address [ bfd { control-packet echo-packet } ] [ preference preference-value ] [ tag tag-value ] [ description description-text ] Approach 2: ip route-static vpn-instance s-vpn-instance-name&<1-6> dest-address { mask mask-length } interface-type interface-number next-hop-address [ bfd { control-packet echo-packet } ] [ preference preference-value ] [ tag tag-value ] [ description description-text ] Not configured by default NOTE: To implement BFD in the control-packet mode, the remote end must create a BFD session; otherwise the BFD function cannot work. To implement BFD in the echo-packet mode, the BFD function can work without the remote end needing to create any BFD session. If a route flap occurs, enabling BFD may worsen the flapping. Be cautious for use of this feature. Detecting next hop reachability through track If you specify the next hop but not outgoing interface when configuring a static route, you can associate the static route with a track entry to check the static route validity. When the track entry is positive, the static route's next hop is reachable and the static route takes effect; When the track entry is negative, the static route's next hop is unreachable and the static route is invalid. For more information about track, see High Availability Configuration Guide. Network requirements To detect the reachability of a static route's next hop through a Track entry, you must create a Track first. For the Track configuration procedure, see High Availability Configuration Guide. Configuration procedure To detect the reachability of a static route's next hop through Track: Step Command Remarks 1. Enter system view. system-view N/A 4

Step Command Remarks 2. Associate the static route with a track entry. Approach 1: ip route-static dest-address { mask mask-length } { next-hop-address vpn-instance d-vpn-instance-name next-hop-address } track track-entry-number [ preference preference-value ] [ tag tag-value ] [ description description-text ] Approach 2: ip route-static vpn-instance s-vpn-instance-name&<1-6> dest-address { mask mask-length } { next-hop-address [ public ] track track-entry-number vpn-instance d-vpn-instance-name next-hop-address track track-entry-number } [ preference preference-value ] [ tag tag-value ] [ description description-text ] Not configured by default NOTE: To configure this feature for an existing static route, simply associate the static route with a track entry. For a non-existent static route, configure it and associate it with a Track entry. If the track module uses NQA to detect the reachability of the private network static route's next hop, the VPN instance number of the static route's next hop must be identical to that configured in the NQA test group. If a static route needs route recursion, the associated track entry must monitor the next hop of the recursive route instead of that of the static route. Otherwise, a valid route may be mistakenly considered invalid. Configuring BFD for static routes 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. BFD control packet mode To use BFD control packets for bidirectional detection between two devices, enable BFD control packet mode for each device s static route destined to the peer. To configure a static route and enable BFD control packet mode for it, specify an outbound interface and a direct next hop BFD establishes a direct session, or specify an indirect next hop and a specific BFD packet source address BFD establishes an indirect session for the static route. To configure a static route with BFD control packet mode enabled (direct session): Step Command Remarks 1. Enter system view. system-view N/A 5

Step Command Remarks 2. Configure a static route and enable BFD control packet mode for it. Approach 1: ip route-static dest-address { mask mask-length } interface-type interface-number next-hop-address bfd control-packet [ preference preference-value ] [ tag tag-value ] [ description description-text ] Approach 2: ip route-static vpn-instance s-vpn-instance-name&<1-6> dest-address { mask mask-length } interface-type interface-number next-hop-address bfd control-packet [ preference preference-value ] [ tag tag-value ] [ description description-text ] Use either approach. To configure a static route with BFD control packet mode enabled (indirect session): Step Command Remarks 1. Enter system view. system-view N/A 2. Configure a static route and enable BFD control packet mode for it. Approach 1: ip route-static dest-address { mask mask-length } next-hop-address bfd control-packet bfd-source ip-address [ preference preference-value ] [ tag tag-value ] [ description description-text ] Approach 2: ip route-static vpn-instance s-vpn-instance-name&<1-6> dest-address { mask mask-length } next-hop-address bfd control-packet bfd-source ip-address [ preference preference-value ] [ tag tag-value ] [ description description-text ] Use either approach. 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. To configure BFD echo packet mode for static routes: Step Command Remarks 1. Enter system view. system-view N/A 2. Configure the source address of echo packets. bfd echo-source-ip ip-address Not configured by default 6

Step Command Remarks 3. Enable BFD echo packet mode for static routes. Approach 1: ip route-static dest-address { mask mask-length } interface-type interface-number next-hop-address bfd echo-packet [ preference preference-value ] [ tag tag-value ] [ description description-text ] Approach 2: ip route-static vpn-instance s-vpn-instance-name&<1-6> dest-address { mask mask-length } interface-type interface-number next-hop-address bfd echo-packet [ preference preference-value ] [ tag tag-value ] [ description description-text ] Use either approach. NOTE: If route flaps occur, enabling BFD could worsen them. For the echo mode, only one end needs to establish the BFD session, and the source address of echo packets must be configured. BFD cannot be used for a static route with the outbound interface having the spoofing attribute. BFD can be used for static routes with direct next hops rather than indirect next hops. A BFD session is established at only one end when the echo mode is used. The BFD echo packet mode is not supported on tunnel interfaces at present. For how to configure static routing, see the chapter Configuring static routing. Configuring static route FRR When a link or a router fails, the packets on the path may be discarded, or a routing loop occurs. To avoid such problems, you can enable static route fast reroute (FRR). Figure 1 Network diagram As shown in Figure 1, upon a link failure, 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. Configuration prerequisites Create a routing policy to be referenced by FRR and use the apply fast-reroute backup-interface command to specify a backup next hop in the routing policy. For more information about the command and routing policy configurations, see the chapter Configuring routing policies. Configuration procedure To configure static route FRR: 7

Step Command Remarks 1. Enter system view. system-view N/A 2. Configure the source address of echo packets. 3. Configure static route FRR. bfd echo-source-ip ip-address ip route-static [ vpn-instance vpn-instance-name ] fast-reroute route-policy route-policy-name Not configured by default Not configured by default NOTE: Static route FRR takes effect only for static routes that have both the outbound interface and next hop specified. Do not use FRR and BFD at the same time. Displaying and maintaining static routes Task Command Remarks Display information of static routes. Delete all the static routes. display ip routing-table protocol static [ inactive verbose ] [ { begin exclude include } regular-expression ] delete [ vpn-instance vpn-instance-name ] static-routes all Available in any view Available in system view NOTE: For more information about the display ip routing-table protocol static [ inactive verbose ] [ { begin exclude include } regular-expression ] command, see the chapter IP routing basics configuration commands. Static route configuration examples Basic static route configuration example Network requirements The routers interfaces and the hosts IP addresses and masks are shown in Figure 2. Static routes are required for interconnections between any two hosts. 8

Figure 2 Network diagram Configuration procedure 1. Configuring IP addresses for interfaces. (Details not shown) 2. Configuring static routes: # Configure a default route on Router A. <RouterA> system-view [RouterA] ip route-static 0.0.0.0 0.0.0.0 1.1.4.2 # Configure two static routes on Router B. <RouterB> system-view [RouterB] ip route-static 1.1.2.0 255.255.255.0 1.1.4.1 [RouterB] ip route-static 1.1.3.0 255.255.255.0 1.1.5.6 # Configure a default route on Router C. <RouterC> system-view [RouterC] ip route-static 0.0.0.0 0.0.0.0 1.1.5.5 3. Configure the hosts: The default gateways for Host A, Host B and Host C are 1.1.2.3, 1.1.6.1 and 1.1.3.1 respectively. The configuration procedure is not shown. 4. Verify the configuration: # Display the IP routing table of Router A. [RouterA] display ip routing-table Routing Tables: Public Destinations : 7 Routes : 7 0.0.0.0/0 Static 60 0 1.1.4.2 GE1/1/2 1.1.2.0/24 Direct 0 0 1.1.2.3 GE1/1/1 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 GE1/1/2 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 9

# Display the IP routing table of Router B. [RouterB] display ip routing-table Routing Tables: Public Destinations : 10 Routes : 10 1.1.2.0/24 Static 60 0 1.1.4.1 GE1/1/1 1.1.3.0/24 Static 60 0 1.1.5.6 GE1/1/2 1.1.4.0/30 Direct 0 0 1.1.4.2 GE1/1/1 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 GE1/1/2 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 GE1/1/3 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=128 Reply from 1.1.2.2: bytes=32 time=1ms TTL=128 Reply from 1.1.2.2: bytes=32 time=1ms TTL=128 Reply from 1.1.2.2: bytes=32 time=1ms TTL=128 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 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. 10

Static route FRR configuration example Network requirements Router S, Router A, and Router D are interconnected through static routes, as illustrated in Figure 3. Configure static route FRR so that when the link between Router S and Router D fails, traffic can be switched to Link B immediately. Figure 3 Network diagram Configuration procedure 1. Configure IP addresses for the interfaces on each router and configure static routes: Follow Figure 3 to configure the IP address and subnet mask of each interface on the routers. (Details not shown) Configure static routes on Router S, Router A, and Router D so that Router S can reach Loopback 0 on Router D and Router D can reach Loopback 0 on Router S. # Configure a static route on Router S. <RouterS> system-view [RouterS] ip route-static 4.4.4.4 32 GigabitEthernet 3/1/2 13.13.13.2 [RouterS] ip route-static 4.4.4.4 32 GigabitEthernet 3/1/2 12.12.12.2 preference 65 # Configure a static route on Router D. <RouterD> system-view [RouterD] ip route-static 1.1.1.1 32 GigabitEthernet 3/1/2 13.13.13.1 [RouterD] ip route-static 1.1.1.1 32 GigabitEthernet 3/1/2 24.24.24.2 preference 65 # Configure a static route on Router A. <RouterA> system-view [RouterA] ip route-static 4.4.4.4 32 GigabitEthernet 3/1/2 24.24.24.4 [RouterA] ip route-static 1.1.1.1 32 GigabitEthernet 3/1/1 12.12.12.1 2. Configure static route FRR: # Configure Router S. [RouterS] bfd echo-source-ip 1.1.1.1 [RouterS] ip ip-prefix abc index 10 permit 4.4.4.4 32 [RouterS] route-policy frr permit node 10 [RouterS-route-policy] if-match ip-prefix abc [RouterS-route-policy] apply fast-reroute backup-interface GigabitEthernet 3/1/1 backup-nexthop 12.12.12.2 [RouterS-route-policy] quit [RouterS] ip route-static fast-reroute route-policy frr # Configure Router D. 11

[RouterD] bfd echo-source-ip 4.4.4.4 [RouterD] ip ip-prefix abc index 10 permit 1.1.1.1 32 [RouterD] route-policy frr permit node 10 [RouterD-route-policy] if-match ip-prefix abc [RouterD-route-policy] apply fast-reroute backup-interface GigabitEthernet 3/1/1 backup-nexthop 24.24.24.2 [RouterD-route-policy] quit [RouterD] ip route-static fast-reroute route-policy frr 3. Verify the configuration: # Display route 4.4.4.4/32 on Router S to view the backup next hop information. [RouterS] display ip routing-table 4.4.4.4 verbose Routing Table : Public Destination: 4.4.4.4/32 Protocol: Static Process ID: 0 Preference: 60 Cost: 0 IpPrecedence: QosLcID: NextHop: 13.13.13.2 Interface: GigabitEthernet3/1/2 BkNextHop: 12.12.12.2 BkInterface: GigabitEthernet3/1/1 RelyNextHop: 0.0.0.0 Neighbor : 0.0.0.0 Tunnel ID: 0x0 Label: NULL State: Active Adv Age: 00h01m27s Tag: 0 # Display route 1.1.1.1/32 on Router D to view the backup next hop information. [RouterS] display ip routing-table 1.1.1.1 verbose Routing Table : Public Destination: 1.1.1.1/32 Protocol: Static Process ID: 0 Preference: 60 Cost: 0 IpPrecedence: QosLcID: NextHop: 13.13.13.1 Interface: GigabitEthernet3/1/2 BkNextHop: 24.24.24.2 BkInterface: GigabitEthernet3/1/1 RelyNextHop: 0.0.0.0 Neighbor : 0.0.0.0 Tunnel ID: 0x0 Label: NULL State: Active Adv Age: 00h01m27s 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 Router A and configure a static route to subnet 121.1.1.0/24 on Router B. Enable BFD for both routes so that when the link between Router A and Router B through the Layer 2 switch fails, BFD can detect the failure immediately and Router A and Router B can communicate through Router C. 12

Figure 4 Network diagram 121.1.1.0/24 120.1.1.0/24 Router A GE3/1/1 L 2 Switch GE3/1/1 Router B GE3/1/2 BFD GE3/1/2 GE3/1/1 GE3/1/2 Device Interface IP address Device Interface IP address Router A GE3/1/1 12.1.1.1/24 Router B GE3/1/1 12.1.1.2/24 GE3/1/2 10.1.1.102/24 GE3/1/2 13.1.1.1/24 Router C GE3/1/1 10.1.1.100/24 Configuration procedure Router C GE3/1/2 13.1.1.2/24 1. Configure IP addresses for the interfaces. (Details not shown) 2. Configure BFD: # Configure static routes on Router A and enable BFD control packet mode for the static route through the Layer 2 switch. <RouterA> system-view [RouterA] interface GigabitEthernet 3/1/1 [RouterA-GigabitEthernet3/1/1] bfd min-transmit-interval 500 [RouterA-GigabitEthernet3/1/1] bfd min-receive-interval 500 [RouterA-GigabitEthernet3/1/1] bfd detect-multiplier 9 [RouterA-GigabitEthernet3/1/1] quit [RouterA] ip route-static 120.1.1.0 24 GigabitEthernet 3/1/1 12.1.1.2 bfd control-packet [RouterA] ip route-static 120.1.1.0 24 GigabitEthernet 3/1/2 10.1.1.100 preference 65 [RouterA] quit # Configure static routes on Router B and enable BFD control packet mode for the static route through the Layer 2 switch. <RouterB> system-view [RouterB] interface GigabitEthernet 3/1/1 [RouterB-GigabitEthernet3/1/1] bfd min-transmit-interval 500 [RouterB-GigabitEthernet3/1/1] bfd min-receive-interval 500 [RouterB-GigabitEthernet3/1/1] bfd detect-multiplier 9 [RouterB-GigabitEthernet3/1/1] quit [RouterB] ip route-static 121.1.1.0 24 GigabitEthernet 3/1/1 12.1.1.1 bfd control-packet [RouterB] ip route-static 121.1.1.0 24 GigabitEthernet 3/1/2 13.1.1.2 preference 65 [RouterB] quit 3. Verify the configuration: The following operations are performed on Router A. The operations on Router B are similar. <RouterA> display bfd session 13

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 GigabitEthernet3/1/1 # Display the static route information of Router A. <RouterA> display ip routing-table protocol static Public Routing Table : Static Summary Count : 2 Static Routing table Status : < Active> 120.1.1.0/24 Static 60 0 12.1.1.2 GE3/1/1 Direct Routing table Status : <Inactive> 120.1.1.0/24 Static 65 0 10.1.1.100 GE3/1/2 # Enable BFD debugging on Router A. When the link between Router A and the switch fails, Router A can detect the failure. <RouterA> debugging bfd event <RouterA> debugging bfd scm <RouterA> terminal debugging %Jul 27 10:18:18:672 2007 RouterA BFD/4/LOG:Sess[12.1.1.1/12.1.1.2, GigabitEthernet3/1/1,Ctrl], Sta: UP->DOWN, Diag: 1 *Jul 27 10:18:18:672 2007 RouterA BFD/7/EVENT:Send sess-down Msg, [Src:12.1.1.1,Dst:12.1.1.2,GigabitEthernet3/1/1,Ctrl], instance:0, protocol:static *Jul 27 10:18:19:172 2007 RouterA BFD/7/EVENT:Receive Delete-sess, [Src:12.1.1.1,Dst:12.1.1.2,GigabitEthernet3/1/1,Ctrl], Direct, Instance:0x0, Proto:STATIC *Jul 27 10:18:19:172 2007 RouterA BFD/7/EVENT:Notify driver to stop receiving bf # Display the static route information on Router A again. Router A communicates with Router B over the static route passing Router C now. <RouterA> display ip routing-table protocol static Public Routing Table : Static Summary Count : 2 Static Routing table Status : < Active> 120.1.1.0/24 Static 65 0 10.1.1.100 GE3/1/2 Static Routing table Status : < Inactive> 14

120.1.1.0/24 Static 60 0 12.1.1.2 GE3/1/1 BFD for static routes configuration example (indirect session) Network requirements As shown in Figure 5, Router A has a route to interface Loopback1 (2.2.2.9/32) on Router B, with the outbound interface GigabitEthernet 3/1/1. Router B has a route to interface Loopback1 (1.1.1.9/32) on Router A, with the outbound interface GigabitEthernet 3/1/1. Router D has a route to 1.1.1.9/32, with the outbound interface GigabitEthernet 3/1/1, and a route to 2.2.2.9/32, with the outbound interface GigabitEthernet 3/1/2. Configure a static route to subnet 120.1.1.0/24 on Router A and configure a static route to subnet 121.1.1.0/24 on Router B. Enable BFD for both routes so that when the link between Router A and Router B through Router D fails, BFD can detect the failure immediately and Router A and Router B can communicate through Router C. Figure 5 Network diagram GE3/1/2 GE3/1/2 Device Interface IP address Device Interface IP address Router A GE3/1/1 12.1.1.1/24 Router B GE3/1/1 11.1.1.2/24 GE3/1/2 10.1.1.102/24 GE3/1/2 13.1.1.2/24 Loop1 1.1.1.9/32 Loop1 2.2.2.9/32 Router C GE3/1/1 10.1.1.100/24 Router D GE3/1/1 12.1.1.2/24 GE3/1/2 13.1.1.2/24 GE3/1/2 11.1.1.1/24 Configuration procedure 1. Configure IP addresses for the interfaces. (Details not shown) 2. Configure BFD: # Configure static routes on Router A and enable BFD control packet mode for the static route through Router D. <RouterA> system-view [RouterA] interface loopback 1 [RouterA-LoopBack1] bfd min-transmit-interval 500 [RouterA-LoopBack1] bfd min-receive-interval 500 [RouterA-LoopBack1] bfd detect-multiplier 9 [RouterA-LoopBack1] quit [RouterA] ip route-static 120.1.1.0 24 2.2.2.9 bfd control-packet bfd-source 1.1.1.9 [RouterA] ip route-static 120.1.1.0 24 GigabitEthernet 3/1/2 10.1.1.100 preference 65 15

[RouterA] quit # Configure static routes on Router B and enable BFD control packet mode for the static route through Router D. <RouterB> system-view [RouterB] interface loopback 1 [RouterB-LoopBack1] bfd min-transmit-interval 500 [RouterB-LoopBack1] bfd min-receive-interval 500 [RouterB-LoopBack1] bfd detect-multiplier 9 [RouterB-LoopBack1] quit [RouterB] ip route-static 121.1.1.0 24 1.1.1.9 bfd control-packet bfd-source 2.2.2.9 [RouterB] ip route-static 121.1.1.0 24 GigabitEthernet 3/1/2 13.1.1.2 preference 65 [RouterB] quit 3. Verify the configuration: The following operations are performed on Router A. The operations on Router B are similar. # Display the BFD session information of Router A. <RouterA> display bfd session Total session number: 1 Up session number: 0 Init mode: Active IPv4 session working under Ctrl mode: LD/RD SourceAddr DestAddr State Holdtime Interface 4/7 1.1.1.9 2.2.2.9 Up 2000ms Loop1 # Display the static route information of Router A. <RouterA> display ip routing-table protocol static Public Routing Table : Static Summary Count : 2 Static Routing table Status : < Active> 120.1.1.0/24 Static 60 0 2.2.2.9 GE3/1/1 Static Routing table Status : <Inactive> 120.1.1.0/24 Static 65 0 10.1.1.100 GE3/1/2 # Enable BFD debugging on Router A. When the link between Router A and Router D fails, Router A can detect the failure. <RouterA> debugging bfd event <RouterA> debugging bfd scm <RouterA> terminal debugging %Oct 10 10:18:18:672 2010 RouterA BFD/4/LOG:Sess[1.1.1.9/2.2.2.9, Loop1,Ctrl], Sta: UP->DOWN, Diag: 1 16

*Oct 10 10:18:18:672 2010 RouterA BFD/7/EVENT:Send sess-down Msg, [Src:1.1.1.9,Dst:2.2.2.9,Loop1,Ctrl], instance:0, protocol:static # Display the static route information on Router A again. Router A communicates with Router B over the static route passing Router C now. <RouterA> display ip routing-table protocol static Public Routing Table : Static Summary Count : 2 Static Routing table Status : < Active> 120.1.1.0/24 Static 65 0 10.1.1.100 GE3/1/2 Static Routing table Status : < Inactive> 120.1.1.0/24 Static 60 0 2.2.2.9 17