Professional Documents
Culture Documents
01 OSPF LAB Solution
01 OSPF LAB Solution
Course Title
Semester/Year
Instructor
Lab Assignment No 02
Assignment Title Open Shortest Path First (OSPF)
Submission Date
Due Date
Submitted by
TABLE OF CONTENTS
Page No.1 of 52
Topic Page No.
Introduction …………………………………………………………………………. 3
Conclusion …………………………………………………………………….......... 52
Introduction:
In this lab, we have configured OSPF with single area and have applied different OSPF commands to
observe the different important features of OSPF like neighbor discovery, the state of the neighbors,
Designated Router (DR) selection, initiation of HELLO packet, cost of the link etc.
Page No.2 of 52
In the second part of this lab, we have configured Multi-Area routing domain and studied the link-
state database and have observed the difference between the database of an ABR and the database of
an interior router.
In the next part, we have configured route summarization and observed the metric associated with
the subnets. Then we have configured external route and studied the LSA database. In the next part,
STUB Areas have been configured and examined the routing table before and after the stub-area
configuration.
We have also configured Totally Stubby Areas and monitored the changes in the database and finally
in the last of the lab, virtual link has been configured and have analyzed the link-state databases.
Logical Topology:
Page No.3 of 52
1. Assign appropriate IP address to the interface of your routers according to the following
table.
We have configured the network topology based on frame-relay configuration at R7 and also we
ensured that the FastEthernet of R2, R5 and R7 were connected via S1, remaining in same VLAN
(here vlan 25). The configuration for Frame-relay and vlans were copied from the “Topology
conversion table”.
Page No.4 of 52
We have assigned the appropriate IP address to the interface of the routers according to the above
table and set the bandwidth of the serial link to 1.544 Mbps (1544 Kbps) and have configured OSPF
with single area (area 0) at the routers :
Page No.5 of 52
encapsulation frame-relay encapsulation frame-relay
ip ospf network point-to-point ip ospf network point-to-point
! !
interface Serial0/1/1 interface Serial0/1/1
bandwidth 1544 bandwidth 1544
ip address 10.16.1.1 255.255.255.0 ip address 10.16.5.2 255.255.255.0
encapsulation frame-relay encapsulation frame-relay
ip ospf network point-to-point ip ospf network point-to-point
! !
router ospf 1 router ospf 1
network 10.16.1.0 0.0.0.255 area 0 network 10.16.4.0 0.0.0.255 area 0
network 10.16.3.0 0.0.0.255 area 0 network 10.16.5.0 0.0.0.255 area 0
!
The configuration was similar for rest of the Routers. After configuration we have checked the
connectivity by pinging and found each segment of network can reach any segment once when ospf
was enabled and also checked the frame-relay routes in active status.
Page No.6 of 52
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.16.6.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/57/60 ms
4. Use show ip protocols and show ip route commands to verify that OSPF is enabled.
Command:
R1# sh ip route
Page No.7 of 52
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Ans: From the above result we can see that OSPF is enabled. All the subnets are known to the R1.
Two are directly connected and other five by OSPF routing protocol.
5. On your router, initiate the show ip ospf interface command and answer the following
questions:
• How many interface are configured for OSPF?
• What is the router ID used for each interface?
• Is there a DR for each configured network? If so, what is the DR IP address? If not, why not?
• How often are hello packets initiated?
• How many seconds will a router wait without receiving a hello packet before it considers the
neighbor as dead?
• What is the cost for each link that you have configured?
• What command can you use to modify the cost of the link?
Command:
Page No.8 of 52
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 10.16.128.2
Suppress hello for 0 neighbor(s)
Serial0/1/0 is up, line protocol is up
Internet Address 10.16.1.1/24, Area 0
Process ID 1, Router ID 10.16.2.2, Network Type POINT_TO_POINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_POINT
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:00
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 0, maximum is 0
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 0, Adjacent neighbor count is 0
Suppress hello for 0 neighbor(s)
Ans: Two interfaces (Serial0/1/0, Serial0/1/1) are configured for OSPF and the Router ID
is10.16.2.2. It is mentionable that we did not configure any loop back address, so the highest
interface among the up/up interfaces is selected as router ID. Again if we put Router ID x.x.x.x (into
OSPF configuration), then it will overwrite the router ID that was selected from loopback interface
(active) address.
• Is there a DR for each configured network? If so, what is the DR IP address? If not, why not?
Ans: In the topology R1 is connected to R2/R3 via “point to point network” connectivity. So there is
no DR.
DR is elected to reduce adjacency to half to the broadcast networks. In our topology R2, R5 and R7
are in a broadcast network, so the DR will be elected to that network.
As the priority for all three routers is 1(by default) so the tie will be broken by router ID. As the R7
has larger router ID (10.16.128.7), so it is selected as DR for that broadcast region of our topology.
Page No.9 of 52
Ans: The hello time interval is 10 seconds (Default for point to point network)
To be an OSPF neighbor, the hello interval of the peer routers must match.
• How many seconds will a router wait without receiving a hello packet before it considers the
neighbor as dead?
Ans: The dead time interval is 40 seconds (Default for point to point network), till 40 sec R1 will
consider R3 and R2 as neighbor if R3 or R2 don’t send hello.
Like hello interval, dead interval of the peer routers must match to form OSPF neighbor relationship.
• What is the cost for each link that you have configured?
Ans: R1 is connected to R2 and R3 via serial link having BW of 1544 kbps. So the ospf cost is
64(ospf cost = 10^8/BW (in bps)).
• What command can you use to modify the cost of the link?
Command:
R1(config-if)# ip ospf cost ?
<1-65535> Cost
R1(config-if)# ip ospf cost <cost>
6. Initiate the show ip ospf neighbor detail command on your router and answer the following
question:
• How many neighbors do you have?
• What are your neighbors’ router IDs?
• What state do the neighbors have? What does the state mean to the routers?
Command:
Here, the highest active interface IP is considered as router ID as we did not configure any loopback
interface. If we put the folloging commands to any router then the router id would be x.x.x.x
regardless its loopback or IP interfaces it have.
• What state do the neighbors have? What does the state mean to the routers?
Ans: Both the neighbors are in FULL state; this means that the neighbors Link State database is fully
synchronized and for all outdated LSAs all updates have been received.
Moreover, we also observed the neighbors for other routers and found as we expect. Below the
neighbor brief for R2 is shown.
Page No.11 of 52
Neighbor ID Pri State Dead Time Address Interface
10.16.128.5 1 FULL/BDR 00:00:31 10.16.128.5 FastEthernet0/0
10.16.128.7 1 FULL/DR 00:00:35 10.16.128.7 FastEthernet0/0
10.16.3.1 0 FULL/ - 00:00:32 10.16.3.1 Serial0/1/1
10.16.2.2 0 FULL/ - 00:00:39 10.16.2.2 Serial0/1/0
7. Verify that all the networks can be seen by your router by initiating the show ip ospf
database command.
Command:
Observation: All the routers belong to same area (area 0), so there exist only one database. There
were all 7 routers links (type 1) and 1 network link (type 2) for transit network Advertised by DR.
8. Use sh ip ospf data router and sh ip ospf database network commands to show the details of
the LSAs.
We have used “show ip ospf database router” and “show ip ospf database network” to show the
router LSA, the LSA-1 and the network LSA, LSA-2. As we set only one single area, all the routers
had the same database and LSAs for R1:
Command:
Page No.12 of 52
ID 1) (Link Data) Network Mask: 255.255.255.0
Number of TOS metrics: 0
Router Link States (Area 0) TOS 0 Metrics: 64
Page No.13 of 52
Number of TOS metrics: 0
Link connected to: a Stub Network TOS 0 Metrics: 64
(Link ID) Network/subnet number: 10.16.1.0
(Link Data) Network Mask: 255.255.255.0 Link connected to: a Stub Network
Number of TOS metrics: 0 (Link ID) Network/subnet number: 10.16.2.0
TOS 0 Metrics: 64 (Link Data) Network Mask: 255.255.255.0
Number of TOS metrics: 0
Link connected to: another Router (point-to-point) TOS 0 Metrics: 64
(Link ID) Neighboring Router ID: 10.16.128.2
(Link Data) Router Interface address: 10.16.3.1
Number of TOS metrics: 0 LS age: 330
TOS 0 Metrics: 64 Options: (No TOS-capability, DC)
LS Type: Router Links
Link connected to: a Stub Network Link State ID: 10.16.128.5
(Link ID) Network/subnet number: 10.16.3.0 Advertising Router: 10.16.128.5
(Link Data) Network Mask: 255.255.255.0 LS Seq Number: 80000006
Number of TOS metrics: 0 Checksum: 0x6745
TOS 0 Metrics: 64 Length: 84
Number of Links: 5
LS age: 326
Options: (No TOS-capability, DC) Link connected to: a Transit Network
LS Type: Router Links (Link ID) Designated Router address:
Link State ID: 10.16.5.2 10.16.128.7
Advertising Router: 10.16.5.2 (Link Data) Router Interface address:
LS Seq Number: 80000002 10.16.128.5
Checksum: 0xD9AA Number of TOS metrics: 0
Length: 72 TOS 0 Metrics: 1
Number of Links: 4
Link connected to: another Router (point-to-
Link connected to: another Router (point-to- point)
point) (Link ID) Neighboring Router ID: 10.16.6.1
(Link ID) Neighboring Router ID: 10.16.128.5 (Link Data) Router Interface address: 10.16.6.2
(Link Data) Router Interface address: 10.16.5.2 Number of TOS metrics: 0
Number of TOS metrics: 0 TOS 0 Metrics: 64
TOS 0 Metrics: 64
Link connected to: a Stub Network
Link connected to: a Stub Network (Link ID) Network/subnet number: 10.16.6.0
(Link ID) Network/subnet number: 10.16.5.0 (Link Data) Network Mask: 255.255.255.0
(Link Data) Network Mask: 255.255.255.0 Number of TOS metrics: 0
Number of TOS metrics: 0 TOS 0 Metrics: 64
TOS 0 Metrics: 64
Link connected to: another Router (point-to-
Link connected to: another Router (point-to- point)
point) (Link ID) Neighboring Router ID: 10.16.5.2
(Link ID) Neighboring Router ID: 10.16.6.1 (Link Data) Router Interface address: 10.16.5.1
(Link Data) Router Interface address: 10.16.4.1 Number of TOS metrics: 0
Number of TOS metrics: 0 TOS 0 Metrics: 64
TOS 0 Metrics: 64
Link connected to: a Stub Network
Link connected to: a Stub Network (Link ID) Network/subnet number: 10.16.5.0
(Link ID) Network/subnet number: 10.16.4.0 (Link Data) Network Mask: 255.255.255.0
(Link Data) Network Mask: 255.255.255.0 Number of TOS metrics: 0
Page No.14 of 52
Number of TOS metrics: 0 TOS 0 Metrics: 64
TOS 0 Metrics: 64
Link connected to: another Router (point-to- Link connected to: a Transit Network
point) (Link ID) Designated Router address:
(Link ID) Neighboring Router ID: 10.16.128.5 10.16.128.7
(Link Data) Router Interface address: 10.16.6.1 (Link Data) Router Interface address:
Number of TOS metrics: 0 10.16.128.7
TOS 0 Metrics: 64 Number of TOS metrics: 0
TOS 0 Metrics: 1
Command:
Observation: All the routers advertised their associated router LSA, LSA-1 (point to point, point to
transient network, point to stub network) and only R7 advertised network LSA, LAS-2.
Page No.15 of 52
9. Study the LSA databases of PnR1 and PnR4. With the knowledge of the network topology,
identify the LSAs used to compute the shortest paths from PnR1 and PnR4 to the subnet
10.n.128.0/24. Compute the cost associated with these paths based on these LSAs. Verify your
computation by comparing your results with the entries of the routing table.
Ans:
From the data from “show ip ospf data router” the cost calculation is as below:
From R1 to 10.16.128.0/24: 65
(Cost of a serial0/1/0 of R1= 64, Cost of fa0/0 of R2=1)
From R4 to 10.16.128.0/24:74
(Cost of a serial0/1/1 of R4= 64, Cost of fa0/0 of R5=1)
R1# sh ip route
R4# sh ip route
Page No.16 of 52
Gateway of last resort is not set
10. Identify the LSAs in your router for the point-to-point link between PnR3 and PnR2.
Ans: We have studied the router LSA at R1 as given on step 8. That point-to-point link was
advertised by R3 as router LSA and type was point-to-point. For verification relevant section of LSA
database is given as follows:
LS age: 351
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 10.16.3.1
Advertising Router: 10.16.3.1
LS Seq Number: 8000000E
Checksum: 0x43D4
Length: 72
Number of Links: 4
11. Disable this point-to-point link. Check the LSAs in the database of your router again. Do
the LSAs reflect the change of the link state?
We have disabled the link by shutdown the related interface and verified the LSAdatabase at R2 by
“show ip ospf database router” command.
Command:
R2# config t
R2(config)# interface serial 0/1/1
R2(config-if)# shut
Page No.17 of 52
R2(config-if)# do sh ip ospf database router
Page No.18 of 52
TOS 0 Metrics: 64 Options: (No TOS-capability, DC)
LS Type: Router Links
Link connected to: a Stub Network Link State ID: 10.16.128.5
(Link ID) Network/subnet number: 10.16.3.0 Advertising Router: 10.16.128.5
(Link Data) Network Mask: 255.255.255.0 LS Seq Number: 80000006
Number of TOS metrics: 0 Checksum: 0x6745
TOS 0 Metrics: 64 Length: 84
Number of Links: 5
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.16.1.0 Link connected to: a Transit Network
(Link Data) Network Mask: 255.255.255.0 (Link ID) Designated Router address: 10.16.128.7
Number of TOS metrics: 0 (Link Data) Router Interface address: 10.16.128.5
TOS 0 Metrics: 64 Number of TOS metrics: 0
LS age: 875 TOS 0 Metrics: 1
Options: (No TOS-capability, DC)
LS Type: Router Links Link connected to: another Router (point-to-point)
Link State ID: 10.16.6.1 (Link ID) Neighboring Router ID: 10.16.6.1
Advertising Router: 10.16.6.1 (Link Data) Router Interface address: 10.16.6.2
LS Seq Number: 80000003 Number of TOS metrics: 0
Checksum: 0x1170 TOS 0 Metrics: 64
Length: 72
Number of Links: 4 Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.16.6.0
Link connected to: another Router (point-to-point) (Link Data) Network Mask: 255.255.255.0
(Link ID) Neighboring Router ID: 10.16.128.5 Number of TOS metrics: 0
(Link Data) Router Interface address: 10.16.6.1 TOS 0 Metrics: 64
Number of TOS metrics: 0
TOS 0 Metrics: 64 Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 10.16.5.2
Link connected to: a Stub Network (Link Data) Router Interface address: 10.16.5.1
(Link ID) Network/subnet number: 10.16.6.0 Number of TOS metrics: 0
(Link Data) Network Mask: 255.255.255.0 TOS 0 Metrics: 64
Number of TOS metrics: 0
TOS 0 Metrics: 64 Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.16.5.0
Link connected to: another Router (point-to-point) (Link Data) Network Mask: 255.255.255.0
(Link ID) Neighboring Router ID: 10.16.5.2 Number of TOS metrics: 0
(Link Data) Router Interface address: 10.16.4.2 TOS 0 Metrics: 64
Number of TOS metrics: 0
TOS 0 Metrics: 64
LS age: 985
Link connected to: a Stub Network Options: (No TOS-capability, DC)
(Link ID) Network/subnet number: 10.16.4.0 LS Type: Router Links
(Link Data) Network Mask: 255.255.255.0 Link State ID: 10.16.128.7
Number of TOS metrics: 0 Advertising Router: 10.16.128.7
TOS 0 Metrics: 64 LS Seq Number: 8000000D
Checksum: 0xE5BA
LS age: 206 Length: 36
Options: (No TOS-capability, DC) Number of Links: 1
LS Type: Router Links
Link State ID: 10.16.128.2 Link connected to: a Transit Network
Advertising Router: 10.16.128.2 (Link ID) Designated Router address: 10.16.128.7
Page No.19 of 52
LS Seq Number: 80000009 (Link Data) Router Interface address: 10.16.128.7
Checksum: 0x5D60 Number of TOS metrics: 0
Length: 60 TOS 0 Metrics: 1
Number of Links: 3
Observation: After shutting down the link between R2 to R3 (interface serial 0/1/1 at R2), the result
was reflected on LSA database. Now R2 only advertised 3 “Router LSAs” which was 4 previously.
Also we can see the output.
1. Together with your pod members, configure the routers according to the following figure to
create a multi-area routing domain1.
Command:
R2# config t
R2(config)# router ospf 1
R2(config-router)# network 10.16.2.0 0.0.0.255 area 1
R2(config-router)# network 10.16.3.0 0.0.0.255 area 1
Page No.20 of 52
R2(config-router)# network 10.16.128.0 0.0.0.255 area 0
R2# sh ip protocols
Page No.21 of 52
Distance: (default is 110)
Observation: We have checked all the routers; routing protocol “ospf 1” is set to all the routers.
We also have checked the interfaces are in right area.
3. Use show ip ospf to verify that your router belongs to the right area(s).
Command:
We also have checked the interfaces of different routers and found in exact area. The output is
given below:
Page No.22 of 52
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Fa0/0 1 0 10.16.128.5/24 1 DROTH 2/2
Se0/1/1 1 2 10.16.6.2/24 64 P2P 1/1
Se0/1/0 1 2 10.16.5.1/24 64 P2P 1/1
R6# sh ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Se0/1/0 1 2 10.16.6.1/24 64 P2P 1/1
Se0/1/1 1 2 10.16.4.2/24 64 P2P 1/1
R7# sh ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Fa0/0 1 0 10.16.128.7/24 1 DR 2/2
4. Use show ip route to verify that your router has learned all the routers in the routing
domain.
Command:
Observation: From the above output of “show ip route”, it is observed that all 7 subnets were
informed by R1. Two subnets are directly connected (denoted as C), one form same region (area 1,
denoted as O) and other four routes are from different region/s (area 0 and area 2, denoted as O IA)
Page No.23 of 52
5. Study the link-state database of an interior router in area 1 (area 2). What types of LSAs are
in the database?
Command:
Answer to Question 5: From the above output of “show ip ospf database”, it is observed that a
router in a single area contains router LSA (LSA-1) and summary LSA (LSA-3) of that region.
Page No.24 of 52
6. Identify the LSAs used for the computation of the shortest path of an inter-area route from
the interior router in area 1 (area 2) to a subnet in area 2 (area 1).
Command:
Page No.25 of 52
Routing Bit Set on this LSA
LS age: 919
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 10.16.128.0 (summary Network Number)
Advertising Router: 10.16.128.2
LS Seq Number: 80000001
Checksum: 0x60A4
Length: 28
Network Mask: /24
TOS: 0 Metric: 1
Page No.26 of 52
Advertising Router: 10.16.128.5
LS Seq Number: 80000001
Checksum: 0x350A
Length: 28
Network Mask: /24
TOS: 0 Metric: 65
Observation: LSAs are used for the computation of the shortest path from one area to another area
have highlighted from “sh ip ospf database summary” output. It may be mentioned that from R1
there exists 4 Summary LSA (type - 3), three from area 2 and one for backbone. Again same is
applicable for an interior router in area 2 like R4.
7. Based on the LSAs, compute the cost of the inter-area route. Verify your computation by
comparing your result with the corresponding entry in the routing table.
Command:
R1# sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
Page No.27 of 52
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Observation: From the above output, we can say that our calculation matched with SPF algorithm.
8. Study the link-state database of an area border router (ABR). What is the main difference
between the database of an ABR and the database of an interior router?
Command:
Page No.28 of 52
10.16.3.0 10.16.128.2 605 0x80000001 0x003D06
10.16.4.0 10.16.128.5 893 0x80000001 0x00A25C
10.16.5.0 10.16.128.5 952 0x80000001 0x001529
10.16.6.0 10.16.128.5 952 0x80000001 0x000A33
Answer: In the topology, R2 and R5 are Area Broader Router (ABR) as their interfaces are
connected in more than one area. From the output we saw that R2 (ABR) contains LSA of connected
2 areas (area1 and area 0) whereas, an interior router (having all interfaces in one area) like R1 exists
with LSA of its own region only.
Page No.29 of 52
Part III: Configuring Route Summarization
1. Together with your pod members determine a list of possible route summarizations for area
1 (area 2).
2. Configure the route summarization for area 1 (area 2) at the appropriate routers.
Command:
R2# config t
R2(config)# router ospf 1
R2(config-router)# area 1 range 10.16.0.0 255.255.252.0
R5# config t
Page No.30 of 52
R5(config)# router ospf 1
R5(config-router)# area 2 range 10.16.4.0 255.255.252.0
3. Use show ip route to verify that the route summarization is configured correctly.
Command:
R4# sh ip route
R1# sh ip route
Page No.31 of 52
Observation: After configuring summery address for area 1 and area2 in ABRs, R1 (in area1) is
getting summery address of area 2 routes and vice versa for R4.
4. Ping various routers in area 1 (area 2) to verify that PnR4 (PnR1) can reach all the networks
based on the summarized route entries at the routing table.
5. Display the database of PnR4. Record the LSAs about the subnet in area 1. What is the
metric associated with the subnets in area 1. How this is metric devised.
Command:
Page No.32 of 52
Summary Net Link States (Area 2)
Observation: The R5 (10.16.128.5) advertises two summary LSAs, advertised for area0 having
cost 1 and for area 1 having cost 65 as highlighted above.
Answer to Step5:
The metric associated with the subnets in area 1 is 65 (Network Mask: /22, Metric: 65).
The Network Summary LSA advertised by R5 (10.16.128.5) which has Network Mask 22 and cost is
65. Here 65 = 64 +1 where 64 is the cost of serial link and 1 is the cost of Ethernet link associated
with R2.
6. Shut down the s0 interface of PnR2. Check the database again. Are there any changes on the
database? Why or why not?
Command:
R2# config t
R2(config)# interface s0/1/0
R2(config-if)# shutdown
Page No.33 of 52
R4#sh ip ospf database summary
Ans: There was no change in R4 (in area 2) summary LSA due to internal changes in area 1. Because
area 1 is summarized at R2. If any link goes down, R2 will keep sending the same summary without
change to area 2. So it will not affect database at another area.
1. Ask your instructor to enable the core router external link. (To simulate External Links, you
can use Loop-Back interfaces)
Command:
R7# config t
R7(config)# interface loopback 0
Page No.34 of 52
R7(config-if)# ip address 200.200.200.200 255.255.255.0
R7(config-if)# exit
R7(config)# router rip
R7(config)# version 2
R7(config-router)# network 200.200.200.200
R7(config-router)# exit
R7(config)# router ospf 1
R7(config-router)# redistribute rip subnets
Command:
3. From the AS-External LSA, determine the router ID of the ASBR and the metric type.
Command:
R1# show ip ospf database external
OSPF Router with ID (10.16.2.2) (Process ID 1)
Page No.35 of 52
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 200.200.200.0 (External Network Number )
Advertising Router: 10.16.128.7
LS Seq Number: 80000001
Checksum: 0x2381
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
Answer: The router ID of the ASBR is 10.16.128.7 and the Metric Type 2, (it is the default metric ,
the cost at any router is the cost advertised by the ASBR ).
4. Study the LSA database in an interior router; identify the LSAs used to determine the route
from the router to one of the external networks.
Command:
Page No.36 of 52
R1# sh ip ospf database external
Command:
R1# sh ip route
Page No.37 of 52
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Configuration R1, R2 and R3(for area 1) Configuration R4, R5 and R6(for area 2)
R1# config t R4# config t
R1(config)# router ospf 1 R4(config)# router ospf 1
R1(config-router)# area 1 stub R4(config-router)# area 2 stub
Command:
R1# sh ip ospf
Page No.38 of 52
Minimum LSA arrival 1000 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
Number of external LSA 0. Checksum Sum 0x000000
Number of opaque AS LSA 0. Checksum Sum 0x000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 1. 0 normal 1 stub 0 nssa
Number of areas transit capable is 0
External flood list length 0
IETF NSF helper support enabled
Cisco NSF helper support enabled
Area 1
Number of interfaces in this area is 2
It is a stub area
Area has no authentication
SPF algorithm last executed 00:01:22.288 ago
SPF algorithm executed 16 times
Area ranges are
Number of LSA 6. Checksum Sum 0x022511
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
R4# sh ip ospf
Page No.39 of 52
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 1. 0 normal 1 stub 0 nssa
Number of areas transit capable is 0
External flood list length 0
IETF NSF helper support enabled
Cisco NSF helper support enabled
Area 2
Number of interfaces in this area is 2
It is a stub area
Area has no authentication
SPF algorithm last executed 00:01:21.856 ago
SPF algorithm executed 9 times
Area ranges are
Number of LSA 6. Checksum Sum 0x022CB9
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
4. Display the LSA database of the interior router. What types of LSAs are missing in
compared with the database before the stub-area configuration.
OSPF Router with ID (10.16.2.2) (Process OSPF Router with ID (10.16.2.2) (Process
ID 1) ID 1)
Link ID ADV Router Age Seq# Link ID ADV Router Age Seq#
Checksum Link count Checksum Link count
10.16.2.2 10.16.2.2 282 0x80000005 10.16.2.2 10.16.2.2 252 0x80000007
0x0043DE 3 0x005DC4 3
10.16.3.1 10.16.3.1 1705 0x80000005 10.16.3.1 10.16.3.1 248
0x0055CB 3 0x8000000A 0x0069B4 3
10.16.128.2 10.16.128.2 423 0x80000009 10.16.128.2 10.16.128.2 246 0x80000010
0x0043CE 4 0x0053B9 4
Summary Net Link States (Area 1) Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Link ID ADV Router Age Seq#
Checksum Checksum
10.16.4.0 10.16.128.2 882 0x80000002 0.0.0.0 10.16.128.2 256 0x80000001
0x002B18 0x00475A
10.16.128.0 10.16.128.2 164 0x80000002 10.16.4.0 10.16.128.2 256 0x80000003
Page No.40 of 52
0x005EA5 0x0047FC
10.16.128.0 10.16.128.2 256 0x80000003
Summary ASB Link States (Area 1) 0x007A8A
Ans: AS-External LSA (LSA-5) and summary ASB LSA (LSA-4) were missing in the LSA
database.
5. Display the routing table of the interior router. Comment the difference between the routing
table before and after the stub-area configuration.
Command:
R1# sh ip route
Ans: At the internal router of stub area, external route were missing and default route was added in
stead.
Page No.41 of 52
Part VI: Configuring Totally Stubby Areas
1. Record the summary LSA (LSA type 3) and routing table of an interior router.
Command:
Page No.42 of 52
Network Mask: /24
TOS: 0 Metric: 1
R1# sh ip route
Observation: There was no difference in OSPF summary database as it was advertised by R2 about
networks of area 0 and area 2.
2. Disable the s0 interface of PnR2. Display the summary LSAs again. Note the difference
between the new and old LSAs and routing tables.
Command:
LS age: 639
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 0.0.0.0 (summary Network Number)
Advertising Router: 10.16.128.2
LS Seq Number: 80000001
Page No.43 of 52
Checksum: 0x475A
Length: 28
Network Mask: /0
TOS: 0 Metric: 1
LS age: 639
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 10.16.4.0 (summary Network Number)
Advertising Router: 10.16.128.2
LS Seq Number: 80000003
Checksum: 0x47FC
Length: 28
Network Mask: /22
TOS: 0 Metric: 65
LS age: 640
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 10.16.128.0 (summary Network Number)
Advertising Router: 10.16.128.2
LS Seq Number: 80000003
Checksum: 0x7A8A
Length: 28
Network Mask: /24
TOS: 0 Metric: 1
R1# sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Page No.44 of 52
Observation: In routing table of R1, directly connected network 10.16.2.0/24 is missing. There was
no difference in OSPF summary database as it was advertised by R2 about networks of area 0 and
area 2.
Configuration at R2 Configuration at R5
R2# config t R5# config t
R2(config)# router ospf 1 R5(config)# router ospf 1
R2(config-router)# area 1 stub no-summary R5(config-router)# area 2 stub no-summary
R1# sh ip ospf
Page No.45 of 52
Area has no authentication
SPF algorithm last executed 00:00:20.020 ago
SPF algorithm executed 18 times
Area ranges are
Number of LSA 4. Checksum Sum 0x015691
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
Observation: From output it is observed that R1 (under area 1, a stubby area) it has no inter area
summary, only has the default route.
5. How is the routing table compared with the routing table before the totally stubby-area
configuration?
Command:
R1# sh ip route
Page No.46 of 52
10.0.0.0/24 is subnetted, 3 subnets
C 10.16.2.0 is directly connected, Serial0/1/1
O 10.16.3.0 [110/128] via 10.16.2.1, 00:00:02, Serial0/1/1
C 10.16.1.0 is directly connected, Serial0/1/0
O*IA 0.0.0.0/0 [110/65] via 10.16.2.1, 00:00:02, Serial0/1/1
Ans : The stubby area has inter-area routes and a default route for others. But totally stubby area
router did not have any inter area routes, it had only default route for other routes.
6. Now enable and disable the s0 interface of PnR2. Did you see any changes in the LSA
database and the routing table of the router?
Command:
R2# config t
R2(config)# interface s0/1/0
R2(config-if)# no shut
R2(config-if)# shutdown
Observation: We have enabled and disabled s0/1/0 of R2 and observed that when the link is
enabled, on R2 the LSA database, the link count for link id 10.16.2.2 and 10.16.128.2 will be 4 and
10.16.2.0 network exists in routing table of R2. When the s0/1/0 of R2 is disabled, link count for
link id 10.16.2.2 and 10.16.128.2 will be 2 and in the routing table there is no entry for 10.16.2.2.
1. Configure Router PnR1 and PnR3 to make subnet 10.n.1.0/24 belong to area 3.
Command:
R1# config t
R1(config)# router ospf 1
R1(config-router)# network 10.16.1.0 0.0.0.255 area 3
R3# config t
R3(config)# router ospf 1
R3(config-router)# network 10.16.1.0 0.0.0.255 area 3
Command:
Page No.47 of 52
R1# sh ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Se0/1/1 1 1 10.16.2.2/24 64 P2P 1/1
Se0/1/0 1 3 10.16.1.1/24 64 P2P 0/0
Note: before configuring this part, we have deleted the sub area / totally stubby area from all the
routers where it was configured.
2. Display the routing table to verify that the route to 10.n.1.0/24 is unknown to other routers.
Command:
R4# sh ip route
R2# sh ip route
Page No.48 of 52
o - ODR, P - periodic downloaded static route
Observation: The routing table of the other routers, there exist no entry for the subnet 10.16.1.0.
Configuration at R1 Configuration at R2
R1(config)# router ospf 1 R2(config)# router ospf 1
R1(config-router)# area 1 virtual-link 10.16.128.2 R2(config-router)# area 1 virtual-link 10.16.2.2
4. Display the routing table to verify that route 10.n.1.0/24 is now known to the other routers.
Command:
R2# sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Page No.49 of 52
C 10.16.128.0 is directly connected, FastEthernet0/0
R4# sh ip route
Observation: After configuring Virtual link, the area3 is logically connected to backbone area and
all the routers from different area can reach the network 10.16.1.0.
5. Use show ip ospf database to display and analyze the link-state databases of PnR1. Which
areas does PnR1 belong to?
Command:
Page No.50 of 52
Link ID ADV Router Age Seq# Checksum
10.16.128.7 10.16.128.7 329 (DNA) 0x8000000E 0x00D334
Page No.51 of 52
10.16.2.0 10.16.2.2 227 0x80000001 0x00BD05
10.16.3.0 10.16.2.2 227 0x80000001 0x00354C
10.16.4.0 10.16.2.2 167 0x80000001 0x00B688
10.16.5.0 10.16.2.2 167 0x80000001 0x002955
10.16.6.0 10.16.2.2 167 0x80000001 0x001E5F
10.16.128.0 10.16.2.2 167 0x80000001 0x0058EA
Analyzing link-state databases of R1: R1 is connected three different areas having following
LSAs:
R1 is belonging to area 1(physically connected) area 3(physically connected) and area0 (connected
via virtual link). From the “sh ip ospf database” we have also observed that.
Conclusion
Page No.52 of 52
In this lab we have observed how the IP Routing Protocol, OSPF works. There are many significant
differences between IP Routing Protocol EIGRP and the OSPF. Every router in OSPF area maintains
a synchronized database which allows it to maintain a loop free routing. Moreover, several other
important features have allowed OSPF to become an outstanding IP Routing Protocol.
Page No.53 of 52