• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 关于我们

14-EVPN配置举例

目录

03-EVPN数据中心通过MPLS L3VPN网络互联典型配置举例

本章节下载 03-EVPN数据中心通过MPLS L3VPN网络互联典型配置举例  (293.89 KB)

03-EVPN数据中心通过MPLS L3VPN网络互联典型配置举例


1  简介

本文档介绍EVPN数据中心通过MPLS L3VPN网络互联典型配置举例。

2  配置前提

本文档不严格与具体软、硬件版本对应,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文档假设您已了解MPLS L3VPN和EVPN特性。

3  使用限制

缺省情况下,本设备的接口处于ADM(Administratively Down)状态,请根据实际需要在对应接口视图下使用undo shutdown命令开启接口。

4  EVPN数据中心通过MPLS L3VPN网络互联典型配置举例

4.1  组网需求

Device A和Device B为数据中心1的VTEP,Device C和Device D为数据中心2的VTEP,Device B和Device C为两个数据中心的ED。数据中心1和数据中心2使用MPLS L3VPN网络实现三层互通,ED设备同时作为MPLS L3VPN网络的PE。

图1 EVPN数据中心通过MPLS L3VPN网络互联典型配置组网图

 

4.2  配置思路

·     在数据中心内部分别配置路由协议,使得数据中心内部各交换机的接口IP地址(包括Loopback接口IP地址)之间路由可达。

·     配置Device A为数据中心1的分布式网关,Device D为数据中心2的分布式网关,在Device A和Device B、Device C和Device D之间分别建立EVPN连接。

·     在Device B和Device C之间建立MPLS L3VPN连接,同时配置BGP EVPN和BGP VPNv4路由相互引入以实现数据中心之间的互通。

4.3  适用产品及版本

表1 适用产品及版本

产品

软件版本

S12500R

Release 5210及以上版本

 

4.4  配置注意事项

·     建议在同一个EVPN网关上为所有的VSI虚接口配置相同的MAC地址,以免流量转发不通。

·     在VTEP上配置L3VNI时,需要保证所有设备RT属性列表中包含相同的Route Target值。

4.5  配置步骤

4.5.1  配置各接口的IP地址

# 配置Device A的接口IP地址。

[DeviceA] interface hundredgige 1/0/2

[DeviceA-HundredGigE1/0/2] undo shutdown

[DeviceA-HundredGigE1/0/2] ip address 11.1.1.1 24

[DeviceA-HundredGigE1/0/2] quit

[DeviceA] interface loopback 0

[DeviceA-LoopBack0] ip address 1.1.1.1 32

[DeviceA-LoopBack0] undo shutdown

[DeviceA-LoopBack0] quit

# 请参考以上方法配置其它设备上的接口IP地址,配置步骤这里省略。

4.5.2  配置数据中心内部通过OSPF实现互通

# 在Device A上配置OSPF发布接口所在网段的路由。

[DeviceA] ospf 1

[DeviceA-ospf-1] area 0

