路由与交换系列之OSPF在帧中继的配置实践

简介: 掌握OSPF在帧中继网络中的配置方法理解Hub- Spoke组网架构掌握在帧中继网络中排除OSPF故障的方法


【实验目的】

掌握OSPF在帧中继网络中的配置方法

理解Hub- Spoke组网架构

掌握在帧中继网络中排除OSPF故障的方法


【实验环境】


IP地址规划表

设备

接口

IP地址

子网掩码

R1

S0/0/0

10.45.123.1

255.255.255.0

E0/0/0

10.45.1.1

255.255.255.0

R2

S0/0/1

10.45.123.2

255.255.255.0

E0/0/0

10.45.2.1

255.255.255.0

R3

S0/0/2

10.45.123.3

255.255.255.0

E0/0/0

10.45.3.1

255.255.255.0

PC1

E0/0/1

10.45.1.10

255.255.255.0

PC2

E0/0/1

10.45.2.10

255.255.255.0

PC3

E0/0/1

10.45.3.10

255.255.255.0


【实验过程】

27.1基本配置

在R1、R2、R3上配置帧帧中继接口,关闭帧中继逆向地址解析功能,其中将R1设置为DR,DR优先级为100:

AR1

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys AR1
[AR1]link-protocol fr ietf
[AR1]int s0/0/0
[AR1-Serial0/0/0]link-protocol fr ietf
Warning: The encapsulation protocol of the link will be changed.
Continue? [Y/N]:y
[AR1-Serial0/0/0]ip add 10.45.123.1 24
[AR1-Serial0/0/0]undo fr inarp
[AR1-Serial0/0/0]fr map ip 10.45.123.2 102
[AR1-Serial0/0/0]fr map ip 10.45.123.3 103
[AR1-Serial0/0/0]ospf dr-priority 100
[AR1-Serial0/0/0]q
[AR1]int e0/0/0
[AR1-Ethernet0/0/0]ip add 10.45.1.1 24
[AR1-Ethernet0/0/0]q


AR2

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys AR2
[AR2]int s0/0/1
[AR2-Serial0/0/1]link-protocol fr ietf
Warning: The encapsulation protocol of the link will be changed.
Continue? [Y/N]:y
[AR2-Serial0/0/1]ip add 10.45.123.2 24
[AR2-Serial0/0/1]undo fr inarp
[AR2-Serial0/0/1]fr map ip 10.45.123.1 201
[AR2-Serial0/0/1]q
[AR2]int e0/0/0
[AR2-Ethernet0/0/0]ip add 10.45.2.1 24
[AR2-Ethernet0/0/0]q


AR3

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys AR3
[AR3]int s0/0/2
[AR3-Serial0/0/2]link-protocol fr ietf
Warning: The encapsulation protocol of the link will be changed.
Continue? [Y/N]:y
[AR3-Serial0/0/2]ip add 10.45.123.3 24
[AR3-Serial0/0/2]undo fr inarp
[AR3-Serial0/0/2]fr map ip 10.45.123.1 301
[AR3-Serial0/0/2]q
[AR3]int e0/0/0
[AR3-Ethernet0/0/0]ip add 10.45.3.1 24
[AR3-Ethernet0/0/0]q


27.2查看帧中继的虚电路和映射表

[AR1]dis fr pvc-info
PVC statistics for interface Serial0/0/0 (DTE, physical UP)
DLCI = 102, USAGE = LOCAL (00000100), Serial0/0/0
create time = 2020/11/21 18:45:33, status = ACTIVE
InARP = Disable
in BECN = 0, in FECN = 0
in packets = 0, in bytes = 0
out packets = 1, out bytes = 30
DLCI = 103, USAGE = LOCAL (00000100), Serial0/0/0
create time = 2020/11/21 18:45:33, status = ACTIVE
InARP = Disable
in BECN = 0, in FECN = 0
in packets = 0, in bytes = 0
out packets = 1, out bytes = 30
[AR1]dis fr map-info
Map Statistics for interface Serial0/0/0 (DTE)
DLCI = 102, IP 10.45.123.2, Serial0/0/0
create time = 2020/11/21 18:45:59, status = ACTIVE
encapsulation = ietf, vlink = 3
DLCI = 103, IP 10.45.123.3, Serial0/0/0
create time = 2020/11/21 18:46:00, status = ACTIVE
encapsulation = ietf, vlink = 4

27.3测试连通性

R1和R2的连通性

R1和R2的连通性

27.4在帧中继上搭建OSPF网络

AR1

[AR1]ospf router-id 10.45.1.10
[AR1-ospf-1]area 0
[AR1-ospf-1-area-0.0.0.0]net 10.45.123.1 0.0.0.255
[AR1-ospf-1-area-0.0.0.0]net 10.45.1.10 0.0.0.255
[AR1-ospf-1-area-0.0.0.0]q
[AR1-ospf-1]q



AR2

[AR2]ospf router-id 10.45.2.10
[AR2-ospf-1]area 0
[AR2-ospf-1-area-0.0.0.0]net 10.45.123.2 0.0.0.255
[AR2-ospf-1-area-0.0.0.0]net 10.45.2.10 0.0.0.255
[AR2-ospf-1-area-0.0.0.0]q
[AR2-ospf-1]q


AR3

[AR3]ospf router-id 10.45.3.10
[AR3-ospf-1]area 0
[AR3-ospf-1-area-0.0.0.0]net 10.45.123.2 0.0.0.255
[AR3-ospf-1-area-0.0.0.0]net 10.45.3.10 0.0.0.255
[AR3-ospf-1-area-0.0.0.0]q
[AR3-ospf-1]q


27.5R1的邻居

[AR1]dis ospf peer
OSPF Process 1 with Router ID 10.45.1.1

