我們剛開始安裝的centos系統時選擇的是以橋接模式,下面我們有兩種方式配置網路。
第一種:我們直接使用dhcp伺服器自動分配,輸入下面的命令即可。
1
[root@tpp ~]
# dhclient
第二種:我們配置固定的ip位址。
1
[root@tpp ~]
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
1
2
3
4
5
6
7
8
9
10
11
12
device=eth0
hwaddr=00:0c:29:13:36:a4
type=ethernet
uuid=38755d62-5eb4-433e-ad17-e9b79200f009
onboot=
yes
nm_controlled=
yes
bootproto=static
ipaddr=192.168.0.115
netmask=255.255.255.0
gateway=192.168.0.1
dns1=192.168.0.1
dns2=8.8.8.8
配置了網路後重新啟動網路服務
service network restart
centos 網路配置
一 centos 修改ip位址 修改對應網絡卡的ip位址的配置檔案 vi etc sysconfig network scripts ifcfg eth0 device eth0 hwaddr 44 33 4c 00 18 98 type ethernet uuid 5d40d966 3bf9 4b...
CentOS配置網路
1 配置ip vim etc sysconfig network scripts ifcfg eth0 檔案不存在就建立乙個,名字為 ifcfg 具體網絡卡的命名 可以用ifconfig命令檢視,左邊顯示的就是 device eth0 物理裝置名 ipaddr 192.168.1.100 ip位址 ...
centos網路配置
修改ip位址 1 使用setup命令 使用setup命令進入圖形介面,根據提示進入network configuration,edit device,根據提示進行ip設定 2 直接編輯檔案進行修改 vi etc sysconfig network scripts ifcfg eth0 此處的ifcf...