概述

VXLAN二层配置_第1张图片

静态方式工作原理

VXLAN二层配置_第2张图片

图例

VXLAN二层配置_第3张图片

配置

system-view
[~HUAWEI]vlan 10
[*HUAWEI-vlan10] name vxlan
[*HUAWEI-vlan10] quit
[*HUAWEI] interface Vlanif10
[*HUAWEI-Vlanif10]ip address 192.168.10.10 24
[*HUAWEI-Vlanif10]quit
[~HUAWEI]interface loopback10
[~HUAWEI-loopback10]ip address 192.168.10.100 32
[~HUAWEI-loopback10]quit
[~HUAWEI] interface nve 1
[*HUAWEI-Nve1] source 192.168.10.100
[*HUAWEI-Nve1] vni 1 head-end peer-list 192.168.10.101
[*HUAWEI-Nve1] vni 100 head-end peer-list 192.168.10.101
[*HUAWEI-Nve1]quit
[*HUAWEI] bridge-domain 100
[*HUAWEI-bd100] l2 binding vlan 100
[*HUAWEI-bd100] vxlan vni 1
[*HUAWEI-bd100]quit
[*HUAWEI] bridge-domain 101
[*HUAWEI-bd101] l2 binding vlan 101
[*HUAWEI-bd101] vxlan vni 101
[*HUAWEI] ip route-static 192.168.10.101 255.255.255.255 Vlanif10 192.168.10.11 permanent


system-view
[~HUAWEI]vlan 10
[*HUAWEI-vlan10] name vxlan
[*HUAWEI-vlan10] quit
[*HUAWEI] interface Vlanif10
[*HUAWEI-Vlanif10]ip address 192.168.10.11 24
[*HUAWEI-Vlanif10]quit
[~HUAWEI]interface loopback10
[~HUAWEI-loopback10]ip address 192.168.10.101 32
[~HUAWEI-loopback10]quit
[~HUAWEI] interface nve 1
[*HUAWEI-Nve1] source 192.168.10.101
[*HUAWEI-Nve1] vni 1 head-end peer-list 192.168.10.100
[*HUAWEI-Nve1] vni 100 head-end peer-list 192.168.10.100
[*HUAWEI-Nve1]quit
[*HUAWEI] bridge-domain 100
[*HUAWEI-bd100] l2 binding vlan 100
[*HUAWEI-bd100] vxlan vni 1
[*HUAWEI-bd100]quit
[*HUAWEI] bridge-domain 101
[*HUAWEI-bd101] l2 binding vlan 101
[*HUAWEI-bd101] vxlan vni 101
[*HUAWEI] ip route-static 192.168.10.100 255.255.255.255 Vlanif10 192.168.10.10 permanent