Send dhcp-users mailing list submissions to
        dhcp-users@lists.isc.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.isc.org/mailman/listinfo/dhcp-users
or, via email, send a message with subject or body 'help' to
        dhcp-users-requ...@lists.isc.org

You can reach the person managing the list at
        dhcp-users-ow...@lists.isc.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of dhcp-users digest..."


Today's Topics:

   1. Re: dhcp-users Digest, Vol 146, Issue 10 (Patrick Fortin)
   2. Re: [*SP4M*] DHCPd only updating the forward zone (Dan Egli)
   3. Re: dhcp-users Digest, Vol 146, Issue 10 (Dan Egli)
   4. Re: DHCPd using wrong interface (Dan Egli)
   5. Re: DHCPd using wrong interface (glenn.satch...@uniq.com.au)
   6. [PATCH] fix dhcp log concurrency problem (QiuXi)
   7. Re: [PATCH] fix dhcp log concurrency problem (Rongxing Liu)


----------------------------------------------------------------------

Message: 1
Date: Tue, 22 Dec 2020 08:11:04 -0500
From: Patrick Fortin <patrick.for...@derytelecom.ca>
To: dhcp-users@lists.isc.org
Subject: Re: dhcp-users Digest, Vol 146, Issue 10
Message-ID: <cd05efdd-5afa-622b-edcf-bc59a7496...@derytelecom.ca>
Content-Type: text/plain; charset=utf-8; format=flowed

Hi

did you try switching the configurations between the two ethernet card ?

setting 192.168.10.2 on the enp0s3 card

Patrick

