tip

华为WLAN指导设计 来源:华为星火计划培训

华为WLAN设计
网优网归 场景规划
方案设计

【资料简介】华为Wlan网络网规网优技术、场景规划与方案设计,从0开始设计到交付,一本完完整整的学习教材,建议从事无线学习的同学学习..

马上观看
zon

华为WLAN专题集锦 专题:华为WLAN

WLAN配置
组网模式解析
组网配置案例

【华为无线】本指南详细介绍每个模版的命令解释及用途,在加上十多种精彩案例分享及解释,再加上网优网归,让你彻底脱盲,不在为无线..

马上观看
zon

家园VBook中心 分类:书籍中心

教材 案例 题库
知识 专业认证
资源价值

【中心简介】家园Vbook书籍中心是以收集和整理互联网上优秀书籍,以最好的知识推荐给你学习,让你在学习的路程上事半功倍,告别枯燥,早..

马上观看
tip

华为HCIE认证之路 分类:华为认证

HCIE学习之路
华为 路由 交换
含金量最大的资料

【学习介绍】在中国拥有一张证书不是梦,冰冻三尺,非一日之寒,要拥有一张认证所具备含金量技术水准那是需要多年的经年积累,本书专为你分享..

马上观看
tip

华三无线专题报告 发布:建哥哥

华三
H3C WLAN AC
无线专题

【资料简介】大好河山、无线风光,主要介绍H3C无线,从基础到高级配置及组网模式配置案例,多达200篇案例配置,从此告别对无线的迷茫..

马上观看
★浏览次数:374 次★  发布日期:2013-05-15
 当前位置:技术资料 > 网络工程 > Huawei > 正文
 
最近更新
    正在更新...
 

IP路由的OSPF的DR选择(选路)

 

组网需求

在图中,SwitchA的优先级为100,它是网络上的最高优先级,所以SwitchA被选为DR;SwitchC是优先级第二高的,被选为BDR;SwitchB的优先级为0,这意味着它将无法成为DR或BDR;SwitchD没有配置优先级,取缺省值1。
图1 配置OSPF 的DR 选择组网图

 

设备                    接口                               对应的VLANIF                                   IP地址
SwitchA        Ethernet 0/0/1                          VLANIF 10                                 192.168.1.1/24
SwitchB        Ethernet 0/0/1                          VLANIF 10                                 192.168.1.2/24
SwitchC        Ethernet 0/0/1                          VLANIF 10                                 192.168.1.3/24
SwitchD        Ethernet 0/0/1                          VLANIF 10                                 192.168.1.4/24

 

配置思路

采用如下的思路配置OSPF的DR选择:
1. 配置各接口所属VLAN ID。
2. 配置各VLANIF接口的IP地址。
3. 配置各台Switch上Router ID,使能OSPF,指定网段。
4. 在缺省优先级情况下,查看各台Switch的DR/BDR状态。
5. 配置接口上的DR优先级,查看DR/BDR状态。

 

配置步骤

