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)。
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互联。
LDP
1 2 3 4
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,注意对应接口也需要开启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 13
set routing-instances songxwn.com instance-type vpls # 创建VRF,配置类型为VPLS set routing-instances songxwn.com protocols vpls neighbor 2.2.2.2 set routing-instances songxwn.com protocols vpls neighbor 3.3.3.3 set routing-instances songxwn.com protocols vpls neighbor 4.4.4.4 # 配置静态VPLS互联,LDP方式需要手动配置,而BGP会自动建立。配置此语句可使 LDP 向 VPLS 发出信号。 set routing-instances songxwn.com protocols vpls no-tunnel-services # 此语句会创建一个标签交换接口 (LSI),默认情况下,VPLS 需要隧道服务 PIC卡。所以要在没有隧道服务 PIC卡 的路由器上配置此命令让 VPLS 并创建 LSI。(包括vMX) set routing-instances songxwn.com protocols vpls vpls-id 9527 # VPLS实例唯一ID,需要把统一组网的ID配置为一样。 set routing-instances songxwn.com interface ge-0/0/3.0 set routing-instances songxwn.com interface ge-0/0/4.0 # 配置对接客户CE设备接入接口加入VPLS 实例。
# 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 neighbor 2.2.2.2 set routing-instances songxwn.com protocols vpls neighbor 3.3.3.3 set routing-instances songxwn.com protocols vpls neighbor 4.4.4.4 set routing-instances songxwn.com protocols vpls no-tunnel-services set routing-instances songxwn.com protocols vpls vpls-id 9527 set routing-instances songxwn.com interface ge-0/0/3.0 set routing-instances songxwn.com interface ge-0/0/4.0 ## 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配置