Вы находитесь на странице: 1из 23

1

Open Shortest Path First Open standard protocol Successor of RIP

Classless routing protocol


Works with Link State Advertisements Updates are Multicast Works with Dijkstra algorithm, also called SPF algorithm

Administrative distance is 110


Metric = Cost =108/Bandwidth in bps (CISCO)
2

OSPF (contd..) Hello packets are send 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
3

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.
4

OSPF Topologies

Broadcast Multiaccess Ethernet

Election of DR and BDR


Point to Point Dedicated Serial Link Non Broadcast Multiaccess Frame Relay, X.25

OSPF - Network Diagram AREA 0


10.0.0.1/8 S0 11.0.0.1/8 S0

HYD

E0 192.168.1.150/24

S1 10.0.0.2/8

CHE

E0 192.168.2.150/24

S1 11.0.0.2/8

BAN

E0 192.168.3.150

LAN - 192.168.1.0/24

LAN - 192.168.2.0/24

LAN - 192.168.3.0/24
6

Disadvantages of OSPF

Consumes More Memory and CPU processing

Microsoft Windows 2000 [Version 5.00.2195] (C) Copyright 1985-2000 Microsoft Corp. C:\> telnet 192.168.1.150 Connecting ..... ================================ Welcome to Hyderabad Router ================================ User Access Verification password : **** Directly Connected Networks on Hyderabad> enable HYDERABAD Router password : **** Hyderabad# configure terminal 192.168.1.0 Enter configuration commands, one per line. End with CNTL/Z. 10.0.0.0 Hyderabad(config)# interface serial 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)#
9

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 Router(config)# router ospf <pid> Router(config-router)# network <Network ID> <wildcard mask> area <area id>

10

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] via 10.0.0.2, 00:00:36, Serial0 Metric of OSPF 110 is nothing but O for OSPF routes Administrative Distance O 192.168.3.0/24 [110/138] via 10.0.0.2, 00:00:36, Serial0 Cost Hyderabad# 11

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

Link 3 5 3

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

12

Microsoft Windows 2000 [Version 5.00.2195] (C) Copyright 1985-2000 Microsoft Corp. C:\> telnet 192.168.2.150 Connecting ..... ================================ Welcome to Chennai Router ================================ User Access Verification password : **** Chennai> enable Directly Connected Networks on CHENNAI Router password : **** Chennai# configure terminal 192.168.2.0 Enter configuration commands, one per line. End with CNTL/Z. 10.0.0.0 Chennai(config)# interface serial 1 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
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 Configuring OSPF Chennai(config-router)# Router(config)# router ospf <pid> Router(config-router)# network <Network ID> <wildcard mask> area <area id>

14

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, Metric of but OSPF 00:01:33, Serial0 110 is nothing O for OSPF routes 15 Administrative Distance Chennai# 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

Age 1253 695 693

Seq# 0x80000003 0x80000005 0x80000003

Checksum 0x897B 0x542 0xD328

Link 3 5 3

Neighbor ID 192.168.3.150 192.168.1.150 Chennai#

Pri 1 1

State FULL/ FULL/

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

Address 11.0.0.2 10.0.0.1

16

Microsoft Windows 2000 [Version 5.00.2195] (C) Copyright 1985-2000 Microsoft Corp. C:\> telnet 192.168.3.150 Connecting ..... ================================ Welcome to Banglore Router ================================ User Access Verification password : **** Banglore> enableDirectly Connected Networks on Banglore Router password : **** Banglore# configure terminal 192.168.3.0 Enter configuration commands, one per line. End with CNTL/Z. 11.0.0.0 Banglore(config)# interface serial 1 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)#
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)# Configuring OSPF Router(config)# router ospf <pid> Router(config-router)# network <Network ID> <wildcard mask> area <area id>

18

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 but OSPF 110 is nothing for OSPF routes O O 192.168.2.0/24 [110/74] via 11.0.0.1, 00:02:09, Serial1 Administrative Distance Cost C 192.168.3.0/24 is directly connected, Ethernet0 Banglore#
19

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

20

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#

21

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#

22

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#

23