08-13-2006 03:38 AM - edited 03-03-2019 01:38 PM
Hi,
I would like to knwo the method to convert decimal area numbers into 32 bit format in OSPF.
Any suggestions welcome
08-13-2006 03:51 AM
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
08-13-2006 05:08 AM
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
07-09-2020 07:48 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide