Академический Документы
Профессиональный Документы
Культура Документы
Structure
CCNA Discovery2: Chapter 4
Version 4.1
Contents
4.1: IP Addressing & Subnetting Review
4.2: VLSM & CIDR
4.3: NAT and PAT
IP Addresses
IP addresses identify hosts and network devices
To send and receive messages on an IP network,
every host must be assigned a unique 32-bit IP
address
IP address are displayed in dotted-decimal
notation
192.168.1.1
Network Addresses
The network portion of the address, is used to
represent the entire network
address
Network addresses are only used by routers to
decide how to get packets to their destination
Network Number
Host Number
Broadcast Address
A Broadcast Address is the address used to
send messages to every host on the same
network
A Broadcast Address consists of the
Network address, plus all 1s in the host
field
The Broadcast address is NOT a USABLE
host address and can not be assigned to a
host
Broadcast Addresses
Network Address
120.0.0.0
170.50.0.0.
192.168.10
Broadcast Address
120.255.255.255
170.5.255.255
192.168.10.255
2 ^ host bits 2
Network type
Available Hosts
255.0.0.0
2 ^ 24 -2 =
16, 277, 214
255.255.0.0
2 ^ 16- 2 =
65, 534
255.255.255.0 2 ^ 8 2 =
254
The reason we always subtract 2 from the total host
addresses to determine the available host addresses,
is because the network address and broadcast address
are NOT usable host address
Therefore, every network has 2 addresses that can not
be assigned to hosts, the very 1st address (all 0s in the
host portion) and the very last address (all 1s in the
host portion)
IP Address Classes
To create more possible network designations,
the 32-bit address space was organized into five
classes.
Class A, B, and C: Commercial networks
Class D and E: multicast and experimental
IP Address Classes
Early Networks were only identified with an 8 bit
network address
To create more possible network designations,
the 32-bit address space was organized into five
classes.
Class A, B, and C: Commercial networks
Class D and E: multicast and experimental
Class A
The first bit is always 0
Addresses start with 0 to 126
Class B
First two bits are always 1 and 0
Addresses start with 128 to 191
Class C
First three bits are always 1, 1 and 0
Addresses start with 192 to 223
Class D
Class E
1 to 126
Private IP Addresses
Reserved address space for private networks
Private IPs are not routable on the Internet
Many networking devices give out private IPs
through DHCP
Subnet Masks
A subnet mask is a 32 bit address which tells
255.255.255.0
255.255.0.0
255.255.255.128
255.254.0.0
2. Bit-Mask Format
192.168.1.1 /24
This indicates that there are 24 bits ( 24 1s) in
the network and subnetwork portion of the
address (255.255.255.0)
Example Scenario
An ISP customer has outgrown its initial network
installation - the original integrated wireless router
is overloaded with traffic from both wired and
wireless users
They have a Class C network address
Solution:
Add a 2nd networking device (larger integrated service
router)
When adding a device, it is a good practice to place the
wired and wireless users on separate local subnetworks
to increase security
The new network configuration requires that the
existing Class C network be divided into at least three
subnetworks
Example Scenario
Subnet 3
Subnet 2
Subnet 1
Subnets Defined
RFC 917 defines Internet Subnets
The Subnet mask is the method routers use to
isolate the network portion from an IP address.
Classful Subnetting
Traditional classful subnetting has these
characteristics:
1.
2.
3.
4.
The more bits that are taken for the subnet ID, the
fewer bits left for host IDs
Subnet 3: 2 hosts
172.16.1.96 /27
Subnet 2: 10 hosts
172.16.1.64 /27
Subnet 1: 30 hosts
192.168.1.32 /27
VLSM
Variable length subnet masking (VLSM) helps
solve the limits of classful subnettting
VLSM allows an address space to be divided into
subnets of various sizes
This is done by subnetting subnets
Characteristics of VLSM
Each subnet can be a different size
Each subnet can be designed to support the
number of hosts needed
Each subnet can have a different subnet mask
Example: VLSM
Network: 192.168.1.0 /24
Subnet 3: 2 hosts
192.168.1.80 /30
Subnet 2: 10 hosts
192.168.1.64 /28
Subnet 1: 30 hosts
192.168.1.32 /27
Example: VLSM
Original Network Address: 192.168.1.0 /24
Subnet 1 needs 30 hosts:
CIDR
CIDR = Classless Inter-Domain Routing
CIDR is a type of network addressing that ignores
the traditional network classes (Class A, B and C)
CIDR Assigns Blocks of Addresses, based on the
number of hosts needed
Can be though of as assigning a Subnet of a Class A or
Class B address to a company as a block of Addresses
CIDR
CIDR protocols freed routers from using only the highorder bits to determine the network prefix
registered IP addresses do NOT need to be assigned by class
Supernets
Supernets are created by combining a group of
Class C addresses into one large block
This enables addresses to be assigned more
efficiently
Example: 192.168.0.0/19
19 bits are used for the network prefix
This block contains the addresses 192.168.32.1 to
192.168.63.255
This allows 8,190 possible host addresses (213)
Subnet 3
WAN Interfaces
LAN Interfaces
Subnet 1
Subnet 2
4.3: NAT
Network Address Translation
NAT allows a group of private users to
access the Internet by sharing one or more
public IP addresses
NAT translates private IP addresses into 1
or more public IP addresses for routing on
the Internet
NAT Advantages
NAT has several advantages:
1. Saves registered IP addresses
IP addresses can be re-used and many hosts on a
single LAN can share globally unique IP addresses
2. Increased security by
Withholds hosts actual IP host addresses from
direct Internet access
NAT Disadvantages
1. Incompatible with certain applications
2. Prevents legitimate remote access to
network
3. Requires increased processing by router
which negatively affects network
performance
NAT Analogy
As a company adds employees, at some point,
they no longer run a public phone line directly to
each employee desk.
Instead, they use a system that allows the
company to assign each employee an extension
number.
The company can do this because not all
employees use the phone at the same time.
Using private extension numbers enables the
company to purchase a smaller number of
external phone lines from the phone company.
NAT at Work
Dynamic NAT
Dynamic NAT dynamically translates each
inside local addresses to an inside global
address by using 1 public IP address, or a
pool of addresses
Static NAT
What if one or more of the hosts within a network
are running services that need to be accessed
from the Internet?
Static NAT translates a permanent registered
global address to particular hosts
Static NAT is used for Servers that need a consistent IP
address
Static translations ensure that an individual host private
IP address is always translated to the same registered
global IP address
Static NAT allows hosts on the public network to access
selected hosts on a private network
PAT
PAT (Port Address Translation) translates
multiple inside local addresses to a single global
address using Port numbers
PAT is also called NAT overload
PAT translates every inside local address to the
same inside global address, by using PORT
NUMBERS to represent the different private
internal addresses
When a source host sends a message to a
destination host, it uses an IP address and port
number combination to keep track of each individual
conversation with the destination host
PAT
PAT Security
PAT conversations use a unique and combination
of the private IP address and port number
Example: 192.168.1.106: 7000
IP Nat issues
1. Requires additional network workload to
support IP addresses and port translations
IPv.6
3 Solutions were developed to provide
to temporarily alleviate the problem of
IPv4 address depletion:
1. Subnetting
2. Private IP addressing
3. NAT / PAT
IPv6
Uses a 128 bit Address
Represented as 32 hexadecimal digits
separated by colons (
8 groups of 4
Ex: 2001:0db8:3c55:0015:0000:0000:abcd:ff13
Uses a 3-part hierarchy:
Global Prefix: assigned to an organization by an
Internet names registry
12 Hex digits
Subnet: identifies the Subnet
4 Hex digits
Interface Identifier: identifies the host
16 Hex digits
IPv6 Address
IPv6 Improvements
IPv6 offers many improvement over IPv4:
1.
2.
3.
4.
5.
Summary
Devices that want to communicate over a network need a unique IP
address
IP addressing can be tailored to the needs of the network design
through the use of custom subnet masks.
A network can be divided into subnets to provide security and
preserve addresses
Subnets and custom subnet masks can be created by extending the
number of bits used for the network portion of the address
Communication between subnets requires a router
Classful subnetting uses the same subnet mask for each subnet
Classless subnetting gives classful IP addressing schemes more
flexibility through the use of variable length subnet masks.
Network Address Translation (NAT) allows a group of private IP
addresses to share a small pool of public IP addresses
Port Address Translation (PAT) translates multiple local addresses to
a single global IP address, maximizing the use of both private and
public IP addresses.
IPv6 offers improvements over IPv4