Link to home
Start Free TrialLog in
Avatar of Peter Wilson
Peter WilsonFlag for France

asked on

Ping from a specific Interface or network

Hi Experts,

What is the command to ping from a specific gateway/interface/network? I want to test connectivity of a specific nic on my laptop.
ping -I 10.0.0.1 8.8.8.8 doesn't work nor does ping -k 10.0.0.1 8.8.8.8 work either.

win 8 & 10

Thx.
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Peter Wilson

ASKER

10.0.0.1 is the gateway of the network I want to test.

What you provided doesn't work on my end.
Avatar of oBdA
oBdA

-S specifies the Source address that ping uses to send the ICMP packets from, in other words, "to ping from a specific gateway/interface/network? ". "ping" obviously can't make your gateway ping something else.
When I copy that exact line 'ping.exe -4 -S 10.0.0.1 8.8.8.8' I get PING: transmit failed. General failure. as a result four times.
10.0.0.1 is the LAN and when I do a straight ping they are successful.

Any ideas on what I can do. I ran cmd as administrator...same result.
We need to see the PC's routing table.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I see sorry for the confusion. I was using the gw instead of my IP within that network, right?
Thx. that did it!!!!!