Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
46 lines (29 sloc) 1.43 KB


Send arp packet using rust libpnet

Send an arp packet.

By default an arp request packet will be sent.

    send-arp [FLAGS] --interface <interface> --source-ip <source_ip> --source-mac <source_mac> --target-ip <target_ip> --target-mac <target_mac>

        --reply      Send an arp reply packet
    -h, --help       Prints help information
    -V, --version    Prints version information

    -i, --interface <interface>      Provide the interface to be used to send packets
        --source-ip <source_ip>      Set the source ip
        --source-mac <source_mac>    Set the source mac address
        --target-ip <target_ip>      Set the target ip
        --target-mac <target_mac>    Set the target mac address

Send arp request

This is the default behaviour.

send-arp -i en1 --source-ip --source-mac ac:2e:4f:cd:cd:ae --target-ip --target-mac ef:34:23:ff:ad:dd

Send arp reply

send-arp -i en1 --source-ip --source-mac ac:2e:4f:cd:cd:ae --target-ip --target-mac ef:34:23:ff:ad:dd --reply

Send Gratuitous arp (Request)

  • Source and target ip will be the ip of the source (The host issuing the arp)
  • Target mac is the broadcast mac address (ff:ff:ff:ff:ff:ff)

send-arp -i en1 --source-ip --source-mac ac:2e:4f:cd:cd:ae --target-ip --target-mac ff:ff:ff:ff:ff:ff

Blog post

You can’t perform that action at this time.