• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

Dhcpd running by default?

Scheduled Pinned Locked Moved Help and Support
dhcpdservicedaemon
19 Posts 2 Posters 1.9k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T
    Tango
    last edited by 22 Aug 2021, 04:04

    I am using RetroPie for an arcade game system and I have never set up anything to run DHCP on it. I have a DHCP server on my LAN and have no need or desire to have a 2nd one.

    Today, when shutting down my RetroPie system, so I could bring it up to my study and work on an ssh issue, I watched and saw a line go by, during shutdown, about dhcpd service stopping. If I ever set that up, it was entirely by accident, but I'm not sure I could have done it even by accident. (But the presence of an unintended dhcpd running on my LAN could explain a few issues I've had over the past few months.)

    Does RetroPie have a default dhcpd service? When I try "sudo systemctl status" I see a dhcpd listed, but when I try to stop it or disable it, it appears there is no such service.

    Could I have activated this during setup? Is it easy to do that? (That's the only time I can think of that I could have accidentally installed and enabled it.) And why does it show up when I check the status of all services, but not as its own service?

    Beyond that, what can I do to find out which dhcpd daemon or service I'm running and shut it down for good or remove it?

    1 Reply Last reply Reply Quote 0
    • M
      mitu Global Moderator
      last edited by 22 Aug 2021, 04:08

      @tango said in Dhcpd running by default?:

      Does RetroPie have a default dhcpd service? When I try "sudo systemctl status" I see a dhcpd listed, but when I try to stop it or disable it, it appears there is no such service.

      No, RetroPie doesn't come with a DHCP server installed/enabled, it does come with a DHCP client. Are you sure you've not misread the name of the service - the client service is named dhcpcd and it's running by default (as it should).

      T 1 Reply Last reply 22 Aug 2021, 04:13 Reply Quote 0
      • T
        Tango @mitu
        last edited by 22 Aug 2021, 04:13

        @mitu That's possible.

        But when I checked with ifconfig, I got an address that isn't in a normal LAN range (not a 10.x.x.x or 172.16.x.x or 192.168.x.x or anything like that).

        M 1 Reply Last reply 22 Aug 2021, 04:17 Reply Quote 0
        • M
          mitu Global Moderator @Tango
          last edited by 22 Aug 2021, 04:17

          @tango said in Dhcpd running by default?:

          But when I checked with ifconfig, I got an address that isn't in a normal LAN range (not a 10.x.x.x or 172.16.x.x or 192.168.x.x or anything like that).

          Post the output of the ifconfig command.

          T 1 Reply Last reply 22 Aug 2021, 04:25 Reply Quote 0
          • T
            Tango @mitu
            last edited by 22 Aug 2021, 04:25

            @mitu said in Dhcpd running by default?:
            ...

            Post the output of the ifconfig command.

            A bit more behind this. When I saw the dhcp shutting down (probably was dhcpcd - by the time I saw it, it was scrolling off the screen), when it shutdown, I restarted - that's when I saw the IP address that was out of range. (I think it started with 169 - which made no sense!) I shut down again and brought it up here, thinking if there was an IP address issue, that would explain why I couldn't ssh in to the system.

            Now, up in my study, I can't connect to it from anything else at this point, so I have a screenshot of the ifconfig output - and now, even though it is connected to my LAN, there is only an IP6 address, no IP4 address.

            67CB4654-6570-4614-B53F-E19CC0D9D13F_1_105_c.jpeg

            1 Reply Last reply Reply Quote 0
            • M
              mitu Global Moderator
              last edited by 22 Aug 2021, 04:32

              @tango said in Dhcpd running by default?:

              I restarted - that's when I saw the IP address that was out of range. (I think it started with 169 - which made no sense!)

              The 169. range is an auto-configuration (zeroconf) LAN range, used by systems when there is no other IP configuration mechanism available (DHCP or static IP). See https://en.wikipedia.org/wiki/Zero-configuration_networking#Address_selection.

              and now, even though it is connected to my LAN, there is only an IP6 address, no IP4 address.

              Check if the cable has correct connectivity to your DHCP server. Try a static IP and see if it can reach other systems in the LAN.

              T 1 Reply Last reply 22 Aug 2021, 04:35 Reply Quote 0
              • T
                Tango @mitu
                last edited by 22 Aug 2021, 04:35

                @mitu said in Dhcpd running by default?:
                ...

                Check if the cable has correct connectivity to your DHCP server. Try a static IP and see if it can reach other systems in the LAN.

                Can't ping a thing right now. The dhcpcd service does seem to be running, though.

                M 1 Reply Last reply 22 Aug 2021, 04:49 Reply Quote 0
                • M
                  mitu Global Moderator @Tango
                  last edited by 22 Aug 2021, 04:49

                  Then you might not have connectivity, it doesn't seem to be a software issue.

                  T 1 Reply Last reply 22 Aug 2021, 07:01 Reply Quote 0
                  • T
                    Tango @mitu
                    last edited by 22 Aug 2021, 07:01

                    @mitu said in Dhcpd running by default?:

                    Then you might not have connectivity, it doesn't seem to be a software issue.

                    This wasn't news I wanted to hear, but it tells me what I needed to know. I looked at the RJ45. The yellow light is on, the green never goes on. I put in some SDCards with Ubuntu and RetroPie on them. (Ubuntu was a new setup and took over 2 hours to get to anything beyond setup - spent a LOT of time just waiting on it.) Neither the Ubuntu or RetroPie OS showed anything different for ifconfig.

                    I plugged the CAT5 cable into another computer on the same desk and it worked fine.

                    I guess that means that lightning strike from a few weeks ago not only blew out a network switch, but the Pi RJ45 as well.

                    Thanks for helping me troubleshoot it. I guess that Pi needs replacing. At least I can still store it and use it whenever I am using a Pi system that doesn't need to be on the network.

                    That's on a 3B. If I get a Pi 4, will the same RetroPi image work on that without a problem?

                    M 1 Reply Last reply 22 Aug 2021, 07:34 Reply Quote 0
                    • M
                      mitu Global Moderator @Tango
                      last edited by mitu 22 Aug 2021, 07:34

                      @tango said in Dhcpd running by default?:

                      That's on a 3B. If I get a Pi 4, will the same RetroPi image work on that without a problem?

                      No, you'd need a re-install or you can get an USB ethernet adapter to replace the broken ethernet port and keep the existing system.

                      T 1 Reply Last reply 22 Aug 2021, 07:42 Reply Quote 0
                      • T
                        Tango @mitu
                        last edited by 22 Aug 2021, 07:42

                        @mitu said in Dhcpd running by default?:

                        @tango said in Dhcpd running by default?:

                        That's on a 3B. If I get a Pi 4, will the same RetroPi image work on that without a problem?

                        No, you'd need a re-install or you can get an USB ethernet adapter to replace the broken ethernet port and keep the existing system.

                        The full OS is on a USB drive. There's no SD card in it. Can I just plug the USB drive into a Pi of a matching model? In other words, go from this 3B+ to another 3B+?

                        M 1 Reply Last reply 22 Aug 2021, 07:43 Reply Quote 0
                        • M
                          mitu Global Moderator @Tango
                          last edited by 22 Aug 2021, 07:43

                          @tango As long as the other system is configured for USB boot, then yes, it should work fine.

                          T 1 Reply Last reply 22 Aug 2021, 07:46 Reply Quote 0
                          • T
                            Tango @mitu
                            last edited by 22 Aug 2021, 07:46

                            @mitu

                            I know this sounds like I'm being picky, but I just want to be sure I get this. Again, moving just the USB drive, which contains the full OS.

                            So if I go from 3B+ to 3B+, as long as the new one is configured for USB boot, I'm okay.

                            But if I go from 3B+ to 4, then it won't work? I take it the hardware on the 4 is significantly different to keep that working?

                            M 1 Reply Last reply 22 Aug 2021, 08:23 Reply Quote 0
                            • M
                              mitu Global Moderator @Tango
                              last edited by mitu 22 Aug 2021, 08:23

                              @tango said in Dhcpd running by default?:

                              So if I go from 3B+ to 3B+, as long as the new one is configured for USB boot, I'm okay.

                              Yes.

                              But if I go from 3B+ to 4, then it won't work? I take it the hardware on the 4 is significantly different to keep that working

                              Yes. Technically, it might work if you're upgrading all the packages on the Pi4 system after the switch, but there's so many of things that could go wrong (older OS, not compatible with the Pi4, emulator settings set for the older Pi models, etc.).
                              I'd start over with a fresh installation on a Pi4 and transfer the ROMs/BIOS and a few configurations (EmulationStation mainly).

                              T 1 Reply Last reply 22 Aug 2021, 08:33 Reply Quote 0
                              • T
                                Tango @mitu
                                last edited by 22 Aug 2021, 08:33

                                @mitu Thank you!

                                I was thinking about the same if I upgraded - reinstall, then copy over all ROMs. If I copy over /home/pi/RetroPie (isn't that the directory? with it off, I can't check) and all the folders and files in that tree, will that get all my settings for Emulation Station and all the scores and so on?

                                (I know it won't of course, include things like /etc/samba/smb.conf or sshd_conf.)

                                M 1 Reply Last reply 22 Aug 2021, 11:22 Reply Quote 0
                                • M
                                  mitu Global Moderator @Tango
                                  last edited by 22 Aug 2021, 11:22

                                  @tango The ES settings are not in /home/pi/RetroPie, but in /opt/retropie/configs/all/emulationstation, so they will not be transferred over just by copying that folder.

                                  T 1 Reply Last reply 22 Aug 2021, 16:27 Reply Quote 0
                                  • T
                                    Tango @mitu
                                    last edited by 22 Aug 2021, 16:27

                                    @mitu said in Dhcpd running by default?:

                                    @tango The ES settings are not in /home/pi/RetroPie, but in /opt/retropie/configs/all/emulationstation, so they will not be transferred over just by copying that folder.

                                    So if I copy those two directory trees over, that should get all my ES and game settings, scores, and such?

                                    M 1 Reply Last reply 22 Aug 2021, 17:52 Reply Quote 0
                                    • M
                                      mitu Global Moderator @Tango
                                      last edited by 22 Aug 2021, 17:52

                                      @tango said in Dhcpd running by default?:

                                      So if I copy those two directory trees over, that should get all my ES and game settings, scores, and such?

                                      No, just the ES settings, hiscores, ROMS, BIOS files. What do you mean by game settings ? If you created .cfg files for games in the ROMs folder(s), then they'll be copied as part of ROM folders.

                                      1 Reply Last reply Reply Quote 0
                                      • T
                                        Tango
                                        last edited by 23 Aug 2021, 06:49

                                        SOLUTION:

                                        I brought this up in another thread, but that covers other issues, so for details that aren't here, you can check there.

                                        I solved this on the dhcp server (dnsmasq). Oddly enough, even though I was specifying to use 172.16.7.17, somehow it was being read as 172.16.7.174. I have no idea why, but that was in my reserved range of IP addresses to not give out, so the dhcp server was having issues with that and not giving it to the Pi.

                                        I changed and ended up using 172.16.7.11 instead of .17. After I changed to that, allowing time for propagation, it worked out.

                                        It is puzzling, since the dhcpcd logs on the Pi say they're being offered 172.16.7.17, but the server says it's .174 instead of .17. I have not tried to change back - I don't want to deal with that again. (I'm wondering if something was glitchy when the dhcp server wrote the config file to the drive.)

                                        1 Reply Last reply Reply Quote 0
                                        19 out of 19
                                        • First post
                                          19/19
                                          Last post

                                        Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                        Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.

                                          This community forum collects and processes your personal information.
                                          consent.not_received