Chapter 02 Solution
Chapter 02 Solution
Q1. What is the first principle we discussed in this chapter for protocol layering
that needs to be followed to make the communication bidirectional?
Q2. Which layers of the TCP/IP protocol suite are involved in a link-layer switch?
The switch support layers are the physical and data link layers.
Q3. A router connects three links (networks). How many of each of the following
layers can the router be involved with?
Q4. In the TCP/IP protocol suite, what are the identical objects at the sender and
the receiver sites when we think about the logical connection at the application
layer?
Q5. A host communicates with another host using the TCP/IP protocol suite. What
is the unit of data sent or received at each of the following layers?
- A datagram
Q7. Which of the following data units is decapsulated from a user datagram?
A user datagram is a transport-layer data unit. It decapsulates a data unit going to
the application layer. In this case, the data unit is a message.
Q8. Which of the following data units has an application-layer message plus the
header from layer 4?
- a user datagram
Q10. If a port number is 16 bits (2 bytes), what is the minimum header size at the
transport layer of the TCP/IP protocol suite?
The minimum header size at the transport layer is 32 bits (4 bytes) because we add
port number of sender and receiver.
Q11. What are the types of addresses (identifiers) used in each of the following
layers?
- At the network layer, the types of addresses are logical addresses (IPs).
- At the data-link layer, the types of addresses are link layer addresses (MACs).
Q12. When we say that the transport layer multiplexes and demultiplexes
applicationlayer messages, do we mean that a transport-layer protocol can combine
several messages from the application layer in one packet? Explain.
Yes, Multiplexing in this case means that a protocol at a layer can encapsulate a
packet from several next-higher layer protocols (one at a time); demultiplexing
means that a protocol can decapsulate and deliver a packet to several next-higher
layer protocols (one at a time). Figure 2.10 shows the concept of multiplexing and
demultiplexing at the three upper layers.
Q14. Assume we want to connect two isolated hosts together to let each host
communicate with the other. Do we need a link-layer switch between the two?
Explain.
Q15. If there is a single path between the source host and the destination host, do
we need a router between the two hosts?
We do not need a router in this case because a router is needed when there is more
than one path between the two hosts; the router is responsible for choosing the best
path at each moment.
P1. Answer the following questions about Figure 2.2 when the communication is
from Maria to Ann:
The services provided in part a and part b are the opposite of each other.
- Layer 1 receives the mail, removes (decapsulates) the ciphertext from the
envelope and delivers it to layer 2.
P2. Answer the following questions about Figure 2.2 when the communication is
from Maria to Ann:
- Layer 2 takes the plaintext from layer 3, encrypt it to ciphertext and deliver it to
layer 1.
- Layer 2 receives the ciphertext, decrypt the ciphertext and delivers it to layer 3.
P3. Assume that the number of hosts connected to the Internet at year 2010 is five
hundred million. If the number of hosts increases only 20 percent per year, what is
the number of hosts in year 2020?
- A = P (1 + r/100)n
Where A is number of connected hosts to be connected
In 10 years, the number of hosts becomes about six times (1.2010 ≈ 6.19) the
number in 2010. This means the number of hosts connected to the Internet is more
than three billion.
P4. Assume a system uses five protocol layers. If the application program creates a
message of 100 bytes and each layer (including the fifth and the first) adds a
header of 10 bytes to the data unit, what is the efficiency (the ratio of application
layer bytes to the number of bytes transmitted) of the system?
The ratio of application layer bytes to the number of bytes transmitted = 100/150
P5. Assume we have created a packet-switched internet. Using the TCP/IP protocol
suite, we need to transfer a huge file. What are the advantage and disadvantage of
sending large packets?
The advantage of using large packets is less overhead. When using large packets,
the number of packets to be sent for a huge file becomes small. Since we are
adding three headers to each packet, we are sending fewer extra bytes than in the
case in which the number of packets is large. The disadvantage manifests itself
when a packet is lost or corrupted during the transmission; we need to resend a
large amount of data.
P6. Match the following to one or more layers of the TCP/IP protocol suite:
- Network layer
- Physical layer
- Application layer
P7. Match the following to one or more layers of the TCP/IP protocol suite:
P8. In Figure 2.10, when the IP protocol decapsulates the transport-layer packet,
how does it know to which upper-layer protocol (UDP or TCP) the packet should
be delivered?
Via protocol field included in ip header to identify which protocol the encapsulated
packets belong.
P9. Assume a private internet uses three different protocols at the data-link layer
(L1, L2, and L3). Redraw Figure 2.10 with this assumption. Can we say that, in the
data-link layer, we have demultiplexing at the source node and multiplexing at the
destination node?
P11. Protocol layering can be found in many aspects of our lives such as air
travelling. Imagine you make a round-trip to spend some time on vacation at a
resort. You need to go through some processes at your city airport before flying.
You also need to go through some processes when you arrive at the resort airport.
Show the protocol layering for the round trip using some layers such as baggage
checking/claiming, boarding/unboarding, takeoff/landing.
The following shows the layers. Note that we have not shown the security
checking that you need to pass through because it does not have the counterpart
when you arrive. It must be included in baggage/checking layer.
P13. In an internet, we change the LAN technology to a new one. Which layers in
the TCP/IP protocol suite need to be changed?
The only two layers that need to be changed are the data-link layer and the physical
layer. The new hardware and software need to be installed in all host, routers, and
link-layer switches. As long as the new data-link layer can encapsulate and
decapsulate datagrams from the network layer, there is no need to change any
protocol in the upper three layers. This is one of the characteristics of the protocol
layering.
P15. Using the internet in Figure 1.11 (Chapter 1) in the text, show the layers of
the TCP/IP protocol suite and the flow of data when two hosts, one on the west
coast and the other on the east coast, exchange messages.
The following shows the layers and the flow of data. Note that each host is
involved in five layers, each switch in two layers, and each router in three layers.