windows下的vmware安装linux上网问题-已测试通过
2009-11-06 15:38
666 查看
一.真实主机配置与设置
前提条件:公司是通过IP、MAC地址映射的方式来访问网络的。
网关:192.168.10.1
以下两组IP,MAC可以访问外网
1.
IP:192.168.10.232
MAC: 00-0B-2F-1A-51-95
2.
IP:192.168.10.175
MAC:00-28-27-AB-56-28
配置:
Windows XP ,一张网卡
网卡设置:
C:/Documents and Settings/Administrator> ipconfig -all
Ethernet adapter 本地连接:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek RTL8169/8110 Family Gigabit
Ethernet NIC
Physical Address. . . . . . . . . : 00-0B-2F-1A-51-95
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.10.232
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.10.1
DNS Servers . . . . . . . . . . . : 202.96.128.166
202.96.134.133
此时windows可以访问外网。
二、vmware的配置和设置
配置:
安装了redhat9操作系统
设置:
Vmware菜单 VMàSettingsàHardwareàEthernet在右边的Network conection选择
Bridged:Connected directly to the physical network
Vmware的其他设置最好不要修改。
修改linux的配置文件:
1.
/etc/sysconfig/network :
NETWORKING=yes
HOSTNAME=localhost.localdomain
2.
/etc/sysconfig/network-scripts/ifcfg-eth0 :
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
BROADCAST=192.168.10.255
IPADDR=192.168.10.175
GATEWAY=192.168.10.1
NETMASK=255.255.255.0
#NETWORK=192.168.10.1
#MACADDR=00:0B:2F:1A:51:95
MACADDR=00:28:27:ab:56:28
3.
/etc/resolv.conf :
nameserver 202.96.128.166
nameserver 202.96.134.133
上面文件配置好后重启linux。
这时候执行命令:
#route
如果没有default网关,那么用以下命令添加:
#route add default gw x.x.x.x
#ping 192.168.10.1
三、测试一下
[root@localhost root]# ping 192.168.10.1
PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data.
64 bytes from 192.168.10.1: icmp_seq=1 ttl=64 time=9.28 ms
64 bytes from 192.168.10.1: icmp_seq=2 ttl=64 time=1.40 ms
64 bytes from 192.168.10.1: icmp_seq=3 ttl=64 time=1.74 ms
64 bytes from 192.168.10.1: icmp_seq=4 ttl=64 time=0.980 ms
64 bytes from 192.168.10.1: icmp_seq=5 ttl=64 time=1.42 ms
--- 192.168.10.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4041ms
rtt min/avg/max/mdev = 0.980/2.967/9.284/3.168 ms
[root@localhost root]# ping 124.42.50.10
PING 124.42.50.10 (124.42.50.10) 56(84) bytes of data.
64 bytes from 124.42.50.10: icmp_seq=1 ttl=49 time=173 ms
64 bytes from 124.42.50.10: icmp_seq=2 ttl=49 time=304 ms
64 bytes from 124.42.50.10: icmp_seq=3 ttl=49 time=380 ms
如果ping不通这先执行
#ifconfig eth0 x.x.x.x up
然后再ping
前提条件:公司是通过IP、MAC地址映射的方式来访问网络的。
网关:192.168.10.1
以下两组IP,MAC可以访问外网
1.
IP:192.168.10.232
MAC: 00-0B-2F-1A-51-95
2.
IP:192.168.10.175
MAC:00-28-27-AB-56-28
配置:
Windows XP ,一张网卡
网卡设置:
C:/Documents and Settings/Administrator> ipconfig -all
Ethernet adapter 本地连接:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek RTL8169/8110 Family Gigabit
Ethernet NIC
Physical Address. . . . . . . . . : 00-0B-2F-1A-51-95
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.10.232
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.10.1
DNS Servers . . . . . . . . . . . : 202.96.128.166
202.96.134.133
此时windows可以访问外网。
二、vmware的配置和设置
配置:
安装了redhat9操作系统
设置:
Vmware菜单 VMàSettingsàHardwareàEthernet在右边的Network conection选择
Bridged:Connected directly to the physical network
Vmware的其他设置最好不要修改。
修改linux的配置文件:
1.
/etc/sysconfig/network :
NETWORKING=yes
HOSTNAME=localhost.localdomain
2.
/etc/sysconfig/network-scripts/ifcfg-eth0 :
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
BROADCAST=192.168.10.255
IPADDR=192.168.10.175
GATEWAY=192.168.10.1
NETMASK=255.255.255.0
#NETWORK=192.168.10.1
#MACADDR=00:0B:2F:1A:51:95
MACADDR=00:28:27:ab:56:28
3.
/etc/resolv.conf :
nameserver 202.96.128.166
nameserver 202.96.134.133
上面文件配置好后重启linux。
这时候执行命令:
#route
如果没有default网关,那么用以下命令添加:
#route add default gw x.x.x.x
#ping 192.168.10.1
三、测试一下
[root@localhost root]# ping 192.168.10.1
PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data.
64 bytes from 192.168.10.1: icmp_seq=1 ttl=64 time=9.28 ms
64 bytes from 192.168.10.1: icmp_seq=2 ttl=64 time=1.40 ms
64 bytes from 192.168.10.1: icmp_seq=3 ttl=64 time=1.74 ms
64 bytes from 192.168.10.1: icmp_seq=4 ttl=64 time=0.980 ms
64 bytes from 192.168.10.1: icmp_seq=5 ttl=64 time=1.42 ms
--- 192.168.10.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4041ms
rtt min/avg/max/mdev = 0.980/2.967/9.284/3.168 ms
[root@localhost root]# ping 124.42.50.10
PING 124.42.50.10 (124.42.50.10) 56(84) bytes of data.
64 bytes from 124.42.50.10: icmp_seq=1 ttl=49 time=173 ms
64 bytes from 124.42.50.10: icmp_seq=2 ttl=49 time=304 ms
64 bytes from 124.42.50.10: icmp_seq=3 ttl=49 time=380 ms
如果ping不通这先执行
#ifconfig eth0 x.x.x.x up
然后再ping
相关文章推荐
- Windows系统下通过VMware安装Linux系统之网络配置
- Windows下通过VMware虚拟机安装Ubuntu(Linux)及常见问题解决
- Windows主机里利用VMware安装Linux(CentOS)虚拟机,Host-only连接上网方式详解
- 苹果笔记本的Windows系统下的VMWARE安装Linux系统问题
- 【linux】Vmware中安装ubuntu无法通过NAT上网
- windows下用虚拟机VMwareRedHatlinux9.0通过nat上网
- Linux:宿主机通过桥接方式连接的VMware内部Linux14.04虚拟机(静态IP)实现上网方案
- 在Linux上安装redis时,windows连接VMware 10.0上服务器,需要改网络适配器, putty连接Linux
- vmware下安装linux系统上网
- Linux下通过Windows的ISA代理认证上网
- redis-windows环境安装与测试+linux环境安装以及一些操作
- VMware安装centos虚拟机 通过NAT与主机互通并能上网
- Windows与VMware下Linux的文件共享问题以及解决办法
- 实现Windows与VMware下Linux的文件共享 VMware Tools 安装
- 刚安装完Linux不能上网问题!
- vmware安装linux 成功后网络无连接的问题解决方案
- 如何处理安装linux后进不了windows的问题
- mini2440 安装linux后上网设置问题
- VMWare开启DHCP和NAT服务(VMWare无法通过NAT上网以及和host主机通信的问题解决)