2

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?

1
  • Can you give the full output of ifconfig command?
    – Vombat
    Jun 25, 2016 at 14:13

2 Answers 2

4

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.

1
  • 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, 2016 at 15:51
2

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .