






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This document from the CSC465 - Computer Networks course covers IP addressing using classful addressing, including the conversion of IP addresses between binary, decimal, and hexadecimal notations. Students will learn about the unique identifier role of IP addresses, the division of address space into classes, and the determination of network and host IDs.
Typology: Lecture notes
1 / 11
This page cannot be seen from the preview
Don't miss anything!







Dr. J. Harrison
These slides were produced almost entirely from material by Behrouz Forouzan for the text “TCP/IP Protocol Suite (2 nd^ Edition)”, McGraw Hill Publisher
Chapter 4
Figure 4- Dotted-decimal notation
0111 0101 1001 0101 0001 1101 1110 1010
75 95 1D EA
0x75951DEA
The binary, decimal, andThe binary, decimal, and hexadecimal numberhexadecimal number systems are reviewed insystems are reviewed in Appendix B.Appendix B.
Example 1Example 1
Change the following IP address from binary notation to dotted-decimal notation.
10000001 00001011 00001011 11101111
SolutionSolution
Example 2Example 2
Change the following IP address from dotted-decimal notation to binary notation.
111.56.45.
SolutionSolution
Example 3Example 3
Find the error, if any, in the following IP address:
111.56.045.
SolutionSolution
There are no leading zeroes in dotted-decimal notation (045).
Example 3 (continued)Example 3 (continued)
Find the error, if any, in the following IP address:
75.45.301.
SolutionSolution
In dotted-decimal notation, each number is less than or equal to 255; 301 is outside this range.
Example 4 Example 4
Change the following IP addresses from binary notation to hexadecimal notation.
10000001 00001011 00001011 11101111
SolutionSolution
0X810B0BEF or 810B0BEF (^16)
Example 5Example 5
How can we prove that we have 2,147,483,648 addresses in class A?
SolutionSolution
In class A, only 1 bit defines the class. The remaining 31 bits are available for the address. With 31 bits, we can have 2 31 or 2,147,483,648 addresses.
Example 6 Example 6
Find the class of the address:
0 0000001 00001011 00001011 11101111
SolutionSolution
The first bit is 0. This is a class A address.
Example 6 (Continued)Example 6 (Continued)
Find the class of the address:
110 00001 10000011 00011011 11111111
SolutionSolution
The first 2 bits are 1; the third bit is 0. This is a class C address.
Figure 4- Finding the class in decimal notation
Example 7Example 7
Find the class of the address:
227 .12.14.
SolutionSolution
The first byte is 227 (between 224 and 239); the class is D.
Example 7 (Continued) Example 7 (Continued)
Find the class of the address:
193 .14.56.
SolutionSolution
The first byte is 193 (between 192 and 223); the class is C.
Example 8Example 8
In Example 4 we showed that class A has 2^31 (2,147,483,648) addresses. How can we prove this same fact using dotted-decimal notation?
SolutionSolution
The addresses in class A range from 0.0.0.0 to 127.255.255.255. We notice that we are dealing with base 256 numbers here.
Solution (Continued)Solution (Continued)
Each byte in the notation has a weight. The weights are as follows: 2563 , 256 2 , 256 1 , 256^0 Last address: 127 × 256 3 + 255 × 256 2 + 255 × 256 1 + 255 × 256 0 = 2,147,483, First address: = 0 If we subtract the first from the last and add 1, we get 2,147,483,648.
Netid and hostid Blocks in class A
Some Class A Host Organizations
Millions of class A addressesMillions of class A addresses are wasted.are wasted.
Network AddressesNetwork Addresses
The network address is the first address.
The network address defines the network to the rest of the Internet.
Given the network address, we can find the class of the address, the block, and the range of the addresses in the block
InIn classfulclassful addressing,addressing, the network addressthe network address (the first address in the block)(the first address in the block) is the one that is assignedis the one that is assigned to the organization.to the organization.
Example 9Example 9
Given the network address 17.0.0.0, find the class, the block, and the range of the addresses.
SolutionSolution
The class is A because the first byte is between 0 and 127. The block has a netid of 17. The addresses range from 17.0.0.0 to 17.255.255.255.
Example 10 Example 10
Given the network address 132.21.0.0, find the class, the block, and the range of the addresses.
SolutionSolution
The class is B because the first byte is between 128 and 191. The block has a netid of 132.21. The addresses range from 132.21.0.0 to 132.21.255.255.
Example 11Example 11
Given the network address 220.34.76.0, find the class, the block, and the range of the addresses.
SolutionSolution
The class is C because the first byte is between 192 and 223. The block has a netid of 220.34.76. The addresses range from 220.34.76. to 220.34.76.255.
Determining Network ID
Given IP address it is straightforward to determine the network ID:
MaskMask
A mask is a 32-bit binary number that gives the first address in the block (the network address) when bitwise ANDed with an address in the block.
Figure 4- Masking concept
Figure 4- AND operation
The network address is theThe network address is the beginning address of each block.beginning address of each block. It can be found by applyingIt can be found by applying the default mask tothe default mask to any of the addresses in the blockany of the addresses in the block (including itself).(including itself). It retains theIt retains the netidnetid of the blockof the block and sets theand sets the hostidhostid to zero.to zero.
Example 12Example 12
Given the address 23.56.7.91 and the default class A mask, find the beginning address (network address).
SolutionSolution
The default mask is 255.0.0.0, which means that only the first byte is preserved and the other 3 bytes are set to 0s. The network address is 23.0.0.0.
Example 13 Example 13
Given the address 132.6.17.85 and the default class B mask, find the beginning address (network address).
SolutionSolution
The default mask is 255.255.0.0, which means that the first 2 bytes are preserved and the other 2 bytes are set to 0s. The network address is 132.6.0.0.
Direct Broadcast Address Limited Broadcast Address
⇐ Class E Address
Example of this host on this address
⇐ Class A Address
Example of specific host on this network
⇐ Class A Address
Loopback Address
Class A Address
Private AddressesPrivate Addresses
A number of blocks in each class are assigned for private use. They are not recognized globally.
C 192.168.0.0 to 192.168.255.255 256
B 172.16.0.0 to 172.31.255.255 16
A 10.0.0.0 to 10.255.255.255 1
Class Netids Blocks
Unicast Addresses
Multicast Addresses
Assigned Multicast Addresses
224.0.1.11 IETF-1-Audio
224.0.0.2 All routers on this subnet 224.0.0.9 RIP2 Routers
Many Others…
224.0.0.1 All systems on this subnet
Address Group A SAMPLE INTERNET WITH CLASSFUL ADDRESSES