For information about using the J-Web and CLI configuration
editors, see the J-Web Interface User Guide and the JUNOS CLI User Guide.
Configuring a Basic Set of Static Routes (Required)
Customer routes that are connected to stub networks are often
configured as static routes. Figure 69 shows a sample network.
Figure 69: Customer Routes Connected
to a Stub Network
To configure customer routes as static routes, like the ones
in Figure 69, follow these steps
on the device to which the customer routes are connected:
Navigate to the top of the configuration hierarchy
in either the J-Web or CLI configuration editor.
Perform the configuration tasks described in Table 159.
If you are finished configuring the router, commit
the configuration.
Navigate to the Static level in the configuration
hierarchy.
In the J-Web interface, select Configuration>View
and Edit>Edit Configuration.
Next to Routing options, click Configure or Edit.
Next to Static, click Configure or Edit.
From the [edit] hierarchy level, enter
edit routing-options static
Add the static route 192.168.47.5/32, and define the
next-hop address 10.10.10.10.
Next to Route, click Add new
entry.
In the Destination box, type 192.168.47.5/32.
From the Next hop list, select Next hop.
Next to Next hop, click Add new
entry.
In the Value box, type 10.10.10.10.
Click OK.
Define the static route and set the next-hop address:
set route 192.168.47.5 next-hop 10.10.10.10
Controlling Static Route Selection (Optional)
When multiple next hops exist for a single static route (see Figure 70), you can specify how traffic
is to be routed to the destination.
Figure 70: Controlling Static Route
Selection
In this example, the static route 192.168.47.5/32 has
two possible next hops. Because of the links between those next-hop
hosts, host 10.10.10.7 is the preferred path. To configure
the static route 192.168.47.5/32 with two next hops and give
preference to host 10.10.10.7, follow these steps:
Navigate to the top of the configuration hierarchy
in either the J-Web or the CLI configuration editor.
Perform the configuration tasks described in Table 160.
If you are finished configuring the router, commit
the configuration.
Navigate to the Static level in the configuration
hierarchy.
In the J-Web interface, select Configuration>View
and Edit>Edit Configuration.
Next to Routing options, click Configure or Edit.
Next to Static, click Configure or Edit.
From the [edit] hierarchy level, enter
edit routing-options static
Add the static route 192.168.47.5/32, and define the
next-hop address 10.10.10.10.
Next to Route, click Add new
entry.
In the Destination box, type 192.168.47.5/32.
From the Next hop list, select Next hop.
In the Next hop box, click Add
new entry.
In the Value box, type 10.10.10.10.
Click OK.
Define the static route and set the next-hop address:
set route 192.168.47.5 next-hop 10.10.10.10
Set the preference for the 10.10.10.10 next hop to 7.
Next to Preference, select the Yes check box.
Click Configure.
In the Metric value box, type 7.
Click OK.
Set the preference to 7:
set route 192.168.47.5 next-hop 10.10.10.10 preference 7
Define the qualified next-hop address 10.10.10.7.
Next to Qualified next hop, click Add new entry.
In the Nexthop box, type 10.10.10.7.
Set the qualified-next-hop address:
set route 192.168.47.5 qualified-next-hop 10.10.10.7
Set the preference for the 10.10.10.7 qualified next
hop to 6.
In the Preference box, type 6.
Click OK.
Set the preference to 6:
set route 192.168.47.5 qualified-next-hop 10.10.10.7 preference
6
Controlling Static Routes in the Routing and Forwarding Tables
(Optional)
Static routes have a number of attributes that define how they
are inserted and maintained in the routing and forwarding tables.
To customize this behavior for the static route 192.168.47.5/32, perform these steps:
Navigate to the top of the configuration hierarchy
in either the J-Web or CLI configuration editor.
Perform the configuration tasks described in Table 161.
If you are finished configuring the router, commit
the configuration.
Table 161: Controlling
Static Routes in the Routing and Forwarding Tables
Task
J-Web Configuration Editor
CLI Configuration Editor
Navigate to the 192.168.47.5/32 level in
the configuration hierarchy.
In the J-Web interface, select Configuration>View
and Edit>Edit Configuration.
Next to Routing options, click Edit.
Next to Static, click Edit.
Under Route and Destination, click 192.168.47.5/32.
From the [edit] hierarchy level, enter
edit routing-options static route 192.168.47.5/32
Specify that the route is to be retained in the forwarding table
after the routing process shuts down. By default, static routes are
not retained.
Next to Retain, select the Yes check box.
Set the retain attribute:
set retain
Specify that the static route is not to be readvertised. By
default, static routes are eligible to be readvertised.
Next to Readvertise, select the No check
box.
Set the no-readvertise attribute:
set no-readvertise
Specify that the static route is to be included in the routing
table whether the route is active or not. By default, passive routes
are not included in the routing table.
From the Passive flag list, select Passive.
Click OK.
Set the passive attribute:
set passive
Defining Default Behavior for All Static Routes (Optional)
Attributes that define static route behavior can be configured
either at the individual route level or as a default behavior that
applies to all static routes. In the case of conflicting configuration,
the configuration at the individual route level overrides static route
defaults. To configure static route defaults, perform these steps:
Navigate to the top of the configuration hierarchy
in either the J-Web or CLI configuration editor.
Perform the configuration tasks described in Table 162.
If you are finished configuring the router, commit
the configuration.
Navigate to the Defaults level in the configuration
hierarchy.
In the J-Web interface, select Configuration>View
and Edit>Edit Configuration.
Next to Routing options, click Edit.
Next to Static, click Edit.
Next to Defaults, click Configure.
From the [edit] hierarchy level, enter
edit routing-options static defaults
Specify that the route is to be retained in the forwarding table
after the routing process shuts down. By default, static routes are
not retained.
Next to Retain, select the Yes check box.
Click OK.
Set the retain attribute:
set retain
Specify that the static route is not to be readvertised. By
default, static routes are eligible to be readvertised.
Next to Readvertise, select the No check box.
Click OK.
Set the no-readvertise attribute:
set no-readvertise
Specify that the static route is to be included in the routing
table whether the route is active or not. By default, passive routes
are not included in the routing table.