Manipulating DR Selection
Problem
You want to manipulate the Designated Router (DR) selection process on a particular subnet.
Solution
The ip ospf priority configuration command allows
you to weight the Designated Router (DR) selection process on a
network segment. The following configuration examples are for three
different routers that all share the same Ethernet segment. Router5
has the highest OSPF priority, so it
will become the DR. Router1
has the
second highest priority because we want it to be the Backup Designated
Router (BDR).
Router1
is connected to this
network segment through a VLAN trunk:
Router1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router1(config)#interface
Router1(config-subif)#
FastEthernet0/0.1
ip ospf priority
Router1(config-subif)#
2
exit
Router1(config)#end
Router1#
We will configure Router3
with a priority of 0. The default priority is 1
. A router with priority 0
will never become the DR or BDR:
Router3#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router3(config)#interface
Router3(config-subif)#
FastEthernet0/0.1
ip ospf priority
Router3(config-subif)#
0
exit
Router3(config)#end
Router3#
Router5
has the highest
priority, so it will become the DR for the segment:
Router5#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router5(config)#interface
Router5(config-if)#
Ethernet0
ip ospf priority
Router5(config-if)#
10
exit
Router5(config)#end
Router5#
Discussion
There are ...
Get Cisco IOS Cookbook, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.