Configuring Static Routing (CLI Procedure)
Static routes are routes that are manually configured and entered into the routing table instead of dynamic routes that are learned and added to the routing table using a protocol such as Open Shortest Path First (OSPF) or Routing Information Protocol (RIP).
The switch uses static routes when it does not have a route to a destination that has a better (lower) preference value, when it cannot determine the route to a destination, or when it is forwarding unroutable packets.
To configure basic static route options using the CLI:
- From the [edit] hierarchy level, enter:
user@switch# set routing—options static - To configure the switch's default gateway:
user@switch# set routing-options static route 1.1.1.0/24 next-hop 1.1.1.254 retain n-advertise - To configure a static route and specify the next
address to be used when routing traffic to the static route:
user@switch# set route 109.109.109.0/24 next-hop 99.99.99.3 - To always keep the static route in the forwarding
table:
user@switch# set route 109.109.109.0/24 retain: - To prevent the static route from being readvertised:
user@switch# set route 109.109.109.0/24 no-readvertise - To remove inactive routes from forwarding table:
user@switch# set route 109.109.109.0/24 active




