06-Layer 3 - IP Routing Configuration Guides

HomeSupportSwitchesH3C S7500X Switch SeriesConfigure & DeployConfiguration GuidesH3C S7500X Switch Series Configuration Guides-Release7634Pxx-6W10006-Layer 3 - IP Routing Configuration Guides
02-Static routing configuration
Title Size Download
02-Static routing configuration 223.05 KB

Configuring static routing

Static routes are manually configured. If a network's topology is simple, you only need to configure static routes for the network to work correctly.

Static routes cannot adapt to network topology changes. If a fault or a topological change occurs in the network, the network administrator must modify the static routes manually.

Configuring a static route

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.

You can associate Track with a static route to monitor the reachability of the next hops. For more information about Track, see High Availability Configuration Guide.

If you configure only VPN instance settings without specifying a next hop for a static route, you must also configure service loopback group settings for the static route to take effect.

To configure service loopback group settings for a static route:

1.     Create a service loopback group of the inter-VPN forwarding service type.

2.     Add any Layer 2 Ethernet interface to the service loopback group. To ensure that the static route can correctly guide traffic forwarding, do not add the Layer 2 Ethernet interfaces on the following cards to the service loopback group:

¡     SF interface modules.

¡     EC interface modules.

¡     SA interface modules.

¡     SC interface modules.

For more information about service loopback group configuration, see Layer 2—LAN Switching Configuration Guide.

To configure a static route:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Configure a static route.

·     Method 1:
ip
route-static dest-address { mask-length | mask } interface-type interface-number [ next-hop-address [ nexthop-index index-string ] ] [ permanent | track track-entry-number ] [ preference preference ] [ tag tag-value ] [ recursive-lookup ] [ description text ]
ip route-static dest-address { mask-length | mask } { next-hop-address [ nexthop-index index-string ] [ recursive-lookup host-route ] | vpn-instance d-vpn-instance-name next-hop-address [ nexthop-index index-string ] [ recursive-lookup host-route ] } [ permanent | track track-entry-number ] [ preference preference ] [ tag tag-value ] [ recursive-lookup ] [ description text ]
ip route-static dest-address { mask-length | mask } vpn-instance d-vpn-instance-name [ preference preference ] [ tag tag-value ] [ description text ]

·     Method 2:
ip route-static vpn-instance s-vpn-instance-name dest-address { mask-length | mask } interface-type interface-number [ next-hop-address [ nexthop-index index-string ] ] [ permanent | track track-entry-number ] [ preference preference ] [ tag tag-value ] [ recursive-lookup ] [ description text ]
ip route-static vpn-instance s-vpn-instance-name dest-address { mask-length | mask } { next-hop-address [ nexthop-index index-string ] [ recursive-lookup host-route ] [ public ] | vpn-instance d-vpn-instance-name next-hop-address [ nexthop-index index-string ] [ recursive-lookup host-route ] } [ permanent | track track-entry-number ] [ preference preference ] [ tag tag-value ] [ recursive-lookup ] [ description text ]
ip route-static vpn-instance s-vpn-instance-name dest-address { mask-length | mask } { public | vpn-instance d-vpn-instance-name } [ preference preference ] [ tag tag-value ] [ description text ]

By default, no static route is configured.

The recursive-lookup host-route and recursive-lookup keywords are mutually exclusive.

If you specify a destination VPN instance without specifying a next hop address, the destination VPN instance cannot be the same as the source VPN instance.

3.     (Optional.) Enable periodic sending of ARP requests to the next hops of static routes.

ip route-static arp-request interval interval

By default, the device does not send ARP requests to the next hops of static routes.

4.     (Optional.) Configure the default preference for static routes.

ip route-static default-preference default-preference

The default setting is 60.

5.     (Optional.) Delete all static routes, including the default route.

delete [ vpn-instance vpn-instance-name ] static-routes all

To delete one static route, use the undo ip route-static command.

 

Configuring a static route group

This task allows you to batch create static routes with different prefixes but the same output interface and next hop.

You can associate Track with a static route to monitor the reachability of the next hops. For more information about Track, see High Availability Configuration Guide.

If you configure only VPN instance settings without specifying a next hop for a static route, you must also configure service loopback group settings for the static route to take effect.

To configure service loopback group settings for a static route:

1.     Create a service loopback group of the inter-VPN forwarding service type.

2.     Add any Layer 2 Ethernet interface to the service loopback group. To ensure that the static route can correctly guide traffic forwarding, do not add the Layer 2 Ethernet interfaces on the following cards to the service loopback group:

¡     SF interface modules.

¡     EC interface modules.

¡     SA interface modules.

¡     SC interface modules.

For more information about service loopback group configuration, see Layer 2—LAN Switching Configuration Guide.

To configure a static route group:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Create a static route group and enter its view.

ip route-static-group group-name

By default, no static route group is configured.

3.     Add a static route prefix to the static route group.

prefix dest-address { mask-length | mask }

By default, no static route prefix is added to the static route group.

4.     (Optional.) Return to system view.

quit

N/A

5.     Configure a static route.

·     Method 1:
ip
route-static group group-name interface-type interface-number [ next-hop-address ] [ permanent | track track-entry-number ] [ preference preference ] [ tag tag-value ] [ recursive-lookup ] [ description text ]
ip route-static group group-name { next-hop-address [ recursive-lookup host-route ] | vpn-instance d-vpn-instance-name next-hop-address [ recursive-lookup host-route ] } [ permanent | track track-entry-number ] [ preference preference ] [ tag tag-value ] [ recursive-lookup ] [ description text ]
ip route-static group group-name vpn-instance d-vpn-instance-name [ preference preference ] [ tag tag-value ] [ description text ]

·     Method 2:
ip route-static vpn-instance s-vpn-instance-name group group-name interface-type interface-number [ next-hop-address ] [ permanent | track track-entry-number ] [ preference preference ] [ tag tag-value ] [ recursive-lookup ] [ description text ]
ip route-static vpn-instance s-vpn-instance-name group group-name { next-hop-address [ recursive-lookup host-route ] [ public ] | vpn-instance d-vpn-instance-name next-hop-address [ recursive-lookup host-route ] } [ permanent | track track-entry-number ] [ preference preference ] [ tag tag-value ] [ recursive-lookup ] [ description text ]
ip route-static vpn-instance s-vpn-instance-name group group-name { public | vpn-instance d-vpn-instance-name } [ preference preference ] [ tag tag-value ] [ description text ]

By default, no static route is configured.

The recursive-lookup host-route and recursive-lookup keywords are mutually exclusive.

If you specify a destination VPN instance without specifying a next hop address, the destination VPN instance cannot be the same as the source VPN instance.

6.     (Optional.) Enable periodic sending of ARP requests to the next hops of static routes.

ip route-static arp-request interval interval

By default, the device does not send ARP requests to the next hops of static routes.

7.     (Optional.) Configure the default preference for static routes.

ip route-static default-preference default-preference

The default setting is 60.

8.     (Optional.) Delete all static routes, including the default route.

delete [ vpn-instance vpn-instance-name ] static-routes all

To delete one static route, use the undo ip route-static command.

 

Configuring floating static routes

Perform this task to configure route backup to improve network reliability.

When a static or dynamic route to a destination address already exists on the device, you configure another static route with a lower priority as the backup route to improve the network reliability. This backup static route is called a floating static route and is activated only when the primary route fails. After the primary route recovers from failure, the floating static route becomes inactive and data forwarding switches back to the primary route.

A floating static route can be configured in either of the following ways

·     Configure different priorities for multiple static routes to the same destination address. The route with the lower priority automatically becomes the floating static route.

·     When a route to a destination address already exists on the device, configure a static route with a lower priority to the same destination address.

When you configure a floating static route, the priority value of the route must be larger than then priority value of the primary route. For more information, see "Configuring a static route."

Configuring BFD for static routes

IMPORTANT

IMPORTANT:

Enabling BFD for a flapping route could worsen the situation.

 

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 and MPLS.

For more information about BFD, see High Availability Configuration Guide.

Configuring BFD control packet mode

This mode uses BFD control packets to detect the status of a link bidirectionally at a millisecond level.

