How to see what DHCP client does?












13
















  • Does the dhcp client on Linux write any logs?

  • If not, can logs be enabled and how?

  • If it writes logs, where can they be found?

  • How does a typical log of a dhcp client look like when obtaining IP and
    nameservers from a DHCP server?

  • Where can I find the source code of the DHCP client?


In case there are relevant differences between Linuxes: I am interested in Debian 8.1 (default minimal installation amd64).










share|improve this question




















  • 1





    You'll need to be more specific than "the dhcp client on Linux". There are plenty of different dhcp clients for Linux and they all log different ways. There's probably a default one for Debian 8.1 though I can't remember what it is.

    – qasdfdsaq
    Jul 24 '15 at 10:58











  • Internet Systems Consortium DHCP Client 4.3.1 Copyright 2004-2014 Internet Systems Consortium. All rights reserved. For info, please visit isc.org/software/dhcp

    – Gustave
    Jul 24 '15 at 12:43


















13
















  • Does the dhcp client on Linux write any logs?

  • If not, can logs be enabled and how?

  • If it writes logs, where can they be found?

  • How does a typical log of a dhcp client look like when obtaining IP and
    nameservers from a DHCP server?

  • Where can I find the source code of the DHCP client?


In case there are relevant differences between Linuxes: I am interested in Debian 8.1 (default minimal installation amd64).










share|improve this question




















  • 1





    You'll need to be more specific than "the dhcp client on Linux". There are plenty of different dhcp clients for Linux and they all log different ways. There's probably a default one for Debian 8.1 though I can't remember what it is.

    – qasdfdsaq
    Jul 24 '15 at 10:58











  • Internet Systems Consortium DHCP Client 4.3.1 Copyright 2004-2014 Internet Systems Consortium. All rights reserved. For info, please visit isc.org/software/dhcp

    – Gustave
    Jul 24 '15 at 12:43
















13












13








13


4







  • Does the dhcp client on Linux write any logs?

  • If not, can logs be enabled and how?

  • If it writes logs, where can they be found?

  • How does a typical log of a dhcp client look like when obtaining IP and
    nameservers from a DHCP server?

  • Where can I find the source code of the DHCP client?


In case there are relevant differences between Linuxes: I am interested in Debian 8.1 (default minimal installation amd64).










share|improve this question

















  • Does the dhcp client on Linux write any logs?

  • If not, can logs be enabled and how?

  • If it writes logs, where can they be found?

  • How does a typical log of a dhcp client look like when obtaining IP and
    nameservers from a DHCP server?

  • Where can I find the source code of the DHCP client?


In case there are relevant differences between Linuxes: I am interested in Debian 8.1 (default minimal installation amd64).







linux dhcp






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 24 '15 at 12:42







Gustave

















asked Jul 24 '15 at 8:50









GustaveGustave

5073822




5073822








  • 1





    You'll need to be more specific than "the dhcp client on Linux". There are plenty of different dhcp clients for Linux and they all log different ways. There's probably a default one for Debian 8.1 though I can't remember what it is.

    – qasdfdsaq
    Jul 24 '15 at 10:58











  • Internet Systems Consortium DHCP Client 4.3.1 Copyright 2004-2014 Internet Systems Consortium. All rights reserved. For info, please visit isc.org/software/dhcp

    – Gustave
    Jul 24 '15 at 12:43
















  • 1





    You'll need to be more specific than "the dhcp client on Linux". There are plenty of different dhcp clients for Linux and they all log different ways. There's probably a default one for Debian 8.1 though I can't remember what it is.

    – qasdfdsaq
    Jul 24 '15 at 10:58











  • Internet Systems Consortium DHCP Client 4.3.1 Copyright 2004-2014 Internet Systems Consortium. All rights reserved. For info, please visit isc.org/software/dhcp

    – Gustave
    Jul 24 '15 at 12:43










1




1





You'll need to be more specific than "the dhcp client on Linux". There are plenty of different dhcp clients for Linux and they all log different ways. There's probably a default one for Debian 8.1 though I can't remember what it is.

– qasdfdsaq
Jul 24 '15 at 10:58





You'll need to be more specific than "the dhcp client on Linux". There are plenty of different dhcp clients for Linux and they all log different ways. There's probably a default one for Debian 8.1 though I can't remember what it is.

– qasdfdsaq
Jul 24 '15 at 10:58













