Ch.6 Mapping Internet Addresses to Physical Addresses (ARP)

Similar documents
Ch. 22 Bootstrap And Autoconfiguration (DHCP, NDP or IPv6-ND)

Ch.9 Internet Protocol: Error And Control Messages (ICMP)

Chapter 10 User Datagram Protocol (UDP)

Ch.7 Internet Protocol: Connectionless Datagram Delivery (IPv4, IPv6)

Ch.5 Internet Addressing 吳俊興 國立高雄大學資訊工程學系

CSF645 Mobile Computing 行動計算. IPv6. (Internetworking With TCP/IP vol Part 31) 吳俊興國立高雄大學資訊工程學系

Guide to TCP/IP Fourth Edition. Chapter 6: Neighbor Discovery in IPv6

Part I: INTRODUCTION 吳俊興 國立高雄大學資訊工程學系. Fall 2006

IP: Addressing, ARP, Routing

PART X. Internetworking Part 1. (Concept, IP Addressing, IP Routing, IP Datagrams, Address Resolution)

IPv6 Neighbor Discovery

IP - The Internet Protocol. Based on the slides of Dr. Jorg Liebeherr, University of Virginia

CS 356: Computer Network Architectures. Lecture 10: IP Fragmentation, ARP, and ICMP. Xiaowei Yang

IPv6 Neighbor Discovery

Introduction to IPv6 - II

Internet Control Message Protocol

Configuring IPv4. Finding Feature Information. This chapter contains the following sections:

Chapter 7. ARP and RARP MGH T MGH C I 20

IPv6 Neighbor Discovery

CPSC 826 Internetworking. The Network Layer: Routing & Addressing Outline. The Network Layer

Mobile IP and Mobile Transport Protocols

Frame Transmission. Frames are transmitted using physical addresses within a network. N Z : network address (same scheme globally) ß R2,N R2 ß B,N B

IPv6 Neighbor Discovery

Network Layer: Internet Protocol

Configuring IPv6 for Gigabit Ethernet Interfaces

Address Resolution Protocol (ARP), RFC 826

Internet Protocols (chapter 18)

IPv6 Neighbor Discovery

Fixed Internetworking Protocols and Networks. IP mobility. Rune Hylsberg Jacobsen Aarhus School of Engineering

Last time. Network layer. Introduction. Virtual circuit vs. datagram details. IP: the Internet Protocol. forwarding vs. routing

Introduction to IPv6. IPv6 addresses

IPv6 Protocols and Networks Hadassah College Spring 2018 Wireless Dr. Martin Land

Chapter Motivation For Internetworking

ETSF05/ETSF10 Internet Protocols Network Layer Protocols

IPv6 Client IP Address Learning

IPv6 ND Configuration Example

Secure Neighbor Discovery. By- Pradeep Yalamanchili Parag Walimbe

ICS 451: Today's plan

To make a difference between logical address (IP address), which is used at the network layer, and physical address (MAC address),which is used at

Modification to Ipv6 Neighbor Discovery and Mobile Node Operation

TSIN02 - Internetworking

ICS 351: Networking Protocols

IPv6 Associated Protocols. Athanassios Liakopoulos 6DEPLOY IPv6 Training, Skopje, June 2011

Internet Protocol (IP)

IPv6. IPv4 & IPv6 Header Comparison. Types of IPv6 Addresses. IPv6 Address Scope. IPv6 Header. IPv4 Header. Link-Local

Table of Contents 1 IPv6 Configuration IPv6 Application Configuration 2-1

netkit lab IPv6 Neighbor Discovery (NDP)

DELVING INTO SECURITY

LECTURE 8. Mobile IP

EC441 Fall 2018 Introduction to Computer Networking Chapter4: Network Layer Data Plane

IPv4 and IPv6 Commands

Telecom Systems Chae Y. Lee. Contents. Overview. Issues. Addressing ARP. Adapting Datagram Size Notes

4. Basic IP Support Protocols

FiberstoreOS IPv6 Security Configuration Guide

The Internetworking Problem. Internetworking. A Translation-based Solution

by Douglas Comer, Purdue University

HP A5830 Switch Series Layer 3 - IP Services. Configuration Guide. Abstract

