You are on page 1of 52

Pengenalan IP v4

Oleh : Aiesa bin Saad


Bahagian Teknologi Maklumat
INSTUN
Tarikh kemaskini : 28 Jun 2023
Ketua Program Teknologi Maklumat,
Seksyen Latihan Aplikasi Geomatik Dan Perkhidmatan ICT
Institut Tanah dan Ukur Negara (INSTUN)

Aiesa Saad
Work Experiences:
Database administration, system development, portal
development, multimedia creation, UI/UX designing,
network & datacenter, rencams

2002·························································2023
JPSM, EPU, HLP, PPN Perak, ICU, INSTUN
Internet Protocol Address (IP)

Logical address Invented in 1974 Internet Protocol version 4 (IPv4)


For a host to communicate, some means of By Vint Cerf & Robert E. Kahn. Described in IETF (Internet Engineering Task
addressing is required to identify the remote Force) publication RFC 791 (Sept. 1981)
host uniquely. Deployed for production in the ARPANET in 1983.

Best effort delivery mechanism IPv4 is 32 bits long The IPv4 Pool is running out
IPv4 has proven itself as a robust routable Offers around 4,294,967,296 (2^32) The Internet Assigned Numbers Authority
addressing protocol addresses (IANA) manages the IP address space
allocations globally.
Original Internet address: 32 bits (RFC760)

IP Address Allocation 8 bits (network) | 24 bits (local)


2^8 = 256 networks

John Postel Classful Addressing (RFC 791) The IPv4 party is over
Maintain network list assignment using a Three solutions to mitigate IP depletion:
paper notebook. • Classless Inter-Domain Routing (CIDR)
• Address Allocation for Private Internets
• Network Address Translation (NAT)
5 Regional Internet Registries (RIRs):
did not solve the problem.
1. Asia-Pacific (APNIC)
– exhausted in April 2011, IPv6 - Design started in 1993
2. Latin America and the Caribbean (LACNIC)
https://www.google.com/intl/en/ipv6/statistics.html
– exhausted in June 2014
3. North America (ARIN)
– exhausted in September 2015
4. Europe, Middle East and Central Asia (RIPE Address Start Network # Host #
NCC) – exhausted in November 2019 Class A 0.0.0.0 128 16,777,216
5. Africa (AFRINIC) – May 2020 Class B 128.0.0.0 16,384 65,536
IPv4 address report: Class C 192.0.0.0 2,097,152 256
https://www.potaroo.net/tools/ipv4/
Summary of IPv4 1/5

Late 1960s 1981


The Advanced Research Projects Agency Network (ARPANET) IPv4 was described in IETF (Internet Engineering Task Force)
was a project which began in the Pentagon. In 1969, publication RFC 791 (September 1981), replacing the earlier
ARPANET developed packet switching. What would follow definition in RFC 760.
from these experiments was the development of the initial
protocols which would define the internet, including TCP/IP,
1982
packet switching, and email developments.
In March 1982, the US Department of Defense declared
TCP/IP as the standard for all military computer networking.
1973
TCP v1 was designed in the spring of 1973 by Robert Elliot
1983
Kahn and Vinton Cerf.
The Domain Name System (DNS) was created to make
internet navigation easier In November 1983, through the
1977 publication of RFC 882.
In August 1977, Jon Postel, an American computer scientist
and editor of the Request for Comment (RFC), changed the
1984
TCP protocol to TCP/IP and split TCP and IP into two distinct
operating layers. This became TCP v3 in 1978. In October 1984, RFC 920 was published to define a series of
top-level domains (.com, .gov, .edu, etc.) to provide domain
space to various types of organizations.
1980
The first formal standard (or public) version of IP was version
4 – IPv4 - created in 1980 (TCP/IP v4) and defined in RFC
760.
Summary of IPv4 2/5

1988 1993
Jon Postel established and founded the Internet Assigned In September 1993, CIDR (Classless Inter-Domain Routing)
Numbers Authority (IANA). The term IANA is first referred to was introduced to slow the growth of routing tables and to
in RFC 1083. Postel was named Deputy Internet Architect and help slow the exhaustion of IPv4 addresses. The original
RFC Editor. specification in RFC 1519 was later replaced by RFC 4632.

1989 APNIC (Asia-Pacific Network Information Centre) was formed


Sir Tim Berners-Lee invented the World Wide Web, which was to allocate address space in the Asia-Pacific region.
essentially the standard for URLs, HTTP, and HTML.
The National Science Foundation (NSF) took responsibility for
1991 non-military domain name registration. They awarded a five-
year agreement to Network Solutions, Inc. (NSI) to handle this
The High Performance Computing and Communications Act
task. At the time there were only 7,500 domain names.
passed in the US under Senator Albert Gore through senate
bill S.272. One of the key activities of the bill was to give
responsibility to the National Science Foundation (NSF) to, 1994
among other things, provide networking infrastructure support In May 1994, the first RFC document on Network Address
for science and engineering disciplines. Translator (NAT) was published (RFC 1631). NAT is a
technology used to prolong IPv4 availability. It does this by
1992 translating a private address in an internal network into legal
public addresses.
The RIPE (Réseaux IP Européens) NCC was formally
established in April 1992 and began to do IPv4 address
distribution.
Summary of IPv4 3/5

1995 In November 1998, ICANN (Internet Corporation for Assigned


In September 1995, domain name registration started to Numbers and Names) Incorporated as a nonprofit
become mostly commercial, as the NSF authorized NSI to organization. Part of their service is to oversee domain name
charge a fee for new domain names. registration and the global registries.

1997 2002
In December 1997, ARIN (American Registry for Internet LACNIC was established, providing management of internet
Numbers) formed as a nonprofit corporation. It provided IP number resources to 33 territories in Latin America and the
registration and allocation in North America. Caribbean.

1998 2004
The IETF initiated the design and development of IPv6, a AFRINIC was incorporated as the internet registry for Africa.
replacement for IPv4, as early as 1994 with a formal
description in 1995 under RFC 1883. The first specification 2005
was published in 1998 by RFC 2460, which was later
In February 2005, the Early Registration Transfer Project (ERX)
superseded by RFC 8200 and is the current and updated
was implemented to transfer internet resource records from
specification.
ARIN to the RIR in which they were used.

IPv5 was designed as a Stream Protocol, which failed, and


was never announced publicly.
Summary of IPv4 4/5

2011 2012
In February 2011, the primary address pool of the internet, On July 31, 2012, ARIN implemented its Inter-RIR Transfer
managed by IANA, was exhausted when the last 5 blocks were Policy.
allocated to the RIRs.
On September 12, 2012, RIPE exhausted the last IPv4 blocks
In April 2011, APNIC was the first RIR to exhaust its regional from its available pool of addresses.
address pool, except for a small amount of address space
reserved for the transition to IPv6.
By the end of 2012, just over 10 million IPv4 addresses had
been transferred through the RIRs – cumulative since 2009
In 2011, the first commercial transfer of IPv4 addresses took (refer to figure 1).
place between Nortel and Microsoft. This transfer was
managed by Sandra Brown, who was the Director of
The first ARIN to APNIC IPv4 Inter-RIR transfer was
Engineering at Nortel at the time.
processed.

In May 2011, IPv4 Market Group, LLC was incorporated.

On August 9, 2011, APNIC was the first RIR to implement an


Inter-RIR Transfer Policy.
Summary of IPv4 5/5

2014 By the end of 2015, about 90.4 million IPv4 addresses had
LACNIC announced its service region was considered been transferred through the RIRs – cumulative since 2009
exhausted after reaching one /10 block of remaining IPv4
addresses. 2017
By the end of 2017, about 190.4 million IPv4 addresses had
In December of 2014, the average Price/IP of a /16 was been transferred through the RIRs – cumulative since 2009
approximately $5/IP (refer to figure 2).
2018
By the end of 2014, about 37.7 million IPv4 addresses had In January of 2018, native IPv6 utilization hit 20%.
been transferred through the RIRs – cumulative since 2009
(refer to figure 1).
2019
In November of 2019, ARIN ran out of its free pool of IPv4
2015
addresses.
In January of 2015, native IPv6 utilization hit approximately
5% as measured by connectivity among Google users.
2020
January 2020, native IPv6 utilization hit 30%.
On September 24 2015, ARIN ran out of its free pool of IPv4
addresses.

On September 30 2015, RIPE implemented its Inter-RIR


Transfer Policy for internet resources authored by Sandra
Brown of IPv4 Market Group.
Anatomy of IPv4 Address
Dot-decimal notation
• Consists of four octets
• Expressed individually in decimal
numbers
• Separated by periods .

Network part and host part

octet

IPv4 address range


From 0.0.0.0 to 255.255.255.255
IPv4 addresses range from 0.0.0.0 to 255.255.255.255.
Why?
Remember, each octet has 8-bit So, 172.16.254.1
8-bit number in binary: 10101100 in binary: 10101100.00010000.11111110.00000001
The binary number is
important because that
will determine which
class of network the IP
How does 10101100 represent 172? address belongs to.
Value of each bit multiplied by 2
powered of position of that bit.

MSB LSB
Binary 1 1 1 1 1 1 1 1
Powered by 27 26 25 24 23 22 21 20
Decimal 128 64 32 16 8 4 2 1 =255

So,

Binary 1 0 1 0 1 1 0 0
Decimal 128 0 32 0 8 4 0 0 =172
BINARY

https://www.youtube.com/watch?v=XsBlxR6JDtQ&list=PLHLt6zLQu53ZrsE2qUF_Vm8wVNpsbLVPZ
Practicing IPv4 Conversion
Why?

128 64 32 16 8 4 2 1
Exercise.
Why?

Convert the following:

1. 192.168.0.100
2. 128.11.3.31
3. 11.5.4.3

4. 1100000.10101000.00000101.00001010
5. 10000010.00000101.00000100.01001101
6. 00001010.00110010.00001101.00101000
Classful Addressing
IPv4 – Address Classes (Classful Addressing)
Divided into 5 classes

Class A Address
• IP range : 1.x.x.x – 126.x.x.x

• IP range 127.x.x.x : reserved for loopback IP addresses

• Default subnet mask : 255.0.0.0

• Network address : 126 (2^7)

• Hosts address: 16,777,214 (2^24 – 2)

The higher order bit of the first octet in


class A is always set to 0. The
00000001 – 01111111 remaining 7 bits in first octet are used
to determine network ID
1 – 127
IPv4 – Address Classes
Divided into 5 classes

Class B Address
• IP range : 128.0.x.x – 191.255.x.x

• Default subnet mask : 255.255.x.x

• Network addresses: 16,384 (2^14)

• Hosts address: 65,534 (2^16 – 2)

The higher order bit of the first octet in


class B is always set to 10. The
10000000 – 10111111 remaining 14 bits in first octet are used
to determine network ID
128 – 191
IPv4 – Address Classes
Divided into 5 classes

Class C Address
• IP range : 192.0.0.x – 223.255.255.x

• Default subnet mask : 255.255.255.x

• Network addresses: 2,097,152 (2^21)

• Hosts address: 254 (2^8 – 2)

The higher order bit of the first octet in


class C is always set to 110. The
11000000 – 11011111 remaining 21 bits in first octet are used
to determine network ID
192 – 223
IPv4 – Address Classes
Divided into 5 classes

Class D Address Class E Address


• IP range : 224.0.0.0 – 239.255.255.255 • IP range : 240.0.0.0 – 255.255.255.254

• Reserved for multicasting • Does not have any subnet mask

• Does not have any subnet mask • Reserved for experimental purpose for R&D or
study

11100000 – 11101111 11110000 – 11111111


224 – 239 240 – 255
The higher order bit of the first octet in The higher order bit of the first octet in
class D is always set to 1110. The class D is always set to 1111.
remaining bits are for the address that
interested hosts recognize.
Rules for assigning Host ID:
Host ID’s are used to identify a host within a network. The
host ID are assigned based on the following rules:

IPv4 – Address Classes • Within any network, the host ID must be unique to that
network.
• Host ID in which all bits are set to 0 cannot be assigned
because this host ID is used to represent the network ID of
Special addresses the IP address.
• Host ID in which all bits are set to 1 cannot be assigned
Certain IPv4 addresses are set aside for specific uses: because this host ID is reserved as a broadcast address to
send packets to all the hosts present on that particular
network.
169.254.0.0 Link local address
Rules for assigning Network ID:
Loopback address (the host’s own Hosts that are located on the same physical network are
127.0.0.0
interface) identified by the network ID, as all host on the same physical
network is assigned the same network ID. The network ID is
224.0.0.0 IP Multicast assigned based on the following rules:

Broadcast (sent to all interfaces on • The network ID cannot start with 127 because 127 belongs to
255.255.255.255 class A address and is reserved for internal loop-back
network)
functions.
• All bits of network ID set to 1 are reserved for use as an IP
broadcast address and therefore, cannot be used.
• All bits of network ID set to 0 are used to denote a specific
host on the local network and are not routed and therefore,
aren’t used.
IPv4 – Address Classes
Problems Wasted Unutilized

with Millions of class A address are wasted,


many of the class B address are wasted
Class D addresses are used for multicast
routing and are therefore available as a

Classful
single block only.

Addressing
Since there are these problems, Insufficient On hold
Classful networking was replaced Number of addresses available in class C is
by Classless Inter-Domain Routing Class E addresses are reserved.
so small that it cannot cater the needs of
(CIDR) in 1993
organizations
IPv4 Private Address (RFC 1597) Hosts using private addresses
are not reachable from the
Internet, but can communicate to
other peers inside the same
intranet (non-routable addresses)
Reservation of 3 blocks, each per network class, for private addresses

Hence, provide security. Routers


Class Start Address End Address Total IP addresses
would not deliver packets with
A 10.0.0.0 10.255.255.255 16,777,216 private IP addresses
B 172.16.0.0 172.31.255.255 1,048,576
C 192.168.0.0 192.168.255.255 65,536
The IP Network Address
Translator (NAT) (RFC 1631)
allows the private host to be
addressable in the Internet
• IP class, while using private address range, can be chosen as per the
size and requirement of the organization.
Free to use without anyone’s
• Larger organizations may choose class A private IP address range
permission
where smaller organizations may opt for class C.
Network Address Translation (NAT) Connecting a large number of
hosts to internet using a smaller
number of public (external) IP
address, thereby conserving IP
address space

Allows to use your own private IPv4


addressing system and prevent the
internal address changes if you
change the service provider

NAT is a processor and memory


resource consuming technology, since
NAT need to translate IPv4 addresses
for all incoming and outgoing IPv4
datagrams and to keep the translation
details in memory

Loss of end-device to end-device IP


traceability and may cause delay in
IPv4 communication
Subnet Mask
Hierarhical Addressing Scheme
Remember: IP address = 32-bits in length

It can be divided into 2 or 3 parts

Single IP address can contain information:


• Network + Host
• Network + Sub-Network + Host

8 bits 8 bits 8 bits 8 bits


Network Network Sub-Network Host
Hierarhical Addressing Scheme
Example

Given:

IP Address / Host: 192.168.1.152


Subnet Mask: 255.255.255.0

IP 192.168.1.152 11000000 10101000 00000001 10011000


ANDed
Mask 255.255.255.0 11111111 11111111 11111111 00000000

Network 192.168.1.0 11000000 10101000 0000001 00000000 Result

This way, the subnet mask helps extract the Network ID

Network ID : 192.168.1.0
Subnet Mask
What is it? Why computer need subnet mask?
• Every host on a network has IP
address and network mask
• Subnet mask looks like IP address
• It is 32-bit long, same as IPv4
address
• But they a different

How does computer A know, computer B is local and computer C is remote?


Subnet Mask
What does it look like?

In decimal In binary In shorthand


255.255.255.0 11111111.11111111.111111111.00000000 /24

Thus,
255.0.0.0 11111111.00000000.00000000.00000000 /8
255.255.0.0 11111111.11111111.00000000.00000000 /16

But subnet masks can


look like:
248.0.0.0 11111000.00000000.00000000.00000000 /5
255.255.240.0 11111111.11111111.11110000.00000000 /20
255.255.255.128 11111111.11111111.11111111.10000000 /25
Subnet Mask
Why computer need subnet A’s Subnet Mask 255.255.255.0
mask? A’s IP address 10.1.151.2
B’s IP address 10.1.151.3
C’s IP address 64.227.160.23

A’s Subnet Mask 11111111 11111111 11111111 00000000


A’s IP address 00001010 00000001 10010111 00000010
How does computer A know, B’s IP address 00001010 00000001 10010111 00000011
computer B is local and computer C is
C’s IP address 01000000 11100011 10100000 00010111
remote?
Network ID Host ID

• Computer A compare Computer B with the help of subnet mask.


• Both computer A and B share same Network ID, thus computer A know
computer B is local.
• Computer A and C do not share same Network ID, thus computer A know
computer C is on different network.
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.
Network id & subnet mask
Network ID
192.168.1.0
/24
11111111 . 11111111 . 111111111 . 00000000

255 . 255 . 255 .0


BINARY

https://www.youtube.com/watch?v=Fe4D9v1dIzo&list=PLHLt6zLQu53ZrsE2qUF_Vm8wVNpsbLVPZ&index=2
Subnetting
Twenty years from now, you’ll be more
disappointed by the things that you didn’t do
than by the ones you did do. Subnetting.

Explained Advantages Disadvantages


A subnet is a logical subdivision of The main purpose is to help relieve Increases Time complexity for
an IP Network. The practice of network congestion. packets to travel to proper subnet,
dividing a network into two or more It increases routing efficiency, more time required.
smaller networks is called enhances the security of the Cost of overall network increase,
subnetting network and easier maintenance on subnetting requires internal routers,
smaller networks. Switches, Hubs, Bridges etc
including experienced network
administrator.
Subnetting Huge network: 10.0.0.0/24.
All hosts on the network are in the same subnet,
which has following disadvantages:

• A single broadcast domain – all hosts are in the


same broadcast domain. A broadcast sent by any
device on the network will be processed by all hosts,
creating lots of unnecessary traffic.
• Network security – each device can reach any other
device on the network, which can present security
problems. For example, a server containing sensitive
information shouldn’t be in the same network as an
user workstation.
• Organizational problems – in a large networks,
different departments are usually grouped into
different subnets. For example, you can group all
devices from the Accounting department in the same
subnet and then give access to sensitive financial
data only to hosts from that subnet.
Subnetting
Subnet is created

• Two subnets were created for different departments:


10.0.0.0/24 for Accounting and 10.1.0.0/24 for
Marketing.
• Devices in each subnet are now in a different
broadcast domain. This will reduce the amount of
traffic flowing on the network
• Allow us to implement packet filtering on the router..
Imagine this:
Life is 10%
what One day your supervisor walks to you, saying:
Here is the network ID 192.168.4.0/24
happens
Please create three separate network for a coffee shop:
to you and Sakinah Café.

90% how One is for the office. One for the front desk and storage
you react room. One for public use.

to it. Your taks is to list each network ID, subnet mask, host
ID range, number or useable host IDs, and Broadcast ID.
IP Subnetting 192.168.4.0/24
# of usable
Network ID Subnet Mask Host ID Range Broadcast ID
Host
192.168.4.1
192.168.4.255
192.168.4.0 255.255.255.0 - 254
192.168.4.254

From the network ID given, we can derived the


Since the last host ID is used for broadcast, it
above information. How do you derive that?
left us with 254 usable host IDs.
Subnet mask (/24) is the key.

24 means all the first 24 bits in the address is


set to 1. The last 8 bits (4th octet) is the host ID.

MSB LSB
Binary 1 1 1 1 1 1 1 1
Powered by 27 26 25 24 23 22 21 20
Decimal 128 64 32 16 8 4 2 1 =255
IP Subnetting 192.168.4.0/24
Network ID Subnet Mask Host ID Range # of usable Broadcast ID
Host

192.168.4.0 255.255.255.0 192.168.4.1 254 192.168.4.255


-
192.168.4.254

Subnet Mask 11111111.11111111.11111111.00000000 255.255.255.0

Network ID 11000000.10101000.00000100.00000000 192.168.4.0

