Re: dhclient not renewing

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: dhclient not renewing

Mihai Popescu-3
> Upgraded to latest current snapshot, and it looks like dhclient doesn't renew the ip anymore. I'm  > running it in debug mode now, to see if there is anything in the log.

Thank you for letting people know.
It will take forever if it is not correctly setup.

http://www.openbsd.org/faq/faq1.html#MailLists
http://www.openbsd.org/faq/faq1.html#Bugs
http://www.openbsd.org/report.html

Reply | Threaded
Open this post in threaded view
|

Re: dhclient not renewing

Christer Solskogen-3
On Sat, Feb 10, 2018 at 8:44 PM, Mihai Popescu <[hidden email]> wrote:

> > Upgraded to latest current snapshot, and it looks like dhclient doesn't
> renew the ip anymore. I'm  > running it in debug mode now, to see if there
> is anything in the log.
>
> Thank you for letting people know.
> It will take forever if it is not correctly setup.
>
> http://www.openbsd.org/faq/faq1.html#MailLists
> http://www.openbsd.org/faq/faq1.html#Bugs
> http://www.openbsd.org/report.html
>
>
em2: DHCPREQUEST to 255.255.255.255
em2: DHCPACK from 51.174.112.1 (00:02:00:01:00:01)
em2: invalid host name in host-name
em2: bound to 51.174.196.170 from 51.174.112.1 (00:02:00:01:00:01)



em2: DHCPREQUEST to 51.174.112.1
em2: DHCPNAK from 51.174.112.1 (00:02:00:01:00:01)
em2: DHCPDISCOVER - interval 1
em2: DHCPDISCOVER - interval 1
em2: DHCPOFFER from 51.174.112.1 (00:02:00:01:00:01)
em2: invalid host name in host-name
em2: DHCPREQUEST to 255.255.255.255
em2: DHCPACK from 51.174.112.1 (00:02:00:01:00:01)
em2: invalid host name in host-name
em2 [priv]: writev(RTM_GET) - no default route
em2 [priv]: writev(RTM_GET) - no default route
em2 [priv]: writev(RTM_GET) - no default route


OpenBSD 6.2-current (GENERIC.MP) #0: Sat Feb 10 00:05:49 MST 2018
    [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP

my dhclient.conf looks like this:

interface "em2"
{
        supersede host-name "hugs";
        supersede domain-name "antarctica.no";
        supersede domain-name-servers 192.168.0.1, 192.168.0.4;
}
Reply | Threaded
Open this post in threaded view
|

Re: dhclient not renewing

Edgar Pettijohn III-2


On 02/10/18 15:43, Christer Solskogen wrote:

> On Sat, Feb 10, 2018 at 8:44 PM, Mihai Popescu <[hidden email]> wrote:
>
>>> Upgraded to latest current snapshot, and it looks like dhclient doesn't
>> renew the ip anymore. I'm  > running it in debug mode now, to see if there
>> is anything in the log.
>>
>> Thank you for letting people know.
>> It will take forever if it is not correctly setup.
>>
>> http://www.openbsd.org/faq/faq1.html#MailLists
>> http://www.openbsd.org/faq/faq1.html#Bugs
>> http://www.openbsd.org/report.html
>>
>>
> em2: DHCPREQUEST to 255.255.255.255
> em2: DHCPACK from 51.174.112.1 (00:02:00:01:00:01)
> em2: invalid host name in host-name
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

> em2: bound to 51.174.196.170 from 51.174.112.1 (00:02:00:01:00:01)
>
>
>
> em2: DHCPREQUEST to 51.174.112.1
> em2: DHCPNAK from 51.174.112.1 (00:02:00:01:00:01)
> em2: DHCPDISCOVER - interval 1
> em2: DHCPDISCOVER - interval 1
> em2: DHCPOFFER from 51.174.112.1 (00:02:00:01:00:01)
> em2: invalid host name in host-name
> em2: DHCPREQUEST to 255.255.255.255
> em2: DHCPACK from 51.174.112.1 (00:02:00:01:00:01)
> em2: invalid host name in host-name
> em2 [priv]: writev(RTM_GET) - no default route
> em2 [priv]: writev(RTM_GET) - no default route
> em2 [priv]: writev(RTM_GET) - no default route
>
>
> OpenBSD 6.2-current (GENERIC.MP) #0: Sat Feb 10 00:05:49 MST 2018
>      [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
>
> my dhclient.conf looks like this:
>
> interface "em2"
> {
>          supersede host-name "hugs";
try:
supersede host-name "my.hugs";
>          supersede domain-name "antarctica.no";
>          supersede domain-name-servers 192.168.0.1, 192.168.0.4;
> }

Reply | Threaded
Open this post in threaded view
|

Re: dhclient not renewing

Christer Solskogen-3
On Sat, Feb 10, 2018 at 11:16 PM, Edgar Pettijohn <[hidden email]>
wrote:

> try:
> supersede host-name "my.hugs";
>
>
Still same warning. But I think this comes from the dhcp server of my ISP.
Even without the options it says so.
Reply | Threaded
Open this post in threaded view
|

Re: dhclient not renewing

Edgar Pettijohn III-2
In reply to this post by Mihai Popescu-3

On Feb 10, 2018 5:07 PM, Christer Solskogen <[hidden email]> wrote:

>
> On Sat, Feb 10, 2018 at 11:16 PM, Edgar Pettijohn <[hidden email]>
> wrote:
>
> > try:
> > supersede host-name "my.hugs";
> >
> >
> Still same warning. But I think this comes from the dhcp server of my ISP.
> Even without the options it says so.

What is the output of:

$ hostname

Reply | Threaded
Open this post in threaded view
|

Re: dhclient not renewing

Christer Solskogen-3
In reply to this post by Mihai Popescu-3
On Sun, Feb 11, 2018 at 12:47 AM, <[hidden email]> wrote:

> What is the output of:
>
> $ hostname
>
>

hugs# hostname
hugs.antarctica.no
hugs# hostname -s
hugs
Reply | Threaded
Open this post in threaded view
|

Re: dhclient not renewing

Edgar Pettijohn III-2


On 02/11/18 05:12, Christer Solskogen wrote:

> On Sun, Feb 11, 2018 at 12:47 AM, <[hidden email]> wrote:
>
>> What is the output of:
>>
>> $ hostname
>>
>>
> hugs# hostname
> hugs.antarctica.no
> hugs# hostname -s
> hugs

I'm out of ideas.  Pretty sure it won't like a hostname without 2 parts ie:

my.domain

Looks like there has been some activity in the cvs log in the last 6
months so maybe you have uncovered a bug of some sort.

Reply | Threaded
Open this post in threaded view
|

Re: dhclient not renewing

Christer Solskogen-3
In reply to this post by Mihai Popescu-3
On Sun, Feb 11, 2018 at 5:05 AM, Kenneth R Westerback <[hidden email]
> wrote:

> Extraneous "bound to ..." messages are no longer logged on renewal.
>
> So the original "bound to ..." message remains valid until something
> changes.
>
> If you look at the leases file you should see it get a new 'epoch' (the
> time
> the lease was obtained) on renewals.
>

The thing is that when dhclient is doing a renew the ip address doesn't
attach to the interface:

em2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:0d:b9:41:6f:ca
        index 3 priority 0 llprio 3
        groups: egress
        media: Ethernet autoselect (1000baseT full-duplex)
        status: active


Remember that this only happens during renew. Running "dhclient em2"
manually works, until the next renew.

This is how /var/db/dhclient.leases.em2 looks like:
lease {
  fixed-address 51.174.196.170;
  next-server 0.0.0.0;
  option subnet-mask 255.255.224.0;
  option routers 51.174.192.1;
  option domain-name-servers 92.220.228.70,109.247.114.4;
  option domain-name "lyse.net";
  option broadcast-address 255.255.255.255;
  option dhcp-lease-time 14400;
  option dhcp-message-type 5;
  option dhcp-server-identifier 51.174.112.1;
  option bootfile-name "213.167.96.135";
  epoch 1518359436;
  renew 0 2018/02/11 16:30:36 UTC;
  rebind 0 2018/02/11 18:00:36 UTC;
  expire 0 2018/02/11 18:30:36 UTC;
}