獲取當前的ip位址以及閘道器
編輯ifcfg-eth0:vim/etc/sysconfig/network-scripts/ifcfg/eth0
新增:ipaddr=192.168.96.128
netmask=255.255.255.0
gateway=192.168.96.1
修改:修改前:boottproto=dhcp ----dhcp協議
修改後:bootproto=static ----static協議
重啟伺服器與關閉
service network stop #關閉網路服務
service network start #啟動網路服務
service network restart #重啟網路服務
Linux中ifcfg eth0配置引數說明
ifcfg eth0在 etc sysconfig network scripts下,其配置如下 device 物理裝置名 ipaddr ip位址 netmask 掩碼值 network 網路位址 broadcast 廣播位址 gateway 閘道器位址 onboot yes no 引導時是否啟用裝...
Linux中ifcfg eth0配置引數說明
ifcfg eth0在 etc sysconfig network scripts下,其配置如下 device 物理裝置名 ipaddr ip位址 netmask 掩碼值 network 網路位址 broadcast 廣播位址 gateway 閘道器位址 onboot yes no 引導時是否啟用裝...
Linux中ifcfg eth0配置引數解釋
linux中設定ip位址經常使用到ifcfg eth0這個檔案.vi etc sysconfig network scripts ifcfg eth0 附錄檔案中的內容 device eth0bootproto none ipv6init yesnm controlled yesonboot yes...