Introduction to Internetworking

DGS-1510 Series Gigabit Ethernet SmartPro Switch Web UI Reference Guide

IPv6 Protocol. Does it solve all the security problems of IPv4? Franjo Majstor EMEA Consulting Engineer Cisco Systems, Inc.

Table of Contents 1 IPv6 Configuration IPv6 Application Configuration 2-1

UNIT III. 3.1 Circuit switching vs. packet switching / Packet switched networks. Figure 3.1.1: Switching Techniques

Network layer: Overview. Network layer functions IP Routing and forwarding NAT ARP IPv6 Routing

IPv6 address configuration and local operation

Module 7 Internet And Internet Protocol Suite

IP CONSORTIUM TEST SUITE Internet Protocol, Version 6

Table of Contents 1 IPv6 Configuration IPv6 Application Configuration 2-1

Internet Control Message Protocol (ICMP)

Internetworking/Internetteknik, Examination 2G1305 Date: August 18 th 2004 at 9:00 13:00 SOLUTIONS

Network layer: Overview. Network Layer Functions

Juniper Netscreen Security Device. How to Enable IPv6 Page-51

TCP/IP Protocol Suite

Network Working Group Request for Comments: W. Simpson Daydreamer H. Soliman Elevate Technologies September 2007

IP Protocols. ALTTC/Oct

Chapter 2 System Models

Configuring IPv6 basics

SEN366 (SEN374) (Introduction to) Computer Networks

FiberstoreOS IPv6 Service Configuration Guide

IPv6: An Introduction

Operation Manual IPv6 H3C S3610&S5510 Series Ethernet Switches Table of Contents. Table of Contents

Outline. IP Address. IP Address. The Internet Protocol. o Hostname & IP Address. o The Address

ARP, IP. Chong-Kwon Kim. Each station (or network interface) should be uniquely identified Use 6 byte long address

History Page. Barracuda NextGen Firewall F

TSIN02 - Internetworking

The Interconnection Structure of. The Internet. EECC694 - Shaaban

Table of Contents 1 IPv6 Basics Configuration 1-1

CIS 632 / EEC 687 Mobile Computing

On Distributed Communications, Rand Report RM-3420-PR, Paul Baran, August

EEC-684/584 Computer Networks

On Distributed Communications, Rand Report RM-3420-PR, Paul Baran, August 1964

The Netwok Layer IPv4 and IPv6 Part 2

Data Link Layer. Our goals: understand principles behind data link layer services: instantiation and implementation of various link layer technologies

Lecture 9 The Data Link Layer part II. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Putting it all together

Lab Using Wireshark to Examine Ethernet Frames

IP/MAC Address Translation

Introduction to IPv6. IPv6 addresses

Lecture 11: IP routing, IP protocols

Auxiliary protocols. tasks that IP does not handle: Routing table management (RIP, OSPF, etc.). Congestion and error reporting (ICMP).

Introduction to IPv6. IPv6 addresses

Transcription:

CSC521 Communication Protocols 網路通訊協定 Ch.6 Mapping Internet Addresses to Physical Addresses (ARP) 吳俊興國立高雄大學資訊工程學系 Internetworking With TCP/IP, Vol I: Sixth Edition, Douglas E. Comer

Outline 1 Introduction 2 The Address Resolution Problem 3 Two Types Of Hardware Addresses 4 Resolution Through Direct Mapping 5 Resolution In A Direct-Mapped Network 6 IPv4 Address Resolution Through Dynamic Binding 7 The ARP Cache 8 ARP Cache Timeout 9 ARP Refinements 10 Relationship Of ARP To Other Protocols 11 ARP Implementation 12 ARP Encapsulation And Identification 13 ARP Message Format 14 Automatic ARP Cache Revalidation 15 Reverse Address Resolution (RARP) 16 ARP Caches In Layer 3 Switches 17 Proxy ARP 18 IPv6 Neighbor Discovery 19 Summary 2

Address Resolution Problem Motivation Must use hardware (physical) addresses to communicate over network Applications only use Internet addresses Address resolution problem The problem of mapping high-level addresses to physical addresses Protocol software needs a mechanism that maps an IP address to equivalent hardware address Example Computers A and B on same network Application on A generates packet for application on B Protocol software on A must use B s hardware address when sending a packet 3

