IN THIS PAGE
Example: Building a VPLS From Router 1 to Router 3 to Validate Label Blocks
This example illustrates how VPLS label blocks are allocated for a specific configuration. It is organized in the following sections:
Requirements
This configuration example requires three Juniper Networks routers.
Overview and Topology
In the network shown in Figure 1 Router 1 is establishing a pseudowire to Router 3
Each PE filters the VPLS NLRI contained in the BGP update messages based on route target communities. Those VPLS NLRI instances that match the route target (in this case 8717:2000:2:1) are imported for further processing. The NLRI for Router 1 and Router 3 is shown in Table 1.
Table 1: NLRI Exchange Between for Router 1 and Router 3
Router 1 NLRI Advertisement to Router 3 | Router 3 NLRI Advertisement to Router 1 |
---|---|
RD - 8717:1000 | RD - 8717:1000 |
VE ID - 1 | VE ID - 2 |
VE Block Offset - 1 | VE Block Offset - 1 |
VE Block Size - 8 | VE Block Size - 8 |
Label Base - 262161 | Label Base - 262153 |
To set up a pseudowire to Router 3, Router 1 must select a label to use to send traffic to Router 3 and also select a label that it expects Router 3 to use to send traffic to itself. The site ID contained in the VPLS NLRI from Router 3 is 2.
Router 1 learns of the existence of site ID 2 in the same VPLS domain. Using the equation VBO <= Local Site ID < (VBO +VBS), Router 1 checks if the route advertised by site ID 2 fits in the label block and block offset that it previously advertised to Router 3. In this example it does fit, so the site ID 2 is mapped by the VPLS NLRI advertised by Router 1, and Router 1 is ready to set up a pseudowire to Router 3.
To select the label to reach Router 3, Router 1 looks at the label block advertised by Router 3 and performs a calculation. The calculation a PE router uses to check if its site ID is mapped in the label block from the remote peer is VBO <= Local Site ID < (VBO +VBS). So, Router 1 selects label (262153 + (1 -1)) = 262153 to send traffic to Router 3. Using the same equation, Router 1 looks at its own label block that it advertised and selects label (262161 + (2 - 1)) = 262162 to receive traffic from Router 3. Router 1 programs its forwarding state such that any traffic destined to Router 3 carries the pseudowire label 262153 and any traffic coming from Router 3 is expected to have the pseudowire label 262162. This completes the operations on the VPLS NLRI received from Router 3. Router 1 now has a pseudowire set up to Router 3.
Router 3 operation is very similar to the Router 1 operation. Since the Router 3 site ID of 2 fits in the label block and block offset advertised by Router 1, Router 3 selects label (262161 + (2 - 1)) = 262162 to send traffic to Router 1. Router 3 looks at its own label block that it advertised and selects label (262153 + (1 - 1)) = 262153 to receive traffic from Router 1. This completes the creation of a pseudowire to Router 1.
By default, for VPLS operation Junos OS uses a virtual tunnel
(VT) loopback interface to represent a pseudowire. This example uses
a label-switched interface (LSI) instead of a VT interface because
there is no change in the VPLS control plane operation. Thus, for
an MX platform, if there is a tunnel physical interface card (PIC)
configured, it is mandatory to include the no-tunnel-services statement at the
[edit routing-instances routing-instance-name protocols vpls] hierarchy
level.
Configuration
The following sections present the steps to configure and verify the example in Figure 1.
Configuring Router 1
Step-by-Step Procedure
- Configure Router 1. Create the edut routing
instance. Specify the vpls instance type. Configure the
route distinguisher and specify the value 8717:1000. Configure
the route target and specify the value 8717:100 Configure
the VPLS protocol. Specify 10 as the site range. Specify 1 as the site ID. Include the no-tunnel-services statement.[edit routing-instances]edut {instance-type vpls;interface ge-5/0/2.0;route-distinguisher 8717:1000;vrf-target target:8717:100;protocols {vpls {site-range 10;no-tunnel-services;site router-1 {site-identifier 1;}}}}
Configuring Router 3
Step-by-Step Procedure
- Configure Router 3. Create the edut routing
instance. Specify the vpls instance type. Configure the
route distinguisher and specify the value 8717:2000. Configure
the route target and specify the value 8717:200 Configure
the VPLS protocol. Specify 10 as the site range. Specify 2 as the site ID. Include the no-tunnel-services statement.[edit routing-instances]edut {instance-type vpls;interface ge-4/0/2.0;route-distinguisher 8717:2000;vrf-target target:8717:100;protocols {vpls {site-range 10;no-tunnel-services;site router-3 {site-identifier 2;}}}}
Verifying the VPLS Label Allocations
Step-by-Step Procedure
- As shown in the figure and the configuration, Site A is
attached to Router 1. Site A is assigned a site ID of 1. Before Router
1 can announce its membership to VPLS edut using a BGP
update message, Router 1 needs to allocate a default label block.
In this example, the label base of the label block allocated by Router
1 is 262161. Since Router 1’s site ID is 1, Router 1 associates
the assigned label block with block offset of 1. The following messages
are sent from Router 1 to Router 3 and displayed using the monitor
traffic interface interface-name command:
user@Router1> monitor traffic interface ge-5/3/2
Jun 14 12:26:31.280818 BGP SEND 10.10.10.1+179 -> 10.10.10.3+53950 Jun 14 12:26:31.280824 BGP SEND message type 2 (Update) length 88 Jun 14 12:26:31.280828 BGP SEND flags 0x40 code Origin(1): IGP Jun 14 12:26:31.280833 BGP SEND flags 0x40 code ASPath(2) length 0: <null> Jun 14 12:26:31.280837 BGP SEND flags 0x40 code LocalPref(5): 100 Jun 14 12:26:31.280844 BGP SEND flags 0xc0 code Extended Communities(16): 2:8717:100 800a:19:0:0 Jun 14 12:26:31.280848 BGP SEND flags 0x90 code MP_reach(14): AFI/SAFI 25/65 Jun 14 12:26:31.280853 BGP SEND nhop 10.10.10.1 len 4 Jun 14 12:26:31.280862 BGP SEND 8717:1000:1:1 (label base : 262161 range : 8, ce id: 1, offset: 1) Jun 14 12:26:31.405067 BGP RECV 10.10.10.3+53950 -> 10.10.10.1+179 Jun 14 12:26:31.405074 BGP RECV message type 2 (Update) length 88 Jun 14 12:26:31.405080 BGP RECV flags 0x40 code Origin(1): IGP Jun 14 12:26:31.405085 BGP RECV flags 0x40 code ASPath(2) length 0: <null> Jun 14 12:26:31.405089 BGP RECV flags 0x40 code LocalPref(5): 100 Jun 14 12:26:31.405096 BGP RECV flags 0xc0 code Extended Communities(16): 2:8717:100 800a:19:0:0 Jun 14 12:26:31.405101 BGP RECV flags 0x90 code MP_reach(14): AFI/SAFI 25/65 Jun 14 12:26:31.405106 BGP RECV nhop 10.10.10.3 len 4 Jun 14 12:26:31.405116 BGP RECV 8717:2000:2:1 (label base : 262153 range : 8, ce id: 2, offset: 1)
- As shown in the figure and the configuration, Site B is
attached to Router 3. Site B is assigned a site ID of 2. Before Router
3 can announce its membership to VPLS edut using a BGP
update message, Router 3 assigns a default label block with the label
base of 262153. The block offset for this label block is
1 because its own site ID of 2 fits in the block being advertised.
The following messages are sent from Router 3 to Router 1 and displayed
using the monitor traffic interface interface-name command:
user@Router3> monitor traffic interface ge-2/0/1
Jun 14 12:26:31.282008 BGP SEND 10.10.10.3+53950 -> 10.10.10.1+179 Jun 14 12:26:31.282018 BGP SEND message type 2 (Update) length 88 Jun 14 12:26:31.282026 BGP SEND flags 0x40 code Origin(1): IGP Jun 14 12:26:31.282034 BGP SEND flags 0x40 code ASPath(2) length 0: <null> Jun 14 12:26:31.282041 BGP SEND flags 0x40 code LocalPref(5): 100 Jun 14 12:26:31.282052 BGP SEND flags 0xc0 code Extended Communities(16): 2:8717:100 800a:19:0:0 Jun 14 12:26:31.282078 BGP SEND flags 0x90 code MP_reach(14): AFI/SAFI 25/65 Jun 14 12:26:31.282088 BGP SEND nhop 10.10.10.3 len 4 Jun 14 12:26:31.282102 BGP SEND 8717:2000:2:1 (label base : 262153 range : 8, ce id: 2, offset: 1) Jun 14 12:26:31.283395 BGP RECV 10.10.10.1+179 -> 10.10.10.3+53950 Jun 14 12:26:31.283405 BGP RECV message type 2 (Update) length 88 Jun 14 12:26:31.283412 BGP RECV flags 0x40 code Origin(1): IGP Jun 14 12:26:31.283419 BGP RECV flags 0x40 code ASPath(2) length 0: <null> Jun 14 12:26:31.283426 BGP RECV flags 0x40 code LocalPref(5): 100 Jun 14 12:26:31.283435 BGP RECV flags 0xc0 code Extended Communities(16): 2:8717:100 800a:19:0:0 Jun 14 12:26:31.283443 BGP RECV flags 0x90 code MP_reach(14): AFI/SAFI 25/65 Jun 14 12:26:31.283471 BGP RECV nhop 10.10.10.1 len 4 Jun 14 12:26:31.283486 BGP RECV 8717:1000:1:1 (label base : 262161 range : 8, ce id: 1, offset: 1)
- Verify the connection status messages for Router 1 using
the show vpls connections command. Notice the base label
is 262161, the incoming label from Router 3 is 262162, and the outgoing label to Router 3 is 262153.
user@Router1> show vpls connections instance edut extensive
Instance: edut Local site: router-1 (1) Number of local interfaces: 1 Number of local interfaces up: 1 IRB interface present: no ge-5/0/2.0 lsi.1049600 2 Intf - vpls edut local site 1 remote site 2 Label-base Offset Range Preference 262161 1 8 100 connection-site Type St Time last up # Up trans 2 rmt Up Jun 14 12:26:31 2009 1 Remote PE: 10.10.10.3, Negotiated control-word: No Incoming label: 262162, Outgoing label: 262153 Local interface: lsi.1049600, Status: Up, Encapsulation: VPLS Description: Intf - vpls edut local site 1 remote site 2 Connection History: Jun 14 12:26:31 2009 status update timer Jun 14 12:26:31 2009 loc intf up lsi.1049600 Jun 14 12:26:31 2009 PE route changed Jun 14 12:26:31 2009 Out lbl Update 262153 Jun 14 12:26:31 2009 In lbl Update 262162 Jun 14 12:26:31 2009 loc intf down Layer-2 VPN connections: Legend for connection status (St) EI -- encapsulation invalid NC -- interface encapsulation not CCC/TCC/VPLS EM -- encapsulation mismatch WE -- interface and instance encaps not same VC-Dn -- Virtual circuit down NP -- interface hardware not present CM -- control-word mismatch -< -- only outbound connection is up CN -- circuit not provisioned >- -- only inbound connection is up OR -- out of range Up -- operational OL -- no outgoing label Dn -- down LD -- local site signaled down CF -- call admission control failure RD -- remote site signaled down SC -- local and remote site ID collision LN -- local site not designated LM -- local site ID not minimum designated RN -- remote site not designated RM -- remote site ID not minimum designated XX -- unknown connection status IL -- no incoming label MM -- MTU mismatch MI -- Mesh-Group ID not availble BK -- Backup connection ST -- Standby connection PF -- Profile parse failure PB -- Profile busy Legend for interface status Up -- operational Dn -- down
- Verify the connection status messages for Router 3 using
the show vpls connections command. Notice the base label
is 262153, the incoming label from Router 1 is 262153, and the outgoing label to Router 1 is 262162.
user@Router3> show vpls connections instance edut extensive
Instance: edut Local site: router-3 (2) Number of local interfaces: 1 Number of local interfaces up: 1 IRB interface present: no ge-4/0/2.0 lsi.1050368 1 Intf - vpls edut local site 2 remote site 1 Label-base Offset Range Preference 262153 1 8 100 connection-site Type St Time last up # Up trans 1 rmt Up Jun 14 12:26:31 2009 1 Remote PE: 10.10.10.1, Negotiated control-word: No Incoming label: 262153, Outgoing label: 262162 Local interface: lsi.1050368, Status: Up, Encapsulation: VPLS Description: Intf - vpls edut local site 2 remote site 1 Connection History: Jun 14 12:26:31 2009 status update timer Jun 14 12:26:31 2009 loc intf up lsi.1050368 Jun 14 12:26:31 2009 PE route changed Jun 14 12:26:31 2009 Out lbl Update 262162 Jun 14 12:26:31 2009 In lbl Update 262153 Jun 14 12:26:31 2009 loc intf down Layer-2 VPN connections: Legend for connection status (St) EI -- encapsulation invalid NC -- interface encapsulation not CCC/TCC/VPLS EM -- encapsulation mismatch WE -- interface and instance encaps not same VC-Dn -- Virtual circuit down NP -- interface hardware not present CM -- control-word mismatch -< -- only outbound connection is up CN -- circuit not provisioned >- -- only inbound connection is up OR -- out of range Up -- operational OL -- no outgoing label Dn -- down LD -- local site signaled down CF -- call admission control failure RD -- remote site signaled down SC -- local and remote site ID collision LN -- local site not designated LM -- local site ID not minimum designated RN -- remote site not designated RM -- remote site ID not minimum designated XX -- unknown connection status IL -- no incoming label MM -- MTU mismatch MI -- Mesh-Group ID not availble BK -- Backup connection ST -- Standby connection PF -- Profile parse failure PB -- Profile busy Legend for interface status Up -- operational Dn -- down