Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Example: Configuring Interfaces and Routing Instances for a User Logical System

    This example shows how to configure interfaces and routing instances for a user logical system.

    Requirements

    Before you begin:

    Overview

    This example configures the ls-product-design user logical system shown in Example: Creating User Logical Systems, Their Administrators, Their Users, and an Interconnect Logical System.

    This example configures the interfaces and routing instances described in Table 1.

    Table 1: User Logical System Interface and Routing Instance Configuration

    Feature

    Name

    Configuration Parameters

    Interface

    ge-0/0/5.1

    • IP address 12.1.1.1/24
    • VLAN ID 700

    Routing instance

    pd-vr1

    • Instance type: virtual router
    • Includes interfaces ge-0/0/5.1 and lt-0/0/0.3
    • Static routes:
      • 13.1.1.0/24 next-hop 10.0.1.3
      • 14.1.1.0/24 next-hop 10.0.1.4
      • 12.12.1.0/24 next-hop 10.0.1.1

    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.

    set interfaces ge-0/0/5 unit 1 family inet address 12.1.1.1/24 set interfaces ge-0/0/5 unit 1 vlan-id 700set routing-instances pd-vr1 instance-type virtual-router set routing-instances pd-vr1 interface ge-0/0/5.1 set routing-instances pd-vr1 interface lt-0/0/0.3 set routing-instances pd-vr1 routing-options static route 13.1.1.0/24 next-hop 10.0.1.3 set routing-instances pd-vr1 routing-options static route 14.1.1.0/24 next-hop 10.0.1.4 set routing-instances pd-vr1 routing-options static route 12.12.1.0/24 next-hop 10.0.1.1

    Step-by-Step Procedure

    The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide PDF Document.

    To configure an interface and a routing instance in a user logical system:

    1. Log in to the user logical system as the logical system administrator and enter configuration mode.
      lsdesignadmin1@host:ls-product-design> configurelsdesignadmin1@host:ls-product-design#
    2. Configure the logical interface for a user logical system.
      [edit interfaces]lsdesignadmin1@host:ls-product-design# set ge-0/0/5 unit 1 family inet address 12.1.1.1/24lsdesignadmin1@host:ls-product-design# set ge-0/0/5 unit 1 vlan-id 700
    3. Configure the routing instance and assign interfaces.
      [edit routing-instances]lsdesignadmin1@host:ls-product-design# set pd-vr1 instance-type virtual-routerlsdesignadmin1@host:ls-product-design# set pd-vr1 interface ge-0/0/5.1lsdesignadmin1@host:ls-product-design# set pd-vr1 interface lt-0/0/0.3
    4. Configure static routes.
      [edit routing-instances]lsdesignadmin1@host:ls-product-design# set pd-vr1 routing-options static route 13.1.1.0/24 next-hop 10.0.1.3lsdesignadmin1@host:ls-product-design# set pd-vr1 routing-options static route 14.1.1.0/24 next-hop 10.0.1.4lsdesignadmin1@host:ls-product-design# set pd-vr1 routing-options static route 12.12.1.0/24 next-hop 10.0.1.1

    Results

    From configuration mode, confirm your configuration by entering the show interfaces and show routing-instances commands. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

    Note: The master administrator configures the lt-0/0/0.3 interface. Thus, the lt-0/0/0.3 configuration appears in the show interfaces output even though you did not configure this item.

    lsdesignadmin1@host:ls-product-design# show interfacesge-0/0/5 {unit 1 {vlan-id 700;family inet {address 12.1.1.1/24;}}}lt-0/0/0 {unit 3 {encapsulation ethernet;peer-unit 2;family inet {address 10.0.1.2/24;}}}lsdesignadmin1@host:ls-product-design# show routing-instancespd-vr1 {instance-type virtual-router;interface ge-0/0/5.1;interface lt-0/0/0.3;routing-options {static {route 13.1.1.0/24 next-hop 10.0.1.3;route 14.1.1.0/24 next-hop 10.0.1.4;route 12.12.1.0/24 next-hop 10.0.1.1;}}}

    If you are done configuring the device, enter commit from configuration mode.

    Published: 2012-06-29