Ping через определенный интерфейс windows

I hope this isn’t too basic a question. The title kind of asks it all. :-)

shamittomar's user avatar

shamittomar

46.3k12 gold badges75 silver badges79 bronze badges

asked Jul 21, 2010 at 20:30

richb01's user avatar

4

ping also has an option in Windows:

-S srcaddr     Source address to use.

So you can do something like

ping 10.10.10.1 -l 0 -S 192.168.1.1

where 10.10.10.1 is the destination address and 192.168.1.1 is the address of the source adapter

wjandrea's user avatar

wjandrea

28.6k9 gold badges62 silver badges82 bronze badges

answered Aug 31, 2013 at 0:10

Subash Abhinov Kasiviswanathan's user avatar

2

The ping command will allow strict source routing so you can specify the default gateway to use on the way out. (This assumes your interfaces have distinct gateways i.e. are on different networks)

ping -k 192.169.1.1 microsoft.com
        ^ default gateway for desired interface

Using WMI Win32_PingStatus you can do the same thing where you specify SourceRoute and SourceRouteType (This is essentially the same as using ping -k)

Alternatively:

If your network interfaces are on the same network, like a LAN card and a wireless adapater
you can add a custom ROUTE to your machine, which can send all traffic through a specific interface.

From ROUTE HELP:

route ADD 207.46.0.0 MASK 255.255.0.0  192.168.1.1 METRIC 3 IF 2
        destination^      ^mask        ^gateway     metric^    ^
                                                      Interface^

answered Sep 3, 2010 at 15:49

Jack B Nimble's user avatar

Jack B NimbleJack B Nimble

5,0494 gold badges40 silver badges62 bronze badges

  • Remove From My Forums
  • Question

  • Is there a option to select the interface from which to ping other computers?
    or how can it be done with out disabling the other interfaces on the pc from where im pinging.ž

    thanks!!! 

Answers

  •   Are you talking about Windows 7/Windows Server 2008 R2?

      To force IPv4 or IPv6, use -4 or -6  . To specify the source interface to use, use the -s option. (You use the interface number, not the IP address). 

      To ping 192.168.0.1 using ipv4 from interface 1, use the command  «ping  -4 192.168.0.1 -s 1»


    Bill

    • Marked as answer by

      Tuesday, January 12, 2010 1:15 PM

Probably easier is to use the -S switch, which lets you specify the source IP address (see ping /? for more infos).

Another thing you can do is change the binding order, which meets your «option to prefer one adapter over the other». Although it varies from Windows OS to OS, it is in a similar location as this example: For Windows 7 you right click on Network, and click properties. Then you click on «»Change adapter settings». Then click on the menu Advanced>Advanced Settings and move the connection you want to have priority to the top.

From Windows 7 (Version 6.1 Build 7601: Service Pack 1)
ping /?

Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
        [-r count] [-s count] [[-j host-list] | [-k host-list]]
        [-w timeout] [-R] [-S srcaddr] [-4] [-6] target_name


Options:
-t             Ping the specified host until stopped.
               To see statistics and continue - type Control-Break;
               To stop - type Control-C.
-a             Resolve addresses to hostnames.
-n count       Number of echo requests to send.
-l size        Send buffer size.
-f             Set Don't Fragment flag in packet (IPv4-only).
-i TTL         Time To Live.
-v TOS         Type Of Service (IPv4-only. This setting has been deprecated
               and has no effect on the type of service field in the IP Header).
-r count       Record route for count hops (IPv4-only).
-s count       Timestamp for count hops (IPv4-only).
-j host-list   Loose source route along host-list (IPv4-only).
-k host-list   Strict source route along host-list (IPv4-only).
-w timeout     Timeout in milliseconds to wait for each reply.
-R             Use routing header to test reverse route also (IPv6-only).
-S srcaddr     Source address to use.
-4             Force using IPv4.
-6             Force using IPv6.

Microsoft TechNet Ping Documentation which states it can only be used for IPV6 (not correct)
Applies to: Windows Server 2003, Windows Vista, Windows XP, Windows Server 2008, Windows 7, Windows Server 2003 R2, Windows Server 2008 R2, Windows Server 2000, Windows Server 2012, Windows 8

Microsoft TechNet — Using the Ping Command (Windows 7 and Server 2008 R2) (also missing -S srcaddr)

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:\>

Are you looking for an answer to the topic “ping using specific interface“? We answer all your questions at the website Brandiscrafts.com in category: Latest technology and computer news updates. You will find the answer right below.

Keep Reading

Ping Using Specific Interface

Ping Using Specific Interface

