我在路由器上安装了 OpenWrt,我想获取连接到它的某些机器的 MAC 地址。使用 ipv4 我会使用arp
命令。但是我想知道 ipv6 addr 来解析硬件地址。我已经读到 ipv6 有ndp协议替换arp并且查找 MAC 表的命令是ip -6 neigh show
,但问题是我的 OpenWrt 中的 BusyBox 没有ip
命令,我不确定安装某些软件包是否可以带来它。所以我想知道是否有任何方法可以检查ipv6的MAC表?也许我可以只是cat
一些文件?
编辑:我用manager安装了ip包,opkg
所以现在我可以使用了ip -6 neigh show
,但我仍然想知道我是否可以使用 获得相同的信息cat somefile
?
您可以使用安装 ndpmon 包:
apt-get install ndpmon
ndpmon - IPv6 Neighbor Discovery Protocol Monitor
root@lvm:/home/mohsen# dpkg -L ndpmon
/.
/etc
/etc/init.d
/etc/init.d/ndpmon
/etc/default
/etc/default/ndpmon
/etc/ndpmon
/etc/ndpmon/config_ndpmon.dtd
/etc/ndpmon/config_ndpmon.xml
/usr
/usr/lib
/usr/lib/ndpmon
/usr/lib/ndpmon/plugins
/usr/lib/ndpmon/plugins/mac_resolv
/usr/lib/ndpmon/plugins/mac_resolv/README
/usr/lib/ndpmon/plugins/mac_resolv/wka.tmpl
/usr/lib/ndpmon/plugins/mac_resolv/manuf.tmpl
/usr/lib/ndpmon/plugins/mac_resolv/manuf
/usr/lib/ndpmon/plugins/countermeasures
/usr/lib/ndpmon/plugins/countermeasures/icmp_lib.dox
/usr/lib/ndpmon/plugins/countermeasures/countermeasures.dox
/usr/lib/ndpmon/create_html_table.py
/usr/share
/usr/share/man
/usr/share/man/man8
/usr/share/man/man8/config_ndpmon.xml.8.gz
/usr/share/man/man8/ndpmon.8.gz
/usr/share/doc
/usr/share/doc/ndpmon
/usr/share/doc/ndpmon/changelog.Debian.gz
/usr/share/doc/ndpmon/copyright
/usr/share/doc/ndpmon/examples
/usr/share/doc/ndpmon/examples/demopipeprogram.pl.sample
/usr/share/doc/ndpmon/README
/usr/share/doc/ndpmon/changelog.gz
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/ndpmon
/usr/share/python-support
/usr/share/python-support/ndpmon.private
/usr/sbin
/usr/sbin/ndpmon
/var
/var/lib
/var/lib/ndpmon
/var/lib/ndpmon/neighbor_list.xml
/var/lib/ndpmon/neighbor_list.dtd
/var/lib/ndpmon/alerts.xml
root@lvm:/home/mohsen# man ndpmon
root@lvm:/home/mohsen# apt-cache search ndpmon
ndpmon - IPv6 Neighbor Discovery Protocol Monitor
Run Code Online (Sandbox Code Playgroud)