两台交换机配置VXLAN隧道,实现相同网段两台PC之间的互访
IPV4:
拓扑如下:
配置如下
配置基础IP地址:,完成基本链路通信
PC1
PC2
SW01
以下是SW01的交换机配置
Please configure the login password (8-16)
Enter Password:
Confirm Password:
Info: Save the password now. Please wait for a moment.
Info: The max number of VTY users is 5, the number of current VTY users online is 0, and total number of terminal users online is 1.
The current login time is 2024-07-28 12:21:27.
<HUAWEI>sys
Enter system view, return user view with return command.
[~HUAWEI]sysname SW01 //修改设备的主机名
[*HUAWEI]commit
[~SW01]
[~SW01]int loopback 1 //添加loopback接口
[*SW01-LoopBack1]ip address 1.1.1.1 32 配置loopback接口IP地址,后续充当VTEP的地址
[*SW01-LoopBack1]quit
[*SW01]int 10GE1/0/1
[*SW01-GE1/0/1]undo portswitch //取消二层口,配置三层IP地址
[*SW01-GE1/0/1]ip address 10.0.0.1 30
[*SW01-GE1/0/1]quit
[*SW01]ip route-static 2.2.2.2 32 10.0.0.2 /<