0% found this document useful (0 votes)
13 views

Lecture Slides - IP Addressing Part 1

Uploaded by

naidootheroshan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Lecture Slides - IP Addressing Part 1

Uploaded by

naidootheroshan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 79

IIP Addressing Lecture 01

History
Computer network is getting connected in Late 60’s.
In 1978 ISO (International Standard Organization) proposed a new model for
networking for easy access and understanding. Which is of 7 layers and known as
OSI (Open System Interface) model.
As the updatation in OSI model TCP/IP (Transmission Control Protocol/ Internet
Protocol) is developed and merged in 1st January 1983 with APRANET (The
Advanced Research Projects Agency Network).
The TCP/IP model have 4 layers which strictly follow the 7 layers of OSI model.
Introduction
The IP (Internet Protocol) is basically a unique address of any device by which the
device can communicate with other devices or communicate world wide in terms of
Internet.
There are two basic Types of IP address.
◦ IPv4 (IP version 4) (Earlier technology still used by 70% devices)
◦ IPv6 (IP version 6) (Newer version as the addresses range is about to complete of IPv4)
IPv4 (The address is divided into four parts each having 8 bits and separated by dotted
decimal point and usually written in decimal for easy understanding)
*We are learning only about IPv4 addressing here.
OSI model V/S TCP/IP model
OSI Model TCP/IP Model
1. Application Layer 1. Application Layer
2. Presentation Layer Telnet FTP DNS
3.Session Layer
4. Transportation Layer 2. Transport Layer
TCP UDP
5. Network Layer 3. Internet Layer
IP
6. Data link Layer 4. Host to Host network
7. Physical Layer LAN X.25
IP addressing Basic class ful
addressing
An IP address basically a 32-bit address that uniquely universally defines
connection of host or a router to the Internet. IP address is unique.
Address space of IPv4 is 232 .
Introduced by IANA (Internet Assigned Numbers Authority).
32 bit is divided into 4 equal parts of 8-8 bits separated by dotted decimal notation.
It is in the range of minimum 0.0.0.0 to 255.255.255.255.
Each 8 bit group is known by OCTET.
Ip address
Introduction: A device on the network needs an ip
(internet protocol) to communicate with each
other devices
Ip adders is a 32-bit logical adders written in dotted
decimal
Ip address is a unique number assigned to any device
operating on ip network
Used to identify device on a network
Ip addressing concept
Ip address

The address granted to computers is divided into


two categories
Dynamic ip addresses: Dynamic ip address are assigned
to the devices that require temporary connectivity to the
network
Dhcp protocol used to assigning ip address to computer on
lease time basis
Static ip address: Static ip address are assign to
devices on the network whose existence in the
network remains a longer duration
Introduction
 You can probably work with decimal
numbers much easier than with the
binary numbers needed by the
computer.
 Working with binary numbers is time-
consuming & error-prone.

3
Octets
 The 32-bit IP address is broken up into
4 octets, which are arranged into a
dotted-decimal notation scheme.
 An octet is a set of 8 bits & not a
musical instrument.
 Example of an IP version 4:
172.64.126.52

4
Thinking in Binary
 The binary system uses only 2
values “0 & 1” to represent
numbers in positions representing
increasing powers of 2.
 We all are accustomed to thinking
& working in the decimal system,
which is based on the number 10.

5
Thinking in Binary (Cont.)
 To most humans, the number 124
represents 100 + 20 + 4.
 To the computer, this number is
1111100, which is 64 (26) + 32 (25)
+ 16 (24) + 8 (23) + 4 (22) + 0 + 0

6
 Each position in a binary number
represents, right to left, a power of
two beginning with 20 & increasing
by one power as it moves left: 20,
21, 22, 24, etc.

Peter Smith
7
Converting to Decimal
 You’ll need to convert binary to
decimal & vice versa to compute
subnets & hosts.
 So, it’s time for a quick review lesson
in binary-to-decimal conversion.
 There are 8 bits in an octet & each bit
can only be a 1 or a 0.

Peter Smith
8
Converting to Decimal (Cont.)
 What then do you suppose is the largest
decimal number that can be expressed
in an octet?
Eight 1’s (1111 1111)

Peter Smith
9
Converting to Decimal (Cont.)
 Now, for double the money, what is its
equivalent decimal value?
27 26 25 24 23 22 21 20
1 1 1 1 1 1 1 1
128 64 32 16 8 4 2 1

The binary number 1111 1111 converts into the


decimal number:
128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255

Peter Smith
10
Converting to Decimal (Cont.)
 Therefore, the largest decimal number
that can be stored in an IP address octet
is 255.
 The significance of this should become
evident later in this presentation.

Peter Smith
11
IP Address

•IP Address is a Logical Address


•It is a Network Layer address (Layer 3)
•Two Versions of IP:
−IP version 4 is a 32 bit address
−IP version 6 is a 128 bit address
IP version 4
•Bit is represent by 0 or 1 (i.e. Binary)
•IP address in binary form (32 bits):
01010101000001011011111100000001
•32 bits are divided into 4 Octets:
First Octet Second Octet Third Octet Forth Octet

01010101. 00000101. 10111111. 00000001


•IP address in decimal form:
85.5.191.1
IPv4 address range

Taking Example for First Octet :


Total 8 bits, Value will be 0’s and 1’s
i.e. 2⁸ = 256 combination
27 26 25 24 23 22 21 20
0 0 0 0 0 0 0 0 = 0
0 0 0 0 0 0 0 1 = 1
0 0 0 0 0 0 1 0 = 2
0 0 0 0 0 0 1 1 = 3
0 0 0 0 0 1 0 0 = 4 Total IP Address Range
0.0.0.0
to
1 1 1 1 1 1 1 1 = 255 255.255.255.255
Binary to Decimal

128 64 32 16 8 4 2 1 Answer
1 1 0 0 0 0 0 0 192

0 0 0 0 1 0 1 0 10
1 0 1 0 1 0 0 0 168

1 0 1 0 1 1 0 0 172

0 0 0 1 0 0 0 0 16
Decimal to Binary

Decimal 128 64 32 16 8 4 2 1

18 0 0 0 1 0 0 1 0

152 1 0 0 1 1 0 0 0

200 1 1 0 0 1 0 0 0

15 0 0 0 0 1 1 1 1

240 1 1 1 1 0 0 0 0
Types of ip address
Ip address divided into
Class A
Class B
Class C
Class D
Class E
Class A addressing

Class A consists of 8-bit network id


24-bit host id
each network in Class a will have 224-2 numbers of host
(ip) address
Class a be divided into 128 network blokes
Address start from 0.0.0.0 to 0.255.255.255
Class a provides 16,777216 host address
Class A address stretcher
Class B addressing
Class b addresses consists of 16-bit network and 16-bit
host
So each network in class b will have 216-2 number of host
address
Class b contain 16,384 network blocks
Start 128.0.0.0 to 128.0.255.255
65,536 host address
Class B address structure
Class c addressing

Class c addresses consists of 24 bit network ID


So each network in class c will have 28-2 number of
host(ip)
Class c consists of 2,097,152 network blocks
Start from 192.0.0.0 to 192.0.0.255
256 host addresses
Class C address Structure
Designed for multicasting
Consists of one block address

Designed for special purpose


Adders Classes
IP Address Classes
 IP addresses are divided into 5 classes,
each of which is designated with the
alphabetic letters A to E.
 Class D addresses are used for
multicasting.
 Class E addresses are reserved for
testing & some mysterious future use.

Peter Smith
12
IP Address Classes (Cont.)
 The 5 IP classes are split up based on
the value in the 1st octet:

Peter Smith
13
IP Address Classes (Cont.)
 Using the ranges, you can determine the
class of an address from its 1st octet
value.
 An address beginning with 120 is a
