综合大实验

1、R4为ISP,其上只配置IP地址;R4与其他所直连设备间均使用公有IP;
2、R3-R5、R6、R7为MGRE环境,R3为中心站点;
3、整个OSPF环境IP基于172.16.0.0/16划分;除了R12有两个环回,其他路由器均有一个环回IP
4、所有设备均可访问R4的环回;
5、减少LSA的更新量,加快收敛,保障更新安全;
6、全网可达;

1.IP配置

[r6]int g0/0/0
[r6-GigabitEthernet0/0/0]ip add 172.16.65.1 30
[r6-GigabitEthernet0/0/0]int s4/0/0
[r6-Serial4/0/0]ip add 46.0.0.6 24
[r7]int g0/0/1
[r7-GigabitEthernet0/0/1]ip add 172.16.97.1 30
[r7]int g0/0/0
[r7-GigabitEthernet0/0/0]ip add 47.0.0.7 24
[r7-GigabitEthernet0/0/0]int l0
[r7-LoopBack0]ip add 172.16.5.7 24
[r8]int g0/0/0
[r8-GigabitEthernet0/0/0]ip add 172.16.97.2 30
[r8-GigabitEthernet0/0/0]int g0/0/1
[r8-GigabitEthernet0/0/1]ip add 172.16.97.5 30
[r8-GigabitEthernet0/0/1]int l0
[r8-LoopBack0]ip add 172.16.98.8 24
[r9]int g0/0/0
[r9-GigabitEthernet0/0/0]ip add 172.16.97.6 30
[r9-GigabitEthernet0/0/0]int g0/0/1
[r9-GigabitEthernet0/0/1]ip add 172.16.129.1 30
[r9-GigabitEthernet0/0/1]int l0
[r9-LoopBack0]ip add 172.16.130.9 24
[r10]int g0/0/0
[r10-GigabitEthernet0/0/0]ip add 172.16.129.2 30
[r10-GigabitEthernet0/0/0]int l0
[r10-LoopBack0]ip add 172.16.131.10 24
[r11]int g0/0/0
[r11-GigabitEthernet0/0/0]ip add 172.16.65.2 30
[r11-GigabitEthernet0/0/0]int g0/0/1
[r11-GigabitEthernet0/0/1]ip add 172.16.65.5 30
[r11-GigabitEthernet0/0/1]int l0
[r11-LoopBack0]ip add 172.16.66.11 24
[r12]int g0/0/0
[r12-GigabitEthernet0/0/0]ip add 172.16.65.6 30
[r12-GigabitEthernet0/0/0]int l0
[r12-LoopBack0]ip add 172.16.160.12 24
[r12-LoopBack0]int l1
[r12-LoopBack1]ip add 172.16.161.12 24

2.配路由环回

[r3]ip route-static 0.0.0.0 0 34.0.0.4

[r5]ip route-static 0.0.0.0 0 45.0.0.4

[r6]ip route-static 0.0.0.0 0 46.0.0.4

[r7]ip route-static 0.0.0.0 0 47.0.0.4

[r1]ospf 1 rou	
[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]a 1
[r1-ospf-1-area-0.0.0.1]ne 0.0.0.0 255.255.255.255
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]a 1
[r2-ospf-1-area-0.0.0.1]ne 0.0.0.0 255.255.255.255
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]a 1
[r3-ospf-1-area-0.0.0.1]ne 172.16.36.0 0.0.0.255
[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]a 0
[r5-ospf-1-area-0.0.0.0]ne 172..16.3.0 0.0.0.255
[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]a 0
[r6-ospf-1-area-0.0.0.0]ne 172.16.4.0 0.0.0.255
[r7]ospf 1 router-id 7.7.7.7
[r7-ospf-1]a 0
[r7-ospf-1-area-0.0.0.0]ne 172.16.5.0 0.0.0.255
[r11]ospf 1 router-id 11.11.11.11
[r11-ospf-1]a 2
[r11-ospf-1-area-0.0.0.2]ne 0.0.0.0 255.255.255.255
[r12]ospf 1 router-id 12.12.12.12
[r12-ospf-1]a 2
[r12-ospf-1-area-0.0.0.2]ne 172.16.65.6 0.0.0.0
[r12]rip 1
[r12-rip-1]v 2
[r12-rip-1]undo su	
[r12-rip-1]undo summary 
[r12-rip-1]network 172.16.0.0
[r12]ospf 1	
[r12-ospf-1]import-route rip

检查是否通

