【HCIP 08】OSPF综合实验

二、 实验需求及解法 
本实验模拟OSPF综合型网络,按照以下需求完成实验。 
1.设备名称和部分IP地址已配置,请通过display ip int brief自行查看。 没有配置IP地址的接口,请按照图中标识进行配置。

 
R3: 
interface GigabitEthernet0/0/1 
 ip address 192.168.0.3 255.255.255.0 

R6: 
interface GigabitEthernet0/0/0 
 ip address 192.168.0.6 255.255.255.0 

R7: 
interface GigabitEthernet0/0/0 

ip address 192.168.0.7 255.255.255.0 


2.所有设备运行OSPF,进程号为1,完成以下需求: 
2.1 手动设置Loobapck0的IP地址作为Router-id。 
2.2 如图所示将各接口划入指定区域。ABR的Lo0划入区域0。 
2.3 所有network命令均使用0.0.0.0的通配符。 
2.4  区域0启用密文验证,验证方式为MD5,KEY-ID为1。 
使用display命令可以查看到真实密码为“spoto”(不包含引号)。 2.5 区域1配置为NSSA区域。 
2.6 区域2配置为stub区域,并配置为完全末节. 
2.7 区域 3 为普通区域。在 R3/6/7 之间强制选择 R3 为 DR,没有 BDR。

R1: 
ospf 1 router-id 10.0.1.1  
 area 0.0.0.0  
  authentication-mode md5 1 plain spoto 
  network 10.0.1.1 0.0.0.0  
  network 10.0.12.1 0.0.0.0  
  network 10.0.13.1 0.0.0.0  
  network 10.0.14.1 0.0.0.0 

R2: 
ospf 1 router-id 10.0.2.2  
 area 0.0.0.0  
  authentication-mode md5 1 plain spoto 
  network 10.0.2.2 0.0.0.0  
  network 10.0.12.2 0.0.0.0  
 area 0.0.0.1  
  network 10.0.25.2 0.0.0.0  
  nssa 
area 0.0.0.3  
  network 10.0.26.2 0.0.0.0 

R3: 
ospf 1 router-id 10.0.3.3  
 area 0.0.0.0  
  authentication-mode md5 1 plain spoto 
  network 10.0.3.3 0.0.0.0  
  network 10.0.13.3 0.0.0.0  
 area 0.0.0.3  
  network 192.168.0.3 0.0.0.0 

R4: 

ospf 1 router-id 10.0.4.4  
 area 0.0.0.0  
  authentication-mode md5 1 plain spoto   network 10.0.4.4 0.0.0.0  
  network 10.0.14.4 0.0.0.0  
 area 0.0.0.2  
  network 10.0.48.4 0.0.0.0  
  stub no-summary 

R5: 
ospf 1 router-id 10.0.5.5  
 area 0.0.0.1  
  network 10.0.5.5 0.0.0.0  
  network 10.0.25.5 0.0.0.0  
  nssa 

R6: 
ospf 1 router-id 10.0.6.6  
 area 0.0.0.3  
  network 10.0.6.6 0.0.0.0  
  network 10.0.26.6 0.0.0.0  
  network 192.168.0.6 0.0.0.0  
  network 192.168.6.1 0.0.0.0 
interface GigabitEthernet0/0/0  
  ospf dr-priority 0 

R7: 
ospf 1 router-id 10.0.7.7  
 area 0.0.0.2  
  network 10.0.78.7 0.0.0.0  
  stub 
 area 0.0.0.3  
  network 10.0.7.7 0.0.0.0  
  network 192.168.0.7 0.0.0.0  
  network 192.168.7.1 0.0.0.0  
interface GigabitEthernet0/0/0  
  ospf dr-priority 0 

R8: 
ospf 1 router-id 10.0.8.8  
 area 0.0.0.2   

  network 10.0.8.8 0.0.0.0  
  network 10.0.48.8 0.0.0.0  
  network 10.0.78.8 0.0.0.0  
  stub 

 
3.区域间路由汇总 
3.1 在R6的Lo6口和R7的Lo7口上修改网络类型,使得OSPF产生24位路由。

 
R6: 
interface LoopBack6 
ospf network-type broadcast 
R7: 
interface LoopBack7 
ospf network-type broadcast 

 
3.2 R1去往区域3的 192.168.0.0/24 192.168.6.0/24 192.168.7.0/24有R2和R3两条可用路径。 在R2上将这三条路由汇总为192.168.0.0/16,使得R1优先走R3去往区域3。 
<R1>dis ip routing-table protocol ospf 

 有10.0.13.2和10.0.13.3两个可用下一跳 R2: 
ospf 1 router-id 10.0.2.2 
 area 0.0.0.3  
  abr-summary 192.168.0.0 255.255.0.0 #再次查看R1的路由表 
<R1>dis ip routing-table protocol ospf 

 根据最长匹配原则,会选择10.0.13.3作为最佳下一跳。10.0.12.2成为备用下一跳。  
4.外部路由汇总 
R5上有四条外部路由如下: 
172.16.0.1/24

172.16.1.1/24

172.16.2.1/24

172.16.3.1/24 
R5将以上四条路由汇总为172.16.0.0/22,再发布到OSPF。

R5: 
ospf 1 router-id 10.0.5.5  
import-route direct 
 asbr-summary 172.16.0.0 255.255.252.0 

 
5.下发默认路由 
R1作为OSPF系统的总出口,上连骨干网。(使用Lo1模拟骨干网) 
在R1上下发默认路由到OSPF系统内,使得所有设备可以访问1.1.1.1。 
R1: 
ospf 1 router-id 10.0.1.1  
 default-route-advertise always 


解析:OSPF引入外部路由时,不能引入默认路由。只有使用命令default-route-advertise才能引入默认路由,且前提条件是本地必须有默认路由。加上always参数后,无论本地是否有默认路由,都可以直接下发默认路由。 
 
6. 虚链路 
在区域2中,R8需要高可靠性链路保障,完成以下需求: 
6.1 将R8的S1/0/0接口cost值修改为65535。 
使得R4作为主要链路,R7作为备份链路。 
R8: 
interface Serial1/0/0  
 ospf cost 65535 

 
6.2 R7与R3建立虚链路,使得R7成为ABR。 
当R8-R4链路故障时,R8可以从R7接收到OSPF路由。 
(提示:需要考虑需求2.4和2.6。) 
R3: 
ospf 1 router-id 10.0.3.3  
area 0.0.0.3  
  vlink-peer 10.0.7.7 

R7: 
ospf 1 router-id 10.0.7.7 
area 0.0.0.3 
  vlink-peer 10.0.3.3 
area 0.0.0.0  
  authentication-mode md5 1 plain spoto 

//在需求2.4中区域0需要启用区域验证。当R7通过Vlink进入区域0后,也需要启用验证。 
否则无法建立Vlink邻居。 

area 0.0.0.2  
  stub no-summary 

//在需求2.6中要求配置为完全末节,此时R7成为区域2的ABR,也需要配置no-summary。

6.3 当R8-R4链路故障恢复时,需要快速建立邻接关系:

1)修改R8和R4的hello时间间隔为3s。 
2)修改网络类型为P2P,避免DR选举。 
R4: 
interface GigabitEthernet0/0/1 
ospf network-type p2p 
 ospf timer hello 3 
R8: 
interface GigabitEthernet0/0/0  
 ospf network-type p2p 
 ospf timer hello 3 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值