CCIE Pursuit Blog

September 15, 2007

Dotted Decimal OSPF Areas

Filed under: Cisco,Cisco Certification,IOS,OSPF — cciepursuit @ 2:30 pm

File under “interesting stuff that I didn’t know” – I came across this while reading the OSPFv2 chapter in Doyle’s Routing TCP/IP (Volume 1):

Areas are identified by a 32-bit Area ID. The Area ID may be expressed either as a decimal number or in dotted decimal, and the two formats may be used together on Cisco routers. The choice usually depends on which format is more convenient for identifying the particular Area ID. For example, area 0 and area 0.0.0.0 are equivalent, as are area 16 and area 0.0.0.16, and area 271 and area 0.0.1.15. In each of these cases, the decimal format would probably be preferred. However, given the choice of area 3232243229 and area 192.168.30.29, the latter would probably be chosen.

This might prompt “ummm…yeah…and the sky is blue” from some of you, but I’ve somehow come this far without ever tripping over this feature of OSPF before.

r1(config)#router ospf 100
r1(config-router)#net 155.1.146.1 0.0.0.0 area ?
  <0-4294967295>  OSPF area ID as a decimal value
  A.B.C.D         OSPF area ID in IP address format

r1(config-router)#net 155.1.146.1 0.0.0.0 area 0.0.0.0

r1#sh ip os int fa0/0
FastEthernet0/0 is up, line protocol is up
  Internet Address 155.1.146.1/24, Area 0.0.0.0
  Process ID 100, Router ID 155.1.146.1, Network Type BROADCAST, Cost: 1
  —–output truncated—–

r1(config-router)#net 155.1.146.1 0.0.0.0 area 0.0.1.16
r1(config-router)#^Z
r1#
*Mar  1 00:34:36: %OSPF-6-AREACHG: 155.1.146.1/32 changed from area 0.0.0.0 to area 0.0.1.16

r1#sh ip ospf int fa0/0
FastEthernet0/0 is up, line protocol is up
  Internet Address 155.1.146.1/24, Area 0.0.1.16
  Process ID 100, Router ID 155.1.146.1, Network Type BROADCAST, Cost: 1
   —–output truncated—–

r1#sh ip os data

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

                Router Link States (Area 0.0.1.16)

Link ID         ADV Router      Age         Seq#       Checksum Link count
155.1.146.1     155.1.146.1     92          0x80000001 0x009909 1

The range of OSPF areas is 0 to 4294967295.  4294967295 expressed in dotted decimal is 255.255.255.255.

Let’s see if we can create an OSPF adjacency between r1 in area 271 and r4 in area 0.0.1.15:

r1(config)#router ospf 100
r1(config-router)#net 155.1.146.1 0.0.0.0 area 271

r4(config-router)#router os 100
r4(config-router)#net 155.1.146.4 0.0.0.0 area 0.0.1.15
r1#sh ip os nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
155.1.146.4       1   FULL/BDR    00:00:32    155.1.146.4  FastEthernet0/0

r1#sh ip os int fa0/0
FastEthernet0/0 is up, line protocol is up
  Internet Address 155.1.146.1/24, Area 271
  Process ID 100, Router ID 155.1.146.1, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State DR, Priority 1
  Designated Router (ID) 155.1.146.1, Interface address 155.1.146.1
  Backup Designated router (ID) 155.1.146.4, Interface address 155.1.146.4
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:07
  Supports Link-local Signaling (LLS)
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, 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 155.1.146.4  (Backup Designated Router)
  Suppress hello for 0 neighbor(s)

r1#sh ip os data

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

                Router Link States (Area 271)

Link ID         ADV Router      Age         Seq#       Checksum Link count
155.1.146.1     155.1.146.1     118         0x80000002 0x00CDA3 1
155.1.146.4     155.1.146.4     114         0x80000002 0x00C7A0 1

                Net Link States (Area 271)

Link ID         ADV Router      Age         Seq#       Checksum
155.1.146.1     155.1.146.1     118         0x80000001 0x00ADC8
r1#
r4#sh ip os nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
155.1.146.1       1   FULL/DR   00:00:32    155.1.146.1     FastEthernet0/0

r4#sh ip os int fa0/0
FastEthernet0/0 is up, line protocol is up
  Internet Address 155.1.146.4/24, Area 0.0.1.15
  Process ID 100, Router ID 155.1.146.4, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State BDR, Priority 1
  Designated Router (ID) 155.1.146.1, Interface address 155.1.146.1
  Backup Designated router (ID) 155.1.146.4, Interface address 155.1.146.4
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:05
  Supports Link-local Signaling (LLS)
  Index 1/1, flood queue length 0
  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 155.1.146.1  (Designated Router)
  Suppress hello for 0 neighbor(s)

r4#sh ip os data

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

                Router Link States (Area 0.0.1.15)

Link ID         ADV Router      Age         Seq#       Checksum Link count
155.1.146.1     155.1.146.1     81          0x80000002 0x00CDA3 1
155.1.146.4     155.1.146.4     75          0x80000002 0x00C7A0 1

                Net Link States (Area 0.0.1.15)

Link ID         ADV Router      Age         Seq#       Checksum
155.1.146.1     155.1.146.1     81          0x80000001 0x00ADC8

Sweet.  Because 0.0.1.15 is equal to 271 in decimal, the OSPF adjacency is formed.


Cisco Documentation

network area

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: