Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My thinkpad has two network interfaces, one wired and one wireless. Both interfaces can be connected to a router which in turn is connected to the Internet.

If both interfaces are connected, are both interfaces used simultaneously or just one at a time. How can I tell which interface is used?

share|improve this question
up vote 4 down vote accepted

I activated my wired eth0 and wifi eth2 with network manager (both dhcp):

$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface   U     1      0        0 eth0   U     2      0        0 eth2     U     1000   0        0 eth0         UG    0      0        0 eth0

tcpdump -n -i eth0 shows traffic, while tcpdump -n -i eth2 doesn't.

So let's try to reorder the interfaces in the routing table:

sudo route del -net dev eth2
sudo route add -net dev eth2
sudo route -n add default gw dev eth2

Now the routing table is:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface   U     0      0        0 eth2   U     0      0        0 eth0     U     1000   0        0 eth0         UG    0      0        0 eth2         UG    0      0        0 eth0

now tcpdump shows all the traffic going through the eth2 interface.

share|improve this answer

Network interfaces have a "metric" value. If multiple interfaces can reach to the gateway, the one with the smallest metric will be used.

You can try typing netstat -r at the command line to have a look at that. ifconfig will give the metric for each interface as well.

share|improve this answer
+1 What decides the metric value? The device itself, configuration, or something else entirely? – Kent Boogaart Sep 3 '10 at 12:38
+1 Typing ifconfig in my case (eth0 disconnected, wlan0 connected) given Metric:1 for all interfaces. How is this metric value to be interpreted ? – koushik Sep 3 '10 at 15:04
@koushik Think of metric as the cost to send traffic for that rule. It will try to send it the way that costs the least. – Azendale Jul 8 '11 at 6:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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