[r7]ospf 1
[r7-ospf-1]
[r7-ospf-1]a 3
[r7-ospf-1-area-0.0.0.3]ne 172.16.97.1 0.0.0.0
[r8]ospf 1 router-id 8.8.8.8
[r8-ospf-1]a 3
[r8-ospf-1-area-0.0.0.3]ne 0.0.0.0 255.255.255.255
[r9]ospf 1 router-id 9.9.9.9
[r9-ospf-1]a 3
[r9-ospf-1-area-0.0.0.3]ne 172.16.97.6 0.0.0.0
[r9-ospf-1-area-0.0.0.3]q
[r9-ospf-1]q	
[r9]ospf 2 router-id 9.9.9.9
[r9-ospf-2]a 4
[r9-ospf-2-area-0.0.0.4]ne 172.16.129.1 0.0.0.0
[r9-ospf-2-area-0.0.0.4]ne 172.16.130.0 0.0.0.255
[r10]ospf 2 router-id 10.10.10.10
[r10-ospf-2]a 4
[r10-ospf-2-area-0.0.0.4]ne 0.0.0.0 255.255.255.255

看下邻居情况 

配置公网私网互通

[AR3]int t0/0/0
[AR3-Tunnel0/0/0]ip add 172.16.6.3 24

[AR3-Tunnel0/0/0]tunnel-protocol gre p2mp

[AR3-Tunnel0/0/0]source s4/0/0
[AR3-Tunnel0/0/0]nhrp network-id 100
[AR3-Tunnel0/0/0]nhrp entry multicast dynamic(伪广播)

[AR5]int t 0/0/0
[AR5-Tunnel0/0/0]ip add 172.16.6.5 24
[AR5-Tunnel0/0/0]tunnel-protocol gre p2mp

