+ All Categories
Home > Documents > Classless Subnetting

Classless Subnetting

Date post: 16-Jan-2016
Category:
Upload: murugesan-eswaran
View: 270 times
Download: 8 times
Share this document with a friend
Description:
DGCVBNB
27
Subnetting Rick Graziani Cabrillo College Note: These example use classless addressing. Instead of a default classful mask, a network mask is given.
Transcript
Page 1: Classless Subnetting

Subnetting

Rick Graziani

Cabrillo College

Note: These example use classless addressing. Instead of a default classful mask, a network mask is given.

Page 2: Classless Subnetting

Rick Graziani [email protected] 2

What is subnetting?

• Subnetting is the process of borrowing bits from the HOST bits, in order to divide the larger network into small subnets.

• Subnetting does NOT give you more hosts, but actually costs you hosts.• You lose two host IP Addresses for each subnet, and perhaps one for the

subnet IP address and one for the subnet broadcast IP address.• You lose the last subnet and all of it’s hosts’ IP addresses as the

broadcast for that subnet is the same as the broadcast for the network.• In older networks, you would have lost the first subnet, as the subnet IP

address is the same as the network IP address. (This subnet can be used in most networks.)

Network Network Host Host

172 16 0 0

Network Network Subnet Host

Page 3: Classless Subnetting

Rick Graziani [email protected] 3

Analogy

Dividing the barrel of apples into small barrels or baskets does not give us any more apples…

                                                                                                                               

100 Apples

Page 4: Classless Subnetting

Rick Graziani [email protected] 4

Analogy

• It is the same as taking a barrel of 100 apples and dividing it into 10 barrels of 10 apples each.

                                                                                                                                                                                               

10

10

10

1010

10

10

10

10

10

10 barrels x 10 apples = 100 apples

100 Apples (10 * 10)

Page 5: Classless Subnetting

Rick Graziani [email protected] 5

Analogy

Before subnetting:

• In any network (or subnet) we can not use all the IP addresses for host addresses.

• We lose two addresses for every network or subnet.

1. Network Address - One address is reserved to that of the network.

2. Broadcast Address – One address is reserved to address all hosts in that network or subnet.

                                                                                                                               

100 – 2 apples = 98 Usable Apples

98 Apples (100 – 2)

Page 6: Classless Subnetting

Rick Graziani [email protected] 6

• In subnetting we will see that we continue to lose two apples per subnet, one for the address and one for the broadcast.

                                                                                                                                                                                               

(less 2) (less 2) (less 2)

(less 2) (less 2) (less 2)

(less 2) (less 2) (less 2)

8 8 8

8 8 8

8 8 8

8

10 barrels x 8 apples = 80 apples

80 Apples 10 * (10 - 2)

Page 7: Classless Subnetting

Rick Graziani [email protected] 7

• We “might” also lose the last basket of apples, subnet, as it contains the broadcast address for the entire network.

• In older networks, we “might” also lost the first basket, subnet, as it contained the address of the entire network, but this is usually no longer the case.

                                                                                                                                                                                               

X

(less 2) (less 2) (less 2)

(less 2) (less 2) (less 2)

(less 2) (less 2) (less 2)

8 8 8

8 8 8

8 8 8

8---

10 barrels x 8 apples = 80 apples

64 Apples 8 * (10 - 2)

X---

Page 8: Classless Subnetting

Rick Graziani [email protected] 8

Subnet Example

Network address 172.16.0.0 with /16 network mask

Network Network Host Host

172 16 0 0

Page 9: Classless Subnetting

Rick Graziani [email protected] 9

Subnet Example

Network Network Subnet Host

Network address 172.16.0.0 with /16 network mask

Using Subnets: subnet mask 255.255.255.0 or /24

• Applying a mask which is larger than the default subnet mask, will divide your network into subnets.

• Subnet mask used here is 255.255.255.0 or /24

Network Mask: 255.255.0.0 or /16

Subnet Mask: 255.255.255.0 or /24

11111111 11111111 00000000 00000000

11111111 11111111 11111111 00000000

Network Network Host Host

172 16 0 0

Page 10: Classless Subnetting

Rick Graziani [email protected] 10

Subnet Example

Network Network Subnet Host

Network address 172.16.0.0 with /16 network mask

172 16 0 Host

172 16 1 Host

172 16 2 Host

Using Subnets: subnet mask 255.255.255.0 or /24

172 16 3 Host

172 16 Etc. Host

172 16 254 Host

172 16 255 Host

255 Subnets

28 - 1

Cannot use last subnet as it contains broadcast address

