Autumn Oct 21, Oct 21, 2004 CS573: Network Protocols and Standards 1 Oct 21, 2004 CS573: Network Protocols and Standards 2

Similar documents
Internet Protocol Address

RARP: Reverse Address Resolution Protocol

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

Efficient Addressing. Outline. Addressing Subnetting Supernetting CS 640 1

03 Internet Addressing

Internetworking and Internet-1. Global Addresses

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

ICS 351: Today's plan

04 Internet Protocol (IP)

8.2 The Internet Protocol

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

Introduction to IP v6

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

IP Addressing A Simplified Tutorial

Internet Addresses (You should read Chapter 4 in Forouzan)

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

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

Internet Protocol version 4 Part I

Lecture 8. IP Fundamentals

2. What is the maximum value of each octet in an IP address? A. 28 B. 255 C. 256 D. None of the above

Technical Support Information Belkin internal use only

Lab IP Addressing Overview

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

Internet Packets. Forwarding Datagrams

PART IV. Network Layer

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

Internetworking and IP Address

Module 2: Assigning IP Addresses in a Multiple Subnet Network

2. IP Networks, IP Hosts and IP Ports

Address Resolution Protocol (ARP), Reverse ARP, Internet Protocol (IP)

Network Security TCP/IP Refresher

Internet Control Protocols Reading: Chapter 3

Guide to Network Defense and Countermeasures Third Edition. Chapter 2 TCP/IP

Lab a Basic Subnetting

Networking Test 4 Study Guide

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

Transport and Network Layer

CS 348: Computer Networks. - IP addressing; 21 st Aug Instructor: Sridhar Iyer IIT Bombay

One of the most important topics in any discussion of TCP/IP is IP. IP Addressing

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.

Guide to TCP/IP, Third Edition. Chapter 2: IP Addressing and Related Topics

Internet Protocols. Addressing & Services. Updated:

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

Lecture Computer Networks

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

IP Addressing Introductory material.

Subnetting,Supernetting, VLSM & CIDR

IP address format: Dotted decimal notation:

Expert Reference Series of White Papers. Basics of IP Address Subnetting

TCP/IP Fundamentals. OSI Seven Layer Model & Seminar Outline

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

Dynamic Host Configuration Protocol (DHCP) 02 NAT and DHCP Tópicos Avançados de Redes

Classful IP Addressing (cont.)

1 Data information is sent onto the network cable using which of the following? A Communication protocol B Data packet

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

Future Internet Technologies

CCNA Tutorial Series SUBNETTING

Variable length subnetting

Network-Oriented Software Development. Course: CSc4360/CSc6360 Instructor: Dr. Beyah Sessions: M-W, 3:00 4:40pm Lecture 2

Introduction to LAN/WAN. Network Layer (part II)

Mobile IP Network Layer Lesson 02 TCP/IP Suite and IP Protocol

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

TCP/IP Basis. OSI Model

TCP/IP Fundamentals. Edmund Lam IT Audit Manager University of California 7/25/99 1

Question Question Question EdTech 552: Lab 3 Answer Sheet

Scaling the Network: Subnetting and Other Protocols. Networking CS 3470, Section 1

IP Routing Features. Contents

CS335 Sample Questions for Exam #2

Part A:Background/Preparation

IP Addressing. IP Addresses. Introductory material.

First Workshop on Open Source and Internet Technology for Scientific Environment: with case studies from Environmental Monitoring

- IPv4 Addressing and Subnetting -

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

Mobile IP. Bheemarjuna Reddy Tamma IIT Hyderabad. Source: Slides of Charlie Perkins and Geert Heijenk on Mobile IP

Chapter 2 TCP/IP Networking Basics

IP Address Structure

Internet Architecture and Philosophy

Ethernet. Ethernet. Network Devices

Networking Basics for Automation Engineers

How To Make A Network Address Prefix Smaller

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

VXLAN: Scaling Data Center Capacity. White Paper

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

IP - The Internet Protocol

Zarząd (7 osób) F inanse (13 osób) M arketing (7 osób) S przedaż (16 osób) K adry (15 osób)

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

Instructor Notes for Lab 3

Chapter 13 Internet Protocol (IP)

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

Application Protocols for TCP/IP Administration

How do I get to

CCNA R&S: Introduction to Networks. Chapter 9: Subnetting IP Networks

SUPPORT DE COURS. Dr. Omari Mohammed Maître de Conférences Classe A Université d Adrar Courriel : omarinmt@gmail.com

Chapter 3: IP Addressing and VLSM

Internet Protocols. Background CHAPTER

Transcription:

