Planetlab and scapy: MAC address to reach destination not found
Andrew Henderson
Using the minimal Fedora 14 distribution provided in PlanetLab, I'm forging packets through Scapy and sending them with tcpreplay.
I thought I had installed all the necessary packages to run scapy and tcpreplay, but for some reason scapy can't access the mac address of the machine.
For instance, if I send a packet through Scapy, I always get:
"WARNING: Mac address to reach destination not found. Using broadcast."Also, if I add an Ethernet layer to an existing IP packet, the resulting destination is always ff:ff:ff:ff:ff:ff.
What am I missing here?
1 Answer
Ok, so I figured out what was happening:
- On PlanetLab you can't make any ARP requests, even if you are root. You can only read the ARP table that is provided to you
- When Scapy builds an Ethernet layer with no input destination address, it makes an ARP request to fill out that field of the Ethernet header.
=> Solution: I had to lookup the ARP table myself and specify the gateway's MAC address in each packet.