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

18-EVPN配置指导

目录

05-EVPN数据中心互联配置

本章节下载 05-EVPN数据中心互联配置  (662.82 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S12500/S12500G-AF/Configure/Operation_Manual/H3C_S12500G_AF_R7624Pxx-4376/18/202401/2028265_30005_0.htm

05-EVPN数据中心互联配置


1 EVPN数据中心互联

1.1  EVPN数据中心互联简介

EVPN数据中心互联技术通过在数据中心之间建立VXLAN-DCI(VXLAN Data Center Interconnect,VXLAN数据中心互联)隧道,实现不同数据中心之间虚拟机的互通。

1.1.1  EVPN数据中心互联典型组网

图1-1所示,数据中心的边缘设备为ED(Edge Device,边缘设备)。ED之间建立VXLAN-DCI隧道,该隧道采用VXLAN封装格式。ED与数据中心内部的VTEP建立VXLAN隧道。ED从VXLAN隧道或VXLAN-DCI隧道上接收到报文后,解除VXLAN封装,根据目的IP地址重新对报文进行VXLAN封装,并将其转发到VXLAN-DCI隧道或VXLAN隧道,从而实现跨数据中心之间的互通。

图1-1 VXLAN数据中心互联典型组网图

 

1.1.2  EVPN数据中心互联工作机制

EVPN数据中心互联组网中,ED之间、ED与VTEP之间建立BGP EVPN邻居。ED从本数据中心的VTEP或其他ED接收到BGP EVPN路由后,将路由的下一跳、Router MAC分别修改为自身的IP地址、Router MAC地址,并将该路由发布给其他ED或本数据中心的VTEP。

ED、VTEP均学习到BGP EVPN路由后,根据路由信息转发报文的过程为:

(1)     VTEP接收到VM发送的报文后,通过VXLAN隧道将报文转发给ED。

(2)     ED解除VXLAN封装后,重新对报文进行VXLAN封装,通过VXLAN-DCI隧道将报文发送给远端ED。

(3)     远端ED解除VXLAN封装后,重新封装报文,通过VXLAN隧道将报文转发给VTEP。

(4)     VTEP解除VXLAN封装后,将报文发送给目的VM。

1.1.3  EVPN数据中心互联支持双ED

图1-2所示,在EVPN数据中心互联场景中,为了提高ED的可靠性,避免单点故障,在数据中心的边缘可以部署两台ED设备与其他数据中心互联。这两台ED设备使用相同的虚拟IP地址,虚拟成一台ED设备,采用虚拟IP地址与VTEP、远端ED建立隧道,以实现冗余保护和负载分担。

图1-2 EVPN数据中心互联支持双ED组网图

 

两台ED使用不同的地址作为BGP对等体地址,分别与VTEP、远端ED建立BGP EVPN邻居。利用Underlay网络的等价路由机制,VTEP、远端ED可以将发往ED虚拟IP地址的流量同时发送到两台ED,从而实现冗余备份和负载分担。

在连接不同数据中心ED的DCI网络侧,两台ED均通过Underlay网络与对端数据中心ED建立连接。当一台ED的DCI侧Underlay网络出现故障时,数据中心内部网络无法感知该故障,仍通过该ED转发数据中心间的流量。通过配置Monitor Link组,将DCI侧的物理接口与ED设备的LoopBack接口(用于建立BGP EVPN邻居的接口和ED设备虚拟IP地址所在的接口)关联,可以确保其中一台ED设备的DCI侧Underlay网络断开时,将该ED的LoopBack接口链路状态置为down,使流量通过另外一台ED设备转发。Monitor Link的详细介绍,请参见“可靠性配置指导”中的“Monitor Link”。

为了实现链路备份,数据中心网络内部中,建议在Spine层部署多台RR;在DCI网络侧,建议ED通过双链路接入Underlay网络。

1.1.4  EVPN数据中心互联支持分布式聚合

说明

目前,本功能仅支持站点网络和Underlay网络同为IPv4网络,或站点网络和Underlay网络同为IPv6网络。

 

图1-3所示,EVPN数据中心互联组网中,利用分布式聚合功能DRNI(Distributed Resilient Network Interconnect,分布式弹性网络互连)将两台物理设备连接起来虚拟成一台设备,使用该虚拟设备作为ED,可以避免ED单点故障对网络造成影响,从而提高EVPN网络的可靠性。DRNI的详细介绍,请参见“二层技术-以太网交换配置指导”中的“DRNI”。

图1-3 EVPN数据中心互联支持分布式聚合示意图

 

EVPN数据中心互联支持分布式聚合功能的工作机制包括:

·     同步MAC地址、ARP和ND信息

作为DR device(Distributed Relay device,分布式聚合成员设备)的两台ED通过IPL(Intra-Portal Link,内部控制链路)连接,在IPL上同步MAC地址、ARP和ND信息,以确保两台VTEP上的MAC地址、ARP和ND信息保持一致。IPL连接只能是以太网聚合链路。

·     共用虚拟ED地址

分布式聚合的两台ED具有相同的虚拟ED地址,对外表现为一台虚拟ED设备。其他VTEP或ED使用该地址与这台虚拟设备自动建立VXLAN隧道或VXLAN-DCI隧道。

·     使用不同的BGP对等体地址

两台ED使用不同的地址作为BGP对等体地址,分别与其他VTEP或ED建立BGP EVPN邻居。

利用Underlay网络的等价路由机制,其他VTEP或ED可以将发往虚拟ED地址的流量同时发送到两台ED,从而实现负载分担和冗余备份。

在连接不同数据中心ED的DCI网络侧,两台ED均通过Underlay网络与对端数据中心ED建立连接。当一台ED的DCI侧Underlay网络出现故障时,数据中心内部网络无法感知该故障,仍通过该ED转发数据中心间的流量。通过配置Monitor Link组,将DCI侧的物理接口与ED设备的LoopBack接口(用于建立BGP EVPN邻居的接口和ED设备虚拟IP地址所在的接口)关联,可以确保其中一台ED设备的DCI侧Underlay网络断开时,将该ED的LoopBack接口链路状态置为down,使流量通过另外一台ED设备转发。Monitor Link的详细介绍,请参见“可靠性配置指导”中的“Monitor Link”。

1.2  EVPN数据中心互联配置限制和指导

在ED设备上,如果通过mac-address命令修改了某一关联L3VNI的VSI虚接口的MAC地址,则必须通过该命令将所有与L3VNI关联的VSI虚接口的MAC地址修改为相同的值,否则可能会导致报文转发失败。

1.3  EVPN数据中心互联配置任务简介

EVPN数据中心互联配置均在ED设备上执行,配置任务如下:

(1)     开启DCI功能

(2)     配置ED修改EVPN路由

a.     配置ED修改路由的下一跳和Router MAC

b.     (可选)配置ED修改EVPN路由的RD、L3VNI和RT

如果不同的数据中心使用的L3VNI不同或用户不希望泄露本地数据中心所使用的L3VNI时,可执行本配置在ED上替换L3VNI。

(3)     (可选)配置抑制发送指定类型的路由

在数据中心互联组网中,可通过执行本配置抑制ED向对等体/对等体组发送指定类型的路由,从而减少ED上的路由条目。

(4)     (可选)配置VXLAN映射

如果在不同的数据中心中,同一租户的相同子网使用了不同的VXLAN,要保证相同子网之间的流量进行二层转发,则需要执行本配置。

(5)     配置BGP EVPN和BGP VPNv4/VPNv6路由相互引入

不同的数据中心之间通过MPLS L3VPN网络互联时,需要执行本配置。

(6)     (可选)配置EVPN数据中心互联支持双ED

(7)     (可选)配置EVPN数据中心互联支持分布式聚合

1.4  EVPN数据中心互联配置准备

配置EVPN数据中心互联前,需要先完成各个数据中心的EVPN部署,详细配置方法请参见“EVPN配置指导”中的“EVPN VXLAN”。

1.5  开启DCI功能

1. 功能简介

EVPN数据中心互联组网中,ED间互连的三层接口上必须开启DCI功能,以便在ED之间建立VXLAN-DCI隧道。

ED根据EVPN路由自动建立隧道时,如果路由下一跳对应的出接口上开启了DCI功能,则建立VXLAN-DCI隧道;否则,建立VXLAN隧道。

2. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入接口视图。

interface interface-type interface-number

只能在主接口上开启DCI功能,子接口继承主接口上的配置。

(3)     开启DCI功能。

dci enable

缺省情况下,DCI功能处于关闭状态。

1.6  配置ED修改EVPN路由

1.6.1  配置ED修改路由的下一跳和Router MAC

(1)     进入系统视图。

system-view

(2)     配置全局Router ID。

router id router-id

缺省情况下,未配置全局Router ID。

(3)     启动BGP实例,并进入BGP实例视图。

bgp as-number [ instance instance-name ]

缺省情况下,系统没有运行BGP。

(4)     将远端VTEP和ED配置为对等体。

peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } as-number as-number

(5)     创建BGP EVPN地址族,并进入BGP EVPN地址族视图。

address-family l2vpn evpn

(6)     使能本地路由器与指定对等体/对等体组交换BGP EVPN路由的能力。

peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } enable

缺省情况下,本地路由器不能与对等体/对等体组交换BGP EVPN路由。

(7)     配置向对等体/对等体组发布路由时,将下一跳属性修改为自身的地址。

peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } next-hop-local

缺省情况下,向EBGP对等体/对等体组发布的所有路由,都将下一跳属性修改为自身的地址;向IBGP对等体/对等体组发布的EBGP路由,不修改下一跳属性。

本配置中指定的对等体应为本数据中心的VTEP。

(8)     配置向对等体/对等体组发布路由、将从对等体/对等体组接收到的路由发布给其他对等体时,将路由的Router MAC修改为自身的Router MAC地址。

peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } router-mac-local [ dci ]

缺省情况下,不会修改路由的Router MAC。

本配置中指定的对等体应为远端ED。

执行本命令时如果指定了dci参数,则表示与对等体/对等体组建立VXLAN-DCI隧道;否则,根据接口下是否配置dci enable命令决定是否与对等体建立VXLAN-DCI隧道。

1.6.2  配置ED修改EVPN路由的RD、L3VNI和RT

1. 功能简介

EVPN数据中心互联组网中,在以下场景中需要ED修改EVPN路由的RD、L3VNI和RT:

·     不同数据中心使用的L3VNI不同,通过本配置修改L3VNI,以实现数据中心之间的互通。

·     不同数据中心互通,需要RT值匹配。当数据中心组网规模较大时,数据中心之间的RT配置比较复杂。配置本功能后,ED可直接修改EVPN路由的RT值,数据中心之间发布EVPN路由使用统一的RT值即可,无需进行复杂的RT配置。

·     当用户不希望泄露本地数据中心使用的L3VNI时,可以在ED上执行本配置,将本地所有L3VNI均替换为ED上的L3VNI,对外仅体现ED上的L3VNI。

执行peer re-originated命令后,ED修改路由中的L3VNI、RD和RT,并向指定对等体/对等体组发布修改后的EVPN路由,不会向对等体/对等体组发布源EVPN路由。此时,如果某些对等体/对等体组希望接收源EVPN路由,则可在ED上执行peer advertise original-route命令,使ED同时向对等体/对等体组发布修改后的EVPN路由和源EVPN路由。

同时执行peer re-originatedpeer advertise original-route命令后,如果某些对等体/对等体组为减少本地路由条目,仅希望接收源EVPN路由,则可在ED上执行peer suppress re-originated命令,使ED仅向对等体/对等体组发布源EVPN路由。

2. 配置限制和指导

如果ED上本地VPN实例的RD与接收到的BGP EVPN路由的RD相同,执行本配置后,则不会替换该路由的L3VNI和RT,也不会重新生成路由,导致该BGP EVPN路由无法向对等体/对等体组发布。因此,执行本配置时,建议在不同设备上为VPN实例配置不同的RD。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入BGP实例视图。

bgp as-number [ instance instance-name ]

(3)     进入BGP EVPN地址族视图。

address-family l2vpn evpn

(4)     配置从对等体/对等体组接收到BGP EVPN路由后,修改路由中的信息。

peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } re-originated [ imet | ip-prefix | mac-ip ] [ replace-rt ]

缺省情况下,不修改从对等体/对等体组接收到的EVPN路由的信息。

(5)     (可选)配置向对等体/对等体组发布源EVPN路由。

peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise original-route

缺省情况下,执行peer re-originated命令修改路由信息后,不向对等体/对等体组发布源EVPN路由。

(6)     (可选)配置抑制向对等体/对等体组发送修改路由信息后的EVPN路由。

peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } suppress re-originated { imet | ip-prefix | mac-ip }

