HCIA-OSPF综实验

一、实验要求:

 

1、R1-3为区域0,R3到R4为区域1;其中R3的环回也在区域0

2、R1-3  R3 为DR设备, 没有BDR

3、R4的环回地址已经固定,其他所有网段使用192.168.1.0 /24 进行合理分配

4、R4环回不能宣告,全网可达,保障更新安全。避免环路,减少路由条目数量

拓扑结构如下图:

二、实验步骤

(1)划分子网分配IP地址

(2)给每个路由器接口配置IP和环回

R1:

[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.1.193 27

[R1]interface LoopBack 0
[R1-LoopBack0]ip address 192.168.1.0 27

[R1]interface LoopBack 1
[R1-LoopBack1]ip address 192.168.1.33 27

R2:

[Huawei-GigabitEthernet0/0/0]ip address 192.168.1.194 27

[Huawei]interface LoopBack 0
[Huawei-LoopBack0]ip address 192.168.1.65 27

[Huawei]interface LoopBack 1
[Huawei-LoopBack1]ip address 192.168.1.97 27

R3:

[R3-GigabitEthernet0/0/0]ip address 192.168.1.195 27
[R3-GigabitEthernet0/0/1]ip address 192.168.2.195 27

[R3]interface LoopBack 0
[R3-LoopBack0]ip address 192.168.1.129 27

[R3]interface LoopBack 1
[R3-LoopBack1]ip address 192.168.1.161 27

R4:
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 192.168.2.196 27

[Huawei]interface LoopBack 0
[Huawei-LoopBack0]ip address 4.4.4.1 24

(3)启动ospf并分区宣告

R1:
[R1]ospf router-id 1.1.1.1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.63
[R1-ospf-1-area-0.0.0.0]network 192.168.1.193 0.0.0.31


R2:

[R2]ospf router-id 2.2.2.2
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 192.168.1.64 0.0.0.63
[R2-ospf-1-area-0.0.0.0]network 192.168.1.194 0.0.0.31

R3:

[R3]ospf router-id 3.3.3.3
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 192.168.1.195 0.0.0.31
[R3-ospf-1-area-0.0.0.0]network 192.168.1.128 0.0.0.63
[R3-ospf-1]area 1
[R3-ospf-1-area-0.0.0.1]network 192.168.2.195 0.0.0.31

R4:

[Huawei]ospf router-id 4.4.4.4
[Huawei-ospf-1]area 1
[Huawei-ospf-1-area-0.0.0.1]network 192.168.2.196 0.0.0.31



(4)汇总

[R3]ospf 1
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]abr-summary 192.168.1.0 255.255.255.0


[R3]ospf 1
[R3-ospf-1]area 1
[R3-ospf-1-area-0.0.0.1]abr-summary 192.168.2.193 255.255.255.248



(5)认证接口

[R1]interface GigabitEthernet 0/0/0	
[R1-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456


[R1]interface GigabitEthernet 0/0/0	
[R2-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456


[R3]interface GigabitEthernet 0/0/1
[R3-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher 54321


[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher 54321

(6)测试

R1pingR4

<R1>ping 192.168.2.196
  PING 192.168.2.196: 56  data bytes, press CTRL_C to break
    Reply from 192.168.2.196: bytes=56 Sequence=1 ttl=254 time=70 ms
    Reply from 192.168.2.196: bytes=56 Sequence=2 ttl=254 time=60 ms
    Reply from 192.168.2.196: bytes=56 Sequence=3 ttl=254 time=40 ms
    Reply from 192.168.2.196: bytes=56 Sequence=4 ttl=254 time=50 ms
    Reply from 192.168.2.196: bytes=56 Sequence=5 ttl=254 time=60 ms

  --- 192.168.2.196 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 40/56/70 ms

<R1>

R4pingR3

[r4]ping 192.168.1.194
  PING 192.168.1.194: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.194: bytes=56 Sequence=1 ttl=254 time=50 ms
    Reply from 192.168.1.194: bytes=56 Sequence=2 ttl=254 time=50 ms
    Reply from 192.168.1.194: bytes=56 Sequence=3 ttl=254 time=40 ms
    Reply from 192.168.1.194: bytes=56 Sequence=4 ttl=254 time=50 ms
    Reply from 192.168.1.194: bytes=56 Sequence=5 ttl=254 time=60 ms

  --- 192.168.1.194 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 40/50/60 ms

[r4]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值