100% found this document useful (2 votes)
547 views

IP Addressing and Subnetting

IP addressing and subnetting allow devices to be logically grouped and identified on a network. The document discusses: - The history and development of IP versions 4 and 6, including address sizes and features - IP address classes and their network/host portions - Private and public IP addresses - Network, broadcast, and host address types - Subnet masks and how they are used to identify the network portion of an IP address - An example of subnetting a Class C network into 5 subnets In 3 sentences or less, this summary provides an overview of the key topics covered in the document regarding IP addressing fundamentals, classes, address types, subnet masks, and an example of subnetting a network.

Uploaded by

Rhy Obra
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
547 views

IP Addressing and Subnetting

IP addressing and subnetting allow devices to be logically grouped and identified on a network. The document discusses: - The history and development of IP versions 4 and 6, including address sizes and features - IP address classes and their network/host portions - Private and public IP addresses - Network, broadcast, and host address types - Subnet masks and how they are used to identify the network portion of an IP address - An example of subnetting a Class C network into 5 subnets In 3 sentences or less, this summary provides an overview of the key topics covered in the document regarding IP addressing fundamentals, classes, address types, subnet masks, and an example of subnetting a network.

Uploaded by

Rhy Obra
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 36

IP Addressing and Subnetting

The Internet Protocol(IP) Intro


1960 Arpa (Advanced Research Projects Agency) part US Department of Defense R&D, started
to build a WAN, known as Arpanet, to share resources and important data with their expensive
mainframe computers, it started only with 4 computers and later on added more and more across
America. Arpanet is the predecessor of Internet. As time goes by other WAN were built but each
use different technology. To interconnect WANs with different tech they have to set a standard
protocol and it was the IP in early 1970s.

Currently we widely use the IPv4


IPv4 is a 32-bit address.
4,294,976,296 addresses or 2^32
Almost exhausted but saved by NAT Network Address Translation
Most common for all of us, FORMAT: 192.168.1.1, 172.16.10.2, 202.138.135.101
The next generation is the IPv6
128-bit
340,282,366,920,938,463,463,374,607,431,768,211,456 addresses
340 undecillion or 3.4x10^38
Every square inch of earth can have 3.6million address
FORMAT: fe80::216d:9419:35bb:db87:160f:235c
Tunneling is used to be backward compatible with IPv4

What happened to IPv5?


Internet Stream Protocol
Experimental ATM/MPLS/VoIP
Never really took off

Ip Addressing
AKA logical address
Assigned by the network administrator to provide a way of grouping network devices.

We now understand that MAC Address are used to communicate on a


LAN, we also know that NIC are manufactured by different vendors
which hardcoded a random MAC on each. There no logical way to
group them but IP ADDRESS.

REVIEW
Binary to Decimal / Decimal to Binary Conversion
Convert 157 to binary
Decimal
Binary

128

64

32

16

16

128
Hence, 128+16+8+4+1=157

Therefore the binary equivalent of 157 is 10011101

Convert 202 to binary


Decimal
Binary

128

64

32

16

128

64

Hence, 128+64+8+2=202
Therefore the binary equivalent of 202 is 11001010

Convert 10011001 to Decimal

Write the binary equivalent from right to left

Decimal
Binary

128

64

32

16

16

128
Hence, 128+16+8+1 = 153

Therefore the decimal equivalent of 10011001 is 153

Convert 11101011 to Decimal


Decimal
Binary

128

64

32

16

128

64

32

Hence, 128+64+32+8+2+1=235
Therefore the decimal equivalent of 10011001 is 235

IP Address (Version 4)
32 bits logical address.

Used as the source and destination address of a device either in LAN or WAN.

Represented as four dotted decimal notation.


Example:
10.255.16.252
10

255

00001010 . 11111111 .

1st Octet

2nd Octet

16

252

00010000 .

11111100

3rd Octet

4th Octet

Decimal Format
Binary Format

Classes of IP Address

Class

Range

Class A

0 - 127

Class B

128 - 191 Commercialized

Class C

192 - 223

Class D

224 - 239

Multicasting

Class E

240 - 255

Experimental

IP Addresses

Note: 1st Octet of the IP


Address is used as the basis
to identify the class.
Memorize the range.

Parts of IP Address
Network Portion (Network Identifier)
Used to Identify the network or group of an IP address.
Host Portion
Uniquely provides identity for a given device in the network.
Class A
N.H. H.H
Class B
N.N. H.H
Class C
N.N. N.H
Note: N stands for Network Portion
H stands for Host Portion

Example
s: 10.255.16.252

Class A

210.25.176.22

Class C

25.37.126.143

Class A

225.37.126.143

Class D

128.158.21.78

Class B

240.158.21.78