Two Types of Physical Addresses Two types of physical hardware addresses Those that are larger than the host portion of an IP address Those that are smaller than the host portion of an IP address Address resolution: performed at each step along path through Internet Two basic algorithms Direct mapping Dynamic binding Choice depends on type of hardware 4

Resolution Through Direct Mapping Direct Mapping Easy to understand, efficient Only works when hardware address is small Technique: assign computer an IP address that encodes the hardware address Example Hardware: pronet ring network Hardware address: 8 bits Assume IPv4 address 192.5.48.0 (24-bit prefix) Assign computer with hardware address K an IPv4 address 192.5.48.K Resolving an IPv4 address means extracting the hardware address from low-order 8 bits 5

IPv6 Resolution Through Direct Mapping IPv6 IPv6 accommodates all types of hardware addresses Link-Local Address includes 64-bit interface identifier 6

Resolution In A Direct-Mapped Network Direct mapping It means selecting a function f that maps IP addresses to physical addresses The mapping can be performed without reference to external data New computers can be added to a network without changing existing assignments and without propagating new information to existing computers 7

Resolution through Dynamic Binding Needed when hardware addresses are large (e.g., Ethernet) Allows computer A to find computer B s hardware address A starts with B s IP address A knows B is on the local network Technique: broadcast query and obtain response Note: dynamic binding only used across one network at a time Address Resolution Protocol (ARP) Isolates hardware address at low level Allows application programs to use IP addresses Allows a host to find the physical address of a target host on the same physical network, given only the target s IP address IP over Ethernet 32-bit IP address 48-bit Ethernet MAC address 8

Address Resolution Protocol (ARP) 1. Machine A broadcasts ARP request with B s IP address 2. All machines on local net receive broadcast 3. Machine B replies with its physical address 4. Machine A adds B s address information to its table 5. Machine A delivers packet directly to B 9

Retention Problem: Retention of Bindings Cannot afford to send ARP request for each packet Solution Maintain a table of bindings ARP cache Whenever a computer sends an ARP request and receives an ARP reply, it saves the IP address and corresponding hardware address information in its cache temporarily When transmitting a packet, a computer always looks in its cache before sending an ARP request Use ARP one time, place results in table, and then send many packets $arp[-a -d] ARP Caching 10

Automatic ARP Cache Revalidation Stale Problem: Stale Bindings An IP is reassigned to another new host after the old host is left Solution: the Traditional Timer A timer is set when information is added to the cache. When the timer expires, the information is deleted Typical timeout: 20 minutes Jitter Problem: Variance/Delay in Packet Transfer Time Jitter (variance/delay) occurs for the next packet to the destination whose entry is just expired due to timeout since another ARP resolution is required to regain the binding Solution: Early Revalidation before Expiration Another shorter revalidation timer used to proactively update the ARP cache before the entry is timing out Two counters with each entry in the ARP cache the traditional timer a revalidation timer 11

ARP Packet Format When Used With Ethernet ETHERNET ADDRESS TYPE (1) IP ADDRESS TYPE (0800) ETH ADDR LEN (6) IP ADDR LEN (4) OPERATION SENDER S ETH ADDR (first 4 octets) SENDER S ETH ADDR (last 2 octets) SENDER S IP ADDR (first 2 octets) SENDER S IP ADDR (last 2 octets) TARGET S ETH ADDR (first 2 octets) TARGET S ETH ADDR (last 4 octets) TARGET S IP ADDR (all 4 octets) Observation General: can be used with Arbitrary hardware address Arbitrary protocol address (not just IP) Variable length fields (depends on type of addresses) Length fields allow parsing of packet by computer that does not understand the two address types 12

ARP Encapsulation ARP message travels in data portion of network frame Ethernet encapsulation ARP message placed in frame data area Data area padded with zeroes if ARP message is shorter than minimum Ethernet frame Ethernet type 0x0806 used for ARP Ethernet Header IP Header TCP Header App. Data CRC Ethernet Header ARP Packet CRC Preamble Destination Source Frame Frame Data CRC Address Address Type 8 octets 6 octets 6 octets 2 octets 0800:IP 0806: ARP 46 1500 octets 4 octets 13

ARP Request Example ETHERNET ADDRESS TYPE (1) IP ADDRESS TYPE (0800) Ask 192.168.0.1 By 192.168.0.158 ETH ADDR LEN (6) IP ADDR LEN (4) OPERATION SENDER S ETH ADDR (first 4 octets) SENDER S ETH ADDR (last 2 octets) SENDER S IP ADDR (first 2 octets) SENDER S IP ADDR (last 2 octets) TARGET S ETH ADDR (first 2 octets) TARGET S ETH ADDR (last 4 octets) TARGET S IP ADDR (all 4 octets) 14

ARP Reply Example ETHERNET ADDRESS TYPE (1) IP ADDRESS TYPE (0800) Replied by 192.168.0.1 ETH ADDR LEN (6) IP ADDR LEN (4) OPERATION SENDER S ETH ADDR (first 4 octets) SENDER S ETH ADDR (last 2 octets) SENDER S IP ADDR (first 2 octets) SENDER S IP ADDR (last 2 octets) TARGET S ETH ADDR (first 2 octets) TARGET S ETH ADDR (last 4 octets) TARGET S IP ADDR (all 4 octets) 15

Algorithm For Processing ARP Requests Extract sender A s pair, (IP A,ETH A ) and update local ARP table if it exists If this is a request and the target is me Add sender s pair to ARP table if not present Fill in target hardware address Exchange sender and target entries Set operation to reply Send reply back to requester Algorithm Features If A ARPs B, B keeps A s information B will probably send a packet to A soon If A ARPs B, other machines do not keep A s information Avoids clogging ARP caches needlessly 16

Relationship Of ARP To Other Protocols IPv6 does not need ARP it uses direct mapping ARP merely provides one possible mechanism to map an IP address to a hardware address is a low-level protocol associated with the hardware It is not a key part of the TCP/IP protocols 17

Reverse Address Resolution (RARP) Maps Ethernet address to IP address Same packet format as ARP Intended for bootstrap Computer sends its Ethernet address RARP server responds by sending computer s IP address The only difference is that RARP uses Ethernet type 0x8035 Seldom used (replaced by DHCP) No longer important for diskless devices, but has an interesting use in cloud data centers 18

ARP Caches In Layer 3 Switches A layer-3 Ethernet switch if the switch understands IP packets and can examine IP headers when deciding how to process a packet How can a switch reduce broadcast traffic to computers? 19

Proxy ARP The technique in which one machine, usually a router, answers ARP requests intended for another by supplying its own physical address Proxy ARP allows multiple networks to share a single IP prefix 20

IPv6 Neighbor Discovery Protocol (NDP) NDP functionality Router discovery: hosts can locate routers residing on attached links Prefix/parameter discovery: hosts can discover address prefixes/link parameters (e.g., MTU) Address autoconfiguration / resolution: SLAAC and ARP like Duplicate address detection (DAD): check whether an address is already in use Neighbor unreachability detection (NUD): determine that a neighbor is no longer reachable etc Replace ARP with 5 ICMPv6 packet types Router Solicitation (Type 133) Hosts inquire with Router Solicitation messages to locate routers on an attached link Routers which forward packets not addressed to them generate Router Advertisements immediately upon receipt of this message rather than at their next scheduled time Router Advertisement (Type 134) Routers advertise their presence together with various link and Internet parameters Either periodically, or in response to a Router Solicitation message Neighbor Solicitation (Type 135) Used to determine the link layer address of a neighbor, or To verify that a neighbor is still reachable via a cached link layer address Neighbor Advertisement (Type 136) Used to respond to a Neighbor Solicitation message Redirect (Type 137) Routers may inform hosts of a better first hop router for a destination 21

Computer s IP address independent of computer s hardware address Applications use IP addresses Hardware only understands hardware addresses Must map from IP address to hardware address for transmission Two types Direct mapping Dynamic mapping Address Resolution Protocol (ARP) used for dynamic address mapping Important for Ethernet Sender broadcasts ARP request, and target sends ARP reply ARP bindings are cached: stale and jitter problems Other related protocols Reverse ARP was originally used for bootstrap ProxyARP IPv6 NDP Summary 22