Example: bankruptcy

N. C. State University

1 SUBNETS, CIDR, ANDCLASSLESS ADDRESSINGI nternet ProtocolsCSC / ECE 573 Fall, 2005N. C. State Universitycopyright 2005 Douglas S. Reeves2 AnnouncementsNo office hours tomorrow (Wednesday) out oftownNo class on Thursday Fall break!Midterm exam next Tuesday! Study guide is online,as well as old examsHW3 Part 1 solutions will be online todaycopyright 2005 Douglas S. Reeves3 Today s with Classful Routing exampleCLASSFUL ADDRESS PROBLEMS copyright 2005 Douglas S. Reeves5 Classful Addresses (Review)28 (256)216 (64K)224 (16M)Potential Number ofHosts Per Network221 (2M)C214 (16K)B27 (128)APotential Numberof NetworksClass1 Host IDNetwork ID07242 Host IDNetwork ID1014163 Host IDNetwork ID110218 CBAC lasscopyright 2005 Douglas S. Reeves6 Classful addressing Issues 1.

CLASSLESS ADDRESSING ... 2005 N. C. State University copyright2005DouglasS.Reeves 2 Announcements No office hours tomorrow (Wednesday) – out of town No class on Thursday – Fall break! ... Today’s Lecture I. Problems with Classful Addresses II. Subnetting III.Supernetting IV.CIDR V.IP Routing example CLASSFUL ADDRESS PROBLEMS ...

Tags:

  States, University, Addressing, State university, Subnetting

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of N. C. State University

1 1 SUBNETS, CIDR, ANDCLASSLESS ADDRESSINGI nternet ProtocolsCSC / ECE 573 Fall, 2005N. C. State Universitycopyright 2005 Douglas S. Reeves2 AnnouncementsNo office hours tomorrow (Wednesday) out oftownNo class on Thursday Fall break!Midterm exam next Tuesday! Study guide is online,as well as old examsHW3 Part 1 solutions will be online todaycopyright 2005 Douglas S. Reeves3 Today s with Classful Routing exampleCLASSFUL ADDRESS PROBLEMS copyright 2005 Douglas S. Reeves5 Classful Addresses (Review)28 (256)216 (64K)224 (16M)Potential Number ofHosts Per Network221 (2M)C214 (16K)B27 (128)APotential Numberof NetworksClass1 Host IDNetwork ID07242 Host IDNetwork ID1014163 Host IDNetwork ID110218 CBAC lasscopyright 2005 Douglas S. Reeves6 Classful addressing Issues 1.

2 Three Bears problem class A (16M hosts) too large for most organizations,and there aren t very many of them (128) class C (254 hosts) too small for most class B (65,534 hosts) is just right , but there aren tenough of them (16,384) Flat host ID part of the address means verylarge routing tables within an organization , one network with 50,000 hosts each router hasto know 50,000 routes?!2copyright 2005 Douglas S. Reeves7A Hypothetical Solution: Redefine Class C , use 19 bits for network ID, 10 bits for host ID result: 512K such networks, each with 1022 hostaddresses Problem: not backwards compatible with originaladdressing scheme , old class B and C address space allocations wouldhave to be reclaimed and reassignedcopyright 2005 Douglas S. Reeves8An Actual Solution:Assign Multiple Networks Assign one organization multiple class Cnetworks , an organization having 1000 hosts would get 4class C networks (4 * 254 host addresses = 1016 >1000) Problem: no longer have one network address forone organization increases routing table sizes for routing betweenorganizations is that serious?

3 Doesn t fix massive size of class A networkscopyright 2005 Douglas S. Reeves9 Requirements for Address Modifications Any solution should be backwards compatiblewith the original addressing scheme Each organization should be free to interpret the host ID part of its addresses any way it wishes only the network ID part of addresses is used byother organizations If there is a new interpretation of the host ID .. all hosts and routers in the organization s networkmust use the new addressing scheme the internal routing protocol must support this newschemeSUBNETTING copyright 2005 Douglas S. Reeves1110 Network IDHost IDSubnet addressing (RFCs 950, 1122) Particularly useful for class B sized networks Example0241631 Internet (external) part local (internal) partAddress of the physical network10 Network IDHost IDSubnet ID Result: three-level hierarchical addressing good for routing inside an organization (reduces thesize of internal routing tables) network structure not revealed to outsiders, sincestructure of local part only locally knowncopyright 2005 Douglas S.

4 Reeves12 Subnet addressing (cont d) Result: large organizations may have manyseparate LANs, sharing a single network address network administrators must decide how many bits toallocate to the subnet ID and host ID Hosts must support this capability Does not change classful addressing only affects interpretation of local (internal) part ofaddress3copyright 2005 Douglas S. Reeves13 Example: Without SubnettingNetwork 2005 Douglas S. Reeves14 Example: With Subnettingsubnet 2005 Douglas S. Reeves15 How Long is the Subnet ID? Masking: the process of extracting a portion ofthe IP address subnet masking: extracting the subnet ID masks are 32 bits long for IPv4 addresses If a bit in a subnet mask = .. 1 this bit position is part of the physical network ID (network ID + subnet ID) 0 this bit position is part of the host ID How split physical network ID into network andsubnet parts?

