0% found this document useful (0 votes)
11 views51 pages

Lecture 10

The lecture covers various types of addresses used in networking, including physical, logical, and port addresses, with a focus on IPv4 and its addressing classes. It discusses the limitations of classful addressing and introduces concepts such as subnetting and classless addressing to manage IP address allocation more efficiently. Special IPv4 addresses and the distinction between public and private addresses are also explained, along with the role of ISPs and ICANN in IP address allocation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views51 pages

Lecture 10

The lecture covers various types of addresses used in networking, including physical, logical, and port addresses, with a focus on IPv4 and its addressing classes. It discusses the limitations of classful addressing and introduces concepts such as subnetting and classless addressing to manage IP address allocation more efficiently. Special IPv4 addresses and the distinction between public and private addresses are also explained, along with the role of ISPs and ICANN in IP address allocation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

Addressing in a network

Lecture 01

Shashika Lokuliyana,M.Sc. (IT) SLIIT, B.Sc.(Sp.) Hons in IT (Spec. in CSN) (SLIIT), MIEEE, MCSSL
Lecturer
Department of Information Systems Engineering , Faculty of Computing
E: [email protected]
Today’s lecture overview
§ Types of addresses used in the Internet.
q Physical Addresses.
q Logical Addresses.
q Port Addresses.
§ IPv4.
§ Classful Addressing.
§ Subnetting.
§ Classless Addressing.
Classification of Addresses used in
Networks

Addresses

Physical Logical Port


Addresses Addresses Addresses
Physical Addresses
§ Remember the things we discussed in lecture 5 – ISO OSI
model regarding physical addresses.
Physical Addresses
Things to remember…
§ 48 bits long (i.e. 6 bytes).

§ Universally unique.

§ Hardcoded to the NIC at the manufacturing time and cannot be


changed by the user.
§ Usually represented by Hexadecimal format,
AC-72-89-E9-1A-42
§ Commonly referred to as MAC addresses.

§ Used in the Data Link Layer (i.e. LLC sublayer) of the OSI model.
Viewing the Physical Address
§ You can issue the command ipconfig /all in command
prompt of Windows to view your MAC address.
Port Addresses
§ We also discussed about port addresses in lecture 5 – ISO
OSI model.

§ Things to remember on port addresses,


q16 bits long (i.e. 2 bytes).
qAn integer number ranging from 0 to 65535.
qUsed to identify the process (i.e. the application to which the
message is destined to).
qUsed in the Transport Layer of the OSI model.
Logical Addresses
Logical Addresses
§ Logical addresses are more commonly referred to as IP addresses.

§ Logical addresses are used in the Network Layer of the OSI model.

§ Any computer (which we will call host hereafter) or router connected to


Internet should have a unique IP address.

§ IP Address is how we uniquely identify any host connected to internet.

§ IP address is configurable. I.e. user can change/configure it manually.


IP Address Versions
§ There are two major versions of IP addresses.

IPv4
IP
Addresses
IPv6
§ IP version 4 (IPv4) address is 32 bits long (i.e. 4 bytes).

§ IP version 6 (IPv6) address is 128 bits long (i.e. 16 bytes).


IPv4
IP version 4 (IPv4)
§ IPv4, still is the most widely used version of IP addresses in the
Internet.

§ Internet is slowly migrating to IPv6 as we speak.

§ Since we are still in the transition stage from IPv4 to IPv6, it is


important that we have a thorough understanding of IPv4 and it’s
limitations that led to the introduction of IPv6.

§ To start-off, let’s look at the standard way in which we write an


IPv4 address.
Dotted Decimal Notation
Exercise
Change the following IP addresses from binary notation to
dotted decimal notation.

10000001 00001011 00001011 11101111


Exercise
Change the following IP addresses from dotted decimal
notation to binary notation.

111.56.45.78
Exercise
Find the error, if any, in the following IP address:

111.56.045.78
Classful Addressing
§ When IP addressing was first introduced, all IPv4 addresses
were divided into 5 classes.
Class Usage
Class A General purpose
Class B General purpose
Class C General purpose
Class D Multicasting
Class E Reserved for future use
Finding the class in binary notation
Exercise
Find the class :

00000001 00001011 00001011 11101111


Finding the class in decimal notation
Exercise
Find the class of each address:

227.12.14.87
Network ID (aka Net ID) and Host ID
§ When an organization reserves a set of IP addresses from
their ISP (Internet Service Provider) to use for the hosts
used within that organization, each IP address consist of two
parts.

Network ID Host ID

This will identify the


organization and will be This part will be unique to each
common in all the hosts within host
that organization
Net ID and Host ID cont.
§ To accommodate the above need, the three general purpose
IPv4 address classes (i.e. Class A, B and C) are allocated as
shown below.
Class A
§ Consider the situation where a class A address is reserved for a
particular organization.

§ With a class A address we can go up to 224 host addresses (i.e. 3


bytes for host ID). This means the organization is getting
16777216 host addresses with a class A address.

§ However, we know that it will be an extremely rare situation,


where a single organization is occupying so many computers.

§ Hence, when reserving class A addresses, millions of addresses


are unused and wasted.
Class B
§ Now consider the situation where a class B address is reserved
for a particular organization.

§ There are 2 bytes reserved for the host ID and hence, there are
216 = 65536 addresses for the organization to use in their hosts.

