Today We Will Discuss:: - IP Addressing - Subnetting
Today We Will Discuss:: - IP Addressing - Subnetting
Today We Will Discuss:: - IP Addressing - Subnetting
• IP Addressing
• Subnetting
Conversion
Binary
• The ability to convert from binary to
decimal and back again is very handy
when working with IP addresses.
• The digits used are limited to either a 1
(one) or a 0 (zero).
• Only convert up to 8 bits at a time (an
octet).
Binary (cont.)
• The trick to binary is to learn the decimal
values of each bit for the first 8 bits.
• Start from the left or right and add.
• Just add the decimal values where there is
a 1 (one) present, and you will have the
decimal value of the octet.
• The next slide shows the decimal value of
each bit value.
Binary to Decimal for 204
Binary = 1100 1100 Decimal = 204
128 64 32 16 8 4 2 1
1 1 0 0 1 1 0 0
-----------------------------------------------------------
128 + 64 + 0 + 0 + 8 + 4 + 0 + 0
= 204
Memorize
• Binary 1111 1111 = Decimal 255
• Binary 0000 0000 = Decimal 0
• Know the values 128-64-32-16-8-4-2-1.
• The easiest way to remember it is to start
at 1 and multiply by 2.
• 1 * 2 = 2 * 2 = 4 * 2 = 8 * 2 = 16 * 2 = 32 *
2 = 64 * 2 = 128.
Decimal to Binary
• Convert 212 to binary.
• Do the math.
• Answer: 11010100
Another Binary to Decimal
**Memorization** Chart
(see why this is important in a few slides)
Binary Value Decimal Value
10000000 128
11000000 192
11100000 224
11110000 240
11111000 248
11111100 252
11111110 254
11111111 255
Hierarchical IP Addressing Scheme
• An IP address consists of 32 bits of
information.
• The address is broken into four 8-bit
(1 byte) groups, converting each octet to
decimal values, and separating these
values by dots (dotted decimal notation).
• Example: 172.16.30.56
Hierarchical IP Addressing (cont.)
• Two other ways to represent dotted-
decimal 172.16.30.56 are:
– Binary
• 10101100.00010000.00011110.00111000
– Hexadecimal
• AC.10.1E.38
• See end of presentation for hex conversion notes
and chart.
The Classes of Networks
8 bits 8 bits 8 bits 8 bits
Number of
Networks 27 - 2 214 - 2 221 - 2
Number of 24 16 8
Hosts 2 -2 2 -2 2 -2
Details of Classes A, B, & C
• Before starting to design subnets, you should know what
it is that you've been given. Here are three ways of
finding out what class your allocation is in. Use
whichever you find easiest.
.
Memorize Powers of 2
21 =2 25 = 32
2
2 =4 6
2 = 64
23 = 8 27 = 128
24 = 16 28 = 256
Subnet Masks
• A subnet mask is a 32-bit binary number
usually written in dotted-decimal format.
• The 1s in the subnet mask represent the
network (or subnet) part of the IP address.
• The 0s represent the host part.
• Example:
Binary: 11111111.11111111.11111100.00000000
Dotted-decimal: 255.255.252.0 (same number)
Subnet Masks (cont.)
• Slash notation (/) at the end of an IP
address means how many bits are turned
on (1s).
• Ex: 192.168.10.32 /28
Where /28 is subnet mask 255.255.255.240
Default Subnet Mask
• Not all networks need subnets, meaning they
use the default subnet mask.