MAC(Medium Access Control),即媒介访问控制,是计算机网络通信中的重要概念。每个NIC(Network Interface Card),即网络适配器,都具有独自且不变的MAC地址(烧录的),即物理地址(而IP地址则会因接入新网络,重新分配而改变)。
教科书中对MAC地址的描述:
MAC (or LAN or physical or Ethernet) address:
- function: used ‘locally’ to get frame from one interface to another physically-connected interface (same network, in IP-addressing sense).
- 48 bit MAC address (for most LANs) burned in NIC ROM, also sometimes software settable.
- e.g.: 1A-2F-BB-76-09-AD(12个16进制位,共12 * 4 = 48bit)
Windows系统中,通过命令ipconfig /all
查看本机网卡的MAC地址,位于物理地址一项(仅通过ipconfig
命令不会显示MAC地址):
Linux系统中,使用简单的ifconfig
命令(在net-tools软件包中)即可查看网卡的MAC地址,位于ether(ethernet)一项: