0% found this document useful (0 votes)
1 views

Data Communication and Computer Net

The document provides an overview of data communication and computer networking, focusing on data transmission concepts including parallel and serial transmission methods, their advantages and disadvantages. It also discusses transmission impairments such as attenuation, distortion, and noise, as well as switching techniques like circuit, message, and packet switching. Additionally, it covers modulation and multiplexing techniques used in transmitting various signals over a single medium.

Uploaded by

Sujeet
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Data Communication and Computer Net

The document provides an overview of data communication and computer networking, focusing on data transmission concepts including parallel and serial transmission methods, their advantages and disadvantages. It also discusses transmission impairments such as attenuation, distortion, and noise, as well as switching techniques like circuit, message, and packet switching. Additionally, it covers modulation and multiplexing techniques used in transmitting various signals over a single medium.

Uploaded by

Sujeet
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 79

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.

Types of Data Transmission

 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.

Disadvantage of parallel transmission


It is costly method of data transmission as it requires n lines to transmit n bits at the
same time.

 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.

Advantage of Serial transmission


Use of single communication line reduces the transmission line cost by the factor
of n as compared to parallel transmission.

Disadvantages of Serial transmission


1. Use of conversion devices at source and destination end may lead to increase in
overall transmission cost.
2. This method is slower as compared to parallel transmission as bits are transmitted
serially one after the other.

Types of Serial Transmission


There are two types of serial transmission-synchronous and asynchronous both
these transmissions use 'Bit synchronization'
Bit Synchronization is a function that is required to determine when the beginning
and end of the data transmission occurs.
Bit synchronization helps the receiving computer to know when data begin and end
during a transmission. Therefore bit synchronization provides timing control.

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

Application of Asynchronous Transmission


1. Asynchronous transmission is well suited for keyboard type-terminals and paper
tape devices. The advantage of this method is that it does not require any local
storage at the terminal or the computer as transmission takes place character by
character.
2. Asynchronous transmission is best suited to Internet traffic in which information is
transmitted in short bursts. This type of transmission is used by modems.

Advantages of Asynchronous transmission


1. This method of data transmission is cheaper in cost as compared to
synchronous e.g. If lines are short, asynchronous transmission is better, because
line cost would be low and idle time will not be expensive.
2. In this approach each individual character is complete in itself, therefore if
character is corrupted during transmission, its successor and predecessor character
will not be affected.
3. It is possible to transmit signals from sources having different bit rates.
4. The transmission can start as soon as data byte to be transmitted becomes
available.
5. Moreover, this mode of data transmission in easy to implement.

Disadvantages of asynchronous transmission


1. This method is less efficient and slower than synchronous transmission due to the
overhead of extra bits and insertion of gaps into bit stream.
2. Successful transmission inevitably depends on the recognition of the start bits.
These bits can be missed or corrupted.

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

There are three main causes of impairment are,

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.

 Each component of frequency has its propagation speed traveling through a


medium and therefore, different components have different delay in arriving at
the final destination.
 It means that signals have different phases at the receiver than they did at the
source.
 This figure shows the effect of distortion on a composite signal:

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.

It is a primary source of bit-errors in digital data communication that kind of noise


introduces burst errors.

 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.

Types of Switching Techniques

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:

 The communication channel is end to end dedicated

Disadvantages:

 More bandwidth is required.


 Connection establishment time is more.
 More expensive than any other switching techniques because a
dedicated path is required for each connection.
 Inefficient use of communication channel.
2) Message Switching
 In message switching there is no dedicated path required between two
communicating devices, because the message switching is the follow the
connectionless network.
 With message switching there is no need to establish dedicated path between
two stations.
 When a station sends a message, the destination address is appended to the
message.
 The message is then transmitted through the network in its entirety, from node
to node.
 Each node receives the entire message, stores it in its entirety on disk and
then transmits the message to the next node. This type of network is called a
store and forward network.

Advantages:

 Efficient traffic management.


 Large storing capacity required.

Disadvantages:

 Is not compatible with interactive applications.


 Store and forward devices are example.
3) Packet Switching
 In packet switching message are broken up into packet.
 Each packet is tagged with appropriate source and destination address.
 Individual packets take different routes to reach the destination.

Packet switching: Datagram

 Datagram packet switching is a packet switching technology by which


each packet is treated as a separate entity and are called as datagram.
 Packets have their own complete addressing information attached.
 Each packet follows different routes to reach the destination.
 So, the packets may arrive at different times, and may be in a disturbed
order. In this case reordering is done.

Packet switching: Virtual

 In this type of switching a preplanned route is established before the


packets are sent.
 Sender sends a "call request packet" to establish a logical connection
and receiver sends back an acknowledgement packet "packet
accepted".
 It is a cross between circuit switching network and packet switching
network.

Advantages:

 Packet switching is cost effective.


 Offers improved delay characteristics.
 Packet can be rerouted if any problem occurs.

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.

Modulation is usually applied to electromagnetic signals: radio waves, lasers/optics


and computer networks. Modulation can even be applied to a direct current -- which
can be treated as a degenerate carrier wave with a fixed amplitude and frequency of
0 Hz -- mainly by turning it on and off, as in Morse code telegraphy or a digital
current loop interface. The special case of no carrier -- a response message
indicating an attached device is no longer connected to a remote system -- is called
baseband modulation.

Modulation can also be applied to a low-frequency alternating current -- 50-60 Hz --


