RARP
 
Now let’s look at RARP - The reverse Address Resolution Protocol.
 
  - ARP says, "Give me the Ethernet address for this IP address"
 
  - RARP says, "Here is my Ethernet address, give me the corresponding IP address".
 
  - Used for machines that want to get IP addresses at boot time from a central server
  - Also used for diskless clients.
 
  - It uses the same protocol as ARP, except the "op" is 003 for a request and 0004 for a reply.
 
        - In Ethernet frame, old Ethernet has "type" field of 0835,
        - 802.3 has 0835 in the "type" field of the data.
 
  - Server machines are configured with tables that map Ethernet addresses into IP addresses.  That server answers RARP requests.
 
Proxy ARP
 
   - Proxy ARP is a facility where a machine will answer ARP requests on behalf of another machine.
 
   - An administrator can set up Proxy ARP instead of having subnet masks on each host (a subnet mask is only needed on machines doing the Proxy ARP).
 
   - Example:
 
     Suppose we have a Class B network of 169.124.0.0.  Let's say we partitioned the network as follows:
 
      A      B      C      R1    D     E    F
      |      |      |     /  \   |     |    |
     ---------------------    ------------------
 
     The machines have the following addresses:
 
     Machine              IP Address          Ethernet Address
     -------              ----------          -----------------
        A                 169.124.15.1        08:00:01:02:03:01
        B                 169.124.15.2        08:00:01:02:03:02
        C                 169.124.15.3        08:00:01:02:03:03
        R1 (interface 1)  169.124.15.3        08:00:01:02:03:04
        R1 (interface 2)  169.124.19.1        08:00:01:02:03:05
        D                 169.124.19.2        08:00:01:02:03:06
        E                 169.124.19.3        08:00:01:02:03:07
        F                 169.124.19.4        08:00:01:02:03:08
 
    Because we are not using subnet masks on A, B, C, D, E, and F, we must set up R1 to use Proxy ARP.
 
    Here's how it works:
 
    The administrator configures R1 to use Proxy ARP.  The administrator sets the subnet mask of R1 to be 255.255.255.0.  The administrator also sets up R1 to do the following:
 
        1.  If a request comes in on interface 1 for any IP address starting with 169.124.19, respond with R1's Ethernet address corresponding to interface 1.
 
        2.  If a request comes in on interface 2 for any IP address starting with 169.124.15, respond with R1's Ethernet address corresponding to interface 2.
 
    Now let's see what happens when A wants to talk to another machine.
    Note that the routing tables for A has only one entry:
 
             169.124.0.0  169.124.15.1  interface_1
 
    If a wants to talk to 169.124.15.2, it issues the following ARP request:
 
   ----------------------------------------------------------------
   | Preamble | SOF | ff ff ff ff ff ff | 08 00 01 02 03 01 | 0806 |
   -----------------------------------------------------------------
   | 0001 0800  06  04  0001 08 00 01 02 03 01 A9 7C 0F 01         |
   | 00 00 00 00 00 00 A9 7C 0F 02
   -----------------------------------------------------------------
   |  checksum |
   -------------
 
    Note that A9 7C 0F 01 is 169.124.15.1 and A9 7C 0F 02 is 169.124.15.2.
 
    As expected, machine B replies:
 
   ----------------------------------------------------------------
   | Preamble | SOF | 08 00 01 02 03 01 | 08 00 01 02 03 02 | 0806 |
   -----------------------------------------------------------------
   | 0001 0800  06  04  0002 08 00 01 02 03 02 A9 7C 0F 02         |
   | 08 00 01 02 03 01 A9 7C 0F 01                                 |
   -----------------------------------------------------------------
   |  checksum |
   -------------
 
   Now, let's say machine A wants to send a packet to machine E.
 
   The IP on A looks in its routing table, and sees it should deliver the packet direct.  So, IP gives the packet to ARP, telling ARP to send the packet to 169.124.19.3 (i.e., machine E).
 
   ARP then issues the ARP request:
 
   ----------------------------------------------------------------
   | Preamble | SOF | ff ff ff ff ff ff | 08 00 01 02 03 01 | 0806 |
   -----------------------------------------------------------------
   | 0001 0800  06  04  0001 08 00 01 02 03 01 A9 7C 0F 01         |
   | 00 00 00 00 00 00 A9 7C 13 03
   -----------------------------------------------------------------
   |  checksum |
   -------------
 
   Note that A9 7C 13 03 is 169.124.19.3.
 
   At this point, Machine R1 replies to the ARP request!  (Remember that the administrator set up R1 to respond for all addresses starting with 169.124.19.
 
   So, R sends the following ARP response:
 
   ----------------------------------------------------------------
   | Preamble | SOF | 08 00 01 02 03 01 | 08 00 01 02 03 04 | 0806 |
   -----------------------------------------------------------------
   | 0001 0800  06  04  0002 08 00 01 02 03 04 A9 7C 13 03         |
   | 08 00 01 02 03 01 A9 7C 0F 01                                 |
   -----------------------------------------------------------------
   |  checksum |
   -------------
 
   Note that the packet says "the Ethernet address of 169.124.19.3 is 08 00 01 02 03 04".  That, of course, is a total fabrication. But, things will now work correctly!  When machine A now sends the IP packet, the destination IP address will be 169.124.19.3.  But, the Ethernet address will be that of R1!  That is exactly what would have happened if machine A were using subnet masks and had R1 as a router.
 

IP -- The Internet Protocol

The IP packet format:

-------------------------------------------------------------------------
| 4-bit   | 4-bit header |8-bit "type | 16-bit total length (in bytes)  |
| version | length       |of service" |                                 |
-------------------------------------------------------------------------
| 16-bit identification  | 3-bit      | 13-bit fragment offset          |
|                        | flag       |                                 |
-------------------------------------------------------------------------
| 8-bit "time to live"   | 8-bit      | 16-bit header checksum          |
|                        | protocol   |                                 |
-------------------------------------------------------------------------
|   32-bit source IP address                                            |
-------------------------------------------------------------------------
|   32-bit destination IP address                                       |
-------------------------------------------------------------------------
|   options (if any)                                                    |
-------------------------------------------------------------------------
|                                                                       |
|                                 data                                  |
|                                                                       |
-------------------------------------------------------------------------
 

The four service bits can be:
            1000 - minimize delay
            0100 - maximize throughput
            0010 - maximize reliability
            0001 - minimize monetary cost
This is a "hint" of what characteristics of the physical layer to use
The Type of Service is not supported in most implementations. However, some implementations have extra fields in the routing table to indicate delay, throughput, reliability, and monetary cost.