Transcript IP Tutorial

IP Tutorial
IP Tutorial
1
IP Address

An IP address is a unique number used to
identify your computer on the internet.
Every system has it’s own unique IP
address. IP addresses are layer 3, logical
addresses.
IP Tutorial
2
IP Structure
An IP address is made up of 32 bits. Each byte
is represented by a decimal and number
separated by a full stop (period):

207.21.32.101
IP Tutorial
3
IP Structure
Is an IP address, each value can never be
more than 255:
 312.33.134.433
Is an invalid IP address, the maximum for each
byte is 255 (FF hexadecimal).
IP Tutorial
4
IP addresses are essential, they are used to give
your computer a unique identity. Without IP
addresses routing would be impossible. Say you
send out a ping to a computer on a different
network, your packets are sent to the router
(gateway) on your network. The router checks
the IP address in the packet headers, if the
router knows the network on which that IP is
located, it forwards it on, if it doesn’t, it forwards
it on to another router that might know where
the IP address is. This continues until the packet
arrives at a router that can forward it onto the
destination IP’s network, where it can then be
picked up. Without IP addresses this wouldn’t
work.
IP Tutorial
5
IP Address Classes

IP addresses are separated into classes, let’s
have a look at how they’re separated, then i’ll
explain why:
Range
0-127
128-191
192-223
Class
A
B
C
IP Tutorial
6
IP Address Classes
Now to find out which class an IP address is in, you look at
the first byte of the address:

213.56.112.65
The first byte is 213. This falls inside the class range 192223 making this a class C IP address.

24.34.124.213
The first byte is 24. This falls inside the class range 0-127
making this a class A IP address.
IP Tutorial
7
Why?
When I first read about IP addresses being split up into
classes, the author failed to explain why it was done, so i
assumed this wasn’t very important, that someone just
put them into classes on a Sunday while they were
bored or something. Take a look at the table below:
Range
0-127
128-191
192-223
Class
A
B
C
N/H
N.H.H.H
N.N.H.H
N.N.N.H
IP Tutorial
8
N = Network I.D and
H = Host I.D.
In a class A IP address the first byte is
part of the network I.D. The remaining
three bytes are part of the host I.D. This
means in class A there can be fewer
networks and many hosts.
1.
2.
There can be 255 networks.
There can be 255 x 255 x 255 = 16,581,375
theoretical hosts on each class A network.
IP Tutorial
9

In class B the first two bytes are part of
the network I.D and the remaining two
are part of the host I.D. This means in
class B there can be a reasonable amount
of networks, and a reasonable amount of
hosts on each one of those networks.
1.
2.
255 x 255 = 65,025 networks.
255 x 255 = 65,025 theoretical hosts on each of
those networks.
IP Tutorial
10
I’m sure you get the drift, class C:


255 x 255 x 255 = 16,581,375 networks.
255 theoretical hosts on each of those
networks.
IP Tutorial
11
Why Theoretical?

I say “theoretical” hosts on each class of
network, because on each network the first
address and the last address cannot be used. So
if you work out the theoretical number of hosts
then take away two you have the actual number
of host computers that can be on that same
network..
IP Tutorial
12
IP Address:
213.54.112.221
This is a class C address.
213.54.112.0
is the NETWORK address. This cannot be used as
a hosts IP address.
213.54.112.255
is the BROADCAST address on this network. It
cannot be used as a hosts IP address.
Class C networks have a theoretical 255 hosts on
each network, 255 – 2 = 253. So on each class
C network you can have 253 host computers.
IP Tutorial
13

Let’s go over a couple of examples to
make this stick. What is the IP Class,
Network ID, Network Broadcast Address
and the Number of Hosts on the Network
of the following IP Addresses
IP: 203.222.34.57.
IP: 24.240.11.99
IP Tutorial
14
IP: 203.222.34.57
Is a class C address, N.N.N.H
The network ID is 203.222.34.0
The network broadcast address is 203.222.34.255
There can be 255 Theoretical hosts on this network.
Thus there can be 255 – 2 = 253 host
computers functioning on this network.
IP Tutorial
15
IP: 24.240.11.99
Is a class A address, N.H.H.H
The network ID is 24.0
The network broadcast address is 24.255.255.255
There can be 255×255 x 255 = 16,581,375
Theoretical hosts on this network.
Thus there can be 16,581,375 – 2 = 16,581,373
host computers functioning on this network.
IP Tutorial
16

Try applying the above to your IP address,
what class network are you on? What’s
the network I.D? What’s the broadcast
address? How many hosts can be on your
network?
IP Tutorial
17