vmware虚拟机上不去网了,我从鸟哥那里学来以下招数:
1./etc/sysconfig/network(设定主机名与默认网关)
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=ly44770.localdomain
GATEWAY=192.168.1.1
2./etc/sysconfig/network-scripts/ifcfg-eth0(设定网卡参数)
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
ONBOOT=yes
HWADDR=00:0c:29:fa:77:dd
TYPE=Ethernet
NETMASK=255.255.255.0
IPADDR=192.168.1.173
GATEWAY=192.168.1.1
3./etc/resolv.conf(设定dns主机的ip)
; generated by /sbin/dhclient-script
search domain
nameserver 202.106.196.115
nameserver 192.168.1.1
nameserver 211.147.18.66
4.重启网络:
#/etc/rc.d/init.d/network restart
#ifdown eth0
#ifup eth0
一切就ok了。:-)
阅读(1888) | 评论(0) | 转发(0) |