拓扑图
<!--思路:在R0和R1上做gre隧道-->
R0配置
interface Tunnel 1 //配置GRE隧道模式
ip address 172.16.1.1 255.255.255.0 //配置GRE IP地址
tunnel source FastEthernet0/0 //配置GRE IP源地址
tunnel destination 192.168.1.2 //配置GRE IP目的地址
配置静态路由
ip route 172.16.1.0 255.255.255.0 192.168.1.2 //隧道路由
ip route 192.168.20.0 255.255.255.0 172.16.1.2 //引流
R1配置
nterface Tunnel 1 //配置GRE隧道模式
ip address 172.16.1.2 255.255.255.0 //配置GRE IP地址
tunnel source FastEthernet0/0 //配置GRE IP源地址
tunnel destination 192.168.1.1 //配置GRE IP目的地址
配置静态路由
ip route 172.16.1.0 255.255.255.0 192.168.1.1 //隧道路由
ip route 192.168.10.0 255.255.255.0 172.16.1.1 //引流