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


终上所述:该实验的所有要求已经达成 ,实验成功。
边栏推荐
- Static comprehensive experiment (comprehensive exercise of static route, loopback interface, default route, empty interface, floating static)
- 静态路由缺省路由vlan实验
- 最新京东短信登录+傻妞机器人保姆级部署教程(2022/7/24)
- 6.30 didi surface warp (one side + two sides)
- C language implementation of the small game [sanziqi] Notes detailed logic clear, come and have a look!!
- RISC-V工具链编译笔记
- 怎么判断一个数是奇数还是偶数?
- 睡不着时闭眼躺着,到底有没有用?
- Experiment of total connection and star topology of mGRE
- NB-IOT接入云平台
猜你喜欢
NPM reports an error, error: eperm: operation not permitted, MKDIR

HCIP第一天静态路由综合实验

(题意+详细思路+加注释代码) Codeforces Round #805 (Div. 3)F. Equate Multisets

Experiment exercise of two-layer packaging technology (HDLC, ppp--pap\chap, GRE)

HCIA (network elementary comprehensive experimental exercise)

Tcp的三次握手与四次挥手

C语言——二维数组、指针

全网显示 IP 归属地,是怎么实现的?

Mechanical hard disk Selection Guide -- from the selection experience

Experiment of OSPF in mGRE environment
随机推荐
C语言——字符和字符串、算术运算符、类型转换
lvs+keepalived项目实战
NAT network address translation experiment
OSPF basic configuration application (comprehensive experiment: interference election default routing area summary authentication -- interface authentication)
The latest C language introduction and advanced - the most complete and detailed C language tutorial in history!! Section 1 - overview of C language
JUC并发编程
ESP8266Wi-Fi接入云平台
C language - array, string handler, strlen, strcpy and strncpy, strcat and strncat, StrCmp and strncmp
Explain exi interrupt through the counting experiment of infrared sensor
HCIP第一天
Use of golang - sync package (waitgroup, once, mutex, rwmutex, cond, pool, map)
C语言的常数知识讲解
静态路由缺省路由vlan实验
2022 latest live broadcast monitoring 24-hour monitoring (III) analysis of barrage in live broadcast room
First acquaintance with C language (1)
JVM面试题(面试必备)
Educational Codeforces Round 132 (Rated for Div. 2), problem: (D) Rorororobot
Self introduction and planning about programming
(the most detailed in History) codeforces round 805 (Div. 3) e Split Into Two Sets
WAN technology experiment