CSNotes (2024)
CSNotes (2024)
Unit 1 - Introduction:
Introduction to data communications and networking,
use of Computer Networks, classification of networks,
OSI model, function of the layers, TCP/IP Protocol
suite.
Unit 6 - Internet:
Internet Service Providers (ISP), internet addressing
system: IP address with their classification and
notation, application layer protocols: (DNS, URL,
WWW, FTP, SMTP, HTTP, TELNET), web pages,
introduction to HTML.
Unit 1
Computer Networking is the practice of
connecting computers together to enable
communication and data exchange between
them. In general, Computer Network is a
collection of two or more computers. It
helps users to communicate more easily
• Nodes: Nodes are devices that are connected to a network. These can
include computers, Servers, Printers, Routers, Switches, and other
devices.
• Protocol: A protocol is a set of rules and standards
that govern how data is transmitted over a network.
Examples of protocols include TCP/IP, HTTP, and FTP.
Advantages:
Disadvantages:
LAN or Local Area Network connects network devices in such a way that
personal computers and workstations can share data, tools, and programs.
The group of computers and devices are connected together by a switch,
or stack of switches, using a private addressing scheme as defined by the
TCP/IP protocol. Private addresses are unique in relation to other
computers on the local network. Routers are found at the boundary of a
LAN, connecting them to the larger WAN.
Early LANs had data rates in the 4 to 16 Mbps range. Today, speeds are
normally 100 or 1000 Mbps. Propagation delay is very short in a LAN.
The smallest LAN may only use two computers, while larger LANs can
accommodate thousands of computers. LAN has a range up to 2km. A
LAN typically relies mostly on wired connections for increased speed and
security, but wireless connections can also be part of a LAN. The fault
tolerance of a LAN is more and there is less congestion in this network.
For example A bunch of students playing Counter-Strike in the same room
(without internet).
Advantages:
Disadvantages:
MAN or Metropolitan area Network covers a larger area than that covered
by a LAN and a smaller area as compared to WAN. MAN has a range of
5-50km. It connects two or more computers that are apart but reside in the
same or different cities. It covers a large geographical area and may serve
as an ISP (Internet Service Provider). MAN is designed for customers
who need high-speed connectivity. Speeds of MAN range in terms of
Mbps. It’s hard to design and maintain a Metropolitan Area Network.
The fault tolerance of a MAN is less and also there is more congestion in
the network. It is costly and may or may not be owned by a single
organization. The data transfer rate and the propagation delay of MAN are
moderate. Devices used for transmission of data through MAN are
Modem and Wire/Cable. Examples of a MAN are part of the telephone
company network that can provide a high-speed DSL line to the customer
or the cable TV network in a city.
Advantages:
Disadvantages:
There are two types of WAN: Switched WAN and Point-to-Point WAN.
WAN is difficult to design and maintain. Similar to a MAN, the fault
tolerance of a WAN is less and there is more congestion in the network.
A Communication medium used for WAN is PSTN or Satellite Link. Due
to long-distance transmission, the noise and error tend to be more in
WAN.
WAN’s data rate is slow about a 10th LAN’s speed since it involves
increased distance and increased number of servers and terminals etc. The
speed of WAN ranges from a few kilobits per second (Kbps) to megabits
per second (Mbps). Propagation delay is one of the biggest problems faced
here. Devices used for the transmission of data through WAN are Optic
wires, Microwaves, and Satellites. An example of a Switched WAN is the
asynchronous transfer mode (ATM) network and Point-to-Point WAN is
a dial-up line that connects a home computer to the Internet.
Advantages:
Disadvantages:
Conclusion –
There are many advantages of LAN over MAN and WAN, such as LAN
provide excellent reliability, a high data transmission rate, and can easily
be managed and shares peripheral devices too. Local Area Network
cannot cover cities or towns and for that Metropolitan Area Network is
needed, which can connect a city or a group of cities together. Further, for
connecting a Country or a group of Countries one requires a Wide Area
Network
OSI stands for Open Systems Interconnection, where open stands to
say non proprietary. It is a 7-layer architecture with each layer having
specific functionality to perform. All these 7 layers work collaboratively
to transmit the data from one person to another across the globe. The OSI
reference model was developed by ISO – ‘International Organization
for Standardization‘, in the year 1984.
1. Physical Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer
Physical Layer – Layer 1
The lowest layer of the OSI reference model is the physical layer. It is
responsible for the actual physical connection between the devices. The
physical layer contains information in the form of bits. It is responsible
for transmitting individual bits from one node to the next. When receiving
data, this layer will get the signal received and convert it into 0s and 1s
and send them to the Data Link layer, which will put the frame back
together.
• Bit rate control: The Physical layer also defines the transmission
rate i.e. the number of bits sent per second.
• Transmission mode: Physical layer also defines how the data flows
between the two connected devices. The various transmission
modes possible are Simplex, half-duplex and full-duplex.
Note:
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 the DLL to transmit
it to the Host using its MAC address.
The Data Link Layer is divided into two sublayers:
The packet received from the Network layer is further divided into frames
depending on the frame size of the NIC(Network Interface Card). DLL
also encapsulates Sender and Receiver’s MAC address in the header.
• Flow Control: The data rate must be constant on both sides else
the data may get corrupted thus, flow control coordinates the
amount of data that can be sent before receiving an
acknowledgment.
Note:
2. Data Link layer is handled by the NIC (Network Interface Card) and
device drivers of host machines.
3. Switch & Bridge are Data Link Layer devices.
The 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 addresses are placed in the
header by the network layer.
Note:
The transport layer provides services to the application layer and takes
services from the network layer. The data in the transport layer is referred
to as Segments. It is responsible for the end-to-end delivery of the
complete message. The transport layer also provides the acknowledgment
of the successful data transmission and re-transmits the data if an error is
found.
At the sender’s side: The transport layer receives the formatted data from
the upper layers, performs Segmentation, and also implements Flow and
error control to ensure proper data transmission. It also adds Source and
Destination port numbers in its header and forwards the segmented data
to the Network Layer.
Note: The sender needs to know the port number associated with the
receiver’s application.
At the receiver’s side: Transport Layer reads the port number from its
header and forwards the Data which it has received to the respective
application. It also performs sequencing and reassembling of the
segmented data.
1. Connection-Oriented Service
2. Connectionless Service
• Connection Establishment
• Data Transfer
• Termination/disconnection
Note:
Note:
For example:-
The presentation layer is also called the Translation layer. The data from
the application layer is extracted here and manipulated as per the required
format to transmit over the network.
At the very top of the OSI Reference Model stack of layers, we find the
Application layer which is implemented by the network applications.
These applications produce the data to be transferred over the network.
This layer also serves as a window for the application services to access
the network and for displaying the received information to the user.
Note: The OSI model acts as a reference model and is not implemented
on the Internet because of its late invention. The current model being used
is the TCP/IP model.
Step 1: Luffy interacts with e-mail application like Gmail, outlook, etc.
Writes his email to send. (This happens in Layer 7: Application layer)
Step 5: Addressing of packets is done in order to find the best route for
transfer. (This happens in Layer 3: Network Layer)
Step 6: Data packets are encapsulated into frames, then MAC address is
added for local devices and then it checks for error using error detection.
(This happens in Layer 2: Data Link Layer)
After the email reaches the receiver i.e. Zoro, the process will reverse and
decrypt the e-mail content. At last, the email will be shown on Zoro’s
email client.
TCP/IP was designed and developed by the Department of Defense (DoD) in the 1960s and is
based on standard protocols. It stands for Transmission Control Protocol/Internet Protocol. The
TCP/IP model is a concise version of the OSI model. It contains four layers, unlike the seven layers
in the OSI model.
The number of layers is sometimes referred to as five or four. Here In this article, we’ll study five
layers. The Physical Layer and Data Link Layer are referred to as one single layer as the ‘Physical
Layer’ or ‘Network Interface Layer’ in the 4-layer reference.
3. Network/Internet Layer(IP)
5. Physical Layer
1. Physical Layer
The packet’s network protocol type, in this case, TCP/IP, is identified by the data-link layer. Error
prevention and “framing” are also provided by the data-link layer. Point-to-Point Protocol (PPP)
framing and Ethernet IEEE 802.2 framing are two examples of data-link layer protocols.
3. Internet Layer
This layer parallels the functions of OSI’s Network layer. It defines the protocols which are
responsible for the logical transmission of data over the entire network. The main protocols
residing at this layer are as follows:
• IP: IP stands for Internet Protocol and it is responsible for delivering packets from the source
host to the destination host by looking at the IP addresses in the packet headers. IP has 2
versions: IPv4 and IPv6. IPv4 is the one that most websites are using currently. But IPv6 is
growing as the number of IPv4 addresses is limited in number when compared to the number of
users.
• ICMP: ICMP stands for Internet Control Message Protocol. It is encapsulated within IP datagrams
and is responsible for providing hosts with information about network problems.
• ARP: ARP stands for Address Resolution Protocol. Its job is to find the hardware address of a host
from a known IP address. ARP has several types: Reverse ARP, Proxy ARP, Gratuitous ARP, and
Inverse ARP.
The Internet Layer is a layer in the Internet Protocol (IP) suite, which is the set of protocols that
define the Internet. The Internet Layer is responsible for routing packets of data from one device
to another across a network. It does this by assigning each device a unique IP address, which is
used to identify the device and determine the route that packets should take to reach it.
Example: Imagine that you are using a computer to send an email to a friend. When you click
“send,” the email is broken down into smaller packets of data, which are then sent to the Internet
Layer for routing. The Internet Layer assigns an IP address to each packet and uses routing tables
to determine the best route for the packet to take to reach its destination. The packet is then
forwarded to the next hop on its route until it reaches its destination. When all of the packets have
been delivered, your friend’s computer can reassemble them into the original email message.
In this example, the Internet Layer plays a crucial role in delivering the email from your computer
to your friend’s computer. It uses IP addresses and routing tables to determine the best route for
the packets to take, and it ensures that the packets are delivered to the correct destination. Without
the Internet Layer, it would not be possible to send data across the Internet.
4. Transport Layer
The TCP/IP transport layer protocols exchange data receipt acknowledgments and retransmit
missing packets to ensure that packets arrive in order and without error. End-to-end
communication is referred to as such. Transmission Control Protocol (TCP) and User Datagram
Protocol are transport layer protocols at this level (UDP).
• TCP: Applications can interact with one another using TCP as though they were physically
connected by a circuit. TCP transmits data in a way that resembles character-by-character
transmission rather than separate packets. A starting point that establishes the connection, the
whole transmission in byte order, and an ending point that closes the connection make up this
transmission.
• UDP: The datagram delivery service is provided by UDP, the other transport layer protocol.
Connections between receiving and sending hosts are not verified by UDP. Applications that
transport little amounts of data use UDP rather than TCP because it eliminates the processes of
establishing and validating connections.
5. Application Layer
This layer is analogous to the transport layer of the OSI model. It is responsible for end-to-end
communication and error-free delivery of data. It shields the upper-layer applications from the
complexities of data. The three main protocols present in this layer are:
• HTTP and HTTPS: HTTP stands for Hypertext transfer protocol. It is used by the World Wide Web
to manage communications between web browsers and servers. HTTPS stands for HTTP-Secure.
It is a combination of HTTP with SSL(Secure Socket Layer). It is efficient in cases where the
browser needs to fill out forms, sign in, authenticate, and carry out bank transactions.
• SSH: SSH stands for Secure Shell. It is a terminal emulations software similar to Telnet. The
reason SSH is preferred is because of its ability to maintain the encrypted connection. It sets up a
secure session over a TCP/IP connection.
• NTP: NTP stands for Network Time Protocol. It is used to synchronize the clocks on our computer
to one standard time source. It is very useful in situations like bank transactions. Assume the
following situation without the presence of NTP. Suppose you carry out a transaction, where
your computer reads the time at 2:30 PM while the server records it at 2:28 PM. The server can
crash very badly if it’s out of sync.
The host-to-host layer is a layer in the OSI (Open Systems Interconnection) model that is
responsible for providing communication between hosts (computers or other devices) on a
network. It is also known as the transport layer.
1. Reliable Data Transfer: The host-to-host layer ensures that data is transferred reliably between
hosts by using techniques like error correction and flow control. For example, if a packet of data
is lost during transmission, the host-to-host layer can request that the packet be retransmitted to
ensure that all data is received correctly.
2. Segmentation and Reassembly: The host-to-host layer is responsible for breaking up large blocks
of data into smaller segments that can be transmitted over the network, and then reassembling
the data at the destination. This allows data to be transmitted more efficiently and helps to avoid
overloading the network.
3. Multiplexing and Demultiplexing: The host-to-host layer is responsible for multiplexing data
from multiple sources onto a single network connection, and then demultiplexing the data at the
destination. This allows multiple devices to share the same network connection and helps to
improve the utilization of the network.
Example: Consider a network with two hosts, A and B. Host A wants to send a file to host B. The
host-to-host layer in host A will break the file into smaller segments, add error correction and flow
control information, and then transmit the segments over the network to host B. The host-to-host
layer in host B will receive the segments, check for errors, and reassemble the file. Once the file
has been transferred successfully, the host-to-host layer in host B will acknowledge receipt of the
file to host A.
In this example, the host-to-host layer is responsible for providing a reliable connection between
host A and host B, breaking the file into smaller segments, and reassembling the segments at the
destination. It is also responsible for multiplexing and demultiplexing the data and providing end-
to-end communication between the two hosts.
• HTTP (Hypertext Transfer Protocol): HTTP takes care of Web Browsers and Websites.
• FTP (File Transfer Protocol): FTP takes care of how the file is to be sent over the Internet.
• SMTP (Simple Mail Transfer Protocol): SMTP is used to send and receive data
Unit-2
Types of Network Topology
In Computer Network ,there are various ways through which different components are connected
to one another. Network Topology is the way that defines the structure, and how these components
are connected to each other.
Point-to-Point Topology is a type of topology that works on the functionality of the sender and
receiver. It is the simplest communication between two nodes, in which one is the sender and the
other one is the receiver. Point-to-Point provides high bandwidth.
Mesh Topology
In a mesh topology, every device is connected to another device via a particular channel. In Mesh
Topology, the protocols used are AHCP (Ad Hoc Configuration Protocols), DHCP (Dynamic Host
Configuration Protocol), etc.
Mesh Topology
Figure 1: Every device is connected to another via dedicated channels. These channels are known
as links.
• Suppose, the N number of devices are connected with each other in a mesh topology, the total
number of ports that are required by each device is N-1. In Figure 1, there are 5 devices connected
to each other, hence the total number of ports required by each device is 4. The total number of
ports required = N * (N-1).
• Suppose, N number of devices are connected with each other in a mesh topology, then the total
number of dedicated links required to connect them is NC2 i.e. N(N-1)/2. In Figure 1, there are 5
devices connected to each other, hence the total number of links required is 5*4/2 = 10.
A common example of mesh topology is the internet backbone, where various internet service
providers are connected to each other via dedicated channels. This topology is also used in military
communication systems and aircraft navigation systems.
Star Topology
In Star Topology, all the devices are connected to a single hub through a cable. This hub is the
central node and all other nodes are connected to the central node. The hub can be passive in nature
i.e., not an intelligent hub such as broadcasting devices, at the same time the hub can be intelligent
known as an active hub. Active hubs have repeaters in them. Coaxial cables or RJ-45 cables are
used to connect the computers. In Star Topology, many popular Ethernet LAN protocols are used
as CD(Collision Detection), CSMA (Carrier Sense Multiple Access), etc.
Star Topology
Figure 2: A star topology having four systems connected to a single point of connection i.e. hub.
• If N devices are connected to each other in a star topology, then the number of cables required to
connect them is N. So, it is easy to set up.
• Each device requires only 1 port i.e. to connect to the hub, therefore the total number of ports
required is N.
• It is Robust. If one link fails only that link will affect and not other than that.
• Easy to fault identification and fault isolation.
• Star topology is cost-effective as it uses inexpensive coaxial cable.
• If the concentrator (hub) on which the whole topology relies fails, the whole system will crash
down.
• The cost of installation is high.
• Performance is based on the single concentrator i.e. hub.
A common example of star topology is a local area network (LAN) in an office where all
computers are connected to a central hub. This topology is also used in wireless networks where
all devices are connected to a wireless access point.
Bus Topology
Bus Topology is a network type in which every computer and network device is connected to a
single cable. It is bi-directional. It is a multi-point connection and a non-robust topology because
if the backbone fails the topology crashes. In Bus Topology, various MAC (Media Access Control)
protocols are followed by LAN ethernet connections like TDMA, Pure Aloha, CDMA, Slotted
Aloha, etc.
Bus Topology
Figure 3: A bus topology with shared backbone cable. The nodes are connected to the channel via
drop lines.
• If N devices are connected to each other in a bus topology, then the number of cables required to
connect them is 1, known as backbone cable, and N drop lines are required.
• Coaxial or twisted pair cables are mainly used in bus-based networks that support up to 10 Mbps.
• The cost of the cable is less compared to other topologies, but it is used to build small networks.
• Bus topology is familiar technology as installation and troubleshooting techniques are well known.
• CSMA is the most common method for this type of topology.
A common example of bus topology is the Ethernet LAN, where all devices are connected to a
single coaxial cable or twisted pair cable. This topology is also used in cable television networks.
For more, refer to the Advantages and Disadvantages of Bus Topology.
Ring Topology
In a Ring Topology, it forms a ring connecting devices with exactly two neighboring devices. A
number of repeaters are used for Ring topology with a large number of nodes, because if someone
wants to send some data to the last node in the ring topology with 100 nodes, then the data will
have to pass through 99 nodes to reach the 100th node. Hence to prevent data loss repeaters are
used in the network.
The data flows in one direction, i.e. it is unidirectional, but it can be made bidirectional by having
2 connections between each Network Node, it is called Dual Ring Topology. In-Ring Topology,
the Token Ring Passing protocol is used by the workstations to transmit the data.
Ring Topology
Figure 4: A ring topology comprises 4 stations connected with each forming a ring.
• Token passing: It is a network access method in which a token is passed from one node to another
node.
• Token: It is a frame that circulates around the network.
1. One station is known as a monitor station which takes all the responsibility for performing the
operations.
2. To transmit the data, the station has to hold the token. After the transmission is done, the token
is to be released for other stations to use.
3. When no station is transmitting the data, then the token will circulate in the ring.
4. There are two types of token release techniques: Early token release releases the token just after
transmitting the data and Delayed token release releases the token after the acknowledgment is
received from the receiver.
Advantages of Ring Topology
• The failure of a single node in the network can cause the entire network to fail.
• Troubleshooting is difficult in this topology.
• The addition of stations in between or the removal of stations can disturb the whole topology.
• Less secure.
Tree Topology
This topology is the variation of the Star topology. This topology has a hierarchical flow of data. In
Tree Topology, protocols like DHCP and SAC (Standard Automatic Configuration ) are used.
Tree Topology
Figure 5: In this, the various secondary hubs are connected to the central hub which contains the
repeater. This data flow from top to bottom i.e. from the central hub to the secondary and then to
the devices or from bottom to top i.e. devices to the secondary hub and then to the central hub. It
is a multi-point connection and a non-robust topology because if the backbone fails the topology
crashes.
A common example of a tree topology is the hierarchy in a large organization. At the top of the
tree is the CEO, who is connected to the different departments or divisions (child nodes) of the
company. Each department has its own hierarchy, with managers overseeing different teams
(grandchild nodes). The team members (leaf nodes) are at the bottom of the hierarchy, connected
to their respective managers and departments.
Hybrid Topology
This topological technology is the combination of all the various types of topologies we have
studied above. Hybrid Topology is used when the nodes are free to take any form. It means these
can be individuals such as Ring or Star topology or can be a combination of various types of
topologies seen above. Each individual topology uses the protocol that has been discussed earlier.
Hybrid Topology
Figure 6: The above figure shows the structure of the Hybrid topology. As seen it contains a
combination of all different types of networks.
A common example of a hybrid topology is a university campus network. The network may have
a backbone of a star topology, with each building connected to the backbone through a switch or
router. Within each building, there may be a bus or ring topology connecting the different rooms
and offices. The wireless access points also create a mesh topology for wireless devices. This
hybrid topology allows for efficient communication between different buildings while providing
flexibility and redundancy within each building
Advantages:
Disadvantages:
2. Half-Duplex Mode –
In half-duplex mode, each station can both transmit and receive, but not at the same time. When
one device is sending, the other can only receive, and vice versa. The half-duplex mode is used
in cases where there is no need for communication in both directions at the same time. The entire
capacity of the channel can be utilized for each direction.
Example: Walkie-talkie in which message is sent one at a time and messages are sent in both
directions.
• Half-duplex mode allows for bidirectional communication, which is useful in situations where
devices need to send and receive data.
• It is a more efficient mode of communication than simplex mode, as the channel can be used for
both transmission and reception.
• Half-duplex mode is less expensive than full-duplex mode, as it only requires one communication
channel.
Disadvantages:
• Half-duplex mode is less reliable than Full-Duplex mode, as both devices cannot transmit at the
same time.
• There is a delay between transmission and reception, which can cause problems in some
applications.
• There is a need for coordination between the transmitting and receiving devices, which can
complicate the communication process.
3. Full-Duplex Mode –
In full-duplex mode, both stations can transmit and receive simultaneously. In full_duplex mode,
signals going in one direction share the capacity of the link with signals going in another
direction, this sharing can occur in two ways:
• Either the link must contain two physically separate transmission paths, one for sending and the
other for receiving.
• Or the capacity is divided between signals traveling in both directions.
Full-duplex mode is used when communication in both directions is required all the time. The
capacity of the channel, however, must be divided between the two directions.
Example: Telephone Network in which there is communication between two persons by a
telephone line, through which both can talk and listen at the same time.
Advantages:
• Full-duplex mode allows for simultaneous bidirectional communication, which is ideal for real-
time applications such as video conferencing or online gaming.
• It is the most efficient mode of communication, as both devices can transmit and receive data
simultaneously.
• Full-duplex mode provides a high level of reliability and accuracy, as there is no need for error
correction mechanisms.
Disadvantages:
• Full-duplex mode is the most expensive mode, as it requires two communication channels.
• It is more complex than simplex and half-duplex modes, as it requires two physically separate
transmission paths or a division of channel capacity.
• Full-duplex mode may not be suitable for all applications, as it requires a high level of bandwidth
and may not be necessary for some types of communication
Unit -3
Types of Transmission Media
In data communication terminology, a transmission medium is a physical path between the
transmitter and the receiver i.e. it is the channel through which data is sent from one place to
another. Transmission Media is broadly classified into the following types:
1. Guided Media: It is also referred to as Wired or Bounded transmission media. Signals being
transmitted are directed and confined in a narrow pathway by using physical links.
Features:
• High Speed
• Secure
• Used for comparatively shorter distances
Advantages:
⇢ Least expensive
⇢ Easy to install
⇢ High-speed capacity
Disadvantages:
Applications:
Advantages:
⇢ Eliminates crosstalk
⇢ Comparatively faster
Disadvantages:
⇢ More expensive
⇢ Bulky
Applications:
The shielded twisted pair type of cable is most frequently used in extremely cold climates, where
the additional layer of outer covering makes it perfect for withstanding such temperatures or for
shielding the interior components.
(ii) Coaxial Cable –
It has an outer plastic covering containing an insulation layer made of PVC or Teflon and 2
parallel conductors each having a separate insulated protection cover. The coaxial cable
transmits information in two modes: Baseband mode(dedicated cable bandwidth) and Broadband
mode(cable bandwidth is split into separate ranges). Cable TVs and analog television networks
widely use Coaxial cables.
Advantages:
• High Bandwidth
• Better noise Immunity
• Easy to install and expand
• Inexpensive
Disadvantages:
Applications:
Radio frequency signals are sent over coaxial wire. It can be used for cable television signal
distribution, digital audio (S/PDIF), computer network connections (like Ethernet), and feedlines
that connect radio transmitters and receivers to their antennas.
The cable can be unidirectional or bidirectional. The WDM (Wavelength Division Multiplexer)
supports two modes, namely unidirectional and bidirectional mode.
Advantages:
Disadvantages:
Applications:
(iv) Stripline
(v) Microstripline
In this, the conducting material is separated from the ground plane by a layer of dielectric.
2. Unguided Media:
It is also referred to as Wireless or Unbounded transmission media. No physical medium is
required for the transmission of electromagnetic signals.
Features:
(ii) Microwaves –
It is a line of sight transmission i.e. the sending and receiving antennas need to be properly
aligned with each other. The distance covered by the signal is directly proportional to the height
of the antenna. Frequency Range:1GHz – 300GHz. These are majorly used for mobile phone
communication and television distribution.
Microwave Transmission
(iii) Infrared –
Infrared waves are used for very short distance communication. They cannot penetrate through
obstacles. This prevents interference between systems. Frequency Range:300GHz – 400THz. It
is used in TV remotes, wireless mouse, keyboard, printer, etc.
Unit-4
Framing in Data Link Layer
At the data link layer, it extracts the message from the sender and
provides it to the receiver by providing the sender’s and receiver’s
addresses. The advantage of using frames is that data is broken up into
recoverable chunks that can easily be checked for corruption.
Problems in Framing
Types of framing
2. Variable size: In this, there is a need to define the end of the frame as
well as the beginning of the next frame to distinguish. This can be done
in two ways:
• If Data –> 011100011110 and ED –> 0111 then, find data after bit
stuffing.
--> 011010001101100
• If Data –> 110001001 and ED –> 1000 then, find data after bit
stuffing?
--> 11001010011
framing in the Data Link Layer also presents some challenges, which
include:
Variable frame length: The length of frames can vary depending on the
data being transmitted, which can lead to inefficiencies in transmission.
To address this issue, protocols such as HDLC and PPP use a flag
sequence to mark the start and end of each frame.
Bit stuffing: Bit stuffing is a technique used to prevent data from being
interpreted as control characters by inserting extra bits into the data
stream. However, bit stuffing can lead to issues with synchronization
and increase the overhead of the transmission.
Flow Control:
The data rate must be constant on both sides else the data may
get corrupted thus, flow control coordinates the amount of data
that can be sent before receiving an acknowledgment
Receiver:
The above 3 problems are resolved by Stop and Wait for ARQ
(Automatic Repeat Request) that does both error control and
flow control.
1. Time Out:
2. Sequence Number (Data)
3. Delayed Acknowledgement:
This is resolved by introducing sequence numbers for
acknowledgement also.
The Stop and Wait ARQ offers error and flow control but may cause big
performance issues as the sender always waits for acknowledgment even
if it has the next packet ready to send. Consider a situation where you have
a high bandwidth connection and propagation delay is also high (you are
connected to some server in some other country through a high-speed
connection), you can’t use this full speed due to limitations of stop and
wait.
Transmission Delay (Tt) – Time to transmit the packet from the host to
the outgoing link. If B is the Bandwidth of the link and D is the Data Size
to transmit
Tt = D/B
Propagation Delay (Tp) – It is the time taken by the first bit transferred
by the host onto the outgoing link to reach the destination. It depends on
the distance d and the wave propagation speed s (depends on the
characteristics of the medium).
Tp = d/s
Efficiency – It is defined as the ratio of total useful time to the total cycle
time of a packet. For stop and wait protocol,
Total time(TT) = Tt(data) + Tp(data) +
Tt(acknowledgement) +
Tp(acknowledgement)
= Tt(data) + Tp(data) +
Tp(acknowledgement)
= Tt + 2*Tp
Concept of Pipelining
In Stop and Wait protocol, only 1 packet is transmitted onto the link and
then sender waits for acknowledgement from the receiver. The problem
in this setup is that efficiency is very less as we are not filling the channel
with more packets after 1st packet has been put onto the link. Within the
total cycle time of Tt + 2*Tp units, we will now calculate the maximum
number of packets that sender can transmit on the link before getting an
acknowledgement.
In Tt units ----> 1 packet is Transmitted.
In 1 units ----> 1/Tt packet can be
Transmitted.
In Tt + 2*Tp units -----> (Tt + 2*Tp)/Tt
packets can be
Transmitted
------> 1 + 2a [Using a =
Tp/Tt]
All the packets in the current window will be given a sequence number.
Number of bits required to represent the sender window =
ceil(log2(1+2*a)). But sometimes number of bits in the protocol headers
is pre-defined. Size of sequence number field in header will also
determine the maximum number of packets that we can send in total cycle
time. If N is the size of sequence number field in the header in bits, then
we can have 2N sequence numbers. Window Size ws = min(1+2*a, 2N) If
you want to calculate minimum bits required to represent sequence
numbers/sender window, it will be ceil(log2(ws)). In this article, we have
discussed sending window only. For receiving window, there are 2
protocols namely Go Back N and Selective Repeat which are used to
implement pipelining practically. We will be discussing receiving
window in set 2.
There are two types of Sliding Window Protocol which include Go-Back-
N ARQ and Selective Repeat ARQ:
Go-Back-N ARQ
Go-Back-N ARQ allows sending more than one frame before getting the
first frame’s acknowledgment. It is also known as sliding window
protocol since it makes use of the sliding window notion. There is a limit
to the amount of frames that can be sent, and they are numbered
consecutively. All frames beginning with that frame are retransmitted if
the acknowledgment is not received in a timely manner. For more detail
visit the page Go-Back-N ARQ.
1. Go Back N (GBN)
In this article, we will explain you about the first protocol which is GBN
in terms of three main characteristic features and in the next part we will
be discussing SR as well as comparison of both these protocols
useful time=Tt
Total time=Tt+2*Tp+Pr+Pq+Tt(ack)
Tp=Propogation Delay
Pr=Processing Delay
Pq=Queuing Delay
• Now suppose the cumulative ack for the above 4 packets is lost in
the network.
• On sender side, there will be timeout for packet 0 and hence all
the 4 packets will be transmitted again.
• Now the receiver could easily reject all the duplicate packets
which were starting from 0 because now it will be waiting for
packet number 4 (We have added an extra sequence number
now).
This is explained with the help of the illustrations below. Trying with
Sequence numbers 4.
Retransmission requests :
Above formula is applicable for any condition, if any of the things are
not given we assume it to be 0
Sliding Window protocols Summary With Questions
Before starting with the questions a quick recap for all the
protocols. Stop and wait –
1. Sender window size (Ws) = 1
2. Receiver window size (Wr) = 1
3. Sequence Number ≥ 1 + 1
4. Uses independent acknowledgement
5. Discards out of order packets
6. Packet Loss ? Retransmit packet after time out
7. Acknowledgement loss ? Resends packet after time out
8. Efficiency = 1/(1+2a) where a = Tp / Tt
Go Back N –
1. Sender window size Ws = N
2. Receiver window size Wr = 1
3. Sequence number ≥ N + 1
4. Can use both cumulative or independent
acknowledgement depends on acknowledge timer
5. Discards out of order packets
6. Packet Loss ? Track back N size from the last packet within
the window limit to the lost packet and retransmit them
7. Acknowledgement loss ? If not received before timeout
the entire window N size is resend
8. Efficiency = N/(1+2a) where a = Tp / Tt
Selective Repeat –
1. Sender window size Ws = N
2. Receiver window size Wr = N
3. Sequence Number ≥ N + N
4. Uses only independent acknowledgement
5. Can Accept out of order packets
6. Packet Loss ? Resend only the lost packet after timeout
7. Acknowledgement loss ? Resend if not receive before
timeout
8. Efficiency = N/(1+2a) where a = Tp / Tt
Practice Questions –
2. Go Back N ARQ –
The sender sends N packets which are equal to the window size.
Once the entire window is sent, the sender then waits for a
cumulative acknowledgement to send more packets. On the
receiver end, it receives only in-order packets and discards out-of-
order packets. As in case of packet loss, the entire window would
be re-transmitted.
Error control:
The data link layer provides the mechanism of error control in
which it detects and retransmits damaged or lost frames.
Error is a condition when the receiver’s information does not match the
sender’s information. During transmission, digital signals suffer from
noise that can introduce errors in the binary bits traveling from sender to
receiver. That means a 0 bit may change to 1 or a 1 bit may change to 0.
Types of Errors
Single-Bit Error
Multiple-Bit Error
A multiple-bit error is an error type that arises when more than one bit in
a data transmission is affected. Although multiple-bit errors are
relatively rare when compared to single-bit errors, they can still occur,
particularly in high-noise or high-interference digital environments.
Multiple-Bit Error
Burst Error
This scheme makes the total number of 1’s even, that is why it is called
even parity checking.
Disadvantages
• Single Parity check is not able to detect even no. of bit error.
• For example, the Data to be transmitted is 101010. Codeword
transmitted to the receiver is 1010101 (we have used even
parity).
Let’s assume that during transmission, two of the bits of code
word flipped to 1111101.
On receiving the code word, the receiver finds the no. of ones to
be even and hence no error, which is a wrong assumption.
Two-dimensional Parity check bits are calculated for each row, which
is equivalent to a simple parity check bit. Parity check bits are also
calculated for all columns, then both are sent along with the data. At the
receiving end, these are compared with the parity bits calculated on the
received data.
Checksum
• At the receiver’s end, all received segments are added using 1’s
complement arithmetic to get the sum. The sum is
complemented.
• If the result is zero, the received data is accepted; otherwise
discarded.
Disadvantages
Advantages:
Enhanced Data Security: Error detection can also help to ensure that
the data transmitted over the network is secure and has not been
tampered with.
Disadvantages:
Limited Error Correction: Error detection can only identify errors but
cannot correct them. This means that the recipient must rely on the
sender to retransmit the data, which can lead to further delays and
increased network overhead.
Once the errors are detected in the network, the deviated bits sequence
needs to be replaced with the right bit sequence so that the receiver can
accept the data and process it. This method is called Error Correction. We
can correct the errors in the Network in two different ways which are
listed below:
However, there is one of the most widely used Error Correction methods
which is called ‘Hamming Code’ which was designed by R.W.Hamming.
Let us have a quick look at it.
In this method, extra parity bits are appended to the message which are
used by the receiver to correct the single bit error and multiple bit error.
Consider the below example to understand this method in a better way.
Also, by convention, the redundant bits are always placed in the places
which are powers of 2. Now, this message will take the format as shown
below:
Therefore, we have R1, R2, R3, and R4 as redundant bits which will be
calculated according to the following rules:
• For R1: bits 1, 3, 5, 7, 9, and 11 are checked. We can see that the
number of 1’s in these bit positions is 4(even) so R1 = 0.
• For R2: bits 2,3,6,7,10,11 are checked. You can observe that the
number of 1’s in these bit positions is 5(odd) so we get a R2 = 1.
• For R3: bits 4, 5, 6, and 7 are checked. We see that the number of
1’s in these bit positions is 3(odd). Hence, R3 = 1.
• For R8: bits 8,9,10,11 are observed. Here, the number of 1’s in
these bit positions is 2 and that’s even so we get R4 = 0.
If we observe the Redundant bits, they give the binary number 0110
whose decimal representation is 6. Thus, bit 6 contains an error. To correct
the error the 6th bit is changed from 1 to 0 to correct the error.
Conclusion
Errors are encountered where there is a difference between the sequence
of bits of the source message and the received message while data is
transferred over the Network. The Errors create a lot of problems in the
information transfer by corrupting the data. Thus, the receiver becomes
unable to further process the data, due to which the request-response cycle
slows down over the network.
After learning about the different methods to correct these errors, we can
easily make sure the data transfer doesn’t face any discrepancy or
inconsistency. You have received enough information about the Error
Correction methods in networking.
drawbacks:
Explanation :
Transmission rate = Link Rate or Bit rate / no. of slots = R/h bps
Transmission time = size of file/ transmission rate = x / (R/h) = (x*h)/R
Explanation :
Since it is not mention how many slots in each frame we take one frame
has one slot.
The transmission rate is the amount of data sent in 1 second.
Transmission rate = F * B bits/sec
In packet switching the data is divided into small packets which allow
faster movement of data. Each packet contains two parts that is Header
and Payload, the header on each packet conation information. Below is
the diagram of how packet switching works.
Packet Switching
All address information is only transferred during the setup phase. Once
the route to a destination is discovered, entry is added to the switching
table of each intermediate node. During data transfer, packet header (local
header) may contain information such as length, timestamp, sequence
number, etc.
To send a packet from A to B there are delays since this is a Store and
Forward network.
• The first sent packet reserves resources at each server along the
path. Subsequent packets will follow the same path as the first
sent packet for the connection time.
• Since all the packets are going to follow the same path, a global
header is required. Only the first packet of the connection
requires a global header, the remaining packets generally don’t
require global headers.
• The issue with virtual circuits is that each time a new connection is
set up, resources and extra information have to be reserved at
every router along the path, which becomes problematic if many
clients are trying to reserve a router’s resources simultaneously.
Datagram Networks
• It is a connection-less service. There is no need for reservation of
resources as there is no dedicated path for a connection session.
• Since every packet is free to choose any path, all packets must be
associated with a header with proper information about the
source and the upper layer data.
Uses explicit flow control, where Uses implicit flow control, where
the sender adjusts its rate of the sender assumes a certain level
Flow Control
transmission based on feedback of available bandwidth and sends
from the receiver. packets accordingly.
Conclusion
Types of Routing
Types of Routing
1. Static Routing
Advantages
Disadvantage
Configuration
2. Default Routing
This is the method where the router is configured to send all packets
toward a single router (next hop). It doesn’t matter to which network the
packet belongs, it is forwarded out to the router which is configured for
default routing. It is generally used with stub routers. A stub router is a
router that has only one route to reach all other networks.
Configuration: Using the same topology which we have used for static
routing before.
3. Dynamic Routing
Advantages
• Easy to configure.
Disadvantage
The purpose of routing protocols is to learn about all the available paths
to route data packets, build routing table and take routing decisions based
on some specified metrics. There are two primary types of routing
protocols rest of them ideate from these two only.
In this type of routing protocol, all the nodes that are a part of the network
advertise their routing table to their adjacent nodes (nodes that are directly
connected to each other) at regular intervals. With each router getting
updated at regular intervals, it may take time for all the nodes to have the
same accurate network view.
Let’s look at the metrics used to measure the cost to travel one node to
another :-
1. Hop Count: Hop count refers to the number of nodes a data packet has
to traverse to reach its intended destination. Transmitting from one node
to another node counts as 1 – hop count. The goal is to minimize the hop
count and find the shortest path.
2. Bandwidth Consumption: Bandwidth is the ability of a network to
transmit data typically measured in (Kilobits per second)kbps,
mbps(Megabits per second) or Gbps (Gigabits per second). The
bandwidth depends on a number of factors such as – the volume of data,
traffic on a network, network speed etc. Routing decision is made in a way
to ensure efficient bandwidth consumption.
3. Delay: Delay is the time it takes for a data packet to travel from source
node to its destination node. There are different types of delay such as –
propagation delay, transmission delay, queing delay.
4. Load: Load refers to the network traffic on a certain path in the context
of routing. A data packet will be routed to the path with lesser load so that
it reaches its destination in the specified time.
Advantages of Routing
Disadvantages of Routing
Every type of routing comes with some pros and cons here are some of
the disadvantages for specific types of routing :
Conclusion
Unit -5
Network Devices (Hub, Repeater, Bridge, Switch, Router, Gateways and
Brouter)
Types of Hub
• Active Hub:- These are the hubs that have their power supply and
can clean, boost, and relay the signal along with the network. It
serves both as a repeater as well as a wiring center. These are
used to extend the maximum distance between nodes.
• Passive Hub:- These are the hubs that collect wiring from nodes
and power supply from the active hub. These hubs relay signals
onto the network without cleaning and boosting them and can’t
be used to extend the distance between nodes.
• Intelligent Hub:- It works like an active hub and includes remote
management capabilities. They also provide flexible data rates to
network devices. It also enables an administrator to monitor the
traffic passing through the hub and to configure each port in the
hub.
Types of Bridges
Types of Switch
Why Multiplexing?
The ‘n’ input lines shown above are transmitted via a multiplexer and it
combines the signals to form a composite signal. Now, these signals are
passed through DEMUX and it transfers those signals to their respective
destinations.
The frequency spectrum is divided among the logical channels and each
user has exclusive access to his channel. It sends signals in several distinct
frequency ranges and carries multiple video channels on a single cable.
Each signal is modulated onto a different carrier frequency and carrier
frequencies are separated by guard bands. The bandwidth of the
transmission medium exceeds the required bandwidth of all the signals.
Usually, for frequency division multiplexing analog signaling is used in
order to transmit the signals, i.e. more susceptible to noise. Assignment of
non-overlapping frequency ranges to each user or signal on a medium.
Thus, all signals are transmitted at the same time, each using different
frequencies.
Frequency Division Multiplexing (FDM)
Advantages of FDM
Disadvantages of FDM
• One problem with FDM is that it cannot utilize the full capacity of
the cable.
• It is important that the frequency bands do not overlap.
Each user periodically gets the entire bandwidth for a small burst of time,
i.e. entire channel is dedicated to one user but only for a short period of
time. It is very extensively used in computer communication and
telecommunication. Sharing of the channel is accomplished by dividing
available transmission time on a medium among users. It exclusively uses
Digital Signaling instead of dividing the cable into frequency bands. TDM
splits cable usage into time slots. The data rate of transmission media
exceeds the data rate of signals. Uses a frame and one slot for each slice
of time and the time slots are transmitted whether the source has data or
not.
Synchronous TDM
Statistical TDM
It is the same as FDM but applied to fibers, only the difference is that here
the operating frequencies are much higher actually they are in the optical
range. There’s great potential for fibers since the bandwidth is so huge.
Fibers with different energy bands are passed through a diffraction grating
prism. Combined on the long-distance link and then split at the
destination. It has got high reliability and very high capacity.
Uses of OFDM
Advantages of Multiplexing
Disadvantage of Multiplexing
Unit-6
An internet service provider (ISP) is a company that acts as a
middleman between you and the vast network of the internet. In
simpler terms, it's the company you pay for access to the internet.
ISPs use a variety of technologies to connect you, including cable,
DSL, fiber optics, and even wireless connections.
Classful Addressing
The 32-bit IP address is divided into five sub-classes. These are given
below:
• Class A
• Class B
• Class C
• Class D
• Class E
• Host ID
The class of IP address is used to determine the bits used for network ID
and host ID and the number of total networks and hosts possible in that
particular class. Each ISP or network administrator assigns an IP address
to each device that is connected to its network.
Classful Addressing
Note:
The higher-order bit of the first octet in class A is always set to 0. The
remaining 7 bits in the first octet are used to determine network ID. The
24 bits of host ID are used to determine the host in any network. The
default subnet mask for Class A is 255.x.x.x. Therefore, class A has a total
of:
Class A
Class B
Class B
Class C
Class C
Class D
Class D does not possess any subnet mask. IP addresses belonging to class
D range from 224.0.0.0 – 239.255.255.255.
Class D
Class E
Host IDs are used to identify a host within a network. The host ID is
assigned based on the following rules:
Hosts that are located on the same physical network are identified by the
network ID, as all host on the same physical network is assigned the same
network ID. The network ID is assigned based on the following rules:
• The network ID cannot start with 127 because 127 belongs to the
class A address and is reserved for internal loopback functions.
In the above table No. of networks for class A should be 127. (Network
ID with all 0 s is not considered)
The problem with this classful addressing method is that millions of class
A addresses are wasted, many of the class B addresses are wasted,
whereas, the number of addresses available in class C is so small that it
cannot cater to the needs of organizations. Class D addresses are used for
multicast routing and are therefore available as a single block only. Class
E addresses are reserved.
Since there are these problems, Classful networking was replaced by
Classless Inter-Domain Routing (CIDR) in 1993. We will be discussing
Classless addressing in the next post.
• The network ID cannot start with 127 because 127 belongs to the
class A address and is reserved for internal loopback functions.
The MAC address is used by the Media Access Control (MAC) sublayer
of the Data-Link Layer. MAC Address is worldwide unique since millions
of network devices exist and we need to uniquely identify each.
To understand what is MAC address is, it is very important that first you
understand the format of the MAC Address. So a MAC Address is a 12-
digit hexadecimal number (6-bit binary number), which is mostly
represented by Colon-Hexadecimal notation.
The First 6 digits (say 00:40:96) of the MAC Address identify the
manufacturer, called the OUI (Organizational Unique Identifier). IEEE
Registration Authority Committee assigns these MAC prefixes to its
registered vendors.
Here are some OUI of well-known manufacturers:
CC:46:D6 - Cisco
3C:5A:B4 - Google, Inc.
3C:D9:2B - Hewlett Packard
00:9A:CD - HUAWEI TECHNOLOGIES CO.,LTD
The reason for having both IP and MAC addresses lies in the way the
Internet works, specifically in the structure of the OSI Model. This model
is a conceptual framework that describes how data is sent and received
over a network. It’s divided into seven layers, each performing specific
functions.
As the data travels from one router to the next, the MAC address header
is stripped off and a new one is generated for the next hop. However, the
IP header, which was generated by the original computer, remains intact
until it reaches the final destination. This process illustrates how the IP
header manages the “end to end” delivery, while the MAC headers handle
the “hop to hop” delivery.
So, Both IP and MAC addresses are essential for the functioning of the
Internet. While MAC addresses facilitate the direct, physical transfer of
data between network nodes, IP addresses ensure that the data reaches its
final destination.
The application layer is present at the top of the OSI model. It is the layer
through which users interact. It provides services to the user. Application
layer performs several kinds of functions which are requirement in any
kind of application or communication process.
Command
telnet [\\RemoteServer]
\\RemoteServer
: Specifies the name of the server
to which you want to connect
2. FTP
FTP stands for File Transfer Protocol. It is the protocol that actually lets
us transfer files. It can facilitate this between any two machines using it.
But FTP is not just a protocol but it is also a program.FTP promotes
sharing of files via remote computers with reliable and efficient data
transfer. The Port number for FTP is 20 for data and 21 for control.
Command
ftp machinename
3. SMTP
Command
MAIL FROM:<[email protected]?
4DNS
It stands for Domain Name System. Every time you use a domain name,
therefore, a DNS service must translate the name into the corresponding
IP address. For example, the domain name www.abc.com might translate
to 198.105.232.4.
The Port number for DNS is 53.
Command
ipconfig /flushdns
5. HTTP/HTTPS
HTTP stands for Hypertext Transfer Protocol and HTTPS is the more
secured version of HTTP, that’s why HTTPS stands for Hypertext
Transfer Protocol Secure. This protocol is used to access data from the
World Wide Web. The Hypertext is the well-organized documentation
system that is used to link pages in the text document.
6. POP
POP stands for Post Office Protocol and the latest version is known as
POP3 (Post Office Protocol version 3). This is a simple protocol used by
User agents for message retrieval from mail servers.
In Delete mode, it deletes the message from the mail server once they are
downloaded to the local system.
In Keep mode, it doesn’t delete the message from the mail server and also
facilitates the users to access the mails later from the mail server
The World Wide Web: The Web is the only way to access information
through the Internet. It’s a system of Internet servers that support
specially formatted documents. The documents are formatted in a
markup language called HTML, or “HyperText Markup Language”,
which supports a number of features including links and multimedia.
These documents are interlinked using hypertext links and are accessible
via the Internet.
protocol://WebSiteName.topLevelDomain/path
Html
• An HTML document starts with <!DOCTYPE html> which
declares the document type.
• The main content is wrapped in <html> tags.
• Inside <html> there are two main parts:
o <head>: Contains meta information about the page, like
Common Tags:
Attributes:
Comments:
Learning Resources:
Additional Notes:
The main difference between websites and webpages lies in their scope
and structure:
Website:
Webpage: