Chapter 5: IPv4 Addresses
What percentage of the address space was used by class C addresses?
12.5%
An IPv4 address is how many bits long?
32 bits long (4 bytes)
In classful addressing, how many classes were used to divide the IP Address Space?
5 classes: A, B, C, D, and E
What percentage of the address space was used by class A addresses?
50%
What percentage of the address space was used by class D addresses?
6.25%
What percentage of the address space was used by class E addresses?
6.25%
Find the error in the following IPv4 Address: 75.45.301.14
Each byte should be less than or equal to 255; 301 is outside this range.
How do you find the number of addresses in CIDR?
# = 2^(32 - n) where n is the prefix (given at the end of the address with slash notation /n )
What new problems did supernetting cause?
1. Address Wasting: The number of blocks to combine needs to be a power of 2, which means an organization that needed seven blocks should be granted at least eight blocks. 2. Complication: Supernetting added to how complicated routing things already was with subnetting.
What 3 restrictions must apply for the proper operation of CIDR?
1. The number of requested addresses, N, needs to be a power of 2. This is needed to provide an integer value for the prefix length, n. 2. The value of prefix length can be found from the number of addresses in the block. 3. The requested block needs to be allocated where there are a contiguous number of unallocated addresses in the address space.
When was classless addressing announced?
1996
What percentage of the address space was used by class B addresses?
25%
What is the address space of IPv4?
2^32 or 4,294,967,296
How many notations are there for IPv4 Addresses? Which are they?
3. Binary(base 2), dotted-decimal(base 256), and hexadecimal (base 16).
What is a network mask in classful addressing?
A 32-bit number with n leftmost bits all set to 1s and (32 − n) rightmost bits all set to 0s.
Find the error in the following IPv4 Address: 11100010.23.14.67
A mixture of binary notation and dotted-decimal notation is not allowed
How many Class C blocks do you need to make a supernet?
A power of 2
In classless addressing, how many addresses are there to a block?
A power of 2
What is a block in this context?
A range of addresses
Why can't subnetting solve address depletion problems in classful addressing?
Because most organizations did not want to share their granted blocks with others
The first address in a range of addresses is 14.11.45.96. If the number of addresses in the range is 32, what is the last address?
Because the first address in the range is included, you cannot just add the 32 to the first address and finish. Instead, you add 31 as such: 14.11.45.96 + 0.0.0.31 = 14.11.45.127
In classful addressing, what classes are divided into netid and hostid?
Classes A, B and C
What is the name given to the architecture where IP Addresses used the concept of classes?
Classful Addressing
What is the name given to the architecture where IP Addresses no longer use the concept of classes?
Classless Adressing
What does CIDR stand for?
Classless Inter-Domain Routing
What is supernetting?
Combining blocks together to form a larger block of addresses. Organizations did this by applying for several Class C blocks.
What is another name given to network masks?
Default mask
(True/False) The network mask from classful addressing is different from the one in classless addressing.
False, it is the same concept with the same use.
(True/False) A single device only requires one IPv4 address, even if it has multiple connections via multiple networks.
False. Each connection to a network requires an IPv4 address.
How do you find the first address of a block in CIDR?
First Address = address given AND network mask
Why was subnetting needed in the first place?
First, an organization that was granted a block in class A or B needed to divide its large network into several subnetworks for better security and management. Second, since the blocks in class A and B were almost depleted and the blocks in class C were smaller than the needs of most organizations, an organization with a Class A or B block could divide the block and share with others.
How does a NAT router know the destination of a packet meant for one of its hosts that is coming in from the internet?
From its Translation Table
Who allocates blocks in CIDR?
ICANN (Internet Corporation for Assigned Names and Addresses)
How can you recognize what class an IPv4 Address belongs to?
If given in binary, the position of the first 0 in the sequence will indicate class. If given in base 256, the entire first byte will indicate the class (0-127 indicates class A, which is the first 50% of the 256-range)
What is slash notation used for?
In classless addressing, we need to know one of the addresses in the block and the prefix length to define the block.
Where is hexadecimal notation for IPv4 Addresses often used?
In network programming
Example of classless address with slash notation:
In the address 12.23.24.78/8, the network mask is 255.0.0.0. The mask has eight 1s and twenty-four 0s. The prefix length is 8; the suffix length is 24.
What is the prefix length and suffix length if the Internet is divided into 4,294,967,296 blocks and each block has one single address?
In this case, the prefix length for each block is 32 and the suffix length is 0. All 32 bits are needed to define 232 = 4,294,967,296 blocks. The only address in each block is defined by the block itself.
What is the prefix length and suffix length if the whole Internet is considered as one single block with 4,294,967,296 addresses?
In this case, the prefix length is 0 and the suffix length is 32. All 32 bits vary to define 232 = 4,294,967,296 hosts in this single block.
What operation does the router use to extract the network address from the destination address in a packet?
It uses the AND operation on the destination address and the corresponding network mask. The result is the network address.
How many blocks of addresses exist in class E? What are they for?
Just one. It was designed for use with reserved addresses.
How do you find the last address of a block in CIDR?
Last address = (address given) OR [NOT (network mask)]
When was classless addressing introduced?
Mid-90's
What does NAT do?
NAT allows a site to use a set of private addresses for internal communication and a set of global Internet addresses (at least one) for communication with the rest of the world. The site must have only one single connection to the global Internet through a NAT-capable router that runs NAT software.
What part of Class B is net id? What part is hostid?
Netid is the first 2 bytes, and hostid is the next 2 bytes. Since class B starts with a 10, 2^14 blocks of addresses exist in class B. They are too big for most organizations.
What part of Class C is net id? What part is hostid?
Netid is the first 3 bytes, and hostid is the last byte. Since class C starts with 110, 2^21 blocks of addresses exist in class C. They are not big enough for many organizations
What part of Class A is net id? What part is hostid?
Netid is the first byte, while hostid is the next 3 bytes. Since class A starts with a 0, this means that only 128 blocks of addresses exist in class A. They are very large and wasteful.
The term given to the identifier of a network, what routing uses to determine the destination of a packet:
Network Address
What does NAT mean?
Network Address Translation
In classless addressing, given an address in the block, can the prefix length be found?
No, the address can belong to a block with any prefix length.
Find the error in the following IPv4 Address: 221.34.7.8.20
Only 4 bytes are allowed in IPv4, but the address has 5.
How many blocks of addresses exist in class D? What are they for?
Only one (though it has 268,435,456 addresses). It exists for multicasting.
What is meant by Address Translation in the context of NAT?
Replacement of the source address in outgoing (through the NAT router) packets with the global NAT address. All incoming packets also pass through the NAT router, which replaces the destination address in the packet (the NAT router global address) with the appropriate private address
What is the idea of splitting a block to smaller blocks referred to?
Subnetting
What is the All-Ones Address?
The block 255.255.255.255/32, which contains one single address, and is reserved for limited broadcast address in the current network.
What is the first address of a subnet? What is it used for?
The first address in the subnet is the identifier of the subnet and is used by the router to route the packets destined for that subnetwork
What is a Direct Broadcast Address?
The last address in a block or subblock (with the suffix set all to 1s) can be used as a direct broadcast address.
What is the All-Zeroes Address?
The block 0.0.0.0/32, which contains only one single address, and is reserved for communication when a host needs to send an IPv4 packet but it does not know its own address.
What is the Loopback Address?
The block 127.0.0.0/8 is used for the loopback address, which is an address used to test the software on a machine. When this address is used, a packet never leaves the machine; it simply returns to the protocol software.
What is the Multicast Address?
The block 224.0.0.0/4 is reserved for multicast communication.
What replaced the netid and hostid in classless addressing? What changed?
The prefix (netid) and suffix (hostid), which were now of variable length, the prefix ranging from 0 to 32, and the suffix is 32 - prefix length.
What is a supernet mask?
The reverse of a subnet mask. If a subnet mask uses more 1's than the default mask, while the supernet mask uses less 1's in its default mask.
Find the error in the following IPv4 Address: 111.56.045.78
There should be no leading zeroes in dotted-decimal notation (045).
What are two fundamental qualities about IPv4 addresses?
They are unique and universal
(True/False) The restrictions applied in allocating addresses for a subnetwork are parallel to the ones used to allocate addresses for a network.
True
(True/False) Subnetting increases the length of the netid and decreases the length of hostid.
True.
(True/False) The number of addresses in a block is inversely related to the value of the prefix length, n. A small n means a larger block; a large n means a small block.
True.
Find the number of addresses in a range if the first address is 146.102.29.0 and the last address is 146.102.32.255.
We can subtract the first address from the last address in base 256. The result is 0.0.3.255 in this base. Converting this amount to decimal (from base 256) yields 256*3 + 255 = 1023, and we add 1 for the resulting 1024.
What is Address Aggregation?
When a large block of addresses is granted by ICANN to an ISP, who then subnets and distributes them. When many addresses are contained in one tailored block.
What is slash notation in classless addressing?
When the prefix length, n, is added to the address separated by a slash.
When must you use a subnetwork mask?
When you wish to divide a network into a set of subnetworks, and you need a subnetwork mask for each subnetwork made.
Find the class of each address: a. 00000001 00001011 00001011 11101111 b. 11000001 10000011 00011011 11111111 c. 10100111 11011011 10001011 01101111 d. 11110011 10011011 11111011 00001111
a. The first bit is 0. This is a class A address. b. The first 2 bits are 1; the third bit is 0. This is a class C address. c. The first bit is 1; the second bit is 0. This is a class B address. d. The first 4 bits are 1s. This is a class E address.