Internet Systems Consortium DHCP Client 4.3.1 Copyright 2004-2014 Internet Systems Consortium. All rights reserved. For info, please visit isc.org/software/dhcp

– Gustave
Jul 24 '15 at 12:43







Internet Systems Consortium DHCP Client 4.3.1 Copyright 2004-2014 Internet Systems Consortium. All rights reserved. For info, please visit isc.org/software/dhcp

– Gustave
Jul 24 '15 at 12:43












3 Answers
3






active

oldest

votes


















5














ISC's DHCP client is usually called dhclient in most Linux distributions. From man dhclient:




The client normally prints no output during its startup sequence. It
can be made to emit verbose messages displaying the startup sequence
events until it has acquired an address by supplying the -v command
line argument. In either case, the client logs messages using the
syslog(3) facility.




There are two possible ways to read your system log. On most systems that use systemd, you have to use journalctl, whereas cat /var/log/syslog is valid for systems that still employ a traditional init system.



Therefore, if your system is using systemd's logging facility, you can use journalctl | grep -Ei 'dhcp' to get DHCP client logs. Otherwise, enter cat /var/log/syslog | grep -Ei 'dhcp'.



Here is what my DHCP client log typically looks like:



Jul 20 14:17:39 trueclient1 NetworkManager[2622]: <info> (wlan1): canceled DHCP transaction, DHCP client pid 3325
Jul 20 14:17:42 trueclient1 NetworkManager[2622]: <info> Activation (wlan1) Beginning DHCPv4 transaction (timeout in 45 seconds)
Jul 20 14:17:42 trueclient1 dhclient: Internet Systems Consortium DHCP Client 4.2.2
Jul 20 14:17:42 trueclient1 dhclient: For info, please visit https://www.isc.org/software/dhcp/
Jul 20 14:17:42 trueclient1 NetworkManager[2622]: <info> (wlan1): DHCPv4 state changed nbi -> preinit
Jul 20 14:17:42 trueclient1 dhclient: DHCPREQUEST on wlan1 to 255.255.255.255 port 67
Jul 20 14:17:42 trueclient1 dhclient: DHCPACK from 10.8.8.1
Jul 20 14:17:42 trueclient1 NetworkManager[2622]: <info> (wlan1): DHCPv4 state changed preinit -> reboot





share|improve this answer



















  • 2





    On Debian 8.1 journalctl works, on ubuntu-14.04.2-server the entries are in /var/log/syslog. Thanks. But: there are only very few entries, for example only the IP adress is logged, the DNS servers are not. Is it possible to configure more verbose output?

    – Gustave
    Jul 28 '15 at 16:01



















1














A hacky (but effective) way to debug dhclient on many Linux platforms is to enable bash tracing in /sbin/dhclient-script.



dhclient runs that script on most OS variants I've checked (RedHat, Debian, etc).



Simply adding -x to the shebang (first line) in that script should enable tracing each line to console, eg:



#!/bin/bash -x


Then you can run, for example



dhclient -r #release lease
dhclient #re-acquire lease


And you should see lots of output, not only from dhclient-script, but from all the included .d scripts in /etc/dhcp*.



The trace output should allow you to figure out what's happening and what decisions the code is making (reference the script itself when looking at the output).



You can usually deduce the inputs (eg parameters including IP, GATEWAY, etc) the script received from this output, but if not, you can temporarily add something like this to the script just before the exit:



   env | logger -t dhclient-debugging


Then check your log after running dhclient (/var/log/messages or /var/log/syslog)






