Networking+Notes+ (1 3)
Networking+Notes+ (1 3)
Course Description:
Course Outcomes:
Student will be able to
CO1: Understand the basic concepts of Computer Network, and principle of layering
(Understand)
CO2: Apply the error detection and correction techniques used in data transmission
(Apply)
CO3: Apply IP addressing schemes and sub netting (Apply)
CO4: Understand the concept of routing protocols, Application layer protocols and
Network Security (Understand)
CO5: Apply the socket programming basics to create a simple chat application
(Apply)
Course Structure:
Course References:
Recommended Books:
Text Books:
1. https://docs.oracle.com.javase/tutorial/networkingindex.html
2. https://docs.oracle.com/javase/tutorial/networking/overview/
networking.html
Recommended Certifications:
Data refers to the raw facts that are collected while information refers to
processed data that enables us to take decisions.
Ex. When result of a particular test is declared it contains data of all students,
when you find the marks you have scored you have the information that lets
you know whether you have passed or failed.
The word data refers to any information which is presented in a form that is
agreed and accepted upon by is creators and users.
1. Delivery: The data should be delivered to the correct destination and correct
user.
2. Accuracy: The communication system should deliver the data accurately,
without introducing any errors. The data may get corrupted during transmission
affecting the accuracy of the delivered data.
3. Timeliness: Audio and Video data has to be delivered in a timely manner
without any delay; such a data delivery is called real time transmission of data.
4. Jitter: It is the variation in the packet arrival time. Uneven Jitter may affect the
timeliness of data being transmitted.
1.3.2 Components of Data Communication
1. Message
Message is the information to be communicated by the sender to the receiver.
2. Sender
The sender is any device that is capable of sending the data (message).
3. Receiver
The receiver is a device that the sender wants to communicate the data (message).
4. Transmission Medium
It is the path by which the message travels from sender to receiver.
It can be wired or wireless and many subtypes in both.
5. Protocol
It is an agreed upon set or rules used by the sender and receiver to
communicate data.
A protocol is a set of rules that governs data communication.
A Protocol is a necessity in data communications without which
the communicating entities are like two persons trying to talk
to each other in a different language without know the other language.
2. Numbers
Numbers include combination of digits from 0 to 9.
It is stored as a pattern of bits. Prevalent encoding system :
ASCII, Unicode
The pixels are represented in the form of bits. Depending upon the type of image
(black n white or color) each pixel would require different number of bits to
represent the value of a pixel.
The size of an image depends upon the number of pixels (also called resolution)
and the bit pattern used to indicate the value of each pixel.
Example: if an image is purely black and white (two color) each pixel can be
represented by a value either 0 or 1, so an image made up of 10 x 10 pixel
elements would require only 100 bits in memory to be stored.
On the other hand an image that includes gray may require 2 bits to represent
every pixel value (00 - black, 01 – dark gray, 10
– light gray, 11 –white). So the same 10 x 10 pixel image would now require
200 bits of memory to be stored.
4. Audio
Data can also be in the form of sound which can be recorded and
broadcasted. Example: What we hear on the radio is a source of data or
information.
Audio data is continuous, not discrete.
5. Video
Video refers to broadcasting of data in form of picture or movie
1.5.1 Simplex
In half duplex both the stations can transmit as well as receive but not at the
same time.
When one device is sending other can only receive and viceversa (as shown in
figure above.) Example: A walkie-talkie.
1.5.3 Full Duplex
In Full duplex mode, both stations can transmit and receive at the same time.
Example: mobile phones
Defina
tion:
A computer network can be defined as a collection of nodes. A node can be
any device capable of transmitting or receiving data.
The communicating nodes have to be connected by communication links.
1.7 PROTOCOL
When the sender sends a message it may consist of text, number, images,
etc. which are converted into bits and grouped into blocks to be transmitted
and often certain additional information called control information is also
added to help the receiver interpret the data.
For successful communication to occur, the sender and receiver must agree
upon certain rules called protocol.
C. Timing
It tells the sender about the readiness of the receiver to receive the data
It tells the sender at what rate the data should be sent to the receiver to
avoid overwhelming the receiver.
1. De facto Standard
o These are the standards that have been traditionally used and mean
by fact or by convention
o These standards are not approved by any organized body but are
adopted by widespread use.
o Examples of Forums
1. ATM Forum
2. MPLS Forum
3. Frame Relay Forum
Open Wire
Twisted Pair
Coaxial Cable
Optical Fibre
Microwave Transmission
Radio Transmission
Infrared Transmission
Types Of Guided media:
Twisted pair:
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.
o It is cheap.
o Installation of the unshielded twisted pair is easy.
o It can be used for high-speed LAN.
Disadvantage:
o The cost of the shielded twisted pair cable is not very high and not very
low.
o An installation of STP is easy.
o It has higher capacity as compared to unshielded twisted pair cable.
o It has a higher attenuation.
o It is shielded that provides the higher data transmission rate.
Disadvantages
UnGuided Transmission
o An unguided transmission transmits the electromagnetic waves without
using any physical medium. Therefore it is also known as wireless
transmission.
o In unguided media, air is the media through which the electromagnetic
energy can flow easily.
Radio waves
o Radio waves are the electromagnetic waves that are transmitted in all
the directions of free space.
o Radio waves are omnidirectional, i.e., the signals are propagated in all
the directions.
o The range in frequencies of radio waves is from 3Khz to 1 khz.
o 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.
o An example of the radio wave is FM radio.
Applications Of Radio waves:
Characteristics of Microwave:
Advantages Of Microwave:
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.
Infrared
o An infrared transmission is a wireless technology used for
communication over short ranges.
o The frequency of the infrared in the range from 300 GHz to 400 THz.
o 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:
o It supports high bandwidth, and hence the data rate will be very high.
o Infrared waves cannot penetrate the walls. Therefore, the infrared
communication in one room cannot be interrupted by the nearby
rooms.
o An infrared communication provides better security with minimum
interference.
o Infrared communication is unreliable outside the building because the
sun rays will interfere with the infrared waves.
1.2.1. Connection Oriented N/Ws Vs Connectionless N/Ws
Connection-Oriented Service
A connection-oriented service is a network service that was designed and
developed after the telephone system. A connection-oriented service is
used to create an end to end connection between the sender and the
receiver before transmitting the data over the same or different networks.
In connection-oriented service, packets are transmitted to the receiver in
the same order the sender has sent them. It uses a handshake method
that creates a connection between the user and sender for transmitting
the data over the network. Hence it is also known as a reliable network
service.
Suppose, a sender wants to send data to the receiver. Then, first, the
sender sends a request packet to a receiver in the form of an SYN packet.
After that, the receiver responds to the sender's request with an (SYN-
ACK) signal/packets. That represents the confirmation is received by the
receiver to start the communication between the sender and the receiver.
Now a sender can send the message or data to the receiver.
Similarly, a receiver can respond or send the data to the sender in the
form of packets. After successfully exchanging or transmitting data, a
sender can terminate the connection by sending a signal to the receiver.
In this way, we can say that it is a reliable network service.
What is a TCP?
TCP (Transmission Control Protocol) is a connection-oriented protocol that
allows communication between two or more computer devices by
establishing connections in the same or different networks. It is the most
important protocol that uses internet protocol to transfer the data from
one end to another. Hence, it is sometimes referred to as TCP/IP. It
ensures that the connection is established and maintained until the data
packet is transferring between the sender and receiver is complete.
Connectionless Service
A connection is similar to a postal system, in which each letter takes
along different route paths from the source to the destination address.
Connectionless service is used in the network system to transfer data
from one end to another end without creating any connection. So it does
not require establishing a connection before sending the data from the
sender to the receiver. It is not a reliable network service because it does
not guarantee the transfer of data packets to the receiver, and data
packets can be received in any order to the receiver. Therefore we can
say that the data packet does not follow a defined path. In
connectionless service, the transmitted data packet is not received by the
receiver due to network congestion, and the data may be lost.
For example, a sender can directly send any data to the receiver without
establishing any connection because it is a connectionless service. Data
sent by the sender will be in the packet or data streams containing the
receiver's address. In connectionless service, the data can be travelled
and received in any order. However, it does not guarantee to transfer of
the packets to the right destination.
What is UDP?
The UDP (User Datagram Protocol) is a connectionless protocol that allows
communication between two or more devices without establishing any
connection. In this protocol, a sender sends the data packets to the
receiver that holds the destination address. A UDP does not ensure to
deliver the data packets to the correct destination, and it does not
generate any acknowledgment about the sender's data. Similarly, it does
not acknowledge the receiver about the data. Hence, it is an unreliable
protocol.
Connection-Oriented vs Connectionless Service
3. Virtual path It creates a virtual path It does not create any virtual
between the sender and the connection or path between the
receiver. sender and the receiver.
5. Data All data packets are received in Not all data packets are
Packets the same order as those sent received in the same order as
Path by the sender. those sent by the sender.
ZigBee is a Personal Area Network task group with low rate task group 4. It is a technology of
home networking. ZigBee is a technological standard created for controlling and sensing the
network. As we know that ZigBee is the Personal Area Network of task group 4 so it is based
on IEEE 802.15.4 and is created by Zigbee Alliance.
ZigBee is a standard that addresses the need for very low-cost implementation of Low power
devices with Low data rates for short-range wireless communications.
Why another short-range communication standard??
Star Topology (ZigBee Smart Energy): Consists of a coordinator and several end
devices, end devices communicate only with the coordinator.
Mesh Topology (Self Healing Process): Mesh topology consists of one
coordinator, several routers, and end devices.
Tree Topology: In this topology, the network consists of a central node which is a
coordinator, several routers, and end devices. the function of the router is to
extend the network coverage.
Architecture of Zigbee:
Physical layer: The lowest two layers i.e the physical and the MAC (Medium
Access Control) Layer are defined by the IEEE 802.15.4 specifications. The
Physical layer is closest to the hardware and directly controls and communicates
with the Zigbee radio. The physical layer translates the data packets in the over-
the-air bits for transmission and vice-versa during the reception.
Medium Access Control layer (MAC layer): The layer is responsible for the
interface between the physical and network layer. The MAC layer is also
responsible for providing PAN ID and also network discovery through beacon
requests.
Network layer: This layer acts as an interface between the MAC layer and the
application layer. It is responsible for mesh networking.
Application layer: The application layer in the Zigbee stack is the highest
protocol layer and it consists of the application support sub-layer and Zigbee
device object. It contains manufacturer-defined applications.
Channel Access:
1. Contention Based Method (Carrier-Sense Multiple Access With Collision
Avoidance Mechanism)
2. Contention Free Method (Coordinator dedicates a specific time slot to each
device (Guaranteed Time Slot (GTS)))
Zigbee Applications:
1. Home Automation
2. Medical Data Collection
3. Industrial Control Systems
4. meter reading system
5. light control system
6. Commercial
7. Government Markets Worldwide
8. Home Networking
Multiple access schemes are used to allow many mobile users to share
simultaneously a finite amount of radio spectrum.
Narrowband Systems
Systems operating with channels substantially narrower than the
coherence bandwidth are called as Narrow band systems. Narrow band
TDMA allows users to use the same channel but allocates a unique time
slot to each user on the channel, thus separating a small number of users
in time on a single channel.
Narrowband Systems
Systems operating with channels substantially narrower than the
coherence bandwidth are called as Narrow band systems. Narrow band
TDMA allows users to use the same channel but allocates a unique time
slot to each user on the channel, thus separating a small number of users
in time on a single channel.
Wideband Systems
In wideband systems, the transmission bandwidth of a single channel is
much larger than the coherence bandwidth of the channel. Thus,
multipath fading doesn’t greatly affect the received signal within a
wideband channel, and frequency selective fades occur only in a small
fraction of the signal bandwidth.
TDMA shares a single carrier frequency with several users where each
users makes use of non-overlapping time slots.
Data transmission in TDMA is not continuous, but occurs in bursts. Hence
handsoff process is simpler.
TDMA uses different time slots for transmission and reception thus
duplexers are not required.
TDMA has an advantage that is possible to allocate different numbers of
time slots per frame to different users.
Bandwidth can be supplied on demand to different users by concatenating
or reassigning time slot based on priority.
Code Division Multiple Access (CDMA)
Code division multiple access technique is an example of multiple access
where several transmitters use a single channel to send information
simultaneously. Its features are as follows.
In CDMA every user uses the full available spectrum instead of getting
allotted by separate frequency.
CDMA is much recommended for voice and data communications.
While multiple codes occupy the same channel in CDMA, the users having
same code can communicate with each other.
CDMA offers more air-space capacity than TDMA.
The hands-off between base stations is very well handled by CDMA.
Space Division Multiple Access (SDMA)
Space division multiple access or spatial division multiple access is a
technique which is MIMO (multiple-input multiple-output) architecture and
used mostly in wireless and satellite communication. It has the following
features.
All users can communicate at the same time using the same channel.
SDMA is completely free from interference.
A single satellite can communicate with more satellites receivers of the
same frequency.
The directional spot-beam antennas are used and hence the base station
in SDMA, can track a moving user.
Controls the radiated energy for each user in space.
Spread Spectrum Multiple Access
Spread spectrum multiple access (SSMA) uses signals which have a
transmission bandwidth whose magnitude is greater than the minimum
required RF bandwidth.
There are two main types of spread spectrum multiple access techniques
−
Frequency hopped spread spectrum (FHSS)
Direct sequence spread spectrum (DSSS)
Frequency Hopped Spread Spectrum (FHSS)
This is a digital multiple access system in which the carrier frequencies of
the individual users are varied in a pseudo random fashion within a
wideband channel. The digital data is broken into uniform sized bursts
which is then transmitted on different carrier frequencies.
Direct Sequence Spread Spectrum (DSSS)
This is the most commonly used technology for CDMA. In DS-SS, the
message signal is multiplied by a Pseudo Random Noise Code. Each user
is given his own code word which is orthogonal to the codes of other users
and in order to detect the user, the receiver must know the code word
used by the transmitter.
The combinational sequences called as hybrid are also used as another
type of spread spectrum. Time hopping is also another type which is
rarely mentioned.
Since many users can share the same spread spectrum bandwidth without
interfering with one another, spread spectrum systems become bandwidth
efficient in a multiple user environment.
Computer networks that are not connected by cables are called wireless
networks. They generally use radio waves for communication between the
network nodes. They allow devices to be connected to the network while
roaming around within the network coverage.
Types of Wireless Networks
Wireless LANs − Connects two or more network devices using
wireless distribution techniques.
Wireless MANs − Connects two or more wireless LANs spreading
over a metropolitan area.
Wireless WANs − Connects large areas comprising LANs, MANs
and personal networks.
Advantages of Wireless Networks
It provides clutter-free desks due to the absence of wires and
cables.
It increases the mobility of network devices connected to the
system since the devices need not be connected to each other.
Accessing network devices from any location within the network
coverage or Wi-Fi hotspot becomes convenient since laying out
cables is not needed.
Installation and setup of wireless networks are easier.
New devices can be easily connected to the existing setup since
they needn’t be wired to the present equipment. Also, the
number of equipment that can be added or removed to the
system can vary considerably since they are not limited by the
cable capacity. This makes wireless networks very scalable.
Wireless networks require very limited or no wires. Thus, it
reduces the equipment and setup costs.
What is VoIP?
VoIP is a name for internet telephony, allowing you to use the internet to place and receive
calls. Instead of using your desk phone or your mobile phone to make calls, you can use an
application on your computer or an app on your phone to make calls. It’s a fairly well known
technology, especially when it comes to those looking to run a business, control costs, and
provide communication tools to a large team. The cost savings and rich feature set are
enticing to savvy business leaders.
iii. In general, every task or job can be done by dividing it into sub task or
layers. Consider the example of sending a letter where the sender is in
City A and receiver is in city B.
vi. At the sender site, the activities take place in the following descending
order:
a. Higher Layer: The sender writes the letter along with the sender and
receivers address and put it in an envelope and drop it in the
mailbox.
b. Middle Layer: The letter is picked up by the post man and delivered
to the post office
c. Lower Layer: The letters at the post office are sorted and are ready
to be transported through a carrier.
vii. During transition the letter may be carried by truck, plane or ship or a
combination of transport modes before it reaches the destination post
office.
viii. At the Receiver site, the activities take place in the following ascending
order:
a. Lower Layer: The carrier delivers the letter to the destination post
office
b. Middle Layer: After sorting, the letter is delivered to the receivers
mail box
c. Higher Layer: The receiver picks up the letter, opens the envelope
and reads it.
ix. Hierarchy of layers: The activities in the entire task are organized into
three layers. Each activity at the sender or receiver side occurs in a
particular order at the hierarchy.
x. The important and complex activities are organized into the Higher
Layer and the simpler ones into middle and lower layer.
The OSI model has 7 layers each with its own dedicated task.
At Device A, the message is sent from the top layer i.e Application Layer
A then all the layers till it reaches its physical layer and then it is
transmitted through the transmission medium.
The Data Link layer determines the next node where the message is
supposed to be forwarded and the network layer determines the final
recipient.
4.3.3 Communication & Interfaces
For communication to occur, each layer in the sending device adds its
own information to the message it receives from the layer just above it
and passes the whole package to the layer just below it. Each layer in
the receiving device removes the information added at the
corresponding layer and sends the obtained data to the layer above it.
Every Layer has its own dedicated function or services and is different
from the function of the other layers.
On every sending device, each layer calls upon the service offered by the
layer below it.
On every receiving device, each layer calls upon the service offered by
the layer above it.
II. On the sender side, the physical layer receives the data from Data Link
Layer and encodes it into signals to be transmitted onto the medium. On
the receiver side, the physical layer receives the signals from the
transmission medium decodes it back into data and sends it to the Data
Link Layer as shown in the figure below:
III. Interface
The Physical Layer defines the characteristics of interfaces between the
devices & transmission medium.
IV. Representation of bits
The physical layer is concerned with transmission of signals from one
device to another which involves converting data (1‘s & 0‘s) into
signals and vice versa. It is not concerned with the meaning or
interpretation of bits.
V. Data rate
The physical layer defines the data transmission rate i.e. number of bits
sent per second. It is the responsibility of the physical layer to maintain
the defined data rate.
II. On the sender side, the Data Link layer receives the data from
Network Layer and divides the stream of bits into fixed size
manageable units called as Frames and sends it to the physical
layer. On the receiver side, the data link layer receives the stream
of bits from the physical layer and regroups them into frames and
sends them to the Network layer. This process is called Framing.
It is shown in the figure below:
Fig: Data Link Layer: The process of Framing
b. The data link layer imposes flow control mechanism over the
sender and receiver to avoid overwhelming of the receiver.
V. Error control
a. The data link layer imposes error control mechanism to
identify lost or damaged frames, duplicate frames and then
retransmit them.
b. Error control information is present in the trailer of a frame.
VI. Access Control
a. The data link layer imposes access control mechanism to
determine which device has right to send data in an multipoint
connection scenario.
VII. Main Responsibility
i. The main responsibility of the data link layer is hop to hop
transmission of frames.
II. The network layer at the sending side accepts data from the transport
layer, divides it into packets, adds addressing information in the header
and passes it to the data link layer. At the receiving end the network
layer receives the frames sent by data link layer, converts them back into
packets, verifies the physical address (verifies if the receiver address
matches with its own address) and the send the packets to the transport
layer.
At every hop the network layer of the intermediate node check the IP
address in the header, if its own IP address does not match with the
IP address of the receiver found in the header, the intermediate node
concludes that it is not the final node but an intermediate node and
passes the packet to the data link layer where the data is forwarded
to the next node.
V. Routing
VI. The network layer divides data into units called packets of equal
size and bears a sequence number for rearranging on the receiving
end.
VI. The Network layer does not perform any flow control or error control
II. At the sending side, the transport layer receives data from the
session layer, divides it into units called segments and sends it to
the network layer. At the receiving side, the transport layer
receives packets from the network layer, converts and arranges
into proper sequence of segments and sends it to the session
layer.
Fig: Transport Layer
VI. Flow Control & Error control: the transport layer also carries
out flow control and error control functions; but unlike data link
layer these are end to end rather than node to node.
II. The presentation layer at sending side receives the data from the
application layer adds header which contains information related
to encryption and compression and sends it to the session layer. At
the receiving side, the presentation layer receives data from the
session layer decompresses and decrypts the data as required and
translates it back as per the encoding scheme used at the receiver.
Fig : Presentation Layer
III. Translation
The sending and receiving devices may run on different platforms
(hardware, software and operating system). Hence it is important that
they understand the messages that are used for communicating. Hence a
translation service may be required which is provided by the
Presentation layers
IV. Compression
Compression ensures faster data transfer. The data compressed at sender has to be
decompressed at the receiving end, both performed by the Presentation layer.
V. Encryption
It is the process of transforming the original message to change its
meaning before sending it. The reverse process called decryption has to
be performed at the receiving end to recover the original message from
the encrypted message.
4.3.5.7Application Layer
I. The application layer enables the user
to communicate its data to the receiver by providing certain
services. For ex. Email is sent using X.400 service.
Fig : Application Layer
III. X400 is services that provides basis for mail storage and
forwarding
V. Main Responsibility
Main Responsibility of Application layer is to provide access to
network resources.
TCP Characteristics
Here, are the essential characteristics of TCP IP protocol:
Application Layer
Transport Layer
Internet Layer
Network Interface
Application Layer
Application layer interacts with an application program, which is the highest
level of OSI model. The application layer is the OSI layer, which is closest to the
end-user. It means the OSI application layer allows users to interact with other
software application.
Transport Layer
Transport layer builds on the network layer in order to provide data transport
from a process on a source system machine to a process on a destination
system. It is hosted using single or multiple networks, and also maintains the
quality of service functions.
It determines how much data should be sent where and at what rate. This layer
builds on the message which are received from the application layer. It helps
ensure that data units are delivered error-free and in sequence.
Transport layer helps you to control the reliability of a link through flow control,
error control, and segmentation or de-segmentation.
Internet Layer
An internet layer is a second layer of TCP/IP layes of the TCP/IP model. It is also
known as a network layer. The main work of this layer is to send the packets
from any network, and any computer still they reach the destination
irrespective of the route they take.
The Internet layer offers the functional and procedural method for transferring
variable length data sequences from one node to another with the help of
various networks.
Message delivery at the network layer does not give any guaranteed to be
reliable network layer protocol.
1. Routing protocols
2. Multicast group management
3. Network-layer address assignment.
The Network Interface Layer
Network Interface Layer is this layer of the four-layer TCP/IP model. This layer is
also called a network access layer. It helps you to defines details of how data
should be sent using the network.
It also includes how bits should optically be signaled by hardware devices which
directly interfaces with a network medium, like coaxial, optical, coaxial, fiber, or
twisted-pair cables.
A network layer is a combination of the data line and defined in the article of OSI
reference model. This layer defines how the data should be sent physically
through the network. This layer is responsible for the transmission of the data
between two devices on the same network.
Here, are some important differences between the OSI and TCP/IP model:
OSI Model TCP/IP model
It is developed by ISO (International Standard It is developed by ARPANET (Advanced
Organization) Research Project Agency Network).
TCP/IP doesn’t have any clear
OSI model provides a clear distinction
distinguishing points between services,
between interfaces, services, and protocols.
interfaces, and protocols.
TCP refers to Transmission Control
OSI refers to Open Systems Interconnection.
Protocol.
OSI uses the network layer to define routing
TCP/IP uses only the Internet layer.
standards and protocols.
OSI follows a vertical approach. TCP/IP follows a horizontal approach.
OSI model use two separate layers physical
and data link to define the functionality of the TCP/IP uses only one layer (link).
bottom layers.
OSI layers have seven layers. TCP/IP has four layers.
OSI model, the transport layer is only A layer of the TCP/IP model is both
connection-oriented. connection-oriented and connectionless.
In TCP, physical and data link are both
In the OSI model, the data link layer and
combined as a single host-to-network
physical are separate layers.
layer.
Session and presentation layers are not a part There is no session and presentation layer
of the TCP model. in TCP model.
It is defined before the advent of the
It is defined after the advent of the Internet.
internet.
The minimum size of the OSI header is 5
Minimum header size is 20 bytes.
bytes.
TCP:
Transmission Control Protocol is an internet protocol suite which breaks up the
message into TCP Segments and reassembling them at the receiving side.
IP:
An Internet Protocol address that is also known as an IP address is a numerical
label. It is assigned to each device that is connected to a computer network
which uses the IP for communication. Its routing function allows
internetworking and essentially establishes the Internet. Combination of IP with
a TCP allows developing a virtual connection between a destination and a
source.
HTTP:
The Hypertext Transfer Protocol is a foundation of the World Wide Web. It is
used for transferring webpages and other such resources from the HTTP server
or web server to the web client or the HTTP client. Whenever you use a web
browser like Google Chrome or Firefox, you are using a web client. It helps HTTP
to transfer web pages that you request from the remote servers.
SMTP:
SMTP stands for Simple mail transfer protocol. This protocol supports the e-
mail is known as a simple mail transfer protocol. This protocol helps you to send
the data to another e-mail address.
SNMP:
SNMP stands for Simple Network Management Protocol. It is a framework which
is used for managing the devices on the internet by using the TCP/IP protocol.
DNS:
DNS stands for Domain Name System. An IP address that is used to identify the
connection of a host to the internet uniquely. However, users prefer to use
names instead of addresses for that DNS.
TELNET:
TELNET stands for Terminal Network. It establishes the connection between the
local and remote computer. It established connection in such a manner that you
can simulate your local system at the remote system.
FTP:
FTP stands for File Transfer Protocol. It is a mostly used standard protocol for
transmitting the files from one machine to another.
Data Link Layer is second layer of OSI Layered Model. This layer is one of the most
complicated layers and has complex functionalities and liabilities. Data link layer hides the
details of underlying hardware and represents itself to upper layer as the medium to
communicate.
Data link layer works between two hosts which are directly connected in some sense. This
direct connection could be point to point or broadcast. Systems on broadcast network are
said to be on same link. The work of data link layer tends to get more complex when it is
dealing with multiple hosts on single collision domain.
Data link layer is responsible for converting data stream to signals bit by bit and to send that
over the underlying hardware. At the receiving end, Data link layer picks up data from
hardware which are in the form of electrical signals, assembles them in a recognizable frame
format, and hands over to upper layer.
Data link layer has two sub-layers:
Logical Link Control: It deals with protocols, flow-control, and error control
Media Access Control: It deals with actual control of media
1 -Bit
Only 1 bit of a given data is changed
→from 1 to 0 or
→from 0 to 1(Figure 10.1a ).
2 Burst
→from 1 to 0 or
→from 0 to 1 (Figure 10.1b).
→data-rate and
→duration of noise.
3.1.
redundan
• The central concept in detecting/correcting errors is .
• Some extra
-bits along with the data have to be sent to detect/correct errors. These extra bits are
called redundant
-bits.
• The redundant
-bits are
→added by the sender and
→removed by the receiver.
• The presence of redundant
-bits allows the receiver to detect/correct errors.
3.1.3 Error Detection vs. Error Correction
• Error-correction is more difficult than error-detection.
1) Error Detection
Here, we are checking whether any error has occurred or not.
The answer is a simple YES or NO.
We are not interested in the number of corrupted-bits.
2) Error Correction
Here, we need to know
→ exact number of corrupted-bits and
→ location of bits in the message.
Two important factors to be considered:
1) Number of errors and
2) Message-size.
3-3
3.1.4 Coding
• Redundancy is achieved through various coding-schemes.
1) Sender adds redundant-bits to the data-bits. This process creates a relationship
between → redundant-bits and
→ data-bits.
2) Receiver checks the relationship between redundant-bits & data-bits to
detect/correct errors.
• Two important factors to be considered:
1) Ratio of redundant-bits to the data-bits and 2) Robustness of the process.
• Two broad categories of coding schemes: 1) Block-coding and 2) Convolution coding.
2) At Receiver
i) a) If the received code-word is the same as one of the valid code-
words, the code-word is accepted;
the corresponding data-word is extracted for use.
b) If the received code-word is invalid, the code-word is discarded.
ii) However, if the code-word is corrupted but the received code-
word still matches a valid
codeword, the error remains undetected.
• An error-detecting code can detect only the types of errors for which it is designed; other types
of errors may remain undetected.
In the physical layer, data transmission involves synchronised transmission of bits from the
source to the destination. The data link layer packs these bits into frames.
Data-link layer takes the packets from the Network Layer and encapsulates them into frames.
If the frame size becomes too large, then the packet may be divided into small sized frames.
Smaller sized frames makes flow control and error control more efficient.
Then, it sends each frame bit-by-bit on the hardware. At receiver’s end, data link layer picks
up signals from hardware and assembles them into frames.
Parts of a Frame
A frame has the following parts −
Frame Header − It contains the source and the destination addresses of the frame.
Payload field − It contains the message to be delivered.
Trailer − It contains the error detection and error correction bits.
Flag − It marks the beginning and end of the frame.
Types of Framing
Framing can be of two types, fixed sized framing and variable sized framing.
Fixed-sized Framing
Here the size of the frame is fixed and so the frame length acts as delimiter of the frame.
Consequently, it does not require additional boundary bits to identify the start and end of the
frame.
Example − ATM cells.
Variable – Sized Framing
Here, the size of each frame to be transmitted may be different. So additional mechanisms are
kept to mark the end of one frame and the beginning of the next frame.
It is used in local area networks.
Two ways to define frame delimiters in variable sized framing are −
Length Field − Here, a length field is used that determines the size of the frame. It is
used in Ethernet (IEEE 802.3).
End Delimiter − Here, a pattern is used as a delimiter to determine the size of frame.
It is used in Token Rings. If the pattern occurs in the message, then two approaches
are used to avoid the situation −
o Byte – Stuffing − A byte is stuffed in the message to differentiate from the
delimiter. This is also called character-oriented framing.
o Bit – Stuffing − A pattern of bits of arbitrary length is stuffed in the message
to differentiate from the delimiter. This is also called bit – oriented framing.
In more technical terms, HDLC is a bit-oriented, synchronous data link layer protocol created
by the International Organization for Standardization (ISO). The standard for HDLC
is ISO/IEC 13239:2002. ECI stands for the International Electrotechnical Commission, an
international electrical and electronic standards body that often works with the ISO.
The networking industry has used HDLC to derive several other standards used today, such
as frame relay protocols like the ISDN protocol stack known as Link Access Procedure
Balanced (LAPB). It is also the basis for the framing mechanism that utilizes Point-to-Point
Protocol (PPP) on synchronous lines used to connect multiple servers to a WAN (wide area
network) internet link, as well as Cisco HDLC framing techniques that add protocol fields to
the HDLC header.
In Normal Response Mode, a primary station -- usually at the mainframe computer -- sends
data to secondary stations that may be local or may be at remote locations on dedicated leased
lines in what is called a multidrop or multipoint network. (This is not the network we usually
think of; it's a nonpublic closed network. In this arrangement, communication is usually half-
duplex.)
Variations of HDLC are also used for the public networks that use the X.25 communications
protocol and for frame relay, a protocol used in both and WANs -- public and private.
In the X.25 version of HDLC, the data frame contains a packet. (An X.25 network is one in
which packets of data are moved to their destination along routes determined by network
conditions as perceived by routers and reassembled in the right order at the ultimate
destination.)
P2P Protocol :
Peer-to-peer networks are simple to set up and are often ideal for small businesses that have
fewer than 10 computers and that cannot afford a server-based solution. The disadvantages of
peer-to-peer networks are poor security and lack of centralized file storage and backup
facilities.
Peer-to-peer networks generally implement some form of virtual overlay network on top of
the physical network topology, where the nodes in the overlay form a subset of the nodes in
the physical network. Data is still exchanged directly over the underlying TCP/IP network,
but at the application layer peers are able to communicate with each other directly, via the
logical overlay links (each of which corresponds to a path through the underlying physical
network). Overlays are used for indexing and peer discovery and make the P2P system
independent from the physical network topology. Based on how the nodes are linked to each
other within the overlay network, and how resources are indexed and located, we can classify
networks as unstructured or structured (or as a hybrid between the two).
Unstructured networks
Unstructured peer-to-peer networks do not impose a particular structure on the overlay
network by design, but rather are formed by nodes that randomly form connections to each
other. (Gnutella, Gossip, and Kazaa are examples of unstructured P2P protocols).
Because there is no structure globally imposed upon them, unstructured networks are easy to
build and allow for localized optimizations to different regions of the overlay. Also, because
the role of all peers in the network is the same, unstructured networks are highly robust in the
face of high rates of “churn” – that is, when large numbers of peers are frequently joining and
leaving the network.
Structured networks
In structured peer-to-peer networks, the overlay is organized into a specific topology, and the
protocol ensures that any node can efficiently search the network for a file/resource, even if
the resource is extremely rare.
The most common type of structured P2P networks implements a distributed hash table
(DHT), in which a variant of consistent hashing is used to assign ownership of each file to a
particular peer. This enables peers to search for resources on the network using a hash table:
that is, (key, value) pairs are stored in the DHT, and any participating node can efficiently
retrieve the value associated with a given key.