Vmware 设置访客静态 IP 地址,主机通过 3G 调制解调器连接到专用网络 [英] Vmware set guest static ip address with host connected to private network by 3G modem

查看:70
本文介绍了Vmware 设置访客静态 IP 地址,主机通过 3G 调制解调器连接到专用网络的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 vmware 上有 Windows 7 主机和来宾 debian 7.我通过 3G 调制解调器连接到互联网,这是主机的 ip 配置

I have windows 7 host and guest debian 7 on vmware. I am connected to internet by 3G modem and this is the ip config of host

PPP adapter [provider name]:
   Connection-specific DNS Suffix  . :
   IPv4 Address. . . . . . . . . . . : 10.47.235.94
   Subnet Mask . . . . . . . . . . . : 255.255.255.255
   Default Gateway . . . . . . . . . : 0.0.0.0

我想要实现的是

1) set static ip for guest
2) connect from host to guest by ftp and remote mysql
3) access internet in guest

过去我有有线互联网连接,主机的 ipconfig 是这样的

In the past I had cable internet connection and the ipconfig of host was this

IPv4 Address. . . . . . . . . . . : 192.168.0.100
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1

那一次我只是将 vmware 中的网络类型更改为桥接并有了这个

that time I just changed the network type in vmware as bridged and had this

nameserver 192.168.0.1

etc/resolv.conf 以及 etc/network/interfaces 中的这些行,一切都很好.

in etc/resolv.conf and also these lines in etc/network/interfaces and all things were just fine.

iface eth0 inet static
address 192.168.0.107
netmask 255.255.255.0
network 192.168.1.0
gateway 192.168.0.1

<小时>

我尝试过类似的事情


I tried to do a similar thing

address 10.47.235.95  # just putting some ip other than the host's ip
netmask 255.255.255.255 # same as for host
network 192.168.1.0     # did not know what to put, so just left the same
gateway 0.0.0.0 # host's gateway

但不起作用,我既无法连接到访客,也无法在访客中上网.

but does not work, neither I can connect to guest, nor I have internet in guest.

谢谢

推荐答案

您是说您的子网掩码是 255.255.255.255.使用此子网掩码,您甚至无法向您的网络添加一个访客(理论上,如果 S.N 掩码为 255.255.255.255,则没有网络).它应该至少是 255.255.255.252.当您将 IP 10.47.235.95 提供给您的访客时,它不会连接到您的网络,因为该 IP 属于另一个网络.如果您选择桥接网络类型,您的访客将直接与您的网卡连接,并将尝试使用 IP.但是由于您的 S.N 掩码是 255.255.255.255,因此您的访客没有可用的 IP.尝试使用 NAT 模式而不是桥接模式.如果这不起作用,则必须更改调制解调器 S.N 掩码.当您使用 S.N 掩码 255.255.255.0 时就可以了,因为该网络允许 253 位客人与调制解调器连接.

You are saying that your subnet mask is 255.255.255.255. With this subnet mask you can't add even a single guest to your network (theoretically if S.N mask is 255.255.255.255, there is no network). It should be at least 255.255.255.252. When you give the IP 10.47.235.95 to your guest, it won't be connected with your network because this IP belongs to another network. If you select Bridged network type, your guest is directly connected with your network card and will try to use an IP. But since your S.N mask is 255.255.255.255 there is no IP available for your guest. Try to use NAT mode instead of bridged one. If this don't work than you have to change your modem S.N mask. When you had the S.N mask 255.255.255.0 it was OK because this network allows 253 guests to be connected with the modem.

这篇关于Vmware 设置访客静态 IP 地址,主机通过 3G 调制解调器连接到专用网络的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