You are on page 1of 6

Department of Master of Computer Applications

Term: 20/01/2020 to 09/05/2020 Course: Computer Networks Course Code: MCA41


CIE: IA-1 Sem: IV Credits: 3:0:1 USN:
Max Marks: 2x15=30 Time: 1 Hrs Portions for Test: L1-L22
Instructions to Candidates: Answer any TWO questions.

SOLUTION
Sl# Question Marks

1)a) Explain the difference between Circuit Switching and Packet Switching? 5

Answer: -

CIRCUIT SWITCHING PACKET SWITCHING

Connection oriented. Connectionless.

Initially designed for Voice Initially designed for Data


communication. Transmission.

Inflexible, because once a path is set Flexible, because a route is


all parts of a transmission follows the created for each packet to
same path. travel to the destination.

Message is received in the order, sent Packets of a message are


from the source. received out of order and
assembled at the destination.

Circuit switching can be achieved Packet Switching has two


using two technologies, either Space approaches Datagram
Division Switching or Time-Division Approach and Virtual Circuit
Switching. Approach.
Circuit Switching is implemented at Packet Switching is
Physical Layer. implemented at Network
Layer.

b) Draw the HTTP request message format and explain the field attributes. 10

Answer: -

START LINE

HTTP requests are messages sent by the client to initiate an action on the server.
Their start-line contain three elements:

1. An HTTP method, a verb (like GET, PUT or POST) or a noun


(like HEAD or OPTIONS), that describes the action to be performed. For
example, GET indicates that a resource should be fetched or POST means that data
is pushed to the server (creating or modifying a resource, or generating a temporary
document to send back).
2. The request target, usually a URL, or the absolute path of the protocol, port, and
domain are usually characterized by the request context. The format of this request
target varies between different HTTP methods. It can be
 An absolute path, ultimately followed by a '?' and query string. This is the most
common form, known as the origin form, and is used with GET, POST, HEAD,
and OPTIONS methods.
POST / HTTP/1.1
GET /background.png HTTP/1.0
HEAD /test.html?query=alibaba HTTP/1.1
OPTIONS /anypage.html HTTP/1.0
 A complete URL, known as the absolute form, is mostly used with GET when
connected to a proxy.
GET http://developer.mozilla.org/en-US/docs/Web/HTTP/Messages HTTP/1.1
 The authority component of a URL, consisting of the domain name and optionally
the port (prefixed by a ':'), is called the authority form. It is only used
with CONNECT when setting up an HTTP tunnel.
CONNECT developer.mozilla.org:80 HTTP/1.1
 The asterisk form, a simple asterisk ('*') is used with OPTIONS, representing the
server as a whole.
OPTIONS * HTTP/1.1
3. The HTTP version, which defines the structure of the remaining message, acting as
an indicator of the expected version to use for the response.

HEADER

HTTP headers from a request follow the same basic structure of an HTTP header: a case-
insensitive string followed by a colon (':') and a value whose structure depends upon the
header. The whole header, including the value, consist of one single line, which can be
quite long.

There are numerous request headers available. They can be divided in several groups:

 General headers, like Via, apply to the message as a whole.


 Request headers, like User-Agent, Accept-Type, modify the request by specifying it
further (like Accept-Language), by giving context (like Referer), or by conditionally
restricting it (like If-None).
 Entity headers, like Content-Length which apply to the body of the request.
Obviously, there is no such header transmitted if there is no body in the request.

BODY

The final part of the request is its body. Not all requests have one: requests fetching resources,
like GET, HEAD, DELETE, or OPTIONS, usually don't need one. Some requests send data
to the server in order to update it: as often the case with POST requests (containing HTML
form data).
Bodies can be broadly divided into two categories:

 Single-resource bodies, consisting of one single file, defined by the two


headers: Content-Type and Content-Length.
 Multiple-resource bodies, consisting of a multipart body, each containing a different
bit of information. This is typically associated with HTML Forms.
2)a) Briefly explain how DNS works? What is the importance of DNS cache? 8

Answer: -

b) Explain the difference between Frequency Division Multiplexing (FDM) and Time 7
Division Multiplexing (TDM) with the help of diagram.

Answer: -

Time-division multiplexing (TDM) is considered to be a digital procedure which can be


employed when the transmission medium data rate quantity is higher than the data rate
requisite of the transmitting and receiving devices. In TDM, corresponding frames carry
data to be transmitted from the different sources. Each frame consists of a set of time slots,
and portions of each source is assigned a time slot per frame.

Frequency-division multiplexing (FDM) is an analog technique which is implemented


only when the bandwidth of the link is higher than the merged bandwidth of the signals to
be transmitted. Each sending device produces signals which modulate at distinct carrier
frequencies. To hold the modulated signal, the carrier frequencies are isolated by adequate
bandwidth.

3)a) Draw the block diagram of Five-Layer Internet Protocol Stack and explain Message, 7
Segments, Datagrams, and Frames.

Answer: -

b) Explain the following: 8

a) Processing Delay
b) Queuing Delay
c) Transmission Delay
d) Propagation Delay
Answer: -

Processing Delay: - Processing delay is the time it takes routers to process the packet
header. Processing of packets helps in detecting bit-level errors that occur during
transmission of a packet to the destination. Processing delays in high-speed routers are
typically on the order of microseconds or less. In simple words, it is just the time taken to
process packets.

Queuing Delay: - Queuing delay is the time a job waits in a queue until it can be executed.
It depends on congestion. It is the time difference between when the packet arrived
Destination and when the packet data was processed or executed. It may be caused by
mainly three reasons i.e. originating switches, intermediate switches or call receiver
servicing switches.

Transmission Delay: - Time taken to put a packet onto link. In other words, it is simply
time required to put data bits on the wire/communication medium. It depends on length of
packet and bandwidth of network.

Propagation delay: - Time taken by the first bit to travel from sender to receiver end of the
link. In other words, it is simply the time required for bits to reach the destination from the
start point. Factors on which Propagation delay depends are Distance and propagation speed.

You might also like