Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Example: Configuring a VPLS Pseudowire as a Trunk Interface Using Dynamic Profiles

This example shows how dynamic profiles can be used to create multiple pseudowire trunk interfaces to accept the traffic based on specific VLAN identifiers, and to route the accepted traffic to the desired destination.

Requirements

This example uses the following hardware and software components:

  • MX Series 3D Universal Edge Routers
  • Junos OS Release 9.3 or later

Overview and Topology

The topology used in this example for configuring VPLS pseudowires as trunk interfaces is shown in Figure 1. Three trunk interfaces, pw-trunk-1 with VLAN ID 100–300, pw-trunk-2 with VLAN ID 301–600, and pw-trunk-3 with VLAN ID 601—100, are configured.

Figure 1: Using Pseudowires as Trunk Interfaces

Using Pseudowires as Trunk Interfaces

Configuration

Configuring VPLS pseudowires as trunk interfaces using dynamic profiles involves performing these tasks:

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 dynamic-profiles pw-trunk-1 interfaces $junos-interface-ifd-name unit $junos-underlying-interface-unit family bridge interface-mode trunk vlan-id-list [100-300]set dynamic-profiles pw-trunk-2 interfaces $junos-interface-ifd-name unit $junos-underlying-interface-unit family bridge interface-mode trunk vlan-id-list [301-600]set dynamic-profiles pw-trunk-3 interfaces $junos-interface-ifd-name unit $junos-underlying-interface-unit family bridge interface-mode trunk vlan-id-list [601-1000]set routing-instances red instance-type virtual-switch bridge-domains vlan-100 vlan-id 100set routing-instances red instance-type virtual-switch bridge-domains vlan-200 vlan-id 200set routing-instances red instance-type virtual-switch bridge-domains vlan-1000 vlan-id 1000set routing-instances red protocols vpls neighbor 10.255.1.2 associate-profile pw-trunk-1set routing-instances red protocols vpls neighbor 10.255.1.3 associate-profile pw-trunk-2set routing-instances red protocols vpls neighbor 10.255.1.4 associate-profile pw-trunk-3

Creating a Dynamic Profile

Step-by-Step Procedure

Perform the following steps to create the pw-trunk-1 dynamic profile. This dynamic profile is then associated with the routing instance to filter the ingress and egress frames.

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

Note: This is not a complete router configuration.

  1. Create a dynamic profile named pw-trunk-1.
    [edit]user@host# set dynamic-profiles pw-trunk-1
  2. Specify the variables $junos-interface-ifd-name and $junos-underlying-interface-unit to be used by the router to match the interface name and the unit value of the receiving interface.
    [edit dynamic-profiles pw-trunk-1]user@host# set interfaces $junos-interface-ifd-name unit $junos-underlying-interface-unit
  3. Specify the protocol family, interface mode, and the trunk mode VLAN membership for the interface.
    [edit dynamic-profiles pw-trunk-1 interfaces "$junos-interface-ifd-name" unit "$junos-underlying-interface-unit"]user@host# set family bridge family bridge interface-mode trunk vlan-id-list [100-300]

Step-by-Step Procedure

Perform the following steps to create the pw-trunk-2 dynamic profile. This dynamic profile is then associated with the routing instance to filter the ingress and egress frames.

  1. Create a dynamic profile named pw-trunk-2.
    [edit ]user@host# set dynamic-profiles pw-trunk-2
  2. Specify the variables $junos-interface-ifd-name and $junos-underlying-interface-unit to be used by the router to match the interface name and the unit value of the receiving interface.
    [edit dynamic-profiles pw-trunk-2]user@host# set interfaces $junos-interface-ifd-name unit $junos-underlying-interface-unit
  3. Specify the protocol family, interface mode, and the trunk mode VLAN membership for the interface.
    [edit dynamic-profiles pw-trunk-2 interfaces "$junos-interface-ifd-name" unit "$junos-underlying-interface-unit"]user@host# set family bridge family bridge interface-mode trunk vlan-id-list [301-600]

Step-by-Step Procedure

