一,添加ip地址
二,配置NAT,各个PC可以访问ISP环回
(1)
[R1]acl 2000
[R1-acl-basic-2000]rule 1 permit source any各个路由器皆如此配置
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]nat outbound 2000
[R1-GigabitEthernet0/0/1]int g0/0/2
[R1-GigabitEthernet0/0/2]nat outbound 2000R1两条通道,配两次
(2)配置缺省
[R1]ip route-static 0.0.0.0 0 12.1.1.2
[R1]ip route-static 0.0.0.0 0 21.1.1.2[R3]ip route-static 0.0.0.0 0 32.1.1.2
[R4]ip route-static 0.0.0.0 0 42.1.1.2
[R5]ip route-static 0.0.0.0 0 52.1.1.2
[R6]ip route-static 0.0.0.0 0 62.1.1.2
三R1.R3.R4星型结构MGRE网络
R1
[R1-Tunnel0/0/0]ip add 10.1.1.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]source 12.1.1.1
Jul 22 2022 14:32:47-08:00 R1 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[R1-Tunnel0/0/0]nhrp entry multicast dynamic
[R1-Tunnel0/0/0]nhrp network-id 100
R3
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source 32.1.1.1
Jul 22 2022 14:46:55-08:00 R3 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[R3-Tunnel0/0/0]nhrp entry 10.1.1.1 12.1.1.1 register
[R3-Tunnel0/0/0]nhrp network-id 100
R4
[R4-Tunnel0/0/0]tunnel-protocol gre p2mp
[R4-Tunnel0/0/0]source 42.1.1.1[R4-Tunnel0/0/0]nhrp entry 10.1.1.1 12.1.1.1 register
Jul 22 2022 14:48:34-08:00 R4 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[R4-Tunnel0/0/0]nhrp network-id 100
四,R1.R5.R6全链型网络 R1-R5为中心
R1
[R1]int t 0/0/01
[R1-Tunnel0/0/1]ip add 10.1.2.1 24
[R1-Tunnel0/0/1]tunnel-protocol gre p2mp
[R1-Tunnel0/0/1]source 21.1.1.1
Jul 22 2022 16:03:17-08:00 R1 %%01IFNET/4/LINK_STATE(l)[4]:The line protocol IP
on the interface Tunnel0/0/1 has entered the UP state.
[R1-Tunnel0/0/1]
[R1-Tunnel0/0/1]nhrp entry multicast dynamic
[R1-Tunnel0/0/1]nhrp network-id 101
[R1-Tunnel0/0/1]nhrp entry 10.1.2.2 52.1.1.1 register -------与R5相互注册
R5
[R5]int t0/0/1
[R5-Tunnel0/0/1]ip add 10.1.2.2 24
[R5-Tunnel0/0/1]tunnel-protocol gre p2mp
[R5-Tunnel0/0/1]source 52.1.1.1
Jul 22 2022 16:05:09-08:00 R5 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface Tunnel0/0/1 has entered the UP state.
[R5-Tunnel0/0/1]
[R5-Tunnel0/0/1]nhrp entry multicast dynamic
[R5-Tunnel0/0/1]nhrp network-id 101
[R5-Tunnel0/0/1]nhrp entry 10.1.2.1 21.1.1.1 register ----与R1相互注册
R6
[R6]int t0/0/1
[R6-Tunnel0/0/1]ip add 10.1.2.3 24
[R6-Tunnel0/0/1]tunnel-protocol gre p2mp
[R6-Tunnel0/0/1]source 62.1.1.1
Jul 22 2022 16:06:02-08:00 R6 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface Tunnel0/0/1 has entered the UP state.
[R6-Tunnel0/0/1]
[R6-Tunnel0/0/1]nhrp entry 10.1.2.1 21.1.1.1 register
[R6-Tunnel0/0/1]nhrp entry 10.1.2.2 52.1.1.1 register
[R6-Tunnel0/0/1]nhrp network-id 101
五,将各个接口的类型改为广播
[R6-Tunnel0/0/1]ospf network-type broadcast
每个路由器对应的接口这样改
六,OSPF配置
R1-3-4为ospf1 0区域 宣告完毕
R1-5-6为OSPF2 0区域 宣告完毕
R1上双向重发布
【ospf1】improt-route ospf2
【ospf2】improt-route ospf1
---------最后互通失败 是的 老师 ,我没做出来