实验要求:
1.R4为ISP,所链接的所有物理接口为公有网段,任意指定ip即可
2.R1-2-3 构建一个星形结构的MGRE结构,其中R1为中心点,假设R1的公有ip为固定地址
3.R1-5-6 构建另一个全连网状的MGRE网络,其中R1/5均为中心区域
4.使用OSPF实现整个私有网络的互通,同时所有Pc可以正常访问R4的环回
实验配置:
R1:
[R1]int g0/0/0
[R1-GigabitEthernete0/0/0]ip add
[R1-GigabitEthernete0/0/0]ip address 192.168.1.1 24
[R1-GigabitEthernete/e/0]q
[R1]int g0/0/2
[R1-GigabitEthernet0/0/2]ip add
[R1-GigabitEthernet0/0/2]ip address 14.1.1.1 24
[R1-GigabitEthernet0/0/2]q
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add
[R1-GigabitEthernet0/0/1]ip address 41.1.1.1 24
[R1]ip rou
[R1]ip route-s
[R1]ip route-static 0.0.0.0 0 14.1.1.4
[R1]ip route-static 0.0.0.0 0 41.1.1.4
[R1]acl 2000
[R1-acl-basic-2000]rule 1 pe
[R1-acl-basic-2000]rule 1 permit so
[R1-acl-basic-2000]rule 1 permit source any
[R1-acl-basic-2000]int g0/0/2
[R1-GigabitEthernet0/0/2]nat out
[R1-GigabitEthernet0/0/2]nat outbound 2000
[R1-GigabitEthernet0/0/2]int g0/0/1
[R1-GigabitEthernet0/0/1]nat out
[R1-GigabitEthernet0/0/1]nat outbound 2000
[R1]int Tunnel 0/0/0
[R1-TunneL0/0/0]ip add
[R1-TunneL0/0/0]ip address 10.1.1.1 24
[R1-TunneL0/0/0]tu
[R1-TunneL0/0/0]tunnel-protocol gre p2mp
[R1-TunneL0/0/0]so
[R1-TunneL0/0/0]source 41.1.1.1
[R1-TunneL0/0/0]nhrp ent
[R1-TunneL0/0/0]nhrp entry mu
[R1-TunneL0/0/0]nhrp entry multicast dy
[R1-TunneL0/0/0]nhrp entry multicast dynamic
[R1-TunneL0/0/0]nhrp ne
[R1-TunneL0/0/0]nhrp network-id 100
[R1]ospf router-id 1.1.1.1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]net
[R1-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]net
[R1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255
[R1]int Tunnel 0/0/0
[R1-TunneL0/0/0]ospf net
[R1-TunneL0/0/0]ospf network-type br
[R1-TunneL0/0/0]ospf network-type broadcast
[R1]int TunneL 0/0/1
[R1-TunneL0/0/1]ip add
[R1-TunneL0/0/1]ip address 10.1.2.1 24