Options
Ping from specific NIC
typesh
Member Posts: 168
in CCNA & CCENT
Hey everyone,
I was wondering if there is a command to allow a ping from a specific interface?
If a PC has 2 NICs and you want to have a ping come from a specific one, how would you do this from the command prompt (using XP).
I came across the command ping x.x.x.x -s [number of interface]
This does not seem to work though..
Thank you.
I was wondering if there is a command to allow a ping from a specific interface?
If a PC has 2 NICs and you want to have a ping come from a specific one, how would you do this from the command prompt (using XP).
I came across the command ping x.x.x.x -s [number of interface]
This does not seem to work though..
Thank you.
Comments
-
OptionsForsaken_GA Member Posts: 4,024in IOS, you just type ping and it will (among a plethora of other options) let you choose which interface to source a ping from.
On an operating system level, it differs, ie for most unix's, it's the -I option followed by an IP address or device name
With XP, I'm not sure if that's a default option, I don't believe it is.... I'm pretty sure it uses it's local routing table to decide which interface to put a ping down, so you'd have to manipulate the local routing table (ie, insert a /32 route to the interface you want to ping out of, and it'll go out that interface) or change your default route around.
Of course, you could also just disable the other NIC temporarily, leaving the box with no choice but to send it out the interface that's actually up.
This is also probably a good question for the windows forums, I'd be surprised if it hasn't come up before -
Optionstypesh Member Posts: 168Thanks Forsaken. I was thinking it could be done similar to how you mentioned on routers. Found some posts which also suggest configuring the routing table like you said. I'll check over on the windows forums as well.
-
Optionsjason_lunde Member Posts: 567Hey everyone,
I was wondering if there is a command to allow a ping from a specific interface?
If a PC has 2 NICs and you want to have a ping come from a specific one, how would you do this from the command prompt (using XP).
I came across the command ping x.x.x.x -s [number of interface]
This does not seem to work though..
Thank you.
In XP go to network connections-->Advanced-->advanced settings. From there you can manipulate the order in which you want to use nics. But if you are pinging anything local to one of your nics, that nic will have the better metric and will be used. But if your pinging something not on a local subnet of any of your nics, this ordering feature should work nicely.