Comments (3)
@nemesisdesign Apparently the arp command is deprecated and ip neigh
is the way to go. In fact arp in the latest version of openwrt is an alias to cat /proc/net/arp
.
Here is an example of the output of both so you can compare:
root@08-00-27-5D-DF-07:~# ip neigh
10.0.3.3 dev eth1 lladdr 52:54:00:12:35:03 used 0/0/0 probes 1 STALE
192.168.1.34 dev eth2 lladdr 18:5e:0f:12:12:0e used 0/0/0 probes 1 STALE
10.0.3.2 dev eth1 lladdr 52:54:00:12:35:02 used 0/0/0 probes 4 STALE
192.168.1.1 dev eth2 lladdr cc:d4:a1:06:dd:0a ref 1 used 0/0/0 probes 1 REACHABLE
192.168.56.1 dev br-mng lladdr 0a:00:27:00:00:00 ref 1 used 0/0/0 probes 4 REACHABLE
fe80::9a9c:57ff:fe8b:4f67 dev eth2 lladdr 98:9c:57:8b:4f:67 ref 1 used 0/0/0 probes 1 DELAY
fe80::2e0e:3dff:fed6:506 dev eth2 lladdr 2c:0e:3d:d6:05:06 ref 1 used 0/0/0 probes 1 REACHABLE
fe80::ced4:a1ff:fe06:dd0a dev eth2 lladdr cc:d4:a1:06:dd:0a router used 0/0/0 probes 0 STALE
fe80::be3d:85ff:fed7:53e0 dev eth2 lladdr bc:3d:85:d7:53:e0 used 0/0/0 probes 1 STALE
root@08-00-27-5D-DF-07:~# arp
IP address HW type Flags HW address Mask Device
10.0.3.3 0x1 0x2 52:54:00:12:35:03 * eth1
192.168.1.34 0x1 0x2 18:5e:0f:12:12:0e * eth2
10.0.3.2 0x1 0x2 52:54:00:12:35:02 * eth1
192.168.1.1 0x1 0x2 cc:d4:a1:06:dd:0a * eth2
192.168.56.1 0x1 0x2 0a:00:27:00:00:00 * br-mng
Should we still go with arp
?
from openwrt-openwisp-monitoring.
@PabloCastellano thanks for bringing this up, that's great.
Take a look at this:
# installs the full IP package
# (the default one I think is a stripped down version available in busybox)
opkg install ip
ip -json neighbour
The full ip package has a -json flag so you can avoid having to parse it.
We can use its format as is, this should reduce friction when we will try adding this kind of features on other embedded OSes in the future.
from openwrt-openwisp-monitoring.
Since the output of ip neigh
can be very different depending on the version, my PR just parses /proc/net/arp
so far
from openwrt-openwisp-monitoring.
Related Issues (20)
- [bug] Do not retry sending data if HTTP response is 400 bad request HOT 1
- [bug] None is not of type 'object' HOT 2
- [change] Stop sending data on repeated 404 responses HOT 3
- [feature] Add retry mechanism with randomized backoff for HTTP requests
- [feature] Add bootup_delay option
- [tests] Change JSON string assertions to data structure assertions
- Time display and adjustement HOT 2
- [bug/change] Do not add wireless interface information if channel is not available
- [enhancement] Add `htmode` to wireless interface
- [bug] 'pairs' on unexpected variable value HOT 2
- [change] Move VERSION out of /etc/openwisp/
- [bug] Spanning Tree Status shown incorrectly HOT 2
- [feature] Add more wifi station information HOT 1
- [ci] "Build and upload package" job fails when using github action cache
- [change] Introduce random pause in sending of accumulated data
- [docs] Add package installation instructions
- [bug] Agent crashes when using monitored_interfaces "wlan0 wlan1 br-lan"
- [feature] Allow recognizing wireguard interface as of type virtual HOT 2
- [bug] ULA prefix check is bugged HOT 6
- [feature] Restart/reload agent when openwisp-config is restarted
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openwrt-openwisp-monitoring.