Static Route
This chapter covers some aspects related to the
protocols static route <ipv4net>
and protocols static route6 <ipv6net>
tools,
features that allow users to manage and monitor the static routing.
The static route protocol can be used to fix network routes manually instead of using a dynamic routing protocol. In static routing, the routing table has pre-defined routes that are configured by a user, it is not based on network topology changes.
Configuration
The static route protocol can be configured either using protocols static route <ipv4net>
or protocols static route6 <ipv6net>
depending on the type of IP address.
In OSDx, the static route configuration allows various parameters to be set to fine-tune the protocol’s behavior.
An explanation of each configurable parameter is provided below:
blackhole
: This is used to silently discard packets when matched. This parameter includes thedistance
value for this route.dhcp-interface
: DHCP interface that supplies the next-hop IP address for this static route. This parameter includes thedistance
value for this route, and anadvisor
to enable or disable the static route. It also includes abfd
parameter to support Bidirectional Forwarding Detection in static routing.bfd
: A network protocol that is used to detect faults between two routers or switches connected by a link. A multihop session (multihop
), a BFD source IP for this route (source-ip
) and a BFD profile name (profile
) can be configured to improve the protocols’s behavior.Note
DHCP interface is not available when using an IPv6 route.
interface
: Defines the next hop interface. This parameter includes thedistance
value for this route, and anadvisor
to enable or disable the static route This ensures only legitimate routers can participate in the VRRP process.next-hop
: Defines the gateway IP address. This parameter can be configured with an interface based static route (interface
) and with a next hop router VRF (next-hop-vrf
). All three configurations (next hop, next hop and interface, next hop and next hop VRF) include thedistance
value for this route, and anadvisor
to enable or disable the static route. They also include abfd
parameter to support Bidirectional Forwarding Detection in static routing.bfd
: A network protocol that is used to detect faults between two routers or switches connected by a link. A multihop session (multihop
), a BFD source IP for this route (source-ip
) and a BFD profile name (profile
) can be configured to improve the protocols’s behavior.
next-hop-vrf
: Allows to create a leaked route with a nexthop in the specified VRF ID. This parameter includes thedistance
value for this route, and anadvisor
to enable or disable the static route.
Monitoring
To monitor the status and configuration of static routes, you can use the following commands:
protocols ip show route static
orprotocols ipv6 show route static
to monitor static routes.admin@osdx$ protocols ip show route static Codes: K - kernel route, C - connected, L - local, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR, f - OpenFabric, t - Table-Direct, > - selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failure S>* 0.0.0.0/0 [1/0] via 192.168.212.2, eth0p0, weight 1, 00:03:12
protocols bfd show static route
to monitor static routes using BFD and their peers.admin@osdx$ protocols bfd show static route Showing BFD monitored static routes: Next hops: VRF default IPv4 Unicast: 20.0.0.0/24 peer 192.168.212.8 (status: uninstalled) 30.0.0.0/24 peer 192.168.212.9 (status: uninstalled) VRF default IPv4 Multicast: VRF default IPv6 Unicast:
Examples
Here you can find examples related to static routes.
Command Summary
Configuration commands
protocols static route <ipv4net> dhcp-interface <ifc> advisor <txt>
protocols static route <ipv4net> dhcp-interface <ifc> bfd multihop
protocols static route <ipv4net> dhcp-interface <ifc> bfd profile <txt>
protocols static route <ipv4net> dhcp-interface <ifc> bfd source-ip <ipv4>
protocols static route <ipv4net> dhcp-interface <ifc> distance <u32>
protocols static route <ipv4net> interface <ifc> advisor <txt>
protocols static route <ipv4net> interface <ifc> distance <u32>
protocols static route <ipv4net> next-hop <ipv4> advisor <txt>
protocols static route <ipv4net> next-hop <ipv4> bfd multihop
protocols static route <ipv4net> next-hop <ipv4> bfd profile <txt>
protocols static route <ipv4net> next-hop <ipv4> bfd source-ip <ipv4|ipv6>
protocols static route <ipv4net> next-hop <ipv4> distance <u32>
protocols static route <ipv4net> next-hop <ipv4> interface <ifc>
protocols static route <ipv4net> next-hop <ipv4> interface <ifc> advisor <txt>
protocols static route <ipv4net> next-hop <ipv4> interface <ifc> bfd
protocols static route <ipv4net> next-hop <ipv4> interface <ifc> bfd multihop
protocols static route <ipv4net> next-hop <ipv4> interface <ifc> bfd profile <txt>
protocols static route <ipv4net> next-hop <ipv4> interface <ifc> bfd source-ip <ipv4|ipv6>
protocols static route <ipv4net> next-hop <ipv4> interface <ifc> distance <u32>
protocols static route <ipv4net> next-hop <ipv4> interface <ifc> onlink
protocols static route <ipv4net> next-hop <ipv4> next-hop-vrf <id>
protocols static route <ipv4net> next-hop <ipv4> next-hop-vrf <id> advisor <txt>
protocols static route <ipv4net> next-hop <ipv4> next-hop-vrf <id> bfd
protocols static route <ipv4net> next-hop <ipv4> next-hop-vrf <id> bfd multihop
protocols static route <ipv4net> next-hop <ipv4> next-hop-vrf <id> bfd profile <txt>
protocols static route <ipv4net> next-hop <ipv4> next-hop-vrf <id> bfd source-ip <ipv4|ipv6>
protocols static route <ipv4net> next-hop <ipv4> next-hop-vrf <id> distance <u32>
protocols static route <ipv4net> next-hop-vrf <id> advisor <txt>
protocols static route <ipv4net> next-hop-vrf <id> distance <u32>
protocols static route6 <ipv6net> interface <ifc> advisor <txt>
protocols static route6 <ipv6net> interface <ifc> distance <u32>
protocols static route6 <ipv6net> next-hop <ipv6> advisor <txt>
protocols static route6 <ipv6net> next-hop <ipv6> bfd multihop
protocols static route6 <ipv6net> next-hop <ipv6> bfd profile <txt>
protocols static route6 <ipv6net> next-hop <ipv6> bfd source-ip <ipv4|ipv6>
protocols static route6 <ipv6net> next-hop <ipv6> distance <u32>
protocols static route6 <ipv6net> next-hop <ipv6> interface <ifc>
protocols static route6 <ipv6net> next-hop <ipv6> interface <ifc> advisor <txt>
protocols static route6 <ipv6net> next-hop <ipv6> interface <ifc> bfd
protocols static route6 <ipv6net> next-hop <ipv6> interface <ifc> bfd multihop
protocols static route6 <ipv6net> next-hop <ipv6> interface <ifc> bfd profile <txt>
protocols static route6 <ipv6net> next-hop <ipv6> interface <ifc> bfd source-ip <ipv4|ipv6>
protocols static route6 <ipv6net> next-hop <ipv6> interface <ifc> distance <u32>
protocols static route6 <ipv6net> next-hop <ipv6> interface <ifc> onlink
protocols static route6 <ipv6net> next-hop <ipv6> next-hop-vrf <id>
protocols static route6 <ipv6net> next-hop <ipv6> next-hop-vrf <id> advisor <txt>
protocols static route6 <ipv6net> next-hop <ipv6> next-hop-vrf <id> bfd
protocols static route6 <ipv6net> next-hop <ipv6> next-hop-vrf <id> bfd multihop
protocols static route6 <ipv6net> next-hop <ipv6> next-hop-vrf <id> bfd profile <txt>
protocols static route6 <ipv6net> next-hop <ipv6> next-hop-vrf <id> bfd source-ip <ipv4|ipv6>
protocols static route6 <ipv6net> next-hop <ipv6> next-hop-vrf <id> distance <u32>
protocols static route6 <ipv6net> next-hop-vrf <id> advisor <txt>
protocols static route6 <ipv6net> next-hop-vrf <id> distance <u32>
protocols vrf <id> static route <ipv4net> blackhole distance <u32>
protocols vrf <id> static route <ipv4net> dhcp-interface <ifc>
protocols vrf <id> static route <ipv4net> dhcp-interface <ifc> advisor <txt>
protocols vrf <id> static route <ipv4net> dhcp-interface <ifc> bfd
protocols vrf <id> static route <ipv4net> dhcp-interface <ifc> bfd multihop
protocols vrf <id> static route <ipv4net> dhcp-interface <ifc> bfd profile <txt>
protocols vrf <id> static route <ipv4net> dhcp-interface <ifc> bfd source-ip <ipv4>
protocols vrf <id> static route <ipv4net> dhcp-interface <ifc> distance <u32>
protocols vrf <id> static route <ipv4net> interface <ifc> advisor <txt>
protocols vrf <id> static route <ipv4net> interface <ifc> distance <u32>
protocols vrf <id> static route <ipv4net> next-hop <ipv4> advisor <txt>
protocols vrf <id> static route <ipv4net> next-hop <ipv4> bfd
protocols vrf <id> static route <ipv4net> next-hop <ipv4> bfd multihop
protocols vrf <id> static route <ipv4net> next-hop <ipv4> bfd profile <txt>
protocols vrf <id> static route <ipv4net> next-hop <ipv4> bfd source-ip <ipv4|ipv6>
protocols vrf <id> static route <ipv4net> next-hop <ipv4> distance <u32>
protocols vrf <id> static route <ipv4net> next-hop <ipv4> interface <ifc>
protocols vrf <id> static route <ipv4net> next-hop <ipv4> interface <ifc> advisor <txt>
protocols vrf <id> static route <ipv4net> next-hop <ipv4> interface <ifc> bfd
protocols vrf <id> static route <ipv4net> next-hop <ipv4> interface <ifc> bfd multihop
protocols vrf <id> static route <ipv4net> next-hop <ipv4> interface <ifc> bfd profile <txt>
protocols vrf <id> static route <ipv4net> next-hop <ipv4> interface <ifc> bfd source-ip <ipv4|ipv6>
protocols vrf <id> static route <ipv4net> next-hop <ipv4> interface <ifc> distance <u32>
protocols vrf <id> static route <ipv4net> next-hop <ipv4> interface <ifc> onlink
protocols vrf <id> static route <ipv4net> next-hop <ipv4> next-hop-vrf <id>
protocols vrf <id> static route <ipv4net> next-hop <ipv4> next-hop-vrf <id> advisor <txt>
protocols vrf <id> static route <ipv4net> next-hop <ipv4> next-hop-vrf <id> bfd
protocols vrf <id> static route <ipv4net> next-hop <ipv4> next-hop-vrf <id> bfd multihop
protocols vrf <id> static route <ipv4net> next-hop <ipv4> next-hop-vrf <id> bfd profile <txt>
protocols vrf <id> static route <ipv4net> next-hop <ipv4> next-hop-vrf <id> distance <u32>
protocols vrf <id> static route <ipv4net> next-hop-vrf <id> advisor <txt>
protocols vrf <id> static route <ipv4net> next-hop-vrf <id> distance <u32>
protocols vrf <id> static route6 <ipv6net> blackhole distance <u32>
protocols vrf <id> static route6 <ipv6net> interface <ifc> advisor <txt>
protocols vrf <id> static route6 <ipv6net> interface <ifc> distance <u32>
protocols vrf <id> static route6 <ipv6net> next-hop <ipv6> advisor <txt>
protocols vrf <id> static route6 <ipv6net> next-hop <ipv6> bfd
protocols vrf <id> static route6 <ipv6net> next-hop <ipv6> bfd multihop
protocols vrf <id> static route6 <ipv6net> next-hop <ipv6> bfd profile <txt>
protocols vrf <id> static route6 <ipv6net> next-hop <ipv6> bfd source-ip <ipv4|ipv6>
protocols vrf <id> static route6 <ipv6net> next-hop <ipv6> distance <u32>
protocols vrf <id> static route6 <ipv6net> next-hop <ipv6> interface <ifc>
protocols vrf <id> static route6 <ipv6net> next-hop <ipv6> interface <ifc> advisor <txt>
protocols vrf <id> static route6 <ipv6net> next-hop <ipv6> interface <ifc> bfd
protocols vrf <id> static route6 <ipv6net> next-hop <ipv6> interface <ifc> bfd multihop
protocols vrf <id> static route6 <ipv6net> next-hop <ipv6> interface <ifc> bfd profile <txt>
protocols vrf <id> static route6 <ipv6net> next-hop <ipv6> interface <ifc> bfd source-ip <ipv4|ipv6>
protocols vrf <id> static route6 <ipv6net> next-hop <ipv6> interface <ifc> distance <u32>
protocols vrf <id> static route6 <ipv6net> next-hop <ipv6> interface <ifc> onlink
protocols vrf <id> static route6 <ipv6net> next-hop <ipv6> next-hop-vrf <id>
protocols vrf <id> static route6 <ipv6net> next-hop <ipv6> next-hop-vrf <id> advisor <txt>
protocols vrf <id> static route6 <ipv6net> next-hop <ipv6> next-hop-vrf <id> bfd
protocols vrf <id> static route6 <ipv6net> next-hop <ipv6> next-hop-vrf <id> bfd multihop
protocols vrf <id> static route6 <ipv6net> next-hop <ipv6> next-hop-vrf <id> bfd profile <txt>
protocols vrf <id> static route6 <ipv6net> next-hop <ipv6> next-hop-vrf <id> distance <u32>
protocols vrf <id> static route6 <ipv6net> next-hop-vrf <id>
protocols vrf <id> static route6 <ipv6net> next-hop-vrf <id> advisor <txt>
protocols vrf <id> static route6 <ipv6net> next-hop-vrf <id> distance <u32>