You are on page 1of 36

1 R N 2 1 A I

RNS Institute of Technology


De p a rt m e n t o f AI & ML | V Se m e st e r | In t e rn a l Asse ssm e n t - 1
Computer Networks (21CS52)
Duration: 90mins. Max Marks: 50 Time: 2:00-3:40 Date: 28/12/2023
NOTE: Answer three full questions.
Don’t write anything on question paper other than USN.
Qn. Questions Marks BL CO
No.
1 a) Define computer networks, list the uses of computer networks. 4 L1 CO1
b) Illustrate the characteristics of a Local Area Network (LAN) with suitable 6 L1 CO1
diagram.
OR
2 a) Explain the role of routers in connecting geographically dispersed networks 6 L2 CO1
in a WAN with neat diagram.
b) List and discuss service primitives and their roles in communication 4 L2 CO1
between layers.

3 Explain the role of each layer in the OSI Reference Model with Architecture. 10 L2 CO1
Vision: Empowering AI & ML Engineers to seamlessly integrate society and technology

OR
4 With a suitable diagram, explain the different protocols present in TCP/IP 10 L2 CO1
reference model.

5 a) Bring out the comparison between connection-oriented and connectionless 5 L2 CO1


services.
b) Discuss the design issues associated with the layering. 5 L2 CO1
OR
6 a) Compare unshielded twisted pair (UTP) and shielded twisted pair (STP) 4 L2 CO1
cables.
b) Explain the core components of coaxial cable and fiber optics cable, 6 L2 CO1
illustrate with a suitable diagram.

7 a) Define wireless transmission; explain the different types of unguided 6 L1 CO1


transmission media.
b) Define framing? Explain bit stuffing with example. 4 L2 CO2
OR
8 a) Define flow control and error control in data link layer 4 L1 CO2
b) Explain the services provided by Data Link Layer to the Network Layer? 6 L2 CO2

9 a) Depict the term checksum? Calculate the checksum for given data 6 L3 CO2
1 2 3 4
10011001 11100010 00100100 10000100
b) Discuss the odd and even parity methods with suitable example. 4 L2 CO2
OR
10 a) Explain the block diagram of Cyclic Redundancy Check (CRC) 4 L2 CO2
b) Calculate the codeword of CRC for the given Dataword: 1001, Divisor: 6 L3 CO2
1011. Illustrate the detection process with error and without error

Bloom’sCognitiveLevels(BCL):L1:Remember,L2:Understand,L3:Apply,L4:Analyze,L5:Evaluate,L6:Create
RNS Institute of Technology
Department of AI & ML
V Semester – I Test – December 2023
Computer Networks (21CS52)
Duration: 90mins. Max Marks: 50 Time: 2:00-3:40 Date: 28/12/2023
NOTE: Answer three full questions.
Don’t write anything on question paper other than USN.
Qn. SCHEME AND SOLUTION Marks BL CO
No.
1 a) Computer Network: A collection of autonomous computers interconnected by a single 4 L1 CO
technology. Two computers are said to be interconnected if they are able to exchange 1
information.
The connection need not be via a copper wire; fiber optics, microwaves, infrared and
communication satellites can also be used. Networks come in many sizes, shapes and forms,
as we will see later. They are usually connected together to make larger networks, for
example the Internet.
A) Business Applications: Resource Sharing, Client-Server-mail, video conferencing
B) Home Applications: Shopping, Digital library, email, game playing, TV, Twitter,
Instagram
C) Mobile Users: Notebook Computer, Hotspots, Text Messaging, GPS
D) Social Issues: Phishing, network neutrality (Traffic treated as equal)
b) Local Area Network (LAN) 6 L1 CO
It is a privately owned network that operates within and nearby a single building like a 1
home, office or factory.
❖ When LANs are used by companies, they are called enterprise networks.
Wireless LANs(IEEE 802.11) /Wireless Fidelity (WiFi): It is used in homes, older office
buildings, cafeterias,and other places where it is too much trouble to install cables.
❖ In these systems, every computer has a radio modem and an antenna that it uses to
communicate with other computers.
❖ An AP (Access Point), wireless router, or base station, relays packets between the
wireless computers and also between them and the Internet.
❖ Wireless LAN operates at a speed of 11 to 100’s Mbps.
❖ Wired LANs use a range of different transmission technologies. Most of them use
copper wires, but some use optical fiber. LANs are restricted in size, which means that the
worst-case transmission time is boundedand known in advance.
OR
2 a) Role of routers in WAN: 6 L2 CO
❖ It Spans a large geographical area, often a country or continent. 1
❖ When data arrives on an incoming line, the switching element must choose an outgoing
line on which to forward them

❖ The routers will usually connect different kinds of networking technology. The networks
inside the offices may be switched Ethernet, for example, while the long-distance
Bloom’sCognitiveLevels(BCL):L1:Remember,L2:Understand,L3:Apply,L4:Analyze,L5:Evaluate,L6:Create
transmission lines may be SONET links.
How the network makes the decision as to which path to use is called the routing algorithm.
❖ How each router makes the decision as to where to send a packet next is called the
forwarding algorithm.
❖ Examples of WAN make heavy use of wireless technologies i.e. satellite systems.
b) Service primitives and their roles in communication between layers. 4 L2 CO
1

3 OSI Reference Model with Architecture. 10 L2 C


This model is based on a proposal developed by the International Standards Organization O1
(ISO) as a first step toward international standardization of the protocols used in the
various layers (Day and Zimmermann, 1983).
❖ It was revised in 1995 (Day, 1995). The model is called the ISO OSI (Open Systems
Interconnection)
Reference Model because it deals with connecting open systems—that is, systems that are
open for communication with other systems.
❖ The OSI model has seven layers. The principles that were applied to arrive at the seven
layers can be briefly summarized as follows:
1. A layer should be created where a different abstraction is needed.
2. Each layer should perform a well-defined function.
3. The function of each layer should be chosen with an eye toward defining internationally
standardized protocols.
4. The layer boundaries should be chosen to minimize the information flow across the
interfaces.
5. The number of layers should be large enough that distinct functions need not be thrown
together in the same layer out of necessity and small enough that the architecture does not
become unwieldy.

Bloom’sCognitiveLevels(BCL):L1:Remember,L2:Understand,L3:Apply,L4:Analyze,L5:Evaluate,L6:Create
1 The Physical Layer
❖ This layer is concerned with transmitting raw bits sequence of 0’s and 1’s over a
communication channel.
❖ The design issues deal with mechanical, electrical, and timing interfaces, as well as the
physical transmission medium, which lies below the physical layer.
2 The Data Link Layer
❖ This layer transforms a raw transmission facility into a line that appears free of
undetected transmission errors.
❖ It accomplishes this task by having the sender break up the input data into data frames
(typically a few hundred or a few thousand bytes) and transmit the frames sequentially.
❖ If the service is reliable, the receiver confirms correct receipt of each frame by sending
back an Acknowledgement frame.
• Another issue in the data link layer is how to keep a fast transmitter from drowning a slow
receiver in data. Some traffic regulation mechanisms are used.
• Medium access control sub layer deals with how to control access to the shared channel.
3 The Network Layer
❖ Controls the operation of the subnet.
❖ A key design issue is determining how packets are routed from source to destination.
❖ Routes can be based on static tables that are ‘‘wired into’’ the network and rarely
changed, or more often they can be updated automatically to avoid failed components.
❖ If too many packets are present in the subnet at the same time, they will get in one
another’s way, forming bottlenecks. Handling congestion is also a responsibility of the
network layer.
❖ Heterogeneous networks to be interconnected.
4 The Transport Layer
❖ It accepts data from above it, split it up into smaller units if need be, pass these to the
network layer, and ensure that the pieces all arrive correctly at the other end.
❖ It also determines what type of service to provide to the session layer, ultimately, to the
users of the network.
❖ The most popular type of transport connection is an error-free point-to-point channel that
delivers messages or bytes in the order in which they were sent.
❖ It also provides the service of transporting isolated messages with no guarantee about the
order of delivery, and the broadcasting of messages to multiple destinations.
❖ The transport layer is a true end-to-end layer; it carries data all the way from the source
to the destination.
5 The Session Layer
❖ It allows users on different machines to establish sessions between them.
❖ Sessions offer various services, including dialog control (keeping track of whose turn it
is to transmit), token management (preventing two parties from attempting the same critical
operation simultaneously), and synchronization (check pointing long transmissions to allow
them to pick up from where they left off in the event of a crash and subsequent recovery).
6 The Presentation Layer
❖ This layer is concerned with the syntax and semantics of the information transmitted.
❖ In order to make it possible for computers with different internal data representations to
communicate,the data structures to be exchanged can be defined in an abstract way, along
with a standard encoding to be used ‘‘on the wire.’’
7.The Application Layer
❖ It contains a variety of protocols that are commonly needed by users.
❖ One widely used application protocol is HTTP (Hyper Text Transfer Protocol), which is
the basisfor the World Wide Web. When a browser wants a Web page, it sends the name of
the page it wants to the server hosting the page using HTTP. The server then sends the page
back.
Bloom’sCognitiveLevels(BCL):L1:Remember,L2:Understand,L3:Apply,L4:Analyze,L5:Evaluate,L6:Create
OR
4 TCP/IP reference model: This reference Model is a four-layered suite of communication 10 L2 CO1
protocols, developed by the DoD (Department of Defense) in the 1960s. It is named after the
two main protocols that are used in the model, namely, TCP and IP.
1. The Link Layer
❖ It describes what links such as serial lines and classic Ethernet must do to meet the needs
of this connectionless internet layer.
❖ It is not really a layer at all, in the normal sense of the term, but rather an interface
between hosts and transmission links.
2. The Internet Layer
❖ Its job is to permit hosts to inject packets into any network and have they travel
independently to the destination.
❖ Packets may arrive in a completely different order than they were sent, in which case it is
the job of higher layers to rearrange them, if in-order delivery is desired.
❖ This layer defines an official packet format and protocol called IP (Internet Protocol), plus
a companion protocol called ICMP (Internet Control Message Protocol) that helps it function.
❖ The job of the internet layer is to deliver IP packets where they are supposed to go. Packet
routing is clearly a major issue here, as is congestion (though IP has not proven effective at
avoiding
congestion)
3. The Transport Layer
❖ It is designed to allow peer entities on the source and destination hosts to carry on a
conversation, just as in the OSI transport layer.
❖ Two end-to-end transport protocols have been defined here TCP,UDP.
❖ TCP (Transmission Control Protocol) is a reliable connection-oriented protocol that
allows a byte stream originating on one machine to be delivered without error on any other
machine in the internet.
❖ It segments the incoming byte stream into discrete messages and passes each one on to the
internet layer. At the destination, the receiving TCP process reassembles the received
messages into the output stream.
❖ TCP also handles flow control to make sure a fast sender cannot swamp a slow receiver
with more messages than it can handle.
❖ UDP (User Datagram Protocol), is an unreliable, connectionless protocol for applications
that do not want TCP’s sequencing or flow control and wish to provide their own.
❖ It is also widely used for one-shot, client-server-type request-reply queries and
applications in which prompt delivery is more important than accurate delivery, such as
transmitting speech or video.
4. The Application Layer
❖ It contains all the higher-level protocols. File transfer (FTP), and electronic mail (SMTP).
Domain Name System (DNS), for mapping host names onto their net- work addresses,
HTTP, the protocol for fetching pages on the World Wide Web, RTP, the protocol for
delivering real-time media such as voice or movies.

Bloom’sCognitiveLevels(BCL):L1:Remember,L2:Understand,L3:Apply,L4:Analyze,L5:Evaluate,L6:Create
5 a ) Comparison between connection-oriented and connectionless services. 5 L2 CO1
Connection-oriented network service, the service user first establishes a connection, uses the
connection, and then releases the connection.
❖ Connection acts like a tube: the sender pushes objects (bits) in at one end, and the receiver
takes them out at the other end. In most cases the order is preserved so that the bits arrive in
the order they were sent.
❖ In some cases when a connection is established, the sender, receiver, and subnet conduct a
negotiation about the parameters to be used, such as max message size, QoS required etc.
Typically, one side makes a proposal, and the other side can accept it, reject it, or make a
counter- proposal.
❖ Connectionless service is modeled after the postal system. Each message (letter) carries
the full destination address, and each one is routed through the intermediate nodes inside the
system independent of all the subsequent messages.
❖ There are different names for messages in different contexts; a packet is a message at the
network layer. When the intermediate nodes receive a message in full before sending it on to
the next node, this is called store-and-forward switching.
❖ The alternative, in which the onward transmission of a message at a node starts before it is
completely received by the node, is called cut-through switching
b) Design issues associated with the layering. 5 L2 CO1
Design Issues for the Layers: Some of the key design issues that occur in computer networks
are present in several layers. The following briefly mention some of the more important ones.
Identifying senders and receivers - some form of addressing is needed in order to specify a
specific source and destination.
• Rules for data transfer - The protocol must also determine the direction of data flow, how
many logical channels the connection corresponds to and what their priorities are. Many
networks provide at least two logical channels per connection, one for normal data and one
for urgent data.
• Error control – when circuits are not perfect, both ends of the connection must agree on
which error-detecting and error-correcting codes are being used.
• Sequencing - protocol must make explicit provision for the receiver to allow the pieces to be
reassembled properly.
• Flow Control - how to keep a fast sender from swamping a slow receiver with data. This is
done by feedback-based (receiver to sender) or agreed-on transmission rate.
• Segmentation and reassembly - several levels are the inability of all processes to accept
arbitrarily long messages. It leads to mechanisms for disassembling, transmitting, and then
reassembling messages.
• Multiplexing and demultiplexing – to share the communication medium by several users.
• Routing - When there are multiple paths between source and destination, a route must be
chosen.
OR
6 a) Compare unshielded twisted pair (UTP) and shielded twisted pair (STP) cables. 4 L2 CO1
Key Unshielded Twisted Pair (UTP) Shielded Twisted Pair
(STP)

UTP stands for Unshielded STP stands for Shielded


Full form
Twisted Pair. Twisted Pair.

Grounding Grounding cable in not required. Grounding cable is required.

Bloom’sCognitiveLevels(BCL):L1:Remember,L2:Understand,L3:Apply,L4:Analyze,L5:Evaluate,L6:Create
Data Data Transmission Rate is slower Data Transmission Rate is
Transmission than STP. very high.
Rate

