Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

23
Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04

Transcript of Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

Page 1: Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

Internet Protocol V4 Addressing&

Subnetting

Written by Bill Reed 22/02/04

Page 2: Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

• Look at the structure of an IP V4 address.

• Examine the Binary principles behind an IP V4 address.

• Identify the historic classes of IP V4 addresses.

• Divide an IP V4 address into subnets.

We will

Page 3: Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

IP V4 Address StructureNotation

• IP V4 Addresses are represented in a way known as DOTTED DECIMAL NOTATION

• An example of this could be

192.168.100.17

• Each Decimal number represents a BINARY BYTE and therefore is limited to a value between 0 and 255

Page 4: Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

IP V4 Address StructureHierarchical

• IP V4 Addresses are hierarchical in nature. 192.168.100.17

• Think of a postal address.• The first Decimal number could represent a country.• The second Decimal number could represent county.• The third Decimal number could represent a post code denoting a

town, an area of that town and a street.• The fourth Decimal number could represent a house number on that

street.

An advantage of hierarchical addressing is that additions can easily be made, for instance we could build another few houses in our street and give them numbers without effecting upper layers of our addressing structure. We call this scalability.

Page 5: Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

BINARY PRINCIPLESHow Binary values work

BINARY BIT VALUES

128 64 32 16 8 4 2 1

Eight BITS = 1 BYTE or OCTET

If all eight values in a BYTE are added together they come to a

value of 255

Page 6: Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

How Binary values work

BINARY BIT VALUES

128 64 32 16 8 4 2 1

128

Page 7: Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

How Binary values work

BINARY BIT VALUES

128 64 32 16 8 4 2 1

128

192

Page 8: Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

How Binary values work

BINARY BIT VALUES

128 64 32 16 8 4 2 1

128

192

224

Page 9: Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

How Binary values work

BINARY BIT VALUES

128 64 32 16 8 4 2 1

128

192

224

240

Page 10: Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

How Binary values work

BINARY BIT VALUES

128 64 32 16 8 4 2 1

128

192

224

240

248

Page 11: Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

How Binary values work

BINARY BIT VALUES

128 64 32 16 8 4 2 1

128

192

224

240

248

252

Page 12: Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

How Binary values work

BINARY BIT VALUES

128 64 32 16 8 4 2 1

128

192

224

240

248

252

254

Page 13: Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

How Binary values work

BINARY BIT VALUES

128 64 32 16 8 4 2 1

128

192

224

240

248

252

254

255

Page 14: Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

192.168.100.17

RECAP

IP V4 addressing is represented using DOTTED DECIMAL NOTATION

Each DECIMAL number represents a BINARY BYTE

A BINARY BYTE can represent a value between 0 and 255

IP V4 addressing is hierarchical and therefore scalable

Page 15: Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

The Historical IP V4 Address Classes

• Class A range = 0.0.0.0 – 126.255.255.255 BIN 0???????

0 = 00000000 - 126 = 01111110 (16,777,214 available addresses)

• Class B range = 128.0.0.0 – 191.255.255.255 BIN 10??????

128 = 10000000 - 191 = 10111111 (65,534 available addresses)

• Class C range = 192.0.0.0 – 223.255.255.255 BIN 110?????

192 = 11000000 - 223 = 11011111 (254 available addresses)

Page 16: Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

Dividing an IP V4 addressSubnetting

• We subnet to gain additional discrete network addresses from a single address space.

• Discrete network addresses are advantageous for security and organisational reasons.

IP V4 addresses have things called default subnet masks

Subnet masks tell some networking devices how we want to divide our address space

A class A default subnet mask looks like 255.0.0.0A class B default subnet mask looks like 255.255.0.0A class C default subnet mask looks like 255.255.255.0

Page 17: Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

Dividing an IP V4 addressSubnetting

CASE STUDY

192.168.100.17 = ONE NETWORK with 254 available addresses

1. Our client has bought this class C address space from her ISP.

2. Our client has a building with 5 floors.

3. Our client needs a different network address space on each floor.

HOW DO WE ACHIEVE THIS AND SATISFY OUR CLIENT?

Page 18: Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

• Firstly we identify the address class.

• Next we identify the default subnet mask.

• Then we get out our DIY subnet calculator.

Dividing an IP V4 addressSubnetting

CASE STUDY

Page 19: Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

DIY subnet calculator

128 64 32 16 8 4 2 1

128192224240248252254255

BINARY valuesAccumulated BIT values

We inform the network devices that we want to divide upOur address space by specifying a subnet mask that borrows BITS from the host portion of the address space.

CASE STUDY

192.168.100.17192.168.100.17

Page 20: Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

DIY subnet calculator

128 64 32 16 8 4 2 1

128192224240248252254255

192.168.100.17255.255.255.0

IP V4 addressSubnet mask

When we subnet using the no math method we start from the right hand side.

We move left along the numbers until weSee a number larger than the amount of subnets that we need (8), this will be the numberOf subnets that we create.

RememberWe need5 subnets

Next we count how many BITS are to the rightOf this number (in this case there are 3 BITS)This is the number of BITS we must borrow.

CASE STUDY

Page 21: Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

DIY subnet calculator

128 64 32 16 8 4 2 1

128192224240248252254255

192.168.100.17255.255.255.0

IP V4 addressSubnet mask

So far we have established that we need to Borrow 3 BITS from the host portion of the Address.

Now we need to specify a subnet mask that tells the network devices of our intentions.

We achieve this by changing the DECIMAL value in the host portion of our subnet mask to a value that represents 3 BINARY BITS added together.

CASE STUDY

Page 22: Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

DIY subnet calculator

128 64 32 16 8 4 2 1

128192224240248252254255

192.168.100.17255.255.255.0

255.255.255.224

IP V4 addressSubnet mask

New subnet mask

CASE STUDY

So far we have specified a subnet mask to create 8 subnets

We borrowed 3 BITS from the RHS to achieve this

Now we must find out how many addresses are available inside each of those subnets.

We do this by counting from the LHS the number of BITS borrowed (3) and taking 2 away from this number.

32 – 2 = 30

Page 23: Internet Protocol V4 Addressing & Subnetting Written by Bill Reed 22/02/04.

DIY subnet calculator

CASE STUDY

Our eight subnet addresses are:

192.168.100.0192.168.100.32192.168.100.64192.168.100.96192.168.100.128192.168.100.160192.168.100.192192.168.100.224

An interesting aside is that the last octet of the last subnet address, matches the last octet of the subnet mask. (this will always be the case no matter what the subnet mask)

Remember 32 was our spacing for the subnets

That’s it we are done!

Now you know how to subnet!