Generate RARP (Reverse ARP) packets
Recently, Ostinato customer Barry sent me this email -
I want to generate RARP request packets. I created an ARP packet in a stream. Saved the stream as a PCAP file. Hex edited the PCAP file to change the type to 0x0835. Imported and tried to send. It is not working.
Do you have a suggestion?
RARP (Reverse ARP) is a very old protocol that is not used these days and so Ostinato does not support it (Barry was working with some old equipment that still used RARP).
I looked up the RARP frame format and found that it is exactly the same as ARP except for two fields.
Here’s the RARP RFC 903 extract -
RARP uses the same packet format that is used by ARP, namely:
ar$hrd (hardware address space) - 16 bits
ar$pro (protocol address space) - 16 bits
ar$hln (hardware address length) - 8 bits
ar$pln (protocol address length) - 8 bits
ar$op (opcode) - 16 bits
ar$sha (source hardware address) - n bytes,
where n is from the ar$hln field.
ar$spa (source protocol address) - m bytes,
where m is from the ar$pln field.
ar$tha (target hardware address) - n bytes
ar$tpa (target protocol address) - m bytes
ar$hrd, ar$pro, ar$hln and ar$pln are the same as in regular ARP
(see [1]).
The differences are -
- The EtherType is
0x8035
instead of0x0806
- The Op codes are 3 & 4 (instead of the 1 & 2 ARP op codes)
- 3 - Reverse ARP request
- 4 - Reverse ARP reply
This was easily doable with Ostinato by using packet field overrides!
We start with creating a normal ARP packet in Ostinato -
To override the EtherType is straight-forward -
The ARP op code input box seems to offer only op code 1 and 2.
But actually you can just type in any op code value (yeah, I realize this is not very obvious).
In this case we need 3 (RARP Request) -
💡 TIP: You can override ANY packet field even if the protocol doesn’t seem to offer a way to do that!
That’s it!
We can now successfully send a valid RARP packet using Ostinato that can be verified using Wireshark -
Ostinato 1.4 RARP support
I have now added RARP support to Ostinato and this will be available starting v1.4.
All you need is to select the appropriate RARP op code and the EtherType will be automatically updated to RARP -
For more Ostinato related content, subscribe for email updates.
Leave a Comment