[SOLVED] Fixed IP – DHCP still working and I get two IP addresses

Max2Play Home Forums General Questions on Hardware and Max2Play Versions [SOLVED] Fixed IP – DHCP still working and I get two IP addresses


Viewing 5 posts - 1 through 5 (of 5 total)
  • 4. Dezember 2016 at 17:16 #24538

    Raspberry Pi 3
    Clean installation of max2play with Squeezeserver, updated as of 4th December. I registered as premium to support this excellent project and try the bluetooth (which stutters badly, but that is another question for another day).
    I disabled WiFi as part of troubleshooting using sudo ifconfig wlan0 down
    I used the settings to give the install a fixed ip of (This has been the ip address of my LMS music server for ever. I only just discovered max2play but have been running LMS on RPi since RPi1.)
    I also find that I can access the install on, which is in my DHCP range. My router reports two devices with the same MAC address. Everything works beautifully apart from having two ip addresses. I have tried rebooting of course. Maybe this is nature telling me that it is time to move to DHCP for everything, but I have been putting that off for years :-/

    ifconfig gives:

    eth0      Link encap:Ethernet  HWaddr b8:27:eb:01:57:00
              inet addr:  Bcast:  Mask:
              inet6 addr: fe80::df1b:f0cd:f102:1e9f/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:289658 errors:0 dropped:1680 overruns:0 frame:0
              TX packets:570982 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:106709387 (101.7 MiB)  TX bytes:728619044 (694.8 MiB)
    lo        Link encap:Local Loopback
              inet addr:  Mask:
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:579 errors:0 dropped:0 overruns:0 frame:0
              TX packets:579 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1
              RX bytes:50916 (49.7 KiB)  TX bytes:50916 (49.7 KiB)

    \etc\network\interfaces is

    # interfaces(5) file used by ifup(8) and ifdown(8)
    auto lo
    iface lo inet loopback
    #auto eth0 # managed by ifplugd
    iface eth0 inet static
    #hwaddress ether 1a:64:b6:bf:36:37
    #allow-hotplug wlan0
    #auto wlan0
    #iface wlan0 inet dhcp
    #pre-up wpa_supplicant -B w -D wext -i wlan0 -c /opt/max2play/wpa_supplicant.co$
    #post-down killall -q wpa_supplicant
    • This topic was modified 7 years, 6 months ago by omdaddi.
    4. Dezember 2016 at 17:33 #24539

    I fixed it – this is a known issue with raspbian, maybe those excellent max2play people need to revisit how they set the fixed ip?

    „The “faulty” is the dhcpcd daemon, which is a DHCP client that seems to be run before the parsing of the /etc/network/interfaces file.“

    Solution: http://sizious.com/2015/08/28/setting-a-static-ip-on-raspberry-pi-on-raspbian-20150505/

    So I just added this to my /etc/dhcpcd.conf

    # Custom static IP address for eth0.
    interface eth0
    static ip_address=
    static routers=
    static domain_name_servers=
    10. Oktober 2017 at 15:17 #31850

    I have added the above mentioned text to the /etc/dhcpcd.conf file, but it still does not work properly.
    The ‚fixed‘ IP address as set in the file and in the LAN configuration of max2play changes after a while into another address, and all services are stopped.
    So I cannot get access to the ’system‘ after that, and I have to disconnect the power supply (which I hate to do because of the risk of a corrupted SD card)…
    This happens all the time, so for now I will leave the DHCP service active. I cannot use a fixed IP address, strange behaviour…

    I hope that someone can resolve this issue..
    For the rest max2play works great on my Squeezebox devices with the Logitech Media Server and Spotty (for Spotify).

    • This reply was modified 6 years, 8 months ago by tomsat50.
    • This reply was modified 6 years, 8 months ago by tomsat50.
    11. Oktober 2017 at 15:44 #31864

    Hi tom,

    The fixed IP should definitely work. You do get two IP addresses but this should not be an issue for your services. Please detail which services stop working and we should be able to find the root cause for them.

    However, we are working on a more sophisticated solution for this issue in our upcoming new version based on Raspbian Stretch.

    15. November 2017 at 19:26 #32495

    Hi everyone,

    I’ve tried to make a static IP both for Network and WiFi. When I made some changes to dhcpcd.conf file my result was as above : 4 IP address (two for Network,two for WiFi and all they were working!). I went through wpa_supplicant.conf files (they are two of them: one original in /etc/wpa_supplicant/ and second one, which is used by max2play, in /opt/max2play/ ) but nothing has got better. I’ve read some notes about raspbian jessie and found very simple solution.

    Only what you need to do is go to /etc/network/interfaces and change lines to this (addresses are only for example):

    # /etc/network/interfaces
    auto lo
    iface lo inet loopback
    #auto eth0 # managed by ifplugd
    #iface eth0 inet dhcp   <--- if you what to have static IP for Network hash this line and use dhcpcd.conf file to determine your IP
    #hwaddress ether 1a:64:b6:bf:36:37
    allow-hotplug wlan0
    auto wlan0
    iface wlan0 inet static #change dhcp to static
    address  #static IP for RPi
    gateway  #IP of your router
    wpa-ssid "NETWORK_SSID"
    wpa-psk "PASSWORD"
    #pre-up wpa_supplicant -B w -D wext -i wlan0 -c /opt/max2play/wpa_supplicant.co$ 
    #post-down killall -q wpa_supplicant  #hash last two lines 

    Now my RPi3 with M2P onboard is connecting with the same IP to WiFi everytime.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Register here