1. 配置各接口所属的VLAN(略)
2. 配置各接口的IP地址(略)
3. 配置OSPF基本功能
# 配置SwitchA。
[SwitchA] router id 1.1.1.1
[SwitchA] ospf
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] quit
[SwitchA-ospf-1] quit
# 配置SwitchB。
[SwitchB] router id 2.2.2.2
[SwitchB] ospf
[SwitchB-ospf-1] area 0
[SwitchB-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] quit
[SwitchB-ospf-1] quit
# 配置SwitchC。
[SwitchC] router id 3.3.3.3
[SwitchC] ospf
[SwitchC-ospf-1] area 0
[SwitchC-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.0] quit
[SwitchC-ospf-1] quit
# 配置SwitchD。
[SwitchD] router id 4.4.4.4
[SwitchD] ospf
[SwitchD-ospf-1] area 0
[SwitchD-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[SwitchD-ospf-1-area-0.0.0.0] quit
[SwitchD-ospf-1] quit
# 查看DR/BDR的状态。
[SwitchA] display ospf peer
OSPF Process 1 with Router ID 1.1.1.1
Neighbors
Area 0.0.0.0 interface 192.168.1.1(Vlanif10)'s neighbors
Router ID: 2.2.2.2 Address: 192.168.1.2
State: 2-Way Mode:Nbr is Master Priority: 1
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 00:00:00
Authentication Sequence: [ 0 ]
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 37 sec
Retrans timer interval: 5
Neighbor is up for 00:04:06
Authentication Sequence: [ 0 ]
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 37 sec
Retrans timer interval: 5
Neighbor is up for 00:03:53
Authentication Sequence: [ 0 ]
查看SwitchA的邻居信息,可以看到DR优先级(缺省为1)以及邻居状态,此时SwitchD为DR,SwitchC为BDR。
说明
当优先级相同时,Router ID高的为DR。如果Switch某个Ethernet接口成为DR之后,则这台Switch的其他广播接口在进行后续的DR选择时,具有高优先权。即选择已经是DR的Switch为DR,DR不可抢占。
4. 配置接口上的DR优先级
# 配置SwitchA。
[SwitchA] interface vlanif 10
[SwitchA-Vlanif10] ospf dr-priority 100
[SwitchA-Vlanif10] quit
# 配置SwitchB。
[SwitchB] interface vlanif 10
[SwitchB-Vlanif10] ospf dr-priority 0
[SwitchB-Vlanif10] quit
# 配置SwitchC。
[SwitchC] interface vlanif 10
[SwitchC-Vlanif10] ospf dr-priority 2
[SwitchC-Vlanif10] quit
# 查看DR/BDR的状态。
[SwitchD] display ospf peer
OSPF Process 1 with Router ID 4.4.4.4
Neighbors
Area 0.0.0.0 interface 192.168.1.4(Vlanif10)'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 31 sec
Retrans timer interval: 5
Neighbor is up for 00:11:17
Authentication Sequence: [ 0 ]
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 35 sec
Retrans timer interval: 5
Neighbor is up for 00:11:19
Authentication Sequence: [ 0 ]
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 33 sec
Retrans timer interval: 5
Neighbor is up for 00:11:15
Authentication Sequence: [ 0 ]
说明
接口上的DR优先级在配置之后并不会立即生效。
5. 重启OSPF进程
在各Switch的用户视图下,同时执行命令reset ospf 1 process,以重启OSPF进程。
6. 验证配置结果
# 查看OSPF邻居状态。
[SwitchD] display ospf peer
OSPF Process 1 with Router ID 4.4.4.4
Neighbors
Area 0.0.0.0 interface 192.168.1.4(Vlanif10)'s neighbors
Router ID: 1.1.1.1 Address: 192.168.1.1
State: Full Mode:Nbr is Master Priority: 100
DR: 192.168.1.1 BDR: 192.168.1.3 MTU: 0
Dead timer due in 35 sec
Retrans timer interval: 5
Neighbor is up for 00:07:19
Authentication Sequence: [ 0 ]
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 35 sec
Retrans timer interval: 5
Neighbor is up for 00:00:00
Authentication Sequence: [ 0 ]
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 37 sec
Retrans timer interval: 5
Neighbor is up for 00:07:17
Authentication Sequence: [ 0 ]
# 查看OSPF接口的状态。
[SwitchA] display ospf interface
OSPF Process 1 with Router ID 1.1.1.1
Interfaces
Area: 0.0.0.0
IP Address Type State Cost Pri DR BDR
192.168.1.1 Broadcast DR 1 100 192.168.1.1 192.168.1.3
[SwitchB] display ospf interface
OSPF Process 1 with Router ID 2.2.2.2
Interfaces
Area: 0.0.0.0
IP Address Type State Cost Pri DR BDR
192.168.1.2 Broadcast DROther 1 0 192.168.1.1 192.168.1.3
如果邻居的状态是Full,这说明它和邻居之间形成了邻接关系;如果停留在2-Way的状态,则说明他们都不是DR或BDR,两者之间不需要交换LSA。如果OSPF接口的状态是DROther,则说明它既不是DR,也不是BDR。

 

配置文件下载地址:

http://pan.baidu.com/share/link?shareid=401210&uk=2332071257

不能下载请联系我,QQ:378254296  ,留下你的邮箱,我会发给你。指明文件。

 
建议使用IE8.0以上版本解析 网络QQ群:30573676 家园群:36740144 Elv home systems. 蜀ICP备20009373号 © All Rights Reserved 2012 - By badulip
×

扫二维码,关注微信公众号