zoukankan      html  css  js  c++  java
  • 如何知道某PC接入到交换机的哪个端口上

    Q:如何知道某PC接入到交换机的哪个端口上?

    S:按以下三个步骤进行:

    1)、在交换机上show mac-addr得到交换机port对应的MAC地址(一对多关系);

    2)、在客户端pc上用 ipconfig /all获取客户端pc网卡的MAC地址;

    3)、根据步骤2得到的mac地址搜索1mac表,找到端口号。

    我通常都是将步骤12的结果放到记事本里面,然后搜索,还算方便,下面是演示:

    --===--------------------[查看交换机的mac及端口信息]----------------------===---


    User Access Verification

    Password:
    cisco3560
    >en
    Password:
    cisco3560#show mac
    -addr
              Mac Address Table
    -------------------------------------------

    Vlan    Mac Address       Type        Ports
    ----    -----------       --------    -----
     All    
    0100.0ccc.cccc    STATIC      CPU
     All    
    0100.0ccc.cccd    STATIC      CPU
     All    
    0180.c200.0000    STATIC      CPU
     All    
    0180.c200.0001    STATIC      CPU
     All    
    0180.c200.0002    STATIC      CPU
     All    
    0180.c200.0003    STATIC      CPU
    ……    ……    ……    ……    ……
     All    
    0180.c200.000e    STATIC      CPU
     All    
    0180.c200.000f    STATIC      CPU
     All    
    0180.c200.0010    STATIC      CPU
     All    ffff.ffff.ffff    STATIC      CPU
      
    13    0016.41e0.1250    DYNAMIC     Fa0/32
      
    13    0019.d10b.252e    DYNAMIC     Fa0/32
       
    3    0007.e90b.2ef7    DYNAMIC     Fa0/38
       
    3    0007.e95a.4618    DYNAMIC     Fa0/38
    ……    ……    ……    ……    ……
       
    2    0050.bafa.78cd    DYNAMIC     Fa0/3
       
    1    0003.ffb4.da25    DYNAMIC     Fa0/20
       
    1    000c.29f6.265b    DYNAMIC     Fa0/20
       
    1    000d.b004.0217    DYNAMIC     Fa0/28
       
    1    000d.b004.02aa    DYNAMIC     Fa0/31
       
    1    0016.76d5.9736    DYNAMIC     Fa0/21
    ……    ……    ……    ……    ……
       
    1    0050.0900.637c    DYNAMIC     Fa0/22
       
    1    00e0.4db3.5c7f    DYNAMIC     Fa0/29
     
    100    000d.b004.0216    DYNAMIC     Fa0/12
    ……    ……    ……    ……    ……
     
    100    00e0.fc87.a77b    DYNAMIC     Fa0/9
    ……    ……    ……    ……    ……
    Total Mac Addresses 
    for this criterion: 198
    cisco3560#


    --===--------------------[显示客户端的MAC地址]----------------------===---

    C:\Documents and Settings\Administrator>ipconfig /all

    Windows IP Configuration

       Host Name . . . . . . . . . . . . : nod32server
       Primary Dns Suffix  . . . . . . . :
       Node Type . . . . . . . . . . . . : Unknown
       IP Routing Enabled. . . . . . . . : No
       WINS Proxy Enabled. . . . . . . . : No

    Ethernet adapter G1_3560Port5:

       Connection
    -specific DNS Suffix  . :
       Description . . . . . . . . . . . : Broadcom BCM5708C NetXtreme II GigE (NDIS
     VBD Client)
       Physical Address. . . . . . . . . : 
    00-1E-C9-B5-DA-25
       DHCP Enabled. . . . . . . . . . . : No
       IP Address. . . . . . . . . . . . : 
    192.168.0.120
       Subnet Mask . . . . . . . . . . . : 
    255.255.255.0
       IP Address. . . . . . . . . . . . : 
    192.168.0.122
       Subnet Mask . . . . . . . . . . . : 
    255.255.255.0
       Default Gateway . . . . . . . . . : 
    192.168.0.1
       DNS Servers . . . . . . . . . . . : 
    192.168.0.100
                                           
    202.102.134.68

    C:
    \Documents and Settings\Administrator>

    --===--------------------[查找客户端pc链接交换机的の端口号]----------------------===---

    MAC地址00-1E-C9-B5-DA-25转换为001E.C9B5.DA25,搜索可以发现在交换机cisco3560Fa0/20.

  • 相关阅读:
    STM32 Systick定时器
    STM32F10X_CL
    公司版STM32工作原理
    STM32外部中断实验
    STM32的串口通信
    STM32调试过程中常见的问题及解决方法
    【转】 STM32 入门教程 系统时钟 SysTick
    STM32学习5 FLASH编程
    STM32学习笔记之Systick
    STM32 USART 串口简单使用
  • 原文地址:https://www.cnblogs.com/flaaash/p/1452024.html
Copyright © 2011-2022 走看看