IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 系统运维 -> 玩转华为ENSP模拟器系列 | 配置OSPF的DR选择示例 -> 正文阅读

[系统运维]玩转华为ENSP模拟器系列 | 配置OSPF的DR选择示例

素材来源:华为路由器配置指南

一边学习一边整理试验笔记,并与大家分享,侵权即删,谢谢支持!

附上汇总贴:玩转华为ENSP模拟器系列 | 合集_COCOgsta的博客-CSDN博客_ensp实验大全


目标

介绍在广播网络中,配置接口上的DR优先级进行DR选择的过程。

组网需求

在图1中,DeviceA接口的优先级为100,它是网络上的最高优先级,所以DeviceA被选为DR;DeviceC是优先级第二高的,被选为BDR;DeviceB的优先级为0,这意味着它将无法成为DR或BDR;DeviceD没有配置优先级,取缺省值1。

配置思路

  • 在各路由器上配置OSPF基本功能,实现互连。
  • 在各路由器上配置Router ID。
  • 在缺省优先级情况下,查看各路由器DR或者BDR状态。
  • 配置接口上的DR优先级,查看DR或者BDR状态。

操作步骤

  1. 配置各接口的IP地址(略)
  2. 配置OSPF基本功能

配置DeviceA

DeviceA:
router id 1.1.1.1
ospf 1
 area 0.0.0.0
  network 192.168.1.0 0.0.0.255

配置DeviceB

DeviceB:
router id 2.2.2.2
ospf 1
 area 0.0.0.0
  network 192.168.1.0 0.0.0.255

配置DeviceC

DeviceC:
router id 3.3.3.3
ospf 1
 area 0.0.0.0
  network 192.168.1.0 0.0.0.255

配置DeviceD

DeviceD:
router id 4.4.4.4
ospf 1
 area 0.0.0.0
  network 192.168.1.0 0.0.0.255

查看DR或者BDR的状态。

[~DeviceA]dis ospf peer 
(M) Indicates MADJ neighbor
          OSPF Process 1 with Router ID 1.1.1.1
                Neighbors
 Area 0.0.0.0 interface 192.168.1.1 (Eth1/0/0)'s neighbors
 Router ID: 2.2.2.2              Address: 192.168.1.2      
   State: 2-Way          Mode:Nbr is Slave      Priority: 1
   DR: 192.168.1.4       BDR: 192.168.1.3       MTU: 0
   Dead timer due in  35  sec
   Retrans timer interval: 5
   Neighbor is up for 00h00m00s
   Neighbor Up Time : 0000-00-00 00:00:00
   Authentication Sequence: [ 0 ]
 Area 0.0.0.0 interface 192.168.1.1 (Eth1/0/0)'s neighbors
 Router ID: 3.3.3.3              Address: 192.168.1.3      
   State: Full           Mode:Nbr is Master     Priority: 1
   DR: 192.168.1.4       BDR: 192.168.1.3       MTU: 0
   Dead timer due in  40  sec
   Retrans timer interval: 5
   Neighbor is up for 00h02m22s
   Neighbor Up Time : 2019-12-11 11:52:34
   Authentication Sequence: [ 0 ]
 Area 0.0.0.0 interface 192.168.1.1 (Eth1/0/0)'s neighbors
 Router ID: 4.4.4.4              Address: 192.168.1.4      
   State: Full           Mode:Nbr is Master     Priority: 1
   DR: 192.168.1.4       BDR: 192.168.1.3       MTU: 0
   Dead timer due in  38  sec
   Retrans timer interval: 5
   Neighbor is up for 00h02m22s
   Neighbor Up Time : 2019-12-11 11:52:34
   Authentication Sequence: [ 0 ]
          OSPF Process 65534 with Router ID 128.1.138.138
                Neighbors
 Area 0.0.0.0 interface 128.1.138.138 (DCN-Serial1/0/0:0)'s neighbors
 Router ID: 128.1.138.141        Address: 128.1.138.141    
   State: Full           Mode:Nbr is Master     Priority: 1
   DR: None              BDR: None              MTU: 0
   Dead timer due in  33  sec
   Retrans timer interval: 5
   Neighbor is up for 00h04m29s
   Neighbor Up Time : 2019-12-11 11:50:28
   Authentication Sequence: [ 0 ]
 Area 0.0.0.0 interface 128.1.138.138 (DCN-Serial1/0/0:1)'s neighbors
 Router ID: 128.1.138.139        Address: 128.1.138.139    
   State: Full           Mode:Nbr is Master     Priority: 1
   DR: None              BDR: None              MTU: 0
   Dead timer due in  37  sec
   Retrans timer interval: 5
   Neighbor is up for 00h04m27s
   Neighbor Up Time : 2019-12-11 11:50:31
   Authentication Sequence: [ 0 ]
 Area 0.0.0.0 interface 128.1.138.138 (DCN-Serial1/0/0:2)'s neighbors
 Router ID: 128.1.138.137        Address: 128.1.138.137    
   State: Full           Mode:Nbr is Slave      Priority: 1
   DR: None              BDR: None              MTU: 0
   Dead timer due in  35  sec
   Retrans timer interval: 5
   Neighbor is up for 00h04m28s
   Neighbor Up Time : 2019-12-11 11:50:29
   Authentication Sequence: [ 0 ]
