虚拟机网络配置(NAT模式)

选择NAT模式之后

输入命令:ifconfig

如果没有eth0则需要到/etc/sysconfig/network-scripts配置etho,如下:

DEVICE="eth0"

BOOTPROTO="dhcp"
HWADDR="00:0C:29:B6:3B:AF"
IPV6INIT="yes"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="d6c136d8-2706-402e-a9c6-29b209282bc8"

虚拟机下的网络配置

10-13

现有window 7 的主机,网络配置如下:rnPPP 适配器 宽带连接:rnrn 连接特定的 DNS 后缀 . . . . . . . :rn IPv4 地址 . . . . . . . . . . . . : 183.39.217.214rn 子网掩码 . . . . . . . . . . . . : 255.255.255.255rn 默认网关. . . . . . . . . . . . . : 0.0.0.0rnrn以太网适配器 本地连接:rnrn 连接特定的 DNS 后缀 . . . . . . . :rn IPv6 地址 . . . . . . . . . . . . : 2002:b727:d9d6:b:4840:e61d:7b5f:2e9crn 本地站点的 IPv6 地址. . . . . . . : fec0::b:4840:e61d:7b5f:2e9c%2rn 临时 IPv6 地址. . . . . . . . . . : 2002:b727:d9d6:b:455:d258:279:e919rn 本地链接 IPv6 地址. . . . . . . . : fe80::4840:e61d:7b5f:2e9c%11rn IPv4 地址 . . . . . . . . . . . . : 192.168.1.2rn 子网掩码 . . . . . . . . . . . . : 255.255.255.0rn 默认网关. . . . . . . . . . . . . : 192.168.1.1rnrn另有一台window机子通过这台电脑联网成功。rnrn问题:rnrn现此机子上装有VmWare虚拟机,系统opensuse,网络配置如下:rneth0 Link encap:Ethernet HWaddr 00:0C:29:71:FD:FF rn inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0rn inet6 addr: fe80::20c:29ff:fe71:fdff/64 Scope:Linkrn UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1rn RX packets:14293 errors:0 dropped:2 overruns:0 frame:0rn TX packets:8224 errors:0 dropped:0 overruns:0 carrier:0rn collisions:0 txqueuelen:1000 rn RX bytes:7570443 (7.2 Mb) TX bytes:1599785 (1.5 Mb)rnrnopensuse:~ # route -nrnKernel IP routing tablernDestination Gateway Genmask Flags Metric Ref Use Ifacern192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0rn169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0rn127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lorn0.0.0.0 192.168.1.2 0.0.0.0 UG 0 0 0 eth0rnopensuse:~ # nslookup 220.181.112.143rnServer: 192.168.1.2rnAddress: 192.168.1.2#53rnrn** server can't find 143.112.181.220.in-addr.arpa: REFUSEDrnrnopensuse:~ # ping 220.181.112.143rnPING 220.181.112.143 (220.181.112.143) 56(84) bytes of data.rn64 bytes from 220.181.112.143: icmp_req=2 ttl=52 time=52.2 msrn64 bytes from 220.181.112.143: icmp_req=3 ttl=52 time=51.7 msrn64 bytes from 220.181.112.143: icmp_req=4 ttl=52 time=52.0 msrn^Crn--- 220.181.112.143 ping statistics ---rn4 packets transmitted, 3 received, 25% packet loss, time 3003msrnrtt min/avg/max/mdev = 51.776/52.025/52.223/0.263 msrnopensuse:~ # rnrn21:55:26.254431 IP 192.168.1.100 > 220.181.111.148: ICMP echo request, id 7808, seq 1719, length 64rn21:55:26.306366 IP 220.181.111.148 > 192.168.1.100: ICMP echo reply, id 7808, seq 1719, length 64rn21:55:27.019220 IP 192.168.1.100.59887 > 192.168.1.2.53: 62749+ PTR? 143.112.181.220.in-addr.arpa. (46)rn21:55:27.019857 IP 192.168.1.2.57516 > 192.168.1.1.53: 43896+ PTR? 143.112.181.220.in-addr.arpa. (46)rn21:55:27.019858 IP 192.168.1.2.57516 > 192.168.1.1.53: 43896+ PTR? 143.112.181.220.in-addr.arpa. (46)rn21:55:27.021723 IP 192.168.1.1.53 > 192.168.1.2.57516: 43896 Refused 0/0/0 (46)rn21:55:27.021806 IP 192.168.1.2.53 > 192.168.1.100.59887: 62749 Refused 0/0/0 (46)rnrn为什么DNS没有用呢?rn请各问大虾指点一二...感激不尽!rnrn

没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试