as with powerline networking.

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.

 Pulse-code modulation, in which an analog signal is sampled to derive a data


stream that is used to modulate a digital carrier signal.

 Quadrature amplitude modulation (QAM), which uses two AM carriers to


encode two or more bits in a single transmission.

 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)

1). Frequency Division Multiplexing (FDM)


The FDM is used in telephone companies in the 20th century in long-distance
connections for multiplexing number of voice signals using a system like a coaxial
cable. For small distances, low-cost cables were utilized for different systems such
as bell systems, K-and N-carrier, however, they don’t let huge bandwidths. This is
analog multiplexing used to unite analog signals. This type of multiplexing is useful
when the link’s bandwidth is better than the United bandwidth of the transmitted
signals.

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.

2). Wavelength Division Multiplexing (WDM)


In fiber communications, the WDM (Wavelength Division Multiplexing) is one type
of technology. This is the most useful concept in high-capacity communication
systems. At the end of the transmitter section, the multiplexer is used to combine the
signals as well as at the end of receiver section, de-multiplexer for dividing the
signals separately. The main function of WDM at the multiplexer is for uniting various
light sources into an only light source, and this light can be changed into numerous
light sources at the de-multiplexer.

Wavelength Division Multiplexing

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.

 What is Network Hardware


Network hardware is the individual components of a network system that are
responsible for transmitting data and facilitating the operations of a computer
network. Although a network contains many hardware components, there are several
basic categories that make up the complete operations of a network system. Here
are some of the different categories and how they contribute as a whole to the
overall functioning of a network system.
Categories of Different Network Hardware
Basic network infrastructure is connected by components that fall under several
categories of different types of network hardware.

 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.

 Repeaters, Hubs, and Switches


Repeaters, hubs and switches connect network devices together so that they can
function as a single segment.
A repeater receives a signal and regenerates it before re-transmitting so that it can
travel longer distances.
A hub is a multiport repeater having several input/output ports, so that input at any
port is available at every other port.
A switch receives data from a port, uses packet switching to resolve the destination
device and then forwards the data to the particular destination, rather than
broadcasting it as a hub.
 Bridges
A network bridge divides traffic on a local area network by separating the LAN into
several different segments. It is also responsible for filtering data by determining the data
destination or discarding unnecessary data. Network bridges operate within the layers of
the network and also control the data that crosses the boundaries from one local area

network to the other.

 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.

 Network Interface Cards


NIC is a component of the computer to connect it to a network. Network cards are of
two types: Internal network cards and external network cards. Network interface cards
are used to connect each computer to the network so they can communicate with the
network router to receive information packets. The interface cards determine the
infrastructure of a local area network (LAN) and allow all of the computers to connect to
the network. There are many different types of network interface cards that perform
different functions within the network which include Ethernet cards and wireless network
interface cards.
Types of Computer Network: LAN, MAN and WAN
There are mainly three types of computer networks based on their size:
1. Local Area Network (LAN)
2. Metropolitan Area Network (MAN)
3. Wide area network (WAN)

1. Local Area Network (LAN)

1. Local area network is a group of computers connected with each other in a


small places such as school, hospital, apartment etc.
2. LAN is secure because there is no outside connection with the local area
network thus the data which is shared is safe on the local area network and
can’t be accessed outside.
3. LAN due to their small size are considerably faster, their speed can range
anywhere from 100 to 100Mbps.
4. LANs are not limited to wire connection, there is a new evolution to the
LANs that allows local area network to work on a wireless connection.

2. Metropolitan Area Network (MAN)


MAN network covers larger area by connections LANs to a larger network of
computers. In Metropolitan area network various Local area networks are
connected with each other through telephone lines. The size of the
Metropolitan area network is larger than LANs and smaller than WANs(wide
area networks), a MANs covers the larger area of a city or town.

3. Wide area network (WAN)

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.

As with networks based on wire, or optical fiber, wireless networks convey


information between computer devices. The information can take the form of e-mail
messages, web pages, database records, streaming video or voice. In most cases,
wireless networks transfer data, such as e-mail messages and files, but
advancements in the performance of wireless networks is enabling support for video
and voice communications as well.

Types of Wireless Networks

 WLANS: Wireless Local Area Networks


WLANS allow users in a local area, such as a university campus or library, to form a
network or gain access to the internet. A temporary network can be formed by a
small number of users without the need of an access point; given that they do not
need access to network resources.

 WPANS: Wireless Personal Area Networks


The two current technologies for wireless personal area networks are Infra Red (IR)
and Bluetooth (IEEE 802.15). These will allow the connectivity of personal devices
within an area of about 30 feet. However, IR requires a direct line of site and the
range is less.

 WMANS: Wireless Metropolitan Area Networks

This technology allows the connection of multiple networks in a metropolitan area


such as different buildings in a city, which can be an alternative or backup to laying
copper or fiber cabling.

 WWANS: Wireless Wide Area Networks