First Host ID 11000000.10101000.00000100.00000001 192.168.4.1

Last Host ID 11000000.10101000.00000100.11111110 192.168.4.254

Broadcast ID 11000000.10101000.00000100.11111111 192.168.4.255


IP Subnetting

One day your supervisor walks to you, saying:


Here is the network ID 192.168.4.0/24 192.168.4.0/24
Please create three separate network for a coffee Task : Create 3 new subnet
shop: Sakinah Café.
Find:
One is for the office. One for the front desk and 1. Subnet Mask ?
storage room. One for public use. 2. Network ID ?
3. Broadcast ID ?
Your taks is to list each network ID, subnet mask, 4. Host ID Range ?
host ID range, number or useable host IDs, and 5. # of usable Host ?
Broadcast ID.
IP Subnetting Table

Subnet 1 2 4 8 16 32 64 128 256

Host 256 128 64 32 16 8 4 2 1


Subnet
/24 /25 /26 /27 /28 /29 /30 /31 /32
Mask
IP Subnetting Table

You are required to get three subnets


Step 1: Search for the required subnet in the table and circle it.

Step 2: Derived information from the selected column


IP Subnetting Table

Original Network ID:


192.168.4.0/24

Network Subnet # of Usable


Host ID Range Broadcast ID
ID Mask Host

192.168.4.0 /26 192.168.4.1 – 192.168.4.62 62 192.168.4.63

192.168.4.64 /26 192.168.4.65 – 192.168.4.126 62 192.168.4.127

192.168.4.128 /26 192.168.4.129 – 192.168.4.190 62 192.168.4.191

192.168.4.192 /26 192.168.4.193 – 192.168.4.254 62 192.168.4.255

* subnet mask = 255.255.255.192


* 192 = 128 + 64
New Network ID:
192.168.4.0/26

Subnet Mask 11111111.11111111.11111111.11000000 255.255.255.192

Network ID 11000000.10101000.00000100.00000000 192.168.4.0

First Host ID 11000000.10101000.00000100.01000000 192.168.4.64

Last Host ID 11000000.10101000.00000100.10000000 192.168.4.128

192.168.4.192
Broadcast ID 11000000.10101000.00000100.11000000
Subnetting Excercise

192.168.0.0/24
Find:
1. Subnet Mask ?
2. Network ID ?
3. Broadcast ID ?
4. Host ID Range ?
5. # of usable Host ?
Subnetting Excercise

192.168.0.0/24
192.168.0.0/24
Subnet Mask / Netmask 255.255.255.0
Network ID 192.168.0.0
Broadcast ID 192.168.0.255
# usabale Hosts 254
Host Address Range 192.168.0.1 - 192.168.0.254

Subnet
11111111.11111111.11111111.00000000 255.255.255.0
Mask
Network
11000000.10101000.00000000.00000000 192.168.4.0
ID
First Host
11000000.10101000.00000000.00000001 192.168.4.1
ID
Last Host
11000000.10101000.00000000.11111110 192.168.4.254
ID
Broadcast 192.168.4.255
ID 11000000.10101000.00000000.11111111
Subnetting Excercise

192.168.0.0/25
Find:
1. Subnet Mask ?
2. Network ID ?
3. Broadcast ID ?
4. Host ID Range ?
5. # of usable Host ?
Subnetting Excercise

192.168.0.0/25
192.168.0.0/25
Subnet Mask 255.255.255.128
Network 192.168.0.0
Broadcast 192.168.0.127
# usable Hosts 126
Host Address Range 192.168.0.1 - 192.168.0.126

Subnet
11111111.11111111.11111111.10000000 255.255.255.128
Mask
Network ID 11000000.10101000.00000000.00000000 192.168.0.0

First Host
11000000.10101000.00000000.00000001 192.168.0.1
ID
Last Host
11000000.10101000.00000000.01111110 192.168.0.126
ID
Broadcast
11000000.10101000.00000000.01111111 192.168.0.127
ID
Terima kasih
Aiesa bin Saad
Bahagian Teknologi Maklumat
INSTUN
010-4401076
aiesa@instun.gov.my

You might also like