BGP VPWS俗称Kompella L2VPN,因为RFC 6624的前身是IETF草案“draf-kompella-l2vpnl2vpn”。一直对MPLS和SDN做出重要贡献的Kireeti Kompella先生有在Juniper公司任开发与创新团队的CTO(the CTO of Juniper’s Development and Innovation team)一职。BGP VPWS的转发平面基于Martini封装(RFC 4448)。亲眼目睹BGP VPWS的开通方式,或许是理解这一技术的最佳方法了。
set interfaces lo0 unit 0 family inet address 1.1.1.1/32 set interfaces lo0 unit 0 family iso address 49.0001.0000.0000.0001.00 set interfaces lo0 unit 0 family mpls # 配置Lookback0口IP地址,ISIS的NET地址,开启MPLS。 set interfaces ge-0/0/1 unit 0 family inet address 12.1.1.1/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 unit 0 family inet address 13.1.1.1/24 set interfaces ge-0/0/2 unit 0 family iso set interfaces ge-0/0/2 unit 0 family mpls # 配置两个骨干接口,配置互联IP,开启ISIS ISO、开启MPLS。 set protocols isis interface ge-0/0/1.0 hello-padding disable set protocols isis interface ge-0/0/1.0 point-to-point set protocols isis interface ge-0/0/2.0 point-to-point set protocols isis interface ge-0/0/2.0 hello-padding disable # ISIS宣告骨干互联接口,配置为P2P网络类型,关闭Hello报文填充。 set protocols isis interface lo0.0 passive # ISIS宣告lookback 口,并配置为被动接口。 set protocols isis level 2 wide-metrics-only # 配置ISIS L2 度量值计算为宽。 set protocols isis level 1 disable # 关闭ISIS L1,只使用L2互联。
MP-iBGP - L2VPN
1 2 3 4 5 6 7 8 9 10 11 12 13
set routing-options autonomous-system 9527 set routing-options router-id 1.1.1.1 # 配置BGP AS号,全局路由ID set protocols bgp group songxwn.com local-address 2.2.2.2 # 创建BGP组,并指定为iBGP set protocols bgp group songxwn.com type internal # 配置源IP为LookbackIP set protocols bgp group songxwn.com neighbor 2.2.2.2 set protocols bgp group songxwn.com neighbor 3.3.3.3 set protocols bgp group songxwn.com neighbor 4.4.4.4 # 建立iBGP邻居,全互联,也可以考虑做RR。 set protocols bgp group songxwn.com family l2vpn signaling # 开启l2vpn地址族,允许传递l2vpn类路由。
LDP和MPLS配置
1 2 3 4 5 6 7 8
set protocols ldp interface ge-0/0/1.0 set protocols ldp interface ge-0/0/2.0 set protocols ldp interface lo0.0 # 骨干互联接口,Lookback口开启LDP set protocols mpls interface lo0.0 set protocols mpls interface set protocols mpls interface # 骨干互联接口,Lookback口开启MPLS
VPWS CCC 接入配置
1 2 3 4 5 6 7 8 9 10 11 12
set interfaces ge-0/0/8 encapsulation ethernet-ccc set interfaces ge-0/0/8 unit 0 family ccc
# 无VLAN标签配置
set interfaces ge-0/0/7 encapsulation flexible-ethernet-services set interfaces ge-0/0/7 unit 102 family encapsulation vlan-ccc set interfaces ge-0/0/7 unit 102 vlan-id 101 set interfaces ge-0/0/7 unit 102 family ccc
# MX1 配置 set interfaces ge-0/0/8 encapsulation ethernet-ccc set interfaces ge-0/0/8 unit 0 family ccc ## CCC 接入端口配置 set interfaces ge-0/0/1 unit 0 family inet address 12.1.1.1/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 unit 0 family inet address 13.1.1.1/24 set interfaces ge-0/0/2 unit 0 family iso set interfaces ge-0/0/2 unit 0 family mpls ## 骨干互联接口配置 set interfaces lo0 unit 0 family inet address 1.1.1.1/32 set interfaces lo0 unit 0 family iso address 49.0001.0000.0000.0001.00 set interfaces lo0 unit 0 family mpls ## Lookback0口配置 set routing-instances songxwn.vpws instance-type l2vpn set routing-instances songxwn.vpws protocols l2vpn site MX1-11 interface ge-0/0/8.0 remote-site-id 14 set routing-instances songxwn.vpws protocols l2vpn site MX1-11 site-identifier 11 set routing-instances songxwn.vpws protocols l2vpn encapsulation-type ethernet set routing-instances songxwn.vpws protocols l2vpn no-control-word set routing-instances songxwn.vpws interface ge-0/0/8.0 set routing-instances songxwn.vpws route-distinguisher 192.168.1.0:11 set routing-instances songxwn.vpws vrf-target target:100:1 ## VPWS 路由实例配置 set protocols isis interface ge-0/0/1.0 hello-padding disable set protocols isis interface ge-0/0/1.0 point-to-point set protocols isis interface ge-0/0/2.0 point-to-point set protocols isis interface ge-0/0/2.0 hello-padding disable set protocols isis interface lo0.0 passive set protocols isis level 2 wide-metrics-only set protocols isis level 1 disable ## ISIS互联配置 set protocols ldp interface ge-0/0/1.0 set protocols ldp interface ge-0/0/2.0 set protocols ldp interface lo0.0 ## LDP配置 set protocols mpls interface lo0.0 set protocols mpls interface ge-0/0/1.0 set protocols mpls interface ge-0/0/2.0 ## MPLS配置 set routing-options autonomous-system 9527 # 配置BGP AS号 set protocols bgp group songxwn.com type internal # 创建BGP组,并指定为iBGP set protocols bgp group songxwn.com local-address 4.4.4.4 set protocols bgp group songxwn.com neighbor 3.3.3.3 set protocols bgp group songxwn.com neighbor 1.1.1.1 set protocols bgp group songxwn.com neighbor 2.2.2.2 #BGP Peer配置 set protocols bgp group songxwn.com family l2vpn signaling # 开启l2vpn地址族,允许传递l2vpn类路由。
从MX4 接入PC Ping MX1 接入PC 接入PC 抓包
VPWS L2VPN 连接验证
1
show l2vpn connections
验证VPWS MPLS转发表
1
show route forwarding-table family mpls | match ccc
show isis adjacency Interface System L State Hold (secs) SNPA ge-0/0/1.0 MX2 2 Up 23 ge-0/0/2.0 MX3 2 Up 20 show ldp session Address State Connection Hold time Adv. Mode 2.2.2.2 Operational Open 20 DU 3.3.3.3 Operational Open 29 DU