Professional Documents
Culture Documents
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.
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
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)
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
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.
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
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
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.
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
II INTERNAL ASSESSMENT
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
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
Traditional Channel
Allocation(FCA) Dynamic Channel Allocation(DCA)
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).
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
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
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
4M
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
6M
8. a)
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
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
5M
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
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.
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
Instruction: Answer any 5 full questions, selecting ONE question from each part.
CO3
5+5 L2
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.
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.
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.
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.
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.
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.
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
8
HTTP Response Message
1) Status line
2) Header-lines and
3) Data (Entity body).
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.
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.
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
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
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.
CO3 Identify and organize the communication system network components of Transport
Layer
CO4 Design communication networks for user requirements in the application domine.
15