Subnetting Workshop

Download Report

Transcript Subnetting Workshop

Subnetting Workshop
SARA AKERS
SEPTEMBER 2014
Disclaimer
If you notice any mistakes with any of the slides, please let me know so I can correct.
Thank you!
Sara Akers
[email protected]
SUBNETTING
7.4.63.0 255.255.255.0
Class A (7.4.63.0) – Default subnet mask for a Class A is 255.0.0.0 or /8
The IP address would split up Network vs Host bits like this: NNNNNNNN.NNNNNNNN.NNNNNNNN.HHHHHHHH
(See subnet mask in Title – Since it is a /24 subnet mask, the first 24 bits are on (1) – thus network bits)
I only have 8 host bits to work with. I cannot use Network Bits already taken. Therefore, I cannot use
255.255.255 I can only use the host bits when subnetting.
In my network, I need at least 8 host addresses per network. (8 is a variable number depending on your network)
7.4.63._ _ _ _ _ _ _ _
Count host bits from the right to left; network bits from the left to rt.
7.4.63. 256 128 64 32 16 8 4 2
I can get 2 hosts in the first bit from the right (a 0 or a 1)
So to get 8 host addresses – my line goes here:
7.4.63. 256 128 64 32 16 | 8 4 2
However, we need to add 2 more hosts for Broadcast and Network
Address – so I really need 10 hosts - thus my line goes here:
7.4.63. 256 128 64 32 | 16 8 4 2
7.4.63.0 255.255.255.0
7.4.63. _ _ _ _ | _ _ _ _
So everything to the left of the line is now a Network bit and everything to the right of the line is
a Host bit. 7.4.63.NNNNHHHH (Giving me approximately 16 Network Address and 16 Host
Addresses)
I want to solve for Subnet 3. Subnet 0 would look like this: 7.4.63.0000|0000 /28
Subnet 3 would look like this: 7.4.63.00110000 /28 How did I get this?
8 4 2 1 | - Remember I am only working with the network bits to the left of the line. So I use the
standard Binary-Decimal conversion of 128, 64, 32, 16, 8, 4, 2, 1 (for a byte) Since I only have 4
network bits to work with, I only use 8, 4, 2, 1. To get Subnet 3 – 0 for the 8 bit, 0 for the 4 bit, 1
for the 2 bit, 1 for the 1 bit.
7.4.63.00110000 /28
What is the IP address now? I need to look at the whole byte. So convert from binary to
decimal the following byte – 00110000 (as shown above) Using the Binary to Decimal
conversion of 128, 64, 32, 16, 8, 4, 2, 1:
7.4.63.48 (32+16 = 48) This is the network address for subnet 3.
The subnet mask would be a count (Binary to Decimal) of all network bits. In our example the
network bits are: NNNNNNNN.NNNNNNNN.NNNNNNNN.NNNNHHHH or
11111111.11111111.11111111.11110000 = 255.255.255.240 or /28 (/28 is a count of all
network bits turned on)
The 1st available IP Address for our hosts would look like this in binary:
00000111.00000100.00111111.0011 (This is our network address) 0001 (Host address)
=7.4.63.49
7.4.63.48 /28
Our last IP address would be all Host bits turned on (except the last one) or:
00000111.00000100.00111111.0011 (This is our network address) 1110 (Host address)
=7.4.63.62
The broadcast address would be all Host bits turned on or:
00000111.00000100.00111111.0011 (This is our network address) 1111 (Host address)
=7.4.63.63
7.4.63.0 255.255.255.0
Network Address: 7.4.63.48
Subnet Mask: 255.255.255.240 or /28
1st Available IP Address: 7.4.63.49
Last Available IP Address: 7.4.63.62
Broadcast Address: 7.4.63.63
On to the next problem?
Try solving for:
56.2.0.0 255.255.0.0
I need at least 3 subnets.
Solve for Subnet 1.
56.2.0.0
255.255.0.0
Class A (56.2.0.0) – Default subnet mask for a Class A is 255.0.0.0 or /8
The IP address would split up Network vs Host bits like this: NNNNNNNN.NNNNNNNN.HHHHHHHH.HHHHHHHH
(See subnet mask in Title – Since it is a /16 subnet mask, the first 16 bits are on (1) – thus network bits)
I have 16 host bits to work with. I cannot use Network Bits already taken. Therefore, I cannot use 255.255. I can
only use the host bits when subnetting.
In my network, I need at least 3 subnet addresses per network. (8 is a variable number depending on your network)
56.2._ _ _ _ _ _ _ _._ _ _ _ _ _ _ _
56.2. 2 4 8 16 32 64 128 . …
Count host bits from the right to left; network bits from the left to rt.
I can get 2 network bits in the first bit from the left to right (a 0 or a 1)
So to get 3 subnet (network) addresses – my line goes here:
56.2. 2 4 | 8 16 32 64 128 . …
56.2.0.0
255.255.0.0
56.2. _ _ | _ _ _ _ _ _ . _ _ _ _ _ _ _ _
So everything to the left of the line is now a Network bit and everything to the right of the line is
a Host bit. 56.2.NNHHHHHH.HHHHHHHH (Giving me approximately 4 Network Address and
16384 Host Addresses)
I want to solve for Subnet 1. Subnet 0 would look like this: 56.2.00 | 000000.00000000 /18
Subnet 1 would look like this: 56.2.01 | 000000.00000000 /18 How did I get this?
2 1 | - Remember I am only working with the network bits to the left of the line. So I use the
standard Binary-Decimal conversion of 128, 64, 32, 16, 8, 4, 2, 1 (for a byte) Since I only have 2
network bits to work with, I only use 2, 1. To get Subnet 1 –0 for the 2 bit, 1 for the 1 bit.
56.2.01000000.00000000 /18
What is the IP address now? I need to look at the whole byte. So convert from binary to
decimal the following byte – 01000000 (as shown above) Using the Binary to Decimal
conversion of 128, 64, 32, 16, 8, 4, 2, 1:
56.2.64.0
This is the network address for subnet 1.
The subnet mask would be a count (Binary to Decimal) of all network bits. In our example the
network bits are: NNNNNNNN.NNNNNNNN.NNHHHHHHHH.HHHHHHHH or
11111111.11111111.11000000.00000000 = 255.255.192.0 or /18 (/18 is a count of all network
bits turned on)
The 1st available IP Address for our hosts would look like this in binary:
00111000.00000010.01(This is our network address) 000000. 00000001 (Host address)
=56.2.64.1
56.2.64.0 /18
Our last IP address would be all Host bits turned on (except the last one) or:
00111000.00000010.01(This is our network address) 111111.11111110 (Host address)
=56.2.127.254
The broadcast address would be all Host bits turned on or:
00111000.00000010.01(This is our network address) 111111.11111110 (Host address)
=56.2.127.255
56.2.64.0 255.255.192.0
Network Address: 56.2.64.0
Subnet Mask: 255.255.192.0 or /18
1st Available IP Address: 56.2.64.1
Last Available IP Address: 56.2.127.254
Broadcast Address: 56.2.127.255
ANDing
ANDing is the process a router uses to determine the network address for a packet. Which
interface should this packet go out? It takes the destination address and adds it to the subnet
mask to determine the number address
destination address + subnet mask = network address
For example, let’s and a packet going to 10.25.6.1 /24. Which network does this belong to?
To determine this I need to convert from decimal to binary.
10.25.6.1 /24
10.25.6.1
00001010.00011001.00000110.00000001
Destination Address
255.255.255.0
11111111.11111111.11111111.00000000
Subnet Mask
--------------------------------------------------------------------------------
10.25.6.0
00001010.00011001.00000110.00000000
Network Address
How did I get this?
0+0=0
0+1=0
1+0=0
1+1=1
Then convert the Network address back to decimal to get – 10.25.6.0
Now the router “knows” which network this packet belongs and can send it out the appropriate
interface.
155.64.95.7 /16
155.64.95.7
10011011.01000000.01011111.00000111
Destination Address
255.255.0.0
11111111.11111111.00000000.00000000
Subnet Mask
--------------------------------------------------------------------------------
155.64.0.0
10011011.01000000.00000000.00000000
Network Address
How did I get this?
0+0=0
0+1=0
1+0=0
1+1=1
Then convert the Network address back to decimal to get – 155.64.0.0
25.9.173.46 /9
25.9.173.46
00011001.00001001.10101101.00101110
Destination Address
255.128.0.0
11111111.10000000.00000000.00000000
Subnet Mask
--------------------------------------------------------------------------------
25.0.0.0
00011001.00000000.00000000.00000000
Network Address
How did I get this?
0+0=0
0+1=0
1+0=0
1+1=1
Then convert the Network address back to decimal to get – 25.0.0.0
VLSM
VLSM or Variable Length Subnet Mask is a more efficient way to subnet a network. You do not
waste as many IP addresses.
Let’s look at this picture of our network:
30
hosts
60
hosts
30
hosts
Sydney
Melbourne
Brisbane
Perth
30
hosts
30
hosts
60
hosts
30
hosts
Sydney
Melbourne
Brisbane
Perth
30
hosts
So in our picture above:
LAN - Sydney needs 30 hosts
LAN – Melbourne needs 30 hosts
LAN – Perth needs 30 hosts
LAN – Brisbane needs 60 hosts
WAN – Connection between Sydney and Melbourne (2 host addresses – one for each router connection)
WAN – Connection between Melbourne and Perth (2 host addresses)
WAN – Connection between Perth and Brisbane (2 host addresses)
WAN – Connection between Brisbane and Sydney (2 host addresses)
30
hosts
60
hosts
30
hosts
Sydney
Melbourne
Brisbane
Perth
30
hosts
In VLSM – always solve for the most networks down to the least networks.
Let’s say we were given the IP address 192.168.187.0 255.255.255.0
How would we use this address to subnet for all the networks shown in the picture? (4 LAN and 4 WAN)
Starting with the “most networks” we would first solve for the LAN Brisbane network which needs 60 host
addresses
Remember we can only work with host bits to subnet; we cannot use network bits already used.
So all we have to work with are the last 8 host bits (See Subnet Mask – which determines this)
30
hosts
60
hosts
30
hosts
Sydney
Melbourne
Brisbane
Perth
LAN Brisbane needs 60 hosts from IP Address 192.168.187.0 /24
192.168.187._ _ _ _ _ _ _ _
Count host bits from the right; network bits from the left
192.168.187. 256 128 64 32 16 8 4 2 I can get 2 hosts in the first bit from the right (0 or 1)
So to get 60 host addresses – my line goes here:
192.168.187. 256 128 | 64 32 16 8 4 2
192.168.187.NN | HHHHHH
In VLSM – start with subnet 0
30
hosts
30
hosts
60
hosts
30
hosts
Sydney
Melbourne
Brisbane
Perth
30
hosts
LAN - BRISBANE 60 hosts
192.168.187.NN | HHHHHH
In VLSM – start with subnet 0
So the network address is: 192.168.187.00 | 000000
or 192.168.187.0
The subnet mask is: 11111111.11111111.11111111.11000000
or 255.255.255.192 or /26
The first IP host address to assign is: 192.168.187.00 | 000001
or 192.168.187.1
The last IP host address to assign is: 192.168.187.00 | 111110
or 192.168.187.62
The broadcast address for this network is: 192.168.187.00 | 111111 or 192.168.187.63
Since our next largest network is either LAN – Sydney, LAN-Melbourne, or LAN-Perth, we can do these in any
order.
30
hosts
60
hosts
30
hosts
Sydney
Melbourne
Brisbane
Perth
30
hosts
LAN – SYDNEY 30 hosts
192.168.187.NNN | HHHHH
In VLSM – start with subnet 0; Already used; Now let’s use Subnet 1:
So the network address is: 192.168.187.010 | 00000
or 192.168.187.64
The subnet mask is: 11111111.11111111.11111111.11100000
or 255.255.255.224 or /27
The first IP host address to assign is: 192.168.187.010 | 00001
or 192.168.187.65
The last IP host address to assign is: 192.168.187.010 | 11110
or 192.168.187.94
The broadcast address for this network is: 192.168.187.010 | 11111 or 192.168.187.95
30
hosts
60
hosts
30
hosts
Sydney
Melbourne
Brisbane
Perth
30
hosts
LAN – MELBOURNE 30 hosts
192.168.187.NNN | HHHHH
So the network address is: 192.168.187.011 | 00000
or 192.168.187.96
The subnet mask is: 11111111.11111111.11111111.11100000
or 255.255.255.224 or /27
The first IP host address to assign is: 192.168.187.011 | 00001
or 192.168.187.97
The last IP host address to assign is: 192.168.187.011 | 11110
or 192.168.187.126
The broadcast address for this network is: 192.168.187.011 | 11111 or 192.168.187.127
30
hosts
60
hosts
30
hosts
Sydney
Melbourne
Brisbane
Perth
30
hosts
LAN – PERTH 30 hosts
192.168.187.NNN | HHHHH
So the network address is: 192.168.187.100 | 00000
or 192.168.187.128
The subnet mask is: 11111111.11111111.11111111.11100000
or 255.255.255.224 or /27
The first IP host address to assign is: 192.168.187.100 | 00001
or 192.168.187.129
The last IP host address to assign is: 192.168.187.100 | 11110
or 192.168.187.158
The broadcast address for this network is: 192.168.187.100 | 11111 or 192.168.187.159
30
hosts
60
hosts
30
hosts
Sydney
Melbourne
Brisbane
Perth
30
hosts
WAN – Sydney to Melbourne - 2 hosts needed (one for each router on each end)
192.168.187.NNNNNN | HH
So the network address is: 192.168.187.101000 | 00
or 192.168.187.160
The subnet mask is: 11111111.11111111.11111111.11100000
or 255.255.255.230 or /30
The first IP host address to assign is: 192.168.187.101000 | 01
or 192.168.187.161
The last IP host address to assign is: 192.168.187.101000 | 11
or 192.168.187.162
The broadcast address for this network is: 192.168.187.101000 | 11 or 192.168.187.163
30
hosts
60
hosts
30
hosts
Sydney
Melbourne
Brisbane
Perth
30
hosts
WAN – Melbourne to Perth- 2 hosts needed (one for each router on each end)
192.168.187.NNNNNN | HH
So the network address is: 192.168.187.101001 | 00
or 192.168.187.164
The subnet mask is: 11111111.11111111.11111111.11100000
or 255.255.255.230 or /30
The first IP host address to assign is: 192.168.187.101001 | 01
or 192.168.187.165
The last IP host address to assign is: 192.168.187.101001 | 10
or 192.168.187.166
The broadcast address for this network is: 192.168.187.101001 | 11 or 192.168.187.167
30
hosts
60
hosts
30
hosts
Sydney
Melbourne
Brisbane
Perth
30
hosts
WAN –Perth to Brisbane- 2 hosts needed (one for each router on each end)
192.168.187.NNNNNN | HH
So the network address is: 192.168.187.101010 | 00
or 192.168.187.168
The subnet mask is: 11111111.11111111.11111111.11100000
or 255.255.255.230 or /30
The first IP host address to assign is: 192.168.187.101010 | 01
or 192.168.187.169
The last IP host address to assign is: 192.168.187.101010 | 10
or 192.168.187.170
The broadcast address for this network is: 192.168.187.101010 | 11 or 192.168.187.171
30
hosts
60
hosts
30
hosts
Sydney
Melbourne
Brisbane
Perth
30
hosts
WAN –Brisbane to Sydney - 2 hosts needed (one for each router on each end)
192.168.187.NNNNNN | HH
So the network address is: 192.168.187.101011 | 00
or 192.168.187.172
The subnet mask is: 11111111.11111111.11111111.11100000
or 255.255.255.230 or /30
The first IP host address to assign is: 192.168.187.101011 | 01
or 192.168.187.173
The last IP host address to assign is: 192.168.187.101011 | 10
or 192.168.187.174
The broadcast address for this network is: 192.168.187.101011 | 11 or 192.168.187.175
VLSM Network for Australia
Connection
Network Address
LAN Brisbane
192.168.187.0 /26
LAN Sydney
192.168.187.64 /27
LAN Melbourne
192.168.187.96 /27
LAN Perth
192.168.187.128 /27
WAN Sydney to Melbourne
192.168.187.160 /30
WAN Melbourne to Perth
192.168.187.164 /30
WAN Perth to Brisbane
192.168.187.168 /30
WAN Brisbane to Sydney
192.168.187.172 /30
Notice the subnet mask varies thus VLSM (Variable Length Subnet Mask)