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

CNN Complete Notes

Computer networks complete notes for students

Uploaded by

deepthim135
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

CNN Complete Notes

Computer networks complete notes for students

Uploaded by

deepthim135
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 66

KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

COMPUTER COMMUNICATION AND NETWORKS


III SEMESTER BCA

KRUPANIDHI DEGREE COLLEGE

~Mr. SAYED FAIZAL

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 1 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Course Code: 21BCA3C9L


Course Title: Computer Communication and Networks
Formative Assessment marks: 40 marks
Summative Assessment Marks: 60 marks

UNIT 1:
Introduction: Computer Networks and its applications, Network structure. Network architecture,
Topologies, LAN, WAN, MAN, The OSI reference model, The TCP/IP reference model.

UNIT 2:
The Physical Layer: Transmission Media Twisted pair, coaxial cable optical fiber, radio transmission,
microwaves and infrared transmission. Switching-message switching. Multiplexing.

UNIT 3:
The Data Link Layer: Data Link Layer design issues. Error detection Single parity checking. Checksum,
polynomial codes CRC. Error correction- Hamming code, Elementary data link protocols, sliding window
protocols

UNIT 4:
The Network Layer: Network layer design issues, Routing algorithms Flooding, Distance vector routing.
Hierarchical routing. Link state routing, Congestion, control algorithms Leaky bucket, token bucket
algorithm admission control. Hop by Hop choke packets.

