VPLS称为虚拟专用局域网业务(Virtual Private LAN Service),是公用网络中提供的一种点到多点的L2VPN(Layer 2 Virtual Private Network)业务,使地域上隔离的用户站点能通过MAN/WAN(Metropolitan Area Network/Wide Area Network)相连,并且使各个站点间的连接效果像在一个LAN(Local Area Network)中一样。它是一种基于MPLS(MultiProtocol Label Switching)和以太网的二层VPN技术,也被称为透明局域网业务TLS(Transparent LAN Service)。
在以太网上,为了避免环路,一般的二层网络都要求使能STP(Spanning Tree Protocol)协议。但是对使用VPLS的用户来说,不会感知到ISP(Internet Service Provider)的网络,因此在私网侧使能STP的时候,不能把ISP的网络考虑进来。因而VPLS中使用PW全连接和水平分割转发来避免环路:
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 set protocols bgp group songxwn.com neighbor 3.3.3.3 set protocols bgp group songxwn.com neighbor 4.4.4.4 # 建立iBGP邻居 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
VPLS AC 接入配置
1 2 3 4 5 6 7 8 9
set interfaces ge-0/0/3 vlan-tagging set interfaces ge-0/0/3 encapsulation vlan-vpls set interfaces ge-0/0/3 unit 0 encapsulation vlan-vpls set interfaces ge-0/0/3 unit 0 vlan-id 600 set interfaces ge-0/0/3 unit 0 family vpls # 带VLAN接入,带VLAN传输,发送到对端也会带VLAN。 set interfaces ge-0/0/4 encapsulation ethernet-vpls set interfaces ge-0/0/4 unit 0 family vpls # 不带VLAN接入
VPLS 路由实例配置
1 2 3 4 5 6 7 8 9 10 11 12
set routing-instances songxwn.com instance-type vpls set routing-instances songxwn.com set routing-instances songxwn.com interface ge-0/0/3.0
set routing-instances songxwn.com no-tunnel-services set routing-instances songxwn.com route-distinguisher 192.168.0.1:9527 set routing-instances songxwn.com vrf-target target:9527:9527 set routing-instances songxwn.com protocols vpls no-tunnel-services set routing-instances songxwn.com protocols vpls site MX1 site-identifier 1 set routing-instances songxwn.com protocols vpls site MX1 interface ge-0/0/3.0 set routing-instances songxwn.com protocols vpls site
# MX1 配置 set interfaces ge-0/0/3 vlan-tagging set interfaces ge-0/0/3 encapsulation vlan-vpls set interfaces ge-0/0/3 unit 0 encapsulation vlan-vpls set interfaces ge-0/0/3 unit 0 vlan-id 600 set interfaces ge-0/0/3 unit 0 family vpls set interfaces ge-0/0/4 encapsulation ethernet-vpls set interfaces ge-0/0/4 unit 0 family vpls ## AC 接入端口配置 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.com instance-type vpls set routing-instances songxwn.com protocols vpls site MX1 interface ge-0/0/4.0 set routing-instances songxwn.com protocols vpls site MX1 site-identifier 1 set routing-instances songxwn.com protocols vpls no-tunnel-services set routing-instances songxwn.com interface ge-0/0/4.0 set routing-instances songxwn.com route-distinguisher 192.168.0.1:9527 set routing-instances songxwn.com vrf-target target:9527:9527 ## VPLS 路由实例配置 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类路由。
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