0% found this document useful (0 votes)
895 views7 pages

Chapter 02 Solution

This document contains the questions and answers from Chapter 2 of a textbook on computer networking and the TCP/IP protocol suite. It discusses: - The layers involved in communication and how each layer provides opposite tasks to enable bidirectional communication. - The layers involved in switches and routers and how many of each layer a router can be involved with. - The units of data at each layer and how data units are encapsulated as they move down the layers and decapsulated as they move up. - Address types used at each layer and how transport layer protocols multiplex and demultiplex application layer messages.

Uploaded by

Fatima Alzahraa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
895 views7 pages

Chapter 02 Solution

This document contains the questions and answers from Chapter 2 of a textbook on computer networking and the TCP/IP protocol suite. It discusses: - The layers involved in communication and how each layer provides opposite tasks to enable bidirectional communication. - The layers involved in switches and routers and how many of each layer a router can be involved with. - The units of data at each layer and how data units are encapsulated as they move down the layers and decapsulated as they move up. - Address types used at each layer and how transport layer protocols multiplex and demultiplex application layer messages.

Uploaded by

Fatima Alzahraa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Chapter 2 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?

To make the communication bidirectional, each layer needs to be able to provide


two opposite tasks, one in each direction.

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?

The router is involved in:

- three physical layers,

- three data-link layers,

- and only one network layer.

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?

The identical objects at the application layer are messages.

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?

- At the application layer, the unit of data is a message.

- At the network layer, the unit of data is a datagram.

- At the data-link layer, the unit of data is a frame.

Q6. Which of the following data units is encapsulated in a frame?

- 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

Q9. List some application-layer protocols mentioned in this chapter.

We mentioned HTTP, FTP, SMTP, SNMP, TELNET, SSH, and DNS.

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 application layer, the types of addresses are names.

- 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.

Q13. Can you explain why we did not mention multiplexing/demultiplexing


services for the application layer?
The application layer is the top layer in the suite; it does not provide services to
any layer, which means multiplexing/demultiplexing does not exist for this layer.

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 takes the ciphertext from layer 2, inserts (encapsulates) it in an envelope


and sends it.

- 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?

To calculate the number of hosts uses the following formula

- A = P (1 + r/100)n
Where A is number of connected hosts to be connected

- p is number of old hosts

- r is the rate of year

- n is the number of year

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 total size of data = 10 + 10 + 10 + 10 + 10 + 100 = 150 bytes.

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:

- User datagrams are created at the transport layer.


- The data-link layer is responsible for handling frames between adjacent
nodes.
- The physical layer is responsible for transforming bits to electromagnetic
signals.

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?

The following shows the situation. If we think about multiplexing as many-toone


and demultiplexing as one-to-many, we have demultiplexing at the source 3 node
and multiplexing at the destination node in the data-link layer. However, some
purists call these two inverse multiplexing and inverse demultiplexing.

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.

You might also like