UNIT 5:
The Transport Layer and Application Layer: Elements of Transport 5 service, Elements of Transport,
protocols, Internet transport protocols (TCP & UDP, DNS, Electronic Mailing, and World Wide Web.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 2 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

UNIT 1
INTRODUCTION
Introduction:
 A computer network is a digital telecommunications network which allows nodes to share resources.
 Computer networks, computing devices exchange data with each other using connections (data links)
between nodes.
 Computer networking as we know it today may be said to have gotten its start with the
 Arpanet development in the late 1960s and early 1970s
 A set of devices often mentioned as nodes connected by media link is called a Network.
 A node can be a device which is capable of sending or receiving data generated by other nodes on the
network like a computer, printer etc.
 These links connecting the devices are called Communication channels.

What is network?
 A network consists of two or more computers that are linked in order to share resources (such as
printers and CDs), exchange files, or allow electronic communications.
 A network is set of interconnected devices (sometime referred as nodes) which are used to transmit
data between them with agreed protocols.

What is Communication?
A Communication model is used to exchange data between two parties.
For example: communication between a computer, server and telephone (through modem).

What are the basic components of communication?

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 3 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Data/Message It is the primary part of the communication system.


The information is communicated between the source and destination is called
data/message.

Source The source is a device which generates and sends the data to the destination.
Destination It is a device that receives the data.
Medium It acts as carrier to carry the data from the source to the destination.
The carrier provides the path through wire or wireless.

Protocol It is set of rules that govern the data communication in a correct manner.

What is computer network?


 A computer network is a system in which multiple computers are connected to each other to share
information and resources.
 The physical connection between networked computing devices is established using either cable
media or wireless media.
 The best-known computer network is the Internet.

Explain the Application of computer network


The computer networks are used in different applications to meet the requirement of different people
at different places in different time.
The following are the uses of computer network
 Business Applications.
 Home Applications.
 Mobile Users
 Social issues.
Business Applications:
Many companies have a substantial number of computers.
Management may have decided to connect them to be able to extract and correlate information about the
entire company
Resource sharing: The main task of the connectivity of resources is resource sharing.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 4 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Information Sharing: large and medium-sized company and many small companies are vitally dependent on
computerized information.

Connecting People: another use of setting up a computer network has to do with people rather than
information or even computers.
E-commerce: many companies is doing business electronically with other companies, especially suppliers
and customers, and doing business with consumers over the Internet.

Home Applications.
The computer network provides better connectivity for home applications via desktop computers, laptops,
iPads, iPhones.
Some of the more popular uses of the internet for home users
 Access to remote information.
 peer-to-peer
 Interactive entertainment
 Electronic commerce.
Mobile Users:
 Wireless networks are of great value to fleets of trucks, taxis, delivery vehicles, and repairpersons
for keeping in contact with home. Wireless networks are also important to the military.
Social issues.
A popular feature of many networks are newsgroups or bulletin boards whereby people can exchange
messages with like-minded individuals.
The following are the issues in society due to the misbehave or misconduct of computer networks.
 Network neutrality
 Digital Millennium Copyright Act
 Profiling users
 Phishing

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 5 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Network structure
An organization can be structured in various ways that determine how it operates and performs.
The network structure is a newer type of organizational structure often viewed as less hierarchical (i.e.,
more flat), more decentralized, and more flexible than other structures.
In this structure, managers coordinate and control relations that are both internal and external to the firm.

Advantages of a Network Structure


 Proponents argue that the network structure is more agile compared to other structures (such as
functional areas, divisions, or even some teams).
 Communication is less siloed and flows freely, possibly opening up more opportunities for
innovation.
 Because the network structure is decentralized, it has fewer tiers in its organizational makeup, a
wider span of control, and a bottom-up flow of decision making and ideas.
 Disadvantages of a Network Structure
 On the other hand, this more fluid structure can lead to a more complex set of relationships in the
organization.
 For example, lines of accountability may be less clear, and reliance on external vendors can be quite
high.
 These potentially unpredictable variables essentially reduce the core company's control over its
operational success.

What is Network architecture


 Computer networks can be discriminated into various types such as Client-Server, peer-to-peer or
hybrid, depending upon its architecture.
 There can be one or more systems acting as Server. Other being Client, requests the Server to serve
requests. Server takes and processes request on behalf of Clients.
 Two systems can be connected Point-to-Point, or in back-to-back fashion. They both reside at the
same level and called peers.
 There can be hybrid network which involves network architecture of both the above types.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 6 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

What is topology?
Topology refer to geometrical arrangement of components/ devices.

What is network topology?


A network topology is the physical and logical arrangement of nodes and connections in a network.
Nodes usually include devices such as switches, routers and software with switch and router features.
Network topologies are often represented as a graph.

Explain types of network topology with advantages and disadvantages of each with
comparison?
Network Topology is the schematic description of a network arrangement, connecting various nodes
(sender and receiver) through lines of connection.
1. BUS Topology
2. RING Topology
3. STAR Topology
4. MESH Topology
5. TREE Topology
6. HYBRID Topology

BUS Topology
Bus topology is a network type in which every computer and network device is connected to single
cable.
When it has exactly two endpoints, then it is called Linear Bus topology.

Features of Bus Topology


It transmits data only in one direction.
Every device is connected to a single cable
Advantages of Bus Topology Disadvantages of Bus Topology
It is cost effective. Cables fails then whole network fails.
Cable required is least If network traffic is heavy or nodes are more the
Used in small networks. performance of the network decreases.
It is easy to understand. Cable has a limited length.
Easy to expand joining two cables together. It is slower than the ring topolog

RING Topology
It is called ring topology because it forms a ring as each computer is connected to another computer,
with the last one connected to the first.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 7 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Exactly two neighbors for each device.

Features of Ring Topology


 A number of repeaters are used for Ring topology with large number of nodes, because if someone
wants to send some data to the last node in the ring topology with 100 nodes, then the data will
have to pass through 99 nodes to reach the 100th node. Hence to prevent data loss repeaters are
used in the network.
 The transmission is unidirectional, but it can be made bidirectional by having 2 connections
between each Network Node, it is called Dual Ring Topology.
 In Dual Ring Topology, two ring networks are formed, and data flow is in opposite direction in
them. Also, if one ring fails, the second ring can act as a backup, to keep the network up.
 Data is transferred in a sequential manner that is bit by bit. Data transmitted, has to pass through
each node of the network, till the destination node.
Advantages of Ring Topology Disadvantages of Ring Topology
Transmitting network is not affected by high Troubleshooting is difficult in ring topology.
traffic or by adding more nodes, as only the Adding or deleting the computers disturbs the network
nodes having tokens can transmit data. activity.
Cheap to install and expand Failure of one computer disturbs the whole network.

STAR Topology
In this type of topology all the computers are connected to a single hub through a cable.
This hub is the central node and all others nodes are connected to the central node.

Features of Star Topology


 Every node has its own dedicated connection to the hub.
 Hub acts as a repeater for data flow.
 Can be used with twisted pair, Optical Fibre or coaxial cable.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 8 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Advantages of Star Topology Disadvantages of Star Topology


Fast performance with few nodes and low Cost of installation is high.
network traffic. Expensive to use.
Hub can be upgraded easily. If the hub fails then the whole network is
Easy to troubleshoot. stopped because all the nodes depend on the
Easy to setup and modify. hub.
Only that node is affected which has failed, rest Performance is based on the hub that is it
of the nodes can work smoothly. depends on its capacity

MESH Topology
It is a point-to-point connection to other nodes or devices. All the network nodes are connected to
each other. Mesh has n(n-1)/2 physical channels to link n devices.
There are two techniques to transmit data over the Mesh topology, they are :
 Routing
 Flooding

MESH Topology: Routing


In routing, the nodes have a routing logic, as per the network requirements. Like routing logic to
direct the data to reach the destination using the shortest distance. Or, routing logic which has information
about the broken links, and it avoids those node etc. We can even have routing logic, to re-configure the
failed nodes.

MESH Topology: Flooding


In flooding, the same data is transmitted to all the network nodes, hence no routing logic is required.
The network is robust, and the its very unlikely to lose the data. But it leads to unwanted load over the
network.

Types of Mesh Topology


Partial Mesh Topology :
In this topology some of the systems are connected in the same fashion as mesh topology but some
devices are only connected to two or three devices.

Full Mesh Topology :


Each and every nodes or devices are connected to each other.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 9 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Features of Mesh Topology


 Fully connected.
 Robust.
 Not flexible.

Advantages of Mesh Topology Disadvantages of Mesh Topology


Each connection can carry its own data load. Installation and configuration is difficult.
It is robust. Cabling cost is more.
Fault is diagnosed easily. Bulk wiring is required.
Provides security and privacy.

TREE Topology
It has a root node and all other nodes are connected to it forming a hierarchy. It is also called
hierarchical topology.
It should at least have three levels to the hierarchy.

Features of Tree Topology


 Ideal if workstations are located in groups.
 Used in Wide Area Network.

Advantages of Tree Topology Disadvantages of Tree Topology

Extension of bus and star topologies. Heavily cabled.


Expansion of nodes is possible and easy. Costly.
Easily managed and maintained. If more nodes are added maintenance is difficult.
Error detection is easily done. Central hub fails, network fails.

HYBRID Topology
It is two different types of topologies which is a mixture of two or more topologies.
For example if in an office in one department ring topology is used and in another star topology is used,
connecting these topologies will result in Hybrid Topology (ring topology and star topology).

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 10 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Features of Hybrid Topology


 It is a combination of two or topologies
 Inherits the advantages and disadvantages of the topologies included

Advantages of Hybrid Topology Disadvantages of Hybrid Topology


Reliable as Error detecting and trouble shooting is Complex in design.
easy. Costly.
Effective.
Scalable as size can be increased easily.
Flexible.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 11 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 12 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

11. Explain the types of networks with advantages and disadvantages of each with
comparison?
A computer network is a set of computers sharing resources located on or provided by network nodes.
The computers use common communication protocols over digital interconnections to communicate with each other.

Local Area Network (LAN)


 It is also called LAN and designed for small physical areas such as an office, group of buildings or
a factory.
 LANs are used widely as it is easy to design and to troubleshoot.
 Personal computers and workstations are connected to each other through LANs.
 We can use different types of topologies through LAN, these are Star, Ring, Bus, Tree etc.
 LAN can be a simple network like connecting two computers, to share files and network among each
other while it can also be as complex as interconnecting an entire building.
 LAN networks are also widely used to share resources like printers, shared hard-drive etc.

Characteristics of LAN
 LAN's are private networks, not subject to tariffs or other regulatory controls.
 LAN's operate at relatively high speed when compared to the typical WAN.
 There are different types of Media Access Control methods in a LAN, the prominent ones are
Ethernet, Token ring.
 It connects computers in a single building, block or campus, i.e. they work in a restricted
geographical area.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 13 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Applications of LAN
 One of the computer in a network can become a server serving all the remaining computers called
clients.
 Connecting Locally all the workstations in a building to let them communicate with each other
locally without any internet access.
 Sharing common resources like printers etc are some common applications of LAN.

Metropolitan Area Network (MAN)


 It was developed in 1980s.It is basically a bigger version of LAN.
 It is also called MAN and uses the similar technology as LAN.
 It is designed to extend over the entire city. It can be means to connecting a number of LANs into
a larger network or it can be a single cable.
 It is mainly hold and operated by single private company or a public company.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 14 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Characteristics of MAN
 It generally covers towns and cities (50 km)
 Communication medium used for MAN are optical fibers, cables etc.
 Data rates adequate for distributed computing applications.

Wide Area Network (WAN)


 It is also called WAN. WAN can be private or it can be public leased network.
 It is used for the network that covers large distance such as cover states of a country.
 It is not easy to design and maintain.
 Communication medium used by WAN are PSTN or Satellite links.
 WAN operates on low data rates.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 15 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Characteristics of WAN
 It generally covers large distances (states, countries, continents).
 Communication medium used are satellite, public telephone networks which are connected by routers.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 16 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

The most important reference models are:


OSI reference model.
TCP/IP reference model.

Explain OSI reference model with neat diagram.


 There are many users who use computer network and are located all over the world.
 To ensure national and worldwide data communication ISO (ISO stands for International
Organization of Standardization.) developed this model. This is called a model for open system
interconnection (OSI) and is normally called as OSI model.
 OSI model architecture consists of seven layers.It defines seven layers or levels in a complete
communication system.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 17 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

OSI model acts as a reference model and is not implemented on the Internet because of its late invention.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 18 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Explain TCP/IP reference model with diagram.


 TCP/IP is transmission control protocol and internet protocol.
 Protocols are set of rules which govern every possible communication over the internet.
 These protocols describe the movement of data between the host computers or internet and offers
simple naming and addressing schemes.
 TCP Characteristics
 Here, are the essential characteristics of TCP IP protocol:
 Support for a flexible TCP/IP architecture
 Adding more system to a network is easy.
 In TCP IP protocols suite, the network remains intact until the source, and destination machines
were functioning properly.
 TCP is a connection-oriented protocol.
 TCP offers reliability and ensures that data which arrives out of sequence should put back into order.
 TCP allows you to implement flow control, so sender never overpowers a receiver with data.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 19 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

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.

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.

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


 Routing protocols
 Multicast group management 3. Network-layer address assignment.

OSI Model TCP/IP model


It is developed by ISO (International Standard It is developed by ARPANET (Advanced Research
Organization) Project Agency Network).
OSI model provides a clear distinction between TCP/IP doesn’t have any clear distinguishing points
interfaces, services, and protocols. between services, interfaces, and protocols.
OSI refers to Open Systems Interconnection. TCP refers to Transmission Control Protocol.
OSI uses the network layer to define routing TCP/IP uses only the Internet layer.
standards and protocols.
OSI follows a vertical approach. TCP/IP follows a horizontal approach.

OSI model use two separate layers physical and TCP/IP uses only one layer (link). link to define the
data 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-
connectionoriented. oriented and connectionless.
In the OSI model, the data link layer and physical In TCP, physical and data link are both
are separate layers. combined as a single host-to-
network layer.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 20 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Most Common TCP/IP Protocols Some widely used most common TCP/IP protocol are:
 TCP:
Transmission Control Protocol is an internet protocol suite which breaks up the message into TCP
Segments and reassembling them at the receiving side.
 IP:
An Internet Protocol address that is also known as an IP address is a numerical label. It is assigned
to each device that is connected to a computer network which uses the IP for communication. Its
routing function allows internetworking and essentially establishes the Internet. Combination of IP
with a TCP allows developing a virtual connection between a destination and a source.
 HTTP:
The Hypertext Transfer Protocol is a foundation of the World Wide Web. It is used for transferring
webpages and other such resources from the HTTP server or web server to the web client or the
HTTP client. Whenever you use a web browser like Google Chrome or Firefox, you are using a web
client. It helps HTTP to transfer web pages that you request from the remote servers.
 SMTP:
SMTP stands for Simple mail transfer protocol. This protocol supports the e-mail is known as a
simple mail transfer protocol. This protocol helps you to send the data to another e-mail address.
 SNMP:
SNMP stands for Simple Network Management Protocol. It is a framework which is used for
managing the devices on the internet by using the TCP/IP protocol.
 DNS:
DNS stands for Domain Name System. An IP address that is used to identify the connection of a
host to the internet uniquely. However, users prefer to use names instead of addresses for that DNS.
 TELNET:
TELNET stands for Terminal Network. It establishes the connection between the local and remote
computer. It established connection in such a manner that you can simulate your local system at the
remote system.
 FTP:
FTP stands for File Transfer Protocol. It is a mostly used standard protocol for transmitting the files
from one machine to another.

Advantages of the TCP/IP model


 Here, are pros/benefits of using the TCP/IP model:
 It helps you to establish/set up a connection between different types of computers.
 It operates independently of the operating system.
 It supports many routing-protocols.
 It enables the internetworking between the organizations.
 TCP/IP model has a highly scalable client-server architecture.
 It can be operated independently.
 Supports a number of routing protocols.
 It can be used to establish a connection between two computers.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 21 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Disadvantages of the TCP/IP model


 Here, are few drawbacks of using the TCP/IP model:
 TCP/IP is a complicated model to set up and manage.
 The shallow/overhead of TCP/IP is higher-than IPX (Internetwork Packet Exchange).
 In this, model the transport layer does not guarantee delivery of packets.
 Replacing protocol in TCP/IP is not easy.
 It has no clear separation from its services, interfaces, and protocols.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 22 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

UNIT 2
PHYSICAL LAYER

What is Physical Layer?


Physical Layer is the bottom-most layer in the Open System Interconnection (OSI) Model which
is a physical and electrical representation of the system.
It consists of various network components such as power plugs, connectors, receivers, cable types, etc.

What is transmission media?


Transmission medium is a physical path between the transmitter and the receiver
it is the channel through which data is sent from one place to another

Guided Media:
It is also referred to as Wired or Bounded transmission media. Signals being transmitted are
directed and confined in a narrow pathway by using physical links.
Features:
 High Speed
 Secure
 Used for comparatively shorter distances

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 23 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

1. Twisted Pair Cable


It consists of 2 separately insulated conductor wires wound about each other.
Twisted Pair is of two types:

This type of cable has the ability to block This type of cable consists of a special jacket to
interference and does not depend on a block external interference.
physical shield for this purpose It is used in fast-data-rate Ethernet and in voice and
It is used for telephonic applications. data channels of telephone lines.

Advantages: Advantages:
⇢ Least expensive ⇢ Better performance at a higher data rate in
⇢ Easy to install comparison to UTP ⇢ Eliminates crosstalk
⇢ High-speed capacity ⇢ Comparatively faster

Disadvantages: Disadvantages:
⇢ Susceptible to external interference ⇢ Comparatively difficult to install and
⇢ Lower capacity and performance in manufacture ⇢ More expensive
comparison to STP ⇢ Bulky
⇢ Short distance transmission due to
attenuation

Applications: Applications:
Used in telephone connections and LAN Shielding the interior components.
networks

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 24 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

2. Coaxial Cable
It has an outer plastic covering containing an insulation layer made of PVC.
The coaxial cable transmits information in two modes:
Baseband mode(dedicated cable bandwidth) and
Broadband mode(cable bandwidth is split into separate ranges)
Cable TVs and analog television networks widely use Coaxial cables.

Advantages: Disadvantages:
High Bandwidth Single cable failure can disrupt the entire
Better noise Immunity network
Easy to install and expand
Inexpensive
Applications:
Radio frequency signals are sent over coaxial wire.
It can be used for cable television signal distribution etc

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 25 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

3. Optical Fiber Cable


It uses the concept of refraction of light through a core made up of glass or plastic
The core is surrounded by a less dense glass or plastic covering called the cladding.
It is used for the transmission of large volumes of data.
The cable can be unidirectional or bidirectional

Advantages: Disadvantages:
Increased capacity and bandwidth Difficult to install and maintain
Lightweight High cost
Less signal attenuation Fragile
Immunity to electromagnetic interference
Resistance to corrosive materials

Uses of Optical Fibre


Medical Industry.
Communication.
Defence.
Industries.
Broadcasting.
Lighting and Decorations.
Mechanical Inspections.

Unguided Media:
 It is also referred to as Wireless or Unbounded transmission media.
 No physical medium is required for the transmission of electromagnetic signals.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 26 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Features:
 The signal is broadcasted through air
 Less Secure
 Used for larger distances

Radio waves
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 Radio waves for
transmission.

Microwaves
It is a line of sight transmission
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.

Infrared Wave
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.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 27 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

What is switching?
Switching is process to forward packets coming in from one port to a port leading towards
the destination.
When data comes on a port it is called ingress, and when data leaves a port or goes out it is called
egress.
A communication system may include number of switches and nodes.

Message Switching
The whole message is treated as a data unit and is switching / transferred in its entirety.
A switch working on message switching, first receives the whole message and buffers it until there
are resources available to transfer it to the next hop.
If the next hop is not having enough resource to accommodate large size message, the message is
stored and switch waits.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 28 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

This technique was considered substitute to circuit switching.


As in circuit switching the whole path is blocked for two entities only.
Message switching is replaced by packet switching.

Message switching has the following drawbacks:


 Every switch in transit path needs enough storage to accommodate entire message.
 Because of store-and-forward technique and waits included until resources are available,
message switching is very slow.
 Message switching was not a solution for streaming media and real-time applications.

Packet Switching
 The entire message is broken down into smaller chunks called packets.
 The switching information is added in the header of each packet and transmitted
independently.
 Packet switching enhances line efficiency as packets from multiple applications can be
multiplexed over the carrier.
 The internet uses packet switching technique. Packet switching enables the user to
differentiate data streams based on priorities.
 Packets are stored and forwarded according to their priority to provide quality of service.

What is Multiplexing?
Multiplexing is a technique by which different analog and digital streams of transmission can
be simultaneously processed over a shared link.
Multiplexing divides the high capacity medium into low capacity logical medium which is then
shared by different streams.
Communication is possible over the air (radio frequency), using a physical media (cable), and light
(optical fiber).
All mediums are capable of multiplexing.
When multiple senders try to send over a single medium, a device called Multiplexer divides the
physical channel and allocates one to each.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 29 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Frequency Division Time Division Wavelength Code Division


Multiplexing Multiplexing Division Multiplexing
Multiplexing

FDM divides the TDM the shared Multiple optical FDM divides the
spectrum or carrier channel is divided among carrier signals are frequency in smaller
bandwidth in logical its user by means of time multiplexed into an channels but CDM
channels and allocates slot. Each user can optical fiber by using allows its users to full
one user to each channel transmit data within the different wavelengths. bandwidth and transmit
provided time slot only. signals all the time using a
unique code.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 30 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

UNIT 3
DATA LINK LAYER

What is Data Link Layer?


 Data Link Layer is second layer of OSI Layered Model.
 One of the most complicated layers and has complex functionalities and liabilities.
 Hides the details of underlying hardware and represents itself to upper layer as the medium
to communicate.
 Works between two hosts which are directly connected in some sense.
 Responsible for converting data stream to signals bit by bit and to send that over the
underlying hardware.

Data link layer has two sub-layers:


 Logical Link Control: It deals with protocols, flow-control, and error control
 Media Access Control: It deals with actual control of media

Functionality of Data-link Layer


Data link layer does many tasks on behalf of upper layer. These are:
 Framing
Data-link layer takes packets from Network Layer and encapsulates them into Frames.
Then, it sends each frame bit-by-bit on the hardware.
At receiver’ end, data link layer picks up signals from hardware and assembles them into
frames.
 Addressing
Data-link layer provides layer-2 hardware addressing mechanism.
Hardware address is assumed to be unique on the link.
It is encoded into hardware at the time of manufacturing.
 Synchronization
When data frames are sent on the link, both machines must be synchronized in order to
transfer to take place.
 Error Control
Sometimes signals may have encountered problem in transition and the bits are flipped.
These errors are detected and attempted to recover actual data bits. It also provides error
reporting mechanism to the sender.
 Flow Control
Stations on same link may have different speed or capacity.
Data-link layer ensures flow control that enables both machine to exchange data on same
speed.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 31 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

 Multi-Access
When host on the shared link tries to transfer the data, it has a high probability of collision.
Data-link layer provides mechanism such as CSMA/CD to equip capability of accessing a
shared media among multiple Systems.

Design issues with data link layer.


Services provided to the network layer
The data link layer act as a service interface to the network layer.
The principle service is transferring data from network layer on sending machine to the network
layer on destination machine.
This transfer also takes place via DLL (Data link-layer).
 Frame synchronization
The source machine sends data in the form of blocks called frames to the destination machine.
The starting and ending of each frame should be identified so that the frame can be
recognized by the destination machine.
 Flow control
Flow control is done to prevent the flow of data frame at the receiver end.
The source machine must not send data frames at a rate faster than the capacity of destination
machine to accept them.
 Error control
Error control is done to prevent duplication of frames.
The errors introduced during transmission from source to destination machines must be
detected and corrected at the destination machine.

Error Detection & Correction


Error: A condition when the receiver’s information does not match with the sender’s information.
 Many reasons such as noise, cross-talk etc., which may help data to get corrupted during
transmission.
 Upper layers work on some generalized view of network architecture and are not aware of
actual hardware data processing.
 The upper layers expect error-free transmission between the systems.
 Most of the applications would not function expectedly if they receive erroneous data.
 Applications such as voice and video may not be that affected and with some errors they may
still function well.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 32 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Types of Errors
There may be three types of errors:
Single bit error

In a frame, there is only one bit, anywhere though, which is corrupt.

Multiple bits error

Frame is received with more than one bits in corrupted state.

Burst error

Frame contains more than1 consecutive bits corrupted.

Error control mechanism may involve two possible ways:


Error detection
Error correction
Error Detection
 Errors in the received frames are detected by means of Parity Check and Cyclic Redundancy
Check (CRC).
 Few extra bits are sent along with actual data to confirm that bits received at other end are
same as they were sent.
 If the counter-check at receiver’ end fails, the bits are considered corrupted.

1. Simple Parity check


Blocks of data from the source are subjected to a check bit or parity bit generator form, where a
parity of :
 1 is added to the block if it contains odd number of 1’s, and
 0 is added if it contains even number of 1’s
 This scheme makes the total number of 1’s even, that is why it is called even parity checking.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 33 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Two-dimensional Parity check


 Parity check bits are calculated for each row, which is equivalent to a simple parity check
bit.
 Parity check bits are also calculated for all columns, then both are sent along with the data.
 At the receiving end these are compared with the parity bits calculated on the received data.

Checksum
 In checksum error detection scheme, the data is divided into k segments each of m bits.
 In the sender’s end the segments are added using 1’s complement arithmetic to get the sum.
The sum is complemented to get the checksum.
 The checksum segment is sent along with the data segments.
 At the receiver’s end, all received segments are added using 1’s complement arithmetic to
get the sum. The sum is complemented.
 If the result is zero, the received data is accepted; otherwise discarded.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 34 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Cyclic redundancy check (CRC)


 Unlike checksum scheme, which is based on addition, CRC is based on binary division.
 In CRC, a sequence of redundant bits, called cyclic redundancy check bits, are appended to
the end of data unit so that the resulting data unit becomes exactly divisible by a second,
predetermined binary number.
 At the destination, the incoming data unit is divided by the same number. If at this step there
is no remainder, the data unit is assumed to be correct and is therefore accepted.
 A remainder indicates that the data unit has been damaged in transit and therefore must be
rejected.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 35 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Example :

Error Correction
 Error Detection, the receiver only needs to know that the received code word is invalid;
Error Correction the receiver needs to guess the Original code word that is sent.
 Error Correction is much more difficult than Error Detection.
 The need for redundant bits is more during error correction rather than for error detection.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 36 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

In the digital world, error correction can be done in two ways:


 Backward Error Correction
When the receiver detects an error in the data received, it requests back the sender to
retransmit the data unit.

 Forward Error Correction


When the receiver detects some error in the data received, it executes error-correcting
code, which helps it to auto-recover and to correct some kinds of errors.

What is Parity?
A parity bit is a bit appended to a data of binary bits to ensure that the total number of 1’s in
the data is even or odd.
Parity bits are used for error detection.
There are two types of parity bits:
 Even parity bit:
For a given set of bits, the number of 1’s are counted.
If that count is odd, the parity bit value is set to 1, making the total count of occurrences of
1’s an even number.
If the total number of 1’s in a given set of bits is already even, the parity bit’s value is 0.
 Odd Parity bit :
For a given set of bits, the number of 1’s are counted.
If that count is even, the parity bit value is set to 1, making the total count of occurrences of
1’s an odd number.
If the total number of 1’s in a given set of bits is already odd, the parity bit’s value is 0.

Hamming Code
 It is a technique developed by R.W. hamming.
 This can be applied to data units of any length.
 This code mainly uses the relationship between data and redundancy bits.
 The hamming code technique, which is an error-detection and error-correction
technique, was proposed by R.W. Hamming.
 Whenever a data packet is transmitted over a network, there are possibilities that the data bits
may get lost or damaged during transmission.

General Algorithm of hamming code


1. Hamming Code is simply the use of extra parity bits to allow the identification of an error.
2. Write the bit positions starting from 1 in binary form (1, 10, 11, 100, etc).
3. All the bit positions that are a power of 2 are marked as parity bits (1, 2, 4, 8, etc).
4. All the other bit positions are marked as data bits.
5. Each data bit is included in a unique set of parity bits, as determined its bit position in binary
form.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 37 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

6. Parity bit 1 covers all the bits positions whose binary representation includes a 1 in the least
significant position (1, 3, 5, 7, 9, 11, etc).
7. Parity bit 2 covers all the bits positions whose binary representation includes a 1 in the second
position from the least significant bit (2, 3, 6, 7, 10, 11, etc).
8. Parity bit 4 covers all the bits positions whose binary representation includes a 1 in the third
position from the least significant bit (4–7, 12–15, 20–23, etc).
9. Parity bit 8 covers all the bits positions whose binary representation includes a 1 in the fourth
position from the least significant bit bits (8–15, 24–31, 40–47, etc).
10. In general, each parity bit covers all bits where the bitwise AND of the parity position and
the bit position is non-zero.
11. Since we check for even parity set a parity bit to 1 if the total number of ones in the positions
it checks is odd.
12. Set a parity bit to 0 if the total number of ones in the positions it checks is even.

Determining the position of redundant bits


These redundancy bits are placed at positions that correspond to the power of 2. As in the above
example:
The number of data bits = 7
The number of redundant bits = 4
The total number of bits = 11
The redundant bits are placed at positions corresponding to power of 2- 1, 2, 4, and 8

2r >= m+r+1; where r = redundant bit & m = data bit.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 38 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Hamming Code in Error Detection


7-bit Hamming code which is 1011011.
The first step is to identify the bit position of the data & all the bit positions which are powers of 2
are marked as parity bits (e.g. 1, 2, 4, 8, etc.).
The received hamming code of 7 bits.

First, we need to detect whether there are any errors in this received hamming code.
Step 1: For checking parity bit P1, use check one and skip one method, which means, starting from
P1 and then skip P2, take D3 then skip P4 then take D5, and then skip D6 and take D7, this way we
will have the following bits,

As we can observe the total number of bits is odd so we will write the value of parity bit as P1 = 1.
This means the error is there.

Step 2: Check for P2 but while checking for P2, we will use the check two and skip two methods,
which will give us the following data bits. But remember since we are checking for P2, so we have
to start our count from P2 (P1 should not be considered).

As we can observe that the number of 1's are even, then we will write the value of P2 =
0. This means there is no error.

Step 3: Check for P4 but while checking for P4, we will use the check four and skip four methods,
which will give us the following data bits. But remember since we are checking for P4, so we have
started our count from P4(P1 & P2 should not be considered).

As we can observe that the number of 1's is odd, then we will write the value of P4 = 1. This means
the error is there.
So, from the above parity analysis, P1 & P4 are not equal to 0, so we can clearly say that the received
hamming code has errors.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 39 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Hamming Code: Error Correction


Since we found that the received code has an error, so now we must correct them. To correct the
errors, use the following steps:
Now the error word E will be:

Now we have to determine the decimal value of this error word 101 which is 5 (22 *1 + 21 * 0 + 20
*1 = 5).
We get E = 5, which states that the error is in the fifth data bit. To correct it, just invert the fifth data
bit.
So the correct data will be:

Elementary data link protocols

Simplest Protocol

It is very simple.
The sender sends a sequence of frames without even thinking about the receiver.
Data are transmitted in one direction only.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 40 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Both sender & receiver always ready.


Processing time can be ignored.
Infinite buffer space is available.
The communication channel between the data link layers never damages or loses frames.
The utopia protocol is unrealistic because it does not handle either flow control or error
correction

Stop-and-wait Protocol

The sender sends one frame and waits for feedback from the receiver.
When the ACK arrives, the sender sends the next frame
It is Stop-and-Wait Protocol because the sender sends one frame, stops until it receives confirmation
from the receiver (okay to go ahead), and then sends the next frame.
We still have unidirectional communication for data frames, but auxiliary ACK frames (simple
tokens of acknowledgment) travel from the other direction.
We add flow control to our previous protocol.

NOISY CHANNELS
Although the Stop-and-Wait Protocol gives us an idea of how to add flow control to its predecessor,
noiseless channels are nonexistent. We can ignore the error (as we sometimes do), or we need to add
error control to our protocols. We discuss three protocols in this section that use error control.

Sliding Window Protocols :


 Stop-and-Wait Automatic RepeatRequest
 Go-Back-N Automatic RepeatRequest
 Selective Repeat Automatic Repeat Request

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 41 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Stop-and-Wait Automatic RepeatRequest


Stop – and – wait Automatic Repeat Request (Stop – and – Wait ARQ) is a variation of the above
protocol with added error control mechanisms, appropriate for noisy channels.
The sender keeps a copy of the sent frame. It then waits for a finite time to receive a positive
acknowledgement from receiver.
If the timer expires or a negative acknowledgement is received, the frame is retransmitted.
If a positive acknowledgement is received then the next frame is sent.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 42 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Go-Back-N Automatic RepeatRequest


Go – Back – N ARQ provides for sending multiple frames before receiving the acknowledgement
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 acknowledgement of a frame is not received within the time period, all frames starting from
that frame are retransmitted

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 43 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Selective Repeat Automatic Repeat Request


This protocol also provides for sending multiple frames before receiving the acknowledgement for
the first frame.
However, here only the erroneous or lost frames are retransmitted, while the good frames are
received and buffered.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 44 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

UNIT 4
NETWORK LAYER
Introduction
Network layer is majorly focused on getting packets from the source to the destination,
routing error handling and congestion control.

Various functions

 Addressing: Maintains the address at the frame header of both source and destination
and performs addressing to detect various devices in network.
 Packeting: This is performed by Internet Protocol. The network layer converts the
packets from its upper layer.
 Routing: It is the most important functionality. The network layer chooses the most
relevant and best path for the data transmission from source to destination.
 Inter-networking: It works to deliver a logical connection across multiple devices.

Network layer design issue


The network layer comes with some design issues they are described as follows:

 Store and Forward packet switching


 Services provided to Transport Layer
 Implementation of Connectionless Service
 Implementation of Connection Oriented service

Store and Forward packet switching:


 The host sends the packet to the nearest router.
 This packet is stored there until it has fully arrived once the link is fully processed by
verifying the checksum then it is forwarded to the next router till it reaches the destination.
 This mechanism is called “Store and Forward packet switching.”

Services provided to Transport Layer


 The network layer transfers it’s services to the transport layer
 Offering services must not depend on router technology.
 The transport layer needs to be protected from the type, number and topology of the
available router.
 The network addresses for the transport layer should use uniform numbering pattern
also at LAN and WAN connections.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 45 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

2 types of services provided:


 Connectionless – The routing and insertion of packets into subnet is done individually.
No added setup is required.
 Connection-Oriented – Subnet must offer reliable service and all the packets must be
transmitted over a single route.

Implementation of Connectionless Service
 Packet are termed as “datagrams” and corresponding subnet as “datagram subnets”.
 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 transmits each packet to router via. a few protocol.
 Each data packet has destination address and is routed independently irrespective of the
packets.
 An example of connectionless service is Internet Protocol or IP.

Implementation of Connection Oriented service:


 a path or route called a virtual circuit is setup between the source and the destination nodes
before the transmission starts.
 All the packets in the message are sent along this route.
 Each packet contains an identifier that denotes the virtual circuit to which it belongs to. When
all the packets are transmitted, the virtual circuit is terminated and the connection is released.
 An example of connection − oriented service is MultiProtocol Label Switching (MPLS)

Routing Algorithms
The main function of NL (Network Layer) is routing packets from the source machine to the
destination machine.

Routing algorithms can be grouped into two major classes:


 nonadaptive (Static Routing)
 adaptive. (Dynamic Routing)

Nonadaptive algorithm do not base their routing decisions on measurements or estimates of the
current traffic and topology. Instead, the choice of the route to use to get from I to J is computed in
advance, off line, and downloaded to the routers when the network is booted.
This procedure is sometimes called static routing.

Adaptive algorithm, in contrast, change their routing decisions to reflect changes in the topology,
and usually the traffic as well.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 46 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Different Routing Algorithms


 Optimality principle
 Shortest path algorithm
 Flooding
 Distance vector routing
 Link state routing
 Hierarchical Routing

Flooding
 Another static algorithm is flooding, in which every incoming packet is sent out on every
outgoing line except the one it arrived on.
 Flooding obviously generates vast numbers of duplicate packets, in fact, an infinite number
unless some measures are taken to damp the process.
 One such measure is to have a hop counter contained in the header of each packet, which is
decremented at each hop, with the packet being discarded when the counter reaches zero.
Ideally, the hop counter should be initialized to the length of the path from source to
destination.
 A variation of flooding that is slightly more practical is selective flooding. In this algorithm
the routers do not send every incoming packet out on every line, only on those lines that are
going approximately in the right direction.
 Flooding is not practical in most applications.

Distance Vector Routing


 Each router periodically shares knowledge about the entire network with its neighbours in
this routing scheme.
 Each router has a table with information about the network.
 These tables are updated by exchanging information with the immediate neighbours.
 It is also known as Belman-Ford or Ford-Fulkerson Algorithm.
 It is used in the original ARPANET and the Internet as RIP.

Mainly 3 things in this

 Initialization
 Sharing
 Updating

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 47 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Initialization of tables in distance vector routing

Updating in distance vector routing

Final Diagram

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 48 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Link State Routing


Link state routing is based on the assumption that, although the global knowledge about the
topology is not clear, each node has partial knowledge: it knows the state (type, condition, and
cost) of its links.
In other words, the whole topology can be compiled from the partial knowledge of each node

Building Routing Tables


1. Creation of the states of the links by each node, called the link state packet (LSP).
2. Dissemination of LSPs to every other router, called flooding, in an efficient and reliable way.
3. Formation of a shortest path tree for each node.
4. Calculation of a routing table based on the shortest path tree

1. Creation of Link State Packet (LSP)


A link state packet can carry a large amount of information.
For the moment, we assume that it carries a minimum amount of data: the node identity, the list
of links, a sequence number, and age.
The first two, node identity and the list of links, are needed to make the topology.
The third, sequence number, facilitates flooding and distinguishes new LSPs from old ones.
The fourth, age, prevents old LSPs from remaining in the domain for a long time.
LSPs are generated on two occasions:
1. When there is a change in the topology of the domain
2. on a periodic basis: The period in this case is much longer compared to distance vector. The
timer set for periodic dissemination is normally in the range of 60 min or 2 h based on the
implementation. A longer period ensures that flooding does not create too much traffic on
the network.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 49 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

2. Flooding of LSPs:
After a node has prepared an LSP, it must be disseminated to all other nodes, not only to its
neighbors.
The process is called flooding and based on the following
1. The creating node sends a copy of the LSP out of each interface
2. A node that receives an LSP compares it with the copy it may already have. If the newly
arrived LSP is older than the one it has (found by checking the sequence number), it
discards the LSP. If it is newer, the node does the following:
a. It discards the old LSP and keeps the new one.
b. It sends a copy of it out of each interface except the one from which the packet arrived.
This guarantees that flooding stops somewhere in the domain (where a node has only one
interface).
3. Formation of Shortest Path Tree: Dijkstra Algorithm
A shortest path tree is a tree in which the path between the root and every other node is the
shortest.
The Dijkstra algorithm creates a shortest path tree from a graph.
The algorithm divides the nodes into two sets: tentative and permanent.
It finds the neighbors of a current node, makes them tentative, examines them, and if they
pass the criteria, makes them permanent.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 50 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Hierarchical Routing
 As networks grow in size, the router routing tables grow proportionally.
 Not only is router memory consumed by ever-increasing tables, but more CPU time is needed to scan
them and more bandwidth is needed to send status reports about them.
 At a certain point, the network may grow to the point where it is no longer feasible for every router
to have an entry for every other router, so the routing will have to be done hierarchically, as it is in
the telephone network.
 The routers are divided into what we will call regions.
 Each router knows all the details about how to route packets to destinations within its own region but
knows nothing about the internal structure of other regions.
 For huge networks, a two-level hierarchy may be insufficient; it may be necessary to group the
regions into clusters, the clusters into zones, the zones into groups, and so on, until we run out of
names for aggregations

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 51 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

 When a single network becomes very large, an interesting question is ‘‘how many levels should the
hierarchy have?’’
 For example, consider a network with 720 routers. If there is no hierarchy, each router needs 720
routing table entries.
 If the network is partitioned into 24 regions of 30 routers each, each router needs 30 local entries plus
23 remote entries for a total of 53 entries.
 If a three-level hierarchy is chosen, with 8 clusters each containing 9 regions of 10 routers, each router
needs 10 entries for local routers, 8 entries for routing to other regions within its own cluster, and 7
entries for distant clusters, for a total of 25 entries
 Kamoun and Kleinrock (1979) discovered that the optimal number of levels for an N router network
is ln N, requiring a total of e ln N entries per router

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 52 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

What is congestion?
A state occurring in network layer when the message traffic is so heavy that it slows down network
response time.

Effects of Congestion
As delay increases, performance decreases.
If delay increases, retransmission occurs, making situation worse.

Congestion control algorithms


 Congestion Control is a mechanism that controls the entry of data packets into the network,
enabling a better use of a shared network infrastructure and avoiding congestive collapse.
 Congestive-Avoidance Algorithms (CAA) are implemented at the TCP layer as the
mechanism to avoid congestive collapse in a network.

There are two congestion control algorithm which are as follows:

1. Leaky Bucket Algorithm


 The leaky bucket algorithm discovers its use in the context of network traffic shaping or rate-
limiting.
 A leaky bucket execution and a token bucket execution are predominantly used for traffic
shaping algorithms.
 This algorithm is used to control the rate at which traffic is sent to the network and shape the
burst traffic to a steady traffic stream.
 The disadvantages compared with the leaky-bucket algorithm are the inefficient use of available
network resources.
 The large area of network resources such as bandwidth is not being used effectively.

Let us consider an example to understand


Imagine a bucket with a small hole in the bottom.No matter at what rate water enters the
bucket, the outflow is at constant rate.When the bucket is full with water additional water entering
spills over the sides and is lost.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 53 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

 Similarly, each network interface contains a leaky bucket and the following steps are
involved in leaky bucket algorithm:
 When host wants to send packet, packet is thrown into the bucket.
 The bucket leaks at a constant rate, meaning the network interface transmits packets at a
constant rate.
 Bursty traffic is converted to a uniform traffic by the leaky bucket.
 In practice the bucket is a finite queue that outputs at a finite rate.

2. Token bucket Algorithm


 The leaky bucket algorithm has a rigid output design at an average rate independent of the
bursty traffic.
 In some applications, when large bursts arrive, the output is allowed to speed up. This calls
for a more flexible algorithm, preferably one that never loses information. Therefore, a token
bucket algorithm finds its uses in network traffic shaping or rate-limiting.
 It is a control algorithm that indicates when traffic should be sent. This order comes based
on the display of tokens in the bucket.
 The bucket contains tokens. Each of the tokens defines a packet of predetermined size.
Tokens in the bucket are deleted for the ability to share a packet.
 When tokens are shown, a flow to transmit traffic appears in the display of tokens.
 No token means no flow sends its packets. Hence, a flow transfers traffic up to its peak burst
rate in good tokens in the bucket.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 54 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

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:


 In regular intervals tokens are thrown into the bucket. ƒ
 The bucket has a maximum capacity. ƒ
 If there is a ready packet, a token is removed from the bucket, and the packet is sent.
 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.

Formula:
M*s=C+ρ*s
where S – is time taken
M – Maximum output rate
ρ – Token arrival rate
C – Capacity of the token bucket in byte

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 55 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Ways in which token bucket is superior to leaky bucket:


 The leaky bucket algorithm controls the rate at which the packets are introduced in the
network, but it is very conservative in nature.
 Some flexibility is introduced in the token bucket algorithm.
 In the token bucket, algorithm tokens are generated at each tick (up to a certain limit).
 For an incoming packet to be transmitted, it must capture a token and the transmission takes
place at the same rate.
 Hence some of the busty packets are transmitted at the same rate if tokens are available and
thus introduces some amount of flexibility in the system.

Choke Packets:
This approach can be used in virtual circuits as well as in the datagram subnets. In this
technique, each router associates a real variable with each of its output lines.

Hop-by-hop choke packets:


 This technique is an advancement over the Choked packet method.
 At high speed over long distances, sending a packet back to the source doesn’t help
much, because by the time the choke packet reaches the source, already a lot of
packets destined for the same original the destination would be out from the source.

So, to help this, Hop-by-Hop Choke packets are used.


 Over long distances or at high speeds choke p y packets are not very effective.
 A more efficient the method is to send choke packets hop-by-hop.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 56 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

UNIT 5
TRANSPORT LAYER AND APPLICATION LAYER

INTORDUCTION
 The transport layer is a conceptual division of methods in the layered architecture of
protocols in the network stack in the Internet protocol suite and the OSI model.
 An application layer is an abstraction layer that specifies the shared communications
protocols and interface methods used by hosts in a communications network

Transport Entity:
The hardware and/or software which make use of services provided by the network layer,
(within the transport layer) is called transport entity.

Transport Service Provider:


Layers 1 to 4 are called Transport Service Provider.

Transport Service User:


The upper layers i.e., layers 5 to 7 are called Transport Service User.

Transport Service Primitives:


Which allow transport users (application programs) to access the transport

TPDU (Transport Protocol Data Unit):


 Transmissions of message between 2 transport entities are carried out by TPDU.
 The transport entity carries out the transport service primitives by blocking the caller and
sending a
 packet the service.
 Encapsulated in the payload of this packet is a transport layer message for the server’s
 transport entity.
 The task of the transport layer is to provide reliable, cost-effective data transport from the
source machine to the destination machine, independent of physical network or networks
currently in use.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 57 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

The services provided by the transport layer protocols can be divided into five categories:

1. End-to-end delivery:
The transport layer transmits the entire message to the destination. Therefore, it ensures the end-to-
end delivery of an entire message from a source to the destination.

2. Addressing

 The transport layer interacts with the functions of the session layer.
 Many protocols combine session, presentation, and application layer protocols into a single
layer known as the application layer.
 Delivery to the session layer means the delivery to the application layer.
 Data generated by an application on one machine must be transmitted to the correct application
on another machine.
 This case, addressing is provided by the transport layer.
 The transport layer provides the user address which is specified as a station or port. The port
variable represents a particular TS user of a specified station known as a Transport Service
access point (TSAP). Each station has only one transport entity.
 The transport layer protocols need to know which upper-layer protocols are communicating.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 58 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

3. Reliable delivery:
The transport layer provides reliability services by retransmitting the lost and damaged packets.
The reliable delivery has four aspects:

 Error Control
The primary role of reliability is Error Control. In reality, no transmission will be
100 percent error-free delivery. Therefore, transport layer protocols are designed to provide
error-free transmission.


 Sequence Control
The second aspect of the reliability is sequence control which is implemented at the
transport layer.

 Loss Control
Transport layer ensures that all the fragments of a transmission arrive at the
destination, not some of them. On the sending end, all the fragments of transmission are
given sequence numbers by a transport layer. These sequence numbers allow the receiver’s
transport layer to identify the missing segment.

 Duplication Control
Duplication Control is the fourth aspect of reliability. The transport layer guarantees
that no duplicate data arrive at the destination. Sequence numbers are used to identify the lost
packets; similarly, it allows the receiver to identify and discard duplicate segments.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 59 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

4. Flow Control
 Flow control is used to prevent the sender from overwhelming the receiver.
 If the receiver is overloaded with too much data, then the receiver discards the packets and
asking for the retransmission of packets.
 This increases network congestion and thus, reducing the system performance.
 The transport layer is responsible for flow control.
 It uses the sliding window protocol that makes the data transmission more efficient as well
as it controls the flow of data so that the receiver does not become overwhelmed.
 Sliding window protocol is byte oriented rather than frame oriented.

5. Multiplexing
The transport layer uses the multiplexing to improve transmission efficiency.
Multiplexing can occur in two ways:
Upward multiplexing: Upward multiplexing means multiple transport layer
connections use the same network connection. To make more cost-effective,
the transport layer sends several transmissions bound for the same destination
along the same path; this is achieved through upward multiplexing.

Downward multiplexing: Downward multiplexing means one transport


layer connection uses the multiple network connections. Downward
multiplexing allows the transport layer to split a connection among several
paths to improve the throughput. This type of multiplexing is used when
networks have a low or slow capacity.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 60 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Elements of transport layer


 Addressing
 Connection Establishment
 Connection Release
 Flow Control and Buffering
 Multiplexing
 Crash Recovery

Transport Protocol

a) Environment of the data link layer.


b) Environment of the transport layer.

Addressing
 When an application process wishes to set up a connection to a remote application
process, it must specify which one to connect to. In Internet, these end points are (IP
address + Local Port) pairs.
 The end point in this context are:
• TSAP (Transport Service Access Point)
• NSAP (Network Service Access Point)
 A transport entity support multiple TSAPs.

Flow Control and Buffering


 Flow Control of transport layer is similar to that of Data Link Layer, but in Transport
layers the number of connections open is numerous as compared to Data Link Layer.
 If the subnet provides datagram service, the sending transport entity must also be
buffered, for re-transmitting in the case of loss.
 If the receiver knows that the sender buffer all TPDUs (Transport Protocol Data Unit)
until they are acknowledged, the receiver may or may not dedicate specific buffers, to
specific connections.
 In summary, if the network service is unreliable, the sender must buffer all TPDUs.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 61 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

 However, with reliable network services, other trade-off becomes possible.


 The optimum trade-off between source buffering and destination buffering depends on
the type of traffic carried by the connection.
 For low -bandwidth bursty traffic, such as that produced by an interactive terminal, it is
better not to dedicate any buffer, but rather to acquire them dynamically at both ends.

Multiplexing
 Multiplexing is putting multiple things on to one resource i.e., multiplexing several conversations
