Ch4-exercises
Ch4-exercises
SUBNET ADDRESSING
Q1. Consider the router and the two attached subnets below (A and B).
The number of hosts is also shown below. The subnets share the 24
high-order bits of the address space: 10.186.192.0/24
QUESTION LIST
1. Is the address space public or private? Private
Summary:
The address space: 10.186.192.0/24
B- 10.186.192.0/26 (64 Ips)
Q2. Consider the router and the three attached subnets below (A, B, and C). The number
of hosts is also shown below. The subnets share the 24 high-order bits of the address
space: 53.194.246.0/24
QUESTION LIST
1. Is the address space public or private? Public
2. How many hosts can there be in this address space? 28 - 2 = 254
---------------------------------------------------------
SOLUTION
1. The address 53.194.246.0/24 is public.
2. Maximum number of hosts = 2^x - 2 = 2^8 - 2 = 254. The reason we have to subtract 2
from the final number is because there are always 2 addresses allocated for each address
block: the subnet ID (the first address) and the broadcast address (the last address); for
example, if you have 5 bits for hosts, you can have 30 hosts, because 2 of the addresses
are for the subnet ID and the broadcast address which when added equals 32, which is
2^5.
3. Subnet A has 93 hosts, so it will need at least 95 addresses (for the subnet ID and
broadcast address). The least number of bits that satisfy this is 7 bits. Knowing that, we
take the prior subnet and add 128, the result of which is 53.194.246.0/25
7. Similar to the prior subnet, subnet B has 19 hosts, so it will need at least 21 addresses
(for the subnet ID and broadcast address). The least number of bits that satisfy this is 5
bits. Knowing that, we take the prior subnet and add 32, the result of which is
53.194.246.160/27
11. Similar to the prior two subnets, subnet C has 23 hosts, so it will need at least 25
addresses (for the subnet ID and broadcast address). The least number of bits that satisfy
this is 5 bits. Knowing that, we take the prior subnet and add 32, the result of which is
53.194.246.128/27
Before doing this problem, you might want to reread the section on the NAT protocol in
section 4.3.4 in the text.
Suppose that the host with IP address 10.0.1.13 sends an IP datagram destined to host
128.119.168.190. The source port is 3426, and the destination port is 80.
QUESTION LIST
1. Consider the datagram at step 1, after it has been sent by the host but before it has
reached the router. What is the source IP address for this datagram? 10.0.1.13
3. Now consider the datagram at step 2, after it has been transmitted by the router.
What is the source IP address for this datagram? 135.122.198.206
6. Now consider the datagram at step 3, just before it is received by the router. What is
the source IP address for this datagram? 128.119.168.190
7. At step 3, what is the destination IP address for this datagram? 135.122.198.206
8. Last, consider the datagram at step 4, after it has been transmitted by the router but
before it has been received by the host. What is the source IP address for this datagram?
128.119.168.190
9. At step 4, what is the destination IP address for this datagram? 10.0.1.13
SOLUTION
1. The source address will be the local host's IP, which is 10.0.1.13
2. The destination address will be the remote machine's IP, which is 128.119.168.190
3. The source address will be the router's public IP, which is 135.122.198.206
4. The destination address will be the remote machine's IP, which is 128.119.168.190
6. The source address will be the remote machine's IP, which is 128.119.168.190
7. The destination address will be the router's public IP, which is 135.122.198.206
8. The source address will be the remote machine's IP, which is 128.119.168.190
9. The destination address will be the local host's IP, which is 10.0.1.13
QUESTION LIST
1. Is the datagram being forwarded from D to E an IPv4 or IPv6 datagram? IPv6
11. Is the datagram being forwarded from d to b an IPv4 or IPv6 datagram? IPv4
17. Is the datagram being forwarded from c to B an IPv4 or IPv6 datagram? Ipv4
18. What is the source address of this c to B datagram? 113.153.129.245
23. What router is the 'tunnel entrance'? Give the router's letter Router E
24. What router is the 'tunnel exit'? Give the router's letter Router B
25. Which protocol encapsulates the other, IPv4 or IPv6? IPv4 encapsulates IPv6
datagrams