[~DeviceA]

查看DeviceA的邻居信息,可以看到DR优先级(缺省为1)以及邻居状态,此时DeviceD为DR,DeviceC为BDR。

  1. 配置接口上的DR优先级

配置DeviceA。

DeviceA:
interface Ethernet1/0/0
 ospf dr-priority 100

配置DeviceB。

DeviceB:
interface Ethernet1/0/0
 ospf dr-priority 0

配置DeviceC。

DeviceC:
interface Ethernet1/0/0
 ospf dr-priority 2

查看DR或者BDR的状态。

[~DeviceD-ospf-1]display ospf peer 
(M) Indicates MADJ neighbor
          OSPF Process 1 with Router ID 4.4.4.4
                Neighbors
 Area 0.0.0.0 interface 192.168.1.4 (Eth1/0/0)'s neighbors
 Router ID: 1.1.1.1              Address: 192.168.1.1      
   State: Full           Mode:Nbr is Slave      Priority: 100
   DR: 192.168.1.4       BDR: 192.168.1.3       MTU: 0
   Dead timer due in  37  sec
   Retrans timer interval: 5
   Neighbor is up for 00h06m24s
   Neighbor Up Time : 2019-12-11 11:52:34
   Authentication Sequence: [ 0 ]
 Area 0.0.0.0 interface 192.168.1.4 (Eth1/0/0)'s neighbors
 Router ID: 2.2.2.2              Address: 192.168.1.2      
   State: Full           Mode:Nbr is Slave      Priority: 0
   DR: 192.168.1.4       BDR: 192.168.1.3       MTU: 0
   Dead timer due in  32  sec
   Retrans timer interval: 5
   Neighbor is up for 00h06m24s
   Neighbor Up Time : 2019-12-11 11:52:34
   Authentication Sequence: [ 0 ]
 Area 0.0.0.0 interface 192.168.1.4 (Eth1/0/0)'s neighbors
 Router ID: 3.3.3.3              Address: 192.168.1.3      
   State: Full           Mode:Nbr is Slave      Priority: 2
   DR: 192.168.1.4       BDR: 192.168.1.3       MTU: 0
   Dead timer due in  38  sec
   Retrans timer interval: 5
   Neighbor is up for 00h06m24s
   Neighbor Up Time : 2019-12-11 11:52:34
   Authentication Sequence: [ 0 ]
          OSPF Process 65534 with Router ID 128.1.138.137
                Neighbors
 Area 0.0.0.0 interface 128.1.138.137 (DCN-Serial1/0/0:0)'s neighbors
 Router ID: 128.1.138.141        Address: 128.1.138.141    
   State: Full           Mode:Nbr is Master     Priority: 1
   DR: None              BDR: None              MTU: 0
   Dead timer due in  37  sec
   Retrans timer interval: 5
   Neighbor is up for 00h08m12s
   Neighbor Up Time : 2019-12-11 11:50:48
   Authentication Sequence: [ 0 ]
 Area 0.0.0.0 interface 128.1.138.137 (DCN-Serial1/0/0:1)'s neighbors
 Router ID: 128.1.138.139        Address: 128.1.138.139    
   State: Full           Mode:Nbr is Master     Priority: 1
   DR: None              BDR: None              MTU: 0
   Dead timer due in  38  sec
   Retrans timer interval: 5
   Neighbor is up for 00h08m13s
   Neighbor Up Time : 2019-12-11 11:50:48
   Authentication Sequence: [ 0 ]
 Area 0.0.0.0 interface 128.1.138.137 (DCN-Serial1/0/0:2)'s neighbors
 Router ID: 128.1.138.138        Address: 128.1.138.138    
   State: Full           Mode:Nbr is Master     Priority: 1
   DR: None              BDR: None              MTU: 0
   Dead timer due in  39  sec
   Retrans timer interval: 5
   Neighbor is up for 00h08m30s
   Neighbor Up Time : 2019-12-11 11:50:29
   Authentication Sequence: [ 0 ]
