先用 ping 指令查詢
# ping -c 4 192.168.1.230
PING 192.168.1.230 (192.168.1.230) 56(84) bytes of data.
64 bytes from 192.168.1.230: icmp_seq=1 ttl=254 time=2.96 ms
64 bytes from 192.168.1.230: icmp_seq=2 ttl=254 time=1.19 ms
64 bytes from 192.168.1.230: icmp_seq=3 ttl=254 time=1.23 ms
64 bytes from 192.168.1.230: icmp_seq=4 ttl=254 time=1.18 ms
查詢卡號
# arp -a | grep 192.168.1.230
pc230.test.ilc.edu.tw (192.168.1.230) at 00:17:16:0c:e3:a5 [ether] on eth0
原本 IEEE 查詢的網頁已經無法查詢了!
http://standards.ieee.org/regauth/oui/index.shtml
在網路上搜尋了一下,找到大陸的一個網站,也可以查詢
网卡MAC码分析 – MAC地址查询 – 网卡MAC地址分析 – MAC厂商查询 – 网卡厂商查询 – 网卡MAC归属地查询
查詢到上面的網路卡是屬於 Qno 這一個公司所出產[@more@]如果您有特殊的因素,不想使用上面的網頁,可以下載整個網路卡廠商的 oui.txt 來進行查詢
1. 下載 IEEE oui.txt
# wget http://standards-oui.ieee.org/oui.txt -P /usr/local/bin
2. 建立查詢檔案
# cat /usr/local/bin/checkmacaddress.sh
#!/bin/bash
if [ $# -ne 1 ]; then
echo “Usage: $0 first3mac”
exit 1
fi
mac=$1
mac=${mac//:/-}
grep -i $mac /usr/local/bin/oui.txt
3. 更改權限
# chmod 700 /usr/local/bin/checkmacaddress.sh
4. 輸入網路卡卡號前三組進行測試,不分大小寫,可以使用 – 或 : 做分隔
# /usr/local/bin/checkmacaddress.sh 00:0c:29
# /usr/local/bin/checkmacaddress.sh 00:0C:29
# /usr/local/bin/checkmacaddress.sh 00-0c-29
# /usr/local/bin/checkmacaddress.sh 00-0C-29
00-0C-29 (hex) VMware, Inc.
# /usr/local/bin/checkmacaddress.sh 00-17-16
00-17-16 (hex) Qno Technology Inc.