share|improve this answer































    -3














    Please find the answer inline.





    • Does the dhcp client on Linux write any logs?




      Yes, it does.



    • If not, can logs be enabled and how?






     1. Edit dhcpd.conf and add this line
    log-facility local7;

    2. Edit syslog.conf and append
    local7.* /var/log/dhcpd.log







    • If it writes logs, where can they be found?



      /var/log/dhcpd.log








    • How does a typical log of a dhcp client look like when obtaining IP
      and nameservers from a DHCP server?



    galaxy dhcpd: DHCPDISCOVER from 00:0d:62:d7:a0:12 via eth0

    galaxy dhcpd: DHCPOFFER on 192.168.1.5 to 00:0d:62:d7:a0:12 via eth0

    galaxy dhcpd: DHCPREQUEST for 192.168.1.5 (192.168.1.1) from 00:0d:62:d7:a0:12 via eth0

    galaxy dhcpd: DHCPACK on 192.168.1.5 to 00:0d:62:d7:a0:12 via eth0





    • Where can I find the source code of the DHCP client?




      Link 1

      Link 2








    share|improve this answer



















    • 2





      The OP is talking about DHCP client. DHCPD is DHCP server daemon.

      – Larssend
      Jul 24 '15 at 9:26













    • There seems to be no file named dhcpd.conf on my system. There is a file /etc/dhcp/dhclient.conf. There is no file syslog.conf, but a file /etc/rsyslog.conf. I made the configuration changes to those files, restarted rsyslog, shut down eth0, switched it on again. But no log file appears. I get some DHCP messages on the console. Even after a restart of the machine I get no log messages.

      – Gustave
      Jul 24 '15 at 12:13











    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f944687%2fhow-to-see-what-dhcp-client-does%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    5














    ISC's DHCP client is usually called dhclient in most Linux distributions. From man dhclient:




    The client normally prints no output during its startup sequence. It
    can be made to emit verbose messages displaying the startup sequence
    events until it has acquired an address by supplying the -v command
    line argument. In either case, the client logs messages using the
    syslog(3) facility.




    There are two possible ways to read your system log. On most systems that use systemd, you have to use journalctl, whereas cat /var/log/syslog is valid for systems that still employ a traditional init system.



    Therefore, if your system is using systemd's logging facility, you can use journalctl | grep -Ei 'dhcp' to get DHCP client logs. Otherwise, enter cat /var/log/syslog | grep -Ei 'dhcp'.



    Here is what my DHCP client log typically looks like:



    Jul 20 14:17:39 trueclient1 NetworkManager[2622]: <info> (wlan1): canceled DHCP transaction, DHCP client pid 3325
    Jul 20 14:17:42 trueclient1 NetworkManager[2622]: <info> Activation (wlan1) Beginning DHCPv4 transaction (timeout in 45 seconds)
    Jul 20 14:17:42 trueclient1 dhclient: Internet Systems Consortium DHCP Client 4.2.2
    Jul 20 14:17:42 trueclient1 dhclient: For info, please visit https://www.isc.org/software/dhcp/
    Jul 20 14:17:42 trueclient1 NetworkManager[2622]: <info> (wlan1): DHCPv4 state changed nbi -> preinit
    Jul 20 14:17:42 trueclient1 dhclient: DHCPREQUEST on wlan1 to 255.255.255.255 port 67
    Jul 20 14:17:42 trueclient1 dhclient: DHCPACK from 10.8.8.1
    Jul 20 14:17:42 trueclient1 NetworkManager[2622]: <info> (wlan1): DHCPv4 state changed preinit -> reboot





    share|improve this answer



















    • 2





      On Debian 8.1 journalctl works, on ubuntu-14.04.2-server the entries are in /var/log/syslog. Thanks. But: there are only very few entries, for example only the IP adress is logged, the DNS servers are not. Is it possible to configure more verbose output?

      – Gustave
      Jul 28 '15 at 16:01
















    5














    ISC's DHCP client is usually called dhclient in most Linux distributions. From man dhclient:




    The client normally prints no output during its startup sequence. It
    can be made to emit verbose messages displaying the startup sequence
    events until it has acquired an address by supplying the -v command
    line argument. In either case, the client logs messages using the
    syslog(3) facility.




    There are two possible ways to read your system log. On most systems that use systemd, you have to use journalctl, whereas cat /var/log/syslog is valid for systems that still employ a traditional init system.



    Therefore, if your system is using systemd's logging facility, you can use journalctl | grep -Ei 'dhcp' to get DHCP client logs. Otherwise, enter cat /var/log/syslog | grep -Ei 'dhcp'.



    Here is what my DHCP client log typically looks like:



    Jul 20 14:17:39 trueclient1 NetworkManager[2622]: <info> (wlan1): canceled DHCP transaction, DHCP client pid 3325
    Jul 20 14:17:42 trueclient1 NetworkManager[2622]: <info> Activation (wlan1) Beginning DHCPv4 transaction (timeout in 45 seconds)
    Jul 20 14:17:42 trueclient1 dhclient: Internet Systems Consortium DHCP Client 4.2.2
    Jul 20 14:17:42 trueclient1 dhclient: For info, please visit https://www.isc.org/software/dhcp/
    Jul 20 14:17:42 trueclient1 NetworkManager[2622]: <info> (wlan1): DHCPv4 state changed nbi -> preinit
    Jul 20 14:17:42 trueclient1 dhclient: DHCPREQUEST on wlan1 to 255.255.255.255 port 67
    Jul 20 14:17:42 trueclient1 dhclient: DHCPACK from 10.8.8.1
    Jul 20 14:17:42 trueclient1 NetworkManager[2622]: <info> (wlan1): DHCPv4 state changed preinit -> reboot





    share|improve this answer



















    • 2





      On Debian 8.1 journalctl works, on ubuntu-14.04.2-server the entries are in /var/log/syslog. Thanks. But: there are only very few entries, for example only the IP adress is logged, the DNS servers are not. Is it possible to configure more verbose output?

      – Gustave
      Jul 28 '15 at 16:01














    5












    5








    5







    ISC's DHCP client is usually called dhclient in most Linux distributions. From man dhclient:




    The client normally prints no output during its startup sequence. It
    can be made to emit verbose messages displaying the startup sequence
    events until it has acquired an address by supplying the -v command
    line argument. In either case, the client logs messages using the
    syslog(3) facility.




    There are two possible ways to read your system log. On most systems that use systemd, you have to use journalctl, whereas cat /var/log/syslog is valid for systems that still employ a traditional init system.



    Therefore, if your system is using systemd's logging facility, you can use journalctl | grep -Ei 'dhcp' to get DHCP client logs. Otherwise, enter cat /var/log/syslog | grep -Ei 'dhcp'.



    Here is what my DHCP client log typically looks like:



    Jul 20 14:17:39 trueclient1 NetworkManager[2622]: <info> (wlan1): canceled DHCP transaction, DHCP client pid 3325
    Jul 20 14:17:42 trueclient1 NetworkManager[2622]: <info> Activation (wlan1) Beginning DHCPv4 transaction (timeout in 45 seconds)
    Jul 20 14:17:42 trueclient1 dhclient: Internet Systems Consortium DHCP Client 4.2.2
    Jul 20 14:17:42 trueclient1 dhclient: For info, please visit https://www.isc.org/software/dhcp/
    Jul 20 14:17:42 trueclient1 NetworkManager[2622]: <info> (wlan1): DHCPv4 state changed nbi -> preinit
    Jul 20 14:17:42 trueclient1 dhclient: DHCPREQUEST on wlan1 to 255.255.255.255 port 67
    Jul 20 14:17:42 trueclient1 dhclient: DHCPACK from 10.8.8.1
    Jul 20 14:17:42 trueclient1 NetworkManager[2622]: <info> (wlan1): DHCPv4 state changed preinit -> reboot





    share|improve this answer













    ISC's DHCP client is usually called dhclient in most Linux distributions. From man dhclient:




    The client normally prints no output during its startup sequence. It
    can be made to emit verbose messages displaying the startup sequence
    events until it has acquired an address by supplying the -v command
    line argument. In either case, the client logs messages using the
    syslog(3) facility.




    There are two possible ways to read your system log. On most systems that use systemd, you have to use journalctl, whereas cat /var/log/syslog is valid for systems that still employ a traditional init system.



    Therefore, if your system is using systemd's logging facility, you can use journalctl | grep -Ei 'dhcp' to get DHCP client logs. Otherwise, enter cat /var/log/syslog | grep -Ei 'dhcp'.



    Here is what my DHCP client log typically looks like:



    Jul 20 14:17:39 trueclient1 NetworkManager[2622]: <info> (wlan1): canceled DHCP transaction, DHCP client pid 3325
    Jul 20 14:17:42 trueclient1 NetworkManager[2622]: <info> Activation (wlan1) Beginning DHCPv4 transaction (timeout in 45 seconds)
    Jul 20 14:17:42 trueclient1 dhclient: Internet Systems Consortium DHCP Client 4.2.2
    Jul 20 14:17:42 trueclient1 dhclient: For info, please visit https://www.isc.org/software/dhcp/
    Jul 20 14:17:42 trueclient1 NetworkManager[2622]: <info> (wlan1): DHCPv4 state changed nbi -> preinit
    Jul 20 14:17:42 trueclient1 dhclient: DHCPREQUEST on wlan1 to 255.255.255.255 port 67
    Jul 20 14:17:42 trueclient1 dhclient: DHCPACK from 10.8.8.1
    Jul 20 14:17:42 trueclient1 NetworkManager[2622]: <info> (wlan1): DHCPv4 state changed preinit -> reboot






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jul 25 '15 at 7:37









    LarssendLarssend

    2,34121830




    2,34121830








    • 2





      On Debian 8.1 journalctl works, on ubuntu-14.04.2-server the entries are in /var/log/syslog. Thanks. But: there are only very few entries, for example only the IP adress is logged, the DNS servers are not. Is it possible to configure more verbose output?

      – Gustave
      Jul 28 '15 at 16:01














    • 2





      On Debian 8.1 journalctl works, on ubuntu-14.04.2-server the entries are in /var/log/syslog. Thanks. But: there are only very few entries, for example only the IP adress is logged, the DNS servers are not. Is it possible to configure more verbose output?

      – Gustave
      Jul 28 '15 at 16:01








    2




    2





    On Debian 8.1 journalctl works, on ubuntu-14.04.2-server the entries are in /var/log/syslog. Thanks. But: there are only very few entries, for example only the IP adress is logged, the DNS servers are not. Is it possible to configure more verbose output?

    – Gustave
    Jul 28 '15 at 16:01





    On Debian 8.1 journalctl works, on ubuntu-14.04.2-server the entries are in /var/log/syslog. Thanks. But: there are only very few entries, for example only the IP adress is logged, the DNS servers are not. Is it possible to configure more verbose output?

    – Gustave
    Jul 28 '15 at 16:01













    1














    A hacky (but effective) way to debug dhclient on many Linux platforms is to enable bash tracing in /sbin/dhclient-script.



    dhclient runs that script on most OS variants I've checked (RedHat, Debian, etc).



    Simply adding -x to the shebang (first line) in that script should enable tracing each line to console, eg:



    #!/bin/bash -x


    Then you can run, for example



    dhclient -r #release lease
    dhclient #re-acquire lease


    And you should see lots of output, not only from dhclient-script, but from all the included .d scripts in /etc/dhcp*.



    The trace output should allow you to figure out what's happening and what decisions the code is making (reference the script itself when looking at the output).



    You can usually deduce the inputs (eg parameters including IP, GATEWAY, etc) the script received from this output, but if not, you can temporarily add something like this to the script just before the exit:



       env | logger -t dhclient-debugging


    Then check your log after running dhclient (/var/log/messages or /var/log/syslog)






    share|improve this answer




























      1














      A hacky (but effective) way to debug dhclient on many Linux platforms is to enable bash tracing in /sbin/dhclient-script.



      dhclient runs that script on most OS variants I've checked (RedHat, Debian, etc).



      Simply adding -x to the shebang (first line) in that script should enable tracing each line to console, eg:



      #!/bin/bash -x


      Then you can run, for example



      dhclient -r #release lease
      dhclient #re-acquire lease


      And you should see lots of output, not only from dhclient-script, but from all the included .d scripts in /etc/dhcp*.



      The trace output should allow you to figure out what's happening and what decisions the code is making (reference the script itself when looking at the output).



      You can usually deduce the inputs (eg parameters including IP, GATEWAY, etc) the script received from this output, but if not, you can temporarily add something like this to the script just before the exit:



         env | logger -t dhclient-debugging


      Then check your log after running dhclient (/var/log/messages or /var/log/syslog)






      share|improve this answer


























        1












        1








        1







        A hacky (but effective) way to debug dhclient on many Linux platforms is to enable bash tracing in /sbin/dhclient-script.



        dhclient runs that script on most OS variants I've checked (RedHat, Debian, etc).



        Simply adding -x to the shebang (first line) in that script should enable tracing each line to console, eg:



        #!/bin/bash -x


        Then you can run, for example



        dhclient -r #release lease
        dhclient #re-acquire lease


        And you should see lots of output, not only from dhclient-script, but from all the included .d scripts in /etc/dhcp*.



        The trace output should allow you to figure out what's happening and what decisions the code is making (reference the script itself when looking at the output).



        You can usually deduce the inputs (eg parameters including IP, GATEWAY, etc) the script received from this output, but if not, you can temporarily add something like this to the script just before the exit:



           env | logger -t dhclient-debugging


        Then check your log after running dhclient (/var/log/messages or /var/log/syslog)






        share|improve this answer













        A hacky (but effective) way to debug dhclient on many Linux platforms is to enable bash tracing in /sbin/dhclient-script.



        dhclient runs that script on most OS variants I've checked (RedHat, Debian, etc).



        Simply adding -x to the shebang (first line) in that script should enable tracing each line to console, eg:



        #!/bin/bash -x


        Then you can run, for example



        dhclient -r #release lease
        dhclient #re-acquire lease


        And you should see lots of output, not only from dhclient-script, but from all the included .d scripts in /etc/dhcp*.



        The trace output should allow you to figure out what's happening and what decisions the code is making (reference the script itself when looking at the output).



        You can usually deduce the inputs (eg parameters including IP, GATEWAY, etc) the script received from this output, but if not, you can temporarily add something like this to the script just before the exit:



           env | logger -t dhclient-debugging


        Then check your log after running dhclient (/var/log/messages or /var/log/syslog)







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 18 at 19:00









        akomakom

        17514




        17514























            -3














            Please find the answer inline.





            • Does the dhcp client on Linux write any logs?




              Yes, it does.



            • If not, can logs be enabled and how?






             1. Edit dhcpd.conf and add this line
            log-facility local7;

            2. Edit syslog.conf and append
            local7.* /var/log/dhcpd.log







            • If it writes logs, where can they be found?



              /var/log/dhcpd.log








            • How does a typical log of a dhcp client look like when obtaining IP
              and nameservers from a DHCP server?



            galaxy dhcpd: DHCPDISCOVER from 00:0d:62:d7:a0:12 via eth0

            galaxy dhcpd: DHCPOFFER on 192.168.1.5 to 00:0d:62:d7:a0:12 via eth0

            galaxy dhcpd: DHCPREQUEST for 192.168.1.5 (192.168.1.1) from 00:0d:62:d7:a0:12 via eth0

            galaxy dhcpd: DHCPACK on 192.168.1.5 to 00:0d:62:d7:a0:12 via eth0





            • Where can I find the source code of the DHCP client?




              Link 1

              Link 2








            share|improve this answer



















            • 2





              The OP is talking about DHCP client. DHCPD is DHCP server daemon.

              – Larssend
              Jul 24 '15 at 9:26













            • There seems to be no file named dhcpd.conf on my system. There is a file /etc/dhcp/dhclient.conf. There is no file syslog.conf, but a file /etc/rsyslog.conf. I made the configuration changes to those files, restarted rsyslog, shut down eth0, switched it on again. But no log file appears. I get some DHCP messages on the console. Even after a restart of the machine I get no log messages.

              – Gustave
              Jul 24 '15 at 12:13
















            -3














            Please find the answer inline.





            • Does the dhcp client on Linux write any logs?




              Yes, it does.



            • If not, can logs be enabled and how?






             1. Edit dhcpd.conf and add this line
            log-facility local7;

            2. Edit syslog.conf and append
            local7.* /var/log/dhcpd.log







            • If it writes logs, where can they be found?



              /var/log/dhcpd.log








            • How does a typical log of a dhcp client look like when obtaining IP
              and nameservers from a DHCP server?



            galaxy dhcpd: DHCPDISCOVER from 00:0d:62:d7:a0:12 via eth0

            galaxy dhcpd: DHCPOFFER on 192.168.1.5 to 00:0d:62:d7:a0:12 via eth0

            galaxy dhcpd: DHCPREQUEST for 192.168.1.5 (192.168.1.1) from 00:0d:62:d7:a0:12 via eth0

            galaxy dhcpd: DHCPACK on 192.168.1.5 to 00:0d:62:d7:a0:12 via eth0





            • Where can I find the source code of the DHCP client?




              Link 1

              Link 2








            share|improve this answer



















            • 2





              The OP is talking about DHCP client. DHCPD is DHCP server daemon.

              – Larssend
              Jul 24 '15 at 9:26













            • There seems to be no file named dhcpd.conf on my system. There is a file /etc/dhcp/dhclient.conf. There is no file syslog.conf, but a file /etc/rsyslog.conf. I made the configuration changes to those files, restarted rsyslog, shut down eth0, switched it on again. But no log file appears. I get some DHCP messages on the console. Even after a restart of the machine I get no log messages.

              – Gustave
              Jul 24 '15 at 12:13














            -3












            -3








            -3







            Please find the answer inline.





            • Does the dhcp client on Linux write any logs?




              Yes, it does.



            • If not, can logs be enabled and how?






             1. Edit dhcpd.conf and add this line
            log-facility local7;

            2. Edit syslog.conf and append
            local7.* /var/log/dhcpd.log







            • If it writes logs, where can they be found?



              /var/log/dhcpd.log








            • How does a typical log of a dhcp client look like when obtaining IP
              and nameservers from a DHCP server?



            galaxy dhcpd: DHCPDISCOVER from 00:0d:62:d7:a0:12 via eth0

            galaxy dhcpd: DHCPOFFER on 192.168.1.5 to 00:0d:62:d7:a0:12 via eth0

            galaxy dhcpd: DHCPREQUEST for 192.168.1.5 (192.168.1.1) from 00:0d:62:d7:a0:12 via eth0

            galaxy dhcpd: DHCPACK on 192.168.1.5 to 00:0d:62:d7:a0:12 via eth0





            • Where can I find the source code of the DHCP client?




              Link 1

              Link 2








            share|improve this answer













            Please find the answer inline.





            • Does the dhcp client on Linux write any logs?




              Yes, it does.



            • If not, can logs be enabled and how?






             1. Edit dhcpd.conf and add this line
            log-facility local7;

            2. Edit syslog.conf and append
            local7.* /var/log/dhcpd.log







            • If it writes logs, where can they be found?



              /var/log/dhcpd.log








            • How does a typical log of a dhcp client look like when obtaining IP
              and nameservers from a DHCP server?



            galaxy dhcpd: DHCPDISCOVER from 00:0d:62:d7:a0:12 via eth0

            galaxy dhcpd: DHCPOFFER on 192.168.1.5 to 00:0d:62:d7:a0:12 via eth0

            galaxy dhcpd: DHCPREQUEST for 192.168.1.5 (192.168.1.1) from 00:0d:62:d7:a0:12 via eth0

            galaxy dhcpd: DHCPACK on 192.168.1.5 to 00:0d:62:d7:a0:12 via eth0





            • Where can I find the source code of the DHCP client?




              Link 1

              Link 2









            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jul 24 '15 at 9:12









            Ruban SavvyRuban Savvy

            1214




            1214








            • 2





              The OP is talking about DHCP client. DHCPD is DHCP server daemon.

              – Larssend
              Jul 24 '15 at 9:26













            • There seems to be no file named dhcpd.conf on my system. There is a file /etc/dhcp/dhclient.conf. There is no file syslog.conf, but a file /etc/rsyslog.conf. I made the configuration changes to those files, restarted rsyslog, shut down eth0, switched it on again. But no log file appears. I get some DHCP messages on the console. Even after a restart of the machine I get no log messages.

              – Gustave
              Jul 24 '15 at 12:13














            • 2





              The OP is talking about DHCP client. DHCPD is DHCP server daemon.

              – Larssend
              Jul 24 '15 at 9:26













            • There seems to be no file named dhcpd.conf on my system. There is a file /etc/dhcp/dhclient.conf. There is no file syslog.conf, but a file /etc/rsyslog.conf. I made the configuration changes to those files, restarted rsyslog, shut down eth0, switched it on again. But no log file appears. I get some DHCP messages on the console. Even after a restart of the machine I get no log messages.

              – Gustave
              Jul 24 '15 at 12:13








            2




            2





            The OP is talking about DHCP client. DHCPD is DHCP server daemon.

            – Larssend
            Jul 24 '15 at 9:26







            The OP is talking about DHCP client. DHCPD is DHCP server daemon.

            – Larssend
            Jul 24 '15 at 9:26















            There seems to be no file named dhcpd.conf on my system. There is a file /etc/dhcp/dhclient.conf. There is no file syslog.conf, but a file /etc/rsyslog.conf. I made the configuration changes to those files, restarted rsyslog, shut down eth0, switched it on again. But no log file appears. I get some DHCP messages on the console. Even after a restart of the machine I get no log messages.

            – Gustave
            Jul 24 '15 at 12:13





            There seems to be no file named dhcpd.conf on my system. There is a file /etc/dhcp/dhclient.conf. There is no file syslog.conf, but a file /etc/rsyslog.conf. I made the configuration changes to those files, restarted rsyslog, shut down eth0, switched it on again. But no log file appears. I get some DHCP messages on the console. Even after a restart of the machine I get no log messages.

            – Gustave
            Jul 24 '15 at 12:13


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f944687%2fhow-to-see-what-dhcp-client-does%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Plaza Victoria

            In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

            How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...