CLASSFUL IPv4 ADDRESSES + DATAGRAM FORWARDING

Similar documents
SUBNETS, CIDR, AND CLASSLESS ADDRESSING

Ref: A. Leon Garcia and I. Widjaja, Communication Networks, 2 nd Ed. McGraw Hill, 2006 Latest update of this lecture was on

Internet Protocol version 4 Part I

RARP: Reverse Address Resolution Protocol

Network and Host Addresses , Cisco Systems, Inc. All rights reserved. INTRO v1.0a 6-4

You can probably work with decimal. binary numbers needed by the. Working with binary numbers is time- consuming & error-prone.

Internet Addresses (You should read Chapter 4 in Forouzan)

04 Internet Protocol (IP)

IP Addressing A Simplified Tutorial

Internet Protocol Address

8.2 The Internet Protocol

Computer Network Foundation. Chun-Jen (James) Chung. Arizona State University

Lecture 8. IP Fundamentals

Internet Control Protocols Reading: Chapter 3

Guide to TCP/IP, Third Edition. Chapter 3: Data Link and Network Layer TCP/IP Protocols

Chapter 3: Review of Important Networking Concepts. Magda El Zarki Dept. of CS UC Irvine

IP Addressing Introductory material.

Chapter 5. IPv4 Addresses. TCP/IP Protocol Suite 1 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

IP addressing. Interface: Connection between host, router and physical link. IP address: 32-bit identifier for host, router interface

Internet Working 5 th lecture. Chair of Communication Systems Department of Applied Sciences University of Freiburg 2004

CS 457 Lecture 19 Global Internet - BGP. Fall 2011

Introduction to IP v6

Internet Packets. Forwarding Datagrams

IP Addressing. IP Addresses. Introductory material.

Lecture 15. IP address space managed by Internet Assigned Numbers Authority (IANA)

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

Module 2: Assigning IP Addresses in a Multiple Subnet Network

Internet Protocols. Addressing & Services. Updated:

Lab IP Addressing Overview

Network layer: Overview. Network layer functions IP Routing and forwarding

Savera Tanwir. Internet Protocol

256 4 = 4,294,967,296 ten billion = 18,446,744,073,709,551,616 ten quintillion. IP Addressing. IPv4 Address Classes

Chapter 3. TCP/IP Networks. 3.1 Internet Protocol version 4 (IPv4)

This tutorial will help you in understanding IPv4 and its associated terminologies along with appropriate references and examples.

Efficient Addressing. Outline. Addressing Subnetting Supernetting CS 640 1

Computer Networks. Introduc)on to Naming, Addressing, and Rou)ng. Week 09. College of Information Science and Engineering Ritsumeikan University

Networks University of Stirling CSCU9B1 Essential Skills for the Information Age. Content

IP - The Internet Protocol

CE363 Data Communications & Networking. Chapter 6 Network Layer: Logical Addressing

Introduction to IPv6 and Benefits of IPv6

Network layer. Assignment 3

TCP/IP Addressing and Subnetting. an excerpt from: A Technical Introduction to TCP/IP Internals. Presentation Copyright 1995 TGV Software, Inc.

Desirable Properties Of An Internet Addressing Scheme

IP Addressing. -Internetworking (with TCP/IP) -Classful addressing -Subnetting and Supernetting -Classless addressing

Instructor Notes for Lab 3

Computer Networks. Lecture 3: IP Protocol. Marcin Bieńkowski. Institute of Computer Science University of Wrocław

5. Classless and Subnet Address Extensions 최 양 희 서울대학교 컴퓨터공학부

- IPv4 Addressing and Subnetting -

HOST AUTO CONFIGURATION (BOOTP, DHCP)

Ethernet. Ethernet. Network Devices

IP Address Structure

IPv6 Addressing. John Rullan Cisco Certified Instructor Trainer Thomas A. Edison CTE HS

Internetworking and Internet-1. Global Addresses

Technical Support Information Belkin internal use only

Layer 3 Routing User s Manual

Router and Routing Basics

IP Address Classes (Some are Obsolete) Computer Networking. Important Concepts. Subnetting Lecture 8 IP Addressing & Packets

IP Routing Features. Contents

IP address format: Dotted decimal notation:

APPENDIX B. Routers route based on the network number. The router that delivers the data packet to the correct destination host uses the host ID.

IP Addressing and Subnetting. 2002, Cisco Systems, Inc. All rights reserved.

Procedure: You can find the problem sheet on Drive D: of the lab PCs. 1. IP address for this host computer 2. Subnet mask 3. Default gateway address

TCP/IP Basis. OSI Model

Communications and Networking

The Internet. Internet Technologies and Applications

Introduction to Network Operating Systems

Internet Addressing. Name: identifies what the object is Address: identifies where it is Route: identifies how to get there

IP addressing and forwarding Network layer

IPv6 Address Planning

IP Subnetting. Subnetting

Network Layer: Network Layer and IP Protocol

Internetworking. Problem: There is more than one network (heterogeneity & scale)

IP Networking Part 3- IP Address Management A webinar to help you prepare for the CBNE Certification

Lab#2: IP Addressing and Subnetting

Lecture Computer Networks

APNIC elearning: BGP Attributes

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

IPv6 Addressing. ISP Training Workshops

Computer Networks I Laboratory Exercise 1

Routing with OSPF. Introduction

Future Internet Technologies

(Refer Slide Time: 01:38 01:37)

Subnetting,Supernetting, VLSM & CIDR

ICS 351: Today's plan

TCP/IP Network Essentials. Linux System Administration and IP Services

Networking Test 4 Study Guide

Internet Protocol (IP) IP - Network Layer. IP Routing. Advantages of Connectionless. CSCE 515: Computer Network Programming IP routing

CCNA R&S: Introduction to Networks. Chapter 5: Ethernet

Gary Hecht Computer Networking (IP Addressing, Subnet Masks, and Packets)

COMP 631: COMPUTER NETWORKS. IP Addressing. Jasleen Kaur. Fall How to Deal With Heterogeneity & Scale?

IST 220 Exam 3 Notes Prepared by Dan Veltri

Network Basics GRAPHISOFT. for connecting to a BIM Server (version 1.0)

Network Layer: and Multicasting Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

iseries TCP/IP routing and workload balancing

1. How many unique network IDs are there in class A addresses? # of unique hosts?

CS335 Sample Questions for Exam #2

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ

DG Forwarding Algorithm

Transcription:

Today s Lecture CLASSFUL IPv4 ADDRESSES + DATAGRAM FORWARDING Internet Protocols CSC / ECE 573 Fall, 005 N. C. State University I. IPv4 Addresses II. Address Classes III. Special Case Addresses IV. Forwarding Basics V. Forwarding Decisions VI. Next-Hop vs. Destination Addresses copyright 005 Douglas S. Reeves How Do Addresses Get Assigned? IPv4 ADDRESSES 1. ICANN (Internet Corp. for Assigned Numbers and Names) establishes policy for address and name allocation Allocates top-level address space to regional registries. 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 005 Douglas S. Reeves 4 IP Allocation Goals (RFC 050) How Do I Get to www.ietf.org? 1. Conservation: fair distribution of globally unique Internet address space, no stockpiling. Routability: distribution in a hierarchical manner, makes routing easier good? bad? 3. Public registries document address space allocation and assignment User specifies destination of www.ietf.org DNS translates this to 13.151.6.1 Router forwarding tables determine the path is ( some hops omitted ) 4.93.64.53 66.15.13.33 66.185.15.9 66.185.139.19 66.185.145.6 15.63.43.178 15.63.41.138 15.63.39.54 15.63.39.97 157.130.44.14 13.151.6.1 copyright 005 Douglas S. Reeves 5 copyright 005 Douglas S. Reeves 6 1

IPv4 Addresses 3-bits long, globally unique Each interface has an IP address Example: a router Example: a multi-homed host Dotted Decimal Notation A convenient way to describe (and remember) IPv4 addresses Example 8 bits 8 bits 8 bits 8 bits R IP1. IP5 network A IP1 H IP 3-bit address Dotted decimal representation 10011000 00000001 00110110 00110000 15. 1. 54. 48 network B copyright 005 Douglas S. Reeves 7 copyright 005 Douglas S. Reeves 8 Classful Addresses IPv4 ADDRESS CLASSES Addresses are organized in a two-level hierarchy 1.the network part (leftmost, most significant).the host part (rightmost, least significant) x bits 3-x bits Network ID Host ID More networks (= larger network part) means fewer hosts per network (= smaller host part), and vice versa copyright 005 Douglas S. Reeves 10 Classful Address Formats Classful Address Ranges Class A B 1 0 Network ID 10 7 4 Network ID Host ID 1 4 Host ID 16 The size (number of bits) in the network part is not fixed the first few bits of the address indicate this size Classes C D 3 110 4 1110 Network ID 1 Multicast Address 8 8 Host ID A = addresses 0.0.0.0 17.55.55.55 B = addresses 18.0.0.0 191.55.55.55 C = addresses 19.0.0.0 3.55.5.5 D = addresses 4.0.0.0 39.55.55.55 E 5 11110 reserved 7 E = addresses 40.0.0.0 55.55.55 copyright 005 Douglas S. Reeves 11 copyright 005 Douglas S. Reeves 1

Classful Network Sizes Example Class Potential Number of Networks Potential Number of Hosts Per Network Why is class B address range 18.0.0.0 191.55.55.55? class B Lowest possible address (network and host parts) A B 7 (18) 14 (16K) 4 (16M) 16 (64K) 10 000000 00000000 00000000 00000000 18. 0. 0. 0 C 1 (M) 8 (56) class B Highest possible address (network and host parts) 10 111111 11111111 11111111 11111111 18. 55. 55. 55 copyright 005 Douglas S. Reeves 13 copyright 005 Douglas S. Reeves 14 Good or Bad? How Much of the Address Space is in Use? 1. Good: simple, easy to understand. Bad: limited address space 3 = 4G addresses not enough? 3. Bad: limited network size choices (3) ex.: what if a class C net needs to grow beyond 55 hosts? 3. Bad: moving to a new network requires changing IP addresses and may require updating DNS records copyright 005 Douglas S. Reeves 15 copyright 005 Douglas S. Reeves 16 Network Addresses SPECIAL-CASE IP ADDRESSES An IP address with host ID part == 0 and network ID part!= (all 0 s or all 1 s) refers to the entire network H interface 18.10..3 interface 19.5.48.98 network 18.10.0.0 copyright 005 Douglas S. Reeves 18 3

Directed Broadcast Addresses An IP destination address with Host ID part = all 1 s means all hosts attached to the specified network Ex.: Packet sent to address 18.10.55.55 from host H5 will reach H1 H4 19.5.48.3 18.10..3 H1 18.10..5 H 19.5.48.46 H5 18.10..7 18.10..13 H3 H4 network 18.10.0.0 copyright 005 Douglas S. Reeves 19 Limited Broadcast Addresses An IP destination address == all 1 s means all hosts part of the same network as me Ex.: Packet sent to 55.55.55.55 from host H3 reaches H1 H4 19.5.48.3 18.10..3 H1 19.5.48.46 18.10..5 H H5 18.10..7 18.10..13 H3 H4 network 18.10.0.0 copyright 005 Douglas S. Reeves 0 Another Special Case An IP source address with network ID part = all 0 s means from this network Only allowed at startup (during bootstrapping) allows a machine to communicate temporarily before it learns its own IP address thereafter it must not use network 0 The Loopback Address An IP destination address with network ID part = all 1 s means this computer (i.e., the one sending the packet) Used in testing network applications without sending data over a network ex.: ping 17.0.0.1 should always get a reply! a datagram with destination address 17.x.x.x should never appear on any network copyright 005 Douglas S. Reeves 1 copyright 005 Douglas S. Reeves Summary of Special Addresses RFC 3330: Special-Use IPv4 Addresses For Address of Type -- Destination Destination Source Destination If Network part is Anything other than all 0 s or all 1 s Anything other than all 0 s or all 1 s All 1 s All 0 s 17 (Class A, all 1 s) And Host part is All 0 s All 1 s All 1 s Anything other than all 0 s or all 1 s Anything Then this means The address of the whole network Broadcast address for the specified network Broadcast address for same network as originating host (host which doesn t yet know what network it is attached to) This computer (source of the packet) copyright 005 Douglas S. Reeves 3 0.0.0.0 0.55.55.55 "This" Network [RFC1700] 10.0.0.0 10.55.55.55 Private-Use Networks [RFC1918] 4.0.0.0 4.55.55.55 Cable Television Networks 169.54.0.0 169.54.55.55 Link Local 17.16.0.0 17.3.55.55 Private-Use Networks [RFC1918] 19.168.0.0--19.168.55.55 Private-Use Networks [RFC1918] 4.0.0.0 39.55.55.55 Multicast [RFC3171] 40.0.0.0 55.55.55.55 Reserved for Future Use [RFC1700] copyright 005 Douglas S. Reeves 4 4