These types of networks can be maintained over large areas, such as cities or
countries, via multiple satellite systems or antenna sites looked after by an ISP.
These types of systems are referred to as 2G (2nd Generation) systems.
Internet works
Internetworking is combined of 2 words, inter and networking which implies an
association between totally different nodes or segments. This connection area unit is
established through intercessor devices akin to routers or gateway. The first term for
associate degree internetwork was catenet. This interconnection is often among or
between public, private, commercial, industrial, or governmental networks. Thus,
associate degree internetwork could be an assortment of individual networks,
connected by intermediate networking devices, that functions as one giant network.
Internetworking refers to the trade, products, and procedures that meet the challenge
of making and administering internetworks.
To enable communication, every individual network node or phase is designed with
similar protocol or communication logic, that is Transfer Control Protocol (TCP) or
Internet Protocol (IP). Once a network communicates with another network having
constant communication procedures, it’s called Internetworking. Internetworking was
designed to resolve the matter of delivering a packet of information through many
links.
There a minute difference between extending the network and Internetworking.
Merely exploitation of either a switch or a hub to attach 2 local area networks is an
extension of LAN whereas connecting them via the router is associate degree
example of Internetworking. Internetworking is enforced in Layer three (Network
Layer) of OSI-ISO model. The foremost notable example of internetworking is that
the Internet.
There are chiefly 3 unit of Internetworking:
1. Extranet
2. Intranet
3. Internet

1. Extranet – It’s a network of the internetwork that’s restricted in scope to one


organization or entity however that additionally has restricted connections to the
networks of one or a lot of different sometimes, however not essential. It’s very
lowest level of Internetworking, usually enforced in an exceedingly personal
area. Associate degree extranet may additionally be classified as a Man, WAN,
or different form of network however it cannot encompass one local area
network i.e. it should have a minimum of one reference to associate degree
external network.
2. Intranet – This associate degree computer network could be a set of
interconnected networks, which exploits the Internet Protocol and uses IP-
based tools akin to web browsers and FTP tools, that’s underneath the
management of one body entity. That body entity closes the computer network
to the remainder of the planet and permits solely specific users. Most typically,
this network is the internal network of a corporation or different enterprise. An
outsized computer network can usually have its own internet server to supply
users with browseable data.

3. Internet – A selected Internetworking, consisting of a worldwide interconnection


of governmental, academic, public, and personal networks based mostly upon
the Advanced analysis comes Agency Network (ARPANET) developed by
ARPA of the U.S. Department of Defense additionally home to the World Wide
Web (WWW) and cited as the ‘Internet’ to differentiate from all different generic
Internetworks. Participants within the web, or their service suppliers, use IP
Addresses obtained from address registries that management assignments.

 What Is Networking Software?


Networking software powers the vast majority of today's corporations, businesses and other
large organizations. The ability to efficiently organize content sharing, communication and
security among a large group of users and devices can not only improve productivity but also
help everyone involved reach their own potential within their workspace. When networks are
being established, networking software is deployed to allow administrators to quickly
customize or adjust elements of the larger framework as needed. A closer look at modern
networking software shows how these programs function.

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.

 Data Link (Layer 2)


At OSI Model, Layer 2, data packets are encoded and decoded into bits. It
furnishes transmission protocol knowledge and management and handles errors in
the physical layer, flow control and frame synchronization. The data link layer is
divided into two sub layers: The Media Access Control (MAC) layer and the Logical
Link Control (LLC) layer. The MAC sub layer controls how a computer on the
network gains access to the data and permission to transmit it. The LLC layer
controls frame synchronization, flow control and error checking.
Layer 2 Data Link examples include PPP, FDDI, ATM, IEEE 802.5/ 802.2, IEEE
802.3/802.2, HDLC, Frame Relay.

 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.

TCP/IP stands for Transmission Control Protocol/ Internet Protocol. It is specifically


designed as a model to offer highly reliable and end-to-end byte stream over an
unreliable internetwork.

Four Layers of TCP/IP

 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.

Application layer interacts with software applications to implement a communicating


component. The interpretation of data by the application program is always outside
the scope of the OSI model.

Example of the application layer is an application such as file transfer, email, remote
login, etc.

The function of the Application Layers are:

 Application-layer helps you to identify communication partners, determining


resource availability, and synchronizing communication.
 It allows users to log on to a remote host
 This layer provides various e-mail services
 This application offers distributed database sources and access for global
information about various objects and services.

 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.

The transport layer also offers an acknowledgment of the successful data


transmission and sends the next data in case no errors occurred. TCP is the best-
known example of the transport layer.

Important functions of Transport Layers:

 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

An internet layer is a second layer 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.

Layer-management protocols that belong to the network layer are:

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.

Differences between OSI and TCP/IP Models

OSI Model TCP/IP model

