Network Training IP Addressing
Network Training IP Addressing
Understanding IP Address
Different classes of IP Address
Understanding Public and Private IP Address
Understanding Subnetting
Understanding classless inter-domain routing (CIDR)
1
Base 2 Number System
101102 = (1 x 24 = 16) + (0 x 23 = 0) + (1 x 22 = 4) +
(1 x 21 = 2) + (0 x 20 = 0) = 22
Converting Decimal to Binary
Convert 20110 to binary:
201 / 2 = 100 remainder 1
100 / 2 = 50 remainder 0
50 / 2 = 25 remainder 0
25 / 2 = 12 remainder 1
12 / 2 = 6 remainder 0
6 / 2 = 3 remainder 0
3 / 2 = 1 remainder 1
1 / 2 = 0 remainder 1
When the quotient is 0, take all the remainders in
reverse order for your answer: 20110 = 110010012
Binary to Decimal Chart
Hex to Binary to Decimal Chart
Network and Host Division
Each complete 32-bit IP address is broken down into a network
part and a host part. A bit or bit sequence at the start of each
address determines the class of the address. There are 5 IP
address classes.
6
IP Addressing
32 Bits
Dotted
Decimal Network Host
128
8
4
2
1
64
32
16
128
8
4
2
1
64
32
16
128
8
4
2
1
64
32
16
128
8
4
2
1
64
32
16
Example
Decimal 172 16 122 204
Example
Binary 10101100 00010000 01111010 11001100
7
IP Address Classes
•Class A:
•Class B:
•Class C:
•Class D: Multicast
•Class E: Research
8
IP Address Classes
Bits: 1 8 9 16 17 24 25 32
0NNNNNNN Host Host Host
Class A:
Range (1-126)
Bits: 1 8 9 16 17 24 25 32
10NNNNNN Network Host Host
Class B:
Range (128-191)
1 8 9 16 17 24 25 32
Bits:
110NNNNN Network Network Host
Class C:
Range (192-223)
1 8 9 16 17 24 25 32
Bits:
1110MMMM Multicast Group Multicast Group Multicast Group
Class D:
Range (224-239)
9
IP Address Classes
IP addresses are divided into classes to define the large,
medium, and small networks.
10
Identifying Address Classes
11
IP Address Classes Exercise
10.2.1.1
128.63.2.100
201.222.5.64
192.6.141.2
130.113.64.16
256.241.201.10
IP Address Classes Exercise Answers
14
Valid Host Addresses
All addresses between Network address and
Broadcast address are known as valid host
addresses.
Only valid host addresses can be assigned to the
devices in a network. These devices include all such
as computes, laptops, IP phones, servers, printers,
switches, routers, firewalls etc.
Block size is the sum of network address, valid host
addresses and broadcast address.
For example, if in a network there are 6 valid hosts
than block size of that network is 8 (1 network
address + 6 valid hosts + 1 broadcast address).
15
Subnet Mask
A subnet mask is used to identify which parts of the
ip address are the network parts and which parts are the
host parts.
e.g. IP 192.168.1.10 Subnet mask : 255.255.255.0
This indicates that the first 3 octet of the IP address are
used to identify the Network and last octet to identify host
address .
Default Subnet Mask
Class A 255.0.0.0
Class B 255.255.0.0
Class C 255.255.255.0
16
Octet Values of a Subnet Mask
128 64 32 16 8 4 2 1
0 0 0 0 0 0 0 0 = 0
1 0 0 0 0 0 0 0 = 128
1 1 0 0 0 0 0 0 = 192
1 1 1 0 0 0 0 0 = 224
1 1 1 1 0 0 0 0 = 240
1 1 1 1 1 0 0 0 = 248
1 1 1 1 1 1 0 0 = 252
1 1 1 1 1 1 1 0 = 254
1 1 1 1 1 1 1 1 = 255
Private IP Addresses
18
Public IP Addresses
Unique addresses are required for each device
on a network.
19
Public IP Addresses
20
Classless Inter-Domain Routing (CIDR)
172 16 0 0
N
8
7
6
5
4
3
2
1
9
16
15
14
13
12
11
10
00010000 00000000 00000000 1
10101100 00000000 00000001 2
00000000 00000011 3
...
...
...
11111111 11111101 65534
11111111 11111110 65535
11111111 11111111 65536
– 2
2N – 2 = 216 – 2 = 65534 6553423
Subnetting
IP Subnetting is a process of dividing a large IP
network in smaller IP networks
Subnetting is logically dividing the network
by extending the 1’s
Advantage
Can divide network in smaller parts
Restrict Broadcast traffic
Security
Simplified Administration
Type of Subnetting
There are two types of Subnetting FLSM and VLSM.
In FLSM, all subnets have equal number of host addresses and use
same Subnet mask.
In VLSM, subnets have flexible number of host addresses and use
different subnet mask.
Following figure shows an example of FLSM and VLSM.
• FLSM is easy in
implementation and
simple in operation but
wastes a lot of IP
addresses.
• VLSM is hard in
implementation and
complex in operation but
utilizes maximum IP
addresses.
Formula
Number of subnets – 2x-2
Where X = number of bits borrowed
…...
172.16.0.0
• Network 172.16.0.0
27
Addressing with Subnets
172.16.3.0
172.16.4.0
172.16.1.0 172.16.2.0
• Network 172.16.0.0
Subnet Addressing
172.16.2.200 172.16.3.5
172.16.3.1
E1
172.16.2.2 E0 172.16.3.100
172.16.2.1
172.16.2.160 172.16.3.150
172.16.2.160 172.16.3.150
IP
Address
Network Host
Default
Subnet
Mask
255 255 0 0
11111111 11111111 00000000 00000000
• Also written as “/16,” where 16 represents the number of 1s in
the mask
Network Subnet Host
8-Bit
Subnet
Mask
• Also written as “/24,” where 24 represents the number of 1s in
the mask
Subnet Mask Without Subnets
Network Host
Network 172 16 0 0
Number
128
192
224
240
248
252
254
255
Network
Number 172 16 2 0
128
192
224
240
248
252
254
255
128
192
224
240
248
252
254
255
Network
Number 172 16 2 128
Subnet1 192.168.1.0 0
Subnet2 192.168.1.128 0+128=128 Add block size to last octet of
1st subnet
Subnetting Exercise
What is the subnet mask?
42