You are on page 1of 22

1

Open Shortest Path First


Open standard protocol
Successor of RIP
Classless routing protocol
Works with Link State Advertisements
Updates are through Multicast (224.0.0.5 )
Administrative distance is 110
Metric = Cost =108/Bandwidth in bps (CISCO)

OSPF (contd..)
Hello packets are sent every 10 seconds
Faster Convergence
Hierarchical design with Multiple Areas
Area 0 is called the backbone area
Router ID
The highest IP address of the active physical interface
of the router is Router ID.
If logical interface is configured, the highest IP
address of the logical interface is Router ID

OSPF Tables
It maintains three tables :
Neighbor Table
Neighbor table contains information about the directly
connected ospf neighbors forming adjacency.
Database table
Database table contains information about the entire
view of the topology with respect to each router.
Routing information Table
Routing table contains information about the best path
calculated by the shortest path first algorithm in the
database table.

OSPF - Network Diagram


AREA 0
10.0.0.1/8
S0

HYD

11.0.0.1/8
S0

S1
10.0.0.2/8

E0
192.168.1.150/24

LAN - 192.168.1.0/24

CHE

S1
11.0.0.2/8

E0
192.168.2.150/24

LAN - 192.168.2.0/24

BAN

E0
192.168.3.150

LAN - 192.168.3.0/24

Disadvantages of OSPF

Consumes More Memory and CPU processing

Microsoft Windows 2000 [Version 5.00.2195]


(C) Copyright 1985-2000 Microsoft Corp.
telnet 192.168.1.150
C:\>
Connecting .....
================================
Welcome to Hyderabad Router
================================
User Access Verification
password : ****
Directly Connected
Connected Networks
Networks on
on
Directly
Hyderabad> enable
HYDERABAD Router
Router
password : ****
HYDERABAD
Hyderabad# configure terminal
192.168.1.0
192.168.1.0
Enter configuration commands,
one per line. End with CNTL/Z.
10.0.0.0
serial 0
Hyderabad(config)# interface10.0.0.0
Hyderabad(config-if)# ip address 10.0.0.1 255.0.0.0
Hyderabad(config-if)# no shut
Hyderabad(config-if)# clockrate 64000
Hyderabad(config-if)# encapsulation hdlc
Hyderabad(config-if)# exit
Hyderabad(config)#

Hyderabad(config)# no ip routing
Hyderabad(config)# ip routing
Hyderabad(config)# router ospf 1
Hyderabad(config-router)# network 192.168.1.0 0.0.0.255 area 0
Hyderabad(config-router)# network 10.0.0.0 0.255.255.255 area 0
Hyderabad(config-router)# Configuring OSPF
Configuring OSPF
Router(config)#
Router(config)#router
routerospf
ospf<pid>
<pid>
Router(config-router)#
Router(config-router)# network
network <Network
<Network ID>
ID>
<wildcard
<wildcardmask>
mask>area
area<area
<areaid>
id>

Hyderabad(config)# no ip routing
Hyderabad(config)# ip routing
Hyderabad(config)# router ospf 1
Hyderabad(config-router)# network 192.168.1.0 0.0.0.255 area 0
Hyderabad(config-router)# network 10.0.0.0 0.255.255.255 area 0
Hyderabad(config-router)# ^Z
Hyderabad# 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,*- candidate default
U - per-user static route, o - ODR

Gateway of last resort is not set


C
10.0.0.0/8 is directly connected, Serial0
O
11.0.0.0/8 [110/128] via 10.0.0.2, 00:00:36, Serial0
C
192.168.1.0/24 is directly connected, Ethernet0
O
192.168.2.0/24 [110/74]
viaof
10.0.0.2,
00:00:36, Serial0
Metric
OSPF
110
is
nothing
but
Metric
of
OSPF
110
is
nothing
but
O for
forOSPF
OSPFroutes
routes
Administrative
Distance
O O
192.168.3.0/24
[110/138] via
10.0.0.2, 00:00:36, Serial0
Cost
Administrative
Distance
Cost
Hyderabad#

