OSPF综合实验报告

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

第一步:在ensp上搭建出拓扑:

在这里插入图片描述
第二部:划分IP地址:
区域0:
172.16.64.0/21
172.16.72.0/21
172.16.80.0/21
172.16.88.0/21
区域1:
172.16.32.0/21
172.16.40.0/21
172.16.48.0/21
172.16.56.0/21
区域2:
172.16.96.0/21
172.16.104.0/21
172.16.112.0/21
区域3:
172.16.128.0/21
172.16.136.0/21
172.16.144.0/21
区域4:
172.16.160.0/21
172.16.168.0/21
172.16.176.0/21

 

第三步:配置:
1.首先配置区域0(MGRE环境):
R4:


R3:

[r3-GigabitEthernet0/0/1]ip address 34.1.1.1 24
1
R5:

[r5-GigabitEthernet0/0/0]ip address 45.1.1.1 24
1
R6:

[r6-GigabitEthernet0/0/0]ip address 46.1.1.1 24
1
R7:

[r7-GigabitEthernet0/0/0]ip address 47.1.1.1 24
1
测试一下R4是否能ping通:

[r4]ping 45.1.1.1
  PING 45.1.1.1: 56  data bytes, press CTRL_C to break
    Reply from 45.1.1.1: bytes=56 Sequence=1 ttl=255 time=160 ms
    Reply from 45.1.1.1: bytes=56 Sequence=2 ttl=255 time=90 ms
    Reply from 45.1.1.1: bytes=56 Sequence=3 ttl=255 time=40 ms
    Reply from 45.1.1.1: bytes=56 Sequence=4 ttl=255 time=60 ms
    Reply from 45.1.1.1: bytes=56 Sequence=5 ttl=255 time=30 ms

[r4]ping 46.1.1.1
  PING 46.1.1.1: 56  data bytes, press CTRL_C to break
    Reply from 46.1.1.1: bytes=56 Sequence=1 ttl=255 time=130 ms
    Reply from 46.1.1.1: bytes=56 Sequence=2 ttl=255 time=80 ms
    Reply from 46.1.1.1: bytes=56 Sequence=3 ttl=255 time=30 ms
    Reply from 46.1.1.1: bytes=56 Sequence=4 ttl=255 time=1 ms
    Reply from 46.1.1.1: bytes=56 Sequence=5 ttl=255 time=60 ms
    
[r4]ping 47.1.1.1
  PING 47.1.1.1: 56  data bytes, press CTRL_C to break
    Reply from 47.1.1.1: bytes=56 Sequence=1 ttl=255 time=70 ms
    Reply from 47.1.1.1: bytes=56 Sequence=2 ttl=255 time=50 ms
    Reply from 47.1.1.1: bytes=56 Sequence=3 ttl=255 time=30 ms
    Reply from 47.1.1.1: bytes=56 Sequence=4 ttl=255 time=30 ms
    Reply from 47.1.1.1: bytes=56 Sequence=5 ttl=255 time=30 ms

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2.接着给R3/5/6/7写缺省:
R3:

[r3]ip route-static 0.0.0.0 0 34.1.1.2
1
R5:

[r5]ip route-static 0.0.0.0 0 45.1.1.2
1
R6:

[r6]ip route-static 0.0.0.0 0 46.1.1.2
1
R7:

[r7]ip route-static 0.0.0.0 0 47.1.1.2
1
测试一下:

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

[r3]ping 46.1.1.1
  PING 46.1.1.1: 56  data bytes, press CTRL_C to break
    Reply from 46.1.1.1: bytes=56 Sequence=1 ttl=254 time=110 ms
    Reply from 46.1.1.1: bytes=56 Sequence=2 ttl=254 time=130 ms
    Reply from 46.1.1.1: bytes=56 Sequence=3 ttl=254 time=90 ms
    Reply from 46.1.1.1: bytes=56 Sequence=4 ttl=254 time=120 ms
    Reply from 46.1.1.1: bytes=56 Sequence=5 ttl=254 time=60 ms

[r3]ping 47.1.1.1
  PING 47.1.1.1: 56  data bytes, press CTRL_C to break
    Reply from 47.1.1.1: bytes=56 Sequence=1 ttl=254 time=70 ms
    Reply from 47.1.1.1: bytes=56 Sequence=2 ttl=254 time=110 ms
    Reply from 47.1.1.1: bytes=56 Sequence=3 ttl=254 time=80 ms
    Reply from 47.1.1.1: bytes=56 Sequence=4 ttl=254 time=70 ms
    Reply from 47.1.1.1: bytes=56 Sequence=5 ttl=254 time=130 ms

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
3.开始配置MGRE环境:
R3:

