当前位置:网站首页>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四、测试


终上所述:该实验的所有要求已经达成 ,实验成功。
边栏推荐
- 最新京东短信登录+傻妞机器人保姆级部署教程(2022/7/24)
- Golang -- parse yaml file
- TCP的三次握手与四次断开
- 动态路由配置
- Educational Codeforces Round 132 (Rated for Div. 2), problem: (D) Rorororobot
- Timer interrupt experiment
- C语言——数据类型、基本数据类型的取值范围
- (超详尽版,不懂随时评论)Codeforces Round #804 (Div. 2)C The Third Problem
- OSPF protocol knowledge summary
- HCIP第一天
猜你喜欢

RS-485总线通信应用

First knowledge of C language (2)

Codeforces Round #809 (Div. 2), problem: (C) Qpwoeirut And The City

【C语言】阶乘实现

Nat网络地址转换实验

Lora communication application development

Can bus communication application

CAN总线通信应用

OSPF protocol knowledge summary

(prefix and / thinking) codeforces round 806 (Div. 4) F Yet Another Problem About Pairs Satisfying an Inequality
随机推荐
(prefix and / thinking) codeforces round 806 (Div. 4) F Yet Another Problem About Pairs Satisfying an Inequality
求解100~200之间的素数
2022 latest Tiktok live broadcast monitoring (II) streaming media download in live broadcast room
Lora communication application development
Influence of pre frequency division value and automatic reload value on interrupt frequency
C language implementation of the small game [sanziqi] Notes detailed logic clear, come and have a look!!
离开页面的提示
6.29 Zhong'an Summer Internship
TCP的三次握手与四次断开
指针得真正奥义!!!
SQL优化的N种方法
Dynamic routing ofps protocol configuration
Tcp的三次握手与四次挥手
(CF1691D) Max GEQ Sum
Codeforces Round #810 (Div. 2), problem: (B) Party
打开编程的大门
记录第N次SQL异常
Nb-iot networking communication
First knowledge of Web Design
Lesson 5 - key control LED