10

Hyderabad# show ip ospf database


OSPF Router with ID (192.168.1.150) (Process ID 1)
Router Link States (Area 0)
Link ID
192.168.1.150
192.168.2.150
192.168.3.150

ADV Router
192.168.1.150
192.168.2.150
192.168.3.150

Age
790
234
232

Seq#
0x80000003
0x80000005
0x80000003

Checksum
0x897B
0x542
0xD328

Hyderabad# show ip ospf neighbor


Neighbor ID
192.168.2.150
Hyderabad#

Pri
1

State
FULL/

Dead Time
00:00:36

Address
10.0.0.2

11

Link
3
5
3

Microsoft Windows 2000 [Version 5.00.2195]


(C) Copyright 1985-2000 Microsoft Corp.
telnet 192.168.2.150
C:\>
Connecting .....
================================
Welcome to Chennai Router
================================
User Access Verification
password : ****
Directly Connected
Connected Networks
Networks on
on
Chennai> enable Directly
CHENNAI Router
Router
password : ****
CHENNAI
Chennai# configure terminal
192.168.2.0
192.168.2.0
Enter configuration commands,
one per line. End with CNTL/Z.
10.0.0.0
10.0.0.0
1
Chennai(config)# interface serial
11.0.0.0
11.0.0.0
Chennai(config-if)# ip address
10.0.0.2 255.0.0.0
Chennai(config-if)# no shut
Chennai(config-if)# encapsulation hdlc
Chennai(config-if)# interface serial 0
Chennai(config-if)# ip address 11.0.0.1 255.0.0.0
Chennai(config-if)# no shut
Chennai(config-if)# encapsulation hdlc

12

Chennai(config)# no ip routing
Chennai(config)# ip routing
Chennai(config)# router ospf 2
Chennai(config-router)# network 192.168.2.0 0.0.0.255 area 0
Chennai(config-router)# network 10.0.0.0 0.255.255.255 area 0
Chennai(config-router)# network
11.0.0.0 0.255.255.255 area 0
Configuring
ConfiguringOSPF
OSPF
Chennai(config-router)#
Router(config)#
Router(config)#router
routerospf
ospf<pid>
<pid>
Router(config-router)#
Router(config-router)# network
network <Network
<Network ID>
ID>
<wildcard
<wildcardmask>
mask>area
area<area
<areaid>
id>

13

Chennai(config)# no ip routing
Chennai(config)# ip routing
Chennai(config)# router ospf 2
Chennai(config-router)# network 192.168.2.0 0.0.0.255 area 0
Chennai(config-router)# network 10.0.0.0 0.255.255.255 area 0
Chennai(config-router)# network 11.0.0.0 0.255.255.255 area 0
Chennai(config-router)# ^Z
Chennai# 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,*- candidate default
U - per-user static route, o - ODR

Gateway of last resort is not set


C
10.0.0.0/8 is directly connected, Serial1
C
11.0.0.0/8 is directly connected, Serial0
O
192.168.1.0/24 [110/74] via 10.0.0.1, 00:01:33, Serial1
C
192.168.2.0/24 is directly connected, Ethernet0
O
192.168.3.0/24 [110/74]
via
11.0.0.2,
00:01:33, Serial0
Metric
of
OSPF
110
is
nothing
but
Metric
of
OSPF
110
is
nothing
but
O
Ofor
forOSPF
OSPFroutes
routes Administrative
Distance
Chennai#
Cost
Administrative
Distance
14
Cost

Chennai# show ip ospf database


OSPF Router with ID (192.168.2.150) (Process ID 2)
Router Link States (Area 0)
Link ID
ADV Router
192.168.1.150
192.168.1.150
192.168.2.150
192.168.2.150
192.168.3.150
192.168.3.150
Chennai# show ip ospf neighbor

Neighbor ID
192.168.3.150
192.168.1.150
Chennai#

Pri
1
1

