Sending scapy IP packet without IP interface error

I am currently trying to send an IP packet to the interface using the send function (pkt, iface = "eth0"), and I get an error message:

WARNING: Mac address to reach destination not found. Using broadcast

The interface I'm trying to send does not have an IP address, and I prefer it. And if that matters, the interface is a bridge (created using brctl)

There is an ARP entry for the host that is in the IP packet, however it seems that scapy is not doing the lookup needed to get the MAC from the ARP table ...

Thoughts ?!

+4
source share
2 answers

I would say that this is normal, because an IP address is required to get a valid ARP request (and Scapy supports its own OS independent ARP table).

: srp(Ether(dst="[MAC address]")/[...]). MAC-, ARP .

Scapy ARP, conf.netcache.arp_cache, Scapy dict ( CacheInstance).

, ( sr([...]) srp(Ether(dst="[MAC address])/[...])), :

conf.netcache.arp_cache['[IP address]'] = '[MAC address]'
+2

dst (MAC-) Ethernet scapy . , Ethernet (ff: ff: ff: ff: ff: ff), . , :

Ether()/IP() Ether()/ARP()

IP() ARP().

+1

All Articles