0% found this document useful (0 votes)
213 views

Chapter-4 Ip Address and Subnetting

This document discusses IP addressing and subnetting. It defines IP and IP versions 4 and 6. It then covers subnetting concepts like subnet masks, CIDR notation, and how to calculate the number of subnets, hosts, and valid subnet ranges when subnetting class C addresses using different subnet mask lengths. Examples are provided to illustrate how to determine subnet information for class C addresses subnetted to /25, /28, /29 and /30. The document also provides examples for subnetting a class B address.

Uploaded by

IG TECH
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
213 views

Chapter-4 Ip Address and Subnetting

This document discusses IP addressing and subnetting. It defines IP and IP versions 4 and 6. It then covers subnetting concepts like subnet masks, CIDR notation, and how to calculate the number of subnets, hosts, and valid subnet ranges when subnetting class C addresses using different subnet mask lengths. Examples are provided to illustrate how to determine subnet information for class C addresses subnetted to /25, /28, /29 and /30. The document also provides examples for subnetting a class B address.

Uploaded by

IG TECH
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Chapter 4

Ip address and Subnetting


Ip Address

• What is IP?
• An Internet Protocol address is also known as IP address. It is a
numerical label which assigned to each device connected to a
computer network which uses the IP for communication.
• IP address act as an identifier for a specific machine on a particular
network.
• The IP address is also called IP number and internet address. IP
address specifies the technical format of the addressing and packets
scheme.
• Most networks combine IP with a TCP (Transmission Control
Protocol). It also allows developing a virtual connection between a
destination and a source.
IP version-6 address

• It is the most recent version of the Internet Protocol.


• Internet Engineer Taskforce initiated it in early 1994. The design and
development of that suite is now called IPv6.
• This new IP address version is being deployed to fulfill the need for more
Internet addresses. It was aimed to resolve issues which are associated
with IPv4.
• With 128-bit address space, it allows 340 undecillion unique address
space. IPv6 also called IPng (Internet Protocol next generation).
• IPv6 (Normal) address has the following format: y : y : y : y : y : y : y : y
where y is called a segment and can be any hexadecimal value between 0
and FFFF.
• Example IPV6 address: 2001 : db8 : 3333 : 4444 : CCCC : DDDD : EEEE : FFFF
IP version-4 (IP-V4) address

• IPv4 was the first version of IP. It was deployed for production in the
ARPANET in 1983.
• Today it is most widely used IP version.
• It is used to identify devices on a network using an addressing system.
• The IPv4 uses a 32-bit address scheme allowing to store 2^32 addresses
which is more than 4 billion addresses.
• Till date, it is considered the primary Internet Protocol and carries 94% of
Internet traffic.
• Example Ip-v4:
• 10.0.0.0
• 176.168.0.0
• 192.168.0.0
Subnetting
• To break up a giant network into a bunch of smaller ones is called subnetting.
• Creating subnetworks is essentially the act of taking bits from the host
portion of the address and reserving them to define the subnet address
instead. It will result in fewer bits being available for defining your hosts.
To create a subnet, fulfill these three steps:
1. Determine the number of required network IDs:
- One for each LAN subnet
-One for each wide area network connection
2. Determine the number of required host IDs per subnet:
-One for each TCP/IP host
-One for each router interface
3. Based on the above requirements, create the following:
- A unique subnet mask for your entire network
-A unique subnet ID for each physical segment
-A range of host IDs for each subnet
Subnet Masks
A subnet mask is a 32-bit value that allows the device that’s
receiving IP packets to distinguish the network ID portion
from the host ID portion of the IP address. This 32-bit subnet
mask is composed of 1s and 0s, where the 1s represent the
positions that refer to the network subnet addresses.
Power of 2
Decimal values in a mask and their binary equivalents
Decimal Binary

0 00000000

128 10000000

192 11000000

224 11100000

240 11110000

248 11111000

252 11111100

254 11111110

