Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I specify device to use #8

Open
GaikwadPratik opened this issue Aug 10, 2020 · 0 comments
Open

How do I specify device to use #8

GaikwadPratik opened this issue Aug 10, 2020 · 0 comments

Comments

@GaikwadPratik
Copy link

GaikwadPratik commented Aug 10, 2020

@dresende
I have multiple interfaces defined on my server. One of them is used as prod interface and others might be used for internal communication. So how do I specify what device to be used in the library?

For instance, on terminal I use

# arping 192.168.122.3 -I prod
ARPING 192.168.122.3 from 192.168.122.2 prod
Unicast reply from 192.168.122.3 [52:54:00:6C:AE:66]  0.873ms
Unicast reply from 192.168.122.3 [52:54:00:6C:AE:66]  1.807ms
Unicast reply from 192.168.122.3 [52:54:00:6C:AE:66]  1.920ms
Unicast reply from 192.168.122.3 [52:54:00:6C:AE:66]  0.920ms

where in prod is the name of the interface

let me know if anything needs clarification

edit: After reading the code, I figured out that I need to use library like

arp.ping("192.168.122.3", {spa: "192.168.122.2"}, (err, info) => console.log(err, info))

OR

arp.ping("192.168.122.3", {sha: "52:54:00:93:e4:27"}, (err, info) => console.log(err, info))

but I always get error:

    at Timeout.setTimeout [as _onTimeout] (/opt/hive/services/hive-fabric/node_modules/arping/index.js:181:8)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10) undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant