Chapter 2 SOLUTION

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Chapter NO 2

Network Models
Questions
Q#2: 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?

Answer:
we need a link layer switch when we need to convert a broadcast communication to a one-to-
one communication. But in this case it is already one-to-one communication so we need not
use any link layer switches.
Q#3: Can you explain why we did not mention multiplexing/DE multiplexing services for the
application layer?

Answer:

The application layer is the top layer in the suite; it does not provide services to any layer,
which means multiplexing/DE multiplexing does not exist for this layer.
Q#4: which of the following data units has an application-layer message plus the header
from layer 4?
Answer:
Data link layer is layer2 in TCP/IP protocol suite, where data units received from network layer
are encapsulated in a frame by adding a header. A Frame contains layer2, layer3 and layer 4
headers along with the message from application layer.
Q#5: what is the first principal we discussed in this chapter for protocol layering that needs to be
followed communication to make the communication bidirectional?

Answer:

The first principle dictates that if we want bidirectional communication, we need to make each
layer so that it is able to perform two opposite tasks, one in each direction. The second principle
that we need to follow in protocol layering is that the two objects under each layer at both sites
should be identical.
Q#6: if a port number is 16 bits (2bytes), what is the minimum header size at the
transport layer of the TCP/IP protocol suite?
Answer:
The minimum header size will be (2*16 bits) 32 bits to contain the sending and receiving port
address.
Q#8: 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?
Answer:
Identical objects are (messages).

Q#9: 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. application layer

b. network layer

c. data-link layer
Answer:
Application layer: The main responsibility of the application layer is maintaining
protocols between interface and end-user services.
Data-link layer: The main responsibility of the data link layer is transferring the data
between across the nodes in LAN and WAN.
Network layer: The main responsibility of the network layer is to provide data routing
paths for the network communication.
Q#10; When we say that the transport layer multiplexes and DE multiplexes application
layer messages does it combine all the messages into one packet explain?

Answer:

No, multiplexing/ de-multiplexing at transport layer don’t mean to combine several


upper-layer packets (from the same or different applications) into one transport-layer
packet.
• It only means that each of the transport-layer protocols such as transmission control
protocol (TCP) can carry a packet from any application-layer protocol that needs its
service.
Q#11: List some application-layer protocols mentioned in this chapter

Answer:

 DNS (Domain Name System) ...


 Telnet, SSH (Terminal emulation, Secure shell) ...
 SMTP (Simple Mail Transfer Protocol) ...
 POP3, POP3S (Post Office Protocol) ...
 IMAP. ...
 DHCP (Dynamic Host Configuration Protocol) ...
 HTTP(s) (Hypertext Transfer Protocol) ...
 FTP(S) ((Secure) File Transfer Protocol)
Q#13: A router connects three links (networks). How many of each of the following
layers can the router be involved with?

a.physical layer b. data-link layer c. network layer


Answer:

Best answer

if a router connects three links then router will be involved :


N/W layer : 4
DLL : 6
Physical Layer: 6

PS: There are 3 links in above mentioned figure: A -B, B - E, E – F

Q14: Which layers of the TCP/IP protocol suite are involved in a link-layer
switch?

Answer:

The link-layer switch is normally involved in the first two layers of the TCP/ IP protocol
suite,
1. Physical layer and
2. Data-link layer.
Q15: If there is a single path between two source host and the destination host
do we need a router between the two hosts?
Answer:

Explain. a router is used to forward data units between multiple devices and networks. ... when
there is only one path available between the source host and the destination host a router has
no scope for selecting the best path for the packets to travel. therefore, a router is not
required when only one path exists.

PROBLEMS

P2- The presentation of data is becoming more and more important in today's Internet.
Some people argue that the TCP/IP protocol suite needs to add a new layer to take care
of the presentation of data. If this new layer is added in the future, where should its
position be in the suite?
Answer:

It is important to add presentation layer after the physical layer, so that the
data along with its headers can be translated, when the receiver machine is
applying a set of different characters.

Data compression is also required to reduce the space that is occupied by


data during transmission, now once the presentation is added to the physical
layer, data from the physical layer can be compressed at the presentation
layer and sent by improving the throughput.
Explanation:
Solution
The presentation of data involves the following as shown below:
Presentation of data comprises of the task like translating between receiver
and sender devices so that machines with different capabilities sets can
communicate with one another.
It involves encoding and decoding of data to provide data security that is been
transmitted by different machines.
Data sometimes needs to compressed for efficiency improvement for
transmission.
The physical layer of the TCP/IP protocol suite is responsible or refers to the
transmission of physical data over a physical medium It is good or important
to add presentation layer after the physical layer, so that the data along with
its headers can be translated, when the receiver machine is applying a set of
different characters.
Data encryption at this stage is good for security instead of encrypting the
data at upper/higher layers.
Hence, it is advisable to add presentation layer after the physical layer in the
TCP/IP suite.

P3: In an internet, we change the LAN technology to a new one. Which layers in the TCP/IP
protocol suite need to be changed?

ANSWER:
• To implement a change in a LAN technology, the new software must be implemented
in all the host devices connected to the LAN.
• Interface devices like routers, switches, gateways and the host device must be
updated about the LAN changes.
• For example: routers must update their routing tables if any new hosts are added, or
the cost to reach a host is changed.
P4: Assume that an application-layer protocol is written to use the services of UDP Can the
application-layer protocol uses the services of TCP without change?

Answer:
• TCP is a connection oriented transport layer protocol. TCP is more suitable for
applications which require high reliability and for application where transmission time is
not critical.
• UDP is a connectionless protocol. UDP is more suitable for applications where
transmission time is highly critical. Thus TCP and UDP provide different services.
P5- Answer the following questions about Figure 2.2 when the communication is from
Maria to Ann:
a. What is the service provided by layer 1 to layer 2 at Maria’s site?

b. What is the service provided by layer 1 to layer 2 at Ann’s site?


Figure 2.2 A three-layer protocol
Answer:
The communication between Maria and Anna can be described using the below image:

A: Layer 1 takes the cipher text from layer2, inserts (encapsulates it in an envelops and sends it.
B: Layer1 receives the mail, removes(decapsulates) the cipher text from envelops and delivers it to
leyer2.
P6-Assume a system uses five protocol layers. If the application program creates a
message of 150 bytes and each layer (including the fifth and the first) adds a header of
20 bytes to the data unit, what is the efficiency (the ratio of application layer bytes to the
number of bytes transmitted) of the system?

ANSWER: 66.7 % Explanation:

If the message created by the application layer, is 100 bytes’ size, and any of
the five protocol layers add 10 bytes to the data unit, when transmitted, the
packet will have 150 bytes, from which, 50 bytes are overhead bytes.
So, the efficiency (ratio of application layer bytes (excluding the header) to the
number of bytes transmitted) of the system is as follows:
E = 100 / 150 = 66.7 %

P7: 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 DE multiplexing at the source node and multiplexing at the destination node?

Fig:

ANS: Multiplexing and DE multiplexing in Transport Layer


Prerequisite – Layers of OSI Model
Multiplexing and DE multiplexing services are provided in almost every protocol architecture ever designed.
UDP and TCP perform the DE multiplexing and multiplexing jobs by including two special fields in the
segment headers: the source port number field and the destination port number.

P8: Match the following to one or more layers of the TCP/IP protocol suite:
a. route determination
b. connection to transmission media
c. providing services for the end

Answer:
(a)DATA LINK NETWRK (b) PHYSICAL (c) APPLICATION

P9: Assume that we have created a packet-switched internet. Using the


TCP/IP protocol suite, we need to transfer a huge file. What is the
advantage and disadvantage of sending large packets?

Answer:
There are two networking methods used to transmit the data across the two hosts or nodes.
1. Packet switching
2. Circuit switching
• Packet switching: Initially the data is divided into individual packets, and then transmitted.
• Circuit switching: Initially data route is set up to initialize the connections to the host.
When large files are transmitted by using the packet switching method the advantages and disadvantages are,
Advantages:
• Packets are routed to the fastest available route.
• Each packet is transmitted independently, therefore security achieved mostly.
• Routers every time verify the destination address of the packet.
The disadvantage is that larger packets take longer to transmit as they contain more data.
P10- 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?

Answer:
A protocol needs to have a field in its header to identify to which protocol the encapsulated packets belong.

P12: Answer the following questions about Figure 2.2 when the communication is from Maria to
Ann: a.
a. What is the service provided by layer 2 to layer 3 at Maria’s site?
what is the service provided by layer 2 to layer 3 at Ann’s site?
Answer:
a. Layer 2 takes the plaintext from layer 3, encrypts it into cipher text and delivers it to layer 1.
b. Layer 2 receives the cipher text from layer 1, decrypts it and delivers the plaintext to layer 3.

P13: Match the following to one or more layers of the TCP/IP protocol suite:
a) Creating user datagrams.
b) responsibility for handling frames between adjacent nodes
c) transforming bits to electromagnetic signals:

Answer:
(A): Transport, and Network (B):
Datalink. (C) physical.
P14: Assume that a private internet requires that the messages at the application layer be
encrypted and decrypted for security purposes. If we need to add some information about the
encryption/decryption process (such as the algorithms used in the process), does it mean that we
are adding one layer to the TCP/IP protocol suite? Redraw the TCP/IP layers (Figure 2.4-part b) if
you think so.
Answer:
No it does not mean that we are adding another layer to the protocol suite, it just means that the transport layer
has taken another function and now contains the encryption/decryption process. This process could be
contained and handled within the transport layer to be able to encrypt and decrypt data.

You might also like