255 11111111
Classless Inter-Domain Routing (CIDR)
It’s basically the method that Internet service providers (ISPs) use to allocate a
number of addresses to a companies. It uses the slash notation that represents
the number of 1s in the subnet mask.
192.168.10.32/28. This is telling you what your subnet mask is. The slash
notation (/) means how many bits are turned on (1s).
Subnet Mask CIDR representation
• 255.0.0.0 /8
• 255.255.0.0 /16
• 255.255.128.0 /17
• 255.255.192.0 /18
• 255.255.224.0 /19
• 255.255.240.0 /20
• 255.255.248.0 /21
• 255.255.252.0 /22
• 255.255.254.0 /23
• 255.255.255.0 /24
Subnetting Class C Addresses
In a Class C address, only 8 bits are available for defining the
hosts. Remember that subnet bits start at the left and move to
the right, without skipping bits. This means that the only Class C
subnet masks can be the following:
Binary Decimal CIDR
• 00000000= 0 /24
• 10000000= 128 /25
• 11000000= 192 /26
• 11100000= 224 /27
• 11110000= 240 /28
• 11111000= 248 /29
• 11111100= 252 /30
Subnetting Formulas
• How many subnets? 2x = number of subnets. x is the number of masked
bits.
• Number of host bits = 32 – number of network bits
• How many hosts per subnet? 2y – 2 = number of hosts per subnet. y is the
number of unmasked bits, or the 0s.
• What are the valid subnets? 256 – subnet mask = block size, or
increment number.
• Number of borrowed bits = network bits – default subnet bit(for class full
addressing)
• First host address is obtained adding one at the last octet of a subnet or
by turning every host bit of a subnet to 1 except the last one.
• Last host address can be obtained by adding number of hosts to subnet
ID or by turning every host bit of a subnet to 1 except the last one.
• Broadcast address is obtained by turning all the host bits in a subnet to 1.
Subnetting class C address
1. Address: 192.168.10.0/25
Subnet Mask: 255.255.255.128
No. Of subnets= , Here n is bits for subnetting which is 1,
=2
No of hosts= -2= 128-2= 126
Block Size= 256-128= 128, Subnets: 0,128

No. Network Address First IP Last IP Broadcast

1. 192.168.10.0 192.168.10.1 192.168.10.126 192.168.10.127

2. 192.168.10.128 192.168.10.129 192.168.10.254 192.168.10.255


Subnetting class C address
Address: 192.168.10.0/28
Subnet Mask: 255.255.255.240
No. Of subnets= =16 , Bits taken for subnetting = 4
No of hosts= -2= 16-2= 14, Host bits=4
Block Size= 256-240=16
Subnets: 0, 16, 32, 48, 64, 80, 96, …

No. Network Address First IP Last IP Broadcast

1. 192.168.10.0 192.168.10.1 192.168.10.14 192.168.10.15

2. 192.168.10.16 192.168.10.17 192.168.10.30 192.168.10.31

3. 192.168.10.32 192.168.10.33 192.168.10.46 192.168.10.47


Subnetting class C address
Address: 192.168.10.0/29
Subnet Mask: 255.255.255.248
No. Of subnets= =32 , Bits taken for subnetting = 5
No of hosts= -2= 8-2= 6, Host bits=3
Block Size= 256-248=8
Subnets: 0, 8,16,24, 32, 40, 48, …

No. Network Address First IP Last IP Broadcast

1. 192.168.10.0 192.168.10.1 192.168.10.6 192.168.10.7

2. 192.168.10.8 192.168.10.9 192.168.10.14 192.168.10.15

3. 192.168.10.16 192.168.10.17 192.168.10.22 192.168.10.23


Subnetting class C address

Address: 192.168.10.0/30
Subnet Mask: 255.255.255.252
No. Of subnets= =64 , Bits taken for subnetting = 6
No of hosts= -2= 4-2= 2, Host bits=2
Block Size= 256-252=4
Subnets: 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40,…..…
No. Network Address First IP Last IP Broadcast

