cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
10029
Views
14
Helpful
3
Replies

How to convert Area ID in 32 bit format from decimal format

kaustav.gupta
Level 1
Level 1

Hi,

I would like to knwo the method to convert decimal area numbers into 32 bit format in OSPF.

Any suggestions welcome

3 Replies 3

pkhatri
Level 11
Level 11

Hi,

You do not need to do that at all. The OSPF configuration in IOS will accept decimal as well as the dottec-octet formats for area IDs. So you can do something like the following quite legally:

router ospf 1

network 10.0.0.0 0.255.255.255 area 11111

and the router will accept it.

Hope that helps - pls do rate the post if it does.

Paresh

vijayasankar
Level 4
Level 4

Hi,

The method is straight forward, the same decimal to binary convertions..

Convert the decimal areaid in to binary.

Per definition OSPF ARea id is a 32 bit binary number.

Hence prepend the converted binary in the above step with Zeros "0".

Separate the resulting binary as 4 octets.

Convert the individual octets back to decimal. You will get the Ip address like notation of Area Id.

Here's an example from net..

For example, convert 400 decimal into binary (i.e. 110010000). The binary number needs to show 32 digits, representing the digits of the 4 octets in the IP type format. So, 110010000 binary = 00000000.00000000.0000001.10010000 as broken into octets. Finally, convert each octet into a decimal value. (e.g. 00000000.00000000.0000001.10010000 = 0.0.1.144). Therefore, 400 = 0.0.1.144

HTH

-VJ

Old post, but still very valuable.

 

OSPF area is 32 bit and you can be in binary/decimal format especially in a multi-vendor environment. 

Review Cisco Networking products for a $25 gift card