I have a raspberry pi 2 that I'm using for a KODI media center that has the ip address Another pi I just got is showing the same ip (derived from /sbin/ifconfig -a and listed under wlan0 for both). Possibly of importance, the two computers are not both on right now (only have one power cord at the moment) and I use the same wifi dongle for both of them. Does the router assign ip addresses based on what is on the network currently? If so, how do I make it so each machine has a single ip that doesn't change?

I'm running OSMC on the media center and Raspbian Jessie on the other one.

  • 1
    If you are using one for a media server, it would be best to give the media server a static IP. That way you can always knows what IP it will have. If they are both getting DHCP renewals, the router just gives the lowest IP it is told to to the last device that asks for a DHCP renewal. – cremefraiche Feb 13 '16 at 23:57

The reason for this is the lease time from the dhcp in your router, the dhcp lease work together with the mac address, this is the reason why both Pi's get the same IP. You can fix it on using different Wifi dongle or you change the wifi configuration in your Pi's to set up a fixed address.

  • (forget to say, have a look in your /etc/network/interfaces file for this) – Broatcast Feb 13 '16 at 23:44
  • Would a DHCP reservation solve this issue and allow me to keep swapping out the wifi dongle? – G Warner Feb 13 '16 at 23:51
  • If you store a DHCP reservation this will work with the mac address of the wifi dongle, so this will not help you with your problem. – Broatcast Feb 14 '16 at 0:01
  • 2
    You can set up an fixed ip address on each Pi by modifieing your interfaces file or you can use wpa_supplicant for this – Broatcast Feb 14 '16 at 0:03
  • Some alternativ, ... but more comlpexable, if you dont like to set up manual ip's, you can use a tool to modify the mac address of your wifi dongle, manualy and temporaly at runtime. so your router/dhcp server see a other mac address. – Broatcast Feb 20 '16 at 22:33

both pi devices are getting the ip from the same dongle...your router is only seeing the single dongle, whereas your pi devices are picking their ip from the same dongle..so another dongle for the other pi device will solve the problem

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.