§ Again it is rare to have an organization which will occupy such a


high number of computers.

§ Hence, when reserving class B addresses, many addresses are


unused and wasted.
Class C
§ Finally, consider the situation where a class C address is reserved
for an organization.

§ With class C, we get only 1 byte for the host ID. Hence we can go
up to 28 = 256 host addresses.

§ However, for a fairly large organization this will not be enough.


They will have more than 256 computers which need IP
addresses.

§ Hence, the number of addresses in class C is smaller than the


needs of most organizations.
Class A, B and C Summary
Class Number of Number of
Networks Hosts Per
Network
A 128 16777216
B 16384 65536
C 2097152 256
Exercise
Given the network address 220.34.76.0, find the class, the net
ID, and the range of the addresses.
Masking Concept
§ When we look at a classful IP address, we can easily say to which
class that IP address is belonging to and there by what is the net
ID of that IP address.

§ Finding the net ID is extremely important since net ID is used by


routers to route the packets from one LAN to another LAN over
the Internet (Remember routers are used to interconnect LANs).

§ Each LAN is owned by a particular organization, and the net ID


is what differentiates one LAN from another in Internet terms.
Masking Concept cont.
§ Although we humans can easily interpret the net ID of a
given classful IP address, how does a router calculate the net
ID?

§ For this we use the concept of masking.


Bitwise AND operation i.e. the Net ID
Default Masks

Mask in
Mask in dotted
Class Mask in binary slash (/)
decimal
notation
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


Exercises
§ Given the address 23.56.7.91, find the network address.
Special IPv4 Addresses
§ As shown in the below table, some IPv4 addresses are used
for special purposes.
Special IPv4 Addresses cont.
Network Address

§ We already discussed what network address is and how a


router finds the network address by ANDing the given IP
address with the mask.
Special IPv4 Addresses cont.
Direct Broadcast Address (aka Broadcast Address)

§ This is also commonly referred to as the broadcast address of the


given network.
Special IPv4 Addresses cont.
Limited Broadcast Address
Special IPv4 Addresses cont.
Loopback Address

§ The most widely used loopback address is 127.0.0.1


Public Addresses vs. Private Addresses
§ Internet is a public network and no two machines connected to
the internet can have the same IP address.

§ Therefore, the IP addresses we use for machines that are directly


connected to the Internet are called Public IP Addresses.

§ However, in some organizations, the computers may not be


directly connected to the Internet. In this case, these computers
will be assigned Private IP Addresses.

§ The important thing is to understand, why use such a separation?


Why Public and Private Addresses?
Can use the same
Uses Private private addresses
Addresses in both LANs

LAN 1 LAN 2

Need to convert the


Private Addresses to
Public Addresses
when sending to
Internet
Internet Uses Public
Addresses
IPv4 Private Address Ranges
§ In IPv4, class A, B and C, following ranges are reserved to be
used in Local Area Networks for private addresses.

§ Remember:
q You cannot use these ranges for machines/interfaces that are directly
connected to Internet.
Problems with Classful Addressing
§ Class A and B are too large for typical organizations and many IP
addresses will not be used and wasted.

§ Class C is not enough for most organizations resulting the reservation


of at least a Class B address range for the organization.

§ The end result is that, the available IP addresses are depleting at an


alarming rate and soon there will be no more IP addresses.

§ Solutions:
q Short Term:
Ø Subnetting
Ø Classless Addressing
q Long Term: IPv6
Subnetting
§ Subnetting is one way of saving IP addresses. To understand
subnetting let’s take the following scenario.

Example
qA large organization has three departments. Namely, Finance,
Engineering and Sales.
qEach department has 500 computers.
qThe network administrators have finalized to keep the three
departments in three separate LANs for ease of administration.

§ What if we use classful addressing?


Subnet Mask
Classless Addressing
§ Classless addressing is often confused with subnetting.

§ Remember that in subnetting,


qA classful address is chosen.
qThis classful address is further sub-divided into subnetworks.

§ In classless addressing there is no concept of classes at all.


Format of a Classless Address

§ This format is also known as Classless Inter


Domain Routing (CIDR) notation.
Prefix Length - /n
§ As said earlier, in classless addressing, there is no concept of
classes.

§ Therefore, how do we identify which part of the IP address is


the network address and which part is the host address?

§ This is where prefix length is used.

Network Address Host Address

Prefix Length - /n
All possible /n s

Classful addressing is a special case of


classless addressing.
Exercises
§ What is the first host address in the block if one of the addresses
is 167.199.170.82/27?

§ What is the first host address in the block if one of the addresses
is 140.120.84.24/20?

§ Find the number of host addresses in the block if one of the


addresses is 140.120.84.24/20.

§ Find the last host address in the block if one of the addresses is
140.120.84.24/20.
Exercises
§ If one of the addresses is 190.87.140.202/29,
qWhat is the network address?
qWhat is the first host address?
qWhat is the last host address?

§ This example will show you that,


In classless addressing, the last address
in the block does not necessarily end in
255.
Address Allocation
Who allocates IP addresses?

§ Who has the authority to provide you an IP address?

§ Answer: Internet Service Provider (e.g. Sri Lanka Telecom).

§ Who has the authority to reserve IP addresses to each ISP?

§ Answer: A global authority called the Internet Corporation


for Assigned Names and Addresses (ICANN).

You might also like