ospf实验

该文章详细描述了四个路由器接口的配置,涉及OSPF协议的设置(如router-id、area、网络通告等),以及MD5认证和默认路由的广告。同时展示了ping测试以验证网络连通性。
摘要由CSDN通过智能技术生成

 r1

[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 29
[r1]interface LoopBack 0
[r1-LoopBack0]ip address 192.168.1.65 26
[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]area 0 
[r1-ospf-1-area-0.0.0.0]network 192.168.1.65 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 192.168.1.1 0.0.0.0
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ospf dr-priority 2
<r1>reset ospf process 
Warning: The OSPF process will be reset. Continue? [Y/N]:y

r2

[r2]interface lo 0
[r2-LoopBack0]ip address 192.168.1.129 26
[r2]interface g0/0/0
[r2-GigabitEthernet0/0/0]ip address  192.168.1.2 29
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network 192.168.1.129 0.0.0.0
[r2-ospf-1-area-0.0.0.0]network 192.168.1.2 0.0.0.0

r3

[r3]interface g0/0/
[r3-GigabitEthernet0/0/0]ip address 192.168.1.3 29
[r3]interface g0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.1.9 30
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 0 	
[r3-ospf-1-area-0.0.0.0]network 192.168.1.3 0.0.0.0
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]network 192.168.1.9 0.0.0.0
[r3]interface g0/0/1
[r3-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher 123

r4

[r4]interface g0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.10 30
[r4]interface g0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.1.13 30
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]area 1
[r4-ospf-1-area-0.0.0.1]network 192.168.1.10 0.0.0.0
[r4-ospf-1-area-0.0.0.1]network 192.168.1.13 0.0.0.0
[r4]interface g0/0/1
[r4-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher 123
[r4]interface g0/0/0
[r4-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]default-route-advertise

r5

[r5]interface LoopBack 0
[r5-LoopBack0]ip address 192.168.1.193 26
[r5]in g 0/0/0
[r5-GigabitEthernet0/0/0]ip address 192.168.1.14 30
[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]area 1
[r5-ospf-1-area-0.0.0.1]network 192.168.1.14 0.0.0.0

验证

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

  --- 192.168.1.13 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 30/44/60 ms

<r1>ping 192.168.1.14
  PING 192.168.1.14: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.14: bytes=56 Sequence=1 ttl=255 time=50 ms
    Reply from 192.168.1.14: bytes=56 Sequence=2 ttl=255 time=30 ms
    Reply from 192.168.1.14: bytes=56 Sequence=3 ttl=255 time=50 ms
    Reply from 192.168.1.14: bytes=56 Sequence=4 ttl=255 time=40 ms
    Reply from 192.168.1.14: bytes=56 Sequence=5 ttl=255 time=30 ms

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


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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

不会取名余

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值