IPv4 Addressing

Download as pdf or txt
Download as pdf or txt
You are on page 1of 34

IPv4 Addressing

Prepared by: Liqaa Omer


What is IP Address?
• Internet Protocol (IP)address: is an identifying number that is associated with a specific
computer or computer network. When connected to the internet, the IP address allows
the computers to send and receive information.
What is IP Address?
IPv4 addresses are 32-bit numbers that are typically displayed in dotted decimal
notation. A 32-bit address contains two primary parts: the network prefix and the
host number.
What is IP Address?
• 11010000 01100010 11000000 10101010 = 208.98.192.170
• 01110110 00001111 11110000 01010101 = 118.15.240.85
• 00110011 11001100 00111100 00111011 = 51.204.60.59
IP Address Classes
Class A
• 1.0.0.1 to 126.255.255.254
• Supports 16 million hosts on each of 127 networks
Class B
• 128.1.0.1 to 191.255.255.254
• Supports 65,000 hosts on each of 16,000 networks
Class C
• 192.0.1.1 to 223.255.254.254
• Supports 254 hosts on each of 2 million networks
IP Address Classes
Subnet Mask
A subnet mask is a number that defines a range of IP addresses available
within a network. A single subnet mask limits the number of valid IPs
for a specific network
Gateway
A gateway IP refers to a device on a network which sends local network
traffic to other networks. The subnet mask number helps to define the
relationship between the host and the rest of the network
Private IP Addresses

• 192.168.0.0 - 192.168.255.255 (65,536 IP addresses)

• 172.16.0.0 - 172.31.255.255 (1,048,576 IP addresses)

• 10.0.0.0 - 10.255.255.255 (16,777,216 IP addresses)


Public IP Addresses
Subnet mask and prefix

192.168.1.0 / 24

192.168.1.0 255.255.255.0

255 . 255 . 255 . 0


1111 1111. 1111 1111. 1111 1111. 0000 0000
Subnet mask and prefix

172.16.0.0 / 16

172.16.0.0 255.255.0.0

255 . 255 . 0 . 0
1111 1111. 1111 1111. 0000 0000. 0000 0000
Subnet mask and prefix

10.0.0.0 / 8

10.0.0.0 255.0.0.0

255 . 0 . 0 . 0
1111 1111. 0000 0000. 0000 0000. 0000 0000
Classful Subnetting
Class C subnetting

192.168.2.0/24 192.168.1.0/24 192.168.0.0/24


Class B subnetting

172.18.0.0/16 172.17.0.0/16 172.16.0.0/16


Class A subnetting

12.0.0.0/8 11.0.0.0/8 10.0.0.0/8


Classless (CIDR)
• In classful addressing method millions of class A address are wasted.
• Many of the class B address are wasted.
• Class C is so small that it cannot cater the needs of organizations.
• Classful networking was replaced by Classless Inter-Domain Routing
(CIDR) in 1993.
Required networks and hosts

Required hosts: 1000 Required networks: 25 Required hosts: 150


Magic Table
Magic Table
Classless Subnetting

• Can we change the subnet mask?

• Can we modify networks ?

• Can we divide a class C IP address into two networks?

• How about 192.168.1.0/25 ?


Class C Subnetting
192.168.1.0 / 25

192.168.1.0 255.255.255.128
192.168.1.128 255.255.255.128

255 . 255 . 255 . 128


• How many networks?
1111 1111. 1111 1111. 1111 1111. 1000 0000
• How many IP address?
Class B Subnetting
172.16.0.0 / 17

172.16.0.0 255.255.128.0
172.16.128.0 255.255.128.0

255 . 255 . 128 . 0


• How many networks?
1111 1111. 1111 1111. 1000 0000. 0000 0000
• How many IP address?
Class A Subnetting
10.0.0.0 / 12

10.0.0.0 255.240.0.0
10.15.0.0 255.240.0.0

255 . 240 . 0 . 0
1111 1111. 1111 0000. 0000 0000. 0000 0000
• How many networks?
• How many IP address?
IP Address Details

• Network ID: is first IP address in the network and it cannot be used.

• Broadcast: is the last IP address in the network and cannot be used.

• Don’t forget to eliminate 2 IP addresses when subnet an IP range.

• First usable IP addresses and last usable IP address.


Example
192.168.20.166/25:
256-128=128

Network 1: 192.168.20.0 – 192.168.20.127


Network 2: 192.168.20.128 – 192.168.20.255

• Network ID: 192.168.20.128


• Broadcast ID: 192.168.20.255
• First Host ID: 192.168.20.129
• Last Host ID: 192.168.20.254
Example
192.168.30.14/29 256-128=128

Network 1: 192.168.30.0 – 192.168.30.7


Network 2: 192.168.30.8 – 192.168.30.15
Network 3: 192.168.30.16 – 192.168.30.23
Network 4: 192.168.30.24 – 192.168.30.31
Network 5: 192.168.30.32 – 192.168.30.39
• Network ID: 192.168.30.8 .
.
• Broadcast ID: 192.168.30.15 .
• First Host ID: 192.168.30.9 Network 32: 192.168.30.248 - 192.168.30.255

• Last Host ID: 192.168.30.14


FLSM
256-192=64
• Fixed Length Subnet Mask
• Divide class C IP address into 4 networks:
192.168.1.0/26 255.255.255.192
Network 1: 192.168.1.0 – 192.168.1.63
Network 2: 192.168.1.64 – 192.168.1.127
Network 3: 192.168.1.128 – 192.168.1.191
Network 4: 192.168.1.192 – 192.168.1.255
VLSM
256-224=32
Variable Length Subnet Mask
Divide class C IP address into multiple networks:

192.168.1.0/25 255.255.255.128
192.168.1.128/26 255.255.255.192
192.168.1.192/27 255.255.255.224 Network 1: 192.168.1.0 – 192.168.1.127
192.168.1.224/28 255.255.255.240 Network 2: 192.168.1.128 – 192.168.1.191
Network 3: 192.168.1.192 – 192.168.1.223
Network 4: 192.168.1.224 – 192.168.1.239
Network 5: 192.168.1.240 – 192.168.1.247
Network 6: 192.168.1.248 – 192.168.1.251
Network 7: 192.168.1.252 – 192.168.1.255
More Examples
• What is the resident subnet for IP Address : 192.168.44.97/30 ?
• How many subnets and hosts per subnet can you get from network
192.168.193.0 255.255.255.248?
• What is the first valid host on the subnetwork that the node 172.31.212.25/26?
• PC1 has an IP Address of 43.109.23.12/8 find the following :
• Maximum number of hosts in the network.
• Network broadcast address.
• First Usable address of the network.
• Last Usable address of the network.

You might also like