BFD control packet mode can be applied to static routes with a direct next hop or with an indirect next hop.

If you use BFD control packet mode at the local end, you must use this mode also at the peer end.

To configure BFD control packet mode for a static route (direct next hop):

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Configure BFD control packet mode for a static route.

·     Method 1:
ip route-static dest-address { mask-length | mask } interface-type interface-number next-hop-address bfd control-packet [ preference preference ] [ tag tag-value ] [ description text ]

·     Method 2:
ip route-static vpn-instance s-vpn-instance-name dest-address { mask-length | mask } interface-type interface-number next-hop-address bfd control-packet [ preference preference ] [ tag tag-value ] [ description text ]

By default, BFD control packet mode for a static route is not configured.

 

To configure BFD control packet mode for a static route (indirect next hop):

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Configure BFD control packet mode for a static route.

·     Method 1:
ip route-static dest-address { mask-length | mask } { next-hop-address bfd control-packet bfd-source ip-address | vpn-instance d-vpn-instance-name next-hop-address bfd control-packet bfd-source ip-address } [ preference preference ] [ tag tag-value ] [ description text ]

·     Method 2:
ip route-static vpn-instance s-vpn-instance-name dest-address { mask-length | mask } { next-hop-address bfd control-packet bfd-source ip-address | vpn-instance d-vpn-instance-name next-hop-address bfd control-packet bfd-source ip-address } [ preference preference ] [ tag tag-value ] [ description text ]

By default, BFD control packet mode for a static route is not configured.

 

Configuring BFD echo packet mode

With BFD echo packet mode enabled for a static route, the output interface sends BFD echo packets to the destination device, which loops the packets back to test the link reachability.

You do not need to configure BFD echo packet mode at the peer end.

Do not use BFD for a static route with the output interface in spoofing state.

To configure BFD echo packet mode for a static route:

 

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

By default, the source address of echo packets is not configured.

For more information about this command, see High Availability Command Reference.

3.     Configure BFD echo packet mode for a static route.

·     Method 1:
ip route-static dest-address { mask-length | mask } interface-type interface-number next-hop-address bfd echo-packet [ preference preference ] [ tag tag-value ] [ description text ]

·     Method 2:
ip route-static vpn-instance s-vpn-instance-name dest-address { mask-length | mask } interface-type interface-number next-hop-address bfd echo-packet [ preference preference ] [ tag tag-value ] [ description text ]

By default, BFD echo packet mode for a static route is not configured.

 

Configuring static route FRR

A link or router failure on a path can cause packet loss. Static route fast reroute (FRR) enables fast rerouting to minimize the impact of link or node failures.

Figure 1 Network diagram

 

As shown in Figure 1, upon a link failure, packets are directed to the backup next hop to avoid traffic interruption. You can either specify a backup next hop for FRR or enable FRR to automatically select a backup next hop (which must be configured in advance).

Configuration restrictions and guidelines

When you configure static route FRR, follow these restrictions and guidelines:

·     Do not use static route FRR and BFD (for a static route) at the same time.

·     Static route does not take effect when the backup output interface is unavailable.

·     Equal-cost routes do not support static route FRR.

·     The backup output interface and next hop must be different from the primary output interface and next hop.

·     To change the backup output interface or next hop, you must first remove the current setting.

·     Besides the configured static route for FRR, the device must have another route to reach the destination.

When the state of the primary link (with Layer 3 interfaces staying up) changes from bidirectional to unidirectional or down, static route FRR quickly redirects traffic to the backup next hop. When the Layer 3 interfaces of the primary link are down, static route FRR temporarily redirects traffic to the backup next hop. In addition, the device searches for another route to reach the destination and redirects traffic to the new path if a route is found. If no route is found, traffic interruption occurs.

Configuring static route FRR by specifying a backup next hop

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Configure static route FRR.

·     Method 1:
ip route-static dest-address { mask-length | mask } interface-type interface-number [ next-hop-address [ backup-interface interface-type interface-number [ backup-nexthop backup-nexthop-address ] ] ] [ permanent ] [ preference preference ] [ tag tag-value ] [ description text ]

