图中路由器R1主要配置如下(R2类似):
#
interface Tunnel0/0/1
ip address 1.1.1.1 255.255.255.255 //gre over ipsec with ospf时需与对端同网段
tunnel-protocol gre
source N.1
destination Y.1
#
ip route-static 0 N.2 // 0代表0.0.0.0 0
ip route-static B.0 Tunnel0/0/1 // B.0代表B.0 255.255.255.0或B.0/24