您好,欢迎来到思海网络,我们将竭诚为您提供优质的服务! 诚征网络推广 | 网站备案 | 帮助中心 | 软件下载 | 购买流程 | 付款方式 | 联系我们 [ 会员登录/注册 ]
促销推广
客服中心
业务咨询
有事点击这里…  531199185
有事点击这里…  61352289
点击这里给我发消息  81721488
有事点击这里…  376585780
有事点击这里…  872642803
有事点击这里…  459248018
有事点击这里…  61352288
有事点击这里…  380791050
技术支持
有事点击这里…  714236853
有事点击这里…  719304487
有事点击这里…  1208894568
有事点击这里…  61352289
在线客服
有事点击这里…  531199185
有事点击这里…  61352288
有事点击这里…  983054746
有事点击这里…  893984210
当前位置:首页 >> 技术文章 >> 文章浏览
技术文章

利用IP地址查交换机端口

添加时间:2010-11-14  添加: admin 
 在一个Cisco 交换网络中间,已知某台机器的IP地址,如何找出它连接到了哪台交换机的哪个端口上呢?最方便快捷的方法使使用CiscoWorks 2000 LMS网管软件的User tracking 功能,图形化界面,一目了然。
  如果没有这个软件,也可以使用以下手工分析方法来找出答案:
  示例网络:核心交换机为6509(交换引擎SE用CatOS, MSFC运行IOS软件)
  1. 找出该IP所对应的MAC地址:
  通过查看系统的ARP缓存表可以找出某IP所对应的MAC地址。由于ARP不能跨VLAN进行,所以连接各个VLAN的路由模块MSFC就是最佳的选择--一般它在每一个VLAN都有一个端口(interface vlan n),能正确地进行ARP解释。
  6509MSFC#ping 10.10.1.65
  Type escape sequence to abort.
  Sending 5, 100-byte ICMP Echos to 10.10.1.65, timeout is 2 seconds:
  !!!!!
  Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
  6509MSFC#show arp | in 10.10.1.65
  Internet 10.10.1.65 2 0006.2973.121d ARPA Vlan2
  通过以上命令,我们知道10.10.1.65的MAC地址是0006.2973.121d, 这是IOS设备的MAC地址表达方式,在CatOS中,应写为00-06-29-73-12-1d.
  2.在交换机上找出MAC地址所对应的端口
  6509SE> (enable) show cam 00-06-29-73-12-1d
  * = Static Entry. + = Permanent Entry. # = System Entry. R = Router Entry.
  X = Port Security Entry $ = Dot1x Security Entry
  VLAN Dest MAC/Route Des [CoS] Destination Ports or VCs / [Protocol Type]
  2 00-06-29-73-12-1d 9/41 [ALL]
  Total Matching CAM Entries Displayed =1
  这是不是说IP为 10.10.1.65的机器就接在端口9/41上呢?
  不一定。如果以下命令中显示该端口上只有一个活动的MAC地址,那么答案就是肯定的:
  6509SE> (enable) show cam dynamic 9/41
  * = Static Entry. + = Permanent Entry. # = System Entry. R = Router Entry.
  X = Port Security Entry $ = Dot1x Security Entry
  VLAN Dest MAC/Route Des [CoS] Destination Ports or VCs / [Protocol Type]
  2 00-06-29-73-12-1d 9/41 [ALL]
  Total Matching CAM Entries Displayed =1
  如果该命令显示该端口上有多个活动的MAC地址,那么这个端口应该连接到别的交换机或HUB设备上,见下面的例子(查找IP为10.10.1.250所对应的交换机端口):
  6509MSFC#ping 10.10.1.250
  Type escape sequence to abort.
  Sending 5, 100-byte ICMP Echos to 10.10.1.250, timeout is 2 seconds:
  !!!!!
  Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
  6509MSFC#show arp | in 10.10.1.250
  Internet 10.10.1.250 4 0009.6b8c.64ec ARPA Vlan2
  6509SE> (enable) show cam 00-09-6b-8c-64-ec
  * = Static Entry. + = Permanent Entry. # = System Entry. R = Router Entry.
  X = Port Security Entry $ = Dot1x Security Entry
  VLAN Dest MAC/Route Des [CoS] Destination Ports or VCs / [Protocol Type]
  ---- ------------------ ----- -------------------------------------------
  2 00-09-6b-8c-64-ec 3/11 [ALL]
  Total Matching CAM Entries Displayed =1
  6509SE> (enable) show cam dy 3/11
  * = Static Entry. + = Permanent Entry. # = System Entry. R = Router Entry.
  X = Port Security Entry $ = Dot1x Security Entry
  VLAN Dest MAC/Route Des [CoS] Destination Ports or VCs / [Protocol Type]
  1 00-03-e3-4b-06-80 3/11 [ALL]
  1 00-08-02-e6-b0-cd 3/11 [ALL]
  1 00-02-a5-ee-f2-4f 3/11 [ALL]
  1 00-09-6b-8c-66-d6 3/11 [ALL]
  1 00-09-6b-63-17-d9 3/11 [ALL]
  1 00-0b-cd-03-ec-f5 3/11 [ALL]
  1 00-09-6b-63-17-d8 3/11 [ALL]
  1 00-08-02-e6-b0-c1 3/11 [ALL]
  1 00-08-02-e6-b0-85 3/11 [ALL]
  1 00-08-02-e6-b0-81 3/11 [ALL]
  1 00-02-a5-ef-16-af 3/11 [ALL]
  1 00-02-a5-ee-f2-93 3/11 [ALL]
  1 00-02-55-c6-05-61 3/11 [ALL]
  2 00-09-6b-8c-64-ec 3/11 [ALL]
  1 00-08-02-e6-b0-ed 3/11 [ALL]
  1 00-08-02-e6-b0-a9 3/11 [ALL]
  1 00-02-55-54-7a-e0 3/11 [ALL]
  1 00-02-a5-ef-15-a6 3/11 [ALL]
  1 00-08-02-e6-af-8f 3/11 [ALL]
  1 00-08-02-e6-b0-bd 3/11 [ALL]
  1 00-0b
分享到:

顶部 】 【 关闭
版权所有:佛山思海电脑网络有限公司 ©1998-2024 All Rights Reserved.
联系电话:(0757)22630313、22633833
中华人民共和国增值电信业务经营许可证: 粤B1.B2-20030321 备案号:粤B2-20030321-1
网站公安备案编号:44060602000007 交互式栏目专项备案编号:200303DD003  
察察 工商 网安 举报有奖  警警  手机打开网站