State
FULL/
FULL/

Age
1253
695
693

Seq#
0x80000003
0x80000005
0x80000003

Dead Time
00:00:35
00:00:32

Checksum
0x897B
0x542
0xD328

Address
11.0.0.2
10.0.0.1

15

Link
3
5
3

Microsoft Windows 2000 [Version 5.00.2195]


(C) Copyright 1985-2000 Microsoft Corp.
telnet 192.168.3.150
C:\>
Connecting .....
================================
Welcome to Banglore Router
================================
User Access Verification
password : ****
Directly Connected
Connected Networks
Networks on
on
Banglore> enableDirectly
Banglore Router
Router
password : ****
Banglore
Banglore# configure terminal
192.168.3.0
192.168.3.0
Enter configuration commands,
one per line. End with CNTL/Z.
11.0.0.0
serial 1
Banglore(config)# interface 11.0.0.0
Banglore(config-if)# ip address 11.0.0.2 255.0.0.0
Banglore(config-if)# no shut
Banglore(config-if)# clockrate 64000
Banglore(config-if)# encapsulation hdlc
Banglore(config-if)# exit
Banglore(config)#

16

Banglore(config)# no ip routing
Banglore(config)# ip routing
Banglore(config)# router ospf 1
Banglore(config-router)# network 192.168.3.0 0.0.0.255 area 0
Banglore(config-router)# network 11.0.0.0 0.255.255.255 area 0
Banglore(config-router)#
Configuring
ConfiguringOSPF
OSPF
Router(config)#
Router(config)#router
routerospf
ospf<pid>
<pid>
Router(config-router)#
Router(config-router)# network
network <Network
<Network ID>
ID>
<wildcard
<wildcardmask>
mask>area
area<area
<areaid>
id>

17

Banglore(config)# no ip routing
Banglore(config)# ip routing
Banglore(config)# router ospf 1
Banglore(config-router)# network 192.168.3.0 0.0.0.255 area 0
Banglore(config-router)# network 11.0.0.0 0.255.255.255 area 0
Banglore(config-router)# ^Z
Banglore# 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,*- candidate default
U - per-user static route, o - ODR

Gateway of last resort is not set


O
10.0.0.0/8 [110/128] via 11.0.0.1, 00:02:09, Serial1
C
11.0.0.0/8 is directly connected, Serial1
O
192.168.1.0/24 [110/138]
via
11.0.0.1,
00:02:09, Serial1
Metric
of
OSPF
110
is
nothing
but
Metric
of
OSPF
110
is
nothing
but
for
O
forOSPF
OSPFroutes
routes
O O
192.168.2.0/24
[110/74] via
11.0.0.1, 00:02:09, Serial1
Administrative
Distance
Cost
Administrative
Distance
Cost
C
192.168.3.0/24 is directly connected, Ethernet0
Banglore#

18

Banglore# show ip ospf database


OSPF Router with ID (192.168.3.150) (Process ID 1)
Router Link States (Area 0)
Link ID
192.168.1.150
192.168.2.150
192.168.3.150

ADV Router
192.168.1.150
192.168.2.150
192.168.3.150

Age
1506
948
944

Seq#
0x80000003
0x80000005
0x80000003

Checksum
0x897B
0x542
0xD328

Link
3
5
3

Banglore# show ip ospf neighbor


Neighbor ID
192.168.2.150
Banglore#

Pri
1

State
FULL/

Dead Time
00:00:37

Address
11.0.0.10.1

19

Hyderabad# ping 192.168.3.1


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 40/43/44 ms

Hyderabad# ping 192.168.2.1


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 40/43/44 ms

Hyderabad#

20

Chennai# ping 192.168.1.1


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 40/43/44 ms

Chennai# ping 192.168.3.1


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 40/43/44 ms

Chennai#

21

Banglore# ping 192.168.1.1


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 40/43/44 ms

Banglore# ping 192.168.2.1


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 40/43/44 ms

Banglore#

22

You might also like