Classless AddressingSubnet AddressCIDR CST 415 5202021 CST 415

Classless Addressing/Subnet Address/CIDR CST 415 5/20/2021 CST 415 - Computer Networks 1

Topics • • • Problem Definition Transparent Routers Proxy ARP Subnet Routing Classless Addressing (Supernetting) 5/20/2021 CST 415 - Computer Networks 2

Problem Definition • In the original class based addressing scheme (e. g. Class A, B, and C), network addresses are encoded in a predetermined portion of the 32 bit address. • In Class A and Class B addresses, there a relatively large number of host machines associated with a network. • What will happen to network traffic if all hosts are directly connected to the network? 5/20/2021 CST 415 - Computer Networks 3

Problem Definition • To avoid huge amounts of traffic on the networks, it is desirable for administrators to “chop” networks up into smaller “subnets”. • Packet transmission across these networks is controlled through routers. • In the original scheme, since there was only one network: – All hosts on the network needed an entry in the routing tables. – Routing tables where inherently large. 5/20/2021 CST 415 - Computer Networks 4

Problem Definition • A different problem arose in the evolution of the Internet. – The original vision was based on several mainframe computers routing to intermediate sized networks. – Reality saw a plethora of small, interconnected networks with many small machines. – The Inter. NIC actually ran out of Class B addresses for those intermediate sized networks. 5/20/2021 CST 415 - Computer Networks 5

Problem Definition • To solve this “Packet Routing Nightmare”, routers can play games among themselves… – All hosts and routers involved in packet transmission (e. g. internal to a particular “managed” group of machines) must agree to honor a particular routing/addressing scheme. » An Autonomous System – External hosts can still view the “managed” group as a single network. » Through a network interface router – Boundary Gateway » Notice: The “interface” concept and information hiding is rearing it’s ugly head again. 5/20/2021 CST 415 - Computer Networks 6

Transparent Routers The concept of a Transparent Router is used to filter out and limit the packets traveling to any particular network segment. The rest of the network sends packets directly to the machines on the network segment. The router is said to be transparent because other hosts on the network do not deal with it in their local routing tables. 5/20/2021 CST 415 - Computer Networks 7

Transparent Routers 5/20/2021 CST 415 - Computer Networks 8

Proxy ARP Used to map a single IP network address to multiple network segments. The router running proxy ARP will answer ARP request for either of the different network segments. 5/20/2021 CST 415 - Computer Networks 9

Proxy ARP • Proxy ARP works well in a limited environment. – Locally managed – Limited to subsets of an autonomous environment. • • 5/20/2021 Proxy ARP does not require any specialized routing algorithms or tables. Proxy ARP does not scale beyond small networked environments. CST 415 - Computer Networks 10

Subnet Routing Subnet routing allows an autonomous system to break up the “host” part of it’s address into it’s own local “network” and “host ID” parts. 5/20/2021 CST 415 - Computer Networks 11

Subnet Routing With the use of subnet routing: • The “network” part remains consistent across the Internet. – Thus, Internet routing does not break. • The “host ID” part becomes locally managed internal to autonomous system. – The host ID is then broken down into: » Local network address » Local host ID 5/20/2021 CST 415 - Computer Networks 12

Subnet Routing To split up an IP address into network address and subnet address, a subnet mask is applied. A “ 1” in the mask means treat this bit as part of the network address. A “ 0” in the mask means treat this bit as part of the host ID. 5/20/2021 CST 415 - Computer Networks 13

Subnet Routing Example: Given the class B address: 135. 225. 0. 0 The subnet mask: 255. 0 Divides the address space up into 254 networks, each which may contain 254 host machines. 5/20/2021 CST 415 - Computer Networks 14

Subnet Routing • • When using subnet masking, the mask should be set up to form sets of contiguous hosts numbers. Routers compatible with this scheme need to have routing tables that contain: (subnet mask, network address, next hop address) • 5/20/2021 The router needs the subnet mask to filter on network address. CST 415 - Computer Networks 15

Supernetting (Classless Addressing) • The address range that has been exhausted is the Class B addresses. – These addresses are best for typical businesses. » » • Greater than 255 host machines supported. Subnet masks can be effectively applied to Class B addresses. Nobody really wanted Class C addresses. – • • 5/20/2021 Only the small businesses have less than 255 nodes. Consequently, there are still Class C addresses available; however, the demand is for Class B addresses. What to do? ? ? CST 415 - Computer Networks 16

