Download Addressing at the NL and TL

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Transcript
Business Data
Communications
Addressing at the NL and TL
Review: Addressing at the DLL




DLL addresses are generally assigned to
physical devices when they are
manufactured.
Expressed in hexadecimal.
An Ethernet address example:
00-0C-00-F5-03-5A
DLL addresses identify hardware on a
network.
Addressing at the NL and TL

NL addresses are logical concepts.


They uniquely identify sources and
destinations but not necessarily specific
machines.
They are mapped to hardware addresses
but not permanently. They can be changed.
The IP Address – IPv4

Example: 127.61.17.24

It represents a long binary number divided into four
parts.




Each part is of eight bits so each part can assume the
values 0-255 since binary 00000000 = 0 and binary
11111111 = 255.
Called a “dotted quad”.
Remember, computers can only deal with bits!
How many bits does this address represent? How ever
many, it’s not enough…
Address classes


There is a large but finite number of
addresses in this scheme. So some
organization is necessary.
We can use the first bit to split all possible
addresses into two groups.


00000000.00000000.00000000.00000000 to
01111111.11111111.11111111.11111111
10000000.00000000.00000000.00000000 to
11111111.11111111.11111111.11111111
Address classes - A

Consider the first group:





00000000.00000000.00000000.00000000 to
01111111.11111111.11111111.11111111
In decimal that is 0.0.0.0 to 127.255.255.255.
These addresses are called class “A”.
About half of all possible addresses are of
this class.
There are some other rules we’ll consider
later.
Address classes

Now consider that second group



These are the ones that all start with 1.
10000000.00000000.00000000.00000000 to
11111111.11111111.11111111.11111111
Let us divide all these possible addresses into two
groups by using the second bit, giving…


10000000.00000000.00000000.00000000 to
10111111.11111111.11111111.11111111
11000000.00000000.00000000.00000000 to
11111111.11111111.11111111.11111111
Address classes - B

Consider the first of these groups:


10000000.00000000.00000000.00000000 to
10111111.11111111.11111111.11111111
In decimal that is 128.0.0.0 to 191.255.255.255.
These addresses are called class “B”.
 About one fourth of all possible
addresses are of this class (half of half).

Address classes

Now consider that second second group


These are the ones that all start with 11.
11000000.00000000.00000000.00000000 to
11111111.11111111.11111111.11111111
Let us divide all these possible addresses into two
groups by using the third bit, giving…


11000000.00000000.00000000.00000000 to
11011111.11111111.11111111.11111111
11100000.00000000.00000000.00000000 to
11111111.11111111.11111111.11111111
Address classes - C

Consider the first of these groups:


11000000.00000000.00000000.00000000 to
11011111.11111111.11111111.11111111
In decimal that is 192.0.0.0 to 223.255.255.255.
These addresses are called class “C”.
 About one eighth of all possible
addresses are of this class (half of half
of half).

Address classes – other

Finally, consider the second of these
groups:



11100000.00000000.00000000.00000000 to
11111111.11111111.11111111.11111111
In decimal that is 224.0.0.0 to 255.255.255.255.
These are the other class addresses that are
not in general use.
Address Classes Summary



The first bit distinguishes Class A from the rest. Class A
addresses start with 0.
 00000000.00000000.00000000.00000000 to
01111111.11111111.11111111.11111111
Class B addresses start with 1. The second bit, being 0,
distinguishes Class B, from the rest.
 10000000.00000000.00000000.00000000 to
10111111.11111111.11111111.11111111
Class C addresses start with 11. The third bit, being 0,
distinguishes Class C from the rest.
 11000000.00000000.00000000.00000000 to
11011111.11111111.11111111.1111111
Assigned Class Addresses

So we have this huge range of addresses called
“Class A” to assign to people…



00000000.00000000.00000000.00000000 to
01111111.11111111.11111111.11111111
Q: How do we organize this?
A: The number assigning authority decrees that it
will assign addresses by fixing the first byte and
letting you play with the rest how you will.
Assigned Class Addresses




Class A addresses: 1st byte is assigned to you.
Class B addresses: First 2 bytes are assigned to
you.
Class C addresses: First 3 bytes are assigned to
you.
Here’s a sample Class A address: 115.x.x.x.


You know it’s class A because of the value of the first byte.
The values of the other three bytes are up to you to assign
to the devices on your network.
Assigned Class Addresses

Class B addresses: First 2 bytes are assigned to
you.



Here’s a sample Class B address: 152.15.x.x.
You know it’s class B because of the value of the first byte.
The values of the other two bytes are up to you to assign to
the devices on your network
Assigned Class Addresses

Class C addresses: First 2 bytes are assigned to
you.



Here’s a sample Class B address: 200.18.12.x.
You know it’s class C because of the value of the first byte.
The values of the last byte are up to you to assign to the
devices on your network.
Subnetting


Just as the IANA divides up all the available
addresses in a class by assigning fixed
values to bytes, we can do the same within
our own allocation of addresses.
How we do this would depend on how many
subnets we wanted to create in our network.

Maybe subnet by department or building or floor
or whatever…
Subnetting



For example, if we’re given the class B address
152.15.x.x, we have two bytes to play with mostly
however we want.
It’s up to us to divide those bytes among subnets
and the actual equipment on the network, called
hosts.
We denote the use of bytes using the letters
n(etwork), s(ubnet), and h(ost).

152.15.x.x goes to nnnnnnnn.nnnnnnnn.xxxxxxxx.xxxxxxxx
(for now)
Subnetting 152.15.x.x


We control all addresses from 152.15.0.0 to
152.15.255.255! Woohoo!
Assume the extreme case – we don’t want to
subdivide our addresses. We denote this:


nnnnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhhh.
This means that, on our one big network, we can
have host addresses from x.x.0.0 to x.x.255.255,
only you can’t have a host address of all 0s or all 1s
so it’s really x.x.0.1 to x.x.255.254. (Hosts of all 0s
and all 1s have special uses.)
Subnetting 152.15.x.x

Assume that we wanted to divide our network
into two subnets. We could do this by using
the first bit of the bytes that we control. We
denote this:


nnnnnnnn.nnnnnnnn.shhhhhhh.hhhhhhhh.
Setting this bit to 1 or 0 enables us to divide
our addresses into two groups. This is the
same system used to create classes.
Subnetting 152.15.x.x

Subnet one is:


Subnet two is:


152.15.0.1 to 152.15.127.254.
152.15.128.1 to 152.15.255.254
Remember that you can’t have hosts of all 0s
or all 1s so 0 and 255 are right out.
Subnetting 152.15.x.x

Assume that we wanted to divide our network
into four subnets. We could do this by using
the first two bits of the bytes that we control.
We denote this:


nnnnnnnn.nnnnnnnn.sshhhhhh.hhhhhhhh.
Setting these bits to 00, 01, 10, or 11 enables
us to divide our addresses into four groups.
Subnetting 152.15.x.x




Subnet one is:
 152.15.0.1 to 152.15.63.254.
 x.x.00000000.00000001 to x.x.00111111.11111110
Subnet two is:
 152.15.64.1 to 152.15.127.254
 x.x.01000000.00000001 to x.x.01111111.11111110
Subnet three is:
 152.15.128.1 to 152.15.191.254
 x.x.10000000.00000001 to x.x.10111111.11111110
Subnet four is:
 152.15.192.1 to 152.15.255.254
 x.x.11000000.00000001 to x.x.11111111.11111110
Subnetting 152.15.x.x

Consider our class B address 152.15.x.x.

We decide to use five of the bits to designate
subnets:




Nnnnnnnn.nnnnnnnn.ssssshhh.hhhhhhhh
This gives us 25 or 32 subnets.
Each subnet has 211 – 2 or 2046 host addresses.
32 x 2046 = 65,472 total addresses.
Subnetting 152.15.x.x

Consider our class B address 152.15.x.x.

We decide to use seven of the bits to
designate subnets:




Nnnnnnnn.nnnnnnnn.sssssssh.hhhhhhhh
This gives us 27 or 128 subnets.
Each subnet has 29 – 2 or 510 host addresses.
128 x 510 = 65,280 total addresses.
Subnet masking – basic concept


A mask is a bit pattern that we can use to indicate which parts
are shared, are the same, among a group of IP addresses. This
would indicate that those addresses are on the same part of the
network.
A mask is an IP-address-like thing created by comparing the bits
of two IP addresses, starting from the left. As long as the bits in
the same position (1st, 2nd, etc) are alike, the corresponding bit in
the mask is set to one. But the first time they differ, the
corresponding bit in the mask is set to 0 and so are all the
remaining bits in the mask.
Subnet masking – basic concept

For example, given two addresses,
152.15.12.9 and 152.15.46.48, we can create
a mask that would accommodate them:



1011000.00001111.00001100.00001001
1011000.00001111.00101110.00110000
The mask would be:

1111111.11111111.11000000.00000000

or 255.255.192.0
Subnet masking – class mask


Given that mask, 255.255.192.0, why is it not surprising that the
first two bytes are both 255?
Because these two addresses belong to the same class B
network address!
 The mask for two addresses that are part of the same class B
network address will always begin with 255.255!
 And the mask for two addresses that are part of the same class A
network address will always begin with 255.
 And the mask for two addresses that are part of the same class
C network address will always begin with 255.255.255.
 This is called the class mask. Easy to see from the first byte.
Subnet masking – network mask


To addresses that are on the same subnet, will
share another set of bits in common – those that
you decided to use to designate subnets.
Consider that you decided to use seven of the bits
to designate subnets:


nnnnnnnn.nnnnnnnn.sssssssh.hhhhhhhh
The mask that identifies your subnets must be:

11111111.11111111.11111110.00000000

or 255.255.254.0
Subnet masking – use

A network manager wants to allow access to a file server only to
requests that come from within the company’s network. The
company has been given a class C address of 220.121.10.X.
 The mask is 255.255.255.0 because it is a class C address.
 The firewall can simply compare all source addresses of requests
to its own address, say 220.121.10.1 using the mask. So, given
a request from 220.121.12.2:




11011100.01111001.00001100.00000010
11011100.01111001.00001010.00000001
11111111.11111111.11111111.00000000
yyyyyyyy.yyyyyyyy.yyyyynxx.xxxxxxxx
=
=
=
=
220.121.12.2
220.121.10.1
255.255.255.0
fails!
Subnet masking – use

The same guy wants to allow access to a file server only to requests
that come from within a certain department that owns the firewall. The
company has been given a class C address of 220.121.10.X and uses
the first two bits to designate subnets.


The mask is 255.255.255.192. The first three bytes are the class mask. 192
comes from the use of the first two bits of the fourth byte to designate
subnets.
The firewall can simply compare all source addresses of requests to its own
address, say 220.121.10.130 using the mask. So, given a request from
220.121.10.12:




11011100.01111001.00001010.10000010
11011100.01111001.00001010.00001100
11111111.11111111.11111111.11000000
yyyyyyyy.yyyyyyyy.yyyyyyyy.nxxxxxxx
=
=
=
=
220.121.10.130
220.121.10.12
255.255.255.192
fails!
IPv6



The problem with IPv4 is that there are not
enough addresses.
IPv6 addresses this by providing long
addresses, hence more potential addresses.
Downward compatible with IPv4.