缺省情况下,执行peer re-originated命令修改路由信息后,向对等体/对等体组发送修改后的EVPN路由。

1.7  配置抑制发送指定类型的路由

1. 功能简介

在数据中心互联组网中,为减少ED上的路由条目,可通过执行本配置,抑制ED向对等体/对等体组发送指定类型的路由。

2. 配置限制和指导

当不同数据中心的EVPN网关VSI虚接口的IP地址相同时,请不要抑制发布MAC/IP发布路由,否则会导致ED间无法互通。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入BGP实例视图。

bgp as-number [ instance instance-name ]

(3)     进入BGP EVPN地址族视图。

address-family l2vpn evpn

(4)     配置向对等体/对等体组发布EVPN路由时不发送指定类型的路由。

peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise evpn-route suppress { ip-prefix | mac-ip }

缺省情况下,不抑制向对等体/对等体组发布EVPN路由。

1.8  配置VXLAN映射

1. 功能简介

在不同的数据中心中,同一租户的相同子网可能使用不同的VXLAN。这些数据中心互联时,若要保证同一租户相同子网之间的流量进行二层转发,则ED设备上需要执行本配置,在不同的VXLAN之间建立映射关系。

指定映射的远端VXLAN后,ED接收到本数据中心内VTEP发送的MAC/IP发布路由时,将其学习到本地VXLAN中,并在向其他ED通告该MAC/IP发布路由前,将路由中携带的VXLAN替换为映射的远端VXLAN。从其他ED接收到映射的远端VXLAN内的MAC/IP发布路由时,本地ED将该路由学习到本地VXLAN中。

可以通过以下方式建立映射关系:

·     将本地VXLAN直接映射为另一个数据中心中使用的VXLAN。采用此方式时,只需在一个数据中心的ED上指定映射的远端VXLAN。例如,数据中心1内使用VXLAN 10、数据中心2内使用VXLAN 20时,只需在数据中心1的ED上配置VXLAN 10映射为远端VXLAN 20。

·     将不同数据中心ED上的本地VXLAN映射为相同的VXLAN(称为中间VXLAN)。采用此方式时,需要在所有数据中心的ED上都指定映射的远端VXLAN为中间VXLAN。例如,数据中心1内使用VXLAN 10、数据中心2内使用VXLAN 20、数据中心3内使用VXLAN 30时,需要在三个数据中心的ED上均配置映射的远端VXLAN为中间VXLAN(如VXLAN 500)。当多个数据中心互联,且不同数据中心使用的VXLAN各不相同时,需要使用此方式。中间VXLAN只能用于VXLAN映射,不能用作普通VXLAN来处理VXLAN业务。

在某些特殊组网中,如果不希望跨数据中心转发三层流量,则可以配置VXLAN映射时删除EVPN路由中与L3VNI关联的VPN实例的RT属性,确保远端设备接收到EVPN路由后,不会将该路由学习到VPN实例路由表中,不会生成三层转发表项,从而保证数据中心之间只能转发二层流量。

2. 配置限制和指导

本地设备上需要创建映射的远端VXLAN,为其配置EVPN实例,并为该EVPN实例配置RD和Route Target属性。

在使用VXLAN映射功能时,不要为EVPN实例和VPN实例的EVPN地址族、EVPN实例和公网实例的EVPN地址族配置相同的Export target,否则可能导致三层转发不通。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     进入VSI视图。

vsi vsi-name

(3)     进入EVPN实例视图。

evpn encapsulation vxlan

(4)     指定本地VXLAN映射的远端VXLAN。

mapping vni vxlan-id

缺省情况下,未指定本地VXLAN映射的远端VXLAN。

本命令中指定的映射远端VXLAN ID不能与l3-vni命令配置的L3VNI相同,也不能与reserved vxlan命令配置的保留VXLAN相同。reserved vxlan命令的详细介绍,请参见“VXLAN命令参考”中的“VXLAN”。

(5)     (可选)配置VXLAN映射时删除EVPN路由中属于VPN实例的RT属性。

a.     请依次执行以下命令退回系统视图。

quit

quit

b.     进入BGP实例视图。

bgp as-number [ instance instance-name ]

c.     进入BGP EVPN地址族视图。

address-family l2vpn evpn

d.     配置VXLAN映射时删除EVPN路由中属于VPN实例的RT属性。

mapping-vni remove vpn-target

缺省情况下,VXLAN映射时不会删除EVPN路由中属于VPN实例的RT属性。

1.9  配置BGP EVPN和BGP VPNv4/VPNv6路由相互引入

1.9.1  功能简介

不同的数据中心之间通过MPLS L3VPN网络互联时,ED同时作为MPLS L3VPN的PE设备,进行MPLS L3VPN相关处理。此时,ED上除了完成MPLS L3VPN和EVPN配置外,还需要配置BGP EVPN和BGP VPNv4/VPNv6路由相互引入以实现数据中心之间的互通。

图1-4 通过MPLS L3VPN网络连接不同的数据中心

 

1.9.2  配置允许BGP VPNv4或VPNv6路由通过EVPN地址族发布给邻居

(1)     进入系统视图。

system-view

(2)     进入BGP实例视图。

bgp as-number [ instance instance-name ]

(3)     进入BGP EVPN地址族视图。

address-family l2vpn evpn

(4)     配置允许BGP VPNv4或VPNv6路由通过EVPN地址族发布给邻居。

advertise l3vpn route [ replace-rt ][ advertise-policy policy-name ]

缺省情况下,BGP VPNv4或VPNv6路由不会通过EVPN地址族向外发送。

执行本命令后,BGP VPNv4或VPNv6路由将作为EVPN的IP前缀路由发布给邻居。

1.9.3  配置允许BGP EVPN路由通过VPNv4或VPNv6地址族发布给邻居

(1)     进入系统视图。

system-view

(2)     进入BGP实例视图。

bgp as-number [ instance instance-name ]

(3)     进入BGP VPNv4地址族视图或BGP VPNv6地址族视图。

address-family { vpnv4 | vpnv6 }

(4)     配置允许BGP EVPN路由通过VPNv4或VPNv6地址族发布给邻居。

advertise evpn route [ replace-rt ][ advertise-policy policy-name ]

缺省情况下,BGP EVPN路由不会通过VPNv4和VPNv6地址族向外发送。

执行本命令后,设备会将EVPN的IP前缀路由、携带主机路由信息的MAC/IP发布路由通过VPNv4或VPNv6地址族发布给邻居。

1.10  配置EVPN数据中心互联支持双ED

1. 功能简介

在数据中心网络的边缘部署两台ED,并为其配置相同的虚拟IP地址后,这两台ED将虚拟成为一台ED设备,从而避免ED单点故障对网络造成影响。

2. 配置限制和指导

当数据中心网络边缘仅有一台ED设备时,请不要配置ED的虚拟IP地址。

两台ED设备上配置的虚拟IP地址必须相同,该虚拟IP地址应为ED设备上某个LoopBack接口的IP地址,且该地址不能与BGP对等体的地址相同。

两台ED设备被虚拟成一台设备以后,ED设备不能在本地接入虚拟机,只能作为数据中心互联的边缘设备使用,且不能在单台ED设备上引入外部路由。

EVPN数据中心互联支持双ED组网中,Underlay和Overlay网络必须同为IPv4网络,或同为IPv6网络。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     配置ED设备的虚拟IP地址。

evpn edge group { group-ipv4 | group-ipv6 }

缺省情况下,未指定ED设备的虚拟IP地址。

1.11  配置EVPN数据中心互联支持分布式聚合

1. 功能简介

在两台ED上均开启EVPN的分布式聚合模式,并为其配置相同的虚拟ED地址后,这两台ED将虚拟成为一台ED设备。该ED设备采用虚拟ED地址作为源端地址与远端VTEP/ED自动建立VXLAN/VXLAN-DCI隧道,从而避免ED单点故障对网络造成影响。

2. 配置限制和指导

配置本功能后,建议不要在ED设备上配置evpn drni local命令,否则可能会导致报文转发失败。

EVPN数据中心互联支持分布式聚合组网中,如果ED需要连接用户站点,则建议通过DR接口将用户站点同时接入组成DR系统的两台ED,即建议不要在ED上配置单挂AC。

3. 配置步骤

(1)     进入系统视图。

system-view

(2)     在ED上开启EVPN的分布式聚合模式,并配置虚拟ED地址。

evpn drni group { virtual-vtep-ipv4 | virtual-vtep-ipv6 }

缺省情况下,EVPN的分布式聚合模式处于关闭状态。

(3)     进入BGP实例视图。

bgp as-number [ instance instance-name ]

(4)     进入BGP EVPN地址族视图。

address-family l2vpn evpn

(5)     配置发布EVPN路由时,将下一跳地址修改为分布式聚合的虚拟ED地址。

nexthop evpn-drni group-address

缺省情况下,向EBGP对等体/对等体组发布路由时,将下一跳地址修改为建立BGP会话时使用的源接口的地址;向IBGP对等体/对等体组发布EBGP路由时,不修改下一跳地址。

1.12  EVPN数据中心互联典型配置举例

说明

本节所有举例中,使用VSI虚接口的设备均需要配置VXLAN的硬件资源模式为三层网关模式(hardware-resource vxlan l3gw),配置过程略。关于VXLAN的硬件资源模式的介绍,请参见“VXLAN配置指导”中的“配置VXLAN”。

 

1.12.1  数据中心二层互联且使用不同VXLAN配置举例

说明

本节仅以IPv4站点接入IPv4网络为例,IPv4站点接入IPv6、IPv6站点接入IPv4网络、IPv6站点接入IPv6网络的配置与此类似。

 

1. 组网需求

Switch A和Switch B为数据中心1的VTEP,Switch C和Switch D为数据中心2的VTEP,Switch B和Switch C为两个数据中心的ED。数据中心1和数据中心2分别使用VXLAN 10、VXLAN 30处理同一业务的流量。通过EVPN数据中心互连实现数据中心1和数据中心2的二层互通。

2. 组网图

图1-5 数据中心二层互联且使用不同VXLAN配置组网图

3. 配置步骤

(1)     配置IP地址和单播路由协议

配置各接口的IP地址和子网掩码;在IP核心网络内配置OSPF协议,确保交换机之间路由可达。(具体配置过程略)

(2)     配置Switch A

# 开启L2VPN能力。

<SwitchA> system-view

[SwitchA] l2vpn enable

# 关闭远端MAC地址自动学习功能。

[SwitchA] vxlan tunnel mac-learning disable

# 在VSI实例vpna下创建VXLAN 10。

[SwitchA] vsi vpna

[SwitchA-vsi-vpna] vxlan 10

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

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

[SwitchA-vsi-vpna] evpn encapsulation vxlan

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

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

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

[SwitchA-vsi-vpna] quit

# 配置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

# 在接入服务器的接口HundredGigE3/0/1上创建以太网服务实例1000,该实例用来匹配VLAN 100的数据帧。

[SwitchA] interface hundredgige 3/0/1

[SwitchA-HundredGigE3/0/1] port link-type trunk

[SwitchA-HundredGigE3/0/1] port trunk permit vlan 100

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

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

# 配置以太网服务实例1000与VSI实例vpna关联。

[SwitchA-HundredGigE3/0/1-srv1000] xconnect vsi vpna

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

(3)     配置Switch B

# 开启L2VPN能力。

<SwitchB> system-view

[SwitchB] l2vpn enable

# 关闭远端MAC地址自动学习功能。

[SwitchB] vxlan tunnel mac-learning disable

# 在与Switch C相连的三层接口上使能DCI功能,以便EVPN自动建立VXLAN-DCI隧道。

[SwitchB] interface vlan-interface 12

[SwitchB-Vlan-interface12] dci enable

[SwitchB-Vlan-interface12] quit

# 在VSI实例vpna下创建VXLAN 10。

[SwitchB] vsi vpna

[SwitchB-vsi-vpna] vxlan 10

[SwitchB-vsi-vpna-vxlan-10] quit

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

[SwitchB-vsi-vpna] evpn encapsulation vxlan

[SwitchB-vsi-vpna-evpn-vxlan] route-distinguisher auto

[SwitchB-vsi-vpna-evpn-vxlan] vpn-target auto

# 配置本端VXLAN 10映射为远端VXLAN 500。在对端ED上需要将VXLAN 500映射为对端ED上的VXLAN 30。

[SwitchB-vsi-vpna-evpn-vxlan] mapping vni 500

[SwitchB-vsi-vpna-evpn-vxlan] quit

[SwitchB-vsi-vpna] quit

# 在VSI实例vpnb下创建VXLAN 500,该VXLAN ID用于二层转发时替换本地的VXLAN。

[SwitchB] vsi vpnb

[SwitchB-vsi-vpnb] vxlan 500

