配置EVC承载VPLS接入L3VPN示例
组网需求
如图9-11所示,在接入网络中,通过在CSG上配置BD实现用户站点的接入并与ASG建立VPLS PW;在运营商承载网络中,通过在ASG上配置VBDIF终结VPLS PW并与的RSG之间建立L3VPN。
本例中interface1,sub-interface1.1,interface2,分别代表GE0/1/0,GE0/1/0.1,GE0/2/0。
配置思路
在CSG、ASG和RSG上配置IP地址和IGP。
在CSG、ASG和RSG上配置LDP LSP隧道。
- 在CSG和ASG上配置EVC承载VPLS。
创建EVC二层子接口和BD,并将EVC二层子接口加入对应的BD。
创建BD模式的VSI,指定信令为LDP,然后将VSI与BD绑定。
- 在ASG和RSG上配置L3VPN。
配置IPv4地址族的VPN实例
建立MP-IBGP对等体关系
在ASG上创建VBDIF接口并绑定L3VPN。
数据准备
为完成此配置例,需准备如下的数据:
CSG和ASG上的BD ID。
CSG和ASG上的VSI ID(必须一致)。
CSG和ASG上的VSI名称及绑定VSI的接口。
CSG、ASG和RSG上MPLS LSR-ID。
ASG和RSG上的VPN实例名称、VPN的路由属性VPN-Target。
操作步骤
- 配置各节点接口的IP地址及Loopback接口的地址
具体配置过程请参考配置文件。
- 在各节点上配置IGP,本示例使用OSPF
具体配置过程请参考配置文件。
- 在各节点上配置MPLS LDP隧道
具体配置过程请参考配置文件。
- 在CSG和ASG上配置EVC承载VPLS
- ASG和RSG上配置L3VPN
- 验证配置结果。
完成上述配置后,执行命令display bridge-domain命令,可以查看到EVC二层子接口加入的BD、BD的状态等信息。以CSG为例:
[~CSG] display bridge-domain 1
-------------------------------------------------------------------------------- MAC_LRN: MAC learning; STAT: Statistics; SPLIT: Split-horizon; BC: Broadcast; MC: Unknown multicast; UC: Unknown unicast; *down: Administratively down; FWD: Forward; DSD: Discard; U: Up; D: Down; -------------------------------------------------------------------------------- BDID Ports -------------------------------------------------------------------------------- 1 GE0/1/0.1(U) BDID State MAC-LRN STAT BC MC UC SPLIT Description -------------------------------------------------------------------------------- 1 up enable disable FWD FWD FWD disable
执行display vsi name evc-vsi命令,可以看到名字为evc-vsi的VSI实例状态为UP。以CSG为例:
[~CSG] display vsi name evc-vsi
-------------------------------------------------------------------------- Vsi Mem PW Mac Encap Mtu Vsi Name Disc Type Learn Type Value State -------------------------------------------------------------------------- evc-vsi -- ldp qualify vlan 1500 up
执行display ip routing-table vpn-instance命令,可以看到IPv4 VPN实例路由表的信息。以ASG为例:
[~ASG] display ip routing-table vpn-instance vpna
Route Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole route ------------------------------------------------------------------------------ Routing Table : vpna Destinations : 5 Routes : 5 Destination/Mask Proto Pre Cost Flags NextHop Interface 10.1.1.0/24 Direct 0 0 D 10.1.1.2 Vbdif1 10.1.1.2/32 Direct 0 0 D 127.0.0.1 Vbdif1 10.1.1.255/32 Direct 0 0 D 127.0.0.1 Vbdif1 10.4.4.0/24 IBGP 255 0 RD 3.3.3.9 GigabitEthernet0/2/0 255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
配置文件
CSG的配置文件
# sysname CSG # mpls lsr-id 1.1.1.9 # mpls # mpls l2vpn # vsi evc-vsi bd-mode pwsignal ldp vsi-id 10 peer 2.2.2.9 # bridge-domain 1 l2 binding vsi evc-vsi pw-tag 1 # mpls ldp # interface GigabitEthernet0/1/0 undo shutdown # interface GigabitEthernet0/1/0.1 mode l2 encapsulation dot1q vid 1 rewrite pop single bridge-domain 1 # interface GigabitEthernet0/2/0 undo shutdown ip address 10.2.2.1 255.255.255.0 mpls mpls ldp # interface LoopBack1 ip address 1.1.1.9 255.255.255.255 # ospf 1 area 0.0.0.0 network 1.1.1.9 0.0.0.0 network 10.2.2.0 0.0.0.255 # return
ASG的配置文件
# sysname ASG # ip vpn-instance vpna ipv4-family route-distinguisher 100:100 apply-label per-instance vpn-target 100:100 export-extcommunity vpn-target 100:100 import-extcommunity # mpls lsr-id 2.2.2.9 # mpls # mpls l2vpn # vsi evc-vsi bd-mode pwsignal ldp vsi-id 10 peer 1.1.1.9 # bridge-domain 1 l2 binding vsi evc-vsi pw-tag 1 # mpls ldp # interface Vbdif 1 ip binding vpn-instance vpna ip address 10.1.1.2 255.255.255.0 # interface GigabitEthernet0/1/0 undo shutdown ip address 10.2.2.2 255.255.255.0 mpls mpls ldp # interface GigabitEthernet0/2/0 undo shutdown ip address 10.3.3.1 255.255.255.0 mpls mpls ldp # interface LoopBack1 ip address 2.2.2.9 255.255.255.255 # bgp 100 peer 3.3.3.9 as-number 100 peer 3.3.3.9 connect-interface LoopBack1 # ipv4-family unicast undo synchronization peer 3.3.3.9 enable # ipv4-family vpnv4 policy vpn-target peer 3.3.3.9 enable # ipv4-family vpn-instance vpna import-route direct # ospf 1 area 0.0.0.0 network 2.2.2.9 0.0.0.0 network 10.2.2.0 0.0.0.255 network 10.3.3.0 0.0.0.255 # return
RSG的配置文件
# sysname RSG # ip vpn-instance vpna ipv4-family route-distinguisher 100:100 apply-label per-instance vpn-target 100:100 export-extcommunity vpn-target 100:100 import-extcommunity # mpls lsr-id 3.3.3.9 # mpls # mpls ldp # interface GigabitEthernet0/1/0 undo shutdown ip address 10.3.3.2 255.255.255.0 mpls mpls ldp # interface GigabitEthernet0/2/0 undo shutdown ip binding vpn-instance vpna ip address 10.4.4.1 255.255.255.0 # interface LoopBack1 ip address 3.3.3.9 255.255.255.0 # bgp 100 peer 2.2.2.9 as-number 100 peer 2.2.2.9 connect-interface LoopBack1 # ipv4-family unicast undo synchronization peer 2.2.2.9 enable # ipv4-family vpnv4 policy vpn-target peer 2.2.2.9 enable # ipv4-family vpn-instance vpna import-route direct # ospf 1 area 0.0.0.0 network 3.3.3.9 0.0.0.0 network 10.3.3.0 0.0.0.255 # return