linux統計ip
① 鍦╨inux/unix緋葷粺涓嬫庝箞鏌ヨip鍦板潃錛
鍦↙inux/Unix緋葷粺涓嬫煡璇IP鍦板潃鐨勬柟娉曚富瑕佹湁浠ヤ笅鍑犵嶏細
涓銆佷嬌鐢ㄥ懡浠よ屽伐鍏鋒煡璇IP鍦板潃
1. 浣跨敤ifconfig鍛戒護
鍦ㄧ粓絝涓杈撳叆`ifconfig`錛屽洖杞﹀悗浣犲彲浠ョ湅鍒扮綉緇滄帴鍙g殑鐩稿叧淇℃伅錛屽寘鎷琁P鍦板潃銆
2. 浣跨敤ip鍛戒護
杈撳叆`ip addr`鎴朻ip address`錛屼篃鍙浠ユ煡鐪嬪埌IP鍦板潃銆
浜屻侀氳繃緗戠粶閰嶇疆鏂囦歡涓鏌ヨIP鍦板潃
1. 鏌ョ湅緗戠粶閰嶇疆鏂囦歡
鍦ㄤ竴浜汱inux鍙戣岀増涓錛岀綉緇滈厤緗淇℃伅浼氫繚瀛樺湪鏂囦歡涓錛屽俙/etc/network/interfaces`鎴朻/etc/sysconfig/network-scripts/`鐩褰曚笅鐨勭浉鍏蟲枃浠躲備綘鍙浠ヤ嬌鐢ㄦ枃鏈緙栬緫鍣ㄦ墦寮榪欎簺鏂囦歡鏌ョ湅IP鍦板潃銆
涓夈
鏌ヨ㈡柟娉曡В鏋錛
1. ifconfig鍛戒護錛氳繖鏄涓涓浼犵粺鐨勭綉緇滈厤緗鍛戒護錛岀敤浜庢樉紺哄拰閰嶇疆緗戠粶鎺ュ彛鐨勪俊鎮銆傚湪澶у氭暟Linux鍙戣岀増涓閮藉彲浠ヤ嬌鐢ㄣ傞氳繃璇ュ懡浠わ紝浣犲彲浠ョ湅鍒版瘡涓緗戠粶鎺ュ彛鐨処P鍦板潃銆
2. ip鍛戒護錛氳繖鏄涓涓鏇寸幇浠g殑緗戠粶閰嶇疆宸ュ叿錛岀敤浜庢樉紺哄拰鎿嶄綔璺鐢便佺綉緇滆懼囥佺瓥鐣ヨ礬鐢卞拰闅ч亾銆傚畠鍙浠ユ浛浠d紶緇熺殑ifconfig鍛戒護錛屽苟涓旀彁渚涗簡鏇村氱殑鍔熻兘鍜岄夐」銆傞氳繃`ip addr`鎴朻ip address`鍛戒護錛屼綘鍙浠ヨ交鏉懼湴鏌ョ湅IP鍦板潃銆
3. 鏌ョ湅緗戠粶閰嶇疆鏂囦歡錛氬湪涓浜汱inux鍙戣岀増涓錛岀綉緇滈厤緗淇℃伅琚淇濆瓨鍦ㄦ枃浠朵腑銆傝繖浜涙枃浠跺寘鍚浜嗙綉緇滄帴鍙g殑閰嶇疆淇℃伅錛屽寘鎷琁P鍦板潃銆佸瓙緗戞帺鐮併佺綉鍏崇瓑銆傞氳繃鐩存帴鏌ョ湅榪欎簺鏂囦歡錛屼綘鍙浠ユ壘鍒癐P鍦板潃淇℃伅銆備笉榪囷紝榪欑嶆柟娉曞彲鑳介渶瑕佷竴浜涘熀鏈鐨勬枃鏈澶勭悊鑳藉姏錛屽備嬌鐢ㄦ枃鏈緙栬緫鍣ㄨ繘琛屾悳緔㈠拰絳涢夈
浠ヤ笂灝辨槸鏌ヨLinux/Unix緋葷粺涓婭P鍦板潃鐨勬柟娉曘傛牴鎹瀹為檯鎯呭喌鍜屽彂琛岀増鐨勪笉鍚岋紝浣犲彲浠ラ夋嫨閫傚悎浣犵殑鏂規硶鏉ユ煡璇IP鍦板潃銆