Cisco思科交换机show mac address-table命令使用详解

Cisco思科交换机show mac address-table命令使用详解

show mac address-table命令用于显示交换机的MAC地址表。
该表记录了每个接口和与之关联的MAC地址。

#show mac address-table ?    --当在默认情况下输入“?”,系统会自动识别为 help 命令。
  address       Address to lookup in the table               --要查找的MAC地址
  aging-time    MAC address table aging parameters  --MAC地址表老化参数
  count         Number of MAC addresses in the table  --MAC地址数
  dynamic       List dynamic MAC addresses               --列出动态MAC地址
  interface     List MAC adresses on a specific interface --列出特定接口上的MAC地址
  learning      Display learning on VLAN or interface   --在VLAN或接口上显示学习
  move          MAC Move information                          --MAC移动信息
  multicast     List multicast MAC addresses               --列出多播MAC地址
  notification  MAC notification parameters and history table  --MAC通知参数和历史表
  protocol      protocol keyword  
  secure        List secure MAC addresses                  --列出安全MAC地址
  static        List static MAC addresses                       --列出静态MAC地址
  vlan          List MAC addresses on a specific vlan   --列出特定vlan上的MAC地址
  |             Output modifiers                                        --输出修饰符
  <cr>

show mac address-table address <mac>  通过MAC地址追踪设备经过的端口

#show mac address-table address 0040.544d.873d
Unicast Entries
 vlan   mac address     type        protocols               port
-------+---------------+--------+---------------------+--------------------
 732    0040.544d.873d   dynamic ip,ipx,assigned,other GigabitEthernet6/48

show mac address-table | include <keyword> 通过输入的关键词进行模糊查询

keyword 关键字可以是MAC地址、MAC地址中的一部分,一般建议搜索末尾后四位,基本上是唯一的。

#show mac address-table | include 0040.544d.873d
 7    0040.544d.873d   dynamic ip,ipx,assigned,other GigabitEthernet6/48

#show mac address-table | include 873d
 7    0040.544d.873d   dynamic ip,ipx,assigned,other GigabitEthernet6/48

keyword 关键字也可以是端口号或端口号中的一部分

#show mac address-table | include GigabitEthernet6/48
 7    0040.544d.873d   dynamic ip,ipx,assigned,other GigabitEthernet6/48

#show mac address-table | include 6/48
 7    0040.544d.873d   dynamic ip,ipx,assigned,other GigabitEthernet6/48

show interfaces G6/48 显示交换机端口G6/48的端口配置信息

#show interfaces G6/48
GigabitEthernet6/48 is up, line protocol is up (connected)
  Hardware is Gigabit Ethernet Port, address is e05f.b90e.330d (bia e05f.b90e.330d)
  Description: "connect to vmswitch2950-SW"
  MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive set (10 sec)
  Full-duplex, 1000Mb/s, link type is auto, media type is 10/100/1000-TX
  input flow-control is off, output flow-control is off
  Auto-MDIX on (operational: on)
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:56, output never, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo

show mac address-table interface G6/48 显示交换机端口G6/48的MAC信息

#show mac address-table dynamic address 0040.544d.873d
Unicast Entries
 vlan   mac address     type        protocols               port
-------+---------------+--------+---------------------+--------------------
 7    0040.544d.873d   dynamic ip,ipx,assigned,other GigabitEthernet6/48

show mac address-table 显示所有类型的MAC地址

#show mac address-table
Unicast Entries
 vlan   mac address     type        protocols               port
-------+---------------+--------+---------------------+--------------------
   7    0040.544d.873d   dynamic ip,ipx,assigned,other GigabitEthernet6/48
……

show mac address-table dynamic 显示所有动态的MAC地址信息

#show mac address-table dynamic
Unicast Entries
 vlan   mac address     type        protocols               port
-------+---------------+--------+---------------------+--------------------
   7    0040.544d.873d   dynamic ip,ipx,assigned,other GigabitEthernet6/48
……

show mac address-table static 显示所有静态的MAC地址信息

#show mac address-table static  
Unicast Entries
 vlan   mac address     type        protocols               port
-------+---------------+--------+---------------------+--------------------
   7    0040.544d.873d    static ip,ipx,assigned,other GigabitEthernet6/48
……

以上就是针对常用的Cisco思科交换机show mac address-table命令使用详解,若您觉得文章对您有帮助,记得点赞收藏起来,说不定哪天就用上了。

  • 32
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值