Presentation is loading. Please wait.

Presentation is loading. Please wait.

Classless and Subnet Address Extensions (CIDR)

Similar presentations


Presentation on theme: "Classless and Subnet Address Extensions (CIDR)"— Presentation transcript:

1 Classless and Subnet Address Extensions (CIDR)
Topics: There are problems with the IP addressing scheme we’ve studied We’ll study some ways to get around these problems

2 Review: IP Addresses

3 Problems with IP Addresses
The designers of IP addresses did not foresee the Internet’s tremendous growth Higher overhead to manage network addresses Larger routing tables IP addresses might one day be exhausted

4 Solution to IP Addresses Problems
The same IP network prefix can be shared by multiple physical networks A site can choose to assign and use IP addresses in unusual ways internally as long as: All hosts and routers at the site honor the site’s addressing scheme The site’s addressing scheme is transparent to other sites on the internet

5 Strategy 1: Transparent Routers
A network with a class A IP address can be extended: H1 H2 T H3 H4

6 Transparent Routers (cont)
Hosts on LAN are assigned IP addresses as if they were on WAN LAN does not need its own network prefix Traffic for hosts on LAN is multiplexed through T Other hosts and routers on the WAN do not know T exists

7 Transparent Routers Advantages Disadvantages
Require fewer network addresses (LAN doesn’t need a separate network prefix) Load balancing Disadvantages Require a large address space Do not provide all the services of standard routers

8 Router running proxy ARP
Strategy 2: Proxy ARP Using ARP, map a single network prefix into two physical addresses Main network H1 H2 H3 Router running proxy ARP R H4 H5 H6 Hidden network

9 Proxy ARP (cont) Gives the illusion that all hosts are on the same physical network Router R answers ARP requests on each network for hosts on the other R answers ARPs with its own hardware address (it lies) When R receives a datagram it forwards it to the correct physical address

10 Proxy ARP Advantages Disadvantages Require fewer network addresses
Only the router running proxy ARP needs to know what’s going on Disadvantages Can only be used if the network uses ARP for address resolution Allows spoofing

11 Strategy 3: Subnet Addressing
Hierarchical addressing Network H1 H2 Rest of the internet R Network H3 H4 All traffic to

12 Subnet Addressing (cont)
R receives all traffic for network R routes the datagram to a physical network based on bits in the hostid field of the IP address Another level has been added to the addressing hierarchy

13 Subnet Addressing (cont)
Regular (Class B) IP address: New interpretation (locally only): netid hostid netid subnet hostid

14 Subnet Addressing (cont)
Advantages Minimizes network address usage Accommodates growth Disadvantages Added layer of complexity Difficult to change once hierarchy is established

15 Subnet Addressing (cont)
Flexible Allows 256 physical networks with 256 hosts each Allows 8 physical networks with 8192 hosts each netid subnet hostid netid sub hostid

16 Subnet Masks 32 bits Example - a class B network: Subnet mask:
1 if the bit is part of the network address 0 if the bit is part of the host address Example - a class B network: Subnet mask: netid subnet hostid

17 Subnet Masks Subnet bits do not have to be contiguous: = subnet id
= host id netid

18 Representing Subnet Masks in Dotted Decimal Notation
Example - a class B network: Subnet mask: Dotted Decimal: netid subnet hostid

19 Representing Subnet Masks in 3-tuple Notation
3-tuple notation {<netid>,<subnet id>,<hostid>} -1 means “all ones” {-1,-1,0}

20 Routing in the Presence of Subnets
All hosts and routers must use a subnet routing algorithm Net 1 (not a subnet address) R1 H R2 Net 2 (subnet of address N) Net 3 (subnet of address N)

21 The Subnet Routing Algorithm
Recall the standard routing table: (netid, next hop) N = netid portion of IP address Compare N with netid Match = send datagram to next hop Routing when subnets are in use: (subnet mask, netid, next hop) N = IP address & subnet mask

22 Using Subnet Masks for Routing
Host-specific routes ( , ) ( , , ) Default routes (default, ) ( , , ) Standard, non-subnet class B network ( , ) ( , , )

23 A Unified Routing Algorithm
Extract the destination IP address, D, from the datagram and compute the netid, N If N matches any directly connected network address deliver the datagram directly over that network else for each entry (M,N,NH) in the routing table { I = M&D if (I == N) then send datagram to NH } if no matches were found declare a routing error

24 Broadcasting to Subnets
IP address = Broadcast to all hosts on network 128 What if network 128 has subnets? Routers that interconnect the subnets must propagate the datagram to all physical networks But the routers must take care not to route the datagrams in loops (reverse path forwarding) Can you broadcast to just one subnet? Yes: {network, subnet, -1}

25 Summary Problem: IP v4 addresses (especially class B) would be exhausted Solutions: Subnet addressing - conserve network addresses by using the same network address for multiple physical networks New version of IP (v6) with larger addresses Supernet addressing - conserve class B network addresses by allowing a single organization to use multiple class C network addresses


Download ppt "Classless and Subnet Address Extensions (CIDR)"

Similar presentations


Ads by Google