Day 40 – Subnetting

Table of contents

Valid IP Address

  • must be in the form of A.B.C.D,
  • where A, B, C, and D are numbers from 0-255
  • The numbers cannot be 0 prefixed unless they are 0.

Subnetting – the process of taking a large network and splitting it up into many individual smaller subnetworks or subnets.

Address classes give us a way to break the total global IP space into discrete networks.

Network ID – used to identify networks

Host ID – used to identify individual hosts.

Subnet ID

10.0.1.10 (10.0 is the network ID, 1.10 is the host ID)

In a world with subnetting, some bits that would normally comprise the host ID are actually used for the subnet ID.

Subnet Masks – 32-bit numbers that are normally written out as four octets in decimal

IP Address9100100100
IP Address (in binary)0000 10010110 01000110 01000110 0100
Subnet Mask (in binary)1111 11111111 11111111 11110000 0000

Each part of the IP Address is an octet, which means that it consists of eight bits.

The number 9 in binary is just 1001, but since each octet needs eight bits, we need to pad it with some zeros in front.

The size of a subnet is defined by the subnet mask.

A single 8-bit number can represent 256 different numbers, or more specifically, the number 0-255.

9.100.100.100, with subnet mask 255.255.255.224

  • Since that subnet mask represents 27 ones followed by five zeros, a quicker way of referencing this is with the notation /27. The entire IP and subnet mask could be written out as 9.100.100.100/27.

Basic Binary Math

0 or 1, binary or base 2

Binary

321608040201
1
10
11
100
101
110
111
1000
1001
1010
1011

Decimal

1001
1
2
3
4
5
6
7
8
9
10
11

8\;bit\;is\;2^8 = 256 
4\;bit\;is\;2^4 = 16
16\;bit\;is\;2^16\ = 65536

decimal – base 10

binary – base 2

In binary:

0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 10

The basic equation is x or y = z. If either x or y is true, then z is true, otherwise, it’s false.

In Binary, 1 or 0 = but 0 or 0 equals 0. 1 and 1 = 1, but 1 and 0 = 0, 0 and 0 = 0.

Leave a Reply