LSNDI RMRA
Laboratory Work OSPF    

Introduction
Method


Introduction

The object of today's laboratory work is to begin OSPF configuration. This can be done using Packet Tracer version 5.x.



Method

1.  Open Packet Tracer and connect 3 routers as shown below. SAVE REGULARLY!

2.   Download partially configured file for this lab.
3.   Enter OSPF routing statements for each router.
4.   You will need to use WILDCARD MASK instead of Subnet Mask. This is the binary opposite of the subnet mask.
      For instance the subnet mask /24 is 255.255.255.0
      Convert this to binary to get:
      11111111.11111111.11111111.00000000
      Now change all 1s to 0s and all 0s to 1s
      00000000.00000000.00000000.11111111

      Convert back to dotted decimal
      0.0.0.255

Add network statements to the OSPF process as indicated below.

R1>en
R1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#router ospf 100
R1(config-router)#network 83.123.56.0 0.0.0.255 area 0
R1(config-router)#network 192.168.0.0 0.0.0.3 area 0
R1(config-router)#network 192.168.1.0 0.0.0.3 area 0
R1(config-router)#end
R1#

Now configure router 2 (R2)

R2>en
R2#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#router ospf 100
R2(config-router)#network 222.2.2.0 0.0.0.255 area 0
R2(config-router)#network 192.168.2.0 0.0.0.3 area 0
R2(config-router)#network 192.168.1.0 0.0.0.3 area 0
R2(config-router)#
00:39:24: %OSPF-5-ADJCHG: Process 100, Nbr 192.168.1.1 on Serial0/1 from LOADING to FULL, Loading Done
R2(config-router)#end
R2#
%SYS-5-CONFIG_I: Configured from console by consolewrite
Building configuration...
[OK]
R2#

Now configure router 3 (R3)

R3>en
R3#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#router ospf 100
R3(config-router)#network 199.23.24.0 0.0.0.255 area 0
R3(config-router)#network 192.168.2.0 0.0.0.3 area 0
R3(config-router)#network 192.168.0.0 0.0.0.3 area 0
R3(config-router)#end
R3#
%SYS-5-CONFIG_I: Configured from console by console
00:42:01: %OSPF-5-ADJCHG: Process 100, Nbr 192.168.1.1 on Serial0/0 from EXCHANGE to FULL, Exchange Done
R3#write
Building configuration...
[OK]
R3#


5.   Check the routing tables for all 3 routers. The OSPF learned routes are highlighted as shown below.

R1#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       i - IS-IS, 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

Gateway of last resort is not set

     83.0.0.0/24 is subnetted, 1 subnets
C       83.123.56.0 is directly connected, FastEthernet0/0
     192.168.0.0/30 is subnetted, 1 subnets
C       192.168.0.0 is directly connected, Serial0/1
     192.168.1.0/30 is subnetted, 1 subnets
C       192.168.1.0 is directly connected, Serial0/0
     192.168.2.0/30 is subnetted, 1 subnets
O       192.168.2.0 [110/1562] via 192.168.1.2, 00:09:33, Serial0/0
                    [110/1562] via 192.168.0.2, 00:06:38, Serial0/1
O    199.23.24.0/24 [110/782] via 192.168.0.2, 00:06:38, Serial0/1
O    222.2.2.0/24 [110/782] via 192.168.1.2, 00:09:33, Serial0/0
R1#


R2#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       i - IS-IS, 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

Gateway of last resort is not set

     83.0.0.0/24 is subnetted, 1 subnets
O       83.123.56.0 [110/782] via 192.168.1.1, 00:09:57, Serial0/1
     192.168.0.0/30 is subnetted, 1 subnets
O       192.168.0.0 [110/1562] via 192.168.1.1, 00:09:57, Serial0/1
                    [110/1562] via 192.168.2.2, 00:07:04, Serial0/0
     192.168.1.0/30 is subnetted, 1 subnets
