You get a bonus - 1 coin for daily activity. Now you have 1 coin

IP. class and classless addressing

Lecture



Class Addressing

Class network addressing is an IP addressing method. The use of this method does not allow economical use of a limited resource of IP addresses, since it is not possible to apply different subnet masks to different subnets.

Content

[remove]
  • 1 Basic Concepts
    • 1.1 IP Addressing
  • 2 See also
  • 3 Notes

Basic Concepts [edit | edit wiki text]

Initially, IP addressing was carried out on the basis of classes: the first bits determined the network class, and according to the network class, it was possible to say how many bits were allocated for the network number and node number. In total there were 5 classes:

Class A 0 network address (7 bits) host address (24 bits)
Class B ten network address (14 bits) host address (16 bits)
Class C 110 network address (21 bits) host address (8 bits)
Class D 1110 Multicast address
E class 1111 [2] Reserved

IP Addressing [edit | edit wiki text]

A feature of IP is a flexible addressing system. The charge for this is the availability of centralized DNS services.

The address consists of two parts - the network number and the node number in the network. The IP address of version 4 is 4 bytes long and is written as four decimal numbers separated by dots.

To determine which bytes belong to the network number and which node number there are several approaches.

One approach was the class addressing method.

Class First bits Distribution of bytes (C - network, X - host) The number of possible network addresses The number of possible host addresses Subnet mask
A 0 S.H.H.H 128 16 777 216 255.0.0.0
B ten S.S.X.X 16 384 65,536 255.255.0.0
C 110 C.S.S.C.X 2,097,152 256 255.255.255.0
D 1110 Group address
E 1111 Reserved

It is easy to calculate that the total in the IP address space is 128 networks with 16 777 216 Class A addresses, 16384 networks with 65536 Class B addresses and 2 097 152 networks with 256 Class C addresses, as well as 268 435 456 multicast addresses and 268 435 456 reserved addresses. With the growth of the Internet, this system turned out to be inefficient and was supplemented by classless addressing (CIDR).

Classless Addressing

Classless Addressing (Eng. Classless Inter-Domain Routing , Eng. CIDR ) is an IP addressing method that allows you to flexibly manage the IP address space without using rigid class addressing frameworks. Using this method allows you to economically use a limited resource of IP addresses, since it is possible to apply different subnet masks to different subnets.

Content

[remove]
  • 1 Address ranges
  • 2 Possible masks
  • 3 References
  • 4 See also
  • 5 Sources

Address ranges [edit | edit wiki text]

The IP address is an array of bits. The principle of IP addressing is the allocation of a set (range, block, subnet) of IP addresses, in which some bits of the bits have fixed values, and the remaining digits run through all possible values. The block of addresses is specified by specifying the starting address and subnet mask. Classless addressing is based on the variable length of the subnet mask (English variable length subnet mask , VLSM ), while in class (traditional) addressing the length of the mask is strictly fixed by 0, 1, 2 or 3 fixed octets.

Example of subnet 192.0.2.32/27 using classless addressing:

IP address octets 192 0 2 32
IP address bits one one 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 one 0 0 0 one 0 0 0 0 0
Subnet mask bits one one one one one one one one one one one one one one one one one one one one one one one one one one one 0 0 0 0 0
Subnet mask octets 255 255 255 224

In this example, you can see that in the subnet mask, the 27 bits on the left are set to one. In this case, they talk about the length of the subfix prefix of 27 bits and indicate through a slash ( / sign) after the base address.

An example of writing IP address 172.16.0.1/12 using classless addressing:

IP address octets 172 sixteen 0 one
IP address bits one 0 one 0 one one 0 0 0 0 0 one 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 one
Subnet mask bits one one one one one one one one one one one one 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Subnet mask octets 255 240 0 0

The set of all addresses corresponds to a zero subnet mask and is denoted by / 0, and a specific IPv4 address corresponds to a subnet mask with a prefix length of 32 bits, denoted by / 32.

To simplify routing tables, you can combine address blocks by specifying one large block instead of a number of small ones. For example, 4 adjacent networks of class C (4 × 255 addresses, mask 255.255.255.0 or / 24) can be combined, from the point of view of routers far from them, into one / 22 network. Conversely, networks can be broken up into smaller subnets, and so on.

