您的位置:首页 > 理论基础 > 计算机网络

解决centos 网络无法连接问题

2014-12-22 20:44 627 查看
ifconfig 没有eth0或者service network restart 报错:device eth0 does not seem to be present

步骤1:

删除/etc/sysconfig/network-scripts/ifcfg-eth0

删除/etc/udev/rules.d/70-persistent-net.rules

重启

步骤2:

新建ifcfg-eth0

vi /etc/sysconfig/network-scripts/ifcfg-eth0

TYPE=Ethernet       #网卡类型

DEVICE=eth0         #网卡接口名称

ONBOOT=yes          #系统启动时是否自动加载

BOOTPROTO=static    #启用地址协议 --static:静态协议 --bootp协议 --dhcp协议

IPADDR=192.168.1.11      #网卡IP地址

NETMASK=255.255.255.0    #网卡网络地址

GATEWAY=192.168.1.1      #网卡网关地址

DNS1=8.8.8.8       #网卡DNS地址

HWADDR=00:0C:29:13:5D:74 #网卡设备MAC地址

步骤4:

ifconfig eth0 up

service network restart
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: