进入red hat 6 在终端输入 setup
System Server
Tab 键 跳转到 OK键
空格键 选中/取消 项
确认返回 选择 Network
一切OK!
此时虚拟机的地址的DNS主机域的IP
若需要修改成 与本机同域的IP,则需以一下配置
/etc/sysconfig/network // 网络配置
/etc/rc.d/init.d/network restart //重启网络 配置
/etc/hosts // host 管理
/etc/sysconfig/network-script/ifcfg-eth0 //网卡0 的配置信息
ifconfig eth0 dwon / up // 关闭/启动 网卡
重启网络连接时可能会出现以下错误:
Bringing up interface eth0: Error: Connection activation failed: Device not managed by NetworkManager
重启服务,service NetworkManager restart ,service network restart.
1. Remove Network Manager from startup Services.
#chkconfig NetworkManager off
2. Add Default Net Manager
#chkconfig network on
3.Stop NetworkManager first
#service NetworkManager stop
4.and then start Default Manager
#service network start
运行完了命令,网络就可以了
发现我的redhat6.0不能上网后,我用service network restart 提示
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: Error: No suitable device found: no device found for connection ' System eth0'.
[FAILED]
用ifconfig eth0 up提示eth0: unknown interface: No such device
删除/etc/udev/rules.d/70-persistent-net.rules里的内容,重启一下,就会自动检测了生成相关网卡信息了