按照如图划分网段:
配置命令:(例如r2)
[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip add
[r2-GigabitEthernet0/0/0]ip address 26.0.0.1 24——接口配置IP
[r2-GigabitEthernet0/0/0]
Jan 11 2022 22:08:53-08:00 r2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r2-GigabitEthernet0/0/0]int l0
[r2-LoopBack0]ip add
[r2-LoopBack0]ip address 192.168.2.1 24——环回配置IP
[r2-LoopBack0]q
[r2]ip route-
[r2]ip route-static 0.0.0.0 0 26.0.0.2——配置缺省
[r2]
[r2]int t 0/0/0——创建虚拟端口
[r2-Tunnel0/0/0]ip add
[r2-Tunnel0/0/0]ip address 10.0.0.2 24——配置IP地址
[r2-Tunnel0/0/0]tu
[r2-Tunnel0/0/0]tunnel-protocol g
[r2-Tunnel0/0/0]tunnel-protocol gre p
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp ——认证类型
[r2-Tunnel0/0/0]sou
[r2-Tunnel0/0/0]source g
[r2-Tunnel0/0/0]source GigabitEthernet 0/0/0