Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Networking
Lecture Notes
For
Undergraduate Students
By
Prof.M.Sushanth Babu
Professor
Department of Electronics and
Communication Engineering
Types of errors & Error detection
Basic concepts
Networks must be able to transfer data from one device to another with
complete accuracy.
Data can be corrupted during transmission.
For reliable communication, errors must be detected and corrected.
Error detection and correction are implemented either at the data link
layer or the transport layer of the OSI model.
Types of Errors
Types of errors:
Single bit errors are the least likely type of errors in serial data
transmission.
However this kind of errors can happen in parallel transmission.
Burst error
The term burst error means that two or more bits in the data unit have
changed from 1 to 0 or from 0 to 1.
Burst errors does not necessarily mean that the errors occur in
consecutive bits, the length of the burst is measured from the first corrupted bit
to the last corrupted bit. Some bits in between may not have been corrupted.
Error detection
Error detection means to decide whether the received data is correct or not
without having a copy of the original message.
Error detection uses the concept of redundancy, which means adding extra
bits for detecting errors at the destination.
Parity Check
Most common, least complex.
Single bit is added to a block.
Two schemes:
A parity bit is added to every data unit so that the total number of
1s(including the parity bit) becomes even for even-parity check or odd for odd-
parity check
Example: Parity Check
Suppose the sender wants to send the word world. In ASCII the five characters are
coded (with even parity) as
1110111 1101111 1110010 1101100 1100100
The following shows the actual bits sent
11101110 11011110 11100100 11011000 11001001
Detection – examples
Now suppose the word world in Example 1 is received by the receiver without being
corrupted in transmission.
11101110 11011110 11100100 11011000 11001001
The receiver counts the 1s in each character and comes up with even numbers (6,
6, 4, 4, 4). The data are accepted.
Now suppose the word world in Example 1 is corrupted during transmission.
11111110 11011110 11101100 11011000 11001001
The receiver counts the 1s in each character and comes up with even and odd
numbers (7, 6, 5, 4, 4). The receiver knows that the data are corrupted, discards
them, and asks for retransmission.
10101001
00111001
--------------
11100010 Sum
00011101 Checksum
At the receiver
Example :
Problems
(LRC)
However, it is hit by a burst noise of length eight and some bits are corrupted.
(LRC)
When the receiver checks the LRC, some of the bits do not follow the even-parity
rule and the whole block is discarded.
(LRC)
Advantage :
Disadvantage :
-> If two bits in one data units are damaged and two bits in exactly same position
in another data unit are also damaged , the LRC checker will not detect the error.
Error Correction
Error correction is much more difficult than error detection.
In error detection, the receiver needs to know only that the received
codeword is invalid.
In error correction the receiver needs to find the original codeword sent.
We need more redundant bits for error correction than for error detection.
HAMMING DISTANCE:
The Hamming distance between two words is the number of differences
between corresponding bits.
The Hamming distance between the received codeword and sent codeword
is the number of bits that are corrupted during transmission.
e.g. If the codeword 00000 is sent and 01101 is received, 3 bits are in error and
the Hamming distance between the two is d(00000, 01001)=3.
IEEE 802
Introduction
IEEE 802 refers to a family of IEEE standards
Dealing with local area network and metropolitan area network.
The most widely used standards
The Ethernet family, Token Ring, Wireless LAN.
IEEE 802 Working Groups
Inactive or disbanded working
Active working groups
groups
802.1 Higher Layer LAN Protocols 802.2 Logical Link Control Working
Working Group Group
802.3 Ethernet Working Group 802.4 Token Bus Working Group
802.11 Wireless LAN Working Group 802.5 Token Ring Working Group
802.15 Wireless Personal Area 802.7 Broadband Area Network
Network (WPAN) Working Group Working Group
802.16 Broadband Wireless Access 802.8 Fiber Optic TAG
Working Group 802.9 Integrated Service LAN
802.17 Resilient Packet Ring Working Working Group
Group 802.10 Security Working Group
802.18 Radio Regulatory TAG 802.12 Demand Priority Working
802.19 Coexistence TAG Group
802.20 Mobile Broadband Wireless 802.14 Cable Modem Working Group
Access (MBWA) Working Group
802.21 Media Independent Handoff
Working Group
802.22 Wireless Regional Area
Networks
Wireless standards
802.11a:Offers speeds with a maximum rate of 54Mbps in the 5 GHz band
802.11b: Offers speeds with maximum rate of 11Mbps in the 2.4 GHz
spectrum band
802.11g: Data rates of maximum of 54 Mbps at 2.4 GHz.
802.11n: Operates on both the 2.4 GHz and 5 GHz bands with 300Mbps
Bluetooth
What is the Bluetooth?
Operates in 2.45GHz.
Devices within 10m of each other can share up to 1Mbps
Its low power consumption
Can operate on both circuit and packet switching modes
Piconet
Bluetooth versions
Bluetooth 1.0 and 1.0B
Versions 1.0 and 1.0B had many problems
Manufacturers had difficulty making their products
interoperable.
Bluetooth 1.1
Many errors found in the 1.0B specifications were fixed.
Bluetooth 1.2
Faster Connection
Higher transmission speeds in practice, up to 721 kbps
Bluetooth 2.0
The main enhancement is the introduction of an enhanced data
rate (EDR) of 3.0 Mbps.
Lower power consumption
Bluetooth 2.1
A draft version of the Bluetooth Core Specification Version 2.1 +
EDR is now available
Ultra Wide Band(UWB)
What is the UWB?
Transmitting information spread over a large bandwidth (>500
MHz)
Provide an efficient use of limited radio bandwidth
High data rate in WPAN connectivity and longer-range
Advantages
Collisions are eliminated.
Channel bandwidth can be fully utilized.
Suitable for heavy traffic.
Suitable for real-time application.
Limitations
Failure of bus stops all transmission
Adding more stations to the bus is difficult
Application
Token Bus is limited to factory automation and process control and has no
commercial application in data communication.
Token Ring
The ring initializes by creating a token, which is a special type of frame
that gives a station permission to transmit.
The token circles the ring like any frame until it encounters a station
that wishes to transmit data.
This station then "captures" the token by replacing the token frame
with a data-carrying frame, which passes around the network and the
message is grabbed by the station it was addressed to.
Once that data frame returns to the transmitting station, that station
removes the data frame, creates a new token and forwards that token
on to the next node in the ring.
So, every node is guaranteed to eventually gets a chance to speak
regardless of how busy the network is.
Token Ring technology was originally developed by IBM and has been
standardized as IEEE 802.5.
The term “Token Ring” is capitalized only when it refers to the IBM
technology but appears with lower case letters otherwise.
Developed in 1970s, it is second only to Ethernet in general popularity.
The IEEE 802.5 standard is completely compatible with IBM Token
Ring and almost exactly the same.
IBM Token Ring specifies that networks must be set up in a star
topology, though the frames move in a circle from node to node.
Individual computers attached to a Multi-station Access
Unit(MAU),which is similar to, though more complicated then a hub in
Ethernet network.
The logical ring exists within the MAU, and data travels in one
direction.
Token Ring Operation
When a station wishes to transmit, it must wait for token to pass by
and holds the token.
1. One approach: change one bit in token and add frame for
transmission.
2. Second approach: remove token from the ring.
Frame circles the ring and is removed by the transmitting station.
Each station checks passing frame, if destined for station, it copies the
frame into local buffer.
Under light load – delay is added due to waiting for the token.
Under heavy load – ring is “round-robin”
Advantages – fair access
Disadvantages – ring is single point of failure, added issues due to
token maintenance.
Token Maintenance Issues
What can go wrong?
• Loss of token (no token circulating)
• Duplication of token (forgeries or mistakes)
The need to designate one station as the active ring monitor, Which
is continuously circulating frame
• Deal with active monitor going down.
(FDDI)
FIBER DISTRIBUTED DATA INTERFACE
INTRODUCTION
Shared media network like Ethernet (IEEE 802.3) & Token Ring
(IEEE 802.5)
100 Mbps speed
Runs on Optical Fiber
American national standards institute (ANSI) standard
Project initiated in October 1982 by James Hamstra.
Two proposals for media access control (MAC) & physical (PHY) layers
submitted in June 1983
First public demonstrations at Advanced Micro Devices (AMD) in 1989
BASIC PRINCIPLE
Token ring network
Token: a special sequence of bits
Token circulates around the ring
A station removes the token from ring before transmission.
After transmission, the station returns the token to the ring.
Collisions are prevented as there is only one token in the ring
FDDI PROPERTIES
Dual-counter-rotating token ring architecture.
One ring is Primary and the other Secondary.
Up to 500 stations with a maximum distance of 2 km between any
pair of stations for multimode fiber.
With single-mode fiber the distance can be up to 40 km
Maximum ring length is 100 km.
Repeaters
Function of a repeater
Limitation of Repeaters
Bandwidth is shared.
Cannot support multiple LAN technologies
Limitations on maximum nodes and distances
Hub:
A Hub is used in a wired network to connect Ethernet cables from a
number of devices together.
The hub allows each device to talk to the others.
Acts on the physical layer
Operate on bits rather than frames
Also called multiport repeater
Used to connect computers in a physical star topology but logically bus
Connection to the hub consists of two pairs of twisted pair wire one for
transmission and the other for receiving.
Hub receives a bit from a computer and sends it to all the other
computers without implementing any access method.
It copies the received frame on all other links
The entire hub forms a single collision domain, and a single Broadcast
domain
Collision domain: is that part of the network (set of NICs)
when two or more nodes transmit at the same time collision will
happen.
Broadcast domain: is that part of the network (set of NIC)
where each NIC can 'see' other NICs' traffic broadcast messages.
Multiple Hubs can be used to extend the network length
How the Hub works.
A computer's network interface card sends out packets to the network.
The hub receives this information and passes it through all the ports
on the hubs that have attached cables.
This means that the computer that sent the data also gets it back.
History of the Hub:
The system was completed in 1994.
It introduced an on-line remote access facility to four government
departments, allowing users to display and print maps at remote
locations using personal computers.
Passive Hubs
A passive Hub is just a connector.
It connects the wires coming from different branches.
In a star-topology Ethernet LAN, a passive Hub is just a point where
the signals coming from different stations collide, the Hub is the
collision point.
This type of Hub is the part of the media.
Its location in internet model is below the Physical layer.
Active Hubs:
An active hub works more than just a connector but also regenerates
the data bits to ensure the signals are strong.
It provides an active participation in the network aside from acting as
an interface.
It participates in the data communication, such as storing signals
received through the input ports, before forwarding them.
It can monitor the data it is forwarding and sometimes help improve
signals before forwarding them to other connections.
Such a feature makes troubleshooting network problems easier.
Intelligent hubs.
An intelligent hub can perform everything that the passive hub and
active hub do, and help manage network resources effectively to
ensure that the performance of the network is highly efficient.
An intelligent hub can also help in troubleshooting by pinpointing the
actual location of the problem.
Some Manufacturers of Hubs:
Logitech, GWC, iHome, CablesToGo, Belkin.
Hubs can range from $7.99 to $54.99
Switch
Switch functions at the Data-Link Layer (Layer 2).
It is an intelligent device.
It maintains Mac-Address Table.
Each port of the switch has fixed bandwidth.
It works with Flooding and Unicast.
It has 1 Broadcast domain and Number of collision domains depending
upon the number of active ports
Broadcast Domain:->A group of network devices in which if one device
sends a broadcast the remaining devices will receive it.
Router Connections
Bridges
A bridge Operates in both the physical and the data link layer.
As a physical layer device, it regenerates the signal it receives.
As a data link layer device, the bridge can check the physical address
contained in the frame.
Bridges
Why Bridge?
Reliability-> Partition network into self-containing units
Performance-> Cluster internetworks together, performance
decreases as the number of devices on the wire increases
Security-> Can keep different traffic (e.g. accounting, strategic
planning) on different networks
Geography-> Need a way to support networks in two different
locations, could use a bridge to link them
Transparent Bridges
Loop Problem
Remote Bridges
ROUTING ALGORITHMS
Router
Types
Functions:
• Internetwork communication.
• Best Path Selection.
• Packet Switching.
• Packet Forwarding.
Autonomous System:
An autonomous system is one network or sets of networks under a
single administrative control.
An autonomous system might be the set of all computer networks
owned by a company, or a college.
Companies and organizations might own more than one autonomous
system, but the idea is that each autonomous system is managed
independently with respect to BGP.
An autonomous system is often referred to as an 'AS'.
INTRA-DOMAIN AND INTER-DOMAIN ROUTING
Routing inside an autonomous system is referred to as intra-domain
routing.
Routing between autonomous systems is referred to as inter-domain
routing.
Routing Table
A routing table is a set of rules, often viewed in table format, that is
used to determine where data packets traveling over an Internet
Protocol (IP) network will be directed.
All IP-enabled devices, including router and switches, use routing
tables.
A routing table contains the information necessary to forward a packet along
the best path toward its destination.
Each packet contains information about its origin and destination.
When a packet is received, a network device examines the packet and
matches it to the routing table entry providing the best match for its
destination. The table then provides the device with instructions for
sending the packet to the next hop on its route across the network.
Destination: The IP address of the packet's final destination.
Next hop: The IP address to which the packet is forwarded.
Interface: The outgoing network interface the device should use when
forwarding the packet to the next hop or final destination.
Metric: Assigns a cost to each available route so that the most cost-
effective path can be chosen.
Routes: Includes directly-attached subnets, indirect subnets that are not
attached to the device but can be accessed through one or more hops, and
default routes to use for certain types of traffic or when information is
lacking.
Types of Routing
Static Routing
Default Routing
Dynamic Routing
Static Routing:
Route for each destination network has to be manually configured by
the network administrator.
Requires destination network ID for Configuration.
Used in small networks. Administrative distance=1
Static routing is simply the process of manually entering routes into a
device's routing table via a configuration file that is loaded when
the routing device starts up.
As an alternative, these routes can be entered by a network
administrator who configures the routes manually.
Since these manually configured routes don't change after they are
configured they are called 'static' routes.
Static routing is the simplest form of routing , but it is a manual
process.
Use static routing when you have very few devices to configure (<5)
and when you know the routes will probably never change.
Static routers are not fault tolerant. The lifetime of a manually
configured static route is infinite and, therefore, static routers do not
sense and recover from routers which are down.
Dynamic Routing:
Changes in network topology are updated dynamically
Only the directly connected networks information is required for
configuration.
Administrative work is reduced.
Used in medium & large networks.
A router using dynamic routing will 'learn' the routes to
all networks that are directly connected to the device.
Next, the router will learn routes from other routers that run the
same routing protocol (RIP, RIP2, EIGRP, OSPF, IS-IS, BGP etc).
Each router will then sort through it's list of routes and select one or
more 'best' routes for each network destination the router knows or
has learned.
Dynamic routing protocols are supported by software applications
running on the routing device (the router) which dynamically
learn network destinations and how to get to them and also advertise
those destinations to other routers.
This advertisement function allows all the routers to learn about all
the destination networks that exist and how to go those networks.
Dynamic routing protocols will then distribute this 'best route'
information to other routers running the same routing protocol,
thereby extending the information on what networks exist and can be
reached.
This gives dynamic routing protocols the ability to adapt to logical
network topology changes, equipment failures or network outages.
Dynamic routing is fault tolerant.
Dynamic routes learned from other routers have a finite lifetime.
If a router or link goes down, the routers sense the change in the
internetwork topology through the expiration of the lifetime of the
learned route in the routing table.
This change can then be propagated to other routers so that all the
routers on the internetwork become aware of the new internetwork
topology.
Routing updates:
Routing table updates occur periodically or when the topology changes.
Directly connected networks are initially placed in routing table
Distance vector algorithms call for each router to send its entire routing
table to each of its adjacent neighbors.
Initialization:
Updating:
RIP:
The Routing Information Protocol (RIP) is an intra-domain routing protocol
used inside an autonomous system.
It is a very simple protocol based on distance vector routing.
RIP uses the services of UDP on
well-known port 520.
Convergence:
Router convergence is reached when.
All routing tables in the network contain the same network
information.
Routers continue to exchange routing information.
If no new information is found then Convergence is reached.
TIMERS:
RIP uses 4 timers
1. Update timer:
The default RIP updates interval :30 s
To change the update internal:
(Config-router)#update-timer seconds
Passive-interface command: Disable the sending of routing updates on
specified interfaces
2. Invalid timer:
If an update has not been received for a long time.
After 180 seconds, the route is marked as invalid by setting the metric
to 16.
3. Hold-down timer:
Once a route is marked as unreachable, it must stay in holddown long
enough for all routers in the topology to learn about the unreachable
network.
By default, the hold-down timer is set for 180 seconds.
4. Flush timer:
• By default, the flush timer is set for 240 seconds.
• When the flush timer expires, the route is removed from the routing
table
Routing Loops:
A condition in which a packet is continuously transmitted within a
series of routers without ever reaching its destination.
Routing loops can create the following issues:
Excess use of bandwidth
CPU resources may be strained.
Routing updates may be lost or not processed in a timely manner.
Preventing Routing Loops
Once a router “counts to infinity” it marks the route as unreachable
Holddown timers allow a router to not accept any changes to a route for a
specified period of time
Split Horizon rule: A router should not advertise a network through
the interface from which the update came
TTL:
Purpose of the TTL field
The TTL field is used to prevent packets from endlessly traveling on a
network
How the TTL field works
TTL field contains a numeric value
The numeric value is decreased by one by every router on the route to the
destination
If numeric value reaches 0 then Packet is discarded
Route poisoning: One way to avoid inconsistent updates is route poisoning.
Set the hop count to one more than the maximum.
Triggered updates: A triggered update is sent immediately in response to
some change in the routing table.
The router that detects a topology change immediately sends an update
message to adjacent routers that, in turn, generate triggered updates
notifying their adjacent neighbors of the change.
LINK-STATE ROUTING
Updates are incremental & entire routing table is not sent as update.
Updates are triggered not periodic.
Updates are sent to entire network.
Routers have visibility of entire network of that area only.
No routing loops.
Convergence is fast because of triggered updates.
Distance Vector is sitting at an intersection seeing the signs, turn left = 2000
miles to NY, Turn right = 1000 miles to Portland, continue straight = 1700
miles to Dallas.
All you have are distances and an arrow, you have no idea how straight or
round-about the path may lead. Link state is when you are looking at a map.
You can see that turning left does indeed take you toward NY, but you can
see different roads and freeways that you can choose from.
You make your own decision based on the entire topology of the road
system.
Discovery of Neighbors
Routers multicasts OSPF Hello packets on all OSPF-enabled interfaces.
If two routers share a link, they can become neighbors, and establish
an adjacency.
After becoming a neighbor, routers exchange their link state
databases.
AREA
Area is a collection of networks, hosts, and routers all contained within
an autonomous system.
Routers inside an area flood the area with routing information.
Area border routers: Summarize the information about the area and
send it to other routers.
Backbone area [Primary area]: All the areas inside an autonomous
system must be connected to the backbone.
Routers in this area are called as backbone routers. This area
identification number is 0.
If, due to some problem, the connectivity between a backbone and an area
is broken, a virtual link between routers must be created by the
administration to allow continuity of the functions of the backbone as the
primary area.
Point-to-point
Connects two routers without any other router or host in
between.
Directly connected routers using serial line.
Only one neighbour.
Transient link
A network with several routers attached to it.
Each router has many neighbours.
Lot of advertisements about their neighbours.
Each router has only one neighbour, the designated router
(network). On the other hand, the designated router (network)
has five neighbours.
Stub Link
Stub
A network that is connected to only one router.
The data packets enter the network through this single router
and leave the network through this same router.
Virtual
When the link between two routers is broken, the administration
may create a virtual link between them, using a longer path that
probably goes through several routers.
Why Is a Link State protocol Better?
Fast loop-less convergence.
support of precise metrics and, if needed multiple metrics.
support of a multiple paths to a destination.
splitting very large networks in areas.
Disadvantages
More memory required
the link state database is needed in addition to the routing tables
Much more complex procedure
OSI-Model
LAYERED TASKS
We use the concept of layers in our daily life. As an example, let us consider two
friends who communicate through postal mail. The process of sending a letter to
a friend would be complex if there were no services available from the post
office.
Tasks involved in sending a letter
2. Representation of Bits->
• The physical layer data consists of stream of bits.
• To be transmitted, bits must be encoded into signals.
• The physical layer defines the type of Encoding.
3. Data Rate->
• The transmission rate (Number of bits sent each second) is also defined by
the physical layer.
4. Synchronization of Bits->
• The sender and the receiver not only must use the same bit rate but also
must be synchronized.
• In other words, the sender and the receiver clocks must be synchronized.
5. Line Configuration->
• The physical layer is concerned with the connection of devices to the
media.
• In point-to-point configuration, two devices are connected through a
dedicated line.
• In a multipoint configuration, a link is shared among several devices.
6. Physical Topology->
• The physical topology defines how devices are connected to make a
network.
Framing->
• The data link layer divides the stream of bits received from the network
layer into manageable units called frames.
Physical addressing->
• If frames are to be distributed to different systems on the network, the
data link layer adds a header to the frame to define the sender or receiver
of the frame.
• If the frame is intended for a system outside the sender’s network, the
receiver address is the address of the device that connects the network to
the next one.
Flow Control->
• If the rate at which the data are absorbed by the receiver is less than the
rate at which the data are produced in the sender,
• The data link layer imposes a flow control mechanism to overwhelming the
receiver.
Error Control->
• The data link layer adds reliability to the physical layer by adding
mechanisms to detect and retransmit damaged or lost frames.
• It also uses a mechanism to recognize duplicate frames.
• Error control is normally achieved through a trailer added to the end of the
frame.
Access Control->
• When two or more devices are connected to the same link, data link layer
protocols are necessary to determine which device has control over the
link at any given time.
Network Layer:
The Network Layer is responsible for the delivery of individual
packets from the source host to the destination host.
• Whereas the data link layer oversees the delivery of the packet between
two systems on the same network (link).
• The network layer ensures that each packet gets from its point of origin to
its final destination.
• If two systems are connected to the same link, there is usually no need for
a network layer.
• However, if two systems are attached to different networks with
connecting devices between the networks.
• There is often a need for the network layer to accomplish source-to-
destination delivery.
Logical Addressing->
• The physical addressing implemented by the data link layer handles the
addressing problem locally.
• If a packet passes a network boundary, we need another addressing
system to help distinguish the source and the destination systems.
• The network layer adds a header to the packet coming from the upper
layer that, among other things, includes the logical address of the sender
and the receiver.
Routing->
• When independent networks or links are connected to create
internetworks or a large network.
• The connecting devices switch or route the packets to their final
destination.
• One of the functions of the network layer is to provide this mechanism.
Source-to-destination delivery
Transport Layer
• The Transport Layer is responsible for process-to-process delivery of the
entire message.
• A process is an application program running on a host.
• Whereas the network layer overseas source-to-destination delivery of
individual packets, it doesn’t recognize any relationship between those
packets.
• It treats each one independently, as though each peace belonged to a
separate message, whether or not it does.
• The transport layer, on the other hand, ensures that the whole message
arrives intact and in order, overseeing both error control and flow control
at the source-to-destination level.
Rel
iable process-to-process delivery of a message
Session layer
Presentation Layer
• The presentation layer is responsible for translation, compression,
and encryption.
• The presentation layer is concerned with the syntax and semantics of the
information exchanged between two systems.
Translation->
• The process (running programs) in two systems is usually exchanging
information in the form of character strings, numbers and so on.
• The information must be changed to bit streams before being transmitted.
• Because different computers use different encoding systems, the
presentation layer is responsible for interoperability between these
different encoding methods.
• The presentation layer at the sender changes the information from its
sender-dependent format into a common format.
• The presentation layer at the receiving machine changes the common
format into its receiver dependent format.
Encryption->
• To carry sensitive information, a system must be able to ensure policy.
• Encryption means that the sender transforms the original information to
another form and sends the resulting message out over the network.
• Decryption reverses the original process to transform the message back to
its original form.
Compression->
• Data compression reduces the number of bits contained in the
information.
• Data compression becomes particularly important in the transmission of
multimedia such as text, audio, and video.
Application Layer
• The application layer enables the user, whether the human or software, to
access the network.
• It provides user interfaces and support for services such as electronic
mail, remote file access and transfer, shared database management, and
other types of distributed information services.
Network Virtual Terminal->
• A network virtual terminal is a software version of a physical terminal, and
it allows a user to log on to a remote host.
• To do so, the application creates a software emulation of a terminal at the
remote host.
• The user’s computer talks to the software terminal which, in turn, talks to
the host, and vice versa.
• The remote host believes it is communicating with one of its own terminals
and allows the user to log on.
Summary of Layers