The Internet Assigned Numbers Authority (IANA) has reserved the following three blocks of the IP address space for private internets: 10.0.0.0 - 10.255.255.255 (10/8 prefix) 172.16.0.0 - 172.31.255.255 (172.16/12 prefix) 192.168.0.0 - 192.168.255.255 (192.168/16 prefix) We will refer to the first block as "24-bit block", the second as "20-bit block", and to the third as "16-bit" block. Note that (in pre-CIDR notation) the first block is nothing but a single class A network number, the second is a set of 16 contiguous class B network numbers, and the third is a set of 256 contiguous class C network numbers.
22
Embed
The Internet Assigned Numbers Authority (IANA) has …dti.unimi.it/~gianini/sys07/080_IPv4_Fixed_Mask... · · 2007-07-30tells the net router where the host addresses starts. ...
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
The Internet Assigned Numbers Authority (IANA) has reserved the
following three blocks of the IP address space for private
internets:
10.0.0.0 - 10.255.255.255 (10/8 prefix)
172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
192.168.0.0 - 192.168.255.255 (192.168/16 prefix)
We will refer to
the first block as "24-bit block",
the second as "20-bit block", and to
the third as "16-bit" block.
Note that (in pre-CIDR notation)
the first block is nothing but a single class A network number,
the second is a set of 16 contiguous class B network numbers,
and the third is a set of 256 contiguous class C network numbers.
Subnetting
Example A campus network
Here each of the ethernets has his own router
connected to the main router
How does it work
• When a packet comes into the main router, how
does this know which subnet (Ethernet) to give it
to?
• Having a host table with 65K entries each with the
responsable router is impractical
• A better way is that of devoting a part of the host
address to the specification of the router address
Fixed Length Mask Subnetting
In practice some bits are taken away from the host number to
create a subnet number
This adds another level of hierarchy to the IP addressing structure.
Instead of the classful two-level hierarchy, subnetting supports a three-
level hierarchy.
Subnet Mask
To implement subnetting the main router needs a subnet mask that indicates
the split between the network+subnetwork number and host: the subnet mask
tells the net router where the host addresses starts. The bits of the subnet
mask are set to 1 if the system examining the address should treat the
corresponding bit in the IP address as part of the extended-network- prefix.
The bits in the mask are set to 0 if the system should treat the bit as part of
the host-number.
Extended-Network-Prefix LengthThe standards describing modern routing protocols often refer to
the extended-network-prefix- length rather than the subnet mask.
The prefix length is equal to the number of contiguous
one-bits in the traditional subnet mask.
However, it is important to note that modern routing protocols
still carry the subnet mask. There are no Internet standard routing
protocols that have a one-byte field in their header that contains
the number of bits in the extended-network prefix. Rather,
each routing protocol is still required to carry the complete four-octet subnet mask.
How does it work?
In order to route an incoming packet
the main router uses the mask by performing
a logical AND operation, so as to extract the
network address from the overall address, and hands
the packet to the corresponding router.
Address: 11000000 10101000 00010010 10110111
Subnet Mask: 11111111 11111111 11111111 11000000
AND -------- -------- -------- --------
Network ID: 11000000 10101000 00010010 10000000
In the last column of the above example
we have a class C address with a mask of length 26
which tells us that the host portion of the address
10110111 must be split into
the subnet prefix 10
and the host address 110111
How it works without subnetting
• Each router has a table listing
some number of (network, 0) IP addresses and
some number of (this-network, host) IP addresses:
associated with each table is the network interface
to use to reach the destination.The first table is for distant
networks, the second for local hosts.
• When an IP packet arrives its destination address is looked up
in the routing table: if it is for a distant network it is
forwarded to the router indicated in the table; if it is for a
local host (e.g. on the touter LAN) it is sent directly to dht
destination.
How it works with subnetting• When subnetting is introduced the routing tables are
changed, adding entries of the form
(this-network, subnet, 0) and
(this-network, this-subnet, host)
• The first is used to reach other subnets,
the second to reach the hosts of the local subnet.
• Notice that in this way the router does not have to know
the details about the hosts on other subnets: the router will
- take the IP address
- perform an AND with the subnet mask
getting rid of the host number
- look up the resulting subnet number in the routing table.
BenefitsThe size of the global Internet routing table does not grow
because the site administrator does not need to obtain additional
address space and the routing advertisements for
all of the subnets are combined into a single routing table entry.
The local administrator has the flexibility to deploy
additional subnets without obtaining a new network
number from the Internet.
Route flapping (i.e., the rapid changing of routes)
within the private network does not affect the
Internet routing table since Internet routers
do not know about the reachability of the individual
subnets - they just know about the reachability
of the parent network number.
Subnet Design Considerations
The deployment of an addressing plan requires careful thought on the part of the network
administrator. There are four key questions that must be answered before any design
should be undertaken:
1) How many total subnets does the organization need today?
2) How many total subnets will the organization need in the future?
3) How many hosts are there on the organization's largest subnet today?
4) How many hosts will there be on the organization's largest subnet in the future?
All Zero and all one hosts
Recall that according to Internet practices,
the host-number field of an IP address
cannot contain all 0-bits or all 1-bits:
- the all-0s host-number identifies the base network
(or subnetwork) number,
-the all-1s host-number represents the broadcast address
for the network (or subnetwork).
In practice with n bits one will be able to address 2^n-2 hosts
To subnet a network, extend the natural mask using some of the bits
from the host ID portion of the address to create a subnetwork ID.
For example, given a Class C network of 204.15.5.0 which has a
natural mask of 255.255.255.0, you can create subnets in this manner: