d1.ip addressing a
DESCRIPTION
dataTRANSCRIPT
IP Addressing
Prepared by: Engr. Liza R. Maderazo -
CoE 1
IP Addressing
• Each computer (computer interface) in a TCP/IP network must have two addresses:
– An IP (logical, layer 3) address, is a combination of the network address and the host address creating a unique address for each device on a network. This address is needed to deliver the packet to the correct network.
– A unique MAC (physical, layer 2) address. Once the data (packet) has arrived at the network, this address is needed to deliver it to the destination device.
Prepared by: Engr. Liza R. Maderazo -
CoE 2
IP Addressing
• An IP address is a 32-bit sequence of ones and zeros.
• It is commonly represented in dotted decimal format, as it is easier to understand and less prone to error.
Prepared by: Engr. Liza R. Maderazo -
CoE 3
11000000.10101000.00000001.00001000
192.168.1.8
Address Classes
A router uses the IP address of the destination network to deliver a packet to the correct network.
Every IP address has two parts
The first part identifies the network where the device is connected and the second part identifies the device.
There are four octets, each ranging from 0-255, representing 256 possible addresses.
Prepared by: Engr. Liza R. Maderazo -
CoE 4
Address Classes
• An IP address is always divided up into a network portion and a host portion.
Prepared by: Engr. Liza R. Maderazo -
CoE 5
Address Classes
• IP addresses are hierarchical, meaning an address can be referenced back to a particular group address.
Prepared by: Engr. Liza R. Maderazo -
CoE 6
Address Classes
• There are five address classes:
– Class A – for very large networks
– Class B – for medium networks
– Class C – for small networks
– Class D – for multicast groups; no need for network and host parts
– Class E – for research purposes
Prepared by: Engr. Liza R. Maderazo -
CoE 7
Address Classes
Prepared by: Engr. Liza R. Maderazo -
CoE 8
Address Classes
Prepared by: Engr. Liza R. Maderazo -
CoE 9
Learn these tables!
Address Classes
• One network octet and three host octets.
• The first bit of a Class A address is 0.
• The lowest number that can be represented is 00000000, decimal 0.
• The highest number that can be represented is 01111111, decimal 127.
• Usable 1st octet addresses: 1 126
– (0 and 127 are reserved addresses) Prepared by: Engr. Liza R. Maderazo -
CoE 10
Class A:
Address Classes
Two network octets and two host octets.
The first two bits of a Class B address are 10.
The lowest number that can be represented is 10000000, decimal 128.
The highest number that can be represented is 10111111, decimal 191.
Usable 1st octet addresses: 128 191
Prepared by: Engr. Liza R. Maderazo -
CoE 11
Class B:
Address Classes
Three network octets and one host octet.
The first three bits of a Class C address are 110.
The lowest number that can be represented is 11000000, decimal 192.
The highest number that can be represented is 11011111, decimal 223.
Usable 1st octet addresses: 192 223
Prepared by: Engr. Liza R. Maderazo -
CoE 12
Class C:
Address Classes
• Created to enable multicasting. A destination address is a group of addresses.
• The first four bits of a Class D address must be 1110.
• The first octet range for Class D addresses is 11100000 to 11101111, or 224 to 239.
Prepared by: Engr. Liza R. Maderazo -
CoE 13
Class D:
Address Classes
• Reserved for IETF research.
• Not used on the Internet.
• The first four bits of a Class E address are always 1111.
• The first octet range for Class E addresses is 11110000 to 11111111, or 240 to 255.
Prepared by: Engr. Liza R. Maderazo -
CoE 14
Class E:
Address Classes
• This is a very important table.
• Copy it into your journal.
• MEMORIZE IT!
Prepared by: Engr. Liza R. Maderazo -
CoE 15
Reserved addresses
• Two addresses on any network cannot be used by hosts. – Network address – Used to identify the network
itself
– Broadcast address – Used for broadcasting packets to all the devices on a network
• The HOST bits of a network address are all 0s.
• The HOST bits of a broadcast address are all 1s.
Prepared by: Engr. Liza R. Maderazo -
CoE 16
Reserved addresses
Prepared by: Engr. Liza R. Maderazo -
CoE 17
Public and Private Addresses
• No two devices on the Internet can have the same IP address.
• Ensuring this does not happen is handled by the Internet Assigned Numbers Authority (IANA).
• With the growth of the Internet, available Internet addresses have nearly run out.
• To help deal with this problem, RFC 1918 sets aside three blocks of IP addresses for private, internal use.
Prepared by: Engr. Liza R. Maderazo -
CoE 18
Public and Private Addresses
• Private IP addresses are typically used on local networks including home, school and business LANs including airports and hotels.
• Devices with private IP addresses cannot connect directly to the Internet. Likewise, computers outside the local network cannot connect directly to a device with a private IP. Instead, access to such devices must be brokered by a router or similar device that supports Network Address Translation (NAT).
Prepared by: Engr. Liza R. Maderazo -
CoE 19
Public and Private Addresses
• NAT hides the private IP numbers but can selectively transfer messages to these devices, affording a layer of security to the local network.
• Standards groups created private IP addressing to prevent a shortage of public IP addresses available to Internet service providers and subscribers.
Prepared by: Engr. Liza R. Maderazo -
CoE 20
Public and Private Addresses
• One Class A, a range of Class B addresses, and a range of Class C addresses are not routed on the Internet.
– 10.0.0.0 – 10.255.255.255
– 172.16.0.0 – 172.31.255.255
– 192.168.0.0 – 192.168.255.255
• A router uses Network Address Translation (NAT) to translate private addresses to public addresses.
Prepared by: Engr. Liza R. Maderazo -
CoE 21
Public and Private Addresses
Prepared by: Engr. Liza R. Maderazo -
CoE 22
Subnets
• Subnetting a network means to use the subnet mask to divide a up a network into smaller, segments, or subnets.
• Subnetting has prevented the wasting of usable host addresses.
• To create a subnet address, some bits from the host field are borrowed, and designated as subnet bits.
Prepared by: Engr. Liza R. Maderazo -
CoE 23
Subnets
The minimum number of bits that can be borrowed is two.
The maximum is two less than the available number of host bits.
Prepared by: Engr. Liza R. Maderazo -
CoE 24
IPv4 vs IPv6
• Class A and Class B addresses make up three quarters of the four billion possible addresses. These are virtually used up.
• Class C addresses only allow 254 hosts, too small for many organisations.
• In 1992 the Internet Engineering Task Force (IETF) began work on IP version 6.
Prepared by: Engr. Liza R. Maderazo -
CoE 25
IPv4 vs IPv6
• IPv4 addresses are 32 bits long.
• IPv6 addresses are 128 bits long.
• IPv6 addresses are assigned to interfaces, not nodes.
• IPv6 addresses are written in hexadecimal, and separated by colons.
Prepared by: Engr. Liza R. Maderazo -
CoE 26
IPv4 vs IPv6
Prepared by: Engr. Liza R. Maderazo -
CoE 27
Obtaining an IP Address
Prepared by: Engr. Liza R. Maderazo -
CoE 28
Obtaining an IP Address
• IP addresses can be assigned statically or dynamically.
• Static addressing is manually done by a system administrator.
• Best on small, infrequently changing networks.
• Good record-keeping is essential.
• Servers, printers and routers should be given static addresses.
• Static addressing is NOT scalable. Prepared by: Engr. Liza R. Maderazo -
CoE 29
RARP IP Addressing
• Reverse Address Resolution Protocol (RARP) associates a known MAC addresses with an IP addresses.
• IP source addresses are needed for the address field in all IP packets.
• RARP used in diskless workstations.
• A RARP server must be present.
• RARP requests are broadcast onto the LAN and are responded to by the RARP server, usually a router.
Prepared by: Engr. Liza R. Maderazo -
CoE 30
BOOTP IP Addressing
• Operates in a client-server environment.
• BOOTP was not designed for dynamic address assignment.
• The administrator must maintain the BOOTP database with profiles for each host.
• BOOTP is used when a device starts up.
• BOOTP uses UDP to carry messages.
• BOOTP sends a broadcast IP packet.
• A BOOTP server receives the broadcast and then sends back a broadcast.
Prepared by: Engr. Liza R. Maderazo -
CoE 31
DHCP IP Addressing • DHCP has replaced BOOTP. • DHCP allows a host to obtain an IP address
dynamically without needing an individual profile for each device.
• All that is needed is a defined range of IP addresses on a DHCP server.
• Information sent includes the subnet mask and the leased address.
• Users can be mobile and keep the same address. • DHCP offers a one to many ratio of IP addresses, and
that an address is available to anyone who connects to the network.
Prepared by: Engr. Liza R. Maderazo -
CoE 32
Address resolution
• A datagram on a LAN must contain both a destination MAC address and a destination IP address.
• These addresses must be correct and match the destination MAC and IP addresses of the host device.
• If it does not match, the datagram will be discarded by the destination host.
Prepared by: Engr. Liza R. Maderazo -
CoE 33
ARP – Address Resolution Protocol
• ARP tables store MAC and IP addresses of other LAN devices.
– Maintained automatically
– Stored in RAM
Prepared by: Engr. Liza R. Maderazo -
CoE 34
ARP – Address Resolution Protocol
• Two ways to gather MAC addresses:
– Monitor traffic and record the addresses
– Broadcast an ARP request
• An ARP request is used if a device needs an IP and MAC address pair.
– The broadcast is sent
– If the device exists and is on line, it will reply.
– If the device does not exist or is turned off, there is no response to the ARP request. In this situation, the source device reports an error.
Prepared by: Engr. Liza R. Maderazo -
CoE 35
Proxy ARP
• A router sends an ARP response with the MAC address of the interface on which the request was received, to the requesting host.
• This is done for addresses not in local subnet.
Prepared by: Engr. Liza R. Maderazo -
CoE 36
Default Gateway
• The IP address of the router interface is stored in the network configuration of the host.
• The source host compares the destination IP address and its own IP address to determine if the two IP addresses are located on the same segment.
• If the receiving host is not on the same segment, the source host sends the data using the actual IP address of the destination and the MAC address of the router.
• Either Proxy ARP or the Default Gateway must be configured, or no traffic can leave the LAN.
Prepared by: Engr. Liza R. Maderazo -
CoE 37
Thank you
Prepared by: Engr. Liza R. Maderazo -
CoE 38