Supernetting (Classless Addressing) Enter Supernetting… • • • 5/20/2021 Supernetting is the opposite of subnetting. Subnetting divides a large network address space (e. g. Class A and B) up into many small network addresses. Supernetting takes blocks of small network address spaces (e. g. Class C) and combines them to form a large address space. CST 415 - Computer Networks 17

Supernetting (Classless Addressing) The question that needs to be answered is: How does a router deal with blocks of contiguous Class C addresses? Have a separate routing table for each Class C network reachable through the router? Does this make for unnecessarily large routing tables? 5/20/2021 CST 415 - Computer Networks 18

Supernetting (Classless Addressing) The answer lies in Classless Inter. Domain Routing (CIDR) As with Subnetting, CIDR uses a mask to determine, not the subnet, but the “supernet”. 5/20/2021 CST 415 - Computer Networks 19

Supernetting (Classless Addressing) Example: Consider the address block: 192. 24. 0. 0 (0 x. C 0180000) and ending with 192. 31. 255. 0 (0 x. C 01 FFF 00) This is 2048 Class C network numbers. ( e. g. 0 x. C 01 FFF – C 01800 = 2047 networks) 5/20/2021 CST 415 - Computer Networks 20

Supernetting (Classless Addressing) Example: (cont’d) This aggregation is described by the address: 192. 24. 0. 0 and the mask 255. 248. 0. 0 (0 x. FFF 80000) – or – 192. 24. 0. 0/13 5/20/2021 CST 415 - Computer Networks 21

Supernetting (Classless Addressing) The following example was obtained from The TCP/IP Guide (http: //www. tcpipguide. com/free/t_IPCIDRAddressing. Example. htm) • Suppose we have an ISP that is just starting up. – – • 5/20/2021 It obtains the address the block 71. 94. 0. 0/15 (probably from a larger ISP). The “/15” on the end of the block address tells us that this is a block of addresses where the first 15 bits are the network ID and the last 17 the host ID. This ISP will sell blocks of address to customers. CST 415 - Computer Networks 22

Supernetting (Classless Addressing) Assume the ISP divides it’s address range up as shown in the table: 5/20/2021 CST 415 - Computer Networks 23

Supernetting (Classless Addressing) 5/20/2021 CST 415 - Computer Networks 24

Supernetting (Classless Addressing) First Level of Division The “pie” is initially cut down the middle by using the single left-most host ID bit as an extra network bit. 71. 94. 0. 0/15 in binary, with the left-most host ID bit shown highlighted: 01000111 01011110 00000000 To make the split, one network will equal this binary network address with the highlighted bit remaining 0, and the other one with it changed to a 1, creating two subnetworks—not subnets as in the “classful” sense of the word, but portions of the original network—numbered based on the numeric value of what is substituted into the new network ID bits: Subnetwork #0: 01000111 01011110 00000000 Subnetwork #1: 01000111 01011111 00000000 5/20/2021 CST 415 - Computer Networks 25

Supernetting (Classless Addressing) First Level of Division Since bit #16 is now also part of the network address, these are “/16” networks, the size of a “classful” Class B network. So, the subnetworks are: Subnetwork #0: 71. 94. 0. 0/16 Subnetwork #1: 71. 95. 0. 0/16 Note: “#0” subnetwork has the same IP address as the larger network it came from; this is always true of the subnetwork 0 in a network. 5/20/2021 CST 415 - Computer Networks 26

Supernetting (Classless Addressing) Second Level of Division Set aside subnetwork #0 above for future ISP allocations. Divide the second subnetwork, into four. These we will then further subdivide into different sizes to meet our customer needs. To divide into four groups we need two more bits from the host ID of subnetwork #1, shown highlighted and underlined next to the original subnet bit: 01000111 01011111 00000000 These two bits are replaced by the patterns 00, 01, 10 and 11 to get four sub-subnetworks. 5/20/2021 CST 415 - Computer Networks 27

Supernetting (Classless Addressing) Second Level of Division They will be “/18” networks of course, since we took two extra bits from the host ID of a “/16”: Sub-subnetwork #1 -0: 01000111 01011111 00000000 (71. 95. 0. 0/18) Sub-subnetwork #1 -1: 01000111 01011111 01000000 (71. 95. 64. 0/18) Sub-subnetwork #1 -2: 01000111 01011111 10000000 (71. 95. 128. 0/18) Sub-subnetwork #1 -3: 01000111 01011111 11000000 (71. 95. 192. 0/18) Each of these has 16, 382 addresses. 5/20/2021 CST 415 - Computer Networks 28

Supernetting (Classless Addressing) Third Level of Division Take each of the four /18 networks above and further subdivide it. We want to make each of these contain a number of blocks of different sizes corresponding to our potential customers. One way to do this would be as follows: Larger Organizations: Customers needing up to 510 addresses require a /23 network, divide sub-subnetwork #1 -0, 71. 95. 0. 0/18 by taking five bits from the host ID field: 01000111 01011111 00000000 Substitute into these five bits 00000, 00001, 00010 and so on, giving us 32 different /23 networks in this block, each containing 9 bits for the host ID, for 510 hosts. The first will be sub-subnetwork #1 -0 -0: The second sub-subnetwork #1 -0 -1: 71. 95. 0. 0/23 71. 95. 2. 0/23 … The last will be sub-subnetwork #1 -0 -31: 5/20/2021 71. 95. 62. 0/23 CST 415 - Computer Networks 29

Supernetting (Classless Addressing) Third Level of Division Medium-Sized Organizations: Customers needing up to 254 addresses, divide sub-subnetwork #1 -1, 71. 95. 64. 0/18, by taking six bits from the host ID field: 01000111 01011111 01000000 This gives 64 different /24 networks. The first will be sub-subnetwork #1 -1 -0: The second sub-subnetwork #1 -1 -1: 71. 95. 64. 0/24 71. 95. 65. 0/24 …and so on. 5/20/2021 CST 415 - Computer Networks 30

Supernetting (Classless Addressing) Third Level of Division Smaller Organizations: For customers with up to 126 hosts, divide sub-subnetwork #1 -2, 71. 95. 128. 0/18, by taking seven bits from the host ID field: 01000111 01011111 10000000 Seven bits allow 128 of these /25 networks within the /18 block. The first: The second: The third: 71. 95. 128. 0/25 71. 95. 128/25 71. 95. 129. 0/25 … and so on. 5/20/2021 CST 415 - Computer Networks 31

Supernetting (Classless Addressing) Third Level of Division Very Small Organizations: For customers with up to 60 hosts, we divide sub-subnetwork #1 -3, 71. 95. 192. 0/18, by taking eight bits from the host ID field: 01000111 01011111 11000000 This gives 256 different /26 networks within the /18 block. The first: 71. 95. 192. 0/26 The second: 71. 95. 192. 64/26 … and so on. 5/20/2021 CST 415 - Computer Networks 32

Supernetting (Classless Addressing) As with subnet addressing, supernet addressing requires the routing tables to contain the mask for application of route algorithms. 5/20/2021 CST 415 - Computer Networks 33

Supernetting (Classless Addressing) Reserved Address Blocks • It is possible that a networked environment may have a large number of devices that do not require managed IP addresses. – Airports – Banks – Etc. 5/20/2021 CST 415 - Computer Networks 34

Supernetting (Classless Addressing) Reserved IP Addresses 10. 0 - 10. 255 (10/8 prefix) 172. 16. 0. 0 - 172. 31. 255 (172. 16/12 prefix) 192. 168. 0. 0 - 192. 168. 255 (192. 168/16 prefix) These shall never be routed onto the Internet. 5/20/2021 CST 415 - Computer Networks 35

Supernetting (Classless Addressing) Reserved IP Addresses 169. 254. 0. 0 -169. 254. 255 addresses – – 5/20/2021 - Automatic Private IP Windows 98, 98 SE, Me, and 2000 have an Automatic Private IP Addressing (APIPA) feature that will automatically assign an Internet Protocol address to a computer on which it installed. This occurs when the TCP/IP protocol is installed, set to obtain it's IP address automatically from a Dynamic Host Configuration Protocol server, and there is no DHCP server present or the DHCP server is not available. CST 415 - Computer Networks 36
- Slides: 36