0% found this document useful (0 votes)
31 views18 pages

Lil Lab

Uploaded by

Huseyn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views18 pages

Lil Lab

Uploaded by

Huseyn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MOHAMED AHMED IBRAHIM ON LINKED IN

+971544327623
DUBAI - UAE

OSPF General Lab


Hello everyone;
in this lab we will try to cover the OSPF configuration from a perspective of a CCNA
Certified person, hopefully this will provide some help for those who are studying for
the CCNA nowadays. Best of luck.

Tasks;
1- Configure Hostnames and IP addresses as in the topology.
2- Configure OSPF areas as in the topology.
 Use the network command with R1, R2, R3.
 Use the interface config-mode with R4, R5.
3- Configure the Router ID using the router number for all routers.
4- Configure the LAN-connected interface as “passive-interface”.
5- Configure R1 as the OSPF-network’s default gateway.
6- Differentiate the interfaces’ OSPF cost, based on their real bandwidth.
 there are three ways to do so, refer to them.
7- Reelect the DR, and BDR routers.
 Change the router priority.
8- Connect R1 and R2 with a serial interface and configure R1 as DCE.
9- Configure layer of security (OSPF Authentication) between R1, and R2.
10- Configure OSPF summarization for the loopback networks on R5.

MOHAMED AHMED IBRAHIM 1

“Don’t count the days, make the days count.”


MOHAMED AHMED IBRAHIM ON LINKED IN
+971544327623
DUBAI - UAE

 OVERALL HINTS
 OSPF’s commands

Configuring the hostnames and IP address;


Router 1:
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#int g0/0
R1(config-if)#ip add [Link] [Link]
R1(config-if)#no shut
R1(config-if)#int s2/0
R1(config-if)#ip add [Link] [Link]
R1(config-if)#no shut

Router 2:
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#int s2/0
R2(config-if)#ip add [Link] [Link]
R2(config-if)#no shut
R2(config-if)#int g0/0
R2(config-if)#ip add [Link] [Link]
R2(config-if)# no shut

Router 3:
R3(config)#int g0/0
R3(config-if)#ip add [Link] [Link]
R3(config-if)#no shut
R3(config-if)#int g1/0
R3(config-if)#ip add [Link] [Link]
R3(config-if)#no shut

And so on with R4.


Router 5:
R5#conf t
R5(config)#int g0/0
R5(config-if)#ip add [Link] [Link]
R5(config-if)#no shut
R5(config-if)#int loop 0
R5(config-if)#ip add [Link] [Link]
R5(config-if)#int loop 1

MOHAMED AHMED IBRAHIM 2

“Don’t count the days, make the days count.”


MOHAMED AHMED IBRAHIM ON LINKED IN
+971544327623
DUBAI - UAE

R5(config-if)#ip add [Link] [Link]


R5(config-if)#int loop 2
R5(config-if)#ip add [Link] [Link]
R5(config-if)#int loop 3
R5(config-if)#ip add [Link] [Link]
R5(config-if)#

Configure the ISP:


ISP(config)#int g0/0
ISP(config-if)#ip add [Link] [Link]
ISP(config-if)#no shut

Configure Net-4:
PC2> ip [Link] [Link] [Link]
Checking for duplicate address...
PC1 : [Link] [Link] gateway [Link]

Configure Net-3:
PC1> ip [Link] [Link] [Link]
Checking for duplicate address...
PC1 : [Link] [Link] gateway [Link]

Configuring OSPF Process:


Use the network command with R1, R2, R3
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router ospf 1
R1(config-router)#network [Link] [Link] area 0

R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router ospf 1
R2(config-router)#network [Link] [Link] area 0
*Sep 18 [Link].227: %OSPF-5-ADJCHG: Process 1, Nbr [Link] on Serial2/0 from LOADING to
FULL, Loading Done
R2(config-router)#network [Link] [Link] area 0

R3#conf t
R3(config)#router ospf 1
R3(config-router)#network [Link] [Link] area 0

MOHAMED AHMED IBRAHIM 3

“Don’t count the days, make the days count.”


MOHAMED AHMED IBRAHIM ON LINKED IN
+971544327623
DUBAI - UAE

R3(config-router)#
*Sep 18 [Link].275: %OSPF-5-ADJCHG: Process 1, Nbr [Link] on GigabitEthernet0/0 from
LOADING to FULL, Loading Done
R3(config-router)#network [Link] [Link] area 0

-if)#

Use the interface config-mode with R4, R5


R4#conf t
R4(config)#router ospf 1
R4(config-router)#int g0/0
R4(config-if)#ip ospf 1 area 0
R4(config-if)#int g1/0
R4(config-if)#
*Sep 18 [Link].055: %OSPF-5-ADJCHG: Process 1, Nbr [Link] on GigabitEthernet0/0 from
LOADING to FULL, Loading Done
R4(config-if)#
*Sep 18 [Link].515: %OSPF-5-ADJCHG: Process 1, Nbr [Link] on GigabitEthernet0/0 from
LOADING to FULL, Loading Done
R4(config-if)#ip ospf 1 area 4
R4(config-if)#

R5#
R5#conf t
R5(config)#router ospf 1

R5(config)#int g0/0
R5(config-if)#ip ospf 1 area 0
R5(config-if)#
*Sep 18 [Link].039: %OSPF-5-ADJCHG: Process 1, Nbr [Link] on GigabitEthernet0/0 from
LOADING to FULL, Loading Done
R5(config-if)#
*Sep 18 [Link].631: %OSPF-5-ADJCHG: Process 1, Nbr [Link] on GigabitEthernet0/0 from
LOADING to FULL, Loading Done
R5(config-if)#
R5(config-if)#int loop0
R5(config-if)#ip ospf 1 area 5
R5(config-if)#int loop1
R5(config-if)#ip ospf 1 area 5
R5(config-if)#int loop2
R5(config-if)#ip ospf 1 area 5
R5(config-if)#int loop3
R5(config-if)#ip ospf 1 area 5
R5(config

MOHAMED AHMED IBRAHIM 4

“Don’t count the days, make the days count.”


MOHAMED AHMED IBRAHIM ON LINKED IN
+971544327623
DUBAI - UAE

To verify OSPF configuration use (show ip route ospf, and ping) commands.
R2#show ip route ospf

Gateway of last resort is not set

[Link]/24 is subnetted, 2 subnets


O [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
[Link]/32 is subnetted, 4 subnets
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0

R5#ping [Link]
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/62/72 ms
R5#

Show ip OSPF neighbors;


R2#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface


[Link] 1 FULL/DROTHER [Link] [Link] GigabitEthernet0/0
[Link] 1 FULL/BDR [Link] [Link] GigabitEthernet0/0
[Link] 1 FULL/DROTHER [Link] [Link] GigabitEthernet0/0
[Link] 0 FULL/ - [Link] [Link] Serial2/0
R2#

Q) why R2 is the DR for the network “[Link]/29”, even though it doesn’t have the highest RID?
R2#show ip ospf
Routing Process "ospf 1" with ID [Link]

Q) why there is no DR or BDR for the network of “[Link]/30”?

R4#show ip ospf nei

Neighbor ID Pri State Dead Time Address Interface

MOHAMED AHMED IBRAHIM 5

“Don’t count the days, make the days count.”


MOHAMED AHMED IBRAHIM ON LINKED IN
+971544327623
DUBAI - UAE

[Link] 1 2WAY/DROTHER [Link] [Link] GigabitEthernet0/0


[Link] 1 FULL/DR [Link] [Link] GigabitEthernet0/0
[Link] 1 FULL/BDR [Link] [Link] GigabitEthernet0/0
R4#
Note; R4 has FULL adjacency only with the DR and BDR, but the state between R4 and R5 will stay at
2WAY, because the both are DRother.

Configure the Router ID using the router number for all routers:
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router ospf 1
R1(config-router)#router-id [Link]
% OSPF: Reload or use "clear ip ospf process" command, for this to take effect
R1(config-router)#

And do so with all routers, and then clear the ip ospf process on the all routers.
If you clear the ospf process only on the DR;
R2#clear ip ospf process
Reset ALL OSPF processes? [no]: y

R2#show ip ospf nei

