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)
Chapter 10

2 Introduction Five extensions of the IP address scheme, designed to conserve network prefixes Transparent routers Proxy ARP Subnet Addressing Anonymous Point-To-Point Networks Classless Addressing

3 Relevant Facts In the original IP addressing scheme:
Each network is assigned a unique network address Each host on that network has the network address as a prefix of the host’s address Advantage of this scheme: Routers keep one routing entry per network Only the network portion of the address is examined when making routing decisions

4 Relevant Facts Remember original IP addresses
Class A: 8 bit network id, 24 bit host id Class B: 16 bit network id, 16 bit host id Class C: 24 bit network id, 8 bit host id Sites may modify this scheme as long as: All hosts and routers agree to the modified scheme Other sites on the Internet can treat addresses as a network prefix and a host suffix

5 Minimizing Network Numbers
Growth has made the original addressing scheme unfeasible for the future Overhead of managing network addresses Routing tables are large and exchanging routing information requires significant effort Address space will be exhausted (see p. 148) Three ways of sharing one network among multiple physical networks follows

6 Transparent Routers A router is used to make it look as though several hosts are connected to a WAN It is transparent because other routers and hosts on the WAN do not know that it exists The router is connected to hosts in a local area network on one side (as a multiplexer), and to a single host port of the WAN on the other

7 H1 H2 Wide Area Network T H3 H4
T is a transparent router connecting multiple hosts to a WAN. Hosts are assigned addresses as if they connected directly to the WAN.

8 Transparent Routers The local area network does not have its own IP prefix The router demultiplexes datagrams that arrive from the WAN and sends them to the host using a table of addresses The router also accepts datagrams from the hosts and sends them across the WAN to the destinations

9 Transparent Routers Advantages Disadvantages
requires fewer network addresses since the LAN does not need a separate IP prefix supports load balancing Disadvantages works with networks with a large number of host addresses good for class A, not good for class C may not provide allservices (ICMP and SNMP)

10 Proxy ARP Applies to networks that use ARP to bind internet addresses to physical addresses Allows one network address to be shared by two physical networks A router which runs proxy ARP answers ARP requests on each network for hosts on the other network Also called: ARP hack and promiscuous ARP

11 Main Network H1 H2 H3 Router running proxy ARP R H5 H4 Hidden Network

12 Proxy ARP When H1 needs to talk to H4, it uses ARP
R captures the ARP request from H1 and responds with R’s physical address H1 sends datagrams destined for H4 to R R looks in its routing table to route the datagram on to H4 on the hidden network

13 Proxy ARP Advantage Disadvantages
It can be added to a single router without changing the routing tables in other hosts or routers on this network Disadvantages Only works on networks that use ARP Spoofing: one machine claims to be another

14 Subnet Addressing Most widely used technique of the 3
Standardized, required part of IP addressing A single site has a single class B address assigned to it, but has 2 or more networks Only local routers know that there are multiple networks at this site

15 Network H1 H2 Rest of the Internet R all traffic to H4 H3 Network

16 Subnet Addressing The address is used for both networks at the site Routers in the internet send to either network as though it was a single network Only R knows that there are two networks and looks at the third octet to route The two networks are called subnets

17 Subnet Addressing Instead of dividing the 32-bit IP address into (netid, hostid), we use (net portion, local portion) The interpretation of the local portion of the address is left to the site The net or internet portion identifies a site The local portion identifies a physical network and a host

18 Subnet Addressing Conceptual 32-bit address in original addressing with conceptual subnet addressing Hierarchical addressing and hierarchical routing Internet part Local part Physical Network Internet part Host

19 Flexibility in Subnet Address Assignment
Sites are allowed flexibility in choice of address assignment To the rest of the Internet R1 Network 1 R2 R3 Network 3 Network 2 R4 R5 Network 4 Network 5