发现无法正常建立邻居,这是明显的网络故障。于是我们来排查故障,排查故障时应遵循底层逐步向上层的顺序,即先检查物理层,然后二层链路层,之后高层。

物理层的检查这里省略,直接测试连通性:

[AR1]ping 10.45.123.2
PING 10.45.123.2: 56 data bytes, press CTRL_C to break
Reply from 10.45.123.2: bytes=56 Sequence=1 ttl=255 time=70 ms
Reply from 10.45.123.2: bytes=56 Sequence=2 ttl=255 time=10 ms
Reply from 10.45.123.2: bytes=56 Sequence=3 ttl=255 time=10 ms
Reply from 10.45.123.2: bytes=56 Sequence=4 ttl=255 time=110 ms
Reply from 10.45.123.2: bytes=56 Sequence=5 ttl=255 time=40 ms
--- 10.45.123.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/48/110 ms

可以观察到,直连链路没有问题,我们来检查三层路由协议,即相应接口是否被通告到OSPF进程中。

[AR1]display ospf interface
OSPF Process 1 with Router ID 10.45.1.10
Interfaces
Area: 0.0.0.0 (MPLS TE not enabled)
IP Address Type State Cost Pri DR BDR
10.45.123.1 NBMA DR 1562 100 10.45.123.1 0.0.0.0
10.45.1.1 P2P P-2-P 0 1 10.45.1.1 0.0.0.0


发现R1始终没有向外发送OSPF报文,这是因为OSPF在帧中继上默认的网络类型为NBMA,即非广播多路访问。这种类型是不支持广播和组播的,而OSPF默认时组播发送,故OSPF无法在帧中继中发送报文,无法建立邻居关系。

可以采取手工配置邻居,单播发送报文。

27.6手工配置邻居

AR1

[AR1]ospf
[AR1-ospf-1]peer 10.45.123.2
[AR1-ospf-1]peer 10.45.123.3
[AR1-ospf-1]q

AR2

[AR2]ospf
[AR2-ospf-1]peer 10.45.123.1
[AR2-ospf-1]peer 10.45.123.3
[AR2-ospf-1]q


AR3

[AR3]ospf
[AR3-ospf-1]peer 10.45.123.1
[AR3-ospf-1]peer 10.45.123.2
[AR3-ospf-1]q


查看R1的邻居关系

可以看到,邻居关系已经建立成功。

27.7配置PVC复用技术

[AR2-Serial0/0/1]fr map ip 10.45.123.3 201
[AR3-Serial0/0/2]fr map ip 10.45.123.2 301

 

27.8测试R2和R3的的连通性

PC>ping 10.45.123.3
Ping 10.45.123.3: 32 data bytes, Press Ctrl_C to break
From 10.45.123.3: bytes=32 seq=1 ttl=255 time=109 ms
From 10.45.123.3: bytes=32 seq=2 ttl=255 time=47 ms
From 10.45.123.3: bytes=32 seq=3 ttl=255 time=47 ms
From 10.45.123.3: bytes=32 seq=4 ttl=255 time=31 ms
From 10.45.123.3: bytes=32 seq=5 ttl=255 time=63 ms
--- 10.45.123.3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 31/59/109 ms


知识点总结

帧中继(frame-ralay)是一种广域网技术,属于分组交换门里的一种;frame-relay是一种二层技术,与具体的物理链路无关。再说说ospf:ospf是一种动态路由协议,用以生成路由表,是众多的路由协议中较为优秀的一种,一般用再大中型企业。路由表是路由器转发数据所依赖的一张表。因此可以说没有路由协议就没有路由表,路由器就不能完成转发数据的重任。

目录
相关文章
|
前端开发 JavaScript 容器
|
运维 Kubernetes API
k8s集群新增master 、work节点重新生成token、certificate-key等操作
k8s集群运维中通常会存在新增和删除节点,一些token、certificate-key信息 会被遗忘,怎么去重生成了 可以按照以下方式
5075 0
|
XML 关系型数据库 PHP
thinkphp6支持哪些数据库
【8月更文挑战第21天】thinkphp6支持哪些数据库
170 2
|
机器学习/深度学习 人工智能 数据可视化
技术开源|语音情感基座模型emotion2vec
技术开源|语音情感基座模型emotion2vec
|
监控 安全 Oracle
Ensp 启动设备AR1失败 错误代码40 41(已解决问题)详细解决过程
Ensp 启动设备AR1失败 错误代码40 41(已解决问题)详细解决过程
1791 1
|
存储 关系型数据库 MySQL
MySQL vs. PostgreSQL:选择适合你的开源数据库
在众多开源数据库中,MySQL和PostgreSQL无疑是最受欢迎的两个。它们都有着强大的功能、广泛的社区支持和丰富的生态系统。然而,它们在设计理念、性能特点、功能特性等方面存在着显著的差异。本文将从这三个方面对MySQL和PostgreSQL进行比较,以帮助您选择更适合您需求的开源数据库。
602 4
|
存储 开发框架 Java
libgdx ashley框架的讲解
本文介绍了libgdx游戏开发框架中的Ashley实体系统,包括如何引入依赖、创建实体、添加组件和系统,并通过代码示例演示了如何使用PooledEngine、Component、EntitySystem等核心类来构建游戏逻辑。
234 1
|
敏捷开发 算法 测试技术
【软件测试】 测试用例的基本要素与设计方法
【软件测试】 测试用例的基本要素与设计方法
|
关系型数据库 MySQL
mysql—引号及concat() 使用
mysql—引号及concat() 使用
514 0
|
网络虚拟化
干货 | 华三 Monitor Link常用功能配置操作
干货 | 华三 Monitor Link常用功能配置操作
430 0