Classes of IP addresses

Download Report

Transcript Classes of IP addresses

4/10/2015
S K SATAPATHY
THIS TOPIC WILL COVER IN EIGHT PHASES.
1. INTRODUCTION
2. NECESSITY
3. DEFINITION
4. CLASSES OF IP ADDRESS
5. PUBLIC AND PRIVATE IP ADDRESS
6. SUBNETTING
7. TYPES OF SUBNETTING
8.4/10/2015
SUM-UP
S K SATAPATHY
INTRODUCTION OF IP
IP (Internet Protocol) is a routed protocol and it is working in
layer-3(network layer).The routed protocols will be
encapsulated data in the form of packets and is send out from
the source to destination using best path that is given by the
routing protocols.The routing protocols are used in
routers(layer-3) .
There are two types of IP Addressing
1. IP Version4
2. IP Version6
4/10/2015
S K SATAPATHY
OR
An IP address consists of four so-called octets separated by dots. The
octet is a binary number of eight digits, which equals the decimal
numbers from 0 to 255. To make IP addresses more easy to read and
write, they are often expressed as four decimal numbers, each separated
by a dot. This format is called "dotted-decimal notation".
In a local area network based on TCP/IP, an IP address must be
assigned to each host (computer or device) in the network. The IP
address must be unique to each host.
4/10/2015
S K SATAPATHY
Every computer system and device connected to the Internet is
located by an IP address. The current system of distributing IP
addresses is called IPv4. This system assigns each computer a
32-bit numeric address, such as 120.121.123.124. However,
with the growth of computers connected to the Internet, the
number of available IP addresses are predicted to run out in
only a few years. This is why IPv6 was introduced.
IPv6, also called IPng (or IP Next Generation), is the next
planned version of the IP address system. While IPv4 uses 32bit addresses, IPv6 uses 128-bit addresses, which increases
the number of possible addresses by an exponential amount.
For example, IPv4 allows 4,294,967,296 addresses to be used
(2^32).
IPv6
allows
for
over
340,000,000,000,000,000,000,000,000,000,000,000,000
IP
addresses. That should be enough to last awhile.
4/10/2015
S K SATAPATHY
Because IPv6 allows for substantially more IP addresses than IPv4, the
addresses themselves are more complex. They are typically written in this
format:
hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh
Each "hhhh" section consists of a four-digit hexadecimal number, which
means each digit can be from 0 to 9 and from A to F. An example IPv6
address may look like this:
F704:0000:0000:0000:3458:79A2:D08B:4320
Because IPv6 addresses are so complex, the new system also adds extra
security to computers connected to the Internet. Since there are so may IP
address possibilities, it is nearly impossible to guess the IP address of
another computer. While most computer systems today support IPv6, the new
Internet procotol has yet to be fully implemented. During this transitional
process, computers are often assigned both an IPv4 and an IPv6 address. By
2008, the U.S. government has mandated that all government systems use
IPv6 addresses, which should help move the transition along.
4/10/2015
S K SATAPATHY
WHEN WE ARE CONNECTING TWO OR MORE
COMPUTERS TOGETHER , THEN THEY CAN
COMMUNICATE EACH OTHER BY USING IP ADDRESS
ON EACH MACHINE.THEY CAN NOT COMMUNICATE BY
USING PHYSICAL ADDRESS. THE ARP (ADDRESS
RESOLUTION PROTOCOL) WILL CONVERT THIS IP
ADDRESS (LOGICAL ADDRESS) IN TO MAC ADDRESS
(PHYSICAL ADDRESS).THE IP ADDRESS IS A SOFTWARE
ADDRESS NOT HARDWARE ADDRESS.
PC 1
10.0.0.1
4/10/2015
SWITCH
S K SATAPATHY
PC2
10.0.0.2
Definition of IP Version4
It is a 32 bit binary number divided in to 4 octets ,per octets 8 bits and
converted in to decimal form.The IP address is a logical address which is
used to assign each and evey pc on a network.
OCTET 1
8 BIT
OCTET 2
8BIT
OCTET 3
OCTET 4
8 BIT
8 BIT
IP Version6
It is in hexadecimal form and it is 128 bit address. This version is currently
implemented.
4/10/2015
S K SATAPATHY
Classes of IP addresses
In order to provide the flexibility required to support differently
sized networks, IP addresses come in three classes, A, B, and C.
Every class fixes the boundary between the network portion and
the host portion of the IP address at a different point. This makes
them appropriate for different size networks.
Class C addresses allow 254 hosts per network and are typically used by
smaller and middle-sized companies. Class B networks allow a maximum of
16,384 hosts, while Class A networks allow more than 16 million hosts. As a
consequence, Class A networks are only used by really large organisations.
Calculating the number of possible hosts requires a closer look at the IP
classes in their binary form. (The binary system is a base-2 number system,
just like the base-10 number system is known as the decimal number
system). It is done as follows:
4/10/2015
S K SATAPATHY
In a Class C network only the last octet is used to designate the hosts. The
maximum decimal number that you can write using eight bits is 256 (28).
The host calculation now requires that 2 is subtracted, because two host
addresses must be reserved for a network address and a broadcast
address (for a further explanation of network and broadcast addresses, see
the section on ‘Subnets’). Ergo the maximum number of hosts on a Class C
network is 256-2=254.
A class B network allows a maximum of 16,384 hosts (216-2) per network
(two octets designate the hosts).
A class A network allows up to 16,777,214 (224-2) hosts per network (three
octets are used to designate the hosts).
4/10/2015
S K SATAPATHY
CLASSES OF IP ADDRESS
1. CLASS A
Range:- 1 to 126
It is designed for very large networks.
network
host
host
host
0 0000000
:
:
0 1111111
In this the first bit 0 in the first octet is reserved.So the address
from 0 to 127, but the 0 condition is not possible also 127 is used
as loop back address and it is used for checking of TCP/IP table
of system.
4/10/2015
S K SATAPATHY
So the range is from 1 to 126.
2. CLASS B
Range: 128 to 191
It is designed for medium sized networks.
network
network
host
host
10 000000
:
:
10 111111
In this the first two bits in the first octet is reserved, so the address is
from 128 to 191.
4/10/2015
S K SATAPATHY
3. CLASS: C
Range: 192 to 223
It is designed for large networks
network
network
network
host
110 00000
:
:
110 11111
In this the first three bits in the first octet is reserved, so the
address is from 192 to 223.
4/10/2015
S K SATAPATHY
CLASS : D
Range: 224 to 239
These are multicast addresses.It requires specialised
devices for multicasting like routers.In normal network
computers ,it will not accepts class D addresses.It is also
not available in market.
CLASS :E
Range : 240 to 255
It is used for scientific pupose.It is reserved by the
government.
4/10/2015
S K SATAPATHY
PUBLIC AND PRIVATE IP ADDRESS
PUBLIC IP ADDRESS
These are those address that we have to purchase from the
service provider (ISP).
PRIVATE IP ADDRESS
No need to purchase these address.
Ranges of private IP address
Class A: 10.0.0.0-10.255.255.255
Class B: 172.16.0.0-172.31.255.255
Class C: 192.168.0.0-192.168.255.255
4/10/2015
S K SATAPATHY
SUBNETTING
DEFINITION
It is a technique in which larger network is divided in to
smaller sub networks , so that those sub networks will not
communicate with each other.
OR
The process of converting host bits in to network bit is
called sub netting.
Types of Sub -netting
There are two types of sub- netting
1. Network based sub -netting
2. Host based sub -netting
4/10/2015
S K SATAPATHY
Subnetmask:A subnet mask is a 32 bit value, that distinguishes the
network ID portion of the IP address from the host ID
portion of the Ip address.
Default Subnetmask:ClassA:- 255.0.0.0, This is because ther is only 8 network bits.
ClassB:- 255.255.0.0, This is because there is 16 network bits.
ClassC:- 255.255.255.0, This is because there is 24 network bits.
4/10/2015
S K SATAPATHY
Network based subnetting
In this we are sub -netting according to the requirement of
subnets.For
Example:- Given a N/W ID – 40.0.0.0
Default subnet Mask- 255.0.0.0
Requirement- 10 Subnets ?
Solution
The formula used is, 2 power N > Required number of subnets.
2 power 4 >10, the required number of subnet is 10.
Therefore N=4, it means taking 4 bits from host side in to network
side.
New subnet mask(NSM)= 255.11110000.00000000.00000000
= 255.240.0.0
Block Size= 256-240=16
OR
The number of 0 bits remaining in that octet, that is 4
2
power 4 = 16
4/10/2015
S K SATAPATHY
Network ID:- 40.0.0.0
40. 0 . 0 . 0, subnet no1
40.16 . 0 . 0, subnet no2
40. 32 . 0 . 0, subnet no3
40. 48 . 0 . 0, subnet no4
40. 64 . 0 . 0, subnet no5
40. 80 . 0 . 0, subnet no6
40. 96 . 0 . 0, subnet no7
40.112. 0 . 0, subnet no8
40.128. 0 . 0, subnet no9
40.144. 0 . 0, subnet no10
40.160. 0 . 0, subnet no11
40.176. 0 . 0, subnet no12
40.192. 0 . 0, subnet no13
40.208. 0 . 0, subnet no14
40.224. 0 . 0, subnet no 15
40.240. 0 . 0, subnet no 16
In this total sunets is 16, but we requires only 10.
4/10/2015
So
we can select any 10. S K SATAPATHY
Example
Given an IP-100.100.100.100
Default Subnetmask-255.0.0.0
Requirement - 5 subnet ?
Solution
2 power 3 > 5
So, N= 3
New subnetmask- 255.11100000.00000000.00000000
= 255.224.0.0
Block size = 256-224=32
OR
2 power 5 =32
4/10/2015
S K SATAPATHY
Network ID:- To get the network ID perform the logical AND operation
between the given IP and default subnetmask.
100.100.100.100
255. 0 . 0 . 0
That is,
01100100 . 01100100 . 01100100 . 01100100
11111111 . 00000000 . 00000000 . 00000000
01100100 . 00000000 . 00000000 . 00000000
That is, 100. 0. 0. 0,
100.32. 0. 0,
100.64. 0. 0,
100.96. 0. 0,
100.128.0.0,
100.160.0.0,
100.192.0.0,
4/10/2015
100.224.0.0,
subnet no1
subnet no2
subnet no3
subnet no4
subnet no5
subnet no6
subnet no7
S Kno8
SATAPATHY
subnet
1. Total number of subnets ?
2 power 3 = 8, that is the total number of bits converted from 0 to 1 in
NSM.
2. Total number of hosts ?
2 power 21 =2097152, that is total number of bits still 0 in all octets in
NSM.
3. Total valid hosts ?
Total number of valid hosts = Total hosts - 2
That is 2097152 - 2=2097150(reserver for nerwork address and broad
cast address
4. Given IP belongs to which subnet ?
To get this perform the logical AND operation between the given IP and
New subnet mask (NSM)
01100100 . 01100100 . 01100100 . 01100100
11111111 . 11100000 . 00000000 . 00000000
01100100 . 01100000 . 00000000 . 00000000
4/10/2015
S K SATAPATHY
That is, 100.96.0.0
5. 1st and last valid IP of 5th subnet ?
1st valid IP- 100.128.0.1
Last valid IP-100.159.255.254
6. Last valid IP of last subnet ?
Last valid IP-100.255.255.254
4/10/2015
S K SATAPATHY
2. HOST BASED SUBNETTING
In host based subnetting , we are subnetting according to the
requirement of hosts per subnets.
Example
200.200.200.200/24
Requires 10 hosts per subnets
Subnetmask-255.255.255.0 ?
Solution
Network ID- 200.200.200.0, That is logical AND operation between
given IP and Default subnetmask.
The formula is 2 power N - 2 > Required hosts per subnets.
2 power 4 - 2>10
That is N = 4, That means leave last 4 bits as zero in host side.
New subnetmask (NSM):255.255.255.1111 0000
That is 255.255.255.240
4/10/2015
S K SATAPATHY
Block size
256-240 =16
200.200.200.0, first subnet
200.200.200.16
200.200.200.32
:
:
:
:
:
200.200.200.240, last subnet
1. Total number of subnets ?
2 power 4 =16, That is total number of bits converted from 0 to 1 in
NSM
2. Total Hosts ?
2 power 4 = 16, That is total number of bits still 0 in in all octets in
NSM
3. Valid number of hosts ?
Total
hosts-2, That is 16-2= 14S K SATAPATHY
4/10/2015
4. Given IP belongs to which subnet ?
200.200.200.200
255.255.255.240
200.200.200.192, That is logical AND operation between given IP and
NSM.
The given IP belongs to 13th subnet, That is the logical AND operation
between given IP and NSM.
4/10/2015
S K SATAPATHY
4/10/2015
S K SATAPATHY