当前位置:网站首页>静态Vxlan 配置

静态Vxlan 配置

2022-07-07 10:27:00 __Dong

在这里插入图片描述
config

CE1 、CE2

>system-view immediately   ## 输入命令立即设生效,避免输入commit 麻烦
## CE1
配置底层underlay网络
interface GE1/0/0
 undo portswitch
 undo shutdown
 ip add 12.0.0.1 24
 
 int lo0
 ip add 1.1.1.1 24
 
 
 ospf 1
 are 0
 
 int G1/0/0
 ospf enable are 0
 int  lo0
 ospf enable are 0

##CE2
 CE2
 
 interface GE1/0/0
 undo portswitch
 undo shutdown
 ip address 12.0.0.2 255.255.255.0
 ospf enable 1 area 0.0.0.0
 
 interface LoopBack0
 ip address 2.2.2.2 255.255.255.0
 ospf enable 1 area 0.0.0.0

ospf 1
 area 0.0.0.0
 

SW1、SW2


##SW1
vlan batch 10
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094

interface GigabitEthernet0/0/2
 port link-type access
 port default vlan 10

##SW2
vlan batch 20
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094

interface GigabitEthernet0/0/2
 port link-type access
 port default vlan 20

配置vxlan

##SW1
 bridge-domain 10
 vxlan vni 10
 
 interface GE1/0/1.1 mode l2
 encapsulation dot1q vid 10            ## vlan id为10 的数据包允许进入隧道
 bridge-domain 10
 
 interface Nve1
 source 1.1.1.1
 vni 10 head-end peer-list 2.2.2.2

##SW2
 bridge-domain 10
 vxlan vni 10
 
 interface GE1/0/1.1 mode l2
 encapsulation dot1q vid 20              ## vlan id为20 的数据包允许进入隧道
 bridge-domain 10
 
 interface Nve1
 source 2.2.2.2
 vni 10 head-end peer-list 1.1.1.1

测试:
在这里插入图片描述

原网站

版权声明
本文为[__Dong]所创,转载请带上原文链接,感谢
https://blog.csdn.net/IO_print/article/details/125548452