1 / 90

CMSC506

CMSC506. IP. IP. Internet Protocol Address Resolution Protocol (ARP) Reverse Address Resolution Protocol (RARP) Internet Control Message Protocol (ICMP). Internet Protocol. What service does it provide? Potential problems IP packet header IP routing

laddie
Download Presentation

CMSC506

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CMSC506 IP

  2. IP • Internet Protocol • Address Resolution Protocol (ARP) • Reverse Address Resolution Protocol (RARP) • Internet Control Message Protocol (ICMP)

  3. Internet Protocol • What service does it provide? • Potential problems • IP packet header • IP routing • Subnet addressing and masks • Special case of IP addresses

  4. IP: What service does it provide? • End-to-end connectivity over a network • Connectionless: no state maintained about • successive packets (flows) • Unreliable: packets may get lost or thrown • away, or received out of order

  5. Potential Problems • Packets may be received with bit errors • Packets may be lost • Packets may be misrouted, going to • the wrong destination, or getting stuck in • “cycles”.

  6. IP: Packet Header Payload

  7. IP: Packet Header Header Payload • Source address • Destination address • Version: Currently IPV4, also IPV6 • Header Length: # of 32 bit words in the • header • Total Length (16 bit number): in bytes • Max packet size = 65535 bytes

  8. IP: Packet Header • 8-bit Type of Service (TOS) • 3-bit precedence field & D,T,R • TOS bits: • Minimize delay • Maximize throughput • Maximize reliability • Minimize monetary cost • Unused bit set to 0

  9. IP: Packet Header • 8-bit Time to Live (TTL): It’s decremented • every time the packet is forwarded • 16-bit Checksum: Error detection for • the header only. 16-bit ones complement • 8-bit Protocol Field: identifies the protocol • that the IP packet is servicing (TCP, • UDP, ICMP,...)

  10. IP: Packet Header • 16-bit Identification: Normally increments • by one each time a datagram is sent • 13-bit fragmentation offset in 64-bit chunks • 3-bits of flags • Don’t Fragment (DF) • More Fragments (MF) • Unused = 0

  11. IP: Packet Header • Options • Security and handling restrictions • Record route (have each router record • its IP address) • Time stamp (have each router record • its IP address and time) • Loose source routing • Strict source routing • Padding is zeros

  12. IP Routing Destinations • Host sends packet to • Directly connected dest • OR a router Packet Host Router

  13. IP Routing • Is it for me? • Forward according • to routing table Packet Host/Route • Routing Table Entry • Dest IP address • IP address of next-hop router • Flags • Interface to pass packet to Interfaces Ethernet

  14. IP Routing • Actions taken for routing • Search routing table for an entry that exactly • matches the complete destination IP address. • If found then forward accordingly • Default: send according to default entry

  15. IP Routing: Addressing Address hierarchy net id host id Class A, B, C. net id subnet id host id

  16. IP address

  17. Special IP address

  18. Subnet A campus network consisting of LANs for various departments

  19. Net Net Subnet Subnet Subnet Subnet Subnet Subnet IP Routing: Addressing Hierarchy

  20. IP Routing: Addressing Example Hierarchical Address: Host id: 2540 Dole Street Subnet id: 96822 Net id: USA Advantage is it can reduce routing complexity

  21. IP Routing: Addressing Post Office Routing Table Destination Address Next PO USA 96822 1234 Dole Street A USA 96822 4567 E-W Center Rd A USA 96822 8901 Univ. Ave A USA 96817 xxx D USA 12485 xxx G JPN xxx H GBR xxx N

  22. IP Routing: Addressing • Routing Table Look Up • Find an exact, complete match of IP dest addr • If unsuccessful then find a match of subnet id • If unsuccessful then find a match of net id • Go to default

  23. IP Routing: Masks Subnet id entry in Routing Table net id, subnet id mask net id subnet id 00000000 Mask 1111111111111111111111100000000 Finding a match Yes, then a match IP dest addr Bit-wise AND =?

  24. IP Routing: Masks Net id entry in Routing Table net id Finding a match Compare net id in table with net id of IP dest addr of packet

  25. IP Routing • Actions taken for routing • Search routing table for an entry that exactly • matches the complete destination IP address. • If unsuccessful then search for a subnet id • match (using masks). • If unsuccessful then search for net id • Default: send according to default entry

  26. netid subnetid hostid Description IP: Special Case IP Addresses 0 0 Host on this net 0 hostid Specify host on this net 127 anything Loopback address -1 -1 Limited broadcast netid -1 Net directed broadcast netid subnetid -1 Subnet-directed broadcast netid -1 -1 All-subnets-directed broadcast to netid

  27. NAT

  28. Uniqueness of IP address • Connectionless service? • Layered approach? • What about Non TCP/UDP protocol? • Some use IP address as a test in payload such as FTP, internet telephony protocol H.323 • We have limit on port number too. • IPv6?

  29. Internet Control Protocol

  30. Neighbor Greeting: ARP and RARP End nodes and routers find out their neighbors Point-to-point link Network E R Configured with IP address and mask for each link

  31. Neighbor Greeting: ARP and RARP End nodes attached via LANs E4 Network R1 R2 E3 Ethernet E1 E2

  32. Neighbor Greeting: ARP and RARP End nodes attached via LANs R1 Ethernet E1 E2 Ethernet packet dst addr src addr rest of the packet ???

  33. Neighbor Greeting: ARP R1 ARP request broadcast “E1 where are you?” E1 E2 ARP reply: “I am here (give ethernet address)” R1 E1 E2

  34. Neighbor Greeting: ARP Proxy ARP Router responding to ARP messages for another node Proxy R Gratuitous ARP: Request to your own IP address 1. Detect another node with the same IP address 2. Update ARP cache entries if hardware addr changes

  35. Neighbor Greeting: RARP S RARP server RARP request broadcast “What’s my IP address (give ethernet address) ?” E1 E2 Doesn’t know IP addr Look up IP address RARP reply: “Your IP address is xxxx” S E1 E2

  36. Neighbor Greeting: ARP and RARP Ethernet packet Header Payload • Header • Ethernet dst and src addresses • Ethernet frame type = 0x0806 for ARP request • or reply • = 0x0805 for RARP request or • or reply

  37. Neighbor Greeting: ARP and RARP • Payload • Hardware type = 1 for ethernet • Protocol type = 0x800 for IP • Length in octets of layer 2 address = 6 for ethernet • Length in octets of layer 3 address = 4 for IP • Operation • 1 = ARP request • 2 = ARP reply • 3 = RARP request • 4 = RARP reply

  38. Neighbor Greeting: ARP and RARP • Payload • Sender layer 2 address • Sender layer 3 address • Target layer 2 address • Target layer 3 address

  39. Neighbor Greeting: ARP and RARP R1 Ethernet E1 E2 ARP Cache IP dest Ethernet physical addr Time outs flush cache of old entries

  40. Internet Control Message Protocol: ICMP • For the control plane • Uses IP packets • Deals with connectivity • Errors • Redirection

  41. Internet Control Message Protocol: ICMP IP Header ICMP Message 8-bit Type 8-bit Code 16-bit Checksum

  42. Internet Control Message Protocol: ICMP type Description 0 echo reply (ping reply) 3 destination unreachable 4 source quench 5 redirect 8 echo request (ping request) 9 router advertisement 10 router solicitation 11 time exceeded: Time-to-live = 0

  43. Internet Control Message Protocol: ICMP type Description 12 Parameter problem: IP header bad or required option missing 13 Time stamp request 14 Time stamp reply 15 Information request (obsolete) 16 Information reply (obsolete) 17 address mask request 18 address mask reply

  44. type code (0) checksum identifier sequence number 32-bit subnet mask ICMP: Address Mask Request and Reply • It’s used by diskless systems to obtain their • subnet mask Used to match requests with replies

  45. ICMP: Time Stamp Request and Reply It’s used to get the current time (# ms since midnite) type code (0) checksum identifier sequence number 32-bit originate time stamp req sent req recvd 32-bit receive time stamp 32-bit transmit time stamp reply sent

  46. ICMP: Port Unreachable Error Node Z dst src Can’t forward to X for some reason X Y Tells Y that there’s a problem with forwarding to X at Z Header ICMP Y Z dst src

  47. ICMP: Port Unreachable Error • Reasons why a packet can’t be forwarded: • Network or host can’t be reached because • Not in routing table • Administrative or TOS prohibited • Must fragment but packet indicates no fragmentation • Source route failed • Ports or protocol are unavailable

  48. ICMP: Port Unreachable Error ICMP unreachable message type(3) code checksum Unused (must be 0) IP header (including options) + first 8 bytes of original IP datagram data First 8 bytes of original IP datagram includes src & dst port numbers for UDP and TCP headers

  49. More on IP Packets: Options 0 15 16 31 Vers HL TOS Total Length Identification Flags Offset TTL Protocol Header Checksum Source Address Destination Address Options Data

  50. More on IP Packets: Options • Options field is at most 40 bytes • Record Route Option • Timestamp Option • Source Routing

More Related