Subnetting and Supernetting

dimerusticNetworking and Communications

Oct 23, 2013 (3 years and 10 months ago)

118 views

Forouzan Notes
5-
Slides from TCP/IP - Forouzan
COSC 6377
-
Fall 2000
Forouzan Notes 5-1COSC 6377 - Fall 2000
Chapter 5
Subnetting and
Supernetting
 Subnetting
 Masking
 Examples of Subnetting
 Variable-Length Subnetting
 Supernetting
Forouzan Notes 5-2COSC 6377 - Fall 2000
Figure 5-1
A network with two levels of hierarchy (not subnetted)
To the rest of
the Internet
141.14.2.20
141.14.2.21
141.14.2.105
141.14.7.44
141.14.7.95
141.14.7.96
141.14.22.8
141.14.22.9
141.14.22.64
141.14.0.0
Network
R1
Forouzan Notes
5-
Slides from TCP/IP - Forouzan
COSC 6377
-
Fall 2000
Forouzan Notes 5-3COSC 6377 - Fall 2000
Figure 5-2
A network with three levels of hierarchy (subnetted)
Subnetwork
Subnetwork
Subnetwork
141.14.0.0
Site
141.14.2.20
141.14.2.21
141.14.2.105
141.14.7.44
141.14.7.45
141.14.7.96
141.14.22.8
141.14.22.9
141.14.22.64
141.14.2.0
141.14.7.0
141.14.22.0
R1
To the rest of
the Internet
Forouzan Notes 5-4COSC 6377 - Fall 2000
Figure 5-3
Addresses in a network with and without subnetting
14
141 2 21
..
.
Hostid
14141 2 21
.
.
.
Subnetid HostidNetid
Netid
Network access
Subnetwork access
Host access
Host access
a. Without subnetting
b. With subnetting
Forouzan Notes
5-
Slides from TCP/IP - Forouzan
COSC 6377
-
Fall 2000
Forouzan Notes 5-5COSC 6377 - Fall 2000
Figure 5-4
Hierarchy concept in a telephone number
Exchange
408 864 8902
-
(
)
Area code
Connection
Forouzan Notes 5-6COSC 6377 - Fall 2000
Figure 5-5
Masking
Mask
141.14.2.21 141.14.0.0
255.255.0.0
IP address Network address
141.14.2.21 141.14.2.0
IP address Subnetwork address
a. Without subnetting
b. With subnetting
255.255.255.0
Mask
Forouzan Notes
5-
Slides from TCP/IP - Forouzan
COSC 6377
-
Fall 2000
Forouzan Notes 5-7COSC 6377 - Fall 2000
Figure 5-6
Applying bit-wise and operator to achieve masking
a. Without subnetting
Network
address
11111111 11111111 00000000 00000000
10001101 00001110 00000010 00010101
10001101 00001110 00000000 00000000
IP
address
Mask
141.14.0.0
141.14.2.21
b. With subnetting
Subnetwork
address
11111111 11111111
141.14.2.21
141.14.2.0
11111111 00000000
10001101 00001110 00000010 00010101
10001101 00001110 00000010 00000000
IP
address
Mask
Forouzan Notes 5-8COSC 6377 - Fall 2000
Figure 5-7
Special addresses in subnetting
Any
Any
Any
All 0s
All 1s
Any All 1s
All 0s
Subnetid Hostid
Subnetwork address
Broadcast to all hosts in a specific subnet
Subnetid all 0s
Subnetid all 1s
Forouzan Notes
5-
Slides from TCP/IP - Forouzan
COSC 6377
-
Fall 2000
Forouzan Notes 5-9COSC 6377 - Fall 2000
Figure 5-8
Masks in example 1
a. Without subnetting
Netid Hostid
11111111 0000000000000000 00000000
Netid Subnetid Hostid
b. With subnetting
11111111 11111111 00000011 00000000
Mask
255.255.192.0
Mask
255.0.0.0
Forouzan Notes 5-10COSC 6377 - Fall 2000
.
.
Figure 5-9
Range of addresses in example 1
...
.
Special addresses
(hostid all 0s)
Special addresses
(hostid all 1s)
Special addresses (subnetid all 0s)
Special addresses (subnetid all 1s)
1st subnet
2nd subnet
1022nd subnet
X.0.0.0 X.0.0.1 X.0.63.255
...
X.0.64.0
X.0.127.255
...
X.0.128.0
X.0.191.255
X.0.64.1
X.0.128.1
X.255.128.1
X.255.128.0
X.255.191.255
X.0.63.254
X.0.127.254
X.0.191.254
X.255.191.254
...
...
X.255.192.0 X.255.192.1 X.255.255.255X.255.255.254
.
.
.
Forouzan Notes
5-
Slides from TCP/IP - Forouzan
COSC 6377
-
Fall 2000
Forouzan Notes 5-11COSC 6377 - Fall 2000
Figure 5-10
Subnetworks in example 1
Subnetwork
Subnetwork
Subnetwork
X.0.0.0
Site
To the rest of
the Internet
X.0.64.1
X.0.127.254
X.0.128.1
X.0.128.2 X.0.191.254
X.0.64.2
...
X.0.64.0
X.0.128.0
...
.
.
.
X.255.128.0
X.255.128.1
X.255.128.2
X.255.191.254
...
R1
Forouzan Notes 5-12COSC 6377 - Fall 2000
Figure 5-11
Mask in example 2
a. Without subnetting
Netid
Netid Subnetid Hostid
Hostid
11111111 11111111 00000000 00000000
b. With subnetting
11111111 11111111 00001111 00000000
Mask
255.255.240.0
Mask
255.255.0.0
Forouzan Notes
5-
Slides from TCP/IP - Forouzan
COSC 6377
-
Fall 2000
Forouzan Notes 5-13COSC 6377 - Fall 2000
Figure 5-12
Range of addresses in example 2
1st subnet
Special addresses
(hostid all 0s)
Special addresses (subnetid all 0s)
Special addresses
(subnetid all 1s)
Special addresses
(hostid all 1s)
2nd subnet
14th subnet
...
...
...
...
X.Y.0.0
X.Y.16.0
X.Y.32.0
X.Y.224.0
X.Y.240.0
X.Y.0.1
X.Y.16.1
X.Y.32.1
X.Y.224.1
X.Y.240.1
...
.
.
.
.
.
.
X.Y.15.255
X.Y.31.255
X.Y.47.255
X.Y.239.255
X.Y.255.255
X.Y.15.254
X.Y.31.254
X.Y.47.254
X.Y.239.254
X.Y.255.254
Forouzan Notes 5-14COSC 6377 - Fall 2000
Figure 5-13