Cost UTP cables are cheaper. STP cables are expensive.

Low maintenance cost in case of High maintenance cost in


Maintenance
UTP. case of STP.

Noise Noise is high in UTP. Noise is quite less in STP.

Possibility of crosstalk is very high Possibility of crosstalk is


Crosstalk
in UTP. quiet low in STP.
b) Core components of coaxial cable and fiber optics cable 6 L2 CO1

The construction and shielding of the coaxial cable give it a good combination of high
bandwidth and excellent noise immunity. The bandwidth possible depends on the cable
quality and length.
❖ Coaxial cables used to be widely used within the telephone system for long-distance lines
but have now largely been replaced by fiber optics on long- haul routes. Coax is still widely
used for cable television and metropolitan area networks, however.

Optical fibers are made of glass, which, in turn, is made from sand, an inexpensive raw
material available in unlimited amounts. Fiber Cables: ❖ Fiber optic cables are similar to
coax, except without the braid. At the center is the glass core through which the light
propagates. In multimode fibers, the core is typically 50 microns in diameter, about the
thickness of a human hair. In single-mode fibers, the core is 8 to 10 microns.

7 a) The different types of unguided transmission media. 6 L1 CO1

Radio Transmission
❖ Radio frequency (RF) waves are easy to generate, can travel long distances, and can
penetrate buildings easily, so they are widely used for communication, both indoors and
outdoors
Microwave Transmission
❖ Before fiber optics, for decades these microwaves formed the heart of the long-distance
tele- phone transmission system.
❖ In fact, MCI, one of AT&T’s first competitors after it was deregulated, built its entire
system with microwave communications passing between towers tens of kilometers apart.
Even the company’s name reflected this (MCI stood for Microwave Communications, Inc.).
❖ Microwaves travel in a straight line, so if the towers are too far apart, the earth will get in
the way.
❖ Unlike radio waves at lower frequencies, microwaves do not pass through buildings well.
In addition, Infrared Transmission
❖ Unguided infrared waves are widely used for short-range communication. The remote
Bloom’sCognitiveLevels(BCL):L1:Remember,L2:Understand,L3:Apply,L4:Analyze,L5:Evaluate,L6:Create
controls used for televisions, VCRs, and stereos all use infrared communication
Light Transmission
❖ Unguided optical signaling or free-space optics has been in use for centuries.
❖ Optical signaling using lasers is inherently unidirectional, so each end needs its own laser
and its own Photodetector. This scheme offers very high bandwidth at very low cost and is
relatively secure because it is difficult to tap a narrow laser beam.

b) Framing: The process of sending a group of bits used by sender. Way for a sender 4 L2 CO2
to transmit set of bits that are meaningful to receiver

OR
8 a) Error Control 4 L1 CO2
 If the sender receives a positive ack ,it knows the frame has arrived safely.
 On the other hand, a negative ack means that something has gone wrong and the
frame must be transmitted again.
 But certain frames can go missing due to the introduction of noise in the signal.
 If ack lost, Timer event, Duplication of pkt, Sequence no.

Flow Control
➢ Another important design issue that occurs in the data link layer (and higher layers as
well) is what to do with a sender that systematically wants to transmit frames faster than the
receiver can accept them. Sender should send the data at the same speed as the receiver is
capable of receiving. Otherwise receiver will loose couple of frames.
➢ Two approaches are commonly used.
1. Feedback-based flow control - the receiver sends back information to the sender giving it
permission to send more data, or at least telling the sender how the receiver is doing.
2. Rate-based flow control - the protocol has a built-in mechanism that limits the rate at
which senders may transmit data, without using feedback from the receiver.
b) Services provided by Data Link Layer to the Network Layer 6 L2 CO2

1. Unacknowledged connectionless service: No logical connection b/w src &


dst, Lost pkt no recovery.
2. Acknowledged connectionless service(Wifi). No logical connection, Timer,
Used in Unreliable channel.
3. Acknowledged connection-oriented service. Connection setup before
transfer-3 phase

Bloom’sCognitiveLevels(BCL):L1:Remember,L2:Understand,L3:Apply,L4:Analyze,L5:Evaluate,L6:Create
9 a) Checksum: Small datum, used for error detection. 6 L3 CO2

b) The odd and even parity methods with suitable example. 4 L2 CO2
 Even parity for asynchronous Transmission
 Odd parity for synchronous Transmission (Continuous)

OR
10 a) Block diagram of Cyclic Redundancy Check (CRC) 4 L2 CO2

b) Calculate the codeword of CRC for the given Dataword: 1001, Divisor: 1011. 6 L3 CO2
Illustrate the detection process with error and without error

Faculty Signature Scrutinizer Signature HOD Signature


Bloom’sCognitiveLevels(BCL):L1:Remember,L2:Understand,L3:Apply,L4:Analyze,L5:Evaluate,L6:Create
1 R N A I
RNS INSTITUTE OF TECHNOLOGY
DEPARTMENT OF ARTIFICIAL INTELLIGENCE & MACHINE LEARNING
INTERNAL ASSESSMENT - II
Semester: V Computer Networks Maximum Marks: 50
Duration: 1 hr 30 mins 18CS52 Date:30/01/2024
Answer any 5 full questions by choosing one from each.
Q. Questions Marks RBTL CO
No.
1 a) Define Hamming bits. Given a set of data bits = 1101, calculate the 6 L3 CO2
necessary parity bits and demonstrate how the Hamming code detects
and corrects errors.
b) With sequence diagram, describe the Simplex Stop-and-Wait Protocol. 4 L2 CO2
OR
2 a) Explain the Go-Back-N Sliding Window Protocol when N=4. What are 6 L3 CO2
its key features, and how does it handle retransmissions in the event of
lost or corrupted frames?
b) Compare and contrast the characteristics of Traditional Channel 4 L1 CO2
Allocation Method and Dynamic Channel Allocation Method.

3 a) Describe the Selective Repeat Sliding Window Protocol. What sets it 6 L1 CO2
apart from Go-Back-N, and how does it manage the retransmission of
frames in the presence of errors?
b) Explain Pure ALOHA for channel access. What are its advantages and 4 L2 CO2
limitations in terms of efficiency and simplicity?
OR
4 a) Explain the CSMA with Collision Detection (CSMA/CD) protocol. How 6 L3 CO2
does it contribute to the efficiency of shared communication channels?
b) List the collision free protocols and explain Binary Countdown Protocol. 4 L2 CO2

5 a) What is RTS and CTS. Describe the concept of the Hidden Terminal and 6 L2 CO2
Exposed Terminal Problem in wireless communication.
b) Explain the Adaptive Tree Walk Protocol with an example. 4 L2 CO2
OR
6 a) Bring out the differences between virtual-circuit and datagram network. 6 L3 CO3
b) Illustrate the network layer design issues. 4 L3 CO3

7 a) Describe Distance Vector Routing (Dijkstra's algorithm) for finding the 6 L2 CO3
shortest path from A to D in the following network.

b) Explain the concept of the Optimality Principle in routing. How does it 4 L2 CO3
influence routing decisions?

