cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4047
Views
5
Helpful
2
Replies

ospf . network 10.0.0.0 0.255.255.255 area 0.0.0.0

sarahr202
Level 5
Level 5

Hi every one

I am a little confused as to how to use  area  using the following command:

ospf 1

network 10.0.0.0 0.255.255.255 area 0.0.0.0

i have seen  area  specified y simply number such as 1,  however  i want to leran how  i could specify area using the above command.  For example, i want to put  int f0/0  10/10/10/10/8  in area 24.  how  can i use the above command to specify area?

thanks  and have a great weekend.

1 Accepted Solution

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hi Sarah,

The key point to understand here is that the area number is a 32-bit number that can be either specified in the linear format, or by its 4 bytes, just like an IP address. So the area 24 can be written either as area 24 or area 0.0.0.24, area 300 can be written either as area 300 or - noting that 300 = 1x256 + 44, area 0.0.1.44.

In general, having an area number X in linear format, the conversion into dotted-decimal notation A.B.C.D would be:

D = X MOD 256

C = (X DIV 256) MOD 256

B = (X DIV (256^2)) MOD 256

A = (X DIV (256^3)) MOD 256

Area 27897687 - well, let's see:

D = 27897687 MOD 256 = 87

C = (27897687 DIV 256) MOD 256 = 175

B = (27897687 DIV (256^2)) MOD 256 = 169

A = (27897687 DIV (256^3)) MOD 256 = 1

So the area number would be 1.169.175.87, and it is true because 1x256^3 + 169x256^2 + 175x256 + 87 = 27897687.

In practice, the dotted-decimal notation of areas is used mostly when it is convenient for you to utilize the better visibility of individual bytes in the 4B-long area number. It could be convenient for you to number all areas in one place as 0.0.1.X, areas in another place 0.0.2.X, etc., or devise another area numbering mechanisms. Personally, I would not try to make much science of it - the area number simply consists of four bytes, and you can write down the number either in linear number, or by its individual four bytes. Use whatever form is more suitable for you.

Best regards,

Peter

View solution in original post

2 Replies 2

Peter Paluch
Cisco Employee
Cisco Employee

Hi Sarah,

The key point to understand here is that the area number is a 32-bit number that can be either specified in the linear format, or by its 4 bytes, just like an IP address. So the area 24 can be written either as area 24 or area 0.0.0.24, area 300 can be written either as area 300 or - noting that 300 = 1x256 + 44, area 0.0.1.44.

In general, having an area number X in linear format, the conversion into dotted-decimal notation A.B.C.D would be:

D = X MOD 256

C = (X DIV 256) MOD 256

B = (X DIV (256^2)) MOD 256

A = (X DIV (256^3)) MOD 256

Area 27897687 - well, let's see:

D = 27897687 MOD 256 = 87

C = (27897687 DIV 256) MOD 256 = 175

B = (27897687 DIV (256^2)) MOD 256 = 169

A = (27897687 DIV (256^3)) MOD 256 = 1

So the area number would be 1.169.175.87, and it is true because 1x256^3 + 169x256^2 + 175x256 + 87 = 27897687.

In practice, the dotted-decimal notation of areas is used mostly when it is convenient for you to utilize the better visibility of individual bytes in the 4B-long area number. It could be convenient for you to number all areas in one place as 0.0.1.X, areas in another place 0.0.2.X, etc., or devise another area numbering mechanisms. Personally, I would not try to make much science of it - the area number simply consists of four bytes, and you can write down the number either in linear number, or by its individual four bytes. Use whatever form is more suitable for you.

Best regards,

Peter

Thanks Peter. I really appreciate your help.