I have a Raspberry pi 3b, running on "Raspbian GNU/Linux 8 (jessie)" that is currently using a 3G USB dongle to gain internet connectivity. The dongle is a vodafone k5160 set up as an ethernet connection (eth1).

My problem is that whenever i try to connect my rpi to a router on another network using the ethernet port, eth0, it fails to obtain an ip address. It simply gets assigned a random 169.254 local link address, and from reaserching i see that this means it faild to obtain an ip address from the DHCP server. A bit more details on my set up:

  • Raspberry Pi 3b, using vodafone k5160 to gain internet connectivity, which works and has been working with no issues. The dongle is set up as an ethernet interface eth1, with private ip address

  • I tried to connect my raspberry pi to another router, to communicate with another linux system within the router's network. This was done by connecting a straight trough ethernet cable, from the onboard ethernet port to the router.

  • I have no direct control over the second system i am trying to reach, but i know its ip address within the network. Will be using tcp/ip commands to retrieve data off of this system.

  • The problem i'm having is that my eth0 interface gets assigned a link local ip address meaning it failed to obtain one from the router. The expectation was to obtain an ip address within the range of 10.x.x.x.

  • I cannot see or ping the other system, and vice versa. Also, this is a remote application i can't easily play with the hardware (i.e. unplug the dongle, plug in the etherent link, and keep trying different things). I do no directly manage the second system but i can get info if required by the person managing it.

  • Also, as an extra objective, i would like to be able to "split" the traffic between the 2 interfaces. By this i mean to allow to cap the amount of data sent/received by each of these interfaces, and control how much goes through each of these (i hope this makes sense). This is an extra, i would like to focus on my initial issue, and possibly implement this feature once the rest is working.

I received a couple of useful answers prior to my edit to the question. Here is the output of suggested commands to try:

ip route

default via dev eth1  metric 203 dev eth0  proto kernel  scope link  src  metric 202 dev eth1  proto kernel  scope link  src  metric 203


ip addr

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:e4:f8:66 brd ff:ff:ff:ff:ff:ff
    inet brd scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::d24f:eade:5e86:f087/64 scope link
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/ether 0c:5b:8f:27:9a:64 brd ff:ff:ff:ff:ff:ff
    inet brd scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::584f:751f:bb3e:e26b/64 scope link
       valid_lft forever preferred_lft forever
4: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state DORMANT group default qlen 1000
    link/ether b8:27:eb:b1:ad:33 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::ba27:ebff:feb1:ad33/64 scope link
       valid_lft forever preferred_lft forever


  • I think this is implied but just to check, does networking work fine when you unplug the USB dongle? Linux should be able to handle having more than one network interface so this doesn't sound like the problem. – Philip Couling Feb 13 '18 at 16:56
  • Without detail of your network settings this is unanswerable; all you get is speculation about possible issues. It is also unclear exactly what you are trying to achieve. – Milliways Feb 13 '18 at 22:29
  • I will add all the details i think could be useful, also based on the answers i received. – LecauseAndThePi Feb 14 '18 at 9:51
  • 1
    The vodafone k5160 dongle established only a connection to internet? There are only eth1 with and the dongle with, right? The router behind eth0 has two sides. The side eth0 is connected and the other side the network is connected. Now we have to know the ip address of the router on your side (eth0) and if the router established bridging or routing. On bridging we have one network on eth0 and we can reach all hosts there transparently. On routing we have a neighbor network on eth0 and a far network behind the router. Then we have to route into far network. – Ingo Feb 14 '18 at 21:12
  • Yes, the K5160 dongle only connects to the internet, and has ip, on eth1. The Cisco router is connected to the RPI ethernet port. The router provides both local network and internet connectivity (3g router) and ip address. Another system is connected to the router, which has ip address. I'm pretty sure the router does not establish bridging, but rather routing because my rpi should simply connect to the router network and get assigned an IP address within the network. However, the rpi fails to obtain an ip address, and instead assigns itself 169.2540.0/16. – LecauseAndThePi Feb 15 '18 at 9:28

This is a typical multihoming host. Let us assume there is no routing between the two interfaces so your raspi is not a router and we do not enable ip forwarding. For example eth0 is connected to network and eth1 is connected When eth0 needs an ip address this interface broadcasts into its connected network: "I need an ip address!". If in network is a DHCP-Server eth0 will get an ip address, e.g. The same will eth1 do. If in it's network is a DHCP-Server it will also get an ip address e.g. If there is missing a DHCP-Server in one of the two networks its interface will not get an ip address. to workaround this you can give eth0 a static (fixed) ip address, or setup a DHDP-Server in each network, or install a DHCP-relay (not easy).

When both interfaces have their ip address and you want to connect to a host with ip address it will automagically go through eth0 (the kernels routing table specifies this). A target host with ip address will go through eth1. This is what you mean with "split the traffic between both interfaces"?

What is with any other target host that have neither an ip address from nor from They will go to the default route, e.g. default via dev eth0. This specifies the next hop, usually your internet router, and the interface it should use.

To check this use the commands:

pi ~$ ip addr
pi ~$ ip route
  • Thank you! I'll edit the post to include a lot more details on my issues. – LecauseAndThePi Feb 14 '18 at 9:50

This doesn't sound like your problem. Linux can DHCP even when you have multiple network devices with one setup after another.

Either way, to view your routing table open a command line and type:

ip route

You will get something like:

default via dev eth0 dev eth0 proto kernel scope link src

The "default" is where it sends everything not otherwise specified. This doesn't usually apply to the broadcasting used by DHCP, as it can specify which device it wants to broadcast on.

I'd suggest going round and asking another question. Be specific about which version of raspbian and which USB dongle your using. Others may have already had the same problem.

  • Thanks for the answer. It seems that you are correct with your assumptions. ip route gives this output: default via dev eth1 metric 203 dev eth0 proto kernel scope link src metric 202 dev eth1 proto kernel scope link src metric 203 So all the traffic, does go through my eth1 interface?. – LecauseAndThePi Feb 14 '18 at 9:46

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