Example: Configuring Independent Preferences for an IPv4 Static Route
The following example configures:
- A static route to
0.0.0.0/8with a next hop through192.168.1.254, with a metric10and preference10.- A static route to
10.0.0.0/8with a next hop through192.168.1.254, with a metric6and preference5.- A static route to
10.0.0.0/8with a next hop through192.168.1.2, with a metric6and preference7.[edit]routing-options {static {defaults {metric 10;preference 10;}route 0.0.0.0/8 {next-hop 192.168.1.254 {retain;no-readvertise;}route 10.0.0.0/8 {next-hop [192.168.1.2];qualified-next-hop 192.168.1.254 {preference 5;}metric 6;preference 7;}}}Example: Configuring Independent Preferences for an IPv6 Static Route
Configure the following qualified next hops:
- A static route to
fec0:1:1:4::/64with a next hop throughfec0:1:1:2::1, with a metric10and preference10.- A static route to
fec0:1:1:5::/64with a next hop throughfec0:1:1:2::2, with a metric6and preference5.- A static route to
fec0:1:1:5::/64with a next hop throughfec0:1:1:2::3, with a metric6and preference7.[edit]routing-options {rib inet6.0 {static {defaults {metric 10;preference 10;}route fec0:1:1:4::/64 {next-hop fec0:1:1:2::1 {retain;no-readvertise;}route fec0:1:1:5::/64 {next-hop fec0:1:1:2::3;qualified-next-hop fec0:1:1:2::2 {preference 5;}metric 6;preference 7;}}}}