Chapter 5
Chapter 5
TCP/IP Suite
IP Addresses
INTRODUCTION
IP Address
• An IP address is an address used in order to uniquely
identify a device on an IP network.
• IP Addresses are used to route packets from a
sending node to a receiving node.
• The address is made up of 32 binary bits.
• Divided into a network portion and host portion
with the help of a subnet mask.
• The Internet Assigned Numbers Authority (IANA)
assigns network identifiers to avoid duplications.
IP Address
• The 32 binary bits are broken into four octets
(1 octet = 8 bits).
128.143.137.144
Network prefix and Host number
• The network prefix identifies a network and the host
number identifies a specific host (actually, interface on
the network).
An IP address is a
32-bit
address.
The IP addresses
are
unique.
Address space rule
…………..
addr1 …………..
The address spaceaddr15in a protocol
addr2 …………..
uses N-bits to …………..
that………….. define an
Address is: addr41 addr226
addr31
………….. 2N…………..
IPv4 address space
0x75951DEA
Example 1
Solution
129.11.11.239
Example 2
Solution
Solution
Solution
A, B, C, D, and E.
IP Address Classes
• The IP is divided into different classes.
0 Network Host
1 7 24
10 Network Host
2 14 16
Many class B addresses
are wasted.
Class C Address
• Class C addresses are used for small networks.
• The three high-order bits in a class C address
are always set to binary 1 1 0.
• The next 21 bits complete the network ID.
• The remaining 8 bits (last octet) represent the
host ID.
• This allows for 20,97,152 networks and 254
hosts per network.
Class C Address
Solution
Solution
•158.223.1.108
1st byte = 158 (128<158<191) class B
•227.13.14.88
1st byte = 227 (224<227<239) class D
Example 8
Solution
Solution
Figure 5-6
Solution
The number of subnets must be
a power of 2.
Example 11
Solution
The mask is
11111111 11111111 11111111 11100000
or
255.255.255.224
The number of subnets is 8.
The number of addresses in each subnet is 25 (5 is the
number of 0s) or 32
Subnet 1:
The bit combination is 001.
Taking last octet in binary :0 0 1 0 0 0 0 0 = 32 (10)
Example 3
Example 12
The mask is
Example 4
Variable-length subnetting
SUPERNETTING
What is suppernetting?
• Supernetting is the opposite of subnetting.
• In subnetting you borrow bits from the host
part.
• Supernetting is done by borrowing bits from the
network side.
• And combine a group of networks into one
large supernetwork.
Supernetting
• This enables organizations to modify their network
size and minimize the requirement of network
routing devices.
• Helps routers to store routing information
effectively.
A supernetwork
Rules:
The number of blocks must be a power of 2 (1,
2, 4, 8, 16, . . .).
The blocks must be contiguous in the address
space (no gaps between the blocks).
The third byte of the first address in the
superblock must be evenly divisible by the
number of blocks. In other words, if the number
of blocks is N, the third byte must be divisible by
N.
Example 5
255.255.240.0
Example 14