• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

H3C S6820系列以太网交换机 典型配置举例-Release 630x系列-6W100

目录

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

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

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S6800/S6820/Configure/Typical_Configuration_Example/H3C_S6820_CE-Release_630x-6W100/202002/1273750_30005_0.htm

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

H3C S6820产品EVPN数据中心通过MPLS L3VPN网络互联典型配置举例

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2020 新华三技术有限公司 版权所有,保留一切权利。

非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,并不得以任何形式传播。

除新华三技术有限公司的商标外,本手册中出现的其它公司的商标、产品标识及商品名称,由各自权利人拥有。

本文档中的信息可能变动,恕不另行通知。



1  简介

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

2  配置前提

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

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

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

3  使用限制

EVPN功能受设备的工作模式限制,在使用EVPN功能前,请在系统视图下使用system-working-mode命令将设备设置为标准模式,保存设备当前配置,然后重启设备。

4  配置举例

4.1  组网需求

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

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

 

4.2  配置思路

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

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

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

4.3  使用版本

本举例是在R6301版本上进行配置和验证的。

4.4  配置注意事项

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

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

4.5  配置步骤

4.5.1  配置设备的工作模式

# 配置Switch A的工作模式为标准模式,重启设备后生效。

<SwitchA> system-view

[SwitchA] system-working-mode standard

# 请参考以上方法配置其它设备的工作模式,配置步骤这里省略。

4.5.2  配置各接口的IP地址

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

[SwitchA] vlan 11

[SwitchA-vlan11] quit

[SwitchA] interface hundredgige 1/0/2

[SwitchA-HundredGigE1/0/2] port link-type trunk

[SwitchA-HundredGigE1/0/2] port trunk permit vlan 11

[SwitchA-HundredGigE1/0/2] undo shutdown

[SwitchA-HundredGigE1/0/2] quit

[SwitchA] interface vlan-interface 11

[SwitchA-Vlan-interface11] ip address 11.1.1.1 24

[SwitchA-Vlan-interface11] undo shutdown

[SwitchA-Vlan-interface11] quit

[SwitchA] interface loopback 0

[SwitchA-LoopBack0] ip address 1.1.1.1 32

[SwitchA-LoopBack0] undo shutdown

[SwitchA-LoopBack0] quit

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

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

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

[SwitchA] ospf 1

[SwitchA-ospf-1] area 0

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

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

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

[SwitchA-ospf-1] quit

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

<SwitchB> system-view

[SwitchB] ospf 1

[SwitchB-ospf-1] area 0

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

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

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

[SwitchB-ospf-1] quit

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

<SwitchC> system-view

[SwitchC] ospf 1

[SwitchB-ospf-1] import-route bgp

[SwitchC-ospf-1] area 0

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

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

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

[SwitchC-ospf-1] quit

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

<SwitchD> system-view

[SwitchD] ospf 1

[SwitchC-ospf-1] import-route bgp

[SwitchD-ospf-1] area 0

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

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

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

[SwitchD-ospf-1] quit

4.5.4  配置VXLAN和EVPN实例

1. 配置Switch A

# 开启L2VPN功能。

[SwitchA] l2vpn enable

# 创建VSI实例vpn1和VXLAN 10。

[SwitchA] vsi vpn1

[SwitchA-vsi-vpn1] vxlan 10

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

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

[SwitchA-vsi-vpn1] evpn encapsulation vxlan

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

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

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

[SwitchA-vsi-vpn1] quit

2. 配置Switch D

# 开启L2VPN功能。

[SwitchD] l2vpn enable

# 创建VSI实例vpn1和VXLAN 20。

[SwitchD] vsi vpn1

[SwitchD-vsi-vpn1] vxlan 20

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

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

[SwitchD-vsi-vpn1] evpn encapsulation vxlan

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

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

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

[SwitchD-vsi-vpn1] quit

4.5.5  配置L3VNI和VSI虚接口

