HCIP 第三次作业

一 实验括扑

二、实验需求 


1、R5为ISP,其上只能配置IP地址;R4作为企业边界路由器,
出口公网地址需要通过ppp协议获取,并进行chap认证
2、整个0SPF环境IP基于172.16.0.0/16划分;
3、所有设备均可访问R5的环回;
4、减少LSA的更新量,加快收敛,保障更新安全;
5、全网可达

三、实验步骤

配置IP地址和环回路由

r1

[r1]int g0/0/0                  
[r1-GigabitEthernet0/0/0]ip ad 172.16.1.1 24
[r1-GigabitEthernet0/0/0]int l 0
[r1-LoopBack0]ip ad 1.1.1.1 24

r2

[r2-GigabitEthernet0/0/0]ip address 172.16.1.2 24
[r2-LoopBack0]ip address 2.2.2.2 24

r3

[r3-GigabitEthernet0/0/0]ip address 172.16.1.3 24
[r3-GigabitEthernet0/0/1]ip address 172.16.0.1 26
[r3-LoopBack0]ip address 3.3.3.3 24

r4

[r4-GigabitEthernet0/0/0]ip address 172.16.0.129 26
[r4-GigabitEthernet0/0/1]ip address 172.16.0.2 26
[r4-GigabitEthernet0/0/2]ip address 172.16.0.65 26

r5

[r5-Serial4/0/0]ip address 100.0.0.1 24
[r5-LoopBack0]ip address 5.5.5.5 24

r6

[r6-GigabitEthernet0/0/0]ip address 172.16.0.66 26
[r6-GigabitEthernet0/0/1]ip address 172.16.2.1 25

r7

[r7-GigabitEthernet0/0/0]ip address 172.16.0.130 26
[r7-GigabitEthernet0/0/1]ip address 172.16.3.1 25

r8

[r8-GigabitEthernet0/0/0]ip address 172.16.3.2 25
[r8-GigabitEthernet0/0/1]ip address 172.16.3.129 25
[r8-LoopBack0]ip address 8.8.8.8 24

r9

[r9-GigabitEthernet0/0/0]ip address 172.16.3.130 25
[r9-GigabitEthernet0/0/1]ip address 172.16.4.1 24
[r9-LoopBack0]ip address 9.9.9.9 24

r10

[r10-GigabitEthernet0/0/0]ip address 172.16.4.2 24
[r10-LoopBack0]ip address 10.10.10.10 24

r11

[r11-GigabitEthernet0/0/0]ip address 172.16.2.2 25
[r11-GigabitEthernet0/0/1]ip address 172.16.2.129 25
[r11-LoopBack0]ip address 11.11.11.11 24

r12

[r12-GigabitEthernet0/0/0]ip address 172.16.2.130 25
[r12-LoopBack0]ip address 10.0.1.1 24
[r12-LoopBack1]ip address 10.0.2.1 24

配置ppp和在R4和R5上配置chap

[r5] ip pool PPP_POOL
[r5-ip-pool-PPP_POOL] network 100.0.0.0 mask 255.255.255.0
[r5-ip-pool-PPP_POOL] gateway-list 100.0.0.1
[r5-ip-pool-PPP_POOL] dns-list 8.8.8.8
 
[r5] aaa
[r5-aaa] local-user client1 password cipher 123456
[r5-aaa] local-user client1 service-type ppp
 
[r5] interface Serial4/0/0
[r5-Serial4/0/0] link-protocol ppp
[r5-Serial4/0/0] ppp authentication-mode chap
[r5-Serial4/0/0] remote address pool PPP_POOL
 
 
[r4]int s4/0/1
[r4-Serial4/0/1]ppp chap user client1
[r4-Serial4/0/1]ppp chap password cipher 123456
[r4-Serial4/0/1ip address ppp-negotiate
 

配置OSPF和RIP

[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]area 1
 
[r1-ospf-1-area-0.0.0.1]network 172.16.1.1 0.0.0.255
[r1-ospf-1-area-0.0.0.1]network 1.1.1.1 0.0.0.255
 
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]a 1 
[r2-ospf-1-area-0.0.0.1]network 172.16.1.2 0.0.0.255
[r2-ospf-1-area-0.0.0.1]network 2.2.2.2 0.0.0.0
 
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]a 1
[r3-ospf-1-area-0.0.0.1]network 172.16.1.0 0.0.0.255
[r3-ospf-1-area-0.0.0.1]network 3.3.3.3 0.0.0.0
[r3-ospf-1-area-0.0.0.1]a 0
[r3-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.0.63
 
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]a 0
[r4-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.0.63
[r4-ospf-1-area-0.0.0.0]network 172.16.0.64 0.0.0.63
[r4-ospf-1-area-0.0.0.0]network 172.16.0.128 0.0.0.63
 
[r6]ospf 1 router 6.6.6.6
[r6-ospf-1]a 0
[r6-ospf-1-area-0.0.0.0]network 172.16.0.64 0.0.0.63
[r6-ospf-1-area-0.0.0.0]area 2
[r6-ospf-1-area-0.0.0.2]network 172.16.2.0 0.0.0.127
 
[r7]ospf 1 router-id 7.7.7.7
[r7-ospf-1]a 0
[r7-ospf-1-area-0.0.0.0]network 172.16.0.128 0.0.0.63
[r7-ospf-1-area-0.0.0.0]area 3
[r7-ospf-1-area-0.0.0.3]network 172.16.3.0 0.0.0.127
 
[r8]ospf 1 router-id 8.8.8.8
[r8-ospf-1]a 3    
[r8-ospf-1-area-0.0.0.3]network 172.16.3.0 0.0.0.127
[r8-ospf-1-area-0.0.0.3]network 172.16.3.128 0.0.0.127
[r8-ospf-1-area-0.0.0.3]network 8.8.8.8 0.0.0.0
 
[r9]ospf 1 router-id 9.9.9.9
[r9-ospf-1]a 3  
[r9-ospf-1-area-0.0.0.3]network 172.16.3.128 0.0.0.127
[r9]ospf 2 router-id 9.9.9.9
[r9-ospf-2-area-0.0.0.3]a 4
[r9-ospf-2-area-0.0.0.4]network 172.16.4.0 0.0.0.255
[r9-ospf-2-area-0.0.0.4]network 9.9.9.9 0.0.0.0
 
[r10]ospf 1 router-id 10.10.10.10
[r10-ospf-1]a 4
[r10-ospf-1-area-0.0.0.4]network 172.16.4.0 0.0.0.255
[r10-ospf-1-area-0.0.0.4]network 10.10.10.10 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]network 172.16.2.0 0.0.0.127
[r11-ospf-1-area-0.0.0.2]network 172.16.2.128 0.0.0.127
[r11-ospf-1-area-0.0.0.2]network 11.11.11.11 0.0.0.0
 
