Professional Documents
Culture Documents
Switch is a network device that is used to segment the networks into different subnetworks
called subnets or LAN segments. It is responsible for filtering and forwarding the packets
between LAN segments based on MAC address. Switch establishes a temporary connection
between source and destination for communication and terminates the connection once
conversation is done Switching is process to forward packets coming in from one port to a
port leading towards the destination. When data comes on a port it is called ingress, and
when data leaves a port or goes out it is called egress.
Switching technique is used to connect the systems for making one-to-one communication.
Classification Of Switching Techniques
Circuit Switching
Circuit switching is a switching technique that establishes a dedicated path between
sender and receiver.
In the Circuit Switching Technique, once the connection is established then the
dedicated path will remain to exist until the connection is terminated.
A complete end-to-end path must exist before the communication takes place.
In case of circuit switching technique, when any user wants to send the data, voice,
video, a request signal is sent to the receiver then the receiver sends back the
acknowledgment to ensure the availability of the dedicated path. After receiving the
acknowledgment, dedicated path transfers the data.
Circuit establishment
Data transfer
Circuit Disconnect
In the case of Circuit Switching technique, the communication channel is dedicated.
Once the dedicated path is established, the only delay occurs in the speed of data
transmission.
It takes a long time to establish a connection approx 10 seconds during which no
data can be transmitted.
It is more expensive than other switching techniques as a dedicated path is required
for each connection.
It is inefficient to use because once the path is established and no data is transferred,
then the capacity of the path is wasted.
In this case, the connection is dedicated therefore no other data can be transferred
even if the channel is free.
Message Switching
Message Switching is a switching technique in which a message is transferred as a
complete unit and routed through intermediate nodes at which it is stored and
forwarded.
Message switches are programmed in such a way so that they can provide the most
efficient routes.
Each and every node stores the entire message and then forward it to the next node.
This type of network is known as store and forward network.
Message Switching
Message Switching is a switching technique in which a message is transferred as a
complete unit and routed through intermediate nodes at which it is stored and
forwarded.
In Message Switching technique, there is no establishment of a dedicated path
between the sender and receiver.
Message switches are programmed in such a way so that they can provide the most
efficient routes.
Each and every node stores the entire message and then forward it to the next node.
This type of network is known as store and forward network.
Data channels are shared among the communicating devices that improve the
efficiency of using available bandwidth.
Traffic congestion can be reduced because the message is temporarily stored in the
nodes.
The size of the message which is sent over the network can be varied. Therefore, it
supports the data of unlimited size.
Disadvantages Of Message Switching
The message switches must be equipped with sufficient storage to enable them to
store the messages until the message is forwarded.
The Long delay can occur due to the storing and forwarding facility provided by the
message switching technique.
Packet Switching
The packet switching is a switching technique in which the message is sent in one
go, but it is divided into smaller pieces, and they are sent individually.
The message splits into smaller pieces known as packets and packets are given a
unique number to identify their order at the receiving end.
Every packet contains some information in its headers such as source address,
destination address and sequence number.
Packets will travel across the network, taking the shortest path as possible.
All the packets are reassembled at the receiving end in correct order.
If any packet is missing or corrupted, then the message will be sent to resend the
message.
If the correct order of the packets is reached, then the acknowledgment message
will be sent.
In the case of Virtual circuit switching, a preplanned route is established before the
messages are sent.
Call request and call accept packets are used to establish the connection between
sender and receiver.
In this case, the path is fixed for the duration of a logical connection.
Virtual Circuit is the computer network providing connection-oriented service. It is a
connection-oriented network. In virtual circuit resource are reserve for the time interval of
data transmission between two nodes. This network is a highly reliable medium of transfer.
Virtual circuits are costly to implement.
DIAL UP
A dial-up is a connection that's established using a modem. To make the dial-up connection,
the modem must connect to an active phone line that is not in use. When connecting, the
modem picks up the phone and dials a number that's attached to another computer. After the
connection is made the computer can check e-mail, browse the Internet, and share files.
Dial-up history
The first dial-up connection was made
in 1965 by Lawrence G.
Roberts at MIT with a TX-2 computer and Tom Marill with a Q-32 at SDC in California.
The dial-up connection today
Today, with multimedia and bigger web pages on the Internet most users have an
unenjoyable time browsing the Internet using a dial-up connection and try to use other
options. Most users who have the available option use some form of broadband connection,
which allows a much faster download and upload.
DIGITAL SUBSCRIBER LINE
Types of DSL –
1. Symmetric DSL – SDSL, splits the upstream and downstream frequencies evenly,
providing equal speeds to both uploading and downloading data transfer. This connection
may provide 2 Mbps upstream and downstream.it is mostly preferred by small
organizations.
2. Asymmetric DSL – ADSL, provides a wider frequency range for downstream transfers,
which offers several times faster downstream speeds. an ADSL connection may offer 20
Mbps downstream and 1.5 Mbps upstream, it is because most users download more data
than they upload.
Benefits –
• No Additional Wiring – A DSL connection makes use of your existing telephone wiring,
so you will not have to pay for expensive upgrades to your phone system.
• Cost-Effective – DSL internet is a very cost-effective method and is best in connectivity
• Availability of DSL modems by the service providers.
• Users can use both telephone lines and the internet at the same time. And it is because the
voice and digital signals are transferred in different frequencies.
• Users can choose between different connection speeds and pricing from various
providers.
DSL Internet service only works over a limited physical distance and remains unavailable in
many areas where the local telephone infrastructure does not support DSL technology. The
service is not available everywhere. The connection is faster for receiving data than it is for
sending data over the Internet.
This sublayer of the data link layer deals with multiplexing, the flow of data among
applications and other services, and LLC is responsible for providing error messages and
acknowledgments as well.
MAC sublayer manages the device’s interaction, responsible for addressing frames, and also
controls physical media access.
The data link layer receives the information in the form of packets from the Network layer,
it divides packets into frames and sends those frames bit-by-bit to the underlying physical
layer.
Functions of the Data-link Layer:
1. Framing: The packet received from the Network layer is known as a frame in the Data
link layer. At the sender’s side, DLL receives packets from the Network layer and divides
them into small frames, then, sends each frame bit-by-bit to the physical layer. It also
attaches some special bits (for error control and addressing) at the header and end of the
frame. At the receiver’s end, DLL takes bits from the Physical layer organizes them into the
frame, and sends them to the Network layer.
2. Addressing: The data link layer encapsulates the source and destination’s MAC address/
physical address in the header of each frame to ensure node-to-node delivery. MAC address
is the unique hardware address that is assigned to the device while manufacturing.
3. Error Control: Data can get corrupted due to various reasons like noise, attenuation, etc.
So, it is the responsibility of the data link layer, to detect the error in the transmitted data
and correct it using error detection and correction techniques respectively. DLL adds error
detection bits into the frame’s header, so that receiver can check received data is correct or
not.
4. Flow Control: If the receiver’s receiving speed is lower than the sender’s sending speed,
then this can lead to an overflow in the receiver’s buffer and some frames may get lost. So,
it’s the responsibility of DLL to synchronize the sender’s and receiver’s speeds and establish
flow control between them.
5. Access Control: When multiple devices share the same communication channel there is a
high probability of collision, so it’s the responsibility of DLL to check which device has
control over the channel and CSMA/CD and CSMA/CA can be used to avoid collisions
and loss of frames in the channel.
Protocols in Data link layer
There are various protocols in the data link layer, which are as follows:
• Synchronous Data Link Protocol (SDLC)
• High-Level Data Link Protocol (HDLC)
• Serial Line Interface Protocol (SLIP)
• Point to Point Protocol (PPP)
• Link Access Procedure (LAP)
• Link Control Protocol (LCP)
• Network Control Protocol (NCP)
Error Control in Data Link Layer
• Level : Medium
• Last Updated : 07 Sep, 2020
Data-link layer uses the techniques of error control simply to ensure and confirm that all
the data frames or packets, i.e. bit streams of data, are transmitted or transferred from sender
to receiver with certain accuracy. Using or providing error control at this data link layer is
an optimization, it was never requirement. Error control is basically process in data link
layer of detecting or identifying and re-transmitting data frames that might be lost or
corrupted during transmission.
In both of these cases, receiver or destination does not receive correct data-frame and sender
or source does not even know anything about any such loss regarding data frames.
Therefore, in such tDifficultyype of cases, both sender and receiver are provided with some
essential protocols that are required to detect or identify such type of errors like loss of data
frames.
The Data-link layer follows technique known as re-transmission of frames to detect or
identify transit errors and also to take necessary actions that are required to reduce or
remove such errors. Each and every time an effort is detected during transmission, particular
data frames retransmitted and this process is known as ARQ (Automatic Repeat Request).
1. Error Detection :
Error detection, as name suggests, simply means detection or identification of errors.
These errors may cause due to noise or any other impairments during transmission from
transmitter to the receiver, in communication system. It is class of technique for detecting
garbled i.e. unclear and distorted data or message.
2. Error Correction :
Error correction, as name suggests, simply means correction or solving or fixing of
errors. It simply means reconstruction and rehabilitation of original data that is error-free.
But error correction method is very costly and is very hard.
1. Stop-and-Wait ARQ :
Stop-and-Wait ARQ is also known as alternating bit protocol. It is one of simplest flow and
error control techniques or mechanisms. This mechanism is generally required in
telecommunications to transmit data or information among two connected devices. Receiver
simply indicates its readiness to receive data for each frame. In these, sender sends
information or data packet to receiver. Sender then stops and waits for ACK
(Acknowledgment) from receiver. Further, if ACK does not arrive within given time period
i.e., time-out, sender then again resends frame and waits for ACK. But, if sender receives
ACK, then it will transmi next data packet to receiver and then again wait for ACK fro
receiver. This process to stop and wait continues until sender has no data frame or packet to
send.
2. Sliding Window ARQ :
This technique is generally used for continuous transmission error control. It is further
categorized into two categories as given below :
• Go-Back-N ARQ :
Go-Back-N ARQ is form of ARQ protocol in which transmission process continues to
send or transmit total number of frames that are specified by window size even without
receiving an ACK (Acknowledgement) packet from the receiver. It uses sliding window
flow control protocol. If no errors occur, then operation is identical to sliding window.
• Selective Repeat ARQ :
Selective Repeat ARQ is also form of ARQ protocol in which only suspected or damaged
or lost data frames are only retransmitted. This technique is similar to Go-Back-N ARQ
though much more efficient than the Go-Back-N ARQ technique due to reason that it
reduces number of retransmission. In this, the sender only retransmits frames for which
NAK is received. But this technique is used less because of more complexity at sender
and receiver and each frame must be needed to acknowledged individually.
Unit 3
1. Random Access Protocol: In this, all stations have same superiority that is no station has
more priority than another station. Any station can send data depending on medium’s
state( idle or busy). It has two features:
1. There is no fixed time for sending data
2. There is no fixed sequence of stations sending data
The Random access protocols are further subdivided as:
(a) ALOHA – It was designed for wireless LAN but is also applicable for shared medium. In
this, multiple stations can transmit data at the same time and can hence lead to collision and
data being garbled.
• Pure Aloha:
When a station sends data it waits for an acknowledgement. If the acknowledgement
doesn’t come within the allotted time then the station waits for a random amount of time
called back-off time (Tb) and re-sends the data. Since different stations wait for different
amount of time, the probability of further collision decreases.
Vulnerable Time = 2* Frame transmission time
Throughput = G exp{-2*G}
Maximum throughput = 0.184 for G=0.5
• Slotted Aloha:
It is similar to pure aloha, except that we divide time into slots and sending of data is
allowed only at the beginning of these slots. If a station misses out the allowed time, it
must wait for the next slot. This reduces the probability of collision.
Vulnerable Time = Frame transmission time
Throughput = G exp{-*G}
Maximum throughput = 0.368 for G=1
For more information on ALOHA refer – LAN Technologies
(b) CSMA – Carrier Sense Multiple Access ensures fewer collisions as the station is
required to first sense the medium (for idle or busy) before transmitting data. If it is idle
then it sends data, otherwise it waits till the channel becomes idle. However there is still
chance of collision in CSMA due to propagation delay. For example, if station A wants to
send data, it will first sense the medium.If it finds the channel idle, it will start sending data.
However, by the time the first bit of data is transmitted (delayed due to propagation delay)
from station A, if station B requests to send data and senses the medium it will also find it
idle and will also send data. This will result in collision of data from station A and B.
CSMA access modes-
• 1-persistent: The node senses the channel, if idle it sends the data, otherwise it
continuously keeps on checking the medium for being idle and transmits
unconditionally(with 1 probability) as soon as the channel gets idle.
• Non-Persistent: The node senses the channel, if idle it sends the data, otherwise it checks
the medium after a random amount of time (not continuously) and transmits when found
idle.
• P-persistent: The node senses the medium, if idle it sends the data with p probability. If
the data is not transmitted ((1-p) probability) then it waits for some time and checks the
medium again, now if it is found idle then it send with p probability. This repeat
continues until the frame is sent. It is used in Wifi and packet radio systems.
• O-persistent: Superiority of nodes is decided beforehand and transmission occurs in that
order. If the medium is idle, node waits for its time slot to send data.
(c) CSMA/CD – Carrier sense multiple access with collision detection. Stations can
terminate transmission of data if collision is detected. For more details refer – Efficiency of
CSMA/CD
(d) CSMA/CA – Carrier sense multiple access with collision avoidance. The process of
collisions detection involves sender receiving acknowledgement signals. If there is just one
signal(its own) then the data is successfully sent but if there are two signals(its own and the
one with which it has collided) then it means a collision has occurred. To distinguish
between these two cases, collision must have a lot of impact on received signal. However it
is not so in wired networks, so CSMA/CA is used in this case.
CSMA/CA avoids collision by:
1. Interframe space – Station waits for medium to become idle and if found idle it does not
immediately send data (to avoid collision due to propagation delay) rather it waits for a
period of time called Interframe space or IFS. After this time it again checks the medium
for being idle. The IFS duration depends on the priority of station.
2. Contention Window – It is the amount of time divided into slots. If the sender is ready to
send data, it chooses a random number of slots as wait time which doubles every time
medium is not found idle. If the medium is found busy it does not restart the entire
process, rather it restarts the timer when the channel is found idle again.
3. Acknowledgement – The sender re-transmits the data if acknowledgement is not received
before time-out.
2. Controlled Access:
In this, the data is sent by that station which is approved by all other stations. For further
details refer – Controlled Access Protocols
3. Channelization:
In this, the available bandwidth of the link is shared in time, frequency and code to multiple
stations to access channel simultaneously.
• Frequency Division Multiple Access (FDMA) – The available bandwidth is divided into
equal bands so that each station can be allocated its own band. Guard bands are also
added so that no two bands overlap to avoid crosstalk and noise.
• Time Division Multiple Access (TDMA) – In this, the bandwidth is shared between
multiple stations. To avoid collision time is divided into slots and stations are allotted
these slots to transmit data. However there is a overhead of synchronization as each
station needs to know its time slot. This is resolved by adding synchronization bits to
each slot. Another issue with TDMA is propagation delay which is resolved by addition
of guard bands.
For more details refer – Circuit Switching
• Code Division Multiple Access (CDMA) – One channel carries all transmissions
simultaneously. There is neither division of bandwidth nor division of time. For example,
if there are many people in a room all speaking at the same time, then also perfect
reception of data is possible if only two person speak the same language. Similarly, data
from different stations can be transmitted simultaneously in different code languages.
Ethernet:-
Ethernet is the most widely used LAN technology, which is defined under IEEE standards
802.3. The reason behind its wide usability is Ethernet is easy to understand, implement,
maintain, and allows low-cost network implementation. Also, Ethernet offers flexibility in
terms of topologies that are allowed. Ethernet generally uses Bus Topology. Ethernet
operates in two layers of the OSI model, Physical Layer, and Data Link Layer. For Ethernet,
the protocol data unit is Frame since we mainly deal with DLL. In order to handle collision,
the Access control mechanism used in Ethernet is CSMA/CD.
Manchester Encoding Technique is used in Ethernet.
Since we are talking about IEEE 802.3 standard Ethernet, therefore, 0 is expressed by a
high-to-low transition, a 1 by the low-to-high transition. In both Manchester Encoding and
Differential Manchester, the Encoding Baud rate is double of bit rate.
Advantages of Ethernet:
Token Bus
Token Ring is defined by the IEEE 802.5 standard. In the token ring network, the token is
passed over a physical ring instead of a virtual ring.
In this a token is a special frame and a station can transmit the data frame if and only if it
has a token. And The tokens are issued on successful receipt of the data frame.
Token Ring
Backbone is most important part of a system which provides the central support to the rest
system, for example backbone of a human body that balance and hold all the body parts.
Similarly in Computer Networks a Backbone Network is as a Network containing a high
capacity connectivity infrastructure that backbone to the different part of the network.
Actually a backbone network allows multiple LANs to get connected in a backbone
network, not a single station is directly connected to the backbone but the stations are part of
LAN, and backbone connect those LANs.
NETWORK ADAPTERS
The network adapter is a component of the internal hardware of a computer, which is used
to communicate with another computer through a network. It enables the computer to
connect with another computer, server or any network device through a LAN connection.
You can use the network adapter on a wired or wireless network. The wireless network
adapter receives the signal from the computer and converts it into radio waves transmitted
through the antenna. Radiofrequency signals are electromagnetic waves, which vibrate
when they propagate in the air at the appropriate frequency band or frequency.
The frequency generally tends to 2.4 GHz and 5 GHz, and 14 channels are available. The
radio waves reach the router first, and then the broadband modem or internal network.
The adapter for the desktop computer is usually pre-installed. If the desktop computer does
not provide a pre-installed adapter, the card can be connected to a PCMCIA slot or a mini
PCI slot. Similarly, old desktop computers may allow a modified Ethernet adapter to be
inserted in the PCI slot. Some electronic cards can even be inserted into the memory card
port.
As another option, a USB-style Ethernet adapter can be compatible with both desktop and
laptop computers, or it can be connected to an Ethernet port via an Ethernet cable.
REPEATERS
Repeaters are network devices operating at physical layer of the OSI model that amplify or
regenerate an incoming signal before retransmitting it. They are incorporated in networks to
expand its coverage area. They are also known as signal boosters.
Why are Repeaters needed?
When an electrical signal is transmitted via a channel, it gets attenuated depending upon the
nature of the channel or the technology. This poses a limitation upon the length of the LAN
or coverage area of cellular networks. This problem is alleviated by installing repeaters at
certain intervals.
Repeaters amplifies the attenuated signal and then retransmits it. Digital repeaters can even
reconstruct signals distorted by transmission loss.So, repeaters are popularly incorporated to
connect between two LANs thus forming a large single LAN. This is shown in the following
diagram −
Advantages of Repeaters
•Repeaters are simple to install and can easily extend the length or the coverage area
of networks.
•They are cost effective.
•Repeaters don’t require any processing overhead. The only time they need to be
investigated is in case of degradation of performance.
•They can connect signals using different types of cables.
Disadvantages of Repeaters
•Repeaters cannot connect dissimilar networks.
•They cannot differentiate between actual signal and noise.
•They cannot reduce network traffic or congestion.
•Most networks have limitations upon the number of repeaters that can be deployed.
Hubs are networking devices operating at a physical layer of the OSI model that are used to
connect multiple devices in a network. They are generally used to connect computers in a
LAN.
A hub has many ports in it. A computer which intends to be connected to the network is
plugged in to one of these ports. When a data frame arrives at a port, it is broadcast to every
other port, without considering whether it is destined for a particular destination device or
not.
Features of Hubs
•A hub operates in the physical layer of the OSI model.
•A hub cannot filter data. It is a non-intelligent network device that sends message to
all ports.
•It primarily broadcasts messages. So, the collision domain of all nodes connected
through the hub stays one.
•Transmission mode is half duplex.
•Collisions may occurs during setup of transmission when more than one computers
place data simultaneously in the corresponding ports.
•Since they lack intelligence to compute best path for transmission of data packets,
inefficiencies and wastage occur.
•They are passive devices, they don’t have any software associated with it.
•They generally have fewer ports of 4/12.
Types of Hubs
Initially, hubs were passive devices. However, with development of advanced technology,
active hubs and intelligent hubs came into use.
witches are networking devices operating at layer 2 or a data link layer of the OSI model.
They connect devices in a network and use packet switching to send, receive or forward
data packets or data frames over the network.
A switch has many ports, to which computers are plugged in. When a data frame arrives at
any port of a network switch, it examines the destination address, performs necessary
checks and sends the frame to the corresponding device(s).It supports unicast, multicast as
well as broadcast communications.
Features of Switches
•A switch operates in the layer 2, i.e. data link layer of the OSI model.
•It is an intelligent network device that can be conceived as a multiport network
bridge.
•It uses MAC addresses (addresses of medium access control sublayer) to send data
packets to selected destination ports.
•It uses packet switching technique to receive and forward data packets from the
source to the destination device.
•It is supports unicast (one-to-one), multicast (one-to-many) and broadcast (one-to-
all) communications.
•Transmission mode is full duplex, i.e. communication in the channel occurs in both
the directions at the same time. Due to this, collisions do not occur.
•Switches are active devices, equipped with network software and network
management capabilities.
•Switches can perform some error checking before forwarding data to the destined
port.
•The number of ports is higher – 24/48.
Types of Switches
There are variety of switches that can be broadly categorised into 4 types −
•Unmanaged Switch − These are inexpensive switches commonly used in home
networks and small businesses. They can be set up by simply plugging in to the
network, after which they instantly start operating. When more devices needs to be
added, more switches are simply added by this plug and play method. They are
referred to as u managed since they do not require to be configured or monitored.
•Managed Switch − These are costly switches that are used in organisations with
large and complex networks, since they can be customized to augment the
functionalities of a standard switch. The augmented features may be QoS (Quality of
Service) like higher security levels, better precision control and complete network
management. Despite their cost, they are preferred in growing organizations due to
their scalability and flexibility. Simple Network Management Protocol (SNMP) is
used for configuring managed switches.
•LAN Switch − Local Area Network (LAN) switches connects devices in the internal
LAN of an organization. They are also referred as Ethernet switches or data switches.
These switches are particularly helpful in reducing network congestion or
bottlenecks. They allocate bandwidth in a manner so that there is no overlapping of
data packets in a network.
•PoE Switch − Power over Ethernet (PoE) switches are used in PoE Gogabit
Ethernets. PoE technology combine data and power transmission over the same cable
so that devices connected to it can receive both electricity as well as data over the
same line. PoE switches offer greater flexibility and simplifies the cabling
connections
Bridges are used to connect two subnetworks that use interchangeable protocols. It
combines two LANs to form an extended LAN. The main difference between the bridge and
repeater is that the bridge has a penetrating efficiency.
Working of Bridges
A bridge accepts all the packets and amplifies all of them to the other side. The bridges are
intelligent devices that allow the passing of only selective packets from them. A bridge only
passes those packets addressed from a node in one network to another node in the other
network.
A bridge performs in the following aspect −
•A bridge receives all the packets or frame from both LAN (segment) A and B.
•A bridge builds a table of addresses from which it can identify that the packets are
sent from which LAN (or segment) to which LAN.
•The bridge reads the send and discards all packets from LAN A sent to a computer
on LAN A and that packets from LAN A send to a computer on LAN B are
retransmitted to LAN B.
•The packets from LAN B are considered in the same method.
Types of Bridges
There are generally two types of bridges which are as follows −
Transparent Bridges
It is also called learning bridges. Bridge construct its table of terminal addresses on its own
as it implements connecting two LANs. It facilitates the source location to create its table. It
is self-updating. It is a plug and plays bridge.
Source Routing Bridge
This sending terminal means the bridges that the frames should stay. This type of bridge is
used to prevent looping problem.
Uses of Bridges
The main uses of bridges are −
•Bridges are used to divide large busy networks into multiple smaller and
interconnected networks to improve performance.
•Bridges also can increase the physical size of a network.
•Bridges are also used to connect a LAN segment through a synchronous modem
relation to another LAN segment at a remote area.
ROUTER
A Router is a networking device that forwards data packets between computer networks.
Let us understand this by a very general example, suppose you search
for www.google.com in your web browser then this will be a request which will be sent from
your system to the google`s server to serve that webpage, now your request which is nothing
but a stream of packets don`t just go the google`s server straightaway they go through a
series of networking devices known as a router which accepts this packets and forwards
them to correct path and hence it reaches to the destination server.
A router has a number of interfaces by which it can connect to a number of host systems.
Functions of a Router:
The router basically performs two major functions:
1.Forwarding –
The router receives the packets from its input ports, checks its header, performs some
basic functions like checking checksum, and then looks up to the routing table to find the
appropriate output port to dump the packets onto, and forwards the packets onto that
output port.
2.Routing –
Routing is the process by which the router ascertains what is the best path for the packet
to reach the destination, It maintains a routing table which is made using different
algorithms by the router only.
GATEWAY
Gateways as the name suggest are one kind of gate (passage) that connects smart objects to
the servers by application of fog computing.
In IoT, Gateways are network hardware that an application/system uses for interacting with
the server.
1.Gateways make communication between the application and the server feasible by
connecting them altogether through a network tube, an imaginary tube that is believed to
exist between the application and the server and constituted by network waves through
which data transmission takes place.
2.A request about a certain amount of data is made by the user end and then the server
finds and processes data accordingly with the request.
3.The transmission is made via network tubes through the server to the gateway and then
the gateway to the application that made a request for data.
4.Gateways are considered to be the backbone for preserving the intelligence as well as
the storage capacity of the Smart device altogether without compromising on the loss of
the duo.
5.Gateways do this by application of Fog computing, on which a brief is provided below
that helps you to get an overview of the deal between Gateways and Fog Computing and
the whole data processing thing.
Features Of Gateways :
Gateways provide a wide variety of features. Some of which are:
1.Gateways work as a network bridge for data transmission as it makes the transmission
of data possible to transmit with more ease and does not demand high storage capacity.
2.Gateways create a structural temporary storeroom for the data transmitted by the server
and data requests made by the user end.
3.Gateways made the transmission more feasible as it queued up all the data and divide it
into small packets of data rather than sending it bulk. Data transmitted through Gateway
is divided into various useful and small packets each having its individual significance
and a role to play while processing data.
4.Gateways made the data more secure if the modifications to the gateway could be done
which than could create more reliability over smart devices.
5.Gateways optimize the data for search engines, applications, and servers by implanting
better readability to the content so that a machine could understand and optimize data
with ease.
Types Of Gateways :
There is not any specification of gateways in the commercial market other than being brand
specific. But on the feasibility, performance, speed, and workability gateways can be
classified in a broad manner as:
1.High Bandwidth Gateways –
These Gateways are meant for a more complex and intelligent Internet of Things or when
there are lots of data to be processed and transmitted and a lot of smart devices to be
handled once a time. These gateways could process data with more speed and flexibility
and are able to handle more data at a time. Gateways basically are not categorized as such
in the market, but various brands have certain specifications through which it could be
decided either the gateway is of high bandwidth or not.
2.Low Bandwidth Gateway –
These Gateways are really the best choice while choosing a simple smart object or when
you want to handle a single device once at a time. These Gateways are usually cheap and
are easy going with simple smart devices, and usually need a sink* for more feasibility.
They are really awesome if want a cheap solution to your data transmission.
UNIT 4
NETWORK LAYER
Network layer is the third layer in the OSI model of computer networks. It’s main function
is to transfer network packets from the source to the destination. It is involved both at the
source host and the destination host. At the source, it accepts a packet from the transport
layer, encapsulates it in a datagram and then deliver the packet to the data link layer so that
it can further be sent to the receiver. At the destination, the datagram is decapsulated, the
packet is extracted and delivered to the corresponding transport layer.
ARP
ARP stands for Address Resolution Protocol.
Each device on the network is recognized by the MAC address imprinted on the
NIC. Therefore, we can say that devices need the MAC address for communication
on a local area network. MAC address can be changed easily. For example, if the
NIC on a particular machine fails, the MAC address changes but IP address does not
change. ARP is used to find the MAC address of the node when an internet address is
known.
Note: MAC address: The MAC address is used to identify the actual device.
IP address: It is an address used to locate a device on the network.
The device will first look at its internet list, called the ARP cache to check whether
an IP address contains a matching MAC address or not. It will check the ARP cache
in command prompt by using a command arp-a.
If ARP cache is empty, then device broadcast the message to the entire network
asking each device for a matching MAC address.
The device that has the matching IP address will then respond back to the sender
with its MAC address
Once the MAC address is received by the device, then the communication can take
place between two devices.
If the device receives the MAC address, then the MAC address gets stored in the
ARP cache. We can check the ARP cache in command prompt by using a command
arp -a.
Object 1
Object 2
Static entry: It is an entry where someone manually enters the IP to MAC address
association by using the ARP command utility.
RARP
RARP stands for Reverse Address Resolution Protocol.
If the host wants to know its IP address, then it broadcast the RARP query packet
that contains its physical address to the entire network. A RARP server on the
network recognizes the RARP packet and responds back with the host IP address.
The protocol which is used to obtain the IP address from a server is known
as Reverse Address Resolution Protocol.
The message format of the RARP protocol is similar to the ARP protocol.
Like ARP frame, RARP frame is sent from one machine to another encapsulated in
the data portion of a frame.
ICMP
ICMP stands for Internet Control Message Protocol.
The ICMP is a network layer protocol used by hosts and routers to send the
notifications of IP datagram problems back to the sender.
ICMP uses echo test/reply to check whether the destination is reachable and
responding.
ICMP handles both control and error messages, but its main function is to report the
error but not to correct them.
An IP datagram contains the addresses of both source and destination, but it does
not know the address of the previous router through which it has been passed. Due to
this reason, ICMP can only send the messages to the source, but not to the immediate
routers.
ICMP protocol communicates the error messages to the sender. ICMP messages
cause the errors to be returned back to the user processes.
The second field specifies the reason for a particular message type.
Error Reporting
ICMP protocol reports the error messages to the sender.
Five types of errors are handled by the ICMP protocol:
Destination unreachable
Source Quench
Time Exceeded
Parameter problems
Redirection
IGMP
IGMP stands for Internet Group Message Protocol.
The IGMP protocol is used by the hosts and router to support multicasting.
The IGMP protocol is used by the hosts and router to identify the hosts in a LAN
that are the members of a group.
IGMP is a part of the IP layer, and IGMP has a fixed-size message.
Where,
Type: It determines the type of IGMP message. There are three types of IGMP message:
Membership Query, Membership Report and Leave Report.
Maximum Response Time: This field is used only by the Membership Query message. It
determines the maximum time the host can send the Membership Report message in
response to the Membership Query message.
Object 3
Checksum: It determines the entire payload of the IP datagram in which IGMP message is
encapsulated.
Group Address: The behavior of this field depends on the type of the message sent.
For Membership Query, the group address is set to zero for General Query and set
to multicast group address for a specific query.
For Membership Report, the group address is set to the multicast group address.
IGMP Messages
It also determines whether a specific multicast group has been joined by the
hosts on a attached interface.
The group address in the query is zero since the router expects one response
from a host for every group that contains one or more members on that host.
Membership report messages can also be generated by the host when a host
wants to join the multicast group without waiting for a membership query
message from the router.
Membership report messages are received by a router as well as all the hosts
on an attached interface.
Leave Report
When the host does not send the "Membership Report message", it means that the
host has left the group. The host knows that there are no members in the group, so
even when it receives the next query, it would not report the group.
Routing
A Router is a process of selecting path along which the data can be transferred from
source to the destination. Routing is performed by a special device known as a router.
A Router works at the network layer in the OSI model and internet layer in TCP/IP
model
A router is a networking device that forwards the packet based on the information
available in the packet header and forwarding table.
The routing algorithms are used for routing the packets. The routing algorithm is
nothing but a software responsible for deciding the optimal path through which
packet can be transmitted.
The routing protocols use the metric to determine the best path for the packet
delivery. The metric is the standard of measurement such as hop count, bandwidth,
delay, current load on the path, etc. used by the routing algorithm to determine the
optimal path to the destination.
The routing algorithm initializes and maintains the routing table for the process of
path determination.
ROUTING ALOGORITHM
Routing is the process of establishing the routes that data packets must follow to reach the
destination. In this process, a routing table is created which contains information regarding
routes that data packets follow. Various routing algorithms are used for the purpose of
deciding which route an incoming data packet needs to be transmitted on to reach the
destination efficiently.
1. Adaptive Algorithms –
These are the algorithms that change their routing decisions whenever network topology or
traffic load changes. The changes in routing decisions are reflected in the topology as well
as the traffic of the network. Also known as dynamic routing, these make use of dynamic
information such as current topology, load, delay, etc. to select routes. Optimization
parameters are distance, number of hops, and estimated transit time.
Further, these are classified as follows:
•(a) Isolated – In this method each, node makes its routing decisions using the
information it has without seeking information from other nodes. The sending nodes
don’t have information about the status of a particular link. The disadvantage is that
packets may be sent through a congested network which may result in delay. Examples:
Hot potato routing, backward learning.
•(b) Centralized – In this method, a centralized node has entire information about the
network and makes all the routing decisions. The advantage of this is only one node is
required to keep the information of the entire network and the disadvantage is that if the
central node goes down the entire network is done. The link state algorithm is referred to
as a centralized algorithm since it is aware of the cost of each link in the network.
•(c) Distributed – In this method, the node receives information from its neighbors and
then takes the decision about routing the packets. A disadvantage is that the packet may
be delayed if there is a change in between intervals in which it receives information and
sends packets. It is also known as a decentralized algorithm as it computes the least-cost
path between source and destination
2. Non-Adaptive Algorithms –
These are the algorithms that do not change their routing decisions once they have been
selected. This is also known as static routing as a route to be taken is computed in advance
and downloaded to routers when a router is booted.
INTERNET PROTOCOL(IP)
Internet Protocols are a set of rules that governs the communication and exchange of data
over the internet. Both the sender and receiver should follow the same protocols in order to
communicate the data. In order to understand it better, let’s take an example of a language.
Any language has its own set of vocabulary and grammar which we need to know if we
want to communicate in that language. Similarly, over the internet whenever we access a
website or exchange some data with another device then these processes are governed by a
set of rules called the internet protocols.
Casting in computer networks means transmitting data (stream of packets) over a network.
Following are the different types of casting used in networking −
•Unicast transmission
•Broadcast transmission
•Multicast transmission
Unicast Transmission (One-to-One)
In Unicast transmission, the data is transferred from a single sender (or a single source host)
to a single receiver (or a single destination host).
The network switches hear the MAC addresses of the devices on the networks to which they
are connected. They can then forward packets only onto those networks containing devices
with the connected MAC addresses. Unicast gradually becomes less efficient as more
receivers need to see identical data.
Example
In the following figure, Host A sends the IP address 11.1.2.2 data to the Host B IP address
20.12.4.3.
•Source Address = IP address of host A is 11.1.2.2
•Destination Address = IP address of host B is 20.12.4.3
Limited Broadcast
In Limited Broadcast, the data is transmitted from a single source host to all the other hosts
residing in the same network.
Advantages of ISDN:
Disadvantages of ISDN:
Transport Layer
The transport layer is a 4th layer from the top.
The main role of the transport layer is to provide the communication services
directly to the application processes running on different hosts.
The transport layer provides a logical communication between application
processes running on different hosts. Although the application processes on
different hosts are not physically connected, application processes use the
logical communication provided by the transport layer to send the messages to
each other.
The transport layer protocols are implemented in the end systems but not in
the network routers.
A computer network provides more than one protocol to the network
applications. For example, TCP and UDP are two transport layer protocols that
provide a different set of services to the network layer.
All transport layer protocols provide multiplexing/demultiplexing service. It
also provides other services such as reliable data transfer, bandwidth
guarantees, and delay guarantees.
Each of the applications in the application layer has the ability to send a
message by using TCP or UDP. The application communicates by using either
of these two protocols. Both TCP and UDP will then communicate with the
internet protocol in the internet layer. The applications can read and write to the
transport layer. Therefore, we can say that communication is a two-way process
UDP is short for User Datagram Protocol. It is a basic protocol that allows for
nonsequential transmission. It is a protocol that does not require a connection to be
made before functioning. This protocol is used when speed and size are more critical
than dependability and security.
UDP is an end-to-end transport level protocol that adds transport-level addresses,
checksum error control, and length information to higher layer data.
A user datagram is a packet generated by the UDP protocol.
Format of User Datagram:
It specifies the address of the application process that sent the message. The source
port address is 16 bits long.
Object 4
TCP allocates a sequence number to each byte sent and waits for a valid
acknowledgement from the receiving TCP. If no ACK is received within a timeout
interval, the data is resent to the destination.
The sequence number is used by the receiving TCP to reassemble the segments if
they come out of order or to delete duplicate segments.
3. Flow Control:
TCP sends an acknowledgment back to the sender stating the number of bytes it may
accept without exceeding its internal buffer when it receives. The amount of bytes
delivered in ACK is the largest sequence number that it may receive without issue.
This process is also known as the window mechanism.
4. Multiplexing:
Multiplexing is the technique of taking data from several programmes and passing it
to various apps on various machines. The data is forwarded to the appropriate
application at the receiving end. This is referred to as demultiplexing. TCP uses
logical channels known as ports to send the message to the relevant application.
5. Logical Connections:
A logical connection is a mix of sockets, sequence numbers, and window widths. The
pair of sockets used by transmitting and receiving processes uniquely identifies each
connection.
6. Full Duplex:
TCP offers Full Duplex service, which means that data may travel in both ways at the
same time. To provide Full Duplex service, each TCP should have transmitting and
receiving buffers to allow segments to travel in both ways. TCP is a protocol that
manages connections. Assume that process A wishes to communicate and receive
data from process B.
To make the transport services reliable, TCP hosts must establish a connection-
oriented session with one another. Connection establishment is performed by using
the three-way handshake mechanism. A three-way handshake synchronizes both ends
of a network by enabling both sides to agree upon original sequence numbers.
This mechanism also provides that both sides are ready to transmit data and learn that
the other side is available to communicate. This is essential so that packets are not
shared or retransmitted during session establishment or after session termination.
Each host randomly selects a sequence number used to track bytes within the stream
it is sending and receiving.
The three-way handshake proceeds in the manner shown in the figure below −
The requesting end (Host A) sends an SYN segment determining the server's port
number that the client needs to connect to and its initial sequence number (x).
The server (Host B) acknowledges its own SYN segment, including the servers initial
sequence number (y). The server also responds to the client SYN by accepting the
sender's SYN plus one (X + 1).
An SYN consumes one sequence number. The client should acknowledge this SYN
from the server by accepting the server's SEQ plus one (SEQ = x + 1, ACK = y + 1).
This is how a TCP connection is settled.
Connection Termination Protocol (Connection Release)
While it creates three segments to establish a connection, it takes four segments to
terminate a connection. During a TCP connection is full-duplex (that is, data flows in
each direction independently of the other direction), each direction should be shut
down alone.
The termination procedure for each host is shown in the figure. The rule is that either
end can share a FIN when it has finished sending data.
When a TCP receives a FIN, it should notify the application that the other end has
terminated that data flow direction. The sending of a FIN is usually the result of the
application issuing a close.
The receipt of a FIN only means that there will be no more data flowing in that
direction. A TCP can send data after receiving a FIN. The end that first issues the
close (example, send the first FIN) executes the active close. The other end (that
1. TELNET:
Telnet stands for the TELetype NETwork. It helps in terminal emulation. It allows
Telnet clients to access the resources of the Telnet server. It is used for managing files
on the internet. It is used for the initial setup of devices like switches. The telnet
command is a command that uses the Telnet protocol to communicate with a remote
device or system. Port number of telnet is 23.
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. TFTP:
The Trivial File Transfer Protocol (TFTP) is the stripped-down, stock version of FTP,
but it’s the protocol of choice if you know exactly what you want and where to find
it. It’s a technology for transferring files between network devices and is a simplified
version of FTP. The Port number for TFTP is 69.
Command
tftp [ options... ] [host [port]] [-c command]
4. NFS:
It stands for a network file system. It allows remote hosts to mount file systems over
a network and interact with those file systems as though they are mounted locally.
This enables system administrators to consolidate resources onto centralized servers
on the network. The Port number for NFS is 2049.
Command
service nfs start
5. SMTP:
It stands for Simple Mail Transfer Protocol. It is a part of the TCP/IP protocol. Using
a process called “store and forward,” SMTP moves your email on and across
networks. It works closely with something called the Mail Transfer Agent (MTA) to
send your communication to the right computer and email inbox. The Port number for
SMTP is 25.
Command
MAIL FROM:<mail@abc.com?
6. LPD:
It stands for Line Printer Daemon. It is designed for printer sharing. It is the part that
receives and processes the request. A “daemon” is a server or agent. The Port number
for LPD is 515.
Command
lpd [ -d ] [ -l ] [ -D DebugOutputFile]
7. X window:
It defines a protocol for the writing of graphical user interface–based client/server
applications. The idea is to allow a program, called a client, to run on one computer.
It is primarily used in networks of interconnected mainframes. Port number for X
window starts from 6000 and increases by 1 for each server.
Command
Run xdm in runlevel 5
8. SNMP:
It stands for Simple Network Management Protocol. It gathers data by polling the
devices on the network from a management station at fixed or random intervals,
requiring them to disclose certain information. It is a way that servers can share
information about their current state, and also a channel through which an
administrate can modify pre-defined values. The Port number of SNMP is 161(TCP)
and 162(UDP).
Command
snmpget -mALL -v1 -cpublic snmp_agent_Ip_address sysName.0
9. DNS:
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
10. DHCP:
It stands for Dynamic Host Configuration Protocol (DHCP). It gives IP addresses to
hosts. There is a lot of information a DHCP server can provide to a host when the
host is registering for an IP address with the DHCP server. Port number for DHCP is
67, 68.
Command
clear ip dhcp binding {address | * }
DNS
Generic Domains
It defines the registered hosts according to their generic behavior.
Each node in a tree defines the domain name, which is an index to the DNS
database.
It uses three-character labels, and these labels describe the organization type
Country Domain
The format of country domain is same as a generic domain, but it uses two-character
country abbreviations (e.g., us for the United States) in place of three character
organizational abbreviations.
Inverse Domain
The inverse domain is used for mapping an address to a name. When the server has
received a request from the client, and the server contains the files of only authorized
clients. To determine whether the client is on the authorized list or not, it sends a
query to the DNS server and ask for mapping an address to the name.
Internet is a group of computer systems related from all around the world. The
Internet protocol suite is a framework defined through the Internet standards.
Methods are divided right into a layered set of protocols on this architecture. The
Internet gives a huge variety of statistics and communique offerings, which includes
forums, databases, email, and hypertext. It is made of the neighborhood to global
personal, public networks connected through plenty of digital, wireless, and
networking technologies. Working of the internet: The internet is a global computer
network that connects various devices and sends a lot of information and media. It
uses an Internet Protocol (IP) and Transport Control Protocol (TCP)-based packet
routing network. TCP and IP work together to ensure that data transmission across the
internet is consistent and dependable, regardless of the device or location. Data is
delivered across the internet in the form of messages and packets. A message is a
piece of data delivered over the internet, but before it is sent, it is broken down into
smaller pieces known as packets. Uses of the Internet:
ELECTRONIC MAIL
System Architecture:
From the user’s point of view, the web consists of a vast, worldwide connection of
documents or web pages. Each page may contain links to other pages anywhere in the
world. The pages can be retrieved and viewed by using browsers of which internet
explorer, Netscape Navigator, Google, Chrome, etc are the popular ones. The browser
fetches the page requested interprets the text and formatting commands on it, and
displays the page, properly formatted, on the screen.
The basic model of how the web works are shown in the figure below. Here the
browser is displaying a web page on the client machine. When the user clicks on a
line of text that is linked to a page on the abd.com server, the browser follows the
hyperlink by sending a message to the abd.com server asking it for the page.
Here the browser displaying a web page on the client machine when the user clicks
on a line of text that is linked to a page on abd.com, the browser follows the
hyperlink by sending a message to abd.com server asking for the page.
Working of WWW:
The World Wide Web is based on several different technologies: Web browsers,
Hypertext Markup Language (HTML) and Hypertext Transfer Protocol (HTTP).
A Web browser is used to access webpages. Web browsers can be defined as
programs which display text, data, pictures, animation and video on the Internet.
Hyperlinked resources on the World Wide Web can be accessed using software
interface provided by Web browsers. Initially Web browsers were used only for
surfing the Web but now they have become more universal. Web browsers can be
used for several tasks including conducting searches, mailing, transferring files, and
much more. Some of the commonly used browsers are Internet Explorer, Opera Mini,
Google Chrome.
Features of WWW:
•HyperText Information System
•Cross-Platform
•Distributed
•Open Standards and Open Source
•Uses Web Browsers to provide a single interface for many services
•Dynamic, Interactive and Evolving.
•“Web 2.0”
First of all, whenever we want to open any website then first we open web browser
after that we will type URL of that website (e.g., www.facebook.com ). This URL is
now sent to Domain Name Server (DNS). Then DNS first check records for this
URL in their database, then DNS will return IP address to web browser corresponding
to this URL. Now browser is able to sent request to actual server.
After server sends data to client, connection will be closed. If we want something else
from server we should have to re-establish connection between client and server.
History ::
Tim Berners Lee and his team at CERN gets credit for inventing original HTTP and
associated technologies.
1.HTTP version 0.9 –
This was first version of HTTP which was introduced in 1991.
2.HTTP version 1.0 –
In 1996, RFC 1945 (Request For Comments) was introduced in HTTP version 1.0.
3.HTTP version 1.1 –
In January 1997, RFC 2068 was introduced in HTTP version 1.1. Improvements
and updates to HTTP version 1.1 standard were released under RFC 2616 in June
1999.
4.HTTP version 2.0 –
The HTTP version 2.0 specification was published as RFC 7540 on May 14, 2015.
5.HTTP version 3.0 –
HTTP version 3.0 is based on previous RFC draft. It is renamed as HyperText
Transfer Protocol QUIC which is a transport layer network protocol developed by
Google.
If an organization has 1000 devices then to check all devices, one by one every day,
are working properly or not is a hectic task. To ease these up, Simple Network
Management Protocol (SNMP) is used.
•Composition –
The composition refer to process that creates messages and answers. For
composition any kind of text editor can be used.
•Transfer –
Transfer means sending procedure of mail i.e. from the sender to recipient.
•Reporting –
Reporting refers to confirmation for delivery of mail. It help user to check whether
their mail is delivered, lost or rejected.
•Displaying –
It refers to present mail in form that is understand by the user.
•Disposition –
This step concern with recipient that what will recipient do after receiving mail i.e
save mail, delete before reading or delete after reading.
WEB SERVICES
A web service is a set of open protocols and standards that allow data to be
exchanged between different applications or systems. Web services can be used by
software programs written in a variety of programming languages and running on a
variety of platforms to exchange data via computer networks such as the Internet in a
similar way to inter-process communication on a single computer.