onto connections, virtual circuits, and physical links plays a role in several layers of the network
architecture.
 Need for Multiplexing
• Number of virtual circuits are open by the users or one user opening more than one, which
requires a lot of buffer in the router, this gives a solid reason for packet switched network.
• To bill the users based on the amount of data sent, not the connection time.
 Upward Multiplexing: Multiplexing of different transport connections onto the same network
connection attractive.
 Downward Multiplexing: The transport layer opens multiple network connections and
distributes the traffic among them on a round-robin basis.

Connection Establishment and Management


 Connection Establishment is not easy as it sounds, but it is in fact a complicated task, we have to
take care of the losses that occur during transmission.
 At first glance, it would seem sufficient for one transport entity to just send a CONNECTION
REQUEST TPDU to the destination and wait for a CONNECTION ACCEPTANCE reply.
 The problem occurs when the network is not reliable. Solution could be to give each connection
a connection identifier, chosen by the initiating party, and put it in each TPDU, including the one
requesting the connection.
 After each connection is released, each transport entity could update a table listing absolute
connection as (peer transport entity, connection identifier) pair.
 Unfortunately, this scheme has a basic flaw: it requires each transport entity to maintain a certain
amount of history information indefinitely.
 If a machine crashes and looses its memory, it will no longer know which connection identifiers
