Figure 4.14 Example of direct broadcast address
Download
Report
Transcript Figure 4.14 Example of direct broadcast address
Chapter 4
Classful Internet Addressing
Objectives
Upon completion you will be able to:
• Understand IPv4 addresses and classes
• Identify the class of an IP address
• Find the network address given an IP address
• Understand masks and how to use them
• Understand subnets and supernets
Introduction of IP
The identifier used in the IP layer of the TCP/IP protocol suite to
identify each device connected to the Internet is called the Internet
address or IP address.
An IP address is a 32-bit address that uniquely and universally defines
the connection of a host or a router to the Internet.
IP addresses are unique. They are unique in the sense that each
address defines one, and only one, connection to the Internet.
Two devices on the Internet can never have the same address.
The topics discussed in this section include:
Address Space
Notation
Note:
An IP address is a 32-bit address.
Note:
The IP addresses are unique.
Note:
The address space of IPv4 is
232 or 4,294,967,296.
Dotted-decimal notation
Note:
The binary, decimal, and hexadecimal
number systems are reviewed in
Appendix B.
Example 1
Change the following IP addresses from binary notation to
dotted-decimal notation.
a. 10000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 11100111 11011011 10001011 01101111
d. 11111001 10011011 11111011 00001111
Solution
We replace each group of 8 bits with its equivalent decimal
number (see Appendix B) and add dots for separation:
a. 129.11.11.239
c. 231.219.139.111
b. 193.131.27.255
d. 249.155.251.15
Example 2
Change the following IP addresses from dotted-decimal
notation to binary notation.
a. 111.56.45.78
c. 241.8.56.12
b. 221.34.7.82
d. 75.45.34.78
Solution
We replace each decimal number with its binary equivalent:
a. 01101111 00111000 00101101 01001110
b. 11011101 00100010 00000111 01010010
c. 11110001 00001000 00111000 00001100
d. 01001011 00101101 00100010 01001110
Classful Addressing
IP addresses, when started a few decades ago, used the concept of
classes. This architecture is called classful addressing.
In the mid-1990s, a new architecture, called classless addressing, was
introduced and will eventually supersede the original architecture.
However, part of the Internet is still using classful addressing, but the
migration is very fast.
The topics discussed in this section include:
Recognizing Classes
Netid and Hostid
Classes and Blocks
Network Addresses
Mask
Occupation of the address space
Finding the class in binary notation
Finding the class in decimal notation
Netid and hostid
Note:
Millions of class A addresses are
wasted.
Blocks in class A
Blocks in class B
Note:
Many class B addresses are wasted.
Blocks in class C
Note:
The number of addresses in class C is
smaller than the needs of most
organizations.
Note:
Class D addresses are used for
multicasting; there is only one block in
this class.
Note:
Class E addresses are reserved for
future purposes; most of the block is
wasted.
Subnetting
• A single network address to span multiple physical network
is called subnet addressing or subnetting.
• Subnetting an IP network can be done for various reasons
including:
–
–
–
–
Use of different physical media
Preservation of address space
Security
Control network traffic
Note:
IP addresses are designed with two
levels of hierarchy.
A network with two levels of hierarchy (not subnetted)
A network with three levels of hierarchy (subnetted)
Addresses in a network with and without subnetting
Hierarchy concept in a telephone number
Default mask and subnet mask
Example 15
What is the subnetwork address if the destination address is
200.45.34.56 and the subnet mask is 255.255.240.0?
Solution
We apply the AND operation on the address and the subnet
mask.
Address
➡ 11001000 00101101 00100010 00111000
Subnet Mask
➡ 11111111 11111111 11110000 00000000
Subnetwork Address ➡ 11001000 00101101 00100000 00000000.
Figure 4.25
Comparison of a default mask and a subnet mask
Supernetting
• In Supernetting an organization can combine several class C
blocks to create a large range of address.
• By doing this , an organization can apply for a set of class C
blocks instead of just one.
– For example , an organization that needs 1000 address can be
granted four class c blocks.
Assigning Address
• We have two choices
• We can choose the blocks Randomly,
• Based on set of Rules.
Assigning Address (Randomly)
• the blocks randomly, the routers outside of the organization If we
choose treat each block separately .
• They think each block belong to a different site.
• In this way each router will have N entries in its routing table where
N is the number of blocks.
• This strategy may increase the size of the routing table
tremendously.
Assigning Address (based on rules)
• The other choice is to make a superblock out of the blocks so that
each router has only one entry in a routing table.
• To do so , we need to follow a set of rules when we assign the
blocks.
• The number of blocks must be power of 2(1,2,4,8..) .
• The blocks must be contiguous in the address space.
• If the number of blocks is N, the third bye must be divisible by N.
Figure 4.26
A supernetwork
Note:
In subnetting, we need the first address of the
subnet and the subnet mask to define the range
of addresses.
In supernetting, we need the first address of the
supernet and the supernet mask to define the
range of addresses.
Figure 4.27
Comparison of subnet, default, and supernet masks
Note:
The idea of subnetting and
supernetting of classful addresses is
almost obsolete.
Figure 4.10
Masking concept
Figure 4.11 AND operation
Table 4.2 Default masks
Note:
Note that we must not apply the
default mask of one class to an address
belonging to another class.
Special Purpose of IP Addresses
The topics discussed in this section include:
Network broadcast
Directed broadcast
Limited broadcast
Loopback address
Table 4.3 Special addresses
Figure 4.13
Network address
Directed Broadcast Address
• According to the standard any address with the host id
consisting of all 1s is reserved for directed broadcast
• When the packet is sent to such an address a single copy of the
packet is transferred across the internet from the source .
• Routers along the path use the netid portion of the address
when choosing a path ,they do not look at the host portion.
Figure 4.14 Example of direct broadcast address
Disadvantage of Directed Broadcast
Address
• The chief disadvantage of directed broadcast is that it
requires knowledge of the network address.
Limited or local network broadcast address
• All 1s for the netid and hostid(32-bits) defines a broadcast address
in the current network.
• A host that want to send a message to every other host can use this
address as a destination address in an IP packet.
• A router will block a packet having this type of address to
confine(limited) the broadcasting to the local network.
Figure 4.15
Example of limited broadcast address
Loopback Address
• The IP address with the first byte equal to 127 is used for the
loopback address.
• Which is an address used to test the software on a machine.
• When this address is used ,a packet never leaves a machine ; it
simply returns to the protocol software.
• It can be used to test IP software.
– For example, an application such as “ping” can send a packet with
a loopback address as the destination address to see if the IP
software is capable of receiving and processing a packet.
Figure 4.18
Example of loopback address
Weaknesses in Internet Addressing
• Most obvious disadvantage is that address refer to
network connection not to the host computer.
• If a host computer moves from one network to another,
its IP address must change.
• Changing network address can be incredibly time
consuming and difficult to debug.
Note:
The topics subnetting and supernetting are not included in
this chapter in your textbook .
you must refer your textbook also.