Juniper MPLS L3VPN实验配置

实验说明

使用Juniper vMX进行实验。

ISIS L2 作为 IGP打通底层路由,LDP 作为公网MPLS标签分发,PE之间使用MP-IBGP

PS: 此文章只有PE的配置,用于学习和理解Juniper的MPLS VPN配置。

个人博客

https://songxwn.com/

配置ISIS

set interfaces lo0 unit 0 family inet address 192.168.0.1/32set interfaces lo0 unit 0 family iso address 49.0002.0192.0168.0001.00# 配置ISO的 NET地址,用于ISISset protocols isis interface lo0.0 passiveset protocols isis level 2 wide-metrics-only# 开启L2路由器的宽度量值计算set protocols isis level 1 disable# 关闭L1路由器set interfaces ge-0/0/1 unit 0 family inet address 12.1.1.2/24set interfaces ge-0/0/1 unit 0 family iso# 开启物理接口的ISO,用于ISIS。set protocols isis interface ge-0/0/1# 宣告 物理接口set protocols isis interface ge-0/0/1 point-to-point# 配置邻居类型为P2Pset protocols isis interface ge-0/0/1 hello-padding disable# 关闭Hello 报文填充set protocols isis interface ge-0/0/1 level 2 metric 1000# 配置ISIS 接口度量值

验证ISIS

show isis adjacency

#确认邻居状态为UP

show route protocol isis

#查看通过ISIS学习的路由表

配置LDP

 set protocols ldp interface allset protocols ldp interface lo0.0# 开启接口的LDP协议set protocols mpls interface lo0.0set protocols mpls interface all# 开启接口的MPLSset interfaces ge-0/0/9 unit 0 family mpls # 开启接口的MPLS

验证LDP

show ldp session

##正常状态为: Operational

show route table inet.3

#查看公网LDP分配的标签。

PS: LDP转发路径完全依赖与IGP路由的选路,且FEC默认只会匹配/32路由建立LSP。

配置MP-BGP

set routing-options router-id 1.1.1.1# 配置全局的路由IDset routing-options autonomous-system 100# 配置全局的 AS号set protocols bgp group RR type internal# 建立BGP组,配置标签为IBGPset protocols bgp group RR local-address 1.1.1.1# 配置BGP的源IP为 Lookback 地址。set protocols bgp group RR family inet unicastset protocols bgp group RR family inet-vpn unicast# 开启单播IPv4地址族,开启VPNv4地址族。set protocols bgp group RR neighbor 4.4.4.4# 配置BGP邻居。

验证BGP

show bgp neighbor

#查看BGP邻居

VRF配置

set routing-instances VLL-VPN1 instance-type vrf# 配置路由实例标签为VRFset routing-instances VLL-VPN1 interface ge-0/0/0.0# 配置接口加入到路由实例set routing-instances VLL-VPN1 route-distinguisher 100:1set routing-instances VLL-VPN1 vrf-target target:100:1#配置RD RT值,用于本地路由区分,和路由VRF的区分导入set routing-instances VLL-VPN1 vrf-table-label#为VRF里面的所有路由生成VPN MPLS标签

##在VRF路由表里面的,都会建立LSP发送路由到对端的MP-BGP邻居

验证VPN路由传递

show route table VLL-VPN1.inet

#查看VPN路由表,是否传递到对端PE。也可以查其分配的内网MPLS标签。

参考: https://supportportal.juniper.net/s/article/SRX-Example-Configuring-L3VPN-over-MPLS?language=en_US

配置BGP 反射器

反射器配置

set protocols bgp group RR cluster 2.2.2.2#配置自己为路由反射器set protocols bgp group RR neighbor 4.4.4.4#与客户端建立对等体

客户端配置

set protocols bgp group RR neighbor 2.2.2.2#与RR反射器建立对等体。

MPLS MTU / Jumbo frames 配置

由于多层的MPLS标签会占用有效负载大小,使默认的MTU 1500无法传输(MPLS的MTU会默认使用接口的MTU),所以要改大运营设备所有的接口帧大小和MTU。

MPLS标签栈象“垫层”一样,位于二层数据帧头和数据之间。在MPLS转发过程中,虽然网络层报文长度小于接口的MTU,但是增加MPLS标签后,报文长度可能超过链路层允许发送的范围,从而导致报文无法正常转发。为此,设备上定义了MPLS MTU,MPLS转发时将增加标签后的报文长度与MPLS MTU比较。报文长度大于MPLS MTU时,如果允许分片,则将报文分片后再进行转发;如果不允许分片,则直接丢弃。

参考

https://www.juniper.net/documentation/us/en/software/junos/bgp/topics/topic-map/bgp-rr.html#id-understanding-bgp-route-reflectors

https://www.h3c.com/cn/d_200805/606207_30003_0.htm#_Toc227661962

https://zh.wikipedia.org/zh-hans/%E5%B7%A8%E5%9E%8B%E5%B8%A7

https://support.huawei.com/enterprise/zh/doc/EDOC1100138290/2edd846


关于作者: 网站小编

码农网专注IT技术教程资源分享平台,学习资源下载网站,58码农网包含计算机技术、网站程序源码下载、编程技术论坛、互联网资源下载等产品服务,提供原创、优质、完整内容的专业码农交流分享平台。

热门文章