[SwitchB-vsi-vpnb-vxlan-500] quit

# 在VSI实例vpnb下创建EVPN实例,并配置EVPN实例的RD和RT。RT需要手工配置。

[SwitchB-vsi-vpnb] evpn encapsulation vxlan

[SwitchB-vsi-vpnb-evpn-vxlan] route-distinguisher auto

[SwitchB-vsi-vpnb-evpn-vxlan] vpn-target 123:456

[SwitchB-vsi-vpnb-evpn-vxlan] quit

[SwitchB-vsi-vpnb] quit

# 配置BGP发布EVPN路由,指定向Switch A发布路由时将路由下一跳修改为自身的地址,向Switch C发布路由、从Switch C接收路由并发布时修改Router MAC。

[SwitchB] bgp 100

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

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

[SwitchB-bgp-default] peer 3.3.3.3 ebgp-max-hop 64

[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 3.3.3.3 enable

[SwitchB-bgp-default-evpn] peer 3.3.3.3 router-mac-local

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

[SwitchB-bgp-default-evpn] peer 1.1.1.1 next-hop-local

[SwitchB-bgp-default-evpn] quit

[SwitchB-bgp-default] quit

(4)     配置Switch C

# 开启L2VPN能力。

<SwitchC> system-view

[SwitchC] l2vpn enable

# 关闭远端MAC地址自动学习功能。

[SwitchC] vxlan tunnel mac-learning disable

# 在与Switch B相连的三层接口上使能DCI功能,以便EVPN自动建立VXLAN-DCI隧道

[SwitchC] interface vlan-interface 12

[SwitchC-Vlan-interface12] dci enable

[SwitchC-Vlan-interface12] quit

# 在VSI实例vpna下创建VXLAN 30。

[SwitchC] vsi vpna

[SwitchC-vsi-vpna] vxlan 30

[SwitchC-vsi-vpna-vxlan-30] quit

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

[SwitchC-vsi-vpna] evpn encapsulation vxlan

[SwitchC-vsi-vpna-evpn-vxlan] route-distinguisher auto

[SwitchC-vsi-vpna-evpn-vxlan] vpn-target auto

# 配置本端VXLAN 30映射为远端VXLAN 500。在对端ED上需要将VXLAN 500映射为对端ED上的VXLAN 10。

[SwitchC-vsi-vpna-evpn-vxlan] mapping vni 500

[SwitchC-vsi-vpna-evpn-vxlan] quit

[SwitchC-vsi-vpna] quit

# 在VSI实例vpnb下创建VXLAN 500,该VXLAN ID用于二层转发时替换本地的VXLAN。

[SwitchC] vsi vpnb

[SwitchC-vsi-vpnb] vxlan 500

[SwitchC-vsi-vpnb-vxlan-500] quit

# 在VSI实例vpnb下创建EVPN实例,并配置EVPN实例的RD和RT。RT需要手工配置。

[SwitchC-vsi-vpnb] evpn encapsulation vxlan

[SwitchC-vsi-vpnb-evpn-vxlan] route-distinguisher auto

[SwitchC-vsi-vpnb-evpn-vxlan] vpn-target 123:456

[SwitchC-vsi-vpnb-evpn-vxlan] quit

[SwitchC-vsi-vpnb] quit

# 配置BGP发布EVPN路由,指定向Switch D发布路由时将路由下一跳修改为自身的地址,向Switch B发布路由、从Switch B接收路由并发布时修改Router MAC。

[SwitchC] bgp 200

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

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

[SwitchC-bgp-default] peer 2.2.2.2 ebgp-max-hop 64

[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 2.2.2.2 enable

[SwitchC-bgp-default-evpn] peer 2.2.2.2 router-mac-local

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

[SwitchC-bgp-default-evpn] peer 4.4.4.4 next-hop-local

[SwitchC-bgp-default-evpn] quit

[SwitchC-bgp-default] quit

(5)     配置Switch D

# 开启L2VPN能力。

<SwitchD> system-view

[SwitchD] l2vpn enable

# 关闭远端MAC地址自动学习功能。

[SwitchD] vxlan tunnel mac-learning disable

# 在VSI实例vpna下创建VXLAN 30。

[SwitchD] vsi vpna

[SwitchD-vsi-vpna] vxlan 30

[SwitchD-vsi-vpna-vxlan-30] quit

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

[SwitchD-vsi-vpna] evpn encapsulation vxlan

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

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

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

[SwitchD-vsi-vpna] quit

# 配置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

# 在接入服务器的接口HundredGigE3/0/1上创建以太网服务实例1000,该实例用来匹配VLAN 200的数据帧。

[SwitchD] interface hundredgige 3/0/1

[SwitchD-HundredGigE3/0/1] port link-type trunk

[SwitchD-HundredGigE3/0/1] port trunk permit vlan 200

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

[SwitchD-HundredGigE3/0/1-srv1000] encapsulation s-vid 200

# 配置以太网服务实例1000与VSI实例vpna关联。

[SwitchD-HundredGigE3/0/1-srv1000] xconnect vsi vpna

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

4. 验证配置

(1)     验证ED(下文以Switch B为例,Switch C验证方法与此类似)

# 查看EVPN通过BGP自动发现的邻居信息,可以看到EVPN通过Inclusive Multicast Ethernet Tag Route发现邻居Switch A和Switch C,并分别与其建立VXLAN隧道、VXLAN-DCI隧道。

[SwitchB] display evpn auto-discovery imet

Total number of automatically discovered peers: 2

 

VSI name: vpna

RD                    PE_address      Tunnel_address  Tunnel mode VXLAN ID

1:10                  1.1.1.1         1.1.1.1         VXLAN       10

1:500                 3.3.3.3         3.3.3.3         VXLAN-DCI   500

# 查看Switch B上的Tunnel接口信息,可以看到VXLAN模式和VXLAN-DCI模式的Tunnel接口处于up状态。

[SwitchB] display interface tunnel

Tunnel0

Current state: UP

Line protocol state: UP

Description: Tunnel0 Interface

Bandwidth: 64 kbps

Maximum transmission unit: 1464

Internet protocol processing: Disabled

Output queue - Urgent queuing: Size/Length/Discards 0/100/0

Output queue - Protocol queuing: Size/Length/Discards 0/500/0

Output queue - FIFO queuing: Size/Length/Discards 0/75/0

Last clearing of counters: Never

Tunnel source 2.2.2.2, destination 1.1.1.1

Tunnel protocol/transport UDP_VXLAN/IP

Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Input: 0 packets, 0 bytes, 0 drops

Output: 0 packets, 0 bytes, 0 drops

 

Tunnel1

Current state: UP

Line protocol state: UP

Description: Tunnel1 Interface

Bandwidth: 64 kbps

Maximum transmission unit: 1464

Internet protocol processing: Disabled

Output queue - Urgent queuing: Size/Length/Discards 0/100/0

Output queue - Protocol queuing: Size/Length/Discards 0/500/0

Output queue - FIFO queuing: Size/Length/Discards 0/75/0

Last clearing of counters: Never

Tunnel source 2.2.2.2, destination 3.3.3.3

Tunnel protocol/transport UDP_VXLAN-DCI/IP

Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Input: 0 packets, 0 bytes, 0 drops

Output: 0 packets, 0 bytes, 0 drops

# 查看Switch B上的VSI信息,可以看到VSI内创建的VXLAN,以及关联的VXLAN隧道、VXLAN-DCI隧道等信息。vpnb下没有关联隧道。

[SwitchB] display l2vpn vsi verbose

VSI Name: vpna

  VSI Index               : 0

  VSI State               : Up

  MTU                     : 1500

  Bandwidth               : Unlimited

  Broadcast Restrain      : Unlimited

  Multicast Restrain      : Unlimited

  Unknown Unicast Restrain: Unlimited

  MAC Learning            : Enabled

  MAC Table Limit         : -

  MAC Learning rate       : -

  Drop Unknown            : -

  Flooding                : Enabled

  Statistics              : Disabled

  VXLAN ID                : 10

  Tunnels:

    Tunnel Name          Link ID    State    Type        Flood proxy

    Tunnel0              0x5000000  UP       Auto        Disabled

    Tunnel1              0x5000001  UP       Auto        Disabled

 

VSI Name: vpnb

  VSI Index               : 1

  VSI State               : Down

  MTU                     : 1500

  Bandwidth               : Unlimited

  Broadcast Restrain      : Unlimited

  Multicast Restrain      : Unlimited

  Unknown Unicast Restrain: Unlimited

  MAC Learning            : Enabled

  MAC Table Limit         : -

  MAC Learning rate       : -

  Drop Unknown            : -

  Flooding                : Enabled

  Statistics              : Disabled

  VXLAN ID                : 500

# 查看EVPN的MAC地址表项,可以看到已经学习到虚拟机的MAC地址信息,且从对端数据中心学到的MAC地址表项带有M标志。

[SwitchB] display evpn route mac

Flags: D - Dynamic   B - BGP      L - Local active

       G - Gateway   S - Static   M - Mapping        I - Invalid

 

VSI name: vpna

MAC address     Link ID/Name     Flags   Next hop

0001-0001-0011  Tunnel0          B       1.1.1.1

0001-0001-0033  Tunnel1          BM      3.3.3.3

(2)     验证主机

虚拟机VM 1、VM 2之间可以互访。

1.12.2  数据中心三层互联配置举例(IPv4组网)

说明

本节仅以IPv4站点接入IPv4网络为例,IPv6站点接入IPv4网络的配置与此类似。

 

1. 组网需求

Switch A为数据中心1的分布式网关,Switch D为数据中心2的分布式网关,Switch B和Switch C为两个数据中心的ED。通过EVPN数据中心互连实现数据中心1和数据中心2的三层互通。

2. 组网图

图1-6 数据中心三层互联配置组网图

3. 配置步骤

(1)     配置IP地址和单播路由协议

# 在VM 1上指定网关地址为10.1.1.1;在VM 2上指定网关地址为10.1.2.1。(具体配置过程略)

# 配置各接口的IP地址和子网掩码;在IP核心网络内配置OSPF协议,确保交换机之间路由可达。(具体配置过程略)

(2)     配置Switch A

# 开启L2VPN能力。

<SwitchA> system-view

[SwitchA] l2vpn enable

# 关闭远端MAC地址和远端ARP自动学习功能。

[SwitchA] vxlan tunnel mac-learning disable

[SwitchA] vxlan tunnel arp-learning disable

# 在VSI实例vpna下创建VXLAN 10。

[SwitchA] vsi vpna

[SwitchA-vsi-vpna] vxlan 10

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

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

[SwitchA-vsi-vpna] evpn encapsulation vxlan

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

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

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

[SwitchA-vsi-vpna] quit

# 配置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

# 在接入服务器的接口HundredGigE3/0/1上创建以太网服务实例1000,该实例用来匹配VLAN 100的数据帧。

[SwitchA] interface hundredgige 3/0/1

[SwitchA-HundredGigE3/0/1] port link-type trunk

[SwitchA-HundredGigE3/0/1] port trunk permit vlan 100

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

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

# 配置以太网服务实例1000与VSI实例vpna关联。

[SwitchA-HundredGigE3/0/1-srv1000] xconnect vsi vpna

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

# 配置L3VNI的RD和RT。

[SwitchA] ip vpn-instance vpn1

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

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

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

[SwitchA-vpn-ipv4-vpn1] quit

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

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

[SwitchA-vpn-evpn-vpn1] quit

[SwitchA-vpn-instance-vpn1] quit

# 配置VSI虚接口VSI-interface1。

[SwitchA] interface vsi-interface 1

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

[SwitchA-Vsi-interface1] ip address 10.1.1.1 255.255.255.0

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

[SwitchA-Vsi-interface1] distributed-gateway local

[SwitchA-Vsi-interface1] quit

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

[SwitchA] interface vsi-interface 2

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

[SwitchA-Vsi-interface2] l3-vni 1000

[SwitchA-Vsi-interface2] quit

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

[SwitchA] vsi vpna

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

[SwitchA-vsi-vpna] quit

(3)     配置Switch B

# 开启L2VPN能力。

<SwitchB> system-view

[SwitchB] l2vpn enable

# 关闭远端MAC地址和远端ARP自动学习功能。

[SwitchB] vxlan tunnel mac-learning disable

[SwitchB] vxlan tunnel arp-learning disable

# 在与Switch C相连的三层接口上使能DCI功能,以便EVPN自动建立VXLAN-DCI隧道。

[SwitchB] interface vlan-interface 12

[SwitchB-Vlan-interface12] dci enable

[SwitchB-Vlan-interface12] quit

# 配置BGP发布EVPN路由,指定向Switch A发布路由时将路由下一跳修改为自身的地址,向Switch C发布路由、从Switch C接收路由并发布时修改Router MAC。

[SwitchB] bgp 100

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

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

[SwitchB-bgp-default] peer 3.3.3.3 ebgp-max-hop 64

[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 3.3.3.3 enable

[SwitchB-bgp-default-evpn] peer 3.3.3.3 router-mac-local

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

[SwitchB-bgp-default-evpn] peer 1.1.1.1 next-hop-local

[SwitchB-bgp-default-evpn] quit

[SwitchB-bgp-default] quit

# 配置L3VNI的RD和RT。

[SwitchB] ip vpn-instance vpn1

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

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

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

[SwitchB-vpn-ipv4-vpn1] quit

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

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

[SwitchB-vpn-evpn-vpn1] quit

[SwitchB-vpn-instance-vpn1] quit

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

[SwitchB] interface vsi-interface 2

[SwitchB-Vsi-interface2] ip binding vpn-instance vpn1

[SwitchB-Vsi-interface2] l3-vni 1000

[SwitchB-Vsi-interface2] quit

(4)     配置Switch C

# 开启L2VPN能力。

<SwitchC> system-view

[SwitchC] l2vpn enable

# 关闭远端MAC地址和远端ARP自动学习功能。

[SwitchC] vxlan tunnel mac-learning disable

[SwitchC] vxlan tunnel arp-learning disable

# 在与Switch B相连的三层接口上使能DCI功能,以便EVPN自动建立VXLAN-DCI隧道

[SwitchC] interface vlan-interface 12

[SwitchC-Vlan-interface12] dci enable

[SwitchC-Vlan-interface12] quit

# 配置BGP发布EVPN路由,指定向Switch D发布路由时将路由下一跳修改为自身的地址,向Switch B发布路由、从Switch B接收路由并发布时修改Router MAC。

[SwitchC] bgp 200

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

[SwitchC-bgp-default] peer 2.2.2.2 connect-interface Loopback 0

[SwitchC-bgp-default] peer 2.2.2.2 ebgp-max-hop 64

[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 2.2.2.2 enable

[SwitchC-bgp-default-evpn] peer 2.2.2.2 router-mac-local

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

[SwitchC-bgp-default-evpn] peer 4.4.4.4 next-hop-local

[SwitchC-bgp-default-evpn] quit

[SwitchC-bgp-default] quit

# 配置L3VNI的RD和RT。

[SwitchC] ip vpn-instance vpn1

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

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

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

[SwitchC-vpn-ipv4-vpn1] quit

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

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

[SwitchC-vpn-evpn-vpn1] quit

[SwitchC-vpn-instance-vpn1] quit

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

[SwitchC] interface vsi-interface 2

[SwitchC-Vsi-interface2] ip binding vpn-instance vpn1

[SwitchC-Vsi-interface2] l3-vni 1000

[SwitchC-Vsi-interface2] quit

(5)     配置Switch D

# 开启L2VPN能力。

<SwitchD> system-view

[SwitchD] l2vpn enable

# 关闭远端MAC地址和远端ARP自动学习功能。

[SwitchD] vxlan tunnel mac-learning disable

[SwitchD] vxlan tunnel arp-learning disable

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

[SwitchD] vsi vpnb

[SwitchD-vsi-vpnb] evpn encapsulation vxlan

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

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

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

# 创建VXLAN 20。

[SwitchD-vsi-vpnb] vxlan 20

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

[SwitchD-vsi-vpnb] quit

# 配置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

# 在接入服务器的接口HundredGigE3/0/1上创建以太网服务实例3000,该实例用来匹配VLAN 3的数据帧。

[SwitchD] interface hundredgige 3/0/1

[SwitchD-HundredGigE3/0/1] port link-type trunk

[SwitchD-HundredGigE3/0/1] port trunk permit vlan 3

[SwitchD-HundredGigE3/0/1] service-instance 3000

[SwitchD-HundredGigE3/0/1-srv3000] encapsulation s-vid 3

# 配置以太网服务实例1000与VSI实例vpnb关联。

[SwitchD-HundredGigE3/0/1-srv3000] xconnect vsi vpnb

[SwitchD-HundredGigE3/0/1-srv3000] quit

# 配置L3VNI的RD和RT。

[SwitchD] ip vpn-instance vpn1

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

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

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

[SwitchD-vpn-ipv4-vpn1] quit

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

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

[SwitchD-vpn-evpn-vpn1] quit

[SwitchD-vpn-instance-vpn1] quit

# 配置VSI虚接口VSI-interface1。

[SwitchD] interface vsi-interface 1

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

[SwitchD-Vsi-interface1] ip address 10.1.2.1 255.255.255.0

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

[SwitchD-Vsi-interface1] distributed-gateway local

[SwitchD-Vsi-interface1] quit

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

[SwitchD] interface vsi-interface 2

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

[SwitchD-Vsi-interface2] l3-vni 1000

[SwitchD-Vsi-interface2] quit

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

[SwitchD] vsi vpnb

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

[SwitchD-vsi-vpnb] quit

4. 验证配置

(1)     验证ED(下文以Switch B为例,Switch C验证方法与此类似)

# 查看EVPN通过BGP自动发现的邻居信息,可以看到EVPN通过MAC/IP发布路由或IP前缀路由发现邻居Switch A和Switch C,并分别与其建立VXLAN隧道、VXLAN-DCI隧道。

[SwitchB] display evpn auto-discovery macip-prefix

Destination IP  Source IP       L3VNI           Tunnel mode OutInterface

1.1.1.1         2.2.2.2         1000            VXLAN       Vsi-interface2

3.3.3.3         2.2.2.2         1000            VXLAN-DCI   Vsi-interface2

# 查看Switch B上的Tunnel接口信息,可以看到VXLAN模式和VXLAN-DCI模式的Tunnel接口处于up状态。

[SwitchB] display interface tunnel

Tunnel0

Current state: UP

Line protocol state: UP

Description: Tunnel0 Interface

Bandwidth: 64 kbps

Maximum transmission unit: 1464

Internet protocol processing: Disabled

Output queue - Urgent queuing: Size/Length/Discards 0/100/0

Output queue - Protocol queuing: Size/Length/Discards 0/500/0

Output queue - FIFO queuing: Size/Length/Discards 0/75/0

Last clearing of counters: Never

Tunnel source 2.2.2.2, destination 1.1.1.1

Tunnel protocol/transport UDP_VXLAN/IP

Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Input: 0 packets, 0 bytes, 0 drops

Output: 0 packets, 0 bytes, 0 drops

 

Tunnel1

Current state: UP

Line protocol state: UP

Description: Tunnel1 Interface

Bandwidth: 64 kbps

Maximum transmission unit: 1464

Internet protocol processing: Disabled

Output queue - Urgent queuing: Size/Length/Discards 0/100/0

Output queue - Protocol queuing: Size/Length/Discards 0/500/0

Output queue - FIFO queuing: Size/Length/Discards 0/75/0

Last clearing of counters: Never

Tunnel source 2.2.2.2, destination 3.3.3.3

Tunnel protocol/transport UDP_VXLAN-DCI/IP

Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Input: 0 packets, 0 bytes, 0 drops

Output: 0 packets, 0 bytes, 0 drops

# 查看VPN实例vpn1的IP路由表项,可以看到已经学习到虚拟机的IP路由信息。

[SwitchB] display ip routing-table vpn-instance vpn1

Destinations : 4        Routes : 4

Destination/Mask   Proto   Pre Cost        NextHop         Interface

10.1.1.0/24        BGP     255 0           1.1.1.1         Vsi2

10.1.1.11/32       BGP     255 0           1.1.1.1         Vsi2

10.1.2.0/24        BGP     255 0           3.3.3.3         Vsi2

10.1.2.22/32       BGP     255 0           3.3.3.3         Vsi2

(2)     验证主机

虚拟机VM 1、VM 2之间可以互访。

1.12.3  数据中心三层互联配置举例(IPv6组网)

说明

本节仅以IPv6站点接入IPv6网络为例,IPv4站点接入IPv6网络的配置与此类似。

 

1. 组网需求

Switch A为数据中心1的分布式网关,Switch D为数据中心2的分布式网关,Switch B和Switch C为两个数据中心的ED。通过EVPN数据中心互连实现数据中心1和数据中心2的三层互通。

2. 组网图

图1-7 数据中心三层互联IPv6 Underlay配置组网图

3. 配置步骤

(1)     配置IP地址和单播路由协议

# 在VM 1上指定网关地址为10::1;在VM 2上指定网关地址为20::1。(具体配置过程略)

# 配置各接口的IP地址和子网掩码;在IP核心网络内配置OSPFv3协议,确保交换机之间路由可达。(具体配置过程略)

(2)     配置Switch A

# 开启L2VPN能力。

<SwitchA> system-view

[SwitchA] l2vpn enable

# 关闭远端MAC地址和远端ND自动学习功能。

[SwitchA] vxlan tunnel mac-learning disable

[SwitchA] vxlan tunnel nd-learning disable

# 在VSI实例vpna下创建VXLAN 10。

[SwitchA] vsi vpna

[SwitchA-vsi-vpna] vxlan 10

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

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

[SwitchA-vsi-vpna] evpn encapsulation vxlan

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

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

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

[SwitchA-vsi-vpna] quit

# 配置BGP发布EVPN路由。

[SwitchA] bgp 100

[SwitchA-bgp-default] router-id 1.1.1.1

[SwitchA-bgp-default] peer 2::2 as-number 100

[SwitchA-bgp-default] peer 2::2 connect-interface loopback 0

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

[SwitchA-bgp-default-evpn] peer 2::2 enable

[SwitchA-bgp-default-evpn] quit

[SwitchA-bgp-default] quit

# 在接入服务器的接口HundredGigE3/0/1上创建以太网服务实例1000,该实例用来匹配VLAN 100的数据帧。

[SwitchA] interface hundredgige 3/0/1

[SwitchA-HundredGigE3/0/1] port link-type trunk

[SwitchA-HundredGigE3/0/1] port trunk permit vlan 100

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

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

# 配置以太网服务实例1000与VSI实例vpna关联。

[SwitchA-HundredGigE3/0/1-srv1000] xconnect vsi vpna

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

# 配置L3VNI的RD和RT。

[SwitchA] ip vpn-instance vpn1

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

[SwitchA-vpn-instance-vpn1] address-family ipv6

[SwitchA-vpn-ipv6-vpn1] vpn-target 2:2

[SwitchA-vpn-ipv6-vpn1] quit

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

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

[SwitchA-vpn-evpn-vpn1] quit

[SwitchA-vpn-instance-vpn1] quit

# 配置VSI虚接口VSI-interface1。

[SwitchA] interface vsi-interface 1

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

[SwitchA-Vsi-interface1] ipv6 address 10::1 64

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

[SwitchA-Vsi-interface1] distributed-gateway local

[SwitchA-Vsi-interface1] quit

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

[SwitchA] interface vsi-interface 2

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

[SwitchA-Vsi-interface2] ipv6 address auto link-local

[SwitchA-Vsi-interface2] l3-vni 1000

[SwitchA-Vsi-interface2] quit

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

[SwitchA] vsi vpna

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

[SwitchA-vsi-vpna] quit

(3)     配置Switch B

# 开启L2VPN能力。

<SwitchB> system-view

[SwitchB] l2vpn enable

# 关闭远端MAC地址和远端ND自动学习功能。

[SwitchB] vxlan tunnel mac-learning disable

[SwitchB] vxlan tunnel nd-learning disable

# 在与Switch C相连的三层接口上使能DCI功能,以便EVPN自动建立VXLAN-DCI隧道。

[SwitchB] interface vlan-interface 12

[SwitchB-Vlan-interface12] dci enable

[SwitchB-Vlan-interface12] quit

# 配置BGP发布EVPN路由,指定向Switch A发布路由时将路由下一跳修改为自身的地址,向Switch C发布路由、从Switch C接收路由并发布时修改Router MAC。

[SwitchB] bgp 100

[SwitchB-bgp-default] router-id 2.2.2.2

[SwitchB-bgp-default] peer 3::3 as-number 200

[SwitchB-bgp-default] peer 3::3 connect-interface loopback 0

[SwitchB-bgp-default] peer 3::3 ebgp-max-hop 64

[SwitchB-bgp-default] peer 1::1 as-number 100

[SwitchB-bgp-default] peer 1::1 connect-interface loopback 0

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

[SwitchB-bgp-default-evpn] peer 3::3 enable

[SwitchB-bgp-default-evpn] peer 3::3 router-mac-local

[SwitchB-bgp-default-evpn] peer 1::1 enable

[SwitchB-bgp-default-evpn] peer 1::1 next-hop-local

[SwitchB-bgp-default-evpn] quit

[SwitchB-bgp-default] quit

# 配置L3VNI的RD和RT。

[SwitchB] ip vpn-instance vpn1

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

[SwitchB-vpn-instance-vpn1] address-family ipv6

[SwitchB-vpn-ipv6-vpn1] vpn-target 2:2

[SwitchB-vpn-ipv6-vpn1] quit

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

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

[SwitchB-vpn-evpn-vpn1] quit

[SwitchB-vpn-instance-vpn1] quit

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

[SwitchB] interface vsi-interface 2

[SwitchB-Vsi-interface2] ip binding vpn-instance vpn1

[SwitchB-Vsi-interface2] ipv6 address auto link-local

[SwitchB-Vsi-interface2] l3-vni 1000

[SwitchB-Vsi-interface2] quit

(4)     配置Switch C

# 开启L2VPN能力。

<SwitchC> system-view

[SwitchC] l2vpn enable

# 关闭远端MAC地址和远端ND自动学习功能。

[SwitchC] vxlan tunnel mac-learning disable

[SwitchC] vxlan tunnel nd-learning disable

# 在与Switch B相连的三层接口上使能DCI功能,以便EVPN自动建立VXLAN-DCI隧道

[SwitchC] interface vlan-interface 12

[SwitchC-Vlan-interface12] dci enable

[SwitchC-Vlan-interface12] quit

# 配置BGP发布EVPN路由,指定向Switch D发布路由时将路由下一跳修改为自身的地址,向Switch B发布路由、从Switch B接收路由并发布时修改Router MAC。

[SwitchC] bgp 200

[SwitchC-bgp-default] router-id 3.3.3.3

[SwitchC-bgp-default] peer 2::2 as-number 100

[SwitchC-bgp-default] peer 2::2 connect-interface Loopback 0

[SwitchC-bgp-default] peer 2::2 ebgp-max-hop 64

[SwitchC-bgp-default] peer 4::4 as-number 200

[SwitchC-bgp-default] peer 4::4 connect-interface Loopback 0

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

[SwitchC-bgp-default-evpn] peer 2::2 enable

[SwitchC-bgp-default-evpn] peer 2::2 router-mac-local

[SwitchC-bgp-default-evpn] peer 4::4 enable

[SwitchC-bgp-default-evpn] peer 4::4 next-hop-local

[SwitchC-bgp-default-evpn] quit

[SwitchC-bgp-default] quit

# 配置L3VNI的RD和RT。

[SwitchC] ip vpn-instance vpn1

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

[SwitchC-vpn-instance-vpn1] address-family ipv6

[SwitchC-vpn-ipv6-vpn1] vpn-target 2:2

[SwitchC-vpn-ipv6-vpn1] quit

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

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

[SwitchC-vpn-evpn-vpn1] quit

[SwitchC-vpn-instance-vpn1] quit

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

[SwitchC] interface vsi-interface 2

[SwitchC-Vsi-interface2] ip binding vpn-instance vpn1

[SwitchC-Vsi-interface2] ipv6 address auto link-local

[SwitchC-Vsi-interface2] l3-vni 1000

[SwitchC-Vsi-interface2] quit

(5)     配置Switch D

# 开启L2VPN能力。

<SwitchD> system-view

[SwitchD] l2vpn enable

# 关闭远端MAC地址和远端ND自动学习功能。

[SwitchD] vxlan tunnel mac-learning disable

[SwitchD] vxlan tunnel nd-learning disable

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

[SwitchD] vsi vpnb

[SwitchD-vsi-vpnb] evpn encapsulation vxlan

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

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

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

# 创建VXLAN 20。

[SwitchD-vsi-vpnb] vxlan 20

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

[SwitchD-vsi-vpnb] quit

# 配置BGP发布EVPN路由。

[SwitchD] bgp 200

[SwitchD-bgp-default] router-id 4.4.4.4

[SwitchD-bgp-default] peer 3::3 as-number 200

[SwitchD-bgp-default] peer 3::3 connect-interface Loopback 0

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

[SwitchD-bgp-default-evpn] peer 3::3 enable

[SwitchD-bgp-default-evpn] quit

[SwitchD-bgp-default] quit

# 在接入服务器的接口HundredGigE3/0/1上创建以太网服务实例3000,该实例用来匹配VLAN 3的数据帧。

[SwitchD] interface hundredgige 3/0/1

[SwitchD-HundredGigE3/0/1] port link-type trunk

[SwitchD-HundredGigE3/0/1] port trunk permit vlan 3

[SwitchD-HundredGigE3/0/1] service-instance 3000

[SwitchD-HundredGigE3/0/1-srv3000] encapsulation s-vid 3

# 配置以太网服务实例1000与VSI实例vpnb关联。

[SwitchD-HundredGigE3/0/1-srv3000] xconnect vsi vpnb

[SwitchD-HundredGigE3/0/1-srv3000] quit

# 配置L3VNI的RD和RT。

[SwitchD] ip vpn-instance vpn1

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

[SwitchD-vpn-instance-vpn1] address-family ipv6

[SwitchD-vpn-ipv6-vpn1] vpn-target 2:2

[SwitchD-vpn-ipv6-vpn1] quit

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

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

[SwitchD-vpn-evpn-vpn1] quit

[SwitchD-vpn-instance-vpn1] quit

# 配置VSI虚接口VSI-interface1。

[SwitchD] interface vsi-interface 1

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

[SwitchD-Vsi-interface1] ipv6 address 20::1 64

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

[SwitchD-Vsi-interface1] distributed-gateway local

[SwitchD-Vsi-interface1] quit

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

[SwitchD] interface vsi-interface 2

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

[SwitchD-Vsi-interface2] ipv6 address auto link-local,

[SwitchD-Vsi-interface2] l3-vni 1000

[SwitchD-Vsi-interface2] quit

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

[SwitchD] vsi vpnb

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

[SwitchD-vsi-vpnb] quit

4. 验证配置

(1)     验证ED(下文以Switch B为例,Switch C验证方法与此类似)

# 查看EVPN通过BGP自动发现的邻居信息,可以看到EVPN通过MAC/IP发布路由或IP前缀路由发现邻居Switch A和Switch C,并分别与其建立VXLAN隧道、VXLAN-DCI隧道。

[SwitchB] display evpn ipv6 auto-discovery macip-prefix

Destination IP : 1::1

Source IP      : 2::2

L3VNI          : 1000

Tunnel mode    : VXLAN

OutInterface   : Vsi-interface2

 

Destination IP : 3::3

Source IP      : 2::2

L3VNI          : 1000

Tunnel mode    : VXLAN-DCI

OutInterface   : Vsi-interface2

# 查看Switch B上的Tunnel接口信息,可以看到VXLAN模式和VXLAN-DCI模式的Tunnel接口处于up状态。

[SwitchB] display interface tunnel

Tunnel0

Current state: UP

Line protocol state: UP

Description: Tunnel1 Interface

Bandwidth: 64 kbps

Maximum transmission unit: 1464

Internet protocol processing: Disabled

Output queue - Urgent queuing: Size/Length/Discards 0/100/0

Output queue - Protocol queuing: Size/Length/Discards 0/500/0

Output queue - FIFO queuing: Size/Length/Discards 0/75/0

Last clearing of counters: Never

Tunnel source 2::2, destination 1::1

Tunnel protocol/transport UDP_VXLAN/IPv6

Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Input: 0 packets, 0 bytes, 0 drops

Output: 0 packets, 0 bytes, 0 drops

 

Tunnel1

Current state: UP

Line protocol state: UP

Description: Tunnel2 Interface

Bandwidth: 64 kbps

Maximum transmission unit: 1464

Internet protocol processing: Disabled

Output queue - Urgent queuing: Size/Length/Discards 0/100/0

Output queue - Protocol queuing: Size/Length/Discards 0/500/0

Output queue - FIFO queuing: Size/Length/Discards 0/75/0

Last clearing of counters: Never

Tunnel source 2::2, destination 3::3

Tunnel protocol/transport UDP_VXLAN-DCI/IPv6

Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Input: 0 packets, 0 bytes, 0 drops

Output: 0 packets, 0 bytes, 0 drops

# 查看VPN实例vpn1的IPv6路由表项,可以看到已经学习到虚拟机的IP路由信息。

[SwitchB] display ipv6 routing-table vpn-instance vpn1

 

Destinations : 7        Routes : 7

 

Destination: ::1/128                                     Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: 10::/64                                     Protocol  : BGP4+

NextHop    : 1::1                                        Preference: 255

Interface  : Vsi2                                        Cost      : 0

 

Destination: 10::11/128                                   Protocol  : BGP4+

NextHop    : 1::1                                        Preference: 255

Interface  : Vsi2                                        Cost      : 0

 

Destination: 20::/64                                     Protocol  : BGP4+

NextHop    : 3::3                                        Preference: 255

Interface  : Vsi2                                        Cost      : 0

 

Destination: 20::22/128                                   Protocol  : BGP4+

NextHop    : 3::3                                        Preference: 255

Interface  : Vsi2                                        Cost      : 0

 

Destination: FE80::/10                                   Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: FF00::/8                                    Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : NULL0

(2)     验证主机

虚拟机VM 1、VM 2之间可以互访。

1.12.4  数据中心三层互联支持双ED配置举例

说明

本节仅以IPv4站点接入IPv4网络为例,IPv4站点接入IPv6、IPv6站点接入IPv4网络、IPv6站点接入IPv6网络的配置与此类似。

 

1. 组网需求

Switch A为数据中心1的分布式网关,Switch G为数据中心2的分布式网关,Switch B作为路由反射器,Switch C和Switch D为数据中心1的双ED设备,Switch F为数据中心2的ED设备,Switch E为连接两个数据中心ED设备的DCI网络设备。通过EVPN数据中心互连实现数据中心1和数据中心2的三层互通。

2. 组网图

图1-8 数据中心三层互联支持双ED配置组网图

3. 配置步骤

(1)     配置IP地址和单播路由协议

# 在VM 1上指定网关地址为100.1.1.1;在VM 2上指定网关地址为100.1.2.1。(具体配置过程略)

# 配置各接口的IP地址和子网掩码;配置OSPF协议,确保各交换机之间路由可达。(具体配置过程略)

(2)     配置Switch A

# 开启L2VPN能力。

<SwitchA> system-view

[SwitchA] l2vpn enable

# 关闭远端MAC地址和远端ARP自动学习功能。

[SwitchA] vxlan tunnel mac-learning disable

[SwitchA] vxlan tunnel arp-learning disable

# 在VSI实例vpna下创建VXLAN 10。

[SwitchA] vsi vpna

[SwitchA-vsi-vpna] vxlan 10

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

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

[SwitchA-vsi-vpna] evpn encapsulation vxlan

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

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

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

[SwitchA-vsi-vpna] quit

# 配置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

# 在接入服务器的接口HundredGigE3/0/1上创建以太网服务实例1000,该实例用来匹配VLAN 100的数据帧。

[SwitchA] interface hundredgige 3/0/1

[SwitchA-HundredGigE3/0/1] port link-type trunk

[SwitchA-HundredGigE3/0/1] port trunk permit vlan 100

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

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

# 配置以太网服务实例1000与VSI实例vpna关联。

[SwitchA-HundredGigE3/0/1-srv1000] xconnect vsi vpna

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

# 配置L3VNI的RD和RT。

[SwitchA] ip vpn-instance vpn1

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

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

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

[SwitchA-vpn-ipv4-vpn1] quit

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

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

[SwitchA-vpn-evpn-vpn1] quit

[SwitchA-vpn-instance-vpn1] quit

# 配置VSI虚接口VSI-interface1。

[SwitchA] interface vsi-interface 1

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

[SwitchA-Vsi-interface1] ip address 100.1.1.1 255.255.255.0

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

[SwitchA-Vsi-interface1] distributed-gateway local

[SwitchA-Vsi-interface1] quit

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

[SwitchA] interface vsi-interface 2

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

[SwitchA-Vsi-interface2] l3-vni 1000

[SwitchA-Vsi-interface2] quit

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

[SwitchA] vsi vpna

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

[SwitchA-vsi-vpna] quit

(3)     配置Switch B

# 配置BGP路由反射。

<SwitchB> system-view

[SwitchB] bgp 100

[SwitchB-bgp-default] group evpn internal

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

[SwitchB-bgp-default] peer 1.1.1.1 group evpn

[SwitchB-bgp-default] peer 3.3.3.3 group evpn

[SwitchB-bgp-default] peer 4.4.4.4 group evpn

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

[SwitchB-bgp-default-evpn] undo policy vpn-target

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

[SwitchB-bgp-default-evpn] peer evpn reflect-client

[SwitchB-bgp-default-evpn] quit

(4)     配置Switch C

# 开启L2VPN能力。

<SwitchC> system-view

[SwitchC] l2vpn enable

# 关闭远端MAC地址和远端ARP自动学习功能。

[SwitchC] vxlan tunnel mac-learning disable

[SwitchC] vxlan tunnel arp-learning disable

# 在与Switch E相连的三层接口上使能DCI功能,以便EVPN自动建立VXLAN-DCI隧道。

[SwitchC] interface vlan-interface 13

[SwitchC-Vlan-interface13] dci enable

[SwitchC-Vlan-interface13] quit

# 配置BGP发布EVPN路由,指定向Switch B发布路由时将路由下一跳修改为自身的地址,向Switch F发布路由、从Switch F接收路由并发布时修改Router MAC。

[SwitchC] bgp 100

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

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

[SwitchC-bgp-default] peer 6.6.6.6 ebgp-max-hop 64

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

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

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

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

[SwitchC-bgp-default-evpn] peer 6.6.6.6 router-mac-local

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

[SwitchC-bgp-default-evpn] peer 2.2.2.2 next-hop-local

[SwitchC-bgp-default-evpn] quit

[SwitchC-bgp-default] quit

# 配置L3VNI的RD和RT。

[SwitchC] ip vpn-instance vpn1

[SwitchC-vpn-instance-vpn1] route-distinguisher 1:2

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

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

[SwitchC-vpn-ipv4-vpn1] quit

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

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

[SwitchC-vpn-evpn-vpn1] quit

[SwitchC-vpn-instance-vpn1] quit

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

[SwitchC] interface vsi-interface 2

[SwitchC-Vsi-interface2] ip binding vpn-instance vpn1

[SwitchC-Vsi-interface2] l3-vni 1000

[SwitchC-Vsi-interface2] mac-address 1-2-3

[SwitchC-Vsi-interface2] quit

# 配置ED的虚拟IP地址为接口LoopBack2的IP地址1.2.3.4,并配置通过OSPF发布该地址。

[SwitchC] evpn edge group 1.2.3.4

[SwitchC] interface loopback 2

[SwitchC-LoopBack2] ip address 1.2.3.4 32

[SwitchC-LoopBack2] quit

[SwitchC] ospf

[SwitchC-ospf-1] area 0

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

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

[SwitchC-ospf-1] quit

# 创建Monitor Link组,将与Switch E相连的物理接口、LoopBack0接口和LoopBack2接口加入到Monitor Link组,设置Monitor Link组下行接口的回切延时为90秒。

[SwitchC] undo monitor-link disable

[SwitchC] monitor-link group 1

[SwitchC-mtlk-group1] port hundredgige 3/0/1 uplink

[SwitchC-mtlk-group1] port loopback 0 downlink

[SwitchC-mtlk-group1] port loopback 2 downlink

[SwitchC-mtlk-group1] downlink up-delay 90

[SwitchC-mtlk-group1] quit

(5)     配置Switch D

# 开启L2VPN能力。

<SwitchD> system-view

[SwitchD] l2vpn enable

# 关闭远端MAC地址和远端ARP自动学习功能。

[SwitchD] vxlan tunnel mac-learning disable

[SwitchD] vxlan tunnel arp-learning disable

# 在与Switch E相连的三层接口上使能DCI功能,以便EVPN自动建立VXLAN-DCI隧道。

[SwitchD] interface vlan-interface 14

[SwitchD-Vlan-interface14] dci enable

[SwitchD-Vlan-interface14] quit

# 配置BGP发布EVPN路由,指定向Switch B发布路由时将路由下一跳修改为自身的地址,向Switch F发布路由、从Switch F接收路由并发布时修改Router MAC。

[SwitchD] bgp 100

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

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

[SwitchD-bgp-default] peer 6.6.6.6 ebgp-max-hop 64

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

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

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

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

[SwitchD-bgp-default-evpn] peer 6.6.6.6 router-mac-local

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

[SwitchD-bgp-default-evpn] peer 2.2.2.2 next-hop-local

[SwitchD-bgp-default-evpn] quit

[SwitchD-bgp-default] quit

# 配置L3VNI的RD和RT。

[SwitchD] ip vpn-instance vpn1

[SwitchD-vpn-instance-vpn1] route-distinguisher 1:2

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

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

[SwitchD-vpn-ipv4-vpn1] quit

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

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

[SwitchD-vpn-evpn-vpn1] quit

[SwitchD-vpn-instance-vpn1] quit

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

[SwitchD] interface vsi-interface 2

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

[SwitchD-Vsi-interface2] l3-vni 1000

[SwitchD-Vsi-interface2] mac-address 1-2-3

[SwitchD-Vsi-interface2] quit

# 配置ED的虚拟IP地址为接口LoopBack2的IP地址1.2.3.4,并配置通过OSPF发布该地址。

[SwitchD] evpn edge group 1.2.3.4

[SwitchD] interface loopback 2

[SwitchD-LoopBack2] ip address 1.2.3.4 32

[SwitchD-LoopBack2] quit

[SwitchD] ospf

[SwitchD-ospf-1] area 0

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

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

[SwitchD-ospf-1] quit

# 创建Monitor Link组,将与Switch E相连的物理接口、LoopBack0接口和LoopBack2接口加入到Monitor Link组,设置Monitor Link组下行接口的回切延时为90秒。

[SwitchD] undo monitor-link disable

[SwitchD] monitor-link group 1

[SwitchD-mtlk-group1] port hundredgige 3/0/1 uplink

[SwitchD-mtlk-group1] port loopback 0 downlink

[SwitchD-mtlk-group1] port loopback 2 downlink

[SwitchD-mtlk-group1] downlink up-delay 90

[SwitchD-mtlk-group1] quit

(6)     配置Switch F

# 开启L2VPN能力。

<SwitchF> system-view

[SwitchF] l2vpn enable

# 关闭远端MAC地址和远端ARP自动学习功能。

[SwitchF] vxlan tunnel mac-learning disable

[SwitchF] vxlan tunnel arp-learning disable

# 在与Switch E相连的三层接口上使能DCI功能,以便EVPN自动建立VXLAN-DCI隧道

[SwitchF] interface vlan-interface 15

[SwitchF-Vlan-interface15] dci enable

[SwitchF-Vlan-interface15] quit

# 配置BGP发布EVPN路由,指定向Switch G发布路由时将路由下一跳修改为自身的地址,向Switch C和Switch D发布路由、从Switch C和Switch D接收路由并发布时修改Router MAC。

[SwitchF] bgp 200

[SwitchF-bgp-default] peer 3.3.3.3 as-number 100

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

[SwitchF-bgp-default] peer 3.3.3.3 ebgp-max-hop 64

[SwitchF-bgp-default] peer 4.4.4.4 as-number 100

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

[SwitchF-bgp-default] peer 4.4.4.4 ebgp-max-hop 64

[SwitchF-bgp-default] peer 7.7.7.7 as-number 200

[SwitchF-bgp-default] peer 7.7.7.7 connect-interface loopback 0

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

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

[SwitchF-bgp-default-evpn] peer 3.3.3.3 router-mac-local

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

[SwitchF-bgp-default-evpn] peer 4.4.4.4 router-mac-local

[SwitchF-bgp-default-evpn] peer 7.7.7.7 enable

[SwitchF-bgp-default-evpn] peer 7.7.7.7 next-hop-local

[SwitchF-bgp-default-evpn] quit

[SwitchF-bgp-default] quit

# 配置L3VNI的RD和RT。

[SwitchF] ip vpn-instance vpn1

[SwitchF-vpn-instance-vpn1] route-distinguisher 1:4

[SwitchF-vpn-instance-vpn1] address-family ipv4

[SwitchF-vpn-ipv4-vpn1] vpn-target 2:2

[SwitchF-vpn-ipv4-vpn1] quit

[SwitchF-vpn-instance-vpn1] address-family evpn

[SwitchF-vpn-evpn-vpn1] vpn-target 1:1

[SwitchF-vpn-evpn-vpn1] quit

[SwitchF-vpn-instance-vpn1] quit

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

[SwitchF] interface vsi-interface 2

[SwitchF-Vsi-interface2] ip binding vpn-instance vpn1

[SwitchF-Vsi-interface2] l3-vni 1000

[SwitchF-Vsi-interface2] quit

(7)     配置Switch G

# 开启L2VPN能力。

<SwitchG> system-view

[SwitchG] l2vpn enable

# 关闭远端MAC地址和远端ARP自动学习功能。

[SwitchG] vxlan tunnel mac-learning disable

[SwitchG] vxlan tunnel arp-learning disable

# 在VSI实例vpnb下创建VXLAN 20。

[SwitchG] vsi vpnb

[SwitchG-vsi-vpnb] vxlan 20

[SwitchG-vsi-vpnb-vxlan-20] quit

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

[SwitchG-vsi-vpnb] evpn encapsulation vxlan

[SwitchG-vsi-vpnb-evpn-vxlan] route-distinguisher auto

[SwitchG-vsi-vpnb-evpn-vxlan] vpn-target auto

[SwitchG-vsi-vpnb-evpn-vxlan] quit

[SwitchG-vsi-vpnb] quit

# 配置BGP发布EVPN路由。

[SwitchG] bgp 200

[SwitchG-bgp-default] peer 6.6.6.6 as-number 200

[SwitchG-bgp-default] peer 6.6.6.6 connect-interface loopback 0

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

[SwitchG-bgp-default-evpn] peer 6.6.6.6 enable

[SwitchG-bgp-default-evpn] quit

[SwitchG-bgp-default] quit

# 在接入服务器的接口HundredGigE3/0/1上创建以太网服务实例2000,该实例用来匹配VLAN 200的数据帧。

[SwitchG] interface hundredgige 3/0/1

[SwitchG-HundredGigE3/0/1] port link-type trunk

[SwitchG-HundredGigE3/0/1] port trunk permit vlan 200

[SwitchG-HundredGigE3/0/1] service-instance 2000

[SwitchG-HundredGigE3/0/1-srv2000] encapsulation s-vid 200

# 配置以太网服务实例2000与VSI实例vpnb关联。

[SwitchG-HundredGigE3/0/1-srv2000] xconnect vsi vpnb

[SwitchG-HundredGigE3/0/1-srv2000] quit

# 配置L3VNI的RD和RT。

[SwitchG] ip vpn-instance vpn1

[SwitchG-vpn-instance-vpn1] route-distinguisher 1:4

[SwitchG-vpn-instance-vpn1] address-family ipv4

[SwitchG-vpn-ipv4-vpn1] vpn-target 2:2

[SwitchG-vpn-ipv4-vpn1] quit

[SwitchG-vpn-instance-vpn1] address-family evpn

[SwitchG-vpn-evpn-vpn1] vpn-target 1:1

[SwitchG-vpn-evpn-vpn1] quit

[SwitchG-vpn-instance-vpn1] quit

# 配置VSI虚接口VSI-interface1。

[SwitchG] interface vsi-interface 1

[SwitchG-Vsi-interface1] ip binding vpn-instance vpn1

[SwitchG-Vsi-interface1] ip address 100.1.2.1 255.255.255.0

[SwitchG-Vsi-interface1] mac-address 2-2-2

[SwitchG-Vsi-interface1] distributed-gateway local

[SwitchG-Vsi-interface1] quit

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

[SwitchG] interface vsi-interface 2

[SwitchG-Vsi-interface2] ip binding vpn-instance vpn1

[SwitchG-Vsi-interface2] l3-vni 1000

[SwitchG-Vsi-interface2] quit

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

[SwitchG] vsi vpnb

[SwitchG-vsi-vpnb] gateway vsi-interface 1

[SwitchG-vsi-vpnb] quit

4. 验证配置

(1)     验证ED(下文以Switch C为例,Switch D验证方法与此类似)

# 查看EVPN通过BGP自动发现的邻居信息,可以看到EVPN通过MAC/IP发布路由或IP前缀路由发现邻居Switch A和Switch F,并分别与其建立VXLAN隧道、VXLAN-DCI隧道。

[SwitchC] display evpn auto-discovery macip-prefix

Destination IP  Source IP       L3VNI           Tunnel mode OutInterface

1.1.1.1         1.2.3.4         1000            VXLAN       Vsi-interface2

6.6.6.6         1.2.3.4         1000            VXLAN-DCI   Vsi-interface2

# 查看Switch C上的Tunnel接口信息,可以看到VXLAN模式和VXLAN-DCI模式的Tunnel接口处于up状态。

[SwitchC] display interface tunnel

Tunnel0

Current state: UP

Line protocol state: UP

Description: Tunnel0 Interface

Bandwidth: 64 kbps

Maximum transmission unit: 1464

Internet protocol processing: Disabled

Output queue - Urgent queuing: Size/Length/Discards 0/100/0

Output queue - Protocol queuing: Size/Length/Discards 0/500/0

Output queue - FIFO queuing: Size/Length/Discards 0/75/0

Last clearing of counters: Never

Tunnel source 1.2.3.4, destination 1.1.1.1

Tunnel protocol/transport UDP_VXLAN/IP

Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Input: 0 packets, 0 bytes, 0 drops

Output: 0 packets, 0 bytes, 0 drops

 

Tunnel1

Current state: UP

Line protocol state: UP

Description: Tunnel1 Interface

Bandwidth: 64 kbps

Maximum transmission unit: 1464

Internet protocol processing: Disabled

Output queue - Urgent queuing: Size/Length/Discards 0/100/0

Output queue - Protocol queuing: Size/Length/Discards 0/500/0

Output queue - FIFO queuing: Size/Length/Discards 0/75/0

Last clearing of counters: Never

Tunnel source 1.2.3.4, destination 6.6.6.6

Tunnel protocol/transport UDP_VXLAN-DCI/IP

Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Input: 0 packets, 0 bytes, 0 drops

Output: 0 packets, 0 bytes, 0 drops

# 查看VPN实例vpn1的IP路由表项,可以看到已经学习到虚拟机的IP路由信息。

[SwitchC] display ip routing-table vpn-instance vpn1

Destinations : 4        Routes : 4

Destination/Mask   Proto   Pre Cost        NextHop         Interface

100.1.1.0/24       BGP     255 0           1.1.1.1         Vsi2

100.1.1.10/32      BGP     255 0           1.1.1.1         Vsi2

100.1.2.0/24       BGP     255 0           6.6.6.6         Vsi2

100.1.2.20/32      BGP     255 0           6.6.6.6         Vsi2

(2)     验证Switch A

# 查看EVPN通过BGP自动发现的邻居信息,可以看到EVPN通过MAC/IP发布路由或IP前缀路由发现邻居ED(Switch C和Switch D组成的虚拟ED),并与其建立VXLAN隧道。

[SwitchA] display evpn auto-discovery macip-prefix

Destination IP  Source IP       L3VNI           Tunnel mode OutInterface

1.2.3.4         1.1.1.1         1000            VXLAN       Vsi-interface2

# 查看Switch A上的Tunnel接口信息,可以看到VXLAN模式的Tunnel接口处于up状态。

[SwitchA] display interface tunnel

Tunnel0

Current state: UP

Line protocol state: UP

Description: Tunnel0 Interface

Bandwidth: 64 kbps

Maximum transmission unit: 1464

Internet protocol processing: Disabled

Output queue - Urgent queuing: Size/Length/Discards 0/100/0

Output queue - Protocol queuing: Size/Length/Discards 0/500/0

Output queue - FIFO queuing: Size/Length/Discards 0/75/0

Last clearing of counters: Never

Tunnel source 1.1.1.1, destination 1.2.3.4

Tunnel protocol/transport UDP_VXLAN/IP

Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Input: 0 packets, 0 bytes, 0 drops

Output: 0 packets, 0 bytes, 0 drops

# 查看VPN实例vpn1的IP路由表项,可以看到已经学习到虚拟机的IP路由信息。

[SwitchA] display ip routing-table vpn-instance vpn1

Destinations : 4        Routes : 4

Destination/Mask   Proto   Pre Cost        NextHop         Interface

100.1.2.0/24       BGP     255 0           1.2.3.4         Vsi2

100.1.2.10/32      BGP     255 0           1.2.3.4         Vsi2

(3)     验证主机

虚拟机VM 1、VM 2之间可以互访。当Switch C或Switch D出现故障后,VM 1、VM 2之间仍然可以互访。

1.12.5  数据中心三层互联支持分布式聚合配置举例

1. 组网需求

Switch A为数据中心1的分布式网关;Switch G为数据中心2的分布式网关;Switch B作为数据中心1的路由反射器;Switch C和Switch D为数据中心1的ED设备,在Switch C和Switch D上配置分布式聚合,实现ED设备的备份;Switch F为数据中心2的ED设备;Switch E为连接两个数据中心ED设备的DCI网络设备。通过EVPN数据中心互连实现数据中心1和数据中心2的三层互通。

2. 组网图

图1-9 数据中心三层互联支持分布式聚合组网图

3. 配置步骤

产品特有说明-数据中心三层互联双ED配置举例(交换应用)

(1)     配置IP地址和单播路由协议

# 在VM 1上指定网关地址为100.1.1.1;在VM 2上指定网关地址为100.1.2.1。(具体配置过程略)

# 配置各接口的IP地址和子网掩码;配置OSPF协议,确保各交换机之间路由可达。(具体配置过程略)

(2)     配置Switch A

# 开启L2VPN能力。

<SwitchA> system-view

[SwitchA] l2vpn enable

产品特有说明-数据中心互联支持双ED配置举例-SwitchA硬件资源模式

# 关闭远端MAC地址和远端ARP自动学习功能。

[SwitchA] vxlan tunnel mac-learning disable

[SwitchA] vxlan tunnel arp-learning disable

# 在VSI实例vpna下创建VXLAN 10。

[SwitchA] vsi vpna

[SwitchA-vsi-vpna] vxlan 10

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

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

[SwitchA-vsi-vpna] evpn encapsulation vxlan

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

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

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

[SwitchA-vsi-vpna] quit

# 配置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

# 在接入服务器的接口HundredGigE3/0/1上创建以太网服务实例1000,该实例用来匹配VLAN 100的数据帧。

[SwitchA] interface hundredgige 3/0/1

[SwitchA-HundredGigE3/0/1] port link-type trunk

[SwitchA-HundredGigE3/0/1] port trunk permit vlan 100

产品特有说明-数据中心三层互联双ED配置举例-Switch A Permit VLAN

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

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

# 配置以太网服务实例1000与VSI实例vpna关联。

[SwitchA-HundredGigE3/0/1-srv1000] xconnect vsi vpna

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

# 配置L3VNI的RD和RT。

[SwitchA] ip vpn-instance vpn1

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

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

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

[SwitchA-vpn-ipv4-vpn1] quit

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

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

[SwitchA-vpn-evpn-vpn1] quit

[SwitchA-vpn-instance-vpn1] quit

# 配置VSI虚接口VSI-interface1。

[SwitchA] interface vsi-interface 1

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

[SwitchA-Vsi-interface1] ip address 100.1.1.1 255.255.255.0

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

[SwitchA-Vsi-interface1] distributed-gateway local

[SwitchA-Vsi-interface1] quit

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

[SwitchA] interface vsi-interface 2

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

[SwitchA-Vsi-interface2] l3-vni 1000

[SwitchA-Vsi-interface2] quit

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

[SwitchA] vsi vpna

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

[SwitchA-vsi-vpna] quit

(3)     配置Switch B

# 配置BGP路由反射。

<SwitchB> system-view

[SwitchB] bgp 100

[SwitchB-bgp-default] group evpn internal

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

[SwitchB-bgp-default] peer 1.1.1.1 group evpn

[SwitchB-bgp-default] peer 3.3.3.3 group evpn

[SwitchB-bgp-default] peer 4.4.4.4 group evpn

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

[SwitchB-bgp-default-evpn] undo policy vpn-target

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

[SwitchB-bgp-default-evpn] peer evpn reflect-client

[SwitchB-bgp-default-evpn] quit

(4)     配置Switch C

# 开启L2VPN能力。

<SwitchC> system-view

[SwitchC] l2vpn enable

产品特有说明-ED-SwitchC配置硬件资源模式

# 关闭远端MAC地址和远端ARP自动学习功能。

[SwitchC] vxlan tunnel mac-learning disable

[SwitchC] vxlan tunnel arp-learning disable

# 在与Switch E相连的三层接口上使能DCI功能,以便EVPN自动建立VXLAN-DCI隧道。

[SwitchC] interface vlan-interface 13

[SwitchC-Vlan-interface13] dci enable

[SwitchC-Vlan-interface13] quit

# 开启EVPN的分布式聚合模式,并配置虚拟VTEP地址为1.2.3.4。

[SwitchA] evpn drni group 1.2.3.4

# 配置DR系统。

[SwitchC] drni system-mac 0001-0001-0001

[SwitchC] drni system-number 1

[SwitchC] drni system-priority 10

[SwitchC] drni keepalive ip destination 60.1.1.1 source 60.1.1.2

[SwitchC] drni restore-delay 180

# 创建二层聚合接口3,并配置该接口为动态聚合模式。

[SwitchC] interface bridge-aggregation 3

[SwitchC-Bridge-Aggregation3] link-aggregation mode dynamic

[SwitchC-Bridge-Aggregation3] quit

# 将端口HundredGigE3/0/3加入到聚合组3中。

[SwitchC] interface hundredgige 3/0/3

[SwitchC-HundredGigE3/0/3] port link-aggregation group 3

[SwitchC-HundredGigE3/0/3] quit

# 将二层聚合接口3配置为IPP口。

[SwitchC] interface bridge-aggregation 3

[SwitchC-Bridge-Aggregation3] port drni intra-portal-port 1

[SwitchC-Bridge-Aggregation3] quit

# 配置BGP发布EVPN路由,指定向Switch B发布路由时将路由下一跳修改为自身的地址,向Switch F发布路由、从Switch F接收路由并发布时修改Router MAC。

[SwitchC] bgp 100

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

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

[SwitchC-bgp-default] peer 6.6.6.6 ebgp-max-hop 64

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

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

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

[SwitchC-bgp-default-evpn] nexthop evpn-drni group-address

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

[SwitchC-bgp-default-evpn] peer 6.6.6.6 router-mac-local

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

[SwitchC-bgp-default-evpn] peer 2.2.2.2 next-hop-local

[SwitchC-bgp-default-evpn] quit

[SwitchC-bgp-default] quit

# 配置L3VNI的RD和RT。

[SwitchC] ip vpn-instance vpn1

[SwitchC-vpn-instance-vpn1] route-distinguisher 1:2

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

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

[SwitchC-vpn-ipv4-vpn1] quit

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

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

[SwitchC-vpn-evpn-vpn1] quit

[SwitchC-vpn-instance-vpn1] quit

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

[SwitchC] interface vsi-interface 2

[SwitchC-Vsi-interface2] ip binding vpn-instance vpn1

[SwitchC-Vsi-interface2] l3-vni 1000

[SwitchC-Vsi-interface2] mac-address 1-2-3

[SwitchC-Vsi-interface2] quit

# 创建Monitor Link组,将与Switch E相连的物理接口、LoopBack0接口和LoopBack2接口加入到Monitor Link组,设置Monitor Link组下行接口的回切延时为90秒。

[SwitchC] undo monitor-link disable

[SwitchC] monitor-link group 1

[SwitchC-mtlk-group1] port hundredgige 3/0/1 uplink

[SwitchC-mtlk-group1] port loopback 0 downlink

[SwitchC-mtlk-group1] port loopback 2 downlink

[SwitchC-mtlk-group1] downlink up-delay 90

[SwitchC-mtlk-group1] quit

(5)     配置Switch D

# 开启L2VPN能力。

<SwitchD> system-view

[SwitchD] l2vpn enable

产品特有说明-双ED-SwitchD-配置硬件资源模式

# 关闭远端MAC地址和远端ARP自动学习功能。

[SwitchD] vxlan tunnel mac-learning disable

[SwitchD] vxlan tunnel arp-learning disable

# 在与Switch E相连的三层接口上使能DCI功能,以便EVPN自动建立VXLAN-DCI隧道。

[SwitchD] interface vlan-interface 14

[SwitchD-Vlan-interface14] dci enable

[SwitchD-Vlan-interface14] quit

# 开启EVPN的分布式聚合模式,并配置虚拟VTEP地址为1.2.3.4。

[SwitchD] evpn drni group 1.2.3.4

# 配置DR系统。

[SwitchD] drni system-mac 0001-0001-0001

[SwitchD] drni system-number 2

[SwitchD] drni system-priority 10

[SwitchD] drni keepalive ip destination 60.1.1.1 source 60.1.1.2

[SwitchD] drni restore-delay 180

# 创建二层聚合接口3,并配置该接口为动态聚合模式。

[SwitchD] interface bridge-aggregation 3

[SwitchD-Bridge-Aggregation3] link-aggregation mode dynamic

[SwitchD-Bridge-Aggregation3] quit

# 将端口HundredGigE3/0/3加入到聚合组3中。

[SwitchD] interface hundredgige 3/0/3

[SwitchD-HundredGigE3/0/3] port link-aggregation group 3

[SwitchD-HundredGigE3/0/3] quit

# 将二层聚合接口3配置为IPP口。

[SwitchD] interface bridge-aggregation 3

[SwitchD-Bridge-Aggregation3] port drni intra-portal-port 1

[SwitchD-Bridge-Aggregation3] quit

# 配置BGP发布EVPN路由,指定向Switch B发布路由时将路由下一跳修改为自身的地址,向Switch F发布路由、从Switch F接收路由并发布时修改Router MAC。

[SwitchD] bgp 100

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

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

[SwitchD-bgp-default] peer 6.6.6.6 ebgp-max-hop 64

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

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

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

[SwitchD-bgp-default-evpn] nexthop evpn-drni group-address

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

[SwitchD-bgp-default-evpn] peer 6.6.6.6 router-mac-local

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

[SwitchD-bgp-default-evpn] peer 2.2.2.2 next-hop-local

[SwitchD-bgp-default-evpn] quit

[SwitchD-bgp-default] quit

# 配置L3VNI的RD和RT。

[SwitchD] ip vpn-instance vpn1

[SwitchD-vpn-instance-vpn1] route-distinguisher 1:2

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

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

[SwitchD-vpn-ipv4-vpn1] quit

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

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

[SwitchD-vpn-evpn-vpn1] quit

[SwitchD-vpn-instance-vpn1] quit

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

[SwitchD] interface vsi-interface 2

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

[SwitchD-Vsi-interface2] l3-vni 1000

[SwitchD-Vsi-interface2] mac-address 1-2-3

[SwitchD-Vsi-interface2] quit

# 创建Monitor Link组,将与Switch E相连的物理接口、LoopBack0接口和LoopBack2接口加入到Monitor Link组,设置Monitor Link组下行接口的回切延时为90秒。

[SwitchD] undo monitor-link disable

[SwitchD] monitor-link group 1

[SwitchD-mtlk-group1] port hundredgige 3/0/1 uplink

[SwitchD-mtlk-group1] port loopback 0 downlink

[SwitchD-mtlk-group1] port loopback 2 downlink

[SwitchD-mtlk-group1] downlink up-delay 90

[SwitchD-mtlk-group1] quit

(6)     配置Switch F

# 开启L2VPN能力。

<SwitchF> system-view

[SwitchF] l2vpn enable

产品特有说明-双ED-SwitchF-配置硬件资源模式

# 关闭远端MAC地址和远端ARP自动学习功能。

[SwitchF] vxlan tunnel mac-learning disable

[SwitchF] vxlan tunnel arp-learning disable

# 在与Switch E相连的三层接口上使能DCI功能,以便EVPN自动建立VXLAN-DCI隧道

[SwitchF] interface vlan-interface 15

[SwitchF-Vlan-interface15] dci enable

[SwitchF-Vlan-interface15] quit

# 配置BGP发布EVPN路由,指定向Switch G发布路由时将路由下一跳修改为自身的地址,向Switch C和Switch D发布路由、从Switch C和Switch D接收路由并发布时修改Router MAC。

[SwitchF] bgp 200

[SwitchF-bgp-default] peer 3.3.3.3 as-number 100

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

[SwitchF-bgp-default] peer 3.3.3.3 ebgp-max-hop 64

[SwitchF-bgp-default] peer 4.4.4.4 as-number 100

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

[SwitchF-bgp-default] peer 4.4.4.4 ebgp-max-hop 64

[SwitchF-bgp-default] peer 7.7.7.7 as-number 200

[SwitchF-bgp-default] peer 7.7.7.7 connect-interface loopback 0

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

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

[SwitchF-bgp-default-evpn] peer 3.3.3.3 router-mac-local

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

[SwitchF-bgp-default-evpn] peer 4.4.4.4 router-mac-local

[SwitchF-bgp-default-evpn] peer 7.7.7.7 enable

[SwitchF-bgp-default-evpn] peer 7.7.7.7 next-hop-local

[SwitchF-bgp-default-evpn] quit

[SwitchF-bgp-default] quit

# 配置L3VNI的RD和RT。

[SwitchF] ip vpn-instance vpn1

[SwitchF-vpn-instance-vpn1] route-distinguisher 1:4

[SwitchF-vpn-instance-vpn1] address-family ipv4

[SwitchF-vpn-ipv4-vpn1] vpn-target 2:2

[SwitchF-vpn-ipv4-vpn1] quit

[SwitchF-vpn-instance-vpn1] address-family evpn

[SwitchF-vpn-evpn-vpn1] vpn-target 1:1

[SwitchF-vpn-evpn-vpn1] quit

[SwitchF-vpn-instance-vpn1] quit

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

[SwitchF] interface vsi-interface 2

[SwitchF-Vsi-interface2] ip binding vpn-instance vpn1

[SwitchF-Vsi-interface2] l3-vni 1000

[SwitchF-Vsi-interface2] quit

(7)     配置Switch G

# 开启L2VPN能力。

<SwitchG> system-view

[SwitchG] l2vpn enable

产品特有说明-数据中心三层互联支持双ED-SwitchG配置硬件资源模式

# 关闭远端MAC地址和远端ARP自动学习功能。

[SwitchG] vxlan tunnel mac-learning disable

[SwitchG] vxlan tunnel arp-learning disable

# 在VSI实例vpnb下创建VXLAN 20。

[SwitchG] vsi vpnb

[SwitchG-vsi-vpnb] vxlan 20

[SwitchG-vsi-vpnb-vxlan-20] quit

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

[SwitchG-vsi-vpnb] evpn encapsulation vxlan

[SwitchG-vsi-vpnb-evpn-vxlan] route-distinguisher auto

[SwitchG-vsi-vpnb-evpn-vxlan] vpn-target auto

[SwitchG-vsi-vpnb-evpn-vxlan] quit

[SwitchG-vsi-vpnb] quit

# 配置BGP发布EVPN路由。

[SwitchG] bgp 200

[SwitchG-bgp-default] peer 6.6.6.6 as-number 200

[SwitchG-bgp-default] peer 6.6.6.6 connect-interface loopback 0

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

[SwitchG-bgp-default-evpn] peer 6.6.6.6 enable

[SwitchG-bgp-default-evpn] quit

[SwitchG-bgp-default] quit

# 在接入服务器的接口HundredGigE3/0/1上创建以太网服务实例2000,该实例用来匹配VLAN 200的数据帧。

[SwitchG] interface hundredgige 3/0/1

[SwitchG-HundredGigE3/0/1] port link-type trunk

[SwitchG-HundredGigE3/0/1] port trunk permit vlan 200

产品特有说明-数据中心三层互联双ED配置举例-Switch G Permit VLAN

[SwitchG-HundredGigE3/0/1] service-instance 2000

[SwitchG-HundredGigE3/0/1-srv2000] encapsulation s-vid 200

# 配置以太网服务实例2000与VSI实例vpnb关联。

[SwitchG-HundredGigE3/0/1-srv2000] xconnect vsi vpnb

[SwitchG-HundredGigE3/0/1-srv2000] quit

# 配置L3VNI的RD和RT。

[SwitchG] ip vpn-instance vpn1

[SwitchG-vpn-instance-vpn1] route-distinguisher 1:4

[SwitchG-vpn-instance-vpn1] address-family ipv4

[SwitchG-vpn-ipv4-vpn1] vpn-target 2:2

[SwitchG-vpn-ipv4-vpn1] quit

[SwitchG-vpn-instance-vpn1] address-family evpn

[SwitchG-vpn-evpn-vpn1] vpn-target 1:1

[SwitchG-vpn-evpn-vpn1] quit

[SwitchG-vpn-instance-vpn1] quit

# 配置VSI虚接口VSI-interface1。

[SwitchG] interface vsi-interface 1

[SwitchG-Vsi-interface1] ip binding vpn-instance vpn1

[SwitchG-Vsi-interface1] ip address 100.1.2.1 255.255.255.0

[SwitchG-Vsi-interface1] mac-address 2-2-2

[SwitchG-Vsi-interface1] distributed-gateway local

[SwitchG-Vsi-interface1] quit

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

[SwitchG] interface vsi-interface 2

[SwitchG-Vsi-interface2] ip binding vpn-instance vpn1

[SwitchG-Vsi-interface2] l3-vni 1000

[SwitchG-Vsi-interface2] quit

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

[SwitchG] vsi vpnb

[SwitchG-vsi-vpnb] gateway vsi-interface 1

[SwitchG-vsi-vpnb] quit

4. 验证配置

(1)     验证ED(下文以Switch C为例,Switch D验证方法与此类似)

# 查看EVPN通过BGP自动发现的邻居信息,可以看到EVPN通过MAC/IP发布路由或IP前缀路由发现邻居Switch A和Switch F,并分别与其建立VXLAN隧道、VXLAN-DCI隧道。

[SwitchC] display evpn auto-discovery macip-prefix

Destination IP  Source IP       L3VNI           Tunnel mode OutInterface

1.1.1.1         3.3.3.3         1000            VXLAN       Vsi-interface2

6.6.6.6         3.3.3.3         1000            VXLAN-DCI   Vsi-interface2

# 查看Switch C上的Tunnel接口信息,可以看到VXLAN模式和VXLAN-DCI模式的Tunnel接口处于up状态。

[SwitchC] display interface tunnel

Tunnel0

Current state: UP

Line protocol state: UP

Description: Tunnel0 Interface

Bandwidth: 64 kbps

Maximum transmission unit: 1464

Internet protocol processing: Disabled

Output queue - Urgent queuing: Size/Length/Discards 0/100/0

Output queue - Protocol queuing: Size/Length/Discards 0/500/0

Output queue - FIFO queuing: Size/Length/Discards 0/75/0

Last clearing of counters: Never

Tunnel source 1.2.3.4, destination 1.1.1.1

Tunnel protocol/transport UDP_VXLAN/IP

Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Input: 0 packets, 0 bytes, 0 drops

Output: 0 packets, 0 bytes, 0 drops

 

Tunnel1

Current state: UP

Line protocol state: UP

Description: Tunnel1 Interface

Bandwidth: 64 kbps

Maximum transmission unit: 1464

Internet protocol processing: Disabled

Output queue - Urgent queuing: Size/Length/Discards 0/100/0

Output queue - Protocol queuing: Size/Length/Discards 0/500/0

Output queue - FIFO queuing: Size/Length/Discards 0/75/0

Last clearing of counters: Never

Tunnel source 1.2.3.4, destination 6.6.6.6

Tunnel protocol/transport UDP_VXLAN-DCI/IP

Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Input: 0 packets, 0 bytes, 0 drops

Output: 0 packets, 0 bytes, 0 drops

# 查看VPN实例vpn1的IP路由表项,可以看到已经学习到虚拟机的IP路由信息。

[SwitchC] display ip routing-table vpn-instance vpn1

Destinations : 4        Routes : 4

Destination/Mask   Proto   Pre Cost        NextHop         Interface

100.1.1.0/24       BGP     255 0           1.1.1.1         Vsi2

100.1.1.10/32      BGP     255 0           1.1.1.1         Vsi2

100.1.2.0/24       BGP     255 0           6.6.6.6         Vsi2

100.1.2.20/32      BGP     255 0           6.6.6.6         Vsi2

(2)     验证Switch A

# 查看EVPN通过BGP自动发现的邻居信息,可以看到EVPN通过MAC/IP发布路由或IP前缀路由发现邻居ED(Switch C和Switch D组成的虚拟ED),并与其建立VXLAN隧道。

[SwitchA] display evpn auto-discovery macip-prefix

Destination IP  Source IP       L3VNI           Tunnel mode OutInterface

1.2.3.4         1.1.1.1         1000            VXLAN       Vsi-interface2

# 查看Switch A上的Tunnel接口信息,可以看到VXLAN模式的Tunnel接口处于up状态。

[SwitchA] display interface tunnel

Tunnel0

Current state: UP

Line protocol state: UP

Description: Tunnel0 Interface

Bandwidth: 64 kbps

Maximum transmission unit: 1464

Internet protocol processing: Disabled

Output queue - Urgent queuing: Size/Length/Discards 0/100/0

Output queue - Protocol queuing: Size/Length/Discards 0/500/0

Output queue - FIFO queuing: Size/Length/Discards 0/75/0

Last clearing of counters: Never

Tunnel source 1.1.1.1, destination 1.2.3.4

Tunnel protocol/transport UDP_VXLAN/IP

Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec

Input: 0 packets, 0 bytes, 0 drops

Output: 0 packets, 0 bytes, 0 drops

# 查看VPN实例vpn1的IP路由表项,可以看到已经学习到虚拟机的IP路由信息。

[SwitchA] display ip routing-table vpn-instance vpn1

Destinations : 4        Routes : 4

Destination/Mask   Proto   Pre Cost        NextHop         Interface

100.1.2.0/24       BGP     255 0           1.2.3.4         Vsi2

100.1.2.10/32      BGP     255 0           1.2.3.4         Vsi2

(3)     验证主机

虚拟机VM 1、VM 2之间可以互访。当Switch C或Switch D出现故障后,VM 1、VM 2之间仍然可以互访。

 

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

新华三官网
联系我们