Lecture_5 IP Addressing
Lecture_5 IP Addressing
IP Addressing
Twaha Kateete
[email protected]
+256 778 313 421
IP ADDRESSING
IP Addressing
• It is a unique Number that uniquely identifies a device on a given Network.
• Every host or router on the Internet/network is identified by a unique IP address.
• The role of an IP address can be defined as "A name that indicates what we seek. An
address indicates where it is. Then a route indicates how to get there.”
• A Computer can have more than one IP address.
• There are two common versions IPv4(version 4) and IPv6(version 6)
Types / ways of IPs
• An IP address can be a single recipient or a group of recipients
• Three ways:
– Multicast → One IP delivers message to only intended recipient IPs (target group of IPs) on the
Network.
– Anycast →IP delivers a message to any IP out of a group of IPs, typically the one nearest
to the message source.
Classification of IPs
• IP addresses are classified as:
• Static addresses – Never change but can be changed due to network
administration. Details of the country, continent and region where machine is
located.
• Each IPv4 Address is separated by a net mask into a network and a host (computers)
part.
Octets
• The 32-bit IP address is broken up into 4 octets, which are
arranged into a dotted-decimal notation scheme.
• An octet is a set of 8 bits.
Class B - 10nnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhhh
Initial byte = 128 - 191 (14 bits)
128.0.0.0 – 191.255.255.255
Class C - 100nnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh
Initial byte = 192 - 223 (21 bits)
192.0.0.0 – 223.255.255.255
Class D – Used in multicasting.
Class E – Reserved for Future Use.
• Eg., a Class A address uses 7 bits to designate the network, so (27 ) = 128
or there can be 128 Class A Networks.
Class B IP Addresses
• Class B addresses use the 1st 16 bits (two octets) for the Network
address.
• The last 2 octets are used for the Host address.
• The 1st 2 bit, which are always 10, designate the address as a Class B
address & 14 bits are used to designate the Network. This leaves 16 bits
(two octets) to designate the Hosts.
• So how many Class B Networks can there be?
• Using our formula, (214 ), there can be 16,384 Class B Networks & each
Network can have (216 – 2) Hosts, or 65,534 Hosts.
Class C IP Addresses
• Class C addresses use the 1st 24 bits (three octets) for the
Network address & only the last octet for Host addresses.
• The 1st 3 bits of all class C addresses are set to 110, leaving
21 bits for the Network address, which means there can be
2,097,152 (221) Class C Networks, but only 254 (28 – 2) Hosts
per Network.
X-tics of IP Address Classes
Special Addresses
• A few addresses are set aside for specific purposes.
• Network addresses that are all binary zeros, all binary ones &
Network addresses beginning with 127 are special Network
addresses.
Special Addresses (Cont.)
• Within each address class is a set of addresses that are set
aside for use in local networks sitting behind a firewall or NAT
(Network Address Translation) device or Networks not
connected to the Internet.
• A list of these addresses for each IP address class:
Subnet Mask
• An IP address has 2 parts:
– The Network identification.
– The Host identification.
• Frequently, the Network & Host portions of the address need to be
separately extracted.
• In most cases, if you know the address class, it’s easy to separate the 2
portions.
• With the rapid growth of the internet & the ever-increasing demand for new
addresses, the standard address class structure has been expanded by
borrowing bits from the Host portion to allow for more Networks.
• Under this addressing scheme, called Subneting, separating the Network &
Host requires a special process called Subnet Masking.
Subnet Mask (Cont.)
• The subnet masking process was developed to identify & extract the
Network part of the address.
• A subnet mask, which contains a binary bit pattern of ones & zeros, is
applied to an address to determine whether the address is on the local
Network.
• If it is not, the process of routing it to an outside network begins.
• The function of a subnet mask is to determine whether an IP address
exists on the local network or whether it must be routed outside the
local network.
Subnet Mask (Cont.)
• It is applied to a message’s destination address to extract the network
address.
• If the extracted network address matches the local network ID, the
destination is located on the local network.
• However, if they don’t match, the message must be routed outside the local
network.
• The process used to apply the subnet mask involves Boolean Algebra to filter
out non-matching bits to identify the network address.
Subnet Mask
Determines the way an IP address is split into network and hosts
portions
Class A - 0nnnnnnn.hhhhhhhh.hhhhhhhh.hhhhhhhh
Subnet Mask = 255.0.0.0 IP Address /8
Class B - 10nnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhhh
Subnet Mask = 255.255.0.0 IP Address /16
Class C - 100nnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh
Subnet Mask = 255.255.255.0 IP Address /24
SUBNETTING
(Next Lecture)
Questions