免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1655 | 回复: 0
打印 上一主题 下一主题

內網聯網。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-04-26 19:54 |只看该作者 |倒序浏览
大家好,
我在用虛擬機做組局域網實驗,有問題向大家請教。
主機系統是debian,虛擬機軟件用qemu,虛擬機操作系統是Win7。
虛擬機A帶網卡B和C,虛擬機D帶網卡E和F,
網卡B和網卡F用user模式(VMware的NAT模式),但F禁用了聯網,B聯網了。
網卡C和網卡E用socket模式的mcast模式。
A機能上網,D機不能上網,網卡C和E設置在同一網段,A機和D機可互相ping通,也可相互開遠程桌面。
希望D機通過A機上網。
A機"ipconfig /all"結果
  1. Windows IP Configuration

  2.    Host Name . . . . . . . . . . . . : bridge
  3.    Primary Dns Suffix  . . . . . . . :
  4.    Node Type . . . . . . . . . . . . : Hybrid
  5.    IP Routing Enabled. . . . . . . . : No
  6.    WINS Proxy Enabled. . . . . . . . : No

  7. Ethernet adapter Local Area Connection 2:

  8.    Connection-specific DNS Suffix  . :
  9.    Description . . . . . . . . . . . : Red Hat VirtIO Ethernet Adapter #2
  10.    Physical Address. . . . . . . . . : AA-12-F7-05-0C-FB
  11.    DHCP Enabled. . . . . . . . . . . : Yes
  12.    Autoconfiguration Enabled . . . . : Yes
  13.    Link-local IPv6 Address . . . . . : fe80::7040:f587:513b:7e4b%12(Preferred)
  14.    IPv4 Address. . . . . . . . . . . : 192.168.0.15(Preferred)
  15.    Subnet Mask . . . . . . . . . . . : 255.255.255.0
  16.    Lease Obtained. . . . . . . . . . : Sunday, April 26, 2015 10:22:52 AM
  17.    Lease Expires . . . . . . . . . . : Monday, April 27, 2015 10:22:52 AM
  18.    Default Gateway . . . . . . . . . : 192.168.0.2
  19.    DHCP Server . . . . . . . . . . . : 192.168.0.2
  20.    DHCPv6 IAID . . . . . . . . . . . : 296354420
  21.    DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1C-CD-F8-D1-42-02-8F-87-8D-85
  22.    DNS Servers . . . . . . . . . . . : 192.168.0.3
  23.    NetBIOS over Tcpip. . . . . . . . : Enabled

  24. Ethernet adapter Local Area Connection:

  25.    Connection-specific DNS Suffix  . :
  26.    Description . . . . . . . . . . . : Red Hat VirtIO Ethernet Adapter
  27.    Physical Address. . . . . . . . . : 12-12-FD-ED-F0-66
  28.    DHCP Enabled. . . . . . . . . . . : No
  29.    Autoconfiguration Enabled . . . . : Yes
  30.    Link-local IPv6 Address . . . . . : fe80::505:53ff:f3ed:1268%11(Preferred)
  31.    IPv4 Address. . . . . . . . . . . : 192.168.1.12(Preferred)
  32.    Subnet Mask . . . . . . . . . . . : 255.255.255.0
  33.    Default Gateway . . . . . . . . . :
  34.    DHCPv6 IAID . . . . . . . . . . . : 239207055
  35.    DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1C-CD-F8-D1-42-02-8F-87-8D-85
  36.    DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
  37.                                        fec0:0:0:ffff::2%1
  38.                                        fec0:0:0:ffff::3%1
  39.    NetBIOS over Tcpip. . . . . . . . : Enabled

  40. Tunnel adapter isatap.{8D159EBD-037B-418C-878C-AEEBEBBFF3F7}:

  41.    Media State . . . . . . . . . . . : Media disconnected
  42.    Connection-specific DNS Suffix  . :
  43.    Description . . . . . . . . . . . : Microsoft ISATAP Adapter
  44.    Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
  45.    DHCP Enabled. . . . . . . . . . . : No
  46.    Autoconfiguration Enabled . . . . : Yes

  47. Tunnel adapter isatap.{EA0B557E-18D4-4D8F-8507-E7B8E66BE5CC}:

  48.    Media State . . . . . . . . . . . : Media disconnected
  49.    Connection-specific DNS Suffix  . :
  50.    Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
  51.    Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
  52.    DHCP Enabled. . . . . . . . . . . : No
  53.    Autoconfiguration Enabled . . . . : Yes
复制代码
"Red Hat VirtIO Ethernet Adapter #2"是網卡B,"Red Hat VirtIO Ethernet Adapter"是網卡C。
A機"route print"結果
  1. ===========================================================================
  2. Interface List
  3. 12...aa 12 f7 05 0c fb ......Red Hat VirtIO Ethernet Adapter #2
  4. 11...12 12 fd ed f0 66 ......Red Hat VirtIO Ethernet Adapter
  5.   1...........................Software Loopback Interface 1
  6. 13...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
  7. 14...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
  8. ===========================================================================

  9. IPv4 Route Table
  10. ===========================================================================
  11. Active Routes:
  12. Network Destination        Netmask          Gateway       Interface  Metric
  13.           0.0.0.0          0.0.0.0      192.168.0.2     192.168.0.15      5
  14.         127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
  15.         127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  16.   127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  17.       192.168.0.0    255.255.255.0         On-link      192.168.0.15    261
  18.      192.168.0.15  255.255.255.255         On-link      192.168.0.15    261
  19.     192.168.0.255  255.255.255.255         On-link      192.168.0.15    261
  20.       192.168.1.0    255.255.255.0         On-link      192.168.1.12    261
  21.      192.168.1.12  255.255.255.255         On-link      192.168.1.12    261
  22.     192.168.1.255  255.255.255.255         On-link      192.168.1.12    261
  23.         224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
  24.         224.0.0.0        240.0.0.0         On-link      192.168.1.12    261
  25.         224.0.0.0        240.0.0.0         On-link      192.168.0.15    261
  26.   255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  27.   255.255.255.255  255.255.255.255         On-link      192.168.1.12    261
  28.   255.255.255.255  255.255.255.255         On-link      192.168.0.15    261
  29. ===========================================================================
  30. Persistent Routes:
  31.   None

  32. IPv6 Route Table
  33. ===========================================================================
  34. Active Routes:
  35. If Metric Network Destination      Gateway
  36.   1    306 ::1/128                  On-link
  37. 11    261 fe80::/64                On-link
  38. 12    261 fe80::/64                On-link
  39. 11    261 fe80::505:53ff:f3ed:1268/128
  40.                                     On-link
  41. 12    261 fe80::7040:f587:513b:7e4b/128
  42.                                     On-link
  43.   1    306 ff00::/8                 On-link
  44. 11    261 ff00::/8                 On-link
  45. 12    261 ff00::/8                 On-link
  46. ===========================================================================
  47. Persistent Routes:
  48.   None
