当前位置:网站首页>HCIP-第五天-OSPF扩展配置实验
HCIP-第五天-OSPF扩展配置实验
2022-07-26 22:50:00 【m0_72586049】
目录
一、实验目的
通过OSPF路由信息协议(动态路由)配置让如下图所示的拓扑环境达到规定实验要求

二、实验需求
1.R4为ISP,所连接的所有物理接口为公有网段,任意制定ip即可
2.R1、R2、R3构建一个星型结构的MGRE结构,其中R1为中心点,假设R1的公有ip为固定地址
3.R1、R5、R6构建另一个全连网状的MGRE网络,其中R1、R5均为中心区域
4.使用OSPF实现整个私有网段的互通,同时所有PC可以正常访问R4的环回
三、实验步骤
1.更改设备器名称
以R1为例:
[Huawei]sysname r1
[r1]

2.各个接口配置IP地址
1)R1
[R1]interface g0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.1.2 24
[R1]interface g0/0/1
[R1-GigabitEthernet0/0/1]ip address 14.1.1.1 24
[R1]interface g0/0/2
[R1-GigabitEthernet0/0/2]ip address 41.1.1.1 242)R2
[R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]ip address 192.168.2.2 24
[R2]interface g0/0/1
[R2-GigabitEthernet0/0/1]ip address 24.1.1.2 243)R3
[R3]interface g0/0/1
[R3-GigabitEthernet0/0/1]ip address 192.168.1.
[R3]interface g0/0/0
[R3-GigabitEthernet0/0/0]ip address 192.168.3.2 24
4)R4
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 14.1.1.4 24
[R4]int g0/0/1
[R4-GigabitEthernet0/0/1]ip add 41.1.1.4 24
[R4]int g0/0/2
[R4-GigabitEthernet0/0/2]ip add 24.1.1.4 24
[R4]int g4/0/0
[R4-GigabitEthernet4/0/0]ip add 34.1.1.4 24
[R4]int g4/0/1
[R4-GigabitEthernet4/0/1]ip add 46.1.1.4 24
[R4]int g4/0/2
[R4-GigabitEthernet4/0/2]ip add 45.1.1.4 24
[R4]int LoopBack 0
[R4-LoopBack0]ip add 4.4.4.4 245)R5
[R5]int g0/0/1
[R5-GigabitEthernet0/0/1]ip add 45.1.1.5 24
[R5]int g0/0/0
[R5-GigabitEthernet0/0/0]ip add 192.168.4.2 246)R6
[R5]int g0/0/1
[R5-GigabitEthernet0/0/1]ip add 45.1.1.5 24
[R5]int g0/0/0
[R5-GigabitEthernet0/0/0]ip add 192.168.4.2 243.构建星型结构MGRE网络
1)R1
[R1]interface Tunnel 0/0/0
[R1-Tunnel0/0/0]ip address 10.1.1.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]source 41.1.1.1
[R1-Tunnel0/0/0]nhrp entry multicast dynamic
[R1-Tunnel0/0/0]nhrp network-id 100
[R1-Tunnel0/0/0]ospf network-type broadcast 2)R2
[R2]int Tunnel 0/0/0
[R2-Tunnel0/0/0]ip address 10.1.1.2 24
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp
[R2-Tunnel0/0/0]source g0/0/1
[R2-Tunnel0/0/0]nhrp network-id 100
[R2-Tunnel0/0/0]nhrp entry 10.1.1.1 41.1.1.1 register
[R2-Tunnel0/0/0]ospf network-type broadcast 3)R3
[R3]int Tunnel 0/0/0
[R3-Tunnel0/0/0]ip address 10.1.1.3 24
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source g0/0/1
[R3-Tunnel0/0/0]nhrp entry 10.1.1.1 41.1.1.1 register
[R3-Tunnel0/0/0]nhrp network-id 100
[R3-Tunnel0/0/0]ospf network-type broadcast 4.构建全连网状MGRE结构
1)R1
[R1]int t0/0/1
[R1-Tunnel0/0/1]ip address 10.1.2.1 24
[R1-Tunnel0/0/1]tunnel-protocol gre p2mp
[R1-Tunnel0/0/1]source 14.1.1.1
[R1-Tunnel0/0/1]nhrp entry multicast dynamic
[R1-Tunnel0/0/1]nhrp network-id 101
[R1-Tunnel0/0/1]ospf network-type broadcast
[R1-Tunnel0/0/1]nhrp entry 10.1.2.5 45.1.1.5 register 2)R5
[R5]int t0/0/0
[R5-Tunnel0/0/0]ip add 10.1.2.5 24
[R5-Tunnel0/0/0]tunnel-protocol gre p2mp
[R5-Tunnel0/0/0]nhrp entry multicast dynamic
[R5-Tunnel0/0/0]source 45.1.1.5
[R5-Tunnel0/0/0]nhrp network-id 101
[R5-Tunnel0/0/0]ospf network-type broadcast
[R5-Tunnel0/0/0]nhrp entry 10.1.2.1 14.1.1.1 register
3)R6
[R6]int t0/0/0
[R6-Tunnel0/0/0]ip address 10.1.2.6 24
[R6-Tunnel0/0/0]tunnel-protocol gre p2mp
[R6-Tunnel0/0/0]source 46.1.1.6
[R6-Tunnel0/0/0]nhrp entry 10.1.2.1 14.1.1.1 register
[R6-Tunnel0/0/0]nhrp entry 10.1.2.5 45.1.1.5 register
[R6-Tunnel0/0/0]nhrp network-id 101
[R6-Tunnel0/0/0]ospf network-type broadcast 5.缺省路由配置和NAT地址转换
R1-R3、R5-R6写一条到公有网段的缺省路由(R1可以写两条),并在各自出口进行nat地址转换
以R1为例
[R1]ip route-static 0.0.0.0 0 41.1.1.4
[R1]ip route-static 0.0.0.0 0 14.1.1.4
[R1]acl 2000
[R1-acl-basic-2000]rule permit source any
[R1]interface g0/0/1
[R1-GigabitEthernet0/0/1]nat outbound 2000
[R1]acl 2001
[R1-acl-basic-2001]rule permit source any
[R1]int g0/0/2
[R1-GigabitEthernet0/0/2]nat outbound 20016.OSPF宣告和更改优先级
1)R1
[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.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 10.1.2.0 0.0.0.255
<R1>reset ospf process
Warning: The OSPF process will be reset. Continue? [Y/N]:y2)R2
[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.2.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255
[R2]int g0/0/1
[R2-GigabitEthernet0/0/1]ospf dr-priority 0
<R2>reset ospf process
Warning: The OSPF process will be reset. Continue? [Y/N]:y3)R3
[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.3.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255
[R3]int g0/0/1
[R3-GigabitEthernet0/0/1]ospf dr-priority 0
<R3>reset ospf process
Warning: The OSPF process will be reset. Continue? [Y/N]:y4)R5
[R5]ospf 1 router-id 5.5.5.5
[R5-ospf-1]area 0
[R5-ospf-1-area-0.0.0.0]network 10.1.2.0 0.0.0.255
[R5-ospf-1-area-0.0.0.0]network 192.168.4.0 0.0.0.255
[R5]int g0/0/1
[R5-GigabitEthernet0/0/1]ospf dr-priority 0
<R5>reset ospf process
Warning: The OSPF process will be reset. Continue? [Y/N]:y5)R6
[R6]ospf 1 router-id 6.6.6.6
[R6]area 0.0.0.0
[R6-ospf-1-area-0.0.0.0]network 10.1.2.0 0.0.0.255
[R6-ospf-1-area-0.0.0.0]network 192.168.5.0 0.0.0.255
[R6]int g0/0/1
[R6-GigabitEthernet0/0/1]ospf dr-priority 0
<R6>reset ospf process
Warning: The OSPF process will be reset. Continue? [Y/N]:y四、测试


