Chabot College ELEC 99.08 Subnet Review CISCO NETWORKING ACADEMY

advertisement
Chabot College
ELEC 99.08
Subnet Review
CISCO NETWORKING ACADEMY
Address Classes
1st octet
Class A (0 - 127) Network
2nd octet
3rd octet
4th octet
Host
Host
Host
Host
Host
Class B (128-191) Network Network
Class C (192-223) Network Network Network
CISCO NETWORKING ACADEMY
Host
IP Address Composition
IP address may have an additional field,
the subnet field, that is used to identify
smaller networks within a larger network.
NETWORK
NUMBER
CISCO NETWORKING ACADEMY
SUBNET
NUMBER
HOST
NUMBER
The Subnet Mask
Address
Mask
Network
207
Network
21
Network
54
Host
8
11001111
00010101
00110110
11111111
11111111
11111111
00001000
00000000
255
255
255
0
Mask has:
1s in the network/subnet portion
0s in the host portion
CISCO NETWORKING ACADEMY
The Default Subnet Masks
Class A or /8
255
0
0
0
Class B or /16
255
255
0
0
Class C or /24
255
255
255
0
If any additional bits in the subnet mask are set
to “1,” then subnets have been created.
CISCO NETWORKING ACADEMY
Octet - binary/decimal equivalents (memorize)
Bit
27
26
25
24
23
22
21
20
=
128
64
32
16
8
4
2
1
=
Decimal
Value
1
0
0
0
0
0
0
0
=
128
1
1
0
0
0
0
0
0
=
192
1
1
1
0
0
0
0
0
=
224
1
1
1
1
0
0
0
0
=
240
1
1
1
1
1
0
0
0
=
248
1
1
1
1
1
1
0
0
=
252
1
1
1
1
1
1
1
0
=
254
1
1
1
1
1
1
1
1
=
255
CISCO NETWORKING ACADEMY
Class C : 1-bit Mask (/25)
Address
Mask
Network
207
Network
21
Network
54
Host
8
11001111
00010101
00110110
11111111
11111111
11111111
00001000
10000000
255
255
255
128
Masks can be written different ways.
When the phrase “1-bit” mask is used, that means 1 more bit than the default.
This example can also be called a 25-bit mask, or /25.
CISCO NETWORKING ACADEMY
All Zeros / All Ones
• The address of the subnet itself (the wire) has
a host portion that is all zeros.
• The broadcast address for the subnet has
a host portion that is all ones.
Subnet addr.
Broadcast addr.
Decimal
0=
127 =
Binary
00000000
01111111
Subnet addr.
Broadcast addr.
128 =
255 =
10000000
11111111
CISCO NETWORKING ACADEMY
Subnet #0
Subnet #1
Class C : 1-bit Mask (/25)
Address
Mask
Network
207
Network
21
Network
54
Host
0
11001111
00010101
00110110
11111111
11111111
11111111
00000000
10000000
255
255
255
128
Because this is a class C, all nodes on this network will share the
first three octets. Those numbers are not an issue.
CISCO NETWORKING ACADEMY
Last Octet
1-bit Mask (/25)
Host
0
Address
Mask
00000000
10000000
128
1 bit
How many subnets can we have with 1 bit?
21 = 2 different possibilities
CISCO NETWORKING ACADEMY
Last Octet
1-bit Mask (/25)
Decimal
0=
127 =
Binary
00000000
01111111
128 =
10000000
255 =
11111111
Subnet #0
Subnet #1
7 bits
How many hosts can be on each subnet?
27 = 128 different possibilities MINUS TWO.
CISCO NETWORKING ACADEMY
Test Question Type 1
IP Address 169.199.69.137
Subnet Mask 255.255.255.192
• How many subnets are created by this mask?
• How many hosts can be on each subnet?
Steps:
• Identify address class & network bits
• Count subnet bits; express as power of 2 (-2)
• Count host bits; express as power of 2 (-2)
CISCO NETWORKING ACADEMY
Step 1: Identify Class & Network Bits
Address
Mask
Network
169
Network
199
Subnet
69
10101001
11000111
01000101
10001001
11111111
255
11111111
255
11111111
255
11000000
192
16 bits
CLASS B - ignore network octets
CISCO NETWORKING ACADEMY
Host
137
Step 2: Count Subnet Bits
Address
Mask
Network
169
Network
199
Subnet
69
Host
137
10101001
11000111
01000101
10001001
11111111
255
11111111
255
11111111
255
11000000
192
10 bits
210 = 1,024 possible subnets MINUS TWO
CISCO NETWORKING ACADEMY
Step 3: Count Host Bits
Address
Mask
Network
169
Network
199
Subnet
69
Host
137
10101001
11000111
01000101
10001001
11111111
255
11111111
255
11111111
255
11000000
192
6 bits
26 = 64 possible hosts / subnet MINUS TWO.
CISCO NETWORKING ACADEMY
Test Question Type 2
Long Method
IP Address 169.199.69.137
Subnet Mask 255.255.255.192
• What is this host’s subnetwork number?
• What is the broadcast address for the subnet that contains
this host?
Method:
• Count host bits; determine how many host addresses/subnet
• List the host ranges in each subnet (Multiples of 2N)
• Find the subnet containing the target address
• The first address will have all 0s in the host portion
• The last address will have all 1s in the host portion
CISCO NETWORKING ACADEMY
Step 1: Count Host Bits
Address
Mask
Network
169
Network
199
Network
69
Host
137
10101001
11000111
01000101
10001001
11111111
255
11111111
255
11111111
255
11000000
192
6 bits
26 = 64 host address / subnet
Increment host ranges by 64.
CISCO NETWORKING ACADEMY
Remaning Steps:
List host ranges in each subnet
Find subnet containing target address
First address is subnet, last is broadcast
Sub
net
Subnetwork Address
Range of possible
Host IP Addresses
Subnet mask
Broadcast Address
0
255.255.255.192
169.199.69.0
169.199.69.1 - 62
169.199.69.63
1
255.255.255.192
169.199.69.64
169.199.69.65 - 126
169.199.69.127
2
255.255.255.192
169.199.69.128
169.199.69.129 - 190
169.199.69.191
3
255.255.255.192
169.199.69.192
169.199.69.193 - 254
169.199.69.255
Subnet address is: 169.199.69.128
Subnet broadcast address is: 169.199.69.191
CISCO NETWORKING ACADEMY
Test Question Type 2
Quick Method
IP Address 169.199.69.137
Subnet Mask 255.255.255.192
• What is this host’s subnetwork number?
Steps:
1. Convert address & mask to binary
2. Replace host portion of address with all 0s
3. Convert each octet back to dotted decimal
• Tip: Ignore any octets with a mask that is all 1s
CISCO NETWORKING ACADEMY
Tip: Ignore octets masked with all 1s:
Address
Mask
169
199
69
137
11111111
255
11111111
255
11111111
255
11000000
192
The values of these octets are the same for the
subnet network & broadcast address.
CISCO NETWORKING ACADEMY
Step 1: Convert to binary
Address
Mask
169
199
69
137
10001001
11111111
255
11111111
255
11111111
255
Convert the remaining octet(s).
CISCO NETWORKING ACADEMY
11000000
192
Step 2: Set host portion of address to all 0s
(Value of this octet
will change)
Host
Address
Mask
169
199
69
10101001
11000111
01000101
10000000
11111111
255
11111111
255
11111111
255
11000000
192
CISCO NETWORKING ACADEMY
Step 3:
Convert octet back to dotted decimal
Address
Mask
Host
128
169
199
69
10101001
11000111
01000101
10000000
11111111
255
11111111
255
11111111
255
11000000
192
Subnet address is: 169.199.69.128
CISCO NETWORKING ACADEMY
Quick Method - Broadcast addr.
IP Address 169.199.69.137
Subnet Mask 255.255.255.192
• What is the broadcast address for the subnet that
contains this host?
Same method, but use all 1s in step 2:
1. Convert address & mask to binary
2. Set host portion of address to all 1s
3. Convert each octet back to dotted decimal
CISCO NETWORKING ACADEMY
Tip: Ignore octets masked with all 1s:
Address
Mask
169
199
69
137
11111111
255
11111111
255
11111111
255
11000000
192
CISCO NETWORKING ACADEMY
Step 1: Convert to binary
Address
Mask
169
199
69
137
10001001
11111111
255
CISCO NETWORKING ACADEMY
11111111
255
11111111
255
11000000
192
Step 2: Set host portion of address to all 1s
(Value of this octet
will change)
Host
Address
Mask
169
199
69
10101001
11000111
01000101
10111111
11111111
255
11111111
255
11111111
255
11000000
192
CISCO NETWORKING ACADEMY
Step 3:
Convert each octet back to dotted decimal
Address
Mask
Host
191
169
199
69
10101001
11000111
01000101
10111111
11111111
255
11111111
255
11111111
255
11000000
192
Subnet broadcast address is: 169.199.69.191
CISCO NETWORKING ACADEMY
Second Example, Quick Method
IP Address 169.199.69.137
Subnet Mask 255.255.248.0
• What is this host’s subnet number?
• What is the broadcast address for that subnet?
Steps:
• Convert address & mask to binary
• Replace host portion of address with all 0s for subnet
• Replace host portion of address with all 1s for broadcast
• Convert each octet back to dotted decimal
CISCO NETWORKING ACADEMY
Ignore octets masked with all 1s:
Address
Mask
169
199
69
137
11111111
255
11111111
255
11111000
248
00000000
0
CISCO NETWORKING ACADEMY
Step 1: Convert to binary
Address
Mask
169
11111111
255
CISCO NETWORKING ACADEMY
199
11111111
255
69
137
01000101
10001001
11111000
248
00000000
0
Subnet Address
Step 2: Set host portion of address to all 0s
(Value of these octets
will change)
Subnet
Address
Mask
169
11111111
255
CISCO NETWORKING ACADEMY
Host
199
11111111
255
01000000
00000000
11111000
248
00000000
0
Step 3:
Convert each octet back to dotted decimal
Address
Mask
169
199
11111111
255
11111111
255
Subnet
64
01000000
Host
0
00000000
11111000
248
00000000
0
Subnet address is: 169.199.64.0
CISCO NETWORKING ACADEMY
Broadcast Address
Step 2: Set host portion of address to all 1s
(Value of these octets
will change)
Subnet
Address
Mask
169
11111111
255
CISCO NETWORKING ACADEMY
Host
199
11111111
255
01000111
11111111
11111000
248
00000000
0
Step 3:
Convert each octet back to dotted decimal
Address
Mask
169
199
11111111
255
11111111
255
Subnet
71
01000111
Host
255
11111111
11111000
248
00000000
0
Subnet broadcast address is: 169.199.71.255
CISCO NETWORKING ACADEMY
Test Question Type 3
Quick Method
Network 200.199.69.0
Subnet Mask 255.255.255.192
• What is the fourth usable host address on the
second usable subnet?
Steps:
1. Ignore octets masked with all ones.
2. Replace host portion of address with binary four
3. Replace subnet portion with binary two
3. Convert each octet back to dotted decimal
CISCO NETWORKING ACADEMY
Step 1: Ignore octets masked with all 1s:
Address
Mask
200
199
69
137
11111111
255
11111111
255
11111111
255
11000000
192
These octets won’t change.
CISCO NETWORKING ACADEMY
Step 2: Set host portion to binary four
Host
Address
Mask
200
199
69
10101001
11000111
01000101
000100
11111111
255
11111111
255
11111111
255
11000000
192
Reserved
First usable host
Fourth usable host
CISCO NETWORKING ACADEMY
000000
000001
000010
000011
000100
Step 3: Set subnet portion to binary two
Host
Address
Mask
200
199
69
10101001
11000111
01000101
10000100
11111111
255
11111111
255
11111111
255
11000000
192
Reserved
First usable subnet
Second usable subnet
CISCO NETWORKING ACADEMY
00
01
10
11
Step 3:
Convert octet back to dotted decimal
Address
Mask
Host
132
200
199
69
10101001
11000111
01000101
10000100
11111111
255
11111111
255
11111111
255
11000000
192
Fourth usable address in second usable
subnet is: 169.199.69.132
CISCO NETWORKING ACADEMY
Quick Method - General Strategy
1. Ignore octets masked 255.
2. Convert remaining octets to binary.
2. Segment binary address into portions:
network | subnet | host
4. Use your understanding of binary addressing to
answer the problem.
5. Convert each octet back to dotted decimal.
CISCO NETWORKING ACADEMY
Download