其他分享
首页 > 其他分享> > ENSP MPLS 3层专线

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/0
 ip address 10.0.100.1 255.255.255.252
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/1
 ip address 10.0.0.1 255.255.255.252
 mpls
 mpls ldp
#

interface LoopBack0
 ip address 1.1.1.1 255.255.255.255
#
ospf 1
 import-route direct
 area 0.0.0.0
  network 1.1.1.1 0.0.0.0
  network 10.0.0.0 0.0.0.3
  network 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 100
 network-entity 49.0001.0222.2000.0000.00
 import-route direct
 import-route ospf 1
#

interface GigabitEthernet0/0/0
 ip address 10.0.100.2 255.255.255.252
 isis enable 100
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/1
 ip address 10.0.1.1 255.255.255.252
 isis enable 100
 mpls
 mpls ldp
#

interface LoopBack0
 ip address 2.2.2.2 255.255.255.255
 isis enable 100
#
ospf 1
 import-route isis 100
 area 0.0.0.0
  network 0.0.0.0 255.255.255.255

R3配置:

#
sysname r3
#
ip vpn-instance vpna
 ipv4-family
  route-distinguisher 100:1
  vpn-target 111:1 export-extcommunity
  vpn-target 111:1 import-extcommunity
#
mpls lsr-id 3.3.3.3
mpls
#
mpls ldp
#

interface GigabitEthernet0/0/0
 ip address 10.0.0.2 255.255.255.252
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/1.10
 dot1q termination vid 10
 ip binding vpn-instance vpna
 ip address 10.0.10.1 255.255.255.252
#

interface LoopBack0
 ip address 3.3.3.3 255.255.255.255
#
bgp 100
 router-id 3.3.3.3
 peer 4.4.4.4 as-number 200
 peer 4.4.4.4 ebgp-max-hop 10
 peer 4.4.4.4 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 4.4.4.4 enable
  peer 4.4.4.4 next-hop-local
 #
 ipv4-family vpnv4
  policy vpn-target
  peer 4.4.4.4 enable
 #
 ipv4-family vpn-instance vpna
  import-route direct
  import-route static
#
ospf 1
 area 0.0.0.0
  network 3.3.3.3 0.0.0.0
  network 10.0.0.0 0.0.0.3

R4配置

#
sysname r4
#
ip vpn-instance vpna
 ipv4-family
  route-distinguisher 100:1
  vpn-target 111:1 export-extcommunity
  vpn-target 111:1 import-extcommunity
#
mpls lsr-id 4.4.4.4
mpls
#
mpls ldp
#

isis 100
 network-entity 49.0001.0444.4000.0000.00
#

interface GigabitEthernet0/0/0
 ip address 10.0.1.2 255.255.255.252
 isis enable 100
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/1.20
 dot1q termination vid 20
 ip binding vpn-instance vpna
 ip address 10.0.20.1 255.255.255.252
#
interface GigabitEthernet0/0/2
 ip binding vpn-instance vpna
 ip address 10.0.30.1 255.255.255.252
#

interface LoopBack0
 ip address 4.4.4.4 255.255.255.255
 isis enable 100
#
bgp 200
 router-id 4.4.4.4
 peer 3.3.3.3 as-number 100
 peer 3.3.3.3 ebgp-max-hop 10
 peer 3.3.3.3 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  import-route static
  peer 3.3.3.3 enable
  peer 3.3.3.3 next-hop-local
 #
 ipv4-family vpnv4
  policy vpn-target
  peer 3.3.3.3 enable
 #
 ipv4-family vpn-instance vpna
  import-route direct
  import-route static
#

3台主机可以互ping,R1R2间抓包有MPLS标签

标签:4.4,ENSP,MPLS,mpls,255.255,3.3,ip,interface,专线
来源: https://blog.csdn.net/chenjijun1139/article/details/121462211