linux下的網路設定命令ipconfig命令詳解

來源:互聯網
上載者:User

無論是Linux 自動安裝還是我們手工安裝,Linux 都會向你詢問有關網路的問題並配置相關的軟體。這個用於配置網卡的基本命令就是ifconfig。
在執行ifconfig 命令後,系統將在核心表中設定必要的參數,這樣Linux 就知道如何與網路上的網卡通
信。ifconfig 命令有以下兩種格式:

 

 

※ifconfig [interface]※ifconfig interface [aftype] option | address …

ifconfig 的第一種格式(或使用不帶任何參數的ifconfig 命令)可以用來查看當前系統的網路設定情況。
在剛剛安裝完系統之後,實際上是在沒有網卡或者網路連接的情況下使用Linux,但通過ifconfig 可以使用迴繞方式工作,使電腦認為自己工作在網路上。
現在我們運行一下ifconfig 命令,不帶參數的ifconfig 命令可以顯示當前啟動的網路介面,其輸出結果
為:

[root@machine1 /sbin]#ifconfigeth0 Link encap:Ethernet Hwaddr 52:54:AB:DD:6F:61inet addr:210.34.6.89 Bcast:210.34.6.127 Mask:255.255.255.128UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1RX packets:46299 errors:0 dropped:0 overruns:0 frame:189TX packets:3057 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:100Interrupt:5 Base address:0xece0lo Link encap:Local Loopbackinet addr:127.0.0.1 Mask:255.0.0.0UP LOOPBACK RUNNING MTU:3924 Metric:1RX packets:44 errors:0 dropped:0 overruns:0 frame:0TX packets:44 errors:0 dropped:0 overruns:0 carrier:

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.