Let's say, that I have a following simple BGP-signaled L2VPN configuration:
root@PE4> show configuration routing-instances
vpn-b {
instance-type l2vpn;
interface ge-0/0/0.515;
route-distinguisher 65512:200;
vrf-target target:65512:200;
protocols {
l2vpn {
encapsulation-type ethernet-vlan;
site ce-d {
site-identifier 2;
interface ge-0/0/0.515;
}
}
}
}
root@PE4>
Content of the vpn-b.l2vpn.0 table can be seen below:
root@PE4> show route table vpn-b.l2vpn.0 detail
vpn-b.l2vpn.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
65512:200:1:1/96 (1 entry, 1 announced)
*BGP Preference: 170/-101
Route Distinguisher: 65512:200
Next hop type: Indirect, Next hop index: 0
Address: 0xce2eb90
Next-hop reference count: 6
Source: 192.168.2.1
Protocol next hop: 192.168.2.1
Indirect next hop: 0x2 no-forward INH Session ID: 0x0
State: <Secondary Active Int Ext>
Local AS: 65512 Peer AS: 65512
Age: 3:29:45 Metric2: 1
Validation State: unverified
Task: BGP_65512.192.168.2.1+179
Announcement bits (1): 0-vpn-b-l2vpn
AS path: I
Communities: target:65512:200 Layer2-info: encaps: VLAN, control flags:[0x2] Control-Word, mtu: 0, site preference: 100
Import Accepted
Label-base: 800256, range: 2, status-vector: 0x0, offset: 1
Localpref: 100
Router ID: 192.168.2.1
Primary Routing Table bgp.l2vpn.0
65512:200:2:1/96 (1 entry, 1 announced)
*L2VPN Preference: 170/-101
Next hop type: Indirect, Next hop index: 0
Address: 0xce2f190
Next-hop reference count: 3
Protocol next hop: 192.168.2.4
Indirect next hop: 0x0 - INH Session ID: 0x0
State: <Active Int Ext>
Age: 1d 23:46:41 Metric2: 1
Validation State: unverified
Task: vpn-b-l2vpn
Announcement bits (1): 1-BGP_RT_Background
AS path: I
Communities: Layer2-info: encaps: VLAN, control flags:[0x2] Control-Word, mtu: 0, site preference: 100
Label-base: 800000, range: 2, status-vector: 0x0, offset: 1
Secondary Tables: vpn-b.l2id.0
root@PE4>
How does the PE4 know that frames from the CE connected to ge-0/0/0.515 interface have to be associated with 65512:200:1:1/96 NLRI and thus get the inner label of 800257(2 + 800256 - 1)?
L2VPN-NESE.l2vpn.0table has multiple L2VPN NLRIs. Why does the PE associate incoming frames toxe-0/0/7.119interface with the NLRI with the label base of 800000(if the remote label offset is 1, then thelocal-site-id+remote-label-base-remote-label-offsetformula will give 800000)? – Martin Feb 05 '21 at 13:40vpn-b.l2vpn.0table in my initial post, then it has only one BGP-learned route65512:200:1:1/96. However, let's say that besides65512:200:1:1/96there are also65512:200:3:1/96and65512:200:4:1/96BGP-learned routes in that table. Now how does thePEknow that ingress frames toge-0/0/0.515interface have to be associated with the65512:200:1:1/96and thus get the inner label of 800257. – Martin Feb 07 '21 at 17:45