============= Static Route ============= .. sidebar:: Contents .. contents:: :depth: 2 :local: This chapter covers some aspects related to the :osdx:cfg:`protocols static route *` and :osdx:cfg:`protocols static route6 *` 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 :osdx:cfg:`protocols static route *` or :osdx:cfg:`protocols static route6 *` 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 the ``distance`` value for this route. * ``dhcp-interface``: DHCP interface that supplies the next-hop IP address for this static route. This parameter includes the ``distance`` value for this route, and an ``advisor`` to enable or disable the static route. It also includes a ``bfd`` 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 the ``distance`` value for this route, and an ``advisor`` 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 the ``distance`` value for this route, and an ``advisor`` to enable or disable the static route. They also include a ``bfd`` 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 the ``distance`` value for this route, and an ``advisor`` to enable or disable the static route. Monitoring ============== To monitor the status and configuration of static routes, you can use the following commands: * :osdx:op:`protocols ip show route static` or :osdx:op:`protocols ipv6 show route static` to monitor static routes. .. code-block:: none 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 * :osdx:op:`protocols bfd show static route` to monitor static routes using BFD and their peers. .. code-block:: none 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: Examples ======== :doc:`Here ` you can find examples related to static routes. Command Summary =============== .. osdx:cmdtree:: cfg protocols static protocols vrf * static .. osdx:cmdtree:: op protocols ip show route static protocols ipv6 show route static protocols bfd show static route protocols vrf * ip show route static protocols vrf * ipv6 show route static