1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Get rid if "DHCP INFORM"

Discussion in 'Tomato Firmware' started by kthaddock, Jul 18, 2013.

  1. kthaddock

    kthaddock Network Guru Member

    If you want to get rid of dhcp inform in log from dnsmasq, put this in your custom box.
     
  2. Planiwa

    Planiwa LI Guru Member

  3. JAC70

    JAC70 Networkin' Nut Member

    I just use quiet-dhcp
     
  4. kthaddock

    kthaddock Network Guru Member

  5. Daky

    Daky Network Guru Member

    Hello kthaddock,

    Is this the same?

    Jul 18 14:49:28 home daemon.info dnsmasq-dhcp[795]: RTR-ADVERT(br0) : ipv6 address
    Jul 18 14:49:44 home daemon.info dnsmasq-dhcp[795]: RTR-ADVERT(br0) : ipv6 address
    Jul 18 14:49:50 home daemon.info dnsmasq-dhcp[795]: RTR-ADVERT(br0) : ipv6 address

    I never seen this before for ipv6, is this okay? nothing broken? and also i can hide this with dhcp-option=252,"\n"?

    Thanks :)
     
  6. koitsu

    koitsu Network Guru Member

    Search the web for the string "RTR-ADVERT" and you will find quite a lot of discussion about this, particularly with the author of dnsmasq, and with this forum's own Kevin Darbyshire-Bryant. dnsmasq at some point was modified/upgraded to support IPv6 RA announcements and other things. I believe RTR-ADVERT is an indication that it's advertising an IPv6 router prefix or endpoint; I'm not sure how or why it's saying "dnsmasq-dhcp" on it, although it may be a DHCPv6 (that's DHCP over IPv6, which is extremely different than DHCP over IPv4). I really don't know.

    As to your question -- will dhcp-option=252,"\n" squelch the logging line there -- the answer is no. Proof of that is here (please read it in full, very carefully, do not skim it).
     
  7. Daky

    Daky Network Guru Member

    sounds good, thank you!
     
  8. Victek

    Victek Network Guru Member

  9. jerrm

    jerrm Network Guru Member

    Those options only stop the log entries.

    Kthaddock's suggestion will fix the root problem and prevent the pointless network chatter.
     
  10. Monk E. Boy

    Monk E. Boy Network Guru Member

    Not exactly. They do two different things. Without quiet-dhcp the router will log all the DHCP ACKs and REQs and everything else (including INFORMs), which tends to fill up the logfiles. 252 stops Windows from constantly asking for a proxy server by telling it, basically, that no such server exists on the network. It stops the pointless network chatter regarding proxy servers and INFORM logging.

    If you just did option 252 and not quiet-dhcp your log would still be full of ACKs and REQs, and if you did quiet-dhcp without option 252 your router would still be pestered by Windows constantly for a proxy server but the logs wouldn't contain any DHCP messages (including INFORMs, which are still taking place).

    If you do both the (to me, at least) ridiculous amount of ACKs and REQs that take place on a wireless network would still continue unabated, as they do under quiet-dhcp, all that's going away is the pointless chatter related to proxy servers and the slightly overzealous logging.
     
  11. jerrm

    jerrm Network Guru Member

    Routine ACKS and REQS are valuable to me, and a trivial part of my logs by line count, but yes, if you want to eliminate them then quiet-dhcp is the answer. The thread is about INFORM though, and quiet-dhcp is the wrong answer for that problem in most instances - it is only hiding the problem.
     
  12. koitsu

    koitsu Network Guru Member

    It's interesting that this quiet-dhcp feature isn't documented in the dnsmasq docs anywhere. And I don't think log-dhcp implies that DHCP logging is disabled by default (the docs read as if to say only DHCP options themselves are not logged by default, and I do not understand what the author means by that, as DHCP options are submitted and negotiated at multiple stages of DHCP other than just REQ/ACK).
     
  13. jerrm

    jerrm Network Guru Member

    IIRC (with a big IF), quiet-dhcp started as a tomato patch, I think it made it's way back to the source.

    log-dhcp generates much more detailed logs, ie:
    Code:
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 DHCPDISCOVER(br0) 3c:bd:xx:xx:xx:xx
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 tags: known, br0
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 DHCPOFFER(br0) 192.168.0.555 3c:bd:xx:xx:xx:xx
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 requested options: 1:netmask, 3:router, 15:domain-name, 6:dns-server,
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 requested options: 12:hostname, 28:broadcast
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 next server: 192.168.0.1
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 sent size:  1 option: 53 message-type  2
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 sent size:  4 option: 54 server-identifier  192.168.0.1
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 sent size:  4 option: 51 lease-time  1d
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 sent size:  4 option: 58 T1  12h
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 sent size:  4 option: 59 T2  21h
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 sent size:  4 option:  1 netmask  255.255.255.0
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 sent size:  4 option: 28 broadcast  192.168.0.255
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 sent size:  4 option:  6 dns-server  192.168.0.1
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 sent size:  4 option:  3 router  192.168.0.1
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 available DHCP range: 192.168.0.101 -- 192.168.0.199
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 DHCPREQUEST(br0) 192.168.0.555 3c:bd:xx:xx:xx:xx
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 tags: known, br0
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 DHCPACK(br0) 192.168.0.555 3c:bd:xx:xx:xx:xx LGTV
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 requested options: 1:netmask, 3:router, 15:domain-name, 6:dns-server,
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 requested options: 12:hostname, 28:broadcast
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 next server: 192.168.0.1
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 sent size:  1 option: 53 message-type  5
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 sent size:  4 option: 54 server-identifier  192.168.0.1
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 sent size:  4 option: 51 lease-time  1d
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 sent size:  4 option: 58 T1  12h
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 sent size:  4 option: 59 T2  21h
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 sent size:  4 option:  1 netmask  255.255.255.0
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 sent size:  4 option: 28 broadcast  192.168.0.255
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 sent size:  4 option:  6 dns-server  192.168.0.1
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 sent size:  4 option: 12 hostname  LGTV
    Jul 18 20:11:16 RTN66U daemon.info dnsmasq-dhcp[8712]: 1870425160 sent size:  4 option:  3 router  192.168.0.1
    
    Standard logging is much more abbreviated:
    Code:
    Jul 18 21:37:20 RTN66U daemon.info dnsmasq-dhcp[2247]: DHCPDISCOVER(br0) 192.168.0.555 3c:bd:xx:xx:xx:xx
    Jul 18 21:37:20 RTN66U daemon.info dnsmasq-dhcp[2247]: DHCPOFFER(br0) 192.168.0.555 3c:bd:xx:xx:xx:xx
    Jul 18 21:37:20 RTN66U daemon.info dnsmasq-dhcp[2247]: DHCPREQUEST(br0) 192.168.0.555 3c:bd:xx:xx:xx:xx
    Jul 18 21:37:20 RTN66U daemon.info dnsmasq-dhcp[2247]: DHCPACK(br0) 192.168.0.555 3c:bd:xx:xx:xx:xx LGTV
    
    quiet-dhcp eliminates virtually all routine messages.
     
  14. koitsu

    koitsu Network Guru Member

    Well if it "made its way back to the source" then the option isn't documented in the official source man page. :) This makes it hard, aside from looking at the actual code, to determine what quiet-dhcp actually squelches.
     
  15. jerrm

    jerrm Network Guru Member

    As I said it was a big "IF," I may be 100% wrong. Confusing other bits from the hazy fog of past forum posts rattling around my mind. Not concerned enough to go searching at this point.
     
  16. Monk E. Boy

    Monk E. Boy Network Guru Member

    Here's teddy_b's original quiet-dhcp commit.

    At least it's less reading than the complete source.

    Based on my poor understanding of C, it looks like it routes all logging created by dnsmasq that containing the string DHCP to /dev/null or its functional equivalent.
     
  17. jerrm

    jerrm Network Guru Member

    A quick grep of the source at thekelleys.org.uk does not contain "quiet" at all, so the option still seems to be tomato-specific (and I was wrong - don't tell my wife).
     
  18. Toastman

    Toastman Super Moderator Staff Member Member

    I remember Teddy adding this, I think he wrote it himself, and I don't remember ever seeing it make it back to the source, although I think he did submit it.
     
  19. kthaddock

    kthaddock Network Guru Member

    But this solution breaks :
     
  20. jerrm

    jerrm Network Guru Member

    ?????
     
  21. Monk E. Boy

    Monk E. Boy Network Guru Member

    The option doesn't technically break auto-configuration, since option 252 controls proxy auto-configuration, so you're entering in \n as the value for it. If you want proxy auto-configuration, then enter in whatever value you want instead of \n. For everyone who doesn't use a proxy \n cuts down on unnecessary logspam.
     
  22. RMerlin

    RMerlin Network Guru Member

    I think the point was if this was added as a default setting in the FW, it would prevent someone from easily overriding it.
     
  23. jerrm

    jerrm Network Guru Member

    I don't see anyone suggesting it as the default, but I wouldn't want that either. Yes, that could break auto-discovery if no option (checkbox/etc) is provided to disable.

    But... Setting up an auto-discovered proxy requires a fair amount of planning. The Tomato admin should know if one is in use. I can think of scenarios where that might not be the case, but it's a stretch, and the proxy probably wouldn't be the only issue if the person setting up the router doesn't know the environment.
     

Share This Page