时间:2021-07-01 10:21:17 帮助过:44人阅读
新装了centos6.2, 不能上网, 使用命令ifconfig后发现只有lo没有eth0, 上网搜了无数资料尝试了无数方法之后终于可以了, 只记得大致是在这些步骤以后就可以了....... 下载驱动http://download.csdn.net/download/chenjiebin/4090935 然后解压 tar -zxvf AR81Fa
新装了centos6.2, 不能上网, 使用命令ifconfig后发现只有lo没有eth0, 上网搜了无数资料尝试了无数方法之后终于可以了, 只记得大致是在这些步骤以后就可以了.......
下载驱动http://download.csdn.net/download/chenjiebin/4090935
然后解压
tar -zxvf AR81Family-linux-v1.0.1.14.tar.gz
make
安装
make install
加载模块
insmod /lib/modules/2.6.32-220.el6.x86_64/kernel/drivers/net/atl1e/atl1e.ko
lsmod | grep atl1e
修改4个文件
a),/etc/sysconfig/network-scripts/ifcfg-eth0
[zhangy@localhost network-scripts]$ cat ifcfg-eth0
# Marvell Technology Group Ltd. 88E8039 PCI-E Fast Ethernet Controller
DEVICE=eth0 //由eth0来启动
BOOTPROTO=dhcp //获取IP的方式是自动获取,static是固定IP,none是手动
HWADDR=00:16:D3:A2:F6:09 //网卡的物理地址
IPV6INIT=yes //是否支持IP6
IPV6_AUTOCONF=yes //IP6是否自动配置
ONBOOT=yes //启动时网络接口是否有效
b),/etc/sysconfig/network
[zhangy@localhost network-scripts]$ cat /etc/sysconfig/network
NETWORKING=yes //网络是否可用
NETWORKING_IPV6=yes
HOSTNAME=localhost.localdomain//主机名,主机名在/etc/hosts里面配置
c),/etc/hosts
[zhangy@localhost network-scripts]$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost //根/etc/resolv.conf中search要对应,localhost.localdomain
::1 localhost6.localdomain6 localhost6
d),/etc/resolv.conf
[zhangy@localhost network-scripts]$ cat /etc/resolv.conf
; generated by /sbin/dhclient-script
nameserver 192.168.1.1 //DNS服务器对应的IP
search localdomain//搜索要找的域名,在/etc/hosts里面设定的有
启动网卡
ifconfig eth0 up
service network restart
参考:
http://hi.baidu.com/myl231/blog/item/063c473454605a86a9018e09.html
http://www.jyshx.com/2409.html
http://dreamx.me/archives/472
http://elrepo.org/tiki/DeviceIDs
http://elrepo.org/tiki/FAQ