Configuring Static Routes with a Configuration Editor

To configure static routes on the device, you must perform the following tasks marked (Required).

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 71 shows a sample network.

Figure 71: Customer Routes Connected to a Stub Network

Image g015023.gif

To configure customer routes as static routes, like the ones in Figure 71, follow these steps on the device to which the customer routes are connected:

  1. Navigate to the top of the configuration hierarchy in either the J-Web or CLI configuration editor.
  2. Perform the configuration tasks described in Table 148.
  3. If you are finished configuring the router, commit the configuration.
  4. Go on to one of the following procedures:

Table 148: Configuring Basic Static Routes

Task

J-Web Configuration Editor

CLI Configuration Editor

Navigate to the Static level in the configuration hierarchy.

  1. In the J-Web interface, select Configure>CLI Tools>Point and Click CLI.
  2. Next to Routing options, click Configure or Edit.
  3. 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.

  1. Next to Route, click Add new entry.
  2. In the Destination box, type 192.168.47.5/32.
  3. From the Next hop list, select Next hop.
  4. Next to Next hop, click Add new entry.
  5. In the Value box, type 10.10.10.10.
  6. 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 72), you can specify how traffic is to be routed to the destination.

Figure 72: Controlling Static Route Selection

Image g015024.gif

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:

  1. Navigate to the top of the configuration hierarchy in either the J-Web or the CLI configuration editor.
  2. Perform the configuration tasks described in Table 149.
  3. If you are finished configuring the router, commit the configuration.
  4. Go on to one of the following procedures:

Table 149: Controlling Static Route Selection

Task

J-Web Configuration Editor

CLI Configuration Editor

Navigate to the Static level in the configuration hierarchy.

  1. In the J-Web interface, select Configure>CLI Tools>Point and Click CLI.
  2. Next to Routing options, click Configure or Edit.
  3. 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.

  1. Next to Route, click Add new entry.
  2. In the Destination box, type 192.168.47.5/32.
  3. From the Next hop list, select Next hop.
  4. In the Next hop box, click Add new entry.
  5. In the Value box, type 10.10.10.10.
  6. 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.

  1. Next to Preference, select the Yes check box.
  2. Click Configure.
  3. In the Metric value box, type 7.
  4. 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.

  1. Next to Qualified next hop, click Add new entry.
  2. 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.

  1. In the Preference box, type 6.
  2. 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:

  1. Navigate to the top of the configuration hierarchy in either the J-Web or CLI configuration editor.
  2. Perform the configuration tasks described in Table 150.
  3. If you are finished configuring the router, commit the configuration.
  4. Go on to one of the following procedures:

Table 150: 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.

  1. In the J-Web interface, select Configure>CLI Tools>Point and Click CLI.
  2. Next to Routing options, click Edit.
  3. Next to Static, click Edit.
  4. 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.

  1. From the Passive flag list, select Passive.
  2. 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:

  1. Navigate to the top of the configuration hierarchy in either the J-Web or CLI configuration editor.
  2. Perform the configuration tasks described in Table 151.
  3. If you are finished configuring the router, commit the configuration.
  4. To check the configuration, see Verifying the Static Route Configuration.

Table 151: Defining Static Route Defaults

Task

J-Web Configuration Editor

CLI Configuration Editor

Navigate to the Defaults level in the configuration hierarchy.

  1. In the J-Web interface, select Configure>CLI Tools>Point and Click CLI.
  2. Next to Routing options, click Edit.
  3. Next to Static, click Edit.
  4. 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.

  1. Next to Retain, select the Yes check box.
  2. 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.

  1. Next to Readvertise, select the No check box.
  2. 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.

  1. From the Passive flag list, select Passive.
  2. Click OK.

Set the passive attribute:

set passive