Routers and Neighbors Routers (also called Gateways) receive packets on one network, send out on another FORWARDING BASICS Neighbors (or directly-connected computers) are attached to the same physical network can communicate directly with each other (i.e., no router needed) network 15.14.0.0 15.14.51.14 R1 H1 19.5.48.1 19.5.48.15 15.14.51.9 H H3 19.5.48.7 15.14.51.1 R 19.5.48.3 copyright 005 Douglas S. Reeves 6 Packet Forwarding Deciding what neighbor to send a packet to is a forwarding decision Ex.: for H1 to send a packet to H, should it forward the packet to 19.5.48.1 (router R1) or 19.5.48.3 (router R)? 15.14.51.14 R1 19.5.48.1 H1 19.5.48.15 15.14.51.9 H H3 19.5.48.7 network 15.14.0.0 15.14.51.1 R 19.5.48.3 Direct Packet Delivery Host H x wishes to send packet to a neighboring host H y how does H x know they are on the same network? H x frames (encapsulates) the datagram according to the requirements of the network connecting H x and H y H x sends this frame directly to H y there are no intervening routers involved copyright 005 Douglas S. Reeves 7 copyright 005 Douglas S. Reeves 8 Indirect Datagram Delivery Needed if hosts H x and H y are not neighbors Q: how does H x figure this out? H x picks a neighboring router R1 to forward the datagram to H x frames the packet, sends directly to R1 Indirect Datagram Delivery (cont d) R1 extracts the packet, picks a neighboring router R to forward to, frames the packet, sends to R... Rn extracts packet, determines Hy is a neighbor (how does Rn know this?), frames the packet, sends directly to Hy copyright 005 Douglas S. Reeves 9 copyright 005 Douglas S. Reeves 30 5

Forwarding (or routing) Tables Forwarding decisions are based on information computed by routing protocols this information is stored in a forwarding table For router R, each entry in its table consists roughly of 1. Key. IP address of "next hop" router 3. Which interface to use Notes! Routing Tables (cont d) the forwarding table does not specify the complete path to the destination the next router must be directly connected to R copyright 005 Douglas S. Reeves 31 copyright 005 Douglas S. Reeves 3 network 10.0.0.0 10.0.0.5 R1 network 0.0.0.0 0.0.0.6 R 30.0.0.6 0.0.0.5 network 30.0.0.0 R3 40.0.0.7 network 40.0.0.0 Example R s Forwarding Table Forward to address To reach hosts on network 0.0.0.0 30.0.0.0 10.0.0.0 40.0.0.0 (direct) (direct) 0.0.0.5 Which interface to use 0.0.0.6 30.0.0.6 0.0.0.6 30.0.0.6 copyright 005 Douglas S. Reeves 33 FOWARDING DECISIONS Forwarding Decisions The key on which forwarding decisions are based is (usually) the destination network ID Note that path from H x to H y may not be the same as the path from H y to H x Traffic for destination network N not split across multiple paths Forwarding Decisions (cont d) Another benefit: routing tables can be (relatively) small many fewer network addresses than there are host addresses ex.: to deliver packets to one class A network having 16M hosts, only one routing table entry needed! Why this approach? extremely simple, fast lookup decision drawbacks / limitations? copyright 005 Douglas S. Reeves 35 copyright 005 Douglas S. Reeves 36 6

