Unformatted text preview:

1CLASSFUL IPv4 ADDRESSES +DATAGRAM FORWARDINGInternet ProtocolsCSC / ECE 573Fall, 2005N. C. State Universitycopyright 2005 Douglas S. Reeves2Today’s LectureI. IPv4 AddressesII. Address ClassesIII. “Special Case” AddressesIV. Forwarding BasicsV. Forwarding DecisionsVI. Next-Hop vs. Destination AddressesIPv4 ADDRESSEScopyright 2005 Douglas S. Reeves4How Do Addresses Get Assigned?1. ICANN (Internet Corp. for Assigned Numbers andNames)– establishes policy for address and name allocation– Allocates top-level address space to regional registries2. Regional registries allocate address space toISPs, companies, and other organizations– APNIC (Asia-Pacific)– ARIN (North America )– RIPE (Europe)– LACNIC (Latin America and Caribbean)3. Sys admins assign individual host addressescopyright 2005 Douglas S. Reeves5IP Allocation Goals (RFC 2050)1. Conservation: fair distribution of globally uniqueInternet address space, no stockpiling2. Routability: distribution in a hierarchical manner,makes routing easier– good? bad?3. Public registries document address spaceallocation and assignmentcopyright 2005 Douglas S. Reeves6How Do I Get to www.ietf.org?(…some hopsomitted…)24.93.64.5366.15.132.3366.185.152.2966.185.139.12966.185.145.6152.63.43.178152.63.41.138152.63.39.254152.63.39.97157.130.44.142132.151.6.21www.ietf.org132.151.6.21DNS translates this to…User specifiesdestination of …Router forwardingtables determinethe path is…2copyright 2005 Douglas S. Reeves7IPv4 Addresses• 32-bits long, globally unique• Each interface has an IP addressHIP1IP2Example: a routerRIP1 …. IP5Example: a multi-homed hostnetwork Anetwork Bcopyright 2005 Douglas S. Reeves8Dotted Decimal Notation152 . 1 . 54 . 48Dotted decimalrepresentation10011000 00000001 00110110 0011000032-bit address8 bits 8 bits 8 bits 8 bits• A convenient way to describe (and remember)IPv4 addresses• ExampleIPv4 ADDRESS CLASSEScopyright 2005 Douglas S. Reeves10Classful Addresses• Addresses are organized in a two-level hierarchy1.the network part (leftmost, most significant)2.the host part (rightmost, least significant)32-x bitsHost IDNetwork ID• More networks (= larger network part) meansfewer hosts per network (= smaller host part), andvice versax bitscopyright 2005 Douglas S. Reeves11Classful Address Formats1Host IDNetwork ID07 24EDCBAClass2Host IDNetwork ID1014163Host IDNetwork ID1102184Multicast Address1110285reserved1111027copyright 2005 Douglas S. Reeves12Classful Address Ranges• The size (number of bits) in the network part is notfixed– the first few bits of the address indicate this size• Classes– A = addresses 0.0.0.0—127.255.255.255– B = addresses 128.0.0.0—191.255.255.255– C = addresses 192.0.0.0—223.255.225.225– D = addresses 224.0.0.0—239.255.255.255– E = addresses 240.0.0.0—255.255.2553copyright 2005 Douglas S. Reeves13Classful Network Sizes28 (256)216 (64K)224 (16M)Potential Number ofHosts Per Network221 (2M)C214 (16K)B27 (128)APotential Numberof NetworksClasscopyright 2005 Douglas S. Reeves14Example• Why is class B address range128.0.0.0—191.255.255.255? 128 . 0 . 0 . 010 000000 00000000 00000000 00000000“class B”Lowest possible address(network and host parts) 128 . 255 . 255 . 25510 111111 11111111 11111111 11111111“class B”Highest possible address(network and host parts)—copyright 2005 Douglas S. Reeves15Good or Bad?1. Good: simple, easy to understand2. Bad: limited address space– 232 = 4G addresses not enough?3. Bad: limited network size choices (3)• ex.: what if a class C net needs to grow beyond 255hosts?3. Bad: moving to a new network requires changingIP addresses– and may require updating DNS recordscopyright 2005 Douglas S. Reeves16How Much of the Address Space is in Use?SPECIAL-CASE IPADDRESSEScopyright 2005 Douglas S. Reeves18Network Addresses• An IP address withhost ID part == 0 and network ID part != (all 0’s orall 1’s)refers to the entire networkHinterface 128.10.2.3interface 192.5.48.98network 128.10.0.0network 192.5.48.04copyright 2005 Douglas S. Reeves19Directed Broadcast Addresses• An IP destination address withHost ID part = all 1’smeans “all hosts attached to the specified network”• Ex.: Packet sent to address 128.10.255.255 fromhost H5 will reach H1…H4H1128.10.2.3network 128.10.0.0H2128.10.2.5H3128.10.2.27H4128.10.2.13192.5.48.3network 192.5.48.0H5192.5.48.46copyright 2005 Douglas S. Reeves20Limited Broadcast Addresses• An IP destination address== all 1’smeans “all hosts part of the same network as me”• Ex.: Packet sent to 255.255.255.255 from host H3reaches H1—H4H1128.10.2.3network 128.10.0.0H2128.10.2.5H3128.10.2.27H4128.10.2.13192.5.48.3network 192.5.48.0H5192.5.48.46copyright 2005 Douglas S. Reeves21Another Special Case• An IP source address withnetwork ID part = all 0’smeans “from this network”• Only allowed at startup (during bootstrapping)– allows a machine to communicate temporarily before itlearns its own IP address– thereafter it must not use network 0copyright 2005 Douglas S. Reeves22The Loopback Address• An IP destination address withnetwork ID part = all 1’smeans “this computer” (i.e., the one sending thepacket)• Used in testing network applications withoutsending data over a network– ex.: “ping 127.0.0.1” should always get a reply!– a datagram with destination address 127.x.x.x shouldnever appear on any networkcopyright 2005 Douglas S. Reeves23Summary of Special AddressesDestinationDestination--For Addressof Type…Broadcast address forsame network asoriginating hostAll 1’sAll 1’sBroadcast address forthe specified networkAll 1’sAnything otherthan all 0’s or all1’sThe address of thewhole networkAll 0’sAnything otherthan all 0’s or all1’sThen this means…And Host partis …If Network partis…“This computer”(source of the packet)Anything127 (Class A, all1’s)Destination(host which doesn’t yetknow what network it isattached to)Anything otherthan all 0’s orall 1’sAll 0’sSourcecopyright 2005 Douglas S. Reeves24RFC 3330: Special-Use IPv4 Addresses• 0.0.0.0—0.255.255.255 "This" Network [RFC1700]• 10.0.0.0—10.255.255.255 Private-Use Networks [RFC1918]• 24.0.0.0—24.255.255.255 Cable Television Networks• 169.254.0.0—169.254.255.255 Link Local• 172.16.0.0—172.23.255.255


View Full Document

NCSU CSC (ECE) 573 - LECTURE NOTES

Documents in this Course
Load more
Download LECTURE NOTES
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view LECTURE NOTES and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view LECTURE NOTES 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?