通过思科交换机端口查IP或ip查端口?组网见下面描述,由于端口与IP绑定,有些端口不知道IP地址无法上网
cisco\u4ea4\u6362\u673a\u6709\u6ca1\u6709\u547d\u4ee4\u53ef\u4ee5\u67e5\u4e00\u4e2a\u7aef\u53e3\u4e0b\u4e0b\u8fde\u4e86\u54ea\u4e2aIP\uff1fLZ\u5148\u8981\u641e\u6e05\u695a\uff0c\u7eaf\u7684\u4e8c\u5c42\u4ea4\u6362\u673a\u662f\u5de5\u4f5c\u5728\u6570\u636e\u94fe\u8def\u5c42\u7684\uff0c\u6570\u636e\u94fe\u8def\u5c42\u662f\u901a\u8fc7MAC\u8868\u6765\u5bfb\u5740\u7684\uff0c\u5728\u4e8c\u5c42\u4ea4\u6362\u673a\u4e0a\u7684\u7aef\u53e3\u662f\u6ca1\u6cd5\u914d\u7f6eIP\u5730\u5740\u7684
\u800cIP\u5730\u5740\u7684\u67e5\u8be2\uff0c\u662f\u4e09\u5c42\u8bbe\u5907\uff08\u5373\u7f51\u7edc\u5c42\u8bbe\u5907\uff0c\u5982\u8def\u7531\u5668\uff0c\u4e09\u5c42\u4ea4\u6362\u673a\u7b49\uff09\u624d\u80fd\u505a\u5230\u7684\uff0c\u5355\u7eaf\u7684\u4e8c\u5c42\u4ea4\u6362\u673a\u662f\u4e0d\u53ef\u80fd\u505a\u5230\u4e09\u5c42\u5bfb\u5740\u7684
\u6211\u60f3LZ\u4f30\u8ba1\u662f\u4e09\u5c42\u4ea4\u6362\u673a\uff0c\u56e0\u4e3a\u53ea\u6709\u4e09\u5c42\u4ea4\u6362\u673a\u624d\u80fd\u5177\u5907IP\u5bfb\u5740\u529f\u80fd\uff0c\u547d\u4ee4\u6709\u4ee5\u4e0b\uff1a
\u9996\u5148\uff0c\u8981\u5728\u63a5\u53e3\u4e0b\u5f00\u542fip routing
\u7136\u540e\uff0c\u8981\u4fdd\u8bc1\u8fd9\u4e2a\u63a5\u53e3\u5728\u7269\u7406\u4e0a\u662fUP\u7684
\u63a5\u4e0b\u6765\u8f93\u5165 \uff08do\uff09 show cdp nei \u63a5\u53e3\u540d
\u4ee5\u4e0a\u5c31\u80fd\u67e5\u5230\u5bf9\u7aefIP\u4e86
\u5148\u5728\u8fd9\u4e2aip\u5730\u5740\u7684\u7f51\u5173\u4ea4\u6362\u673a\uff08\u6bd4\u5982\u5730\u5740\u662f10.1.1.10\uff0c\u7f51\u5173\u662f10.1.1.1\uff0c\u5c31\u572810.1.1.1\u4e0a\u6240\u5728\u4ea4\u6362\u673a\u4e0a\u67e5\u770b\uff09\u4e0ashow arp\u67e5\u770bIP\u5730\u5740\u5bf9\u5e94\u7684mac\u5730\u5740\uff1b\u627e\u5230\u8fd9\u4e2a\u5730\u5740\u5bf9\u5e94\u7684mac\u5730\u5740\u540e\uff0c\u5728show mac-address-table\uff0c\u67e5\u770b\u8be5mac\u5730\u5740\u5bf9\u5e94\u7684\u63a5\u53e3\u3002
你再3560上面使用这个命令就可以看到相连的思科交换机的管理IP了:show cdp nei detail
或者sh cdp entry * (後面有一个星号)
这两个都是查看邻居的命令,加上detail ,就可以看到邻居的详细信息了。
可以了别忘记采纳我的!
通过console连接到2960上看配置,如果没有console线的话,看到你的3560上的路由还是配置的默认路由,这个不好办了哦,最好的还是弄一根console线,也不贵,console到2960上去
interface FastEthernet0/1
switchport access vlan 11
switchport mode access
看到这个就说明FA0/1是VLAN11,看2960插在哪个口上就能看出VLAN就能知道那个口的IP了
绛旓細杩涘叆浜ゆ崲鏈烘煡IP鐨勬柟娉曞涓嬶細1銆佽緭鍏nable锛岃繘鍏ヤ氦鎹㈡満鐨勭壒鏉冩ā寮忥紱2銆佹煡鐪婣RP缂撳瓨锛屽苟杈撳叆瑕佹煡鎵剧殑IP鍦板潃鐨勯儴鍒嗘垨鍏ㄩ儴鍐呭锛3銆佺户缁湪鐗规潈妯″紡涓嬭緭鍏"show mac address table include cdef",鍦ㄧ粨鏋滀腑鍙湅鍒板搴旂殑绔彛鍙蜂负Gi16锛4銆佽緭鍏モ渟how cdp neighbours gi16 detail鈥濆嵆鍙煡鐪婫i16鎵杩炴帴鐨勭浉閭昏澶...
绛旓細IP鏌ヤ氦鎹㈡満绔彛 杩涘叆涓讳氦鎹㈡満 1銆佽繘鍏ョ壒鏉冩ā寮忚緭鍏 show arp | inc 192.168.55.225锛堟垨鑰卻h arp 192.168.55.225 锛夊彲浠ョ湅鍒192.168.55.225 瀵瑰簲鐨刴ac鍦板潃0023.540d.47ed 2銆乻how mac add | inc xxxx.xxxx.xxxx锛0023.540d.47ed锛夊彲浠ョ湅鍒版牳蹇冧氦鎹㈡満鐨192.168.55.225 鐨刟rp鐨勪俊鎭槸浠庡摢...
绛旓細1銆佹煡鐪婱AC鍛戒护锛 show mac-address-table銆2銆佹煡鐪婭P鍦板潃鍛戒护锛氥show cdp銆ne de銆 (鏌ョ湅璺熻繖鍙颁氦鎹㈡満閾炬帴璁惧鐨勭粏鑷翠俊鎭)銆寰楀埌璇ヤ氦鎹㈡満鐨処P鍦板潃銆
绛旓細瓒呯骇缁堢鎴栬匱ELNET銆丼SH涓嬭緭鍏howarp灏辫兘鐪嬪埌璇浜ゆ崲鏈杩炴帴鐨勬墍鏈夎澶囩殑IP鍦板潃MAC鍦板潃
绛旓細浣犲ソ锛屼簩灞浜ゆ崲鏈涓彧鑳介氳繃show mac add | include 绔彛鍚嶏紙濡傦細show mac add | in Fa0/1 锛夎幏鍙栬鎺ュ彛鐨刴ac 闇瑕佸啀鍒颁腑蹇冧氦鎹㈡満涓妔how ip arp | include 锛圡AC鍦板潃锛夊氨鍙互浜 ps:濡傛灉鏄佺殑浜ゆ崲鏈猴紝濡俢atalyst 3548杩欑被锛宻how mac add 闇瑕佷慨鏀逛负show mac-add锛屼腑闂存槸- ...
绛旓細浣犲啀3560涓婇潰浣跨敤杩欎釜鍛戒护灏卞彲浠ョ湅鍒扮浉杩炵殑鎬濈浜ゆ崲鏈鐨勭鐞IP浜嗭細show cdp nei detail 鎴栬卻h cdp entry * 锛堝緦闈㈡湁涓涓槦鍙凤級杩欎袱涓兘鏄鏌ョ湅閭诲眳鐨勫懡浠わ紝鍔犱笂detail 锛屽氨鍙互鐪嬪埌閭诲眳鐨勮缁嗕俊鎭簡銆傚彲浠ヤ簡鍒繕璁伴噰绾虫垜鐨勶紒
绛旓細浜ゆ崲鏈鐨绔彛鏄笉浼氬搴擨P鍦板潃鐨勶紒浣犺鏌ョ湅閭d釜IP瀵瑰氨閭d釜绔彛锛岃鍏堟煡鍑篒P瀵瑰簲鐨凪AC鍦板潃锛岀劧鍚庡啀鐪婱AC鍦板潃瀵瑰氨浜ゆ崲鏈虹殑閭d釜绔彛锛鏌ョ湅IP瀵瑰簲鐨凪AC鍦板潃锛屽彲浠ョ敤ARP -a锛屼篃鍙互鐢╪etstat -a XXX.XXX.XXX.XXX鏌ョ湅MAC瀵瑰簲浜ゆ崲鏈虹殑绔彛锛屽彲浠ュ湪浜ゆ崲鏈轰笂鐢╯h mac-address-table ...
绛旓細涓夊眰浜ゆ崲鏈涓婄湅ip瀵瑰簲mac鐢ㄥ懡浠わ細sh ip arp
绛旓細绀轰緥锛氬亣璁炬垜浠湁涓鍙Cisco浜ゆ崲鏈锛屾垜浠彲浠ラ氳繃浠ヤ笅姝ラ鏌ョ湅鍏IP鍦板潃锛1. 浣跨敤鎺у埗鍙扮數缂嗗皢璁$畻鏈鸿繛鎺ュ埌浜ゆ崲鏈虹殑鎺у埗鍙绔彛銆2. 鎵撳紑缁堢浠跨湡杞欢锛堝PuTTY锛夛紝閰嶇疆鐩稿簲鐨勪覆鍙h繛鎺ュ弬鏁帮紙濡傛尝鐗圭巼銆佹暟鎹綅銆佸仠姝綅绛夛級銆3. 杩炴帴骞舵墦寮涓插彛锛屾偍灏嗙湅鍒颁氦鎹㈡満鐨勫惎鍔ㄤ俊鎭4. 鍦ㄦ彁绀虹涓嬭緭鍏ョ鐞嗗憳鐢ㄦ埛鍚嶅拰...
绛旓細show ip inter br 鏌ョ湅鍗曚釜鎺ュ彛鐗╃悊璇︾粏淇℃伅 show interface f0/0 鎴杇0/0 鏌ョ湅ip灞傝缁嗕俊鎭 show ip int f0/0 鎴 g0/0 鎴朣VI1鍙锋帴鍙 vlan1