CCNA 1: An Introduction to
Networking
Week 07 & 08, Units 08 & 09:
IP Addressing
IP Addressing
Learning Objectives
• Explain the purpose of IP addressing
• Differentiate and contrast between classful and classless IP
addressing
• Convert between hexadecimal, binary, and decimal numbers
• Create a valid IP address scheme for a network
• Subnet a network address space
• Explain the concepts of CIDR and VLSM
• Use VLSM to best utilize IP address space
• Verify an IP address implementation using common network utilities
• Differentiate between IPv4 and IPv6 addressing
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 2
IPv4 Addressing Basics
• A basic IPv4 addressing pieces
– Four groups of numbers
– Each group represents 8 binary digits (bits)
– Valid numbers are 0 – 255 for each group
– IP address: [Link]
– Subnet mask: [Link]
• Each group called an octet (8 bits)
– 8 bits also called a byte
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 3
Binary & Decimal
• IPv4 address = 32 bits
– 4 groups x 8-bits/group = 32 total bits
• Dotted decimal address:
– [Link]
• Dotted Binary equivalent:
– 11000000.10101000.00001010.00000001
• Learn binary for subnetting
• Use decimal when writing IP addresses
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 4
Network & Host Parts
• IPv4 address broken into two portions
– Break determined by subnet mask
• Network portion identifies specific network
• Host portion identifies specific host in specific
network
• Example with IP address & subnet mask:
– [Link] & [Link]
– Network & host portions of address in color
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 5
How Computers Work: Binary
• Computers understand only binary numbers
• All input is translated into a binary value
• Output is generally translated from a binary
value to a code understood by users (people)
– Output is sent from one computer to another in binary
format
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 6
Computer Binary Example
• Keyboard
– Device whose key strokes are usually interpreted by
software into some type of symbol or symbols.
– For example, the capital letter “A,” typed into a word
processing document, is sent electronically in binary
code to the motherboard (as “01000001”) and output
on the monitor in alphabetic format.
• Same logic governs IP addressing
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 7
Why Binary & Not Decimal?
• Sometimes used to determine routes that
routers advertise to other routers
• Used in many implementations of network
security
– Determines which specific host or group of
hosts can pass through a router’s interface
• HTTP, HTTPS, TCP, POP, SMTP, etc.
• Will learn more about this in another course
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 8
Binary & IPv4 Addressing
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 9
Binary Placeholders
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 10
Decimal to Binary Examples
• Decimal 255: 11111111
• Decimal 192: 11000000
• Decimal 168: 10101000
• Decimal 128: 10000000
• Decimal 66: 01000010
• Decimal 40: 00101000
• Decimal 17: 00010001
• Decimal 12: 00001100
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 11
Steps To Convert
Decimal to Binary
1. Start with closest binary value that is less than
or equal to the decimal number
2. Subtract binary value from the starting decimal
number to obtain remaining decimal number
3. Return to Step #1 above until remaining
decimal number equals 0
Decimal 168 = 10101000b
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 12
Example To Convert
Decimal to Binary
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 13
Example To Convert
Decimal to Binary (cont’d)
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 14
Example To Convert
Decimal to Binary (cont’d)
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 15
Example To Convert
Decimal to Binary (cont’d)
11000000.10101000.00001010.00000001
1 128 128 1 128 128 0 128 0 0 128 0
1 64 64 0 64 0 0 64 0 0 64 0
0 32 0 1 32 32 0 32 0 0 32 0
0 16 0 0 16 0 0 16 0 0 16 0
0 8 0 1 8 8 1 8 8 0 8 0
0 4 0 0 4 0 0 4 0 0 4 0
0 2 0 0 2 0 1 2 2 0 2 0
0 1 0 0 1 0 0 1 0 1 1 1
192 168 10 1
[Link] (Public domain, 2013)
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 16
More Practice!
• Open Windows Calculator
– Click Windows key, type calc, press Enter
– Click View -> Programmer
• Select random numbers to convert from binary
to decimal & vice-versa
• Click between Dec & Bin on left center side of
Windows Calculator screen to convert numbers
after typing them in
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 17
IPv4 Address Types
• Host: [Link] with mask of [Link]:
– Network address: [Link]
• Used by router to identify all hosts in this network
– First usable address: [Link]
– Last usable address: [Link]
• Valid usable host addresses 10.1 through 10.254
– Broadcast address: [Link]
• Used by hosts to communicate with all of the other
hosts in this specific network
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 18
IP Address Subnet Mask
• Use in conjunction with IP address to determine
host’s network
• Bits “on” in mask identify network bits in host
address
• Mask equivalencies:
– [Link] in decimal
– 11111111.11111111.11111111.00000000
– Total of 24 network bits in network portion of address
• Sometimes called a prefix
• Written as /24
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 19
IP Address Subnet Mask (cont’d)
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 20
Manipulating Host Bits
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 21
IP Address Class & Category
• IPv4 historically was classful (not always)
• Addresses assigned static mask based on class
– Not all addresses can be used by hosts
– Some addresses reserved
• Some addresses in a class are for private use
– Can be used in private network only
• Other addresses in a class are for public use
– Can be used in private network &/or on Internet
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 22
IP Address Classes, Default Mask,
& Address Range
• Class A: [Link] (/8 prefix)
– Address range start: [Link]
– Address range end: [Link]
• Class B: [Link] (/16 prefix)
– Address range start: [Link]
– Address range end: [Link]
• Class C: [Link] (/24 prefix)
– Address range start: [Link]
– Address range end: [Link]
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 23
IP Address Ranges & Classes
• Class D: Multicast & no default mask
– Address range start: [Link]
– Address range end: [Link]
– Occasionally discussed further in this course
• Class E: Reserved & no default mask
– Address range start: [Link]
– Address range end: [Link]
– Not discussed further in this course
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 24
Special IP Addresses
• The zero range is reserved & cannot be used:
– [Link] through [Link]
– More detail on [Link] later in course
• Private ranges used in private networks:
– [Link] /8 through [Link]
– [Link] /12 through [Link]
– [Link] /16 through [Link]
• TEST-NET:
– [Link] / 24 through [Link]
• Can be used in textbooks & in examples
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 25
Special IP Addresses (cont’d)
• Automatic Private IP Addressing:
– [Link] /16 through [Link]
– Assigned by OS when no other IP address available
– Usually means host set for DHCP but no DHCP
server available
• Loopback:
– [Link] /8 through [Link]
– Used in troubleshooting & covered later in unit
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 26
IPv4 Communication Types
• Unicast – 1:1
– One host communicates with one other host in its
network
• Broadcast – 1: All
– One host communicates with all of the other hosts in
its network
• Multicast – 1: Many
– One host communicates with many of the other hosts
in its network – but not all of them!
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 27
Creating an IP Addressed LAN
• Which devices need IP address?
– Routers, switches, printers, servers, hosts, etc.
• Create block of addresses with prefix
• Plan for growth in network
• Manually assign address or use DHCP Server?
– Hosts usually receive addresses via DHCP
– Others configured manually with static address
• Subnetting might be needed to be successful
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 28
Creating a Basic Subnet
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 29
Basic Subnet Example
Starting IP address range: [Link] /24
Create 32 subnets by borrowing 5 host bits: [Link] /29
Create 32 subnets, each subnet with 8 addresses
Subnet # Network First Usable Last Usable Broadcast
1 [Link] [Link] [Link] [Link]
2 [Link] [Link] [Link] [Link]
3 [Link] [Link] [Link] [Link]
4 [Link] [Link] [Link] [Link]
5 [Link] [Link] [Link] [Link]
6 [Link] [Link] [Link] [Link]
7 [Link] [Link] [Link] [Link]
8 [Link] [Link] [Link] [Link]
9 [Link] [Link] [Link] [Link]
10 [Link] [Link] [Link] [Link]
11 [Link] [Link] [Link] [Link]
12 [Link] [Link] [Link] [Link]
13 [Link] [Link] [Link] [Link]
14 [Link] [Link] [Link] [Link]
15 [Link] [Link] [Link] [Link]
16 [Link] [Link] [Link] [Link]
17 [Link] [Link] [Link] [Link]
18 [Link] [Link] [Link] [Link]
19 [Link] [Link] [Link] [Link]
20 [Link] [Link] [Link] [Link]
21 [Link] [Link] [Link] [Link]
22 [Link] [Link] [Link] [Link]
23 [Link] [Link] [Link] [Link]
24 [Link] [Link] [Link] [Link]
25 [Link] [Link] [Link] [Link]
26 [Link] [Link] [Link] [Link]
27 [Link] [Link] [Link] [Link]
28 [Link] [Link] [Link] [Link]
29 [Link] [Link] [Link] [Link]
30 [Link] [Link] [Link] [Link]
31 [Link] [Link] [Link] [Link]
32 [Link] [Link] [Link] [Link]
(Public domain, 2013)
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 30
Subnetting Practice
• Starting IP address: [Link] /24
– Need at least 25 addresses per subnet
– Need 6 total subnets
– Solution on next slide!
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 31
Subnetting Practice Solution
• Starting IP address: [Link] /24
– Need at least 25 addresses per subnet
– Need 6 total subnets
• Solution:
– Borrow 3 host bits
– Prefix now /27 ([Link])
• TIP: continue practicing in class until you can do
this correctly!
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 32
Subnetting Practice Solution (cont’d)
Starting IP address range: [Link] /24
Create 6 subnets by borrowing 3 host bits: [Link] /27
Create 8 subnets, each subnet with 32 addresses
Subnet # Network First Usable Last Usable Broadcast
1 [Link] [Link] [Link] [Link]
2 [Link] [Link] [Link] [Link]
3 [Link] [Link] [Link] [Link]
4 [Link] [Link] [Link] [Link]
5 [Link] [Link] [Link] [Link]
6 [Link] [Link] [Link] [Link]
7 [Link] [Link] [Link] [Link]
(Public domain, 2013)
8 [Link] [Link] [Link] [Link]
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 33
Varying Subnet Masks
• Not all networks require same number of
addresses
• Classless Inter-Domain Routing (CIDR) allows
implementation of Variable-Length Subnet
Masking (VLSM)
– CIDR implemented in device OS
– VLSM is the work we do to create subnets
with different subnet masks
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 34
VLSM Example
• Need to create 4 subnets:
– Start with [Link] /8
– Subnet A:
• 100 host addresses needed
– Subnet B:
• 50 host addresses needed
– Subnet C:
• 13 host addresses needed
– Subnet D:
• 2 host addresses needed
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 35
VLSM Solution: Subnet A
• Created 4 networks:
– Subnet A:
• 100 host addresses needed
• Need to keep only 7 host bits
• Allocate all remaining bits as network bits
• Start IP address: [Link]
• End IP address: [Link]
• New prefix & mask: 32 - 7 = /25
– [Link]
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 36
VLSM Solution: Subnet B
– Subnet B:
• 50 host addresses needed
• Need to keep only 6 host bits
• Allocate all remaining bits as network bits
• Start IP address: [Link]
• End IP address: [Link]
• New prefix & mask: 32 - 6 = /26
– [Link]
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 37
VLSM Solution: Subnet C
– Subnet C:
• 13 host addresses needed
• Need to keep only 4 host bits
• Allocate all remaining bits as network bits
• Start IP address: [Link]
• End IP address: [Link]
• New prefix & mask: 32 - 4 = /28
– [Link]
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 38
VLSM Solution: Subnet D
– Subnet D:
• 2 host addresses needed
• Need to keep only 2 host bits
• Allocate all remaining bits as network bits
• Start IP address: [Link]
• End IP address: [Link]
• New prefix & mask: 32 - 2 = /30
– [Link]
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 39
VLSM Solution: Graphic
• Putting it all together in one view
• Next subnet can start at [Link] with its own
subnet mask (determined later)
Starting IP address range: [Link] /8
Subnet A: 100 host addresses needed (total of 102 addresses needed)
Subnet B: 50 host addresses needed (total of 52 addresses needed)
Subnet C: 13 host addresses needed (total of 15 addresses needed)
Subnet D: 2 host addresses needed (total of 4 addresses needed)
New
Subnet # Subnet Address First Usable Last Usable Broadcast New Subnet Mask
Prefix
A [Link] [Link] [Link] [Link] /27 [Link]
B [Link] [Link] [Link] [Link] /26 [Link]
C [Link] [Link] [Link] [Link] /28 [Link]
D [Link] [Link] [Link] [Link] /30 [Link]
Next [Link] [Link] Unkknown Unkknown Unkknown Unknown
(Public domain, 2013)
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 40
Testing Our IP Address Logic
• Once all addresses assigned, test using ping
• Obtain your device’s IP address:
Use IPCONFIG command to obtain
your device’s IP configuration data
• Ping your own NIC
Your NIC’s internal address is:
[Link]
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking (Public domain, 2013) 41
More Testing Tools
• Next ping your device’s default gateway:
(Public domain, 2013)
– Ping sends ICMP unicast message & requests a reply
– Default gateway is router device must pass through to
exit LAN to Internet
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 42
More Testing Tools (cont’d)
• Trace route (tracert) similar to ping
• Useful for testing in large networks or Internet
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 43
(Public domain, 2013)
Trace route Info
• Based on Internet Communication Messaging
Protocol (ICMP) – same as ping
• Sends message requesting reply from every
router in route to destination – one at a time
• Some devices configured to ignore ICMP to
enhance their security
– Why reveal any information about an Internet device if
not necessary?
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 44
Trace route Info (cont’d)
• My trace route
command began
in Oregon and
ended in California
• Will learn more
about ping & trace
route commands
later in course
(Public domain, 2013)
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 45
VLSM Network in Action
• Our network as a graphic:
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking (Public domain, 2013) 46
IPv6 Addressing Basics
• Uses hexadecimal characters instead of decimal
numbers like IPv4:
– Valid characters are 0-9 and A-F (to represent
numbers from 10 to 15)
• Consists of IP address and prefix number:
– Link-local IPv6 address:
[Link]
– Prefix: /23
– Means that this host has a local IP address
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking (Public domain, 2013) 47
Configuring IPv6 Settings
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking (Public domain, 2013) 48
IP Addressing
Summary – Units 8-9
• Explain the purpose of IP addressing
• Differentiate and contrast between classful and classless IP
addressing
• Convert between hexadecimal, binary, and decimal numbers
• Create a valid IP address scheme for a network
• Subnet a network address space
• Explain the concepts of CIDR and VLSM
• Use VLSM to best utilize IP address space
• Verify an IP address implementation using common network
utilities
• Differentiate between IPv4 and IPv6 addressing
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 49
IP Addressing
References – Unit 8-9
References
• Odem, W. Cisco CCENT/CCNA ICND1 Academic Edition. 1st ed. Indianapolis: Cisco Press; 2013.
• Odem, W. Cisco CCENT/CCNA ICND1 100-101. 1st ed. Indianapolis: Cisco Press; 2013.
• Odem, W. Cisco CCNA ICND2 200-101. 1st ed. Indianapolis: Cisco Press; 2013.
• Dean, T. Network+ Guide to Networks. 6th ed. Boston. Course Technology; 2012.
Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 50