今天给大家介绍EVXN的相关内容。本文以华为eNSP模拟器为工具,设计并实现了一个典型的EVXN配置分布式网关的应用场景,主要是EVXN分布式网关下企业外部网站的访问,并完成了相应的配置。
阅读本文,您需要对EVXN有一定的了解,如果您对此还存在困惑,欢迎查阅我博客内的其他文章,相信您一定会有所收获!
推荐阅读文章:
VXLAN详解(一)
VXLAN详解(二)
VXLAN详解(三)
VXLAN中EVN技术详解(一)——EVN实现VXLAN隧道控制
VXLAN中EVN技术详解(二)——EVN与VXLAN分布式网关
强烈推荐您阅读下列文章:
EVN配置实例(一)——EVN集中式网关
EVN配置实例(二)——EVN分布式网关
一、实验拓扑及要求
以上是实验拓扑图,现在要求配置VXLAN分布式网关,同时允许各个机器访问企业外部网站。
二、实验配置命令
(一)EVN实例和VN实例RT值配置
在EVN相关实验中,EVN实例和VN实例的RT值配置相对比较麻烦,各个携带值路由的接收规则也相对比较复杂。因此,在这里,我给出一般场景下EVN实例和VN实例的RT值配置如下:
VN实例:
ERT:Y(EVN)
IRT:Y(EVN)
EVN实例A:
ERT:A
IRT:A
ERT:Y
EVN实例B:
ERT:B
IRT:B
ERT:Y
这样的配置,可以使得EVN实例发送的主机路由可以传递到相同的EVN实例,同时也可以使得VN实例接受,并使其传递到其他的VN实例。在本实验中,相应的EVN和VN实例RT值配置如拓扑图右下角示意。
(二)外部路由引入
关于EVN场景下为外部路由(在本实验中是默认路由)的引入,一共需要两步:
1、将默认路由转变为VNv4路由
2、将转变后的VNv4路由转变为EVN路由,传递给所有EV*N邻居。
具体配置如下:
bgp 100
ipv4-family V*N-instance A
import-route static
advertise l2V*N eV*N
这样,就可以把V*N实例A中的静态路由发布出去了。
(三)V*N静态路由泄露
完成上述配置的前提,是在CE3上提前给VN实例A配置好了出口的静态路由(外部路由),虽然在之前的文章中我已经说过在VXLAN场景下VN实例静态路由泄露配置的问题,但是在今天针对本实验,我再次把配置粘贴如下:
ip route-static 192.168.10.0 255.255.255.0 V*N-instance A 192.168.10.254
ip route-static 192.168.20.0 255.255.255.0 V*N-instance A 192.168.20.254
ip route-static V*N-instance A 0.0.0.0 0.0.0.0 192.168.23.2 public
三、实验效果
(一)Type 5 IP Prefix 路由信息抓取
(二)查看分布式网关场景下路由
(三)PC访问企业外部网站
四、附录——CE1相关代码
sysname HUAWEI
#
ip V*N-instance A
ipv4-family
route-distinguisher 100:100
V*N-target 100:100 export-extcommunity eV*N
V*N-target 100:100 import-extcommunity eV*N
vxlan vni 100
#
bridge-domain 10
vxlan vni 10
eV*N
route-distinguisher 100:10
V*N-target 100:10 export-extcommunity
V*N-target 100:100 export-extcommunity
V*N-target 100:10 import-extcommunity
#
bridge-domain 20
vxlan vni 20
eV*N
route-distinguisher 100:20
V*N-target 100:20 export-extcommunity
V*N-target 100:100 export-extcommunity
V*N-target 100:20 import-extcommunity
#
interface Vbdif10
ip binding V*N-instance A
ip address 192.168.10.200 255.255.255.0
#
interface Vbdif20
ip binding V*N-instance A
ip address 192.168.20.200 255.255.255.0
#
interface GE1/0/0
undo portswitch
undo shutdown
ip address 155.1.13.3 255.255.255.0
#
interface GE1/0/1
undo portswitch
undo shutdown
ip address 192.168.23.3 255.255.255.0
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#
interface Nve1
source 3.3.3.3
vni 10 head-end peer-list protocol bgp
vni 20 head-end peer-list protocol bgp
#
interface NULL0
#
bgp 100
peer 1.1.1.1 as-number 100
peer 1.1.1.1 connect-interface LoopBack0
peer 2.2.2.2 as-number 100
peer 2.2.2.2 connect-interface LoopBack0
#
ipv4-family unicast
peer 1.1.1.1 enable
peer 2.2.2.2 enable
#
ipv4-family V*N-instance A
import-route static
advertise l2V*N eV*N
#
l2V*N-family eV*N
policy V*N-target
peer 1.1.1.1 enable
peer 2.2.2.2 enable
#
ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 155.1.13.0 0.0.0.255
#
ip route-static 192.168.10.0 255.255.255.0 V*N-instance A 192.168.10.254
ip route-static 192.168.20.0 255.255.255.0 V*N-instance A 192.168.20.254
ip route-static V*N-instance A 0.0.0.0 0.0.0.0 192.168.23.2 public
原创不易,转载请说明出处:https://blog.youkuaiyun.com/weixin_40228200/article/details/119817548