0% found this document useful (0 votes)
28 views16 pages

Final CN Sem

The document discusses TCP and UDP protocols, comparing their key features such as connection-orientation, reliability, error checking, flow control, and overhead. It also compares circuit switching and packet switching network technologies, as well as LAN, MAN and WAN network types. The document then summarizes OSI and TCP/IP models and explains hub vs switch, access, flow and error control in the data link layer, HDLC frame structure, and checksum error detection method.

Uploaded by

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

Final CN Sem

The document discusses TCP and UDP protocols, comparing their key features such as connection-orientation, reliability, error checking, flow control, and overhead. It also compares circuit switching and packet switching network technologies, as well as LAN, MAN and WAN network types. The document then summarizes OSI and TCP/IP models and explains hub vs switch, access, flow and error control in the data link layer, HDLC frame structure, and checksum error detection method.

Uploaded by

Om Padhi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

feature TCP UDP

Connection- Yes No
Oriented
Reliability Reliable delivery of data, ensures data Unreliable delivery, no guarantee of
integrity data integrity
Error Checking Provides error checking through Provides optional error checking
checksums through checksums
Acknowledgment Provides acknowledgment of data No acknowledgment of data receipt
receipt
Flow Control Implements flow control mechanisms No inherent flow control mechanisms
to manage data flow
Ordering of Packets Guarantees the sequencing of data Does not guarantee the sequencing of
packets data packets
Overhead Higher overhead due to additional Lower overhead compared to TCP
functionalities
Usage Used for applications requiring Used for applications where real-time
reliable data delivery communication is crucial
Examples Web browsing, email, file transfer VoIP, video streaming, online gaming
(HTTP, FTP)

Circuit Switching Packet Switching


In-circuit switching has there are 3 In Packet switching directly data transfer takes place.
phases:
i) Connection Establishment. ii) Data
Transfer.
iii) Connection Released.
In-circuit switching, each data unit In Packet switching, each data unit just knows the final
knows the entire path address which is destination address intermediate path is decided by the
provided by the source. routers.
In-Circuit switching, data is processed In Packet switching, data is processed at all intermediate
at the source system only nodes including the source system.
The delay between data units in circuit The delay between data units in packet switching is not
switching is uniform. uniform.
Resource reservation is the feature of There is no resource reservation because bandwidth is
circuit switching because the path is shared among users.
fixed for data transmission.
Circuit switching is more reliable. Packet switching is less reliable.
Transmission of the data is done by the Transmission of the data is done not only by the source but
source. also by the intermediate routers.
Circuit Switching does not support store Packet Switching supports store and forward transmission
and forward transmission
The circuit switching network is Packet switching is implemented at the datalink layer and
implemented at the physical layer. network layer
LAN MAN WAN

LAN is an acronym for Local MAN is an acronym for WAN is an acronym for Wide Area
Area Network. Metropolitan Area Network. Network.

LAN is a network that usually MAN is a comparatively wider The WAN network spans to an even
connects a small group of network that covers large larger locality. It has the capacity to
computers in a given regions- like towns, cities, etc. connect various countries together.
geographical area. For example, the Internet is a WAN.

The LAN is private. Hospitals, The MAN can be both private or The WAN can also be both private or
homes, schools, offices, etc., public. Many organizations and public.
may own it. telecom operators may own
them.

Very easy to design and Comparatively difficult to Very difficult to design and maintain.
maintain. design and maintain.

LAN offers a very high MAN offers a moderate Internet WAN offers a low Internet speed.
Internet speed. speed.

Parameters OSI Model TCP/IP Model


Full Form OSI stands for Open Systems TCP/IP stands for Transmission Control
Interconnection. Protocol/Internet Protocol.
Layers It has 7 layers. It has 4 layers.
Usage It is low in usage. It is mostly used.
Approach It is vertically approached. It is horizontally approached.
Delivery Delivery of the package is guaranteed in Delivery of the package is not guaranteed
OSI Model. in TCP/IP Model.
Replacement Replacement of tools and changes can Replacing the tools is not easy as it is in
easily be done in this model. OSI Model.
Reliability It is less reliable than TCP/IP Model. It is more reliable than OSI Model.

1) Explain Hub & Switch with suitable diagram.


HUB:
 A hub is a fundamental networking device used in Local Area Networks (LAN) that operates at
the physical layer of the OSI model.
 Its primary function is to connect multiple devices within the network, acting as a central
junction.
 Upon receiving data from one device through one of its ports, the hub broadcasts this data
indiscriminately to all other connected devices.
SWITCH:
 A switch is an advanced networking device used in Local Area
Networks (LAN) that operates at the data link layer (Layer 2) of the
OSI model, though some switches can operate at the network layer
(Layer 3) for routing capabilities.
 It connects multiple devices within a network, allowing them to
communicate with each other efficiently.
 Unlike a hub, a switch does not broadcast data to all connected
devices. Instead, it intelligently directs data packets to the specific
device(s) based on their MAC addresses, after learning which devices
are connected to which ports.

6) Explain Access, Flow & Error control in DLL


1. Access Control
When multiple devices are connected to the same communication medium (e.g., a network cable
or wireless spectrum), there needs to be a method to determine which device has the right to use
the medium at any given time. This is where Access Control comes into play. It is a set of
protocols that dictates how devices share and access the communication channel. It prevents
collisions and ensures that data packets are sent without interference from other devices.
Examples of Access Control mechanisms include:
 CSMA/CD (Carrier Sense Multiple Access/Collision Detection):
 CSMA/CA (Carrier Sense Multiple Access/Collision Avoidance):
2. Flow Control
Flow Control ensures that the sender does not overwhelm the receiver with data faster than it can
process and acknowledge. Without flow control, the receiver's buffer might overflow, leading to
lost data. Flow Control mechanisms allow the receiver to control the rate of the data flow from
the sender, ensuring efficient communication between devices with varying processing speeds.
Examples of Flow Control mechanisms include:
 Stop-and-Wait Protocol:
 Sliding Window Protocol
3. Error Control
Error Control involves mechanisms for detecting and correcting errors that occur during the
transmission of data frames over a physical medium. Errors can be caused by noise, interference,
or other impairments. Error Control ensures data integrity and reliability across a network.
Error Control mechanisms include:
 Error Detection Codes (e.g., Parity Bits, Checksum, Cyclic Redundancy Check
(CRC)):
Automatic Repeat Request (ARQ) protocols

Explain HDLC frames


High-Level Data Link Control (HDLC) is a bit-oriented protocol that operates at the data link layer
(layer 2) of the OSI model. It ensures reliable data transmission between network devices by
encapsulating data in structured frames. Let's delve into the anatomy of an HDLC frame and explore its
key components:
Frame Structure:
An HDLC frame is composed of several distinct fields, each contributing to proper data delivery:
 Flag Field (Flag): This 8-bit field marks the beginning (01111110) and end of an HDLC frame. It helps
the receiver identify frame boundaries within the data stream.
 Address Field (Address): This field contains the address of the receiver station (secondary station) or
multiple receiver stations in multipoint configurations. The address length can vary from 1 to several
bytes, depending on the network setup.
 Control Field (Control): This field, typically 1 or 2 bytes long, carries information for flow and error
control. The specific format of the control field depends on the frame type (discussed later).
 Information Field (Information): This optional field carries the actual data payload intended for the
higher layers (e.g., network layer). The data length can vary depending on the specific application.
 Frame Check Sequence (FCS): This field, usually 2 or 4 bytes long, contains a cyclic redundancy
check (CRC) value calculated based on the entire frame (excluding the flag).

8) Explain Error detection method:


Checksum:
Checksum is the error detection
method used by upper layer protocols
and is considered to be more reliable
than LRC, VRC and CRC. This
method makes the use of Checksum
Generator on Sender side and
Checksum Checker on Receiver side.
At the Sender side, the data is divided
into equal subunits of n bit length by
the checksum generator. This bit is
generally of 16-bit length. These
subunits are then added together using one’s complement method. This sum is of n bits. The
resultant bit is then complemented. This
complemented sum which is called checksum is appended to the end of original data unit and is
then transmitted to Receiver.

