阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

Cisco交换机IP与MAC地址查找对应端口

132次阅读
没有评论

共计 1756 个字符,预计需要花费 5 分钟才能阅读完成。

交换机:Cisco 2960\Cisco 3560

1、查看 IP 对应交换机接口 MAC 地址

Switch_master#show arp | include 10.0.3.85       
Internet  10.0.3.85              0  94de.80ff.c61a  ARPA  Vlan30

2、通过 MAC 地址查看对应交换机端口

Switch_master#show mac address-table dynamic address 94de.80ff.c6aa
          Mac Address Table
——————————————-
Vlan    Mac Address      Type        Ports
—-    ———–      ——–    —–
  30    94de.80ff.c61a    DYNAMIC    Gi1/0/3
Total Mac Addresses for this criterion: 1

3、通过接口查看对应的设备

Switch_master#show cdp neighbors gigabitEthernet 1/0/3       
Capability Codes: R – Router, T – Trans Bridge, B – Source Route Bridge
                  S – Switch, H – Host, I – IGMP, r – Repeater, P – Phone,
                  D – Remote, C – CVTA, M – Two-port Mac Relay
Device ID        Local Intrfce    Holdtme    Capability  Platform  Port ID
switch_slave    Gig 1/0/3        140              S I  WS-C3750X Gig 1/0/1
Total cdp entries displayed : 1

# 对应接口为 Cisco 交换机,继续登陆交换机查询

switch_slave#show mac address-table dynamic address 94de.80ff.c6aa
          Mac Address Table
——————————————-
Vlan    Mac Address      Type        Ports
—-    ———–      ——–    —–
  30    94de.80ff.c61a    DYNAMIC    Gi1/0/11
Total Mac Addresses for this criterion: 1

# 先查看对应端口下活动的 MAC 地址,来判断接口下的活跃的设备

switch_slave#show mac address-table dynamic interface gigabitEthernet 1/0/11
          Mac Address Table
——————————————-
Vlan    Mac Address      Type        Ports
—-    ———–      ——–    —–
  30    94de.80ff.c61a    DYNAMIC    Gi1/0/11
Total Mac Addresses for this criterion: 1

4、通过交换机端口查看对应接口设备 IP

# 查看接口对接设备的 mac 地址

switch_slave#show mac address-table dynamic interface gigabitEthernet 1/0/11
          Mac Address Table
——————————————-
Vlan    Mac Address      Type        Ports
—-    ———–      ——–    —–
  30    94de.80ff.c61a    DYNAMIC    Gi1/0/11

# 通过 mac 地址查看你对应设备 IP

switch_slave#show arp | include 94de.80ff.c6aa
Internet  10.0.3.85              0  94de.80ff.c61a  ARPA  Vlan30

正文完
星哥说事-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-21发表,共计1756字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中