以太网mac地址唯一地标识了世界上的每个以太网设备。每一个生产网络设备的厂商都要将mac地址预先写进其设备中(如:以太网网卡,路由器,交换机等)。各种媒体已有很多文章介绍获得mac地址的方法。今天我们主要讨论怎样在cisco的ios获得、改变mac地址,并使用mac地址进行网络通信过滤。
{9Ug9e{
~ <p5?yF Kl/n>qEt 获得mac地址
]8+ D Dbg,|UH 在交换机的命令输入窗口,输入“show mac-address-table”可以获得mac地址表,例如:
Liv.i;-qE - switch# show mac-address-table
- mac address table
- -------------------------------------------
- vlan mac address type ports
- ---- ----------- -------- -----
- all 0014.1c40.b080 static cpu
- all 0100.0ccc.cccc static cpu
- all 0100.0ccc.cccd static cpu
- all 0100.0cdd.dddd static cpu
- 1 000f.1fd3.d85a dynamic fa0/14
-
/6{P
?)]pE k -!Jww 在思科路由器上,可以使用“show interfaces”来查看mac地址。例如:
+R2+?v6 - routerb# show interfaces
- ethernet0/0 is up, line protocol is up
- hardware is amdp2, address is 0003.e39b.9220 (bia 0003.e39b.9220)
- internet address is 1.1.1.1/8
K6EG"Vv! S&J>15oWM` wLa8&E