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鍦板潃銆