我在路由器上安装了 OpenWrt,我想获取连接到它的某些机器的 MAC 地址。对于 ipv4,我会使用arp
命令。但我想解析知道 ipv6 地址的硬件地址。我读过 ipv6 有国家发展计划协议替换ARP查找MAC表的命令是ip -6 neigh show
,但问题是我的OpenWrt中的BusyBox没有ip
命令,我不确定安装一些软件包是否可以带来它。所以我想知道是否有什么方法可以检查ipv6的MAC表?也许我可以只是cat
一些文件?
编辑:我安装了ip与管理器打包opkg
,所以现在我可以使用ip -6 neigh show
,但我仍然想知道是否可以使用 获得相同的信息cat somefile
?
答案1
您可以使用安装 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