317x Filetype PPT File size 0.14 MB Source: www.andrew.cmu.edu
Subnetting
It might be useful for the same administrative domain to contain
It might be useful for the same administrative domain to contain
several different networks:
several different networks:
Different link layer protocols without complex bridges
Different link layer protocols without complex bridges
Different administrative subdomains
Different administrative subdomains
Smaller tables on routers
Smaller tables on routers
But Class-B network addresses are running out, so we can’t waste
But Class-B network addresses are running out, so we can’t waste
them by assigning them where they won’t be densely populated
them by assigning them where they won’t be densely populated
And Class-C network addresses can only accommodate networks off
And Class-C network addresses can only accommodate networks off
255 machines, which is too small for even modest networks.
255 machines, which is too small for even modest networks.
The solution is to carve sub-networks (“subnets”) out of
The solution is to carve sub-networks (“subnets”) out of
larger Class-B networks
larger Class-B networks
Subnetting, cont.
If all routers needed to be aware of subnets, this would
If all routers needed to be aware of subnets, this would
drastically increase the size of routing tables.
drastically increase the size of routing tables.
To avoid this problem, routers outside of a network only
To avoid this problem, routers outside of a network only
know about whole networks
know about whole networks
Routers within a network however, need to know about the
Routers within a network however, need to know about the
subnets of their network.
subnets of their network.
This is achieved by having routers inside and outside of a
This is achieved by having routers inside and outside of a
network interpret the IP address differently.
network interpret the IP address differently.
Subnetting, cont.
For compatibility, routers outside of a particular network must operate
For compatibility, routers outside of a particular network must operate
“exactly as before” – they make routing decisions based only on the
“exactly as before” – they make routing decisions based only on the
network number.
network number.
But, once within a network, the routers are all within the same
But, once within a network, the routers are all within the same
administrative domain, and can be configured to operate a little
administrative domain, and can be configured to operate a little
differently
differently
The portion of the address space that is normally used to identify the
The portion of the address space that is normally used to identify the
host number is partitioned into a subnet number and host number. This
host number is partitioned into a subnet number and host number. This
is done in much the same way as the IP address itself was partitioned
is done in much the same way as the IP address itself was partitioned
into a network number and host number.
into a network number and host number.
But, unlike the IP address as a whole, the number of bits used for each
But, unlike the IP address as a whole, the number of bits used for each
is not fixed. Instead it is determined by the subnet mask.
is not fixed. Instead it is determined by the subnet mask.
Subnetting, cont.
Each host can be part of one subnet. This subnet has a subnet number and a
Each host can be part of one subnet. This subnet has a subnet number and a
subnet mask.
subnet mask.
For example 128.96.64.0 is a subnet of network 128.96
For example 128.96.64.0 is a subnet of network 128.96
The network number is parsed exactly as it is before, based on the packet’s
The network number is parsed exactly as it is before, based on the packet’s
prefix and the class of the address.
prefix and the class of the address.
Within a particular address, the subnet mask is used to separate the subnet
Within a particular address, the subnet mask is used to separate the subnet
number from the host number.
number from the host number.
The subnet mask is the same length as an IP address and contains a 1 in every
The subnet mask is the same length as an IP address and contains a 1 in every
position that is part of the subnet number (including network number) and a 0
position that is part of the subnet number (including network number) and a 0
everywhere else. It might also need to contain additional 1s to distinguish it
everywhere else. It might also need to contain additional 1s to distinguish it
from other subnets.
from other subnets.
By ANDing the subnet mask with the IP address, the host number is
By ANDing the subnet mask with the IP address, the host number is
eliminated, leaving only the subnet number. In this way a host knows if a
eliminated, leaving only the subnet number. In this way a host knows if a
destination is on its own network.
destination is on its own network.
Subnetting, cont.
Subnets and subnet masks
Subnet Num: 128. 96. 0. 0 10000000.01100000.00000000.00000000
Subnet Mask: 255.255.255. 128 11111111.11111111.11111111.10000000
~127 hosts
Notice that the network mask hides host numbers:
IP Address: 128. 96. 0. 82 10000000.01100000.00000000.01010010
Subnet Mask: 255.255.255. 128 11111111.11111111.11111111.10000000
Subnet Num: 128. 96. 0. 128 10000000.01100000.00000000.0d0000000
no reviews yet
Please Login to review.