Neighbor ID Pri State Dead Time Address Interface


[Link] 1 2WAY/DROTHER [Link] [Link] GigabitEthernet0/0
[Link] 1 FULL/DR [Link] [Link] GigabitEthernet0/0
[Link] 1 2WAY/DROTHER [Link] [Link] GigabitEthernet0/0
[Link] 0 FULL/ - [Link] [Link] Serial2/0
R2#

After clearing the ospf process on all routers;


R2#show ip ospf nei

Neighbor ID Pri State Dead Time Address Interface


[Link] 1 2WAY/DROTHER [Link] [Link] GigabitEthernet0/0
[Link] 1 FULL/BDR [Link] [Link] GigabitEthernet0/0
[Link] 1 FULL/DR [Link] [Link] GigabitEthernet0/0
[Link] 0 FULL/ - [Link] [Link] Serial2/0
R2#

Configure the LAN-connected interface as “passive-interface”.


MOHAMED AHMED IBRAHIM 6

“Don’t count the days, make the days count.”


MOHAMED AHMED IBRAHIM ON LINKED IN
+971544327623
DUBAI - UAE

R3#conf t
R3(config)#router ospf 1
R3(config-router)#passive-interface g1/0

ON R4, configure g1/0 a passive interface;


R4#conf t
R4(config)#router ospf 1
R4(config-router)#passive-interface g1/0

On R5, configure loop0, loop1, loop2, and loop3 as passive interfaces;


Since you have to configure several interfaces to passive, it’s better to use “passive-interface default”
command, and then activate needed interfaces.
R5#conf t
R5(config)#router ospf 1
R5(config-router)#passive-interface default
R5(config-router)#no passive-interface g0/0

Configure R1 as the OSPF-network’s default gateway;


To configure R1 as the default gateway for the OSPF network, you need to configure a static route on
it to the internet (ISP). And then run the “default-information originate” command on it.
R1#conf t
R1(config)#ip route [Link] [Link] [Link]
R1(config)#
R1(config)#router ospf 1
R1(config-router)#default-information originate
R1(config-router)#

If there is a routing protocol between R1 and the ISP, so you don’t have to configure a static route to
the ISP, just use the “always” with the command.
R1(config-router)#default-information originate always

Then show IP route ospf to verify that R1 advertising itself as the default gateway for the Network.
R5#show ip route ospf
Codes: E2 - OSPF external type 2
* - candidate default

Gateway of last resort is [Link] to network [Link]

O*E2 [Link]/0 [110/1] via [Link], [Link], GigabitEthernet0/0

MOHAMED AHMED IBRAHIM 7

“Don’t count the days, make the days count.”


MOHAMED AHMED IBRAHIM ON LINKED IN
+971544327623
DUBAI - UAE

[Link]/24 is subnetted, 2 subnets


O [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
[Link]/30 is subnetted, 1 subnets
O [Link] [110/65] via [Link], [Link], GigabitEthernet0/0
R5#

R4#show ip route ospf

Gateway of last resort is [Link] to network [Link]

O*E2 [Link]/0 [110/1] via [Link], [Link], GigabitEthernet0/0


[Link]/8 is variably subnetted, 3 subnets, 2 masks
O [Link]/24 [110/2] via [Link], [Link], GigabitEthernet0/0
[Link]/32 is subnetted, 4 subnets
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
[Link]/30 is subnetted, 1 subnets
O [Link] [110/65] via [Link], [Link], GigabitEthernet0/0

Notice; R2 advertising itself as the gateway for R3, R4, and R5, but its own gateway is R1.
R2#show ip route ospf

Gateway of last resort is [Link] to network [Link]

O*E2 [Link]/0 [110/1] via [Link], [Link], Serial2/0


[Link]/24 is subnetted, 2 subnets
O [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
[Link]/32 is subnetted, 4 subnets
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
R2

To verify;
Ping the internet from any router in the network.
R5#ping [Link]
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R5#

MOHAMED AHMED IBRAHIM 8

“Don’t count the days, make the days count.”


MOHAMED AHMED IBRAHIM ON LINKED IN
+971544327623
DUBAI - UAE

Q) Why R5 can ping ISP? Even though the R1 can ping ISP, and it’s the gateway of the network. and R5
can ping R1?
R1#ping [Link]
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/49/56 ms
R1#

R5#ping [Link]
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/56/64 ms
R5#

A) R1 can ping ISP because they’re directly connected, and R5 can ping R2 because it has an OSPF
router to it. But R5 can ping ISP, Because the ISP can’t send the “echo reply” to R5, because it doesn’t
have a route to R5. So, to troubleshoot that configure a static router on the ISP to R1.
ISP#conf t
Enter configuration commands, one per line. End with CNTL/Z.
ISP(config)#ip route [Link] [Link] [Link]
ISP(config)#