1. 配置Switch A

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

[SwitchA] ip vpn-instance vpna

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

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

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

[SwitchA-vpn-ipv4-vpna] quit

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

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

[SwitchA-vpn-evpn-vpna] quit

[SwitchA-vpn-instance-vpna] quit

# 配置VSI虚接口VSI-interface1。

[SwitchA] interface vsi-interface 1

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

[SwitchA-Vsi-interface1] ip address 10.1.1.1 24

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

[SwitchA-Vsi-interface1] distributed-gateway local

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

[SwitchA-Vsi-interface1] quit

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

[SwitchA] interface vsi-interface 2

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

[SwitchA-Vsi-interface2] l3-vni 1000

[SwitchA-Vsi-interface2] quit

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

[SwitchA] vsi vpn1

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

[SwitchA-vsi-vpn1] quit

2. 配置Switch B

# 开启L2VPN功能。

[SwitchB] l2vpn enable

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

[SwitchB] ip vpn-instance vpna

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

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

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

[SwitchB-vpn-ipv4-vpna] quit

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

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

[SwitchB-vpn-evpn-vpna] quit

[SwitchB-vpn-instance-vpna] quit

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

[SwitchB] interface vsi-interface 1

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

[SwitchB-Vsi-interface1] l3-vni 1000

[SwitchB-Vsi-interface1] quit

3. 配置Switch C

# 开启L2VPN功能。

[SwitchC] l2vpn enable

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

[SwitchC] ip vpn-instance vpna

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

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

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

[SwitchC-vpn-ipv4-vpna] quit

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

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

[SwitchC-vpn-evpn-vpna] quit

[SwitchC-vpn-instance-vpna] quit

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

[SwitchC] interface vsi-interface 1

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

[SwitchC-Vsi-interface1] l3-vni 1000

[SwitchC-Vsi-interface1] quit

4. 配置Switch D

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

[SwitchD] ip vpn-instance vpna

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

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

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

[SwitchD-vpn-ipv4-vpna] quit

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

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

[SwitchD-vpn-evpn-vpna] quit

[SwitchD-vpn-instance-vpna] quit

# 配置VSI虚接口VSI-interface1。

[SwitchD] interface vsi-interface 1

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

[SwitchD-Vsi-interface1] ip address 10.1.2.1 24

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

[SwitchD-Vsi-interface1] distributed-gateway local

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

[SwitchD-Vsi-interface1] quit

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

[SwitchD] interface vsi-interface 2

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

[SwitchD-Vsi-interface2] l3-vni 1000

[SwitchD-Vsi-interface2] quit

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

[SwitchD] vsi vpn1

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

[SwitchD-vsi-vpn1] quit

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

# 配置Switch A。

[SwitchA] vxlan tunnel mac-learning disable

[SwitchA] vxlan tunnel arp-learning disable

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

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

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

[SwitchA] interface hundredgige 1/0/1

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

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

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

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

[SwitchA-HundredGigE1/0/1] quit

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

[SwitchD] interface hundredgige 1/0/1

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

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

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

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

[SwitchD-HundredGigE1/0/1] quit

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

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

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

[SwitchA] bgp 100

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

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

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

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

[SwitchA-bgp-default-evpn] quit

[SwitchA-bgp-default] quit

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

[SwitchB] bgp 100

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

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

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

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

[SwitchB-bgp-default-evpn] quit

[SwitchB-bgp-default] quit

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

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

[SwitchC] bgp 200

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

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

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

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

[SwitchC-bgp-default-evpn] quit

[SwitchC-bgp-default] quit

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

[SwitchD] bgp 200

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

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

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

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

[SwitchD-bgp-default-evpn] quit

[SwitchD-bgp-default] quit

4.5.9  配置AS间建立MPLS L3VPN连接

1. 配置Switch B

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

[SwitchB] mpls lsr-id 2.2.2.2

[SwitchB] mpls ldp