It is developed by ISO (International It is developed by ARPANET (Advanced


Standard Organization) Research Project Agency 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 refers to Open Systems TCP refers to Transmission Control


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 TCP/IP uses only one layer (link).
and data link to define the functionality of
the 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 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.

An electrical signal is in the form of current. An electromagnetic signal is series of


electromagnetic energy pulses at various frequencies. These signals can be
transmitted through copper wires, optical fibers, atmosphere, water and vacuum
Different Medias have different properties like bandwidth, delay, cost and ease of
installation and maintenance. Transmission media is also
called Communication channel.

Types of Transmission Media

1. Twisted Pair Cable


Twisted pair cables have been around for a long time. They were mainly invented for
voice transmissions. Twisted pair is a widely used medium in networking because it's
lighter, cheaper, more flexible, easy to install, and provides greater speeds than
coaxial cables. There are two types of twisted pair cables: the unshielded twisted
pair (UTP) and the shielded twisted pair (STP). Let's take a closer look at each of
them.
The unshielded twisted pair cable has 4 pairs of copper wires that are present inside
a plastic sheath. These wires are twisted to protect them from interference. The only
protection available for a UTP cable is a plastic sheath that is thin in size.

Unshielded Twisted Pair Cable

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.

Shielded Twisted Pair Cable


UTP and STP Difference

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:

 They're more prone to lightning strikes.


 They cover less distance than fiber optic cables.
 They carry less bandwidth than both fiber optic and twisted pair cables.

Now let's move onto a different type of guided transmission media.

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.

Optical Fiber Cable

The advantages of optical fibers include the following:

 There is zero interference and covers major cities and countries.


 They have high speed and high bandwidth.
 They're highly secure.
There also are a number of disadvantages, including the following:

 Installation and maintenance are difficult.


 Cabling is costly.
 Retrofitting an existing network is difficult, since optical fibers are incompatible
with many types of electronic networking equipment.

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.

Optical Fiber Transmission in the Form of Light Waves

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.

 ISDN(The Integrated Services of Digital


Networking)
ISDN was first defined in the CCITT red book in 1988.The Integrated Services of
Digital Networking, in short ISDN is a telephone network based infrastructure that
allows the transmission of voice and data simultaneously at a high speed with
greater efficiency. This is a circuit switched telephone network system, which also
provides access to Packet switched networks.
The model of a practical ISDN is as shown below.

ISDN supports a variety of services. A few of them are listed below −


 Voice calls
 Facsimile
 Videotext
 Teletext
 Electronic Mail
 Database access
 Data transmission and voice
 Connection to internet
 Electronic Fund transfer
 Image and graphics exchange
 Document storage and transfer
 Audio and Video Conferencing
 Automatic alarm services to fire stations, police, medical etc.
Types of ISDN

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 −

 Basic Rate Interface (BRI)


 Primary Rate Interface (PRI)
 Narrowband ISDN
 Broadband ISDN
 Basic Rate Interface (BRI)
The Basic Rate Interface or Basic Rate Access, simply called the ISDN BRI
Connection uses the existing telephone infrastructure. The BRI configuration
provides two data or bearer channels at 64 Kbits/sec speed and one control or
delta channel at 16 Kbits/sec. This is a standard rate.
The ISDN BRI interface is commonly used by smaller organizations or home users
or within a local group, limiting a smaller area.
 Primary Rate Interface (PRI)
The Primary Rate Interface or Primary Rate Access, simply called the ISDN PRI
connection is used by enterprises and offices. The PRI configuration is based on T-
carrier or T1 in the US, Canada and Japan countries consisting of 23 data or bearer
channels and one control or delta channel, with 64kbps speed for a bandwidth of
1.544 M bits/sec. The PRI configuration is based on E-carrier or E1 in Europe,
Australia and few Asian countries consisting of 30 data or bearer channels
and two-control or delta channel with 64kbps speed for a bandwidth of 2.048 M
bits/sec.
The ISDN BRI interface is used by larger organizations or enterprises and for
Internet Service Providers.
 Narrowband ISDN
The Narrowband Integrated Services Digital Network is called the N-ISDN. This can
be understood as a telecommunication that carries voice information in a narrow
band of frequencies. This is actually an attempt to digitize the analog voice
information. This uses 64kbps circuit switching.
The narrowband ISDN is implemented to carry voice data, which uses lesser
bandwidth, on a limited number of frequencies.
 Broadband ISDN
The Broadband Integrated Services Digital Network is called the B-ISDN. This
integrates the digital networking services and provides digital transmission over
ordinary telephone wires, as well as over other media. The CCITT defined it as,
“Qualifying a service or system requiring transmission channels capable of
supporting rates greater than primary rates.”
The broadband ISDN speed is around 2 MBPS to 1 GBPS and the transmission is
related to ATM, i.e., Asynchronous Transfer Mode. The broadband ISDN
communication is usually made using the fiber optic cables.
As the speed is greater than 1.544 Mbps, the communications based on this are
called Broadband Communications. The broadband services provide a
continuous flow of information, which is distributed from a central source to an
unlimited number of authorized receivers connected to the network. Though a user
can access this flow of information, he cannot control it.
Unit-2. Data Link Layer

 Framing in Data Link Layer


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.

 Error control in Data Link Layer


Error control in data link layer is the process of detecting and correcting data frames
that have been corrupted or lost during transmission.
In case of lost or corrupted frames, the receiver does not receive the correct data-
frame and sender is ignorant about the loss. Data link layer follows a technique to
detect transit errors and take necessary actions, which is retransmission of frames
whenever error is detected or frame is lost. The process is called Automatic Repeat
Request (ARQ).

Phases in Error Control


The error control mechanism in data link layer involves the following phases:
 Detection of Error − Transmission error, if any, is detected by either the sender or the
receiver.
 Acknowledgment − acknowledgment may be positive or negative.
o Positive ACK − On receiving a correct frame, the receiver sends a positive
acknowledge.
o Negative ACK − On receiving a damaged frame or a duplicate frame, the
receiver sends a negative acknowledgment back to the sender.
 Retransmission − The sender maintains a clock and sets a timeout period. If an
acknowledgment of a data-frame previously transmitted does not arrive before the
timeout, or a negative acknowledgment is received, the sender retransmits the frame.
Error Control Techniques
There are three main techniques for error control:

 Stop and Wait ARQ


This protocol involves the following transitions:
o A timeout counter is maintained by the sender, which is started when a
frame is sent.
o If the sender receives acknowledgment of the sent frame within time,
the sender is confirmed about successful delivery of the frame. It then
transmits the next frame in queue.
o If the sender does not receive the acknowledgment within time, the
sender assumes that either the frame or its acknowledgment is lost in
transit. It then retransmits the frame.
o If the sender receives a negative acknowledgment, the sender
retransmits the frame.
 Go-Back-N ARQ
The working principle of this protocol is:
o The sender has buffers called sending window.
o The sender sends multiple frames based upon the sending-window
size, without receiving the acknowledgment of the previous ones.
o The receiver receives frames one by one. It keeps track of incoming
frame’s sequence number and sends the corresponding
acknowledgment frames.
o After the sender has sent all the frames in window, it checks up to what
sequence number it has received positive acknowledgment.
o If the sender has received positive acknowledgment for all the frames,
it sends next set of frames.
o If sender receives NACK or has not receive any ACK for a particular
frame, it retransmits all the frames after which it does not receive any
positive ACK.
 Selective Repeat ARQ
o Both the sender and the receiver have buffers called sending window
and receiving window respectively.
o The sender sends multiple frames based upon the sending-window
size, without receiving the acknowledgment of the previous ones.
o The receiver also receives multiple frames within the receiving window
size.
o The receiver keeps track of incoming frame’s sequence numbers,
buffers the frames in memory.
o It sends ACK for all successfully received frames and sends NACK for
only frames which are missing or damaged.
o The sender in this case, sends only packet for which NACK is received.

 Sliding Window Protocol


Sliding window protocols are data link layer protocols for reliable and sequential
delivery of data frames. The sliding window is also used in Transmission Control
Protocol.
In this protocol, multiple frames can be sent by a sender at a time before receiving
an acknowledgment from the receiver. The term sliding window refers to the
imaginary boxes to hold frames. Sliding window method is also known as windowing.

 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.

 Medium Access Control Sublayer (MAC sublayer)


The medium access control (MAC) is a sublayer of the data link layer of the open
system interconnections (OSI) reference model for data transmission. It is
responsible for flow control and multiplexing for transmission medium. It controls the
transmission of data packets via remotely shared channels. It sends data over the
network interface card.

MAC Layer in the OSI Model


The Open System Interconnections (OSI) model is a layered networking framework
that conceptualizes how communications should be done between heterogeneous
systems. The data link layer is the second lowest layer. It is divided into two
sublayers −
 The logical link control (LLC) sublayer
 The medium access control (MAC) sublayer

The following diagram depicts the position of the MAC layer −

Functions of MAC Layer


 It provides an abstraction of the physical layer to the LLC and upper layers of the OSI
network.
 It is responsible for encapsulating frames so that they are suitable for transmission via
the physical medium.
 It resolves the addressing of source station as well as the destination station, or groups
of destination stations.
 It performs multiple access resolutions when more than one data frame is to be
transmitted. It determines the channel access methods for transmission.
 It also performs collision resolution and initiating retransmission in case of collisions.
 It generates the frame check sequences and thus contributes to protection against
transmission errors.

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.

Channel Allocation Schemes


Channel Allocation may be done using two schemes −

 Static Channel Allocation


 Dynamic Channel Allocation

 Static Channel Allocation


In static channel allocation scheme, a fixed portion of the frequency channel is
allotted to each user. For N competing users, the bandwidth is divided into N
channels using frequency division multiplexing (FDM), and each portion is assigned
to one user.
This scheme is also referred as fixed channel allocation or fixed channel assignment.
In this allocation scheme, there is no interference between the users since each user
is assigned a fixed channel. However, it is not suitable in case of a large number of
users with variable bandwidth requirements.

 Dynamic Channel Allocation


In dynamic channel allocation scheme, frequency bands are not permanently
assigned to the users. Instead channels are allotted to users dynamically as needed,
from a central pool. The allocation is done considering a number of parameters so
that transmission interference is minimized.
This allocation scheme optimises bandwidth usage and results is faster
transmissions.
Dynamic channel allocation is further divided into centralised and distributed
allocation.

 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.

CSMA access modes-


 1-persistent: The node senses the channel, if idle it sends the data, otherwise
it continuously keeps on checking the medium for being idle and transmits
unconditionally(with 1 probability) as soon as the channel gets idle.
 Non-Persistent: The node senses the channel, if idle it sends the data,
otherwise it checks the medium after a random amount of time (not
continuously) and transmits when found idle.
 P-persistent: The node senses the medium, if idle it sends the data with p
probability. If the data is not transmitted ((1-p) probability) then it waits for some
time and checks the medium again, now if it is found idle then it send with p
probability. This repeat continues until the frame is sent. It is used in Wifi and
packet radio systems.
 O-persistent: Superiority of nodes is decided beforehand and transmission
occurs in that order. If the medium is idle, node waits for its time slot to send
data.
 Collision-Free Protocols
In computer networks, when more than one station tries to transmit simultaneously
via a shared channel, the transmitted data is garbled. This event is called collision.
The Medium Access Control (MAC) layer of the OSI model is responsible for
handling collision of frames. Collision – free protocols are devised so that collisions
do not occur. Protocols like CSMA/CD and CSMA/CA nullifies the possibility of
collisions once the transmission channel is acquired by any station. However,
collision can still occur during the contention period if more than one stations starts
to transmit at the same time. Collision – free protocols resolves collision in the
contention period and so the possibilities of collisions are eliminated.

Types of Collision – free Protocols

 Bit – map Protocol


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.

 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


These protocols combines the advantages of collision based protocols and collision
free protocols. Under light load, they behave like ALOHA scheme. Under heavy load,
they behave like bitmap protocols.

 Adaptive Tree Walk Protocol


In adaptive tree walk protocol, the stations or nodes are arranged in the form of a
binary tree as follows -
Initially all nodes (A, B ……. G, H) are permitted to compete for the channel. If a
node is successful in acquiring the channel, it transmits its frame. In case of collision,
the nodes are divided into two groups (A, B, C, D in one group and E, F, G, H in
another group). Nodes belonging to only one of them is permitted for competing.
This process continues until successful transmission occurs.

 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.

 Wireless LAN Protocols


Wireless LANs refer to LANs (Local Area Networks) that use high frequency radio
waves instead of cables for connecting the devices. It can be conceived as a set of
laptops and other wireless devices communicating by radio signals. Users connected
by WLANs can move around within the area of network coverage. Most WLANs are
based upon the standard IEEE 802.11 or WiFi.

Configuration of Wireless LANs


Each station in a Wireless LAN has a wireless network interface controller. A station
can be of two categories −
 Wireless Access Point (WAP) − WAPs or simply access points (AP) are generally
wireless routers that form the base stations or access points. The APs are wired
together using fiber or copper wires, through the distribution system.
 Client − Clients are workstations, computers, laptops, printers, smart phones etc.
They are around tens of metres within the range of an AP.

Types of WLAN Protocols


IEEE 802.11 or WiFi has a number of variations, the main among which are −
 802.11a Protocol− This protocol supports very high transmission speeds of 54Mbps. It
has a high frequency of 5GHz range, due to which signals have difficulty in penetrating
walls and other obstructions. It employs Orthogonal Frequency Division Multiplexing
(OFDM).
 802.11b Protocol − This protocol operates within the frequency range of 2.4GHz and
supports 11Mbps speed. It facilitates path sharing and is less vulnerable to obstructions.
It uses Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) with Ethernet
protocol.
 802.11g Protocol − This protocol combines the features of 802.11a and 802.11b