Class E

223.156.161.0
111.177.61.0

Class C
Class A

224.0.0.5
131.77.116.0

Class D

191.0.0.140

Class B

199.22.1.10

Class B
Class C

198.126.0.0

Class C

18.126.10.0

Class A

134.128.23.0

Class B

234.17.0.0

Class D

162.91.21.11

Class B

172.81.19.10

Class B

67.109.21.0

Class A

197.229.21.0

Class C

134.128.23.0

Class B

245.0.0.0

Class E

67.159.21.0

Class A

187. 9.0.3

Class B

214.108.0.0

Class C

219.8.81.111

Class C

Class

Possible No. of Hosts

16,777,214

65,534

254

Types of IP Address
1. Network Address
Address that identifies the network or group of IP address.
All the bits in the host portion are set to zero 0.
Invalid IP address
2. Broadcast Address
Address used to send traffic to all hosts.
All the bits in the host portion are set to one 1.
Invalid IP address
3. Host Address
Valid Addresses assigned to all devices in the network
Addresses between the network and broadcast address.

Types of IP Address
Class
Network Address
A

14.0.0.0

correct

14.1.1.1

incorrect

14.20.0.0

incorrect

14.11.11.11

incorrect

14.20.21.0

incorrect

14.111.111.111

incorrect

14.255.255.255

correct

14.0.255.255

incorrect

128.0.0.0

correct

128.130.0.0 correct
128.130.18.0 incorrect
C

Broadcast Address

198.0.0.0

correct

198.60.0.0 correct
198.130.18.0 correct

128.255.255.255 correct
128.130.255.255 correct
128.130.18.255 incorrect
198.0.0.255

correct

198.60.255.255 correct
198.255.255.255 correct

To identify if an IP Address is Network, Broadcast or Host:


NETWORK ADDRESS
<0-127>
.
0
<128-191> .
X
<192-223> .
X

.
.
.

0
0
X

.
.
.

0
0
0

BROADCAST ADDRESS
<0-127>
.
255
<128-191> .
X
<192-223> .
X

.
.
.

255
255
X

.
.
.

255
255
255

Types of IP Address
4. Reserved IP Address
A. Loopback Address
Used to check if the TCP/IP protocol is properly installed.
Used to check if the network interface card ip working.
127.X.X.X
B. Local Link address or the Automatic Private IP Address
(APIPA)
Automatically generated IP Address by the computer when the
DHCP server fails to send an IP address. Used for temporary
communication.
169.254.X.X

C. Subnet Mask
A subnet mask separates the IP address into the network and host addresses
(<network><host>).
It is called a subnet mask because it is used to identify network address of an IP address by
performing bitwise AND operation on the subnet mask.
Subnet Mask is made by setting network bits to all "1"s and setting host bits to all "0"s.

Default Subnet Masks

CIDR value

Class A

255.0.0.0

/8

11111111.00000000.00000000.00000000

Class B

255.255.0.0

/16

11111111.11111111.00000000.00000000

Class C

255.255.255.0

/24

11111111.11111111.11111111.00000000

AND Logic and its Role


AND Logic provides a means for devices to determine the
network address of a given IP Address (source and destination).

ANDing
How to identify NETWORK ADDRESS

INPUT
X

0
1
0
1

Example:
IP Address: 172.16.32.211
Subnet Mask: 255.255.0.0

OUTPUT
Y

0
0
1
1

0
0
0
1

172.16.32.211 =

10101100 . 00010000 . 00100000 . 11010011

255.255.0.0

11111111 . 11111111 . 00000000 . 00000000

10101100 . 00010000 . 00000000 . 00000000


172

. 16

.0

.0

CATEGORIES OF IP ADDRESS
Public IP Address
Are those IP Addresses assigned by the IANA (Internet Assigned
Number Authority) or by the ISP (Internet Service Provider)
These addresses are used when connecting to the Internet or
Accessing a remote resource.
Private IP Address
Addresses used in the Local Area Network.
Free IP addresses
Not public routable
-Range of Private IP AddressesClass A
10.0.0.0
10.255.255.255
Class B
172.16.0.0
172.31.255.255
Class C
192.168.0.0 192.168.255.255

NAT = Network Address Translation


Visit www.whatismyip.com to
know your Public IP that
represents your Private LAN.
Public IP Address

Public IP Address
Default Gateway
Public IP Address
Default Gateway
Default Gateway

Test Yourself
Given

172.23.25.0
192.168.21.
0
112.61.0.0
128.21.255.
255
201.1.20.0
171.31.0.25
5
10.0.255.25

Clas
s
B
C
A

Type
Host
Network
Host

Category
Private
Private

Subnet
Mask
255.255.0.0