Page 1 of 2
1 R N A I
RNS INSTITUTE OF TECHNOLOGY
DEPARTMENT OF ARTIFICIAL INTELLIGENCE & MACHINE LEARNING
INTERNAL ASSESSMENT - II
OR
8 a) Calculate the shortest paths using Link State Routing (Bellman-Ford 6 L2 CO3
algorithm) for the following network, assume Node-6 as destination
and update routing table when link fail between node-3 and node-6.

b) Discuss the count-to-infinity problem. 4 L1 CO3


9 a) Discuss the advantages of using hierarchical addressing and routing. 6 L2 CO3
b) What is flooding in the context of routing? When is it used, and what are 4 L2 CO3
its advantages and disadvantages?
OR
10 a) Walk through the steps of the Reverse Path Forwarding (RPF) process 5 L2 CO3
when a broadcast packet arrives at a router.
b) Explain the steps of link state routing. 5 L2 CO3
Revised Bloom’s Cognitive Levels (BCL): L1: Remember, L2: Understand, L3: Apply, L4: Analyze, L5: Evaluate, L6: Create
Course Outcomes (CO):
CO1
CO2

*** All the Best ***

Page 2 of 2
RN SHETTY TRUST®
RNS INSTITUTE OF TECHNOLOGY
Autonomous Institution Affiliated to VTU, Recognized by GOK, Approved by AICTE
(NAAC ‘A+ Grade’ Accredited, NBA Accredited (UG - CSE, ECE, ISE, EIE and EEE)
Channasandra, Dr. Vishnuvardhan Road, Bengaluru - 560 098
Ph:(080)28611880,28611881 URL: www.rnsit.ac.in

DEPARTMENT OF ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

II INTERNAL ASSESSMENT

Course: Computer Networks Course Code:21CS52 Semester : 5

Max. Marks : 50 Date: 30-01-2024

Scheme and Solution


Q. No Description Marks

1. A) Hamming Code: Single Bit Error ,Even Parity


Data bits = 1101, calculate the necessary parity bits and demonstrate how the
6M
Hamming code detects and corrects errors.

1 b) Simplex Stop-and-Wait Protocol.


The following assumptions are made 4M
a. Error free channel.
b. Data transmission simplex.

1|Page
RN SHETTY TRUST®
RNS INSTITUTE OF TECHNOLOGY
Autonomous Institution Affiliated to VTU, Recognized by GOK, Approved by AICTE
(NAAC ‘A+ Grade’ Accredited, NBA Accredited (UG - CSE, ECE, ISE, EIE and EEE)
Channasandra, Dr. Vishnuvardhan Road, Bengaluru - 560 098
Ph:(080)28611880,28611881 URL: www.rnsit.ac.in

DEPARTMENT OF ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING

6M
Go-Back-N Sliding Window Protocol
2. a)

2|Page
RN SHETTY TRUST®
RNS INSTITUTE OF TECHNOLOGY
Autonomous Institution Affiliated to VTU, Recognized by GOK, Approved by AICTE
(NAAC ‘A+ Grade’ Accredited, NBA Accredited (UG - CSE, ECE, ISE, EIE and EEE)
Channasandra, Dr. Vishnuvardhan Road, Bengaluru - 560 098
Ph:(080)28611880,28611881 URL: www.rnsit.ac.in

DEPARTMENT OF ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING


2. b) 4M

Traditional Channel Allocation Method and Dynamic Channel Allocation Method.

Traditional Channel
Allocation(FCA) Dynamic Channel Allocation(DCA)

Fixed number of channels or


Fixed number of channels are not allocated to
voice channels are allocated to
cells.
cells.

If all the channels are occupied If all the channels are occupied and user make a
and user make a call then the call then Base Station(BS) request more channel
call will be blocked in FCA. to the Mobile Station Center(MSC).

Frequency reuse is maximum


because cells channels are Frequency reuse is not that maximum in DCA
separated by minimum reuse because of channel randomness allocation.
distance.

In FCA no such complex In DCA complex algorithms are used to decide


3. a) algorithms are used. which available channel is most efficient. 6M

Selective Repeat Sliding Window Protocol

3|Page
RN SHETTY TRUST®
RNS INSTITUTE OF TECHNOLOGY
Autonomous Institution Affiliated to VTU, Recognized by GOK, Approved by AICTE
(NAAC ‘A+ Grade’ Accredited, NBA Accredited (UG - CSE, ECE, ISE, EIE and EEE)
Channasandra, Dr. Vishnuvardhan Road, Bengaluru - 560 098
Ph:(080)28611880,28611881 URL: www.rnsit.ac.in

DEPARTMENT OF ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING


3. b) Pure ALOHA 4M

Carrier Sense Multiple Access/ Collision Detection 6M


4. a)
 Senses channel, if the channel is idle, it transmits a frame to check whether
the transmission was successful.
 If the frame is successfully received, the station sends another frame. If any
collision is detected in the CSMA/CD, the station sends a jam/ stop signal to
the shared channel to terminate data transmission.
 After that, it waits for a random time before sending a frame to a channel.

4.b) Binary Countdown Protocol: 4M


 Bit map does not scale well to network for more stations.
 To avoid conflict uses arbitration rule: As soon as station sees that a higher-
order bit position ->0 in its address, has been overwritten with a 1,gives up.

4|Page
RN SHETTY TRUST®
RNS INSTITUTE OF TECHNOLOGY
Autonomous Institution Affiliated to VTU, Recognized by GOK, Approved by AICTE
(NAAC ‘A+ Grade’ Accredited, NBA Accredited (UG - CSE, ECE, ISE, EIE and EEE)
Channasandra, Dr. Vishnuvardhan Road, Bengaluru - 560 098
Ph:(080)28611880,28611881 URL: www.rnsit.ac.in

DEPARTMENT OF ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING


5. a) Hidden Terminal Problem 6M
 The hidden terminal problem is characterized by a station not being able to
detect a potential competitor for the medium because the competitor is too
far away.
 This problem can lead to collisions and wasted BW in WLANs.
 In WLANs, interference detection at the receiver is crucial.
 Solution : Multiple Access Collision Avoidance(MACA) protocol.

RTS (Request To Send) Frame:


• A initiates communication by sending an RTS to B
• The RTS frame is a short frame (30 bytes) containing the length of the data
frame.
CTS (Clear To Send) Frame:
• B responds with a CTS

Adaptive Tree Walk Protocol


1. Treat every stations as the leaf of a binary tree
5. b) 2. first slot (after successful transmission), all stations 4M
can try to get the slot(under the root node).
3. If no conflict, fine.
4. Else, in case of conflict, only nodes under a subtree get to try for the next
one. (depth first search)

5|Page
RN SHETTY TRUST®
RNS INSTITUTE OF TECHNOLOGY
Autonomous Institution Affiliated to VTU, Recognized by GOK, Approved by AICTE
(NAAC ‘A+ Grade’ Accredited, NBA Accredited (UG - CSE, ECE, ISE, EIE and EEE)
Channasandra, Dr. Vishnuvardhan Road, Bengaluru - 560 098
Ph:(080)28611880,28611881 URL: www.rnsit.ac.in

DEPARTMENT OF ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING


virtual-circuit and datagram network 6M
6.a)

4M

6.b) Network Layer Design Issues


1. Store-and-Forward Packet Switching
2. Services Provided to the Transport Layer
3. Implementation of Connectionless Service
4. Implementation of Connection-Oriented Service
7.a) 6M

