Case Study OSPF Initialization

This case study puts all the pieces together into a coherent overview of OSPF initialization and beginning operation. To do this, you take a pair of routers that are connected together via an Ethernet connection to form the OSPF backbone, Area 0. Each router is also connected to other OSPF areas, as shown in Figure 3-28. For brevity, only those packets that prove a concept or step are included.

Figure 3-28 OSPF Network

NOTE To capture everything needed to demonstrate this case study, the routers were correctly configured and then a reboot was performed while a sniffer was running.

Capetown is the first router to initialize, and it immediately begins to transmit OSPF Hello packets out interface fa0/1. This first packet is shown in Figure 3-29, with a few aspects highlighted.

140 Chapter 3: OSPF Communication

Figure 3-29 Hello Packet from Capetown

OSPF:

Q

OSPF

Q

OSPF

Q

OSPF

a

OSPF

a

OSPF

a

OSPF

a

OSPF

a

OSPF

a

OSPF

a

OSPF

a

OSPF

a

OSPF

a

OSPF

a

OSPF

a

OSPF

a

OSPF

a

OSPF

a

OSPF

a

OSPF

a

OSPF

a

OSPF

a

OSPF

Header checksum = D392 (correct) Authentication: Type = P (No Authentication).

Rauter priority Router dead mtBrval Designated router Backup designated router

, Type of OSPF Packet

Header checksum = D392 (correct) Authentication: Type = P (No Authentication).

Which Router Sent This Packet (Capetown) Area the Router Is In

Network mask Hello interval Optional capabilities -ft. -- -0 . -. . . D

Rauter priority Router dead mtBrval Designated router Backup designated router

Opaque—LSAs not forwarded Demand Circuit bit External Attributes bit no NSSA capability no multicast capability external routing capability no Type of Service routing capability 1

■ OSPF OptionStatus

In the beginning, each router says its the DR; thus this field matches the RID.

Notice Capetown does not yet see Sydney.

Sydney is to receive the Hello packet. When Sydney transmits its Hello packet, the RID of Capetown is present within, as illustrated by Figure 3-30.

Figure 3-30 Hello Packet from Sydney

, Packet Sent OSPF Multicast Address

|T affl

Q OSPF

S OSPF S OSPF S OSPF © OSPF S OSPF S OSPF § OSPF ® OSPF ® OSPF g OSPF © OSPF S OSPF S OSPF S OSPF S OSPF S OSPF S OSPF ® OSPF S OSPF S OSPF S OSPF % OSPF

[224 p 0 .5] S=[1.3 1.3 1.3 2] LEH=4B ID=4b - OSPF Header -

Version = Router ID Area ID

length = 4B - Sent from Sydney

Header checksum = B3 7E (correct) Authentication: Type - D (No Authentication).

Value s PP PD DO PO PP DO PP PP

Network mask Hello interval Optional capabilities .0.. .. 0 ,

Network mask included for VLSM, etc.

Router priority Router dead interval Designated router Backup designated router = [0 P.P.D] Neighbor (1) = [13.1.1.1]

= Opaque-LSAs not forwarded = Demand Circuit bit = External Attributes bit

- no NSSA capability

= no multicast capability = external routing capability

- no Type of Service routing capability

<- Sydney also thinks it is the DR.

Capetown will see its own RID in this Hello packet.

As the routers exchange Hello packets, it is clear that Capetown has the highest RID after two packets, and as a result, Sydney becomes the DR. The next information that needs to be exchanged between these two routers is link-state data. This is done via link-state update packets, as previously discussed. These specialized OSPF packets contain LSAs. Refer to Figure 3-31.

Figure 3-31 Sydney's Link-State Update

' Identifies this packet as a link-state update fi-T IP : B'33 OSPF: --JS OSPF OSPF : •Q OSPF : OSPF : OSPF -S OSPF ; ® OSPF: ■Q OSPF Q OSPF S OSPF Q OSPF -ffi OSPF Q OSPF -ffl OSPF li} OSPF Q OSPF OSPF ® OSPF -ffi OSPF S OSPF -ffl OSPF I§5 OSPF

-ffi OSPF -ffl OSPF -ffl OSPF -1® OSPF OSPF OSPF a OSPF OSPF -ffi OSPF -ffi OSPF Q OSPF Q OSPF S OSPF jjl OSPF ® OSPF a OSPF <G) OSPF a OSPF g) OSPF OSPF ■g OSPF Q OSPF Ü OSPF ■gl OSPF ■gl OSPF Q OSPF gl OSPF S OSPF gl OSPF J3) OSPF

iEH-36 ID=53

Version — 2: Type ^ .1 [Xink State Update) , Banter ID - [13.. 13 . 13..3]

Header checksum'.^; bFFC (correct) Authentication: Type = D ' ifa Authentication),

Length = 96

Nimier of Advertisements = Link State Advert isment Link state age =

Optional capabilities = Ö

Link statE type Link statE ID Advertising Router Sequence number Length

Router type flags

Tells us how many LSAs are in this packet

Reserved

Number of router links = link 10 Link D^t^ Link type

Number Df TOS metrics

Link State Advertisment Link statE agE £

Link statE type Link state ID Advertising Router Sequence number Length

Hetwork mask Attached router (1) Attached router (2)

1 (seconds) 22

Opaque—LSAs nnt forwarded

Demand Circuit hit

External Attributes bit no NSSA capability no multicast capability external routing capability no Type Df SErvice routing capability

<- What the LSA is talking about

'21474B36S0 Checksum = D3B7 '36 03

Net a wild—card multicast receiver

AS boundary rau-tsi: Area border router 6 1

- [13 13 13 2] (IP address Df DEsignatEd RoutEr)

: 2 (Connection tc a transit network) = 0. TOS fi metric = 1

1 (seconds)

Opaque—LSAs not forwarded

Demand Circuit bit

External Attributes bit no NSSA capability no multicast capability external renting capability tin Type ni: Service ~m 111, i r'y capability

2 (Network links)

■<- Information this LSA is conveying

2147403649, Checksum - 624F

<- network mask

Routers found

142 Chapter 3: OSPF Communication

The information from the other areas needs to be propagated into Area 0 and shared between the two routers. For this to occur, Capetown transmits link-state updates to Sydney. You can see an example of this in Figure 3-32. Notice that in this packet, the RID has changed because Capetown's interface in Area 2 is also the RID for that area.

Figure 3-32 Capetown's Link-State Update

S T" if

■ D=

[224 0 0 5] S= [ 13 13 13 1] IEN=64 IB=47

ö-S

Sj OSPF ■

OSPF Header

m

OSPF

a

OSPF

"Version = 2. Type - 4

[Link State Update), Length = b4

M

OSPF

Bputer ID = [13.1

■<- Interface in Area 2

I

OSPF

Area. ID = [ □ . 0 .

D . D]

I

OSPF

Header checksum - 3176

(correct}

Q

OSPF

Authentication" Type =

Ü (No Authentication), Value = QD QD QD

QD OD DD OD DD

OSPF

■a

OSPF

Number of Advertisements = 1

A

ÖSPF

link 5tate Advertisment

t 1

■a

ÖSPF

Link state age ■=

1 (seconds)

■Q

ÖSPF

Optional capabilities =

22

-m

ÖSPF

0

Opaque—LS As not forwarded

■a

ÖSPF

1

Demand Circuit bit

■a

ÖSPF

0

External Attributes bit

a

ÖSPF

0

no NSSA capability

a

ÖSPF

0

no multicast capability

■a

ÖSPF

.1 =

external routing capabl1lty

■a

ÖSPF

Q =

no Type o£ Service routing capability

■a

ÖSPF

Link state type

i (Router links)

a

ÖSPF

Link state ID =

■<- Information this LSA is conveying

■a

ÖSPF

Advertising Router =

[13 111]

■a

ÖSPF

Sequence number

2147403650. Checksum = C0FÉ,

■a

ÖSPF

Length.

m

■a

ÖSPF

Router type flags

- 01

a

ÖSPF

0

= Not a viId—card multicast receiver

a

ÖSPF

0

= Not endpoint o£ active virtual link

a

ÖSPF

0

= Non AS boundary router

a

ÖSPF

1

= Area border router

a

ÖSPF

Reserved

- a

a

ÖSPF

Number □ £ router links

» l

a

ÖSPF

Link ID

» [13 13 13 2] (IP address o£ Designated

Router)

■ a

ÖSPF

Link Data

» [13 13 13 1]

■a

ÖSPF

Link type

■= 2 (Connection to a transit netvork)

■a

ÖSPF

Number a£ TOS metrics

- 0. TÖS 0 metric = 1

■ a

ÖSPF

As Capetown and Sydney exchange their routes via the link-state update packets, they also acknowledge to assure the other router they were received. In Figure 3-33, Sydney is acknowledging one of the routes that it received from Capetown.

Figure 3-33 Sydney Acknowledges i-T if i>

| 05PF _J 05PF m 05PF | 05PF \ 05PF I 05PF _J 05PF ■Q 05PF I 05PF _J 05PF -Q 05PF I OBPF \ OSPE _J 05PF ■ Q OSPE \ OSPF I OSPE _J 05PF -g 05PF | 05PF \ 05PF

[221.Ü 0.5] 5=[13.13.13 .Z ] LEH=44 ID=bO --- OSPF Header -

Version = 2. Typa = 5 [Link Stat a Acknowledgment). length = 44 Router ID = [13 - 13.13.2 J

Header checksum ' 5C3B (correct)

Authentication Type = 0 [Ho Authentication), Value = 00 00 00 00 00 00 00 00 Link State Advertisement Header # 1

Link state age

Optional capabilities = 22

Link state type Link state ID Advertising Pouter Sequence nuinher Length

*= Opacrue—LSAs not forwarded

= Demand Circuit bit

= External Attributes bit

*= no USSA capability

= no multicast capability

= external xouting capability

*= no Type of Service routing capability

When the packets are fully exchanged and the link-state databases are synchronized, the routers have become fully adjacent. You verify that this has occurred through the show ip ospf neighbor command, as shown in Example 3-8.

Example 3-8 Verifying That the Routers Have Become Fully Adjacent

CapeTown#show

ip ospf

neighbor

Neighbor ID

Pri

State

Dead Time

Address

Interface

13.13.13.2

1

FULL/DR

00:00:39

13.13.13.2

FastEthernet0/1

CapeTown#

Next, checking Sydney in Example 3-9, you can determine that Sydney is the DR.

Example 3-9 Confirming That Sydney is the DR

Sydney>show ip

ospf

neighbor

Sydney>

1

State FULL/BDR

Dead Time 00:00:30

Address 13.13.13.1

Interface FastEthernet0/1

Next, review the link-state database for each router. First, looking at Capetown in Example 3-10, you can see that as an ABR, it has the proper link data.

144 Chapter 3: OSPF Communication

Example 3-10 Looking at Capetown's Link-State Database

Capetown#show ip ospf database

OSPF Router with ID (13.1.1.1) (Process ID 100)

Link ID

13.13.13.2

Link ID 13.13.13.2

Link ID 13.13.13.2

Link ID

Router Link States (Area 0)

ADV Router

13.13.13.2

Age 992 1014

Net Link States (Area 0)

ADV Router 13.13.13.2

Age 1014

Seq#

0x80000006 0x80000006

Seq#

0x80000005

Summary Net Link States (Area 0)

Age 1014

993 993

Seq#

0x80000005 0x80000005 0x80000005

Router Link States (Area 1)

ADV Router 13.1.1.1

Age 993

Seq#

0x80000005

Summary Net Link States (Area 1)

Age 994 994 994

Seq#

0x80000005 0x80000005 0x80000007

Checksum Link count 0xC0FA 1 0xFA8B 1

Checksum 0x5A53

Checksum 0x9A6B 0x4DCC 0x36E1

Checksum Link count 0x6F8 1

Checksum 0x5FBE 0x36E1 0x15EC

Summary ASB Link States (Area 1)

ADV Router 13.1.1.1

Age 994

Seq#

0x80000005

Router Link States (Area 2)

ADV Router 13.1.1.1

Age 995

Seq#

0x80000005

Checksum 0x9F4

Checksum Link count 0x17E5 1

Summary Net Link States (Area 2)

ADV Router

Seq#

Checksum

Link ID

ADV Router

Seq#

Checksum

10.1.1.0

13

1

1

1

995

0x80000005

0x5FBE

13.0.0.1

13

1

1

1

999

0x80000005

0x4DCC

13.13.13.0

13

1

1

1

999

0x80000007

0x15EC

Example 3-10 Looking at Capetown's Link-State Database (Continued)

Summary ASB Link States (Area 2)

Link ID 13.13.13.2

Capetown#

ADV Router 13.1.1.1

Age 999

Seq# Checksum

0x80000005 0x9F4

The entries in the link-state database are used to develop the routing table for Capetown, as shown in Example 3-11.

Example 3-11 Capetown's Routing Table

Capetown#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 13.13.13.2 to network 0.0.0.0

10.0.0.0/30 is subnetted, 1 subnets

10.1.1.0 [110/2] via 13.13.13.2, 02:54:37, FastEthernet0/1 192.168.254.0/24 is directly connected, FastEthernet0/0 13.0.0.0/8 is variably subnetted, 3 subnets, 2 masks 13.1.1.0/24 is directly connected, Loopback1 13.0.0.0/24 is directly connected, Loopback0 13.13.13.0/30 is directly connected, FastEthernet0/1 0.0.0.0/0 [1/0] via 13.13.13.2

CapeTown#

The link-state database for Sydney is shown in Example 3-12.

Example 3-12 Sydney's Link-State Database

Sydney>show ip ospf database

OSPF Router with ID (13.13.13.2) (Process ID 100)

Link ID

13.13.13.2

Link ID 13.13.13.2

Router Link States (Area 0)

ADV Router

13.13.13.2

1471

1491

Net Link States (Area 0)

ADV Router 13.13.13.2

Age 1491

Seq# Checksum Link count

0x80000006 0xC0FA 1 0x80000006 0xFA8B 1

Seq# Checksum

0x80000005 0x5A53

continues

146 Chapter 3: OSPF Communication

Example 3-12 Sydney's Link-State Database (Continued)

Link ID 13.13.13.2

Link ID

13.13.13.0

Sydney>

Summary Net Link States (Area 0)

Age 1491 1471 1471

Seq# Checksum

0x80000005 0x9A6B 0x80000005 0x4DCC 0x80000005 0x36E1

Router Link States (Area 5)

ADV Router 13.13.13.2

Age 1491

Seq# Checksum Link count

0x80000005 0xF9D5 1

Summary Net Link States (Area 5)

Age 449 449 449

Seq# Checksum

0x80000006 0x9A64 0x80000006 0x8379 0x80000008 0x588F

Next, verify the routing table for Sydney, as shown in Example 3-13.

Example 3-13 Verifying Sydney's Routing Table

Sydney>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

10.0.0.0/30 is subnetted, 1 subnets C 10.1.1.0 is directly connected, FastEthernet0/0

13.0.0.0/8 is variably subnetted, 3 subnets, 2 masks O IA 13.1.1.1/32 [110/2] via 13.13.13.1, 02:54:59, FastEthernet0/1 O IA 13.0.0.1/32 [110/2] via 13.13.13.1, 02:54:59, FastEthernet0/1 C 13.13.13.0/30 is directly connected, FastEthernet0/1

Sydney>

Example 3-14 shows the configuration files for both routers.

Example 3-14 Running Configuration Files for Capetown and Sydney

Capetown#show running-config

Building configuration...

Current configuration: !

version 12.0

service timestamps debug datetime msec localtime service timestamps log datetime msec localtime service password-encryption !

hostname CapeTown !

enable password 7 08274D5D1D0B0A02060E1E

ip subnet-zero ip tcp synwait-time 5 no ip domain-lookup voice-port 1/0/0

voice-port 1/0/1

interface Loopback0 ip address 13.0.0.1 255.255.255.0 no ip directed-broadcast

interface Loopback1 ip address 13.1.1.1 255.255.255.0 no ip directed-broadcast

interface FastEthernet0/0 description CONNECTION TO CAT5K PORT 21 ip address 192.168.254.100 255.255.255.0 no ip directed-broadcast duplex auto speed auto

interface Serial0/0 no ip address no ip directed-broadcast no ip mroute-cache shutdown no fair-queue

interface FastEthernet0/1 description CONNECTION TO CAT5K - PORT 22 ip address 13.13.13.1 255.255.255.252 no ip directed-broadcast duplex auto continues

148 Chapter 3: OSPF Communication

Example 3-14 Running Configuration Files for Capetown and Sydney (Continued) speed auto

interface Serial0/1 no ip address no ip directed-broadcast shutdown

router ospf 100 network 13.0.0.0 0.0.0.255 area 1 network 13.1.1.0 0.0.0.255 area 2 network 13.13.13.0 0.0.0.255 area 0

no ip http server !

logging 192.168.254.69 snmp-server location Raleigh, NC snmp-server contact Tom Thomas end

Capetown#

Sydney#show running-config

Building configuration...

Current configuration: !

version 12.0

service timestamps debug datetime msec localtime service timestamps log datetime msec localtime service password-encryption !

hostname Sydney !

enable password 7 094A4F1A0D1718071F0916 !

ip subnet-zero ip tcp synwait-time 5

no ip domain-lookup !

interface FastEthernet0/0 description CONNECTION TO CAT5K - PORT 23 ip address 10.1.1.2 255.255.255.252 no ip directed-broadcast duplex auto speed auto

interface FastEthernet0/1

Example 3-14 Running Configuration Files for Capetown and Sydney (Continued)

description CONNECTION TO CAT5K - PORT 24 ip address 13.13.13.2 255.255.255.252 no ip directed-broadcast duplex auto speed auto router eigrp 65000 network 13.13.13.0 no auto-summary

router ospf 100 redistribute eigrp 65000 network 10.1.1.0 0.0.0.3 area 5 network 13.13.13.0 0.0.0.255 area 0

ip classless no ip http server !

logging 192.168.254.69

snmp-server enginelD local 00000009010000A1C0A8FE66 snmp-server location Raleigh, NC snmp-server contact Tom Thomas Sydney#

Was this article helpful?

0 0

Post a comment