Upload
others
View
33
Download
0
Embed Size (px)
Citation preview
Thirapon Wongsaardsakul
Adapted from CISCO CCNA
Internet Addressing
Objective Explain the structure IP addressing and demonstrate the ability to convert
between 8-bit binary and decimal numbers.
Given an IPv4 address, classify by type and describe how it is used in the network.
Explain how addresses are assigned to networks by ISPs and within networks by administrators.
Determine the network portion of the host address and explain the role of the subnet mask in dividing networks.
Given IPv4 addressing information and design criteria, calculate the appropriate addressing components.
Use common testing utilities to verify and test network connectivity and operational status of the IP protocol stack on a host.
IP Addressing Structure
IP Addressing Structure Describe the general role of 8-bit binary in network addressing
and convert 8-bit binary to decimal
IP Addressing Structure Practice converting 8-bit binary to decimal
Decimal Value 128 64 32 16 8 4 2 1
Octet Value X X X X X X X X
Decimal Value 128 64 32 16 8 4 2 1
Octet Value 1 1 0 0 0 0 0 1
128 + 64 + 1 = 193
6.1.3 activity
IP Addressing Structure Practice converting decimal to 8-bit binary
6.1.5 activity
Hand-on
Convert this dotted decimal to binary format
203.158.231.15
Classify and Define IPv4 Addresses Name the three types of addresses in the network and describe
the purpose of each type
Network Prefixes
• How do you know the number of bits assigned to the network and the number of bits
assigned to the host?
Prefix Mask:
The address is followed by a number that represents the number of bits (prefix
length), beginning from the left, that apply to the network.
A slash (/) is used to separate the address and the prefix length.
192.168.10.2/24
Means that the first 24 bits are the network portion.
The last 8 bits are the host portion.
Network Prefixes
• Networks are not always assigned a /24 prefix.
Depending on the number of hosts on the network, the prefix can be
different.
Having a different prefix changes the host range and the broadcast
address.
172.16.4.255 172.16.4.1 – 172.16.4.254 172.16.4.0 172.16.4.0/24
Broadcast
Address
Host Range
Network
Address
Network
172.16.4.127 172.16.4.1 – 172.16.4.126 172.16.4.0 172.16.4.0/25
172.16.4.63 172.16.4.1 – 172.16.4.62 172.16.4.0 172.16.4.0/26
172.16.4.31 172.16.4.1 – 172.16.4.30 172.16.4.0 172.16.4.0/27
Example of network and host
Classify and Define IPv4 Addresses Determine the network, broadcast and host addresses for a
given address and prefix combination
6.2.2 activity
Classify and Define IPv4 Addresses Name the three types of communication in the Network Layer
and describe the characteristics of each type
6.2.3 must see
Unicast Communications
• The process of sending a packet from one host to an individual host.
Special Unicast Addresses
• Default Route:
Address - 0.0.0.0 Subnet Mask – 0.0.0.0
When configured, it tells the device….
If you don’t know where to send the frame, send it here.
Special Unicast Addresses
• Loopback:
Address - 127.0.0.1
Host applications use it to communicate with each other.
Test TCP/IP configuration on a PC – ping 127.0.0.1
Special Unicast Addresses
• Link Local Addresses:
Address Range 169.254.0.0 to 169.254.255.255
Can be automatically assigned by the operating system where no IP
configuration is available.
Special Unicast Addresses
• Test-Net Addresses:
Address Range 192.0.2.0 to 192.0.2.255
Used for teaching and learning purposes.
Appear in documentation and network examples.
Will be accepted by a network device.
Used to provide examples in RFCs and vendor and protocol documentation.
Should not appear on the Internet.
Your best bet…..
STAY AWAY FROM THEM….
Special Unicast Addresses
• Experimental Address Range:
Address Range 240.0.0.0 to 255.255.255.254
Reserved for future use.
Cannot be used on IPv4 networks.
Used for research and experimentation.
Special Unicast Addresses
• Public and Private Addresses:
Most IPv4 addresses are public addresses.
A public address is one that is designated for use in networks that are accessible on
the Internet.
Networks that require limited or no Internet access, use private
addresses.
Private addresses are assigned from blocks of private address space set aside for that
purpose.
10.0.0.0/8 (10.0.0.0 to 10.255.255.255)
172.16.0.0/12 (172.16.0.0 to 172.31.255.255)
192.168.0.0/16 (192.168.0.0 to 192.168.255.255)
Broadcast Communications
• The process of sending a packet from one host to all hosts in the
network.
Broadcast Communications
• Broadcasts are not forwarded by a router unless specifically
configured to do so.
• The bits in the host portion of a broadcast address will be
all 1s.
Multicast Communications
• The process of sending a packet from one host to a selected group of
hosts.
Multicast Communications
• Multicasting involves the use of a reserved network of IP Addresses (224.0.0.0).
• Each host that is to participate in a multicast session first joins the multicast group controlled by the router.
• When the packet from the source arrives at the router, it is forwarded to all members of the multicast group.
Multicast Communications
• The reserved multicast network or specific multicast addresses will be
displayed in the routing table of a device.
• The following is from a PC.
Packet tracer activity
Open the course web site.
Do unicasts, broadcasts, and multicasts activity
Classify and Define IPv4 Addresses Identify the address ranges reserved for these special purposes
in the IPv4 protocol
Classify and Define IPv4 Addresses Define public address and private address
10.0.0.0 to 10.255.255.255 (10.0.0.0 /8)
172.16.0.0 to 172.31.255.255 (172.16.0.0 /12)
192.168.0.0 to 192.168.255.255 (192.168.0.0 /16)
Public and private address activity
Drag and drop activity 6.2.5
Identify given IP addresses to a correct category
Classify and Define IPv4 Addresses
Identify the historic method for assigning addresses and the
issues associated with the method
Addressing the Network: IPv4
Legacy IPv4 Addressing
Legacy IPv4 Addressing
• In the early 1980’s, unicast address ranges were grouped into specific
sizes or classes of address.
• Each class defined:
A specifically sized network.
Specific address blocks for these networks.
Class
High
Order
Bits
First Octet
Range
Number of
Network
Bits
Number
of Host
Bits
Number of
Networks
Number of
Hosts per
Network
A 0 0-127 8 24 128 16,777,216
B 10 128-191 16 16 16,384 65,536
C 110 192-223 24 8 2,097,152 256
D 1110 224-239 Used for Multicasting to multiple hosts.
E 1111 240-255 Reserved for research and development.
IPv4 Classful Addressing
• Devices examined the first octet of the address and could determine
the address range.
• The high order bits never change for each class.
Classful Addressing:
192.168.23.2 is in the Class C range
Therefore – 24 network bits and 8 hosts bits.
Class
High
Order
Bits
First
Octet
Range
Number
of Network
Bits
Number
of Host
Bits
Number
of
Networks
Number
of Hosts
per Network
A 0 0-127 8 24 128 16,777,216
B 10 128-191 16 16 16,384 65,536
C 110 192-223 24 8 2,097,152 256
IPv4 Classful Addressing
• In a classful addressing scheme, these divisions take place at the octet
boundaries.
This may seem obvious now but is important to remember when we
explore how to divide a single network into several smaller subnets
(subnetting).
Class
High
Order
Bits
First
Octet
Range
Number
of Network
Bits
Number
of Host
Bits
Number
of
Networks
Number
of Hosts
per Network
A 0 0-127 8 24 128 16,777,216
B 10 128-191 16 16 16,384 65,536
C 110 192-223 24 8 2,097,152 256
IPv4 Classful Addressing
• In the early 1990s, the subnet mask was added to IPv4.
The subnet mask allowed networks to subdivided or subnetted.
Each class was assigned a default subnet mask.
Class
First
Octet
Range
Number
of Network
Bits
Number
of Host
Bits
Default
Subnet
Mask
Number
of
Networks
Number
of Hosts
per Network
A 0-127 8 24 255.0.0.0 128 16,777,216
B 128-191 16 16 255.255.0.0 16,384 65,536
C 192-223 24 8 255.255.255.0 2,097,152 256
IPv4 Classful Addressing • Let’s quickly review….
In order to function properly with network devices, every IP network must contain three types of addresses:
Network Address:
o All HOST BITS are set to 0.
Host Address: HOST BITS will vary.
Broadcast Address:
o All HOST BITS are set to 1.
For a host to communicate directly with another host on the same network, they must have the same network portion.
IPv4 Classful Addressing • SO:
For every IP address range that we assign to a network segment, we
automatically lose two addresses….
One for the network address (sometimes called the wire address or subnetwork
address)
One for the broadcast address for that network.
IPv4 Classful Addressing
• Our numbers for the number of hosts per network have to change to allow for the special use of the network number and broadcast addresses.
• As we will see, the formula (2number_of_bits - 2 or 2n - 2) is an important part of assigning an IP address range to a network segment.
Class
Number of
Network
Bits
Number
of Host
Bits
Number Hosts Per
Network Number of Useable Hosts per Network
A 8 24 224 = 16,777,216 224 - 2 = 16,777,214
B 16 16 216 = 65,536 216 - 2 = 65,534
C 24 8 28 = 256 28 - 2 = 254
IPv4 Classless Addressing • The system currently in use is classless addressing.
Address blocks appropriate to the number of hosts are assigned to
companies or organizations without regard to the class.
This is accomplished by subnetting with
Variable Length Subnet Masking (VLSM).
To understand classless addressing, you must first understand classful addressing.
Determine the network portion of the host
address and the role of the subnet mask
Describe how the subnet mask is used to create and specify the
network and host portions of an IP address
Determine the network portion of the host address
and the role of the subnet mask
Use the subnet mask and ANDing process to extract the
network address from the IP address
Finding network address
address
172.16.20.35
10101100.00010000.00010100.00100011
subnet mask
255.255.255.224
11111111.11111111.11111111.11100000
network address
172.16.20.32
10101100.00010000.00010100.00100000
00000000 = 0
10000000 = 128
11000000 = 192
11100000 = 224
11110000 = 240
11111000 = 248
11111100 = 252
11111110 = 254
11111111 = 255
Do activity
6.5.4 finding network address
6.5.5 finding number of host
6.5.6 fining all
Calculating Addresses Use the subnet mask to divide a network into smaller
networks and describe the implications of dividing networks
for network planners
Calculating Addresses
Calculating Addresses
Calculating Addresses Extract network addresses from host addresses using the
subnet mask
Variable Length Subnet Masking
(VLSM) A serious limitation of using only a single subnet mask across a given
network-prefix (the number of network or 1 bits in the mask) was that an organization is locked into a fixed-number of fixed-sized subnets.
VLSM enables a network number to be configured with different subnet masks on different interfaces. Subnet an already subnetted network address. Conserves IP addresses. More efficient use of available address space.
Allows for more hierarchical levels within an addressing plan.
10.2.0.0/24 10.2.0.1 10.2.0.254 10.2.0.255
Sub-subnet 10.2.1.0/24 10.2.1.1 10.2.1.254 10.2.1.255
Using /24 10.2.2.0/24 10.2.2.1 10.2.2.254 10.2.2.255
Etc.
10.2.255.0/24 10.2.255.1 10.2.255.254 10.2.255.255
Variable Length Subnet Masking (VLSM)
10.0.0.0/8 Subnet using /16
Subnet 1st Host Last Host Broadcast
10.0.0.0/16 10.0.0.1 10.0.255.254 10.0.255.255
10.1.0.0/16 10.1.0.1 10.1.255.254 10.1.255.255
10.2.0.0/16 10.2.0.1 10.2.255.254 10.2.255.255
10.3.0.0/16 10.3.0.1 10.3.255.254 10.3.255.255
Etc.
10.255.0.0/16 10.255.0.1 10.255.255.254 10.255.255.255
Subnet 1st Host Last Host Broadcast
Variable Length Subnet Masking
(VLSM)
192.168.20.0/27
192.168.20.32/27 192.168.20.96/27 192.168.20.64/27
192.168.20.64/27
192.168.20.128/27
192.168.20.128/27
7 Networks with 30 usable
addresses for each network
Wasted 28 addresses on each
WAN link
Variable Length Subnet Masking
(VLSM)
192.168.20.0/27
192.168.20.192/30 192.168.20.196/30 192.168.20.200/30
192.168.20.32/27
192.168.20.64/27
192.168.20.96/27
1 1 0 0 0 0 0 0 192.168.20.192
1 1 0 0 0 1 0 0 192.168.20.196
1 1 0 0 1 0 0 0 192.168.20.200
1 1 0 0 1 1 0 0 192.168.20.204
1 1 0 1 0 0 0 0 192.168.20.208
1 1 0 1 0 1 0 0 192.168.20.212
1 1 0 1 1 0 0 0 192.168.20.216
1 1 0 1 1 1 0 0 192.168.20.220
255.255.255.252 Sub-Subnet
Mask
Magic Number
= ? 1 1 1 1 1 1 0 0
Variable Length Subnet Masking (VLSM)
Original
Subnet Mask
Magic Number
= 32
255.255.255.224
1 1 1 0 0 0 0 0
192.168.20.0 0 0 0 0 0 0 0 0
192.168.20.32 0 0 1 0 0 0 0 0
192.168.20.64 0 1 0 0 0 0 0 0
192.168.20.96 0 1 1 0 0 0 0 0
192.168.20.128 1 0 0 0 0 0 0 0
192.168.20.160 1 0 1 0 0 0 0 0
192.168.20.192 1 1 0 0 0 0 0 0
192.168.20.224 1 1 1 0 0 0 0 0
Testing the Network Layer
Describe the general purpose of the ping command, trace the
steps of its operation in a network, and use the ping command
to determine if the IP protocol is operational on a local host
Testing the Network Layer Use ping to verify that a local host can communicate with a
gateway across a local area network
Testing the Network Layer Use ping to verify that a local host can communicate via a
gateway to a device in remote network
Testing the Network Layer Use tracert/traceroute to observe the path between two
devices as they communicate and trace the steps of
tracert/traceroute's operation
Testing the Network Layer Describe the role of ICMP in the TCP/IP suite and its impact
on the IP protocol