VXLAN基础实验

该文描述了一个采用静态方式部署VXLAN的实验,以实现同一子网内终端的互访。首先配置了基于OSPF的Underlay网络,包括Leaf和Spine节点。接着,在Leaf节点上配置VAP和VLAN,建立NVE隧道并指定源和目标VTEP地址。最后,通过PING测试验证了VXLAN配置的有效性。

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

实验拓扑

实验需求:


        采用静态方式部署VXLAN,实现同一子网内终端的互访
        静态方式是先有数据,然后才去学习转发表(MAC)

1、部署Underlay网络,部署3层的OSPF(华为支持的Underlay只有OSPF)


Leaf1:

ospf 10 router-id 1.1.1.1
 area 0.0.0.0
 
 interface LoopBack0
 ip address 1.1.1.1 255.255.255.255
 ospf enable 10 area 0.0.0.0
 
 interface GE1/0/0
 undo portswitch
 undo shutdown
 ip address 13.13.13.1 255.255.255.0
 ospf enable 10 area 0.0.0.0




Spine:

ospf 10 router-id 3.3.3.3
 area 0.0.0.0
 
 interface LoopBack0
 ip address 3.3.3.3 255.255.255.255
 ospf enable 10 area 0.0.0.0
 
 interface GE1/0/0
 undo portswitch
 undo shutdown
 ip address 13.13.13.3 255.255.255.0
 ospf enable 10 area 0.0.0.0
 
 interface GE1/0/1
 undo portswitch
 undo shutdown
 ip address 23.23.23.3 255.255.255.0
 ospf enable 10 area 0.0.0.0



Leaf-2:

ospf 10 router-id 2.2.2.2
area 0.0.0.0

interface LoopBack0
ip address 2.2.2.2 255.255.255.255
ospf enable 10 area 0.0.0.0

interface GE1/0/1
undo portswitch
undo shutdown
ip address 23.23.23.2 255.255.255.0
ospf enable 10 area 0.0.0.0

2、在Edge上配置业务接入点


        在NVE设备上配置VAP,虚拟接入点,作为VXLAn业务接入的设备

Leaf1:

bridge-domain 10                   
 vxlan vni 10                        //VNI是2层的VNI,桥接域ID域VNI需要一一对应

 
 [Leaf2-GE1/0/2]undo shutdown       //子接口需要UP首先物理接口得开启
 
interface GE1/0/2.10 mode l2         //接口使能2层子接口
 encapsulation dot1q vid 10          //封装VLAN
 bridge-domain 10                    //绑定桥接域ID


Leaf2:

bridge-domain 10
 vxlan vni 10

 
 [Leaf2-GE1/0/2]undo shutdown 
 
interface GE1/0/2.10 mode l2
 encapsulation dot1q vid 10
 bridge-domain 10



 


3、配置NVE隧道


Leaf1:

interface Nve1       //创建NVE隧道(最多两个隧道)
source 1.1.1.1       //定义原VTEP地址
vni 10 head-end peer-list 2.2.2.2      //静态指目的VTEP地址

Leaf2:

interface Nve1
source 2.2.2.2
vni 10 head-end peer-list 1.1.1.1


查看状态

[Leaf1]dis vxlan tunnel            //查看隧道建立状态
Number of vxlan tunnel : 1
Tunnel ID   Source                Destination           State  Type     Uptime
4026531841  1.1.1.1               2.2.2.2               up     static   00:02:47

[Leaf1]dis vxlan vni 10 verbose 
    BD ID                  : 10
    State                  : up
    NVE                    : 18
    Source Address         : 1.1.1.1
    Source IPv6 Address    : -
    UDP Port               : 4789
    BUM Mode               : head-end
    Group Address          : -
    Peer List              : 2.2.2.2 
    IPv6 Peer List         : -



PING测试:


PC>ping 172.16.1.2
Ping 172.16.1.2: 32 data bytes, Press Ctrl_C to break
From 172.16.1.2: bytes=32 seq=1 ttl=128 time=94 ms
From 172.16.1.2: bytes=32 seq=2 ttl=128 time=46 ms
From 172.16.1.2: bytes=32 seq=3 ttl=128 time=47 ms
From 172.16.1.2: bytes=32 seq=4 ttl=128 time=78 ms
From 172.16.1.2: bytes=32 seq=5 ttl=128 time=79 ms

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值