


首先配公网缺省路由
ip route-static 0.0.0.0 0.0.0.0 16.1.1.2 ip route-static 0.0.0.0 0.0.0.0 61.1.1.2
然后配星型拓补
[R1]interface Tunnel 0/0/1
[R1-Tunnel0/0/1]ip add 192.168.7.1 24
[R1-Tunnel0/0/1]tunnel-protocol gre p2mp
[R1-Tunnel0/0/1]source 61.1.1.1
[R1-Tunnel0/0/1]nhrp entry multicast dynamic
[R2]interface Tunnel 0/0/1
[R2-Tunnel0/0/1]ip add 192.168.7.2 24
[R2-Tunnel0/0/1]tunnel-protocol gre p2mp
[R2-Tunnel0/0/1]source GigabitEthernet 0/0/0
[R2-Tunnel0/0/1]nhrp entry 192.168.7.1 61.1.1.1 register
然后配全连MGRE
[R1]interface Tunnel 0/0/0
[R1-Tunnel0/0/0]ip add 192.168.6.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]source 16.1.1.1
[R1-Tunnel0/0/0]nhrp entry 192.168.6.4 46.1.1.1 register
[R1-Tunnel0/0/0]nhrp entry 192.168.6.5 56.1.1.1 register
[R4]interface Tunnel 0/0/0
[R4-Tunnel0/0/0]ip add 192.168.6.4 24
[R4-Tunnel0/0/0]tunnel-protocol gre p2mp
[R4-Tunnel0/0/0]source 46.1.1.1
[R4-Tunnel0/0/0]nhrp entry 192.168.6.1 16.1.1.1 register
[R4-Tunnel0/0/0]nhrp entry 192.168.6.5 56.1.1.1 register
然后配ospf
[R1]ospf 1 router-id 1.1.1.1
[R1-ospf-1]ar
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 192.168.6.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 192.168.7.0 0.0.0.255
手工改DR优先级
[R1]interface Tunnel 0/0/0
[R1-Tunnel0/0/0]ospf network-type broadcast
[R1]interface Tunnel 0/0/1
[R1-Tunnel0/0/1]ospf network-type broadcast
[R3]int Tunnel 0/0/1
[R3-Tunnel0/0/1]ospf network-type broadcast
[R3-Tunnel0/0/1]ospf dr-priority 0
[R4]int Tunnel 0/0/0
[R4-Tunnel0/0/0]ospf network-type broadcast

本文详细描述了在一个网络环境中如何配置静态路由、星型拓扑下的GRE隧道、全连接的MGRE隧道,以及OSPF协议的部署,包括DR(DesignatedRouter)的优先级调整。
608

被折叠的 条评论
为什么被折叠?