[r3]interface Tunnel 0/0/0
[r3-Tunnel0/0/0]ip address 172.16.0.1 255.255.252.0
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source 34.1.1.1
[r3-Tunnel0/0/0]ospf network-type p2mp
[r3-Tunnel0/0/0]nhrp entry multicast dynamic
[r3-Tunnel0/0/0]nhrp network-id 100
1
2
3
4
5
6
7
R5:

[r5]interface Tunnel 0/0/0
[r5-Tunnel0/0/0]ip address 172.16.0.2 255.255.252.0
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp
[r5-Tunnel0/0/0]source 45.1.1.1
[r5-Tunnel0/0/0]nhrp network-type p2mp
[r5-Tunnel0/0/0]nhrp network-id 100
[r5-Tunnel0/0/0]nhrp entry 172.16.0.1 34.1.1.1 register
1
2
3
4
5
6
7
R6:

[r6]interface Tunnel 0/0/0
[r6-Tunnel0/0/0]ip address 172.16.0.3 255.255.252.0
[r6-Tunnel0/0/0]tunnel-protocol gre p2mp
[r6-Tunnel0/0/0]source 46.1.1.1
[r6-Tunnel0/0/0]nhrp network-type p2mp
[r6-Tunnel0/0/0]nhrp network-id 100
[r6-Tunnel0/0/0]nhrp entry 172.16.0.1 34.1.1.1 register
1
2
3
4
5
6
7
R7:

[r7]interface Tunnel 0/0/0
[r7-Tunnel0/0/0]ip address 172.16.0.4 255.255.252.0
[r7-Tunnel0/0/0]tunnel-protocol gre p2mp
[r7-Tunnel0/0/0]source 47.1.1.1
[r7-Tunnel0/0/0]nhrp network-type p2mp
[r7-Tunnel0/0/0]nhrp network-id 100
[r7-Tunnel0/0/0]nhrp entry 172.16.0.1 34.1.1.1 register
1
2
3
4
5
6
7
测试一下能否ping通:

[r3]ping -a 172.16.0.1 172.13.0.2
  PING 172.16.0.2: 56  data bytes, press CTRL_C to break
    Reply from 172.16.0.2: bytes=56 Sequence=1 ttl=254 time=70 ms
    Reply from 172.16.0.2: bytes=56 Sequence=2 ttl=254 time=80 ms
    Reply from 172.16.0.2: bytes=56 Sequence=3 ttl=254 time=40 ms
    Reply from 172.16.0.2: bytes=56 Sequence=4 ttl=254 time=60 ms
    Reply from 172.16.0.2: bytes=56 Sequence=5 ttl=254 time=60 ms
1
2
3
4
5
6
7
4.开始进行OSPF配置
将R9上的172.16.104.2宣告进OSPF1中:

[r9]ospf 1 router-id 9.9.9.9
[r9-ospf-1]import-route ospf 2
[r9-ospf-1]area 0.0.0.3
[r9-ospf-1-area-0.0.0.3]network 172.16.104.2 0.0.0.0
1
2
3
4
将a4的其他接口宣告进ospf2中:

[r9]ospf 2 router-id 9.9.9.9
[r9-ospf-2]import-route ospf 1
[r9-ospf-2]area 0.0.0.4
[r9-ospf-2-area-0.0.0.4]network 172.16.128.1 0.0.0.0
[r9-ospf-2-area-0.0.0.4]network 172.16.136.1 0.0.0.0


[R10]ospf 2 router-id 10.10.10.10
[R10-ospf-2]area 0.0.0.4
[R10-ospf-2-area-0.0.0.4]network 172.16.128.2 0.0.0.0
[R10-ospf-2-area-0.0.0.4]network 172.16.144.1 0.0.0.0
1
2
3
4
5
6
7
8
9
10
11
在非法的ABR上进行多进程重发布:

[R9-ospf-1]import-route ospf 2
[R9-ospf-1]import-route ospf 1
1
2
将R12的RIP路由重发布进ospf区域内

[r12]rip 1
[r12-rip-1]ver 2
[r12-rip-1]network 172.16.0.0
1
2
3
第四步:优化网络,尽量减少LSA更新量:
1.先汇总R3,R6,R7上的三类LSA:
R3:

[r3]ospf 1
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]abr-summary 172.16.32.0 255.255.224.0
1
2
3
R6:

[r6]ospf 1
[r6-ospf-1]area 2
[r6-ospf-1-area-0.0.0.1]abr-summary 172.16.96.0 255.255.224.0
1
2
3
R7:

[r7]ospf 1
[r7-ospf-1]area 3 明细路由所在区域
[r7-ospf-1-area-0.0.0.1]abr-summary 172.16.128.0 255.255.224.0

1
2
3
4
2.将5类和7类LSA进行汇总:
R9:

[r9]ospf 1
[r9-ospf-1]asbr-summary 172.16.160.0 255.255.224.0
1
2
R12:

[r12]ospf 1
[r12-ospf-1]asbr-summary 172.16.192.0 255.255.224.0
1
2
3.将区域1设置末梢区域
R1:

[r1]ospf 1
[r1-ospf-1]area 1
[r1-ospf-1-area-0.0.0.1]stub
1
2
3
R2:

[r2]ospf 1
[r2-ospf-1]area 1
[r2-ospf-1-area-0.0.0.1]stub
1
2
3
R3:

[r3ospf 1
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]stub

[r3-ospf-1-area-0.0.0.1]stub no-summary
1
2
3
4
5
4.将区域2和区域3设置NSSA
区域二:
R6:

r6]ospf 1
[r6-ospf-1]area 2
[r6-ospf-1-area-0.0.0.1]nssa

[r6-ospf-1-area-0.0.0.1]nssa no-summary
1
2
3
4
5
R11:

[r11]ospf 1
[r11-ospf-1]area 2
[r11-ospf-1-area-0.0.0.1]nssa
1
2
3
R16:

[r12]ospf 1
[r12-ospf-1]area 2
[r12-ospf-1-area-0.0.0.1]nssa
1
2
3
区域三:
R7:

[r7]ospf 1
[r7-ospf-1]area 3
[r7-ospf-1-area-0.0.0.1]nssa

[r7-ospf-1-area-0.0.0.1]nssa no-summary
1
2
3
4
5
R8:

[r8]ospf 1
[r8-ospf-1]area 3
[r8-ospf-1-area-0.0.0.1]nssa
1
2
3
R9:

[r9]ospf 1
[r9-ospf-1]area 3
[r9-ospf-1-area-0.0.0.1]nssa
1
2
3
最后一步,环回
[r3]ip route-static 172.16.32.0 22 NULL 0 
[r6]ip route-static 172.16.96.0 22 NULL 0 
[r7]ip route-static 172.16.128.0 22 NULL 0 
[r9]ip route-static 172.16.160.0 22 NULL 0 
[r12]ip route-static 172.16.192.0 22 NULL 0
1
2
3
4
5
完成!
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
回答: 在ENSP入门实验中,配置OSPF需要进行以下步骤: 1. 配置各个接口的IP地址。根据给定的配置,可以使用以下命令配置接口的IP地址: \[1\]先配置各个接口ip 2. 进行OSPF基础配置。根据给定的配置,可以使用以下命令配置OSPF: \[1\]OSPF基础配置(AR1为例) ospf 1 area 0.0.0.0 network 10.0.1.1 0.0.0.0 network 192.168.12.0 0.0.0.255 network 192.168.13.0 0.0.0.255 3. 将R9上的172.16.104.2宣告进OSPF1中。根据给定的配置,可以使用以下命令配置R9的OSPF: \[2\]将R9上的172.16.104.2宣告进OSPF1中: \[r9\]ospf 1 \[r9-ospf-1\]router-id 9.9.9.9 \[r9-ospf-1\]import-route ospf 2 \[r9-ospf-1\]area 0.0.0.3 \[r9-ospf-1-area-0.0.0.3\]network 172.16.104.2 0.0.0.0 4. 将a4的其他接口宣告进ospf2中。根据给定的配置,可以使用以下命令配置R9和R10的OSPF: \[3\]将a4的其他接口宣告进ospf2中: \[r9\]ospf 2 \[r9-ospf-2\]router-id 9.9.9.9 \[r9-ospf-2\]import-route ospf 1 \[r9-ospf-2\]area 0.0.0.4 \[r9-ospf-2-area-0.0.0.4\]network 172.16.128.1 0.0.0.0 \[r9-ospf-2-area-0.0.0.4\]network 172.16.136.1 0.0.0.0 \[R10\]ospf 2 \[R10-ospf-2\]router-id 10.10.10.10 \[R10-ospf-2\]area 0.0.0.4 \[R10-ospf-2-area-0.0.0.4\]network 172.16.128.2 0.0.0.0 \[R10-ospf-2-area-0.0.0.4\]network 172.16.144.1 0.0.0.0 这样,你就完成了ENSP入门实验中的OSPF配置。 #### 引用[.reference_title] - *1* [华为网工入门之eNSP小实验(6)--OSPF(一)基础概念及单区域配置](https://blog.csdn.net/l765692971/article/details/129321665)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* *3* [OSPF综合实验报告](https://blog.csdn.net/Sakura1503938233/article/details/122524194)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值