have already been used.
Crash Recovery
 If host and routers are subject to crashes, recoveries from these crashes become an issue. The
transport entity is entirely within the hosts and recovery from network and router crashes can be
effectively implemented. If the network layer provides datagram services, the transport entity
expects lost TPDUs all the time and knows how to cope with them. If the network layer provides
connection-oriented service, then loss of virtual circuits is handled by establishing a new one and
then probing the remote transport entity to ask it which TPDUs it has received and which one it
has not received.
 At first glance it would seen obvious: The client should retransmit only if it has an acknowledged
TPDU outstanding when it learns of the crash. However, a closer inspection reveals difficulties
with this naive approach.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 62 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

Internet transport protocols

Transmission Control Protocol (TCP)


 TCP provides a highly reliable, connection oriented, end-to-end transport service
between processes in end systems connected to the subnet.
 TCP assumes that the layer below offers an unreliable datagram service.
 TCP provides the types of facility associated with the ISO Class 4 transport service,
including error recovery, sequencing of packets, flow control by the windowing method,
and the support of multiplexed connections from the layer above.
Format of TCP Header
 The sender’s TCP layer communicates with the receiver’s TCP layer using the TCP
protocol data unit.
 It defines parameters such as the source port, destination port, sequence number and so
on. It is described below:

