Static Routes

Overview

  • Static routes are routes that are manually configured and entered into the routing table.
  • The switch uses static routes:
    • When the switch does not have a route to a destination that has a better (lower) preference value.
    • When the switch cannot determine the route to a destination.
    • When the switch is forwarding unroutable packets.

 

How to Configure Static Route on the Mist Dashboard

Via ‘Subnet’

  • Add ‘Destination’ IP address in CIDR format : Make sure to add only the Network address here. Network address is first address in the network and it is used for identification network segment.
  • Add ‘Next Hop’ IP address
  • Click on ‘tick’ mark and then click on ‘Save’ button to save the configuration.
  • Example:

 

Via ‘Network’

  • Add ‘Subnet’ under ‘Networks’ column : Make sure to create/add ‘subnet’ for the VLAN ID network you intend to use for static route. Example shown below.

 

  • Then click on ‘Static Route’ column on dashboard and select ‘Network’ radio button
  • A list of existing ‘Networks’ are listed in the dropdown. Make sure that ‘subnet’ exists for the ‘Network’ you intend to pick from dropdowm.
  • Add ‘Next Hop’ IP address
  • Click on ‘tick’ mark and then click on ‘Save’ button to save the configuration.
  • Example:

 

Static Routes can be Configured via Site Level

  • Go to ‘Network’ tab
  • Click on ‘Switch Configuration’
  • Select a site where you wish to configure static routes

 

Static Routes can be configured via Org Template level

  • Go to ‘Organization’ tab
  • Click on ‘Switch Template’
  • Select a template where you wish to configure static routes

 

Static Route Inheritance

  • Site or Template configured routes are depicted with asterisk ‘*’ on switch details page as shown below

 

  • Note that current behavior in terms of static route inheritance is that either Site level defined route or Org template defined route are inherited to Switch level and not both at once.
  • Also if static routes exists on Switch level + inherited from Site/Org level, then both the static routes, i.e. in this case total 2 routes, are applied to the switch. Screenshot attached below.

 

Intended Config Generated

  • Intended config is config that would be pushed down to the Junos device.
  • So this intended switch config with respect to the generated for static routes can be viewed under API GET https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/config_cmd
  • Example:

 

GET API /v1/sites/:site_id/devices/:device_id/config_cmd to see intended switch config

"set groups top routing-options static route 10.2.4.0/24 next-hop [ 172.4.5.6 ]",
"set groups top routing-options static route 192.168.0.0/16 next-hop [ 20.4.5.6 ]",

API Documentation

  • API documentation link
  • API overview
    • To add static route on Switch tab: PUT https://api.mist.com/api/v1/sites/:site_id/devices/:device_id
    • To add static route on Network tab > Switch Configuration: PUT https://api.mist.com/api/v1/sites/:site_id/setting
    • To add static route on Org tab > Switch Template: PUT https://api.mist.com/api/v1/orgs/:org_id/networktemplates/:networktemplate_id
    • To see the config_cmd : GET https://api.mist.com/api/v1/sites/:site_id/devices/:device_id/config_cmd