Can I Ping from a specified nic card on a dual nic setup?

Associate
Joined
14 Apr 2004
Posts
151
I have two network cards in one of my pc and each network card is connected to a different network. Is it possible to send a ping from a specific NIC? And if so, how?
 
local network. Let say nic 1 is in 192.168.1.0/24 network and nic 2 in 192.168.2.0/24 network. Obviously nic 2 cannot ping network in nic 1 network and vice versa.
 
For network communication, your machine will select the interface (nic) to use based upon it's routing table. If it cannot find a specific entry for the network you want to contact, it will send out via the default gateway.

What exactly are you trying to achieve?
 
The main purpose is ping other network using a router. I don't have lots of pc lying around so I thought having more than 1 NIC should do the trick.
 
Bored already. I'm Cisco CCNP, CCSE and JCNIA. All firewall work for the UK/Group for this (largest in the UK) company comes across my desk. I've over a decade of experience building, deploying and administering networks and firewalls for oil and telecoms companys.

They are in different networks. If you can prove otherwise, I'd love to hear it.
 
yeah, yeah they are

Nigel (Network Infrastructure - a more known telcoms)

No, they're really really not...

192.168.1.0/24 - network address 192.168.1.0, broadcast 192.168.1.255

192.168.2.0/24 - network address 192.168.2.0, broadcast 192.168.2.255

Network addresses do not match, adjacency check fails, therefore networks not the same. That's networking 101 and I didn't need a CCIE to tell you that... (but I have one anyway).

They are both part of the same Class B range but that's in no way relevant given that a CIDR mask is supplied and nobody with a clue has used classful routing in the last 10 years.
 
No, they're really really not...

192.168.1.0/24 - network address 192.168.1.0, broadcast 192.168.1.255

192.168.2.0/24 - network address 192.168.2.0, broadcast 192.168.2.255

Network addresses do not match, adjacency check fails, therefore networks not the same. That's networking 101 and I didn't need a CCIE to tell you that... (but I have one anyway).

They are both part of the same Class B range but that's in no way relevant given that a CIDR mask is supplied and nobody with a clue has used classful routing in the last 10 years.

So succintly put.
 
ping will always go out via the default gateway regardless of how many NICs you have plugged in. easiest way would be to disable the nics that you don't want to send the ping out from and then do an ipconfig /renew and then do a ping, this should send the ping out through the gateway you want.

other than that you can try messing with the gateways manually by using route print and route add but good luck with that :P
 
Back
Top Bottom