CE设备配置:
interface ge 1/0/0为下连PC接口:

interface GE 1/0/0.1 mode l2
encapsulation dot1q vid 10

全局模式下配置:
bridge-domain 10
vxlan vni 10
quit

commit (全局模式)

system-view immediately
使上面的配置生效

[HUAWEI]interface GE 1/0/0.1
[HUAWEI-GE1/0/0.1]display this
interface GE1/0/0.1 mode l2
encapsulation dot1q vid 10

[HUAWEI-GE1/0/0.1]bridge-domain 10
[HUAWEI-GE1/0/0.1]quit

[HUAWEI]display current-configuration interface GE 1/0/1
#
interface GE1/0/1
undo portswitch
undo shutdown
ip address 10.0.12.1 255.255.255.0

 


CE2
配置V D 域:

[~Sw_CE3]bridge-domain 10

[*Sw_CE3-bd10]vxlan vni ?
INTEGER<1-16777215> Value of VXLAN network identifier

[*Sw_CE3-bd10]vxlan vni 10
Info: Please disable dynamic ARP learning when the controller is used to deliver
ARP entries.
[*Sw_CE3-bd10]commit
[~Sw_CE3-bd10]qu
==========================================
关联VLAN到VNI:

[~Sw_CE3]interface GE 1/0/0.10 mode l2

[*Sw_CE3-GE1/0/0.10]encapsulation dot1q vid 10

[*Sw_CE3-GE1/0/0.10]display this
#
return
[*Sw_CE3-GE1/0/0.10]bridge-domain 10

[*Sw_CE3-GE1/0/0.10]commit
-------------------------------------------------
[~Sw_CE3-GE1/0/0.10]display this
#
interface GE1/0/0.10 mode l2
encapsulation dot1q vid 10
bridge-domain 10
#
return

[~Sw_CE3]interface GE 1/0/0
[~Sw_CE3-GE1/0/0]undo sh
[~Sw_CE3-GE1/0/0]undo shutdown

-------------------------------------------------------------------
[*Sw_CE3]interface GE 1/0/1

[*Sw_CE3-GE1/0/1]display this
#
interface GE1/0/1
shutdown
#
return

[*Sw_CE3-GE1/0/1]undo shutdown
[*Sw_CE3-GE1/0/1]ip add 10.0.12.2 24
^
Error: Unrecognized command found at '^' position.

[*Sw_CE3-GE1/0/1]undo portswitch
[*Sw_CE3-GE1/0/1]ip add 10.0.12.2 24
[*Sw_CE3-GE1/0/1]disp
[*Sw_CE3-GE1/0/1]display this
#
interface GE1/0/1
shutdown
#
return

[*Sw_CE3-GE1/0/1]commit

[~Sw_CE3-GE1/0/1]display this
#
interface GE1/0/1
undo portswitch
undo shutdown
ip address 10.0.12.2 255.255.255.0
#
return
[~Sw_CE3-GE1/0/1]

两边路由器创建LOO 0环回口,并配置OSPF,发布环回口及互连接口地址:
[*Sw_CE3]interface GE 1/0/1
[*Sw_CE3-GE1/0/1]disp
[*Sw_CE3-GE1/0/1]display this
#
interface GE1/0/1
shutdown
#
return
[*Sw_CE3-GE1/0/1]undo shu
[*Sw_CE3-GE1/0/1]undo shutdown
[*Sw_CE3-GE1/0/1]ip add 10.0.12.2 24
^
Error: Unrecognized command found at '^' position.
[*Sw_CE3-GE1/0/1]undo port sw
[*Sw_CE3-GE1/0/1]undo portsw
[*Sw_CE3-GE1/0/1]undo portswitch ?
<cr>

[*Sw_CE3-GE1/0/1]undo portswitch
[*Sw_CE3-GE1/0/1]ip add 10.0.12.2 24
[*Sw_CE3-GE1/0/1]disp
[*Sw_CE3-GE1/0/1]display this
#
interface GE1/0/1
shutdown
#
return
[*Sw_CE3-GE1/0/1]undo shu
[*Sw_CE3-GE1/0/1]undo shutdown
[*Sw_CE3-GE1/0/1]disp
[*Sw_CE3-GE1/0/1]display this
#
interface GE1/0/1
shutdown
#
return
[*Sw_CE3-GE1/0/1]commit
[~Sw_CE3-GE1/0/1]disp
[~Sw_CE3-GE1/0/1]display this
#
interface GE1/0/1
undo portswitch
undo shutdown
ip address 10.0.12.2 255.255.255.0
#
return
[~Sw_CE3-GE1/0/1]

接下来配置隧道:
[*HUAWEI-Nve1]vni 10 head-end peer-list 10.0.2.2
[*HUAWEI-Nve1]commit

[~HUAWEI-Nve1]display this
#
interface Nve1
source 10.0.1.1
vni 10 head-end peer-list 10.0.2.2
#
return

查看路由:
[~HUAWEI]display vxlan tunnel
Number of vxlan tunnel : 1
Tunnel ID Source Destination State Type Uptime
--------------------------------------------------------------------------------
---
4026531841 10.0.1.1 10.0.2.2 up static 00:01:28

[~HUAWEI]display ip routing-table
Proto: Protocol Pre: Preference
Route Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole
route
------------------------------------------------------------------------------
Routing Table : _public_
Destinations : 9 Routes : 9

Destination/Mask Proto Pre Cost Flags NextHop Interface

10.0.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.0.2.2/32 OSPF 10 1 D 10.0.12.2 GE1/0/1
10.0.12.0/24 Direct 0 0 D 10.0.12.1 GE1/0/1
10.0.12.1/32 Direct 0 0 D 127.0.0.1 GE1/0/1
10.0.12.255/32 Direct 0 0 D 127.0.0.1 GE1/0/1
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
[~HUAWEI]

-----------------------------------
[~Sw_CE3-Nve1]display this
#
interface Nve1
source 10.0.2.2
vni 10 head-end peer-list 10.0.1.1
#
return
[~Sw_CE3-Nve


[~HUAWEI]display vxlan peer
Number of peers : 1
Vni ID Source Destination Type Out Vni ID
-------------------------------------------------------------------------------
10 10.0.1.1 10.0.2.2 static 10

[~HUAWEI]display vxlan vni 10 verbose
BD ID : 10
State : up
NVE : 19
Source Address : 10.0.1.1
Source IPv6 Address : -
UDP Port : 4789
BUM Mode : head-end
Group Address : -
Peer List : 10.0.2.2
IPv6 Peer List : -
[~HUAWEI]

posted on 2022-08-23 17:14  401335990  阅读(530)  评论(0)    收藏  举报