假设,我有以下简单的BGP信号L2VPN配置:
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>vpn-b.l2vpn.0表的内容如下所示:
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>PE4如何知道从CE连接到ge-0/0/0.515接口的帧必须与65512:200:1:1/96 NLRI相关联,从而得到内部标签为800257(2 + 800256 - 1)?
发布于 2021-02-04 18:34:11
有两个标签,因此当流量从CE中吸收PE时,就会出现双重推送。
每个接口都从那个L2VPNs标签块中获取一个标签。内部标签基于远程L2VPN站点的此接口特定标签。
L2VPN与VPLS使用相同的NLRI,因为它们包含:
如果不是多宿主,则每个L2VPN CE接口都有自己的站点ID,因此在设备上分配自己的标签。如果您是多归属,两者都是相同的网站,将使用相同的标签,但需要额外的路由选择,以确定哪个电路是活动的。
BGP NLRI中的信息允许本地和远程PE为发送和接收导出内部标签值。每一个CE都是自己的站点,双方都可以计算出每一个必需的CE到CE标签所需。记住,标签块本质上是本地重要的,也就是说,每个PE的标签块不一定是相同的。
您可以查看L2VPN连接以查看标签详细信息。
jhead@L2VPN-PE1> show l2vpn connections instance L2VPN-NESE
Layer-2 VPN connections:
<...snip...>
Instance: L2VPN-NESE
Edge protection: Not-Primary
Local site: 1 (1)
connection-site Type St Time last up # Up trans
2 rmt Up Jan 7 19:45:02 2021 1
Remote PE: 2.2.2.2, Negotiated control-word: No
Incoming label: 800183, Outgoing label: 800000
Local interface: xe-0/0/7.119, Status: Up, Encapsulation: VLAN
Flow Label Transmit: No, Flow Label Receive: No此外,您可以看到mpls.0表的本地接口的标签关联。
jhead@L2VPN-PE1> show route label 800183
mpls.0: 1063 destinations, 1063 routes (1063 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
800183 *[L2VPN/7] 3w6d 22:34:47
> via xe-0/0/7.119, Pop外部标签是与LSP关联到远程PE (RSVP / LDP)的传输标签。
https://networkengineering.stackexchange.com/questions/72416
复制相似问题