Skip to content

Static Route#

Virtual Networks → SRStatic Routes

Static routes enable connectivity to remote network elements that do not have a routing protocol enabled to advertise routes. A static route is either configured with one or more next-hop IP addresses, or as a blackhole route. A blackhole route will attract traffic for the entire subnet, but will discard packets if no longer prefix match is available in the routing table.

Example: if all outbound traffic is meant to pass through a firewall device, a default static route (0.0.0.0/0) could be configured with the next-hop IP address of the firewall.

Deployment of the static route

The StaticRoute resource can optionally configured with a list of TopoNodes on which the static route is configured. If no nodes are referenced, EDA will configure the static route on all nodes that the Router is configured on. Although static routes are not installed in the routing table if the next-hop is not a locally reachable IP address, configuring a static route with a non-local next-hop should be avoided.

To set up static routes in the default VRF, use DefaultStaticRoute instead.

Dependencies#

To configure this resource, the following resources must exist or be created alongside the StaticRoute

  • The Router in which the static route will be configured

Referenced resources#

Router#

Static route prefixes configured in the StaticRoute resource are only configured in the VRF of the linked Router resource. The next-hop of the static routes should be reachable through a local interface (typically a RoutedInterface or IRBInterface) configured in the same Router.

TopoNode#

Optionally, a list of nodes can be provided on which the static route is deployed. EDA does not determine on which nodes the next-hop IP address is reachable through a local interface, but instead deploys the static route on ALL nodes that the Router is configured on, if no nodes are specified.

Examples#

apiVersion: protocols.eda.nokia.com/v2
kind: StaticRoute
metadata:
  name: my-static-route
  namespace: eda
spec:
  nexthopGroup:
    blackhole: false
    nexthops:
      - ipPrefix: 192.168.1.254
        resolve: false
    resolve: false
  nodes:
    - leaf-1
  prefixes:
    - 10.0.1.0/24
    - 10.0.2.0/24
  router: test-router
cat << 'EOF' | kubectl apply -f -
apiVersion: protocols.eda.nokia.com/v2
kind: StaticRoute
metadata:
  name: my-static-route
  namespace: eda
spec:
  nexthopGroup:
    blackhole: false
    nexthops:
      - ipPrefix: 192.168.1.254
        resolve: false
    resolve: false
  nodes:
    - leaf-1
  prefixes:
    - 10.0.1.0/24
    - 10.0.2.0/24
  router: test-router
EOF

Custom Resource Definition#

To browse the Custom Resource Definition go to crd.eda.dev.

StaticRoute

protocols.eda.nokia.com / v2

SPEC

StaticRoute allows for the specification of destination prefixes, route preferences, and the associated Router. It also supports configuring nexthop groups and specifying the nodes where the static routes should be provisioned.

  • #
  • #
  • #
  • #
  • #
  • #

STATUS

StaticRouteStatus defines the observed state of Static Route

  • #
  • #
  • #
  • #
  • #