复制代码
D機"ipconfig /all"結果
  1. Windows IP Configuration

  2.    Host Name . . . . . . . . . . . . : server
  3.    Primary Dns Suffix  . . . . . . . :
  4.    Node Type . . . . . . . . . . . . : Hybrid
  5.    IP Routing Enabled. . . . . . . . : No
  6.    WINS Proxy Enabled. . . . . . . . : No

  7. Ethernet adapter Local Area Connection 2:

  8.    Connection-specific DNS Suffix  . :
  9.    Description . . . . . . . . . . . : Red Hat VirtIO Ethernet Adapter #2
  10.    Physical Address. . . . . . . . . : AA-22-6D-13-10-AF
  11.    DHCP Enabled. . . . . . . . . . . : Yes
  12.    Autoconfiguration Enabled . . . . : Yes
  13.    Link-local IPv6 Address . . . . . : fe80::919d:88a4:e409:25cc%12(Preferred)
  14.    IPv4 Address. . . . . . . . . . . : 192.168.0.15(Preferred)
  15.    Subnet Mask . . . . . . . . . . . : 255.255.255.0
  16.    Lease Obtained. . . . . . . . . . : Sunday, April 26, 2015 10:22:37 AM
  17.    Lease Expires . . . . . . . . . . : Monday, April 27, 2015 10:22:37 AM
  18.    Default Gateway . . . . . . . . . :
  19.    DHCP Server . . . . . . . . . . . : 192.168.0.2
  20.    DHCPv6 IAID . . . . . . . . . . . : 296354420
  21.    DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1C-CD-F8-D1-42-02-8F-87-8D-85
  22.    DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
  23.                                        fec0:0:0:ffff::2%1
  24.                                        fec0:0:0:ffff::3%1
  25.    NetBIOS over Tcpip. . . . . . . . : Enabled

  26. Ethernet adapter Local Area Connection:

  27.    Connection-specific DNS Suffix  . :
  28.    Description . . . . . . . . . . . : Red Hat VirtIO Ethernet Adapter
  29.    Physical Address. . . . . . . . . : 12-22-67-44-59-51
  30.    DHCP Enabled. . . . . . . . . . . : No
  31.    Autoconfiguration Enabled . . . . : Yes
  32.    Link-local IPv6 Address . . . . . : fe80::f02a:f138:fbf3:b3e5%11(Preferred)
  33.    IPv4 Address. . . . . . . . . . . : 192.168.1.22(Preferred)
  34.    Subnet Mask . . . . . . . . . . . : 255.255.255.0
  35.    Default Gateway . . . . . . . . . :
  36.    DHCPv6 IAID . . . . . . . . . . . : 239207055
  37.    DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1C-CD-F8-D1-42-02-8F-87-8D-85
  38.    DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
  39.                                        fec0:0:0:ffff::2%1
  40.                                        fec0:0:0:ffff::3%1
  41.    NetBIOS over Tcpip. . . . . . . . : Enabled

  42. Tunnel adapter isatap.{8D159EBD-037B-418C-878C-AEEBEBBFF3F7}:

  43.    Media State . . . . . . . . . . . : Media disconnected
  44.    Connection-specific DNS Suffix  . :
  45.    Description . . . . . . . . . . . : Microsoft ISATAP Adapter
  46.    Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
  47.    DHCP Enabled. . . . . . . . . . . : No
  48.    Autoconfiguration Enabled . . . . : Yes

  49. Tunnel adapter isatap.{EA0B557E-18D4-4D8F-8507-E7B8E66BE5CC}:

  50.    Media State . . . . . . . . . . . : Media disconnected
  51.    Connection-specific DNS Suffix  . :
  52.    Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
  53.    Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
  54.    DHCP Enabled. . . . . . . . . . . : No
  55.    Autoconfiguration Enabled . . . . : Yes
复制代码
"Red Hat VirtIO Ethernet Adapter"是網卡E,"Red Hat VirtIO Ethernet Adapter #2"是網卡F。
D機"route print"結果
  1. ===========================================================================
  2. Interface List
  3. 12...aa 22 6d 13 10 af ......Red Hat VirtIO Ethernet Adapter #2
  4. 11...12 22 67 44 59 51 ......Red Hat VirtIO Ethernet Adapter
  5.   1...........................Software Loopback Interface 1
  6. 13...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
  7. 14...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
  8. ===========================================================================

  9. IPv4 Route Table
  10. ===========================================================================
  11. Active Routes:
  12. Network Destination        Netmask          Gateway       Interface  Metric
  13.         127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
  14.         127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  15.   127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  16.       192.168.0.0    255.255.255.0         On-link      192.168.0.15    261
  17.      192.168.0.15  255.255.255.255         On-link      192.168.0.15    261
  18.     192.168.0.255  255.255.255.255         On-link      192.168.0.15    261
  19.       192.168.1.0    255.255.255.0         On-link      192.168.1.22    261
  20.      192.168.1.22  255.255.255.255         On-link      192.168.1.22    261
  21.     192.168.1.255  255.255.255.255         On-link      192.168.1.22    261
  22.         224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
  23.         224.0.0.0        240.0.0.0         On-link      192.168.1.22    261
  24.         224.0.0.0        240.0.0.0         On-link      192.168.0.15    261
  25.   255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  26.   255.255.255.255  255.255.255.255         On-link      192.168.1.22    261
  27.   255.255.255.255  255.255.255.255         On-link      192.168.0.15    261
  28. ===========================================================================
  29. Persistent Routes:
  30.   None

  31. IPv6 Route Table
  32. ===========================================================================
  33. Active Routes:
  34. If Metric Network Destination      Gateway
  35.   1    306 ::1/128                  On-link
  36. 11    261 fe80::/64                On-link
  37. 12    261 fe80::/64                On-link
  38. 12    261 fe80::919d:88a4:e409:25cc/128
  39.                                     On-link
  40. 11    261 fe80::f02a:f138:fbf3:b3e5/128
  41.                                     On-link
  42.   1    306 ff00::/8                 On-link
  43. 11    261 ff00::/8                 On-link
  44. 12    261 ff00::/8                 On-link
  45. ===========================================================================
  46. Persistent Routes:
  47.   None
复制代码
請問要如何設置才能讓D機通過A機上網?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP