05 : IP Addresses
Baessa K.
Mettu University
College of Engineering and Technology
Department of Information Technology
Target Group : B.Sc in Information Technology Students
August 12, 2022
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 1 / 61
Lecture Topics : #
1 IPv4 Addresses
Notations
Address Space
Classful Addressing
Classless Addressing
2 Next Generation IP : IPv6 Addressing
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 2 / 61
IPv4 Addresses
Outline
1 IPv4 Addresses
Notations
Address Space
Classful Addressing
Classless Addressing
2 Next Generation IP : IPv6 Addressing
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 3 / 61
IPv4 Addresses
Introduction
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 4 / 61
IPv4 Addresses
Introduction …
• The identifier used in the IP layer of the TCP/IP protocol suite
• …to identify the connection of each device to the Internet is called the
Internet address or IP address.
• An IPv4 address is a 32-bit address that uniquely and universally
defines the connection of a host or a router to the Internet.
• …each address defines one, and only one, connection to the Internet.
• Two devices on the Internet can never have the same address at the
same time
• The IP address is the address of the connection, not the host or the
router,
• …because if the device is moved to another network, the IP address
may be changed.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 5 / 61
IPv4 Addresses Notations
Outline
1 IPv4 Addresses
Notations
Address Space
Classful Addressing
Classless Addressing
2 Next Generation IP : IPv6 Addressing
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 6 / 61
IPv4 Addresses Notations
IPv4 Address Notations
• There are three common notations to show an IPv4 address:
1 Binary notation (base 2)
• It is a 32-bit long string of zeros and ones.
• It consists of four octets or 8 bits of 1’s and 0’s.
• one or more spaces are usually inserted between each octet (8 bits).
• Each octet is often referred to as a byte.
• Each octet is between 00000000 and 11111111
2 Dotted-decimal notation (base 256)
• to make it more compact and easier to read by humans, they are
written in decimal form with a dot separating bytes.
• each 4 bytes written in decimal, from 0 to 255
• Eg: 192.41.6.20 is a valid IP address.
• the lowest IP address is 0.0.0.0 and the highest is 255.255.255.255
3 Hexadecimal notation (base 16)
• Each hexadecimal digit is equivalent to four bits.
• This means that a 32-bit address has 8 hexadecimal digits.
• This notation is often used in network programming
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 7 / 61
IPv4 Addresses Notations
IPv4 Address Notations
• There are three common notations to show an IPv4 address:
1 Binary notation (base 2)
• It is a 32-bit long string of zeros and ones.
• It consists of four octets or 8 bits of 1’s and 0’s.
• one or more spaces are usually inserted between each octet (8 bits).
• Each octet is often referred to as a byte.
• Each octet is between 00000000 and 11111111
2 Dotted-decimal notation (base 256)
• to make it more compact and easier to read by humans, they are
written in decimal form with a dot separating bytes.
• each 4 bytes written in decimal, from 0 to 255
• Eg: 192.41.6.20 is a valid IP address.
• the lowest IP address is 0.0.0.0 and the highest is 255.255.255.255
3 Hexadecimal notation (base 16)
• Each hexadecimal digit is equivalent to four bits.
• This means that a 32-bit address has 8 hexadecimal digits.
• This notation is often used in network programming
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 7 / 61
IPv4 Addresses Notations
IPv4 Address Notations
• There are three common notations to show an IPv4 address:
1 Binary notation (base 2)
• It is a 32-bit long string of zeros and ones.
• It consists of four octets or 8 bits of 1’s and 0’s.
• one or more spaces are usually inserted between each octet (8 bits).
• Each octet is often referred to as a byte.
• Each octet is between 00000000 and 11111111
2 Dotted-decimal notation (base 256)
• to make it more compact and easier to read by humans, they are
written in decimal form with a dot separating bytes.
• each 4 bytes written in decimal, from 0 to 255
• Eg: 192.41.6.20 is a valid IP address.
• the lowest IP address is 0.0.0.0 and the highest is 255.255.255.255
3 Hexadecimal notation (base 16)
• Each hexadecimal digit is equivalent to four bits.
• This means that a 32-bit address has 8 hexadecimal digits.
• This notation is often used in network programming
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 7 / 61
IPv4 Addresses Notations
IPv4 Address Notations …
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 8 / 61
IPv4 Addresses Notations
IPv4 Address Notations …
Exercises
1 10000001 00001011 00001011 11101111 to Decimal
2 129.11.11.239 to binary
3 Which one is INCORRECT
A 111.56.045.78
B 221.34.7.8.20
C 75.45.301.14
D 11100010.23.14.67
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 9 / 61
IPv4 Addresses Address Space
Outline
1 IPv4 Addresses
Notations
Address Space
Classful Addressing
Classless Addressing
2 Next Generation IP : IPv6 Addressing
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 10 / 61
IPv4 Addresses Address Space
Address Space
• IPv4 protocol addresses has an address space.
• An address space is the total number of addresses used by the
protocol.
• If a protocol uses N bits to define an address, the address space is 2N
• IPv4 uses 32-bit addresses, which means that the address space is 232
or 4,294,967,296.
• If there were no restrictions, more than 4 billion devices could be
connected to the Internet.
The address space of IPv4 is 232 or 4,294,967,296
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 11 / 61
IPv4 Addresses Address Space
Address Space
• IPv4 protocol addresses has an address space.
• An address space is the total number of addresses used by the
protocol.
• If a protocol uses N bits to define an address, the address space is 2N
• IPv4 uses 32-bit addresses, which means that the address space is 232
or 4,294,967,296.
• If there were no restrictions, more than 4 billion devices could be
connected to the Internet.
The address space of IPv4 is 232 or 4,294,967,296
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 11 / 61
IPv4 Addresses Address Space
Address Space …
Hierarchy in Addressing
• A 32-bit IPv4 address is hierarchical, but divided only into two parts.
1 The first part of the address, called the prefix⇒ Network-ID,
→ …defines the network;
• identifies a single network segment within a larger TCP/IP
internetwork.
• All systems attach to same network have common Network-ID.
2 The second part of the address, called the suffix⇒ Host ID:,
→ …defines the node (connection of a device to the Internet).
• identifies a single device within each network.
• Host-ID for each device identifies single system uniquely within its own
network.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 12 / 61
IPv4 Addresses Address Space
Address Space …
• The prefix length is n bits and the suffix length is (32 - n) bits.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 13 / 61
IPv4 Addresses Address Space
Address Space …
• A prefix can be fixed length or variable length.
• There are two IPv4 addressing scheme
1 Classful addressing
• fixed-length prefix
2 Classless addressing
• uses a variable-length network prefix
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 14 / 61
IPv4 Addresses Classful Addressing
Outline
1 IPv4 Addresses
Notations
Address Space
Classful Addressing
Classless Addressing
2 Next Generation IP : IPv6 Addressing
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 15 / 61
IPv4 Addresses Classful Addressing
Classful Addressing
• an IPv4 address was designed with a fixed-length prefix, but to
accommodate both small and large networks,
• …three fixed-length prefixes were designed instead of one (n = 8, n =
16, and n = 24).
• In classful addressing, address space was divided into five classes
(class A, B, C, D, and E)
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 16 / 61
IPv4 Addresses Classful Addressing
Class A
• starts the first bit with 0
• the network length is 8 bits, but since the first bit, which is 0, defines
the class, we can have only seven bits as the network identifier.
• This means there are only 27 = 128 networks (0-127) in the world
that can have a class A address.
• the last 3 octets used to create host addresses
• i.e. class A supports 16 million (224 − 2) hosts per network
• 1.x.y.z to 127.x.y.z
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 17 / 61
IPv4 Addresses Classful Addressing
Class B
• starts the first two bits with 10
• the network length is 16 bits, but since the first two bits, which are
(10)2, define the class,
• we can have only 14 bits as the network identifier.
• 16,384 valid class B Network IDs.
• Class B supports 214 = 16, 384 networks (128.0.y.z - 191.255.y.z)
• the last 2 octets used to create host addresses
• i.e. class B supports 65,534 (216 − 2) hosts per network
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 18 / 61
IPv4 Addresses Classful Addressing
Class C
• All addresses that start with (110) belong to class C.
• the network length is 24 bits, but since three bits define the class,
• …we can have only 21 bits as the network identifier.
• → there are 221
= 2, 097, 152 networks in the world that can have a
class C address.
• the last octet used to create host addresses
• i.e class C supports 254 (28 − 2) hosts per network.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 19 / 61
IPv4 Addresses Classful Addressing
Class D
• First octet in binary is defined as 1110xxxx
• Range of class D addresses is from 224.x.y.z to 239.x.y.z
• It is used for multicasting → method of sending a single packet to
multiple hosts.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 20 / 61
IPv4 Addresses Classful Addressing
Class E
• All addresses that start with 1111 in binary belong to class E.
• Address ranges from 240.x.y.z to 255.x.y.z
• it is reserved for network experiments, testing and experimentation
• As in Class D, Class E is not divided into prefix and suffix and is used
as reserve.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 21 / 61
IPv4 Addresses Classful Addressing
Class E
• All addresses that start with 1111 in binary belong to class E.
• Address ranges from 240.x.y.z to 255.x.y.z
• it is reserved for network experiments, testing and experimentation
• As in Class D, Class E is not divided into prefix and suffix and is used
as reserve.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 21 / 61
IPv4 Addresses Classful Addressing
Addressing Guidelines
• Depending on values of network and host portions, we have 3 types of
addresses:
1 Network address
• this is the address by which we refer to the network
• its host portion bits are all 0
2 Broadcast address
• a special address used to send data to all hosts in the network
• its host portion bits are all 1
3 Host addresses
• addresses assigned to end devices in the network
• its host portion cannot all be 0 or 1
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 22 / 61
IPv4 Addresses Classful Addressing
Class work
Find the class of each address
1 00000001 00001011 00001011 11101111
2 11000001 10000011 00011011 11111111
3 14.23.120.8
4 252.5.15.111
Find the class of each address
1 00000001 00001011 00001011 11101111
2 11000001 10000011 00011011 11111111
3 14.23.120.8
4 252.5.15.111
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 23 / 61
IPv4 Addresses Classful Addressing
Class work
Find the class of each address
1 00000001 00001011 00001011 11101111
2 11000001 10000011 00011011 11111111
3 14.23.120.8
4 252.5.15.111
Find the class of each address
1 00000001 00001011 00001011 11101111
2 11000001 10000011 00011011 11111111
3 14.23.120.8
4 252.5.15.111
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 23 / 61
IPv4 Addresses Classful Addressing
Subnet Mask
• Each IP address is really made up two different pieces.
• Network ID → defines network address
• Host ID → defines hosts on that specific network
• It is used to delineate (represent accurately) the network portion from
the host portion
• It is 32 bits long:
• with all 1s corresponding to the network portion, and
• with all 0s corresponding to the host portion of the IP address.
• Subnet mask is not an IP address
• It can be represented in either of the following 3 ways:
1 dotted binary
2 doted decimal, or
3 slash (prefix length) notation.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 24 / 61
IPv4 Addresses Classful Addressing
Subnet Mask
• Each IP address is really made up two different pieces.
• Network ID → defines network address
• Host ID → defines hosts on that specific network
• It is used to delineate (represent accurately) the network portion from
the host portion
• It is 32 bits long:
• with all 1s corresponding to the network portion, and
• with all 0s corresponding to the host portion of the IP address.
• Subnet mask is not an IP address
• It can be represented in either of the following 3 ways:
1 dotted binary
2 doted decimal, or
3 slash (prefix length) notation.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 24 / 61
IPv4 Addresses Classful Addressing
Subnet Mask
• Each IP address is really made up two different pieces.
• Network ID → defines network address
• Host ID → defines hosts on that specific network
• It is used to delineate (represent accurately) the network portion from
the host portion
• It is 32 bits long:
• with all 1s corresponding to the network portion, and
• with all 0s corresponding to the host portion of the IP address.
• Subnet mask is not an IP address
• It can be represented in either of the following 3 ways:
1 dotted binary
2 doted decimal, or
3 slash (prefix length) notation.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 24 / 61
IPv4 Addresses Classful Addressing
Subnet Mask …
Address Class Dotted Binary Dotted Decimal Slash
A 11111111.00000000.00000000.00000000 255.0.0.0 /8
B 11111111.11111111.00000000.00000000 255.255.0.0 /16
C 11111111.11111111.11111111.00000000 255.255.255.0 /24
Table: Default Subnet mask for Classful Addressing
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 25 / 61
IPv4 Addresses Classful Addressing
Why Subnet Mask ?
• Why Subnet Mask ?
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 26 / 61
IPv4 Addresses Classful Addressing
Why Subnet Mask ? …
• Why Subnet Mask ?
• How does Computer A knows Computer B is local and
computer C is remote ?
• That is the secret of subnet mask
• Let’s think
• Suppose A’s subnet mask is 255.255.255.0
Host IP address
A 10.1.151.2
B 10.1.151.3
C 64.227.160.23
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 27 / 61
IPv4 Addresses Classful Addressing
Why Subnet Mask ? …
• Why Subnet Mask ?
• How does Computer A knows Computer B is local and
computer C is remote ?
• That is the secret of subnet mask
• Let’s think
• Suppose A’s subnet mask is 255.255.255.0
Host IP address
A 10.1.151.2
B 10.1.151.3
C 64.227.160.23
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 27 / 61
IPv4 Addresses Classful Addressing
Why Subnet Mask ? …
• Convert these addresses into binary notations
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 28 / 61
IPv4 Addresses Classful Addressing
Why Subnet Mask ? …
• Let’s compares A’s IP address with B’s IP address
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 28 / 61
IPv4 Addresses Classful Addressing
Why Subnet Mask ? …
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 28 / 61
IPv4 Addresses Classful Addressing
Why Subnet Mask ? …
• Since both computers A and B share the same network ID, thus
computer A knows computer B is local.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 28 / 61
IPv4 Addresses Classful Addressing
Why Subnet Mask ? …
• Now computer A needs to know if computer C is local or remote
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 28 / 61
IPv4 Addresses Classful Addressing
Why Subnet Mask ? …
• Therefore, subnet mask is used by a computer to determine if
another(target) computer is on the same network or on a
different network.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 28 / 61
IPv4 Addresses Classful Addressing
Why Subnet Mask ? …
• A bit-wise logical AND operation between the host address and the
subnet mask is performed to find the Network Address.
• Example : Find network address of the following host address
1 23.56.7.91
2 172.18.20.54
3 140.179.240.200
4 192.168.40.3/21
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 29 / 61
IPv4 Addresses Classful Addressing
Why Subnet Mask ? …
• A bit-wise logical AND operation between the host address and the
subnet mask is performed to find the Network Address.
• Example : Find network address of the following host address
1 23.56.7.91
2 172.18.20.54
3 140.179.240.200
4 192.168.40.3/21
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 29 / 61
IPv4 Addresses Classful Addressing
Summary of IPv4 Classful Addressing
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 30 / 61
IPv4 Addresses Classful Addressing
Subnetting
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 31 / 61
IPv4 Addresses Classful Addressing
Subnetting …
• A subnet is a logical sub-division of an IP network.
• The process of dividing a network into two or more networks is called
subnetting
• The main purpose of subnetting is to help relieve network congestion,
and improve network performance
• Security is another benefit of subnetting.
• Subnets are formed by borrowing bits from host-portion.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 32 / 61
IPv4 Addresses Classful Addressing
Subnetting …
• A subnet is a logical sub-division of an IP network.
• The process of dividing a network into two or more networks is called
subnetting
• The main purpose of subnetting is to help relieve network congestion,
and improve network performance
• Security is another benefit of subnetting.
• Subnets are formed by borrowing bits from host-portion.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 32 / 61
IPv4 Addresses Classful Addressing
Subnetting …
• Subnetting allows you to create multiple logical networks that exist
within a single Class A, B, or C network.
• If you do not subnet, you can only use one network from your Class
A, B, or C network, which is simply unrealistic
• To subnet a network, extend the mask using some of the bits from
the host ID portion of the address to create a subnetwork ID.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 33 / 61
IPv4 Addresses Classful Addressing
Subnetting …
• To create a subnet follow these steps:
1 Determine the number of required network IDs
2 Determine the number of required host IDs per subnet
3 Based on the above requirements, create the following
• One subnet mask for your entire network
• A range of host IDs for each subnet
• A broadcast ID for each subnet
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 34 / 61
IPv4 Addresses Classful Addressing
Subnetting Example
1 Subnetting Class C Addresses
2 Subnetting Class B Addresses
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 35 / 61
IPv4 Addresses Classful Addressing
Subnetting Class C Addresses
The Fast Way!
• All you need to do is answer five simple questions:
1 How many subnets does the chosen subnet mask produce?
2 How many valid hosts per subnet are available?
3 What are the valid subnets?
4 What’s the broadcast address of each subnet?
5 What are the valid hosts in each subnet?
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 36 / 61
IPv4 Addresses Classful Addressing
Subnetting Class C Addresses …
• Here’s how you get the answers to those five big questions
1 How many subnets? 2x
= number of subnets.
→ x is the number of masked bits, or the 1s.
• For example, in 11000000, the number of 1s gives us 22
subnets.
• In this example, there are 4 subnets.
2 How many hosts per subnet? 2y
− 2 = number of hosts per subnet.
→ y is the number of unmasked bits, or the 0s.
• For example, in 11000000, the number of 0s gives us 26
− 2 hosts
3 What are the valid subnets?256 - subnet mask = block size, or
increment number.
• An example would be 256 - 192 = 64.
• The block size of a 192 mask is always 64.
• Start counting at zero in blocks of 64 until you reach the subnet mask
value and these are your subnets. 0, 64, 128, 192. Easy, huh?
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 37 / 61
IPv4 Addresses Classful Addressing
Subnetting Class C Addresses …
• Here’s how you get the answers to those five big questions
1 How many subnets? 2x
= number of subnets.
→ x is the number of masked bits, or the 1s.
• For example, in 11000000, the number of 1s gives us 22
subnets.
• In this example, there are 4 subnets.
2 How many hosts per subnet? 2y
− 2 = number of hosts per subnet.
→ y is the number of unmasked bits, or the 0s.
• For example, in 11000000, the number of 0s gives us 26
− 2 hosts
3 What are the valid subnets?256 - subnet mask = block size, or
increment number.
• An example would be 256 - 192 = 64.
• The block size of a 192 mask is always 64.
• Start counting at zero in blocks of 64 until you reach the subnet mask
value and these are your subnets. 0, 64, 128, 192. Easy, huh?
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 37 / 61
IPv4 Addresses Classful Addressing
Subnetting Class C Addresses …
• Here’s how you get the answers to those five big questions
1 How many subnets? 2x
= number of subnets.
→ x is the number of masked bits, or the 1s.
• For example, in 11000000, the number of 1s gives us 22
subnets.
• In this example, there are 4 subnets.
2 How many hosts per subnet? 2y
− 2 = number of hosts per subnet.
→ y is the number of unmasked bits, or the 0s.
• For example, in 11000000, the number of 0s gives us 26
− 2 hosts
3 What are the valid subnets?256 - subnet mask = block size, or
increment number.
• An example would be 256 - 192 = 64.
• The block size of a 192 mask is always 64.
• Start counting at zero in blocks of 64 until you reach the subnet mask
value and these are your subnets. 0, 64, 128, 192. Easy, huh?
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 37 / 61
IPv4 Addresses Classful Addressing
Subnetting Class C Addresses …
• Here’s how you get the answers to those five big questions
4 What’s the broadcast address for each subnet?
• The broadcast address is always the number right before the next
subnet.
5 What are the valid hosts?
• Valid hosts are the numbers between the subnets, omitting the all 0s
and all 1s
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 38 / 61
IPv4 Addresses Classful Addressing
Subnetting Class C Addresses …
• Here’s how you get the answers to those five big questions
4 What’s the broadcast address for each subnet?
• The broadcast address is always the number right before the next
subnet.
5 What are the valid hosts?
• Valid hosts are the numbers between the subnets, omitting the all 0s
and all 1s
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 38 / 61
IPv4 Addresses Classful Addressing
Subnetting Class C Addresses …
Example
• Suppose you are Network Administrator at MEU ICT and your
supervisor drops by your office , saying;
• Here is the network ID 192.168.4.0/24
• Please create three separate networks( 3 subnets) for School of
Computing.
• One is for Department of Information Technology
• One for Computer Science Department
• One is for Information System Department
Your task is to list:
1 each network ID, Subnet Mask
2 Host ID Range and # of usable host IDs
3 Broadcast ID
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 39 / 61
IPv4 Addresses Classful Addressing
Subnetting Class B Addresses
• Suppose I have a class B Network ID :172.16.0.0/16 and I
want to create 4 new subnets.
• Here are three questions:
1 What is the new Subnet mask ?
2 How many usable host IDs for each new subnet ?
3 List each Network ID, Usable host ID range and each broadcast
ID.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 40 / 61
IPv4 Addresses Classless Addressing
Outline
1 IPv4 Addresses
Notations
Address Space
Classful Addressing
Classless Addressing
2 Next Generation IP : IPv6 Addressing
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 41 / 61
IPv4 Addresses Classless Addressing
Classless Addressing
• In 1996, the Internet authorities announced a new architecture called
classless addressing.
• In classless addressing, variable-length blocks are used that belong to
no classes.
• In classless addressing, the whole address space is divided into
variable length blocks.
• The prefix in an address defines the block (network); the suffix defines
the node (device).
• Theoretically, we can have a block of 20, 21, 22, ..., 232 addresses.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 42 / 61
IPv4 Addresses Classless Addressing
Classless Addressing
• In 1996, the Internet authorities announced a new architecture called
classless addressing.
• In classless addressing, variable-length blocks are used that belong to
no classes.
• In classless addressing, the whole address space is divided into
variable length blocks.
• The prefix in an address defines the block (network); the suffix defines
the node (device).
• Theoretically, we can have a block of 20, 21, 22, ..., 232 addresses.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 42 / 61
IPv4 Addresses Classless Addressing
Classless Addressing …
• Unlike classful addressing, the prefix length in classless addressing is
variable.
• We can have a prefix length that ranges from 0 to 32.
• The size of the network is inversely proportional to the length of the
prefix.
• A small prefix means a larger network; a large prefix means a smaller
network.
• …classless addressing can be easily applied to classful addressing.
• An address in class A can be thought of as a classless address in
which the prefix length is 8.
• An address in class B can be thought of as a classless address in
which the prefix is 16, and so on.
• In other words, classful addressing is a special case of classless
addressing
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 43 / 61
IPv4 Addresses Classless Addressing
Classless Addressing …
• Unlike classful addressing, the prefix length in classless addressing is
variable.
• We can have a prefix length that ranges from 0 to 32.
• The size of the network is inversely proportional to the length of the
prefix.
• A small prefix means a larger network; a large prefix means a smaller
network.
• …classless addressing can be easily applied to classful addressing.
• An address in class A can be thought of as a classless address in
which the prefix length is 8.
• An address in class B can be thought of as a classless address in
which the prefix is 16, and so on.
• In other words, classful addressing is a special case of classless
addressing
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 43 / 61
IPv4 Addresses Classless Addressing
Prefix Length: Slash Notation
• The first question that we need to answer in classless addressing is
how to find the prefix length if an address is given.
• The prefix length, n, is added to the address, separated by a slash.
• The notation is informally referred to as slash notation and
• …formally as classless interdomain routing or CIDR.
• An address in classless addressing can then be represented as:
• In other words, an address in classless addressing does not define the
block or network to which the address belongs;
• …we need to give the prefix length also.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 44 / 61
IPv4 Addresses Classless Addressing
Prefix Length: Slash Notation
• The first question that we need to answer in classless addressing is
how to find the prefix length if an address is given.
• The prefix length, n, is added to the address, separated by a slash.
• The notation is informally referred to as slash notation and
• …formally as classless interdomain routing or CIDR.
• An address in classless addressing can then be represented as:
• In other words, an address in classless addressing does not define the
block or network to which the address belongs;
• …we need to give the prefix length also.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 44 / 61
IPv4 Addresses Classless Addressing
Extracting Information from an Address
• Given any address in the block, we normally like to know three pieces
of information about the block to which the address belongs:
1 the number of addresses,
2 the first address in the block
3 the last address.
• Since the value of prefix length, n, is given, we can easily find these
three pieces of information
1 The number of addresses in the block is found as N = 232−n
2 To find the first address, we keep the n leftmost bits and set the (32 -
n) rightmost bits all to 0s.
3 To find the last address, we keep the n leftmost bits and set the (32 -
n) rightmost bits all to 1s
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 45 / 61
IPv4 Addresses Classless Addressing
Extracting Information from an Address
• Given any address in the block, we normally like to know three pieces
of information about the block to which the address belongs:
1 the number of addresses,
2 the first address in the block
3 the last address.
• Since the value of prefix length, n, is given, we can easily find these
three pieces of information
1 The number of addresses in the block is found as N = 232−n
2 To find the first address, we keep the n leftmost bits and set the (32 -
n) rightmost bits all to 0s.
3 To find the last address, we keep the n leftmost bits and set the (32 -
n) rightmost bits all to 1s
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 45 / 61
IPv4 Addresses Classless Addressing
Extracting Information from an Address …
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 46 / 61
IPv4 Addresses Classless Addressing
Extracting Information from an Address …
Example
• A classless address is given as 167.199.170.82/27.
• We can find the above three pieces of information as follows.
1 The number of addresses in the network is 232−n = 25 = 32 addresses.
2 The first address can be found by keeping the first 27 bits and
changing the rest of the bits to 0s
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 47 / 61
IPv4 Addresses Classless Addressing
Extracting Information from an Address …
Example
• A classless address is given as 167.199.170.82/27.
• We can find the above three pieces of information as follows.
1 The number of addresses in the network is 232−n = 25 = 32 addresses.
2 The first address can be found by keeping the first 27 bits and
changing the rest of the bits to 0s
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 47 / 61
IPv4 Addresses Classless Addressing
Extracting Information from an Address …
Example
• A classless address is given as 167.199.170.82/27.
• We can find the above three pieces of information as follows.
1 The number of addresses in the network is 232−n = 25 = 32 addresses.
2 The first address can be found by keeping the first 27 bits and
changing the rest of the bits to 0s
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 47 / 61
IPv4 Addresses Classless Addressing
Extracting Information from an Address …
3 The last address can be found by keeping the first 27 bits and
changing the rest of the bits to 1s.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 48 / 61
IPv4 Addresses Classless Addressing
Extracting Information from an Address …
• Another way to find the first and last addresses in the block is to use
the address mask.
• Using the three bit-wise operations NOT, AND, and OR, a computer
program can extract the addresses information in a block
1 The number of addresses in the block N = NOT (mask) + 1
2 The first address in the block = (Any address in the block) AND
(mask).
3 The last address in the block = (Any address in the block) OR [(NOT
(mask)]
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 49 / 61
IPv4 Addresses Classless Addressing
Extracting Information from an Address …
Example
• A classless address is given as 167.199.170.82/27. The mask in
dotted-decimal notation is 255.255.255.224.
1 Number of addresses in the block ?
2 First address ?
3 Last address?
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 50 / 61
IPv4 Addresses Classless Addressing
Extracting Information from an Address …
Class Work
• A block of address granted to a small organization. We know that of
the addresses is 205.16.37.39/28
1 Number of addresses in the block ?
2 What is the first address in the block
3 What is the last address in the block
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 51 / 61
IPv4 Addresses Classless Addressing
Extracting Information from an Address …
1 Number of addresses in the block
• N = NOT (mask) + 1 = 0.0.0.31 + 1 = 32 addresses
2 First address
• First = (address) AND (mask) = 167.199.170.82
3 Last address
• Last = (address) OR (NOT mask) = 167.199.170.255
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 52 / 61
IPv4 Addresses Classless Addressing
Special Addresses
• There are five special addresses that are used for special purposes:
1 This-host address
2 Limited-broadcast address
3 Loopback address
4 Private addresses
5 Multicast addresses.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 53 / 61
IPv4 Addresses Classless Addressing
Special Addresses …
This-host Address
• 0.0.0.0/32 is the this-host address.
• It is used whenever a host needs to send an IP datagram but it does
not know its own address to use as the source address.
• IP 0.0.0.0 is used by hosts when they are being booted
Limited-broadcast Address
• 255.255.255.255/32 is called the limited-broadcast address.
• It is used whenever a router or a host needs to send a datagram to all
devices in a network.
• The routers in the network, however, block the packet having this
address as the destination; the packet cannot travel outside the
network.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 54 / 61
IPv4 Addresses Classless Addressing
Special Addresses …
This-host Address
• 0.0.0.0/32 is the this-host address.
• It is used whenever a host needs to send an IP datagram but it does
not know its own address to use as the source address.
• IP 0.0.0.0 is used by hosts when they are being booted
Limited-broadcast Address
• 255.255.255.255/32 is called the limited-broadcast address.
• It is used whenever a router or a host needs to send a datagram to all
devices in a network.
• The routers in the network, however, block the packet having this
address as the destination; the packet cannot travel outside the
network.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 54 / 61
IPv4 Addresses Classless Addressing
Special Addresses …
Loopback Address
• The block 127.0.0.0/8 is called the loopback address.
• A packet with one of the addresses in this block as the destination
address never leaves the host;
• …it will remain in the host.
• Any address in the block is used to test a piece of software in the
machine.
• For example, we can write a client and a server program in which one
of the addresses in the block is used as the server address.
• We can test the programs using the same host to see if they work
before running them on different computers.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 55 / 61
IPv4 Addresses Classless Addressing
Special Addresses …
Private Addresses
• Four blocks are assigned as private addresses:
1 10.0.0.0/8
2 172.16.0.0/12
3 192.168.0.0/16
4 169.254.0.0/16
Multicast Addresses
• The block 224.0.0.0/4 is reserved for multicast addresses.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 56 / 61
IPv4 Addresses Classless Addressing
Special Addresses …
Private Addresses
• Four blocks are assigned as private addresses:
1 10.0.0.0/8
2 172.16.0.0/12
3 192.168.0.0/16
4 169.254.0.0/16
Multicast Addresses
• The block 224.0.0.0/4 is reserved for multicast addresses.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 56 / 61
Next Generation IP : IPv6 Addressing
Outline
1 IPv4 Addresses
Notations
Address Space
Classful Addressing
Classless Addressing
2 Next Generation IP : IPv6 Addressing
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 57 / 61
Next Generation IP : IPv6 Addressing
IPv6 Addressing
• The main reason for migration from IPv4 to IPv6 is the small size of
the address space in IPv4
• An IPv6 address is 128 bits or 16 bytes (octets) long, four times the
address length in IPv4.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 58 / 61
Next Generation IP : IPv6 Addressing
Representation
• A computer normally stores the address in binary, but it is clear that
128 bits cannot easily be handled by humans.
• Several notations have been proposed to represent IPv6 addresses
when they are handled by humans.
• The following shows two of these notations:
1 Binary (128 bits)
1111111011110110 …1111111100000000
2 Colon Hexadecimal
FEF6:BA98:7654:3210:ADEF:BBFF:2922:FF00
• Binary notation is used when the addresses are stored in a computer
• The colon hexadecimal notation (or colon hex for short) divides the
address into eight sections,
• …each made of four hexadecimal digits separated by colons.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 59 / 61
Next Generation IP : IPv6 Addressing
Representation
• A computer normally stores the address in binary, but it is clear that
128 bits cannot easily be handled by humans.
• Several notations have been proposed to represent IPv6 addresses
when they are handled by humans.
• The following shows two of these notations:
1 Binary (128 bits)
1111111011110110 …1111111100000000
2 Colon Hexadecimal
FEF6:BA98:7654:3210:ADEF:BBFF:2922:FF00
• Binary notation is used when the addresses are stored in a computer
• The colon hexadecimal notation (or colon hex for short) divides the
address into eight sections,
• …each made of four hexadecimal digits separated by colons.
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 59 / 61
Next Generation IP : IPv6 Addressing
Abbreviation
• Although an IPv6 address, even in hexadecimal format, is very long,
many of the digits are zeros.
• In this case, we can abbreviate the address.
• The leading zeros of a section can be omitted.
• 0074 can be written as 74
• 000F as F
• 0000 as 0
• Note that 3210 cannot be abbreviated
• …often called zero compression, can be applied to colon hex notation
if there are consecutive sections consisting of zeros only.
• We can remove all the zeros and replace them with a double
semicolon
FDEC:0:0:0:0:BBFF:0:FFFF ⇒ FDEC::BBFF:0:FFFF
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 60 / 61
Next Generation IP : IPv6 Addressing
Abbreviation
• Although an IPv6 address, even in hexadecimal format, is very long,
many of the digits are zeros.
• In this case, we can abbreviate the address.
• The leading zeros of a section can be omitted.
• 0074 can be written as 74
• 000F as F
• 0000 as 0
• Note that 3210 cannot be abbreviated
• …often called zero compression, can be applied to colon hex notation
if there are consecutive sections consisting of zeros only.
• We can remove all the zeros and replace them with a double
semicolon
FDEC:0:0:0:0:BBFF:0:FFFF ⇒ FDEC::BBFF:0:FFFF
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 60 / 61
Next Generation IP : IPv6 Addressing
Address Space
• The address space of IPv6 contains 2128 addresses.
• This address space is 296 times the IPv4 address–definitely no address
depletion
Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 61 / 61

Data communication and computer network-Chapter 05.pdf

  • 1.
    05 : IPAddresses Baessa K. Mettu University College of Engineering and Technology Department of Information Technology Target Group : B.Sc in Information Technology Students August 12, 2022 Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 1 / 61
  • 2.
    Lecture Topics :# 1 IPv4 Addresses Notations Address Space Classful Addressing Classless Addressing 2 Next Generation IP : IPv6 Addressing Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 2 / 61
  • 3.
    IPv4 Addresses Outline 1 IPv4Addresses Notations Address Space Classful Addressing Classless Addressing 2 Next Generation IP : IPv6 Addressing Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 3 / 61
  • 4.
    IPv4 Addresses Introduction Baessa K.(Mettu University) 05 IP Addresses August 12, 2022 4 / 61
  • 5.
    IPv4 Addresses Introduction … •The identifier used in the IP layer of the TCP/IP protocol suite • …to identify the connection of each device to the Internet is called the Internet address or IP address. • An IPv4 address is a 32-bit address that uniquely and universally defines the connection of a host or a router to the Internet. • …each address defines one, and only one, connection to the Internet. • Two devices on the Internet can never have the same address at the same time • The IP address is the address of the connection, not the host or the router, • …because if the device is moved to another network, the IP address may be changed. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 5 / 61
  • 6.
    IPv4 Addresses Notations Outline 1IPv4 Addresses Notations Address Space Classful Addressing Classless Addressing 2 Next Generation IP : IPv6 Addressing Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 6 / 61
  • 7.
    IPv4 Addresses Notations IPv4Address Notations • There are three common notations to show an IPv4 address: 1 Binary notation (base 2) • It is a 32-bit long string of zeros and ones. • It consists of four octets or 8 bits of 1’s and 0’s. • one or more spaces are usually inserted between each octet (8 bits). • Each octet is often referred to as a byte. • Each octet is between 00000000 and 11111111 2 Dotted-decimal notation (base 256) • to make it more compact and easier to read by humans, they are written in decimal form with a dot separating bytes. • each 4 bytes written in decimal, from 0 to 255 • Eg: 192.41.6.20 is a valid IP address. • the lowest IP address is 0.0.0.0 and the highest is 255.255.255.255 3 Hexadecimal notation (base 16) • Each hexadecimal digit is equivalent to four bits. • This means that a 32-bit address has 8 hexadecimal digits. • This notation is often used in network programming Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 7 / 61
  • 8.
    IPv4 Addresses Notations IPv4Address Notations • There are three common notations to show an IPv4 address: 1 Binary notation (base 2) • It is a 32-bit long string of zeros and ones. • It consists of four octets or 8 bits of 1’s and 0’s. • one or more spaces are usually inserted between each octet (8 bits). • Each octet is often referred to as a byte. • Each octet is between 00000000 and 11111111 2 Dotted-decimal notation (base 256) • to make it more compact and easier to read by humans, they are written in decimal form with a dot separating bytes. • each 4 bytes written in decimal, from 0 to 255 • Eg: 192.41.6.20 is a valid IP address. • the lowest IP address is 0.0.0.0 and the highest is 255.255.255.255 3 Hexadecimal notation (base 16) • Each hexadecimal digit is equivalent to four bits. • This means that a 32-bit address has 8 hexadecimal digits. • This notation is often used in network programming Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 7 / 61
  • 9.
    IPv4 Addresses Notations IPv4Address Notations • There are three common notations to show an IPv4 address: 1 Binary notation (base 2) • It is a 32-bit long string of zeros and ones. • It consists of four octets or 8 bits of 1’s and 0’s. • one or more spaces are usually inserted between each octet (8 bits). • Each octet is often referred to as a byte. • Each octet is between 00000000 and 11111111 2 Dotted-decimal notation (base 256) • to make it more compact and easier to read by humans, they are written in decimal form with a dot separating bytes. • each 4 bytes written in decimal, from 0 to 255 • Eg: 192.41.6.20 is a valid IP address. • the lowest IP address is 0.0.0.0 and the highest is 255.255.255.255 3 Hexadecimal notation (base 16) • Each hexadecimal digit is equivalent to four bits. • This means that a 32-bit address has 8 hexadecimal digits. • This notation is often used in network programming Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 7 / 61
  • 10.
    IPv4 Addresses Notations IPv4Address Notations … Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 8 / 61
  • 11.
    IPv4 Addresses Notations IPv4Address Notations … Exercises 1 10000001 00001011 00001011 11101111 to Decimal 2 129.11.11.239 to binary 3 Which one is INCORRECT A 111.56.045.78 B 221.34.7.8.20 C 75.45.301.14 D 11100010.23.14.67 Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 9 / 61
  • 12.
    IPv4 Addresses AddressSpace Outline 1 IPv4 Addresses Notations Address Space Classful Addressing Classless Addressing 2 Next Generation IP : IPv6 Addressing Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 10 / 61
  • 13.
    IPv4 Addresses AddressSpace Address Space • IPv4 protocol addresses has an address space. • An address space is the total number of addresses used by the protocol. • If a protocol uses N bits to define an address, the address space is 2N • IPv4 uses 32-bit addresses, which means that the address space is 232 or 4,294,967,296. • If there were no restrictions, more than 4 billion devices could be connected to the Internet. The address space of IPv4 is 232 or 4,294,967,296 Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 11 / 61
  • 14.
    IPv4 Addresses AddressSpace Address Space • IPv4 protocol addresses has an address space. • An address space is the total number of addresses used by the protocol. • If a protocol uses N bits to define an address, the address space is 2N • IPv4 uses 32-bit addresses, which means that the address space is 232 or 4,294,967,296. • If there were no restrictions, more than 4 billion devices could be connected to the Internet. The address space of IPv4 is 232 or 4,294,967,296 Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 11 / 61
  • 15.
    IPv4 Addresses AddressSpace Address Space … Hierarchy in Addressing • A 32-bit IPv4 address is hierarchical, but divided only into two parts. 1 The first part of the address, called the prefix⇒ Network-ID, → …defines the network; • identifies a single network segment within a larger TCP/IP internetwork. • All systems attach to same network have common Network-ID. 2 The second part of the address, called the suffix⇒ Host ID:, → …defines the node (connection of a device to the Internet). • identifies a single device within each network. • Host-ID for each device identifies single system uniquely within its own network. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 12 / 61
  • 16.
    IPv4 Addresses AddressSpace Address Space … • The prefix length is n bits and the suffix length is (32 - n) bits. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 13 / 61
  • 17.
    IPv4 Addresses AddressSpace Address Space … • A prefix can be fixed length or variable length. • There are two IPv4 addressing scheme 1 Classful addressing • fixed-length prefix 2 Classless addressing • uses a variable-length network prefix Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 14 / 61
  • 18.
    IPv4 Addresses ClassfulAddressing Outline 1 IPv4 Addresses Notations Address Space Classful Addressing Classless Addressing 2 Next Generation IP : IPv6 Addressing Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 15 / 61
  • 19.
    IPv4 Addresses ClassfulAddressing Classful Addressing • an IPv4 address was designed with a fixed-length prefix, but to accommodate both small and large networks, • …three fixed-length prefixes were designed instead of one (n = 8, n = 16, and n = 24). • In classful addressing, address space was divided into five classes (class A, B, C, D, and E) Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 16 / 61
  • 20.
    IPv4 Addresses ClassfulAddressing Class A • starts the first bit with 0 • the network length is 8 bits, but since the first bit, which is 0, defines the class, we can have only seven bits as the network identifier. • This means there are only 27 = 128 networks (0-127) in the world that can have a class A address. • the last 3 octets used to create host addresses • i.e. class A supports 16 million (224 − 2) hosts per network • 1.x.y.z to 127.x.y.z Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 17 / 61
  • 21.
    IPv4 Addresses ClassfulAddressing Class B • starts the first two bits with 10 • the network length is 16 bits, but since the first two bits, which are (10)2, define the class, • we can have only 14 bits as the network identifier. • 16,384 valid class B Network IDs. • Class B supports 214 = 16, 384 networks (128.0.y.z - 191.255.y.z) • the last 2 octets used to create host addresses • i.e. class B supports 65,534 (216 − 2) hosts per network Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 18 / 61
  • 22.
    IPv4 Addresses ClassfulAddressing Class C • All addresses that start with (110) belong to class C. • the network length is 24 bits, but since three bits define the class, • …we can have only 21 bits as the network identifier. • → there are 221 = 2, 097, 152 networks in the world that can have a class C address. • the last octet used to create host addresses • i.e class C supports 254 (28 − 2) hosts per network. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 19 / 61
  • 23.
    IPv4 Addresses ClassfulAddressing Class D • First octet in binary is defined as 1110xxxx • Range of class D addresses is from 224.x.y.z to 239.x.y.z • It is used for multicasting → method of sending a single packet to multiple hosts. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 20 / 61
  • 24.
    IPv4 Addresses ClassfulAddressing Class E • All addresses that start with 1111 in binary belong to class E. • Address ranges from 240.x.y.z to 255.x.y.z • it is reserved for network experiments, testing and experimentation • As in Class D, Class E is not divided into prefix and suffix and is used as reserve. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 21 / 61
  • 25.
    IPv4 Addresses ClassfulAddressing Class E • All addresses that start with 1111 in binary belong to class E. • Address ranges from 240.x.y.z to 255.x.y.z • it is reserved for network experiments, testing and experimentation • As in Class D, Class E is not divided into prefix and suffix and is used as reserve. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 21 / 61
  • 26.
    IPv4 Addresses ClassfulAddressing Addressing Guidelines • Depending on values of network and host portions, we have 3 types of addresses: 1 Network address • this is the address by which we refer to the network • its host portion bits are all 0 2 Broadcast address • a special address used to send data to all hosts in the network • its host portion bits are all 1 3 Host addresses • addresses assigned to end devices in the network • its host portion cannot all be 0 or 1 Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 22 / 61
  • 27.
    IPv4 Addresses ClassfulAddressing Class work Find the class of each address 1 00000001 00001011 00001011 11101111 2 11000001 10000011 00011011 11111111 3 14.23.120.8 4 252.5.15.111 Find the class of each address 1 00000001 00001011 00001011 11101111 2 11000001 10000011 00011011 11111111 3 14.23.120.8 4 252.5.15.111 Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 23 / 61
  • 28.
    IPv4 Addresses ClassfulAddressing Class work Find the class of each address 1 00000001 00001011 00001011 11101111 2 11000001 10000011 00011011 11111111 3 14.23.120.8 4 252.5.15.111 Find the class of each address 1 00000001 00001011 00001011 11101111 2 11000001 10000011 00011011 11111111 3 14.23.120.8 4 252.5.15.111 Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 23 / 61
  • 29.
    IPv4 Addresses ClassfulAddressing Subnet Mask • Each IP address is really made up two different pieces. • Network ID → defines network address • Host ID → defines hosts on that specific network • It is used to delineate (represent accurately) the network portion from the host portion • It is 32 bits long: • with all 1s corresponding to the network portion, and • with all 0s corresponding to the host portion of the IP address. • Subnet mask is not an IP address • It can be represented in either of the following 3 ways: 1 dotted binary 2 doted decimal, or 3 slash (prefix length) notation. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 24 / 61
  • 30.
    IPv4 Addresses ClassfulAddressing Subnet Mask • Each IP address is really made up two different pieces. • Network ID → defines network address • Host ID → defines hosts on that specific network • It is used to delineate (represent accurately) the network portion from the host portion • It is 32 bits long: • with all 1s corresponding to the network portion, and • with all 0s corresponding to the host portion of the IP address. • Subnet mask is not an IP address • It can be represented in either of the following 3 ways: 1 dotted binary 2 doted decimal, or 3 slash (prefix length) notation. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 24 / 61
  • 31.
    IPv4 Addresses ClassfulAddressing Subnet Mask • Each IP address is really made up two different pieces. • Network ID → defines network address • Host ID → defines hosts on that specific network • It is used to delineate (represent accurately) the network portion from the host portion • It is 32 bits long: • with all 1s corresponding to the network portion, and • with all 0s corresponding to the host portion of the IP address. • Subnet mask is not an IP address • It can be represented in either of the following 3 ways: 1 dotted binary 2 doted decimal, or 3 slash (prefix length) notation. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 24 / 61
  • 32.
    IPv4 Addresses ClassfulAddressing Subnet Mask … Address Class Dotted Binary Dotted Decimal Slash A 11111111.00000000.00000000.00000000 255.0.0.0 /8 B 11111111.11111111.00000000.00000000 255.255.0.0 /16 C 11111111.11111111.11111111.00000000 255.255.255.0 /24 Table: Default Subnet mask for Classful Addressing Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 25 / 61
  • 33.
    IPv4 Addresses ClassfulAddressing Why Subnet Mask ? • Why Subnet Mask ? Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 26 / 61
  • 34.
    IPv4 Addresses ClassfulAddressing Why Subnet Mask ? … • Why Subnet Mask ? • How does Computer A knows Computer B is local and computer C is remote ? • That is the secret of subnet mask • Let’s think • Suppose A’s subnet mask is 255.255.255.0 Host IP address A 10.1.151.2 B 10.1.151.3 C 64.227.160.23 Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 27 / 61
  • 35.
    IPv4 Addresses ClassfulAddressing Why Subnet Mask ? … • Why Subnet Mask ? • How does Computer A knows Computer B is local and computer C is remote ? • That is the secret of subnet mask • Let’s think • Suppose A’s subnet mask is 255.255.255.0 Host IP address A 10.1.151.2 B 10.1.151.3 C 64.227.160.23 Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 27 / 61
  • 36.
    IPv4 Addresses ClassfulAddressing Why Subnet Mask ? … • Convert these addresses into binary notations Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 28 / 61
  • 37.
    IPv4 Addresses ClassfulAddressing Why Subnet Mask ? … • Let’s compares A’s IP address with B’s IP address Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 28 / 61
  • 38.
    IPv4 Addresses ClassfulAddressing Why Subnet Mask ? … Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 28 / 61
  • 39.
    IPv4 Addresses ClassfulAddressing Why Subnet Mask ? … • Since both computers A and B share the same network ID, thus computer A knows computer B is local. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 28 / 61
  • 40.
    IPv4 Addresses ClassfulAddressing Why Subnet Mask ? … • Now computer A needs to know if computer C is local or remote Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 28 / 61
  • 41.
    IPv4 Addresses ClassfulAddressing Why Subnet Mask ? … • Therefore, subnet mask is used by a computer to determine if another(target) computer is on the same network or on a different network. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 28 / 61
  • 42.
    IPv4 Addresses ClassfulAddressing Why Subnet Mask ? … • A bit-wise logical AND operation between the host address and the subnet mask is performed to find the Network Address. • Example : Find network address of the following host address 1 23.56.7.91 2 172.18.20.54 3 140.179.240.200 4 192.168.40.3/21 Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 29 / 61
  • 43.
    IPv4 Addresses ClassfulAddressing Why Subnet Mask ? … • A bit-wise logical AND operation between the host address and the subnet mask is performed to find the Network Address. • Example : Find network address of the following host address 1 23.56.7.91 2 172.18.20.54 3 140.179.240.200 4 192.168.40.3/21 Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 29 / 61
  • 44.
    IPv4 Addresses ClassfulAddressing Summary of IPv4 Classful Addressing Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 30 / 61
  • 45.
    IPv4 Addresses ClassfulAddressing Subnetting Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 31 / 61
  • 46.
    IPv4 Addresses ClassfulAddressing Subnetting … • A subnet is a logical sub-division of an IP network. • The process of dividing a network into two or more networks is called subnetting • The main purpose of subnetting is to help relieve network congestion, and improve network performance • Security is another benefit of subnetting. • Subnets are formed by borrowing bits from host-portion. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 32 / 61
  • 47.
    IPv4 Addresses ClassfulAddressing Subnetting … • A subnet is a logical sub-division of an IP network. • The process of dividing a network into two or more networks is called subnetting • The main purpose of subnetting is to help relieve network congestion, and improve network performance • Security is another benefit of subnetting. • Subnets are formed by borrowing bits from host-portion. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 32 / 61
  • 48.
    IPv4 Addresses ClassfulAddressing Subnetting … • Subnetting allows you to create multiple logical networks that exist within a single Class A, B, or C network. • If you do not subnet, you can only use one network from your Class A, B, or C network, which is simply unrealistic • To subnet a network, extend the mask using some of the bits from the host ID portion of the address to create a subnetwork ID. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 33 / 61
  • 49.
    IPv4 Addresses ClassfulAddressing Subnetting … • To create a subnet follow these steps: 1 Determine the number of required network IDs 2 Determine the number of required host IDs per subnet 3 Based on the above requirements, create the following • One subnet mask for your entire network • A range of host IDs for each subnet • A broadcast ID for each subnet Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 34 / 61
  • 50.
    IPv4 Addresses ClassfulAddressing Subnetting Example 1 Subnetting Class C Addresses 2 Subnetting Class B Addresses Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 35 / 61
  • 51.
    IPv4 Addresses ClassfulAddressing Subnetting Class C Addresses The Fast Way! • All you need to do is answer five simple questions: 1 How many subnets does the chosen subnet mask produce? 2 How many valid hosts per subnet are available? 3 What are the valid subnets? 4 What’s the broadcast address of each subnet? 5 What are the valid hosts in each subnet? Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 36 / 61
  • 52.
    IPv4 Addresses ClassfulAddressing Subnetting Class C Addresses … • Here’s how you get the answers to those five big questions 1 How many subnets? 2x = number of subnets. → x is the number of masked bits, or the 1s. • For example, in 11000000, the number of 1s gives us 22 subnets. • In this example, there are 4 subnets. 2 How many hosts per subnet? 2y − 2 = number of hosts per subnet. → y is the number of unmasked bits, or the 0s. • For example, in 11000000, the number of 0s gives us 26 − 2 hosts 3 What are the valid subnets?256 - subnet mask = block size, or increment number. • An example would be 256 - 192 = 64. • The block size of a 192 mask is always 64. • Start counting at zero in blocks of 64 until you reach the subnet mask value and these are your subnets. 0, 64, 128, 192. Easy, huh? Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 37 / 61
  • 53.
    IPv4 Addresses ClassfulAddressing Subnetting Class C Addresses … • Here’s how you get the answers to those five big questions 1 How many subnets? 2x = number of subnets. → x is the number of masked bits, or the 1s. • For example, in 11000000, the number of 1s gives us 22 subnets. • In this example, there are 4 subnets. 2 How many hosts per subnet? 2y − 2 = number of hosts per subnet. → y is the number of unmasked bits, or the 0s. • For example, in 11000000, the number of 0s gives us 26 − 2 hosts 3 What are the valid subnets?256 - subnet mask = block size, or increment number. • An example would be 256 - 192 = 64. • The block size of a 192 mask is always 64. • Start counting at zero in blocks of 64 until you reach the subnet mask value and these are your subnets. 0, 64, 128, 192. Easy, huh? Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 37 / 61
  • 54.
    IPv4 Addresses ClassfulAddressing Subnetting Class C Addresses … • Here’s how you get the answers to those five big questions 1 How many subnets? 2x = number of subnets. → x is the number of masked bits, or the 1s. • For example, in 11000000, the number of 1s gives us 22 subnets. • In this example, there are 4 subnets. 2 How many hosts per subnet? 2y − 2 = number of hosts per subnet. → y is the number of unmasked bits, or the 0s. • For example, in 11000000, the number of 0s gives us 26 − 2 hosts 3 What are the valid subnets?256 - subnet mask = block size, or increment number. • An example would be 256 - 192 = 64. • The block size of a 192 mask is always 64. • Start counting at zero in blocks of 64 until you reach the subnet mask value and these are your subnets. 0, 64, 128, 192. Easy, huh? Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 37 / 61
  • 55.
    IPv4 Addresses ClassfulAddressing Subnetting Class C Addresses … • Here’s how you get the answers to those five big questions 4 What’s the broadcast address for each subnet? • The broadcast address is always the number right before the next subnet. 5 What are the valid hosts? • Valid hosts are the numbers between the subnets, omitting the all 0s and all 1s Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 38 / 61
  • 56.
    IPv4 Addresses ClassfulAddressing Subnetting Class C Addresses … • Here’s how you get the answers to those five big questions 4 What’s the broadcast address for each subnet? • The broadcast address is always the number right before the next subnet. 5 What are the valid hosts? • Valid hosts are the numbers between the subnets, omitting the all 0s and all 1s Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 38 / 61
  • 57.
    IPv4 Addresses ClassfulAddressing Subnetting Class C Addresses … Example • Suppose you are Network Administrator at MEU ICT and your supervisor drops by your office , saying; • Here is the network ID 192.168.4.0/24 • Please create three separate networks( 3 subnets) for School of Computing. • One is for Department of Information Technology • One for Computer Science Department • One is for Information System Department Your task is to list: 1 each network ID, Subnet Mask 2 Host ID Range and # of usable host IDs 3 Broadcast ID Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 39 / 61
  • 58.
    IPv4 Addresses ClassfulAddressing Subnetting Class B Addresses • Suppose I have a class B Network ID :172.16.0.0/16 and I want to create 4 new subnets. • Here are three questions: 1 What is the new Subnet mask ? 2 How many usable host IDs for each new subnet ? 3 List each Network ID, Usable host ID range and each broadcast ID. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 40 / 61
  • 59.
    IPv4 Addresses ClasslessAddressing Outline 1 IPv4 Addresses Notations Address Space Classful Addressing Classless Addressing 2 Next Generation IP : IPv6 Addressing Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 41 / 61
  • 60.
    IPv4 Addresses ClasslessAddressing Classless Addressing • In 1996, the Internet authorities announced a new architecture called classless addressing. • In classless addressing, variable-length blocks are used that belong to no classes. • In classless addressing, the whole address space is divided into variable length blocks. • The prefix in an address defines the block (network); the suffix defines the node (device). • Theoretically, we can have a block of 20, 21, 22, ..., 232 addresses. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 42 / 61
  • 61.
    IPv4 Addresses ClasslessAddressing Classless Addressing • In 1996, the Internet authorities announced a new architecture called classless addressing. • In classless addressing, variable-length blocks are used that belong to no classes. • In classless addressing, the whole address space is divided into variable length blocks. • The prefix in an address defines the block (network); the suffix defines the node (device). • Theoretically, we can have a block of 20, 21, 22, ..., 232 addresses. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 42 / 61
  • 62.
    IPv4 Addresses ClasslessAddressing Classless Addressing … • Unlike classful addressing, the prefix length in classless addressing is variable. • We can have a prefix length that ranges from 0 to 32. • The size of the network is inversely proportional to the length of the prefix. • A small prefix means a larger network; a large prefix means a smaller network. • …classless addressing can be easily applied to classful addressing. • An address in class A can be thought of as a classless address in which the prefix length is 8. • An address in class B can be thought of as a classless address in which the prefix is 16, and so on. • In other words, classful addressing is a special case of classless addressing Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 43 / 61
  • 63.
    IPv4 Addresses ClasslessAddressing Classless Addressing … • Unlike classful addressing, the prefix length in classless addressing is variable. • We can have a prefix length that ranges from 0 to 32. • The size of the network is inversely proportional to the length of the prefix. • A small prefix means a larger network; a large prefix means a smaller network. • …classless addressing can be easily applied to classful addressing. • An address in class A can be thought of as a classless address in which the prefix length is 8. • An address in class B can be thought of as a classless address in which the prefix is 16, and so on. • In other words, classful addressing is a special case of classless addressing Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 43 / 61
  • 64.
    IPv4 Addresses ClasslessAddressing Prefix Length: Slash Notation • The first question that we need to answer in classless addressing is how to find the prefix length if an address is given. • The prefix length, n, is added to the address, separated by a slash. • The notation is informally referred to as slash notation and • …formally as classless interdomain routing or CIDR. • An address in classless addressing can then be represented as: • In other words, an address in classless addressing does not define the block or network to which the address belongs; • …we need to give the prefix length also. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 44 / 61
  • 65.
    IPv4 Addresses ClasslessAddressing Prefix Length: Slash Notation • The first question that we need to answer in classless addressing is how to find the prefix length if an address is given. • The prefix length, n, is added to the address, separated by a slash. • The notation is informally referred to as slash notation and • …formally as classless interdomain routing or CIDR. • An address in classless addressing can then be represented as: • In other words, an address in classless addressing does not define the block or network to which the address belongs; • …we need to give the prefix length also. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 44 / 61
  • 66.
    IPv4 Addresses ClasslessAddressing Extracting Information from an Address • Given any address in the block, we normally like to know three pieces of information about the block to which the address belongs: 1 the number of addresses, 2 the first address in the block 3 the last address. • Since the value of prefix length, n, is given, we can easily find these three pieces of information 1 The number of addresses in the block is found as N = 232−n 2 To find the first address, we keep the n leftmost bits and set the (32 - n) rightmost bits all to 0s. 3 To find the last address, we keep the n leftmost bits and set the (32 - n) rightmost bits all to 1s Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 45 / 61
  • 67.
    IPv4 Addresses ClasslessAddressing Extracting Information from an Address • Given any address in the block, we normally like to know three pieces of information about the block to which the address belongs: 1 the number of addresses, 2 the first address in the block 3 the last address. • Since the value of prefix length, n, is given, we can easily find these three pieces of information 1 The number of addresses in the block is found as N = 232−n 2 To find the first address, we keep the n leftmost bits and set the (32 - n) rightmost bits all to 0s. 3 To find the last address, we keep the n leftmost bits and set the (32 - n) rightmost bits all to 1s Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 45 / 61
  • 68.
    IPv4 Addresses ClasslessAddressing Extracting Information from an Address … Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 46 / 61
  • 69.
    IPv4 Addresses ClasslessAddressing Extracting Information from an Address … Example • A classless address is given as 167.199.170.82/27. • We can find the above three pieces of information as follows. 1 The number of addresses in the network is 232−n = 25 = 32 addresses. 2 The first address can be found by keeping the first 27 bits and changing the rest of the bits to 0s Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 47 / 61
  • 70.
    IPv4 Addresses ClasslessAddressing Extracting Information from an Address … Example • A classless address is given as 167.199.170.82/27. • We can find the above three pieces of information as follows. 1 The number of addresses in the network is 232−n = 25 = 32 addresses. 2 The first address can be found by keeping the first 27 bits and changing the rest of the bits to 0s Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 47 / 61
  • 71.
    IPv4 Addresses ClasslessAddressing Extracting Information from an Address … Example • A classless address is given as 167.199.170.82/27. • We can find the above three pieces of information as follows. 1 The number of addresses in the network is 232−n = 25 = 32 addresses. 2 The first address can be found by keeping the first 27 bits and changing the rest of the bits to 0s Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 47 / 61
  • 72.
    IPv4 Addresses ClasslessAddressing Extracting Information from an Address … 3 The last address can be found by keeping the first 27 bits and changing the rest of the bits to 1s. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 48 / 61
  • 73.
    IPv4 Addresses ClasslessAddressing Extracting Information from an Address … • Another way to find the first and last addresses in the block is to use the address mask. • Using the three bit-wise operations NOT, AND, and OR, a computer program can extract the addresses information in a block 1 The number of addresses in the block N = NOT (mask) + 1 2 The first address in the block = (Any address in the block) AND (mask). 3 The last address in the block = (Any address in the block) OR [(NOT (mask)] Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 49 / 61
  • 74.
    IPv4 Addresses ClasslessAddressing Extracting Information from an Address … Example • A classless address is given as 167.199.170.82/27. The mask in dotted-decimal notation is 255.255.255.224. 1 Number of addresses in the block ? 2 First address ? 3 Last address? Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 50 / 61
  • 75.
    IPv4 Addresses ClasslessAddressing Extracting Information from an Address … Class Work • A block of address granted to a small organization. We know that of the addresses is 205.16.37.39/28 1 Number of addresses in the block ? 2 What is the first address in the block 3 What is the last address in the block Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 51 / 61
  • 76.
    IPv4 Addresses ClasslessAddressing Extracting Information from an Address … 1 Number of addresses in the block • N = NOT (mask) + 1 = 0.0.0.31 + 1 = 32 addresses 2 First address • First = (address) AND (mask) = 167.199.170.82 3 Last address • Last = (address) OR (NOT mask) = 167.199.170.255 Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 52 / 61
  • 77.
    IPv4 Addresses ClasslessAddressing Special Addresses • There are five special addresses that are used for special purposes: 1 This-host address 2 Limited-broadcast address 3 Loopback address 4 Private addresses 5 Multicast addresses. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 53 / 61
  • 78.
    IPv4 Addresses ClasslessAddressing Special Addresses … This-host Address • 0.0.0.0/32 is the this-host address. • It is used whenever a host needs to send an IP datagram but it does not know its own address to use as the source address. • IP 0.0.0.0 is used by hosts when they are being booted Limited-broadcast Address • 255.255.255.255/32 is called the limited-broadcast address. • It is used whenever a router or a host needs to send a datagram to all devices in a network. • The routers in the network, however, block the packet having this address as the destination; the packet cannot travel outside the network. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 54 / 61
  • 79.
    IPv4 Addresses ClasslessAddressing Special Addresses … This-host Address • 0.0.0.0/32 is the this-host address. • It is used whenever a host needs to send an IP datagram but it does not know its own address to use as the source address. • IP 0.0.0.0 is used by hosts when they are being booted Limited-broadcast Address • 255.255.255.255/32 is called the limited-broadcast address. • It is used whenever a router or a host needs to send a datagram to all devices in a network. • The routers in the network, however, block the packet having this address as the destination; the packet cannot travel outside the network. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 54 / 61
  • 80.
    IPv4 Addresses ClasslessAddressing Special Addresses … Loopback Address • The block 127.0.0.0/8 is called the loopback address. • A packet with one of the addresses in this block as the destination address never leaves the host; • …it will remain in the host. • Any address in the block is used to test a piece of software in the machine. • For example, we can write a client and a server program in which one of the addresses in the block is used as the server address. • We can test the programs using the same host to see if they work before running them on different computers. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 55 / 61
  • 81.
    IPv4 Addresses ClasslessAddressing Special Addresses … Private Addresses • Four blocks are assigned as private addresses: 1 10.0.0.0/8 2 172.16.0.0/12 3 192.168.0.0/16 4 169.254.0.0/16 Multicast Addresses • The block 224.0.0.0/4 is reserved for multicast addresses. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 56 / 61
  • 82.
    IPv4 Addresses ClasslessAddressing Special Addresses … Private Addresses • Four blocks are assigned as private addresses: 1 10.0.0.0/8 2 172.16.0.0/12 3 192.168.0.0/16 4 169.254.0.0/16 Multicast Addresses • The block 224.0.0.0/4 is reserved for multicast addresses. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 56 / 61
  • 83.
    Next Generation IP: IPv6 Addressing Outline 1 IPv4 Addresses Notations Address Space Classful Addressing Classless Addressing 2 Next Generation IP : IPv6 Addressing Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 57 / 61
  • 84.
    Next Generation IP: IPv6 Addressing IPv6 Addressing • The main reason for migration from IPv4 to IPv6 is the small size of the address space in IPv4 • An IPv6 address is 128 bits or 16 bytes (octets) long, four times the address length in IPv4. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 58 / 61
  • 85.
    Next Generation IP: IPv6 Addressing Representation • A computer normally stores the address in binary, but it is clear that 128 bits cannot easily be handled by humans. • Several notations have been proposed to represent IPv6 addresses when they are handled by humans. • The following shows two of these notations: 1 Binary (128 bits) 1111111011110110 …1111111100000000 2 Colon Hexadecimal FEF6:BA98:7654:3210:ADEF:BBFF:2922:FF00 • Binary notation is used when the addresses are stored in a computer • The colon hexadecimal notation (or colon hex for short) divides the address into eight sections, • …each made of four hexadecimal digits separated by colons. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 59 / 61
  • 86.
    Next Generation IP: IPv6 Addressing Representation • A computer normally stores the address in binary, but it is clear that 128 bits cannot easily be handled by humans. • Several notations have been proposed to represent IPv6 addresses when they are handled by humans. • The following shows two of these notations: 1 Binary (128 bits) 1111111011110110 …1111111100000000 2 Colon Hexadecimal FEF6:BA98:7654:3210:ADEF:BBFF:2922:FF00 • Binary notation is used when the addresses are stored in a computer • The colon hexadecimal notation (or colon hex for short) divides the address into eight sections, • …each made of four hexadecimal digits separated by colons. Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 59 / 61
  • 87.
    Next Generation IP: IPv6 Addressing Abbreviation • Although an IPv6 address, even in hexadecimal format, is very long, many of the digits are zeros. • In this case, we can abbreviate the address. • The leading zeros of a section can be omitted. • 0074 can be written as 74 • 000F as F • 0000 as 0 • Note that 3210 cannot be abbreviated • …often called zero compression, can be applied to colon hex notation if there are consecutive sections consisting of zeros only. • We can remove all the zeros and replace them with a double semicolon FDEC:0:0:0:0:BBFF:0:FFFF ⇒ FDEC::BBFF:0:FFFF Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 60 / 61
  • 88.
    Next Generation IP: IPv6 Addressing Abbreviation • Although an IPv6 address, even in hexadecimal format, is very long, many of the digits are zeros. • In this case, we can abbreviate the address. • The leading zeros of a section can be omitted. • 0074 can be written as 74 • 000F as F • 0000 as 0 • Note that 3210 cannot be abbreviated • …often called zero compression, can be applied to colon hex notation if there are consecutive sections consisting of zeros only. • We can remove all the zeros and replace them with a double semicolon FDEC:0:0:0:0:BBFF:0:FFFF ⇒ FDEC::BBFF:0:FFFF Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 60 / 61
  • 89.
    Next Generation IP: IPv6 Addressing Address Space • The address space of IPv6 contains 2128 addresses. • This address space is 296 times the IPv4 address–definitely no address depletion Baessa K. (Mettu University) 05 IP Addresses August 12, 2022 61 / 61