以下设置在host:winpro sp2 guest:rh9 环境下通过。首先在setting中,将虚拟机的网卡设置成host-only。 GpKLinux联盟 (1)查看你的连接外网的网卡的属性,选择“高级”标签,设置成允许共享,并设定允许的网络接口为VMNET1。 GpKLinux联盟 (2)再插看一下你的VMnet1 的属性,看一下TCP/IP协议的设置,你发现已经被自动设置为192.168.0.1/255.255.255.0。 GpKLinux联盟 (3)windows下的设置完成,转入到跑linux的虚拟机。将你的eth0的ip地址设置为静态的(如果安装时没有选静态的话) GpKLinux联盟 按红帽子图标->系统设置->网络(或其它你了解的方法) GpKLinux联盟 ip: 192.168.0.2(或其它在此网段上的地址) GpKLinux联盟 netmask: 255.255.255.0 GpKLinux联盟 default gateway: 192.168.0.1 GpKLinux联盟 dns:输入你自己的DNS GpKLinux联盟 保存设置。如果你还没有设置好主机名称: GpKLinux联盟 cd /etc/sysconfig GpKLinux联盟 vi network GpKLinux联盟 编辑HOSTNAME GpKLinux联盟 cd /etc GpKLinux联盟 vi hosts GpKLinux联盟 加入: GpKLinux联盟 192.168.0.2 yourhostname GpKLinux联盟 重新启动服务 GpKLinux联盟 su GpKLinux联盟 /sbin/service network restart GpKLinux联盟 (4)测试一下 GpKLinux联盟 网关: ping 192.168.0.1 GpKLinux联盟 dns: ping dnsserver GpKLinux联盟
|