Table of Contents

Can you ping using a specific port?

Because ping doesn’t operate over a protocol with port numbers, you cannot ping a particular port on a machine. However, you can use other tools to open a connection to a particular IP and port and obtain the same information you would get if you could ping an IP and port.

How do I specify an interface in ping Windows?

To specify the source interface to use, use the -s option. (You use the interface number, not the IP address).


How to ping through a specific port

How to ping through a specific port

How to ping through a specific port

Images related to the topicHow to ping through a specific port

How To Ping Through A Specific Port

How To Ping Through A Specific Port

Can you ping an interface?

ping is one of the useful command line tools to get info about computers including the LAN and Internet. One can use ping command to find whether a specific IP address is accessible from your host.

Ping using specific gateway interface or source IP address.

Tutorial details
Category Network Utilities
OS compatibility *BSD • Linux • Unix • WSL • macOS
Est. reading time 3 minutes

24 thg 3, 2022

What interface does ping use?

By default, the ping command uses the mgmt0 interface. If you want to ping out of a datapath interface, use the -I option with the local appliance IP. Network layer protocol in the TCP/IP stack that enables a connectionless internetwork service.

How do I ping an IP with a port number?

The easiest way to ping a specific port is to use the telnet command followed by the IP address and the port that you want to ping. You can also specify a domain name instead of an IP address followed by the specific port to be pinged. The “telnet” command is valid for Windows and Unix operating systems.

How can I find someone’s IP with their port?

The port number is “tacked on” to the end of the IP address, for example, “192.168. 1.67:80” shows both the IP address and port number. When data arrives at a device, the network software looks at the port number and sends it to the right program. To find a port address, review an app’s technical documentation.

How do I ping from IP to destination IP in Windows?

In Windows, hit Windows+R. In the Run window, type “cmd” into the search box, and then hit Enter. At the prompt, type “ping” along with the URL or IP address you want to ping, and then hit Enter.


See some more details on the topic ping using specific interface here:


Can I try to ping a website through a specific adapter? – Stack …

