Science, Maths & Technology

Become an OU student

Protocols in multi-service networks

Start this free course now. Just create an account and sign in. Enrol and complete the course for a free statement of participation or digital badge if available.

The allocation of addresses on the Internet is controlled by the Internet Assigned Numbers Authority (IANA), although authority is delegated to several local registries. IPv4 addresses may be interpreted in two ways. Initially, they were divided into distinct ranges of addresses called classes, but this proved to be inflexible and now a more flexible scheme, called classless addressing, dominates IPv4 internetworks. I shall describe both ways of interpreting IPv4 addresses because the limitation of the first interpretation leads naturally to the need for the second interpretation. The formats of the four allocated classes of IPv4 addresses are shown in Figure 21 and their ranges are listed in Table 6. The values in the table follow the standard dotted-decimal convention of splitting each 32-bit address into four bytes, and expressing the values of the bytes as denary numbers separated by full stops.

Figure 22 IPv4 Internet address formats
Table 6: IPv4 Internet address ranges
ClassRange
LowestHighest
A0.0.0.0127.255.255.255
B128.0.0.0191.255.255.255
C192.0.0.0223.255.255.255
D224.0.0.0239.255.255.255

Addresses in the range 240.0.0.0 to 255.255.255.255 are reserved for future use.

SAQ 11

To which class does the IPv4 address 157.107.34.5 belong?

The most direct approach to this question is by reference to Table 6. The IPv4 address 157.107.34.5 is within the address range for class B. You could also have answered this question by expressing the first byte of the address as a binary number and then identifying the prefix. In this case 157 is equal to the binary number 10011101 which is a class B address since the first two bits are 10.

Class D addresses are allocated to groups of hosts rather than single hosts. The group is identified by a single 28-bit address, called a multicast address, and the datagram is delivered to all the hosts in the group. Some multicast addresses are reserved for specific groups of hosts, such as all routers connected to a LAN. Other multicast groups can be constructed by hosts sending appropriate management messages. Multicast datagrams are routed through an internetwork by special multicasting routers.

The main benefit of multicasting is that routers can optimise the distribution of datagrams to avoid unnecessary duplication. For instance, if a host wishes to send a single datagram to 100 destinations by unicasting, it has to send 100 copies of the datagram. However, if all the 100 destinations belong to a single multicast group, the originating host can send a single multicast datagram and the routers will duplicate the datagram only where necessary to deliver it to destinations with which they have different interfaces. This reduces the total number of copies of the datagram that exist in the internetwork.

The division of IPv4 unicast addresses into three classes is not a very efficient way of allocating addresses. A network with, say, 300 hosts would have to be given a class B address, which allocates 16 bits to host addresses and therefore can accommodate 216 =  65536 hosts. However, only 300 of these addresses would be allocated – the rest would be wasted. A classless addressing scheme has therefore been introduced to reduce the inefficiency in the original IPv4 addressing scheme.

Classless IPv4 addresses are written in the same dotted-decimal notation as the original addressing scheme, but are followed by a forward slash and the number of bits in the network part of the address, which precedes the host address. For example, the classless address 196.19.0.48/16 identifies the network address as 196.19 (11000100 00010011) and the host address within the network as 0.48 (00000000 00110000).

The unit team hope you will find spreadsheets very useful during your study of this unit. The following activity and SAQ ask you to use fairly simple spreadsheets.

The worksheet ‘IPv4 classes’ in the spreadsheet ‘Protocols’ converts IPv4 addresses expressed as 32-bit binary numbers to dotted-decimal numbers. The spreadsheet supplied below is set up to convert the upper and lower addresses in the four classes of addresses. Use this spreadsheet to confirm the address ranges in Table 6.

Some calculators, such as the Windows calculator, convert between binary and denary numbers, and you may like to check the answers in the spreadsheet. If you are unfamiliar with binary numbers you may find it worthwhile using this spreadsheet to convert other binary numbers.

Click on the 'View document' link below to open the spreadsheet. You will find it attached to a PDF.

View document [Tip: hold Ctrl and click a link to open it in a new tab. (Hide tip)]

SAQ 12

Find the bit masks and hence the network addresses for the following IPv4 classless addresses:

• (a) 197.134.5.45/12

• (b) 220.5.47.101/10

• (c) 175.121.56.221/8

The worksheet ‘SAQ 6’ The worksheet SAQ 3.3 in the spreadsheet. ‘Protocols’ may be used for this SAQ. You may like to change the values in this spreadsheet to see the effects of other bit masks.

The bit masks and network addresses are given below. Various short cuts are possible but, going through all the steps, the network address is isolated by first converting the IP address to a binary number and then ANDing with the mask.

(a) The bit mask has 1s in the first 12 bit positions:

11111111 11110000 00000000 00000000

which is 255.240.0.0 in the dotted-decimal form.

The network address is isolated as follows:

The network address component is 110001011000.

(b) The bit mask has 1s in the first 10 bit positions:

11111111 11000000 00000000 00000000 (255.192.0.0)

The network address is isolated as follows:

The network address component is 1101110000.

(c) The bit mask has 1s in the first eight bit positions:

11111111 00000000 00000000 00000000

The network address is isolated as follows:

The network address component is 10101111.