Class A address, 155 is a Class B
address & 220 is a Class C address.

Peter Smith
14
Are You the Host or the
Network?
 The 32 bits of the IP address are divided into
Network & Host portions, with the octets
assigned as a part of one or the other.
Network & Host Representation
By IP Address Class
Class Octet1 Octet2 Octet3 Octet4

Class A Network Host Host Host

Class B Network Network Host Host

Class C Network Network Network Host

Peter Smith
15
Are You the Host or the
Network? (Cont.)
 Each Network is assigned a network
address & every device or interface
(such as a router port) on the network is
assigned a host address.
 There are only 2 specific rules that
govern the value of the address.

Peter Smith
16
Are You the Host or the
Network? (Cont.)
 A host address cannot be designated by
all zeros or all ones.
 These are special addresses that are
reserved for special purposes.

Peter Smith
17
Class A Addresses
 Class A IP addresses use the 1st 8 bits
(1st Octet) to designate the Network
address.
 The 1st bit which is always a 0, is used
to indicate the address as a Class A
address & the remaining 7 bits are used
to designate the Network.
 The other 3 octets contain the Host
address.
Peter Smith
18
Class A Addresses (Cont.)
 There are 128 Class A Network
Addresses, but because addresses with
all zeros aren’t used & address 127 is a
special purpose address, 126 Class A
Networks are available.

Peter Smith
19
Class A Addresses (Cont.)
 There are 16,777,214 Host addresses
available in a Class A address.
 Rather than remembering this number
exactly, you can use the following formula to
compute the number of hosts available in any
of the class addresses, where “n” represents
the number of bits in the host portion:
(2n – 2) = Number of available hosts

Peter Smith
20
Class A Addresses (Cont.)
 For a Class A network, there are:
224 – 2 or 16,777,214 hosts.
 Half of all IP addresses are Class A
addresses.
 You can use the same formula to determine
the number of Networks in an address class.
 Eg., a Class A address uses 7 bits to
designate the network, so (27 – 2) = 126 or
there can be 126 Class A Networks.
Peter Smith
21
Class B IP Addresses
 Class B addresses use the 1st 16 bits
(two octets) for the Network address.
 The last 2 octets are used for the Host
address.
 The 1st 2 bit, which are always 10,
designate the address as a Class B
address & 14 bits are used to designate
the Network. This leaves 16 bits (two
octets) to designate the Hosts.
Peter Smith
22
Class B IP Addresses (Cont.)
 So how many Class B Networks can
there be?
 Using our formula, (214 – 2), there can
be 16,382 Class B Networks & each
Network can have (216 – 2) Hosts, or
65,534 Hosts.

Peter Smith
23
Class C IP Addresses
 Class C addresses use the 1st 24 bits
(three octets) for the Network address
& only the last octet for Host
addresses.the 1st 3 bits of all class C
addresses are set to 110, leaving 21 bits
for the Network address, which means
there can be 2,097,150 (221 – 2) Class C
Networks, but only 254 (28 – 2) Hosts
per Network.
Peter Smith
24
Class C IP Addresses (Cont.)

Peter Smith
25
Special Addresses
 A few addresses are set aside for
specific purposes.
 Network addresses that are all binary
zeros, all binary ones & Network
addresses beginning with 127 are
special Network addresses.

Peter Smith
26
Special Addresses (Cont.)

Peter Smith
27
Special Addresses (Cont.)
 Within each address class is a set of
addresses that are set aside for use in
local networks sitting behind a firewall
or NAT (Network Address Translation)
device or Networks not connected to
the Internet.

Peter Smith
28
Special Addresses (Cont.)
 A list of these addresses for each IP
address class:

Peter Smith
29
IP Address Classification

IP address are divided into 5 Classes

•CLASS A

•CLASS B Used in LAN & WAN


•CLASS C

•CLASS D Reserved for Multicasting

•CLASS E Reserved for Research & Development


Priority Bit

•Priority Bit is used for IP Address classification.


•Most significant bit(s) from the first octet are selected for Priority Bit(s).
•Class A priority bit is 0
•Class B priority bits are 10
•Class C priority bits are 110
•Class D priority bits are 1110
•Class E priority bits are 1111
Class A Range

•In Class A : First bit of the first octet is reserved as priority bit, bit value is zero.
•0xxxxxxx. xxxxxxxx. xxxxxxxx. Xxxxxxxx

27 26 25 24 2 3 22 21 20
0 0 0 0 0 0 0 0 = 0
0 0 0 0 0 0 0 1 = 1
0 0 0 0 0 0 1 0 = 2
0 0 0 0 0 0 1 1 = 3
0 0 0 0 0 1 0 0 = 4 Class A Range
0 . 0 . 0 . 0 to
127 . 255 . 255 .255

0 1 1 1 1 1 1 1 = 127
Class B Range

•In Class B : First two bits of the first octet are reserved as priority bits, bit value as 10.
•10xxxxxx. xxxxxxxx. xxxxxxxx. xxxxxxxx
27 26 25 24 23 22 21 20
1 0 0 0 0 0 0 0 = 128
1 0 0 0 0 0 0 1 = 129
1 0 0 0 0 0 1 0 = 130
1 0 0 0 0 0 1 1 = 131
1 0 0 0 0 1 0 0 = 132
Class B Range
128 . 0 . 0 . 0 to
1 0 1 1 1 1 1 1 = 191 191 . 255 . 255 .255
Class C Range

•In Class C : First three bits of the first octet are reserved as priority bits, bit value as 110.
•110xxxxx. xxxxxxxx. xxxxxxxx. Xxxxxxxx
27 26 25 24 23 22 21 20
1 1 0 0 0 0 0 0 = 192
1 1 0 0 0 0 0 1 = 193
1 1 0 0 0 0 1 0 = 194
1 1 0 0 0 0 1 1 = 195
1 1 0 0 0 1 0 0 = 196
Class C Range
192 . 0 . 0 . 0 to
1 1 0 1 1 1 1 1 = 223 223 . 255 . 255 .255
Class D Range

•In Class D : First four bits of the first octet are reserved as priority bits, bit value as 1110.
•1110xxxx. xxxxxxxx. xxxxxxxx. xxxxxxxx
27 26 25 24 23 22 21 20
1 1 1 0 0 0 0 0 = 224
1 1 1 0 0 0 0 1 = 225
1 1 1 0 0 0 1 0 = 226
1 1 1 0 0 0 1 1 = 227
1 1 1 0 0 1 0 0 = 228
Class D Range
224 . 0 . 0 . 0 to
1 1 1 0 1 1 1 1 = 239 239 . 255 . 255 .255
Class E Range

•In Class E : First four bits of the first octet are reserved as priority bits, bit value as 1111.
•1111xxxx. xxxxxxxx. xxxxxxxx. xxxxxxxx
27 26 25 24 23 22 21 20
1 1 1 1 0 0 0 0 = 240
1 1 1 1 0 0 0 1 = 241
1 1 1 1 0 0 1 0 = 242
1 1 1 1 0 0 1 1 = 243
1 1 1 1 0 1 0 0 = 244
Class E Range
240 . 0 . 0 . 0 to
1 1 1 1 1 1 1 1 = 255 255 . 255 . 255 .255
Ranges

Class A Range Class B Range Class C Range


0 . 0 . 0 . 0 to 128 . 0 . 0 . 0 to 192 . 0 . 0 . 0 to
127.255.255.255 191.255.255.255 223 . 255 . 255 .255

Class D Range Class E Range


224 . 0 . 0 . 0 to 240 . 0 . 0 . 0 to
239 . 255 . 255 .255 255 . 255 . 255 .255
Octet Format

•IP address is divided into Network & Host Portion

−CLASS A is written as N.H.H.H

−CLASS B is written as N.N.H.H

−CLASS C is written as N.N.N.H


CLASS A – No. Networks & Hosts

•Class A Octet Format is N.H.H.H


Network bits : 8 Host bits : 24
•No. of Networks
= 2no of network bits– Priority bit
= 28-1 (-1 is Priority Bit for Class A)
= 27
= 128 – 2 (-2 is for 0 & 127 Network)
= 126 Networks

•No. of Host
= 2no of host bits -2
= 224 – 2 (-2 is for Network ID & Broadcast ID)
= 16777216 - 2
= 16777214 Hosts/Network
CLASS B – No. Networks & Hosts

•Class B Octet Format is N.N.H.H


Network bits : 16 Host bits : 16
•No. of Networks
= 2no of network bits– Priority bit
= 216-2 (-2 is Priority Bit for Class B)
= 214
= 16384 Networks

•No. of Host
= 2no of host bits -2
= 216 – 2 (-2 is for Network ID & Broadcast ID)
= 65536 - 2
= 65534 Hosts/Network
CLASS C – No. Networks & Hosts

•Class C Octet Format is N.N.N.H


Network bits : 24 Host bits : 8
•No. of Networks
= 2no of network bits– Priority bit
= 224-3 (-3 is Priority Bit for Class C)
= 221
= 2097152 Networks

•No. of Host
= 2no of host bits -2
= 28 – 2 (-2 is for Network ID & Broadcast ID)
= 256 - 2
= 254 Hosts/Network
Network & Broadcast Address

•Network address: This is the address that identifies the subnet of a host.
•Broadcast address: An IP Address that allows information to be sent to all machines on a given
subnet rather than a specific machine.
•Valid IP Addresses lie between the Network Address and the Broadcast Address.
•Only Valid IP Addresses are assigned to hosts/clients
Example - Class A

•Class A : N.H.H.H
−Network Address :
0xxxxxxx.00000000.00000000.00000000
−Broadcast Address :
0xxxxxxx.11111111.11111111.11111111

Class A Network Address


10.0.0.0
10.0.0.1
10.0.0.2
10.0.0.3 Valid IP Addresses

10.255.255.254
10.255.255.255 Broadcast Address
Example - Class B

•Class B : N.N.H.H
−Network Address :
10xxxxxx.xxxxxxxx.00000000.00000000
−Broadcast Address :
10xxxxxx.xxxxxxxx.11111111.11111111

Class B
172.16.0.0 Network Address
172.16.0.1
172.16.0.2
172.16.0.3
Valid IP Addresses

172.16.255.254
172.16.255.255 Broadcast Address
Example - Class C

•Class C : N.N.N.H
−Network Address :
110xxxxx.xxxxxxxx.xxxxxxxx.00000000
−Broadcast Address :
110xxxxx.xxxxxxxx.xxxxxxxx.11111111

Class C
192.168.1.0 Network Address
192.168.1.1
192.168.1.2
192.168.1.3
Valid IP Addresses

192.168.1.254
192.168.1.255 Broadcast Address
Private IP Address

•There are certain addresses in each class of IP address that are reserved for Private
Networks. These addresses are called private addresses.
•These addresses are not Routable (or) valid on Internet.

Class A
10.0.0.0 to 10.255.255.255

Class B
172.16.0.0 to 172.31.255.255

Class C
192.168.0.0 to 192.168.255.255
Various IP classes
IP has five different classes differentiated by characteristics.
◦ Class-A ranges from 0 to 127
◦ Class-B ranges from 128 to 191
◦ Class-C ranges from 192 to 223
◦ Class-D ranges from 224 to 239
◦ Class-E ranges from 240 to 255
First Octet is defines the class of particular IP e.g. - 128.11.3.31 is follow in class –B
127.0.0.0 to 127.255.255.255 is a range of look back IP.
IP Classes (Contd.)
Official Method to find the class of particular IP.
Check the first octet, Convert it to Binary, then
If, 1st bit is 0 then it comes to class A, If 1st bit is 1 and 2nd bit is 0 then it comes to class B, If 1st
two bit is 1 and 3rd bit is 0 then it comes to class C. If 1st three bits are 1and 4th bit is 0 then it
comes to class D and if all 4 bits are 1 then it comes to class E.
bit # 0 1 7 8 31

