
快速了解Ifconfig命令使用ifconfig快速了解Ifconfig命令使用1、什么是ifcongif2、安裝ifconfig工具3、ifconfig命令使用1、什么是ifcongififconfig是linux系統(tǒng)的網(wǎng)絡(luò)配置命令(interfaces config)通常是以root身份登入。依賴于ifconfig命令中一些選項(xiàng)屬性ifconfig工具不僅可以被用來簡單地獲取網(wǎng)絡(luò)接口配置信息還可以修改這些配置十分方便。2、安裝ifconfig工具當(dāng)我們直接輸入 ifconfig時(shí)發(fā)現(xiàn)command not found。沒有ifconfig這個(gè)命令工具。如果Linux系統(tǒng)無ifconfig這個(gè)命令時(shí)我們可以安裝net-tools這個(gè)安裝包因?yàn)閕fconfig命令在這個(gè)安裝包里面。安裝命令如下yum rearch ifconfig是查找ifconfig這個(gè)命令包yum install net-tools是安裝這個(gè)工具包當(dāng)出現(xiàn)complete說明安裝成功最后我們輸入一個(gè)ifconfig命令就會(huì)出現(xiàn)IP地址掩碼廣播域等。3、ifconfig命令使用1、ifconfig ens33 up啟動(dòng)網(wǎng)卡ens332、ifconfig ens33 down關(guān)閉網(wǎng)卡ens333、ifconfig ens33 add 3ffe:3240:800:1005::2/64為網(wǎng)卡ens33配置ipv6地址4、ifconfig ens33 del 3ffe:3240:800:1005::2/64為網(wǎng)卡ens33刪除ipv6地址5、ifconfig ens33 hw ether 00:AA:BB:CC:DD:EE修改網(wǎng)卡ens33的MAC地址6、ifconfig ens33 192.168.120.56 netmask 255.255.255.0 broadcast 192.168.120.255修改網(wǎng)卡的IP地址掩碼廣播地址7、ifconfig ens33 arp開啟網(wǎng)卡ens33的arp協(xié)議8、ifconfig ens33 -arp關(guān)閉網(wǎng)卡ens33的arp協(xié)議9、ifconfig ens33 mtu 1500設(shè)置網(wǎng)卡最大傳輸單元1500