拓扑图

要求:

分析:
1.规划全网各区域的网段,并配置各个设备的ip
1.区域零172.16.0.0/19
R3R4---34.0.0.0/24
R5R4---54.0.0.0/24
R6R4---64.0.0.0/24
R7R4---74.0.0.0/24
MGRE172.16.0.0/24
R4环回172.16.4.0/24
R5环回172.16.1.0/24
R6环回172.16.2.0/24
R7环回172.16.3.0/24
2.区域一172.16.32.0/19
R1R2R3互联172.16.35.0/29
R1环回172.16.32.0/24
R2环回172.16.33.0/24
R3环回172.16.34.0/24
3.区域二172.16.64.0/19
R6R11互联172.16.65.0/30
R11R12互联172.16.65.4/30
R11环回
4.区域三172.16.96.0/19
R7R8互联172.16.97.0/30
R8R9互联172.16.97.4/30
R8环回172.16.96.0/24
5.区域四172.16.128.0/19
R9R10互联172.16.130.0/30
R9环回172.16.128.0/24
R10环回172.16.129.0/24
6.RIP区域
192.168.1.0/24和192.168.2.0/24
2.完成全网的OSPF和RIP配置,以及重发布配置
1.A0各私网设备添加指向R4的缺省路由
2.A0A1A2A3为OSPF1,A4为OSPF2,各设备环回网络类型改为broadcast
3.R9向ospf1重发布ospf2,R12向ospf1重发布rip1
3.R3R5R6R7间配置MGRE,且R3为HUB
- A0各私网设备隧道接口网络类型改为p2mp,且HUB设备R3隧道接口开启伪组播功能,并让R5R6R7等设备放弃dr选举
4.公私网地址转换,确保ping通R4环回
5.优化
1.减少LSA更新量:路由汇总,特殊区域
2.加快收敛:更换收敛更快的网络类型,减少计时器时间
3.保障安全:各设备添加认证
4.防黑洞路由
搭建:
1.ip配置
//R1
#
interface GigabitEthernet0/0/0
ip address 172.16.35.1 255.255.255.248
#
interface LoopBack0
ip address 172.16.32.1 255.255.255.0
ospf network-type broadcast
//R2
#
interface GigabitEthernet0/0/0
ip address 172.16.35.2 255.255.255.248
#
interface LoopBack0
ip address 172.16.33.1 255.255.255.0
ospf network-type broadcast
//R3
#
interface Serial4/0/0
link-protocol ppp
ip address 34.0.0.3 255.255.255.0
#
interface GigabitEthernet0/0/0
ip address 172.16.35.3 255.255.255.248
#
interface LoopBack0
ip address 172.16.34.1 255.255.255.0
ospf network-type broadcast
//R4
#
interface Serial3/0/0
link-protocol ppp
ip address 64.0.0.4 255.255.255.0
#
interface Serial4/0/0
link-protocol ppp
ip address 34.0.0.4 255.255.255.0
#
interface Serial4/0/1
link-protocol ppp
ip address 54.0.0.4 255.255.255.0
#
interface GigabitEthernet0/0/0
ip address 74.0.0.4 255.255.255.0
#
interface LoopBack0
ip address 172.16.4.1 255.255.255.0
............
2.ospf和rip配置
//R1
#
ospf 1 router-id 1.1.1.1
area 0.0.0.1
network 172.16.32.0 0.0.31.255
//R2
#
ospf 1 router-id 2.2.2.2
area 0.0.0.1
network 172.16.32.0 0.0.31.255
//R3
#
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 172.16.0.0 0.0.31.255
area 0.0.0.1
network 172.16.32.0 0.0.31.255
//R5
#
ospf 1 router-id 5.5.5.5
area 0.0.0.0
network 172.16.0.0 0.0.31.255
//R9
#
ospf 1 router-id 9.9.9.9
asbr-summary 172.16.128.0 255.255.224.0
import-route ospf 2
area 0.0.0.3
network 172.16.96.0 0.0.31.255
//R12
#
ospf 1 router-id 12.12.12.12
asbr-summary 192.168.0.0 255.255.252.0
import-route rip 1
area 0.0.0.2
network 172.16.64.0 0.0.31.255
............
3.mgre配置
//R3
#
interface Tunnel0/0/0
ip address 172.16.0.3 255.255.255.0
tunnel-protocol gre p2mp
source 34.0.0.3
ospf network-type p2mp
nhrp entry multicast dynamic
//R5
#
interface Tunnel0/0/0
ip address 172.16.0.5 255.255.255.0
tunnel-protocol gre p2mp
source Serial4/0/0
ospf network-type p2mp
ospf dr-priority 0
nhrp entry 172.16.0.3 34.0.0.3 register
//R6
#
interface Tunnel0/0/0
ip address 172.16.0.6 255.255.255.0
tunnel-protocol gre p2mp
source Serial4/0/0
ospf network-type p2mp
ospf dr-priority 0
nhrp entry 172.16.0.3 34.0.0.3 register
//R7
#
interface Tunnel0/0/0
ip address 172.16.0.7 255.255.255.0
tunnel-protocol gre p2mp
source GigabitEthernet0/0/0
ospf network-type p2mp
ospf dr-priority 0
nhrp entry 172.16.0.3 34.0.0.3 register
4.nat配置
//R3
#
acl number 2000
rule 5 permit source 172.16.0.0 0.0.255.255
#
interface Serial4/0/0
nat outbound 2000
//R5
#
acl number 2000
rule 5 permit source 172.16.0.0 0.0.255.255
#
interface Serial4/0/0
nat outbound 2000
//R6
#
acl number 2000
rule 5 permit source 172.16.0.0 0.0.255.255
#
interface Serial4/0/0
nat outbound 2000
//R7
#
acl number 2000
rule 5 permit source 172.16.0.0 0.0.255.255
#
interface GigabitEthernet0/0/0
nat outbound 2000
5.优化
//R1
#
ospf 1 router-id 1.1.1.1
area 0.0.0.1
network 172.16.32.0 0.0.31.255
stub
//R2
#
ospf 1 router-id 2.2.2.2
area 0.0.0.1
network 172.16.32.0 0.0.31.255
stub
//R3
#
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 172.16.0.0 0.0.31.255
area 0.0.0.1
abr-summary 172.16.32.0 255.255.224.0
network 172.16.32.0 0.0.31.255
stub no-summary
//R6
#
ospf 1 router-id 6.6.6.6
area 0.0.0.0
network 172.16.0.0 0.0.31.255
area 0.0.0.2
abr-summary 172.16.64.0 255.255.224.0
network 172.16.64.0 0.0.31.255
nssa no-summary
//R7
#
ospf 1 router-id 7.7.7.7
area 0.0.0.0
network 172.16.0.0 0.0.31.255
area 0.0.0.3
abr-summary 172.16.96.0 255.255.224.0
network 172.16.96.0 0.0.31.255
nssa no-import-route
//R8
#
ospf 1 router-id 8.8.8.8
area 0.0.0.3
network 172.16.96.0 0.0.31.255
nssa
//R9
#
ospf 1 router-id 9.9.9.9
asbr-summary 172.16.128.0 255.255.224.0
import-route ospf 2
area 0.0.0.3
network 172.16.96.0 0.0.31.255
nssa
//R11
#
ospf 1 router-id 11.11.11.11
area 0.0.0.2
network 172.16.64.0 0.0.31.255
nssa
//R12
#
ospf 1 router-id 12.12.12.12
asbr-summary 192.168.0.0 255.255.252.0
import-route rip 1
area 0.0.0.2
network 172.16.64.0 0.0.31.255
nssa
结果
1.R1ping通R4环回

2.R1ping通R10
3.R1ping通RIP区域网络