Le 2020-12-22 ? 07:00, dhcp-users-requ...@lists.isc.org a ?crit?:
> Send dhcp-users mailing list submissions to
>       dhcp-users@lists.isc.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>       https://lists.isc.org/mailman/listinfo/dhcp-users
> or, via email, send a message with subject or body 'help' to
>       dhcp-users-requ...@lists.isc.org
>
> You can reach the person managing the list at
>       dhcp-users-ow...@lists.isc.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of dhcp-users digest..."
>
>
> Today's Topics:
>
>     1. Re: DHCPd using wrong interface (glenn.satch...@uniq.com.au)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 22 Dec 2020 19:07:49 +1100
> From: glenn.satch...@uniq.com.au
> To: Users of ISC DHCP <dhcp-users@lists.isc.org>
> Subject: Re: DHCPd using wrong interface
> Message-ID: <29f54c1862d58af057494ac6f54b1...@uniq.com.au>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> Hi Dan
>
> Which bind server is it trying to update? Those updates are sent as
> unicast packets and are subject to normal routing rules. Perhaps it's
> trying to update the ISP's DNS server?
>
> Can you use tcpdump to see what the destination IP address is?
>
> regards,
> Glenn
>
> On 2020-12-19 18:23, Dan Egli wrote:
>> I am completely stumped on how to solve this one. I have a machine
>> with two NICs. It's my gateway machine between my home private LAN and
>> the internet. The gateway machine has enp0s3 with an address of
>> 10.0.2.15 as it's world facing address (yes, my ISP wants to run
>> everything through NAT. Don't ask me why). The LAN address range is
>> `192.168.10.0/24 on enp0s8.? I configured dhcpd to completely ignore
>> anything coming from 10.0.0.0/8, and I even have enp0s8 listed on the
>> command line (and NOT enp0s3). Yet when dhcpd tries to send update
>> requests to bind, it keeps using the 10.0.2.15 address, which bind
>> properly refuses to listen to. How do I make dhcpd send messages from
>> enp0s8's 192.168.10.2 address vs the 10.0.2.15 address?
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> ISC funds the development of this software with paid support subscriptions. 
> Contact us at https://www.isc.org/contact/ for more information.
>
> dhcp-users mailing list
> dhcp-users@lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
>
>
> ------------------------------
>
> End of dhcp-users Digest, Vol 146, Issue 10
> *******************************************


------------------------------

Message: 2
Date: Tue, 22 Dec 2020 07:48:02 -0700
From: Dan Egli <d...@newideatest.site>
To: Users of ISC DHCP <dhcp-users@lists.isc.org>
Subject: Re: [*SP4M*] DHCPd only updating the forward zone
Message-ID: <X+IG9z5QdFeuOed3@terra>
Content-Type: text/plain; charset=us-ascii

Actually, the issue at hand is that there is no trace of venus left at all. I 
killed dhcpd and named, then removed the journal files and ensured that venus 
wasn't listed in the main zone file (it wasn't). Then I removed the 
dhcpd.leases file and created a new one. After restarting bind and dhcpd I 
rebooted venus (which is only booting from a RO squashfs at the moment), and 
let it request an address. What you see below is what the logs show. DHCPd 
didn't even TRY to register it, even though as far as it's config files can 
tell this is a brand new registration.

I thought it should work too. So why is dhcpd not even trying to add the 
machine to the DNS?

On Mon, Dec 21, 2020 at 11:27:54AM +0000, Simon Hobson wrote:
> Dan Egli <d...@newideatest.site> wrote:
> 
> >> What do the logs for both DNS and DHCP show when this happens ?
> >> 
> >> 
> > dhcpd.log:
> > Dec 20 20:55:57 pluto dhcpd[1129]: DHCPDISCOVER from 08:00:27:03:d3:23 via 
> > enp0s8
> > Dec 20 20:55:58 pluto dhcpd[1129]: DHCPOFFER on 192.168.10.128 to 
> > 08:00:27:03:d3:23 (venus) via enp0s8
> > Dec 20 20:55:58 pluto dhcpd[1129]: DHCPREQUEST for 192.168.10.128 
> > (192.168.10.1) from 08:00:27:03:d3:23 (venus) via enp0s8
> > Dec 20 20:55:58 pluto dhcpd[1129]: DHCPACK on 192.168.10.128 to 
> > 08:00:27:03:d3:23 (venus) via enp0s8
> > 
> > No entries at all in named.log now that it's started not making dynamic 
> > updates at all. The named.log shows startup messages, and nothing else.
> 
> That would be normal - once the DNS is updated, dhcpd won't send further 
> updates until something changes - such as a lease timing out or being 
> released. You could either release the lease from the client, let it expire, 
> or shut down dhcpd and manually remove the DNS entries from the lease.
> 
> What we're looking for is to see if dhcpd tries to update and fails, or 
> doesn't try at all.
> 
> > As to the name server, it would be pluto actually, not jupiter.
> 
> Oops, my mistake there.
> 
> 
> > I don't know what's up, but there's no update of DNS at all right now. I'm 
> > stumped. As far as I can tell, all is fine in the config.
> 
> Yes, it all looks fine and should "just work automagically"
> 
> 
> What should happen is dhcpd looks up the SOA record for the zone (sorry, I 
> should have asked for that rather than NS records) to find the primary 
> authoritative name server for the relevant zone - it will then send updates 
> to that server. I can see from your previous message that pluto is given in 
> both zones - so both updates should work. As far as I can see, everything is 
> setup correctly for this to work.
> 
> There is an argument for using signed zone updates - but IMO that's not 
> really necessary for a small home setup like this. There you define a key, 
> add zone directives to the dhcp config, and reference the key (rather than an 
> IP based ACL) in the allow updates directives in your dns setup.



------------------------------

Message: 3
Date: Tue, 22 Dec 2020 07:51:38 -0700
From: Dan Egli <d...@newideatest.site>
To: Users of ISC DHCP <dhcp-users@lists.isc.org>
Subject: Re: dhcp-users Digest, Vol 146, Issue 10
Message-ID: <X+IH7224nKzgEgCA@terra>
Content-Type: text/plain; charset=us-ascii

On Tue, Dec 22, 2020 at 08:11:04AM -0500, Patrick Fortin wrote:
> Hi
> 
> did you try switching the configurations between the two ethernet card ?
> 
> setting 192.168.10.2 on the enp0s3 card
I suppose I could try that. Seems rather pointless to simply reverse the cards, 
but stranger things have happened. I'll try that and get back to you.




------------------------------

Message: 4
Date: Tue, 22 Dec 2020 08:43:14 -0700
From: Dan Egli <d...@newideatest.site>
To: Users of ISC DHCP <dhcp-users@lists.isc.org>
Subject: Re: DHCPd using wrong interface
Message-ID: <X+IUEkszCGN+fHm+@terra>
Content-Type: text/plain; charset=us-ascii

On Tue, Dec 22, 2020 at 07:07:49PM +1100, glenn.satch...@uniq.com.au wrote:
> Hi Dan
> 
> Which bind server is it trying to update? Those updates are sent as 
> unicast packets and are subject to normal routing rules. Perhaps it's 
> trying to update the ISP's DNS server?
> 
> Can you use tcpdump to see what the destination IP address is?

That may be workable. I'm actually away from the machines until much later 
tonight. The only question I have is how to use tcpdump as I've never used it 
before. I take it from reading the man page that I just run tcpdump while a 
machine is obtaining a lease on an IP?

Sorry, I'm still learning a lot. 



------------------------------

Message: 5
Date: Wed, 23 Dec 2020 14:00:11 +1100
From: glenn.satch...@uniq.com.au
To: Users of ISC DHCP <dhcp-users@lists.isc.org>
Subject: Re: DHCPd using wrong interface
Message-ID: <8803fe32522746d9a6df61e0251aa...@uniq.com.au>
Content-Type: text/plain; charset=US-ASCII; format=flowed

Hi Dan,

Typically something like this, replace eth0 with the interface you want 
to trace packets on. If you have wireshark you can use that instead. 
There's all sorts of filtering you can apply, but if traffic is light 
this will be sufficient.

tcpdump -i eth0

regards,
Glenn

On 2020-12-23 02:43, Dan Egli wrote:
> On Tue, Dec 22, 2020 at 07:07:49PM +1100, glenn.satch...@uniq.com.au 
> wrote:
>> Hi Dan
>> 
>> Which bind server is it trying to update? Those updates are sent as
>> unicast packets and are subject to normal routing rules. Perhaps it's
>> trying to update the ISP's DNS server?
>> 
>> Can you use tcpdump to see what the destination IP address is?
> 
> That may be workable. I'm actually away from the machines until much
> later tonight. The only question I have is how to use tcpdump as I've
> never used it before. I take it from reading the man page that I just
> run tcpdump while a machine is obtaining a lease on an IP?
> 
> Sorry, I'm still learning a lot.
> 
> _______________________________________________
> ISC funds the development of this software with paid support
> subscriptions. Contact us at https://www.isc.org/contact/ for more
> information.
> 
> dhcp-users mailing list
> dhcp-users@lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users


------------------------------

Message: 6
Date: Wed, 23 Dec 2020 11:20:27 +0800
From: QiuXi <qiu...@huawei.com>
To: <dhcp-users@lists.isc.org>
Cc: <wangfangpe...@huawei.com>, <zhongju...@huawei.com>,
        <zengwei...@huawei.com>
Subject: [PATCH] fix dhcp log concurrency problem
Message-ID: <20201223032027.126406-1-qiu...@huawei.com>
Content-Type: text/plain

When running dhcp client on Linux, it gets corrupted randomly.
Then we found in function log_debug/log_info/log_error..,there exists
a concurrency problem, now to fix it.

modified:   omapip/errwarn.c

diff --git a/omapip/errwarn.c b/omapip/errwarn.c
index 6317fe4c..46d13fe9 100644
--- a/omapip/errwarn.c
+++ b/omapip/errwarn.c
@@ -45,14 +45,14 @@ int log_perror = 1;
 void (*log_cleanup) (void);
 
 #define CVT_BUF_MAX 1023
-static char mbuf [CVT_BUF_MAX + 1];
-static char fbuf [CVT_BUF_MAX + 1];
 
 /* Log an error message, then exit... */
 
 void log_fatal (const char * fmt, ... )
 {
   va_list list;
+  char mbuf [CVT_BUF_MAX + 1];
+  char fbuf [CVT_BUF_MAX + 1];
 
   do_percentm (fbuf, sizeof fbuf, fmt);
 
@@ -92,6 +92,8 @@ void log_fatal (const char * fmt, ... )
 int log_error (const char * fmt, ...)
 {
   va_list list;
+  char mbuf [CVT_BUF_MAX + 1];
+  char fbuf [CVT_BUF_MAX + 1];
 
   do_percentm (fbuf, sizeof fbuf, fmt);
 
@@ -119,6 +121,8 @@ int log_error (const char * fmt, ...)
 int log_info (const char *fmt, ...)
 {
   va_list list;
+  char mbuf [CVT_BUF_MAX + 1];
+  char fbuf [CVT_BUF_MAX + 1];
 
   do_percentm (fbuf, sizeof fbuf, fmt);
 
@@ -146,6 +150,8 @@ int log_info (const char *fmt, ...)
 int log_debug (const char *fmt, ...)
 {
   va_list list;
+  char mbuf [CVT_BUF_MAX + 1];
+  char fbuf [CVT_BUF_MAX + 1];
 
   do_percentm (fbuf, sizeof fbuf, fmt);
 
-- 
2.12.3



------------------------------

Message: 7
Date: Wed, 23 Dec 2020 11:32:11 +0800
From: Rongxing Liu <mot...@liurongxing.com>
To: Users of ISC DHCP <dhcp-users@lists.isc.org>
Cc: wangfangpe...@huawei.com, zengwei...@huawei.com,
        zhongju...@huawei.com
Subject: Re: [PATCH] fix dhcp log concurrency problem
Message-ID:
        <capzsm2a6c0ltsgs92gwyyrt_qa5f9vcmc1ie8h+e6rxt2q8...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Nice patch!

On Wed, Dec 23, 2020 at 11:21 AM QiuXi <qiu...@huawei.com> wrote:

> When running dhcp client on Linux, it gets corrupted randomly.
> Then we found in function log_debug/log_info/log_error..,there exists
> a concurrency problem, now to fix it.
>
> modified:   omapip/errwarn.c
>
> diff --git a/omapip/errwarn.c b/omapip/errwarn.c
> index 6317fe4c..46d13fe9 100644
> --- a/omapip/errwarn.c
> +++ b/omapip/errwarn.c
> @@ -45,14 +45,14 @@ int log_perror = 1;
>  void (*log_cleanup) (void);
>
>  #define CVT_BUF_MAX 1023
> -static char mbuf [CVT_BUF_MAX + 1];
> -static char fbuf [CVT_BUF_MAX + 1];
>
>  /* Log an error message, then exit... */
>
>  void log_fatal (const char * fmt, ... )
>  {
>    va_list list;
> +  char mbuf [CVT_BUF_MAX + 1];
> +  char fbuf [CVT_BUF_MAX + 1];
>
>    do_percentm (fbuf, sizeof fbuf, fmt);
>
> @@ -92,6 +92,8 @@ void log_fatal (const char * fmt, ... )
>  int log_error (const char * fmt, ...)
>  {
>    va_list list;
> +  char mbuf [CVT_BUF_MAX + 1];
> +  char fbuf [CVT_BUF_MAX + 1];
>
>    do_percentm (fbuf, sizeof fbuf, fmt);
>
> @@ -119,6 +121,8 @@ int log_error (const char * fmt, ...)
>  int log_info (const char *fmt, ...)
>  {
>    va_list list;
> +  char mbuf [CVT_BUF_MAX + 1];
> +  char fbuf [CVT_BUF_MAX + 1];
>
>    do_percentm (fbuf, sizeof fbuf, fmt);
>
> @@ -146,6 +150,8 @@ int log_info (const char *fmt, ...)
>  int log_debug (const char *fmt, ...)
>  {
>    va_list list;
> +  char mbuf [CVT_BUF_MAX + 1];
> +  char fbuf [CVT_BUF_MAX + 1];
>
>    do_percentm (fbuf, sizeof fbuf, fmt);
>
> --
> 2.12.3
>
> _______________________________________________
> ISC funds the development of this software with paid support
> subscriptions. Contact us at https://www.isc.org/contact/ for more
> information.
>
> dhcp-users mailing list
> dhcp-users@lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<https://lists.isc.org/pipermail/dhcp-users/attachments/20201223/267ae440/attachment.htm>

------------------------------

Subject: Digest Footer

_______________________________________________
ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
dhcp-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users


------------------------------

End of dhcp-users Digest, Vol 146, Issue 11
*******************************************

Reply via email to