[DeviceA-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0

[DeviceA-ospf-1-area-0.0.0.0] network 11.1.1.0 0.0.0.255

[DeviceA-ospf-1-area-0.0.0.0] quit

[DeviceA-ospf-1] quit

# 在Device B上配置OSPF发布接口所在网段的路由。

<DeviceB> system-view

[DeviceB] ospf 1

[DeviceB-ospf-1] area 0

[DeviceB-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0

[DeviceB-ospf-1-area-0.0.0.0] network 11.1.1.0 0.0.0.255

[DeviceB-ospf-1-area-0.0.0.0] quit

[DeviceB-ospf-1] quit

# 在Device C上配置OSPF发布接口所在网段的路由。

<DeviceC> system-view

[DeviceC] ospf 1

[DeviceC-ospf-1] import-route bgp

[DeviceC-ospf-1] area 0

[DeviceC-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0

[DeviceC-ospf-1-area-0.0.0.0] network 13.1.1.0 0.0.0.255

[DeviceC-ospf-1-area-0.0.0.0] quit

[DeviceC-ospf-1] quit

# 在Device D上配置OSPF发布接口所在网段的路由。

<DeviceD> system-view

[DeviceD] ospf 1

[DeviceC-ospf-1] import-route bgp

[DeviceD-ospf-1] area 0

[DeviceD-ospf-1-area-0.0.0.0] network 4.4.4.4 0.0.0.0

[DeviceD-ospf-1-area-0.0.0.0] network 13.1.1.0 0.0.0.255

[DeviceD-ospf-1-area-0.0.0.0] quit

[DeviceD-ospf-1] quit

4.5.3  配置VXLAN和EVPN实例

1. 配置Device A

# 开启L2VPN功能。

[DeviceA] l2vpn enable

# 创建VSI实例vpn1和VXLAN 10。

[DeviceA] vsi vpn1

[DeviceA-vsi-vpn1] vxlan 10

[DeviceA-vsi-vpn1-vxlan-10] quit

# 在VSI实例vpn1下创建EVPN实例,并配置自动生成EVPN实例的RD和RT。

[DeviceA-vsi-vpn1] evpn encapsulation vxlan

[DeviceA-vsi-vpn1-evpn-vxlan] route-distinguisher auto

[DeviceA-vsi-vpn1-evpn-vxlan] vpn-target auto

[DeviceA-vsi-vpn1-evpn-vxlan] quit

[DeviceA-vsi-vpn1] quit

2. 配置Device D

# 开启L2VPN功能。

[DeviceD] l2vpn enable

# 创建VSI实例vpn1和VXLAN 20。

[DeviceD] vsi vpn1

[DeviceD-vsi-vpn1] vxlan 20

[DeviceD-vsi-vpn1-vxlan-20] quit

# 在VSI实例vpn1下创建EVPN实例,并配置自动生成EVPN实例的RD和RT。

[DeviceD-vsi-vpn1] evpn encapsulation vxlan

[DeviceD-vsi-vpn1-evpn-vxlan] route-distinguisher auto

[DeviceD-vsi-vpn1-evpn-vxlan] vpn-target auto

[DeviceD-vsi-vpn1-evpn-vxlan] quit

[DeviceD-vsi-vpn1] quit

4.5.4  配置L3VNI和VSI虚接口

1. 配置Device A

# 配置虚接口关联L3VNI的RD和RT。

[DeviceA] ip vpn-instance vpna

[DeviceA-vpn-instance-vpna] route-distinguisher 1:1

[DeviceA-vpn-instance-vpna] address-family ipv4

[DeviceA-vpn-ipv4-vpna] vpn-target 2:2

[DeviceA-vpn-ipv4-vpna] quit

[DeviceA-vpn-instance-vpna] address-family evpn

[DeviceA-vpn-evpn-vpna] vpn-target 1:1

[DeviceA-vpn-evpn-vpna] quit

[DeviceA-vpn-instance-vpna] quit

# 配置VSI虚接口VSI-interface1。

[DeviceA] interface vsi-interface 1

[DeviceA-Vsi-interface1] ip binding vpn-instance vpna

[DeviceA-Vsi-interface1] ip address 10.1.1.1 24

[DeviceA-Vsi-interface1] mac-address 1-1-1

[DeviceA-Vsi-interface1] distributed-gateway local

[DeviceA-Vsi-interface1] local-proxy-arp enable

[DeviceA-Vsi-interface1] quit

# 创建VSI虚接口VSI-interface2,在该接口上配置VPN实例vpna对应的L3VNI为1000。

[DeviceA] interface vsi-interface 2

[DeviceA-Vsi-interface2] ip binding vpn-instance vpna

[DeviceA-Vsi-interface2] l3-vni 1000

[DeviceA-Vsi-interface2] quit

# 配置VXLAN 10所在的VSI实例和接口VSI-interface1关联。

[DeviceA] vsi vpn1

[DeviceA-vsi-vpn1] gateway vsi-interface 1

[DeviceA-vsi-vpn1] quit

2. 配置Device B

# 开启L2VPN功能。

[DeviceB] l2vpn enable

# 配置虚接口关联L3VNI的RD和RT。

[DeviceB] ip vpn-instance vpna

[DeviceB-vpn-instance-vpna] route-distinguisher 1:2

[DeviceB-vpn-instance-vpna] address-family ipv4

[DeviceB-vpn-ipv4-vpna] vpn-target 2:2

[DeviceB-vpn-ipv4-vpna] quit

[DeviceB-vpn-instance-vpna] address-family evpn

[DeviceB-vpn-evpn-vpna] vpn-target 1:1

[DeviceB-vpn-evpn-vpna] quit

[DeviceB-vpn-instance-vpna] quit

# 创建VSI虚接口VSI-interface1,在该接口上配置VPN实例vpna对应的L3VNI为1000。

[DeviceB] interface vsi-interface 1

[DeviceB-Vsi-interface1] ip binding vpn-instance vpna

[DeviceB-Vsi-interface1] l3-vni 1000

[DeviceB-Vsi-interface1] quit

3. 配置Device C

# 开启L2VPN功能。

[DeviceC] l2vpn enable

# 配置虚接口关联L3VNI的RD和RT。

[DeviceC] ip vpn-instance vpna

[DeviceC-vpn-instance-vpna] route-distinguisher 1:3

[DeviceC-vpn-instance-vpna] address-family ipv4

[DeviceC-vpn-ipv4-vpna] vpn-target 2:2

[DeviceC-vpn-ipv4-vpna] quit

[DeviceC-vpn-instance-vpna] address-family evpn

[DeviceC-vpn-evpn-vpna] vpn-target 1:1

[DeviceC-vpn-evpn-vpna] quit

[DeviceC-vpn-instance-vpna] quit

# 创建VSI虚接口VSI-interface1,在该接口上配置VPN实例vpna对应的L3VNI为1000。

[DeviceC] interface vsi-interface 1

[DeviceC-Vsi-interface1] ip binding vpn-instance vpna

[DeviceC-Vsi-interface1] l3-vni 1000

[DeviceC-Vsi-interface1] quit

4. 配置Device D

# 配置虚接口关联L3VNI的RD和RT。

[DeviceD] ip vpn-instance vpna

[DeviceD-vpn-instance-vpna] route-distinguisher 1:4

[DeviceD-vpn-instance-vpna] address-family ipv4

[DeviceD-vpn-ipv4-vpna] vpn-target 2:2

[DeviceD-vpn-ipv4-vpna] quit

[DeviceD-vpn-instance-vpna] address-family evpn

[DeviceD-vpn-evpn-vpna] vpn-target 1:1

[DeviceD-vpn-evpn-vpna] quit

[DeviceD-vpn-instance-vpna] quit

# 配置VSI虚接口VSI-interface1。

[DeviceD] interface vsi-interface 1

[DeviceD-Vsi-interface1] ip binding vpn-instance vpna

[DeviceD-Vsi-interface1] ip address 10.1.2.1 24

[DeviceD-Vsi-interface1] mac-address 1-2-1

[DeviceD-Vsi-interface1] distributed-gateway local

[DeviceD-Vsi-interface1] local-proxy-arp enable

[DeviceD-Vsi-interface1] quit

# 创建VSI虚接口VSI-interface2,在该接口上配置VPN实例vpna对应的L3VNI为1000。

[DeviceD] interface vsi-interface 2

[DeviceD-Vsi-interface2] ip binding vpn-instance vpna

[DeviceD-Vsi-interface2] l3-vni 1000

[DeviceD-Vsi-interface2] quit

# 配置VXLAN 20所在的VSI实例和接口VSI-interface1关联。

[DeviceD] vsi vpn1

[DeviceD-vsi-vpn1] gateway vsi-interface 1

[DeviceD-vsi-vpn1] quit

4.5.5  配置关闭远端MAC地址和远端ARP自动学习功能

# 配置Device A。

[DeviceA] vxlan tunnel mac-learning disable

[DeviceA] vxlan tunnel arp-learning disable

# 请参考以上方法配置其它设备关闭远端MAC地址和远端ARP自动学习功能,配置步骤这里省略。

4.5.6  配置以太网服务实例,并将其与VSI关联

# 在Device A接入服务器的接口HundredGigE1/0/1上创建以太网服务实例1000,该实例用来匹配VLAN 100的数据帧,并将以太网服务实例1000与VSI实例vpn1关联。

[DeviceA] interface hundredgige 1/0/1

[DeviceA-HundredGigE1/0/1] port link-mode bridge

[DeviceA-HundredGigE1/0/1] service-instance 1000

[DeviceA-HundredGigE1/0/1-srv1000] encapsulation s-vid 100

[DeviceA-HundredGigE1/0/1-srv1000] xconnect vsi vpn1

[DeviceA-HundredGigE1/0/1-srv1000] quit

[DeviceA-HundredGigE1/0/1] quit

# 在Device D接入服务器的接口HundredGigE1/0/1上创建以太网服务实例1000,该实例用来匹配VLAN 100的数据帧,并将以太网服务实例1000与VSI实例vpn1关联。

[DeviceD] interface hundredgige 1/0/1

[DeviceD-HundredGigE1/0/1] port link-mode bridge

[DeviceD-HundredGigE1/0/1] service-instance 1000

[DeviceD-HundredGigE1/0/1-srv1000] encapsulation s-vid 100

[DeviceD-HundredGigE1/0/1-srv1000] xconnect vsi vpn1

[DeviceD-HundredGigE1/0/1-srv1000] quit

[DeviceD-HundredGigE1/0/1] quit

4.5.7  配置数据中心内部的VTEP之间建立EVPN连接

1. 配置数据中心1的VTEP之间建立EVPN连接

# 在Device A上配置BGP发布EVPN路由。

[DeviceA] bgp 100

[DeviceA-bgp-default] peer 2.2.2.2 as-number 100

[DeviceA-bgp-default] peer 2.2.2.2 connect-interface loopback 0

[DeviceA-bgp-default] address-family l2vpn evpn

[DeviceA-bgp-default-evpn] peer 2.2.2.2 enable

[DeviceA-bgp-default-evpn] quit

[DeviceA-bgp-default] quit

# 在Device B上配置BGP发布EVPN路由。

[DeviceB] bgp 100

[DeviceB-bgp-default] peer 1.1.1.1 as-number 100

[DeviceB-bgp-default] peer 1.1.1.1 connect-interface loopback 0

[DeviceB-bgp-default] address-family l2vpn evpn

[DeviceB-bgp-default-evpn] peer 1.1.1.1 enable

[DeviceB-bgp-default-evpn] quit

[DeviceB-bgp-default] quit

2. 配置数据中心2的VTEP之间建立EVPN连接

# 在Device C上配置BGP发布EVPN路由。

[DeviceC] bgp 200

[DeviceC-bgp-default] peer 4.4.4.4 as-number 200

[DeviceC-bgp-default] peer 4.4.4.4 connect-interface loopback 0

[DeviceC-bgp-default] address-family l2vpn evpn

[DeviceC-bgp-default-evpn] peer 4.4.4.4 enable

[DeviceC-bgp-default-evpn] quit

[DeviceC-bgp-default] quit

# 在Device D上配置BGP发布EVPN路由。

[DeviceD] bgp 200

[DeviceD-bgp-default] peer 3.3.3.3 as-number 200

[DeviceD-bgp-default] peer 3.3.3.3 connect-interface loopback 0

[DeviceD-bgp-default] address-family l2vpn evpn

[DeviceD-bgp-default-evpn] peer 3.3.3.3 enable

[DeviceD-bgp-default-evpn] quit

[DeviceD-bgp-default] quit

4.5.8  配置AS间建立MPLS L3VPN连接

1. 配置Device B

# 配置MPLS基本能力和MPLS LDP,建立LDP LSP

[DeviceB] mpls lsr-id 2.2.2.2

[DeviceB] mpls ldp

[DeviceB-ldp] quit

[DeviceB] interface hundredgige 1/0/2

[DeviceB-HundredGigE1/0/2] mpls enable

[DeviceB-HundredGigE1/0/2] mpls ldp enable

[DeviceB-HundredGigE1/0/2] quit

# 配置BGP发布VPNv4路由。

[DeviceB] bgp 100

[DeviceB-bgp-default] peer 12.1.1.3 as-number 200

[DeviceB-bgp-default] address-family vpnv4

[DeviceB-bgp-default-vpnv4] peer 12.1.1.3 enable

[DeviceB-bgp-default-vpnv4] quit

[DeviceB-bgp-default] quit

2. 配置Device C

# 配置MPLS基本能力和MPLS LDP,建立LDP LSP

[DeviceC] mpls lsr-id 3.3.3.3

[DeviceC] mpls ldp

[DeviceC -ldp] quit

[DeviceC] interface hundredgige 1/0/1

[DeviceC-HundredGigE1/0/1] mpls enable

[DeviceC-HundredGigE1/0/1] mpls ldp enable

[DeviceC-HundredGigE1/0/1] quit

# 配置BGP发布VPNv4路由。

[DeviceC] bgp 200

[DeviceC-bgp-default] peer 12.1.1.2 as-number 100

[DeviceC-bgp-default] address-family vpnv4

[DeviceC-bgp-default-vpnv4] peer 12.1.1.2 enable

[DeviceC-bgp-default-vpnv4] quit

[DeviceC-bgp-default] quit

4.5.9  配置BGP EVPN和BGP VPNv4路由相互引入

# Device B配置BGP EVPN和BGP VPNv4路由相互引入。

[DeviceB] bgp 100

[DeviceB-bgp-default] address-family l2vpn evpn

[DeviceB-bgp-default-evpn] advertise l3vpn route

[DeviceB-bgp-default-evpn] quit

[DeviceB-bgp-default] address-family vpnv4

[DeviceB-bgp-default-vpnv4] advertise evpn route

[DeviceB-bgp-default-vpnv4] quit

[DeviceB-bgp-default] quit

# Device C配置BGP EVPN和BGP VPNv4路由相互引入。

[DeviceC] bgp 200

[DeviceC-bgp-default] address-family l2vpn evpn

[DeviceC-bgp-default-evpn] advertise l3vpn route

[DeviceC-bgp-default-evpn] quit

[DeviceC-bgp-default] address-family vpnv4

[DeviceC-bgp-default-vpnv4] advertise evpn route

[DeviceC-bgp-default-vpnv4] quit

[DeviceC-bgp-default] quit

4.6  验证配置

# 在Device B上查看VPNv4表项,可以看到引入的EVPN路由。

[DeviceB] display bgp routing-table vpnv4

 

 BGP local router ID is 2.2.2.2

 Status codes: * - valid, > - best, d - dampened, h - history

               s - suppressed, S - stale, i - internal, e - external

               a - additional-path

       Origin: i - IGP, e - EGP, ? - incomplete

 

 Total number of routes from all PEs: 1

 

 Route distinguisher: 1:2(vpna)

 Total number of routes: 3

 

     Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

 

* >i 10.1.1.0/24        1.1.1.1         0          100        0       i

* >i 10.1.1.11/32       1.1.1.1         0          100        0       i

* >e 10.1.2.0/24        12.1.1.3                              0       200i

 

 Route distinguisher: 1:3

 Total number of routes: 1

 

     Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

 

* >e 10.1.2.0/24        12.1.1.3                              0       200i

# 显示VPNv4路由的发送信息,可以看到该引入路由通过VPNv4地址族向外发送。

[DeviceB] display bgp routing-table vpnv4 10.1.1.0 advertise-info

 

 BGP local router ID: 2.2.2.2

 Local AS number: 100

 

 

 Route distinguisher: 1:2

 Total number of routes: 1

 Paths:   1 best

 

 BGP routing table information of 10.1.1.0/24(TxPathID:0):

 Advertised to VPN peers (1 in total):

    12.1.1.3

 Inlabel              : 1150

# 在Device B的EVPN表项中可以看到来自VPNv4邻居引入生成的EVPN 5类路由。

[DeviceB] display bgp l2vpn evpn

 

 BGP local router ID is 2.2.2.2

 Status codes: * - valid, > - best, d - dampened, h - history

               s - suppressed, S - stale, i - internal, e - external

               a - additional-path

       Origin: i - IGP, e - EGP, ? - incomplete

 

 Total number of routes from all PEs: 2

 

 Route distinguisher: 1:1

 Total number of routes: 1

 

     Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

 

* >i [5][0][24][10.1.1.0]/80

                        1.1.1.1         0          100        0       i

 

 Route distinguisher: 1:2(vpna)

 Total number of routes: 2

 

     Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

 

* >i [2][0][48][0005-0005-0005][32][10.1.1.11]/136

                        1.1.1.1         0          100        0       i

* >e [5][0][24][10.1.2.0]/80

                        127.0.0.1                             0       200i

 

 Route distinguisher: 1:10

 Total number of routes: 1

 

     Network            NextHop         MED        LocPrf     PrefVal Path/Ogn

 

* >i [2][0][48][0005-0005-0005][32][10.1.1.11]/136

                        1.1.1.1         0          100        0       i

# 显示EVPN路由的详细发送信息,可以看到该路由通过EVPN表项向外发送。

[DeviceB] display bgp l2vpn evpn [5][0][24][10.1.2.0]/80 advertise-info

 

 BGP local router ID: 2.2.2.2

 Local AS number: 100

 

 

 Route distinguisher: 1:2

 Total number of routes: 1

 Paths:   1 best

 

 BGP routing table information of [5][0][24][10.1.2.0]/80(TxPathID:0):

 Advertised to peers (1 in total):

    1.1.1.1

4.7  配置文件

·     Device A

#

 sysname DeviceA

#

ip vpn-instance vpna

 route-distinguisher 1:1

 #

 address-family ipv4

  vpn-target 2:2 import-extcommunity

  vpn-target 2:2 export-extcommunity

 #

 address-family evpn

  vpn-target 1:1 import-extcommunity

  vpn-target 1:1 export-extcommunity

#

 vxlan tunnel mac-learning disable

#

ospf 1

 area 0.0.0.0

  network 1.1.1.1 0.0.0.0

  network 11.1.1.0 0.0.0.255

#

vlan 100

#

 l2vpn enable

 vxlan tunnel arp-learning disable

#

vsi vpn1

 gateway vsi-interface 1

 vxlan 10

 evpn encapsulation vxlan

  route-distinguisher auto

  vpn-target auto export-extcommunity

  vpn-target auto import-extcommunity

#

interface LoopBack0

 ip address 1.1.1.1 255.255.255.255

#

interface HundredGigE1/0/1

 port link-mode bridge

 #

 service-instance 1000

  encapsulation s-vid 100

  xconnect vsi vpn1

#

interface HundredGigE1/0/2

 port link-mode route

 ip address 11.1.1.1 255.255.255.0

#

interface Vsi-interface1

 ip binding vpn-instance vpna

 ip address 10.1.1.1 255.255.255.0

 mac-address 0001-0001-0001

 local-proxy-arp enable

 distributed-gateway local

#

interface Vsi-interface2

 ip binding vpn-instance vpna

 l3-vni 1000

#

bgp 100

 peer 2.2.2.2 as-number 100

 peer 2.2.2.2 connect-interface LoopBack0

 #

 address-family l2vpn evpn

  peer 2.2.2.2 enable

#

return

·     Device B

#

 sysname DeviceB

#

ip vpn-instance vpna

 route-distinguisher 1:2

 #

 address-family ipv4

  vpn-target 2:2 import-extcommunity

  vpn-target 2:2 export-extcommunity

 #

 address-family evpn

  vpn-target 1:1 import-extcommunity

  vpn-target 1:1 export-extcommunity

#

 vxlan tunnel mac-learning disable

#

ospf 1

 import-route bgp

 area 0.0.0.0

  network 2.2.2.2 0.0.0.0

  network 11.1.1.0 0.0.0.255

#

 mpls lsr-id 2.2.2.2

#

mpls ldp

#

 l2vpn enable

 vxlan tunnel arp-learning disable

#

interface LoopBack0

 ip address 2.2.2.2 255.255.255.255

#

interface HundredGigE1/0/1

 port link-mode route

 ip address 11.1.1.2 255.255.255.0

#

interface HundredGigE1/0/2

 port link-mode route

 ip address 12.1.1.2 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface Vsi-interface1

 ip binding vpn-instance vpna

 l3-vni 1000

#

bgp 100

 peer 1.1.1.1 as-number 100

 peer 1.1.1.1 connect-interface LoopBack0

 peer 12.1.1.3 as-number 200

 #

 address-family vpnv4

  advertise evpn route

  peer 12.1.1.3 enable

 #

 address-family l2vpn evpn

  advertise l3vpn route

  peer 1.1.1.1 enable

#

·     Device C

#

 sysname DeviceC

#

ip vpn-instance vpna

 route-distinguisher 1:3

 #

 address-family ipv4

  vpn-target 2:2 import-extcommunity

  vpn-target 2:2 export-extcommunity

 #

 address-family evpn

  vpn-target 1:1 import-extcommunity

  vpn-target 1:1 export-extcommunity

#

 vxlan tunnel mac-learning disable

#

ospf 1

 import-route bgp

 area 0.0.0.0

  network 3.3.3.3 0.0.0.0

  network 13.1.1.0 0.0.0.255

#

 mpls lsr-id 3.3.3.3

#

mpls ldp

#

 l2vpn enable

 vxlan tunnel arp-learning disable

#

interface LoopBack0

 ip address 3.3.3.3 255.255.255.255

#

interface HundredGigE1/0/1

 port link-mode route

 ip address 12.1.1.3 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface HundredGigE1/0/2

 port link-mode route

 ip address 13.1.1.3 255.255.255.0

#

interface Vsi-interface1

 ip binding vpn-instance vpna

 l3-vni 1000

#

bgp 200

 peer 4.4.4.4 as-number 200

 peer 4.4.4.4 connect-interface LoopBack0

 peer 12.1.1.2 as-number 100

 #

 address-family vpnv4

  advertise evpn route

  peer 12.1.1.2 enable

 #

 address-family l2vpn evpn

  advertise l3vpn route

  peer 4.4.4.4 enable

#

·     Device D

#

 sysname DeviceD

#

ip vpn-instance vpna

 route-distinguisher 1:4

 #

 address-family ipv4

  vpn-target 2:2 import-extcommunity

  vpn-target 2:2 export-extcommunity

 #

 address-family evpn

  vpn-target 1:1 import-extcommunity

  vpn-target 1:1 export-extcommunity

#

 vxlan tunnel mac-learning disable

#

ospf 1

 area 0.0.0.0

  network 4.4.4.4 0.0.0.0

  network 13.1.1.0 0.0.0.255

#

 l2vpn enable

 vxlan tunnel arp-learning disable

#

vsi vpn1

 gateway vsi-interface 1

 vxlan 20

 evpn encapsulation vxlan

  route-distinguisher auto

  vpn-target auto export-extcommunity

  vpn-target auto import-extcommunity

#

interface LoopBack0

 ip address 4.4.4.4 255.255.255.255

#

interface HundredGigE1/0/1

 port link-mode bridge

 #

 service-instance 1000

  encapsulation s-vid 100

  xconnect vsi vpn1

#

interface HundredGigE1/0/2

 port link-mode route

 ip address 13.1.1.4 255.255.255.0

#

interface Vsi-interface1

 ip binding vpn-instance vpna

 ip address 10.1.2.1 255.255.255.0

 mac-address 0001-0002-0001

 local-proxy-arp enable

 distributed-gateway local

#

interface Vsi-interface2

 ip binding vpn-instance vpna

 l3-vni 1000

#

bgp 200

 peer 3.3.3.3 as-number 200

 peer 3.3.3.3 connect-interface LoopBack0

 #

 address-family l2vpn evpn

  peer 3.3.3.3 enable

#

5  相关资料

·     H3C S12500R系列交换路由器 EVPN配置指导-R52xx

·     H3C S12500R系列交换路由器 EVPN命令参考-R52xx

·     H3C S12500R-48Y8C&S12500R-48C6D交换路由器 EVPN配置指导-R52xx

·     H3C S12500R-48Y8C&S12500R-48C6D交换路由器 EVPN命令参考-R52xx

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们