Sie sind auf Seite 1von 50

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: 192.168.10.1
– Subnet mask: 255.255.255.0
• 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:
– 192.168.10.1
• 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:
– 192.168.10.1 & 255.255.255.0
– 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

192.168.10.1 (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: 192.168.10.1 with mask of 255.255.255.0:


– Network address: 192.168.10.0
• Used by router to identify all hosts in this network
– First usable address: 192.168.10.1
– Last usable address: 192.168.10.254
• Valid usable host addresses 10.1 through 10.254
– Broadcast address: 192.168.10.255
• 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:
– 255.255.255.0 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: 255.0.0.0 (/8 prefix)


– Address range start: 1.0.0.0
– Address range end: 126.255.255.255
• Class B: 255.255.0.0 (/16 prefix)
– Address range start: 128.0.0.0
– Address range end: 191.255.255.255
• Class C: 255.255.255.0 (/24 prefix)
– Address range start: 192.0.0.0
– Address range end: 223.255.255.255
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: 224.0.0.0
– Address range end: 239.255.255.255
– Occasionally discussed further in this course
• Class E: Reserved & no default mask
– Address range start: 240.0.0.0
– Address range end: 255.255.255.255
– 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:


– 0.0.0.0 through 0.255.255.255
– More detail on 0.0.0.0 later in course
• Private ranges used in private networks:
– 10.0.0.0 /8 through 10.255.255.255
– 172.16.0.0 /12 through 172.31.255.255
– 192.168.0.0 /16 through 192.168.255.255
• TEST-NET:
– 192.0.2.0 / 24 through 192.0.2.255
• 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:


– 169.254.0.0 /16 through 169.254.255.255
– Assigned by OS when no other IP address available
– Usually means host set for DHCP but no DHCP
server available
• Loopback:
– 127.0.0.0 /8 through 127.255.255.255
– 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: 192.168.10.0 /24

Create 32 subnets by borrowing 5 host bits: 192.168.10.0 /29


Create 32 subnets, each subnet with 8 addresses

Subnet # Network First Usable Last Usable Broadcast


1 192.168.10.0 192.168.10.1 192.168.10.6 192.168.10.7
2 192.168.10.8 192.168.10.9 192.168.10.14 192.168.10.15
3 192.168.10.16 192.168.10.17 192.168.10.22 192.168.10.23
4 192.168.10.24 192.168.10.25 192.168.10.30 192.168.10.31
5 192.168.10.32 192.168.10.33 192.168.10.38 192.168.10.39
6 192.168.10.40 192.168.10.41 192.168.10.46 192.168.10.47
7 192.168.10.48 192.168.10.49 192.168.10.54 192.168.10.55
8 192.168.10.56 192.168.10.57 192.168.10.62 192.168.10.63
9 192.168.10.64 192.168.10.65 192.168.10.70 192.168.10.71
10 192.168.10.72 192.168.10.73 192.168.10.78 192.168.10.79
11 192.168.10.80 192.168.10.81 192.168.10.86 192.168.10.87
12 192.168.10.88 192.168.10.89 192.168.10.94 192.168.10.95
13 192.168.10.96 192.168.10.97 192.168.10.102 192.168.10.103
14 192.168.10.104 192.168.10.105 192.168.10.110 192.168.10.111
15 192.168.10.112 192.168.10.113 192.168.10.118 192.168.10.119
16 192.168.10.120 192.168.10.121 192.168.10.126 192.168.10.127
17 192.168.10.128 192.168.10.129 192.168.10.134 192.168.10.135
18 192.168.10.136 192.168.10.137 192.168.10.142 192.168.10.143
19 192.168.10.144 192.168.10.145 192.168.10.150 192.168.10.151
20 192.168.10.152 192.168.10.153 192.168.10.158 192.168.10.159
21 192.168.10.160 192.168.10.161 192.168.10.166 192.168.10.167
22 192.168.10.168 192.168.10.169 192.168.10.174 192.168.10.175
23 192.168.10.176 192.168.10.177 192.168.10.182 192.168.10.183
24 192.168.10.184 192.168.10.185 192.168.10.190 192.168.10.191
25 192.168.10.192 192.168.10.193 192.168.10.198 192.168.10.199
26 192.168.10.200 192.168.10.201 192.168.10.206 192.168.10.207
27 192.168.10.208 192.168.10.209 192.168.10.214 192.168.10.215
28 192.168.10.216 192.168.10.217 192.168.10.222 192.168.10.223
29 192.168.10.224 192.168.10.225 192.168.10.230 192.168.10.231
30 192.168.10.232 192.168.10.233 192.168.10.238 192.168.10.239
31 192.168.10.240 192.168.10.241 192.168.10.246 192.168.10.247
32 192.168.10.248 192.168.10.249 192.168.10.254 192.168.10.255

(Public domain, 2013)


Version 1.0/Spring 2013 CCNA 1 – An Introduction to Networking 30
Subnetting Practice

• Starting IP address: 192.168.10.0 /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: 192.168.10.0 /24


– Need at least 25 addresses per subnet
– Need 6 total subnets
• Solution:
– Borrow 3 host bits
– Prefix now /27 (255.255.255.224)
• 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: 192.168.10.0 /24


Create 6 subnets by borrowing 3 host bits: 192.168.10.0 /27
Create 8 subnets, each subnet with 32 addresses

Subnet # Network First Usable Last Usable Broadcast


1 192.168.10.0 192.168.10.1 192.168.10.30 192.168.10.31
2 192.168.10.32 192.168.10.33 192.168.10.62 192.168.10.63
3 192.168.10.64 192.168.10.65 192.168.10.94 192.168.10.95
4 192.168.10.96 192.168.10.97 192.168.10.126 192.168.10.127
5 192.168.10.128 192.168.10.129 192.168.10.158 192.168.10.159
6 192.168.10.160 192.168.10.161 192.168.10.190 192.168.10.191
7 192.168.10.192 192.168.10.193 192.168.10.222 192.168.10.223
(Public domain, 2013)
8 192.168.10.224 192.168.10.225 192.168.10.254 192.168.10.255

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 10.0.0.0 /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: 10.0.0.1
• End IP address: 10.0.0.127
• New prefix & mask: 32 - 7 = /25
– 255.255.255.128
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: 10.0.0.128
• End IP address: 10.0.0.191
• New prefix & mask: 32 - 6 = /26
– 255.255.255.192

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: 10.0.0.192
• End IP address: 10.0.0.207
• New prefix & mask: 32 - 4 = /28
– 255.255.255.240

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: 10.0.0.208
• End IP address: 10.0.0.211
• New prefix & mask: 32 - 2 = /30
– 255.255.255.252

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 10.0.0.212 with its own
subnet mask (determined later)
Starting IP address range: 10.0.0.0 /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 10.0.0.0 10.0.0.1 10.0.0.126 10.0.0.127 /27 255.255.255.128
B 10.0.0.128 10.0.0.129 10.0.0.190 10.0.0.191 /26 255.255.255.192
C 10.0.0.192 10.0.0.193 10.0.0.206 10.0.0.207 /28 255.255.255.240
D 10.0.0.208 10.0.0.209 10.0.0.210 10.0.0.211 /30 255.255.255.252
Next 10.0.0.212 10.0.0.213 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:
127.0.0.1

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:
fe80:0cd0:2414:dc09:e6f5:23b1:528f:7fe2
– 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

Das könnte Ihnen auch gefallen