secdev / scapy

Scapy: the Python-based interactive packet manipulation program & library.
https://scapy.net
GNU General Public License v2.0
10.79k stars 2.03k forks source link

Windows - WARNING: Mac address to reach destination not found. Using broadcast. #427

Closed temp-defualt closed 7 years ago

temp-defualt commented 7 years ago

hi I recently updated a portable python + scapy installation script to include the latest version of scapy meaning i have machines (100+) running on windows 10 / 8 / 7 / XP with python 2.7.6 mainly and some with other 2.7 versions up to 2.7.12

any packet sent doesn't find a mac address and uses broadcast which is strange... this raises two main questions : 1) is scapy not having the host arp table the default behavior?
2) why isnt scapy learning from the answer the desired mac address ?

the code im using (this will fail the packet will be sent but you will never get an ICMP response):

p = IP(dst="www.google.com")/ICMP(type="echo-request")
send(p)

result:

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

Note that adding Ether layer and manually setting the "dst" to routers mac will work

I would like to fix this by at least "teaching" scapy the router mac address dynamically and more preferably to add to scapy arp cache the host arp table ...

as for the old version that worked for me I don't really know how to figure this out it has to be at least a year or two years old or something ...

p-l- commented 7 years ago

Hi, more context would be useful here: updated from which version to which version? what is your Windows / Python version? What is the exact command you are using, what is the exact output?

p-l- commented 7 years ago

No, not "never mind", it's much easier to handle this issue if we know which version works and which version is broken for you.

Also, we still need your exact command and output.

p-l- commented 7 years ago

My short answers are meant to help people (who can and want to) help you.

By latest version, do you mean latest released version (2.3.3), or current development version?

Can you provide the output of conf.route in Scapy and the Windows routing table?