VXLAN(Virtual eXtensible Local Area Network,虚拟扩展局域网)是一种网络虚拟化技术,可以改进大型云计算在部署时的扩展问题,是对 VLAN 的一种扩展。VXLAN 是一种功能强大的工具,可以穿透三层网络对二层进行扩展。它可通过封装流量并将其扩展到第三层网关,以此来解决 VMS(虚拟内存系统)的可移植性限制,使其可以访问在外部 IP 子网上的服务器。
[Huawei]vlan 10
[Huawei-vlan2]vlan 20
[Huawei-vlan20]qu
[Huawei]interface g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type trunk
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/1]qu
[Huawei]interface g0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type access
[Huawei-GigabitEthernet0/0/2]port default vlan 10
[Huawei-GigabitEthernet0/0/2]interface g0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type access
[Huawei-GigabitEthernet0/0/3]port default vlan 20
[Huawei]vlan batch 10 20
[Huawei]interface g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type trunk
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/1]interface g0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type access
[Huawei-GigabitEthernet0/0/2]port default vlan 10
[Huawei-GigabitEthernet0/0/2]interface g0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type access
[Huawei-GigabitEthernet0/0/3]port default vlan 20
[*HUAWEI]bridge-domain 10 //标识一个二层广播域,BD和VNI 1:1映射(VNI在BD里配置)
[*HUAWEI-bd10]vxlan vni 10
[*HUAWEI-bd10]q
[*HUAWEI]bridge-domain 20
[*HUAWEI-bd20]vxlan vni 20
[*HUAWEI-bd20]q
[*HUAWEI]commit
[~HUAWEI]interface g1/0/1.10 mode l2
[*HUAWEI-GE1/0/1.10]encapsulation dot1q vid 10
[*HUAWEI-GE1/0/1.10]bridge-domain 10
[*HUAWEI-GE1/0/1.10]q
[*HUAWEI]commit
[~HUAWEI]interface g1/0/1.20 mode l2
[*HUAWEI-GE1/0/1.20]encapsulation dot1q vid 20
[*HUAWEI-GE1/0/1.20]bridge-domain 20
[*HUAWEI-GE1/0/1.20]q
[*HUAWEI]commit
[~HUAWEI]interface g1/0/1
[~HUAWEI-GE1/0/1]undo shutdown
[*HUAWEI-GE1/0/1]commit
[~HUAWEI-GE1/0/1]qu
[~HUAWEI]interface loopback 0
[*HUAWEI-LoopBack0]ip add 11.1.1.1 24
[*HUAWEI]interface g1/0/0
[*HUAWEI-GE1/0/0]undo shutdown
[*HUAWEI-GE1/0/0]undo portswitch
[*HUAWEI-GE1/0/0]ip add 12.1.1.2 24
[*HUAWEI-GE1/0/0]qu
[*HUAWEI]ospf 1 router-id 11.1.1.1
[*HUAWEI-ospf-1]area 0
[*HUAWEI-ospf-1-area-0.0.0.0]network 11.1.1.0 0.0.0.255
[~HUAWEI-ospf-1-area-0.0.0.0]network 12.1.1.0 0.0.0.255
[*HUAWEI-ospf-1-area-0.0.0.0]commit
[~HUAWEI]interface NVE 1
[*HUAWEI-Nve1]source 11.1.1.1
[*HUAWEI-Nve1]vni 10 head-end peer-list 22.2.2.2
[*HUAWEI-Nve1]vni 20 head-end peer-list 22.2.2.2
[~HUAWEI]bridge-domain 10
[*HUAWEI-bd10]vxlan vni 10
[*HUAWEI]bridge-domain 20
[*HUAWEI-bd20]vxlan vni 20
[*HUAWEI-bd20]qu
[*HUAWEI]interface g1/0/1.10 mode l2
[*HUAWEI-GE1/0/1.10]encapsulation dot1q vid 10
[*HUAWEI-GE1/0/1.10]qu
[*HUAWEI]interface g1/0/1.20 mode l2
[*HUAWEI-GE1/0/1.20]encapsulation dot1q vid 20
[*HUAWEI-GE1/0/1.20]bridge-domain 20
[*HUAWEI-GE1/0/1.20]interface g1/0/1.10 mode l2
[*HUAWEI-GE1/0/1.10]bridge-domain 10
[*HUAWEI-GE1/0/1.10]qu
[*HUAWEI]interface nve 1
[*HUAWEI-Nve1]source 22.2.2.2
[*HUAWEI-Nve1]vni 10 head-end peer-list 11.1.1.1
[*HUAWEI-Nve1]vni 20 head-end peer-list 11.1.1.1
[*HUAWEI-Nve1]qu
[*HUAWEI]commit
[*HUAWEI]interface loopback 0
[*HUAWEI-LoopBack0]ip add 33.3.3.3 24
[*HUAWEI-LoopBack0]interface g1/0/0
[*HUAWEI-GE1/0/0]undo shutdown
[*HUAWEI-GE1/0/0]undo portswitch
[*HUAWEI-GE1/0/0]ip add 45.1.1.2 24
[*HUAWEI-GE1/0/0]q
[*HUAWEI]commit
[~HUAWEI]ospf 1 router-id 33.3.3.3
[*HUAWEI-ospf-1]area 0
[*HUAWEI-ospf-1-area-0.0.0.0]network 33.3.3.0 0.0.0.255
[*HUAWEI-ospf-1-area-0.0.0.0]network 45.1.1.0 0.0.0.255
[*HUAWEI-ospf-1-area-0.0.0.0]commit
[*HUAWEI]interface Ethernet 1/0/0
[*HUAWEI-Ethernet1/0/0]ip add 12.1.1.1 24
[*HUAWEI-Ethernet1/0/0]interface Ethernet 1/0/1
[*HUAWEI-Ethernet1/0/1]ip add 100.1.1.1 24
[*HUAWEI-Ethernet1/0/1]commit
[~HUAWEI-Ethernet1/0/1]q
[~HUAWEI]interface loopback 0
[*HUAWEI-LoopBack0]ip add 1.1.1.1 24
[*HUAWEI-LoopBack0]commit
[~HUAWEI-LoopBack0]qu
[~HUAWEI]ospf 1 router-id 1.1.1.1
[*HUAWEI-ospf-1]area 0
[*HUAWEI-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[*HUAWEI-ospf-1-area-0.0.0.0]network 12.1.1.0 0.0.0.255
[*HUAWEI-ospf-1-area-0.0.0.0]network 100.1.1.0 0.0.0.255
[*HUAWEI-ospf-1-area-0.0.0.0]commit
[*HUAWEI]interface loopback 0
[*HUAWEI-LoopBack0]ip add 3.3.3.3 24
[*HUAWEI-LoopBack0]interface ethernet 1/0/0
[*HUAWEI-Ethernet1/0/0]ip add 45.1.1.1 24
[*HUAWEI-Ethernet1/0/0]interface ethernet 1/0/1
[*HUAWEI-Ethernet1/0/1]ip add 100.1.1.3 24
[*HUAWEI-Ethernet1/0/1]qu
[*HUAWEI]ospf 1 router-id 3.3.3.3
[*HUAWEI-ospf-1]area 0
[*HUAWEI-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[*HUAWEI-ospf-1-area-0.0.0.0]network 100.1.1.0 0.0.0.255
[*HUAWEI-ospf-1-area-0.0.0.0]network 45.1.1.0 0.0.0.255
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于