Example: Configuring VPLS Pseudowires with Dynamic Profiles—Complex Solutions
Dynamic profiles for VPLS pseudowires can be helpful in a variety of VLAN configurations. This section explores some of these situations through examples.
These examples are not complete router configurations.
All of the examples in this section address the same basic topology. A routing instance blue uses a trunk bridge to connect different departments in an organization, each with their own VLANs, at two different sites. The organization uses a BGP-based VPLS with a virtual switch to accomplish this.
Configuration of Routing Instance and Interfaces Without Dynamic Profiles
The basic configuration of routing instance and interfaces without dynamic profiles follows:
[edit routing-instance blue] instance-type virtual-switch; route-distinguisher 10.1.1.10:1; vrf-target target:1000:1; interface ge-3/0/0; # The trunk interface bridge-domains { sales { vlan-id 10; interface ge-0/0/0.1; ... # Other interfaces and statements for Sales } engineering { vlan-id 20; interface ge-1/0/2.0; ... # Other interfaces and statements for Engineering } accounting { vlan-id 30; interface ge-2/0/3.0; ... # Other interfaces and statements for Accounting } others { vlan-id—list [ 40 50 ]; # Other departments } } protocols vpls { site-range 10; site sample-site-1 { site-identifier 1; } } ... # Other statements for instance Blue [edit interfaces] ge-0/0/1 { unit 0 { vlan-id 100; } } ge-3/0/0 { unit 0 { family bridge { interface-mode trunk; # This is the trunk vlan-id-list [ 10 20 30 40 50 ]; } } } ... # More interface statements
This configuration switches the departmental VLAN traffic (sales, engineering, etc.) bridge domains over the VPLS pseudowire trunk connecting to the other site.
Configuration of Routing Instance and Interfaces Using Dynamic Profiles
Here is how dynamic profiles can be applied to this basic configuration.
First, consider the requirement to push an outer VLAN tag value of 200 onto the VPLS pseudowire frames on egress. Dynamic profiles easily satisfy this requirement.
[edit routing-instance green] instance-type virtual-switch; ... # Other routing instance statements protocols vpls { site-range 10; site sample-site-1 { site-identifier 1; } associate-profile green_vpls_pw_1; # Apply profile here } ... # Other routing instance statements [edit dynamic-profiles] green_vpls_pw_1 interfaces $junos-interface-ifd-name { unit $junos-underlying-unit-number { vlan-id 200; # This is the outer tag family bridge { interface-mode trunk; inner-vlan-id-list [ 10 20 30 40 50 ]; } } }
This is not a complete router configuration.
With the dynamic profile, a packet in a frame arriving on an interface is classified as belonging to one of the bridge domains (VLANs 10–50). At the egress of the trunk VPLS pseudowire, the outer VLAN tag 200 is pushed onto the frame. At the ingress of the pseudowire at the remote location, the outer VLAN tag 200 is removed and the frame is delivered to the appropriate bridge domain.
But what if the packets associated with the Accounting VLAN are not to be forwarding to the remote site? Dynamic profiles are useful here as well.
This configuration keeps the Accounting frames from reaching the remote site.
[edit routing-instances green] instance-type virtual-switch; ... # Other routing instance statements protocols vpls { site-range 10; site sample-site-1 { site-identifier 1; } associate-profile green_vpls_pw_2; # Apply profile here } ... # Other routing instance statements [edit dynamic-profiles] green_vpls_pw_2 interfaces $junos-interface-ifd-name { unit $junos-underlying-unit-number { family bridge { interface-mode trunk; inner-vlan-id-list [ 10 20 40 50 ]; # Removed Accounting VLAN 30 } } }
This is not a complete router configuration.
In this case, frames arriving on the interfaces are classified according to their bridge domains and switched, if necessary, to the VPLS pseudowire trunk, except for Engineering frames. Engineering frames (VLAN 30) are only switched within the interfaces listed within bridge domain accounting and any statically configured trunk interfaces and are prevented from crossing the VPLS pseudowire due to the absence of VLAN 30 on the trunk.
We can combine the two examples and use dynamic profiles to forward the frames (other than accounting frames) to the remote site with an out tag of 200.
This configuration keeps the Accounting frames from reaching the remote site and pushes an outer tag of 200 on VPLS pseudowire traffic.
[edit routing-instances green] instance-type virtual-switch; ... # Other routing instance statements protocols vpls { site-range 10; site sample-site-1 { site-identifier 1; } associate-profile green_vpls_pw_3; # Apply profile here } ... # Other routing instance statements [edit dynamic-profiles] green_vpls_pw_3 interfaces $junos-interface-ifd-name { unit $junos-underlying-unit-number { vlan-id 200; # This is the outer tag family bridge { interface-mode trunk; inner-vlan-id-list [ 10 20 40 50 ]; # Removed Accounting VLAN 30 } } }
This is not a complete router configuration.
In this case, frames arriving on the interfaces are classified according to their bridge domains and switched, if necessary, to the VPLS pseudowire trunk with an outer VLAN tag of 200, except for Engineering frames. Engineering frames (VLAN 30) are only switched within the interfaces listed within bridge domain accounting and any statically configured trunk interfaces and are prevented from crossing the VPLS pseudowire due to the absence of VLAN 30 on the trunk.
Configuration of Tag Translation Using Dynamic Profiles
Consider a final case where the bridge domain VLANs need translation at the VPLS pseudowire trunk interface. In this case, sales (VLAN 10) is mapped to VLAN 110 and engineering (VLAN 20) is mapped to VLAN 120.
This configuration adds tag translation to the VPLS pseudowire traffic.
[edit routing-instances green] instance-type virtual-switch; ... # Other routing instance statements protocols vpls { site-range 10; site sample-site-1 { site-identifier 1; } associate-profile green_vpls_pw_4; # Apply profile here } ... # Other routing instance statements [edit dynamic-profiles] green_vpls_pw_4 interfaces $junos-interface-ifd-name { unit $junos-underlying-unit-number { family bridge { interface-mode trunk; vlan-id-list [ 10 20 30 40 50 ]; # All VLANs vlan-rewrite translate 110 10; # Sales VLAN vlan-rewrite translate 120 20; # Engineering VLAN } } }
This is not a complete router configuration.
This translates the sales and engineering VLAN tags exiting the VPLS pseudowire accordingly. At the ingress of the VPLS pseudowire, VLANs 110 and 120 are translated back to 10 and 20, respectively.