address resolution
play

Address Resolution ARP, RARP, Proxy ARP (C) Herbert Haas - PowerPoint PPT Presentation

Address Resolution ARP, RARP, Proxy ARP (C) Herbert Haas 2005/03/11 Agenda IP Forwarding Principle Address Resolution Protocol (ARP) IP Routing Basics IP Forwarding and ARP RARP Proxy ARP ICMP IP Forwarding and


  1. Address Resolution ARP, RARP, Proxy ARP (C) Herbert Haas 2005/03/11

  2. Agenda � IP Forwarding Principle � Address Resolution Protocol (ARP) � IP Routing Basics � IP Forwarding and ARP � RARP � Proxy ARP � ICMP � IP Forwarding and ICMP 2 (C) Herbert Haas 2005/03/11

  3. IP Datagram Service IP Host IP Router Destination Next Hop A R1 B R4 C R3 R1 R2 R3 ..... ..... A2 B5 A2 B5 Destination Next Hop Destination Based Routing User A.2 A local B R2 C R2 ..... ..... IP Routing Destination Next Hop A2 B5 Table of R1 A R4 B local C R4 IP address ..... ..... R4 R5 (structured address Net-ID:Host-ID) Destination Next Hop A2 B5 A R2 A2 B5 B R5 C R2 ..... ..... User B.5 2005/03/11 3

  4. IP and OSI Network Layer 3 Layer 3 Protocol = IP Layer 3 Routing Protocols = RIP, OSPF, EIGRP, BGP IP Host A IP Host B Router 1 Router 2 IP IP IP 3 3 3 3 3 3 M M 2005/03/11 4

  5. The IP Header (Address Fields) 0 4 8 12 16 20 24 28 32 Vers HLEN TOS Total Length Identification Flags Fragment Offset TTL Protocol Header Checksum Source IP Address Destination IP Address Padding Options (variable length) PAYLOAD (Encapsulated Higher Layer Packets) 5 (C) Herbert Haas 2005/03/11

  6. Routing Differences � Routing = finding a path to a destination address � Direct delivery performed by host � Destination network = local network � Indirect delivery performed by router � Destination network ≠ local network � Packet is forwarded to default gateway 6 (C) Herbert Haas 2005/03/11

  7. Direct versus Indirect Delivery Indirect via Def-GW Direct 172.17.0.0 172.18.0.1 172.18.0.2 172.17.0.15 172.18.0.10 172.18.0.11 172.17.0.20 172.18.0.0 192.168.2.0 192.168.1.2 192.168.3.2 192.168.3.0 172.19.0.0 192.168.1.0 s0 s1 e0 172.16.0.0 2005/03/11 7

  8. Why Adress Resolution? � On a multipoint network every station needs a layer-2 address � When IP packets should be sent to a local destination the sender must first determine the corresponding layer-2 address � The layer-2 address could be a MAC address, a DLCI (Frame-Relay) or similar � In this chapter we only focus on Ethernet 8 (C) Herbert Haas 2005/03/11

  9. Direct Delivery � IP host checks if packet's destination network is identical with local network � By applying the configured subnet mask of the host's interface � If destination network = local network then the L2 address of the destination is discovered using ARP � Remember: not necessary for point-to-point connections 9 (C) Herbert Haas 2005/03/11

  10. ARP Format preamble DA SA 0x806 ARP-Message CRC Ethernet II Frame 0 8 16 24 32 Hardware Protocol hln pln Example ARP Request (Ethernet / IP): Operation (Hardware Addr length) (Layer 3 Addr length) Hardware: 6 (IEEE802.x) Source Hardware Address Protocol: 0x0800 (IP) hln: 6 (MAC Address in Bytes) Source HW Addr Source IP Address pln: 4 (IP Address in Bytes) Operation: 1 (ARP Request) Source IP Address Dest HW Addr Source HW Addr: hex: 00 60 97 bc 88 f1 Source IP Addr: 192.168.1.1 Destination Hardware Address Dest HW Addr: hex: ff ff ff ff ff ff Dest IP Addr: 192.168.1.254 Destination IP Address 10 (C) Herbert Haas 2005/03/11

  11. Direct Delivery � Sent as Broadcast 0xFFFFFFFFFFFF represents "I don't know the MAC address" ARP-Request: 6 0x0800 6 4 1 Src HW: 006097BC88F1 Src IP: 192.168.1.1 Dst HW: FFFFFFFFFFFF Dst IP: 192.168.1.254 IP: 192.168.1.254 IP: 192.168.1.1 MAC: 00aa000067e1 MAC: 006097bc88f1 11 (C) Herbert Haas 2005/03/11

  12. Direct Delivery � Response is unicast ARP-Response: 6 0x0800 6 4 2 Src HW: 00AA000067E1 Src IP: 192.168.1.254 Dst HW: 006097BC88F1 Dst IP: 192.168.1.1 IP: 192.168.1.254 IP: 192.168.1.1 MAC: 00aa000067e1 MAC: 006097bc88f1 Host A puts the following information into its "ARP-Cache" 192.168.1.254 – 00AA000067E1 - dynamic 12 (C) Herbert Haas 2005/03/11

  13. IP Host Facts � Learned MAC addresses are stored in an ARP-cache � Aging timer: 20 minutes � IP hosts have also routing tables ! � But typically only a static route to the default gateway is entered � Default gateway for indirect delivery 13 (C) Herbert Haas 2005/03/11

  14. Gratuitous ARP for Duplicate Address Check and ARP Cache Refresh Sends ARP request Layer 2: E-Type 806 All stations recognize as L2 broadcast and src 00AA00 006789 that this is not their expects no answer if dst FFFFFF FFFFFF own IP address but own IP address is ARP data: they refresh their unique hln 6 pln 4 oper. 1 ARP cache entry for src HW 00AA00 006789 192.168.1.1. src IP 192.168.1.1 dst HW ????? ????? dst IP 192.168.1.1 ARP-Cache Router 192.168.1.1 MAC 00aa00006789 IP: 192.168.1.1 IP: 192.168.1.6 MAC: 00AA00 006789 MAC: 00000C 010203 2005/03/11 14

  15. Using the Default Gateway � Default gateway delivers packet in behalf of its host using a routing table � Host must determine MAC address of default gateway using ARP � IP datagram is handed over to default gateway 15 (C) Herbert Haas 2005/03/11

  16. Indirect Delivery (1) MAC W MAC Y IP: 2.0.0.1 IP: 3.0.0.1 Def.Gwy: 2.0.0.9 Def.Gwy: 3.0.0.9 2.0.0.0 / 8 3.0.0.0 / 8 MAC X IP: 2.0.0.2 Def.Gwy: 2.0.0.9 MAC Z Table R3: R3 IP: 3.0.0.2 Table R4: R4 1.0.0.0 R2 2 Def.Gwy: 3.0.0.9 IP: 2.0.0.9 1.0.0.0 R2 2 IP: 3.0.0.9 2.0.0.0 loc 0 MAC B MAC C 2.0.0.0 R3 1 3.0.0.0 R4 1 3.0.0.0 loc 0 R2 Table R2: 1.0.0.0 R1 1 2.0.0.0 R3 1 3.0.0.0 R4 1 Table R1: R1 1.0.0.0 loc 0 IP: 1.0.0.9 2.0.0.0 R2 2 MAC A 3.0.0.0 R2 2 1.0.0.0 / 8 MAC U MAC V IP: 1.0.0.1 IP: 1.0.0.2 Def.Gwy: 1.0.0.9 Def.Gwy: 1.0.0.9 16 (C) Herbert Haas 2005/03/11

  17. Indirect Delivery (2) MAC W MAC Y IP: 2.0.0.1 IP: 3.0.0.1 Def.Gwy: 2.0.0.9 Def.Gwy: 3.0.0.9 2.0.0.0 / 8 3.0.0.0 / 8 MAC X IP: 2.0.0.2 Def.Gwy: 2.0.0.9 MAC Z R3 IP: 3.0.0.2 R4 Def.Gwy: 3.0.0.9 IP: 2.0.0.9 IP: 3.0.0.9 MAC B MAC C R2 Host wants to send IP Packet to 3.0.0.2 R1 Net-ID unequal → IP: 1.0.0.9 use def. Gateway R1 MAC A 1.0.0.0 / 8 MAC U MAC V IP: 1.0.0.1 IP: 1.0.0.2 Def.Gwy: 1.0.0.9 Def.Gwy: 1.0.0.9 17 (C) Herbert Haas 2005/03/11

  18. Indirect Delivery (3) MAC W MAC Y IP: 2.0.0.1 IP: 3.0.0.1 Def.Gwy: 2.0.0.9 Def.Gwy: 3.0.0.9 2.0.0.0 / 8 3.0.0.0 / 8 MAC X IP: 2.0.0.2 Def.Gwy: 2.0.0.9 MAC Z R3 IP: 3.0.0.2 R4 Def.Gwy: 3.0.0.9 IP: 2.0.0.9 IP: 3.0.0.9 MAC B MAC C R2 R1 IP: 1.0.0.9 ARP Request: MAC A need MAC Addr of IP 1.0.0.9 1.0.0.0 / 8 MAC U MAC V IP: 1.0.0.1 IP: 1.0.0.2 Def.Gwy: 1.0.0.9 Def.Gwy: 1.0.0.9 18 (C) Herbert Haas 2005/03/11

  19. Indirect Delivery (4) MAC W MAC Y IP: 2.0.0.1 IP: 3.0.0.1 Def.Gwy: 2.0.0.9 Def.Gwy: 3.0.0.9 2.0.0.0 / 8 3.0.0.0 / 8 MAC X IP: 2.0.0.2 Def.Gwy: 2.0.0.9 MAC Z R3 IP: 3.0.0.2 R4 Def.Gwy: 3.0.0.9 IP: 2.0.0.9 IP: 3.0.0.9 MAC B MAC C R2 R1 IP: 1.0.0.9 ARP Response: MAC A IP 1.0.0.9 MAC A 1.0.0.0 / 8 MAC U MAC V IP: 1.0.0.1 IP: 1.0.0.2 Def.Gwy: 1.0.0.9 Def.Gwy: 1.0.0.9 19 (C) Herbert Haas 2005/03/11

  20. Indirect Delivery (5) MAC W MAC Y IP: 2.0.0.1 IP: 3.0.0.1 Def.Gwy: 2.0.0.9 Def.Gwy: 3.0.0.9 2.0.0.0 / 8 3.0.0.0 / 8 MAC X IP: 2.0.0.2 Def.Gwy: 2.0.0.9 MAC Z R3 IP: 3.0.0.2 R4 Def.Gwy: 3.0.0.9 IP: 2.0.0.9 IP: 3.0.0.9 MAC B MAC C R2 Table R1: 1.0.0.0 loc 0 2.0.0.0 R2 2 3.0.0.0 R2 2 R1 Mac SA: U IP: 1.0.0.9 Mac DA: A MAC A IP SA: 1.0.0.1 IP DA: 3.0.0.2 1.0.0.0 / 8 MAC U MAC V IP: 1.0.0.1 IP: 1.0.0.2 Def.Gwy: 1.0.0.9 Def.Gwy: 1.0.0.9 20 (C) Herbert Haas 2005/03/11

  21. Indirect Delivery (6) MAC W MAC Y IP: 2.0.0.1 IP: 3.0.0.1 Def.Gwy: 2.0.0.9 Def.Gwy: 3.0.0.9 2.0.0.0 / 8 3.0.0.0 / 8 MAC X IP: 2.0.0.2 Def.Gwy: 2.0.0.9 MAC Z R3 IP: 3.0.0.2 R4 Def.Gwy: 3.0.0.9 IP: 2.0.0.9 IP: 3.0.0.9 MAC B MAC C R2 Table R1: 1.0.0.0 loc 0 2.0.0.0 R2 2 3.0.0.0 R2 2 R1 Mac SA: U IP: 1.0.0.9 Mac DA: A MAC A IP SA: 1.0.0.1 IP DA: 3.0.0.2 1.0.0.0 / 8 MAC U MAC V IP: 1.0.0.1 IP: 1.0.0.2 Def.Gwy: 1.0.0.9 Def.Gwy: 1.0.0.9 21 (C) Herbert Haas 2005/03/11

  22. Indirect Delivery (7) MAC W MAC Y IP: 2.0.0.1 IP: 3.0.0.1 Def.Gwy: 2.0.0.9 Def.Gwy: 3.0.0.9 2.0.0.0 / 8 3.0.0.0 / 8 MAC X IP: 2.0.0.2 Def.Gwy: 2.0.0.9 MAC Z R3 IP: 3.0.0.2 R4 Def.Gwy: 3.0.0.9 IP SA: 1.0.0.1 IP: 2.0.0.9 IP DA: 3.0.0.2 IP: 3.0.0.9 MAC B MAC C R2 Table R2: 1.0.0.0 R1 1 2.0.0.0 R3 1 3.0.0.0 R4 1 R1 IP: 1.0.0.9 MAC A 1.0.0.0 / 8 MAC U MAC V IP: 1.0.0.1 IP: 1.0.0.2 Def.Gwy: 1.0.0.9 Def.Gwy: 1.0.0.9 22 (C) Herbert Haas 2005/03/11

  23. Indirect Delivery (8) MAC W MAC Y Need MAC Addr. of IP: 2.0.0.1 IP: 3.0.0.1 IP 3.0.0.2 Def.Gwy: 2.0.0.9 Def.Gwy: 3.0.0.9 2.0.0.0 / 8 ...send ARP Request 3.0.0.0 / 8 MAC X IP: 2.0.0.2 Def.Gwy: 2.0.0.9 MAC Z IP SA: 1.0.0.1 R3 IP: 3.0.0.2 IP DA: 3.0.0.2 R4 Def.Gwy: 3.0.0.9 IP: 2.0.0.9 IP: 3.0.0.9 MAC B MAC C Table R4: 1.0.0.0 R2 2 R2 2.0.0.0 R3 1 3.0.0.0 loc 0 R1 IP: 1.0.0.9 MAC A 1.0.0.0 / 8 MAC U MAC V IP: 1.0.0.1 IP: 1.0.0.2 Def.Gwy: 1.0.0.9 Def.Gwy: 1.0.0.9 23 (C) Herbert Haas 2005/03/11

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend