MAC地址表包括兩種類型的地址
1. 交換機動態(tài)學習的地址;
2. 通過手動綁定的靜態(tài)地址,
Managing the MAC Address Table
。無論是動態(tài)地址還是手動固定地址,MAC地址表包括目的MAC、VLAN ID、端口號、地址類型。
Eg:
Switch#show mac-address-table
Destination Address Address Type VLAN Destination Port
------------------- ------------ ---- --------------------
cc00.4058.0000 Self 1 Vlan1
Switch#show mac-address-table interfacef0/1
手工靜態(tài)指定MAC地址
Switch(config)#mac-address-table static0013.1a2f.0680 vlan 1 interface f0/2
指定丟棄某個MAC地址
Switch(config)#mac-address-table static 0013.1a2f.0680 vlan 2 drop
在接口或VLAN上禁止學習MAC地址
1. 在接口或SVI接口上禁用MAC地址學習,交換機將轉發(fā)所有的IP包在2層域中;
2. 可以選擇在單個VLAN上禁用MAC地址學習,VLAN 范圍1-4094;
3. 建議在僅僅在VLAN的兩個接口上禁用MAC地址學習,若在多個接口上禁用交換機或轉發(fā)廣播,
電腦資料
《Managing the MAC Address Table》(http://www.msguai.com)。4. 不能在連接路由器的接口上禁用MAC地址學習。
5. 在配置了安全級別的接口上不能配置禁用MAC地址學習。
Configure
Eg:Router(config)# no mac address-tablelearning vlan 200
Router(config)# no mac-address-table learning interface GigabitEthernet 0/5
Displaying MAC Address Table
show mac address-table address
show mac address-table aging-time
show mac address-table count
show mac address-table dynamic
show mac address-table interface
show mac address-table learning
show mac address-table static
show mac address-table vlan