The McGraw-Hill Companies, Inc., 2000
McGraw-Hill
Subnetworks in example 2
Subnetwork
Subnetwork
Subnetwork
X.Y.0.0
Site
To the rest of
the Internet
X.Y.32.1
X.Y.16.1
X.Y.32.2
X.Y.16.2
X.Y.47.254
X.Y.31.254
...
X.Y.32.0
X.Y.16.0
...
.
.
.
X.Y.224.0
X.Y.224.1
X.Y.224.2 X.Y.239.254
...
R1
Forouzan Notes
5-
Slides from TCP/IP - Forouzan
COSC 6377
-
Fall 2000
Forouzan Notes 5-15COSC 6377 - Fall 2000
Figure 5-14
Masks in example 3
b. With subnetting
Netid
Subnetid
Hostid
11111111 11111111 11111111 11100000
Mask
255.255.255.224
a. Without subnetting
Netid Hostid
11111111 11111111 11111111 00000000
Mask
255.255.255.0
Forouzan Notes 5-16COSC 6377 - Fall 2000
Figure 5-15
Range of addresses in example 3
.
.
.
.
.
.
1st subnet
2nd subnet
6th subnet
Special addresses
hostid all 0s
Special addresses
subnetid all 0s
Special addresses
subnetid all 1s
Special addresses
hostid all 1s
X.Y.Z.192
X.Y.Z.64
X.Y.Z.224
X.Y.Z.1
X.Y.Z.65
X.Y.Z.193
X.Y.Z.225
X.Y.Z.31
X.Y.Z.32 X.Y.Z.33 X.Y.Z.63
X.Y.Z.95
X.Y.Z.223
X.Y.Z.255
X.Y.Z.30
X.Y.Z.62
X.Y.Z.94
X.Y.Z.222
X.Y.Z.254
X.Y.Z.0
...
...
...
...
...
Forouzan Notes
5-
Slides from TCP/IP - Forouzan
COSC 6377
-
Fall 2000
Forouzan Notes 5-17COSC 6377 - Fall 2000
Figure 5-16
Subnetworks in example 3
Subnetwork
Subnetwork
Subnetwork
X.Y.Z.0
Site
X.Y.Z.32
X.Y.Z.33
X.Y.Z.65
X.Y.Z.66
X.Y.Z.94
X.Y.Z.34 X.Y.Z.62
...
X.Y.Z.64
...
.
.
.
X.Y.Z.192
X.Y.Z.193
X.Y.Z.194 X.Y.Z.222
...
R1
To the rest of
the Internet
Forouzan Notes 5-18COSC 6377 - Fall 2000
Figure 5-17
Variable-length subnetting
X.Y.Z.0
Router
Site
30 hosts
30 hosts
62 hosts
62 hosts
62 hosts
Second mask
255.255.255.224
First mask
255.255.255.192
Forouzan Notes
5-
Slides from TCP/IP - Forouzan
COSC 6377
-
Fall 2000
Forouzan Notes 5-19COSC 6377 - Fall 2000
Figure 5-18
Supernetwork
X.Y.32.0
Supernetwork
X.Y.32.1
X.Y.35.254
X.Y.33.254
X.Y.32.2
First class C address
Fourth class C address Third class C address
Second class C address
X.Y.35.253
X.Y.33.253
X.Y.32.254
X.Y.35.1 X.Y.34.254
X.Y.34.2
X.Y.34.1
X.Y.33.1
R1
To the rest of
the Internet
Forouzan Notes 5-20COSC 6377 - Fall 2000
Figure 5-19
Supernet mask
Netid
Netid Subnetid Hostid
Hostid
11111111 11111111 11111111 00000000
11111111 11111111 11111111
11000000
a. Subnetting
4 subnets out of
1 network
Netid
Supernetid Hostid
Hostid
11111111 11111111 11111111 00000000
00000000
11111111 11111111
11111100
b. Supernetting
1 supernet out
of 4 networks
Forouzan Notes
5-
Slides from TCP/IP - Forouzan
COSC 6377
-
Fall 2000
Forouzan Notes 5-21COSC 6377 - Fall 2000
Figure 5-20
Two ways of defining a supernet
X.Y.32.0
Same
255.255.252.0
X.Y.32.0 1024
,
,
Forouzan Notes 5-22COSC 6377 - Fall 2000
Figure 5-21
Example of supernetting
xxxxxxxx yyyyyyyy 00100111 00001100
xxxxxxxx yyyyyyyy 00100100 00000000
0000000011111111 11111111 11111100
X.Y.39.12
X.Y.36.0
xxxxxxxx yyyyyyyy 00100001 00000100
xxxxxxxx yyyyyyyy 00100000 00000000
0000000011111111 11111111 11111100
X.Y.33.4
X.Y.32.0
Forouzan Notes
5-
Slides from TCP/IP - Forouzan
COSC 6377
-
Fall 2000
Forouzan Notes 5-23COSC 6377 - Fall 2000
Figure 5-22
CIDR
Default
mask
Network
address
Next hop
address
...........
...........
...........
...........
255.255.255.0 X.Y.32.0
255.255.255.0 X.Y.33.0
255.255.255.0 X.Y.34.0
255.255.255.0 X.Y.35.0
a. Routing table without supernet mask
Default
mask
Network
address
Next hop
address
...........
255.255.252.0 X.Y.32.0
b. Routing table with supernet mask
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.