重啟網路服務
/etc/rc.d/init.d/network restart
ip位址、子網掩碼:
編輯 /etc/sysconfig/network-script/ifcfg-eth0
device=eth0
bootproto=static ---靜態還是動態
broadcast=192.168.1.255
ipaddr=192.168.1.35 ---ip位址
netmask=255.255.255.0 ---子網掩碼
network=192.168.1.0 ---網路id
onboot=yes
閘道器:
編輯 /etc/sysconfig/network
networking=yes
hostname=vmlinux ---主機名
gateway=192.168.1.2 ---閘道器
dns:
編輯 /etc/resolv.conf
nameserver 61.147.37.1
nameserver 61.177.7.1
linux 修改IP,閘道器,DNS
一 修改ip位址 1 修改對應網絡卡的ip位址的配置檔案 vi etc sysconfig network scripts ifcfg eth0 修改以下內容 device eth0 描述網絡卡對應的裝置別名,例如ifcfg eth0的檔案中它為eth0 bootproto static 設定網絡卡...
CentOS 修改IP位址, DNS, 閘道器
一 centos 修改ip位址 修改對應網絡卡的ip位址的配置檔案 vi etc sysconfig network scripts ifcfg eth0 修改以下內容 device eth0 描述網絡卡對應的裝置別名,例如ifcfg eth0的檔案中它為eth0 bootproto static ...
CentOS 修改IP位址, DNS, 閘道器
一 centos 修改ip位址 修改對應網絡卡的ip位址的配置檔案 vi etc sysconfig network scripts ifcfg eth0 修改以下內容 device eth0 描述網絡卡對應的裝置別名,例如ifcfg eth0的檔案中它為eth0 bootproto static ...