Alan Kaminsky Department of Computer Science Rochester Institute of Technology 4486 + 2220 = 6706
Home Page
Data Communications and Networks I 4003-420-01/4005-740-01 Fall Quarter 2012
Course Page

4003-420-01/4005-740-01 Data Communications and Networks I
Module 9. Support Protocols -- Lecture Notes

Prof. Alan Kaminsky -- Fall Quarter 2012
Rochester Institute of Technology -- Department of Computer Science


Ethernet Addresses

  • Ethernet MAC address format
    • First 3 bytes (24 bits): Organizationally Unique Identifier (OUI)
      • Designates the manufacturer of the Ethernet chip/card
      • Assigned by the IEEE
    • Second 3 bytes (24 bits): Network Interface Controller Number
      • Designates a particular chip/card from that manufacturer
      • Assigned by the manufacturer

  • OUI format
    +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
    |                       | L | M |                               |                               |
    +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
    
    • M = 0: unicast address; M = 1: multicast address
    • L = 0: globally unique address; L = 1: locally unique address

  • Ethernet broadcast address
    • 111111111111111111111111111111111111111111111111
    • Will be received by all stations on the Ethernet local network

  • Ethernet multicast address
    • 11xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    • Will be received by selected stations on the Ethernet local network
    • Namely, all stations that have programmed their Ethernet interfaces to receive the multicast address

  • Ethernet unicast address
    • 0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    • Will be received by one station on the Ethernet local network
    • Namely, the station with that MAC address


Address Resolution Protocol

  • When an IP packet is sent over an Ethernet local network, what destination MAC address should appear in the Ethernet frame?
    • Case 1: The destination host is on the same local network as the source host
      • Must send the frame to the destination host's MAC address
    • Case 2: The destination host is on a different local network from the source host
      • Must send the frame to the local router's MAC address

  • Address Resolution Protocol (ARP): RFC 826
    • Maps IP addresses to Ethernet MAC addresses
    • ARP request message (broadcast)
    • ARP response message (unicast)
    • ARP cache

  • Demo: arping


Internet Control Message Protocol

  • Internet Control Message Protocol (ICMP): RFC 792
    • Used to discover information about IP packet forwarding
    • Used to report errors in IP packet forwarding
    • Used to control the operation of IP packet forwarding
    • ICMP messages are encapsulated in IP packets and sent using IP

  • Demo: ping
    • Host A sends an ICMP "echo" message to Host B
    • Host B sends an ICMP "echo reply" message to Host A
    • Host A reports the round trip time

  • Demo: traceroute
    • Host A sends a probe packet to Host B, with the time-to-live (TTL) field in the IP header set to 1
      • Probe packet is a UDP datagram with an unlikely port number, so Host B will not do anything with the packet
    • The first router decrements the TTL to 0, then sends an ICMP "time exceeded" message back to Host A
    • Host A reports the IP address of the first router and the round trip time
    • The preceding steps are repeated with TTL = 2, 3, 4, and so on until the probe packet reaches Host B
    • In this way, Host A discovers the sequence of routers along the path to Host B


Dynamic Host Configuration Protocol

  • Dynamic Host Configuration Protocol (DHCP): RFC 2131
    • Used to supply configuration parameters to hosts at boot time, such as the host's IP address
    • DHCP messages use UDP at the Transport Layer

  • DHCP server, DHCP client

  • DHCP message addressing
    • Tricky, because the client doesn't have an IP address yet
    • Client-to-server messages sent to IP address 255.255.255.255 (local network broadcast), UDP port 67
    • Server-to-client messages sent to IP address 255.255.255.255, UDP port 68

  • DHCP operation


Network Address Translation

  • Problem: There aren't enough 32-bit IPv4 addresses to go around

  • Solution: Use IPv6 with 128-bit addresses

  • Problem: Hardly anyone supports IPv6

  • Solution: Network Address Translation (NAT)

  • NAT router
    • Exposes one IP address to the Internet side
    • Supports multiple IP addresses and hosts on the local network side
    • Hosts are given IPv4 private addresses: RFC 1918
    • 10.0.0.0/8
    • 172.16.0.0/12
    • 192.168.0.0/16

  • Address translation for TCP
    • NAT router keeps track of each open TCP connection involving a local host
      • Local host IP address and port number
      • Far end host IP address and port number
    • NAT router assigns a unique external port number to each open TCP connection
    • In each outgoing TCP packet from a local host:
      • The source IP address is replaced with the NAT router's Internet-visible IP address
      • The source port number is replaced with the TCP connection's external port number
      • The IP header checksum and TCP header checksum are recomputed
      • The translated packet is forwarded to the Internet
    • In each incoming TCP packet from the Internet:
      • The destination port number (external port number) is converted back to local host and local port
      • The destination IP address is replaced with the local host's IP address
      • The destination port number is replaced with the local port number
      • The IP header checksum and TCP header checksum are recomputed
      • The translated packet is forwarded to the local network

  • Address translation for other transport protocols (UDP, etc.) works similarly

  • The NAT router has to be aware of the Network Layer protocol (IP) and multiple Transport Layer protocols (TCP, UDP, etc.)

Campfire

http://xkcd.com/742/

Data Communications and Networks I 4003-420-01/4005-740-01 Fall Quarter 2012
Course Page
Alan Kaminsky Department of Computer Science Rochester Institute of Technology 4486 + 2220 = 6706
Home Page
Copyright © 2012 Alan Kaminsky. All rights reserved. Last updated 30-Oct-2012. Please send comments to ark­@­cs.rit.edu.