=======================================
mac access-list extended MAC80185
deny host 00e0.4c90.01d1 any
permit any any
!
interface FastEthernet0/4
switchport access vlan 251
no ip address
mac access-group MAC80185 in
封到一个MAC地址,不让其接入网络的方法二
使用SNIFFER查到故障PC的IP,在交换机上查到PC的MAC地址
0710-SCM4506-A#sh arp | in 172.27.2.120
Internet 172.27.2.120 1 0002.e348.aba1 ARPA Vlan200
0710-SCM4506-A#conf t
Enter configuration commands, .e per line. End with CNTL/Z.
使用以下命令 drop 故障PC MAC地址发送数据包
0710-SCM4506-A(config)#mac-address-table static 0002.e348.aba1 vlan 200 drop
0710-SCM4506-A(config)#no mac-address-table static 0002.e348.aba1 vlan 200
=============================================================================
showshow arp | in +ip 找到MAC地址,
然后show mac-address-table address MAC找到对应交换机端口,
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
254150 Gig 3/15 166 S I WS-C2950G-Gig 0/2