[{"createTime":1735734952000,"id":1,"img":"hwy_ms_500_252.jpeg","link":"https://activity.huaweicloud.com/cps.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905","name":"华为云秒杀","status":9,"txt":"华为云38元秒杀","type":1,"updateTime":1735747411000,"userId":3},{"createTime":1736173885000,"id":2,"img":"txy_480_300.png","link":"https://cloud.tencent.com/act/cps/redirect?redirect=1077&cps_key=edb15096bfff75effaaa8c8bb66138bd&from=console","name":"腾讯云秒杀","status":9,"txt":"腾讯云限量秒杀","type":1,"updateTime":1736173885000,"userId":3},{"createTime":1736177492000,"id":3,"img":"aly_251_140.png","link":"https://www.aliyun.com/minisite/goods?userCode=pwp8kmv3","memo":"","name":"阿里云","status":9,"txt":"阿里云2折起","type":1,"updateTime":1736177492000,"userId":3},{"createTime":1735660800000,"id":4,"img":"vultr_560_300.png","link":"https://www.vultr.com/?ref=9603742-8H","name":"Vultr","status":9,"txt":"Vultr送$100","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":5,"img":"jdy_663_320.jpg","link":"https://3.cn/2ay1-e5t","name":"京东云","status":9,"txt":"京东云特惠专区","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":6,"img":"new_ads.png","link":"https://www.iodraw.com/ads","name":"发布广告","status":9,"txt":"发布广告","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":7,"img":"yun_910_50.png","link":"https://activity.huaweicloud.com/discount_area_v5/index.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=aXhpYW95YW5nOA===&utm_medium=cps&utm_campaign=201905","name":"底部","status":9,"txt":"高性能云服务器2折起","type":2,"updateTime":1735660800000,"userId":3}]
拓扑
两个部门分别属于VLAN10和VLAN20要实现通过VXLAN跨网段互访
配置思路
1、底层underlay通过OSPF跑通CE1/CE2/CE3
2、配置VXLAN隧道使CE1-CE2搭建一条,CE3-CE2搭建一条
3、CE2上起两端网段的网关VBDIF
4、通过子接口绑定BD接入方式,相对于基于VLAN优势更大
注意点
1、BD与Nve进程仅仅具有本地属性用于本地区分VLAN;
2、vni具有全局属性,通过vni参数,设备选择将决定将报文放入那一条VXLAN隧道;
配置开始
1、底层underlay通过OSPF跑通CE1/CE2/CE3
配置略过,在CE2上查看OSPF邻居
2、配置VXLAN隧道使CE1-CE2搭建一条,CE3-CE2搭建一条
CE1上:
bridge-domain 100 //配置逻辑域
vxlan vni 1000 //指定逻辑域中的vni参数
interface Nve1 //创建NVE进程
source 1.1.1.1 //指源地址
vni 1000 head-end peer-list 2.2.2.2 //开启头部同步能力并指出对端地址
CE3上:
bridge-domain 200
vxlan vni 2000
interface Nve1
source 3.3.3.3
vni 2000 head-end peer-list 2.2.2.2
CE2上:
bridge-domain 100
vxlan vni 1000
bridge-domain 200
vxlan vni 2000
interface Nve1
source 2.2.2.2
vni 1000 head-end peer-list 1.1.1.1
vni 2000 head-end peer-list 3.3.3.3
CE2上查看VXLAN 隧道状态:
3、CE2上起两端网段的网关VBDIF
interface Vbdif100 //逻辑广播域100的网关
ip address 10.0.0.254 255.255.255.0
interface Vbdif200 //逻辑广播域200的网关
ip address 10.0.2.254 255.255.255.0
4、通过子接口绑定BD接入方式
CE1上:
interface GE1/0/1.1 mode l2 //进二层子接口
encapsulation dot1q vid 10 //dot1q封装VLAN
bridge-domain 100 //接口绑定逻辑域
CE3上:
interface GE1/0/1.1 mode l2
encapsulation dot1q vid 20
bridge-domain 200
SW1或SW2与设备相连接口上打trunk,与PC打ACCESS
测试
PC1上看是否能与PC2通信
CE2 G1/0/0口抓包
可以看见在原始的IP报文前面又封装了一层IP地址和MAC地址
打开外层封装的包头可以看见是协议是UDP
打开VXLAN标识可以看到VNI标签为1000