Chapter 3 - Page 1
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
IP ADDRESSING&SUBNETTING
Chapter 3 - Page 2
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
TOPICS
Numbering Systems
What is IP Addressing?
The Hierarchical IP Addressing Scheme
Additional Classes of Networks
Who Assigns Network Addresses?
Subnetting a Network
Implementing Subnetting
How to Implement Subnetting
Subnet Masks
Can This Be Make Easier?
Chapter 3 - Page 3
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
NUMBERING SYSTEMS
Decimal – base 10
Digits 0-9
Example: 163
Binary – base 2
Digits 0-1
Example: 1010 0011
Hexadecimal – base 16
Digits 0-9, a-f
Example: a3
Chapter 3 - Page 4
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
DECIMAL NUMBERING SYSTEM
Each position in a Decimal number represents a value
Decimal digits – 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9
163
100
10
1
1-100
6 - 10s
3 - 1s
Chapter 3 - Page 5
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
BINARY NUMBERING SYSTEM
Each position in a Binary Number represents a value
Binary Digits – 1 and 0
1 0 1 0 0 0 1 1
128
1
64
32
16
8
4
2
128   +
  32         +
  2 +
  1  =
Chapter 3 - Page 6
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
CONVERT BINARY TO DECIMAL
To Convert:
Identify the place holder value
Add all the values
1 0 1 0 0 0 1 1
128
1
64
32
16
8
4
2
1-128
1-32
1-2
1-1
128 +    32       +           2  + 1 = 163
Chapter 3 - Page 7
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
CONVERT DECIMAL TO BINARY
 163
-128
   35
128
64
32
16
8
4
2
1
Chapter 3 - Page 8
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
CONVERSION EXERCISES
Convert the following decimal numbers to binary
128
64
32
16
8
4
2
1
11
45
72
168
195
234
255
Convert the following binary numbers to decimal
Chapter 3 - Page 9
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
CONVERSION SHORTCUT CHART
IP ADDRESSING SCHEME
Addresses are fixed length of four octets (32-bits)
An address begins with a network number
An address ends with a local address (host/node number)
There are three methods for depicting an IP address
Dotted-decimal – 130.57.30.56
Binary – 10000010.00111001.00011110.00111000
Hexadecimal – 82 39 1E 38
 All of these examples represent the same IP address
Chapter 3 - Page 10
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
IP ADDRESS CLASSES
Address
Class
Leading
Bit Pattern
128 | 64 | 32
Decimal
Range
(1st Octet)
Address
Template
Number
Of Networks
Hosts
Per Network
2^ Host Bits-2
A
0
1 – 126
B
10
128 – 191
C
110
192 - 223
CLASS A IP ADDRESS
Class A: Net.Node.Node.Host
The first bit of the first octet is always 0
Decimal range of first byte: 1-126
Note: Network number 127 is reserved for diagnostics
Maximum networks: 126
Maximum nodes per network: 16,777,216
0
Network ID
Host ID
Chapter 3 - Page 11
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
CLASS B IP ADDRESS
Class B: Net.Net.Node.Host
The first two bits of the first octet are always 10
Decimal range of first byte: 128-191
Maximum networks: 16,384
Maximum nodes per network: 65,534
1
0
Network ID
Host ID
CLASS C IP ADDRESS
1
1
0
Network ID
Host ID
Class C: Net.Net.Net.Host
The first three bits of the first octet are always 110
Decimal range of first byte: 192-223
Maximum networks: 2,097,152
Maximum nodes per network: 254
NOTE: Class D 224 – 239 – Used for multicast
  Class E 240 – 255 – Used for research purposes
Chapter 3 - Page 12
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
ADDRESSING GUIDELINES
Network ID cannot be 127
127 is reserved for loop-back diagnostics
Ping 127.0.0.1 to test protocol installation
Network ID cannot be all 1s or all 0s
All 1s indicates “Broadcast”
All 0s indicates “Any Address”
Host IDs cannot be all 1s or all 0s
All 1s indicates “Network Broadcast”
All 0s indicates “The network only…”
Private IP address (Private Internets)
Used for internal IP addressing
Will never be used on internet
      10.0.0.0 – 10.255.255.255
  172.16.0.0 – 172.31.255.255
