Nov 22, 2011

Abstract of CCNA study guide-29 - OSPF 3

OSPF DR and BDR Elections
 I need to expand the section on designated routers and backup designated routers.
To start with, I need to make sure you fully understand the terms neighbors and adjacencies again.
Two routers won’t become neighbors unless they agree on the following:
-        Area ID
-        Authentication OSPF allows for the configuration of a password for a specific area.
-        Hello and Dead intervals OSPF exchanges Hello packets on each segment. OSPF requires these intervals to be exactly the same between two neighbors. You can see these timers with the show ip ospf interface command.
Adjacent routers are routers that go beyond the simple Hello exchange and proceed into the database exchange process.
In order to minimize the amount of information exchanged, OSPF elects one router to be a designated router (DR) and one router to be a backup designated router (BDR) on each multi-access segment.
The BDR is elected as a backup router in case the DR goes down. The idea behind this is that routers have a central point of contact for information exchange.

DR and BDR Elections
only segments that are broadcast and non-broadcast multi-access networks(such as Ethernet and Frame Relay) will perform DR and BDR elections. Point-to-point links, like a serial WAN for example, will not have a DR election process.
On a broadcast or non-broadcast multi-access network, the router with the highest OSPF priority on a segment will become the DR for that segment.
This priority is shown with the show ip ospf interface command, which is set to 1 by default. If all routers have the default priority set, the router with the highest Router ID (RID) will win.
The RID is determined by the highest IP address on any interface at the moment of OSPF startup. This can be overridden with a loopback (logical) interface.
If you set a router’s interface to a priority value of zero, that router won’t participate in the DR or BDR election on that interface.
OSPF and Loopback Interfaces
Loopback interfaces are logical interfaces, which are virtual, software-only interfaces. Using loopback interfaces with your OSPF configuration ensures that an interface is always active for OSPF processes.
By default, OSPF uses the highest IP address on any active interface at the moment of OSPF startup.
this can be overridden by a logical interface. The highest IP address of any logical interface will always become a router’s RID.

Configuring Loopback Interfaces
First, let’s see what the RID is on the Corp router with the show ip ospf command:
Corp#sh ip ospf
Routing Process "ospf 132" with ID
[output cut]
We can see that the RID is, or the serial 0/2/0 interface of the router. So let’s configure
a loopback interface using a completely different IP addressing scheme:
Corp(config)#int loopback 0
*Mar 22 01:23:14.206: %LINEPROTO-5-UPDOWN: Line protocol on Interface
Loopback0, changed state to up
Corp(config-if)#ip address
The IP scheme really doesn’t matter here, but each router has to be in a separate subnet. By using the /32 mask, we can use any IP address we want as long as the addresses are never the same on any two routers.

Let’s check into that by taking a look at the Corp’s RID:
Corp#sh ip ospf
Routing Process "ospf 132" with ID
What happened?
You should reboot the router or delete OSPF and re-create the database on your router to see the changes.
Now let’s look and see what our RID is:
Corp#sh ip ospf
Routing Process "ospf 132" with ID

there is one other way about adding a new RID for the router under the router ospf  process-id command instead?
Here’s an example of doing that on the 871W router:
871W#sh ip ospf
Routing Process "ospf 1" with ID
871W#config t
871W(config)#router ospf 1

Reload or use "clear ip ospf process" command, for this to take effect
871W(config-router)#do clear ip ospf process
Reset ALL OSPF processes? [no]: yes
871W(config-router)#do sh ip ospf
Routing Process "ospf 1" with ID

We changed the RID without reloading the router! But wait—remember, we didn’t set a loopback (logical interface) yet. So let’s try that now—let’s set a logical interface IP address, reload the router, and see if the loopback interface overrides the router-id command we just used:
871W(config-router)#int lo0
871W(config-if)#ip address
System configuration has been modified. Save? [yes/no]: y
Building configuration...
871W#sh ip ospf
Routing Process "ospf 1" with ID
Well, there’s our answer. A logical (loopback) interface will not override the router-id command, and we don’t have to reboot the router to make it take effect as the RID.

OSPF Interface Priorities
we can use priorities instead of logical addresses to force a certain router to become the DR or BDR in a network.
R2#config t
R2(config)#int f0/0
R2(config-if)#ip ospf priority ?
<0-255> Priority
R2(config-if)#ip ospf priority 2
All router interfaces default to a priority of 1, so by setting this interface to 2, I’ve ensured that it will automatically become the DR of the LAN segment. Setting an interface to 255 means that no one can beat your router!
Notice that: Even if you change the priority of the interface, the router will not become the DR of the LAN segment until both the existing DR and the BDR are shut down.
You can see your priority with the show ip ospf interface command:
R2(config-if)#do show ip ospf int f0/0
FastEthernet0/0 is up, line protocol is up
Internet Address, Area 0
Process ID 132, Router ID, Network Type BROADCAST,Cost:1
Transmit Delay is 1 sec, State UP, Priority 2

Notice that, we have three options to ensure that Router will be elected the DR for the LAN segment:
-        Configure the priority value of the interface of the router to a higher value than any other interface on the Ethernet network.
-        Configure a loopback interface on the Router with an IP address higher than any IP address on the other routers.
-        Change the priority value of Other Routers interfaces to zero.

No comments:

Post a Comment