protocols. It supports both the frequency ranges 5GHz (as in 802.11a standard) and
2.4GHz (as in 802.11b standard). Owing to its dual features, 802.11g is backward
compatible with 802.11b devices. 802.11g provides high speeds, varying signal range,
and resilience to obstruction. However, it is more expensive for implementation.
 802.11n Protocol − Popularly known as Wireless N, this is an upgraded version of
802.11g. It provides very high bandwidth up to 600Mbps and provides signal coverage. It
uses Multiple Input/Multiple Output (MIMO), having multiple antennas at both the
transmitter end and receiver ends. In case of signal obstructions, alternative routes are
used. However, the implementation is highly expensive.

 What is IEEE standards


IEEE stands for Institute of Electrical and Electronics Engineers. IEEE is an organization
composed of engineers, scientists, and students. The IEEE is best known for developing
standards for the computer and electronics industry.

IEEE 802.3 CSMA/CD access method (Ethernet)

IEEE 802.4 Token passing bus access method and Physical layer specifications

IEEE 802.5 Token Ring access method and Physical layer specifications

Unit-3. Network Layer:


 Network Layer Design Issues

Network layer comes up with certain design issues and they can be described as
below:

1). Store-and-Forward Packet Switching


Here, the foremost elements are the carrier’s equipment (the connection between
routers through transmission lines) and the customer’s equipment.

 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.

