Classful Addresses and Datagram Forwarding

Classful Addresses and Datagram Forwarding

Today’s Lecture I. IPv4 Addresses CLASSFUL IPv4 ADDRESSES + II. Address Classes DATAGRAM FORWARDING III. “Special Case” Addresses Internet Protocols IV. Forwarding Basics CSC / ECE 573 V. Forwarding Decisions Fall, 2005 N. C. State University VI. Next-Hop vs. Destination Addresses copyright 2005 Douglas S. Reeves 2 How Do Addresses Get Assigned? 1. ICANN (Internet Corp. for Assigned Numbers and Names) – establishes policy for address and name allocation – Allocates top-level address space to regional registries IPv4 ADDRESSES 2. Regional registries allocate address space to ISPs, companies, and other organizations – APNIC (Asia-Pacific) – ARIN (North America ) – RIPE (Europe) – LACNIC (Latin America and Caribbean) 3. Sys admins assign individual host addresses copyright 2005 Douglas S. Reeves 4 IP Allocation Goals (RFC 2050) How Do I Get to www.ietf.org? User specifies 1. Conservation: fair distribution of globally unique destination of … Internet address space, no stockpiling www.ietf.org (…some hops omitted…) 2. Routability: distribution in a hierarchical manner, 24.93.64.53 makes routing easier DNS translates this to… 66.15.132.33 66.185.152.29 – good? bad? 66.185.139.129 132.151.6.21 66.185.145.6 3. Public registries document address space Router forwarding tables determine 152.63.43.178 allocation and assignment the path is… 152.63.41.138 152.63.39.254 152.63.39.97 157.130.44.142 132.151.6.21 copyright 2005 Douglas S. Reeves 5 copyright 2005 Douglas S. Reeves 6 1 IPv4 Addresses Dotted Decimal Notation • 32-bits long, globally unique • A convenient way to describe (and remember) IPv4 addresses • Each interface has an IP address 8 bits 8 bits 8 bits 8 bits • Example Example: a router Example: a multi-homed host R network A 32-bit address 10011000 00000001 00110110 00110000 IP1 …. IP5 IP1 Dotted decimal H 152 . 1 . 54 . 48 representation IP2 network B copyright 2005 Douglas S. Reeves 7 copyright 2005 Douglas S. Reeves 8 Classful Addresses • Addresses are organized in a two-level hierarchy 1.the network part (leftmost, most significant) 2.the host part (rightmost, least significant) IPv4 ADDRESS CLASSES x bits 32-x bits Network ID Host ID • More networks (= larger network part) means fewer hosts per network (= smaller host part), and vice versa copyright 2005 Douglas S. Reeves 10 Classful Address Formats Classful Address Ranges Class 1 7 24 • The size (number of bits) in the network part is not Network ID fixed A 0 Host ID – the first few bits of the address indicate this size 2 1 16 4 B 10 Network ID Host ID • Classes 3 2 8 – A = addresses 0.0.0.0—127.255.255.255 1 C 110 Network ID Host ID – B = addresses 128.0.0.0—191.255.255.255 4 2 – C = addresses 192.0.0.0—223.255.225.225 8 D 1110 Multicast Address – D = addresses 224.0.0.0—239.255.255.255 5 2 7 – E = addresses 240.0.0.0—255.255.255 E 11110 reserved copyright 2005 Douglas S. Reeves 11 copyright 2005 Douglas S. Reeves 12 2 Classful Network Sizes Example • Why is class B address range Class Potential Number Potential Number of 128.0.0.0—191.255.255.255? of Networks Hosts Per Network Lowest possible address “class B” (network and host parts) A 27 (128) 224 (16M) 10 000000 00000000 00000000 00000000 128 . 0 . 0 . 0 — B 214 (16K) 216 (64K) Highest possible address C 221 (2M) 28 (256) “class B” (network and host parts) 10 111111 11111111 11111111 11111111 128 . 255 . 255 . 255 copyright 2005 Douglas S. Reeves 13 copyright 2005 Douglas S. Reeves 14 Good or Bad? How Much of the Address Space is in Use? 1. Good: simple, easy to understand 2. 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 255 hosts? 3. Bad: moving to a new network requires changing IP addresses – and may require updating DNS records copyright 2005 Douglas S. Reeves 15 copyright 2005 Douglas S. Reeves 16 Network Addresses • An IP address with host ID part == 0 and network ID part != (all 0’s or all 1’s) SPECIAL-CASE IP refers to the entire network ADDRESSES network 128.10.0.0 interface 128.10.2.3 H interface 192.5.48.98 network 192.5.48.0 copyright 2005 Douglas S. Reeves 18 3 Directed Broadcast Addresses Limited Broadcast Addresses • An IP destination address with • An IP destination address Host ID part = all 1’s == all 1’s means “all hosts attached to the specified network” means “all hosts part of the same network as me” • Ex.: Packet sent to address 128.10.255.255 from • Ex.: Packet sent to 255.255.255.255 from host H3 host H5 will reach H1…H4 reaches H1—H4 network 128.10.0.0 network 128.10.0.0 128.10.2.3 128.10.2.5 128.10.2.27 128.10.2.13 128.10.2.3 128.10.2.5 128.10.2.27 128.10.2.13 H1 H2 H3 H4 H1 H2 H3 H4 192.5.48.3 192.5.48.3 network 192.5.48.0 network 192.5.48.0 192.5.48.46 192.5.48.46 H5 H5 copyright 2005 Douglas S. Reeves 19 copyright 2005 Douglas S. Reeves 20 Another Special Case The Loopback Address • An IP source address with • An IP destination address with network ID part = all 0’s network ID part = all 1’s means “from this network” means “this computer” (i.e., the one sending the packet) • Only allowed at startup (during bootstrapping) – allows a machine to communicate temporarily before it • Used in testing network applications without learns its own IP address sending data over a network – thereafter it must not use network 0 – ex.: “ping 127.0.0.1” should always get a reply! – a datagram with destination address 127.x.x.x should never appear on any network copyright 2005 Douglas S. Reeves 21 copyright 2005 Douglas S. Reeves 22 Summary of Special Addresses RFC 3330: Special-Use IPv4 Addresses For Address If Network part And Host part Then this means • 0.0.0.0—0.255.255.255 "This" Network [RFC1700] of Type… is… is … … Anything other • 10.0.0.0—10.255.255.255 Private-Use Networks [RFC1918] The address of the -- than all 0’s or all All 0’s whole network • 24.0.0.0—24.255.255.255 Cable Television Networks 1’s Anything other Broadcast address for • 169.254.0.0—169.254.255.255 Link Local Destination than all 0’s or all All 1’s the specified network 1’s • 172.16.0.0—172.23.255.255 Private-Use Networks [RFC1918] Broadcast address for • 192.168.0.0--192.168.255.255 Private-Use Networks [RFC1918] Destination All 1’s All 1’s same network as originating host • 224.0.0.0—239.255.255.255 Multicast [RFC3171] Anything other (host which doesn’t yet Source All 0’s than all 0’s or know what network it is • 240.0.0.0—255.255.255.255 Reserved for Future Use [RFC1700] all 1’s attached to) 127 (Class A, all “This computer” Destination Anything 1’s) (source of the packet) copyright 2005 Douglas S. Reeves 23 copyright 2005 Douglas S. Reeves 24 4 Routers and Neighbors • Routers (also called Gateways) – receive packets on one network, send out on another • Neighbors (or directly-connected computers) FORWARDING BASICS – are attached to the same physical network – can communicate directly with each other (i.e., no router needed) network 152.14.0.0 152.14.51.9 152.14.51.14 H2 152.14.51.12 R1 R2 H1 H3 192.5.48.12 192.5.48.3 192.5.48.15 192.5.48.27 network 192.5.48.0 copyright 2005 Douglas S. Reeves 26 Packet Forwarding Direct Packet Delivery • Deciding what neighbor to send a packet to is a • Host Hx wishes to send packet to a neighboring forwarding decision host Hy – how does H know they are on the same network? • Ex.: for H1 to send a packet to H2, should it x forward the packet to… • Hx frames (encapsulates) the datagram according – 192.5.48.12 (router R1) to the requirements of the network connecting Hx – or 192.5.48.3 (router R2)? and Hy network 152.14.0.0 • Hx sends this frame directly to Hy 152.14.51.9 152.14.51.14 H2 152.14.51.12 – there are no intervening routers involved R1 R2 192.5.48.12 H1 H3 192.5.48.3 192.5.48.15 192.5.48.27 network 192.5.48.0 copyright 2005 Douglas S. Reeves 27 copyright 2005 Douglas S. Reeves 28 Indirect Datagram Delivery Indirect Datagram Delivery (cont’d) • Needed if hosts Hx and Hy are not neighbors • R1 extracts the packet, picks a neighboring router R2 to forward to, frames the packet, sends to R2 – Q: how does Hx figure this out? • ... • Hx picks a neighboring router R1 to forward the datagram to • Rn extracts packet, determines Hy is a neighbor (how does Rn know this?), frames the packet, • Hx frames the packet, sends directly to R1 sends directly to Hy copyright 2005 Douglas S. Reeves 29 copyright 2005 Douglas S. Reeves 30 5 Forwarding (or routing) Tables Routing Tables (cont’d) • Forwarding decisions are based on information • Notes! computed by routing protocols – the forwarding table does not specify the complete – this information is stored in a forwarding table path to the destination – the next router must be directly connected to R • For router R, each entry in its table consists roughly of 1.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    9 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us