EDN 132
NETWORK INFRASTRUCTURE
WINDOWS SERVER
CHAPTER 3
IP
IP Address
Address and
and Subnetting
Subnetting
PREPARED BY:
ZOHAIR IHSAN
SCHOOL OF NETWORKING
FACULTY OF ENGINEERING AND INFORMATION
TECHNOLOGY
CHAPTER 3: IP Address and Subnetting
Objectives
TOPIC
Understanding of IP Address.
Learn about different class of IP Address.
What is subnet mask.
How subnetting is used.
Conversion of Binary to Decimal IP Addresses.
Slide 2 of 44
CHAPTER 3: IP Address and Subnetting
TOPIC
Computer only understand 0 or 1
0 OFF
1 ON
Slide 3 of 44
CHAPTER 3: IP Address and Subnetting
Bits and Bytes
TOPIC
Bit:
One digit, either 0 or 1
Byte:
8 bit combination of 0 or 1.
also called an octet.
Slide 4 of 44
CHAPTER 3: IP Address and Subnetting
Decimal Conversion of an Octet of Binary Number
TOPIC
Each unique combination of 8 bits (in an octet) can be
converted to a unique decimal number
Each bit position has a decimal value assigned to it
Lets call it a weight for an easy understanding
Respective Bits 2^n (2 power n)
0 0 0 0 0 0 0 0
Respective Weights
128 64 32 16 8 4 2 1
Slide 5 of 44
CHAPTER 3: IP Address and Subnetting
Example
TOPIC
• An 8 bit number
• Assign weights to bit positions
• Weights Are Specific to Bit Positions
• if the bit is zero—the value of the bit is zero
• if the bit is one—the bit has the value of the decimal conversion
Bit Positions
8 7 6 5 4 3 2 1
128 64 32 16 8 4 2 1
0 1 0 1 1 0 0 1
64 + 16 + 8 + 1 = 89
Slide 7 of 44
CHAPTER 3: IP Address and Subnetting
IP Addressing
TOPIC
Internet Protocol (IP)
A unique identifier for a host, or node, on
an IP network
32-bit binary number, usually expressed
as 4 “dotted decimal” values.
Each decimal value represents 8 bits, in
the range of 0 to 255
Slide 8 of 44
CHAPTER 3: IP Address and Subnetting
Example
TOPIC
140
140.179.220.200
179 220 200
Written in binary form:
140 . 179 . 220 . 200
10001100. 10110011. 11011100. 11001000
The IP address in the decimal form but
computer sees it in the binary form
Slide 9 of 44
CHAPTER 3: IP Address and Subnetting
Example
TOPIC
An we discuss earlier that octet is made up of
eight “1”s and “0”s, representing the following
values:
128 64 32 16 8 4 2 1
So from the IP address 140.179.220.200 the
value of 140 :
Bit Positions
8 7 6 5 4 3 2 1
128 64 32 16 8 4 2 1
1 0 0 0 1 1 0 0
128 + 8 + 4 = 140
Slide 10 of 44
CHAPTER 3: IP Address and Subnetting
Example
TOPIC
From the IP address 140.179.220.200 the value of 179 :
128 64 32 16 8 4 2 1
1 0 1 1 00 1 1
128 + 0 + 32 + 16 + 0 + 0+ 2+ 1= 179
Slide 11 of 44
CHAPTER 3: IP Address and Subnetting
IP Address Classes
TOPIC
There are 5 different address classes.
Only 3 are in commercial use at this time.
You can determine the class of the address by
looking at the first 4 bits of the IP address:
Class A begin with 0xxx, or 1 to 126 decimal
Class B begin with 10xx, or 128 to 191 decimal
Class C begin with 110x, or 192 to 223 decimal
Class D begin with 1110, or 224 to 239 decimal
Class E begin with 1111, or 240 to 254 decimal
Slide 12 of 44
CHAPTER 3: IP Address and Subnetting
Private and Public Addresses
TOPIC
In each address classes, there are some private and
public addresses.
Private address are assigned to computers within a
LAN or network.
Public address are assigned to the computers on
the Internet:
Class A from 10.0.0.0 to 10.255.255.255
Class B from 172.16.0.0 to 172.31.255.255
Class C from 192.168.0.0 to 192.168.255.255
Slide 13 of 44
CHAPTER 3: IP Address and Subnetting
Private and Public Addresses
TOPIC
Private and Public Addresses
Slide 14 of 44
CHAPTER 3: IP Address and Subnetting
Network vs. Host
TOPIC
Every IP address has 2 parts:
1 identifying the network it resides on
1 identifying the host, or node, address on the
network
The class of the address and the subnet mask
determine which part belongs to the network
address and which part belongs to the host
address
Slide 15 of 44
CHAPTER 3: IP Address and Subnetting
IP Address Breakdown
TOPIC
The class of the address determines, by default,
which part is for the network (N) and which part
belongs to the node (n)
Class A: NNNNNNNN.nnnnnnnn.nnnnnnnn.nnnnnnnn
Class B: NNNNNNNN.NNNNNNNN.nnnnnnnn.nnnnnnnn
Class C: NNNNNNNN.NNNNNNNN.NNNNNNNN.nnnnnnnn
Slide 16 of 44
CHAPTER 3: IP Address and Subnetting
Example
TOPIC
140.179.220.200
Our example is a Class B address
By default, the Network part of the address is
defined by the first 2 octets: 140.179.x.x
By default, the node part of the address is defined
by the last 2 octets: x.x.220.200
Network part of the address is also known as the
Network Address
Node part of the address is also known as the
Host Address
Slide 17 of 44
CHAPTER 3: IP Address and Subnetting
Two Reserved Addresses on a Subnet
TOPIC
In order to specify the Network Address of a
given IP address, the node portion is set to all
“0”s:
140.179.0.0
If all the bits in the node portion are set to
“1”s, then this specifies the Broadcast
Address that is sent to all nodes on the
network:
140.179.255.255
Slide 18 of 44
CHAPTER 3: IP Address and Subnetting
Subnet Mask
TOPIC
Subnet masks are applied to an IP address to identify the
Network portion and the node portion of the address.
Your computer performs a bitwise logical AND operation
between the address and the subnet mask in order to find
the Network Address or number.
Slide 19 of 44
CHAPTER 3: IP Address and Subnetting
Default Subnet Masks
TOPIC
Class A - 255.0.0.0
11111111.00000000.00000000.00000000
Class B - 255.255.0.0
11111111.11111111.00000000.00000000
Class C - 255.255.255.0
11111111.11111111.11111111.00000000
Slide 20 of 44
CHAPTER 3: IP Address and Subnetting
Subnetteing
TOPIC
Subnetting an IP network can be done for various
reasons including:
Organization
Use of different physical media
Preservation of address space
Security
Control network traffic
Slide 21 of 44
CHAPTER 3: IP Address and Subnetting
Logical Bitwise AND Operation
TOPIC
Remember our example?
140.179.240.200
It’s a Class B, so the subnet mask is:
255.255.0.0
We need to look at this as our computer
does so we can perform the bitwise AND...
Slide 22 of 44
CHAPTER 3: IP Address and Subnetting
Logical Bitwise AND Operation
TOPIC
140.179.220.200 Class B address
255.255.0.0 Subnet Mask
In Binary:
10001100.10110011.11110000.11001000
11111111.11111111.00000000.00000000
10001100.10110011.00000000.00000000
By doing this, the computer has found that our Network
Address is 140.179.0.0
Slide 23 of 44
CHAPTER 3: IP Address and Subnetting
Activity
TOPIC
Suppose we have an IP address 206.15.143.89
What class is it?
Class C
What is the subnet mask?
255.255.255.0
What is the Network Address?
206.15.143.0
What is the host portion of the address?
0.0.0.89
Slide 24 of 44
CHAPTER 3: IP Address and Subnetting
Why to create more network addresses?
TOPIC
If you have a Class C network, how many individual node
addresses can you have?
1 to 254
Remember, you can’t have all “0”s and all “1”s in the node portion of the
address.
So we cannot use 206.25.143.0 (all “0”s) or 206.25.143.255 (all “1”s) as a
node address.
Slide 25 of 44
CHAPTER 3: IP Address and Subnetting
Why to create more network addresses?
TOPIC
So we have 1 Class C Network (206.15.143.0)
And we have 254 node address (1 to 254) Example
But what if our LAN has 5 networks in it and each network has no more
than 30 nodes on it?
Do we apply for 4 more Class C licenses, so we have one for each
network?
We would be wasting 224 addresses on each network, a total of 1120
addresses.
What do you think is this a problem?
Slide 26 of 44
CHAPTER 3: IP Address and Subnetting
Why Subnetting?
TOPIC
Subnetting is a way of taking an existing class license and
breaking it down to create more Network.
This will always reduce the number of node addresses for a
given network.
Subnetting makes more efficient use of the address or
addresses assigned to you.
Slide 28 of 44
CHAPTER 3: IP Address and Subnetting
How Does Subnetting Work?
TOPIC
Additional bits can be added (changed from 0 to 1) to the
subnet mask to further subnet, or breakdown, a network.
When the logical AND is done by the computer, the result
will give it a new Network (or Subnet) Address.
Remember, an address of all “0”s or all “1”s cannot be used
in the last octet (or node portion). All “0”s signify the
Network Address and all “1”s signify the broadcast address.
Slide 29 of 44
CHAPTER 3: IP Address and Subnetting
How Does Subnetting Work?
TOPIC
We ask our ISP for a Class C license.
They give us the Class C bank of 206.15.143.0
This gives us 1 Network (206.15.143.0) with the potential
for 254 node addresses (206.15.143.1 to 206.15.143.254).
But we have a LAN made up of 5 Networks with the largest
one serving 25 nodes.
So we need to Subnet our 1 IP address
Slide 30 of 44
CHAPTER 3: IP Address and Subnetting
So How Does This Work?
TOPIC
To calculate the number of subnets (networks) and/or nodes,
we need to do some math:
Use the formula 2n-2
where the n can represent either how many subnets
(networks) needed OR how many nodes per subnet
needed.
Slide 31 of 44
CHAPTER 3: IP Address and Subnetting
How Does Subnetting Work?
TOPIC
We know we need at least 5 subnets. So 23-2 will give us 6
subnet addresses (Network Addresses).
We know we need at least 25 nodes per network. 25-2 will
give us 30 nodes per subnet (network).
This will work, because we can steal the first 3 bits from the
node’s portion of the address to give to the network portion
and still have 5 (8-3) left for the node portion:
Slide 32 of 44
CHAPTER 3: IP Address and Subnetting
Making Subnets
TOPIC
As we have a Class C address 206.15.143.0:
NNNNNNNN.NNNNNNNN.NNNNNNNN.nnnnnnnn
With a Subnet mask of:
11111111.11111111.11111111.00000000
255 .255 .255 .0
We need to steal 3 bits from the node portion to give it to the
Network portion:
NNNNNNNN.NNNNNNNN.NNNNNNNN.nnnnnnnn
NNNnnnnn
Slide 33 of 44
CHAPTER 3: IP Address and Subnetting
Making Subnets
TOPIC
NNNNNNNN.NNNNNNNN.NNNNNNNN.NNNnnnnn
This will change our subnet mask to the following:
11111111.11111111.11111111.
11100000
255 .255
To .255subnet mask
compute new .224
1 1 1 0 0 0 0 0
128 64 32 16 8 4 2 1
128 + 64 + 32 + 0+ 0+ 0+ 0+ 0= 224
Slide 34 of 44
CHAPTER 3: IP Address and Subnetting
TOPIC
As we are using the first 3 bits for our subnet mask, we can
configure them into eight different ways (binary form):
1) 0 0 0
2) 0 0 1
3) 0 1 0
4) 0 1 1
5) 1 0 0
6) 1 0 1
7) 1 1 0
8) 1 1 1
Slide 35 of 44
CHAPTER 3: IP Address and Subnetting
What address is what?
TOPIC
Eight
As possible
discuss combinations
earlier usinguse
that we cannot theall
3 “0”s
bits or all “1”s
1) 0 0 0
2) 0 0 1
3) 0 1 0
4) 0 1 1
5) 1 0 0
6) 1 0 1
7) 1 1 0
8) 1 1 1
We are left with 6 useable network numbers.
Slide 36 of 44
CHAPTER 3: IP Address and Subnetting
TOPIC
1) 0 0 0
2) 0 0 1
3) 0 1 0
4) 0 1 1
5) 1 0 0
6) 1 0 1
7) 1 1 0
8) 1 1 1
Slide 37 of 44
CHAPTER 3: IP Address and Subnetting
Network (Subnet) Addresses
TOPIC
Remember our values:
128 64 32 16 8 4 2 1 Equals
Now our 3 bit configurations:
0 0 1 n n n n n 32
0 1 0 n n n n n 64
0 1 1 n n n n n 96
1) 0 0 10 0 0 n n n n n 128
1 0 1 n n n n n 160
2) 0 0 1 1 1 0 n n n n n 192
3) 0 1 0
4) 0 1 1
5) 1 0 0
6) 1 0 1
7) 1 1 0
8) 1 1 1
Slide 38 of 44
CHAPTER 3: IP Address and Subnetting
Network (Subnet) Addresses
TOPIC
0 0 1 n n n n n 32
0 1 0 n n n n n 64
0 1 1 n n n n n 96
1 0 0 n n n n n 128
1 0 1 n n n n n 160
1 1 0 n n n n n 192
Each of these numbers becomes the Network Address of
their subnet...
Slide 39 of 44
CHAPTER 3: IP Address and Subnetting
Network (Subnet) Addresses
TOPIC
License Class C IP 206.15.143.0
206.15.143.32
206.15.143.64
After subnetting
206.15.143.96
206.15.143.128
206.15.143.160
206.15.143.192
Slide 40 of 44
CHAPTER 3: IP Address and Subnetting
Node Address
TOPIC
The device assigned the first address will receive the first
number AFTER the network address shown before.
206.15.143.33 or 32+1
0 0 1 0 0 0 0 1
And the last address in the Network will look like this:
206.15.143.62
0 0 1 1 1 1 1 0
*Remember, we cannot use all “1”s, that is the broadcast
address (206.15.143.63)
Slide 41 of 44
CHAPTER 3: IP Address and Subnetting
Node Address
TOPIC
The next network will start at 206.15.143.64
The first IP address on this subnet network will receive:
206.15.143.65
0 1 0 0 0 0 0 1
And the last address in the Network will receive:
206.15.143.94
0 1 0 1 1 1 1 0
*Remember, the broadcast address (206.15.143.95)
Slide 42 of 44
CHAPTER 3: IP Address and Subnetting
Can you figure out the rest?
TOPIC
Network: Host Range
206.15.143.32
206.15.143.33 to 206.15.143.62
206.15.143.64
206.15.143.65 to 206.15.143.94
206.15.143.96
206.15.143.97 to 206.15.143.126
206.15.143.128
206.15.143.129 to 206.15.143.158
206.15.143.160
206.15.143.161 to 206.15.143.190
206.15.143.192
206.15.143.193 to 206.15.143.222
Slide 43 of 44
CHAPTER 3: IP Address and Subnetting
How the computer finds the Network Address:
TOPIC
206.15.143.89 An address on the subnet
225.225.225.224 The new subnet mask
When the computer does the Logical Bitwise AND Operation it will
come up with the following Network Address (or Subnet Address):
11001000.00001111.10001111.01011001 = 206.15.143.89
11111111.11111111.11111111.11100000 = 255.255.255.224
11001000.00001111.10001111.01000000 = 206.15.143.64
(Network) This address falls on our 2nd Subnet (Network)
Slide 44 of 44