2). Services Provided to the Transport Layer


Through the network/transport layer interface, the network layer delivers its services
to the transport layer. One might come across the question of what type of services
does the network layer provides?

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:

 Offering services must not depend on router technology


 The transport layer needs to be protected from type, number and the topology of
the available routers.
 Network addressing the transport layer needs to follow a consistent numbering
scenario also at LAN and WAN connections.

3). Implementation of Connectionless Service


In this scenario, packets are termed as datagrams and the corresponding
subnet is termed as datagram subnet. Routing in datagram subnet is as
follows:

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

4). Implementation of Connection-Oriented Service


Here, the functionality of connection-oriented service works on the virtual subnet. A
virtual subnet performs the operation of avoiding a new path for each packet
transmission. As a substitute for this, when there forms a connection, a route from a
source node to a destination node is selected and maintained in tables. This route
performs its action at the time of traffic congestion.

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

 Distance Vector Routing Algorithm


The Distance vector algorithm is iterative, asynchronous and distributed.

 Distributed: It is distributed in that each node receives information from one


or more of its directly attached neighbors, performs calculation and then
distributes the result back to its neighbors.
 Iterative: It is iterative in that its process continues until no more information
is available to be exchanged between neighbors.
 Asynchronous: It does not require that all of its nodes operate in the lock
step with each other.

The Distance vector algorithm is a dynamic algorithm.

It is mainly used in ARPANET, and RIP.

Each router maintains a distance table known as Vector.

Three Keys to understand the working of Distance Vector Routing


Algorithm:
o Knowledge about the whole network: Each router shares its knowledge through the entire
network. The Router sends its collected knowledge about the network to its neighbors.
o Routing only to neighbors: The router sends its knowledge about the network to only those
routers which have direct links. The router sends whatever it has about the network through
the ports. The information is received by the router and uses the information to update its own
routing table.
o Information sharing at regular intervals: Within 30 seconds, the router sends the
information to the neighboring routers.

Distance Vector Routing Algorithm


