How to determine which NIC data/traffic is using? To make sure routing is correct.
If I was in doubt, I would check the routing tables and things like other people mentioned, but then I would fire up my sniffer (wireshark, tcpdump) and perform a capture on the interface in question while I generate some traffic to actually determine if it is doing what it is supposed to be doing.
You can use IPTRAF, which I've found is nice, and will let you see the data that is traveling between each device in real-time.
Zoredache comment about sniffer is, I think, the gold standard.
Another options: use the
For shell scripts, you may be able to query the proc data structures directly.
To find out which route the traffic is taking to a certain address over TCP, use the 'Trace Route' tool.
For Windows, the command is:
Where [host] is what you want to check, say
By looking at the first hop, you'll know where it went. For example:
C:\Users\Mark>tracert google.com Tracing route to google.com [188.8.131.52] over a maximum of 30 hops: 1 14 ms 13 ms 14 ms nexthop.nsw.iinet.net.au [184.108.40.206]
Tells me that my traffic to Google is going over my iiNet NIC, but if I tracert 220.127.116.11 (where I have a static route going to a different NIC) I see:
Tracing route to 18.104.22.168 over a maximum of 30 hops 1 1 ms <1 ms <1 ms 192.168.161.1 2 29 ms 28 ms 28 ms lns20.syd6.internode.on.net [22.214.171.124]
Which tells me that it's going to a different gateway (and different NIC), and over my Internode internet connection.
-- Update --
If this is not enough evidence, or the first hops are the same, then your only option will be to do as Zoredache said, and use WireShark and watch the actual packets flow through the NIC.