Subnetting

uptightexampleNetworking and Communications

Oct 24, 2013 (3 years and 9 months ago)

76 views

Subnetting

March 6

(Day);
February 26

(Night)




Introduction to Network Addresses
:

o

TCP/IP

is the most widely used protocol in the world. The Internet uses only IP
addressing. In order for a host to access the Internet, it must have an IP address.

o

IP addre
sses consist of four numbers (between 0
-
255) separated by dots. Each
number is known as an octet.

o

Because each octet can be between 0
-
255, it can be represented by 8 bits.
Therefore, the entire address is represented by 32 bits.

o

In its most basic form,

the IP address has two parts: a network ID and a host ID.



The network ID portion of an IP address refers to the network. Hosts on
a network can communicate directly only with devices that have the
same network ID.



Hosts might share the same physical segm
ent, but if they have different
network IDs, they usually cannot communicate with each other


unless
there is another device that can make a connection between the networks.
This device is usually a router.






Once data reaches the appropri
ate network, it uses the host portion of the
IP address to find the individual computer.

o

All networks have a network address. Usually, it is going to be the lowest value
in that particular network.




Classes of Network Addresses
:

o

There are five classes of
IP addresses (A through E). Only the first three classes
(A
-
C) are used regularly.


o

Summary of Network Classes
:

Class

1
st

Octet

Network/

Host ID

# of

Networks

Hosts per

Network

A

1
-
126

N.H.H.H

126

16,777,216

B

128
-
191

N.N.H.H

16,382

65,536

C

192
-
223

N.
N.N.H

2,
097,150

256


Router

Host

Net A

Host

Net A

Host

Net B

Host

Net B

o

In
class A addresses
, the first octet is the network ID and the last three octets are
host ID.



Because the last three octets are dedicated to host addresses, this means
you can have 16,777,216 hosts on a class A network.



We know this
because
2^
24
=16,777,216

OR
256 x 256x
256=16,777,216
.


o

In
class B addresses
, the first two octets are the network ID and the last two
octets are host ID.



Because the last two octets are dedicated to host addresses, this means
you can have 65,536 hosts on a

class A network.



We know this because
2^
16
=65,536

OR
256 x 256=65,536
.


o

In
class C addresses
, the first three octets are the network ID and the last octet is
the host.



Because the last octet is dedicated to host addresses, this means you can
have 256 host
s on a class A network.



We know this because
2
8
=256

OR
256
.




What is Subnetting:

o

Network administrators sometimes need to divide networks, especially large
ones, into smaller networks. These smaller divisions are called
subnetworks
.

o

Each subnetwork is con
nected to one another by a device known as a router.

o

Larger networks are broken down into subnetworks through the use of a
numbering scheme known as the subnet mask.

o

Routers use the “ANDing” process to determine if a destination host is on the
same network

or not. Basically, you multiply the binary equivalent of the IP
address by the binary equivalent of the subnet mask to get the network address.

o

Here are the default subnet masks. Class A uses 255.0.0.0. Class B uses
255.255.0.0. Class C uses 255.255.2
55.0.

o

Let’s apply the ANDing process and the subnet mask to calculate the network
address for the host 200.1.1.5.




Decimal form

Binary form

Host address

200.1.1.5

11001000.00000001.00000001.00000101

Subnet mask

255.255.255.0

11111111.11111111.1111111
1.00000000

Resulting network address (binary
form):

11001000.00000001.00000001.00000000

Resulting network address (dec form):

200.1.1.0




Creating a Custom Subnet Mask for a Class C Address
:

o

Let’s pretend that we want less than 256 hosts on one network w
ith a network
address of 200.1.1.0. We want two subnets and to separate them with a router for
security reasons and to reduce traffic.


o

The first step to
subnetting

is to determine how many subnets we need. In this
case we need two.


o

The next step is to
see how many bits we should borrow from the host portion of
the network address, begin to add the bits from the
right to left

until the total is
equal to or greater than the number of subnets we need.

128

64

32

16

8

4

2

1

2 + 1 = 3 which is greater than t
he number of subnets we need.


o

After we know how many bits to borrow, we take them from the
left side

of the
fourth octet of the host address.


128

64

32

16

8

4

2

1

Bits we need to borrow

1

1

0

0

0

0

0

0

Our custom subnet mask is going to be 255.255.255.
192. The 192 comes
from the value of the first two bits from the left. (The 192 comes from 128 +
64).


o

Since we borrow two bits for the network ID. This means we may have
2
2
=4
subnets
.

o

Since we borrow two bits for the network ID, this leaves only six bi
ts for the host
ID. This means that we may have
2
6
=64 hosts on each subnet
.



o

Here’s a chart that demonstrates the four subnets we can create.

Subnet No.

Network Address

Range of Available Addresses

0

200.1.1.0

200.1.1.0


200.N.N.63

N

200.N.N.64

㈰〮
N.N.64


200.N.N.N27

2

200.N.N.N28

200.N.N.N28


200.N.N.N9N

3

200.N.N.N92

200.N.N.N92


200.N.N.2RR


o

Based on our example, can a host of 200.1.1.5 send data directly to a host of
200.1.1.70?

o

Based on our example, can a host of 200.1.1.5 send data dir
ectly to a host of
200.1.1.60?