PDA

View Full Version : OSPF elections


Fuzz
01-12-2009, 05:53 AM
It is my understanding that when trying to elect the DR and BDR, the highest RID wins. As there are many ways to influence the RID, there is also a specific process as to which routers get chosen.

1. Priority - if the priority is set correctly, the router will always become the DR no matter what IP addresses are assigned on the other routers.
2. Loopback - loopback addresses take precedence over physical interfaces, regardless of IP address.
3. Physical interfaces - as long as they are up/up, the highest IP address on any physical interface becomes the RID.

I have been testing OSPF configuration and elections with Packet Tracer, and I set loopback addresses on two routers I wanted to be DR and BDR. However, even though their RID was set using the loopback interface (10.0.0.0 subnet), they did not become the DR and BDR.

Router1#sh ip ospf neigh
Neighbor ID Pri State Dead Time Address Interface
192.168.0.1 1 FULL/DR 00:00:35 10.1.3.2 FastEthernet0/1
10.0.0.2 1 FULL/DROTHER 00:00:35 10.1.1.1 FastEthernet0/0
10.0.0.1 1 FULL/DROTHER 00:00:35 10.1.1.4 FastEthernet0/0
10.1.4.1 1 FULL/DR 00:00:35 10.1.1.3 FastEthernet0/0

Was this because the physical interfaces on the other routers had higher RIDs, and the loopback interface precedence only counts as the local router ID? In other words, would I need to set the loop0 inteface IP addresses higher than the active interfaces on the segment?

I think I may have answered my own question here, but I'd just like it clarified. Thanks.

Fuzz
01-12-2009, 06:28 AM
Further to this, I have the OSPF network set up in two areas. This is the routing table from the ABR

10.0.0.0/24 is subnetted, 6 subnets
C 10.0.0.0 is directly connected, Loopback0
C 10.1.1.0 is directly connected, FastEthernet0/0
O 10.1.2.0 [110/2] via 10.1.1.1, 00:22:09, FastEthernet0/0
C 10.1.3.0 is directly connected, FastEthernet0/1
O 10.1.4.0 [110/2] via 10.1.1.3, 00:22:09, FastEthernet0/0
O 10.1.5.0 [110/2] via 10.1.1.4, 00:22:09, FastEthernet0/0
192.168.0.0/30 is subnetted, 1 subnets
O 192.168.0.0 [110/65] via 10.1.3.2, 00:22:19, FastEthernet0/1

and this is from the router connected to the same segment, which is internal to area 0

10.0.0.0/24 is subnetted, 2 subnets
O IA 10.1.1.0 [110/2] via 10.1.3.1, 00:21:09, FastEthernet0/0
C 10.1.3.0 is directly connected, FastEthernet0/0
192.168.0.0/30 is subnetted, 1 subnets
C 192.168.0.0 is directly connected, Serial0/0

I know that the ABR summarises the routes to area 1, but it has failed to advertise any of the access layer subnets inside area 1. The only way I can see to make the area 0 internal router route to the other area subnets is via static routing, creating this.

10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
O IA 10.1.1.0/24 [110/2] via 10.1.3.1, 00:34:49, FastEthernet0/0
S 10.1.2.0/24 [1/0] via 10.1.3.1
C 10.1.3.0/24 is directly connected, FastEthernet0/0
S 10.1.4.0/23 [1/0] via 10.1.3.1
192.168.0.0/30 is subnetted, 1 subnets
C 192.168.0.0 is directly connected, Serial0/0

Is this my only option?

Fuzz
01-13-2009, 05:04 AM
Well I found another solution, but I don't know whether it's the correct one. I decided to use the ip default-network 10.1.1.0 command on the backbone router, which then added a static route to 10.0.0.0 through 10.1.1.0. As this network was the interarea route summary from the ABR, I used this as the basis for the above command. Is this the right way to use this command?

lildeezul
01-13-2009, 06:09 AM
The loopback (no matter how high it is) takes place of physical interface... you can also try manually setting the RID using the Router ID command.


It might be a packet tracer issue, thats why its good to get real equipment, but try to clear the ospf process and look again.

Using the ip defualt-network command works different for each protcol, for EIGRP it takes the default route and it advertises it throughout the network.. With OSPF its only a local default route, to advertise it to other routers use the Defualt information-originate command.

lildeezul
01-13-2009, 06:16 AM
Also forgot to mention, In a production environment, you would want to set the RID manually of use a loopback address, becuase a flapping interface could cause problems when election time is up.

not really what you was looking for, but everything helps !

Fuzz
01-16-2009, 04:17 AM
With OSPF its only a local default route, to advertise it to other routers use the Defualt information-originate command.

So on which router would you use this command? The ABR or the one connected to the ABR?

lildeezul
01-16-2009, 06:06 AM
Whichever the router has the default route on...

Usually in Real world implementation is the ASBR, because these routers usually have a default route pointing to the internet....

You might be thinking, well what about stubby area, they use defualt routes ? well your right, but those are stub area, and have one way out their network , which means they do not need to propagate their defualt route to their "defualt gateway" (their ABR)


hoe this helps

Fuzz
01-16-2009, 06:11 AM
I've been scanning an old CCNP Routing book for more info on EIGRP/OSPF, and it started talking about stub areas, totally stubby areas and not-so stubby areas (and virtual links too!) I think I'll save that until after I pass CCNA :p

I think I got it now though, thanks.

lildeezul
01-16-2009, 12:44 PM
I've been scanning an old CCNP Routing book for more info on EIGRP/OSPF, and it started talking about stub areas, totally stubby areas and not-so stubby areas (and virtual links too!) I think I'll save that until after I pass CCNA :p

I think I got it now though, thanks.


Oh yeah, they are a big concept for the CCNP track...
they are really crucial on these topics...

but they are indeed fun to learn, and once you understand them, you feel great.