Subnets

Page 11: Classless Subnetting

Rick Graziani [email protected] 11

Subnet Example

Network Network Subnet Host

Network address 172.16.0.0 with /16 network mask

172 16 0 0

172 16 1 0

172 16 2 0

Using Subnets: subnet mask 255.255.255.0 or /24

172 16 3 0

172 16 Etc. 0

172 16 254 0

172 16 255 0

255 Subnets

28 - 1

Cannot use last subnet as it contains broadcast address

Subnets Addresses

Page 12: Classless Subnetting

Rick Graziani [email protected] 12

Subnet Example

Network Network Subnet Hosts

Class B address 172.16.0.0 with /16 network mask

172 16 0 1

172 16 1 1

172 16 2 1

Using Subnets: subnet mask 255.255.255.0 or /24

172 16 3 1

172 16 Etc. 1

172 16 254 1

172 16 255 HostEach subnet has 254 hosts, 28 – 2

254

254

254

254

254

254

Hosts Addresses

Page 13: Classless Subnetting

Rick Graziani [email protected] 13

Subnet Example

Network Network Subnet Host

Network address 172.16.0.0 with /16 network mask

172 16 0 255

172 16 1 255

172 16 2 255

Using Subnets: subnet mask 255.255.255.0 or /24

172 16 3 255

172 16 Etc. 255

172 16 254 255

172 16 255 255

255 Subnets

28 - 1

Cannot use last subnet as it contains broadcast address

Broadcast Addresses

Page 14: Classless Subnetting

Rick Graziani [email protected] 14

Subnet Example

Network address 172.16.0.0 with /16 network maskUsing Subnets: subnet mask 255.255.255.0 or /24 172.16.0.0/2

4172.16.10.0/24

172.16.5.0/24

172.16.25.0/24

Page 15: Classless Subnetting

Rick Graziani [email protected] 15

Important things to remember about Subnetting

• You can only subnet the host portion, you do not have control of the network portion.

• Subnetting does not give you more hosts, it only allows you to divide your larger network into smaller networks.

• When subnetting, you will actually lose hosts:– For each subnet you lose the address of that subnet– For each subnet you lose the broadcast address of that subnet– You “may” lose the first and last last subnets (coming)

• Analogy: Large barrel of 100 apples.

• Why subnet?– Divide larger network into smaller network.– Limit layer 2 and layer 3 broadcasts to their subnet.– Better management of traffic.

Page 16: Classless Subnetting

Rick Graziani [email protected] 16

• Host IP Address: 172.16.18.33• Network Mask: 255.255.0.0• Subnet Mask: 255.255.255.0

Given the following Host IP Address, Network Mask and Subnet mask find the following information:

• Major Network Information– Major Network Address– Major Network Broadcast Address– Range of Hosts if not subnetted

• Subnet Information– Subnet Address– Range of Host Addresses (first host and last host)– Broadcast Address

• Other Subnet Information– Total number of subnets– Number of hosts per subnet

Subnetting – Example #1 (on the board)

Page 17: Classless Subnetting

Rick Graziani [email protected] 17

• Host IP Address: 138.101.114.250• Network Mask: 255.255.0.0• Subnet Mask: 255.255.255.192

Given the following Host IP Address, Network Mask and Subnet mask find the following information:

• Major Network Information– Major Network Address– Major Network Broadcast Address– Range of Hosts if not subnetted

• Subnet Information– Subnet Address– Range of Host Addresses (first host and last host)– Broadcast Address

• Other Subnet Information– Total number of subnets– Number of hosts per subnet

Subnetting – Example #2

Page 18: Classless Subnetting

Rick Graziani [email protected] 18

Major Network Information

• Host IP Address: 138.101.114.250

• Network Mask: 255.255.0.0

• Subnet Mask: 255.255.255.192

• Major Network Address: 138.101.0.0

• Major Network Broadcast Address: 138.101.255.255

• Range of Hosts if not Subnetted: 138.101.0.1 to 138.101.255.254

Page 19: Classless Subnetting

Rick Graziani [email protected] 19

Step 1:

Translate Host IP Address and Subnet Mask into binary notation

138. 101. 114. 250 IP Address 10001010 01100101 01110010 11111010 Mask 11111111 11111111 11111111 11000000 255. 255. 255. 192

Step 1: Convert to Binary

128 64 32 16 8 4 2 1

Page 20: Classless Subnetting

Rick Graziani [email protected] 20

Step 2:

Determine the Network (or Subnet) where this Host address lives:

1. Draw a line under the mask