Let dx(y) be the cost of the least-cost path from node x to node y. The least costs are
related by Bellman-Ford equation,

dx(y) = minv{c(x,v) + dv(y)}


Where the minv is the equation taken for all x neighbors. After traveling from x to v, if
we consider the least-cost path from v to y, the path cost will be c(x,v)+dv(y). The
least cost from x to y is the minimum of c(x,v)+dv(y) taken over all neighbors.

 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.

 congestion control algorithms


 Leaky bucket algorithm
In the network layer, before the network can make Quality of service guarantees, it
must know what traffic is being guaranteed. One of the main causes of congestion is
that traffic is often bursty.
To understand this concept first we have to know little about traffic shaping. Traffic
Shaping is a mechanism to control the amount and the rate of the traffic sent to the
network. Approach of congestion management is called Traffic shaping. Traffic
shaping helps to regulate rate of data transmission and reduces congestion.
There are 2 types of traffic shaping algorithms:
1. Leaky Bucket
2. Token Bucket
1.leaky bucket
The leaky bucket algorithm is a method of temporarily storing a variable number of
requests and organizing them into a set-rate output of packets in an asynchronous
transfer mode (ATM) network.

The leaky bucket is used to implement traffic policing and traffic


shaping in Ethernet and cellular data networks. The algorithm can also be used to
control metered-bandwidth Internet connections to prevent going over the allotted
bandwidth for a month, thereby avoiding extra charges.

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

Need of token bucket Algorithm:-

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.

Steps of this algorithm can be described as follows:

1. In regular intervals tokens are thrown into the bucket. ƒ


2. The bucket has a maximum capacity. ƒ
3. If there is a ready packet, a token is removed from the bucket, and the packet is
sent.
4. If there is no token in the bucket, the packet cannot be sent.

Let’s understand with an example,


In figure (A) we see a bucket holding three tokens, with five packets waiting to be
transmitted. For a packet to be transmitted, it must capture and destroy one token. In figure
(B) We see that three of the five packets have gotten through, but the other two are stuck
waiting for more tokens to be generated.

 Choke Packet Technique :


Choke packet technique is applicable to both virtual networks as well as
datagram subnets. A choke packet is a packet sent by a node to the source to
inform it of congestion. Each router monitor its resources and the utilization at
each of its output lines. whenever the resource utilization exceeds the
threshold value which is set by the administrator, the router directly sends a
choke packet to the source giving it a feedback to reduce the traffic. The
intermediate nodes through which the packets has traveled are not warned
about congestion.

 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.

 Internet Protocol (IP)


Internet Protocol is connectionless and unreliable protocol. It ensures no
guarantee of successfully transmission of data.
In order to make it reliable, it must be paired with reliable protocol such as TCP at
the transport layer.
Internet protocol transmits the data in form of a datagram as shown in the following
diagram:
Points to remember:
 The length of datagram is variable.
 The Datagram is divided into two parts: header and data.
 The length of header is 20 to 60 bytes.
 The header contains information for routing and delivery of the packet

 Address Resolution Protocol (arp)


The address resolution protocol (arp) is a protocol used by the Internet Protocol
(IP) [RFC826], specifically IPv4, to map IP network addresses to the hardware
addresses used by a data link protocol. The protocol operates below the network
layer as a part of the interface between the OSI network and OSI link layer. It is used
when IPv4 is used over Ethernet.

The term address resolution refers to the process of finding an address of a


computer in a network. The address is "resolved" using a protocol in which a piece of
information is sent by a client process executing on the local computer to a server
process executing on a remote computer. The information received by the server
allows the server to uniquely identify the network system for which the address was
required and therefore to provide the required address. The address resolution
procedure is completed when the client receives a response from the server
containing the required address.

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.

The Ethernet address is a link layer address and is dependent on the


interface card which is used. IP operates at the network layer and is not
concerned with the link addresses of individual nodes which are to be
used.The address resolution protocol (arp) is therefore used to translate
between the two types of address. The arp client and server processes
operate on all computers using IP over Ethernet. The processes are
normally implemented as part of the software driver that drives
the network interface card.

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:

1. ARP-Request (Broadcast, source IP address of the requester)


2. ARP-Reply (Unicast to requester, the target)

The format of an arp message is shown below:

To reduce the number of address resolution requests, a client


normally caches resolved addresses for a (short) period of time. The arp
cache is of a finite size, and would become full of incomplete and
obsolete entries for computers that are not in use if it was allowed to
grow without check. The arp cache is therefore periodically flushed of all
entries. This deletes unused entries and frees space in the cache. It also
removes any unsuccessful attempts to contact computers which are not
currently running.
If a host changes the MAC address it is using, this can be detected by
other hosts when the cache entry is deleted and a fresh arp message is
sent to establish the new association. The use of gratuitous arp (e.g.
triggered when the new NIC interface is enabled with an IP address) provides a
more rapid update of this information.

 Reverse Address Resolution Protocol (RARP)


Reverse ARP is a networking protocol used by a client machine in a


local area network to request its Internet Protocol address (IPv4) from
the gateway-router’s ARP table. The network administrator creates a
table in gateway-router, which is used to map the MAC address to
corresponding IP address.
When a new machine is setup or any machine which don’t have memory
to store IP address, needs an IP address for its own use. So the
machine sends a RARP broadcast packet which contains its own MAC
address in both sender and receiver hardware address field.

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.

2. An application process on host 1 wants to send an email message, so it attaches itself