[~DeviceD-ospf-1] 
[~DeviceD-ospf-1]
  1. 重启OSPF进程

在各路由器的用户视图下,同时执行命令reset ospf 1 process,以重启OSPF进程。

  1. 验证配置结果

查看OSPF邻居状态。

<DeviceD>dis ospf peer
(M) Indicates MADJ neighbor
          OSPF Process 1 with Router ID 4.4.4.4
                Neighbors
 Area 0.0.0.0 interface 192.168.1.4 (Eth1/0/0)'s neighbors
 Router ID: 1.1.1.1              Address: 192.168.1.1      
   State: Full           Mode:Nbr is Slave      Priority: 100
   DR: 192.168.1.1       BDR: 192.168.1.3       MTU: 0
   Dead timer due in  30  sec
   Retrans timer interval: 5
   Neighbor is up for 00h01m27s
   Neighbor Up Time : 2019-12-11 14:04:57
   Authentication Sequence: [ 0 ]
 Area 0.0.0.0 interface 192.168.1.4 (Eth1/0/0)'s neighbors
 Router ID: 2.2.2.2              Address: 192.168.1.2      
   State: 2-Way          Mode:Nbr is Slave      Priority: 0
   DR: 192.168.1.1       BDR: 192.168.1.3       MTU: 0
   Dead timer due in  32  sec
   Retrans timer interval: 0
   Neighbor is up for 00h00m00s
   Neighbor Up Time : 0000-00-00 00:00:00
   Authentication Sequence: [ 0 ]
 Area 0.0.0.0 interface 192.168.1.4 (Eth1/0/0)'s neighbors
 Router ID: 3.3.3.3              Address: 192.168.1.3      
   State: Full           Mode:Nbr is Slave      Priority: 2
   DR: 192.168.1.1       BDR: 192.168.1.3       MTU: 0
   Dead timer due in  33  sec
   Retrans timer interval: 5
   Neighbor is up for 00h01m27s
   Neighbor Up Time : 2019-12-11 14:04:57
   Authentication Sequence: [ 0 ]
          OSPF Process 65534 with Router ID 128.1.138.137
                Neighbors
 Area 0.0.0.0 interface 128.1.138.137 (DCN-Serial1/0/0:0)'s neighbors
 Router ID: 128.1.138.141        Address: 128.1.138.141    
   State: Full           Mode:Nbr is Master     Priority: 1
   DR: None              BDR: None              MTU: 0
   Dead timer due in  32  sec
   Retrans timer interval: 5
   Neighbor is up for 02h15m38s
   Neighbor Up Time : 2019-12-11 11:50:48
   Authentication Sequence: [ 0 ]
 Area 0.0.0.0 interface 128.1.138.137 (DCN-Serial1/0/0:1)'s neighbors
 Router ID: 128.1.138.139        Address: 128.1.138.139    
   State: Full           Mode:Nbr is Master     Priority: 1
   DR: None              BDR: None              MTU: 0
   Dead timer due in  35  sec
   Retrans timer interval: 5
   Neighbor is up for 02h15m39s
   Neighbor Up Time : 2019-12-11 11:50:48
   Authentication Sequence: [ 0 ]
 Area 0.0.0.0 interface 128.1.138.137 (DCN-Serial1/0/0:2)'s neighbors
 Router ID: 128.1.138.138        Address: 128.1.138.138    
   State: Full           Mode:Nbr is Master     Priority: 1
   DR: None              BDR: None              MTU: 0
   Dead timer due in  36  sec
   Retrans timer interval: 5
   Neighbor is up for 02h15m56s
   Neighbor Up Time : 2019-12-11 11:50:29
   Authentication Sequence: [ 0 ]
<DeviceD>

查看OSPF接口的状态。