Class A 0 bit # 0 1 2 3 4 31
Network Prefix Host Number
8 bits 24 bits
Class D 1110 multicast group id
bit # 0 1 2 15 16 31

Class B 10 network id host

Network Prefix Host Number


16 bits 16 bits
bit # 0 1 2 3 4 5 31

bit # 0 1 2 3 23 24 31 Class E 11110 (reserved for future use)


Class C 110 network id host

Network Prefix Host Number


24 bits 8 bits
Classes of IP addresses
Class-A
This IP ranges from 0 to 126 Decimal value in first octet. And 1st octet defines network part
and remaining three octet defines the Host part. It patterns like this NHHH (N-Network; H-
Host).
First 8bits defines network and remaining 24 bits defines host parts.
It has a highest nos. of address 231 .which is about 16,277,216.
It is denoted by IP/8.
Private Network IP ranges from 10.0.0.0 to 10.255.255.255. in general formation of 10.0.0.0/8
Class B
This IP ranges from 128 to 191 Decimal value in first octet. And 1st two bit defines network
part and remaining two octet defines the Host part. It patterns like this NNHH (N-Network;
H-Host).
First 16 bits defines network and remaining 16 bits defines host parts.
It has a highest nos. of address 230 .which is about 65,536.
It is denoted by IP/16.
Private Network IP ranges from 172.16.0.0 to 172.31.255.255. in general formation of
172.16.0.0/12
Class C
This IP ranges from 192 to 223 Decimal value in first octet. And 1st three bit defines network
part and remaining one octet defines the Host part. It patterns like this NNNH (N-Network;
H-Host).
First 24 bits defines network and remaining 8 bits defines host parts.
It has a highest nos. of address 229 .which is about 256.
It is denoted by IP/24.
Private Network IP ranges from 192.168.0.0 to 192.168.255.255. in general formation of
192.168.0.0/16.
Class-D
This IP ranges from 224 to 239 Decimal value in first octet.
It is not usually use in general applications.
It is use in Special purpose applications known as Multicast.
Class-E
This IP ranges from 240 to 255 Decimal value in first octet.
It is not usually use in general applications.
It is reserved range of IP by R & D (Research and Development) department.
Usually, Class-A to C is supported by PC and Class-D and E is not supported.
Ip version 6 Address
Ip v6 is latest version addressing128 bit(64 network,64
hosts bits)
Differences between ipv4 and ipv6

IP v4 IP V6
32 bit address 128 bit address
Represent in decimal Represent in hexadecimal
Support 232 address Support 2128 address
Ipv4 header does not identify Better support forQos
packet flow for Qos handling by
routers
Header include checksum Header does not include
checksum
Ping (packet internet Groper)
Ping tool is used by computers network to test whether
the intended host is reachable a cross the ip network

Ping implements the ICMP echo request packets to


identify whether the intended host is present on
network and is active
Use ping
 Click start > Run
 Type cmd
Ping – adders
Tracert
Trace rt is also referred as trace route tracert tool is used
by windows os to increase the time to live(ttl)value of
data packets sent
Start > run> cmd type tracert ip
Ip config
(Internet protocol configuration)In computing, ipconfig
(internet protocol configuration) in Microsoft
Windows is a console application that displays all
current TCP/IP network configuration values and can
modify Dynamic Host Configuration Protocol DHCP
and Domain Name System DNS settings.[1]
In most cases, the ipconfig command is used with the
command-line switch /all. This results in more detailed
information than ipconfig alone
Ip config
Start>
run>cmd
Type ip
config
\all

You might also like