[r12]ospf 1 router-id 12.12.12.12
[r12-ospf-1]a 2 
[r12-ospf-1-area-0.0.0.2]network 172.16.2.128 0.0.0.127
[r12]rip 1
[r12-rip-1]version 2
[r12-rip-1]undo summary
[r12-rip-1]network 10.0.0.0
 

配置OSPF和RIP间的双向重发布

[r12]ospf 1
[r12-ospf-1]import-route rip 1
[r12]rip 1
[r12-rip-1]import-route ospf  1

配置特殊区域

r1 

[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]a 1
[r1-ospf-1-area-0.0.0.1]stub 
 

r2

[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]a 1
[r2-ospf-1-area-0.0.0.1]stub

 

r3

[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]a 1
[r3-ospf-1-area-0.0.0.1]stub no-summary

r6

[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]a 2
[r6-ospf-1-area-0.0.0.2]nssa no-summary

r7

[r7]ospf 1 router-id 7.7.7.7
[r7-ospf-1]a 3	
[r7-ospf-1-area-0.0.0.3]nssa no-summary

r8 

[r8]ospf 1 router-id 8.8.8.8
[r8-ospf-1]a 3
[r8-ospf-1-area-0.0.0.3]nssa
 

r9


 
[r9]ospf 1 router-id 9.9.9.9
[r9-ospf-1]a 3
[r9-ospf-1-area-0.0.0.3]nssa

r11

[r11]ospf 1 router-id 11.11.11.11
[r11-ospf-1]a 2
[r11-ospf-1-area-0.0.0.2]nssa
 

r12

[r12]ospf 1 router-id 12.12.12.12
[r12-ospf-1]a 2
[r12-ospf-1-area-0.0.0.2]nssa

OSPF汇总

abr

[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]a 1
[r3-ospf-1-area-0.0.0.1]abr-summary 172.16.1.0 255.255.255.0
 
[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]a 2
[r6-ospf-1-area-0.0.0.2]abr-summary 172.16.2.0 255.255.255.0
 
[r7]ospf 1 router-id 7.7.7.7
[r7-ospf-1]a 3
[r7-ospf-1-area-0.0.0.3]abr-summary 172.16.3.0 255.255.255.0
[r7]ip route-static 172.16.3.0 24 null0

asbr

[r12]ospf 1 router-id 12.12.12.12
[r12-ospf-1]asbr-summary 10.0.0.0 255.255.252.0
[r12]ip route-static 10.0.0.0 22 null0

配置NAT和缺省路由

[r4]acl 2000
[r4-acl-basic-2000]rule 5 permit source 172.16.0.0 0.0.255.255 
[r4-acl-basic-2000] rule 10 permit source 1.1.1.1 0 
[r4-acl-basic-2000] rule 15 permit source 2.2.2.2 0 
[r4-acl-basic-2000] rule 20 permit source 3.3.3.3 0 
[r4-acl-basic-2000] rule 25 permit source 8.8.8.8 0 
[r4-acl-basic-2000] rule 30 permit source 9.9.9.9 0 
[r4-acl-basic-2000] rule 35 permit source 10.10.10.10 0 ]
[r4-acl-basic-2000] rule 40 permit source 11.11.11.11 0 
[r4-acl-basic-2000] rule 45 permit source 10.0.1.0 0.0.0.255 
[r4-acl-basic-2000] rule 50 permit source 10.0.2.0 0.0.0.255 
 
[r4-Serial4/0/0]nat outbound 2000
[r4]ip route-static 0.0.0.0 0 100.0.0.1

[r3]ip route-static 0.0.0.0 0 172.16.0.2
 
[r6]ip route-static 0.0.0.0 0 172.16.0.65
 
[r7]ip route-static 0.0.0.0 0 172.16.0.129
 
[r10]ip route-static 0.0.0.0 0 172.16.4.1

四、实验结果

r1

r8

r11

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值