Unit 2
Unit 2
Cloud Computing 1
Course Objective:
The purpose of learning this course is to
▪ Understand the basic services and concepts related to Internetwork
▪ Understand the layered network architecture
▪ Acquire knowledge in IP addressing
▪ Exploring the services and techniques in physical layer
▪ Understand the functions of Data Link layer
▪ Implement and analyze the different Routing Protocols
Cloud Computing 2
UNIT –II Contents
• IPv4 Addressing, Address space
• Dotted Decimal Notation
• ClassfulAddressing
• Subnet Mask
• Subnetting
• Special Addresses
• Classless Addressing
• Private Address, NAT, Supernetting
• Hub, Repeaters, Switch, Bridge
• Structure of Router
Session 1
19.5
IPv4
• 32 bits long
– An IPv4 address is a 32-bit address that uniquely and universally
defines the connection of a device (for example, a computer or a
router) to the Internet.
Subnet Mask
Subnetting
Types of addressing
• Classful Addressing
• Classless Addressing
Classful Addressing and Problem
solving
Classful Addressing
• In classful addressing, the address space is divided
into five classes: A, B, C, D, and E.
Classful Addressing
Classful Addressing – Class Range
Example 1
Change
Changethe
thefollowing
followingIPv4
IPv4addresses
addressesfrom
frombinary
binarynotation
notationtotodotted-decimal
dotted-decimalnotation.
notation.
Solution
Solution
We
We replace
replace each
each group
group of
of 88 bits
bits with
with its
its equivalent
equivalent decimal
decimal number
number (see
(seeAppendix
Appendix B)
B)
and
andadd
adddots
dotsfor
forseparation.
separation.
19.22
Example 2
Change the following IPv4 addresses from dotted-decimal notation to binary notation.
Solution
19.23
Example 3
c. 14.23.120.8
d. 252.5.15.111
Solution
address.
The first address in the block can be found by setting the rightmost
32 − n bits to 0s.
Example 4
Solution
The binary representation of the given address is
11001101 00010000 00100101 00100111
If we set 32−28 rightmost bits to 0, we get
11001101 00010000 00100101 0010000
or
205.16.37.32.
Note
The last address in the block can be found by setting the rightmost
32 − n bits to 1s.
Example 5
Solution
The binary representation of the given address is
11001101 00010000 00100101 00100111
If we set 32 − 28 rightmost bits to 1, we get
11001101 00010000 00100101 00101111
or
205.16.37.47
Note
The number of addresses in the block can be found by using the formula
232−n.
Example 6
Solution
The value of n is 28, which means that number
of addresses is 2 32−28 or 16.
Example 7
Another way to find the first address, the last address, and
the number of addresses is to represent the mask as a 32-bit
binary (or 8-digit hexadecimal) number. This is
particularly useful when we are writing a program to find
these pieces of information. In Example 19.5 the /28 can be
represented as
11111111 11111111 11111111 11110000
(twenty-eight 1s and four 0s).
Find
a. The first address
b. The last address
c. The number of addresses.
Example 7 (continued)
Solution
a. The first address can be found by ANDing the given
addresses with the mask. ANDing here is done bit by
bit. The result of ANDing 2 bits is 1 if both bits are 1s;
the result is 0 otherwise.
Example 7 (continued)
19.42
Figure 2 Two levels of hierarchy in an IPv4 address
19.43
Two Level of Hierarchy
19.44
Three Level of Hierarchy
19.45
Address Aggregation
• IP Address Aggregator is a utility developed to
automate minimization process and convert bunch
of IPv4 addresses into smallest continuous range(s)
possible. IP aggregation is commonly performed by
network engineers working with BGP & routers.
• This utility will help webmasters to configure server
firewalls, apache, address masks and so on.
Session 5
• Special Addresses
47
Special Addresses
• An IP address (internet protocol address) is a numerical
representation that uniquely identifies a specific interface on the
network.
• Addresses in IPv4 are 32-bits long. This allows for a maximum of
4,294,967,296 (232) unique addresses. Addresses in IPv6 are 128-bits,
which allows for 3.4 x 1038 (2128) unique addresses.
• The total usable address pool of both versions is reduced by various
reserved addresses and other considerations.
• IP addresses are binary numbers but are typically expressed in
decimal form (IPv4) or hexadecimal form (IPv6) to make reading and
using
Monday, them
October easier18CSS202J
17, 2022 for humans.
Computer Communications - Unit 2, Session 5 48
Special Addresses
• There are a few reserved IPv4 address spaces which cannot be used on
the internet. These addresses serve special purpose and cannot be
routed outside the Local Area Network.
• As in Classful IP Addressing, some blocks of addresses or some
addresses in each block have been reserved for the special purpose &
that’s why they are termed as special IP addresses.
• The special addresses of classful addressing were inherited by the
classless addressing when it was introduced in 1996.
• There can be an entire block of addresses reserved for special
addressing or there can be some addresses in each block that are
reserved for special addressing.
Monday, October 17, 2022 18CSS202J Computer Communications - Unit 2, Session 5 49
Special Addresses
1. Special Blocks of Addresses
• There are some blocks of addresses in IPv4 address space that are
reserved for a special objective.
232-4 = 228 = 26,84,35,456.
• The multicast address is assigned to the group of the host instead of
one single host.
• The packet sent to the multicast address is delivered to all the host of
that group.
64
Classless Addressing
65
Classless Addressing
Address Blocks
granted a BLOCK (RANGE) OF An ISP, as the Internet service provider given thousands or
hundreds of thousands based on the number of customers it
ADDRESSES. may serve.
66
Classless Addressing - Restriction
67
Slash Notation
Slash notation is also called
CIDR (Classless inter-domain routing)
notation.
Examp The beginning address is 205.16.37.24. To find the
leA small organization is given a last address we keep the first 29 bits and change the
last 3 bits to 1s.
block with the beginning
address and the prefix length Beginning:11001111 00010000 00100101
205.16.37.24/29 (in slash 00011000
notation). Ending : 11001111 00010000 00100101
00011111
What is the range of the block? We can argue that the length of the suffix is 32 - 29 or 3. So there are 2 = 8 3
68
68
Slash Notation
A block in classes A, B, and C can easily be represented in slash notation as A.B.C.D/ n
where n is either 8 (class A), 16 (class B), or 24 (class C).
Design the sub blocks and give the slash notation for each sub block.
Find out how many addresses are still available after these allocations?
Solution
Group 1 Group 2
For this group, each customer needs 256 For this group, each customer needs 128
addresses. This means the suffix length addresses. This means the suffix length is 7 (27
is 8 (28 = 256). = 128).
The prefix length is then 32 - 8 = 24. The prefix length is then 32 - 7 = 25. The
01: 190.100.0.0/24 190.100.0.255/24 addresses are:
02: 190.100.1.0/24 190.100.1.255/24 001: 190.100.64.0/25 190.100.64.127/25
………………………………….. 002: 190.100.64.128/25 190.100.64.255/25
64: 003:190.100.127.128/25
190.100.63.0/24190.100.63.255/24 190.100.127.255/25
Soluti
on
Session 9
• Private Address, NAT, Supernetting
• Hub, Repeaters, Switch
75
Private address, Network
addresses translation -Super
netting.
PUBLIC & PRIVATE ADDRESSES IN
IPV4
M.RAJALAKSHMI 77
Public addresses
• When the public addresses are assigned, routes are programmed into the
routers of the Internet so that traffic to the assigned public addresses can
reach their locations.
M.RAJALAKSHMI 78
Public Addresses
• Public ip are the ip that can be accessed by every one (i,e) every user
has the access to this ip's.
M.RAJALAKSHMI 79
Private Addresses
• Private ip's are the ip that cannot be accessed by every one(i,e) they
are privately owned by an organization / private concern. Only the
user of that organisation has the access to this ip's.
Eg : SRM University
M.RAJALAKSHMI 80
Range of private ip
M.RAJALAKSHMI 81
NAT – Network Address Translation
• A technology that can provide the mapping between the
private and universal addresses, and at the same time
support virtual private networks.
• Allows a site to use a set of private addresses for internal
communication and a set of global Internet addresses
(atleast one) for communication with the rest of the
world.
M.RAJALAKSHMI 82
NAT – Network Address Translation
• It is the way that the router translates the IP addresses of packets
that cross the internet/local network boundary.
• When computer “A” sends a packet out “from” that of computer “A” –
192.168.1.2. When the router passes that packet on to the internet, it
replaces the local IP address with the internet IP address assigned by the
ISP.
• It also keeps track, so that if a response comes back from somewhere on
the internet, the router knows to do the translation in reverse – replace
the internet IP address with the local IP address for machine “A” and
then send that response packet on to machine “A”.
• NAT is not restricted to private-to-public address translation,
though that is the most common application.
• NAT can also perform public-to-public address translation, as well
as private-to-private address translation.
M.RAJALAKSHMI 84
Example
M.RAJALAKSHMI 85
Figure 19.10 A NAT implementation
19.86
Network Address Translation (NAT)
• Benefits
• Use of a single IP address among
many devices in a network
• Use of a dynamic IP address for
home user for sharing
• Drawbacks
• Machines on the internet cannot
initiate communications to local
machines – they can only respond
to communications initiated by
those local machines. The net
effect is that the router then also
acts as a firewall.
19.87
Subnetting vs supernetting
Subnetting:
• For example:
• An organization that needs 1000 addresses can be granted four
contiguous class C blocks.
M.RAJALAKSHMI 89
Intermediate devices - Hub,
Repeaters, Switch, Bridge-
Gateways -Structure of a
ROUTER
Intermediate devices - Hubs
• A hub is typically the least expensive, least intelligent, and least
complicated. Its job is very simple – anything that comes in one port is
sent out to the others. That is it broadcasts everything.
• If a message comes in for computer “A”, that message is sent out all the
other ports, regardless of which one computer “A” is on:
M.RAJALAKSHMI 91
Hubs
• And when computer “A” responds, its response also goes out to
every other port on the hub:
M.RAJALAKSHMI 92
Types of Hub
M.RAJALAKSHMI 93
Drawbacks
M.RAJALAKSHMI 94
Ethernet Repeaters
Repeaters
• The net result is that most network traffic only goes where it
needs to rather than to every port.
100
Bridges
Structure of router
2.10.1 What is a Bridge in a Computer Network?
• Definition1:
A bridge is one of the network devices in computer networks to
connect two or more communication networks or network
segments and creates a single network. It provides
interconnection with other computer networks, which use the
same protocol. The multiple local area networks (LANs) can be
connected to form a larger local area network.
• Definition2:
A bridge in a computer network is one kind of network device,
used to separate a network into sections. Every section in the
network represents a collision domain that has separate
bandwidth. So that network performance can be improved using a
bridge. In the OSI model, a bridge works at layer-2 namely the
data link layer. The main function of this is to examine the
incoming traffic and examine whether to filter it or forward it.
2.10.2 Working Principle
• In a computer network, a bridge separates
a LAN into different segments like
segment1 & segment2, etc and the MAC
address of all the PCs can be stored into
the table.
• For instance, PC1 transmits the data to
PC2, where the data will transmit to the
bridge first.
• So the bridge reads the MAC address &
decides whether to transmit the data to
segment1 or segment2.
• Therefore, the PC2 is accessible in
segment1, which means the bridge
transmits the data in segment1 only &
eliminates all the connected PCs in
segment2.
• In this way, the bridge reduces traffic in a
computer network.
2.10.3 Functions of Bridges in Computer Network
• The bridge allows to spit the local area network into many small
segments.
• It performs the all tasks in data link layer in OSI model.
• Bridge helps to hold the MAC address of all computers in the network.
• It helps to decrease the traffic over the network.
• With using of MAC address, bridge gets to filter the all contents of
source and destination points.
• It is used for making the interconnection two LAN networks along with
single and same protocol.
• Bridge can work as single large LAN with connecting the multiple
virtual LANs.
• Bridge has ability to switch any types of data packets like as Apple talk
packets or IP packets over the network layer because in which payload
field of the data frame is not considered. Only MAC address or
destination address of the frame is acceptable to block or forward the
data to each node in the computer network.
2.10.4 Types of Bridges
Bridges in the computer network are classified into five types which
include the following.
1. Transparent Bridge.
2. Translational Bridge.
3. Source-route Bridge.
4. MAC-Layer Bridge.
5. Remote Type Bridge
2.10.4 .1 Transparent Bridge
• It is also known as the “Learning Bridges“.
• Transparent bridge has not visibility to other installed stations or
terminals over the computer network.
• It does not need to reconfigure the station because it is either added
or deleted from the entire network.
• Main aim of the transparent bridge is getting to block or forwarding
the data packets depend on the MAC address.
• It is getting more popularity while using in the networking.
• Transparent bridge is a plug and play bridge.
• This bridge creates its table of terminal addresses on its own.
• It allows to make its table for source location and able to self
updating.
2.10.4.2 Translational Bridge
• A translational bridge plays a key role in changing a networking
system from one type to another.
• These bridges are used to connect two different networks like
token ring & Ethernet.
• This bridge can add or remove the data based on the traveling
direction, and forward the frames of the data link layer in between
LANs which uses various types of network protocols.
• The different network connections are Ethernet to FDDI/token ring
otherwise Ethernet on UTP (unshielded twisted pair) to coax & in
between FOC and copper wiring.
2.10.4.3 Source-route Bridge
• Source-route bridge is introduced by IBM for using the Token ring
networks.
• It allows to embed the all frame routes into one frame, and then this
bridge takes the precise decisions that how the frame is forwarding
with using of the network.
• In this technique, two same network segments can be linked to data
link layer.
• Special frames are discovered by the host, it is known as the
“Discovery Frame“, and it spreads them over the entire network.
• Source-route Bridge helps to prevent the looping problems.
2.10.4.4 MAC-Layer Bridge
• MAC-layer Bridge is also known as the “Local Bridge“
• It offers the packet filtering and repeating services for network
segments of the similar types.
• It does not require the packet filtering or buffering because it
simply broadcast the incoming data packets to the accurate port or
remove them.
2.10.4.5 Remote Type Bridge
A bridge is able to connect only two different A router is capable of connecting the LAN and
LAN segments. WAN.
A bridge transfers the data in the form of frames. A router transfers the data in the form of packets.
It sends data based on the MAC address of a It sends data based on the IP address of a device.
device.
The bridge has only one port to connect the The router has several ports to connect the
device. devices.
The bridge does not use any table to forward the The router uses a routing table to send the data.
data.
Key Router Bridge
Objective Router main objective is to connect various Bridge main objective is to connect various
1 networks. LANs.
Layer Router works in Network Layer. Bridge works in Data Link Layer.
2
Address Router scans device's IP Address. Bridge scan device's MAC Address.
3
Data Router sends data in form of packets. Bridge also sends data in form of packets.
4 Format
Routing Router uses routing table. Bridge do not use routing table.
5 Table
Domain Router works on more than single broadcast Bridge works on a single broadcast domain.
6 domains.
Ports Router has more than two ports. Bridge has only two ports.
7