20 Flexibility in Subnet Address Assignment
See Figure 10.6 For fixed length subnetting When a site has a large number of subnets, the number of hosts must be small When a site has a large number of hosts, the number of subnets will be small

21 Variable Length Subnets
An organization may choose a partition size for each physical network Since the organization may have large and small networks, this gives flexibility to the site Disadvantage: Possible address ambiguity

22 Subnets with Masks For subnetting of either kind, a 32-bit subnet mask specifies the division Bits in the mask are set to 1 if machines on the network treat the corresponding bit in the address as part of the subnet prefix, 0 if not Example: the mask says the first 3 octets identify the network, and the fourth identifies the host

23 Subnets with Masks Subnet masks do not necessarily have to select contiguous bits of the address, i.e.: … not recommended!

24 Subnet Mask Representation
Masks may be represented in dotted decimal (binary is difficult) as in They may be represented as a 3-tuple {network #, subnet #, host #} where -1 means “all ones” {-1, -1, 0} is {128.23, -1, 0} is

25 Routing with Subnets Hosts connected to networks that are not subnetted must communicate with hosts on networks that are subnetted Rule: To achieve optimal routing, a machine M must use subnet routing for an IP network address N, unless there is a single path P such that P is a shortest path between M and every physical network that is a subnet of N.

26 Routing with Subnets Guideline: All subnets of a given network IP address must be contiguous, the subnet masks should be uniform across all networks, and all machines should participate in subnet routing.

27 Questions How does this modify the routing algorithm?
How are subnet masks assigned? How do we broadcast to subnets?

28 Anonymous Point to Point Networks
When a leased line connects two routers, the line and the two routers are not given addresses No hardware address is needed The interface software ignores the next hop address when sending datagrams The connection is known as an unnumbered network, or anonymous network

29 R1 leased line R2 1 2 To reach hosts on network Route To Using Interface # Deliver Direct 1 default 2 Routing Table in R1

30 Classless Addressing Allows addresses assigned to a single organization to span multiple classes Why adopted? The classful scheme did not divide network addresses into classes equally (<17K class B networks, >2M class C networks) Class C addresses were assigned slowly Class B addresses would be exhausted (Running out of address space ROADS)

31 Classless Addressing (Supernetting)
Consider a medium-sized organization that joins the Internet A class B address is preferred over a class C But the organization may be given a block of 256 contiguous class C addresses This would also be a useful way to have Internet Service Providers (ISPs) provide IP addresses to an organization The ISP allocates addresses from the set to subscribers

32 Supernetting Effects on Routing
A new problem is created: Now routing table is increased incredibly Instead of one class B address, we now have 256 class C addresses How can the problem be fixed? Collapsing a block of contiguous addresses into a single entry: (network address, count) network address is the in the block count is the number of in the block

33 Supernetting Effects on Routing
Example: The pair ( , 4) specifies the four network addresses Routing tables can be smaller

34 CIDR What has just been described is Classless Inter-Domain Routing (CIDR) The name does not indicate that it also involves addressing It is not restricted to Class C addresses It does not really use an integer, but requires that the number of blocks is a power of two, and this power is identified using a bit mask

35 CIDR Example: An organization is assigned a block of 2048 contiguous addresses, beginning at lowest: highest:

36 CIDR CIDR requires 2 things: The lowest address in the block
A 32-bit mask which shows where the division between prefix and suffix occurs after the 21st bit in this case

37 CIDR Notation A shorthand way of representing the address and the mask length is also called slash notation The block of addresses is indicated by the first address followed by a decimal indicating the bit position 21 /21 See figure for CIDR prefixes

38 CIDR Example Work problem in Section 10.21

39 Summary Techniques have been invented to conserve IP addresses:
Extend the address space of a single network to include hosts on an attached local network A router answers ARP requests for hosts Share one IP network address among several networks Let a point-to-point connection be unnumbered Allow division between prefix and suffix to occur anywhere


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

Similar presentations


Ads by Google