Professional Documents
Culture Documents
Data Communication and Computer Networks
Data Communication and Computer Networks
Chapter One
Introduction
1 /38
Introduction
Protocols and Architecture
Outline
1 Introduction
2 /38
Introduction
Protocols and Architecture
Introduction
3 /38
Introduction
Protocols and Architecture
Introduction
Communication across a data networks plays a vital role in
our daily life.
Introduction
5 /38
Introduction
Protocols and Architecture
Data communication
Data communication
It deals with the transmission of signals in a reliable and
efficient manner.
It includes signal transmission, transmission media, signal
encoding interfacing, data link control and multiplexing
6 /38
Introduction
Protocols and Architecture
Networking
Networking
It deals with the technology and architecture of the
communications networks used to interconnect
communicating devices.
It includes two topics Local area networks and wide area
networks.
There are four elements of network
Rules
Medium
Message
Devices
7 /38
Introduction
Protocols and Architecture
Networking
8 /38
Introduction
Protocols and Architecture
Communications model
Communications model
The fundamental purpose of a communications system is the
exchange of data between two parties
9 /38
Introduction
Protocols and Architecture
10 /38
Introduction
Protocols and Architecture
Transmission lines
Transmission lines
The basic building block of any communications facility is the
transmission line.
The business manager is concerned with a facility providing
the required capacity, with acceptable reliability, at minimum
cost.
However, the use of compression, multiplexing, load sharing,
and other line features can significantly affect the end choice.
11 /38
Introduction
Protocols and Architecture
Transmission Media
Transmission Media
Convert electronic signal to transmit over some medium.
Twisted-pair, coaxial cable, optical fiber cable, terrestrial and
satellite microwave (wireless)
12 /38
Introduction
Protocols and Architecture
Networking
13 /38
Introduction
Protocols and Architecture
Protocols
Used for communications between entities in a system
Protocol
A set of rules conventions.
Governs how computers exchange information over a
shared/network medium.
Used for communications between entities in a system
Defines :
What is communicated
How it is communicated
When it is communicated
14 /38
Introduction
Protocols and Architecture
Protocol Architecture
Protocol Architecture
Communications Architecture: a structured set of modules
that implements the communication function.
Task of communication broken up into modules.
Example:- File Transfer could use three modules.
File transfer application
Communication service module
Network access module
15 /38
Introduction
Protocols and Architecture
Protocol Architecture
16 /38
Introduction
Protocols and Architecture
Protocol Architecture
Protocol Architecture
Successful communication between hosts on a network
requires the interaction of many different protocols.
A group of inter-related protocols that are necessary to
perform a communication function is called a protocol suite.
These protocols are implemented in software and hardware
that is loaded on each host and network devices
17 /38
Introduction
Protocols and Architecture
18 /38
Introduction
Protocols and Architecture
19 /38
Introduction
Protocols and Architecture
20 /38
Introduction
Protocols and Architecture
21 /38
Introduction
Protocols and Architecture
22 /38
Introduction
Protocols and Architecture
23 /38
Introduction
Protocols and Architecture
24 /38
Introduction
Protocols and Architecture
25 /38
Introduction
Protocols and Architecture
The data link layer is responsible for moving frames from one hop
(node) to the next.
26 /38
Introduction
Protocols and Architecture
Hop-to-hop delivery
27 /38
Introduction
Protocols and Architecture
28 /38
Introduction
Protocols and Architecture
Source-to-destination delivery
29 /38
Introduction
Protocols and Architecture
Source-to-destination delivery
30 /38
Introduction
Protocols and Architecture
31 /38
Introduction
Protocols and Architecture
32 /38
Introduction
Protocols and Architecture
33 /38
Introduction
Protocols and Architecture
34 /38
Introduction
Protocols and Architecture
35 /38
Introduction
Protocols and Architecture
37 /38
Introduction
Protocols and Architecture
Reading Assignment
Operation of TCP/IP
TCP and UDP header
38 /38
Chapter Two
Data Encoding Transmission
1 /29
Introduction
Encoding Techniques
Outline
1 Introduction
2 Encoding Techniques
2 /29
Introduction
Encoding Techniques
3 /29
Introduction
Encoding Techniques
Transmission Media
4 /29
Introduction
Encoding Techniques
5 /29
Introduction
Encoding Techniques
GUIDED
MEDIA
Guided media, which are those that provide a conduit from one
device to another, include twisted-pair cable, coaxial cable, and
fiber-optic cable.
Twisted-Pair Cable
Coaxial Cable
Fiber-Optic Cable
Twisted-pair cable
6 /29
Introduction
Encoding Techniques
.
Coaxial cable
7 /29
Introduction
Encoding Techniques
coaxial cabe
Optical fiber
8 /29
Introduction
Encoding Techniques
Propagation modes
9 /29
Introduction
Encoding Techniques
Modes
Encoding Techniques
DIGITAL-TO-DIGITAL CONVERSION
We can represent digital data by using digital signals.
The conversion involves three techniques: line coding, block
coding, and scrambling. Line coding is always needed; block
coding and scrambling may or may not be needed.
Line coding and decoding
11 /29
Introduction
Encoding Techniques
Encoding Techniques
Polar
NRZ, RZ, Polar biphase: Manchester and differential Manchester
schemes
Bipolar
AMI and pseudoternary
12 /29
Introduction
Encoding Techniques
Encoding Techniques
Definition of Digital Signal Encoding Formats
13 /29
Introduction
Encoding Techniques
Encoding Techniques
14 /29
Introduction
Encoding Techniques
Encoding Techniques
Polar NRZ-L and NRZ-I schemes
Polar RZ scheme
15 /29
Introduction
Encoding Techniques
Encoding Techniques
16 /29
Introduction
Encoding Techniques
Encoding Techniques
17 /29
Introduction
Encoding Techniques
TRANSMISSION IMPAIRMENT
TRANSMISSION IMPAIRMENT
Signals travel through transmission media, which are not
perfect.
The imperfection causes signal impairment.
This means that the signal at the beginning of the medium is
not the same as the signal at the end of the medium.
What is sent is not what is received.
Three causes of impairment are attenuation, distortion, and
noise.
18 /29
Introduction
Encoding Techniques
TRANSMISSION IMPAIRMENT
19 /29
Introduction
Encoding Techniques
Errors
Errors
An error occurs when a bit is altered between transmission
and reception. binary 1 is transmitted and binary 0 is received
or binary 0 is transmitted and binary 1 is received
Single bit error: isolated error that alters one bit but not
nearby bits. Caused by white noise.
Burst error: contiguous sequence of B bits where first and last
bits and any number of intermediate bits are received in error.
caused by impulse noise or by fading in wireless and effects
greater at higher data rates
20 /29
Introduction
Encoding Techniques
Error Detection
Error Detection
Regardless of design you will have errors
Can detect errors by using an error-detecting code added by
the transmitter
Code is also referred to as “check bits”
Recalculated and checked by receiver
Still chance of undetected error
21 /29
Introduction
Encoding Techniques
Parity Check
Parity
parity bit set so character has even or odd of ones
even parity – used in synchronous transmission
odd parity – used in asynchronous transmission even number
of bit errors goes undetected.
problem : noise impulses often long enough to destroy more
than one bit, especially at high data rates
22 /29
Introduction
Encoding Techniques
23 /29
Introduction
Encoding Techniques
Modulo-2 Arithmetic
Modulo-2 Arithmetic
24 /29
Introduction
Encoding Techniques
25 /29
Introduction
Encoding Techniques
26 /29
Introduction
Encoding Techniques
27 /29
Introduction
Encoding Techniques
28 /29
Introduction
Encoding Techniques
The most important responsibilities of the data link layer are flow
control and error control. Collectively, these functions are known
as data link control.
Flow control refers to a set of procedures used to restrict the
amount of data that the sender can send before waiting for
acknowledgment.
Error control in the data link layer is based on automatic
repeat request, which is the retransmission of data.
29 /29
MULTIPLEXING
Whenever the bandwidth of a medium linking two
devices is greater than the bandwidth needs of the
devices, the link can be shared. Multiplexing is the set
of techniques that allows the simultaneous
transmission of multiple signals across a single data
link. As data and telecommunications use increases, so
does traffic.
Topics discussed in this section:
Frequency-Division Multiplexing
Wavelength-Division Multiplexing
Synchronous Time-Division Multiplexing
Statistical Time-Division Multiplexing
1
Dividing a link into channels
2
Categories of multiplexing
3
Frequency-division multiplexing
4
Note
5
FDM process
6
FDM demultiplexing example
7
Example 1
9
Example 2
Solution
For five channels, we need at least four guard bands.
This means that the required bandwidth is at least
5 × 100 + 4 × 10 = 540 kHz,
as shown in Figure below .
10
Example 2
11
Wavelength-division multiplexing
12
Note
13
Prisms in wavelength-division multiplexing and demultiplexing
14
TDM
15
Note
16
Synchronous time-division multiplexing
17
Note
18
Example 3
Solution
We can answer the questions as follows:
a. The data rate of each input connection is 1 kbps. This
means that the bit duration is 1/1000 s or 1 ms. The
duration of the input time slot is 1 ms (same as bit
duration).
19
Example 3 (conti..)
20
Synchronous time division multiplexing
22
Figure Interleaving
23
Example 4
25
Chapter 3
Local Area network
Local Area Network (LAN) basics
• Local Area Network (LAN)
Consists of a shared transmission medium and a set of hardware and software for
interfacing devices to the medium and regulating the orderly access to the medium
• Local Area Network (LAN)
• Cover single building or cluster of buildings
• Privately owned
• Network assets and network management typically controlled by user
organization
2
LAN Key Elements
• Topology
• Way in which end points (stations) interconnect
• Transmission medium
• Wiring Layout
• Protocol
• Medium Access Control
3
LAN Topologies
CSCI 465
4
Data Communications & Networks
LAN Topology: Bus and Tree
Bus: Tree:
• Multipoint medium • Generalization of bus
• Stations attach to linear • Branching cable with no closed loops
• Cable(s) begin at headend, travel to
medium (bus) via tap branches which may have branches of
• Full-duplex between station their own
and tap • Each transmission propagates through
network, heard by all stations
• Transmission from any
stations travels entire
medium (both directions)
• Terminators required at
each end of bus
5
Bus and Tree Issues
• One station could dominate medium
• Frames - Transmit small block at a time
• Two stations transmitting at same time will lead to
garbled messages
• Have medium access control protocols
• Stations monitor control information in frames
• All stations hear all transmissions
• Frames include headers with address
• Frames removed by terminators at ends
6
Frame transmission on a bus LAN
LAN Topology: Ring
• Set of repeaters joined by point-to-point links in a
closed loop
• Receive data on one link & retransmit on another
• links unidirectional
• stations attach to repeaters
• Data transmitted in frames
• circulate past all stations
• destination recognizes address and copies frame
• frame circulates back to source where it is removed
• Medium access control
• determines when a station can insert frame
8
Frame transmission on a Ring LAN
LAN Topology: Star
• Stations connect to common central node
• Usually via two point-to-point links
• One for transmission and one for reception
• Central Node (Hub)
• Operates in broadcast fashion
• Physical star – logically a bus
• Only one station can transmit at a time
• Hub could act as a frame switch
• send only to recipient
10
Choosing a LAN Topology
• Factors to consider include reliability, flexibility/expandability, and
performance
• Bus/tree is most flexible
• Tree topology easy to lay out
• Ring provides high throughput, but reliability problems – single failure
cripples network
• Star can be high speed for short distances, but has limited
expandability – natural layout
11
LAN Transmission Media
• Capacity
• Can it support expected traffic?
• Reliability
• Can it meet requirements for availability?
• Types of data supported
• Is it well-suited to the applications involved?
• Environmental scope
• Can it provide service in required environments?
13
LAN cabling areas
• Work Area
a minimum of two jacks for each work area
the EIA/TIA standard specifies maximum of 10m UTP to connect end device
to the wall jack
Straight through cable is most common patch cable
• telecommunication room
transition between back bone cabling and horizontal cabling
EIA/TIA specifies maximum of 5m patch cord to connect patch panel to the
equipment
Also contains servers used by the network
Horizontal cabling
maximum length 90m
Runs from patch panel in telecommunication room to wall jack
backbone cabling
connect telecommunication room to equipment room
connect to ISP or WAN
Cables length and bandwidth
Types of UTP cables
• Identify the pin out of the straight-through and
cross-over cables
…
• use straight through cable for connecting different layer devices
switch to router
computer to switch
computer to hub
• Use cross over cable for connecting same layer devices
switch to switch
switch to hub
hub to hub
Router to router
computer to computer
Computer to router
Types of Connections in a LAN
CSCI 465
Data Communications & Networks
21
IEEE 802 Layers
Physical Layer
• Encoding / decoding of signals
• Preamble generation / removal - synchronization
• Bit transmission / reception
• Transmission medium and topology
• Considered below physical layer of OSI model
• Critical in LAN design
22
IEEE 802 LLC and MAC
• Logical Link Control Layer (LLC)
• Provides interface to higher levels
• Performs flow and error control
• Medium Access Control (MAC)
• Assemble data into frame – address, error control
• Disassemble frame
• address recognition and error detection
• Govern access to transmission medium
• For same LLC, several MAC options provided
23
Ethernet
• IEEE publishes a standard for LAN. these standards are numbered 802
• Ethernet is the common LAN standard numbered 802.3
• Ethernet operates in the lower two layers of the OSI standard
Physical and Data Link Features of Ethernet
• how the Ethernet operates across two layers of the
OSI model
Physical and Data Link Features of Ethernet
• Logic Link Control – Connecting the Upper Layers
Physical and Data Link Features of Ethernet
• Media Access Control (MAC)
Historic Ethernet
• Ethernet in its early years Emergence of LAN switches
Media access control method on Ethernet
Rules
• If medium is idle, transmit
• If medium is busy
• Continue to listen until idle (1-persistent)
• Transmit once idle but keep listening
• If collision detected while transmitting, stop
• After collision, wait a random amount of time, referred to as the “backoff ”,
then start again
30
Ethernet frame
Ethernet Address(MAC address)
• 48 bit integer (281 trillion possibilities) or 6 bytes, each byte
represented in hexadecimal e.g 00-07-E9-63-CE-53
• Assigned to interface card by manufacturer who purchases set of
addresses from IEEE
• No two interfaces have same address, thus changing interface
changes address
• Higher levels of software must accommodate address change
• Used within networks across local media
• The ARP protocol is used to resolve ip address to mac address
32
Explain the Address Resolution Protocol (ARP) process.
Methodology
• Analyze customer’s requirements .
• Choose and Develop LAN structure (topology.
• Set up addressing and routing.
Step 1- Analyze Requirements
• Business issues
• Corporate Structure – small firm with 560 employees
• Business information flow - ?
• Technology issues
• Applications in use - ?
• Current topology – NONE
• Performance characteristics of current network
• Administrative issues
• Determine if documented policies are in place - ?
• Mission-critical data - ? Mission-critical
• operations - ? Approved protocols and
• platforms - ? Central versus distributed
• authority - ?
Step 2 – Choose and develop LAN topology
• Considering the requirement for fast access and the possibility for a future
expansion the best fitting LAN would be fast Ethernet.
• With the same consideration in mind the specific choice would be
100Base-TX using CAT5(UTP or STP).
Choice of backbone (vertical) cabling .
Choice of horizontal cabling
Layer 1 Logical Documentation
Layer 1 logical documentation is
concerned with...
• exact location of
MDF/IDF.
• type & quantity of
cabling .
• room locations &
# of drops
• port numbers
• cable labels
46
Access Layer
The access layer interfaces with end devices, such as PCs, printers, and IP
phones, to provide access to the rest of the network.
47
Distribution Layer
• The distribution layer aggregates the data received from the access layer switches before
it is transmitted to the core layer for routing to its final destination.
48
Core layer
The core layer of the hierarchical design is the high-speed backbone of the internet
work
49
Collapsed core
52
Design principles
• Network Diameter
• Network diameter is the number of devices that a packet has to cross before
it reaches its destination.
• Keeping the network diameter low ensures low and predictable latency
between devices.
54
.
55
Hierarchical Network Design Principles
• Bandwidth Aggregation
• Bandwidth aggregation is the practice of considering the
specific bandwidth requirements of each part of the
hierarchy.
• After bandwidth requirements of the network are known,
links between specific switches can be aggregated,
• Link aggregation allows multiple switch port links to be
combined so as to achieve higher throughput between
switches
• Cisco has a proprietary link aggregation technology called
EtherChannel, which allows multiple Ethernet links to be
consolidated.
56
.
57
Hierarchical Network Design Principles
• Redundancy
• Redundancy is one part of creating a highly available
network.
• Implementing redundant links can be expensive.
• It is unlikely that you will be able to implement redundancy
at the access layer because of the cost and limited features
in the end devices, but you can build redundancy into the
distribution and core layers of the network.
58
Redundant Links
59
Converged networks
• Convergence is the process of combining voice and video
communications on a data network.
• Converged networks also required extensive management in
relation to Quality of Service (QoS), because voice and video
data traffic needed to be classified and prioritized on the
network.
• Few individuals had the expertise in voice, video, and data networks
to make convergence feasible and functional.
• Converging voice, video, and data networks has become more
popular recently in the small to medium-sized business market
because of advancements in technology.
60
Example of real world hierarchical topology
.
Choosing switches
• Carry out Traffic Flow Analysis using software to monitor amount and
source of traffic. Allow for growth.
• Carry out User Communities Analysis. Group by job function. How
many ports? How much bandwidth? Allow for growth.
• Carry out Data Stores and Data Servers analysis. Traffic to, from,
between.
• topology
Topology Diagram
Switch Features
• Identify the key features of switches that are used in
hierarchical networks
• Switch form factors
• Fixed Configuration Switches
• Modular Switches
• Stackable Switches
• Identify the switch features found in each level in a hierarchical
network
• Performance:
• Port Density number of ports available on a single switch
• Forwarding Rates
• Link Aggregation
64
65
Choosing switches (contd)
• Port density – how many ports? (Allow for links between switches.)
• Forwarding rate – How many Gbps can it process? Can all ports work
simultaneously at maximum speed?
• Link aggregation (EtherChannel) – up to 8 ports bound together,
acting as one, with combined bandwidth – can it do this?
Choosing switches (contd)
• Power over Ethernet (PoE) for IP phones, network access points. Do
you need it? It adds to the cost.
• Multilayer switch needed? Typical switch works at Data Link layer (2),
uses MAC addresses. Multilayer also works at Network layer (3),
routes between subnets.
PoE and Layer 3 Functionality
68
.
69
.
70
.
71
WAN Technologies
WAN Technology
WAN generally carry a variety of traffic types , such as voice
video and data .
Telephone and data service are the most commonly data
service
Physical Layer: WANs
WAN Line Types and Bandwidth
WAN Devices
CSU/DSU
• For digital lines , a channel service unit (CSU) and data service unit
(DSU) are required.
• The two are often combined in to a single place of equipment called
CSU/DSU
fic.
ATM
Asynchronous Transfer Mode (ATM) is a technology capable
of transferring voice, video, and data through private and
public networks. It is built on a cell based architecture rather
than on a frame-based architecture.
DSL
Cable Modem
Internetworking concepts
IP Addressing and Sub netting
4/5/2021
Internetworking concepts
• Define the Internetwork
The internet network is defined as a global mesh of
interconnected networks
the most well-known and widely used publicly-accessible
internetwork is the Internet.
The Internet is created by the interconnection of networks
belonging to Internet Service Providers (ISPs).
4/5/2021 2
The Internet Intranet and Extranet
4/5/2021 3
ADDRESSING
• Four levels of addresses are used in an internet employing the
TCP/IP protocols: physical, logical, port, and specific.
TCP/IP Addresses:
4/5/2021
Relationship of layers and addresses in TCP/IP
4/5/2021 5
Addressing the Network
Assigning Addresses: Static or Dynamic
IP addresses assigned either statically through an administrator or
dynamically through DHCP
Static: includes entering the host IP address, subnet mask, and
default gateway
Advantages over dynamic addresses, useful for printers, servers,
and other networking devices that need to be accessible to clients
on the network
However, it can be time-consuming to enter the information on each
host
When using static IP addressing, it is necessary to maintain an accurate list of the
IP address assigned to each device, These are permanent addresses and are not
normally reused.
Dynamic: DHCP enables the automatic assignment of addressing
information
It reduces the burden on network support staff and virtually
eliminates entry errors.
4/5/2021 6
Addressing the Network
Dynamic address is not permanently assigned to a host but is only "leased" for a
period of time.
If the host is powered down or taken off the network, the address is returned to the
pool for reuse. This feature is especially helpful for mobile users that come and go
on a network.
4/5/2021 7
Addressing the Network
Addresses for Servers and Peripherals: are a concentration point for network
traffic.
Should have a static/predictable addresses
Addresses for Hosts that are Accessible from Internet
These devices are usually servers of some type
the addresses should be static & public space addresses
Addresses for Intermediary Devices: concentration point for network traffic
Devices such as hubs, switches, and wireless access points do not require IPv4
addresses to operate as intermediary devices. However, if we need to access
these devices as hosts to configure, monitor, or troubleshoot network
operation, they need to have addresses.
they should have predictable addresses & should be in a different range within
the network block than user device addresses
4/5/2021 8
Addressing the Network
Who assigns the different addresses:( http://www.iana.net )
Internet Assigned Numbers Authority(IANA): is the master holder of the IP
addresses.
The IP multicast addresses and the IPv6 addresses are obtained directly from
IANA.
Until the mid-1990s, all IPv4 address space was managed directly by the IANA.
At that time, the remaining IPv4 address space was allocated to various other
registries to manage for particular purposes or for regional areas.
These registration companies are called Regional Internet Registries (RIRs):
4/5/2021 9
Addressing the Network
Internet Service Provider/ISP’s:
An ISP will generally supply a small number of usable IPv4 addresses to their
customers as a part of their services, loans or rents.
To get access to the services of the Internet, we have to connect our data network
to the Internet using an Internet Service Provider (ISP).
Other services that an ISP generally provides to its customers are DNS services, e-
mail services, and a website.
Depending on the level of service required and available, customers use different tiers of an
ISP.
ISPs are designated by a hierarchy based on their level of connectivity to the
Internet backbone. Each lower tier obtains connectivity to the backbone via a
connection to a higher tier ISP
4/5/2021 10
IPV4 Addresses
• An IPV4 address is a 32 bit address that uniquely and universally
defines the connection of a device to the internet.
• IPv4 addresses are unique. They are unique in a sense that each
address defines one and only one, connection to the internet.
• Two device on the internet can never have the same address at the
same time.
• A protocol such as IPv4 that defines address has an address space.
• An address space is the total number of addresses used by the
protocol.
• If a protocol uses N bits to define an address space is 2N Because
each bit can have two different values (0 or 1) and N bits can have
2N values
• IPv4 uses a 32 bit address, which means the address space is 232 or
4,294,967,296.
4/5/2021 11
IPv4 Addresses
• To make the IPv4 address more compact and easier to read ,
internet addresses are usually written in decimal form with decimal
point (dot) separating the bytes.
• The following an example of the dotted decimal notation
123.234.111.76
Classful Addressing
• In classful addressing, the address space is divided into five classes:
A, B, C, D, and E.
• Each class occupies some part of the address space
• We can find the class of an address
• When given the address in binary notation the first few bits can be
immediately tell us the class of the address
• If the address is given in dotted decimal notation , the first byte
describes the class
4/5/2021 12
Finding the classes in binary and dotted-
decimal notation
4/5/2021 13
Example
Find the class of each address.
a. 00000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 14.23.120.8
d. 252.5.15.111
• Solution
a. The first bit is 0. This is a class A address.
b. The first 2 bits are 1; the third bit is 0. This is a class C
address.
c. The first byte is 14; the class is A.
d. The first byte is 252; the class is E.
4/5/2021 14
IPV4 Addresses
Classes and Blocks
• One problem with classful addressing is that each class is divided
into a fixed number of blocks with each block having a fixed size as
shown in the following table
Class Number of Blocks Block Size Application
A 128 (0-127) 16,777,216 Unicast
4/5/2021 16
Classless Addressing
• In classful addressing , a large part of the available addresses were
wasted.
• Classful addressing, which is almost obsolete, is replaced with
classless addressing
• To overcome the address depletion and give more organizations
access to the internet, classless addressing was designed and
implemented.
Address Blocks
• In classless addressing, when an entity, small or large, needs to be
connected to the internet, it is granted a block (range) of addresses.
• The size of block (the number of addresses) varies based on the
nature and size of the entity.
4/5/2021 17
Classless Addressing
• To simplify the handling of addresses, the internet authorities
impose three restriction on classless address blocks
• The address in a block must be contiguous, one after another
• The number of addresses in a block must be a power of
2(1,2,4,8,16…)
• The first address must be evenly divisible
• Example: A classless IP address assigned to a small organization
with only 16 IP Addresses
205.16.37.32
205.16.37.33
.
.
.
205.16.37.47
4/5/2021 18
Classless Addressing
• A better way to define a block of address in classless addressing is
to select any address in the block and mask it.
• A mask is a 32bit number in which the n left most bits are 1s and
the 32-n rightmost bits are 0s.
• The mask can take a value from 0 to 32
• IN IPV4 classless addressing a block of addresses can be defined as
x.y.z.t/n in which x.y.z.t defines one of the addresses and the /n
defines the mask
• The address and /n notation completely define the whole block (
the first address, the last address , and the number of addresses.
• The first address in the block can be found by setting the 32-n right
most bits in the binary notation of the address 0.
• The last address in the block can be found by setting the rightmost
32-n bits to 1s.
4/5/2021 19
Classless Addressing
• The number of address in the block can be found by using the
formula 232-n
• Example: Find the first address, the last address and the number of
addresses in the following classless block 205.16.37.39/28
Solution
Step 1: Convert the dotted decimal representation into binary
representation 11001101 00010000 00100101 00100111
Step 2: To find the first address in the block convert the 32-28 right
most bits to 0. 11001101 00010000 00100101
00100000=205.16.37.32.
Step 3: To find the first address in the block convert the 32-28 right
most bits to 1. 11001101 00010000 00100101
00101111=205.16.37.47.
Step 4: The number of address is 232-28 is 16.
4/5/2021 20
n=28, 2 32−28 or No of Add.= 16.
Home work:
An ISP is granted a block of addresses starting with 190.100.0.0/16 (65,536
addresses). The ISP needs to distribute these addresses to three groups of
customers as follows:
a. The first group has 64 customers; each needs 256
addresses.
b. The second group has 128 customers; each needs 128
addresses.
c. The third group has 128 customers; each needs 64
addresses.
find out how many addresses are still available after these allocations.
4/5/2021 21
Addressing the Network
The subnet mask: Is it on my network?
IPv4 address has a network portion and a host portion
Subnet mask is used to create and specify the network and host portions
We referred to the prefix length as the number of bits in the address giving us the
network portion
The prefix and the subnet mask are different ways of representing the network
portion of an address
4/5/2021 22
Addressing the Network
The subnet mask: The Network Address
When an IPv4 packet is created or forwarded, the destination network address
must be extracted from the destination address.
This is done by a logic called AND
The IPv4 host address is logically ANDed with its subnet mask to determine the
network address to which the host is associated
When this ANDing between the address and the subnet mask is performed,
the result yields the network address
Anding operation:
1 AND 1 = 1
1 AND 0 = 0
0 AND 1 = 0
0 AND 0 = 0
4/5/2021 23
Addressing the Network
The subnet mask: The Network Address
Example: ANDing of an IPv4 host address and subnet mask
4/5/2021 24
Addressing the network
Subnetting Basics
4/5/2021 26
Addressing the Network
Subnetting Basics
How to create subnets:
By using one or more of the host bits as network bits.
This is done by extending the mask to borrow some of the bits from the host
portion of the address to create additional network bits
For each bit borrowed, we double the number of sub networks available.
For example, if we borrow 1 bit, we can define 2 subnets, If we borrow 2
bits, we can have 4 subnets.
Example: if we borrow one bit
11111111.11111111.11111111.00000000 – Subnet 1
11111111.11111111.11111111.10000000 -- Subnet 2
If we borrow two bit
11111111.11111111.11111111.00000000 – Subnet 1
11111111.11111111.11111111.01000000 -- Subnet 2
11111111.11111111.11111111.10000000 – Subnet 3
11111111.11111111.11111111.11000000 -- Subnet4
However, with each bit we borrow, fewer host addresses are available per subnet.
4/5/2021 27
Addressing the Network
Subnetting Basics
Example:
RouterA in the figure has two interfaces to interconnect two networks.
Given an address block of 192.168.1.0 /24, we need to create two
subnets.
4/5/2021 28
Addressing the Network
Calculating Addresses: Subnetting Basics
Example:
RouterA in the figure has two interfaces to interconnect two networks.
Given an address block of 192.168.1.0 /24, we need to create two subnets.
We borrow one bit from the host portion by using a subnet mask of
255.255.255.128, instead of the original 255.255.255.0 mask.
The most significant bit in the last octet is used to distinguish between
the two subnets.
For one of the subnets, this bit is a "0" and for the other subnet this bit
is a "1".
Formula for calculating subnets we can create by borrowing bits of host
address
2^n where n = the number of bits borrowed
In this example, the calculation looks like this:
2^1 = 2 subnets
4/5/2021 29
Addressing the Network
Calculating Addresses: Subnetting Basics
Example:
Formula for calculating the number of hosts in the subnet
2^n - 2 where n = the number of bits left for hosts
Applying this formula, (2^7 - 2 = 126) shows that each of these subnets
can have 126 hosts.
For each subnet, examine the last octet in binary. The values in these
octets for the two networks are:
Subnet 1: 00000000 = 0
Subnet 2: 10000000 = 128
See the figure for the addressing scheme for these networks
4/5/2021 30
Addressing the Network
Calculating Addresses: Subnetting Basics
Example 2: consider an internetwork that requires three subnets.
Again we start with the same 192.168.1.0 /24 address block.
Borrowing a single bit would only provide two subnets.
To provide more networks, we change the subnet mask to
255.255.255.192 and borrow two bits. This will provide four subnets.
Calculate the subnet :
2^2 = 4 subnets
calculate the number of hosts, begin by examining the last octet:
Subnet 0: 0 = 00000000
Subnet 1: 64 = 01000000
Subnet 2: 128 = 10000000
Subnet 3: 192 = 11000000
Apply the host calculation formula:
2^6 - 2 = 62 hosts per subnet
4/5/2021 31
Addressing the Network
Calculating Addresses: Subnetting Basics
Example: 2
4/5/2021 32
Addressing the Network
Calculating Addresses: Subnetting Basics
Example: 2
4/5/2021 33
Addressing the Network
Calculating Addresses: Subnetting a subnet/VLSM
Variable Length Subnet Mask (VLSM) was designed to maximize
addressing efficiency.
When identifying the total number of hosts using traditional subnetting,
we allocate the same number of addresses for each subnet.
If all the subnets have the same requirements for the number hosts,
these fixed size address blocks would be efficient. However, most
often that is not the case.
For example: the topology in the next slide shows a subnet
requirement of seven subnets, one for each of the four LANs and one
for each of the three WANs.
With the given address of 192.168.20.0, we need to borrow 3 bits from
the 4/5/2021
host bits in the last octet to meet our subnet requirement. 34
These bits are borrowed bits by changing the corresponding subnet
mask bits to "1s" to indicate that these bits are now being used as
network bits.
The last octet of the mask is then represented in binary by 11100000,
which is 224. The new mask of 255.255.255.224 is represented with
the /27 notation to represent a total of 27 bits for the mask.
In binary this subnet mask is represented as:
11111111.11111111.11111111.11100000
After borrowing three of the host bits to use as network bits, this
leaves five host bits. These five bits will allow up to 30 hosts per
subnet.
It seems the task of dividing the network into an adequate number of
networks is done but, with a significant waste of unused addresses.
4/5/2021 35
Calculating Addresses: Subnetting a subnet/VLSM
For example, only two addresses are needed in each subnet for the WAN
links. There are 28 unused addresses in each of the three WAN subnets
that have been locked into address these address blocks.
Further, this limits future growth by reducing the total number of subnets
available. This inefficient use of addresses is characteristic of Classful
addressing.
With this addressing, we have subnets 4, 5, and 7 available for future networks, as
well4/5/2021
as several other subnets available for WANs. 37
Chapter -5
Switching and Routing
Fundamental Concepts and Technologies:
Taxonomy of Networks
2
Communication
Network
Circuit-Switched Packet-Switched
Network Network
C
B D
1 circuit 2 2
3
A 7 6 E
circuit 1
Packet Switching [1]
6
input output
queues queues
switch
fabric
memory
Statistical Multiplexing
8
output buffer
N
Datagram Packet Switching
9
C
A.1
C.2
B C.1
C.1 A.2 D
C.2 A.3
1 2
C.1
C.2 3
C.2 A.1
A.3
A.1 5
A.3 A.2
A.2
4 A.2
A A.1 7 A.2 6 E
A.2
A.3
Virtual-Circuit Packet Switching
14
C.2
C
C.1 A.1
B VC 2 C.1 A.2
A.2
C.2 A.3
D
1 2
C.2
C.1 3
C.1
C.2 A.1
A.2
5 A.3
A.2 A.1
A.3
4
A A.1 VC 1 7 6 E
A.2
A.3
Comparison
15