hcip第六天

本文详细描述了一次实验,涉及R4作为ISP配置IP,R3-R7为MGRE环境,OSPF网络基于172.16.0.0/16划分。重点讲解了IP地址分配、R3中心站点配置、MGRE隧道、OSPF路由设置、LSA优化、NAT与缺省路由、特殊区域设置、Hello时间调整、OSPF认证及全网可达性的测试。
摘要由CSDN通过智能技术生成

实验要求:

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

1.分配IP地址:

172.16.0.0/19 ------area0

172.16.32.0/19 ------area1

172.16.64.0/19 ------area2

172.16.96.0/19 ------area3

172.16.128.0/19 ------area4

172.16.160.0/19 ------rip

2.配置IP地址

R1:

[R1]int LoopBack 0
[R1-LoopBack0]ip add 172.16.34.1 24
[R1]int g 0/0/0
[R1-GigabitEthernet0/0/0]ip add 172.16.33.1 24

R2:

[R2]int LoopBack 0
[R2-LoopBack0]ip add 172.16.35.1 24
[R2]int g 0/0/0
[R2-GigabitEthernet0/0/0]ip add 172.16.33.2 24

R3:

[R3]int g 0/0/0
[R3-GigabitEthernet0/0/0]ip add 172.16.33.3 24
[R3]int LoopBack 0
[R3-LoopBack0]ip add 172.16.36.1 24
[R3]int s 4/0/0
[R3-Serial4/0/0]ip add 34.0.0.1 30

R4:

[R4]int s 3/0/0
[R4-Serial3/0/0]ip add 34.0.0.2 30
[R4]int g 0/0/2
[R4-GigabitEthernet0/0/2]ip add 74.0.0.2 29
[R4]int s 4/0/0
[R4-Serial4/0/0]ip add 54.0.0.2 30
[R4]int s 3/0/1
[R4-Serial3/0/1]ip add 64.0.0.2 30
[R4]int LoopBack 0
[R4-LoopBack0]ip add 4.4.4.4 24

R5:

[R5]int LoopBack 0
[R5-LoopBack0]ip add 172.16.2.1 24
[R5]int s 4/0/0
[R5-Serial4/0/0]ip add 54.0.0.1 30


R6:

[R6]int s 4/0/0
[R6-Serial4/0/0]ip add 64.0.0.1 30
[R6]int LoopBack 0
[R6-LoopBack0]ip add 172.16.3.1 24
[R6]int g 0/0/1
[R6-GigabitEthernet0/0/1]ip add 172.16.65.1 29


R7:

[R7]int g 0/0/0
[R7-GigabitEthernet0/0/0]ip add 74.0.0.1 29
[R7]interface LoopBack 0
[R7-LoopBack0]ip add 172.16.4.1 24
[R7]int g 0/0/1
[R7-GigabitEthernet0/0/1]ip add 172.16.97.1 29


R8:

[R8]int g 0/0/0
[R8-GigabitEthernet0/0/0]ip add 172.16.97.2 29
[R8]int g 0/0/1
[R8-GigabitEthernet0/0/1]ip add 172.16.97.9 29
[R8]int LoopBack 0
[R8-LoopBack0]ip add 172.16.98.1 24


R9:

[R9]int g 0/0/0
[R9-GigabitEthernet0/0/0]ip add 172.16.97.10 29
[R9]int g 0/0/1
[R9-GigabitEthernet0/0/1]ip add 172.16.129.1 29
[R9]int LoopBack 0
[R9-LoopBack0]ip add 172.16.130.1 24


R10:

[R10]int g 0/0/0
[R10-GigabitEthernet0/0/0]ip add 172.16.129.2 29
[R10]int LoopBack 0
[R10-LoopBack0]ip add 172.16.131.1 24


R11:

[R11]int g 0/0/0
[R11-GigabitEthernet0/0/0]ip add 172.16.65.2 29
[R11]int g 0/0/1
[R11-GigabitEthernet0/0/1]ip add 172.16.65.9 29
[R11]int LoopBack 0
[R11-LoopBack0]ip add 172.16.66.1 24


R12:

[R12]int g 0/0/0
[R12-GigabitEthernet0/0/0]ip add 172.16.65.10 29
[R12]int LoopBack 0
[R12-LoopBack0]ip add 172.16.160.1 20
[R12]int LoopBack 1
[R12-LoopBack1]ip add 172.16.176.1 20

3.缺省路由,NAT:

[R3]ip route-static 0.0.0.0 0 34.0.0.2

[R5]ip route-static 0.0.0.0 0 54.0.0.2

[R6]ip route-static 0.0.0.0 0 64.0.0.2

[R7]ip route-static 0.0.0.0 0 74.0.0.2 

R3:

[R3]acl 2000

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

 [R3]int Serial 4/0/0

[R3-Serial4/0/0]nat outbound 2000

R6:

[R6]acl 2000

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

[R6]int s 4/0/0

[R6-Serial4/0/0]nat outbound 2000

R7:

[R7]acl 2000

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

[R7]int g 0/0/0

[R7-GigabitEthernet0/0/0]nat outbound 2000

4.MGRE环境配置:

R3:

[R3]int Tunnel 0/0/0
[R3-Tunnel0/0/0]ip add 172.16.1.1 29
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp 
[R3-Tunnel0/0/0]source 34.0.0.1
[R3-Tunnel0/0/0]nhrp network-id 100
[R3-Tunnel0/0/0]nhrp entry multicast dynamic 

R5:

[R5]int Tunnel 0/0/0
[R5-Tunnel0/0/0]ip add 172.16.1.2 29
[R5-Tunnel0/0/0]tunnel-protocol gre p2mp 
[R5-Tunnel0/0/0]source Serial 4/0/0
[R5-Tunnel0/0/0]nhrp network-id 100
[R5-Tunnel0/0/0]nhrp entry 172.16.1.1 34.0.0.1 register 

R6:

[R6]int Tunnel 0/0/0
[R6-Tunnel0/0/0]ip add 172.16.1.3 29
[R6-Tunnel0/0/0]tunnel-protocol gre p2mp 
[R6-Tunnel0/0/0]source Serial 4/0/0
[R6-Tunnel0/0/0]nhrp network-id 100
[R6-Tunnel0/0/0]nhrp entry 172.16.1.1 34.0.0.1 register 

R7:

[R7]int Tunnel 0/0/0
[R7-Tunnel0/0/0]ip add 172.16.1.4 29
[R7-Tunnel0/0/0]tunnel-protocol gre p2mp 
[R7-Tunnel0/0/0]source GigabitEthernet 0/0/0
[R7-Tunnel0/0/0]nhrp network-id 100
[R7-Tunnel0/0/0]nhrp entry 172.16.1.1 34.0.0.1 register 

 

5.OSPF:

 

 

 

6.重发步:

[R12]ospf 1

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

[R9]ospf 1

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

7,域间路由汇总

 

8、空接口防环路由

[R3]ip route-static 172.16.32.0 19 NULL 0

[R6]ip route-static 172.16.64.0 19 NULL 0

[R7]ip route-static 172.16.96.0 19 NULL 0

[R9]ip route-static 172.16.128.0 19 NULL 0

[R12]ip route-static 172.16.160.0 19 NULL 0

9、特殊区域

 

 

 10、更改hello时间

[R3]int t 0/0/0

[R3-Tunnel0/0/0]ospf timer hello 5

[R5]int t 0/0/0

[R5-Tunnel0/0/0]ospf timer hello 5

[R6]int t 0/0/0

[R6-Tunnel0/0/0]ospf timer hello 5

[R7]int t 0/0/0

[R7-Tunnel0/0/0]ospf timer hello 5

11、OSPF认证

[R1]ospf 1

[R1-ospf-1]area 1

[R1-ospf-1-area-0.0.0.1]authentication-mode md5 1 123456

[R2]ospf 1

[R2-ospf-1]area 1

[R2-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 123456 

[R3]ospf 1

[R3-ospf-1]area 1

[R3-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 123456

12、测试全网可达

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值