The ping command will allow strict source routing so you can specify the default gateway to use on the way out. (This assumes your interfaces have distinct …

+ View More Here

Selecting the interface from which to ping – TechNet

To specify the source interface to use, use the -s option. … To ping 192.168.0.1 using ipv4 from interface 1, use the command “ping -4 …

+ Read More

Windows – ping an ip via different interfaces – Network …

You are confusing me with the “default gateway” thing. The source address is the address on the device from which you are pinging, …

+ View More Here

[Solved] How To Ping using a specific Network Interface (or a …

According to this link: using System.Net.NetworkInformation, is there a way to bind a ping to a specific interface? the ICMP cannot be bound to a Network …

+ Read More Here

How do I telnet to a specific IP address?

Type in “telnet <IP ADDRESS OF SERVER PC> <PORT>” and press enter. For example, you would type “telnet 123.45. 67.89 1521” If a blank screen appears then the port is open, and the test is successful.

What is ping command with example?

Ping command syntax for Windows

-t Pings the specified host until stopped. To stop – type Control-C
-s Timestamp for count hops (IPv4-only)
-j Loose source route along host-list (IPv4-only)
-k Strict source route along host-list (IPv4-only)
-w Timeout in milliseconds to wait for each reply

How do I ping a gateway?

Troubleshooting Ping Procedure

  1. Click Windows Start > Run.
  2. In the Run dialog box. …
  3. Type Ping 127.0. …
  4. Type Ping followed by your IP address, and press Enter.
  5. Type Ping followed by your gateway address and press Enter.
  6. Type Ping followed by the outside Internet address of your router, and press Enter.

How do you use tracert?

How do I use Tracert?

  1. Open a Command Prompt. …
  2. In the Command Prompt window, type ‘tracert’ followed by the destination, either an IP Address or a Domain Name, and press Enter. …
  3. The command will return output indicating the hops discovered and time (in milliseconds) for each hop.

PING Command – Troubleshooting

PING Command – Troubleshooting

PING Command – Troubleshooting

Images related to the topicPING Command – Troubleshooting

Ping Command - Troubleshooting

Ping Command – Troubleshooting

How do I ping my gateway?

Ping your default gateway:

  1. On the endpoint with the Management Server, press Windows Key + R.
  2. Type cmd and press Enter.
  3. In the console, type ipconfig and press Enter.
  4. If you see an entry like this: Default Gateway….. X.X.X.X. then type ping X.X.X.X. (where X.X.X.X is the default gateway’s IP).
  5. Press Enter.

How can I tell which network interface is being used?

Open up the Task Manager, go to the Networking tab, and you can see which adapters are being utilized. Show activity on this post. You can identify the adapter by MAC address (Physical Address) using the ipconfig /all command.

What port is ICMP?

ICMP has no concept of ports, as TCP and UDP do, but instead uses types and codes. Commonly used ICMP types are echo request and echo reply (used for ping) and time to live exceeded in transit (used for traceroute).

How do I find my interface?

You can launch a command prompt by pressing “Windows Key-R,” typing “cmd” and pressing “Enter.” Select the command prompt window, type the command “route print” and press “Enter” to display the “Interface List” and system routing tables.

How can I test if a port is open?

Type “Network Utility” in the search field and select Network Utility. Select Port Scan, enter an IP address or hostname in the text field, and specify a port range. Click Scan to begin the test. If a TCP port is open, it will be displayed here.

What is TCP ping?

However, when it comes to measuring the connectivity and latency to web servers on the network level, an alternative exists, which we call TCP Ping: a traceroute with special options that mimic the TCP handshake that takes place when an HTTP connection is established.

What is netstat TCP?

The Work with TCP/IP Network Status (WRKTCPSTS) command, also known as NETSTAT, is used to get information about the status of TCP/IP network routes, interfaces, TCP connections and UDP ports on your local system. You can also use NETSTAT to end TCP/IP connections and to start or end TCP/IP interfaces.

How do I scan a port on my server?

8 Online Port Scanners to Find Opened Ports on Server and IP

  1. TCP Port Scan with Nmap.
  2. TCP Open Port Scanner.
  3. Online Port Scanner.
  4. Port Scan by T1 Shopper.
  5. Port Scanner by Hacker Target.
  6. Port Scanner by DNS Tools.
  7. WhatIsMyIp.
  8. Web Port Scanner.

How do you specify a port in URL?

Select the protocol to use ( http:// or https:// ). Use the Server field to enter the name or IP address of the HTTP server. Do not include the scheme (i.e. http:// ) in this field. If your server is listening on a non-standard port (80 for http:// and 443 for https:// ) then enter the port number into the Port field.

What is nslookup command?

The nslookup command queries internet domain name servers in two modes. Interactive mode allows you to query name servers for information about various hosts and domains, or to print a list of the hosts in a domain. In noninteractive mode, the names and requested information are printed for a specified host or domain.


OSIsoft: Use the PI Ping Interface to measure network latency. v3.4.375

OSIsoft: Use the PI Ping Interface to measure network latency. v3.4.375

OSIsoft: Use the PI Ping Interface to measure network latency. v3.4.375

Images related to the topicOSIsoft: Use the PI Ping Interface to measure network latency. v3.4.375

Osisoft: Use The Pi Ping Interface To Measure Network Latency. V3.4.375

Osisoft: Use The Pi Ping Interface To Measure Network Latency. V3.4.375

How do you use ARP?

Using arp. To display the ARP table on a Linux system, just type “arp”. Add -a to condense the output if you don’t want to see the data organized into columns with headings. (An arp-a command also will show the arp table in the command prompt on a Windows box, by the way.)

What switch would you use to specify an interface when using Traceroute?

-i interface

Specifies the interface through which traceroute should send packets. By default, the interface is selected according to the routing table.

Related searches to ping using specific interface

  • ping source
  • checkpoint ping from source ip
  • what switch would allow you to restrict requests to ipv4
  • ping option
  • Ping source
  • Ping with specific interface Windows
  • Man ping
  • ping via interface windows
  • cisco ping using specific interface
  • ping using specific interface centos
  • ping using specific gateway interface
  • man ping
  • fortigate ping using specific interface
  • how to ping out of a specific interface
  • how to specify interface in ping
  • powershell ping using specific interface
  • ping using specific interface windows
  • ping from specific network adapter linux
  • ping with specific interface windows
  • Checkpoint ping from source IP
  • ping using specific interface in linux
  • linux ping using specific interface
  • ping using specific interface cisco
  • What switch would allow you to restrict requests to IPv4
  • windows ping using specific interface
  • Ping from specific network adapter linux

Information related to the topic ping using specific interface

Here are the search results of the thread ping using specific interface from Bing. You can read more if you want.


You have just come across an article on the topic ping using specific interface. If you found this article useful, please share it. Thank you very much.

  • Picasa скачать торрент windows 10
  • Picasa photo viewer скачать бесплатно на русском для windows 10
  • Piano download for windows 8
  • Pia vpn скачать крякнутый windows
  • Pia vpn скачать для windows