Professional Documents
Culture Documents
Lecture 8
Lecture 8
Lecture 8
Gregory Kesden
Subnetting
It might be useful for the same administrative domain to contain
several different networks:
Different link layer protocols without complex bridges
But, once within a network, the routers are all within the same
administrative domain, and can be configured to operate a little
differently
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
is done in much the same way as the IP address itself was partitioned
into a network number and host number.
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.
Subnetting, cont.
Each host can be part of one subnet. This subnet has a subnet number and a
subnet mask.
Within a particular address, the subnet mask is used to separate the subnet
number from the host number.
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
everywhere else. It might also need to contain additional 1s to distinguish it
from other subnets.
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
destination is on its own network.
Subnetting, cont.
Subnets and subnet masks
Each piece is flagged as being a fragment and numbered with its byte
offset into the original.
Once the backbone gets the packet to the right network, it can be
subnetted and handled by the intra-domain routers as usual. (Thus,
Classless InterDomain Routing
Supernetting: CIDR
CIDR “is here and now” – but IPv6 is not compatible with
IPv4 which generates a big migration problem.
How Does a Router Know Where
to Send a Packet?
So, a router sees an IP packet with a particular address. It
can parse this address and determine what network it
should go to. How does it know where to send this packet?
Once there, the next router will do the same thing, until it arrives at the
right network, where it will be passed down to the data link layer and
ultimately the physical layer for delivery.
But, this answer just begs the question, “Where does the forwarding
table come from?”
Answer: From Another Table
The forwarding table is a subset of another table called the
routing table.
In the end, it can get a packet to any host that it can talk to
directly and, it can get to other networks by asking other
routers to act as “middle men” and deliver packets for it.