OSPF*MGRE
一:实验拓扑
实验目的:
实验分析:
- 规划物理接口IP地址,配置环回接口ip地址
- 左边启动ospf 10,在r3上配置下发缺省路由(此时左边可达公网isp)
- 右边先对r6,r7,r8,r9,r5五台设备建立MGRE环境,由于r8不能动态路由协议,所以需要手动配置静态路由
- 右边启动ospf 1,在r5上配置下发缺省路由(此时右边可达公网)
- 在r3和r5 接口上配置GRE环境,通过tunel写静态路由(此时左边可达右边)
路由器配置:
ospf-10
[r1]ospf 10
[r1-ospf-10]area 0
[r1-ospf-10-area-0.0.0.0]network 192.168.1.1 0.0.0.0
[r2]ospf 10
[r2-ospf-10]area 10
[r2-ospf-10-area-0.0.0.10]network 192.168.1.2 0.0.0.0[r3]ospf 10
[r3-ospf-10]area 0
[r3-ospf-10-area-0.0.0.0]network 192.168.1.3 0.0.0.0
[r3-ospf-10-area-0.0.0.0]network 34.0.0.3 0.0.0.0[r3]acl 2000
[r3-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r3-acl-basic-2000]q
[r3]int g 0/0/1
[r3-GigabitEthernet0/0/1]nat outbound 2000[r1]ip route-static 0.0.0.0 0 34.0.0.4
[r2]ip route-static 0.0.0.0 0 34.0.0.4
[r3]ip route-static 0.0.0.0 0 34.0.0.4
OSPF-1*MGRE:
[r6]int Tunnel 0/0/0
[r6-Tunnel0/0/0]ip add 192.168.5.6 24
[r6-Tunnel0/0/0]tunnel-protocol gre p2mp
[r6-Tunnel0/0/0]source 68.0.0.6
[r6-Tunnel0/0/0]nhrp entry muticast dynamic
[r7]int Tunnel 0/0/0
[r7-Tunnel0/0/0]ip add 192.168.5.7 24
[r7-Tunnel0/0/0]tunnel-protocol gre p2mp
[r7-Tunnel0/0/0]source g0/0/0
[r7-Tunnel0/0/0]nhrp entry 192.168.5.7 68.0.0.6 register
[r9]int Tunnel 0/0/0
[r9-Tunnel0/0/0]ip add 192.168.5.9 24
[r9-Tunnel0/0/0]tunnel-protocol gre p2mp
[r9-Tunnel0/0/0]source g0/0/0
[r9-Tunnel0/0/0]nhrp entry 192.168.5.9 68.0.0.6 register
[r10]int t0/0/0
[r10-Tunnel0/0/0]ip add 192.168.5.10 24
[r10-Tunnel0/0/0]tunnel-protocol gre p
[r10-Tunnel0/0/0]tunnel-protocol gre p2mp
[r10-Tunnel0/0/0]source g0/0/0
[r10-Tunnel0/0/0]nhrp entry 192.168.5.10 68.0.0.6 register
[r6]ip route-static 78.0.0.0 24 68.0.0.8
[r6]ip route-static 80.0.0.0 24 68.0.0.8
[r6]ip route-static 89.0.0.0 24 68.0.0.8
[r7]ip route-static 68.0.0.0 24 78.0.0.8
[r7]ip route-static 89.0.0.0 24 78.0.0.8
[r7]ip route-static 80.0.0.0 24 78.0.0.8
[r9]ip route-static 68.0.0.0 24 89.0.0.8
[r9]ip route-static 78.0.0.0 24 89.0.0.8
[r9]ip route-static 80.0.0.0 24 89.0.0.8
[r10]ip route-static 68.0.0.0 24 80.0.0.8
[r10]ip route-static 78.0.0.0 24 80.0.0.8
[r10]ip route-static 89.0.0.0 24 80.0.0.8
[r6-ospf-1-area-0.0.0.0]network 192.168.5.6 0.0.0.0
[r6-ospf-1-area-0.0.0.0]network 68.0.0.6 0.0.0.0
[r6-ospf-1-area-0.0.0.0]network 56.0.0.6 0.0.0.0
[r7-ospf-1-area-0.0.0.0]network 192.168.5.7 0.0.0.0
[r7-ospf-1-area-0.0.0.0]network 78.0.0.7 0.0.0.0
[r7-ospf-1-area-0.0.0.0]network 71.0.0.7 0.0.0.0
[r9-ospf-1-area-0.0.0.0]network 192.168.5.9 0.0.0.0
[r9-ospf-1-area-0.0.0.0]net 89.0.0.9 0.0.0.0
[r9-ospf-1-area-0.0.0.0]net 94.0.0.9 0.0.0.0
[r10-ospf-1-area-0.0.0.0]network 192.168.5.10 0.0.0.0
[r10-ospf-1-area-0.0.0.0]network 80.0.0.10 0.0.0.0
[r10-ospf-1-area-0.0.0.0]network 102.0.0.10 0.0.0.0
[r6-Tunnel0/0/0]ospf network-type p2mp
[r7-Tunnel0/0/0]ospf network-type p2mp
[r9-Tunnel0/0/0]ospf network-type p2mp
[r10-Tunnel0/0/0]ospf network-type p2mp
[r5-ospf-1]default-route-advertise
ospf-1 与opsf-10通讯:
[r3]int t0/00/0
[r3-Tunnel0/0/0]ip ad 192.168.5.3 24
[r3-Tunnel0/0/0]tunnel-protocol gre
[r3-Tunnel0/0/0]source 34.0.0.3
[r3-Tunnel0/0/0]description 45.0.0.5
[r5]int t0/0/0
[r5-Tunnel0/0/0]ip ad 192.168.5.5 24[
[r5-Tunnel0/0/0]tunnel-protocol gre
[r5-Tunnel0/0/0]source 45.0.0.5
[r5-Tunnel0/0/0]description 34.0.0.3
要想通讯到另外一边,配置一条下一跳为隧道接口ip的路由即可
[r3]ip route-static 71.0.0.0 24 192.168.5.5