[SwitchB-ldp] quit

[SwitchB] interface vlan-interface 12

[SwitchB–Vlan-interface12] mpls enable

[SwitchB–Vlan-interface12] mpls ldp enable

[SwitchB–Vlan-interface12] quit

# 配置BGP发布VPNv4路由。

[SwitchB] bgp 100

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

[SwitchB-bgp-default] address-family vpnv4

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

[SwitchB-bgp-default-vpnv4] quit

[SwitchB-bgp-default] quit

2. 配置Switch C

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

[SwitchC] mpls lsr-id 3.3.3.3

[SwitchC] mpls ldp

[SwitchC -ldp] quit

[SwitchC] interface vlan-interface 12

[SwitchC–Vlan-interface12] mpls enable

[SwitchC–Vlan-interface12] mpls ldp enable

[SwitchC–Vlan-interface12] quit

# 配置BGP发布VPNv4路由。

[SwitchC] bgp 200

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

[SwitchC-bgp-default] address-family vpnv4

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

[SwitchC-bgp-default-vpnv4] quit

[SwitchC-bgp-default] quit

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

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

[SwitchB] bgp 100

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

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

[SwitchB-bgp-default-evpn] quit

[SwitchB-bgp-default] address-family vpnv4

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

[SwitchB-bgp-default-vpnv4] quit

[SwitchB-bgp-default] quit

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

[SwitchC] bgp 200

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

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

[SwitchC-bgp-default-evpn] quit

[SwitchC-bgp-default] address-family vpnv4

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

[SwitchC-bgp-default-vpnv4] quit

[SwitchC-bgp-default] quit

4.6  验证配置

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

[SwitchB] 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地址族向外发送。

[SwitchB] 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

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

[SwitchB] 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表项向外发送。

[SwitchB] 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  配置文件

·            Switch A

#

 sysname SwitchA

#

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

#

 reserve-vlan-interface 3000 to 3001 global

#

 system-working-mode standard

#

vlan 11

#

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 Vlan-interface11

 ip address 11.1.1.1 255.255.255.0

#

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 bridge

 port link-type trunk

 port trunk permit vlan 1 11

#

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

·            Switch B

#

 sysname SwitchB

#

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

#

 reserve-vlan-interface 3000 to 3001 global

#

 system-working-mode standard

#

vlan 11 to 12

#

mpls ldp

#

 l2vpn enable

 vxlan tunnel arp-learning disable

#

interface LoopBack0

 ip address 2.2.2.2 255.255.255.255

#

interface Vlan-interface11

 ip address 11.1.1.2 255.255.255.0

#

interface Vlan-interface12

 ip address 12.1.1.2 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface HundredGigE1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 11

#

interface HundredGigE1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 12

#

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

#

·            Switch C

#

 sysname SwitchC

#

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

#

 reserve-vlan-interface 3000 to 3001 global

#

 system-working-mode standard

#

vlan 12 to 13

#

mpls ldp

#

 l2vpn enable

 vxlan tunnel arp-learning disable

#

interface LoopBack0

 ip address 3.3.3.3 255.255.255.255

#

interface Vlan-interface12

 ip address 12.1.1.3 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface Vlan-interface13

 ip address 13.1.1.3 255.255.255.0

#

interface HundredGigE1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 12

#

interface HundredGigE1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 13

#

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

#

·            Switch D

#

 sysname SwitchD

#

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

#

 reserve-vlan-interface 3000 to 3001 global

#

 system-working-mode standard

#

vlan 13

#

 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 Vlan-interface13

 ip address 13.1.1.4 255.255.255.0

#

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 bridge

 port link-type trunk

 port trunk permit vlan 1 13

#

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 S6800[60][61](R27xx) & S6820(R630x)系列以太网交换机 EVPN配置指导

·            H3C S6800[60][61](R27xx) & S6820(R630x)系列以太网交换机 EVPN命令参考

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

新华三官网
联系我们