192.168.0.0 – 192.168.255.255
Class D Multicast
224 – 239
Class E Experimental or Scientific purposes
240 - 247
Chapter 3 - Page 13
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
IP ADDRESSING EXERCISE
IP Address
Class
Network ID
Host ID
10.226.30.8
100.100.3.2
150.50.5.145
201.2.10.25
168.16.30.98
126.63.120.135
ETHERNET INTERFACE SETUP
207.201.1.0
P2R1
P2R3
P2R2
e0
s1
s0
e0
s1
s0
e0
s1
s0
P1R1
P1R3
P1R2
e0
s1
s0
e0
s1
s0
e0
s1
s0
207.201.2.0
207.201.3.0
Chapter 3 - Page 14
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
Divide a large network into smaller logical networks connected together by routers
Uses bits from the host (node) portion of the address to create a subnet address
Benefits of subnetting:
Reduced network traffic
Optimized network performance
Facilitate spanning of large geographical distances
SUBNETTING A NETWORK
Chapter 3 - Page 15
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
SUBNET MASKS
Distinguishes the network address from the host address
1’s represent the positions in the IP address that refer to the network or subnet address
0’s represent the positions in the IP address that refer to the host address
When coming from host end, remember to jump over one for subnet mask
255 . 255 . 0 . 0
11111111     11111111     00000000     00000000
Network
Mask
Host
Mask
Chapter 3 - Page 16
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
DEFAULT SUBNET MASKS
Networks that have not been divided into subnets will use the default network maskfor that class of address
Class A255.0.0.0
(binary)11111111.00000000.00000000.00000000
Class B255.255.0.0
(binary)11111111.11111111.00000000.00000000
Class C255.255.255.0
(binary)11111111. 11111111. 11111111.00000000
DEFAULT SUBNET MASKS
# of Subnets = 2N – 2
# of Hosts/subnetwork = 2H – 2
N=number of bits used for subnetting
H = number of bits used for the host address
Chapter 3 - Page 17
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
CUSTOM SUBNET MASKS
Maximum number of subnets
2 (number of masked bits) – 224 = (16) – 2 = 14
Maximum number of hosts
2 (number of unmasked bits) –2212 (4096) – 2 = 4094
255 . 255 . 240 . 0
11111111     11111111          11110000     00000000
Network
Mask
Host
Mask
Subnet
Mask
Chapter 3 - Page 18
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
HOW TO IMPLEMENT SUBNETTING
An IP address can be given a subnet address by reducing the number bits designatedas the host portion of the address
255 . 255 . 240 . 0
11111111     11111111          11110000     00000000
Network
Mask
Host
Mask
Subnet
Mask
Subnet Mask
150 . 19 . 16 . 15
Subnet
Address
10010110    00010011          00010000     00000001
Network Address     Host Address
Class B Network Address
HOW TO IMPLEMENT SUBNETTING
Determine the number of required Network Ids
One for each subnet
One for each Wide Area Network connection
computer
computer
computer
computer
server
server
router
router
150.50.0.0
255.255.0.0
Chapter 3 - Page 19
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
NETWORK ADDRESSING
Determine the number of required host Ids per subnet
One for each TCP/IP host
One for each router interface
computer
computer
computer
computer
server
server
router
router
150.50.0.0
255.255.0.0
NETWORK ADDRESSING
One subnet mask for your entire network
A unique subnet ID for each physical segment
A range of host IDs for each subnet
server
computer
printer
router
server
server
Subnet A
Host
Host
server
computer
printer
router
server
server
Host
Host
Subnet C
Subnet B
Network 150.19.0.0
Subnet Mask 255.255.0.0
Chapter 3 - Page 20
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
IMPLEMENTING SUBNETTING
The subnet mask will determine how many bits are used to create new subnetworks and
how many bits are available for use as Host Ids
Requirements Analysis
Determine number of subnets required
Determine number of hosts on largest subnet
Compute Subnet Mask
Determine Subnet Ranges
Determine Assignable Host Addresses
server
computer
printer
router
server
server
Subnet A
150.19.96.0
Host
server
computer
printer
router
server
server
Host
Host
Subnet C
150.19.64.0
Subnet B
150.19.32.0
Network 150.19.0.0
Subnet Mask 255.255.224.0
150.19.64.16
150.19.96.6
Host
150.19.96.5
150.19.64.125
SUBNET PROCEDURES
Chapter 3 - Page 21
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
SUBNET REQUIREMENTS ANALYSIS
computer
server
IBM mainframe
computer
router
router
router
router
 How many subnets are required?
 How many hosts per subnet?
14 PC’s
12 PC’s
10 VAC’s
2 Main-frames
Add 2 subnet and host fields. These are for the reserved addresses (all 0s and all 1s)
5 + 2 = 7 Subnet
15 + 2 = 17 Hosts
Round Subnet and Host up to next power of 2
128    64    32    16    8     4    2
Subnets = 7 rounded up to 23 (8) –2 = 6 subnets
Hosts = 23 rounded up to 25 (32) – 2 = 30 Subnets
COMPUTE SUBNET MASKS
Chapter 3 - Page 22
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
COMPUTE SUBNET MASK
23 – the 3 represents the number subnet bits which are masked and are indicated with1’s
25 – the 5 represents the number of host bits which are not masked and are indicatedwith 0’s
The appropriate Subnet Mask is:
128    64    32    16    8    4    2    1
           1       1      1      0     0    0    0    0  = 224
23
25
Net ID
Host ID
DETERMINE SUBNETS
Determine the range of available subnets
Chapter 3 - Page 23
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
SUBNET EXAMPLE – CLASS C
Valid hosts in subnet 255.255.255.224
            Mask = 111  0 0000
Chapter 3 - Page 24
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
SUBNET REQUIREMENTS ANALYSIS
computer
computer
router
58 PC’s, 2 Servers
34 PC’s, 1 Server
 How many subnets are required?
How many hosts per subnet?
Chapter 3 - Page 25
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
SUBNET PROCEDURES
Requirements Analysis
Determine number of subnets required: ______________
Determine number of hosts on largest subnet: ______________
Compute Subnet Mask: ________________________
Subnet multiple: ______________
Hosts/subnet: _______________
Subnet Net IDs                           Host Address Range
_______________             ___________________________
_______________             ___________________________
_______________             ___________________________
_______________             ___________________________
SUBNETTING A NETWORK ADDRESS
150 . 50 . 1 . 0
P2R1
P2R3
P2R2
e0
s1
s0
e0
s1
s0
e0
s1
s0
P1R1
P1R3
P1R2
e0
s1
s0
e0
s1
s0
e0
s1
s0
Assigned by Pod 2
Assigned by Pod 1
150.50.1.2
200.20.2.0
100.10.1.0
150.50.1.3
Chapter 3 - Page 26
Infogem Institute of Technology                 CCNA Course
IP Addressing & Subnetting
Lab – Page 158Review QuestionsPage 160
Homework: - Written Lab
- Review3-10 & 13-20