C       192.168.1.0 is directly connected, Serial0/1
     192.168.2.0/30 is subnetted, 1 subnets
C       192.168.2.0 is directly connected, Serial0/0
O    199.23.24.0/24 [110/782] via 192.168.2.2, 00:07:21, Serial0/0
C    222.2.2.0/24 is directly connected, FastEthernet0/0
R2#

R3#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       i - IS-IS, 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

Gateway of last resort is not set

     83.0.0.0/24 is subnetted, 1 subnets
O       83.123.56.0 [110/782] via 192.168.0.1, 00:07:23, Serial0/0
     192.168.0.0/30 is subnetted, 1 subnets
C       192.168.0.0 is directly connected, Serial0/0
     192.168.1.0/30 is subnetted, 1 subnets
O       192.168.1.0 [110/1562] via 192.168.2.1, 00:07:40, Serial0/1
                    [110/1562] via 192.168.0.1, 00:07:23, Serial0/0
     192.168.2.0/30 is subnetted, 1 subnets
C       192.168.2.0 is directly connected, Serial0/1
C    199.23.24.0/24 is directly connected, FastEthernet0/0
O    222.2.2.0/24 [110/782] via 192.168.2.1, 00:07:40, Serial0/1
R3#

You should be able to see THREE connected networks and THREE learned networks for each of the routers.
The connected networks are denoted by the letter C
The OSPF learned networks are denoted by the letter O

In the examples above, the learned routes include information regarding the reliability of the received information - this is the administrative distance.

The administrative distance of OSPF is 110. The lower the administrative distance, the more trustworthy the source of the routing information.
The administrative distances of various protocols are shown in the table below.
Which is more trustworthy, RIP or OSPF? Why?

After the administrative distance, the cost of reaching the destination network is expressed.
This is an arbitrary measure and is based on the settings for the attached networks.
What is the clock rate for the serial links in the netw
ork?
Change this to 56000 bps for all links.

Now check the routing tables. Has the cost changed?
Now you can answer the question, does the clock rate for a serial link affect the cost as seen by OSPF?


6.  Adjusting the cost for a serial link.
For each serial link, the OSPF process needs to be told explicitly what the bandwidth for a particular link is. This information is added using the bandwidth command when in interface configuration mode.

To change the bandwidth for a serial link, both of the serial interfaces on each end of the derial link need to be configured using the bandwidth command.







You can find out more information about the OSPF process with the
show ip protocols command

R3#show ip protocols

Routing Protocol is "ospf 100"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Router ID 199.23.24.1
  Number of areas in this router is 1. 1 normal 0 stub 0 nssa
  Maximum path: 4
  Routing for Networks:
    199.23.24.0 0.0.0.255 area 0
    192.168.2.0 0.0.0.3 area 0
    192.168.0.0 0.0.0.3 area 0
  Routing Information Sources: 
    Gateway         Distance      Last Update
    192.168.0.1          110      00:03:54
    192.168.2.1          110      00:03:55
  Distance: (default is 110)

R3#

This displays current information about the routing for the router.
You can see the Router ID and the networks that are being routed.
You can also see the number of areas.
Check this on all three routers.



   Keep a record of this work


(C) M Clements  Last updated : 14/12/2010 10:53
 
 
 
























































Default Distance Value Table1

This table lists the administrative distance default values of the protocols that Cisco supports:

Route Source

Default Distance Values

Connected interface

0

Static route

1

Enhanced Interior Gateway Routing Protocol (EIGRP) summary route

5

External Border Gateway Protocol (BGP)

20

Internal EIGRP

90

IGRP

100

OSPF

110

Intermediate System-to-Intermediate System (IS-IS)

115

Routing Information Protocol (RIP)

120

Exterior Gateway Protocol (EGP)

140

On Demand Routing (ODR)

160

External EIGRP

170

Internal BGP

200

Unknown*

255

* If the administrative distance is 255, the router does not believe the source of that route and does not install the route in the routing table.


References

1 http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094195.shtml accessed 14/12/2010