Perform the following steps to create the pw-trunk-3 dynamic profile. This dynamic profile is then associated with the routing instance to filter the ingress and egress frames.

  1. Create a dynamic profile named pw-trunk-3.
    [edit]user@host# set dynamic-profiles pw-trunk-3
  2. Specify the variables $junos-interface-ifd-name and $junos-underlying-interface-unit to be used by the router to match the interface name and the unit value of the receiving interface.
    [edit dynamic-profiles pw-trunk-3]user@host# set interfaces $junos-interface-ifd-name unit $junos-underlying-interface-unit
  3. Specify the protocol family, interface mode, and the trunk mode VLAN membership for the interface.
    [edit dynamic-profiles pw-trunk-3 interfaces "$junos-interface-ifd-name" unit "$junos-underlying-interface-unit"]user@host# set family bridge family bridge interface-mode trunk vlan-id-list [601-1000]

Creating a Routing Instance with a Bridge Domain

Step-by-Step Procedure

In this example, the routing instance is created with three bridge domains: vlan-100, vlan-200, vlan-300. Only the packets with VLAN IDs that match the VLAN ID configured for a bridge domain are forwarded within the bridge domain.

Note: The VLAN ID configuration supports a range of VLAN IDs but for brevity the example only shows one VLAN ID configured for each bridge domain.

To configure a routing instance with bridge domains:

  1. Create a routing instance named red.
    [edit ]user@host# set routing-instances red instance-type virtual-switch
  2. Configure the bridge domains on the routing instance.
    [edit routing-instances red]user@host# set bridge-domains vlan-100 vlan-id 100user@host# set bridge-domains vlan-200 vlan-id 200user@host# set bridge-domains vlan-1000 vlan-id 1000

Associating Dynamic Profiles with a Routing Instance

Step-by-Step Procedure

By associating the dynamic profiles with a routing instance, you can filter the frames on egress and ingress.

To associate dynamic profiles with a routing instance, configure the routing protocol to accept the VLANs. In this example, the dynamic profile pw-trunk-1 is associated with neighbor 10.255.1.2, the dynamic profile pw-trunk-2 is associated with neighbor 10.255.1.3, and the dynamic profile pw-trunk-3 is associated with neighbor 10.255.1.4.

[edit routing-instances red]user@host# set protocols vpls neighbor 10.255.1.2 associate-profile pw-trunk-1user@host# set protocols vpls neighbor 10.255.1.3 associate-profile pw-trunk-2user@host# set protocols vpls neighbor 10.255.1.4 associate-profile pw-trunk-3

Verification

Verifying the Trunk Interface

Purpose

Make sure that the settings for the trunk interface are correct.

Action

From operational mode, enter the following commands:

user@host> show dynamic-profiles

pw-trunk-1 {interfaces {"$junos-interface-ifd-name" {unit "$junos-underlying-interface-unit" {family-bridge {interface-mode trunk; vlan-id-list 100-300;}}}}}
pw-trunk-2 {interfaces {"$junos-interface-ifd-name" {unit "$junos-underlying-interface-unit" {family-bridge {interface-mode trunk; vlan-id-list 301-600;}}}}}
pw-trunk-3 {interfaces {"$junos-interface-ifd-name" {unit "$junos-underlying-interface-unit" {family-bridge {interface-mode trunk; vlan-id-list 601-1000;}}}}}

user@host> show routing-instances

red {instance-type virtual-switch;protocols {vpls {neighbor 10.255.1.2 {associate-profile pw-trunk-1;}neighbor 10.255.1.3 {associate-profile pw-trunk-2;}neighbor 10.255.1.4 {associate-profile pw-trunk-3;}}}bridge-domains {vlan-100 {vlan-id 100;}vlan-1000 {vlan-id 1000;}vlan-200 {vlan-id 200;}}}

Meaning

On the ingress, the pseudowire receives frames with the VLAN ID 100 to 1000. All other frames are dropped. On the egress, the pseudowire sends frames with VLAN ID 100-300 to a particular neighbor, 301-600 to the second neighbor, and 601-1000 to the third neighbor. All other frames are dropped.

Published: 2013-02-11