1 拓扑

EVE-NG MPLS L2VPN BGP pw -- static route,static mpls lsp-LMLPHP

2 配置步骤

2.1 配置接口IP 和静态路由

PE1

interface LoopBack 0
 ip address 1.1.1.9 32 
 quit

interface GigabitEthernet 1/0
 ip address 10.1.1.1 255.255.255.0
 quit

 
ip route-static 2.2.2.9 32 10.1.1.2
ip route-static 3.3.3.9 32 10.1.1.2

P

interface LoopBack 0
 ip address 2.2.2.9 32 
 quit

interface GigabitEthernet 1/0
 ip address 10.1.1.2 255.255.255.0
 quit

interface GigabitEthernet 2/0
 ip address 20.1.1.1 255.255.255.0
 quit

ip route-static 1.1.1.9 32 10.1.1.1
ip route-static 3.3.3.9 32 20.1.1.2

PE2


interface LoopBack 0
 ip address 3.3.3.9 32 
 quit

interface GigabitEthernet 1/0
 ip address 20.1.1.2 255.255.255.0
 quit


ip route-static 1.1.1.9 32 20.1.1.1
ip route-static 2.2.2.9 32 20.1.1.1

VPC1

ip 11.1.1.100/24

VPC2

ip 11.1.1.200/24

查看路由表

EVE-NG MPLS L2VPN BGP pw -- static route,static mpls lsp-LMLPHP

2.2 配置MPLS  LSP

PE1

mpls lsr-id 1.1.1.9
 
interface GigabitEthernet 1/0
 mpls enable
 quit

static-lsp ingress 1to2 destination 3.3.3.9 32 nexthop 10.1.1.2 out-label 30
static-lsp egress 2to1 in-label 60

P

mpls lsr-id 2.2.2.9
 
interface GigabitEthernet 1/0
 mpls enable
 quit

interface GigabitEthernet 2/0
 mpls enable 
 quit

static-lsp transit 1to2 in-label 30 nexthop 20.1.1.2 out-label 50
static-lsp transit 2to1 in-label 40 nexthop 10.1.1.1 out-label 60

PE2

mpls lsr-id 3.3.3.9

interface GigabitEthernet 1/0
 mpls enable
 quit

static-lsp egress 1to2 in-label 50
static-lsp ingress 2to1 destination 1.1.1.9 32 nexthop 20.1.1.1 out-label 40

查看 LSP

EVE-NG MPLS L2VPN BGP pw -- static route,static mpls lsp-LMLPHP

2.3 配置L2VPN BGP

PE1

l2vpn enable
bgp 100
 peer 3.3.3.9 as-number 100
 peer 3.3.3.9 connect-interface loopback 0
 address-family l2vpn
  peer 3.3.3.9 enable
  quit
 quit

PE2

l2vpn enable
bgp 100
 peer 1.1.1.9 as-number 100
 peer 1.1.1.9 connect-interface loopback 0
 address-family l2vpn
  peer 1.1.1.9 enable
  quit
 quit

查看bgp 状态

EVE-NG MPLS L2VPN BGP pw -- static route,static mpls lsp-LMLPHP

2.4 配置 xconnect-group

 PE1

xconnect-group vpna
 auto-discovery bgp
  route-distinguisher 2:2
  vpn-target 2:2 export-extcommunity
  vpn-target 2:2 import-extcommunity
  site 1 range 10 default-offset 0
   connection remote-site-id 2
    ac interface GigabitEthernet 2/0
    quit
   quit
  quit
 quit

PE2

xconnect-group vpna
 auto-discovery bgp
  route-distinguisher 2:2
  vpn-target 2:2 export-extcommunity
  vpn-target 2:2 import-extcommunity
  site 2 range 10 default-offset 0
   connection remote-site-id 1
    ac interface GigabitEthernet 2/0
    quit
   quit
  quit
 quit

查看PW

EVE-NG MPLS L2VPN BGP pw -- static route,static mpls lsp-LMLPHP

2.5 验证L2VPN

 EVE-NG MPLS L2VPN BGP pw -- static route,static mpls lsp-LMLPHP

08-13 05:44