• Source and destination port number – which are 16 bit values to identify the local
port number.
• Sequence number – which identifies the current sequence number of the data
segment. This allows the receiver to keep track of the data segments received. Any
segments that are missing can be easily identified.
• Data offset – which is a 32-bit value and identifies the start of the data.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 63 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

• Flags the flag field is defined as UAPRSE, where U is the urgent Flag, A the
acknowledgment flag, P the push function, R the reset flag, S the sequence
synchronise flag and F the end – of transmission flag.
• Windows – which is a 16 bit value and gives the number of data blocks that the
receiving host can accept at a time.
• Checksum – which is a 16 bit checksum for the data and header. UrgPtr – which is
the urgent pointer and is used to identify an important area of data.

User Data Protocol (UDP)


 The Internet protocol suite also supports a connectionless transport protocol, UDP (User
Data Protocol).
 UDP provides a way for applications to send encapsulated raw IP datagrams and send
them without having to establish a connection.
 Many clientserver applications that have one request and one response use UDP rather
than go to the trouble of establishing and later releasing a connection.
 A UDP segment consists of an 8-byte header followed by the data.
 The two ports serve the same function as they do in TCP: to identify the end points within
the source and destination machines.
 The UDP length field includes the 8-byte header and the data.
 The UDP checksum includes the same format pseudo-header, the UDP header, and the