6|Page
RN SHETTY TRUST®
RNS INSTITUTE OF TECHNOLOGY
Autonomous Institution Affiliated to VTU, Recognized by GOK, Approved by AICTE
(NAAC ‘A+ Grade’ Accredited, NBA Accredited (UG - CSE, ECE, ISE, EIE and EEE)
Channasandra, Dr. Vishnuvardhan Road, Bengaluru - 560 098
Ph:(080)28611880,28611881 URL: www.rnsit.ac.in

DEPARTMENT OF ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING


4M
7. b)

6M

8. a)

8.b) Count-to-Infinity Problem 4M


• Routing loop
– Split Horizon:
• To mitigate the count-to-infinity problem, the "split horizon"
technique is often employed, where a router does not advertise
routes back to the neighbor from which it learned them.
– Poison Reverse:
• Another technique to prevent routing loops is "poison
reverse," where a router advertises an infinite distance for a
route it learned from a neighbor.

7|Page
RN SHETTY TRUST®
RNS INSTITUTE OF TECHNOLOGY
Autonomous Institution Affiliated to VTU, Recognized by GOK, Approved by AICTE
(NAAC ‘A+ Grade’ Accredited, NBA Accredited (UG - CSE, ECE, ISE, EIE and EEE)
Channasandra, Dr. Vishnuvardhan Road, Bengaluru - 560 098
Ph:(080)28611880,28611881 URL: www.rnsit.ac.in

DEPARTMENT OF ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING


6M

9. a) Hierarchical Routing
6M

9. b)  Flooding: Every incoming packet is sent out on all outgoing lines except the
one it arrived on. 4M
 Static routing algorithm
 Disadv: Vast no. of duplicate pkts generated
 Sequence no in each pkt

8|Page
RN SHETTY TRUST®
RNS INSTITUTE OF TECHNOLOGY
Autonomous Institution Affiliated to VTU, Recognized by GOK, Approved by AICTE
(NAAC ‘A+ Grade’ Accredited, NBA Accredited (UG - CSE, ECE, ISE, EIE and EEE)
Channasandra, Dr. Vishnuvardhan Road, Bengaluru - 560 098
Ph:(080)28611880,28611881 URL: www.rnsit.ac.in

DEPARTMENT OF ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING


5M
10. a) Reverse Path Forwarding (RPF)

5M

10. b) Link State Routing: Steps


1. Discover its neighbors and learn their network addresses
2. Set the distance or cost to each of its neighbors.
3. Construct a packet telling all it has just learned.
4. Send this packet to and receive packets from all other routers.
5. Compute the shortest path to every other router

Faculty Signature HOD

9|Page
1 R N A I
RNS INSTITUTE OF TECHNOLOGY
DEPARTMENT OF ARTIFICIAL INTELLIGENCE & MACHINE LEARNING
INTERNAL ASSESSMENT - III
Semester: V Computer Networks Maximum Marks: 50
Duration: 1 hr 30 mins 21CS52 Date:11/03/2024
Answer any 5 full questions by choosing one from each.
Q. Questions Marks RBTL CO
No.
1 Explain the concept three-way handshake protocol for connection 10 L2 CO3
establishment and connection release.
OR
2 a) Bring out the differences between TCP and UDP. 5 L2 CO3
b) With neat diagram, describe the UDP header format. 4 L2 CO3

3 Describe the transport layer service primitives. 10 L2 CO3


OR
4 Discuss the connection management in transport layer with state diagram. 10 L2 CO3

5 Explain RPC protocol and RPC Process with neat diagram. 10 L2 CO3
OR
6 Elaborate the working of Berkeley sockets API with a neat diagram. 10 L2 CO3

7 a) Describe HTTP request and response message format with a neat 6 L2 CO4
diagram.
b) Write the differences between persistent and non-persistent HTTP. 4 L2 CO4
OR
8 a) Write short notes on (i) Web Cache and (ii) Cookies 6 L1 CO4
b) State the principle of network applications. 4 L1 CO4
9 Explain DNS hierarchy and DNS name resolution with example. 10 L2 CO4
OR
10 Explain the architecture of E-Mail system. 10 L2 CO4
Revised Bloom’s Cognitive Levels (BCL): L1: Remember, L2: Understand, L3: Apply, L4: Analyze, L5: Evaluate, L6: Create
Course Outcomes (CO):
CO3 Identify and organize the communication system network components of Transport Layer
CO4 Design communication networks for user requirements in the application domine.

*** All the Best ***

Page 1 of 1
RN SHETTY TRUST®
RNS INSTITUTE OF TECHNOLOGY
Autonomous Institution Affiliated to VTU, Recognized by GOK, Approved by AICTE
(NAAC ‘A+ Grade’ Accredited, NBA Accredited (UG - CSE, ECE, ISE, EIE and EEE)
Channasandra, Dr. Vishnuvardhan Road, Bengaluru - 560 098
Ph:(080)28611880,28611881 URL: www.rnsit.ac.in

DEPARTMENT OF INFORMATION SCIENCE & ENGINEERING


1 R N I S
CIE – Test 3
Sem: V Date: 12/03/2024

Subject: Computer Networks Time: 1 ½ hours


Subject Code: 21CS52 Max. Marks: 50
Vision: Building Information Technology Professionals by Imparting Quality Education and Inculcating Key Competencies

Instruction: Answer any 5 full questions, selecting ONE question from each part.

Q.No. Question Marks RBT* COs


PART 1
1 a Explain the concept three-way handshake protocol for connection
establishment and connection release.
Three-way handshake:
Tomlinson (1975) introduced the three-way handshake as a solution to the
problem of establishing connections reliably in the presence of delayed
duplicate control segments.
1. In this protocol, one peer verifies with the other that the connection request
is current. The typical setup procedure involves the initiating host sending a
CONNECTION REQUEST segment containing a sequence number (x) to the
receiving host.
2. The receiving host responds with an ACK segment acknowledging the
sequence number (x) and announcing its own initial sequence number (y).
3. Finally, the initiating host acknowledges the receiving host's choice of an
initial sequence number in the first data segment it sends.

CO3
5+5 L2

The three-way handshake works effectively in the presence of delayed


duplicate control segments by ensuring that any delayed duplicates do not
cause damage.
If a delayed duplicate CONNECTION REQUEST segment arrives, the
receiving host verifies with the initiating host before proceeding with the
connection setup.

1
Connection Release
Releasing a connection can be more complex than establishing one, with
various potential pitfalls. Two styles of connection termination exist:
asymmetric release and symmetric release.
Asymmetric release, akin to how the telephone system operates, terminates
the connection when one party hangs up.
Symmetric release treats the connection as two separate unidirectional
connections, requiring each to be released independently.

OR
2 a List and explain any five differences between TCP and UDP.
•Two Main Protocols in the Transport Layer: The Internet features two
primary protocols in the transport layer, each serving different purposes: a
connectionless protocol and a connection-oriented one. These protocols
work together to facilitate communication between networked applications.
•Connectionless Protocol (UDP):
1. UDP (User Datagram Protocol) is the connectionless protocol in the
transport layer.
2. It operates by simply sending packets between applications without
establishing a connection.
3. UDP provides minimal services beyond basic packet delivery, allowing
applications to implement their own protocols on top of it as needed.
4.DNS and RPC applications uses UDP CO3
5 L2
5.Each packet uses source and destination address for routing.
•Connection-Oriented Protocol (TCP):
1. TCP (Transmission Control Protocol) is the connection-oriented protocol
counterpart to UDP.
2. Unlike UDP, TCP handles various aspects of communication
comprehensively.
3. It establishes connections, ensures reliability through mechanisms like
retransmissions, and manages flow control and congestion control on
behalf of the applications that utilize it.
4.E-MAIL AND HTTP Applications uses TCP.
5.Each packet uses VC number for routing.

2
b With neat diagram, describe the UDP header format.

1. Header Structure: UDP segments consist of an 8-byte header


followed by the payload. The header contains fields for source port,
destination port, length, and an optional checksum.

2. Port Usage: Ports serve as endpoints within the source and


destination machines, allowing the transport layer to deliver segments to
the correct application. Ports act as "mailboxes" that applications rent to
receive packets.

3. Length Field: The UDP length field includes both the 8-byte header
and the data. The minimum length is 8 bytes, covering the header, while
the maximum length is limited by the size of IP packets.

4. Checksum: UDP provides an optional checksum for extra reliability.


It covers the header, data, and a conceptual IP pseudoheader. The 5 L2
checksum algorithm involves adding up all
16-bit words in one's complement and taking the one's complement of the
sum. A computed checksum of 0 indicates a valid segment.
5. Pseudoheader: The UDP checksum computation includes a
pseudoheader that contains IPv4 addresses of the source and destination
machines, the protocol number for UDP, and the byte count for the UDP
segment. This aids in detecting misdelivered packets but violates the
protocol hierarchy since IP addresses belong to the IP layer.
6. Functionalities: UDP does not provide flow control, congestion
control, or retransmission of bad segments. These tasks are left to user
processes. UDP's primary functions include providing an interface to the
IP protocol, demultiplexing multiple processes using ports, and optional
end-to-end error detection.
7. Use Cases: UDP is suitable for applications that require precise control
over packet flow, error control, or timing. It is commonly used in client-
server situations where short requests and replies are exchanged, such as
in the Domain Name System (DNS), where a client sends a request to a
DNS server and expects a short reply back.
Overall, UDP offers a lightweight, efficient, and simple communication
mechanism for applications that prioritize speed and simplicity over
reliability and error handling.
PART 2
3 a Describe the transport layer service primitive’s in-detail.
The transport layer provides operations to application programs through
transport service primitives, facilitating communication between different
processes.

10 L2 CO3

3
Primitives Usage Example:
Consider an application scenario with a server and remote clients:
The server initiates communication by executing a LISTEN primitive,
which blocks until a client arrives.
When a client wishes to communicate, it executes a CONNECT
primitive, prompting the transport entity to send a packet to the server with
a transport layer message in the payload.
Segments (transport layer) are encapsulated within packets
(network layer), which, in turn, are contained in frames (data link layer).
Client-Server - Connection Establishment:
In connection establishment: The client's CONNECT call triggers
the sending of a CONNECTION REQUEST segment to the server.
Upon reception, the server checks if it's blocked on a LISTEN and,
if so, unblocks itself and sends a CONNECTION ACCEPTED segment
back to the client, establishing the connection.
Connection Release Variants:
Disconnection can occur in two variants: asymmetric and
symmetric. Asymmetric disconnection allows either transport user to issue
a DISCONNECT primitive, resulting in a DISCONNECT segment sent to
the remote transport entity, thereby releasing the connection.
In symmetric disconnection, each direction is closed independently,
with DISCONNECT initiated when one side has no more data to send but
is still willing to accept data from its partner.
Berkeley Sockets/Socket Programming:
Berkeley Sockets, a set of transport primitives used for TCP (Transmission
Control Protocol), were initially introduced as part of the Berkeley UNIX
4.2BSD software distribution in 1983. Since their release, they have gained
widespread popularity and are now extensively utilized for Internet
programming across various operating systems, particularly UNIX-based
systems. Additionally, a socket-style API named 'winsock' exists for
Windows systems.
Socket Primitives:
The socket primitives, offer enhanced features and flexibility. These
primitives include:
1. SOCKET: Creates a new communication endpoint.

2. BIND: Associates a local address with a socket.

3. LISTEN: Announces willingness to accept connections and specifies


the queue size.

4. ACCEPT: Passively establishes an incoming connection.

5. CONNECT: Actively attempts to establish a connection.

6. SEND: Sends data over the connection.

7. RECEIVE: Receives data from the connection.

8. CLOSE: Releases the connection.


Server side Execution: Servers execute the first four primitives in sequence.
The SOCKET primitive creates a new endpoint and allocates table space
for it within the transport entity. The BIND primitive assigns network
addresses to sockets, allowing remote clients to connect. LISTEN allocates
space to queue incoming calls, while ACCEPT blocks until an incoming

4
connection request arrives.
Client-Side Execution:On the client side, a socket is first created using the
SOCKET primitive. However, BIND is not necessary since the server does
not require a specific address. The CONNECT primitive actively initiates
the connection process and blocks the caller until it completes. Once
established, both sides can use SEND and RECEIVE to transmit and
receive data over the connection.
Connection Release:Connection release with sockets is symmetric. Once
both sides execute a CLOSE primitive, the connection is released.
OR
4 a Discuss the connection management in transport layer with state diagram.

The steps required to establish and release connections can be represented


in a finite state machine with the 11 states listed
Each connection starts in the CLOSED state. It leaves that state when it
does either a passive open (LISTEN) or an active open (CONNECT). If 4+6 L2 CO3
the other side does the opposite one, a connection is established and the
state becomes ESTABLISHED.Connection release can be initiated by
either side. When it is complete,the state returns to CLOSED.
Each line in Fig. is marked by an event/action pair. The event can either be
a user-initiated system call (CONNECT, LISTEN, SEND, or CLOSE), a
segment arrival(SYN, FIN, ACK, or RST), or, in one case, a timeout of
twice the maximum packet lifetime. The action is the sending of a control
segment (SYN, FIN, or RST) or nothing, indicated by —. Comments are
shown in parentheses.

5
PART 3
5 a Explain RPC protocol and RPC Process with neat diagram.
Remote Procedure Call (RPC) is a concept that allows programs to call
procedures located on remote hosts, making network interactions resemble
local function calls. This approach simplifies network programming by
abstracting away the details of networking, making it more familiar and
intuitive for developers.
Here's a breakdown of the key points about RPC from the provided text:
1.Conceptual Similarity to Function Calls: RPC is akin to making a
function call in a programming language. A client program can call
procedures located on remote hosts as if they were local procedures, passing
parameters and receiving results.

2.Basis and Development: RPC was pioneered by Birrell and Nelson in


1984. It enables processes on one machine to invoke procedures located on
another machine, with parameters passed from caller to callee and results
returned.

10 L2 CO3
3.Client-Server Model: In RPC, the calling process is termed the client,
while the called process is termed the server.
4.Stub Procedures: RPC involves the use of stub procedures, both on the
client and server side, to hide the complexities of remote communication.
The client stub represents the server procedure in the client's address
space, and vice versa.
5.RPC Process: The RPC process involves several steps: The client calls
the client stub, which internally marshals the parameters into a message.
.The message is sent from the client machine to the server machine by the
operating system.
.The server stub unpacks the parameters and calls the server procedure.
.The server procedure executes and returns results back to the client in a
similar fashion.
.Challenges and Solutions: Passing pointer parameters between client and
server can be problematic due to different address spaces. Techniques like
call-by-copy-restore are used to overcome this limitation.
.Weakly typed languages like C pose challenges in marshaling
parameters, especially when parameter sizes are not explicitly defined.
.Deduction of parameter types can be difficult, especially in languages
like C with flexible parameter specifications.
.Global variables lose their shared nature when procedures are moved to
remote machines, impacting communication.
6.Implementation and Transport Protocols: RPC can be implemented
using UDP as a base protocol, with requests and replies sent as UDP
packets. However, additional mechanisms are needed for reliability,
6
handling large messages, and managing concurrent requests.
7. Idempotent Operations: RPC operations must consider idempotency,
ensuring that repeated executions yield the same result. Operations like
DNS requests are idempotent, but others with side-effects may require
stronger semantics, possibly necessitating the use of TCP for
communication.
OR
6 a Elaborate the working of Berkeley sockets API with a neat diagram.

Berkeley Sockets/Socket Programming:


Berkeley Sockets, a set of transport primitives used for TCP (Transmission
10 L2 CO3
Control Protocol), were initially introduced as part of the Berkeley UNIX
4.2BSD software distribution in 1983. Since their release, they have gained
widespread popularity and are now extensively utilized for Internet
programming across various operating systems, particularly UNIX-based
systems. Additionally, a socket-style API named 'winsock' exists for
Windows systems.
Socket Primitives:
The socket primitives, offer enhanced features and flexibility. These
primitives include:
1. SOCKET: Creates a new communication endpoint.

2. BIND: Associates a local address with a socket.

3. LISTEN: Announces willingness to accept connections and specifies


the queue size.

4. ACCEPT: Passively establishes an incoming connection.

5. CONNECT: Actively attempts to establish a connection.

6. SEND: Sends data over the connection.

7. RECEIVE: Receives data from the connection.

8. CLOSE: Releases the connection.

7
Server-Side Execution:Servers execute the first four primitives in sequence.
The SOCKET primitive creates a new endpoint and allocates table space for
it within the transport entity. The BIND primitive assigns network addresses
to sockets, allowing remote clients to connect. LISTEN allocates space to
queue incoming calls, while ACCEPT blocks until an incoming connection
request arrives.
Client-Side Execution:
On the client side, a socket is first created using the SOCKET primitive.
However, BIND is not necessary since the server does not require a specific
address. The CONNECT primitive actively initiates the connection process
and blocks the caller until it completes. Once established, both sides can use
SEND and RECEIVE to transmit and receive data over the connection.
Connection Release:
Connection release with sockets is symmetric. Once both sides execute a
CLOSE primitive, the connection is released.
PART 4
7 a Describe HTTP request and response message format with a neat diagram.
HTTP Request Message

• The request-message contains 3 sections (Figure 1.5): 1) Request-line


