Data Communication and Computer Net
Data Communication and Computer Net
vork
unit-1
Data Transmission concepts :- Data transmission is the process of
sending digital or analog data over a communication medium to one or more
computing, network, communication or electronic devices. It enables the
transfer and communication of devices in a point-to-point, point-to-multipoint
and multipoint-to-multipoint environment.
Data transmission is also known as digital transmission or digital communications.
Parallel transmission
Defination: Within a computing or communication device, the distances between
different subunits are too short. Thus, it is normal practice to transfer data between
subunits using a separate wire to carry each bit of data. There are multiple wires
connecting each sub-unit and data is exchanged using a parallel transfer mode. This
mode of operation results in minimal delays in transferring each word.
• In parallel transmission, all the bits of data are transmitted simultaneously on
separate communication lines.
• In order to transmit n bits, n wires or lines are used. Thus each bit has its own line.
• All n bits of one group are transmitted with each clock pulse from one device to
another i.e. multiple bits are sent with each clock pulse.
• Parallel transmission is used for short distance communication.
• As shown in the fig, eight separate wires are used to transmit 8 bit data from
sender to receiver.
Advantage of parallel transmission
It is speedy way of transmitting data as multiple bits are transmitted simultaneously
with a single clock pulse.
Serial Transmission
Defination: When transferring data between two physically separate devices,
especially if the separation is more than a few kilometers, for reasons of cost, it is
more economical to use a single pair of lines. Data is transmitted as a single bit at a
time using a fixed time interval for each bit. This mode of transmission is known
as bit-serial transmission.
• In serial transmission, the various bits of data are transmitted serially one after the
other.
• It requires only one communication line rather than n lines to transmit data from
sender to receiver.
• Thus all the bits of data are transmitted on single line in serial fashion.
• In serial transmission, only single bit is sent with each clock pulse.
• As shown in fig., suppose an 8-bit data 11001010 is to be sent from source to
destination. Then least significant bit (LSB) i,e. 0 will be transmitted first followed by
other bits.
Asynchronous Transmission
• Asynchronous transmission sends only one character at a time where a character
is either a letter of the alphabet or number or control character i.e. it sends one byte
of data at a time.
• Bit synchronization between two devices is made possible using start bit and stop
bit.
• Start bit indicates the beginning of data i.e. alerts the receiver to the arrival of new
group of bits. A start bit usually 0 is added to the beginning of each byte.
• Stop bit indicates the end of data i.e. to let the receiver know that byte is finished,
one or more additional bits are appended to the end of the byte. These bits, usually
1s are called stop bits.
• Addition of start and stop increase the number of data bits. Hence more bandwidth
is consumed in asynchronous transmission.
• There is idle time between the transmissions of different data bytes. This idle time
is also known as Gap
Synchronous Transmission
• Synchronous transmission does not use start and stop bits.
• In this method bit stream is combined into longer frames that may contain multiple
bytes.
• There is no gap between the various bytes in the data stream.
• In the absence of start & stop bits, bit synchronization is established between
sender & receiver by 'timing' the transmission of each bit.
• Since the various bytes are placed on the link without any gap, it is the
responsibility of receiver to separate the bit stream into bytes so as to reconstruct the
original information.
Transmission Impairment
In the data communication system, analog and digital signals go through the
transmission medium. Transmission media are not ideal. There are some
imperfections in transmission mediums. So, the signals sent through the
transmission medium are also not perfect. This imperfection cause signal
impairment.
It means that signals that are transmitted at the beginning of the medium are not the
same as the signals that are received at the end of the medium that is what is sent is
not what is received. These impairments tend to deteriorate the quality of analog and
digital signals.
Causes of impairment
1. Attenuation
2. Distortion
3. Noise
1) Attenuation
Here attenuation Means loss of energy that is the weaker signal. Whenever a signal
transmitted through a medium it loses its energy, so that it can overcome by the
resistance of the medium.
That is why a wire carrying electrical signals gets warm, if not hot, after a
while. Some of the electrical energy is converted to heat in the signal.
Amplifiers are used to amplify the signals to compensate for this loss.
This figure shows the effect of attenuation and amplification:
A signal has lost or gained its strength, for this purpose engineers use the
concept of decibel(dB).
Decibel is used to measure the relative strengths of two signals or a signal at
two different points.
If a signal is attenuated then dB is negative and if a signal is amplified so the
db is positive.
Attenuation(dB) = 10log10(P2/P1)
where P2 and P1 are the power of a signal at points1 and 2.
2) Distortion
If a signal changes its form or shape, it is referred to as distortion. Signals made up
of different frequencies are composite signals. Distortion occurs in these composite
signals.
3) Noise
Noise is another problem. There are some random or unwanted signals mix up with
the original signal is called noise. Noises can corrupt the signals in many ways along
with the distortion introduced by the transmission media.
Different types of noises are:
a. Thermal noise
b. Intermodulation noise
c. Crosstalk
d. Impulse noise
a) Thermal noise
The thermal noise is random motion of electrons in a conductor that creates an extra
signal not originally sent by the transmitter.
It is also known as white noise because it is distributed across the entire spectrum
(as the frequency encompass over a broad range of frequencies).
b) Intermodulation noise
More than one signal share a single transmission channel, intermodulation noise is
generated.
For instance, two signals S1 and S2 will generate signals of frequencies (S1 + S2)
and (s1 - S2), which may interfere with the signals of the same frequencies sent by
the sender. due to If nonlinearity present in any part of the communication system,
intermodulation noise is introduced.
c) Cross talk
Cross talk is an effect a wire on the another. One wire acts as a sending antenna
and the transmission medium acts as the receiving antenna.
Just like in telephone system, it is a common experience to hear conversation of
other people in the background. This is known as cross talk.
d) Impulse noise
Impulse noise is irregular pulses or spikes( a signal with high energy in a very short
period) generated by phenomena like that comes from power lines, lightning, spark
due to loose contact in electric circuits and so on.
Switching
Switching is the most valuable asset of computer networking. Every time in computer
network you access the internet or another computer network outside your immediate
location, or your messages are sent through a maze of transmission media and connection
devices. The mechanism for exchange of information between different computer networks
and network segments is called switching in Networking. On the other words we can say that
any type signal or data element directing or Switching toward a particular hardware address
or hardware pieces.
Hardware devices that can be used for switching or transfering data from one
location to another that can use multiple layers of the Open Systems Interconnection
(OSI) model. Hardware devices that can used for switching data in single location
like collage lab is Hardware switch or hub but if you want to transfer data between to
different location or remote location then we can use router or gatways.
There are mainly three typical Switching Techniques available for digital
traffic:
1. Circuit Switching
2. Message Switching
3. Packet Switching
1) Circuit Switching
Circuit Switching is a technique that directly connects the sender
and the receiver in an unbroken path.
For example take telephone switching equipment establishes a
path that connects the caller’s and reciever’s telephone by making
a physical connection.
Routing decisions in circuit must be made when the circuit is first
established, but there are no decisions made after that time.
A complete end to end path must exist before communication can
take place.
Once the connection has been initiated and completed, the
destination device must acknowledge that it is ready and able to
carry on a transfer.
Advantages:
Disadvantages:
Advantages:
Disadvantages:
Advantages:
Disadvantages:
Packet switching protocols are typically more complex.
If packet gets lost sender needs to resend the data.
Modulation
Modulation is the process of converting data into radio waves by adding information
to an electronic or optical carrier signal. A carrier signal is one with a steady
waveform -- constant height, or amplitude, and frequency. Information can be added
to the carrier by varying its amplitude, frequency, phase, polarization -- for optical
signals -- and even quantum-level phenomena like spin.
Types of modulation
There are many common modulation methods, including the following -- a very
incomplete list:
Amplitude modulation (AM), in which the height -- i.e., the strength or intensity
-- of the signal carrier is varied to represent the data being added to the signal.
Frequency modulation (FM), in which the frequency of the carrier waveform is
varied to reflect the frequency of the data.
Phase modulation (PM), in which the phase of the carrier waveform is varied to
reflect changes in the frequency of the data. In PM, the frequency is unchanged
while the phase is changed relative to the base carrier frequency. It is similar to
FM.
Polarization modulation, in which the angle of rotation of an optical carrier
signal is varied to reflect transmitted data.
What is a Multiplexing?
Muxing (or) multiplexing can be defined as; it is a way of transmitting various signals
over a media or single line. A common kind of multiplexing merges a number of low-
speed signals to send over an only high-speed link, or it is used to transmit a
medium as well as its link with the number of devices. It provides both privacy &
Efficiency. The entire process can be done using a device namely MUX or
multiplexer, and the main function of this device is to unite n-input lines for
generating a single output line. Thus MUX has many inputs & single output. A device
is called DEMUX or demultiplexer is used at the receiving end which divides the
signal into its component signals. So It has single input and number of outputs.
Types of Multiplexing Techniques
Frequency Division Multiplexing (FDM)
Wavelength Division Multiplexing (WDM)
Time Division Multiplexing (TDM)
Frequency
Division Multiplexing
In FDM, signals are produced by transmitting various device modulated carrier
frequencies, and then these are united into a solo signal which can be moved by the
connection. To hold the adapted signal, the carrier frequencies are divided by
sufficient bandwidth, & these ranges of bandwidths are the channels through the
different traveling signals. These can be divided by bandwidth which is not used. The
best examples of the FDM comprise signal transmission in TV and radio.
The main intention of WDM is to utilize the high data rate capacity of the FOC (fiber
optic cable). The high data rate of this FOC cable is superior to the data rate of the
metallic transmission cable. Theoretically, the WDM is similar to the FDM, apart from
the data transmission through the FOC in which the multiplexing & de-multiplexing
occupies optical signals. Please refer the link to know more about Wavelength
Division Multiplexing (WDM) Working and Applications
3). Time Division Multiplexing (TDM)
The Time division multiplexing (or) TDM is one kind of method for transmitting a
signal over a channel of particular communication with separating the time edge into
slots. Like single slot is used for each message signal.
TDM is mainly useful for analog and digital signals, in which several channels with
low speed are multiplexed into high-speed channels used for transmission.
Depending on the time, every low-speed channel will be assigned to an exact
position, wherever it works in the mode of synchronized. Both the ends of MUX and
DEMUX are synchronized timely & at the same time switch toward the next channel.
Network Cables
Network cables are the transmission media to transfer data from one device to
another. A commonly used network cable is category 5 cable with RJ – 45
connector, as shown in the image below:
Routers
A router is a connecting device that transfers data packets between different
computer networks. Typically, they are used to connect a PC or an organization’s
LAN to a broadband internet connection. They contain RJ-45 ports so that
computers and other devices can connect with them using network cables.
Gateways
A gateway connects entirely different networks that work upon different protocols. It
is the entry and the exit point of a network and controls access to other networks.
Wide area network provides long distance transmission of data. The size of
the WAN is larger than LAN and MAN. A WAN can cover country, continent or
even a whole world. Internet connection is an example of WAN. Other
examples of WAN are mobile broadband connections such as 3G, 4G etc.
Wireless networks
wireless network enables people to communicate and access applications and
information without wires. This provides freedom of movement and the ability to
extend applications to different parts of a building, city, or nearly anywhere in the
world. Wireless networks allow people to interact with e-mail or browse the Internet
from a location that they prefer.
Many types of wireless communication systems exist, but a distinguishing attribute of
a wireless network is that communication takes place between computer devices.
These devices include personal digital assistants (PDAs), laptops, personal
computers (PCs), servers, and printers. Computer devices have processors,
memory, and a means of interfacing with a particular type of network. Traditional cell
phones don't fall within the definition of a computer device; however, newer phones
and even audio headsets are beginning to incorporate computing power and network
adapters. Eventually, most electronics will offer wireless network connections.
OSI Model
o OSI stands for Open System Interconnection is a reference model that
describes how information from a software application in one computer moves
through a physical medium to the software application in another computer.
o OSI consists of seven layers, and each layer performs a particular network
function.
o OSI model was developed by the International Organization for
Standardization (ISO) in 1984, and it is now considered as an architectural
model for the inter-computer communications.
o OSI model divides the whole task into seven smaller and manageable tasks.
Each layer is assigned a particular task.
o Each layer is self-contained, so that task assigned to each layer can be
performed independently.
Application (Layer 7)
OSI Model, Layer 7, supports application and end-user processes. Communication
partners are identified, quality of service is identified, user authentication and privacy
are considered, and any constraints on data syntax are identified. Everything at this
layer is application-specific. This layer provides application services for file
transfers, e-mail, and other network software services. Telnet and FTP are
applications that exist entirely in the application level. Tiered application
architectures are part of this layer.
Layer 7 Application examples include WWW browsers, NFS, SNMP, Telnet,
HTTP, FTP
Presentation (Layer 6)
This layer provides independence from differences in data representation
(e.g., encryption) by translating from application to network format, and vice versa.
The presentation layer works to transform data into the form that the application
layer can accept. This layer formats and encrypts data to be sent across a network,
providing freedom from compatibility problems. It is sometimes called the syntax
layer.
Layer 6 Presentation examples include encryption, ASCII, EBCDIC, TIFF,
GIF, PICT, JPEG, MPEG, MIDI.
Session (Layer 5)
This layer establishes, manages and terminates connections between applications.
The session layer sets up, coordinates, and terminates conversations, exchanges,
and dialogues between the applications at each end. It deals with session and
connection coordination.
Layer 5 Session examples include NFS, NetBios names, RPC, SQL.
Transport (Layer 4)
OSI Model, Layer 4, provides transparent transfer of data between end systems,
or hosts, and is responsible for end-to-end error recovery and flow control. It ensures
complete data transfer.
Layer 4 Transport examples include SPX, TCP, UDP.
Network (Layer 3)
Layer 3 provides switching and routing technologies, creating logical paths, known
as virtual circuits, for transmitting data from node to node. Routing and forwarding
are functions of this layer, as well as addressing, internetworking, error
handling, congestion control and packet sequencing.
Layer 3 Network examples include AppleTalk DDP, IP, IPX.
Physical (Layer 1)
OSI Model, Layer 1 conveys the bit stream - electrical impulse, light or radio
signal — through the network at the electrical and mechanical level. It provides
the hardware means of sending and receiving data on a carrier, including defining
cables, cards and physical aspects. Fast Ethernet, RS232,
and ATM are protocols with physical layer components.
Layer 1 Physical examples include Ethernet, FDDI, B8ZS, V.35, V.24, RJ45
What is TCP/IP Model?
TCP/IP helps you to determine how a specific computer should be connected to the
internet and how data should be transmitted between them. It helps you to create a
virtual network when multiple computer networks are connected together.
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.
Example of the application layer is an application such as file transfer, email, remote
login, etc.
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.
It divides the message received from the session layer into segments and
numbers them to make a sequence.
Transport layer makes sure that the message is delivered to the correct
process on the destination machine.
It also makes sure that the entire message arrives without any error else it
should be retransmitted.
Internet Layer
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.
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.
OSI model provides a clear distinction TCP/IP doesn't have any clear
between interfaces, services, and protocols. distinguishing points between services,
interfaces, and protocols.
OSI uses the network layer to define routing TCP/IP uses only the Internet layer.
standards and protocols.
OSI model use two separate layers physical TCP/IP uses only one layer (link).
and data link to define the functionality of
the bottom layers.
OSI model, the transport layer is only A layer of the TCP/IP model is both
connection-oriented. connection-oriented and connectionless.
In the OSI model, the data link layer and In TCP, physical and data link are both
physical are separate layers. combined as a single host-to-network layer.
Session and presentation layers are not a There is no session and presentation layer
part of the TCP model. in TCP model.
It is defined after the advent of the Internet. It is defined before the advent of the
internet.
The minimum size of the OSI header is 5 Minimum header size is 20 bytes.
bytes.
Transmission Media
Transmission media is a pathway that carries the information from sender to
receiver. We use different types of cables or waves to transmit data. Data is
transmitted normally through electrical or electromagnetic signals.
The shielded twisted pair cable is widely used in high-speed networks. The major
difference between UTP and shielded twisted pair is that STP makes use of a
metallic shield to wrap the wires. This metallic shield prevents interference to a better
extent than UTP. These STP cables come with numbering; the higher the
numbering, the better the interference prevention. As an example: most computer
networks must go with CAT 3 or CAT 5, and nothing less than this.
2. Coaxial Cables
The coaxial cables have a central copper conductor, surrounded by an insulating
layer, a conducting shield, and the outermost plastic sheath. Thus, there are three
insulation layers for the inner copper cable. There are two basic modes of data
transmission in coaxial cables: baseband mode that has dedicated bandwidth, and
broadband mode that has distributed cable bandwidth.
Cable TV and analog televisions mainly use coaxial cables. Coaxial cables have
better resistance to cross talk than twisted pair cables. The coaxial cables are used
for long distance communication. The most widely used types of coaxial cables are
RG-59 and RG-6 (RG stands for 'radio guide'). RG-59 has lesser shielding and is
suitable for short cable lengths and cable TV connections.
RG-6 has better insulation than RG-59 and is used for satellite TV and digital signal
transmissions for better strength and longer distances.
Coaxial Cable
There are many advantages to coaxial cables, including the following:
High bandwidth
Easy and cheap installation
Better immunity from noise
Better scaling
However, there are also a number of disadvantages to coaxial cables, which include
the following:
3. Optical Fibers
Optical fibers use light waves for transmission. Crosstalk, EMI, and attenuation aren't
issues with optical fibers. These cables are well-suited for voice, data, and video
transmissions. Optical fibers are the most secure of all the cable media. Installation
and maintenance are difficult and costly. Fiber optic cables have greater
transmission speed, high bandwidth, and the signal can travel longer distances when
compared to coaxial and twisted pair cables. Though the cost of optical fiber cable is
less compared to co-axial and twisted pair cables, the additional optical components
needed for installation make fiber optic the costliest of all the cables.
There are two modes of operation for optical fibers. First there's single-mode fiber,
which uses a single beam of light and allows communication over great distances
with better transfer speed. Then there is multimode fiber, which uses multiple light
beams inside a single fiber cable, has a reduced length and travel speed, and has a
larger bandwidth, but signal strength is weakened.
Now let's take a closer look at unguided transmission media, or as it's most
commonly known, wireless.
wireless transmission
There are 3 major types of Unguided Media:
(i) Radiowaves –
These are easy to generate and can penetrate through buildings. The sending
and receiving antennas need not be aligned. Frequency Range:3KHz – 1GHz.
AM and FM radios and cordless phones use Radiowaves for transmission.
Further Categorized as (i) Terrestrial and (ii) Satellite.
(ii) Microwaves –
It is a line of sight transmission i.e. the sending and receiving antennas need to
be properly aligned with each other. The distance covered by the signal is directly
proportional to the height of the antenna. Frequency Range:1GHz – 300GHz.
These are majorly used for mobile phone communication and television
distribution..
(iii) Infrared –
Infrared waves are used for very short distance communication. They cannot
penetrate through obstacles. This prevents interference between systems.
Frequency Range:300GHz – 400THz. It is used in TV remotes, wireless mouse,
keyboard, printer, etc.
Among the types of several interfaces present, some of them contains channels
such as the B-Channels or Bearer Channels that are used to transmit voice and
data simultaneously; the D- Channels or Delta Channels that are used for signaling
purpose to set up communication.
The ISDN has several kinds of access interfaces such as −
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.
Working Principle
In these protocols, the sender has a buffer called the sending window and the
receiver has buffer called the receiving window.
The size of the sending window determines the sequence number of the outbound
frames. If the sequence number of the frames is an n-bit field, then the range of
sequence numbers that can be assigned is 0 to 2 𝑛−1. Consequently, the size of the
sending window is 2𝑛−1. Thus in order to accommodate a sending window size of
2𝑛−1, a n-bit sequence number is chosen.
The sequence numbers are numbered as modulo-n. For example, if the sending
window size is 4, then the sequence numbers will be 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, and
so on. The number of bits in the sequence number is 2 to generate the binary
sequence 00, 01, 10, 11.
The size of the receiving window is the maximum number of frames that the receiver
can accept at a time. It determines the maximum number of frames that the sender
can send before receiving acknowledgment.
Example
Suppose that we have sender window and receiver window each of size 4. So the
sequence numbering of both the windows will be 0,1,2,3,0,1,2 and so on. The
following diagram shows the positions of the windows after sending the frames and
receiving acknowledgments.
Types of Sliding Window Protocols
The Sliding Window ARQ (Automatic Repeat reQuest) protocols are of two
categories −
Go – Back – N ARQ
Go – Back – N ARQ provides for sending multiple frames before receiving the
acknowledgment for the first frame. It uses the concept of sliding window, and so is also
called sliding window protocol. The frames are sequentially numbered and a finite
number of frames are sent. If the acknowledgment of a frame is not received within the
time period, all frames starting from that frame are retransmitted.
Selective Repeat ARQ
This protocol also provides for sending multiple frames before receiving the
acknowledgment for the first frame. However, here only the erroneous or lost frames are
retransmitted, while the good frames are received and buffered.
MAC Addresses
MAC address or media access control address is a unique identifier allotted to a
network interface controller (NIC) of a device. It is used as a network address for
data transmission within a network segment like Ethernet, Wi-Fi, and Bluetooth.
MAC address is assigned to a network adapter at the time of manufacturing. It is
hardwired or hard-coded in the network interface card (NIC). A MAC address
comprises of six groups of two hexadecimal digits, separated by hyphens, colons, or
no separators. An example of a MAC address is 00:0A:89:5B:F0:11.
channel allocation
When there are more than one user who desire to access a shared network channel,
an algorithm is deployed for channel allocation among the competing users. The
network channel may be a single cable or optical fiber connecting multiple nodes, or
a portion of the wireless spectrum. Channel allocation algorithms allocate the wired
channels and bandwidths to the users, who may be base stations, access points or
terminal equipment.
MAC protocols
If there is a dedicated link between the sender and the receiver then data link control
layer is sufficient, however if there is no dedicated link present then multiple stations
can access the channel simultaneously. Hence multiple access protocols are
required to decrease collision and avoid crosstalk. For example, in a classroom full
of students, when a teacher asks a question and all the students (or stations) start
answering simultaneously (send data at same time) then a lot of chaos is
created( data overlap or data lost) then it is the job of the teacher (multiple access
protocols) to manage the students and make them answer one at a time.
Thus, protocols are required for sharing data on non dedicated channels. Multiple
access protocols can be subdivided further as –
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
(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.
Binary Countdown
This protocol overcomes the overhead of 1 bit per station of the bit – map protocol.
Here, binary addresses of equal lengths are assigned to each station. For example,
if there are 6 stations, they may be assigned the binary addresses 001, 010, 011,
100, 101 and 110. All stations wanting to communicate broadcast their addresses.
The station with higher address gets the higher priority for transmitting.
Limited-Contention Protocols
In computer networks, when more than one station tries to transmit simultaneously
via a shared channel, the transmitted data is garbled, an event called collision. In
collision based protocols like ALOHA, all stations are permitted to transmit a frame
without trying to detect whether the transmission channel is idle or busy. In slotted
ALOHA, the shared channel is divided into a number of discrete time intervals called
slots. Any station having a frame can start transmitting at the beginning of a slot.
Since, this works very good under light loads, limited contention protocols behave
like slotted ALOHA under low loads.
However, with the increase in loads, there occurs exponential growth in number of
collisions and so the performance of slotted ALOHA degrades rapidly. So, under
high loads, collision free protocols like bitmap protocols work best. In collision free
protocols, channel access is resolved in the contention period and so the possibilities
of collisions are eliminated. In bit map protocol, the contention period is divided into
N slots, where N is the total number of stations sharing the channel. If a station has a
frame to send, it sets the corresponding bit in the slot. So, before transmission, each
station knows whether the other stations want to transmit. Collisions are avoided by
mutual agreement among the contending stations on who gets the channel. Limited
contention protocols behave like slotted ALOHA under low loads.
Working Principle
Limited contention protocols divide the contending stations into groups, which may or
not be disjoint. At slot 0, only stations in group 0 can compete for channel access. At
slot 1, only stations in group 1 can compete for channel access and so on. In this
process, if a station successfully acquires the channel, then it transmits its data
frame. If there is a collision or there are no stations competing for a given slot in a
group, the stations of the next group can compete for the slot.
By dynamically changing the number of groups and the number of stations allotted in
a group according to the network load, the protocol changes from slotted ALOHA
under low loads to bit map protocol under high loads. Under low loads, only one
group is there containing all stations, which is the case of slotted ALOHA. As the
load increases, more groups are added and the size of each group is reduced. When
the load is very high, each group has just one station, i.e. only one station can
compete at a slot, which is the case of bit map protocol.
The performance of limited contention protocol is highly dependent upon the
algorithm to dynamically adjust the group configurations to the changes in network
environment.
Example − An example of limited contention protocol is Adaptive Tree Walk
Protocol.
IEEE 802.4 Token passing bus access method and Physical layer specifications
IEEE 802.5 Token Ring access method and Physical layer specifications
Network layer comes up with certain design issues and they can be described as
below:
H1 has a direct connection with carrier router ‘A’, while H2 is connected to carrier
router ‘F’ on a LAN connection.
One of the carrier router ‘F’, is pointed outside the carrier’s equipment as it does
not come under the carrier, whereas considered as protocols, software, and
construction.
This switching network performs as Transmission of data happens when the host
(H1) with a packet transfers it to the nearby router through LAN (or) point-to-point
connection to the carrier. The carrier stores the packet until it completely arrives
thus confirms the checksum.
Then after, the packet is transmitted over the path until H2 is reached.
So, we shall move with the same query and find out the services offered.
Services offered by the network layer are outlined considering few objectives. Those
are:
When the message size that has to be transmitted is 4 times the size of the packet,
then the network layer divides into 4 packets and then transmits each packet to
router ‘A’ through a few protocols. Each router is provided with a routing table where
it decides the destination points.
In the above figure, it is clear that packets from ‘A’ need to be transmitted either to B
or C even when the destination is ‘F’. The routing table of ‘A’ is clearly outlined
above.
Whereas in the case of packet 4, the packet from ‘A’ is routed to ‘B’, even the
destination node is ‘F’. Packet ‘A’ chooses to transmit packet 4 through a different
path than the initial three paths. This might happen because of traffic congestion
along the path ACE. So, the
At the time when the connection is released, the virtual subnet also gets dismissed.
In this service, every packet carries its own identifier that states the exact address of
the virtual circuit. The below diagram shows the routing algorithm in the virtual
subnet.
Routing Algorithms
The routing algorithms are as follows:
Flooding
Flooding is simplest method packet forwarding. When a packet is received, the
routers send it to all the interfaces except the one on which it was received. This
creates too much burden on the network and lots of duplicate packets wandering in
the network.
Time to Live (TTL) can be used to avoid infinite looping of packets. There exists
another approach for flooding, which is called Selective Flooding to reduce the
overhead on the network. In this method, the router does not flood out on all the
interfaces, but selective ones.
Shortest Path
Routing decision in networks, are mostly taken on the basis of cost between source
and destination. Hop count plays major role here. Shortest path is a technique
which uses various algorithms to decide a path with minimum number of hops.
Common shortest path algorithms are:
Dijkstra's algorithm
Bellman Ford algorithm
Floyd Warshall algorithm
Broadcast routing
By default, the broadcast packets are not routed and forwarded by the routers on
any network. Routers create broadcast domains. But it can be configured to forward
broadcasts in some special cases. A broadcast message is destined to all network
devices.
Broadcast routing can be done in two ways (algorithm):
A router creates a data packet and then sends it to each host one by one. In
this case, the router creates multiple copies of single data packet with
different destination addresses. All packets are sent as unicast but because
they are sent to all, it simulates as if router is broadcasting.
This method consumes lots of bandwidth and router must destination
address of each node.
Secondly, when router receives a packet that is to be broadcasted, it simply
floods those packets out of all interfaces. All routers are configured in the
same way.
This method is easy on router's CPU but may cause the problem of duplicate
packets received from peer routers.
Reverse path forwarding is a technique, in which router knows in advance
about its predecessor from where it should receive broadcast. This technique
is used to detect and discard duplicates.
Multicast Routing
Multicast routing is special case of broadcast routing with significance difference
and challenges. In broadcast routing, packets are sent to all nodes even if they do
not want it. But in Multicast routing, the data is sent to only nodes which wants to
receive the packets.
The router must know that there are nodes, which wish to receive multicast packets
(or stream) then only it should forward. Multicast routing works spanning tree
protocol to avoid looping.
Multicast routing also uses reverse path Forwarding technique, to detect and
discard duplicates and loops.
The algorithm works similarly to the way an actual leaky bucket holds water: The
leaky bucket takes data and collects it up to a maximum capacity. Data in the bucket
is only released from the bucket at a set rate and size of packet. When the bucket
runs out of data, the leaking stops. If incoming data would overfill the bucket, then
the packet is considered to be non-conformant and is not added to the bucket. Data
is added to the bucket as space becomes available for conforming packets.
The leaky bucket algorithm can also detect both gradually increasing and dramatic
memory error increases by comparing how the average and peak data rates exceed
set acceptable background amounts.
2.Token Bucket
The leaky bucket algorithm enforces output pattern at the average rate, no matter how bursty the
traffic is. So in order to deal with the bursty traffic we need a flexible algorithm so that the data is
not lost. One such algorithm is token bucket algorithm.
What is Internetworking
Internetworking started as a way to connect disparate types
of computer networking technology. Computer network term is used to describe two
or more computers that are linked to each other. When two or more computer LANs
or WANs or computer network segments are connected using devices such as
a router and configure by logical addressing scheme with a protocol such as IP, then
it is called as computer internetworking.
Internetworking is a term used by Cisco. Any interconnection among or between
public, private, commercial, industrial, or governmental computer networks may also
be defined as an internetwork or "Internetworking".
In modern practice, the interconnected computer networks or Internetworking use
the Internet Protocol. Two architectural models are commonly used to describe the
protocols and methods used in internetworking. The standard reference model
for internetworking is Open Systems Interconnection (OSI).
Type of Internetworking
Internetworking is implemented in Layer 3 (Network Layer) of this model The most
notable example of internetworking is the Internet (capitalized). There are three
variants of internetwork or Internetworking, depending on who administers and who
participates in them :
Extranet
Intranet
Internet
Extranet
An extranet is a network of internetwork or Internetworking that is limited in
scope to a single organisation or entity but which also has limited connections to
the networks of one or more other usually, but not necessarily, trusted organizations
or entities .Technically, an extranet may also be categorized as a MAN, WAN, or
other type of network, although, by definition, an extranet cannot consist of a single
LAN; it must have at least one connection with an external network.
Intranet
An intranet is a set of interconnected networks or Internetworking, using the
Internet Protocol and uses IP-based tools such as web browsers and ftp tools,
that is under the control of a single administrative entity. That administrative entity
closes the intranet to the rest of the world, and allows only specific users. Most
commonly, an intranet is the internal network of a company or other enterprise. A
large intranet will typically have its own web server to provide users with
browseable information.
Internet
A specific Internetworking, consisting of a worldwide interconnection of
governmental, academic, public, and private networks based upon the Advanced
Research Projects Agency Network (ARPANET) developed by ARPA of the
U.S. Department of Defense also home to the World Wide Web (WWW) and
referred to as the 'Internet' with a capital 'I' to distinguish it from other generic
internetworks. Participants in the Internet, or their service providers, use IP
Addresses obtained from address registries that control assignments.
An Ethernet network uses two hardware addresses which identify the source and
destination of each frame sent by the Ethernet. The destination address (all 1's) may
also identify a broadcast packet (to be sent to all connected computers). The
hardware address is also known as the Medium Access Control (MAC) address, in
reference to the standards which define Ethernet. Each
computer network interface card is allocated a globally unique 6 byte link
address when the factory manufactures the card (stored in a PROM).
This is the normal link source address used by an interface. A computer
sends all packets which it creates with its own hardware source link
address, and receives all packets which match the same hardware
address in the destination field or one (or more) pre-selected
broadcast/multicast addresses.
There are four types of arp messages that may be sent by the arp
protocol. These are identified by four values in the "operation" field of an
arp message. The types of message are:
A special host configured inside the local area network, called as RARP-
server is responsible to reply for these kind of broadcast packets. Now
the RARP server attempt to find out the entry in IP to MAC address
mapping table. If any entry matches in table, RARP server send the
response packet to the requesting device along with IP address.
LAN technologies like Ethernet, Ethernet II, Token Ring and Fiber
Distributed Data Interface (FDDI) support the Address Resolution
Protocol.
RARP is not being used in today’s networks. Because we have
much great featured protocols like BOOTP (Bootstrap Protocol) and
DHCP( Dynamic Host Configuration Protocol).
Unit-4, Transport Layer
ADDRESSING
When an application (e.g., a user) process wishes to set up a connection to a remote
application process, it must specify which one to connect to. The method normally
used is to define transport addresses to which processes can listen for connection
requests. In the Internet, these endpoints are called ports.
There are two types of access points.
TSAP (Transport Service Access Point) to mean a specific endpoint in the
transport layer.
The analogous endpoints in the network layer (i.e., network layer addresses) are not
surprisingly called NSAPs (Network Service Access Points). IP addresses are
examples of NSAPs.
Application processes, both clients and servers, can attach themselves to a local TSAP
to establish a connection to a remote TSAP. These connections run through NSAPs on
each host. The purpose of having TSAPs is that in some networks, each computer has a
single NSAP, so some way is needed to distinguish multiple transport endpoints that
share that NSAP.
A possible scenario for a transport connection is as follows:
1. A mail server process attaches itself to TSAP 1522 on host 2 to wait for an incoming
call. How a process attaches itself to a TSAP is outside the networking model and
depends entirely on the local operating system. A call such as our LISTEN might be
used, for example.
4. The mail server responds to say that it will deliver the message.
Connection Establishment
TCP is a connection oriented protocol and every connection oriented protocol needs
to establish connection in order to reserve resources at both the communicating
ends.
Connection Establishment –
1. Sender starts the process with following:
Sequence number (Seq=521): contains the random initial sequence
number which generated at sender side.
Syn flag (Syn=1): request receiver to synchronize its sequence number
with the above provided sequence number.
Maximum segment size (MSS=1460 B): sender tells its maximum
segment size, so that receiver sends datagram which won’t require any
fragmentation. MSS field is present inside Option field in TCP header.
Window size (window=14600 B): sender tells about his buffer capacity in
which he has to store messages from receiver.
2. TCP is a full duplex protocol so both sender and receiver require a window for
receiving messages from one another.
Sequence number (Seq=2000): contains the random initial sequence
number which generated at receiver side.
Syn flag (Syn=1): request sender to synchronize its sequence number with
the above provided sequence number.
Maximum segment size (MSS=500 B): sender tells its maximum segment
size, so that receiver sends datagram which won’t require any fragmentation.
MSS field is present inside Option field in TCP header.
Since MSSreceiver < MSSsender, both parties agree for minimum MSS i.e., 500 B to
avoid fragmentation of packets at both ends.
Therefore, receiver can send maximum of 14600/500 = 29 packets.
Asymmetric release is the way the telephone system works: when one party
hangs up, the connection is broken. Symmetric release treats the connection
as two separate unidirectional connections and requires each one to be
released separately.
Flow control –
The transport layer provides a flow control mechanism between the adjacent layers
of the TCP/IP model. TCP also prevents data loss due to a fast sender and slow
receiver by imposing some flow control techniques. It uses the method of sliding
window protocol which is accomplished by the receiver by sending a window back to
the sender informing the size of data it can receive.
How it works
On the other side of this communication, the network layer will deliver this piece of
data to TCP , that will make it available to the receiver application as an exact copy
of the data sent, meaning if will not deliver packets out of order, and will wait for a
retransmission in case it notices a gap in the byte stream.
This illustration shows the various layers of the TCP/IP Suite of Protocols. From the
top, the application layer consists of the application. The transport layer
contains UDP and TCP. The network layer contains the network (hardware)
interface. And finally, the hardware layer contains the physical network.
User Datagram Protocol (UDP) and the TCP are the basic transport-level protocols
for making connections between Internet hosts. Both TCP and UDP allow programs
to send messages to and receive messages from applications on other hosts. When
an application sends a request to the Transport layer to send a
message, UDP and TCP break the information into packets, add a packet header
including the destination address, and send the information to the Network layer for
further processing. Both TCP and UDP use protocol ports on the host to identify the
specific destination of the message.
Higher-level protocols and applications use UDP to make datagram connections
and TCP to make stream connections. The operating system sockets interface
implements these protocols.
User Datagram Protocol
Sometimes an application on a network needs to send messages to a specific application or
process on another network. The UDP provides a datagram means of communication
between applications on Internet hosts.
Reliable Datagram Sockets over InfiniBand and RoCE
Reliable Datagram Sockets (RDS) is a connectionless and record-oriented protocol that
provides an in-order and no-duplicate service over InfiniBand and RDMA over Converged
Ethernet (RoCE). RDS exposes the User Datagram Protocol (UDP) subset of the socket
API.
Transmission Control Protocol
TCP provides reliable stream delivery of data between Internet hosts.
TCP header field definitions
Short descriptions of each of the Transmission Control Protocol (TCP) fields follow.
Domain Name System is an Internet service that translates domain names into IP
addresses.
The DNS has a distributed database that resides on multiple machines on the
Internet.
DNS has some protocols that allow the client and servers to communicate with each
other.
When the Internet was small, mapping was done by using hosts.txt file.
The host file was located at host's disk and updated periodically from a master host
file.
When any program or any user wanted to map domain name to an address, the
host consulted the host file and found the mapping.
Now Internet is not small, it is impossible to have only one host file to relate every
address with a name and vice versa.
The solution used today is to divide the host file into smaller parts and store each
part on a different computer.
In this method, the host that needs mapping can call the closest computer holding
the needed information.
This method is used in Domain Name System (DNS).
Name space
The names assigned to the machines must be carefully selected from a name space
with complete control over the binding between the names and IP addresses.
There are two types of name spaces: Flat name spaces and Hierarchical names.
The generic domains define registered hosts according to their generic behavior.
1. Country Domains
2. Inverse Domains
Inverse domain is used to map an address to a name.
For example, a client send a request to the server for performing a particular task,
server finds a list of authorized client. The list contains only IP addresses of the client.
The server sends a query to the DNS server to map an address to a name to determine
if the client is on the authorized list.
This query is called an inverse query.
This query is handled by first level node called arpa.
Purpose-
Working-
FTP establishes two TCP connections between the client and the server.
One connection is used for transferring data.
Other connection is used for transferring control information.
Characteristics of FTP-
FTP uses TCP at the transport layer.
FTP uses port number 21 for control connection.
FTP uses port number 20 for data connection.
FTP uses persistent TCP connections for control connection.
FTP uses non-persistent connections for data connection.
FTP is a connection oriented protocol.
FTP is an out-of-band protocol as data and control information flow over different
connections.
SMTP is a stateful protocol.
Important Notes-
Note-01:
This is because-
FTP requires the connection establishment between the client and server before
transferring the files.
So, both have to be online at the same time.
That is why, emails are not sent using FTP.
Note-02:
FTP is used for transferring one file at a time in either direction between the client and
the server.
Note-03:
This is because-
The client establishes control connection for the duration of an FTP session.
It typically spans multiple data transfers.
So, FTP is a stateful protocol.
HTTP
o HTTP stands for HyperText Transfer Protocol.
o It is a protocol used to access the data on the World Wide Web (www).
o The HTTP protocol can be used to transfer the data in the form of plain text, hypertext, audio,
video, and so on.
o This protocol is known as HyperText Transfer Protocol because of its efficiency that allows us
to use in a hypertext environment where there are rapid jumps from one document to another
document.
o HTTP is similar to the FTP as it also transfers the files from one host to another host. But,
HTTP is simpler than FTP as HTTP uses only one connection, i.e., no control connection to
transfer the files.
o HTTP is used to carry the data in the form of MIME-like format.
o HTTP is similar to SMTP as the data is transferred between client and server. The HTTP
differs from the SMTP in the way the messages are sent from the client to the server and from
server to the client. SMTP messages are stored and forwarded while HTTP messages are
delivered immediately.
Features of HTTP:
o Connectionless protocol: HTTP is a connectionless protocol. HTTP client
initiates a request and waits for a response from the server. When the server
receives the request, the server processes the request and sends back the
response to the HTTP client after which the client disconnects the connection.
The connection between client and server exist only during the current
request and response time only.
o Media independent: HTTP protocol is a media independent as data can be
sent as long as both the client and server know how to handle the data
content. It is required for both the client and server to specify the content type
in MIME-type header.
o Stateless: HTTP is a stateless protocol as both the client and server know
each other only during the current request. Due to this nature of the protocol,
both the client and server do not retain the information between various
requests of the web pages.
HTTP Transactions
The above figure shows the HTTP transaction between client and server. The client initiates
a transaction by sending a request message to the server. The server replies to the request
message by sending a response message.
Messages
HTTP messages are of two types: request and response. Both the message types follow the same
message format.
Request Message: The request message is sent by the client that consists of a request line,
headers, and sometimes a body.
Response Message: The response message is sent by the server to the client that consists of a
status line, headers, and sometimes a body.
o Method: The method is the protocol used to retrieve the document from a server. For
example, HTTP.
o Host: The host is the computer where the information is stored, and the computer is given an
alias name. Web pages are mainly stored in the computers and the computers are given an
alias name that begins with the characters "www". This field is not mandatory.
o Port: The URL can also contain the port number of the server, but it's an optional field. If the
port number is included, then it must come between the host and path and it should be
separated from the host by a colon.
o Path: Path is the pathname of the file where the information is stored. The path itself contain
slashes that separate the directories from the subdirectories and files.
HTTPS
Stands for "HyperText Transport Protocol Secure." HTTPS is the same thing
as HTTP, but uses a secure socket layer (SSL) for security purposes. Some
examples of sites that use HTTPS include banking and investment websites, e-
commerce websites, and most websites that require you to log in.
Websites that use the standard HTTP protocol transmit and receive data in an
unsecured manner. This means it is possible for someone to eavesdrop on the data
being transferred between the user and the Web server. While this is highly unlikely,
it is not a comforting thought that someone might be capturing your credit card
number or other personal information that you enter on a website. Therefore, secure
websites use the HTTPS protocol to encrypt the data being sent back and forth with
SSL encryption. If someone were to capture the data being transferred via HTTPS, it
would be unrecognizable.
You can tell if a website is secure by viewing the URL in the address field of
your Web browser. If the Web address starts with https://, you know you are
accessing a secure website. Most browsers will also display a lock icon somewhere
along the edge of the window to indicate the website you are currently visiting is
secure. You can click the lock icon to view the secure certificate that authenticates
the website.
Client (Browser):
Web browser is a program, which is used to communicate with web server on the
Internet.
Each browser consists of three parts: a controller, client protocol and interpreter.
The controller receives input from input device and use the programs to access the
documents.
After accessing the document, the controller uses one of the interpreters to display the
document on the screen.
Server:
A computer which is available for the network resources and provides service to the
other computer on request is known as server.
The web pages are stored at the server.
Server accepts a TCP connection from a client browser.
It gets the name of the file required.
Server gets the stored file. Returns the file to the client and releases the top connection.
The URL is a standard for specifying any kind of information on the Internet.
The URL consists of four parts: protocol, host computer, port and path.
The protocol is the client or server program which is used to retrieve the document or
file. The protocol can be ftp or http.
The host is the name of computer on which the information is located.
The URL can optionally contain the port number and it is separated from the host name
by a colon.
Path is the pathname of the file where the file is stored.