COMPUTER NETWORKS Notes
COMPUTER NETWORKS Notes
Network Criteria:
The criteria that have to be met by a computer network are:
1|Page
Performance is dependent on the following factors:
• Frequency of failure
• Recovery from failures
• Robustness during catastrophe
2|Page
3. Inter-process Communication - Network users, located
geographically apart, may converse in an interactive
session through the network. In order to permit this, the
network must provide almost error-free communications.
Transmission modes: -
Transmission Modes determine how data is transferred
between two devices in a computer network. There are 3
transmission modes in computer networks given below:
Simplex
Communication is uni-directional or one-way in Simplex Mode.
i.e. Only one device is allowed to transfer data and the other
device simply receives it. e.g. Radio Station (The station
transmits and the radio only receives).
3|Page
Half-Duplex Communication is possible both-ways but not
simultaneously. i.e. Both the devices/stations can transmit and
receive data but not at the same time. At an instant, only
communication in a single direction is allowed. e.g. Walkie-
Talkie.
4|Page
e.g., Cellular/Telephone Network.
Network Topologies: -
The arrangement of nodes in a network generally follows
some pattern or organization. Each of these patterns have their
set of advantages/disadvantages. Such arrangements are
called collectively referred to as network topologies. Some of
the popular network topologies are as follows:
1- Mesh
Key points:
5|Page
2. Installation is difficult & Expensive (fully-connected ~ lots
of cable required = nC2).
2- Star
Key points:
3- Bus
Key points:
4- Ring
Key points:
7|Page
5- Hybrid
Key points:
TCP/IP VS OSI
TCP/IP and OSI are reference models which divides the various
responsibilities into a logical separation of layers. Practical
implementations in devices are based on these 2 popular models.
The difference amongst them lies in the no. of layersand their
respective responsibilities:
8|Page
Brief description of each model:
9|Page
• Data-link Layer: It is responsible for Node-to-
Node delivery of packets, Framing, Error control, Flow
control, Physical Addressing (MAC). Upon receiving
packets from network layer, it encapsulates it within a
frame with the hardware (MAC) address of the receiver
(obtained via ARP ~ Address Resolution Protocol).
TCP/IP Model
It comprises of 4 layers with the following responsibilities
(starting from the lowest layer):
11 | P a g e
12 | P a g e
APPLICATION LAYER-
The application layer is the topmost layer of the OSI Model. It
is the layer in which user applications run. Various protocols
run at this layer serving different requirements. Let's
understand the working using the below diagram:
TRANSPORT LAYER: -
Transport Layer is the layer which lies just above the Network
layer and is responsible for end-to-end connectivity. It is so-
called because it provides point-to-point rather than hop-to-
hop. The unit of transmission at the transport layer is called
segmentation. TCP (Transmission Control
Protocol), UDP (User Datagram Protocol)
and DCCP (Datagram Congestion Control Protocol) are some
of the protocols running in the transport layer. The transport
layer also provides the acknowledgement of the successful
data transmission and re-transmits the data if an error is
found.
At sender’s side: Transport layer receives the formatted data
from the upper layers, performs Segmentation and also
16 | P a g e
implements Flow & Error control to ensure proper data
transmission. It also adds Source and Destination port number
in its header and forwards the segmented data to the Network
Layer.
17 | P a g e
Here is a list of few important port numbers and there uses:
18 | P a g e
• End-to-end Connection between hosts - The transport
layer is also responsible for creating the end-to-end
Connection between hosts for which it mainly uses TCP
and UDP. TCP is a secure, connection- orientated
protocol which uses a handshake protocol to establish a
robust connection between two end- hosts. TCP ensures
reliable delivery of messages and is used in various
applications. UDP, on the other hand, is a stateless and
unreliable protocol which ensures best-effort delivery. It
is suitable for the applications which have little concern
with flow or error control and requires to send the bulk of
data like video conferencing. It is often used in
multicasting protocols.
19 | P a g e
• Congestion Control - Congestion is a situation in which
too many sources over a network attempt to send data
and the router buffers start overflowing due to which loss
of packets occur. As a result retransmission of packets
from the sources increases the congestion further. In this
situation, the Transport layer provides Congestion
Control in different ways. It uses open loop congestion
control to prevent the congestion and closed
loop congestion control to remove the congestion in a
network once it occurred. TCP provides AIMD- additive
increase multiplicative decrease, leaky bucket technique
for congestion control.
20 | P a g e
DATA LINK LAYER: -
The data link layer is responsible for the node to node delivery
of the message. The main function of this layer is to make sure
data transfer is error-free from one node to another, over the
physical layer. When a packet arrives in a network, it is the
responsibility of DLL to transmit it to the Host using its MAC
address. The working is as follows:
21 | P a g e
Now let's see how the DLL works in a small office:
22 | P a g e
connection is again done using DLL. The setup is called WLAN
as they are all connected in Wireless Local Area Network. This
network might have a collision.
23 | P a g e
NETWORK LAYER: -
Network layer works for the transmission of data from one
host to the other located in different networks. It also takes
care of packet routing i.e. selection of the shortest path to
transmit the packet, from the number of routes available. The
sender & receiver's IP address are placed in the header by the
network layer.
The functions of the Network layer are:
24 | P a g e
2. Addressing: This involves processing of IP Addresses
Types of Hub
o Active Hub:- These are the hubs which have their
own power supply and can clean, boost and relay
the signal along with the network. It serves both as
a repeater as well as wiring Centre. These are used
to extend the maximum distance between nodes.
Types of Bridges
28 | P a g e
are also called protocol converters and can operate at any
network layer. Gateways are generally more complex
than switch or router.
29 | P a g e
30 | P a g e
TCP & UDP (DIFFERENCE) : -
TCP is a connection-oriented, stateful protocol which ensures
security, reliability in data transfer. It is established as a 3-way
handshake process given below:
31 | P a g e
3. ACK: In the final part, sender acknowledges the
response and they both establish a reliable connection
with which actual data transfer can occur.
32 | P a g e
33 | P a g e