SYSTEM ADMINISTRATION Chapter 8 Internet Protocol (IP) Addressing

advertisement
SYSTEM ADMINISTRATION
Chapter 8
Internet Protocol (IP)
Addressing
IPv4
• IPv4 uses a 32-bit address space expressed in
binary format or decimal format.
• Every IP address is composed of two parts: the
network number and the host number.
• Every IP host address must be unique. Duplicate
addresses result in host devices that cannot
communicate.
• Distribution of addresses is managed by IANA,
which distributes addresses to regional agencies.
The regional agency covering the United States is
ARIN.
• ARIN allocates IP address blocks to the ISPs for
distribution to customers.
IP Address Structure
• The 32 bits of an IPv4 address are broken into 4 8bit groups called octets.
• Each octet is 1 byte of information.
• When an address is written in decimal format, the 4
octets are separated by a dot. This is known as
dotted decimal notation.
(continued)
IP Address Structure
(continued)
• In each octet, all 8 bits are assigned a binary value
that is often expressed in decimal format. The
decimal values, beginning with the most significant
bit, are 128, 64, 32, 16, 8, 4, 2, and, 1 respectively.
• In binary format, bits are turned on or off to build the
unique address for a node. Bits have a value of
either 1 (on) or 0 (off).
• Conversion of binary to decimal or decimal to binary
format can be done manually or through the use of
the Windows calculator in Scientific mode.
IP Address Classes
• IPv4 addresses belong to one of five classes of
addresses.
• Class A addresses use the first octet (or 8 bits) to
express the network number, leaving the last three
octets (or 24 bits) for host numbers. This allows 126
networks with 16,777,214 hosts on each network. The
opening bit value is 0.
• Class B addresses use the first two octets (or 16 bits) for
the network number, and the last two octets (or 16 bits)
for the host number. This gives us 16,384 network
numbers with 65,534 hosts on each network. The
opening bit values are 10.
(continued)
IP Address Classes
(continued)
• Class C addresses use the first three octets (or 24
bits) to indicate the network number, and the last
octet (or 8 bits) for host numbers. There are
2,097,152 network numbers available, with 254
hosts on each of those networks. The opening bit
value for Class C addresses is 110.
• Class D addresses are used for multicast
transmission and are not manageable by the public.
The opening bit value for a Class D address is 1110.
(continued)
IP Address Classes
(continued)
• Class E addresses are used for experimental
purposes. The opening bit value for a Class E
address is 1111.
• Two addresses from every network range of
addresses are reserved for special usage. One is
the network number, and the other is used for
broadcast purposes.
• Classful addressing uses the default values in each
class for all IP addressing.
Private Addresses
• Some addresses have been set aside to use on
private networks. Those address spaces are
o 10.x.x.x-10.255.255.255
o 172.16.x.x.-172.31.255.255
o 192.168.x.x-192.168.255.255.
• Private addresses are not routed publicly. Therefore,
if a router gets a packet with a private destination
address in the header, the packet will not be routed
and will be silently discarded.
Automatic Private IP Addressing
(APIPA)
• Automatic Private IP Addressing (APIPA)
provides a means for a DHCP client to selfconfigure when it cannot reach a DHCP server.
APIPA uses the address space 169.254.0.X.
The Loopback Address
• Another special address encompasses an entire
network number. 127.x.x.x is set aside for the
loopback test. The loopback test sends a packet
through the IP stack on the local host. If a response
is received, the stack is installed and functioning.
• To assign addresses to host devices, the network
administrator may configure every device manually,
or the administrator may choose to use DHCP to
allocate addresses to host devices.
IP Address Subnet Masks
• A subnet mask identifies the bits that make up the
network number of an IP address.
• The mask number is built by turning on (setting to 1) all
bits used for the network number.
• The default subnet masks for the three consumer
classes of addresses are:
o Class A – 255.0.0.0
o Class B – 255.255.0.0
o Class C – 255.255.255.0
• Another way to write the mask for an IP address is by
using “slash notation.” Calculate the number of bits in the
mask and follow the IP address with a slash and the
number of bits: 202.16.22.45 /24.
(continued)
IP Address Subnet Masks
(continued)
• The subnet mask also tells the local machine what to do
with an outgoing packet.
– The destination address is compared to the source
address, the two network numbers are compared, and the
decision is made based on the result of the comparison.
– If the network numbers are the same, the packet is going
to a host on the local subnet, and an ARP request is sent.
– If the network numbers are different, the packet is going to
a remote network, and it will be forwarded to the default
gateway (router interface) for processing.
• ANDING is the process by which the network number is
resolved from an IP address by ANDING the mask
against the host address
IP Address Subnetting
• Subnetting is the process whereby a classful
network address may be broken down into several
smaller subnetworks.
• Subnetted addresses add an additional level to the
address space in the form of the subnet number.
• When designing a network that will include subnets,
it is important to take into consideration the current
needs of the network and host addresses, as well as
the future needs of the network and host addresses.
(continued)
IP Address Subnetting
(continued)
•
There are five steps to subnetting:
1. Determine the number of subnetworks needed and
the maximum number of hosts on any subnetwork.
2. Determine the number of bits to “steal” from the host
bit portion of the IP address. Use the formula 2N – 2 =
the maximum number of subnets available, where N =
the number of bits to “steal.”
3. Build a new custom subnet mask to reflect the number
of bits taken from the host section of the address and
moved to the network section of the address.
4. Build the new network numbers.
5. Build the range of IP host addresses for each new
subnet by combining the new network numbers with
the identified range of host bits.
IP version 6 (IPv6)
• IPv6 in the newest version of the Internet Protocol.
There are three key areas that make IPv6 the
solution for the future:
– A much larger address space using 128 bits as
opposed to 32 bits in IPv4
– Built-in support for secure transmission through
the inclusion of IPSec in the protocol stack.
– Support for mobile devices.
IPv6 Address Structure
• IPv6 addresses are expressed as 8 16-bit fields written
in hexadecimal notation.
• The address space is divided into a network number and
host number and may include a subnet identifier as well.
• The host portion of the IPv6 address is always a fixed 64
bits in length.
• The host portion is usually derived from the MAC
address of the device with filler bits in the center. This is
known as the EUI64 address.
• Addresses may be abbreviated when there are a series
of zeros in contiguous fields of the address. The
abbreviator is a double colon (::), but this may occur only
one time in the address. Leading zeros may be dropped.
(continued)
IPv6 Address Structure
(continued)
• Three types of IPv6 addresses are used:
– Globally unique addresses are the common
addresses of devices. They use the MAC address
and the current network number to form the address.
These addresses can be seen locally and globally
(outside the subnet).
– Devices use the link-local address to identify
themselves on the local subnet. These addresses are
not visible outside the local subnet.
– Site-local addresses are used within a site and
always read fec0:: /10. They are similar to the private
addresses of IPv4.
Download