3

I am working on Windows Server 2008/12.

I have two interfaces: a PPTP tunnel and the LAN card and I want to ping an IP via both of them to compare their results. As per the documentation, that should be possible via ping -S default_gateway_for_interface

Now this works when I pass the gateway for the default interface but I get

PING: transmit failed. General failure.

when I pass the PPTP tunnel's gateway. Any clues?

10
  • Did you set the source address?
    – Ron Maupin
    Sep 2 '15 at 19:35
  • Source address of what? If you mean in the ping request, yes. I did. I am passing the Server IPv4 address of the PPTP tunnel. Sep 2 '15 at 19:42
  • What is the actual ping command you use?
    – Ron Maupin
    Sep 2 '15 at 19:43
  • ping -S <server IPv4 address> 8.8.8.8 Sep 2 '15 at 19:44
  • You are confusing me with the "default gateway" thing. The source address is the address on the device from which you are pinging, not the gateway for that subnet.
    – Ron Maupin
    Sep 2 '15 at 19:46
4

You are confusing me with the "default gateway" thing. The source address is the address on the device from which you are pinging, not the gateway for that subnet.

Suppose I have two addresses, 10.11.12.13 and 172.16.17.18 on my computer. I want to ping on the respective interfaces (logical or physical). I ping from the source (-S) with each of the addresses on my computer, not the gateways for those addresses.

For instance, I have a VPN tunnel and a physical interface on one of my computers, each with IP addresses. The VPN doesn't allow me to ping outside the network on the other end of the tunnel.

Assume they are addressed like this: Tunnel=172.16.17.18, Ethernet=10.11.12.13.

 C:\>ping -S 10.11.12.13 time1.google.com

 pinging time1.google.com [216.239.32.15] from 10.11.12.13 with 32 bytes of data: 
 Reply from 216.239.32.15 bytes=32 time=21 ms TTL=43
 Reply from 216.239.32.15 bytes=32 time=22 ms TTL=43
 Reply from 216.239.32.15 bytes=32 time=23 ms TTL=43
 Reply from 216.239.32.15 bytes=32 time=22 ms TTL=43

 Ping statistics for 216.239.32.15:
     Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:
     Minimum = 21ms, Maximum = 23ms, Average = 22ms

 C:\>ping -S 172.16.17.18 time1.google.com

 pinging time1.google.com [216.239.32.15] from 172.16.17.18 with 32 bytes of data:
 Request timed out.
 Request timed out.
 Request timed out.
 Request timed out.

 Ping statistics for 216.239.32.15:
     Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

C:\>
3
  • Thanks a lot for going through the pains of posting this! I am doing the same thing. The issue must be because of the VPN then :) Sep 2 '15 at 20:42
  • I can ping from one end of my tunnel to the other, and I can ping anything on the rather large network on the other end of the tunnel, but I can't ping anything on the Internet from the tunnel because the network on the other end blocks that.
    – Ron Maupin
    Sep 2 '15 at 20:48
  • I tested and yes, the ping does go through when I try to ping the other end of tunnel via my IP. Thanks for explaining this concept :) Sep 2 '15 at 20:58
1

You can add in the command line: route ADD xxxx MASK xxx GatewayXXXX

In the place of GatewayXXXX, you put one gateway at time, next, delete the route and put the next one, accross the anothe link, changing the GatewayXXXX.

I think in that form, you can compare te results

1
  • Good advice! Not applicable in my case though because I have user data passing through the server and I want to first measure the performance of different routes for that particular IP by pinging them before creating the static routes (which will effect user data) Sep 2 '15 at 20:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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