The Receiver after receiving data + checksum passes it to checksum checker. Checksum checker
divides this data unit into various subunits of equal length and adds all these subunits. These
subunits also contain checksum as one of the subunits. The resultant bit is then complemented. If
the complemented result is zero, it means the data is error-free. If the result is non-zero it means
the data contains an error and Receiver rejects it.

G Explain the following with example Switches, Bridges, routers, repeater, hub.
1. Switch
Layer: Data Link Layer (Layer 2) Function: A switch connects devices within a single network
(LAN). It uses MAC addresses to forward data to the correct destination by creating a virtual
circuit between the sender and receiver for each communication session. Switches reduce network
congestion and improve security by sending data only to intended devices. Example: In an office
building, a switch connects various devices like computers, printers, and servers in the same
network, allowing them to communicate directly with each other efficiently.
2. Bridge
Layer: Data Link Layer (Layer 2) Function: A bridge is used to divide a network into segments
or to connect two LANs that use the same protocol. It filters traffic by looking at the MAC address
of the devices, forwarding a frame only when the destination is on a different segment.
Example: If an office has two separate LANs on different floors, a bridge can be used to connect
these LANs. If a computer on the first floor sends a message to a printer on the second floor, the
bridge forwards this data between the two LANs.
3. Router
Layer: Network Layer (Layer 3) Function: Routers connect multiple networks together (e.g.,
LANs, WANs) and route data packets between them using IP addresses. Routers analyze data
packets' destination IP addresses and determine the best path for them to reach their destinations.
Example: In a home network, a router connects the home LAN to the Internet. It assigns local IP
addresses to each device on the network and routes Internet traffic to the correct device.
4. Repeater
Layer: Physical Layer (Layer 1) Function: A repeater regenerates and amplifies signals to extend
the range of a network. It operates at the physical layer, meaning it does not examine the data
traffic or its destination; it simply boosts the signal strength. Example: In a large building, a WiFi
signal might not reach all areas. A WiFi repeater can be placed halfway between the router and the
area with weak signal to boost the signal strength and coverage.
5. Hub
Layer: Physical Layer (Layer 1) Function: A hub is a basic networking device that connects
multiple devices in a LAN. It broadcasts incoming data packets to all connected devices,
regardless of the intended recipient, which can lead to data collisions and network congestion.
Example: In a small home network, a hub can connect several devices like computers and
printers. If one device sends data to another, the hub broadcasts this data to all connected devices,
not just to the intended recipient.
Q) Berkeley API is An application programming interface (API) allows the application programs
such as web browser or TELNET to access resources through an interface which is predefined. One
of the most popular API is Berkeley socket interface. With the help of the socket mechanism, a
programmer can write an application program easily without worrying about the underlying
networking details.
Sockets:
The socket interface was originally based on UNIX. It defines a set of system calls or procedure. The
communication structure that we need in socket programming is called as socket. A socket acts as an
end point. Two process can communicate if and only if they have a socket at each end. One of the
applications operates the server and the other one as client. The server works as a provider while the
client acts as the receiver. The server waits passively until a client requires a service. Types of
services:
H The socket mechanism can provide two types of services to the applications: 1.
Connection oriented 2. Connectionless.
1. Connection oriented: For the connection oriented mode, an application has to be first established
to a connection to another network before initializing any communication. After establishing a
connection, the data transfer will take place and after transferring all the data the establishment is
released. Connection oriented mode provides a reliable data transfer. The figure demonstrates the
socket calls for connection oriented mode. The server first carries out a passive open as follows:
 A TCP socket is created by using the socket call.
 The bind call will then bind the well known port number of the server socket.
 The socket is converted into a listening socket that can accept incoming connection from client by
using the listen call.
 Then finally the accept call will put the server in the blocking state on sleep mode until it receives a
connect request from the client.
2. Connectionless mode:
 In this mode it is not necessary to establish a connection prior to sending the data. An application can
immediately start sending the data.
 Thus the set up overheads are avoided in this mode. But the cost required to be paid is that the