The standard is a mask in the form of a continuous sequence of ones and a continuous sequence of zeros. Only for such masks the resulting sets of IP addresses will be contiguous. However, inverse masks are also widespread (invers mask, wildcard mask), which are not required to contain consecutive ones or zeros. The reverse mask is used to form the ACL rules.

Possible masks [edit | edit wiki text]

  1. IPv4 CIDR
IP / mask Until last ip

in the subnet

Mask Total Addresses Host addresses Class
abcd / 32 +0.0.0.0 255.255.255.255 one (not) 1/256 C
abcd / 31 +0.0.0.1 255.255.255.254 2 (not) 1/128 C
abcd / 30 +0.0.0.3 255.255.255.252 four 2 1/64 C
abcd / 29 +0.0.0.7 255.255.255.248 eight 6 1/32 C
abcd / 28 +0.0.0.15 255.255.255.240 sixteen 14 1/16 C
abcd / 27 +0.0.0.31 255.255.255.224 32 thirty 1/8 C
abcd / 26 +0.0.0.63 255.255.255.192 64 62 1/4 C
abcd / 25 +0.0.0.127 255.255.255.128 128 126 1/2 C
abc0 / 24 +0.0.0.255 255.255.255.000 256 254 1 C
abc0 / 23 +0.0.1.255 255.255.254.000 512 510 2 C
abc0 / 22 +0.0.3.255 255.255.252.000 1024 1022 4 C
abc0 / 21 +0.0.7.255 255.255.248.000 2048 2046 8 C
abc0 / 20 +0.0.15.255 255.255.240.000 4096 4094 16 C
abc0 / 19 +0.0.31.255 255.255.224.000 8192 8190 32 C
abc0 / 18 +0.0.63.255 255.255.192.000 16 384 16,382 64 C
abc0 / 17 +0.0.127.255 255.255.128.000 32,768 32,766 128 C
ab0.0 / 16 +0.0.255.255 255.255.000.000 65,536 65,534 256 C = 1 B
ab0.0 / 15 +0.1.255.255 255.254.000.000 131,072 131,070 2 b
ab0.0 / 14 +0.3.255.255 255.252.000.000 262 144 262 142 4 b
ab0.0 / 13 +0.7.255.255 255.248.000.000 524 288 524 286 8 B
ab0.0 / 12 +0.15.255.255 255.240.000.000 1,048,576 1,048,574 16 B
ab0.0 / 11 +0.31.255.255 255.224.000.000 2,097,152 2,097,150 32 B
ab0.0 / 10 +0.63.255.255 255.192.000.000 4 194 304 4,194,302 64 B
ab0.0 / 9 +0.127.255.255 255.128.000.000 8,388,608 8,388,606 128 B
a.0.0.0 / 8 +0.255.255.255 255.000.000.000 16 777 216 16 777 214 256 B = 1 A
a.0.0.0 / 7 +1.255.255.255 254.000.000.000 33,554,432 33,554,430 2 A
a.0.0.0 / 6 +3.255.255.255 252.000.000.000 67 108 864 67,108,862 4 A
a.0.0.0 / 5 +7.255.255.255 248.000.000.000 134 217 728 134 217 726 8 A
a.0.0.0 / 4 +15.255.255.255 240.000.000.000 268 435 456 268 435 454 16 A
a.0.0.0 / 3 +31.255.255.255 224.000.000.000 536 870 912 536 870 910 32 A
a.0.0.0 / 2 +63.255.255.255 192.000.000.000 1,073,741,824 1,073,741,822 64 A
a.0.0.0 / 1 +127.255.255.255 128.000.000.000 2 147 483 648 2 147 483 646 128 A
0.0.0.0 / 0 +255.255.255.255 000.000.000.000 4,294,967,296 4,294,967,294 256 A

The number of subnet addresses is not equal to the number of possible nodes. A zero IP address is reserved for identifying a subnet, the last one as a broadcasting address, so in real-life networks, the number of nodes is two less than the number of addresses.


Comments


To leave a comment
If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Computer networks

Terms: Computer networks