5 Copyright 2005 Douglas S. Reeves16 Masking (Bitwise-AND Operation)without subnettingwith subnettingcopyright 2005 Douglas S. Reeves17 Example Step 1: determine network ID Step 2: determine physical network address Step 3: determine subnet IDUse first 2 bits to determine it s a Class B addressIP Address = ID = with subnet Address = Network = Subnet ID = 2 Physical Network = ,Class B address = 2005 Douglas S. Reeves18 Questions How can you tell if a destination IP address the same subnet as you??? the same network as you???4copyright 2005 Douglas S. Reeves19 Special Addresses ( subnetting )(normal)Subnet IDBroadcast toa specific subnetAll 1 s(normal)DescriptionHostIDNet IDcopyright 2005 Douglas S. Reeves20 Possible Subnet Sizesfor a Class B Network215 - - 223322 2 = 22141423 2 = 421313214 - 2222216 - 210 ( , subnettingnot used)# of hosts /subnet# of subnetspossible# of bits forsubnet IDWhat happened to15 bits for subnet ID?

6 ??What happened to16 bits for subnet ID???copyright 2005 Douglas S. Reeves21 Subnet Routing simple subnet masks (sequence of all 1 sfollowed by string of all 0 s) , 11111111111111111111000011110000is not OK Use the same mask for all subnets of subnets should be physically contiguous(connected) drawbacks?copyright 2005 Douglas S. Reeves22 Forwarding Decisions with subnetting Reminder: a forwarding table consists of<key, next IP address> entries key in forwarding table entries needs to consist network identifier Examples for network mask = , identifier = for subnet mask = , identifier = 2005 Douglas S. Reeves23 Forwarding Decisions (cont d) Steps in determining a forwarding table match (inorder of the table entries) the packet s destination IP address with the the result to the identifier to see if there is the first match foundcopyright 2005 Douglas S.

7 Reeves24 Forwarding Table .. Next hopIP addressMask Which entry does match? Which entry does match? Which entry does match? Which entry does match? Why choose this ordering of the routing table entries?5copyright 2005 Douglas S. Reeves25 Remember This Algorithm?Extract destination address Hd,compute network part Nif (N matches any directly connected networks)deliver to Hd directlyelse if (there is a host-specific route for Hd)forward datagram to specified next hopelse if (there is a route for network N)forward datagram to specified next hopelse if (there is a default route)forward datagram to default routerelse /* Hd is not directly connected and we */ /* don t know how to get to */discard the datagram and declare routing errorcopyright 2005 Douglas S.

8 Reeves26 The New Forwarding Algorithmextract destination address Hdfor forwarding table entries i= { if (Hd AND mask[i]) == destination[i] { forward datagram to specified next_hop[i] exit }}/* we don t know how to get to Hd */discard the datagram and declare routing errorcopyright 2005 Douglas S. Reeves27 Variable-Length subnetting Site with a Class C address , needsfive subnets with 60, 60, 60, 30, and 30 hosts Problems cannot use subnet mask , since itallows only 4 subnets, each with (28/ 4) - 2 = 62 hosts cannot use subnet mask , since itallows 8 subnets, each with only (28 / 8) - 2 = 30 hosts Solution: use two masks of different lengths router requirements RFC requires support for this however, not all routing protocols provide the subnetmask along with the destination network IDSUPERNETTING copyright 2005 Douglas S.

9 Reeves29 Supernet addressing Possible solution to exhaustion of Class Baddresses use multiple Class C addressesinstead Assign organizations blocks of 2n contiguousClass C addresses ex.: if 2000 addresses (hosts) are needed, allocate ablock of 2048 addresses ( = 8 contiguous Class Cnetworks) Problem: no longer have one network address foreach organization inter-organization routing tables will be larger(Note:subnets not shownfor simplicity;subnets andsupernets can beused together)Supernetting Example6 CLASSLESS INTERDOMAINROUTING (CIDR)copyright 2005 Douglas S. Reeves32 Classless InterDomain Routing (CIDR)(RFC1519) Idea: allocate IP addresses in a block of size 2n,for n=2,3,.. In a block means IP addresses must be allocatedcontiguously ( , share the same high-order bits) A block is summarized by a single routing tablekey of the form <network_address, CIDR_mask> network_address: the smallest (first) address in theblock CIDR_mask: the size of the address block No longer need classful addresses; the networksize is now explicit but, backwards compatible with classful addressescopyright 2005 Douglas S.

10 Reeves33 Classless InterDomain Routing (CIDR)(RFC1519) (cont d) CIDR_mask: number of 0 s indicates value of n 11111111 11111111 11111000 00000000: n = 11 11111111 00000000 00000000 00000000: n = 24( , class A address) More conveniently for people: /32-n to indicate number of 1 s in the mask 11111111 11111111 11111000 00000000: /21 11111111 00000000 00000000 00000000: /8copyright 2005 Douglas S. Reeves34 CIDR Masking + Subnet MaskingIP address:11000011 11001100 00110011 01000010 CIDR Mask:11111111 11111111 11111100 00000000 Network ID:11000011 11001100 00110000 00000000 Network + Subnet ID:11000011 11001100 00110011 01000000 Subnet Mask:11111111 11111111 11111111 11000000copyright 2005 Douglas S. Reeves35 Address Allocation and Masks Ex.: allocate a block of 223 (= 8M) addresses,starting at address 10000000 00000000 ( /9 )Mask11000010 01111111 11111111 00000000 00000000 How can you tell what the mask should be knowing the number of addresses?


Related search queries