网络设置

网卡配置

配置网卡ifcfg-eth2

虚拟机配置eth2网卡,每次虚拟机重启不能自动获取ip,所以如下操作

1
2
3
4
5
6
7
8
9
/etc/sysconfig/network-scripts
cat ifcfg-eth22
DEVICE=eth2
HWADDR=08:00:27:d7:58:c8
TYPE=Ethernet
UUID=c89ca729-525a-40e4-93ec-ad073841c318
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp

linux 网卡配置详解 ifcfg-eth0

1
2
3
4
5
yum -y install NetworkManager
service NetworkManager status
service NetworkManager start
如果一直报NetworkManager 已死,但 pid 文件仍存,就直接reboot,
nmcli con

centos6 查看机器网卡uuid