OSPF - Single Area - Ethernet: Khawar Butt Ccie # 12353 (R/S, Security, SP, DC, Voice, Storage & Ccde)
OSPF - Single Area - Ethernet: Khawar Butt Ccie # 12353 (R/S, Security, SP, DC, Voice, Storage & Ccde)
Loopback0 Loopback0
2.0.0.0/8 3.0.0.0/8
R1
E 0/0
Loopback0
c 6.0.0.0/8
R2 R3
E 0/0 E 0/0
S 1/0 192.168.100.0/24 E 0/1
R6
192.168.101.0/24 192.168.103.0/24 E 0/0
S 1/0
E 0/0
R5
S 1/1 R4
S 1/0
192.168.102.0/24
Loopback0
5.0.0.0/8 Loopback0
4.0.0.0/8
OSPF on a Ethernet Segment
When you enable OSPF on a Ethernet Interface, it knows it is a Multi-Access Segment.
It will look for a DR on the segment. All neighbors will form a Neighbor relationship with the DR &
BDR on the segment.
Each Multi-access segment will have its own DR/BDR.
If it is the first router on the Interface, it will waitcto conduct a DR/BDR election. The wait time by
default is 40 seconds.
The DR/BDR election criteria is as follows:
1. Highest Interface Priority [OSPF Priority]. The default OSPF priority is 1. Higher the Better.
2. Router-id is the Tie Breaker. As the Router ID has to be unique, the highest Router ID device becomes the DR.
There is no Pre-emption in the DR/BDR election.
To set the Interface Priority for OSPF, use the following Interface specific command:
Interface E 0/0
ip ospf priority 10
Basic OSPF Configuration
OSPF Routers requires a unique identifier. This ID is known as the Router
ID.
It can be set either of the 3 ways and in that order.
1. Manually under the Router ospf processc using the “router-id” command.
2. If the command is missing under the process, OSPF tries to pick the router-id
based on the Highest IP address on a Loopback.
3. If you don't have a loopback interface, it will use the highest IP address on any
Physical Interface.
R1(config)#Router ospf 1
R1(config-router)#router-id 0.0.0.1
Network Command
Just like the other Routing protocols, the “Network” Command is used by the Routing
Protocols on the specified Interface.
By Enabling the routing protocol under the interface, it will take the following 2 actions:
• 1. It will allow the router to send and receive OSPF updates on that interface.
c
• 2. It will send/advertise this interface network on other OSPF enabled interfaces.
In OSPF, the network command allows you the ability to enable OSPF on a Major network or
subnets. The subnets can be specified using a Inverse Mask.
The Area that the interface belongs to is also specified in the Network Command.
You enable OSPF on all the directly connected interfaces.
R1(config)#Router OSPF 1
R1(config-router)#Network 10.1.1.0 0.0.0.255 area 0
R1(config-router)#Network 11.0.0.0 0.255.255.255 area 0
R1(config-router)#Network 192.1.13.0 0.0.0.255 area 0
Lab Configuration
Configure OSPF in area 0 on the 2 Ethernet Segments. Also enable OSPF on
the Loopback Interfaces on routers that don’t have them enabled.
c
Configure the Priority such that R1 is the DR on the 192.168.100.0/24
segment and R2 is the BDR.
Let the Router-id act as the Tie breaker for the DR/BDR election on the
192.168.103.0/24 segment.
Lab Configuring
R1
R1(config)#Router OSPF 1
R1(config-router)#router-id 0.0.0.1
R1(config-router)#network 192.168.100.0 0.0.0.255 area 0
R1(config-router)#network 1.0.0.0 0.255.255.255 area 0
c
R2
R2(config)#Router OSPF 1
R2(config-router)#network 192.168.100.0 0.0.0.255 area 0
R3
R3(config)#Router OSPF 1
R3(config-router)#router-id 0.0.0.3
R3(config-router)#network 192.168.100.0 0.0.0.255 area 0
R3(config-router)#network 192.168.103.0 0.0.0.255 area 0
R3(config-router)#network 3.0.0.0 0.255.255.255 area 0
Lab Configuring
R4
R4(config)#Router OSPF 1
R4(config-router)#network 192.168.103.0 0.0.0.255 area 0
R6 c
R6(config)#Router OSPF 1
R6(config-router)#router-id 0.0.0.6
R6(config-router)#network 192.168.103.0 0.0.0.255 area 0
R6(config-router)#network 6.0.0.0 0.255.255.255 area 0
Verifications
Type Show IP OSPF Neighbors on R1. You should see 2 Neighbors listed.
Type Show IP OSPF Interface E 0/0 on R1. The Link will have a Network Type of Broadcast.
[Ethernet is classified as Broadcast Multi-Access].
c
Who is it DR for this segment? Who is the BDR for the Segment?
Type Show IP route OSPF on R1. You should see the Loopback Interfaces of all the routers.
They will be listed as a Host router “/32”. This is due to the fact that OSPF treats a Loopback as
a Host and advertises it with a /32 mask.
Type Show IP OSPF Interface E 0/1 on R3. Who is it DR for this segment? Who is the BDR for
the Segment?
Whiteboard