備份:cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0-20160205back
把備份檔案移動到其他目錄:mv /etc/sysconfig/network-scripts/ifcfg-eth0-20160205back /opt/myback
把網絡卡中資訊改為下面對應內容:
device=eth0 (系統預設值)
type=ethernet (系統預設值)
uuid=a2c17f0c-a224-43d5-a203-48af1f0d9113 (系統預設值)
onboot=yes (系統預設值是 no,我改為 yes)
nm_controlled=yes (系統預設值)
bootproto=none (系統預設值是 dhcp,我改為 none,代表手動)
userctl=no (自己補充的)
ipv6init=no (自己補充的)
netmask=255.255.255.0 (自己補充的)
ipaddr=192.168.0.110 (自己補充的)
gateway=192.168.0.1 (自己補充的)
dns1=114.114.114.114 (自己補充的)
prefix=24 (使用圖形介面設定後生成的)
defroute=yes (使用圖形介面設定後生成的)
ipv4_failure_fatal=yes (使用圖形介面設定後生成的)
name="system eth0" (使用圖形介面設定後生成的)
hwaddr=00:0c:29:a9:37:d4 (使用圖形介面設定後生成的)
last_connect=1454626679 (使用圖形介面設定後生成的)
type=ethernet
proxy_method=none
browser_only=no
bootproto=static
ipaddr=192.168.0.127
netmask=255.255.255.0
gateway=192.168.0.1
dns1=8.8.8.8
dns1=114.114.114.114
defroute=yes
peerdns=yes
peerroutes=yes
ipv4_failure_fatal=no
ipv6init=yes
ipv6_autoconf=yes
ipv6_defroute=yes
ipv6_peerdns=yes
ipv6_peerroutes=yes
ipv6_failure_fatal=no
ipv6_addr_gen_mode=stable-privacy
name=ens33
uuid=b9f01b7d-4ebf-4d3a-a4ec-ae203425bb11
device=ens33
onboot=yes
centos網路設定
1.修改對應網絡卡的ip位址的配置檔案 vi etc sysconfig network scripts ifcfg eth0 device eth0 描述網絡卡對應的裝置別名,例如ifcfg eth0的檔案中它為eth0 bootproto static 設定網絡卡獲得ip位址的方式,可能的選項為...
centos網路設定
一 centos 修改ip位址 修改對應網絡卡的ip位址的配置檔案 gedit etc sysconfig network scripts ifcfg eth0 修改以下內容 1 device eth0 描述網絡卡對應的裝置別名,例如ifcfg eth0的檔案中它為eth0 2 ootproto s...
CentOS 網路設定
centos 網路設定有兩種方式配置網路可以連線外網 自動分配與手動設定ip 一,自動分配ip 新裝的centos6.0,用ifconfig只顯示ifcfg lo的資訊,可以用ifup eth0的命令啟動。檢視並修改 etc sysconfig network scripts ifcfg eth0,...