UDP data, padded out to an even number of bytes if need be.
 It is optional and stored, as 0 if not computed.

The Domain Name System (DNS)


 DNS is a scheme for assigning meaningful high - level name to a large set of machines,
and discusses a mechanism that maps between high-level machine names and IP
addresses.
 It considers both the translation from high-level name to IP addresses and the translation
form IP addresses to high-level machine names.
 It has been used to assign machine names throughout the global Internet.
 It uses a geographically distributed set of servers to map names to addresses, the
implementation of the name mapping mechanism provides a large scale example of the
client server paradigm.
 In a TCP/IP internet, hierarchical machine names are assigned according to the structure
of organisations that obtain authority for parts of the namespace, not necessarily
according to the structure of the physical network interconnections.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 64 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

TCP/IP Internet Domain Name


cs.ignou.org
Contains three labels: CS, IGNOU, and ORG. Any suffix of a labels in a domain name is also called
a domain. In the above example the lowest level domain is CS.ignou.org (the domain name for the
Computer Science Department at ignou), the second level domain is ignou.org (the domain name
for ignou) and the top level domain is org, as the example shows, domain names are written with the
local label first and the top domain last. As we will see, writing them in this order makes it possible
to compress messages that contain multiple domain names

Domain Name Meaning


com Commercial Organisations
edu Educational Institutes
gov Government Institutions
mil Military Groups
net Major network Support centers
org Organisations other than those above
arpa Temporary ARPANET domain (obsolete)
int International Organisations
country code e.g. “in” Each country (geographic scheme)

Electronic Mail
 This is the most widely used servic e facilitating users to send and receive messages
electronically in a store and forward manner.
 Different E-mail standards, viz., SMTP, UUCP and X400 Message Handling system are
supported on networks (e.g. ERNET).
 Electronic Mail is a system whereby a computer user can exchange messages with other
computer users or group of users via a communications network.
 The backbone of an electronic mail system is a communication network that connects
remote terminals to a central system or a local area network that interconnects personal
computers.
 Users can send mail to a single recipient or they can broadcast it to any number of selected
users on the systems.
 The method for receiving mail depends on the sophistication of the system.
 When multitasking personal computer and workstation are used mail can be delivered to
users while they are working on something else.
 Otherwise, users have to interrogate their mailboxes in a central systems, or file server.
 Many users first encounter computer networks when they send or receive electronic mail
to or from a remote site. E-mail is the most widely used application service.
 Indeed, many computer users access networks only through electronic mail.
 E-mail is popular because it offers a fast, convenient method of transferring information.
 E-mail can accommodate small notes or large voluminous memos with a single
mechanism.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 65 of 50


KRUPANIDHI DEGREE COLLEGE Computer Communication And Network s

 It should not surprise you to learn that more users send files with electronic mail than
with file transfer protocols.
Characteristics:
• Store and forward
• Delivery time ranging from few seconds to hours
• Largely textual
• Binary files may be appended or “uuencoded”
• Multimedia (“mime” Standard)
• Distribution lists, with “cc:”, “bcc:”, “fcc:”
• Mail forwarding
• Auto-processing
• Statistics collection
• Secure email
• Several mailers: smtp, uucp (smtp requires IP connectivity; uucp works with dial-up)

WWW (World Wide Web)


 The world Wide Web is a system for linking up hypertext documents.
 Each document is a page written in HTML, possible with hyperlinks to other documents.
 A browser can display a document by establishing a TCP connection to its server, asking
for the document, and then closing the connection.
 When a hyperlink is selected by the user, that document can also be fetched in the same
way.
 This manner, documents all over the world are linked together in a giant web. Given
below are some facts about WWW:
• Fastest growing discovery and retrieval system
• Presently 10,000 servers, growing at an astounding rate
• Retrieve “hypermedia” documents, with text, graphics, audio, video, and links to
other hypermedia documents
• A navigational system based on “hyperlink”
• State-less interaction between client and server, conforming to “http” protocol.

BCA DEPARTMENT 3rd SEM ~Mr. SAYED FAIZAL Page 66 of 50

You might also like