1

Configuration

In our system, the Windows PC has two NICs, one for WAN and one for LAN (no gateway). For the LAN side, a Linux PC is connected through two switches. Also, switch2 is powered on/off with the Linux PC.

    10.8.12.13/255.255.255.0 (WAN)
        PC1 (Windows)
    192.168.0.21/255.255.255.0 (LAN)
            |
        Switch 1
            |
            | (below switch and linux pc are powered on/off together)
            |
        Switch 2
            |
    192.168.0.100/255.255.255.0 (LAN)
        PC2 (Linux)

Problem

PC1 can ping PC2 (192.168.0.100) successfully when the whole system powers on while PC1 can't ping PC2 if we only shutdown and re-power on the PC2 (with switch 2).

In this case:

D:\>tracert 192.168.0.100

通过最多 30 个跃点跟踪
到 UIH_RESERVED_CT_GANTRY [192.168.0.100] 的路由:

  1     5 ms    11 ms     3 ms  10.8.12.253
  2     6 ms     1 ms     1 ms  10.6.103.81
  3     *        *        *     请求超时。
  4     *        *        *     请求超时。
  5     *        *        *     请求超时。
  6     *     ^C

In this case, when we re-plugged the PC1's NIC to the WAN (10.8.12.13), PC1 will be able to ping PC2 successfully again.

Don't know why this happens since the route table doens't have any change before and after the re-plugging -- both have the line "192.168.0.0 255.255.255.0 在链路上 192.168.0.21 266":

===========================================================================
接口列表
 17...0c c4 7a 0d c9 ad ......Intel(R) 82574L Gigabit Network Connection #3
 13...0c c4 7a 0d c9 ac ......Intel(R) 82579LM Gigabit Network Connection
  1...........................Software Loopback Interface 1
 12...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
 16...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
 15...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
===========================================================================
IPv4 路由表
===========================================================================
活动路由:
网络目标        网络掩码          网关       接口   跃点数
          0.0.0.0          0.0.0.0      10.8.12.254       10.8.12.13     10
        10.8.12.0    255.255.255.0            在链路上        10.8.12.13    266
       10.8.12.13  255.255.255.255            在链路上        10.8.12.13    266
      10.8.12.255  255.255.255.255            在链路上        10.8.12.13    266
        127.0.0.0        255.0.0.0            在链路上         127.0.0.1    306
        127.0.0.1  255.255.255.255            在链路上         127.0.0.1    306
  127.255.255.255  255.255.255.255            在链路上         127.0.0.1    306
      192.168.0.0    255.255.255.0            在链路上      192.168.0.21    266
     192.168.0.21  255.255.255.255            在链路上      192.168.0.21    266
    192.168.0.255  255.255.255.255            在链路上      192.168.0.21    266
        224.0.0.0        240.0.0.0            在链路上         127.0.0.1    306
        224.0.0.0        240.0.0.0            在链路上        10.8.12.13    266
        224.0.0.0        240.0.0.0            在链路上      192.168.0.21    266
  255.255.255.255  255.255.255.255            在链路上         127.0.0.1    306
  255.255.255.255  255.255.255.255            在链路上        10.8.12.13    266
  255.255.255.255  255.255.255.255            在链路上      192.168.0.21    266

Also, in our another system, only the switch2 is provided (no switch1). The same problem doesn't happen there. The only difference I know is that in this another system the LAN side NIC would be deactivated when switch2 is powered off.

    10.8.12.13/255.255.255.0 (WAN)
        PC1 (Windows)
    192.168.0.21/255.255.255.0 (LAN)
            |
            | (below switch and linux pc are powered on/off together)
            |
        Switch 2
            |
    192.168.0.100/255.255.255.0 (LAN)
        PC2 (Linux)

Any suggestion is greatly appreciated.

closed as off-topic by Ron Maupin, YLearn Jun 13 '16 at 14:12

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "NE is a site for to ask and provide answers about professionally managed networks in a business environment. Your question falls outside the areas our community decided are on topic. Please visit the help center for more details. If you disagree with this closure, please ask on Network Engineering Meta." – Ron Maupin, YLearn
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Welcome to NE, we hope you will both contribute to and learn from this community. NE is a site to ask and provide answers about professionally managed networks. This question seems to be more related to server/computer configuration which is off topic as defined by the community. Please see What topics can I ask about here? for more details. This does not appear to be a network problem. You could try posting this on a different site on the network, such as Super User. – YLearn Jun 13 '16 at 14:12
2

It appears that when you are performing the trace route, the path is taken out of your WAN interface rather than your LAN side.

Each time you are powering off PC2 and SWITCH2, you are clearing the learned routes on PC1 I think and only when you remove the WAN interface it will try to learn the path to PC2 because it's the only interface available. Once it has learned both paths, it can choose where to send the PINGS correctly based on the PC1's routing table.

What you could perhaps do is setup a static route on PC1 using the following command

route -p add 192.168.0.0 mask 255.255.255.0 0.0.0.0 IF <InterfaceNumber> metric 2

We are using 0.0.0.0 as the nexthop so that we can tell Windows to use a specific interface. You can find the interface number listed when you route print.

Alternative you can specify PC2 as the next hop if there are no other PC's you need to get to using route -p add 192.168.0.0 mask 255.255.255.0 192.168.0.100 metric 2

Give this a go and see how this works for you. If this does not work, you can remove the static route using the following command

route delete 192.168.0.0

Hope this helps you on your quest.

SleepyMan

  • Thanks, I'll give it a try the next day. Still don't understand why the static route would work differently with the "192.168.0.0 255.255.255.0 在链路上 192.168.0.21 266" which exists even before I re-plugs the cable for the LAN side. – Gang Yin Jun 11 '16 at 0:13

Not the answer you're looking for? Browse other questions tagged or ask your own question.