centos6 5配置靜態ip

2021-07-11 23:16:26 字數 693 閱讀 1232

1.先檢視當前虛擬機器的閘道器,如下圖所示,destination全是0的,方框中是需要的閘道器

2.更改ifcfg-eth0檔案中的配置

[root@centos ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
更改後如下所示,最後3項是需要手動更改的,其中最後一項,就是步驟1中得到的閘道器

device=eth0

hwaddr=00:0c:29:2c:9b:xx

type=ethernet

uuid=abf81544-fda0-44e6-8771-6b21336de29a

onboot=yes

nm_controlled=yes

bootproto=static

ipaddr=192.168.202.100

gateway=192.168.202.2

3.重啟網路

[root@centos ~]# service network restart

centOS6 5 命令配置ip位址

首先登陸帳戶,用命令檢視一下ip配置 ifconfig 用vi命令編輯網路配置檔案了,命令 vi etc sysconfig network scripts ifcfg eht0 eth0,為網絡卡介面 以下解說一下網路配置檔案內容 device eth0 type etherne tuuid 58...

CentOS6 5下設定靜態IP

編輯網絡卡檔案 vi etc sysconfig network scripts ifcfg eth0 設定網絡卡eth0的ipv4資訊,需要注意的是,設定的ipaddr需要和區域網中其他機器處於同一網段。需設定容如下 device eth0 bootprot static ipaddr 192.1...

centos6 5 橋接模式下的靜態ip配置

一 涉及三個檔案的配置 1.etc sysconfig network 2.etc sysconfig network scripts ifcfg eth0 3.etc resolv.conf 二 具體配置過程 1.ipconfig檢視本機ip位址 即本機ip位址為 192.168.1.100 閘道...