Download IP Address Extensions: Subnets and Supernets

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Peering wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

Net bias wikipedia , lookup

Computer network wikipedia , lookup

Airborne Networking wikipedia , lookup

List of wireless community networks by region wikipedia , lookup

I²C wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Transcript
Supernetting
• Recall: subnetting allows an organization
to share a single IP network address among
multiple physical networks
• Supernetting (a.k.a. classless addressing)
allows the addresses assigned to an
organization to span multiple IP network
addresses
The Original Classful Addressing Scheme
Classful Addresses
• The different classes were different sizes:
– Less than 17,000 class B network addresses
– More than 2,000,000 class C network addresses
• The classes differed in popularity:
– Class B addresses were very popular and
almost exhausted
– Class C addresses were hardly used at all
Supernetting
• Assign an organization a block of plentiful
addresses (class C) rather than a single scarce
(class B) address
• Example:
– An organization wants to connect to the Internet
– The organization would prefer a class B address
• Plans to subnet its various physical networks using the third
octet of the IP address to represent the subnet
– This would allow the organization to have 254 physical networks
with up to 254 hosts per network
Supernetting (cont)
• Example (cont):
– Instead of getting a class B address, the organization is
given 256 contiguous class C addresses
• E.g. 192.17.0.0 – 192.17.255.0
– Then:
• The organization can have up to 256 physical networks (each
with its own class C network address)
• Each physical network can have up to 254 hosts
• Result: a block of plentiful addresses (class C)
substituted for a single scarce (class B) address
Extending Supernetting
• A few large commercial Internet Service
Providers (ISPs) provide Internet
connectivity
• ISPs are assigned a large chunk of
contiguous network addresses
• Organizations contract with an ISP and are
assigned one or more network address(es)
Effect of Supernetting on Routing
• Problem:
– Recall: Routers (potentially) have an entry in
their routing table for each unique network
• Assigning an organization 256 class C addresses
might require 256 routing table entries
• Assigning an organization 1 class B address would
require 1 routing table entry
– The information that Internet routers must store
and exchange increases dramatically
Effect of Supernetting on Routing (cont)
• Solution: Classless Inter-Domain Routing
(CIDR)
– Collapse a block of contiguous network
addresses into a single pair
– Example: (192.5.48.0, 3) specifies three
network addresses:
• 192.5.48.0
• 192.5.49.0
• 192.5.50.0
Effect of Supernetting on Routing (cont)
• Assume: a small number of ISPs each with a large
block of addresses
• Example: four large ISPs:
–
–
–
–
A: 195.0.0.0 – 195.63.255.0 (216 class C addresses)
B: 195.64.0.0 – 195.127.255.0 (216 class C addresses)
C: 195.128.0.0 – 195.191.255.0 (216 class C addresses)
D: 195.192.0.0 – 195.255.255.0 (216 class C addresses)
Effect of Supernetting on Routing (cont)
X
Y
A
B
C
D
Z
W
V
Effect of Supernetting on Routing (cont)
• Assume: customer X leases the addresses
(195.17.0.0, 256) from ISP A
• ISP A’s routing table:
– A route to each of A’s subscribers:
• (195.17.0.0, 256) goes to X
– A route to each other ISP:
• (195.64.0.0, 216) goes to B
• (195.128.0.0, 216) goes to C
• (195.192.0.0, 216) goes to D
• Result: CIDR shortens routing tables
CIDR Address Blocks and Bit Masks
• No need to restrict network numbers to class C
addresses
• No need to use an integer to specify the block size
• Instead: two items specify a block of addresses:
– The lowest address in the block (32-bit IP address)
– A 32-bit mask that divides addresses into a prefix and a
suffix
• Prefix – common to all addresses in the block
• Suffix – differentiates unique address in the block
CIDR Address Blocks and Bit Masks (cont)
• Example: a CIDR block of 2048 addresses:
• Starting address: 128.211.168.0
• Mask: 11111111 11111111 11111000 00000000
• Dotted decimal = 255.255.248.0
– Prefix: 10000000 11010011 10101 (the first 21 bits)
– Suffix: the last 11 bits
CIDR Notation
• CIDR Notation (or slash notation) is a
shorthand for representing both the starting
address and mask
• Example: 128.211.168.0/21
– Specifies the starting address (128.211.168.0)
– Specifies the number of bits in the prefix (21)
– Specifies the suffix (32-21 = last 11 bits)
CIDR Masks
• Note: /8, /16, and /24 prefixes correspond to the traditional class A, B,
and C divisions
Advantage of Classless Addressing
• Flexibility in allocating blocks of various sizes
• Assume: an ISP has the following block of addresses:
128.211.0.0/16
• Can assign one customer 2048 addresses in the /21 range:
• Can assign another customer 4 addresses in the /29 range:
Classless Addressing
• Treats IP addresses as arbitrary integers rather than
as part of a predefined class structure
• Allows a network administrator to assign
addresses in contiguous blocks
– Number of addresses in a block must be a power of two
• Allows for:
– Flexibility in assigning blocks of addresses
– Ease of management of addresses
Private Addresses
• Some prefixes have been reserved for private networks
(i.e. networks not part of the global Internet)
• These addresses are called private addresses (or
nonroutable addresses) because they should not be used
on the Internet
Additional Routing Concerns
• The original classful addressing scheme was selfidentifying:
– A router could determine the network address simply
by looking at the address
• Classless addresses are not self-identifying:
– A router cannot determine the division between the
prefix and the suffix from the address
– Example: 128.211.176.213
• Is that 128.211/16
• Is that 128.211.176/8
• Is that something else
Additional Routing Concerns (cont)
• Classless routing tables a usually stored in a hierarchical
data structure called a binary trie
– A tree with paths determined by the data stored
– A unique prefix identifies each data item
• Example:
Binary Trie Structure
• Interior nodes (circles) correspond to two or more prefixes
• Leaf nodes (squares) correspond to a unique prefix and
contain an address and mask
Binary Trie Structure (cont)
• A search for the address: 10010010 11110000 00000000 00000001
• A search for the address: 10110111 11110000 00000000 00000001
Summary
• Problem: IP v4 addresses (especially class
B) would be exhausted
• Solutions:
– Supernet addressing - a block of plentiful
addresses (class C) substituted for a single
scarce (class B) address
– Classless Inter-Domain Routing - collapse a
block of contiguous network addresses into a
single pair to keep routing tables short