·     Method 2:
ip route-static vpn-instance s-vpn-instance-name dest-address { mask-length | mask } interface-type interface-number [ next-hop-address [ backup-interface interface-type interface-number [ backup-nexthop backup-nexthop-address ] ] ] [ permanent ] [ preference preference ] [ tag tag-value ] [ description text ]

By default, static route FRR is disabled.

 

Configuring static route FRR to automatically select a backup next hop

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Configure static route FRR to automatically select a backup next hop.

ip route-static fast-reroute auto

By default, static route FRR is disabled from automatically selecting a backup next hop.

 

Enabling BFD echo packet mode for static route FRR

By default, static route FRR uses ARP to detect primary link failures. Perform this task to enable static route FRR to use BFD echo packet mode for fast failure detection on the primary link.

To enable BFD echo packet mode for static route FRR:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Configure the source IP address of BFD echo packets.

bfd echo-source-ip ip-address

By default, the source IP address of BFD echo packets is not configured.

The source IP address cannot be on the same network segment as any local interface's IP address.

For more information about this command, see High Availability Command Reference.

3.     Enable BFD echo packet mode for static route FRR.

ip route-static primary-path-detect bfd echo

By default, BFD echo packet mode for static route FRR is disabled.

 

Displaying and maintaining static routes

Execute display commands in any view.

 

Task

Command

Display static route information.

display ip routing-table protocol static [ inactive | verbose ]

Display static route next hop information.

display route-static nib [ nib-id ] [ verbose ]

Display static routing table information.

display route-static routing-table [ vpn-instance vpn-instance-name ] [ ip-address { mask-length | mask } ]

 

Static route configuration examples

Basic static route configuration example

Network requirements

As shown in Figure 2, configure static routes on the switches for interconnections between any two hosts.

Figure 2 Network diagram

 

Configuration 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 default gateways of Host A, Host B, and Host C as 1.1.2.3, 1.1.6.1, and 1.1.3.1. (Details not shown.)

Verifying the configuration

# Display static routes on Switch A.

[SwitchA] display ip routing-table protocol static

 

Summary count : 1

 

Static Routing table status : <Active>

Summary count : 1

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

0.0.0.0/0           Static 60   0            1.1.4.2         Vlan500

 

Static Routing table status : <Inactive>

Summary count : 0

# Display static routes on Switch B.

[SwitchB] display ip routing-table protocol static

 

Summary count : 2

 

Static Routing table status : <Active>

Summary count : 2

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

1.1.2.0/24          Static 60   0            1.1.4.1         Vlan500

 

Static Routing table status : <Inactive>

Summary count : 0

# Use the ping command on Host B to test the reachability of Host A (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=126

Reply from 1.1.2.2: bytes=32 time=1ms TTL=126

Reply from 1.1.2.2: bytes=32 time=1ms TTL=126

Reply from 1.1.2.2: bytes=32 time=1ms TTL=126

 

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 test 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.

BFD for static routes configuration example (direct next hop)

Network requirements

Configure the following, as shown in Figure 3:

·     Configure a static route to subnet 120.1.1.0/24 on Switch A.

·     Configure a static route to subnet 121.1.1.0/24 on Switch B.

·     Enable BFD for both routes.

·     Configure a static route to subnet 120.1.1.0/24 and a static route to subnet 121.1.1.0/24 on Switch C.

When the link between Switch A and Switch B through the Layer 2 switch fails, BFD can detect the failure immediately. Switch A then communicates with Switch B through Switch C.

Figure 3 Network diagram

 

Table 1 Interface and IP address assignment

Device

Interface

IP address

Switch A

VLAN-interface 10

12.1.1.1/24

Switch A

VLAN-interface 11

10.1.1.102/24

Switch B

VLAN-interface 10

12.1.1.2/24

Switch B

VLAN-interface 13

13.1.1.1/24

Switch C

VLAN-interface 11

10.1.1.100/24

Switch C

VLAN-interface 13

13.1.1.2/24

 

Configuration procedure

1.     Configure IP addresses for the interfaces. (Details not shown.)