IPv4 IP: Addressing, ARP, Routing Protocols and Standards Autumn 2004-2005 IP Datagram Format IPv4 Addressing ARP and RARP IP Routing Basics Subnetting and Supernetting ICMP Address Translation (NAT) Dynamic Addressing Oct 21, 2004 CS573: Protocols and Standards 1 Oct 21, 2004 CS573: Protocols and Standards 2 Internet Addresses (IP Addresses) Defined when IP was standardized in 1981 IP addresses are 32-bit long and consist of: a network address part network identifier a host address part host number within that network IP addresses are grouped into classes (A,B,C) depending on the size of the network identifier and the host part of the address A fourth class (Class D) was defined later (1988) for Multicast addresses Class A Class B Class C Class D Class E 0 8 16 24 32 bits 0 NETWORK HOST (24 BITS) 10 NETWORK HOST (16 BITS) 110 NETWORK HOST (8 BITS) 1110 IP MULTICAST ADDRESSES (28 BITS) 11110 RESERVED FOR EXPERIMENTS Oct 21, 2004 CS573: Protocols and Standards 3 Oct 21, 2004 CS573: Protocols and Standards 4 Class A 126 networks (0 and 127 reserved) Assigned to very large size networks where 65K < number of hosts < 16M Class B 16384 networks Assigned to Intermediate size networks where 256 < number of hosts < 65K Class C 2097152 networks Assigned to smaller networks where #hosts < 256 Dotted Decimal Notation Internet addresses are represented in text by the dotted decimal notation each byte is written in decimal values (from 0 to 255) example: 10000000 00001010 00000010 00011110 is written as 128. 10. 2. 30 Oct 21, 2004 CS573: Protocols and Standards 5 Oct 21, 2004 CS573: Protocols and Standards 6 CS573: Protocols and Standards 1

Uniqueness of IP Addresses numbers are assigned by a central authority Class A B C D E Lowest Identifier Address 1.0.0.0 128.0.0.0 192.0.0.0 224.0.0.0 240.0.0.0 Highest Identifier Address 126.0.0.0 191.255.0.0 223.255.255.0 239.255.255.255 247.255.255.255 The Internet Information Center (InterNIC) Another authority, the IANA Internet Assigned Numbers Authority sets policy numbers are unique worldwide Host numbers are assigned by network managers They must be unique within a given network Thus, IP addresses are unique worldwide. Oct 21, 2004 CS573: Protocols and Standards 7 Oct 21, 2004 CS573: Protocols and Standards 8 Special Purpose IP Addresses 0.0.0.0 Means this host, used by machines as source address when they boot up (if they don t know their IP address, and need to get it from a boot server) 255.255.255.255 Means limited broadcast. Used as a destination address to send packets to all hosts on the local network where the source is. Packets sent to this address are never relayed part all zeros Means the host on this network Host part all ones Broadcast address on the network specified in the network identifier; routers typically do not forward these datagrams Host part all zeros Broadcast address on the network specified in the network identifier (it was an implementation error in some networks) Special Purpose IP Addresses 127.x.x.x Means loopback (datagrams are looped back in software; they are not sent on any physical interface) 224.0.0.1 Multicast address for All systems on this subnetwork 224.0.0.2 Multicast address for All routers on this subnetwork Oct 21, 2004 CS573: Protocols and Standards 9 Oct 21, 2004 CS573: Protocols and Standards 10 Internet Addresses Translating Between IP and MAC Addresses (ARP and RARP) 127 ALL 0 s ALL 0 s HOST ALL 1 s NET ALL 1 s ANYTHING This Host Host on this network Limited broadcast (local net) Directed broadcast (for NET) Loopback Each interface has an IP address at Layer 3, and a MAC address at Layer 2 Assume that host A wants to send a packet to host B (A and B on the same network) Host A knows the IP address of host B; however, in order to transmit the packet, host A must somehow know or find out what the MAC (layer 2) address of host B is! Solution: the Address Resolution Protocol (ARP), RFC826 Oct 21, 2004 CS573: Protocols and Standards 11 Oct 21, 2004 CS573: Protocols and Standards 12 CS573: Protocols and Standards 2

