Coder Social home page Coder Social logo

Comments (3)

ThomasHabets avatar ThomasHabets commented on June 11, 2024

First a curiosity: Why are you using eth0 and eth1, shouldn't that be br0?

But did you also see this from the README:

---
Q: I can't ping any/some MAC address on my LAN.

A: Arping when pinging a MAC relies on the host to answer a broadcast ping
   (icmp echo request) properly (IIRC: not the windows way). If you want a
   host to pop up on MAC ping, you have to config it to respond to broadcast
   pings.
   (for linux, make sure /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts is 0)
A: -T <IP/host> allows you to restrict the arping to a limited subnet, which
   may or may not work for you. For example if the box 00:01:02:03:04:05 is on
   192.168.0.0/24 then the broadcast probably is 192.168.0.255, so try:
   # arping -T 192.168.0.255 00:01:02:03:04:05
---

You can also try adding (in your case) -T 192.168.10.5. If it works with that, but not without, then probably you can't ping that host by MAC address.

But also see the rest of the README in case other FAQs answer your question.

from arping.

dmak avatar dmak commented on June 11, 2024

Thanks for referring to README. I've tried to apply all your advises and it didn't work:

# cat /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
1

# echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts

# /usr/local/sbin/arping -c 3 -S 192.168.10.10 -i br0 -T 192.168.10.255 2c:b0:5d:a6:8e:02
ARPING 2c:b0:5d:a6:8e:02
Timeout
Timeout
Timeout

# /usr/local/sbin/arping -c 3 -T 192.168.10.255 2c:b0:5d:a6:8e:02
ARPING 2c:b0:5d:a6:8e:02
Timeout
Timeout
Timeout

--- 2c:b0:5d:a6:8e:02 statistics ---
3 packets transmitted, 0 packets received, 100% unanswered (0 extra)

However when I set IP address explicitly, it works:

# /usr/local/sbin/arping -c 3 -T 192.168.10.5 2c:b0:5d:a6:8e:02
ARPING 2c:b0:5d:a6:8e:02
42 bytes from 192.168.10.5 (2c:b0:5d:a6:8e:02): icmp_seq=0 time=266.875 usec
42 bytes from 192.168.10.5 (2c:b0:5d:a6:8e:02): icmp_seq=1 time=407.463 usec
42 bytes from 192.168.10.5 (2c:b0:5d:a6:8e:02): icmp_seq=2 time=427.208 usec

--- 2c:b0:5d:a6:8e:02 statistics ---
3 packets transmitted, 3 packets received,   0% unanswered (0 extra)
rtt min/avg/max/std-dev = 0.267/0.367/0.427/0.071 ms

but it does not meet my needs. Closing the ticket as it seems that I cannot ping the host by MAC in this case (although I am interested to know what could be the reason).

from arping.

ThomasHabets avatar ThomasHabets commented on June 11, 2024

The change of that sysctl must be on the target host, not the one you run arping on.

But yeah, if you don't know the IP address then likely it won't work. You can try the scanning script depending on what you want to do, but that's about it.

from arping.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.