User Tools

Site Tools


hpe:switch:5800:configuring_static_routing

This is an old revision of the document!


HP 5830 Switch Series - Configuring Static Routing

1. Static route configuration items

Before configuring a static route, understand 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 or the 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 does not take effect.

In fact, each route lookup operation has to find the next hop to resolve the destination link layer address.

When specifying the output interface:

  • Unordered List ItemIf the output interface is a Null 0 interface, there is no need to configure the next hop address.
  • Unordered List ItemIf the user specifies a broadcast interface (such as VLAN interface) as the output interface, the user must specify the corresponding next hop for the output interface.

Other attributes: The user 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.

2. Configuring a static route

Prerequisites:

Before configuring 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

Procedure:

When configuring a static route, the static route does not take effect if the user specifies the next hop address first and then configure it as the IP address of a local interface, such as VLAN interface.

If the user does 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.

  • Unordered List ItemEnter system view.
system-view
  • Unordered List ItemOrdered List ItemConfigure a static route.
ip route-static dest-address { mask | mask- length } { next-hop-address [ track track- entry-number ] | 
interface-type interface- number [ next-hop-address ] } [ preference preference-value ] [ tag tag-value ] [ 
permanent ] [ description description-text ]
  • Unordered List ItemOrdered List ItemConfigure the default preference for static routes.
ip route-static default-preference default- preference-value

The user 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.

3. Configuring BFD for static routes

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.

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, which has no neighbor discovery mechanism, implements BFD.

BFD control packet mode:

To use BFD control packets for bidirectional detection between two devices, the user needs to enable BFD control packet mode for each device static route destined to the peer.

For direct session:

  • Unordered List ItemOrdered List ItemEnter system view.
system-view
  • Unordered List ItemOrdered List ItemConfigure a static route and enable BFD control packet mode for it.
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 ]

For indirect session:

  • Unordered List ItemOrdered List ItemEnter system view.
system-view
  • Unordered List ItemOrdered List ItemConfigure a static route and enable BFD control packet mode for the route.
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 ]

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 them back to test the link. If route flaps occur, enabling BFD could worsen them. Enable BFD with care in such cases.

The source address of echo packets must be configured if the BFD session operates in the echo mode. If the user configures BFD for a static route, he needs to specify the outbound interface and next hop IP address for the route.

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 nexthops rather than non-direct nexthops.

  • Unordered List ItemEnter system view.
system-view
  • Unordered List ItemConfigure the source address of echo packets.
bfd echo-source-ip ip-address
  • Unordered List ItemEnable BFD echo packet mode for static routes.
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 ]

BFD echo function is revised to specify that a BFD session is established at only one end when the echo mode is used.

4. Configuring static route FRR

When the link in the network fails, the packets on the path may be discarded, or a routing loop may occur. Then, the traffic will be interrupted. To avoid such issues, the user can enable static FRR.

Figure 1: Network diagram for static route FRR

As shown in Figure 1, FRR can designate a backup next hop by using a routing policy for routes matching the specified criteria when a network failure is detected so that packets can be directed to the backup next hop for forwarding. This prevents traffic interruption.

Prerequisites:

Configuring static route FRR needs to reference a routing policy. The user can specify a backup next hop in a routing policy by using the apply fast-reroute backup-interface command.

Procedure:

Static route FRR takes effect only for static routes that have both the outbound interface and next hop specified. Do not use static route FRR and BFD (for static route) at the same time.

  • Unordered List ItemEnter system view.
system-view
  • Unordered List ItemConfigure the source address of echo packets.
bfd echo-source-ip ip-address
  • Unordered List ItemConfigure static route FRR.
ip route-static fast-reroute route- policy route-policy-name

5. Displaying and maintaining static routes

The VPN instance support in delete [ vpn-instance vpn-instance-name ] static-routes all depends on the device model.

  • Unordered List ItemDisplay information of static routes.
display ip routing-table protocol static [ inactive | verbose ] [ | { begin | exclude | include } regular- 
expression ]
  • Unordered List ItemDelete all the static routes.
delete static-routes all

6. Static route configuration examples

hpe/switch/5800/configuring_static_routing.1623274940.txt.gz · Last modified: 2021/06/09 16:42 by aperez

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki