Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Example: Configuring Static Routes Between Logical Systems Within the Same Router

 

This example shows how to configure static routes between logical systems. The logical systems are configured in a single physical router and are connected by logical tunnel interfaces.

Requirements

You must connect the logical systems by using logical tunnel (lt) interfaces. See Example: Connecting Logical Systems Within the Same Device Using Logical Tunnel Interfaces on MX Series Routers and EX Series Switches.

Overview

A static route is a hard-coded path in the device that specifies how the route gets to a certain subnet by using a certain path. Routers that are connected to stub networks are often configured to use static routes. A stub network is a network with no knowledge of other networks. Stub networks send non-local traffic by way of a single path, with the network aware only of a default route to non-local destinations. In this example, you configure Logical System LS1 with a static route to the 10.10.10.0/30 network and define the next-hop address as 192.168.10.2. You also configure Logical System LS1 with a static route to the 192.168.10.0/30 network and define a next-hop address of 10.10.10.1.

Figure 1 shows the sample network.

Figure 1: Static Routes Between Logical Systems
Static Routes Between Logical
Systems

Configuration

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To configure static routes between logical systems:

  1. Run the show interfaces terse command to verify that the router has a logical tunnel (lt) interface.
    user@host> show interfaces terse
  2. Configure the logical tunnel interface on Logical System LS1 connecting to Logical System LS2.

  3. Configure the logical tunnel interface on Logical System LS2 connecting to Logical System LS1.

  4. Configure the logical tunnel interface on Logical System LS2 connecting to Logical System LS3.

  5. Configure the logical tunnel interface on Logical System LS3 connecting to Logical System LS2.

  6. Configure the static route on Logical System LS1 connecting to the 10.10.10.0/30 network.

  7. Configure the static route on Logical System LS3 connecting to the 192.168.10.0/30 network.

  8. If you are done configuring the device, commit the configuration.

Results

Confirm your configuration by issuing the show logical-systems command. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

Verification

Confirm that the configuration is working properly.

Verifying That the Logical Systems Are Up

Purpose

Make sure that the interfaces are properly configured.

Action

user@host> show interfaces terse

Verifying Connectivity Between the Logical Systems

Purpose

Make sure that the static routes appear in the routing tables of Logical Systems LS1 and LS3. Also, make sure that the logical systems can ping each other.

Action

user@host> show route logical-system LS1
user@host> show route logical-system LS3

From LS1, Ping LS3

user@host> set cli logical-system LS1
user@host:LS1> ping 10.10.10.2

From LS3, Ping LS1

user@host> set cli logical-system LS3
user@host:LS3> ping 192.168.10.1