1.topo图如下
2.配置思路
1.配置IP地址
2.配置静态路由
3.配置GRE隧道
4.验证配置
3.配置部分
3.1配置IP地址
AR1配置的IP地址
AR2配置的IP地址
AR3 配置的IP地址
3.2配置静态路由
AR1
[AR1]ip route-static 0.0.0.0 0.0.0.0 12.1.1.2
AR3
[AR3]ip route-static 0.0.0.0 0.0.0.0 23.1.1.2
3.3配置GRE隧道
AR1的配置
[AR1]interface Tunnel 0/0/0 ##进入隧道t0/0/0口
[AR1-Tunnel0/0/0] tunnel-protocol gre ##配置隧道协议为GRE
[AR1-Tunnel0/0/0] source 12.1.1.1 ##指定源地址
[AR1-Tunnel0/0/0] destination 23.1.1.3 ##指定对方地址
[AR1]ip route-static 2.2.2.2 255.255.255.255 Tunnel0/0/0 ##将流量引入到t0/0/0口
AR3的配置
[AR3]interface Tunnel 0/0/0 ##进入隧道t0/0/0口
[AR3-Tunnel0/0/0] tunnel-protocol gre
[AR3-Tunnel0/0/0] source 23.1.1.3
[AR3-Tunnel0/0/0] destination 12.1.1.1
[AR3]ip route-static 1.1.1.1 255.255.255.255 Tunnel0/0/0
4.验证
查看隧道接口信息