Technical Documentation

Examples: Configuring Static Routes

Configure an IPv4 default route through the next-hop router 192.238.52.33:

[edit]user@host# set routing-options static route 0.0.0.0/0 next-hop 192.238.52.33[edit]user@host# showrouting-options {static {route 0.0.0.0/0 next-hop 192.238.52.33;}}

Configure IPv4 static routes that are retained in the forwarding table when the routing software shuts down normally:

[edit]user@host# set routing-options static route 0.0.0.0/0 next-hop 192.168.1.254 retain[edit]user@host# set routing-options static route 10.1.1.1/32 next-hop 127.0.0.1 retain[edit]user@host# showrouting-options {static {route 0.0.0.0/0 {next-hop 192.168.1.254;retain;}route 10.1.1.1/32 {next-hop 127.0.0.1;retain;}}}

Configure an IPv4 static route and have it propagate into the routing protocols. In this example, specify that the route 143.172.0.0/6 next-hop 127.0.0.1 should be discarded.

[edit]user@host# set routing-options static route 143.172.0.0/6 discard[edit]user@host# showrouting-options {static {route 143.172.0.0/6 discard;}}

Install an IPv4 static route into both inet.0 and inet.2:

[edit]user@host# set routing-options static rib-group some-groupuser@host# set rib-groups some-group import-rib [inet.0 inet.2][edit]user@host# showrouting-options {static {rib-group some-group;}rib-groups {some-group {import-rib [ inet.0 inet.2 ];}}}

Configure an IPv6 default route through the next-hop router 8:3::1:

[edit]user@host# set routing-options rib inet6.0 static route 0::/0 next-hop 8:3::1[edit]user@host# showrouting-options {rib inet6.0 static {route abcd::/48 next-hop 8:3::1;}}

Resolve an IPv6 static route to non-next-hop router 1::/64 using next-hop router 2000::1:

[edit]user@host# set routing-options rib inet6.0 static route 1::/64 next-hop 2000::1 resolve[edit]user@host# show route 1::/64inet6.0: 26 destinations, 27 routes (25 active, 0 holddown, 1 hidden)+ = Active Route, - = Last Active, * = Both1::/64 *[Static/5] 00:01:50 > to 8:1::2 via ge-0/1/0.0user@host# show route 2000::1inet6.0: 26 destinations, 27 routes (25 active, 0 holddown, 1 hidden)+ = Active Route, - = Last Active, * = Both2000::/126 *[BGP/170] 00:05:32, MED 20, localpref 100 AS path: 2 I > to 8:1::2 via ge-0/1/0.0

Published: 2010-07-02

Help
|
My Account
|
Log Out