1. 192.168.10.0 192.168.10.1 192.168.10.2 192.168.10.3

2. 192.168.10.4 192.168.10.5 192.168.10.6 192.168.10.7

3. 192.168.10.8 192.168.10.9 192.168.10.10 192.168.10.11


Subnetting Practice class B
Address: 172.16.0.0/17
Subnet Mask: 255.255.128.0
No. Of subnets= =2 , Here n=1 ,
No of hosts= -2= 32,766 (7+8bits)
Block Size= 256-128= 128
Subnets: 0.0, 128.0

No. Network Address First IP Last IP Broadcast

1. 172.16.0.0 172.16.0.1 172.16.127.254 172.16.127.255

2. 172.16.128.0 172.16.128.1 172.16.255.254 172.16.255.255


3.
Subnetting Practice class B
Address: 172.16.0.0/19
Subnet Mask: 255.255.224.0
No. Of subnets= =8 , Here n=3 ,
No of hosts= -2= 8192-2= 8,190 (5+8bits)
Block Size= 256-224=32
Subnets: 0.0, 32.0,64.0,96.0, 128.0, 160.0,192.0,224.0
No. Network Address First IP Last IP Broadcast
1. 172.16.0.0 172.16.0.1 172.16.31.254 172.16.31.255

2. 172.16.32.0 172.16.32.1 172.16.63.254 172.16.63.255


3. 172.16.64.0 172.16.64.1 172.16.95.254 172.16.95.255
Subnetting Practice class B

Address: 172.16.0.0/24
Subnet Mask: 255.255.255.0
No. Of subnets= =256 , Here n=8 ,
No of hosts= -2= 256-2= 254 (8bits)
Block Size= 256-255=1
Subnets: 0.0, 1.0,2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, …………
No. Network Address First IP Last IP Broadcast
1. 172.16.0.0 172.16.0.1 172.16.0.254 172.16.0.255
2. 172.16.1.0 172.16.1.1 172.16.1.254 172.16.1.255
3. 172.16.2.0 172.16.2.1 172.16.2.254 172.16.2.255
Subnetting Practice class B

Address: 172.16.0.0/28
Subnet Mask: 255.255.255.240
No. Of subnets= =4096 , Here n=12 ,
No of hosts= -2= 16-2= 14 (4bits)
Block Size= 256-240=16
Subnets: 0.0, 0.16,0.32,0.48,0.64,0.80,0.96 …………

No. Network Address First IP Last IP Broadcast


1. 172.16.0.0 172.16.0.1 172.16.0.14 172.16.0.15
2. 172.16.0.16 172.16.0.17 172.16.0.30 172.16.0.31
3. 172.16.0.32 172.16.0.33 172.16.0.46 172.16.0.47
Subnetting Practice class B

Address: 172.16.0.0/30
Subnet Mask: 255.255.255.252
No. Of subnets= =16384 , Here n=14 ,
No of hosts= -2= 4-2= 2 (2bits)
Block Size= 256-252=4
Subnets: 0.0, 0.4, 0.8, 0.12, 0.16, 0.20, 0.24, …………

No. Network Address First IP Last IP Broadcast


1. 172.16.0.0 172.16.0.1 172.16.0.2 172.16.0.3
2. 172.16.0.4 172.16.0.5 172.16.0.6 172.16.0.7
3. 172.16.0.8 172.16.0.9 172.16.0.10 172.16.0.11
Subnetting Practice class A
Address: 10.0.0.0/10
Subnet Mask: 255.192.0.0
No. Of subnets= =4 , Here n=2 ,
No of hosts= -2= 4,194,304 (6+8+8bits)
Block Size= 256-192= 64
Subnets: 0.0.0, 64.0.0,128.0.0,192.0.0,………

No. Network Address First IP Last IP Broadcast

1. 10.0.0.0 10.0.0.1 10.63.255.254 10.63.255.255


2. 10.64.0.0 10.64.0.1 10.127.255.254 10.127.255.255

3. 10.128.0.0 10.128.0.1 10.191.255.254 10.191.255.255


