Title: Subnetting
1- Subnetting
- and Classless Routing
2Last time Subnetting
Take a network address and break it up into
subnets that can be assigned to individual
physical networks.
Define a subnet mask to help create a new level
of hierarchy in the addressing scheme.
The bitwise AND of the subnet mask with the full
address gives the subnet number.
Example Take host address 128.96.34.15 and
subnet mask 255.255.255.0 and compute the subnet
number.
3Example of Subnetting
All hosts in a subnet are configured with the
same subnet mask.
Question What does subnetting do to routing as
we know it? What happens to the format of
forwarding tables?
Question What does subnetting do to ARP?
4Datagram Forwarding Algorithm
- D destination IP address
- for each forwarding table entry
ltSubnetNumber,SubnetMask,NextHopgt - D1 SubnetMask D
- if (NextHop is an interface)
- deliver datagram directly to destination
- else
- deliver datagram to NextHop (a router)
5Fine Points on Subnetting
- The subnet mask does not need to align on byte
boundaries. (You dont even have to have
contiguous 1s, although that is not
recommended.) - It is possible to put multiple subnets on the
same physical network, but hosts on the same
physical network may then have to go through a
router to talk to each other. - From outside the subnetted domain, the whole
thing is viewed as a single network. For this
reason, subnets should be kept geographically
close.
6Classless Routing
7Address Assignment Efficiency
- 2-host network assigned a Class C address
- Efficiency 2/254 0.78
- 256-host network assigned a Class B address
- Efficiency 256/65,534 0.039
How efficiently is the IP address space being
used?
8Autonomous Systems and Interdomain Routing
In order to provide network scalability, we
approach the problem of routing using a
hierarchical view of the system. We define
domains or autonomous systems as interconnected
collections of physical networks. Inside an AS,
routers use protocols like RIP or OSPF. Once we
interconnect ASs, we need to define another level
of routing.
9Possible Policies on Class B Address Assignment
- Scenario An Autonomous System (AS) requests a
Class B address. - 1) If number of hosts is close to 64K, grant
request, otherwise deny it. - 2) Instead of giving one Class B address, give
multiple Class C addresses to cover all the hosts.
10The Multiple Class C Addresses Solution
- Scenario One AS called X a 16 Class C network
numbers.
Question How many entries for AS X in an
Internet backbone router?
Question What if we had given it only one Class
B network? What would the address assignment
efficiency be?
Question How could we reduce the impact of
multiple Class C addresses on routing table size?
11Classless Interdomain Routing (CIDR)
- Goal Minimize the number of routes that a router
needs to know while keeping address assignment
efficiency high by giving out contiguous blocks
of Class C addresses.
Example
top 20 bits remain constant
20 bits
12 bits
192.4.16.0
11000000 00000100 0001
Network
Host
192.4.17.0
16 bits
8 bits
192.4.31.0
Host
Host
CLASS B
CLASS C
12CIDR
- In order to make this work, we need to
- Assign contiguous blocks of Class C addresses.
- Each block must contain a number of class C
networks that is a power of 2. - Use interdomain routing that understands
classless addresses (network number can be of any
length in number of bits). - Routing protocols see network numbers as
- This is analogous to subnetting
ltlength, valuegt
ltmask, valuegt
13CIDR vs. Subnetting
Multiple physical networks
Multiple network numbers
Physical Network 0
192.4.16.0
Physical Network 1
One address
192.4.17.0
128.96.34.0
11000000 00000100 0001
Physical Network 2
One network number
192.4.31.0
Physical Network 3
Route aggregation, or supernetting.
14Enhanced Route Aggregation
Both X and Y are accessible via the same provider
network, the ISP advertises a single route for
both using the 19-bit prefix they share. If
addresses are assigned carefully, better route
aggregation becomes possible.