Write a short program (or pseudocode) that simulates the Address Resolution Protocol (ARP) process. Assume that you
Question:
Write a short program (or pseudocode) that simulates the Address Resolution Protocol (ARP) process. Assume that you send out an ARP request frame with a broadcast address with 1111 1111. You choose your own frame but generally the order of a frame is as shown below. You enter the source and target protocols in the payload at this time. Let us not worry about FCS (Frame Check Sequence), which is a type of error control or Flags. When the target host receives the ARP request, the target address (hardware or MAC address) should match that of the ARP request and then sends back to the source host with the change of the Address (possibly with 0000 0000). In your simulation, make a subroutine that changes binary values to hexadecimal values and then hardware addresses to protocol addresses or vice versa.
flag | address | Control | protocol | Payload | FCS | Flag |
1 byte | 1111 1111 | 1 byte | 1 byte | Variable | 2 bytes | 1 byte |
Please write this in both pseudo and actual code.
Data Structures and Algorithms in Java
ISBN: 978-1118771334
6th edition
Authors: Michael T. Goodrich, Roberto Tamassia, Michael H. Goldwasser