On my laptop I've two interfaces (wlan0 and eth0), after conneted the wired, ifconfig show me "RUNNING" also in eth0. (both interfaces are in same network).

/sbin/ifconfig wlan0
wlan0: flags=4163<UP,BROADCAST,**RUNNING**,MULTICAST>  mtu 1500

/sbin/ifconfig eth0
eth0: flags=4163<UP,BROADCAST,**RUNNING**,MULTICAST>  mtu 1500

How I recognize which interface I using?

  • Can you give the full output of ifconfig command? – coffeMug Jun 25 '16 at 14:13

Try running watch netstat -i while traffic is flowing. The active interface will have increasing counters.

The command netstat -rn may give you some more information. I would expect traffic to flow on the interface with the lowest irtt value.

  • You can also use dstat --net -N wlan0,eth0. Dstat is an utility designed to monitor various metrics over time (run it without parameters for example) and is provided with all the major distros. – Dieter G Jun 25 '16 at 15:51

ip route will show you where your system is sending packets. man ip-route will start you on a path to controlling where the packets go.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.