Now ping the ISP from any router in the network.


R5#ping [Link]
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/81/88 ms
R5#

Differentiate the interfaces’ OSPF cost, based on their real bandwidth;


In this topology we don’t need to edit the OSPF equation, because all interfaces are GigaEthernet,
and all routers have only one way to reach their OSPF neighbors. So, if you like to practice configuring
the OSPF cost you can use this lab.

MOHAMED AHMED IBRAHIM 9

“Don’t count the days, make the days count.”


MOHAMED AHMED IBRAHIM ON LINKED IN
+971544327623
DUBAI - UAE

source; Jeremy’s IT Lab (CCNA- OSPF Part 2).


Show ip route ospf on R1, and notice what is the route to “[Link]/24”.
With the default reference bandwidth (100 mbps).
R1#show ip route ospf
O [Link]/24 [110/3] via [Link], [Link], GigabitEthernet1/0
[110/3] via [Link], [Link], GigabitEthernet0/0

Now we should reconfigure the reference bandwidth in order to make R1 has only the best route to
“[Link]/24” on its route table. We have three ways to do so.
1) Change the reference bandwidth:
R1(config-router)# auto-cost reference-bandwidth megabits-per second

2) Manual configuration the OSPF Cost:


R1(config)# int g0/0
R1(config-if)# ip ospf cost 10

3) Change the interface bandwidth:


R3(config)# int f2/0
R3(config-if)#bandwidth ?
<1-10000000> Bandwidth in kilobits
R3(config-if)#bandwidth 1000000

I prefer to use the first mothed, running “auto-cost reference-bandwidth” command;


R1(config)#router ospf 1
R1(config-router)#auto-cost reference-bandwidth 100000
% OSPF: Reference bandwidth is changed.
Please ensure reference bandwidth is consistent across all routers.

MOHAMED AHMED IBRAHIM 10

“Don’t count the days, make the days count.”


MOHAMED AHMED IBRAHIM ON LINKED IN
+971544327623
DUBAI - UAE

And run the same command on all routers, and then show the R1 routing table againg and look at
“[Link]/24” network.
R1#show ip route ospf
O [Link]/24 [110/300] via [Link], [Link], GigabitEthernet0/0

Now R1 has only the best route to “[Link]/24” network.

Reelect the DR, and BDR routers.


First we need to show ip OSPF neighbors to see, which router is the DR and which is BDR.
R2#show ip ospf nei

Neighbor ID Pri State Dead Time Address Interface


[Link] 1 2WAY/DROTHER [Link] [Link] GigabitEthernet0/0
[Link] 1 FULL/BDR [Link] [Link] GigabitEthernet0/0
[Link] 1 FULL/DR [Link] [Link] GigabitEthernet0/0
[Link] 0 FULL/ - [Link] [Link] Serial2/0
R2#

We can see clearly that R5 is the DR, and R4 is the BDR. So, to configure R2 to the DR and R3 to be the
BDR.

How the DR and BDR being elected?


The DR and BDR will be elected based on which has the highest of these value in order;
1- The first one up on the first forty seconds.
2- Highest OSPF interface priority (default priority is 1).
3- Highest OSPF Router ID.

So, to reelect the DR and BDR, you need to change the Priority or reconfigure the RID.
In here we are going to change the Priority.
R2
R2#conf t
R2(config)#int g0/0
R2(config-if)#ip ospf priority ?
<0-255> Priority

R2(config-if)#ip ospf priority 255

R3

MOHAMED AHMED IBRAHIM 11

“Don’t count the days, make the days count.”


MOHAMED AHMED IBRAHIM ON LINKED IN
+971544327623
DUBAI - UAE

R3#conf t
R3(config)#int g0/0
R3(config-if)#ip ospf priority 252

And clear the OSPF process on all routers, in order to the change to take effect.
R5#clear ip ospf process
Reset ALL OSPF processes? [no]: y

Show ip ospf neighbor, to check the DR and BDR routers;


R4#show ip ospf nei

Neighbor ID Pri State Dead Time Address Interface


[Link] 255 FULL/DR [Link] [Link] GigabitEthernet0/0
[Link] 252 FULL/BDR [Link] [Link] GigabitEthernet0/0
[Link] 1 2WAY/DROTHER [Link] [Link] GigabitEthernet0/0
R4#

On R2
R2#show ip ospf nei

Neighbor ID Pri State Dead Time Address Interface


[Link] 252 FULL/BDR [Link] [Link] GigabitEthernet0/0
[Link] 1 FULL/DROTHER [Link] [Link] GigabitEthernet0/0
[Link] 1 FULL/DROTHER [Link] [Link] GigabitEthernet0/0
[Link] 0 FULL/ - [Link] [Link] Serial2/0
R2#

Connect R1 and R2 with a serial interface and configure R1 as DCE;


R1(config)#int s2/0
R1(config-if)#clock rate ?
With the exception of the following standard values not subject to rounding,

1200 2400 4800 9600 14400 19200 28800 38400


56000 64000 128000 2015232

accepted clockrates will be bestfitted (rounded) to the nearest value


supportable by the hardware.

<246-8064000> DCE clock rate (bits per second)

R1(config-if)#clock rate 128000

MOHAMED AHMED IBRAHIM 12

“Don’t count the days, make the days count.”


MOHAMED AHMED IBRAHIM ON LINKED IN
+971544327623
DUBAI - UAE

To verify show controllers;


R1#show controllers s2/0
M4T: show controller:
line state: up
cable type : V.11 (X.21) DCE cable, received clockrate 128000

R2# show controllers s2/0


DTE V.35 TX and RX clocks detected

Hint; with GNS3 R2 “show controller” will display the same as in R1, but this what supposed to be
displayed on R2. (Try it on Cisco Packet Tracer).

Configure layer of security (OSPF Authentication) between R1, and R2;


Configure the OSPF authentication on R1;
R1#conf t
R1(config)#int s2/0
R1(config-if)#ip ospf authentication ?
message-digest Use message-digest authentication
null Use no authentication
<cr>

R1(config-if)#ip ospf authentication


R1(config-if)#ip ospf authentication-key 123

If you show ip ospf neighbor on R2, you’ll find the adjacency state going down.
R2#SHOW IP OSPF NEI

Neighbor ID Pri State Dead Time Address Interface


[Link] 252 FULL/BDR [Link] [Link] GigabitEthernet0/0
[Link] 1 FULL/DROTHER [Link] [Link] GigabitEthernet0/0
[Link] 1 FULL/DROTHER [Link] [Link] GigabitEthernet0/0
[Link] 0 FULL/ - [Link] [Link] Serial2/0
R2#
*Sep 19 [Link].939: %OSPF-5-ADJCHG: Process 1, Nbr [Link] on Serial2/0 from FULL to DOWN,
Neighbor Down: Dead timer expired

To fix this you have to configure the same OSPF authentication on R2.
R2#conf t
R2(config)#int s2/0
R2(config-if)#ip ospf authentication
MOHAMED AHMED IBRAHIM 13

“Don’t count the days, make the days count.”


MOHAMED AHMED IBRAHIM ON LINKED IN
+971544327623
DUBAI - UAE

R2(config-if)#ip ospf authentication-key 123

Note; there are three types of OSPF authentication, the one we used in here is type “1” which means
a clear text encryption. And here are the other types.
OSPF Authentication types;
Type 0: “Null”.
Type 1: “clear text”.
Type 2: “MD5”.

Let’s see how to configure the OSPF type “2” authentication;


R2#CONF T
R2(config)#int s2/0
R2(config-if)#ip ospf authentication message-digest
R2(config-if)#ip ospf message-digest-key 1 ?
md5 Use MD5 algorithm

R2(config-if)#ip ospf message-digest-key 1 md5 ?


<0-7> Encryption type (0 for not yet encrypted, 7 for proprietary)
LINE The OSPF password (key) (maximum 16 characters)

R2(config-if)#ip ospf message-digest-key 1 md5 123

How to troubleshoot OSPF Authentication?


When you see the adjacency state when down, debug the ospf adjacency.
R2#
*Sep 19 [Link].939: %OSPF-5-ADJCHG: Process 1, Nbr [Link] on Serial2/0 from FULL to DOWN,
Neighbor Down: Dead timer expired

Debug the ospf adjacency;


R2#debug ip ospf adj
OSPF adjacency debugging is on
*Sep 19 [Link].587: OSPF-1 ADJ Se2/0: Rcv pkt from [Link] : Mismatched Authentication
type. Input packet specified type 1, we use type 0
R2#u all
All possible debugging has been turned off
R2#
This means the neighbor is using OSPF authentication type 1, but this router doesn’t use any OSPF
authentication, so we need to configure OSPF authentication type 1 on R2 as it’s on R1.

Configure OSPF summarization for the loopback networks on R5.

MOHAMED AHMED IBRAHIM 14

“Don’t count the days, make the days count.”


MOHAMED AHMED IBRAHIM ON LINKED IN
+971544327623
DUBAI - UAE

Show the OSPF routing table on R2 before summarization and compare it later to after
summarization;
Before;
R2#show ip route ospf
Codes: O - OSPF, IA - OSPF inter area, * - candidate default, E2 - OSPF external type 2

Gateway of last resort is [Link] to network [Link]

O*E2 [Link]/0 [110/1] via [Link], [Link], Serial2/0


