本文主要是介绍ENSP MPLS 3层专线,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
拓扑图
左边使用OSPF,右边使用ISIS。双边做路由引入,全部路由器开启MPLS。R3R4使用EBGP互通。两台交换机用来打VLAN对接路由器的子接口。
R1配置:
<r1>dis cu
#
sysname r1
#
mpls lsr-id 1.1.1.1
mpls
#
mpls ldp#
interface GigabitEthernet0/0/0ip address 10.0.100.1 255.255.255.252mplsmpls ldp
#
interface GigabitEthernet0/0/1ip address 10.0.0.1 255.255.255.252mplsmpls ldp
#interface LoopBack0ip address 1.1.1.1 255.255.255.255
#
ospf 1import-route directarea 0.0.0.0network 1.1.1.1 0.0.0.0network 10.0.0.0 0.0.0.3network 10.0.100.0 0.0.0.3
#
R2配置:
<r2>dis cu
#
sysname r2
#
mpls lsr-id 2.2.2.2
mpls
#
mpls ldp
#isis 100network-entity 49.0001.0222.2000.0000.00import-route directimport-route ospf 1
#interface GigabitEthernet0/0/0ip address 10.0.100.2 255.255.255.252isis enable 100mplsmpls ldp
#
interface GigabitEthernet0/0/1ip address 10.0.1.1 255.255.255.252isis enable 100mplsmpls ldp
#interface LoopBack0ip address 2.2.2.2 255.255.255.255isis enable 100
#
ospf 1import-route isis 100area 0.0.0.0network 0.0.0.0 255.255.255.255
R3配置:
#
sysname r3
#
ip vpn-instance vpnaipv4-familyroute-distinguisher 100:1vpn-target 111:1 export-extcommunityvpn-target 111:1 import-extcommunity
#
mpls lsr-id 3.3.3.3
mpls
#
mpls ldp
#interface GigabitEthernet0/0/0ip address 10.0.0.2 255.255.255.252mplsmpls ldp
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/1.10dot1q termination vid 10ip binding vpn-instance vpnaip address 10.0.10.1 255.255.255.252
#interface LoopBack0ip address 3.3.3.3 255.255.255.255
#
bgp 100router-id 3.3.3.3peer 4.4.4.4 as-number 200peer 4.4.4.4 ebgp-max-hop 10peer 4.4.4.4 connect-interface LoopBack0#ipv4-family unicastundo synchronizationpeer 4.4.4.4 enablepeer 4.4.4.4 next-hop-local#ipv4-family vpnv4policy vpn-targetpeer 4.4.4.4 enable#ipv4-family vpn-instance vpnaimport-route directimport-route static
#
ospf 1area 0.0.0.0network 3.3.3.3 0.0.0.0network 10.0.0.0 0.0.0.3
R4配置
#
sysname r4
#
ip vpn-instance vpnaipv4-familyroute-distinguisher 100:1vpn-target 111:1 export-extcommunityvpn-target 111:1 import-extcommunity
#
mpls lsr-id 4.4.4.4
mpls
#
mpls ldp
#isis 100network-entity 49.0001.0444.4000.0000.00
#interface GigabitEthernet0/0/0ip address 10.0.1.2 255.255.255.252isis enable 100mplsmpls ldp
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/1.20dot1q termination vid 20ip binding vpn-instance vpnaip address 10.0.20.1 255.255.255.252
#
interface GigabitEthernet0/0/2ip binding vpn-instance vpnaip address 10.0.30.1 255.255.255.252
#interface LoopBack0ip address 4.4.4.4 255.255.255.255isis enable 100
#
bgp 200router-id 4.4.4.4peer 3.3.3.3 as-number 100peer 3.3.3.3 ebgp-max-hop 10peer 3.3.3.3 connect-interface LoopBack0#ipv4-family unicastundo synchronizationimport-route staticpeer 3.3.3.3 enablepeer 3.3.3.3 next-hop-local#ipv4-family vpnv4policy vpn-targetpeer 3.3.3.3 enable#ipv4-family vpn-instance vpnaimport-route directimport-route static
#3台主机可以互ping,R1R2间抓包有MPLS标签
这篇关于ENSP MPLS 3层专线的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!