Full Notes Computer Networks
Full Notes Computer Networks
COMMUNICATION MODEL
from one person to another. It could be a text file, an audio file, a video
file, etc.
5. Set of rules (Protocol): When someone sends the data (The sender), it
Data communication is a process to send or receive data from one device to another.
The data communication is divided into three types:
communication in which one device only receives and another device only
For example, IoT, entering data using a keyboard, listing music using a
speaker, etc.
receive data but not at the same time. When one device is sending data
• The peer layers communicate by means of formatted blocks of data that obey a set
of rules known as protocol.
Key Elements of a Protocol
Internet Layer
IP Protocol: IP protocol is used in this layer, and it is the most significant part of the entire TCP/IP
suite.
ARP Protocol
Transport Layer
The transport layer is responsible for the reliability, flow control, and correction of data which is
being sent over the network.
The two protocols used in the transport layer are User Datagram protocol and Transmission
control protocol.
Application Layer
○ HTTP: HTTP stands for Hypertext transfer protocol. This protocol allows us to access the
data over the world wide web. It transfers the data in the form of plain text, audio, video. It
is known as a Hypertext transfer protocol as it has the efficiency to use in a hypertext
environment where there are rapid jumps from one document to another.
○ SNMP: SNMP stands for Simple Network Management Protocol. It is a framework used for
managing the devices on the internet by using the TCP/IP protocol suite.
○ SMTP: SMTP stands for Simple mail transfer protocol. The TCP/IP protocol that supports
the e-mail is known as a Simple mail transfer protocol. This protocol is used to send the data
to another e-mail address.
○ DNS: DNS stands for Domain Name System. An IP address is used to identify the connection
of a host to the internet uniquely. But, people prefer to use the names instead of addresses.
Therefore, the system that maps the name to the address is known as Domain Name System.
○ TELNET: It is an abbreviation for Terminal Network. It establishes the connection between
the local computer and remote computer in such a way that the local terminal appears to be
a terminal at the remote system.
○ FTP: FTP stands for File Transfer Protocol. FTP is a standard internet protocol used for
transmitting the files from one computer to another computer.
Characteristics of TCP/IP:
Benefits of TCP/IP
Challenges of TCP/IP:
● It is not generic in nature. So, it comes up short to represent any protocol stack
other than the TCP/IP suite. For the case, it cannot depict the Bluetooth
connection.
● It does not clearly isolate the concepts of services, interfacing, and protocols.
So, it isn’t appropriate to portray unused advances in modern networks.
● It does not recognize between the data link and the physical layers, which
has exceptionally distinctive functionalities.
● The information interface layer ought to concern with the transmission of
outlines. On the other hand, the physical layer ought to lay down the physical
characteristics of the transmission.
● In this, model the transport layer does not guarantee delivery of packets.
● Security: TCP/IP was originally designed for an open and trusting environment,
and as a result, it is not inherently secure. This has led to a range of security
challenges, including attacks such as DDoS, man-in-the-middle attacks, and other
types of network-based attacks.
● Complexity: The TCP/IP protocol suite is highly complex, with many different
protocols and layers that interact with each other. This complexity can make it
difficult to troubleshoot network issues and can increase the likelihood of errors
and misconfigurations.
● Scalability: While TCP/IP is highly scalable, there are limits to its scalability. As
networks grow larger and more complex, it can become more difficult to manage
and optimize TCP/IP-based networks.
● Congestion: TCP/IP was not designed with congestion management in mind,
which can lead to issues such as network congestion and packet loss. This can
result in reduced network performance and reliability.
● Legacy systems: TCP/IP is based on legacy technology that was designed in the
1970s and 1980s. While the protocol has been updated over the years, it can still
struggle to support modern networking needs, such as real-time applications,
mobile devices, and the Internet of Things.
● IPv4 address depletion: The IPv4 address space is limited and has been depleted
in many regions, which has led to the widespread adoption of IPv6. However, the
transition from IPv4 to IPv6 has been slow, and many networks still rely on IPv4.
TCP AND UDP:
Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) both are protocols
of the Transport Layer. TCP is a connection-oriented protocol where as UDP is a part of the
Internet Protocol suite, referred to as the UDP/IP suite. Unlike TCP, it is an unreliable and
connectionless protocol.
TCP is one
of the main protocols of the Internet protocol suite. It lies between the Application and
Network Layers which are used in providing reliable delivery services. It is a
connection-oriented protocol for communications that helps in the exchange of messages
between different devices over a network. The Internet Protocol (IP), which establishes the
technique for sending data packets between computers, works with TCP.
Advantages of TCP
Disadvantages of TCP
Features of UDP
● Used for simple request-response communication when the size of data is less
and hence there is lesser concern about flow and error control.
● It is a suitable protocol for multicasting as UDP supports packet switching.
● UDP is used for some routing update protocols like RIP(Routing Information
Protocol).
● Normally used for real-time applications which can not tolerate uneven delays
between sections of a received message.
Advantages of UDP
Disadvantages of UDP
UDP is the
Datagram-oriented
protocol. This is
because
TCP is a connection-oriented
protocol. Connection
there is no overhead
for opening a
orientation means that the connection,
Type of Service communicating devices should maintaining a
establish a connection before connection, or
transmitting data and should close terminating a
the connection after transmitting connection. UDP is
the data. efficient for
broadcast and
multicast types of
network
transmission.
UDP is faster,
TCP is comparatively slower than
Speed simpler, and more
UDP.
efficient than TCP.
It’s a connectionless
Handshaking Uses handshakes such as SYN, ACK,
protocol i.e. No
Techniques SYN-ACK
handshake
UDP supports
Broadcasting TCP doesn’t support Broadcasting.
Broadcasting.
TCP/IP Applications
It maps domain names to IP addresses. A network host needs the IP address (not the domain or hostname) of the
webserver to generate a packet.
Web pages are written using HTML, which stands for Hypertext Markup Language. In other words, the HTTP is used
to transfer HTML files.
NetBIOS Name Service (NBNS)
NBNS stands for NetBIOS Name Service. It is used to translate host names on a local network to local IP addresses.
This is similar to what DNS does on the Internet.
In this example, the name “Board_A” has been assigned to a network host. NBNS allows us to access this host by
typing its host name into a browser instead of typing its IP address. It maps host names to IP addresses.
TFTP is a stripped-down version of FTP. TFTP has no provisions for security, so it is only used on local networks.
Files are transferred in blocks of 512 bytes with a maximum file transfer size of 4 GB.
SMTP
Simple Mail Transfer Protocol (SMTP) is still the current standard to send emails over the Internet. This is used for
mail delivery in either a spooled or queue fashion. A destination server regularly checks for spooled or queued
messages and when it detects any, the messages get delivered to the destination (mailbox). SMTP is used for
sending emails whereas POP3 is used for receiving. By default, SMTP uses the TCP protocol on port 25.
POP
Post Office Protocol (POP) is a protocol used to check for incoming mail. An email client connects to the POP3 server
and downloads all messages that are addressed to that client. This method is different from IMAP, where the
messages reside on the server until the client deletes them. By default, POP3 uses the TCP protocol on port 110.
SIP (VoIP)
Session Initiation protocol (SIP) is utilized to construct and deconstruct multimedia communication sessions. These
sessions include voice and video conferencing, streaming, instant messaging, and online gaming. By default, SIP
uses the UDP protocol on port 5060.
RTP
Real-Time Transport Protocol (RTP) is a packet-formatting standard for video and audio transmission over the
Internet. It was designed as a multicast protocol but now it’s also leveraged for unicast communication. You’ll see
this for streaming, video conferencing and push to talk applications. By default, RTP uses the UDP protocol on an
unprivileged port (1024 and above).
SNMP
Simple Network Management Protocol (SNMP) collects and manipulates network information by pooling the data
from devices on the network at fixed or random intervals. This is useful for a very basic network monitoring system
as it can send an alert called a trap when aberrations occur. SNMP uses a mix of TCP and UDP protocol and ports.
SSH
Secure Shell (SSH) is a telnet session setup over an SSL encrypted connection. This is utilized to log into other
remote systems and check logs, perform troubleshooting, and more. By default, SSH uses the TCP protocol on port
22.
HTTP
Hypertext Transfer Protocol (HTTP) is a standard that is used to transfer web pages, formatted in HTML format.
Web browsers such as Internet Explorer and Chrome download and render HTML pages. HTTP data is passed in
cleartext: for this reason it’s now replaced by HTTPS, its secure version. By default, HTTP uses the TCP protocol on
port 80.
HTTPS
Hypertext Transfer Protocol Secure (HTTPS) is the secure version of HTTP by adding additional layers of security
(SSL) to the transactions between a web browser and a server. It is required to fill out forms, sign in, authenticate
and encrypt HTTP transactions or messages. By default, HTTPS uses the TCP protocol on port 443.
NTP
Network Time Protocol (NTP) is the protocol used to synchronize the clock of a host. NTP ensures that all devices
on a given network are synchronized within a few milliseconds, which is a requirement for some distributed
services to function correctly. By default, RTP uses the UDP protocol on port 123.
DNS
Domain name Server (DNS) DNS is a protocol used to translate a Fully Qualified Domain Name (FQDN) into an IP
address. This service is used because while humans use words to communicate, computers use IP addresses. When
we type a URL in a web browser, the operating system translates that into an IP address by performing a DNS query
to a server. DNS failures or misconfigurations will prevent a user from accessing web pages. For this reason, a
running joke in the networking world is that DNS is always the root cause of any user issues.
OSI stands for Open Systems Interconnection. It was developed by ISO – ‘International
Organization for Standardization’, in the year 1984. 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.
7 layers of the OSI Model
The OSI model consists of seven abstraction layers arranged in a top-down order:
1. Physical Layer
2. Data Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer
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.
Functions of the Physical Layer
● Bit synchronization: The physical layer provides the synchronization of the bits by
providing a clock. This clock controls both sender and receiver thus providing
synchronization at the bit level.
● Bit rate control: The Physical layer also defines the transmission rate i.e. the
number of bits sent per second.
● Physical topologies: Physical layer specifies how the different, devices/nodes
are arranged in a network i.e. bus, star, or mesh topology.
● 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:
1. Logical Link Control (LLC) : Logical Link Control (LLC) is a sublayer that
generally provides the logic for the data link as it controls the
synchronization, multiplexing, flow control, and even error-checking
functions of DLL (Data Link Layer).
functions of LLC Sublayer are –
transmissions.
networks.
2.Media Access Control (MAC) :layer. A MAC address, which stands for Media
Access Control Address, is a physical address that works at the Data Link Layer
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.
● Framing: Framing is a function of the data link layer. It provides a way for a
sender to transmit a set of bits that are meaningful to the receiver. This can be
accomplished by attaching special bit patterns to the beginning and end of the
frame.
● Physical addressing: After creating frames, the Data link layer adds physical
addresses (MAC addresses) of the sender and/or receiver in the header of each
frame.
● Error control: The data link layer provides the mechanism of error control in
which it detects and retransmits damaged or lost frames.
● 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.
● Access control: When a single communication channel is shared by multiple
devices, the MAC sub-layer of the data link layer helps to determine which device
has control over the channel at a given time.
Note:
● Routing: The network layer protocols determine which route is suitable from
source to destination. This function of the network layer is known as routing.
● Logical Addressing: To identify each device on Internetwork uniquely, the
network layer defines an addressing scheme. The sender & receiver’s IP
addresses are placed in the header by the network layer. Such an address
distinguishes each device uniquely and universally.
Note:
At the sender’s side: The transport layer receives the formatted data from the upper
layers, performs Segmentation, and also implements Flow & 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.
Generally, this destination port number is configured, either by default or manually. For
example, when a web application requests a web server, it typically uses port number 80,
because this is the default port assigned to web applications. Many applications have default
ports assigned.
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
In this type of transmission, the receiving device sends an acknowledgment, back to the
source after a packet or group of packets is received. This type of transmission is reliable
and secure.
Note:
Note: 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.
Information
Layer Device or
Layer Name Responsibility Form(Data
No Protocol
Unit)
Helps in identifying the
Application client and
7 Message SMTP
Layer synchronizing
communication.
Establishes Connection,
Maintenance, Ensures
5 Session Layer Message Gateway
Authentication, and
Ensures security.
Hub,
Establishing Physical
Repeater,
1 Physical Layer Connections between Bits
Modem,
Devices.
Cables
Overview of Protocol
In Order to make communication successful between devices , some rules and procedures
should be agreed upon at the sending and receiving ends of the system. Such rules and
procedures are called as Protocols . Different types of protocols are used for different types
of communication.
In above diagrams Protocols are shown as set of rules . Such that Communication between
Sender and Receiver is not possible without Protocol.
Types of Standards
● De Facto Standard.
● De Jure Standard.
For example : Apple and Google are two companies which established their own rules on
their products which are different . Also they use some same standard rules for
manufacturing for their products.
De Jure Standard : The meaning of the word “De Jure” is “By Law” or “By
Regulations”.Thus , these are the standards that have been approved by officially
recognized body like ANSI , ISO , IEEE etc. These are the standard which are important to
follow if it is required or needed.
For example : All the data communication standard protocols like SMTP , TCP , IP , UDP
etc. are important to follow the same when we needed them.
Types of Protocol
● Network Layer Protocols : Network layer protocols operate in the network
layer which is also known as the Layer 3 of the network architecture. Network
layer protocols are responsible for packet routing, forwarding and addressing of
data packets throughout the network . IP and ICMP are the network layer
protocols.
● Transport layer Protocols : Transport layer protocols works in transport layer
which provides end-to-end service ensuring data transfer across apps on
different devices. TCP and UDP are the most popular transport layer protocols.
● Application Layer Protocol : Application layer protocol working in the
application layer of the network architecture provides communication between
applications running on different devices. The application layer protocols enable
cross-device communication. They format, exchange, and interpret application
data. HTTP, FTP, and SMTP are examples.
● Wireless Protocols : Wireless protocols basically used in wireless
communication which enables data transfer through wireless networks.
Bluetooth, Wi-Fi, and LTE protocols are examples.
● Routing Protocols : Routing protocol establishes the best/optimal network
pathways throughout the network for fastest data transmission. Routers share
information to develop and maintain routing tables. RIP, OSPF, and BGP are
examples.
● Security Protocols : security protocol protects data confidentiality, integrity,
and authenticity while transmission of data over the network. They include SSL
and TLS, encryption methods, and authentication protocols for providing data
security.
● Internet Protocols : IP identifies devices uniquely. Internet protocol provides
data communication through routing and forwarding data packets from one
device to another by unique addressing scheme.
Primitive Meaning
Primitive Meaning
Accept This primitive simply accepts incoming connection from the peer.
These primitive afterwards block the server. Receive primitive
Receive
simply waits for incoming message.
Primitive Meaning
● Web Protocols
Web browsers and servers communicate according to the HyperText Transfer Protocol
(HTTP)
GET (to get status information and an item (e.g. an HTML document),
POST (to add to an item stored on the server -- e.g. a list of messages), and
"Simple" is in the name because there was a complex predecessor that SMTP replaced.
SMTP is the (TCP/IP) protocol used in client-server mode by e-mail transfer software.
SMTP allows sender to ask the receiving host if the intended recipient mailbox exists.
● The typical ISP runs email server and email transfer software on its computers, and
provides email transfer service for subscribers
● ISP computers provide email mailboxes for ISP subscribers
● Subscribers access their email using a web interface provided by the ISP or a
special-purpose email interface application.
● The advantage of the web interface is that one can read mail using a browser on any
computer connected to the Internet
● The advantage of the special-purpose application is that users with laptops can download all
their email and interact with it while offline.
Mail Access Protocols (POP3, IMAP)
● POP3 is essentially just a protocol that allows to download a copy of mail from the mail
host to personal computer. POP3 asks you for the password on the mail host -- to insure
that only have access to your private e-mail.
● IMAP is similar except that it can keep the primary copies of the messages on the mail host
and allow to organize the mail into sets of folders on the mail host. That is handy to read
the mail from several different personal computers, workstations, and what-have-you.
○ header
○ blank line
○ body
● Header lines have the form: keyword: information
● Keywords include: From, To, Subject, CC
● Arbitrary keywords starting with X can be used - never considered bad syntax
● MIME is the Multi-purpose Internet Mail Extension.
● Internet e-mail was designed only to transmit printable ASCII characters (plain text).
● Nowadays e-mail software encodes arbitrary kinds of data as sequences of printable ASCII
characters and transmits it.
MIME-Version: 1.0
● in the header to tell the receiver that MIME conventions are used in the message and that
the message consists of different parts separated by the string "Mime_separator."
● The sender is free to choose any string for a separator. (Of course one must choose
something that is not used elsewhere in the body of the message.)
● The sender can put directives in the message that tell the recipient how to decode each part
of the message.
● Using MIME we can send attachments such as a photograph, word processor document, or
spreadsheet.
● MIME is very flexible: one can add new message types and encoding schemes without any
need to change the software that transmits the mail. Everything that is transmitted is
encoded as printable ASCII so old e-mail software has no problems -- the MIME message is
transmitted exactly the same way as "old-fashioned" plain text.
● (The glitch with MIME is that often senders and receivers do not use the same e-mail
software and so conventions understood by one "end" may not be understood by the other
"end." When in doubt just send plain text -- and not as an "attachment." It may not be "fancy"
but it usually works because all e-mail software is supposed to understand plain text
messages.)
● There are several forms of service but mainly DNS translates hostnames like cs.csustan.edu
into an IP addresses like 130.17.70.80.
● Most applications that use Internet services utilize DNS.
● DNS is a distributed database service - there is a hierarchical network of servers in locations
all over the Internet, each of which is responsible for answering questions about a portion of
the database.
● DNS can work in a recursive mode: if a client asks a server for information that it doesn't
have, then the server may ask another server, obtain the answer, and pass it along to the
client.
● A DNS server has to know the address of at least one root server
● Top level domains names like .edu and .com are controlled by the Internet Corporation for
Assigned Names and Numbers (ICANN)
● ICANN authorizes domain registrars, to which organizations must apply for approval of the
domain names that they request.
● Once an organization has been approved to use a domain name like csustan.edu, it can
create a naming hierarchy for the hosts in its network -- with names like
dijkstra.cs.csustan.edu and muon.physics.csustan.edu.
● Except for the rightmost two, the segments of a domain name need not correspond to
domains, sub-domains, or networks.
● File Transfer Protocol (FTP)
○ In the early days of networking it quickly became apparent that there was a need for
general file transfer software - to transfer various types of files between various
types of computers.
○ Complications:
■ conventions for naming files vary.
■ file formats, protection methods, and data representation vary.
○
○ FTP:
■ deals well with differences between computing systems,
■ transfers files in both directions
■ permits transfer of arbitrary data, and
■ deals well with file permissions and ownership.
■ allows browsing through file systems
■ utilizes plain text control messages
○
○ FTP has been around longer than IP or TCP.
○ Users are often not aware of it but FTP is used for almost all the downloading done
with web browsers and other network applications.
○ The client interprets what the user types and sends commands to the server (when
necessary) that achieve the result desired by the user.
○ The client and server communicate using the language of FTP -- the protocol.
○ For each file transfer the client and the server form a separate connection -- distinct
from the original control connection.
○ The control connection persists for the duration of a session (what happens between
an open and a close) but each data connection is terminated after transferring one
file.
○ The FTP server on the remote host acts as a client when it opens a data connection
back to the local host.
○ This paradigm is not compatible with the network address translation "routers"
used in home networking. The workaround is for the NAT router to rewrite values in
the PORT commands that FTP clients send to FTP servers.
UNIT-2
TRANSMISSION TERMINOLOGY
Spectrum
Spectrum refers to the entire range of frequencies right from the starting frequency (the
lowest frequency) to the ending frequency (the highest frequency).
Bandwidth
Here, bandwidth is denoted by B, and f(max) and f(min) are the frequency.
Frequency:
● The term "frequency" defines the number of oscillations that happen in a data
transmission per second.
● In terms of networking, the data is transmitted in the form of signals, which are
composed of waves. The number of oscillations per second specifies the signal
frequency.
● It is commonly measured in Hertz (Hz).
● Frequency is also significant in wireless communication, where a signal's frequency
is mathematically connected to its wavelength.
f = (1 / T) Hz
Here, f is the frequency of the signal wave, and T is the time of the oscillation in seconds
Larger Units Its larger units are kilohertz, Its larger units are kilohertz, terahertz,
terahertz, megahertz, and megahertz, and gigahertz
gigahertz.
Signal:
1. Analog Signal
2. Digital Signal
Analog Signal:
An analog signal is defined as a continuous signal in which one time-varying quantity (such
as voltage, pressure, etc.) represents another time-based variable. In simple terms, n an
analog signal one variable is analog over the other.
Digital Signal
A digital signal is defined as a signal that is used to represent data as a sequence of discrete
values at any given time. It can only take on, at most, one of a finite number of values.
● Digital signals convey information with less noise, distortion, and interference.
● These signals can be transmitted over long distances.
● These signals can be compressed easily.
● Equipment that uses digital signals is more common and less expensive.
● It can be reproduced easily in mass quantities at comparatively low costs.
● These signals are easily encrypted.
● Digital signal processing is more flexible.
● The probability of error occurrence is often reduced by employing error detection
and correction codes.
● It makes running instruments free from errors.
● It offers a lot of editing tools.
Analog signals are more accurate than Digital signals are less accurate.
digital signals.
Analog signals take time to be stored. It has Digital signals can be easily stored.
infinite memory.
To record an analog signal, the technique In recording digital signal, the sample
used, preserves the original signals. signals are taken and preserved.
Analog signals produce too much noise. Digital signals do not produce noise.
Examples of analog signals are Human voice, Examples of digital signals are Computers,
Thermometer, Analog phones etc. Digital Phones, Digital pens, etc.
Example:
Analog Data : Analog clock, Sounds made by a human voice etc.
Digital Data : Data are stored in computer memory in the form of 0's and 1's.
Transmission Impairment in Data Communication
In communication system, analog signals travel through transmission media, which tends
to deteriorate the quality of analog signal, which means that the signal at the beginning of
the medium is not the same as the signal at the end of the medium. The imperfection
causes signal impairment. Below are the causes of the impairment.
Causes of impairment –
Attenuation(dB) = 10log10(P2/P1)
Distortion – It means changes in the form or shape of the signal. This is generally seen in
composite signals made up with different frequencies. Each frequency component has its
own propagation speed traveling through a medium. And thats why it delay in arriving at
the final destination Every component arrive at different time which leads to distortion.
Therefore, they have different phases at receiver end from what they had at senders end.
Noise – The random or unwanted signal that mixes up with the original signal is called
noise. There are several types of noise such as induced noise, crosstalk noise, thermal noise
and impulse noise which may corrupt the signal.
Induced noise comes from sources such as motors and appliances. These devices act as
sending antenna and transmission medium act as receiving antenna.
Thermal noise is movement of electrons in wire which creates an extra signal. Crosstalk
noise is when one wire affects the other wire.
Impulse noise is a signal with high energy that comes from lightning or power lines
Transmission Medium:
● The 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 a communication channel that transmits information from
the source/transmitter to the receiver.
● It is a physical path for data transfer through electromagnetic signals. Information is
carried over in the form of bits.
● It can mediate the propagation of signals for telecommunication. Signals are
imposed on a wave that is suitable for the chosen medium.
● These media lie underneath the physical layer that regulates them.
○ Guided Transmission Media
● It is defined as the physical medium through which the signals are transmitted. It is
also known as Bounded media.
● These media consist of wires through which the data is transferred.
● Guided media is a physical link between transmitter and recipient devices.
● Signals are directed in a narrow pathway using physical links.
● These media types are used for shorter distances since physical limitation limits the
signal that flows through these transmission media.
Twisted pair:
In this type of transmission media, two insulated conductors of a single circuit are twisted
together to improve electromagnetic compatibility. These are the most widely used
transmission medium cables. These are packed together in protective sheaths.A twisted
pair consists of two insulated copper wires arranged in a regular spiral pattern.
The degree of reduction in noise interference is determined by the number of turns per
foot. Increasing the number of turns per foot decreases noise interference.
They reduce electromagnetic radiation from pairs and crosstalk between the neighbouring
pair. Overall, it improves the rejection of external electromagnetic interference.
Twisted pair is a physical media made up of a pair of cables twisted with each other. A
twisted pair cable is cheap as compared to other transmission media. Installation of the
twisted pair cable is easy, and it is a lightweight cable. The frequency range for twisted pair
cable is from 0 to 3.5KHz.
These consist of two insulated copper wires that are coiled around one another
These types of transmission media block interference without depending on any physical
shield.
The unshielded twisted pair are very affordable and are simple to set up. These provide a
high-speed link. :
Advantages Of Unshielded Twisted Pair:
○ It is cheap.
Disadvantage:
○ This cable can only be used for shorter distances because of attenuation.
● A shielded twisted pair is a cable that contains the mesh surrounding the wire that
allows the higher transmission rate.
● This twisted cable consisted of a foil shield to block external interference.
● The insulation within these types of twisted cable allow greater data transmission
rate.
● These are used in fast-data-rate Ethernet and in data and voice channels of
telephone lines.
○ The cost of the shielded twisted pair cable is not very high and not very low.
Disadvantages
Coaxial Cable
A coaxial cable is an electrical cable with a copper conductor and an insulator shielding
around it and a braided metal mesh that prevents signal interference and cross talk. Coaxial
cable is also known as coax.
The core copper conductor is used for the transmission of signals and the insulator is used
to provide insulation to the copper conductor and the insulator is surrounded by a braided
metal conductor which helps to prevent the interference of electrical signals and prevent
cross talk. This entire setup is again covered with a protective plastic layer to provide extra
safety to the cable.
Coaxial Cable
Copper conductor: A central conductor, which consists of copper. The conductor is the
point at which data transmits.
Insulator: Dielectric plastic insulation around the copper conductor. it is used to maintain
the spacing between the center conductor and shield.
Protective plastic layer: An external polymer layer, which has a plastic coating. It is used
to protect internal layers from damages.
copper, silver and has a larger diameter when compared to other coaxial cables.
2. Flexible coaxial cable: The flexible coaxial cables are very flexible and the inner
core and dielectric. these cables are best for low-frequency digital and video
transmission.
6. Triaxial cable: It is also known as Triax. It is very much similar to a coaxial cable
but with an additional copper braid added to it, the braid works as a shield and
protects from noise. Triaxial cables offer more bandwidth.
7. Rigid coaxial cable: Rigid coaxial cable is made up of two copper tubes
supported at cable ends and fixed intervals across the length of the cable using
PTFE supports or disk insulators. The rigid coaxial cable cannot be bent. It is
mainly used in TV and FM broadcasting systems.
Applications of Coaxial cable
The coaxial cables are used in Ethernet LANs and also used in MANs
1. Television: Coaxial cable used for television would be 75 Ohm and RG-6 coaxial
cable.
2. Internet: Coaxial cables are also used for carrying internet signals, RG-6 cables
for better digital signals and RG-59 for lossless transmission of video signals.
5. HDTV: The HDTV uses RG-11 as it provides more space for signals to transfer.
Advantages
Disadvantages
○ If any fault occurs in the cable causes the failure in the entire network.
○ Fibre optic cable is a cable that uses electrical signals for communication.
○ Fibre optic is a cable that holds the optical fibres coated in plastic that are used to
send the data by pulses of light.
○ The plastic coating protects the optical fibres from heat, cold, electromagnetic
interference from other types of wiring.
○ fiber optic cable, these are thin strands of glass that guide light along their length.
These contain multiple optical fibers and are very often used for long-distance
communications. Compared to other materials, these cables can carry huge amounts
of data and run for miles without using signal repeaters. Due to lesser requirements,
they have less maintenance costs and it improves the reliability of the
communication system. These can be unidirectional as well as bidirectional in
nature.
An Optical Fiber is a cylindrical fiber of glass which is hair thin size or any transparent
dielectric medium. The fiber which is used for optical communication is waveguides made
of transparent dielectrics.
Main element of Fiber Optics
● Core: It is the central tube of very thin size made of optically transparent
dielectric medium and carries the light transmitter to receiver and the core
diameter may vary from about 5um to 100 um.
● Cladding: It is outer optical material surrounding the core having reflecting
index lower than core and cladding helps to keep the light within the core
throughout the phenomena of total internal reflection.
● Buffer Coating: It is a plastic coating that protects the fiber made of silicon
rubber. The typical diameter of the fiber after the coating is 250-300 um.
● Single-mode fiber: In single-mode fiber, only one type of ray of light can
propagate through the fiber. This type of fiber has a small core diameter (5um)
and high cladding diameter (70um) and the difference between the refractive
index of core and cladding is very small. There is no dispersion i.e. no
degradation of the signal during traveling through the fiber. The light is passed
through it through a laser diode.
● Multi-mode fiber: Multimode fiber allows a large number of modes for the light
ray traveling through it. The core diameter is generally (40um) and that of
cladding is (70um). The relative refractive index difference is also greater than
single mode fiber. There is signal degradation due to multimode dispersion. It is
not suitable for long-distance communication due to large dispersion and
attenuation of the signal. There are two categories on the basis of Multi-mode
fiber i.e. Step Index Fiber and Graded Index Fiber. Basically these are
categories under the types of optical fiber on the basis of Refractive Index
● Step-index optical fiber: The refractive index of core is constant. The refractive
index of the cladding is also constant. The rays of light propagate through it in
the form of meridional rays which cross the fiber axis during every reflection at
the core-cladding boundary.
● Graded index optical fiber: In this type of fiber, the core has a non-uniform
refractive index that gradually decreases from the centre towards the
core-cladding interface. The cladding has a uniform refractive index. The light
rays propagate through it in the form of skew rays or helical rays. it is not cross
the fiber axis at any time.
○ Core: The optical fibre consists of a narrow strand of glass or plastic known as a
core. A core is a light transmission area of the fibre. The more the area of the core,
the more light will be transmitted into the fibre.
○ Cladding: The concentric layer of glass is known as cladding. The main functionality
of the cladding is to provide the lower refractive index at the core interface as to
cause the reflection within the core so that the light waves are transmitted through
the fibre.
○ Jacket: The protective coating consisting of plastic is known as a jacket. The main
purpose of a jacket is to preserve the fibre strength, absorb shock and extra fibre
protection.
○ Greater Bandwidth: The fibre optic cable provides more bandwidth as compared
copper. Therefore, the fibre optic carries more data as compared to copper cable.
○ Faster speed: Fibre optic cable carries the data in the form of light. This allows the
fibre optic cable to carry the signals at a higher speed.
○ Longer distances: The fibre optic cable carries the data at a longer distance as
compared to copper cable.
○ Better reliability: The fibre optic cable is more reliable than the copper cable as it
is immune to any temperature changes while it can cause obstruct in the
connectivity of copper cable.
○ Thinner and Sturdier: Fibre optic cable is thinner and lighter in weight so it can
withstand more pull pressure than copper cable.
UnGuided Transmission
○ In unguided media, air is the media through which the electromagnetic energy can
flow easily.unbounded or wireless media, they help in transmitting electromagnetic
signals without using a physical medium. Here, air is the medium. There is no
physical connectivity between transmitter and receiver. These types of transmission
media are used for longer distances however they are less secure than guided media.
Radio waves
Radio waves are transmitted in every direction throughout free space. Since these are
omnidirectional, sent waves can be received by any antenna. These waves are useful when
the data is to multicasted from one sender to multiple receivers. Radio waves can cover
large areas and even penetrate obstacles such as buildings and walls. The frequency of
these waves ranges between 3 kHz to 1GHz. Due to its omnidirectional nature, issues such
as interference might arise when another signal with the same bandwidth or frequency is
sent.
Radio waves are transmitted in every direction throughout free space. Since these are
omnidirectional, sent waves can be received by any antenna. These waves are useful when
the data is to multicasted from one sender to multiple receivers. Radio waves can cover
large areas and even penetrate obstacles such as buildings and walls. The frequency of
these waves ranges between 3 kHz to 1GHz. Due to its omnidirectional nature, issues such
as interference might arise when another signal with the same bandwidth or frequency is
sent.
○ Radio waves are the electromagnetic waves that are transmitted in all the directions
of free space.
○ Radio waves are omnidirectional, i.e., the signals are propagated in all the directions.
○ In the case of radio waves, the sending and receiving antenna are not aligned, i.e., the
wave sent by the sending antenna can be received by any receiving antenna.
○ A Radio wave is useful for multicasting when there is one sender and many
receivers.
○ Radio waves cover a large area, and they can penetrate the walls.
Microwaves
For these waves, it is important for the transmitter and receiver antenna to be aligned. This
is why it is known as line-of-sight transmission. Due to this, they are suitable for shorter
distances. They comprise of electromagnetic waves with frequencies ranging between
1-400 GHz. Microwaves provide bandwidth between the range of 1 to 10 Mbps. Distance
covered by the signal is proportional to the height of the antenna. For travelling to longer
distances, the height of the tower should be increased. These are further sub categorized as
terrestrial and satellite type microwave transmission.
○ Terrestrial microwave
Satellite type microwave transmission: Signals are transmitted to those spaces where
satellites are positioned and they retransmit the signal to appropriate locations. Since they
only receive and retransmit the signal, they act as repeaters. It is a much more flexible and
reliable method of communication in comparison with cables and fiber systems.
○ Microwaves are the electromagnetic waves having the frequency in the range from
1GHz to 1000 GHz.
○ In this case, antennas are mounted on the towers to send a beam to another antenna
which is km away.
○ It works on the line of sight transmission, i.e., the antennas mounted on the towers
are the direct sight of each other.
Characteristics of Microwave:
○ Frequency range: The frequency range of terrestrial microwave is from 4-6 GHz to
21-23 GHz.
Advantages Of Microwave:
○ It is free from land acquisition as it does not require any land for the installation of
cables.
○ Out of phase signal: A signal can be moved out of phase by using microwave
transmission.
○ A satellite is a physical object that revolves around the earth at a known height.
○ The satellite accepts the signal that is transmitted from the earth station, and it
amplifies the signal. The amplified signal is retransmitted to another earth station.
○ The coverage area of a satellite microwave is more than the terrestrial microwave.
○ The transmission cost of the satellite is independent of the distance from the centre
of the coverage area.
○ It is easy to install.
○ Satellite designing and development requires more time and higher cost.
○ The life of the satellite is about 12-15 years. Due to this reason, another launch of the
satellite has to be planned before it becomes non-functional.
Infrared
These waves are useful for only very short distance communication. Unlike radio waves,
they do not have the ability to penetrate barriers. Their range varies between 300GHz –
400THz. Since they have larger bandwidth, the data rate is very high for infrared waves.
These have less interference and are more secure
○ It is used for short-range communication such as data transfer between two cell
phones, TV remote operation, data transfer between a computer and cell phone
resides in the same closed area.
Characteristics Of Infrared:
○ It supports high bandwidth, and hence the data rate will be very high.
○ Infrared waves cannot penetrate the walls. Therefore, the infrared communication in
one room cannot be interrupted by the nearby rooms.
○ Infrared communication is unreliable outside the building because the sun rays will
interfere with the infrared waves.
The following table summarises the advantages and disadvantages of transmission media:
Type Uses
Example:
● Chat Rooms
● Telephonic Conversations
● Video Conferencing
Advantages
Disadvantages
1. The sender and receiver must operate at the same clock frequency
simultaneously.
Example:
● Forums
● Letters
Advantages
Disadvantages
2. These bits could be mistakenly recognized due to the noise on the channel.
3. The start and stop bits are extra bits that must be utilized in asynchronous
transmission.
4. It transmits information at a slower rate.
Synchronous Asynchronous
S. No.
Transmission Transmission
In Synchronous In Asynchronous
transmission, data is transmission, data is
1.
sent in form of blocks sent in form of bytes or
or frames. characters.
Synchronous Asynchronous
2.
transmission is fast. transmission is slow.
Asynchronous
Synchronous
3. transmission is
transmission is costly.
economical.
In Synchronous In Asynchronous
transmission, the time transmission, the time
4. interval of interval of
transmission is transmission is not
constant. constant, it is random.
In Synchronous In Asynchronous
transmission, there is transmission, there is a
6.
no gap present gap present between
between data. data.
While in Asynchronous
7. Efficient use of transmission, the
transmission lines is transmission line
remains empty during
done in synchronous a gap in character
transmission. transmission.
Asynchronous
Synchronous transmission does not
transmission needs need synchronized
precisely synchronized clocks as parity bit is
9.
clocks for the used in this
information of new transmission for
bytes. information of new
bytes.
Examples: Telephonic
conversations, Video Examples: Email, File
12.
conferencing, Online transfer,Online forms.
gaming.
2. Types of Errors
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.
Errors are introduced into the binary data transmitted from the sender to the receiver
due to noise during transmission. The error can be a single-bit error, multi-bit error, or
burst error. Error detection methods are used to check whether the receiver has
received correct data or corrupted data. And error correction is used to correct the
detected errors during the transmission of data from sender to receiver.
Types of Errors
Single-Bit Error
A single-bit error refers to a type of data transmission error that occurs when
one bit (i.e., a single binary digit) of a transmitted data unit is altered during
transmission, resulting in an incorrect or corrupted data unit.
Single bit errors are least likely type of errors in serial data transmission. To see why,
imagine a sender sends data at 10 Mbps. This means that each bit lasts only for 0.1 μs
(micro-second). For a single bit error to occur noise must have duration of only 0.1 μs
(micro-second), which is very rare. However, a single-bit error can happen if we are
having a parallel data transmission. For example, if 16 wires are used to send all 16 bits
of a word at the same time and one of the wires is noisy, one bit is corrupted in each
word.
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
The term burst error means that two or more bits in the data unit have changed from 0
to 1 or vice-versa. Note that burst error doesn’t necessarily mean that error occurs in
consecutive bits. The length of the burst error is measured from the first corrupted bit to
the last corrupted bit. Some bits in between may not be corrupted.
Burst errors are mostly likely to happen in serial transmission. The duration of the noise
is normally longer than the duration of a single bit, which means that the noise affects
data; it affects a set of bits. The number of bits affected depends on the data rate and
duration of noise.
3. Checksum
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
3. Checksum
● 1 is added as a parity bit to the data block if the data block has an odd number of
1's.
● 0 is added as a parity bit to the data block if the data block has an even number
of 1's.
This procedure is used for making the number of 1's even. This is commonly known as
even parity checking.
Disadvantage:
● Only single-bit error is detected by this method, it fails in multi-bit error detection.
● It can not detect an error in case of an error in two bits.
Refer to the below image for the disadvantage simple parity checking method
Two-Dimensional Parity Check
For every row and column, parity check bits are calculated by a simple method of parity
check. Parity for both rows and columns is transmitted with the data sent from sender to
receiver. At the receiver’s side, parity bits are compared with the calculated parity of the
data received.
Disadvantages:
● If 2 bits are corrupted in 1 data unit and another data unit exactly at the same
position is corrupted then this method is not able to detect the error.
● Sometimes this method is not used for **detecting 4-bit **errors or more than
4-bit errors.
Checksum
Checksum is an error detection which detects the error by dividing the data into
segments of equal size and then use 1's complement to find the sum of the segments
and then the sum is transmitted with the data to the receiver and same process is done
by the receiver and at the receiver side, all zeros in the sum indicates the correctness of
the data.
1. First of all data is divided into k segments in a checksum error detection scheme
and each segment has m bits.
2. For finding out the sum at the sender’s side, all segments are added through 1's
complement arithmetic. And for determining the checksum we complement the
sum.
3. Along with data segments, the checksum segments are also transferred.
4. All the segments that are received on the receiver's side are added through 1S
complement arithmetic to determine the sum. Then complement the sum.
5. The received data is accepted only on the condition that the result is found to be
0. And if the result is not 0 then it will be discarded.
2r>=d+r+1
The above formula is used to find out the value of r. For example, suppose 4 will be the
value of d, then 3 will be the only and smallest value that satisfies this particular relation.
A hamming code is a technique developed by R.W Hamming for finding out the position
of the error bit. This Hamming code is based on the relationship between the redundant
bits and data units and its main advantage is that it can be applied to data units of any
length.
Hamming Code
Parity bits: The parity bits are the special type of bits that are added to the original data
of binary bits to make the total 1s either even or odd.
Even parity: For checking the even parity, the following concept is used: The value of
the even parity bit will be 0 if the total occurrence of 1s is even and the value of the
parity bit can be 1 if the total occurrence of 1s is odd.
Odd Parity: For checking the even parity, the following concept is used: The value of the
parity bit will be 1 if the total occurrence of 1s is even and the value of the parity bit can
be 0 if the total occurrence of 1s is odd.
1. Add the information in 'd' bits to the redundant bits 'r' to make data as d+r.
2. A decimal value will be assigned by the position of each (d+r) digit.
3. In positions 1,2…2k, the 'r' bits will be placed.
4. The parity bits are again calculated on the receiver's end. The position of an error
defines the parity bit's decimal value.
0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111
We take this example for a detailed explanation of the concept of hamming code. 1010
is supposed to be the original data that needs to be transferred.
2r>=d+r+1
2r>=4+r+1
So, the above-given relation is completely satisfied when 3 will be the value of r.
Determining the position of the redundant bits: 3 is the number of redundant bits. r1, r2,
and r4 are used to show these three bits. We can find out the position of these bits for
the raised power of 2. So according to this, their positions will be
1,21,22
● r1 position is 1
● r2 position is 2
● r4 position is 4
Refer to the below image for the data with redundant bits
The r1 bit value is calculated based on a parity check performed on the bits available at
the position whose binary conversion contains 1 at the first position.
Determining r2 bit The r2 bit value is calculated based on a parity check performed on
the bits available at the position whose binary conversion contains 1 at the second
position.
Determining r4 bit The r4 bit value is calculated based on a parity check performed on
the bits available at the position whose binary conversion contains 1 at the third
position.
Suppose when the data is received at the receiver end the value of the 4th bit is
changed to 1 from 0. Now parity bits are calculated again to find the position of the
error.
R1 bit 1, 3, 5 and 7 are the positions of the bits for the r1 bit.
We can find from the above figure that the r1 binary representation is 1100. After
applying the even-parity check method on the bits appearing in the r4 bits we get an
even number of totals 1’s. So 0 is the value for the r1.
R2 bit 2, 3, 6, and 7 are the positions of the bits for the r2 bit.
R4 bit 4, 5, 6 and 7 are the positions of the bits for the r4 bit.
● Line Discipline:
Line discipline is the functionality used to establish coordination between link
systems. It decides which device sends data and when.
● Flow Control:
Flow control is an essential function that coordinates the amount of data the
sender can send before waiting for acknowledgment from the receiver.
● Error Control:
Error control is functionality used to detect erroneous transmissions in data
frames and retransmit them.
What is Flow Control in the Data Link Layer?
Flow control is a set of procedures that restrict the amount of data a sender should send
before it waits for some acknowledgment from the receiver.
The stop-and-wait protocol is a simple protocol that allows the sender to send the next
packet when the acknowledgment of the previous packet is received from the receiver.
Note: The sender sends one packet at a time and does not send the next packet until it
receives an acknowledgment of the previous packet from the receiver.
Receiver Side
Rule 1: The receiver receives the data packet and then consumes the data packet. Rule
2: The receiver sends acknowledgment when the data packet is consumed. So, in this
protocol, the receiver-side process is also very simple.
Refer to the below image to see the working of data transmission in the stop-and-wait
protocol
● For an acknowledgment, the sender has to wait for an infinite amount of time.
● The receiver will also have to wait for an infinite amount of time to receive the
data.
Refer to the below image to see data loss in the stop-and-wait protocol
● The sender has to wait for an infinite amount of time due to acknowledgment loss
in the network.
Refer to the below image to see acknowledgment loss in the stop-and-wait protocol
Refer to the below image to see delayed data and acknowledgment in the stop-and-wait
protocol
Sliding Window Protocol
The sliding window protocol is the flow control protocol for noisy channels that allows
the sender to send multiple frames even before acknowledgments are received. It is
called a Sliding window because the sender slides its window upon receiving the
acknowledgments for the sent frames.
Working:
● The sender and receiver have a “window” of frames. A window is a space that
consists of multiple bytes. The size of the window on the receiver side is always
1.
● Each frame is sequentially numbered from 0 to n - 1, where n is the window size
at the sender side.
● The sender sends as many frames as would fit in a window.
● After receiving the desired number of frames, the receiver sends an
acknowledgment. The acknowledgment (ACK) includes the number of the next
expected frame.
Example:
1. The sender sends the frames 0 and 1 from the first window (because the window
size is 2).
2. The receiver after receiving the sent frames, sends an acknowledgment for frame
2 (as frame 2 is the next expected frame).
3. The sender then sends frames 2 and 3. Since frame 2 is lost on the way, the
receiver sends back a “NAK” signal (a non-acknowledgment) to inform the
sender that frame 2 has been lost. So, the sender retransmits frame 2.
What is Error Control in the Data Link Layer?
Error Control is a combination of both error detection and error correction. It ensures
that the data received at the receiver end is the same as the one sent by the sender.
Error detection is the process by which the receiver informs the sender about any
erroneous frame (damaged or lost) sent during transmission.
In Go-Back-N ARQ, if the sent frames are suspected or damaged, all the frames are
re-transmitted from the lost packet to the last packet transmitted.
Selective Repeat ARQ:
Selective repeat ARQ/ Selective Reject ARQ is a type of Sliding Window ARQ in which
only the suspected or damaged frames are re-transmitted.
Approaches for Flow Control Approaches for error detection are Checksum, Cyclic
: Feedback-based Flow Redundancy Check, and Parity Checking. Approaches
Control and Rate-based for error correction are Hamming code, Binary
Flow Control. Convolution codes, Reed-Solomon code, and
Low-Density Parity-Check codes.
Flow control focuses on the Error control focuses on the detection and correction of
proper flow of data and data errors.
loss prevention.
The High-Level Data Link Control (HDLC) is part of the data link layer protocol in the
OSI Model. HDLC is applied for point-to-point and multipoint link structures based on
the bit-oriented data format.
It also applies the Automatic Repeat Request (ARQ) for performing full-duplex
communication between network channels due to its high flexibility and reliable
network structure.
To efficiently integrate and use the HDLC protocols, different stations are to be
effectively applied in the channel:
The HDLC primarily supports two types of transfer models, which are:
● Normal Response Model (NRM) - This transfer model combines primary and
secondary stations in point-to-point or multipoint network configurations to
exchange commands from primary stations and responses from secondary
stations.
● Asynchronous Balanced Model (ABM) - In this transfer model, combined
stations are installed in a point-to-point configuration for exchange
commands and responses in a balanced format.
Characteristics
The HDLC protocol in computer networks is a widely used data link protocol for
● It operates at the data link layer of the OSI (Open Systems Interconnection)
frame. Also, HDLC has an end flag, which indicates the end of a frame.
● HDLC consists of a control field, which contains information about the type of
data being transmitted, and a cyclic redundancy check (CRC) code, which
● The control field in HDLC also contains information about the type of control
ensure that the transmitted data does not overload the receiving node.
● HDLC can be used with various physical layer technologies, including serial
● In case of redundancy, HDLC will retransmit the erroneous frame, ensuring that
computer networks. Being a networking professional, you should know the frames
To have a count on frames and types of HDLC, there are six types of fields present in
HDLC and three types of HDLC frames. Firstly we are going with the types of fields.
● Start Flag: The start flag is a predefined sequence of bits that indicates the
mechanism and allows the receiving device to identify the start of the frame.
● Address Field: The address field contains the destination and source
addresses of the HDLC frame. This field allows the receiving device to identify
the intended recipient of the frame and determine if it should process the
frame.
● Control Field: The control field contains information about the type of data
being transmitted and the type of control being performed. The control field
a control frame.
● Information Field: The information field contains the data being transmitted.
This field can be used for unidirectional data transfer or for transmitting data
● Frame Check Sequence (FCS): The Frame Check Sequence (FCS) is a cyclic
redundancy check (CRC) code used to detect errors in the transmitted data.
The FCS allows the receiving device to detect and correct errors that may
of an HDLC frame. The end flag allows the receiving device to identify the end
1.
Each HDLC frame has a specific format, including a start flag, end flag, control field,
and cyclic redundancy check (CRC) code. The start flag is used to indicate the
beginning, while the end flag indicates the end of a frame. The control field contains
information about the type of data being transmitted. The CRC code is used to detect
transmitted and are used for unidirectional data transfer. They include an
information field, which holds the data, as well as a control field, which
contains information about the type of data being transmitted. The first bit of
● Supervisory Frame (S-Frame) – It is a type of HDLC frame, used for flow control
and error detection and correction. They include a control field, which contains
information about the type of control being performed, such as flow control,
error detection, and retransmission of lost or damaged frames. The very first
What is Multiplexing?
Multiplexing is the process of sharing a medium or bandwidth. It combines
several signals from many sources and transmits them across a single
communication/physical line. In simple words, multiplexing simply means
multiple sources but one link.
When multiple senders attempt to send over the same medium, a device known
as a Multiplexer divides the physical channel and assigns one to each. On the
other hand, a De-multiplexer receives data from a single medium, recognizes it,
and distributes it to different recipients.
The process of combining data streams or input is called Multiplexing, and the
hardware used for multiplexing is known as a Multiplexer. A Multiplexer (MUX) is
a device that is used to combine n input lines to produce a single output line.
Multiplexing is done in a many-to-one approach, with n input and one output line.
Now as there are multiple signals to be shared from the same common medium the
possibility of collision is increased and as we know transmission is an expensive thing
so we must avoid the collision.
Hence, we need multiplexing so that multiple signals can be transmitted over a single
medium without the collision of data.
Advantages of Frequency-division Multiplexing
● Time Division Multiplexing (TDM) divides the shared channel among its users
using time slots. Each user can only send data during the time slot allotted to
them.
● TDM is primarily used with digital signals but can also be used with analog
signals.
● Digital signals are split into frames, similar to time slots
As the name suggests, in the synchronous time division multiplexing the time slot for
transmission is pre-assigned to each sender device. Even if the sender device has the
data to transmit or not, the time is allocated to the device. As we have discussed we
send the data in the form of frames so in the case when there is no data to be sent, only
the time slot is sent in the form of the frame.
2. Asynchronous Time-Division Multiplexing or Statistical Time-Division Multiplexing
In the asynchronous time division multiplexing, the allocated time slot is not fixed and
pre-assigned but we only provide the time slot to those devices which have the data to
be sent. So, we can conclude that in asynchronous time division multiplexing, the data
is only sent from the active senders and hence the frame contains the data as well at
the time slot.
Time Division Multiplexing Advantages and Disadvantages
Advantages
● We divide the time slot only so the user gets full bandwidth to be utilized by the
user.
● The user gets more flexible usage as the user is independent in his/her allocated
time slot.
● There is very little chance of cross-talk due to independence in the allocated time
slot.
● The modulation and demodulation (in particular) are easier as compared to the
frequency division multiplexing.
● It is more efficient and the cost of implementation is also lesser than the
frequency division multiplexing.
● It can support both analog and digital signals.
Disadvantages
● The time division multiplexing is widely used in ISDN (Indian Deep Space
Network) telephone lines.
● It is also used in the PSTN (Public Switched Telephone Network) networks.
TDM stands for Time Division Multiplexing. FDM stands for Frequency Division
Multiplexing.
In TDM the division of time is known as In FDM the frequency division is done
Time Slot. using Guard Bands.
TDM can work with both digital and analog FDM can only work with analog signals.
signals.
The chance of conflict is low in the case of The chance of conflict is high in the case
TDM. of FDM.
TDM is more efficient than FDM. FDM is less efficient than TDM.
The chip or the wiring of the TDM is The chip or the wiring of the FDM is
simpler. complex.
The chances of cross-talk are quite low in There are chances of cross-talk in FDM.
the case of TDM.
Circuit Establishment
● This phase is also called as setup phase.
● In this phase, a dedicated connection is established directly between two nodes
or from the source to the destination using a series of switching centres.
● The sender at the source and the receiver at the destination send communication
signals to request and acknowledge the establishment of the circuit.
Data Transfer
● The data transfer phase continues for the duration of the communication.
● Once the circuit is established, data (voice or other signals) is transmitted over
the dedicated circuit between the sender and receiver.
● During this phase, the resources are exclusively allocated to ongoing
communication, ensuring a constant quality of service.
Circuit Disconnect
This phase is also called the teardown phase. During this phase, one of the two
endpoints sends a message to initiate disconnection, resulting in the termination of the
communication path, which includes the intermediate links.
Packet Switching
Packet Switching in computer networks is a method of transferring data to a
network in the form of packets. In order to transfer the file fast and efficiently over
the network and minimize the transmission latency, the data is broken into small
pieces of variable length, called Packet. At the destination, all these small parts
(packets) have to be reassembled, belonging to the same file.
Packet Switching uses the Store and Forward technique while switching the
packets; while forwarding the packet each hop first stores that packet then
forwards. This technique is very beneficial because packets may get discarded at
any hop for some reason. More than one path is possible between a pair of
sources and destinations. Each packet contains the Source and destination
address using which they independently travel through the network. In other
words, packets belonging to the same file may or may not travel through the
same path. If there is congestion at some path, packets are allowed to choose
different paths possible over an existing network.
In packet switching the data is divided into small packets which allow faster
movement of data. Each packet contains two parts that are Header and Payload,
the header on each packet contains information.
Packet Switching
Packets arrive in order at the destination. Overall, three phases take place here-
The setup, data transfer and tear-down phases.
Virtual Circuit
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 may contain information such as length,
timestamp, sequence number, etc.
2. Connectionless Packet Switching (Datagram)
the data link layer of the network. It is used to connect Local Area Networks
(LANs) and transmit data across Wide Area Networks (WANs). It allows
transmission of different size packets and dynamic bandwidth allocation. Also, it
mechanism.
Working:
Frame relay switches set up virtual circuits to connect multiple LANs to build a
WAN. Frame relay transfers data between LANs across WAN by dividing the
data in packets known as frames and transmitting these packets across the
network. It supports communication with multiple LANs over the shared physical
links or private lines.
Each LAN has an access link that connects routers of LAN to the service
provider network terminated by the frame relay switch.
For data transmission, LAN’s router sends the data packets over the access link.
The packet sent by LAN is examined by a frame relay switch to get the Data Link
Connection Identifier (DLCI) which indicates the destination of the packet. Frame
relay switch already has the information about addresses of the LANs
DLCI basically identifies the virtual circuit (i.e. logical path between nodes that
doesn’t really exist) between source and destination network. It configures and
transmits the packet to the frame relay switch of destination LAN which in turn
transfers the data packet to destination LAN by sending it over its respective
access link.
Hence, in this way, a LAN is connected with multiple other LANs by sharing a
single physical link for data transmission.
Frame relay also deals with congestion within a network. Following methods are
used to identify congestion within a network:
Types:
Advantages:
1. High speed
2. Scalable
3. Reduced network congestion
4. Cost-efficient
5. Secured connection
Disadvantages:
Routing algorithms are the set of rules that dictate how data is routed through a
network. There are many different routing algorithms, each with its own strengths
and weaknesses. Selecting the right routing algorithm for a given network is a
critical task, as the algorithm can have a significant impact on the performance of
the network.
One of the benefits of using an adaptive routing algorithm is that it can help to improve
network performance. By constantly adjusting its route, the algorithm can avoid
congestion and find the most efficient path through the network. This can lead to faster
overall performance and reduced latency.
Another plus point of adaptive routing algorithms is that they can be more resilient to
changes in network conditions. If one part of the network becomes unavailable, the
algorithm can automatically reroute traffic around it. This can keep the network running
even in the face of unexpected outages or failures.
Centralised Algorithm:
However, there are some disadvantages to using a centralised routing algorithm. First, if
the router fails, the entire network may fail. Additionally, centralised algorithms can be
slow to react to changes in the network since the router must recalculate routes every
time there is a change.
Isolated Algorithm:
In computer networking, an isolated algorithm is a routing algorithm that does not take
into account the topology of the network. The algorithm simply selects the next hop for a
packet based on the destination address. This type of algorithm is typically used in
small networks where the topology is not complex.
Distributed Algorithm
Routing algorithms are used in computer networks to determine the best path for data to
travel from one point to another. There is a variety of routing algorithms that can be
used, and each has its own advantages and disadvantages.
One type of routing algorithm is the distributed algorithm. This algorithm is typically used
in large networks as it can provide scalability and flexibility. With this algorithm, each
node in the network is responsible for calculating the best path for data to travel. This
can be done by exchanging information with other nodes in the network.
The advantage of using a distributed algorithm is that it can handle changes in the
network more effectively. If a link goes down, for example, the algorithm can quickly
recalculate the best path. The disadvantage of using a distributed algorithm is that it can
be more complex to implement and manage.
One advantage of static routing is that it is simpler than adaptive routing. This is
because there is no need to constantly monitor and adjust the route based on changing
conditions. Static routes can also be pre-calculated, which can further simplify the
process. Another advantage is that static routes are more predictable since the same
route is always taken. This can be beneficial in some situations, such as when real-time
data transfer is required.
Routing in Circuit Switched
Network
• Many connections will need paths through more
than one switch
• Need to find a route
—Efficiency
—Resilience
• Public telephone switches are a tree structure
—Static routing uses the same approach all the time
• Dynamic routing allows for changes in routing
depending on traffic
—Uses a peer structure for nodes
Alternate Routing
• Possible routes between end offices predefined
• Originating switch selects appropriate route
• Routes listed in preference order
• Different sets of routes may be used at different
times
Alternate
Routing
Diagram
Routing in Packet Switched
Network
• Complex, crucial aspect of packet switched
networks
• Characteristics required
—Correctness
—Simplicity
—Robustness
—Stability
—Fairness
—Optimality
—Efficiency
Performance Criteria
• Used for selection of route
• Minimum hop
• Least cost
—See Stallings appendix 10A for routing algorithms
Example Packet Switched
Network
Decision Time and Place
• Time
—Packet or virtual circuit basis
• Place
—Distributed
• Made by each node
—Centralized
—Source
Network Information Source
and Update Timing
• Routing decisions usually based on knowledge of
network (not always)
• Distributed routing
— Nodes use local knowledge
— May collect info from adjacent nodes
— May collect info from all nodes on a potential route
• Central routing
— Collect info from all nodes
• Update timing
— When is network info held by nodes updated
— Fixed - never updated
— Adaptive - regular updates
Routing Strategies
• Fixed
• Flooding
• Random
• Adaptive
Fixed Routing
• Single permanent route for each source to
destination pair
• Determine routes using a least cost algorithm
(appendix 10A)
• Route fixed, at least until a change in network
topology
Fixed Routing
Tables
Flooding
• No network info required
• Packet sent by node to every neighbor
• Incoming packets retransmitted on every link except
incoming link
• Eventually a number of copies will arrive at destination
• Each packet is uniquely numbered so duplicates can be
discarded
• Nodes can remember packets already forwarded to keep
network load in bounds
• Can include a hop count in packets
Flooding
Example
Properties of Flooding
• All possible routes are tried
—Very robust
• At least one packet will have taken minimum
hop count route
—Can be used to set up virtual circuit
• All nodes are visited
—Useful to distribute information (e.g. routing)
Random Routing
• Node selects one outgoing path for
retransmission of incoming packet
• Selection can be random or round robin
• Can select outgoing path based on probability
calculation
• No network info needed
• Route is typically not least cost nor minimum
hop
What is a network topology?
Overall, bridges are valuable networking devices that can help optimize
network performance, enhance security, and ensure reliability.
Functions of Bridge in Computer Networks
When a data frame arrives at the bridge, it reads the destination MAC address
and compares it with the address table it has created by monitoring the traffic
on the connected network segments. If the destination MAC address is
located in the table, the bridge forwards the data frame to the network
segment where the destination node is located. If the address is not found,
the bridge blocks the data frame and does not allow it to pass through.
Bridges accept all incoming data packets, amplify them, and then forward
them to the other side of the bridge. However, they only allow specific packets
that are addressed from one network node to another to pass through. This
filtering process helps to reduce network congestion and improve network
performance.
In order to determine which packets are sent from one LAN to another, the
bridge creates an address table that contains the MAC addresses of nodes on
each connected network segment. The address table is dynamically updated
as new nodes are added or removed from the network, or as the network
topology changes.
There are three types of bridges in computer networks, which are as follows:
While bridge in computer networks offer several advantages, there are also
some disadvantages to consider, including
Bridge Protocols
Bridge protocols include spanning tree, source routing protocol, and source routing
transparent.
Spanning Tree Protocol (STP) Bridge
This is also known as adaptive or self-learning bridges and is defined in IEEE 802.1
standards. It has already been explained in the above section. Ideally, in bridged
network, the network tree of the bridge provides only one span (link) for each
LAN-to-LAN connection and therefore, no network with bridges can form a loop.
Sometimes, looping can occur.
A broadcast data
packet sent by the computer attached on segment 1can reach to all computers
attached on segment 2 and 3 without a connection between segment 1 and 3
.Sometimes, the bridge connection between segment 1and 3 or like is provided to give
the network more redundancy. Now, in this case the same broadcast packet sent by
the segment 1 will reach to segment 3 by two routes i.e. from segment 1 to 2 to 3 and
another by segment 1 to 3. In this manner the computers on segment 3 will receive
duplicate packets. In case of large networks some segments may receive many
packets and thus cause looping.
A loop, therefore, can cause a broadcast packet or a packet with an unknown
destination to circulate through it, thus rendering the network inoperable. This condition
is avoided by making some bridges not to forward frames. An algorithm known as
distributed spanning tree (DST) accomplishes this task. This algorithm decides which
bridge should forward the packets in the network. Under this scheme bridges exchange
a control message known as a hello message to select a single transmission route.
Remaining bridges maintain a standby position and provide alternate path in case of
the same bridge fails in the selected transmission path. Bridge connecting segment 1
and 3 will be active only if the bridge connecting segment 2 and 3 fails otherwise it acts
as a standby bridge for network. In other words, bridges that support the spanning tree
algorithm have the ability to automatically reconfigure themselves for alternate paths if
a network segment fails, thereby improving overall reliability.
IBM Source Routing Protocol (SRP) Bridge
These are programmed with specific routes for each packet based on considerations
such as the physical location of the nodes, and the number of bridges involved.
Source Routing Transparent (SRT)
Consider the scenario below with 3 switches with one user attached to each
switch.
Arvind sends a broadcast frame to LAN and as nature of switch frame are send
out from other ports (Gi0/1 & Gi0/2) except receiving port (Fa0/3). Now, this
frame goes to SW2, SW2 also broadcast frame out of Gi0/2 and Fa0/2 ports.
SW1 receives frame in its Gi0/1 ports. SW1 also broadcast frame then this
frame goes to SW3 and frame broadcasting goes on. Remember that this frame
broadcast also occurs in other direction from SW3 out of Gi0/1 port. Above
discussed frame looping was from SW3’s Gi0/2 ports. You can imagine the
frame flooding in that small LAN. This forever looping of frames around LAN is
called Broadcast storm. This Looping of frames causes three problems as stated
below:
1. MAC table instability – Due to looping of frame around LAN,
Spanning tree protocol prevent looping of frames around LAN by placing ports
of switch in either forwarding or blocking state. Interfaces (ports of switch)
which are in forwarding state act as normally but Interfaces in blocking state
doesn’t process any frame received except STP messages and other important
overheads. Blocking Interfaces doesn’t learn MAC addresses, don’t forward
frames and don’t process received frames. Now if we again consider the above
discussed scenario with SW3’s Gi0/2 interface in blocking state.
● Arvind sends the frame to SW3.
state.
● Now SW1 receives frame and forward to Fa0/1 and Gi0/1 interfaces.
● SW3 will receive the frame on Gi0/2 interface but ignores the frame as
it is in blocking state.
In this way looping of frame around LAN can be prevented by using STP.
SMTP (Simple Mail Transfer Protocol) protocol is the standard mechanism for "sending
and receiving the electronic mails via the internet". SMTP is a set of guidelines that
enables users to exchange information.
The actual mail transfer is carried out through the message transfer agent i.e. a system
should have the client MTA(Mail Transfer Agent) to send mail and it should have a
server MTA to receive the mail.
Thus, the SMTP protocol is the protocol that defines the MTA client and MTA server on
the internet. Most email clients, such as Apple Mail, Gmail, Outlook, etc rely on SMTP to
send or receive messages or emails from a sender to a recipient.
Basically, in SMTP the actual transfer of the mail is done through the message transfer
agent (MTA). Hence, to send the mail, the system must have the client MTA and
similarly, to receive the mail, the system must have the server MTA.
Using the SMTP protocol, a TCP connection to the SMTP server is opened and then the
client sends the email across the TCP connection. As soon as the server listens for the
TCP connection from any client the connection is established on port 25 and the
connection becomes successful hence the clients can send or receive the email
immediately.
Example
Consider two persons, Alex and Clark. Here, Alex has an account on yahoo with the
username, alex@yahoo(dot)com. Whereas, Clark has an account on google with the
username, clark@google(dot)com.
Now, Alex wants to send an email to the Clark to share some professional data. Below
are the steps that are done to send an email these explain the process of email delivery
from the sender to the receiver, here, Alex and Clark respectively.
Components of SMTP
There are four components in the SMTP:
● As shown in the image above, a sender drafts the mail and hits the send button.
Once an SMTP server is established, email clients can connect and communicate
with the server. As the sender has pressed the send button, this triggers the email
client to open an SMTP connection to the server to make a connection so that it
can send the emails.
● Now, the SMTP client uses various commands available in the SMTP to
communicate with the server and to transfer the data like the mail address of the
sender.
● Then the Mail Transfer Agent(MTA) ensures that both the mail addresses are
from the same email domain. If they are the same, it sends the email. But if not,
the server uses the DNS(Domain Name System) to identify the recipient's
domain, and then it'll send it to the right server.
The MTA is responsible for maintaining the small queue of emails so that it can
schedule the delivery of mail when the receiver is not available. Then, the MTA delivers
the mail to the mailbox of the recipient.
Also, the main protocol to handle all the above-mentioned processes was the SMTP.
Now, as shown in the example above, Alex is sending the mail i.e. SMTP client (Alex's
mail server) sends the SMTP commands whereas the SMTP server (Clark's mail server)
responds to the commands. Commands like, HELO, MAIL, RCPT, etc. are the commands
which are discussed in the next section, are used in the SMTP protocol and the SMTP
server responds to these commands.
So, the SMTP client sends the commands to the SMTP server and the server responds
with some kind of numerical codes and at last, after the termination of the SMTP
session, the receiver receives the message in the email client like Outlook, Gmail, etc.
SMTP Commands
Let's look at a few commands of SMTP:
Comm Description
and
RCPT This command identifies the recipient of the mail and again the
SMTP server responds with the same code.
DATA This command triggers the transfer of data between the client
and the server.
QUIT After the email has been sent, the client sends this command to
quit the server and if it is closed successfully, the server will
reply with a 221 code.
basics of email:
To send an email:
User Agent (UA), Message Transfer Agent (MTA), Mail Box, and
Advantages Or Disadvantages:
Advantages of email:
1. Convenient and fast communication with individuals or
groups globally.
2. Easy to store and search for past messages.
3. Ability to send and receive attachments such as
documents, images, and videos.
4. Cost-effective compared to traditional mail and fax.
5. Available 24/7.
Disadvantages of email:
(MIME) Protocol
data.
Features of MIME –
Working of MIME –
non-ASCII code and now the user agent of the receiver side reads
transfer.
the sender’s side to the mailbox of the receiver side and stores it
agent organizes the mails from the mail server to the receiver’s
MIME Header:
header:
Advantages of MIME:
Disadvantages:
● The receiving system’s interpretation of MIME media
types may not always be accurate, which might cause
issues with how the content is handled or displayed.
● Because they call for additional headers to be provided
along with the information, MIME media types can
increase the overhead associated with content
transmission. This might lead to larger transferred data
files and slower transfer rates.
● Consumers frequently lack a solid understanding of
MIME media types, and the use of several media types
can make it even more challenging for consumers to
comprehend the content being transferred.
● Some systems might not always support MIME media
types, which might cause issues with the transmission
of specific kinds of content.