- 论坛徽章:
- 0
|
原文地址:http://www.zzt123.com/html/2012/0808/1344418333.html
第一步: 打开VMWare,依次选择“编辑” - “虚拟网络设置” - “NAT”,在“NAT”选项卡中查看网关地址(如图1)。
图1
第二步:修改Debian的IP地址和网关
vi /etc/network/interfaces
将文件修改为如下内容:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 192.168.138.3
netmask 255.255.255.0
gateway 192.168.138.2
# dns-* options are implemented by the resolvconf package, if installed
第三步:重启网络
/etc/init.d/networking restart
第四步:如果重启网络后仍无法上网,可重启Debian后再试。
|
|