VXLAN 二层互通-隧道方式_实验

本文详细描述了在华为网络环境中配置Spine-1、Leaf-1A和Leaf-1B的IP地址、OSPF路由以及VXLAN的基本配置过程,包括接口设置、VNI配置和业务接入点,最后通过展示验证命令确认配置成功。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

组网和配置思路

VXLAN 二层互通实验组网

配置 Spine-1,Leaf-1 和 Leaf-2 的IP 地址

<HUAWEI>system-view immediately
[HUAWEI] sysname Spine-l
[Spine-1]interface LoopBack1
[Spine-1-LoopBackl]ip address 1.1.1.1 32
[Spine-1-LoopBack1]quit
[Spine-1]interface 10GE 1/0/14
[Spine-1-10GE1/0/14]undo portswitch
[Spine-1-10GE1/0/14]ip address 172.16.12.1 24
Spine-1-10GE1/0/14]quit
[Spine-1]interface 10GE 1/0/15
[Spine-1-10GE1/0/15]undo portswitch
[Spine-1-10GE1/0/15]ip address 172.16.13.1 24
[Spine-1-10GE1/0/15]quit

<HUAWEI>system-view immediately
HUAWEI]sysname Leaf-1A
Leaf-1A]interface LoopBack 1
[Leaf-1A-LoopBack1]ip address 2.2.2.2 32
[Leaf-1A-LoopBackl]quit
[Ieaf-1A]interface 10
[Leaf-1A]interface 10GE 1/0/14
Leaf-1A-10GE1/0/14]undo portswitch
[Leaf-1A-10GE1/0/14]ip address 172.12.12.2 24
[Leaf-1A-10GE1/0/14]quit

<HUAWEI>system-view immediately
HUAWEI]sysname Leaf-1B
[Leaf-1B] interface LoopBack 1
[Leaf-1B-LoopBackl]ip address 3.3.3.3 32
[Leaf-1B-LoopBack1]quit
[Leaf-1B]interface 10GE 1/0/15
[Leaf-1B-10GE1/0/15]undo portswitch
[Leaf-1B-10GE1/0/15]ip address 172.16.13.2 24
[Leaf-1B-10GE1/0/15]quit

配置OSPF

Leaf-1A、Leaf-1B 分别配置环回口 LoopBack1,作为VTEP IP,通告进入底层路由协议。

immediately<Spine-1>system-view
[Spine-1]ospf 1
[Spine-1-ospf-1]area 0
[Spine-1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[Spine-1-ospf-1-area-0.0.0.0]network 172.16.12.0 0.0.0.255
[Spine-1-ospf-1-area-0.0.0.0]network 172.16.13.0 0.0.0.255
[Spine-1-ospf-1-area-0.0.0.0]return

<Leaf-1A>system-viewimmediately[Leaf-1A]ospf 1
[Leaf-1A-ospf-l]area 0
[Leaf-1A-ospf-1-area-0.0.0.0]net
[Leaf-1A-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[Leaf-1A-ospf-1-area-0.0.0.0]network 172.16.12.0 0.0.0.255
[Leaf-1A-ospf-1-area-0.0.0.0]return

<Leaf-1B>system-viewimmediately
[Leaf-1B]ospf 1
[Leaf-1B-ospf-1]area 0
[Leaf-1B-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[Leaf-1B-ospf-1-area-0.0.0.0]network 172.16.13.0 0.0.0.255
[Leaf-1B-ospf-1-area-0.0.0.0]return

配置 Leaf-1A 和 Leaf-1B 的 VXLAN 基本配置

[Leaf-1A]bridge-domain 10
[Leaf-1A-bd10]vxlan vni 5000
[Leaf-1A-bd10]quit
[Leaf-1A]interface Nve 1
[Leaf-1A-Nvel]source 2.2.2.2
[Leaf-1A-Nvel]vni 5000 head-end peer-list 3.3.3.3
[Leaf-1A-Nvel]quit

[Leaf-1B]bridge-domain 10
[Leaf-1B-bd10]vxlan vni 5000
[Leaf-1B-bd10]quit
[Leaf-1B]interface Nve 1
[Leaf-1B-Nve1]sourc 3.3.3.3
[Leaf-1B-Nvel]vni 5000 head-endpeer-list 2.2.2.2
[Leaf-1B-Nve1]quit

配置eaf-1A 和 Leaf-1B 的业务接入点

[Leaf-1A] interface 10ge 1/0/1.1 mode 12
[Leaf-1A-10GE1/0/1.1]encapsulation dotlq vid 10
[Leaf-1A-10GE1/0/1.1]bridge-domain 10
[Leaf-1A-10GE1/0/1.1]quit

[Leaf-1B] interface 10ge 1/0/1.1 mode 12
[Leaf-1B-10GE1/0/1.1] encapsulation dotlq vid 10
[Leaf-1B-10GE1/0/1.1]bridge-domain 10
[Leaf-1B-10GE1/0/1.1]quit

验证配置结果

执行 display vxlan tunnel 命令可查看到 VXLAN 隧道的信息,以Spine-1_显示为例。

<Leaf-1A>display vxlan vniNumber of vxlan vni
VNI		BD-ID		State
-----------------------------------
5000	10			up
<Leaf-1A>display vxlan tunnel
Number of vxlan Tunnel ID : 1
Tunnel ID	Source		Destination	State 	Type 	Uptime
4026531841	2.2.2.2		3.3.3.3		up		static	00:19:21

通过命令 Ping 来测试网络连通性,以 PC1 Ping PC2 为例:
在这里插入图片描述

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值