Linux設定靜態IP

2021-10-16 17:11:35 字數 485 閱讀 5293

第一步:

vi /etc/sysconfig/network-scripts/ifcfg-eth0

第二步:輸入i,根據下方提示進行修改

第三步:按esc,輸入:wq 回車

重啟連線

type=ethernet

nboot=yes

nm_controlled=no

bootproto=static

ipaddr=192.168.25.123

netmask=255.255.255.0

gateway=192.168.25.2

解決轉殖後eth0不見的問題

直接修改 /etc/sysconfig/network-script/ifcfg-eth0

刪掉uuid hwaddr

配置靜態位址

然後:rm -rf  /etc/udev/rules.d/70-persistent-net.rules

然後 reboot

linux設定靜態ip

安裝linux之後,一般都會設定nat聯網模式,此時沒有為centos分配ip位址為系統分配ip有兩種方法。type ethernet hwaddr 00 0c 29 3f 79 46 nm controlled yes bootproto static name ens33 uuid 37566c...

linux靜態ip設定

vim etc sysconfig network scripts ifcfg enp1s0修改為以下內容 type ethernet proxy method none browser only no name enp1s0 uuid 2f66bc1d 3916 46c9 aedd 30cc5dc...

Linux 設定靜態IP

ubuntu下修改靜態ip 開啟 etc network inte ces檔案,修改為以下內容 auto eth0 iface eth0 inet static address 172.30.1.network 255.255.0.0 gateway 172.30.1.1 新增dns位址,開啟 et...