sh-4.1# which arp #linux主机A/sbin/arpsh-4.1# arp -a 192.168.1.10 #主机B的IPbogon (192.168.1.10) at 32:8t:8p:43:43:32 [ether] on br0h-4.1# ifconfig|egrep "^br0" #主机Bbr0 Link encap:Ethernet HWaddr 32:8T:8P:43:43:32
通过MAC查IP
sh-4.1# arp -a |egrep "50:9b:6d:15:68:41"bogon (192.168.1.10) at 50:9b:6d:15:68:41 [ether] on br0sh-4.1# cat /proc/net/arp|egrep "50:9b:6d:15:68:41"192.168.1.10 0x1 0x2 50:9b:6d:15:68:41 * br0
注意MAC里的字母都是 用小写的。其实真正的MAC地址是大写的!!!!