2) Header-line and
3) Carriage return.
The first line of message is called the request-line. The subsequent lines are
called the header-lines.
• The request-line contains 3 fields. The meaning of the fields is as follows: CO4
5 L2
1) Method “GET”: This method is used when the browser requests an
Object from the server.
2) URL “/somedir/page.html”: This is the object requested by the
browser.
3) Version “HTTP/1.1”: This is version used by the browser.
• The request-message contains 4 header-lines. The meaning of the header-
lines is as follows:
1) “Host: www.someschool.edu” specifies the host on which the object
resides.
2) “Connection: close” means requesting a non-persistent connection.
3) “User-agent:Mozilla/5.0” means the browser used is the Firefox.
4) “Accept-language:eng” means English is the preferred language.
• The method field can take following values: GET, POST, HEAD, PUT and
DELETE.
1) GET is used when the browser requests an object from the server.
2) POST is used when the user fills out a form & sends to the server.
3) HEAD is identical to GET
4) PUT is used to upload objects to servers.
5) DELETE allows an application to delete an object on a server.

8
HTTP Response Message

1) Status line
2) Header-lines and
3) Data (Entity body).

• The status line contains 3 fields:


1) Protocol version
2) Status-code and
3) Status message.
• Some common status-codes and associated messages include:
1) 200 OK: Standard response for successful HTTP requests.
2) 400 Bad Request: The server cannot process the request due to a client
error.
3) 404 Not Found: The requested resource cannot be found.
• The meaning of the Status line is as follows:
“HTTP/1.1 200 OK”: This line indicates the server is using HTTP/1.1 & that
everything is OK.
• The response-message contains 6 header-lines. The meaning of the header-
lines is as follows:
1) Connection: This line indicates browser requesting a non-persistent
connection.
2) Date: This line indicates the time & date when the response was sent by
the server.
3) Server: This line indicates that the message was generated by an Apache
Web-server.
b Write the differences between persistent and non-persistent HTTP.

5 L2

9
OR
8 a Write short notes on (i) Web Cache and (ii) Cookies
A Web-cache is a network entity that satisfies HTTP requests on the behalf
of an original Web-server. The Web-cache has disk-storage. The disk-storage
contains copies of recently requested-objects.

• Here is how it works (Figure 1.8):


1) The user's HTTP requests are first directed to the web-cache.
2) If the cache has the object requested, the cache returns the requested-
object to the client.
3) If the cache does not have the requested-object, then the cache
→ connects to the original server and
→ asks for the object.
4) When the cache receives the object, the cache
stores a copy of the object in local-storage and sends a copy of the object to
the client.
• A cache acts as both a server and a client at the same time.
1) The cache acts as a server when the cache 6 L1 CO4
receives requests from a browser and sends responses to the browser.
2) The cache acts as a client when the cache
requests to an original server and receives responses from the origin server.
• Advantages of caching: 1) To reduce response-time for client-request.
2) To reduce traffic on an institution’s access-link to the Internet.
3) To reduce Web-traffic in the Internet.
Cookies
• Cookies refer to a small text file created by a Web-site that is stored in the
user's computer.
• Cookies are stored either temporarily for that session only or permanently
on the hard disk.
• Cookies allow Web-sites to keep track of users.
• Cookie technology has four components:
1) A cookie header-line in the HTTP response-message.
2) A cookie header-line in the HTTP request-message.
3) A cookie file kept on the user’s end-system and managed by the user’s
browser.
4) A back-end database at the Web-site.
When a user first time visits a site, the server
→ creates a unique identification number (1678) and
→ creates an entry in its back-end database by the identification number
2) The server then responds to user’s browser. HTTP response includes Set-
cookie: header which contains the identification number (1678)
3) The browser then stores the identification number into the cookie-file.
4) Each time the user requests a Web-page, the browser
10
→ extracts the identification number from the cookie file, and
→ puts the identification number in the HTTP request.
5) In this manner, the server is able to track user’s activity at the web-site.

b State and explain the principle of network applications.


Principles of Network Applications
Network-applications are the driving forces for the explosive
development of the internet.
Examples of network-applications:

1. Web 5) Social networking (Facebook, Twitter)