[AR5-Tunnel0/0/0]source s4/0/0
[AR5-Tunnel0/0/0]nhrp network-id 100
[AR5-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 register

[AR6]int t 0/0/0
[AR6-Tunnel0/0/0]ip add 172.16.6.6 24
[AR6-Tunnel0/0/0]tunnel-protocol gre p2mp

[AR6-Tunnel0/0/0]source s4/0/0
[AR6-Tunnel0/0/0]nhrp network-id 100
[AR6-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 register

[AR7]int t 0/0/0
[AR7-Tunnel0/0/0]ip add 172.16.6.7 24
[AR7-Tunnel0/0/0]tunnel-protocol gre p2mp

[AR7-Tunnel0/0/0]source s4/0/0
[AR7-Tunnel0/0/0]nhrp network-id 100
[AR7-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 register

[AR3]ospf 1 
[AR3-ospf-1]a 0 
[AR3-ospf-1-area-0.0.0.0]network 172.16.6.0 0.0.0.255

[AR5]ospf 1
[AR5-ospf-1]a 0  
[AR5-ospf-1-area-0.0.0.0]network 172.16.6.0 0.0.0.255
[AR6]ospf 1
[AR6-ospf-1]a 0
[AR6-ospf-1-area-0.0.0.0]network 172.16.6.0 0.0.0.255
[AR7]ospf 1
[AR7-ospf-1]a 0   
[AR7-ospf-1-area-0.0.0.0]network 172.16.6.0 0.0.0.255


[AR3]int t0/0/0 
[AR3-Tunnel0/0/0]ospf network-type broadcast 
[AR4]int t0/0/0 
[AR4-Tunnel0/0/0]ospf network-type broadcast 

[AR5]int t0/0/0 
[AR5-Tunnel0/0/0]ospf network-type broadcast 

[AR5-Tunnel0/0/0]ospf dr-priority 0

[AR6]int t0/0/0 
[AR6-Tunnel0/0/0]ospf network-type broadcast 

[AR6-Tunnel0/0/0]ospf dr-priority 0

[AR7]int t0/0/0 
[AR7-Tunnel0/0/0]ospf network-type broadcast 

[AR7-Tunnel0/0/0]ospf dr-priority 0

[AR9]ospf 1
[AR9-ospf-1]import-route ospf 2
[AR9]ospf 2  
[AR9-ospf-2]import-route ospf 1

测试一下(ping的AR1环回)

 配置Easy ip和缺省来访问AR4的环回(配置下面的路由聚合也能产生缺省)

[AR3]acl 2000 
[AR3-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[AR3]int s4/0/0
[AR3-Serial4/0/0]nat outbound 2000

[AR5]acl 2000
[AR5-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255

[AR5]int s4/0/0  
[AR5-Serial4/0/0]nat outbound 2000

[AR6]acl 2000
[AR6-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255

[AR6]int s4/0/0  
[AR6-Serial4/0/0]nat outbound 2000

[AR7]acl 2000
[AR7-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255

[AR7]int g0/0/0  
[AR7-GigabitEthernet0/0/0]nat outbound 2000

 划分区域做路由聚合来达到减少LSA更新量的目的

[AR1]ospf 1
[AR1-ospf-1]a 1  
[AR1-ospf-1-area-0.0.0.1]stub no-summary 

[AR2]ospf 1
[AR2-ospf-1]a 1  
[AR2-ospf-1-area-0.0.0.1]stub no-summary 

[AR3]ospf 1
[AR3-ospf-1]a 1  
[AR3-ospf-1-area-0.0.0.1]stub no-summary 

[AR6]ospf 1
[AR6-ospf-1]a 2
[AR6-ospf-1-area-0.0.0.2]nssa no-summary
[AR11]ospf 1
[AR11-ospf-1]a 2
[AR11-ospf-1-area-0.0.0.2]nssa no-summary

[AR12]ospf 1
[AR12-ospf-1]a 2
[AR12-ospf-1-area-0.0.0.2]nssa no-summary

[AR7]ospf 1
[AR7-ospf-1]a 3
[AR7-ospf-1-area-0.0.0.3]nssa no-summary
[AR8]ospf 1
[AR8-ospf-1]a 3
[AR8-ospf-1-area-0.0.0.3]nssa no-summary
[AR9]ospf 1
[AR9-ospf-1]a 3
[AR9-ospf-1-area-0.0.0.3]nssa no-summary

测试一下能否ping通AR4的环回

唯独AR10不行,因为跨了一个区域,需要给AR10也配一条缺省或者在AR9上手动下发一条缺省

在AR9手动下发一条缺省 (如果AR9本身没有缺省,则需要加上always)

[AR9]ospf 2 
[AR9-ospf-2]default-route-advertise

测试一下还能否ping通AR4环回 

更改hello时间来加快网络收敛

[AR1]int g0/0/0
[AR1-GigabitEthernet0/0/0]ospf timer hello 5

[AR2]int g0/0/0
[AR2-GigabitEthernet0/0/0]ospf timer hello 5
[AR3]int g0/0/0
[AR3-GigabitEthernet0/0/0]ospf timer hello 5

[AR6]int g0/0/0

[AR6-GigabitEthernet0/0/0]ospf timer hello 5
[AR11]int g0/0/0
[AR11-GigabitEthernet0/0/0]ospf timer hello 5
[AR11-GigabitEthernet0/0/0]int g0/0/1
[AR11-GigabitEthernet0/0/1]ospf timer hello 5

[AR7]int g0/0/1
[AR7-GigabitEthernet0/0/1]ospf timer hello 5
[AR8]int g0/0/0
[AR8-GigabitEthernet0/0/0]ospf timer hello 5
[AR8-GigabitEthernet0/0/0]int g0/0/1
[AR8-GigabitEthernet0/0/1]ospf timer hello 5
[AR9]int g0/0/0
[AR9-GigabitEthernet0/0/0]ospf timer hello 5


[AR9]int g0/0/1
[AR9-GigabitEthernet0/0/1]ospf timer hello 5
[AR10]int g0/0/0
[AR10-GigabitEthernet0/0/0]ospf timer hello 5

再测试一下全网通

通过接口认证或区域认证来达到保障更新安全的目的 

[AR1]ospf 1
[AR1-ospf-1]a 1
[AR1-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 12345
[AR2]ospf 1
[AR2-ospf-1]a 1
[AR2-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 12345
[AR3]ospf 1
[AR3-ospf-1]a 1
[AR3-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 12345

[AR6]ospf 1
[AR6-ospf-1]a 2
[AR6-ospf-1-area-0.0.0.2]authentication-mode md5 1 cipher 12345
[AR11]ospf 1
[AR11-ospf-1]a 2
[AR11-ospf-1-area-0.0.0.2]authentication-mode md5 1 cipher 12345
[AR12]ospf 1
[AR12-ospf-1]a 2
[AR12-ospf-1-area-0.0.0.2]authentication-mode md5 1 cipher 12345

[AR7]ospf 1
[AR7-ospf-1]a 3
[AR7-ospf-1-area-0.0.0.3]authentication-mode md5 1 cipher 12345
[AR8]ospf 1
[AR8-ospf-1]a 3
[AR8-ospf-1-area-0.0.0.3]authentication-mode md5 1 cipher 12345
[AR9]ospf 1
[AR9-ospf-1]a 3
[AR9-ospf-1-area-0.0.0.3]authentication-mode md5 1 cipher 12345
 

[AR9]ospf 1
[AR9-ospf-1]a 4
[AR9-ospf-1-area-0.0.0.4]authentication-mode md5 1 cipher 12345
[AR10]ospf 1
[AR10-ospf-1]a 4
[AR10-ospf-1-area-0.0.0.4]authentication-mode md5 1 cipher 12345

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值