思科交换机怎么查看IP地址对应的端口 如何查找主机的IP所对应到交换机的端口?
\u601d\u79d1\u4ea4\u6362\u673a\u600e\u4e48\u67e5\u770bIP\u5730\u5740\u5bf9\u5e94\u7684\u7aef\u53e3\uff1f\uff1f\u4ea4\u6362\u673a\u7684\u7aef\u53e3\u662f\u4e0d\u4f1a\u5bf9\u5e94IP\u5730\u5740\u7684\uff01\u4f60\u8981\u67e5\u770b\u90a3\u4e2aIP\u5bf9\u5c31\u90a3\u4e2a\u7aef\u53e3\uff0c\u8981\u5148\u67e5\u51faIP\u5bf9\u5e94\u7684MAC\u5730\u5740\uff0c\u7136\u540e\u518d\u770bMAC\u5730\u5740\u5bf9\u5c31\u4ea4\u6362\u673a\u7684\u90a3\u4e2a\u7aef\u53e3\uff01\u67e5\u770bIP\u5bf9\u5e94\u7684MAC\u5730\u5740\uff0c\u53ef\u4ee5\u7528ARP -a\uff0c\u4e5f\u53ef\u4ee5\u7528netstat -a XXX.XXX.XXX.XXX\u67e5\u770bMAC\u5bf9\u5e94\u4ea4\u6362\u673a\u7684\u7aef\u53e3\uff0c\u53ef\u4ee5\u5728\u4ea4\u6362\u673a\u4e0a\u7528sh mac-address-table
1\uff0c\u9996\u5148\u8fde\u63a5\u4ea4\u6362\u673a\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u8fdc\u7a0b\u767b\u5f55\u5230\u4ea4\u6362\u673a\u3002
2\uff0c\u627e\u5230\u672c\u673a\u7684MAC\u5730\u5740\uff0c\u8fd9\u4e2a\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u201cipconfig/all\u201d\u6765\u8fdb\u884c\u67e5\u8be2\u3002\u627e\u5230\u5f53\u524d\u7f51\u5361\u5730\u5740\u3002
3\uff0c\u4e4b\u540e\u6211\u4eec\u5728\u4ea4\u6362\u673a\u4e2d\u8f93\u5165\u547d\u4ee4\u201cdis mac-address 448A-5BE2-5800\u201d\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u67e5\u5230\u8fd9\u4e2amac\u5730\u5740\u6240\u5bf9\u5e94\u7684\u7aef\u53e3\u3002
4\uff0c\u53ef\u4ee5\u8f7b\u677e\u7684\u770b\u5230\u7ed3\u679c\u662f\u8be5\u7535\u8111\u6240\u5bf9\u5e94\u7684\u662f\u4ea4\u6362\u673a\u7684\u7b2c\u516b\u4e2a\u53e3\u3002
5\uff0c\u60f3\u8981\u627e\u5230\u63a5\u53e3\u5bf9\u5e94\u7684\u662f\u90a3\u53f0\u7535\u8111\uff0c\u6216\u8005\u662f\u90a3\u4e2aIP\u5730\u5740\u3002\u7528\u8fd9\u6761\u547d\u4ee4\u201cdis mac-address gig0/0/8\u201d\u6216\u8005\u201cdis ip interface gig 0/0/8\u201d\u3002
6\uff0c\u8fd9\u6837\u5c31\u80fd\u5f88\u8f7b\u677e\u7684\u627e\u5230\uff0c\u7aef\u53e3\u548c\u7535\u8111\u7684\u5bf9\u5e94\u60c5\u51b5\u3002
通过show arp 查看通信的 arp表项,然后通过show mac address-table 或者show mac-address-table 查看从哪个接口学到的,从而定位IP地址来源
绛旓細鐢变簬鎬濈ios鐗堟湰涓嶅悓锛屽懡浠ゅ彲鑳戒細鏈夌粏寰殑宸紓 鏌ョ湅mac鍦板潃鍙敤 show mac address-table 鎴栬卻how mac-address-table 鍛戒护 鍙氳繃show arp 鏌ョ湅ip鍦板潃涓巑ac鍦板潃鐨瀵瑰簲鍏崇郴 閫氳繃show ip interface brief 鏌ョ湅鎺ュ彛鐨処P鍦板潃锛堜笁灞傛帴鍙f垨vlan鎺ュ彛锛
绛旓細锛屽氨鍙互鏌ュ埌杩欎釜mac鍦板潃鎵瀵瑰簲鐨勭鍙c4銆佸彲浠ョ湅鍒扮粨鏋滄槸璇ョ數鑴戞墍瀵瑰簲鐨勬槸浜ゆ崲鏈鐨勭鍏釜鍙c5銆佸鏋滀綘鎯宠鎵惧埌鎺ュ彛瀵瑰簲鐨勬槸閭e彴鐢佃剳锛屾垨鑰呮槸閭d釜IP鍦板潃銆傜敤鈥渄is mac-address gig0/0/8鈥濇垨鑰呪渄is ip interface gig 0/0/8鈥濆懡浠ゃ6銆佽繖鏍峰氨鑳藉鏄撶殑鎵惧埌锛岀鍙e拰鐢佃剳鐨勫搴旀儏鍐点
绛旓細show run 锛屽彲浠鏌ョ湅鎵鏈夋帴鍙g殑鏁版嵁锛屼絾鏄浜ゆ崲鏈鎺ュ彛涓鑸病鏈鍦板潃锛屾渶澶氬彧鑳界湅鍒扮鐞嗗湴鍧
绛旓細瓒呯骇缁堢鎴栬匱ELNET銆丼SH涓嬭緭鍏 show arp 灏辫兘鐪嬪埌璇浜ゆ崲鏈杩炴帴鐨勬墍鏈夎澶鐨処P鍦板潃 MAC鍦板潃
绛旓細3銆佽繘鍏ョ郴缁熸ā寮忎笅锛岃緭鍏ヤ笅鍥剧殑鍛戒护鐩存帴鏁插洖杞 鍚庨潰闇瑕佹壘鐨刬p鍦板潃锛岃繖鏍峰氨浼氭樉绀 杩欎釜ip鍦ㄥ摢涓獀lan涓嬮潰 鎺ヤ笅鏉ュ彸閿夋嫨澶嶅埗鐪嬪埌鐨刴ac鍦板潃 銆傜劧鍚庢墦寮娴忚鍣ㄨ繘鍏浜ゆ崲鏈缃戦〉绠$悊鐣岄潰锛岄夋嫨宸︿笂瑙掔殑绔彛绠$悊 锛孧AC鍦板潃绠$悊銆4銆佸湪MAC鍦板潃绠$悊涓嬫悳绱 杈撳叆 鍦╟md鍛戒护涓嬫煡鍒扮殑ip鐨刴ac鍦板潃锛岀偣鍑绘悳绱 杩欐牱灏辨煡...
绛旓細浣犲啀3560涓婇潰浣跨敤杩欎釜鍛戒护灏卞彲浠ョ湅鍒扮浉杩炵殑鎬濈浜ゆ崲鏈鐨勭鐞IP浜嗭細show cdp nei detail 鎴栬卻h cdp entry * 锛堝緦闈㈡湁涓涓槦鍙凤級杩欎袱涓兘鏄鏌ョ湅閭诲眳鐨勫懡浠わ紝鍔犱笂detail 锛屽氨鍙互鐪嬪埌閭诲眳鐨勮缁淇℃伅浜嗐傚彲浠ヤ簡鍒繕璁伴噰绾虫垜鐨勶紒
绛旓細鍙互show arp鏌ョ湅ip鎵瀵瑰簲鐨刴ac鍦板潃 鐒跺悗show mac address-table鏌ョ湅浜ゆ崲鏄粠鍝釜绔彛涓婂涔犲埌鐨勮繖涓猰ac锛屽氨鑳界‘瀹氳繖涓猧p鏄繛鍒板摢涓鍙d笂鍘讳簡
绛旓細鍙互鍦浜ゆ崲鏈涓婃煡ARP琛紝鑳界湅鍑哄鍒扮殑MAC鍦板潃鍜IP鍦板潃鐨瀵瑰簲鍏崇郴锛歴how arp 鏉$洰澶鐨勮瘽锛屽彲浠ョ瓫閫変竴涓嬶細show arp | in MAC鍦板潃(鏍煎紡HHHH.HHHH.HHHH)
绛旓細杈撳叆鈥渄isplay interface brief鈥濆懡浠わ紝鏌ョ湅褰撳墠鎺ュ彛鐨勮缁嗕俊鎭紝鍖呮嫭IP鍦板潃鍜屼唬鐮併傝緭鍏モ渄isplay interface IP address鈥濆懡浠わ紝鏌ョ湅褰撳墠鎺ュ彛鐨処P鍦板潃銆傝緭鍏モ渄isplay interface interface brief鈥濆懡浠わ紝鏌ョ湅褰撳墠鎺ュ彛鐨勮缁嗕俊鎭紝鍖呮嫭IP鍦板潃鍜岀鍙e彿銆傝緭鍏モ渄isplay running-config鈥濆懡浠わ紝鏌ョ湅浜ゆ崲鏈褰撳墠鐨勯厤缃俊鎭...
绛旓細杩欎釜杈撳嚭淇℃伅鍛婅瘔鎴戜滑锛孷LAN 10鐨勬帴鍙f槸鈥淰lanif10鈥濓紝鍏禝P鍦板潃鏄192.168.10.1锛屽瓙缃戞帺鐮佹槸255.255.255.0銆傛澶栵紝璇ュ懡浠よ繕鎻愪緵浜嗗叾浠栨湁鍏砎LAN 10鐨勮缁嗕俊鎭紝渚嬪VLAN绫诲瀷鍜岃矾鐢辨帴鍙g瓑銆傛讳箣锛屼互涓婁袱绉嶆柟娉曢兘鍙互鐢ㄦ潵鏌ョ湅鍗庝负浜ゆ崲鏈VLAN绔彛涓瀵瑰簲鐨処P鍦板潃銆備娇鐢ㄢ渄isplay ip interface brief鈥濆懡浠ゅ彲浠...