to TSAP 1208 and issues a CONNECT request. The request specifies TSAP 1208 on
host 1 as the source and TSAP 1522 on host 2 as the destination. This action ultimately
results in a transport connection being established between the application process and
the server.

3. The application process sends over the mail message.

4. The mail server responds to say that it will deliver the message.

5. The transport connection is released.

 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.

This is the receiver's sending window size.


 Window size (window=10000 B): receiver tells about his buffer capacity in
which he has to store messages from sender.
 Therefore, sender can send a maximum of 10000/500 = 20 packets.
This is the sender's sending window size.
 Acknoledgement Number (Ack no.=522): Since sequence number 521 is
received by receiver so, it makes a request of next sequence number with
Ack no.=522 which is the next packet expected by receiver since Syn flag
consumes 1 sequence no.
 ACK flag (ACk=1): tells that acknowledgement number field contains the
next sequence expected by receiver.
3. Sender makes the final reply for connection establishment in following way:
 Sequence number (Seq=522): since sequence number = 521 in 1st step and
SYN flag consumes one sequence number hence, next sequence number will
be 522.
 Acknowledgement Number (Ack no.=2001): since sender is acknowledging
SYN=1 packet from the receiver with sequence number 2000 so, the next
sequence number expected is 2001.
 ACK flag (ACK=1): tells that acknowledgement number field contains the
next sequence expected by sender.
 CONNECTION RELEASE:

A connection is released using either asymmetric or symmetric variant. But, the


improved protocol for releasing a connection is a 3-way handshake protocol.
There are two styles of terminating a connection:

1) Asymmetric release and


2) Symmetric release.

 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

When we need to send data over a network, this is normally what


happens.
The sender application writes data to a socket, the transport layer (in our case, TCP )
will wrap this data in a segment and hand it to the network layer (e.g. IP ), that will
somehow route this packet to the receiving node.

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.

 internet transport protocol udp and tcp

The TCP/IP transport-level protocols allow application programs to communicate


with other application programs.
Figure 1. Transport layer of the TCP/IP Suite of Protocols.

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.

Unit-5. Application Layer

 Domain Name System

 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.

Flat name spaces

 In a flat name space, a name is a sequence of characters without structure.


 A name in this space is assigned to an address.
 The names were convenient and short.
 A flat name space cannot be used in a large system such as the internet because it
must be centrally controlled to avoid ambiguity and duplication.

Hierarchical Name Space

 In hierarchical name space, each name consists of several parts.


 First part defines the nature of the organization, second part defines the name of an
organization, third part defines department of the organization, and so on.
 In hierarchical name space, the authority to assign and control the name spaces can be
decentralized.
 Authority for names in each partition is passed to each designated agent.

DNS in the Internet

 DNS is a protocol that can be used in different platform.


 Domain Name Space is divided into different sections in the Internet: Generic domain,
country domain and inverse domain.
Generic Domains

The generic domains define registered hosts according to their generic behavior.

Generic domain labels are as stated below:

1. Country Domains

 Country domain uses two character country abbreviations.


 Second labels can be more specific, national designation.
 For example, for Australia the country domain is “au”, Inida is .in, UK is .uk etc.

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.

 File Transfer Protocol-


 FTP is short for File Transfer Protocol.
 It is an application layer protocol.

Purpose-

 It is used for exchanging files over the internet.


 It enables the users to upload and download the files from the internet.

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:

Emails can’t be sent using FTP.

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 can transfer one file at a time.

 FTP is used for transferring one file at a time in either direction between the client and
the server.

Note-03:

FTP is a stateful protocol.

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.

Uniform Resource Locator (URL)


o A client that wants to access the document in an internet needs an address and to
facilitate the access of documents, the HTTP uses the concept of Uniform Resource
Locator (URL).
o The Uniform Resource Locator (URL) is a standard way of specifying any kind of
information on the internet.
o The URL defines four parts: method, host computer, port, and path.

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.

So whenever you are asked to enter personal or financial information on a website,


make sure that the URL starts with "https://" and that the lock icon appears in the
window. Then you can be sure that the website is secure and any data you enter will
only be recognized by your computer and the Web server.

What is the difference between HTTP and HTTPS?


1. HTTP URL in your browser’s address bar is http:// and the HTTPS URL
is https://.
2. HTTP is unsecured while HTTPS is secured.
3. HTTP sends data over port 80 while HTTPS uses port 443.
4. HTTP operates at application layer, while HTTPS operates at transport layer.
5. No SSL certificates are required for HTTP, with HTTPS it is required that you
have an SSL certificate and it is signed by a CA.
6. HTTP doesn’t require domain validation, where as HTTPS requires at least
domain validation and certain certificates even require legal document
validation.
7. No encryption in HTTP, with HTTPS the data is encrypted before sending

 World Wide Web

 The World Wide Web (WWW) is a collection of documents and other


web resources which are identified by URLs, interlinked by hypertext
links, and can be accessed and searched by browsers via the Internet.
 World Wide Web is also called the Web and it was invented by Tim
Berners-Lee in 1989.
 Website is a collection of web pages belonging to a particular
organization.
 The pages can be retrieved and viewed by using browser.
Let us go through the scenario shown in above fig.

 The client wants to see some information that belongs to site 1.


 It sends a request through its browser to the server at site 2.
 The server at site 1 finds the document and sends it to the client.

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.

Uniform Resource Locater (URL)

 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.

You might also like