2. Perform a bit-wise AND operation on the IP Address and the Subnet Mask

Note: 1 AND 1 results in a 1, 0 AND anything results in a 0

3. Express the result in Dotted Decimal Notation

4. The result is the Subnet Address of this Subnet or “Wire” which is 138.101.114.192

138. 101. 114. 250 IP Address 10001010 01100101 01110010 11111010 Mask 11111111 11111111 11111111 11000000 Network 10001010 01100101 01110010 11000000 138 101 114 192

Step 2: Find the Subnet Address

Page 21: Classless Subnetting

Rick Graziani [email protected] 21

Step 2:

Determine the Network (or Subnet) where this Host address lives:

Quick method:

1. Find the last (right-most) 1 bit in the subnet mask.

2. Copy all of the bits in the IP address to the Network Address

3. Add 0’s for the rest of the bits in the Network Address

138. 101. 114. 250 IP Address 10001010 01100101 01110010 11111010 Mask 11111111 11111111 11111111 11000000 Network 10001010 01100101 01110010 11000000 138 101 114 192

Step 2: Find the Subnet Address

Page 22: Classless Subnetting

Rick Graziani [email protected] 22

Step 3:

Determine which bits in the address contain Network (subnet) information and which contain Host information:

• Use the Network Mask: 255.255.0.0 and divide (Great Divide) the from the rest of the address.

• Use Subnet Mask: 255.255.255.192 and divide (Small Divide) the subnet from the hosts between the last “1” and the first “0” in the subnet mask.

G.D. S.D.

IP Address 10001010 01100101 01110010 11 111010 Mask 11111111 11111111 11111111 11 000000 Network 10001010 01100101 01110010 11 000000 subnet host

counting range counting range

Step 3: Subnet Range / Host Range

Page 23: Classless Subnetting

Rick Graziani [email protected] 23

Host Portion• Subnet Address: all 0’s • First Host: all 0’s and a 1• Last Host: all 1’s and a 0• Broadcast: all 1’s

G.D. S.D.

IP Address 10001010 01100101 01110010 11 111010 Mask 11111111 11111111 11111111 11 000000 Network 10001010 01100101 01110010 11 000000 subnet host

counting range counting range

First Host 10001010 01100101 01110010 11 000001 138 101 114 193 Last Host 10001010 01100101 01110010 11 111110 138 101 114 254 Broadcast 10001010 01100101 01110010 11 111111 138 101 114 255

Step 4: First Host / Last Host

Page 24: Classless Subnetting

Rick Graziani [email protected] 24

G.D. S.D.

IP Address 10001010 01100101 01110010 11 111010 Mask 11111111 11111111 11111111 11 000000 Network 10001010 01100101 01110010 11 000000 subnet host

counting range counting range

First Host 10001010 01100101 01110010 11 000001 138 101 114 193 Last Host 10001010 01100101 01110010 11 111110 138 101 114 254 Broadcast 10001010 01100101 01110010 11 111111 138 101 114 255

• Total number of subnets– Number of subnet bits 10– 210 = 1,024– 1,024 total subnets

• Subtract one “if” all-zeros subnet cannot be used• Subtract one “if” all-ones subnet cannot be used

Step 5: Total Number of Subnets

Page 25: Classless Subnetting

Rick Graziani [email protected] 25

G.D. S.D.

IP Address 10001010 01100101 01110010 11 111010 Mask 11111111 11111111 11111111 11 000000 Network 10001010 01100101 01110010 11 000000 subnet host

counting range counting range

First Host 10001010 01100101 01110010 11 000001 138 101 114 193 Last Host 10001010 01100101 01110010 11 111110 138 101 114 254 Broadcast 10001010 01100101 01110010 11 111111 138 101 114 255

• Total number of hosts per subnet– Number of host bits 6– 26 = 64– 64 host per subnets

• Subtract one for the subnet address• Subtract one for the broadcast address

– 62 hosts per subnet

Step 6: Total Number of Hosts per Subnet

Page 26: Classless Subnetting

Rick Graziani [email protected] 26

Your Turn!

Problem 1

• Host IP Address: 10.10.10.193

• Network Mask: 255.255.0.0

• Subnet Mask: 255.255.255.0

Problem 2

• Host IP Address: 10.10.10.193

• Network Mask: 255.255.255.0

• Subnet Mask: 255.255.255.240

Problem 3

• Host IP Address: 10.10.10.193

• Network Mask: 255.255.255.0

• Subnet Mask: 255.255.255.252

Page 27: Classless Subnetting

Subnetting

Rick Graziani

Cabrillo College


Recommended