<DeviceA>dis ospf interface
(M) Indicates MADJ interface
          OSPF Process 1 with Router ID 1.1.1.1
                  Interfaces
 Area: 0.0.0.0          (MPLS TE not enabled)
 Interface                    IP Address      Type         State    Cost    Pri  
 Eth1/0/0                     192.168.1.1     Broadcast    DR       1       100  
          OSPF Process 65534 with Router ID 128.1.138.138
                  Interfaces
 Area: 0.0.0.0          (MPLS TE not enabled)
 Interface                    IP Address      Type         State    Cost    Pri  
 Loop2147483647               128.1.138.138   P2P          P-2-P    0       1    
 Eth1/0/0.4094                128.1.138.138   P2P          P-2-P    100     1    
 Eth1/0/1.4094                128.1.138.138   P2P          P-2-P    100     1    
 Eth1/0/2.4094                128.1.138.138   P2P          P-2-P    100     1    
 Eth1/0/3.4094                128.1.138.138   P2P          P-2-P    100     1    
 Eth1/0/4.4094                128.1.138.138   P2P          P-2-P    100     1    
 Eth1/0/5.4094                128.1.138.138   P2P          P-2-P    100     1    
 Eth1/0/6.4094                128.1.138.138   P2P          P-2-P    100     1    
 Eth1/0/7.4094                128.1.138.138   P2P          P-2-P    100     1    
 Eth1/0/8.4094                128.1.138.138   P2P          P-2-P    100     1    
 Eth1/0/9.4094                128.1.138.138   P2P          P-2-P    100     1    
 DCN-Serial1/0/0:0            128.1.138.138   P2P          P-2-P    100     1    
 DCN-Serial1/0/0:1            128.1.138.138   P2P          P-2-P    100     1    
 DCN-Serial1/0/0:2            128.1.138.138   P2P          P-2-P    100     1    
<DeviceA> 
<DeviceB>display ospf interface
(M) Indicates MADJ interface
          OSPF Process 1 with Router ID 2.2.2.2
                  Interfaces
 Area: 0.0.0.0          (MPLS TE not enabled)
 Interface                    IP Address      Type         State    Cost    Pri  
 Eth1/0/0                     192.168.1.2     Broadcast    DROther  1       0    
          OSPF Process 65534 with Router ID 128.1.138.141
                  Interfaces
 Area: 0.0.0.0          (MPLS TE not enabled)
 Interface                    IP Address      Type         State    Cost    Pri  
 Loop2147483647               128.1.138.141   P2P          P-2-P    0       1    
 Eth1/0/0.4094                128.1.138.141   P2P          P-2-P    100     1    
 Eth1/0/1.4094                128.1.138.141   P2P          P-2-P    100     1    
 Eth1/0/2.4094                128.1.138.141   P2P          P-2-P    100     1    
 Eth1/0/3.4094                128.1.138.141   P2P          P-2-P    100     1    
 Eth1/0/4.4094                128.1.138.141   P2P          P-2-P    100     1    
 Eth1/0/5.4094                128.1.138.141   P2P          P-2-P    100     1    
 Eth1/0/6.4094                128.1.138.141   P2P          P-2-P    100     1    
 Eth1/0/7.4094                128.1.138.141   P2P          P-2-P    100     1    
 Eth1/0/8.4094                128.1.138.141   P2P          P-2-P    100     1    
 Eth1/0/9.4094                128.1.138.141   P2P          P-2-P    100     1    
 DCN-Serial1/0/0:0            128.1.138.141   P2P          P-2-P    100     1    
 DCN-Serial1/0/0:1            128.1.138.141   P2P          P-2-P    100     1    
 DCN-Serial1/0/0:2            128.1.138.141   P2P          P-2-P    100     1    
<DeviceB>  
<DeviceB>
<DeviceB>

如果邻居的状态是Full,这说明它和邻居之间形成了邻接关系;如果停留在2-Way的状态,则说明两者都不是DR或BDR,两者之间不需要交换LSA。

如果OSPF接口的状态是DROther,则说明它既不是DR,也不是BDR。

?

  系统运维 最新文章
配置小型公司网络WLAN基本业务(AC通过三层
如何在交付运维过程中建立风险底线意识,提
快速传输大文件,怎么通过网络传大文件给对
从游戏服务端角度分析移动同步(状态同步)
MySQL使用MyCat实现分库分表
如何用DWDM射频光纤技术实现200公里外的站点
国内顺畅下载k8s.gcr.io的镜像
自动化测试appium
ctfshow ssrf
Linux操作系统学习之实用指令(Centos7/8均
上一篇文章      下一篇文章      查看所有文章
加:2022-05-05 12:01:58  更:2022-05-05 12:02:17 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 -2024/11/15 17:22:36-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码