Address Resolution Protocol Used to find the physical address of a target device on the local physical network, given only the target s IP address Mechanism: The source broadcasts a special packet asking the device with target IP address to respond with a message carrying the (IP address, physical address) mapping All devices on the local physical network receive the broadcast, but only the target recognizes its IP address and responds to the request When the source receives the reply, it sends the packet to the target using the target s physical address and places the mapping in its cache (a cache is used to prevent repeated broadcasts for the same destination) More on ARP ARP refinements Source includes its <IP address, physical address> mapping in the ARP request anticipating the target s need for it in the near future. This avoids extra network traffic When all machines receive the ARP request broadcast, they can store the address mapping in their cache. Do they? ARP is used when an IP to physical address mapping changes to notify hosts on the network of the change ARP messages are encapsulated in MAC frames. A special value in the type field of the frame is used to indicate that it is carrying an ARP message (0806 hex is used for ARP) Entries in the local ARP cache for each host time out after a certain period Oct 21, 2004 CS573: Protocols and Standards 13 Oct 21, 2004 CS573: Protocols and Standards 14 ARP Message Format ARP Message 0 8 16 24 HARDWARE TYPE PROTOCOL TYPE HLEN PLEN OPERATION SENDER HA (octets 0-3) SENDER HA (octets 4-5) SENDER IP (octets 0-1) SENDER IP (octets 2-3) TARGET HA (octets 0-1) TARGET HA (octets 2-5) TARGET IP (octets 0-3) 31 HARDWARE TYPE: specifies type of hardware interface for which the request is made (e.g., 1 for Ethernet) PROTOCOL TYPE: specifies high level protocol address supplied in message (e.g. 0800 hex for IP) HLEN and PLEN: specify length of fields for hardware address and protocol address respectively OPERATION: specifies if this is an ARP request or reply message (1 for ARP request, 2 for ARP response, 3 for RARP request and 4 for RARP response) HA and IP: hardware and IP addresses respectively Oct 21, 2004 CS573: Protocols and Standards 15 Oct 21, 2004 CS573: Protocols and Standards 16 Reverse ARP Usually, a machine s IP address is kept on its secondary storage (OS finds it at start up) Issue : Diskless Workstations! files are stored on a remote server need IP address to use TCP/IP to obtain initial boot image Solution : Use physical address to identify machine Given a physical network address, find the corresponding Internet address Reverse Address Resolution Protocol (RARP), RFC903 RARP Mechanism Sender broadcasts a RARP request, supplying its physical network address in the Target HA field Only machines authorized to supply the RARP service (RARP servers) process the request and send a reply filling in the target internet address Mechanism allows a host to ask about an arbitrary target thus sender HA is separate from target HA address RARP server replies to sender s HA Ethernet frame Protocol Type for RARP is 8035 hex Oct 21, 2004 CS573: Protocols and Standards 17 Oct 21, 2004 CS573: Protocols and Standards 18 CS573: Protocols and Standards 3

Routing IP Datagram IP Routing Protocols and Standards Autumn 2002-2003 Direct Delivery (i.e., not involving routers): Transmission of an IP datagram between two machines on a single physical network does not involve routers The sender encapsulates the datagram in a physical frame, binds the destination IP address to a physical hardware address (using ARP), and sends the resulting frame directly to the destination The two machines are known to be on the same network because they have the same network identifier Router Example: A sends IP Datagram to B A B C Oct 21, 2004 CS573: Protocols and Standards 19 Oct 21, 2004 CS573: Protocols and Standards 20 Routing IP Datagram Indirect delivery (i.e. through intermediate routers) Host performs routing decisions based on routing table indicating next hop Next hop refers to next router IP address on this network, via which the destination is reached Routing decisions are made based on network prefixes (not full IP address) The sender encapsulates the datagram in a frame with the router s physical destination address (which is found by means of ARP). Direct and Indirect Routing B wants to send packets to A and C! Host A 204.240.18.10 204.240.18.1 Direct Routing: Router Packets sent directly using MAC address of A Indirect Routing: Packets sent to the MAC address Host B of the router. At the IP level, B is 204.240.18.20 The source and C is the destination Internet Host C 36.14.0.200 Oct 21, 2004 CS573: Protocols and Standards 21 Oct 21, 2004 CS573: Protocols and Standards 22 IP Routing Decisions IP Routing Algorithm 10.0.0.5 20.0.0.6 30.0.0.6 20.0.0.5 10.0.0.0 R3 R1 20.0.0.0 R2 30.0.0.0 30.0.0.7 Routing Table of R2 To Reach Hosts on Next Hop Address 20.0.0.0 Direct Delivery 30.0.0.0 Direct Delivery 10.0.0.0 20.0.0.5 40.0.0.0 30.0.0.7 40.0.0.7 40.0.0.0 Router receives an IP datagram with network portion N and destination D If N is directly connected Transmit on that network Else If host specific entry for D exists Use next hop in that entry Else If route entry for N exists Use next hop in that entry Else If default route for next hop exists Use default route for next hop Else Declare error Oct 21, 2004 CS573: Protocols and Standards 23 Oct 21, 2004 CS573: Protocols and Standards 24 CS573: Protocols and Standards 4

Routing Within Same Consider a small company with a single LAN to which a class C network address has been assigned The company is interested in adding another small physical network (connected to old network through a router) with a few hosts Question: Could this company assign these hosts IP addresses from the same C class network? i.e., could the two LANs share the same class C network address? Proxy ARP To Internet Main Router A B C Router R Main Hidden Used to allow two physical networks to share the same IP network prefix Router R s table is configured manually to route between these two networks Router R answers ARP requests on each network for hosts on the other network, giving its own hardware address as the target address D E Oct 21, 2004 CS573: Protocols and Standards 25 Oct 21, 2004 CS573: Protocols and Standards 26 Proxy ARP Advantage of Proxy ARP Router Can be added without disturbing the routing table in other hosts or routers on that network Disadvantages: Does not generalize to complex network topologies (does not scale) Does not support a reasonable form of routing. (relies on network managers to maintain tables of machines and addresses manually) Issues: Several IP addresses map to the same physical address. How to distinguish between a legitimate Proxy ARP router and spoofing? Oct 21, 2004 CS573: Protocols and Standards 27 CS573: Protocols and Standards 5