终上所述:该实验的所有要求已经达成 ,实验成功。
边栏推荐
- Educational Codeforces Round 132 (Rated for Div. 2), problem: (D) Rorororobot
- OSPF configuration in mGRE environment and LSA optimization - reduce the amount of LSA updates (summary, special areas)
- 7.8 Ruijie online written examination
- C语言——二维数组、指针
- Codeforces Round #809 (Div. 2), problem: (C) Qpwoeirut And The City
- Codeforces Round #809 (Div. 2), problem: (C) Qpwoeirut And The City
- Static comprehensive experiment (comprehensive exercise of static route, loopback interface, default route, empty interface, floating static)
- C语言——关系运算符和逻辑运算符、if语句、switch语句、分支结构的嵌套
- Experiment of OSPF in mGRE environment
- 6.29 Zhong'an Summer Internship
猜你喜欢
随机推荐
NB-IOT联网通信
指针得真正奥义!!!
全网显示 IP 归属地,是怎么实现的?
Ogeek meetup phase I, together with cubefs, is hot
Lecture 3 - GPIO input / output library function usage and related routines
oSPF基础实验配置
2022zui new Tiktok 24-hour round robin live broadcast monitoring (I) live broadcast room start-up monitoring
SQL优化的N种方法
MGRE、PPP、HDLC综合实验
Lesson 5 - key control LED
6.30 didi surface warp (one side + two sides)
C language - value range of data type and basic data type
C语言——关系运算符和逻辑运算符、if语句、switch语句、分支结构的嵌套
6.29 Zhong'an Summer Internship
First knowledge of Web Design
Static routing default routing VLAN experiment
Codeforces Round #810 (Div. 2), problem: (B) Party
Nat网络地址转换实验
Golang implements TCP chat room
静态路由综合实验







