Chapter VI Computer Network and Communication
Chapter VI Computer Network and Communication
3
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
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):
5
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
6
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.
7
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
8
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
B 16,384 (128-191) 65,536 Unicast
C 2,097,152(192-223) 256 Unicast
D 1 (223-239) 268,435,456 Multicast
E 1 (240 +) 268,435,456 Reserved
10
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
11
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.
12
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.
13
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
14
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
15
Addressing the Network
The subnet mask: The Network Address
Example: ANDing of an IPv4 host address and subnet mask
16
Addressing the network
Subnetting Basics
19
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.
20
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
21
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
22
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
23
Addressing the Network
Calculating Addresses: Subnetting Basics
Example: 2
24
Addressing the Network
Calculating Addresses: Subnetting Basics
Example: 2
25
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 host bits in the last octet to meet our subnet requirement. 26
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.
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
well as several other subnets available for WANs. 29