所以有Oracle VM VirtualBox。它安装了 2 个虚拟机:
Win XP带有两个网络适配器:
Host-only Adapter. 姓名:vboxnet0Internal Network. 姓名:my lan
配置了以下win xpLAN 连接:
Host-only Adapter- 192.168.1.1/24
Internal Network- 192.168.2.1/24
Win Server 2003使用一个网络适配器:
Internal Network. 姓名:my lan
win server连接配置为Internal Network- 192.168.2.10/24 。默认网关:192.168.2.1
所有这些都在装有 Linux Mint 的物理机器上运行。
网络上的这台物理机vboxnet0有以下设置:
vboxnet0 Link encap:Ethernet HWaddr 0a:00:27:00:00:00
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::800:27ff:fe00:0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:489 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:69301 (69.3 KB)
任务是在具有Windows Xp. 在我的机器上,Win Xp我规定了以下路线:
route add 192.168.2.0 mask 255.255.255.0 192.168.2.1
route add 192.168.1.0 mask 255.255.255.0 192.168.1.1
在物理机上,我写了以下路由:
route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.0
route这是命令的结果在物理机器上的样子:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default dir-300 0.0.0.0 UG 100 0 0 enp2s0
link-local * 255.255.0.0 U 1000 0 0 enp2s0
172.17.0.0 * 255.255.0.0 U 0 0 0 docker0
172.18.0.0 * 255.255.0.0 U 0 0 0 br-2ca568140112
192.168.0.0 * 255.255.255.0 U 100 0 0 enp2s0
192.168.1.0 * 255.255.255.0 U 0 0 0 vboxnet0
192.168.2.0 192.168.1.1 255.255.255.0 UG 0 0 0 vboxnet0
问题是地址 192.168.2.1 和 192.168.1.1 是从物理机 ping 的,但地址 192.168.2.10 不是 :(

为了通过 XP 进行路由工作,您需要在其上启动路由和远程访问服务。在连接来自的界面上,您需要选中最后一个选项卡上的“允许共享”框。