Supported Platforms
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

Configuration
Configuring VPLS pseudowires as trunk interfaces using dynamic profiles involves performing these tasks:
- Creating a Dynamic Profile
- Creating a Routing Instance with a Bridge Domain
- Associating Dynamic Profiles with a Routing Instance
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.
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. |
- Create a dynamic profile named pw-trunk-1.[edit]user@host# set dynamic-profiles pw-trunk-1
- 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
- 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.
- Create a dynamic profile named pw-trunk-2.[edit ]user@host# set dynamic-profiles pw-trunk-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
- 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.
- Create a dynamic profile named pw-trunk-3.[edit]user@host# set dynamic-profiles pw-trunk-3
- 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
- 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:
- Create a routing instance named red.[edit ]user@host# set routing-instances red instance-type virtual-switch
- 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.
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
user@host> show routing-instances
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.