Configuring Subnetting

pigeoneggtrainsΔίκτυα και Επικοινωνίες

24 Οκτ 2013 (πριν από 3 χρόνια και 9 μήνες)

95 εμφανίσεις

© 2005 Hewlett
-
Packard Development Company, L.P.

The information contained herein is subject to change without notice

Configuring Subnetting

Module 6



H3065S

F.00


H3065S F.00

© 2005 Hewlett
-
Packard Development Company, L.P.

2

Limitations of Large Networks


/8 networks provide ~16 million host addresses


/16 networks provide ~65 thousand host addresses


Reasons for
not

putting 65 thousand hosts on one network:

packet

65,000 hosts

. . .

. . .

H3065S F.00

© 2005 Hewlett
-
Packard Development Company, L.P.

3

Subnetting Concept

Subnet 128.1.3.0

(254 hosts)

Subnet 128.1.1.0

(254 hosts)

Subnet 128.1.2.0

(254 hosts)


Break a large network into more manageable subnetworks


Example: Subnetting a /16 network

Router

Router

Router

Non
-
subnetted network:

one network with 65,535 nodes

Subnetted network:

254 subnets, each with 254 nodes

Network 128.1.0.0/16

(65,535 hosts)

H3065S F.00

© 2005 Hewlett
-
Packard Development Company, L.P.

4

IP Addresses in a Subnetted Network

Non
-
subnetted network: IP addresses have two components.


Subnetted network: IP addresses have
three

components.

Network Bits

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

128

. 1 . 0 . 0

1 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

128

. 1 . 1 . 0

0 0 0 0 0 0 0 1

0 0 0 0 0 0 0 1

1 0 0 0 0 0 0 0

0 0 0 0 0 0 0 1

Host Bits

Network Bits

Subnet Bits

Network Bits

Host Bits

Network Bits

Host Bits

H3065S F.00

© 2005 Hewlett
-
Packard Development Company, L.P.

5

Netmasks in a Subnetted Network

1 1 1 1 1 1 1 1

Netmask for a non
-
subnetted /16 network:

1 1 1 1 1 1 1 1

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0
= 255.255.0.0

Netmask for /24 subnetworks on a /16 network:

0 0 0 0 0 0 0 0
= 255.255.255.0

The netmask masks network and subnet bits with 1s.

1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1

Network Bits

Host Bits

Network Bits

Subnet Bits

Network Bits

Host Bits

Network Bits

Host Bits

H3065S F.00

© 2005 Hewlett
-
Packard Development Company, L.P.

6

Subnet Addresses

0 0 0 0 0 0 0 1

1 0 0 0 0 0 0 0

0 0 0 0 0 0 0 1


Example
: Network 128.1.0.0/16 subnetted into 254 subnets

0 0 0 0 0 0 0 0
1
st

subnet

0 0 0 0 0 0 0 0
2nd subnet

0 0 0 0 0 0 0 0
3rd subnet

0 0 0 0 0 0 0 0
4th subnet

0 0 0 0 0 0 0 0
254th subnet

. . .


.

. . .


.

.

. .


.

0 0 0 0 0 0 1 0

1 0 0 0 0 0 0 0

0 0 0 0 0 0 0 1

0 0 0 0 0 0 1 1

1 0 0 0 0 0 0 0

0 0 0 0 0 0 0 1

0 0 0 0 0 1 0 0

1 0 0 0 0 0 0 0

0 0 0 0 0 0 0 1

1 1 1 1 1 1 1 0

1 0 0 0 0 0 0 0

0 0 0 0 0 0 0 1

Netmask = 255.255.255.0

Network Bits

Host Bits

Network Bits

Subnet Bits

H3065S F.00

© 2005 Hewlett
-
Packard Development Company, L.P.

7

Host IP Addresses on a Subnet


The host address with all 0s represents the address for the entire subnet.


The host address with all 1s represents the broadcast address for the subnet.


All other addresses within the subnet may be used for hosts.


Examples: IP addresses for subnet 128.1.1.0/24:

.

.

.

Subnet #1 :

10000000.00000001.00000001.00000000 = 128.1.1.0/24

Host #1 :

10000000.00000001.00000001.00000001 = 128.1.1.1/24

Host #2 :

10000000.00000001.00000001.00000010 = 128.1.1.2/24

Host #3 :

10000000.00000001.00000001.00000011 = 128.1.1.3/24



Host #253 :

10000000.00000001.00000001.11111101 = 128.1.1.253/24

Host #254 :

10000000.00000001.00000001.11111110 = 128.1.1.254/24

Broadcast :

10000000.00000001.00000001.11111111 = 128.1.1.255

.

.

.

.

.

.

Netmask = 255.255.255.0

H3065S F.00

© 2005 Hewlett
-
Packard Development Company, L.P.

8

Limitations of Subnetting on an Octet
Boundary

How would you subnet your network, if . . .


You have a /24 network address?


You want exactly six subnets from a /16 network address?

H3065S F.00

© 2005 Hewlett
-
Packard Development Company, L.P.

9

Subnetting on a Non
-
Octet Boundary

0 0 0 0 1 1 0 0

1 1 0 0 0 0 0 0

0 0 0 0 0 1 1 0

0 0 0 0 1 1 0 0

1 1 0 0 0 0 0 0

0 0 0 0 0 1 1 0

0 0 0 0 1 1 0 0

1 1 0 0 0 0 0 0

0 0 0 0 0 1 1 0

0 0 0 0 1 1 0 0

1 1 0 0 0 0 0 0

0 0 0 0 0 1 1 0

0 0 0 0 1 1 0 0

1 1 0 0 0 0 0 0

0 0 0 0 0 1 1 0

Netmask = 255 . 255 . 255 . 224

0 0 0 0 1 1 0 0

1 1 0 0 0 0 0 0

0 0 0 0 0 1 1 0


Example
: Network 192.6.12.0/24 subnetted into 6 subnets:

0 0 1 0 0 0 0 0
1
st

subnet

0 1 0 0 0 0 0 0
2
nd

subnet

1 0 0 0 0 0 0 0
4
th

subnet

1 1 0 0 0 0 0 0
6
th

subnet

1 0 1 0 0 0 0 0
5
th

subnet

0 1 1 0 0 0 0 0
3
rd

subnet

Network Bits

Subnet

Bits

Network Bits

Network Bits

Host

Bits

H3065S F.00

© 2005 Hewlett
-
Packard Development Company, L.P.

10

Routers in a Subnetted Network

Facilities subnet (192.6.12.128/27)

Router

Router

Manufacturing subnet
(192.6.12.32/27)

Marketing subnet
(192.6.12.64/27)

Finance subnet

(192.6.12.96/27)

Router

H3065S F.00

© 2005 Hewlett
-
Packard Development Company, L.P.

11

Configuring Subnetting

HostA# ifconfig lan0 192.6.12.34 netmask 255.255.255.224 up

HostA# route add default 192.6.12.33 1


Facilities subnet (192.6.12.128/27)

Manufacturing subnet
(192.6.12.32/27)

192.6.12.129/27

192.6.12.33/27

192.6.12.34/27

HostA

192.6.12.35/27

HostB

192.6.12.36/27

HostC

H3065S F.00

© 2005 Hewlett
-
Packard Development Company, L.P.

12

Lab

activity

H3065S F.00

© 2005 Hewlett
-
Packard Development Company, L.P.

13