ifconfig 命令
顯示網(wǎng)絡(luò)所有接口 ifconfig -a
-bash-3.2$ ifconfig -a
en0: flags=1e080863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN>
inet 99.99.99.35 netmask 0xffffff00 broadcast 99.99.99.255
tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
en1: flags=1e080863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN>
inet 99.99.99.89 netmask 0xffffff00 broadcast 99.99.99.255
tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
lo0: flags=e08084b<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT>
inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
inet6 ::1/0
tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1
創(chuàng)新互聯(lián)是一家專注于成都做網(wǎng)站、成都網(wǎng)站設(shè)計與策劃設(shè)計,澠池網(wǎng)站建設(shè)哪家好?創(chuàng)新互聯(lián)做網(wǎng)站,專注于網(wǎng)站建設(shè)十多年,網(wǎng)設(shè)計領(lǐng)域的專業(yè)建站公司;建站業(yè)務(wù)涵蓋:澠池等地區(qū)。澠池做網(wǎng)站價格咨詢:028-86922220
只顯示網(wǎng)絡(luò)接口,不帶其它信息。ifconfig -l
-bash-3.2# ifconfig -l
en0 en1 lo0
關(guān)閉與啟動網(wǎng)絡(luò)接口 ifconfig en1 up/down
-bash-3.2# ifconfig en1 down
-bash-3.2# ifconfig en1 up
查看已啟動的網(wǎng)絡(luò)接口
-bash-3.2# ifconfig -au
en0: flags=1e080863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN>
inet 99.99.99.35 netmask 0xffffff00 broadcast 99.99.99.255
tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
lo0: flags=e08084b<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT>
inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
inet6 ::1/0
tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1
-bash-3.2# ifconfig -lu
en0 lo0
查看已關(guān)閉的網(wǎng)絡(luò)接口
-bash-3.2# ifconfig -ad
en1: flags=1e080862,480<BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN>
inet 99.99.99.89 netmask 0xffffff00 broadcast 99.99.99.255
tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
-bash-3.2# ifconfig -ld
en1
-bash-3.2# netstat -in #帶*號的顯示為關(guān)閉的網(wǎng)絡(luò)接口,此命令可以查看本機的IP地址
Name Mtu Network Address ZoneID Ipkts Ierrs Opkts Oerrs Coll
en0 1500 link#2 ee.cb.f0.2.30.2 - 477369 0 24513 0 0
en0 1500 99.99.99 99.99.99.35 - 477369 0 24513 0 0
en1* 1500 link#3 ee.cb.f0.2.30.3 - 2539 0 84 0 0
en1* 1500 99.99.99 99.99.99.89 - 2539 0 84 0 0
lo0 16896 link#1 - 93601 0 93608 0 0
lo0 16896 127 127.0.0.1 - 93601 0 93608 0 0
lo0 16896 ::1 0 93601 0 93608 0 0
可以使用ping命令測試網(wǎng)絡(luò)的連通性
ping -c 5 99.99.99.35
netstat 命令
顯示網(wǎng)絡(luò)接口的格式,是否有多錯誤的數(shù)據(jù)包。
-bash-3.2$ netstat -i
Name Mtu Network Address ZoneID Ipkts Ierrs Opkts Oerrs Coll
en0 1500 link#2 ee.cb.f0.2.30.2 - 478409 0 24611 0 0
en0 1500 99.99.99 peng2012 - 478409 0 24611 0 0
en1* 1500 link#3 ee.cb.f0.2.30.3 - 2539 0 84 0 0
en1* 1500 99.99.99 99.99.99.89 - 2539 0 84 0 0
lo0 16896 link#1 - 93767 0 93774 0 0
lo0 16896 127 loopback - 93767 0 93774 0 0
lo0 16896 ::1 0 93767 0 93774 0 0
顯示本機的路由表
-bash-3.2$ netstat -rn
Routing tables
Destination Gateway Flags Refs Use If Exp Groups
Route Tree for Protocol Family 2 (Internet):
99.99.99.0 99.99.99.35 UHSb 0 0 en0 - - =>
99.99.99.0 99.99.99.89 UHSb 0 0 en1 - - =>
99.99.99/24 99.99.99.35 U 1 20417 en0 - - =>
99.99.99/24 99.99.99.89 U 0 53 en1 - -
99.99.99.35 127.0.0.1 UGHS 1 509 lo0 - -
99.99.99.89 127.0.0.1 UGHS 0 17 lo0 - -
99.99.99.255 99.99.99.35 UHSb 0 4 en0 - - =>
99.99.99.255 99.99.99.89 UHSb 0 0 en1 - -
127/8 127.0.0.1 U 13 93148 lo0 - -
顯示本機所開啟服務(wù)netstat -a (顯示套接字,不顯示端口號)
netstat -a
Active Internet connections (including servers)
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp 0 0 *.* *.* CLOSED
tcp 0 0 *.* *.* CLOSED
tcp4 0 0 *.* *.* CLOSED
tcp4 0 0 *.daytime *.* LISTEN
tcp 0 0 *.ftp *.* LISTEN
tcp4 0 0 *.ssh *.* LISTEN
tcp 0 0 *.telnet *.* LISTEN
tcp4 0 0 *.smtp *.* LISTEN
tcp4 0 0 *.time *.* LISTEN
tcp4 0 0 *.sunrpc *.* LISTEN
tcp 0 0 *.smux *.* LISTEN
tcp 0 0 *.exec *.* LISTEN
tcp 0 0 *.login *.* LISTEN
tcp 0 0 *.shell *.* LISTEN
tcp 0 0 *.rmc *.* LISTEN
tcp4 0 0 *.writesrv *.* LISTEN
tcp 0 0 *.5335 *.* LISTEN
tcp 0 0 *.5336 *.* LISTEN
tcp 0 0 *.wbem-htt *.* LISTEN
tcp 0 0 *.wbem-htt *.* LISTEN
tcp 0 0 *.6988 *.* LISTEN
......
顯示本機所開啟服務(wù)(顯示端口號) netstat -an
netstat -an
Active Internet connections (including servers)
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp 0 0 *.* *.* CLOSED
tcp 0 0 *.* *.* CLOSED
tcp4 0 0 *.* *.* CLOSED
tcp4 0 0 *.13 *.* LISTEN
tcp 0 0 *.21 *.* LISTEN
tcp4 0 0 *.22 *.* LISTEN
tcp 0 0 *.23 *.* LISTEN
tcp4 0 0 *.25 *.* LISTEN
tcp4 0 0 *.37 *.* LISTEN
tcp4 0 0 *.111 *.* LISTEN
tcp 0 0 *.199 *.* LISTEN
tcp 0 0 *.512 *.* LISTEN
tcp 0 0 *.513 *.* LISTEN
tcp 0 0 *.514 *.* LISTEN
tcp 0 0 *.657 *.* LISTEN
tcp4 0 0 *.1334 *.* LISTEN
tcp 0 0 *.5335 *.* LISTEN
tcp 0 0 *.5336 *.* LISTEN
tcp 0 0 *.5988 *.* LISTEN
tcp 0 0 *.5989 *.* LISTEN
tcp 0 0 *.6988 *.* LISTEN
.....
顯示本機的端口號21是否開啟
netstat -an|grep 21.
設(shè)置主機IP地址 smit mktcpip (smit tcpip再進一步選擇)
Minimum Configuration & Startup
To Delete existing configuration data, please use Further Configuration menus
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[TOP] [Entry Fields]
* HOSTNAME [peng2012]
* Internet ADDRESS (dotted decimal) [99.99.99.35]
Network MASK (dotted decimal) [255.255.255.0]
* Network INTERFACE en0
NAMESERVER
Internet ADDRESS (dotted decimal) []
DOMAIN Name []
Default Gateway
Address (dotted decimal or symbolic name) []
Cost [] #
Do Active Dead Gateway Detection? no +
[MORE...2]
F1=Help F2=Refresh F3=Cancel F4=List
F5=Reset F6=Command F7=Edit F8=Image
F9=Shell F10=Exit Enter=Do
分享題目:aix網(wǎng)絡(luò)管理命令
分享URL:http://www.rwnh.cn/article12/jcjjgc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站制作、網(wǎng)站維護、商城網(wǎng)站、用戶體驗、域名注冊、品牌網(wǎng)站設(shè)計
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)