sending application may waste in sending the data when the receiving application is not ready to
accept it.
 Moreover the data may not arrive end if the network decides to discard it.
 Another disadvantage is that the received data may not have the same order as that of the transmitted
data.
CSMA/CD: CSMA/CD stands for Carrier Sense Multiple Access / Collision Detection is a network
protocol for carrier transmission. It is operated in the medium access control layer. It senses of the shared
channel is busy for broadcasting and interrupts the broadcast until the channel is free. In CSMA/CD
collision is detected by broadcast sensing from the other stations. Upon collision detection in CSMA/CD,
the transmission is stopped, and a jam signal is sent by the stations and then the station waits for a random
time context before retransmission.
CSMA/CA: CSMA/CA stands for Carrier Sense Multiple Access / Collision Avoidance is a network
protocol for carrier transmission. Like CSMA/CD it is also operated in the medium access control layer.
Unlike CSMA/CD(that is effective after a collision) CSMA / CA is effective before a collision.
CSMA/CD CSMA/CA
CSMA / CD is effective after a collision. Whereas CSMA / CA is effective before a
collision.
CSMA / CD is used in wired networks. Whereas CSMA / CA is commonly used in
wireless networks.
It only reduces the recovery time. Whereas CSMA/ CA minimizes the possibility
of collision.
CSMA / CD resends the data frame Whereas CSMA / CA will first transmit the
whenever a conflict occurs. intent to send for data transmission.
CSMA / CD is used in 802.3 standard. While CSMA / CA is used in 802.11 standard.
It is more efficient than simple While it is similar to simple CSMA(Carrier
CSMA(Carrier Sense Multiple Access). Sense Multiple Access).
It is the type of CSMA to detect the It is the type of CSMA to avoid collision on a
collision on a shared channel. shared channel.
TELNET stands for Teletype Network. It is a type of protocol that enables one computer to connect to
the local computer. It is used as a standard TCP/IP protocol for virtual terminal service which is provided
by ISO. The computer which starts the connection is known as the local computer.
The computer which is being connected to i.e. which accepts the connection known as the remote
computer.
During telnet operation, whatever is being performed on the remote computer will be displayed by the
local computer. Telnet operates on a client/server principle. The local computer uses a telnet client
program and the remote computers use a telnet server program.
Logging
The logging process can be further categorized into two parts:
1. Local Login
2. Remote Login
1. Local Login: Whenever a user logs
into its local system, it is known as
local login.
The Procedure of Local Login
 Keystrokes are accepted by the
terminal driver when the user types at
the terminal.
 Terminal Driver passes these characters
to OS.
 Now, OS validates the combination of
characters and opens the required
application.
2. Remote Login: is a process in which users
can log in to a remote site i.e. computer and use
services that are available on the remote
computer. With the help of remote login, a user
is able to understand the result of transferring
the result of processing from the remote
computer to the local computer.
The Procedure of Remote Login
 When the user types something on the local
computer, the local operating system accepts
the character.
 The local computer does not interpret the
characters, it will send them to the TELNET client.
 TELNET client transforms these characters to a universal character set called Network Virtual Terminal
(NVT) characters and it will pass them to the local TCP/IP protocol Stack.
 Commands or text which are in the form of NVT, travel through the Internet and it will arrive at
the TCP/IP stack at the remote computer.
The medium access control (MAC) is a sublayer of the data link layer of the open system
interconnections (OSI) reference model for data transmission. It is responsible for flow control and
multiplexing for transmission medium. It controls the transmission of data packets via remotely shared
channels. It sends data over the network interface card.
MAC Layer in the OSI Model
The Open System Interconnections (OSI) model is a layered networking framework that conceptualizes
how communications should be done between heterogeneous systems. The data link layer is the second
lowest layer. It is divided into two sublayers −
 The logical link control (LLC) sublayer
 The medium access control (MAC) sublayer
The following diagram depicts the position of the MAC layer −
Functions of MAC Layer
 It provides an abstraction of the physical layer to the LLC and upper layers of the OSI network.
 It is responsible for encapsulating frames so that they are suitable for transmission via the physical
medium.
 It resolves the addressing of source station as well as the destination station, or groups of destination
stations.
 It performs multiple access resolutions when more than one data frame is to be transmitted. It
determines the channel access methods for transmission.
 It also performs collision resolution and initiating retransmission in case of collisions.
 It generates the frame check sequences and thus contributes to protection against transmission errors.

Token Bucket Leaky Bucket

1 Token bucket is token dependent. Leaky bucket is token independent.

2 If bucket is full token are discarded but not the If bucket is full packet or data is
packet. discarded.
3 Token bucket allows for large bursts to be sent Leaky bucket sends the packets at an
faster by speeding up the output. average rate.
4 Token bucket allows saving up of tokens Leaky bucket does not allow saving a
(permission) to send large bursts. constant rate is maintained.
5 Packets can only Transmitted when Packet are transmitted continuously.
there are enough token.
6 It save token. It is does not save token.
7 If there is a ready packet , a token is removed Bursty traffic is converted into uniform
from Bucket and packet is send. traffic by leaky bucket.
8 If there is no token in the bucket, then the packet In practice bucket is a finite queue outputs
cannot be sent. at finite rate.

Explain OSI architecture:


Physical Layer: Function: This is the lowest layer of the OSI model and deals with the physical
transmission of data over the network. It defines the hardware elements such as cables, connectors, and
network interface cards, as well as the electrical and mechanical characteristics of the transmission
medium.
Examples: Ethernet cables, fiber optic cables, radio waves.
Protocols: Ethernet, Wi-Fi, Bluetooth.
Data Link Layer: Function: The data link layer is responsible for the reliable transmission of data
between adjacent network nodes. It handles framing, error detection, and flow control. This layer ensures
that data is transmitted without errors over the physical layer.
Sublayers: It comprises two sublayers - Logical Link Control (LLC) and Media Access Control (MAC).
LLC deals with error control and flow control, while MAC handles access to the physical medium.
Examples: Ethernet, PPP (Point-to-Point Protocol), HDLC (High-Level Data Link Control).
Protocols: ARP (Address Resolution Protocol), IEEE 802.11 (Wi-Fi), Frame Relay.
Network Layer: Function: The network layer is responsible for the routing of data packets across
multiple networks. It establishes logical connections between nodes, determines the best path for data
transmission, and handles congestion control and packet sequencing. Examples: IP (Internet Protocol),
ICMP (Internet Control Message Protocol).
Protocols: IPv4, IPv6, ICMP, OSPF (Open Shortest Path First), BGP (Border Gateway Protocol)
Transport Layer: Function: The transport layer ensures end-to-end delivery of data between source and
destination hosts. It provides reliable and ordered delivery of data, error detection, and recovery
mechanisms. This layer also manages flow control and congestion control. Examples: TCP (Transmission
Control Protocol), UDP (User Datagram Protocol).Protocols: TCP, UDP, SCTP (Stream Control
Transmission Protocol).
Session Layer: Function: The session layer establishes, manages, and terminates sessions between
applications. It provides synchronization and dialog control between devices, allowing them to
communicate and coordinate data exchange sessions.
Examples: API calls, Remote Procedure Calls (RPC). Protocols: NetBIOS (Network Basic Input/Output
System), PPTP (Point-to-Point Tunneling Protocol), NFS (Network File System).
Presentation Layer: Function: The presentation layer ensures that data exchanged between applications
is in a format that the application layer can understand. It handles data translation, encryption, and
compression, thereby ensuring interoperability between different systems.
Examples: Data encryption/decryption, data compression.
Protocols: SSL/TLS (Secure Sockets Layer/Transport Layer Security), JPEG (Joint Photographic Experts
Group), ASCII (American Standard Code for Information Interchange).
Application Layer: Function: The application layer provides network services directly to end-users and
applications. It enables communication between different applications and supports various application-
level protocols.
Examples: HTTP (Hypertext Transfer Protocol), FTP (File Transfer Protocol), SMTP (Simple Mail
Transfer Protocol).Protocols: HTTP, FTP, SMTP, DNS

You might also like