Closed victorbillaud closed 2 years ago
Depends on your platform, you can specify custom option.
For example, Linux one, you can use -I eth1
Ping 8.8.8.8 -I eth1
在 2021年4月23日週五 20:04,victorbillaud @.***> 寫道:
Hello, I have a little problem, my server have 2 differents ip, one for internet connexion and one for local network with robots. On my server i have two network interfaces. It's possible to specifie the good interface in ping request ?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/danielzzz/node-ping/issues/137, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5YBI4RGP5UUK7UHZASCDDTKFO5VANCNFSM43OQOJGA .
I spoke about npm ping with node js
Since our module relies underlying ping command in your platform, as long as your platform support ping by interface, we support that.
For example, in linux, you can ping with specific interface by using option -I
Therefore, you can specific that ["-I", "eth1"] via "extra" option as illustrated in an example "configurable ping option "
在 2021年4月24日週六 00:35,victorbillaud @.***> 寫道:
I spoke about npm ping with node js
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/danielzzz/node-ping/issues/137#issuecomment-825776923, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5YBI2BHAGJSCWEQ7JWCQ3TKGOTRANCNFSM43OQOJGA .
In debian system, I believe {..., extra: ['-I', 'THAT_INTERFACE']}
should do the trick
Oh thanks for this answer, i will try this monday. Have a nice evening
Hello, I have a little problem, my server have 2 differents ip, one for internet connexion and one for local network with robots. On my server i have two network interfaces. It's possible to specifie the good interface in ping request ?