sysname R1
interface GigabitEthernet0/0/0
ip address 202.100.1.1 255.255.255.0
interface LoopBack0
ip address 192.168.4.1 255.255.255.0
interface Tunnel0/0/1
ip address 192.168.1.1 255.255.255.0
tunnel-protocol gre
source 202.100.1.1 //本地公网地址
destination 202.100.2.3 //对端公网地址
ospf 110 router-id 192.168.1.1
area 0.0.0.0
network 192.168.1.1 0.0.0.0
network 192.168.4.1 0.0.0.0
ip route-static 0.0.0.0 0.0.0.0 202.100.1.2
********************************************************************
sysname R2
interface GigabitEthernet0/0/0
ip address 202.100.2.3 255.255.255.0
interface LoopBack0
ip address 192.168.8.3 255.255.255.0
interface Tunnel0/0/1
ip address 192.168.1.2 255.255.255.0
tunnel-protocol gre
source 202.100.2.3 //本地公网地址
destination 202.100.1.1 //对端公网地址
ospf 110 router-id 192.168.1.2
area 0.0.0.0
network 192.168.1.2 0.0.0.0
network 192.168.8.3 0.0.0.0
ip route-static 0.0.0.0 0.0.0.0 202.100.2.2
display tunnel-info all //查看tunnel信息