2. File transfers 6) Video distribution (YouTube)
3. E-mail 7) Real-time video conferencing (Skype)
4. P2P file sharing 8) On-line games (World of Warcraft)
In network-applications, program usually needs to run on the different end-
systems and communicate with one another over the network.
• For ex: In the Web application, there are 2 different programs:
1) The browser program running in the user's host (Laptop or Smartphone).
2) The Web-server program running in the Web-server host.

Network Application Architectures 4 L1


Two approaches for developing an application: 1) Client-Server
architecture 2) P2P (Peer to Peer) architecture

Client-Server Architecture
In this architecture, there is a server and many clients distributed over
the network The server is always-on while a client can be randomly run. The
server is listening on the network and a client initializes the communication.
Upon the requests from a client, the server provides certain services to the
client. Usually, there is no communication between two clients. The server
has a fixed IP address. A client contacts the server by sending a packet to the
server's IP address. A server is able to communicate with many clients.
The applications such as FTP, telnet, Web, e-mail etc use the client-server
architecture.
Data Center
Earlier, client-server architecture had a single-server host. But now, a single-
server host is unable to keep up with all the requests from large no. of clients.

11
For this reason, data-center a is used. A data-center contains a large number
of hosts.
A data-center is used to create a powerful virtual server. In date center,
hundreds of servers must be powered and maintained.
For example: Google has around 50 data-centers distributed around the
world.

These 50 data-centers handle search, YouTube, Gmail, and other services.

P2P Architecture
There is no dedicated server (Figure 1.1b).
Pairs of hosts are called peers.
The peers communicate directly with each other.
The peers are not owned by the service-provider. Rather, the peers are
laptops controlled by users. Many of today's most popular and traffic-
intensive applications are based on P2P architecture.
Examples include file sharing (BitTorrent), Internet telephone (Skype) etc.
Main feature of P2P architectures: self-scalability.
For ex: In a P2P file-sharing system, Each peer generates workload by
requesting files.
Each peer also adds service-capacity to the system by distributing files to
other peers.
Advantage: Cost effective ‘.’ Normally, server-infrastructure & server
bandwidth are not required.
Three challenges of the P2P applications: Most residential ISPs have been
designed for asymmetrical bandwidth usage. Asymmetrical bandwidth means
there is more downstream-traffic than upstream-traffic. But P2P applications
shift upstream-traffic from servers to residential ISPs, which stress on the
ISPs. Since the highly distribution and openness, P2P applications can be a
challenge to security. Success of P2P depends on convincing users to
volunteer bandwidth & resources to the applications.
PART 5
9 a Explain DNS hierarchy and DNS name resolution with examples.
DNS is an internet service that translates domain-names into IP addresses.
For ex: the domain-name “www.google.com” might translate to IP address
“198.105.232.4”. Because domain-names are alphabetic, they are easier to
remember for human being. But, the Internet is really based on IP addresses
(DNS Domain Name System).
Services Provided by DNS
• The DNS is 1) A distributed database implemented in a hierarchy of DNS
servers. 2) An application-layer protocol that allows hosts to query the
distributed database. DNS servers are often UNIX machines running the
BIND software. The DNS protocol runs over UDP and uses port 53. (BIND 10 L2 CO4
Berkeley Internet Name Domain) DNS is used by application-layer protocols
such as HTTP, SMTP, and FTP. Assume a browser requests the URL
www.someschool.edu/index.html. Next, the user’s host must first obtain the
IP address of www.someschool.edu
This is done as follows:
1) The same user machine runs the client-side of the DNS application.
2) The browser
extracts the hostname “www.someschool.edu” from the URL and
passes the hostname to the client-side of the DNS application.
3) The client sends a query containing the hostname to a DNS server.

12
4) The client eventually receives a reply, which includes the IP address for
the hostname.
5) After receiving the IP address, the browser can initiate a TCP connection
to the HTTP server. DNS also provides following services: A host with a
complicated hostname can have one or more alias names.
1) Host Aliasing
2) Mail Server Aliasing
For obvious reasons, it is highly desirable that e-mail addresses be
mnemonic. DNS is also used to perform load distribution among replicated
servers. Busy sites are replicated over multiple servers & each server runs on
a different system. 3) Load Distribution

A Distributed, Hierarchical Database

Suppose a client wants to determine IP address for hostname


“www.amazon.com” (Figure 1.12): 1) The client first contacts one of the
root servers, which returns IP addresses for TLD servers
2) Then, the client contacts one of these TLD servers. The TLD server
returns the IP address of an authoritative-server for “amazon.com”. 3)
Finally, the client contacts one of the authoritative-servers for amazon.com.
The authoritative-server returns the IP address for the hostname
“www.amazon.com”.

13
OR
10 a Explain the architecture of E-Mail system and SMTP with suitable
diagram.
Electronic Mail in the Internet
e-mail is an asynchronous communication medium in which people
send and read messages.
e-mail is fast, easy to distribute, and inexpensive.
e-mail has features such as

→ messages with attachments


→ hyperlinks
→ HTML-formatted text and
→ embedded photos.
Three major components of an e-mail system (Figure 1.11):
User-agents allow users to read, reply to, forward, save and compose
messages.
For example: Microsoft Outlook and Apple Mail
Mail-servers contain mailboxes for users.
A message is first sent to the sender's mail-server.
Then, the sender’s mail-server sends the message to the receiver's
mail-server.
If the sender’s server cannot deliver mail to receiver’s server, the
sender’s server 10 L2 CO4
SMTP is an application-layer protocol used for email.
SMTP uses TCP to transfer mail from the sender’s mail-server to
the recipient’s mail-server.
SMTP has two sides:
1) A client-side, which executes on the sender’s mail-server.
2) A server-side, which executes on the recipient’s mail-server.
Both the client and server-sides of SMTP run on every mail-
server.
When a mail-server receives mail from other mail-servers, the
mail-server acts as a server. When a mail-server sends mail to other mail-
servers, the mail-server acts as a client.
1) User Agents
2) Mail Servers
→ holds the message in a message queue and
→ attempts to transfer the message later.
3) SMTP (Simple Mail Transfer Protocol)

14
Vision: Building Information Technology Professionals by Imparting Quality Education and Inculcating Key Competencies

SMTP
• SMTP is the most important protocol of the email system.
• Three characteristics of SMTP (that differs from other applications): 1)
Message body uses 7-bit ASCII code only.
2) Normally, no intermediate mail-servers used for sending mail.
3) Mail transmissions across multiple networks through mail relaying.

• Here is how it works:


1) Usually, mail-servers are listening at port 25.
2) The sending server initiates a TCP connection to the receiving mail-
server.
3) If the receiver's server is down, the sending server will try later.
4) If connection is established, the client & the server perform application-
layer handshaking.
5) Then, the client indicates the e-mail address of the sender and the
recipient.
6) Finally, the client sends the message to the server over the same TCP
connection.

* Revised Bloom’s Taxonomy: L1-Remember, L2-Understand, L3-Apply, L4-Analyze, L5-Evaluate, L6-Create

Course Outcomes (CO):

CO3 Identify and organize the communication system network components of Transport
Layer
CO4 Design communication networks for user requirements in the application domine.

Signature of the Faculty Signature of Scrutinizer/HoD

15

You might also like