2.     Configure static routes and BFD:

# Configure static routes on Switch A and enable BFD control packet mode for the static route that traverses the Layer 2 switch.

<SwitchA> system-view

[SwitchA] interface vlan-interface 10

[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 that traverses the Layer 2 switch.

<SwitchB> system-view

[SwitchB] interface vlan-interface 10

[SwitchB-vlan-interface10] bfd min-transmit-interval 500

[SwitchB-vlan-interface10] bfd min-receive-interval 500

[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

# Configure static routes on Switch C.

<SwitchC> system-view

[SwitchC] ip route-static 120.1.1.0 24 13.1.1.1

[SwitchC] ip route-static 121.1.1.0 24 10.1.1.102

Verifying the configuration

# Display BFD sessions on Switch A.

<SwitchA> display bfd session

 

 Total Session Num: 1     Up Session Num: 1     Init Mode: Active

 

 IPv4 session working in control packet mode:

 

 LD/RD           SourceAddr      DestAddr        State   Holdtime    Interface

 4/7             12.1.1.1        12.1.1.2        Up      2000ms      Vlan10

The output shows that the BFD session has been created.

# Display the static routes on Switch A.

<SwitchA> display ip routing-table protocol static

 

Summary count : 1

 

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

 

Static Routing table status : <Inactive>

Summary count : 0

The output shows that Switch A communicates with Switch B through VLAN-interface 10. Then the link over VLAN-interface 10 fails.

# Display static routes on Switch A.

<SwitchA> display ip routing-table protocol static

 

Summary count : 1

 

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 : 0

The output shows that Switch A communicates with Switch B through VLAN-interface 11.

BFD for static routes configuration example (indirect next hop)

Network requirements

Figure 4 shows the network topology as follows:

·     Switch A has a route to interface Loopback 1 (2.2.2.9/32) on Switch B, with the output interface VLAN-interface 10.

·     Switch B has a route to interface Loopback 1 (1.1.1.9/32) on Switch A, with the output interface VLAN-interface 12.

·     Switch D has a route to 1.1.1.9/32, with the output interface VLAN-interface 10, and a route to 2.2.2.9/32, with the output interface VLAN-interface 12.

Configure the following:

·     Configure a static route to subnet 120.1.1.0/24 on Switch A.

·     Configure a static route to subnet 121.1.1.0/24 on Switch B.

·     Enable BFD for both routes.

·     Configure a static route to subnet 120.1.1.0/24 and a static route to subnet 121.1.1.0/24 on both Switch C and Switch D.

When the link between Switch A and Switch B through Switch D fails, BFD can detect the failure immediately. Switch A then communicates with Switch B through Switch C.

Figure 4 Network diagram

 

Table 2 Interface and IP address assignment

Device

Interface

IP address

Switch A

VLAN-interface 10

12.1.1.1/24

Switch A

VLAN-interface 11

10.1.1.102/24

Switch A

Loopback 1

1.1.1.9/32

Switch B

VLAN-interface 12

11.1.1.1/24

Switch B

VLAN-interface 13

13.1.1.1/24

Switch B

Loopback 1

2.2.2.9/32

Switch C

VLAN-interface 11

10.1.1.100/24

Switch C

VLAN-interface 13

13.1.1.2/24

Switch D

VLAN-interface 10

12.1.1.2/24

Switch D

VLAN-interface 12

11.1.1.2/24

 

Configuration procedure

1.     Configure IP addresses for interfaces. (Details not shown.)

2.     Configure static routes and BFD:

# Configure static routes on Switch A and enable BFD control packet mode for the static route that traverses Switch D.

<SwitchA> system-view

[SwitchA] bfd multi-hop min-transmit-interval 500

[SwitchA] bfd multi-hop min-receive-interval 500

[SwitchA] bfd multi-hop detect-multiplier 9

[SwitchA] ip route-static 120.1.1.0 24 2.2.2.9 bfd control-packet bfd-source 1.1.1.9

[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 that traverses Switch D.

<SwitchB> system-view

[SwitchB] bfd multi-hop min-transmit-interval 500

[SwitchB] bfd multi-hop min-receive-interval 500

[SwitchB] bfd multi-hop detect-multiplier 9

[SwitchB] ip route-static 121.1.1.0 24 1.1.1.9 bfd control-packet bfd-source 2.2.2.9

[SwitchB] ip route-static 121.1.1.0 24 vlan-interface 13 13.1.1.2 preference 65

[SwitchB] quit

# Configure static routes on Switch C.

<SwitchC> system-view

[SwitchC] ip route-static 120.1.1.0 24 13.1.1.1

[SwitchC] ip route-static 121.1.1.0 24 10.1.1.102

# Configure static routes on Switch D.

<SwitchD> system-view

[SwitchD] ip route-static 120.1.1.0 24 11.1.1.1

[SwitchD] ip route-static 121.1.1.0 24 12.1.1.1

Verifying the configuration

# Display BFD sessions on Switch A.

<SwitchA> display bfd session

 

 Total Session Num: 1     Up Session Num: 1     Init Mode: Active

 

 IPv4 session working in control packet mode:

 

 LD/RD           SourceAddr      DestAddr        State   Holdtime    Interface

 4/7             1.1.1.9         2.2.2.9         Up      2000ms      N/A

The output shows that the BFD session has been created.

# Display the static routes on Switch A.

<SwitchA> display ip routing-table protocol static

 

Summary count : 1

 

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

 

Static Routing table status : <Inactive>

Summary count : 0

The output shows that Switch A communicates with Switch B through VLAN-interface 10. Then the link over VLAN-interface 10 fails.

# Display static routes on Switch A.

<SwitchA> display ip routing-table protocol static

 

Summary count : 1

 

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 : 0

The output shows that Switch A communicates with Switch B through VLAN-interface 11.

Static route FRR configuration example

Network requirements

As shown in Figure 5, configure static routes on Switch A, Switch B, and Switch C, and configure static route FRR. When Link A becomes unidirectional, traffic can be switched to Link B immediately.

Figure 5 Network diagram

 

Table 3 Interface and IP address assignment

Device

Interface

IP address

Switch A

VLAN-interface 100

12.12.12.1/24

Switch A

VLAN-interface 200

13.13.13.1/24

Switch A

Loopback 0

1.1.1.1/32

Switch B

VLAN-interface 101

24.24.24.4/24

Switch B

VLAN-interface 200

13.13.13.2/24

Switch B

Loopback 0

4.4.4.4/32

Switch C

VLAN-interface 100

12.12.12.2/24

Switch C

VLAN-interface 101

24.24.24.2/24

 

Configuration procedure

1.     Configure IP addresses for interfaces. (Details not shown.)

2.     Configure static route FRR on link A by using one of the following methods:

¡     (Method 1.) Specify a backup next hop for static route FRR:

# Configure a static route on Switch A, and specify VLAN-interface 100 as the backup output interface and 12.12.12.2 as the backup next hop.

<SwitchA> system-view

[SwitchA] ip route-static 4.4.4.4 32 vlan-interface 200 13.13.13.2 backup-interface vlan-interface 100 backup-nexthop 12.12.12.2

# Configure a static route on Switch B, and specify VLAN-interface 101 as the backup output interface and 24.24.24.2 as the backup next hop.

<SwitchB> system-view

[SwitchB] ip route-static 1.1.1.1 32 vlan-interface 200 13.13.13.1 backup-interface vlan-interface 101 backup-nexthop 24.24.24.2

¡     (Method 2.) Configure static route FRR to automatically select a backup next hop:

# Configure static routes on Switch A, and enable static route FRR.

<SwitchA> system-view

[SwitchA] ip route-static 4.4.4.4 32 vlan-interface 200 13.13.13.2

[SwitchA] ip route-static 4.4.4.4 32 vlan-interface 100 12.12.12.2 preference 70

[SwitchA] ip route-static fast-reroute auto

# Configure static routes on Switch B, and enable static route FRR.

<SwitchB> system-view

[SwitchB] ip route-static 1.1.1.1 32 vlan-interface 200 13.13.13.1

[SwitchB] ip route-static 1.1.1.1 32 vlan-interface 101 24.24.24.2 preference 70

[SwitchB] ip route-static fast-reroute auto

3.     Configure static routes on Switch C.

<SwitchC> system-view

[SwitchC] ip route-static 4.4.4.4 32 vlan-interface 101 24.24.24.4

[SwitchC] ip route-static 1.1.1.1 32 vlan-interface 100 12.12.12.1

Verifying the configuration

# Display route 4.4.4.4/32 on Switch A to view the backup next hop information.

[SwitchA] display ip routing-table 4.4.4.4 verbose

 

Summary count : 1

 

Destination: 4.4.4.4/32

   Protocol: Static          

 Process ID: 0

  SubProtID: 0x0                    Age: 04h20m37s

       Cost: 0               Preference: 60

      IpPre: N/A             QosLocalID: N/A

        Tag: 0                    State: Active Adv

  OrigTblID: 0x0                OrigVrf: default-vrf

    TableID: 0x2                 OrigAs: 0

      NibID: 0x26000002          LastAs: 0

     AttrID: 0xffffffff        Neighbor: 0.0.0.0

      Flags: 0x1008c        OrigNextHop: 13.13.13.2

      Label: NULL           RealNextHop: 13.13.13.2

    BkLabel: NULL             BkNextHop: 12.12.12.2

    SRLabel: NULL             BkSRLabel: NULL

   SIDIndex: NULL               InLabel: NULL

  Tunnel ID: Invalid          Interface: Vlan-interface200

BkTunnel ID: Invalid        BkInterface: Vlan-interface100

   FtnIndex: 0x0           TrafficIndex: N/A

  Connector: N/A                 PathID: 0x0

   LinkCost: 0               MicroSegID: 0

RealFIRType: Normal           RealThres: 0

# Display route 1.1.1.1/32 on Switch B to view the backup next hop information.

[SwitchB] display ip routing-table 1.1.1.1 verbose

 

Summary count : 1

 

Destination: 1.1.1.1/32

   Protocol: Static          

 Process ID: 0

  SubProtID: 0x0                    Age: 04h20m37s

       Cost: 0               Preference: 60

      IpPre: N/A             QosLocalID: N/A

        Tag: 0                    State: Active Adv

  OrigTblID: 0x0                OrigVrf: default-vrf

    TableID: 0x2                 OrigAs: 0

      NibID: 0x26000002          LastAs: 0

     AttrID: 0xffffffff        Neighbor: 0.0.0.0

      Flags: 0x1008c        OrigNextHop: 13.13.13.1

      Label: NULL           RealNextHop: 13.13.13.1

    BkLabel: NULL             BkNextHop: 24.24.24.2

    SRLabel: NULL             BkSRLabel: NULL

   SIDIndex: NULL               InLabel: NULL

  Tunnel ID: Invalid          Interface: Vlan-interface200

BkTunnel ID: Invalid        BkInterface: Vlan-interface101

   FtnIndex: 0x0           TrafficIndex: N/A

  Connector: N/A                 PathID: 0x0

   LinkCost: 0               MicroSegID: 0

RealFIRType: Normal           RealThres: 0


Configuring a default route

A default route is used to forward packets that do not match any specific routing entry in the routing table. Without a default route, packets that do not match any routing entries are discarded and an ICMP destination-unreachable packet is sent to the source.

A default route 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. For more information, see "Configuring static routing."

·     Some dynamic routing protocols, such as OSPF, RIP, and IS-IS, can generate a default route. For example, an upstream router running OSPF can generate a default route and advertise it to other routers. These routers install the default route with the next hop being the upstream router. For more information, see the respective chapters on these routing protocols in this configuration guide.

As shown in Figure 6, Device B is the next hop for packets from Device A to Device C, Device D, and Device E. You can configure a default route on Device A to replace the three static routes from Device A to Device C, Device D, and Device E, respectively. Then, packets that do not match any other routes will be forwarded based on the default route.

The next hop address, destination address, and subnet mask of the default route configured on Device A are 1.1.1.2, 0.0.0.0, and 0.0.0.0, respectively.

Figure 6 Configuring a default route

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网