[Link]/24 is subnetted, 2 subnets
O [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
[Link]/32 is subnetted, 4 subnets
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
R2#

First notice; the loopback networks have been configured with /24. But they have been advertised
with /32, because they are loopback interfaces. So, we need to change their network type to “Point-
to-Point”.
R5#conf t
R5(config)#int loop0
R5(config-if)#ip ospf network point-to-point
R5(config-if)#int loop1
R5(config-if)#ip ospf network point-to-point
R5(config-if)#int loop2
R5(config-if)#ip ospf network point-to-point
R5(config-if)#int loop3
R5(config-if)#ip ospf network point-to-point

After changing the network type to “Point-to-Point”.


R2#show ip route ospf

Gateway of last resort is [Link] to network [Link]

O*E2 [Link]/0 [110/1] via [Link], [Link], Serial2/0


[Link]/24 is subnetted, 2 subnets
O [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
[Link]/24 is subnetted, 4 subnets
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0

MOHAMED AHMED IBRAHIM 15

“Don’t count the days, make the days count.”


MOHAMED AHMED IBRAHIM ON LINKED IN
+971544327623
DUBAI - UAE

O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0


R2#

Now we need to find the network ID that include these four subnets.
The network 0d The network 0b
[Link] 00001111.00000000.00000000.00000000
[Link] 00001111.00000001.00000000.00000000
[Link] 00001111.00000010.00000000.00000000
[Link] 00001111.00000011.00000000.00000000
[Link]/14 00001111.00000000.00000000.00000000
So, the network is “[Link]/14”

Now we can configure R5 to advertise the summarization of its loopback networks.


R5# conf t
R5(config)# router ospf 1
R5(config-router)# area 5 range [Link] [Link]

And now show the ospf router on R2 and compare it with the previous one;
R2#show ip route ospf

Gateway of last resort is [Link] to network [Link]

O*E2 [Link]/0 [110/1] via [Link], [Link], Serial2/0


[Link]/24 is subnetted, 2 subnets
O [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
[Link]/14 is subnetted, 1 subnets
O IA [Link] [110/2] via [Link], [Link], GigabitEthernet0/0
R2#

Hint; the OSPF summarization can be configured only on the ABR, and ASBR, and under the OSPF
Process.

MOHAMED AHMED IBRAHIM 16

“Don’t count the days, make the days count.”


MOHAMED AHMED IBRAHIM ON LINKED IN
+971544327623
DUBAI - UAE

OVERALL HINTS;

To display the subnet mask of an interface use (show interface “g0/0”);


R1#show int g0/0
GigabitEthernet0/0 is up, line protocol is up (connected)
Hardware is Lance, address is 0000.0c33.e391 (bia 0000.0c33.e391)
Internet address is [Link]/30

To display the Interfaces’ OSPF cost use (show ip ospf interface brief);
R1# show ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Gi2/0 1 0 [Link]/28 1 DR 0/0
Gi1/0 1 0 [Link]/30 1 DR 1/1
Gi0/0 1 0 [Link]/30 1 DR 1/1
R1#

OSPF’s commands;
Command Purpose
R1(config)#router ospf 1 Configure the OSPF process ID.
R1(config-router)#network [Link] [Link] Specify an OSPF network.
area 0
R1(config-if)# ip ospf 1 area 0 Specify an OSPF interface.
R3#show ip protocol Display the running Routing Protocol on the
Router.
R1(config-router)#passive-interface g2/0 Configure the interface as OSPF passive
interface.
R1(config-router)# passive-interface default Configure all interfaces as OSPF passive
interface.
R1(config-router)# default-information Configure the router as the OSPF Network
originate
gateway.
R1#show ip route ospf Displays the OSPF routing table.
R1(config)#router OSPF 1 Manually configure the OSPF router ID.
R1(config-router)# router-id [Link]
R1#clear ip ospf process Clear the OSPF routing table, and reelect the
DR, and BDR.
R1(config-router)#maximum-paths ? Configure the maximum path for “ECMP”
R1(config-router)# distance ? Reconfigure the OSPF distance.

MOHAMED AHMED IBRAHIM 17

“Don’t count the days, make the days count.”


MOHAMED AHMED IBRAHIM ON LINKED IN
+971544327623
DUBAI - UAE

R1(config-if)#ip ospf hello-interval sec To modify the Hello interval value.


R1(config-if)#ip ospf dead-interval sec To modify the dead interval value.
R1# Show run | section ospf Display all OSPF configuration on the router.
R1#show int g0/0 Displays the IP address, and the subnet mask of
the interface.
R1#show ip ospf database Displays the OSPF database’s content.
R1#show ip ospf neighbor Displays the Router’s OSPF Neighbors, and
their adjacent state
R1#show ip ospf interface Displays the details of the current OSPF
settings on the interface
R1#show ip ospf interface brief Displays the interface’s (IP address, mask,
priority, OSPF area, cost, full adjacency
neighbors and total neighbors).
R1(config-router)# auto-cost reference- Configure the reference bandwidth, to
bandwidth megabits-per second
differential between (Giga and FastEthernet).
R1(config-if)# ip ospf cost 10000 Configure the interface OSPF cost manually.
R1(config-if)#bandwidth ? kbps Configure the interface bandwidth.
R1(config-if)#speed ? mbps Configure the interface speed.
R1(config)# int g0/0
R1(config-if)# ip ospf priority ? Configure the OSPF interface’s priority.

R1(config)#int s2/0
R1(config-if)#ip ospf authentication Configure an OSPF Authentication type 1 on
R1(config-if)#ip ospf authentication-key 123 R1’s interface serial 2/0
R2(config)#int s2/0
R2(config-if)#ip ospf authentication Configure an OSPF Authentication type 2 on
message-digest R2’s interface serial 2/0
R2(config-if)#ip ospf message-digest-key 1
md5 123
To check against the OSPF Authentication
R2#debug ip ospf adj
misconfiguration.
To check against the OSPF Hello-interval
R2#debug ip ospf hello
misconfiguration.
R5(config)# router ospf 1 To configure an OSPF Summarization on an
R5(config-router)# area 5 range [Link]
[Link] ABR, or ASBR.

Kindly feel free to share any note or advice, you’ll be welcome.


Wish you all the best.
MOHAMED AHMED IBRAHIM 18

“Don’t count the days, make the days count.”

You might also like