Other Consequences Forwarding (generally) does not consider application type quality of service requirements bandwidth available congestion reliability! Default Routes Frequently, a single router R is used for most outgoing traffic may need to specify a few destination-specific network routes everything else goes through R copyright 005 Douglas S. Reeves 37 copyright 005 Douglas S. Reeves 38 Default Routes (cont d) In the forwarding table, there will be an entry with key = "all other (non-specified) destination networks normal meaning: the rest of the Internet simplifies forwarding tables Host-Specific Routes The key may be a single destination host address allows specifying a route to a single computer Useful for testing and debugging purposes security purposes what else? copyright 005 Douglas S. Reeves 39 copyright 005 Douglas S. Reeves 40 The Datagram Forwarding Algorithm The Datagram Forwarding Algorithm (cont d) /* M is a machine (router or host) making */ /* a forwarding decision about a packet */ Extract destination address Hd, compute network part N if (N matches any directly connected networks) deliver to Hd directly else if (there is a host-specific route for Hd) forward datagram to specified next hop else if (there is a default route) forward datagram to default router else /* Hd is not directly connected and we */ /* don t know how to get to it */ discard the datagram and declare routing error else if (there is a route for network N) forward datagram to specified next hop copyright 005 Douglas S. Reeves 41 copyright 005 Douglas S. Reeves 4 7

Host Forwarding Tables Example Hosts also need forwarding tables to pick the appropriate "first hop" router 30.0.0.6 R 0.0.0.6 H 30.0.0.68 network 0.0.0.0 network 40.0.0.0 40.0.0.7 R1 network 30.0.0.0 Frequently there is only one directly-connected router, and the only entry in the table is the default route copyright 005 Douglas S. Reeves 43 copyright 005 Douglas S. Reeves 44 The Datagram Receiving Algorithm if (Hd is one of M s IP addresses) receive the datagram else if (Hd is a limited or directed broadcast address for the network on which it was sent) receive the datagram else if (M is a router) Should Multi-Homed Hosts Forward? Since they don t participate in routing protocols probably not! inefficient routes can create loops leads to broadcast "storms etc. forward the datagram if possible else /* M is a host and this packet is not intended for it */ discard the datagram copyright 005 Douglas S. Reeves 45 copyright 005 Douglas S. Reeves 46 Destination vs. Next Hop IP Addresses The destination IP address in a IP datagram never changes DESTINATION vs. NEXT-HOP ADDRESSES At router R, the datagram is framed and a physical address is added to get it to the "next hop router" copyright 005 Douglas S. Reeves 48 8

Example Example (cont d) network 30.0.0.0 network 40.0.0.0 H s 30.0.0.68 40.0.0.7 1. H s wants to send IP packet to destination IP address 40.0.0.4 (H d ). H s sends on network 30.0.0.0 the encapsulated IP packet with <MAC address 00:01:0:03:04:05 of R, IP address 40.0.0.4> R H d 40.0.0.4 MAC=66:77:88:99:AA:BB MAC=00:01:0:03:04:05 copyright 005 Douglas S. Reeves 49 network 30.0.0.0 network 40.0.0.0 H s 30.0.0.68 40.0.0.7 3. R sends on network 40.0.0.0 the encapsulated IP packet with <MAC address 66:77:88:99:AA:BB of H d, IP address 40.0.0.4> 4. Demultiplexed IP packet received by H d R H d 40.0.0.4 MAC=66:77:88:99:AA:BB MAC=00:01:0:03:04:05 copyright 005 Douglas S. Reeves 50 Example (cont d) The next hop router IP address (from the routing table) is never stored in the packet must be translated into a physical address instead So why not just store MAC addresses in routing tables? routing is IP-layer function (i.e., should be independent of the link layer) copyright 005 Douglas S. Reeves 51 Summary 1. IP Addresses use two levels of hierarchy. First few bits of address specify what class it is 3. Special addresses reserved for particular uses 4. Both hosts and routers have to make forwarding decisions 5. Forwarding tables contain the information needed to make these decisions 6. Forwarding decisions are based on the destination only copyright 005 Douglas S. Reeves 5 Next Lecture ICMP copyright 005 Douglas S. Reeves 53 9