C:\Windows\system32>路由打印

C:\Windows\system32>路由打印

子网A(192.168.137.0/24)有(192.168.137.1)和(192.168.137.2)台电脑

子网(192.168.7.0/24)有(192.168.7.1)和R(192.168.7.2)台电脑

我的 Windows 7 电脑是否通过接口 10 连接到互联网并连接到通过接口 25

(Linux)被设置为在A。其默认网关设置为

R(Linux)的默认网关设置为

我能够路由来自(Win7)到子网通过使用

route -p add 192.168.7.0 mask 255.255.255.0 192.168.137.2 metric 1 if 25

现在我可以 ping 了R(192.168.7.2)来自(我的 win7 电脑)但我无法 ping 通R!我可以从R!!

C:\Windows\system32>路由打印

Interface List
 11...00 1c 23 29 25 7e ......Broadcom NetXtreme 57xx Gigabit Controller
 10...00 1c bf 9d 91 38 ......Intel(R) PRO/Wireless 3945ABG Network Connect
 25...00 50 56 c0 00 01 ......VMware Virtual Ethernet Adapter for VMnet1
 26...00 50 56 c0 00 08 ......VMware Virtual Ethernet Adapter for VMnet8
  1...........................Software Loopback Interface 1
 21...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
 17...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
 23...00 00 00 00 00 00 00 e0 Microsoft 6to4 Adapter
 18...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
 22...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
 24...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #4
 20...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #5
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0    124.123.192.1   124.123.199.79     20
    124.123.192.0    255.255.192.0         On-link    124.123.199.79    276
   124.123.199.79  255.255.255.255         On-link    124.123.199.79    276
  124.123.255.255  255.255.255.255         On-link    124.123.199.79    276
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
      192.168.7.0    255.255.255.0    192.168.137.2    192.168.137.1     21
     192.168.18.0    255.255.255.0         On-link      192.168.18.1    276
     192.168.18.1  255.255.255.255         On-link      192.168.18.1    276
   192.168.18.255  255.255.255.255         On-link      192.168.18.1    276
    192.168.137.0    255.255.255.0         On-link     192.168.137.1    276
    192.168.137.1  255.255.255.255         On-link     192.168.137.1    276
  192.168.137.255  255.255.255.255         On-link     192.168.137.1    276
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
        224.0.0.0        240.0.0.0         On-link    124.123.199.79    276
        224.0.0.0        240.0.0.0         On-link     192.168.137.1    276
        224.0.0.0        240.0.0.0         On-link      192.168.18.1    276
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  255.255.255.255  255.255.255.255         On-link    124.123.199.79    276
  255.255.255.255  255.255.255.255         On-link     192.168.137.1    276
  255.255.255.255  255.255.255.255         On-link      192.168.18.1    276
===========================================================================
Persistent Routes:
  Network Address          Netmask  Gateway Address  Metric
      192.168.7.0    255.255.255.0    192.168.137.2       1
===========================================================================

IPv6 Route Table
===========================================================================
Active Routes:
 If Metric Network Destination      Gateway
 23   1275 ::/0                     2002:c058:6301::c058:6301
 23   1274 ::/0                     2002:c058:6301::1
  1    306 ::1/128                  On-link
 23   1025 2002::/16                On-link
 23    281 2002:7c7b:c74f::7c7b:c74f/128
                                    On-link
 11    276 fe80::/64                On-link
 25    276 fe80::/64                On-link
 26    276 fe80::/64                On-link
 11    276 fe80::7456:ab7f:70fa:3029/128
                                    On-link
 25    276 fe80::7c8a:b566:2a17:ccdb/128
                                    On-link
 26    276 fe80::e12e:9f18:a010:b07b/128
                                    On-link
  1    306 ff00::/8                 On-link
 11    276 ff00::/8                 On-link
 25    276 ff00::/8                 On-link
 26    276 ff00::/8                 On-link
===========================================================================
Persistent Routes:
  None

答案1

两个子网之间的路由应在 Q 上完成。您应该有一条从 NIC1 到 NIC2 的路由,以及一条从 NIC2 到 NIC1 的路由。这样您就不需要 P 上的路由了,所有计算机都能够互相 ping 通,并可以使用 P 作为网关访问互联网。

您没有告诉我们在 Q 上运行的 Linux 的版本。您可以通过 Google 找到适合您的 Linux 版本的静态路由信息。

相关内容