Connecting The Network Layer to Data Link Layer. ARP in the IP Layer The Address Resolution Protocol (ARP) The Address Resolution Protocol (ARP) Part.

Slides:



Advertisements
Similar presentations
IP/MAC Address Translation
Advertisements

Computer Networks21-1 Chapter 21. Network Layer: Address Mapping, Error Reporting, and Multicasting 21.1 Address Mapping 21.2 ICMP 21.3 IGMP 21.4 ICMPv6.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 25 Introduction to Computer Networks.
21.1 Chapter 21 Network Layer: Address Mapping, Error Reporting, and Multicasting Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
1 Address Resolution Protocol (ARP) Relates to Lab 2. This module is about the address resolution protocol.
Media Access Control (MAC) addresses in the network access layer ▫ Associated w/ network interface card (NIC) ▫ 48 bits or 64 bits IP addresses for the.
Internet Control Protocols Savera Tanwir. Internet Control Protocols ICMP ARP RARP DHCP.
 As defined in RFC 826 ARP consists of the following messages ■ ARP Request ■ ARP Reply.
Helper Protocols Protocols that either make it easier for IP to do its job, or extend the capabilities of the network layer.
1 K. Salah Module 5.1: Internet Protocol TCP/IP Suite IP Addressing ARP RARP DHCP.
Oct 21, 2004CS573: Network Protocols and Standards1 IP: Addressing, ARP, Routing Network Protocols and Standards Autumn
Subnetting.
IP Routing: an Introduction. Quiz
Chapter 23: ARP, ICMP, DHCP IS333 Spring 2015.
Address Resolution Protocol (ARP). Mapping IP Address to Data-Link Address  How does a machine map an IP address to its Data- Link layer (hardware or.
Copyright 2003 CCNA 1 Chapter 7 TCP/IP Protocol Suite and IP Addressing By Your Name.
Network Layer (Part IV). Overview A router is a type of internetworking device that passes data packets between networks based on Layer 3 addresses. A.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 1 v3.0 Module 9 TCP/IP Protocol Suite and IP Addressing.
21.1 Chapter 21 Network Layer: Address Mapping, Error Reporting, and Multicasting Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Support Protocols and Technologies. Topics Filling in the gaps we need to make for IP forwarding work in practice – Getting IP addresses (DHCP) – Mapping.
TELE202 Lecture 10 Internet Protocols (2) 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »Internet Protocols (1) »Source: chapter 15 ¥This Lecture »Internet.
Network Layer – Subnetting and Control Protocols Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing,
23-Support Protocols and Technologies Dr. John P. Abraham Professor UTPA.
1 Computer Communication & Networks Lecture 20 Network Layer: IP and Address Mapping (contd.) Waleed.
1 Dynamic Host Configuration Protocol (DHCP) Relates to Lab 7. Module about dynamic assignment of IP addresses with DHCP.
CCNA 1 v3.0 Module 9 TCP/IP Protocol Suite and IP Addressing
Cisco – Chapter 11 Routers All You Ever Wanted To Know But Were Afraid to Ask.
ARP Address Resolution Protocol Ref:
1 Internet Protocol. 2 Connectionless Network Layers Destination, source, hop count Maybe other stuff –fragmentation –options (e.g., source routing) –error.
CMPT 471 Networking II Address Resolution IPv4 ARP RARP 1© Janice Regan, 2012.
NUS.SOC.CS2105 Ooi Wei Tsang Application Transport Network Link Physical you are here.
Sublayers Under the Network Layer: BOOTP & DHCP
1 CS 4396 Computer Networks Lab Dynamic Host Configuration Protocol (DHCP)
© 2007 Cisco Systems, Inc. All rights reserved. 1 Network Addressing Networking for Home and Small Businesses – Chapter 5 Darren Shaver – Modified Fall.
Hyung-Min Lee ©Networking Lab., 2001 Chapter 8 ARP and RARP.
CCNA 1 v3.0 Module 9 TCP/IP Protocol Suite and IP Addressing.
BAI513 - PROTOCOLS DHCP BAIST – Network Management.
Networks and Protocols CE Week 3a. DHCP, ARP, DNS, TCP/UDP.
Media Access Control (MAC) addresses in the network access layer ▫ Associated w/ network interface card (NIC) ▫ 48 bits or 64 bits IP addresses for the.
BAI513 - PROTOCOLS ARP BAIST – Network Management.
CCNA 1 v3.0 Module 9 TCP/IP Protocol Suite and IP Addressing
1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Dynamic Host Configuration Protocol (DHCP)
CSIT 220 (Blum)1 ARP Based on Computer Networks and Internets (Comer)
Mapping IP Addresses to Hardware Addresses Chapter 5.
Ethernet switch Hosts Can talk using Ethernet addresses only.
Address Translation Outline Datalink layer intro ARP RARP DHCP.
BAI513 - PROTOCOLS DHCP BAIST – Network Management.
TCP/IP Protocol Suite and IP Addressing Presented By : Dupien AMS.
ADDRESS MAPPING ADDRESS MAPPING The delivery of a packet to a host or a router requires two levels of addressing: logical and physical. We need to be able.
Address Resolution Protocol Yasir Jan 20 th March 2008 Future Internet.
5: DataLink Layer5-1 Link Layer: Introduction Some terminology: r hosts and routers are nodes r communication channels that connect adjacent nodes along.
1 K. Salah Module 5.1: Internet Protocol TCP/IP Suite IP Addressing ARP RARP DHCP.
© 2003, Cisco Systems, Inc. All rights reserved.
Behrouz A. Forouzan TCP/IP Protocol Suite, 3rd Ed.
Address Resolution Protocol (ARP)
Scaling the Network Chapters 3-4 Part 2
IP: Addressing, ARP, Routing
Chapter 21 Address Mapping
Chapter 8 ARP(Address Resolution Protocol)
6 Network Layer Part III Computer Networks Tutun Juhana
Objective: ARP.
ARP and RARP Objectives Chapter 7 Upon completion you will be able to:
Net 323: NETWORK Protocols
Address Resolution Protocol (ARP)
NAT/ARP/RARP (Ch 5 & 8) Dr. Clincy Lecture.
8PM – Quickly Overview Final Project
Connecting The Network Layer to Data Link Layer.
DHCP and NAT.
1 ADDRESS RESOLUTION PROTOCOL (ARP) & REVERSE ADDRESS RESOLUTION PROTOCOL ( RARP) K. PALANIVEL Systems Analyst, Computer Centre Pondicherry University,
Ch 17 - Binding Protocol Addresses
Presentation transcript:

Connecting The Network Layer to Data Link Layer

ARP in the IP Layer The Address Resolution Protocol (ARP) The Address Resolution Protocol (ARP) Part of the Internet Protocol (IP) to solve a specific problem Part of the Internet Protocol (IP) to solve a specific problem Usually considered to be a part of the link layer Usually considered to be a part of the link layer The physical layer has 6 byte MAC addresses, while the network layer has independent (4 byte) IP addresses The physical layer has 6 byte MAC addresses, while the network layer has independent (4 byte) IP addresses

ARP What is the connection between IP and HW (MAC = Ethernet) addresses? What is the connection between IP and HW (MAC = Ethernet) addresses? There is no a priori connection as they live in different layers There is no a priori connection as they live in different layers But they need some connection otherwise we won't be able to use a physical layer to send IP packets: we won't know where a particular IP packet should physically be sent But they need some connection otherwise we won't be able to use a physical layer to send IP packets: we won't know where a particular IP packet should physically be sent

ARP Every host on the Internet has (at least) one 32 bit (4 byte) IP address Every host on the Internet has (at least) one 32 bit (4 byte) IP address It is unique to that host and so identifies that machine on the Internet It is unique to that host and so identifies that machine on the Internet

ARP IP addresses are chosen by the local system administrator to suit the local network IP addresses are chosen by the local system administrator to suit the local network Ethernet addresses are built into the interface hardware by the manufacturer Ethernet addresses are built into the interface hardware by the manufacturer The two addresses bear absolutely no relationship to one another (as we would expect from the layering principles)‏ The two addresses bear absolutely no relationship to one another (as we would expect from the layering principles)‏

ARP Suppose want to send a packet over (say) an Ethernet Suppose want to send a packet over (say) an Ethernet We only know the destination's IP address We only know the destination's IP address To build the Ethernet frame we have to know the Ethernet address that the destination has To build the Ethernet frame we have to know the Ethernet address that the destination has This is what ARP does: It finds the hardware address corresponding to an IP address This is what ARP does: It finds the hardware address corresponding to an IP address

How ARP finds the Targets MAC Address STEP 1: STEP 1: –ARP broadcasts an ARP Request packet that contains the target IP address in an Ethernet frame with destination address ff:ff:ff:ff:ff:ff and source (its own) Ethernet address‏ –All hosts on the local network read this broadcasted frame –The target host recognises the request for its IP address

ARP STEP 2: STEP 2: –The target sends an ARP Reply packet containing its own Ethernet address –It knows the source's Ethernet address as found in the request packet –The source gets the reply and reads out the target's Ethernet address –It can now use that Ethernet address to send IP packets

WHAT is ARP FRAME? The frame type for ARP is 0806 The frame type for ARP is 0806 Hardware type: 1 for an Ethernet address Hardware type: 1 for an Ethernet address Protocol type: 0800 for an IP address Protocol type: 0800 for an IP address Sizes: sizes in bytes of the address fields, 6 for Ethernet, 4 for IP Sizes: sizes in bytes of the address fields, 6 for Ethernet, 4 for IP

ARP OP: 1 for a request, 2 for a reply OP: 1 for a request, 2 for a reply Address fields: the data Address fields: the data In a request the target MAC address field is not filled in, which is what we are trying to find! In a request the target MAC address field is not filled in, which is what we are trying to find! In a reply the sender MAC address is the address we seek In a reply the sender MAC address is the address we seek

ARP The source caches the address so it doesn't need to do an ARP for every IP packet The source caches the address so it doesn't need to do an ARP for every IP packet The cache expires after (say) 20 minutes, after which a fresh ARP exchange is needed The cache expires after (say) 20 minutes, after which a fresh ARP exchange is needed This is in case the Ethernet-to-IP address relationship changes, e.g., an IP address is reassigned to a new machine This is in case the Ethernet-to-IP address relationship changes, e.g., an IP address is reassigned to a new machine

What if the Target is not on the Same LAN? If no machine on the local network has the requested IP address, or that machine is down, no reply will be forthcoming If no machine on the local network has the requested IP address, or that machine is down, no reply will be forthcoming In this case, after a few seconds (and a few repeated ARP requests), an error message is send to the application trying to make the IP connection In this case, after a few seconds (and a few repeated ARP requests), an error message is send to the application trying to make the IP connection This might be “no such host” or “host unreachable” This might be “no such host” or “host unreachable”

SRC and DST on different Networks: ARP Bridging A clever trick that shows ARP can be used for things other than it was designed to do A clever trick that shows ARP can be used for things other than it was designed to do This trick allows us to extend an Ethernet (or other network) over a physically larger distance than its specifications allow, and to join a wireless network to a wired one so they appear to be a single network This trick allows us to extend an Ethernet (or other network) over a physically larger distance than its specifications allow, and to join a wireless network to a wired one so they appear to be a single network

ARP Bridging A bridge is a host with two interfaces, one on each network A bridge is a host with two interfaces, one on each network If host h1 wishes to send to host h2 it must determine its hardware address If host h1 wishes to send to host h2 it must determine its hardware address

ARP Bridging So h1 sends an ARP broadcast for h2 So h1 sends an ARP broadcast for h2 The bridge sees this request and responds on behalf of h2 (a proxy ARP), but it supplies its own hardware address b1 The bridge sees this request and responds on behalf of h2 (a proxy ARP), but it supplies its own hardware address b1

ARP Bridging Now h1 sends data to what it thinks is h2, but is actually the bridge Now h1 sends data to what it thinks is h2, but is actually the bridge The bridge reads the packet, sees it is destined for h2 (by its IP address) and forwards it to the other network where h2 can read it The bridge reads the packet, sees it is destined for h2 (by its IP address) and forwards it to the other network where h2 can read it

ARP Bridging The forwarded frame will be changed to have h2 as destination and b2 as source The forwarded frame will be changed to have h2 as destination and b2 as source If h2 replies, it can either use h2 which it got from the original packet or do an ARP request, which the bridge proxies in a symmetrical way If h2 replies, it can either use h2 which it got from the original packet or do an ARP request, which the bridge proxies in a symmetrical way

ARP Bridging In either case the packet goes to the bridge, which forwards it to h1, again rewriting the frame addresses appropriately In either case the packet goes to the bridge, which forwards it to h1, again rewriting the frame addresses appropriately This is all transparent to h1 and h2 who believe they are on the same network This is all transparent to h1 and h2 who believe they are on the same network

ARP Bridging This is sometimes called transparent bridging This is sometimes called transparent bridging If h1 is communicating with both h2 and h3 its cache will show then to have the same hardware address b1: this is not a problem If h1 is communicating with both h2 and h3 its cache will show then to have the same hardware address b1: this is not a problem

ARP Bridging ARP bridging is fine for joining a pair of small networks, but less so for larger collections of networks ARP bridging is fine for joining a pair of small networks, but less so for larger collections of networks IEEE 802.1d Ethernet Bridging standard addresses this, dealing with the cases of multiple routes between hosts IEEE 802.1d Ethernet Bridging standard addresses this, dealing with the cases of multiple routes between hosts

Remote ARP Bridging Bridging can also connect networks that are widely separated, e.g., by a WAN, again to appear as a single network using remote bridging Bridging can also connect networks that are widely separated, e.g., by a WAN, again to appear as a single network using remote bridging Compare this with tunnelling Compare this with tunnelling

Remote ARP Bridging The endpoints are called half bridges The endpoints are called half bridges This is similar in principle to local bridging, but now the half bridges must cope with encapsulation over the WAN; differences in speed and packet sizes of the LAN and WAN and so on This is similar in principle to local bridging, but now the half bridges must cope with encapsulation over the WAN; differences in speed and packet sizes of the LAN and WAN and so on

Reverse Address Resolution Protocol (RARP) Reverse ARP addresses to opposite problem to ARP: given a hardware address find the IP address Reverse ARP addresses to opposite problem to ARP: given a hardware address find the IP address Needed by hosts that don't initially know their own IP address, e.g., a diskless computer, a laptop plugging into a network, a refrigerator, etc. Needed by hosts that don't initially know their own IP address, e.g., a diskless computer, a laptop plugging into a network, a refrigerator, etc.

Reverse Address Resolution Protocol (RARP) Very similar to ARP Very similar to ARP Frame type 8035 Frame type 8035 Same frame layout Same frame layout Op type 3 for a RARP request, type 4 for a RARP reply Op type 3 for a RARP request, type 4 for a RARP reply RARP is OK for limited purposes, but much better protocols exist to solve the same problem (see DHCP)‏ RARP is OK for limited purposes, but much better protocols exist to solve the same problem (see DHCP)‏

DHCP a Sublayers Under the Network Layer How does a host get allocated an IP address? How does a host get allocated an IP address? 1.allocated manually by an administrator: OK as far as it goes but does not scale to large networks and some networks (e.g., home networks) don't have (competent) administrators 2.Use the Dynamic Host Configuration Protocol

DHCP a Sublayers Under the Network Layer DHCP, and its predecessor BOOTP, exist to allocate IP addresses to hosts DHCP, and its predecessor BOOTP, exist to allocate IP addresses to hosts We start with BOOTP then describe DHCP which is similar but massively extends BOOTP We start with BOOTP then describe DHCP which is similar but massively extends BOOTP Both extend RARP Both extend RARP

How Does DHCP Work? Dynamic Host Configuration Protocol :DHCP DHCP is designed for the general configuration of a host: address, subnet mask, gateway, name servers, and more DHCP is designed for the general configuration of a host: address, subnet mask, gateway, name servers, and more Needed usually for hosts with non- permanent connections, e.g., Internet service providers, etc Needed usually for hosts with non- permanent connections, e.g., Internet service providers, etc

How Does DHCP Work? DHCP has a pool of available addresses that it can assign to hosts as they need DHCP has a pool of available addresses that it can assign to hosts as they need When a host leaves, its address can be reused When a host leaves, its address can be reused DHCP gives a lease time on an address DHCP gives a lease time on an address If the lease expires the host can renew via DHCP If the lease expires the host can renew via DHCP A well-behaved host will signal (via DHCP) when it no longer needs an address A well-behaved host will signal (via DHCP) when it no longer needs an address

How Does DHCP Work? DHCP supplies DHCP supplies –IP address –Subnet mask –Gateway –name servers –lease times –print servers –Gateway –boot servers –mail servers –host name –web servers

Prechecking of an IP Address Before supplying an address, DHCP should ping the network for that address: this is to check that no host is accidentally using that address already Before supplying an address, DHCP should ping the network for that address: this is to check that no host is accidentally using that address already

Prechecking of an IP Address Before supplying an address, DHCP should ping the network for that address: this is to check that no host is accidentally using that address already Before supplying an address, DHCP should ping the network for that address: this is to check that no host is accidentally using that address already Inform others: After getting an address, the host can send an ARP reply containing its own address. This gratuitous ARP informs other hosts on the network of the new address association so they can update their ARP caches Inform others: After getting an address, the host can send an ARP reply containing its own address. This gratuitous ARP informs other hosts on the network of the new address association so they can update their ARP caches

How Does DHCP Work? The data is encoded in a DHCP packet as The data is encoded in a DHCP packet as –a tag byte to indicate the type of data –a length byte –the data itself Tag 0 to pad data for alignment Tag 0 to pad data for alignment Tag 255 to indicate end of data Tag 255 to indicate end of data

The Packet Header

DHCP Message Flow