Validit
Valid
y
Invalid 255.255.255.0

Public

Valid

255.0.0.0

Broadcast

Public

Invalid

255.255.0.0

Network

Public

Invalid 255.255.255.0

Host

Public

Valid

255.255.0.0

Host

Private

Valid

255.0.0.0

Subnetting
Process of dividing a single broadcast domain IP Address
into two or more subdomain, process of borrowing bits
from the host portion of a given IP Address.
The easy way:
Given:

192.168.1.0/24

Subnetting
STEPS:
1. Given the IP Address, count the number of broadcast domain/s.
2. Convert the number of broadcast domain into binary and count the number of
bits.
Where Borrowed Bits(BB)=number of binary bits

3.Determine the new subnetmask by adding the borrowed bits to the default
subnetmask.
4.Identify the Increment.
5. Identify the new Sub-networks.

Given:

192.168.1.0/24

1. Given the IP Address, count the number of


broadcast domain/s.

1
4
2
3

2. Convert the number of broadcast domain into binary and


count the number
of bits.
Where Borrowed Bits(BB)=number of binary bits

Number of Broadcast Domains = 5


= 101
Convert 5 into binary
Count the number of bits
1

Number of bits

= 3 bits

3. Determine the new subnetmask by adding the


borrowed bits to the default subnetmask(in binary
format)
Subnet Mask Review:
Default Subnet Masks
Class A

255.0.0.0

/8

11111111.00000000.00000000.00000000

Class B

255.255.0.0

/16

11111111.11111111.00000000.00000000

Class C

255.255.255.0

/24

11111111.11111111.11111111.00000000

11111111.11111111.11111111.00000000
11111111.11111111.11111111.11100000

8bits . 8bits . 8bits . 3 borrowed bits

/24 + 3 = /27 or 255.255.255.224

4. Identify the Increment.


Borrowed
Bits
10000000

No. of
Bits

Incremen End of Subnet


t
Mask

128

128

11000000

64

192

11100000

32

224

11110000

16

240

11111000

248

11111100

252

11111110

254

11111111

255

Borrowed
Bits
Increment

128 64

32

16

End of Subnet
128 192 224 240 248 252 254 255
Mask

1st Octet

/1

2nd Octet

/9

/2

/3

/4

/5

/6

/7

/8

/10 /11 /12 /13 /14 /15 /16

3rd Octet

/17 /18 /19 /20 /21 /22 /23 /24

4th Octet

/25 /26 /27 /28 /29 /30 /31 /32

192.

168.

1.

/27

8bits

8bits

8bits

3bits

255.

255.

255.

224

/27
Increment = 32

5. Increment ( )is the value of the lowest network bit available. This
value should be added in the octet where the borrowed bit is located to
identify the new subnetworks.

11111111.11111111.11111111.

128

64

32

16

= 32

11100000

192.168.1.0/27 Network Address

192.168.1.128/27 Network Address

192.168.1.1 First usable host

192.168.1.129 First usable host


Subnet 0

192.168.1.30 Last usable host


192.168.1.31 Broadcast Address

Subnet 4
192.168.1.158 Last usable host
192.168.1.159 Broadcast Address

192.168.1.32/27 Network Address

192.168.1.160/27 Network Address

192.168.1.33 First usable host

192.168.1.161 First usable host


Subnet 1

192.168.1.62 Last usable host


192.168.1.63 Broadcast Address

Subnet 5
192.168.1.190 Last usable host
192.168.1.191 Broadcast Address

192.168.1.64/27 Network Address

192.168.1.192/27 Network Address

192.168.1.65 First usable host

192.168.1.193 First usable host


Subnet 2

192.168.1.94 Last usable host


192.168.1.95 Broadcast Address

Subnet 6
192.168.1.222 Last usable host
192.168.1.223 Broadcast Address

192.168.1.96/27 Network Address

192.168.1.224/27 Network Address

192.168.1.97 First usable host

192.168.1.225 First usable host


Subnet 3

192.168.1.126 Last usable host


192.168.1.127 Broadcast Address

Subnet 7
192.168.1.254 Last usable host
192.168.1.255 Broadcast Address

Example 2
172.16.0.0/16
20 subnets =
/16

8bits
172.

8bits
16.

255.

255.

20 subnets
5 bits
5

/21
5bits
0.

248.
Increment=

172.16.0.0/21
172.16.8.0/21
172.16.16.0/21
172.16.24.0/21

0bits
0

/21

0
8

172.16.32.0/21
172.16.40.0/21
172.16.48.0/21
172.16.56.0/21

172.1664.0/21
172.16.72.0/21
172.16.80.0/21
172.16.88.0/21

Practice more subnetting at:


www.nybi.org/subnet-1.php

E ND

You might also like