Ambo University Woliso Campus, Technology and Informatics School Department of Computer Science
Ambo University Woliso Campus, Technology and Informatics School Department of Computer Science
Internet Addressing
IP Addressing 1
IP Addressing
• Four types of addresses are used :
1.Physical Addresses
4.Specific Addresses
IP Addressing 2
IP Addressing
A Hardware address is used to uniquely identify a host
within a local network. (by data link layer of OSI)
• Ethernet utilizes the 48-bit MAC address as its hardware
address.
• A MAC address is most often represented in hexadecimal,
using one of two accepted formats:
e.g. 00:43:AB:F2:32:13
0043.ABF2.3213
Logical Addressing
• Logical addressing is a function of the Network layer of the
OSI Model and provides a hierarchical structure.
Specific Address- are user-friendly addresses
• E.g. www.aau.edu.et , john@yahoo.com
IP Addressing 3
IP Addressing
Port Number is a pre-assigned unique numbers so
that the computer knows how to respond when it is
contacted on a specific port.
It is 16-bit address.
IP Addressing 4
IP addresses-Logical Address
• Internet Protocol moves data between hosts in the form of
datagrams.
• Each datagram delivered to destination address w/c contains
32 – bit IP address.
IP address
• is a numeric identifier assigned to each machine on a
network.
• Allows a host on one network to communicate with a host on
a different network.
IP Addressing 5
IP addresses
• IP address – is a famous layer 3 address
IP Addressing 6
IP addresses
• IP addresses are 32 bits wide.
00001010.00000100.00001111.00001100
10.4.15.12
– host portion.
IP Addressing 8
Host and Network portions
• The network portion/ addresses
IP Addressing 10
• IP addresses are hierarchical
IP Addressing 11
IP address classes
IP addresses
• Are classified into three main address classes to define
large, medium and small networks.
• Class A IP addresses are used for larger networks.
Class A 0 0 – 127* 8
IP Addressing 13
IP address classes – network and host
portions
IP Addressing 14
Class A addresses
• Class A IP address
– Use only the first octet to indicate the network address, the
remaining three octets provide host addresses.
– If the first bit of the first octet of IP address is 0, it is the
address of a class A network.
• The lowest number that can be represented is 00000000,
decimal 0.
• The highest number that can be represented is 01111111,
decimal 127.
• The numbers 0 and 127 are reserved and cannot be used as
network addresses.
• Any address that starts with a value between 1 and 126 in the
first octet is a Class A address.
• Example: 98.56.82.30
IP Addressing 15
Class B addresses
• Class B IP address
IP Addressing 16
• This first 2 bits are used to identify class; the next 14 bits
identify the network, and the last 16 bits identify the
host.
• The lowest number that can be represented is 10000000,
decimal 128.
• The highest number that can be represented is
10111111, decimal 191.
• Any address that starts with a value between 128 and
191 in the first octet is a Class B address.
• Example: 167.3.27.30
IP Addressing 17
Class C addresses
• Class C addresses
IP Addressing 18
• In a class C address, the first 3 bits are class identifiers;
the next 21 bits are the network address, and the last 8
bits identify the host.
• The lowest number that can be represented is 11000000,
decimal 192.
• The highest number that can be represented is
11011111, decimal 223.
• Any address that starts with a value 192- to - 225 in the
first octet is a Class C address
• Example: 192.168.0.1
IP Addressing 19
Class D addresses
• Class D addresses
IP Addressing 20
Class D addresses
– The highest number that can be represented is
11101111, decimal 239.
– Any address that starts with a value between 224 and
239 in the first octet is a Class D address.
– Example: 231.100.250.101
IP Addressing 21
Class E addresses
– Class E addresses are reserved for research purposes.
IP Addressing 22
Reserved IP addresses
• Certain IP addresses are reserved and cannot be used as an
address to a host.
• Some of them are:
• Network addresses
IP Addressing 23
Network addresses
• The address 200.150.56.0 is called the network address.
IP Addressing 24
Network addresses (cont...)
IP Addressing 25
Broadcast Addresses
• Is the address that used by applications and hosts to send
information to all hosts / nodes on a network.
• Used for broadcasting packets to all the devices on a network.
• In general, broadcast addresses have all ones for the host portion.
IP Addressing 26
Broadcast addresses (cont...)
IP Addressing 27
Loopback IP
• The class A address which starts with 127 is used as a loopback
address.
• Hosts use this address to send packets to themselves.
• It can also be used for testing (eg. use it to test if NIC is working
properly or the driver has been correctly installed).
• Hence addresses which start with 127 are not assigned to hosts
under normal conditions.
• Usually the address 127.0.0.1 is used as a loopback IP.
IP Addressing 28
IP address Allocation
• IP addresses must be uniquely assigned to hosts.
IP Addressing 29
Public and Private address
IP Addressing 30
Public and private address
IP Addressing 31
Private IP addresses – the problem
• A problem occurs if a private network is connected to the
internet.
• Now suppose a private network is connected to the
internet.
• Host X with an IP address of 198.150.11.16 wants to
communicate with host Y with an address 198.150.11.16.
• Is host Y on the same private network as host X or is it a
host somewhere in the internet?
• The router on the next slide will not be able to forward
the data packets correctly.
IP Addressing 32
Which host?
IP Addressing 33
Private IP addresses –solution
• To resolve this confusion, three blocks of IP addresses have
been reserved for use in private networks (specified by RFC
1918).
• These three blocks consist of a range of Class A, Class B and
Class C addresses.
• These addresses are recommended for private addresses.
IP Addressing 34
Private IP addresses –solution (contd.)
• Addresses that fall within these ranges are not routed on the
Internet backbone.
• Internet routers immediately discard private addresses.
IP Addressing 35
Subnetting
• Suppose we have a class A address.
IP Addressing 36
IP address assignment
• Every host should obtain an IP address in order to exchage
data OR function on the internet.
• There are two ways of assigning IP addresses to hosts.
– Static assignment
– Dynamic assignment
IP Addressing 37
Static IP address assignment
• Static assignment works best on small, in frequently changing
networks.
• IP addresses are manually assigned for each computer,
printer, or server on the intranet.
• Servers should be assigned a static IP address so workstations
and other devices will always know how to access needed
services.
IP Addressing 38
Dynamic IP address assignment
• Two types of dynamic IP address assignments:
– RARP
– DHCP
RARP
• Stands for Reverse Address Resolution Protocol.
• Every host knows its own MAC address.
• i.e. RARP server keeps a list of MAC addresses and
corresponding IP addresses.
• When a host boots up, it broadcasts a RARP request and the
RARP server responds, telling the host’s IP address.
IP Addressing 39
DHCP
• Stands for Dynamic Host Configuration Protocol.
• A range of IP addresses which can be assigned to hosts are
defined on a DHCP server.
• As hosts come online (when they boot up or when they are
connected to the network), they contact the DHCP server
and request for addresses.
• The DHCP server chooses an address and leases it to that
host.
• An IP address can be leased to a host for a week, a month,
three months, etc.
IP Addressing 40
DHCP (contd.)
• When the lease time interval expires, the host requests for an
IP address again.
• Beside requesting for an address, hosts can also tell the DHCP
server that they no longer need the address they are using.
• This is also called releasing an IP address.
IP Addressing 41
Name Resolution – the problem
• In TCP/IP communications
– a datagram on a local-area network 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.
– There needs to be a way to automatically map IP to MAC
addresses.
– It would be too time consuming for the user to create the
maps manually. IP Addressing 42
Solution - ARP
• The TCP/IP suite has a protocol, called Address Resolution
Protocol (ARP), which can automatically obtain MAC
addresses for local transmission.
• Hosts find MAC addresses by:
IP Addressing 44
IPv4 – drawbacks
• This does not meet the needs of larger organizations that
cannot acquire a Class A or B address.
• Even if there were more Class A, B, and C addresses, too
many network addresses would cause Internet routers to
come to a stop under the burden of the enormous size of the
information they will need to store and process.
IP Addressing 45
IPv4 – Drawbacks
With Class A and B addresses virtually exhausted, class C addresses
are (only 12.5 percent) left to be assigned to new networks.
IP Addressing 46
IPv6
IP Addressing 47
Thank you!!!
IP Addressing 48