Subnetting Practice class A
Address: 10.0.0.0/16
Subnet Mask: 255.255.0.0
No. Of subnets= =256 , Here n=8 ,
No of hosts= -2= 65536-2= 65,534(8+8bits)
Block Size= 256-255= 1 (2nd Octet)
Subnets: 0.0.0, 1.0.0,2.0.0, 3.0.0, 4.0.0, ………

No. Network Address First IP Last IP Broadcast

1. 10.0.0.0 10.0.0.1 10.0.255.254 10.0.255.255


2. 10.1.0.0 10.1.0.1 10.1.255.254 10.1.255.255

3. 10.2.0.0 10.2.0.1 10.2.255.254 10.2.255.255


Subnetting Practice class A
✓Address: 10.0.0.0/24
✓Subnet Mask: 255.255.255.0
✓No. Of subnets= =65,536, Here n=16 ,
✓No of hosts= -2= 256-2=254 (8bits)
✓Block Size= 256-255= 1 (3rd Octet)
✓Subnets: 0.0.0, 0.1.0, 0.2.0, 0.3.0, 0.4.0,……
No. Network Address First IP Last IP Broadcast

1. 10.0.0.0 10.0.0.1 10.0.0.254 10.0.0.255


2. 10.0.1.0 10.0.1.1 10.0.1.254 10.0.1.255

3. 10.0.2.0 10.0.2.1 10.0.2.255 10.0.2.255


Subnetting Practice class A
✓Address: 10.0.0.0/30
✓Subnet Mask: 255.255.255.252
✓No. Of subnets= = 4,194,304 Here n=22,
✓No of hosts= -2= 4-2=2 (2 bits)
✓Block Size= 256-252= 4
✓Subnets: 0.0.0, 0.0.4, 0.0.8, 0.0.12, 0.0.16,……
No. Network Address First IP Last IP Broadcast

1. 10.0.0.0 10.0.0.1 10.0.0.2 10.0.0.3


2. 10.0.0.4 10.0.0.5 10.0.0.6 10.0.0.7

3. 10.0.0.8 10.0.0.9 10.0.0.10 10.0.0.11


Route summarization

• Summarization, also called route aggregation, allows routing protocols to


advertise many networks as one address.
• The purpose of this is to reduce the size of routing tables on routers to
save memory
• Route summarization (also called route aggregation or supernetting) can
reduce the number of routes that a router must maintain
• Route summarization is possible only when a proper addressing plan is in
place
• Route summarization is most effective within a subnetted environment
when the network addresses are in contiguous blocks.
Route summarization: Example

Routing table
172.16.12.0/24 172.16.12.0/24
172.16.13.0/24
172.16.14.0/24
172.16.15.0/24 Routing table
172.16.13.0/24
172.16.12.0/22

172.16.14.0/24 This router summarize


those address and
introduce block
address
“172.16.12.0/22”
172.16.15.0/24 to next router
• Step-1: convert all octets of each ip-address to binary
• 172.16.12.0 = 10101000.00010000.00001100.00000000
• 172.16.13.0 = 10101000.00010000.00001101.00000000
• 172.16.14.0 = 10101000.00010000.00001110.00000000
• 172.16.15.0 = 10101000.00010000.00001111.00000000
• Step-2: copy the matching bits in each ip-address
• 10101000.00010000.00001100.00000000
• 10101000.00010000.00001101.00000000
• 10101000.00010000.00001110.00000000
• 10101000.00010000.00001111.00000000
-----------------------------------------
Matching bits: 10101000.00010000.000011
• Step-3: Append 0 at the end of matching bits until it becomes 32 bit
• 10101000.00010000.00001100.00000000
• Step-4: count the number of matching bit to get subnet mask “/”
• 22 matching bits are there is above example so subnet mask = /22
• Step-5: convert the binary in step-3 to decimal= 172.16.12.0
• Step-6: Summarized route with subnet mask will be: 172.16.12.0/22

You might also like