Problem with dhcp when there is a power failure

Home Forums Conduit: mLinux Model Problem with dhcp when there is a power failure

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #18023
    mikel de prado
    Participant

    Hello Multitech Team,

    we have our Conduit: mLinux (Fw version 3.2.0) with a Lora mdot in our office, connected to a switch and it receives his Ip Address from our DHCP server.
    Lately, we had some power failures and when the power returns we are unable to connect to it by ssh, and our Lora devices are unable to make a Join to the application server(The things Network).
    Each time we had a power failure, we had to go to where the conduit is and unplug it and plug it again.

    We think that each time there is a power failure the conduit restarts faster than our switch, and because of that he is unable to get a IP address through dhcp. We think that when the dhcp fails to get the IP it assign itself some default address and because of it we are unable to connect to it.

    Is there a way to solve this issue by modifying the configuration or some other way.

    #18028
    Jeff Hatch
    Keymaster

    Mikel,

    Are you using udhcpc or a different DHCP client program?

    Jeff

    #18067
    mikel de prado
    Participant

    I think we are using the udhcpc client, is the only dhcp client on the conduit.

    #18071
    Jeff Hatch
    Keymaster

    Mikel,

    Just need to make sure. We have customers that port other software onto the Conduit.

    As for using udhcpc, what arguments are being specified when it is getting executed? Are you using a script file? In the past I have used the -qn arguments: udhcpc -i eth0 -qn

    With this it will try a few times and quit with an exit status of either 0 (success) or 1 (failure) to get a lease. I then check the exit status and if it didn’t succeed I re-run it after sleeping for a designated amount of time. Doing that in a loop, you can control how often and how long you retry.

    The contents of the udhcpc.conf are:

    start                   192.168.2.100
    end                             192.168.2.254
    interface               eth0
    option subnet   255.255.255.0
    option router   192.168.2.1
    option dns              8.8.8.8                 # google's DNS server

    In this simple case I don’t have udhcpc executing a script (–script argument).

    Hopefully that will help,

    Jeff

    #18095
    mikel de prado
    Participant

    Jeff,

    We first configured the interface to use dhcp, for that we modified the file /etc/network/interfaces, like this:

    auto eth0
    iface eth0 inet dhcp

    We are not using any aditional script, i suppose udhcpc is using it's default script. Using ps -ef, i got that the udhcpc was started with these parameters:

    udhcpc -R -n -p /var/run/udhcpc.eth0.pid -i eth0

    The contents of the udhcpd.conf are:

    start 192.168.2.100
    end 192.168.2.254
    interface eth0
    option subnet 255.255.255.0
    option router 192.168.2.1
    option dns 8.8.8.8 # google's DNS server

    And the udhcpc default script file:

    #!/bin/sh

    exec run-parts -a “$1” /etc/udhcpc.d

    #19269
    piyush s
    Participant

    Hi Mikel,

    Were you able to get your problem resolved? Did you modify the dhcp client (or its argument) to solve that or some other way?

    thanks,
    –Piyush

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.