Linux ifconfig命令
生活随笔
收集整理的這篇文章主要介紹了
Linux ifconfig命令
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
一、簡介
ifconfig是Linux系統用來獲取并修改網絡接口配置信息的工具。
注意:用ifconfig命令配置的網卡信息,在網卡重啟后機器重啟后,配置就不存在。要想將上述的配置信息永遠的存的電腦里,那就要修改網卡的配置文件了。
?
二、應用實例:
實例1:顯示網絡設備信息(激活狀態的)
ifconfig實例2:啟動關閉指定網卡
ifconfig eth0 up #啟動網卡eth0? ifconfig eth0 down #關閉網卡eth0實例3:為網卡配置和刪除IPv6地址
ifconfig eth0 add 33ffe:3240:800:1005::2/64 #為網卡eth0配置IPv6地址ifconfig eth0 del 33ffe:3240:800:1005::2/64 #為網卡eth0刪除IPv6地址實例4:修改MAC地址
ifconfig eth0 hw ether 00:AA:BB:CC:DD:EE實例5:配置IP地址 ifconfig eth0 192.168.120.56 ifconfig eth0 192.168.120.56 netmask 255.255.255.0 ifconfig eth0 192.168.0.2/24 ifconfig eth0 192.168.120.56 netmask 255.255.255.0 broadcast 192.168.120.255實例6:啟用和關閉ARP協議
ifconfig eth0 arp #開啟網卡eth0 的arp協議; ifconfig eth0 -arp #關閉網卡eth0 的arp協議;實例7:設置最大傳輸單元
ifconfig eth0 mtu 1500實例8:開啟eth0網卡的混合模式
ifconfig eth0 promisc總結
以上是生活随笔為你收集整理的Linux ifconfig命令的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: MySQL 参数文件及参数
- 下一篇: 《TCP/IP详解卷1:协议》第3章 I