【发布时间】:2011-12-27 21:36:27
【问题描述】:
我正在尝试获取我的手机所连接的 wifi 路由器的 IP/MAC,因此作为实验,我在我的 Macbook 上做了一个实验。网上文档说ifconfig会显示wifi路由器的IP/MAC,所以我绕着楼走到不同的路由器,输入ifconfig,但是得到的IP/MAC都是一样的,不知道是不是我做错了什么?
$ ifconfig | grep "\ [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\ "
inet 127.0.0.1 netmask 0xff000000
inet 128.31.33.53 netmask 0xfffffc00 broadcast 128.31.35.255
inet 10.211.55.2 netmask 0xffffff00 broadcast 10.211.55.255
inet 10.37.129.2 netmask 0xffffff00 broadcast 10.37.129.255
inet 172.16.236.1 netmask 0xffffff00 broadcast 172.16.236.255
inet 172.16.162.1 netmask 0xffffff00 broadcast 172.16.162.255
$ ifconfig | grep "[0-9a-f]\{2\}:[0-9a-f]\{2\}\:"
lladdr 00:23:12:ff:fe:f0:6c:50
ether 00:1f:5b:bf:48:c5
ether 00:22:41:3b:65:a3
ether 00:1c:42:00:00:08
ether 00:1c:42:00:00:09
ether 00:50:56:c0:00:01
ether 00:50:56:c0:00:08
这些是我在所有路由器上测试的输出。
谢谢, -J
【问题讨论】:
-
什么在线文档? ifconfig 的手册页没有说明连接的 wifi AP 的 MAC。
标签: wifi ip-address router mac-address ifconfig