帧中继网络中配置OSPF

简介:

默认情况下帧中继网络是无法运行OSPF协议的,为什么?


 
【原因】:帧中继(fram-relay)网络属于非广播型多路访问,
       而OSPF协议规定路由器之间的Hello包是通过组播来传输
    (组播也属于非广播类型)因此帧中继上默认情况是无法运行OSPF协议的。

 
下面有4种解决方法:
  • 方法一,手工设置ospf网络类型为广播型,在指定fram-relay map时设置为broadcast
    (Fram-relay 广播)
  • 方法二,默认非广播类型,使用neighbor手工指定邻居,并且手工指定DR为中心路由器
    (fram-relay非广播)
  • 方法三,手工设置OSPF网络类型为:点到多点型广播型,在指定fram-relay map时设置为broadcast
    (fram-relay 点对多点广播)
  • 方法四:手工设置OSPF网络类型为:点到多点非广播,使用neighbor手工指定邻居
    (fram-relay 点对多点非广播)

 
再看解决方法之前,先理解以下内容
  1. OSPF中的“neighbor” 可以手动指定邻居路由器的IP地址,使得它不用组播也能和邻居交换路由信息。
  2. 哪些网络需要选举DR,哪些网络不用选举DR
 OSPF网络类型  特征  是否选举DR
 广播型多路访问  以太网、令牌环或FDDI  是
 非广播型多路访问  帧中继、X.25、SMDS  是
 点对点  PPP、HDLC
 否
 点对多点  由管理员配置  否
     3.fram-relay map 中 broadcast 关键词允许路由器通过指定的DLCI号将广播分组分送给所映射的路由器

 
【实验拓扑】:中心-分支帧中继网络拓扑结构

 

 

  • 方法一,手工设置ospf网络类型为广播型,在指定fram-relay map时设置为broadcast
R1:
interface L0
ip address 1.0.0.1 255.0.0.0
!
interface Serial0/0
ip address 10.0.0.1 255.0.0.0
encapsulation frame-relay
ip ospf network broadcast
frame-relay map ip 10.0.0.4 104  broadcast
frame-relay map ip 10.0.0.5 105  broadcast
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
R4:
interface Ethernet0/0
ip address 4.0.0.4 255.0.0.0
!
interface Serial0/0
ip address 10.0.0.4 255.0.0.0
encapsulation frame-relay
ip ospf network broadcast
ip ospf priority 0
frame-relay map ip 10.0.0.1 401  broadcast
frame-relay map ip 10.0.0.5 401
no frame-relay inverse-arp
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

 
R5:
interface Ethernet0/0
ip address 5.0.0.5 255.0.0.0
!
interface Serial0/0
ip address 10.0.0.5 255.0.0.0
encapsulation frame-relay
ip ospf network broadcast
ip ospf priority 0
frame-relay map ip 10.0.0.1 501  broadcast
frame-relay map ip 10.0.0.4 501
no frame-relay inverse-arp
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
  • 方法二,默认非广播类型,使用neighbor手工指定邻居,并且手工指定DR为中心路由器
R1:
interface Ethernet0/0
ip address 1.0.0.1 255.0.0.0
!
interface Serial0/0
ip address 10.0.0.1 255.0.0.0
encapsulation frame-relay
frame-relay map ip 10.0.0.4 104
frame-relay map ip 10.0.0.5 105
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
neighbor 10.0.0.4
neighbor 10.0.0.5
R4:
interface Ethernet0/0
ip address 4.0.0.4 255.0.0.0
!
interface Serial0/0
ip address 10.0.0.4 255.0.0.0
encapsulation frame-relay
ip ospf priority 0
frame-relay map ip 10.0.0.1 401
frame-relay map ip 10.0.0.5 401
no frame-relay inverse-arp
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
R5:
interface Ethernet0/0
ip address 5.0.0.5 255.0.0.0
!
interface Serial0/0
ip address 10.0.0.5 255.0.0.0
encapsulation frame-relay
ip ospf priority 0
frame-relay map ip 10.0.0.1 501
frame-relay map ip 10.0.0.4 501
no frame-relay inverse-arp
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
  • 方法三,手工设置OSPF网络类型为:点到多点型广播型,在指定fram-relay map时设置为broadcast
R1:
interface Ethernet0/0
ip address 1.0.0.1 255.0.0.0
!
interface Serial0/0
ip address 10.0.0.1 255.0.0.0
encapsulation frame-relay
ip ospf network point-to-multipoint
frame-relay map ip 10.0.0.4 104 broadcast
frame-relay map ip 10.0.0.5 105 broadcast
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
R4:
interface Ethernet0/0
ip address 4.0.0.4 255.0.0.0
!
interface Serial0/0
ip address 10.0.0.4 255.0.0.0
encapsulation frame-relay
ip ospf network point-to-multipoint
frame-relay map ip 10.0.0.1 401 broadcast
no frame-relay inverse-arp
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
R5:
interface Ethernet0/0
ip address 5.0.0.5 255.0.0.0
!
interface Serial0/0
ip address 10.0.0.5 255.0.0.0
encapsulation frame-relay
ip ospf network point-to-multipoint
frame-relay map ip 10.0.0.1 501 broadcast
no frame-relay inverse-arp
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
  • 方法四:手工设置OSPF网络类型为:点到多点非广播,使用neighbor手工指定邻居
R1:
interface Ethernet0/0
ip address 1.0.0.1 255.0.0.0
!
interface Serial0/0
ip address 10.0.0.1 255.0.0.0
encapsulation frame-relay
ip ospf network point-to-multipoint non-broadcast
frame-relay map ip 10.0.0.4 104
frame-relay map ip 10.0.0.5 105
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
neighbor 10.0.0.5
neighbor 10.0.0.4
R4:
interface Ethernet0/0
ip address 4.0.0.4 255.0.0.0
!
interface Serial0/0
ip address 10.0.0.4 255.0.0.0
encapsulation frame-relay
ip ospf network point-to-multipoint non-broadcast
frame-relay map ip 10.0.0.1 401
no frame-relay inverse-arp
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
R5:
interface Ethernet0/0
ip address 5.0.0.5 255.0.0.0
!
interface Serial0/0
ip address 10.0.0.5 255.0.0.0
encapsulation frame-relay
ip ospf network point-to-multipoint non-broadcast
frame-relay map ip 10.0.0.1 501
no frame-relay inverse-arp
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0

本文转自zcm8483 51CTO博客,原文链接:http://blog.51cto.com/haolun/993193

相关文章
|
1月前
|
监控 Linux Shell
【Shell 命令集合 网络通讯 】Linux 配置和管理网络流量的形状 shapecfg命令 使用指南
【Shell 命令集合 网络通讯 】Linux 配置和管理网络流量的形状 shapecfg命令 使用指南
39 0
|
1月前
|
网络协议 Shell Linux
【Shell 命令集合 网络通讯 】Linux 设置和配置PPP pppsetup命令 使用教程
【Shell 命令集合 网络通讯 】Linux 设置和配置PPP pppsetup命令 使用教程
44 0
|
1月前
|
域名解析 网络协议 Linux
【Shell 命令集合 网络通讯 】Linux 设置和管理网络接口配置信息 netconfig命令 使用指南
【Shell 命令集合 网络通讯 】Linux 设置和管理网络接口配置信息 netconfig命令 使用指南
56 1
|
17天前
|
网络协议 Linux
在Linux中,管理和配置网络接口
在Linux中管理网络接口涉及多个命令,如`ifconfig`(在新版本中被`ip`取代)、`ip`(用于网络设备配置)、`nmcli`(NetworkManager的CLI工具)、`nmtui`(文本界面配置)、`route/ip route`(处理路由表)、`netstat/ss`(显示网络状态)和`hostnamectl/systemctl`(主机名和服务管理)。这些命令帮助用户启动接口、设置IP地址、查看连接和路由信息。不同发行版可能有差异,建议参考相应文档。
19 4
|
3天前
|
Ubuntu 网络协议 Linux
Linux(20) Ubuntu 20.04 网络接口自动切换路由配置
Linux(20) Ubuntu 20.04 网络接口自动切换路由配置
26 0
|
8天前
|
数据采集 数据可视化
R语言用相关网络图可视化分析汽车配置和饮酒习惯
R语言用相关网络图可视化分析汽车配置和饮酒习惯
13 0
|
16天前
|
网络协议
centos8 网卡 Nmcli(是network的简写 Nmcli)配置网络
centos8 网卡 Nmcli(是network的简写 Nmcli)配置网络
15 0
|
1月前
|
机器学习/深度学习 数据采集 人工智能
m基于深度学习网络的手势识别系统matlab仿真,包含GUI界面
m基于深度学习网络的手势识别系统matlab仿真,包含GUI界面
41 0
|
1月前
|
机器学习/深度学习 算法 计算机视觉
基于yolov2深度学习网络的火焰烟雾检测系统matlab仿真
基于yolov2深度学习网络的火焰烟雾检测系统matlab仿真
|
1月前
|
机器学习/深度学习 算法 计算机视觉
m基于深度学习网络的性别识别系统matlab仿真,带GUI界面
m基于深度学习网络的性别识别系统matlab仿真,带GUI界面
29 2