Re: dhclient/autoconf in singleuser vs. ramdisk kernel

2023-03-07 Thread Theo de Raadt
Erling Westenvik  wrote:

> Hi,
> 
> When booting bsd.rd I can do:
> 
> # ifconfig  inet autoconf
> 
> and it will negotiate a working IP and gateway setup from my DHCP
> server.
> 
> However, when booting 'boot -s' (singleuser) the only way to have a
> working IP and gateway setup is to specify it manually by entering the
> specific relevant values, like:
> 
> # ifconfig  12.34.56.78 0xff00
> # route add default 12.34.56.1
> 
> Neither 'dhclient ' or 'ifconfig  inet autoconf' works.
> 
> What am I missing?

dhcpleased is not running.



dhclient/autoconf in singleuser vs. ramdisk kernel

2023-03-07 Thread Erling Westenvik
Hi,

When booting bsd.rd I can do:

# ifconfig  inet autoconf

and it will negotiate a working IP and gateway setup from my DHCP
server.

However, when booting 'boot -s' (singleuser) the only way to have a
working IP and gateway setup is to specify it manually by entering the
specific relevant values, like:

# ifconfig  12.34.56.78 0xff00
# route add default 12.34.56.1

Neither 'dhclient ' or 'ifconfig  inet autoconf' works.

What am I missing?

(The DHCP server assigns IP adresses based on MAC adresses. Not having
to "invent"/remember IP adresses for various machines would be
convenient)

Regards,

Erling



Re: dhclient -d run0

2022-12-23 Thread Stuart Henderson
On 2022-12-22, Geoff Steckel  wrote:
> Are routes and resolv.conf the only things dhcpleased modifies beyond 
> configuring the interface with the leased IP?

dhcpleased only sets IP/mask and routes, and sends a nameserver proposal
on the route socket, which resolvd picks up if running.

IP/mask/DNS comes from the DHCP negotiation, routes are added based on
routers or classless-static-routes from DHCP, plus a cloning route is added
automatically if needed to reach an out-of-subnet gateway.

There's no setting of ntp server, etc.

The code is really readable and logically laid out if you want to check
anything else about what it does.




Re: dhclient -d run0

2022-12-22 Thread Bodie
On Fri Dec 23, 2022 at 1:23 AM CET, Geoff Steckel wrote:
> My objection to dhcpleased is not whether the program does useful things.
> I'm sure it does "what it should".
>
> Adding this sentence to the dhcpleased man page would make
> it clear what it does beyond leasing the IP:
>
> "By default, it replaces the DNS server in /etc/resolv.conf
> and replaces the default route using information from the DHCP server."
>
> If it does anything else it's a bug in the documentation or
> the program. Examine many, many man pages for the traditional
> suite of Unix programs. They're contracts.
> Surprises in the .conf leave doubts about all the documentation
> and the program itself.

I would suggest to look at least on RFC 3442 as there are things your
dhcp server provider MUST do and you as client can pick what suits
you with options.


>
> Now I'll shut up.
> Geoff Steckel



Re: dhclient -d run0

2022-12-22 Thread Theo de Raadt
Geoff Steckel  wrote:

> My objection to dhcpleased is not whether the program does useful things.
> I'm sure it does "what it should".
> 
> Adding this sentence to the dhcpleased man page would make
> it clear what it does beyond leasing the IP:
> 
> "By default, it replaces the DNS server in /etc/resolv.conf
> and replaces the default route using information from the DHCP server."

But that would be a lie.

dhcpleased does not touch resolv.conf
 
It does not work like that at all.  resolvd is the program which modifies
/etc/resolv.conf

resolvd documents how it works quite well.   the resolv.conf file does
not really document how it might come to be changed, but shrug.  one
thing that is missing is that dhcpleased and slaacd do not mention they
are re-advertising dns onto the route socket in a way that resolvd can
act upon.


> If it does anything else it's a bug in the documentation or
> the program. Examine many, many man pages for the traditional
> suite of Unix programs. They're contracts.
> Surprises in the .conf leave doubts about all the documentation
> and the program itself.

When you put it that way, I don't feel like changing a single word
in the documentation.

> Now I'll shut up.

Probably wise.



Re: dhclient -d run0

2022-12-22 Thread Geoff Steckel

My objection to dhcpleased is not whether the program does useful things.
I'm sure it does "what it should".

Adding this sentence to the dhcpleased man page would make
it clear what it does beyond leasing the IP:

"By default, it replaces the DNS server in /etc/resolv.conf
and replaces the default route using information from the DHCP server."

If it does anything else it's a bug in the documentation or
the program. Examine many, many man pages for the traditional
suite of Unix programs. They're contracts.
Surprises in the .conf leave doubts about all the documentation
and the program itself.

Now I'll shut up.
Geoff Steckel



Re: dhclient -d run0

2022-12-22 Thread Bodie




On 22.12.2022 01:57, Geoff Steckel wrote:

On 12/21/22 09:05, Crystal Kolipe wrote:

On Wed, Dec 21, 2022 at 01:39:47PM +, Rodrigo Readi wrote:
The command "dhclient -d run0" with or without "-d" seems to 
demonize,

always, and is till now completely silent.

Is this new behaviour normal? How I get it the old way?

You might want to look at the commit message for version 1.727 of
dhclient.c:

http://cvsweb.openbsd.org/src/sbin/dhclient/dhclient.c


dhcpleased appears to be a useful & complete replacement
for dhclient for most users

Right now I run dhclient on my gateway machine.
I cut off its fingers when it tries to e.g. mess with routes or 
resolv.conf.
I disable dhcpleased because I don't know -exactly- what it tries to 
do.




dhcpleased.conf(5)

 ignore routes
 Ignore routes from leases on this interface.  The default 
is to

 not ignore routes.

Replacing resolv.conf and configuring routes can be disabled in 
dhcpleased.conf.

Are routes and resolv.conf the only things dhcpleased modifies beyond
configuring
the interface with the leased IP?

For instance, pair of sentences in dhcpleased(8) to the effect:
"dhcpleased inserts the DNS server information
from the DHCP server at the top of the existing /etc/resolv.conf.
It configures the default route via the interface being configured."



Where do you read that? That is no such sentence in either current or
7.2 and 7.1 man pages


Something like that is implied by using DHCP.
Are other routes changed or deleted?
Exactly what does the updated resolv.conf contain?
DHCP can configure other services. Does dhcpleased do any of that?



It's for clients. Replacement for dhclient(8). If you're not client
then you should have your own dhcpd(8) running serving what you need.
Or having static configuration completely.

If you do not like routes or DNS (this one you can alter with undwind(8)
too) from your ISP then you can avoid them with dhcpleased.conf(5)


thanks
Geoff Steckel




Re: dhclient -d run0

2022-12-21 Thread Theo de Raadt
we were the last operating system to have dynamic resolv.conf
management and then the whiners who had left the operating systems
with dynamic resolv.conf and come here for static resolv.conf
became upset.

i am very sorry they got upset.  not going to change it. after 2-3 years
of small changes, the behaviour is working very well for everyone.  and
if you don't like it, just like all the other systems the are ways to
turn it off.

you don't need to broccoli.  noone is going to smack you in the head
if you push it to the side of your plate.  but if you bring up your dislike
for brocolli everytime you eat, you will collect a negative reaction.

Geoff Steckel  wrote:

> On 12/21/22 09:05, Crystal Kolipe wrote:
> > On Wed, Dec 21, 2022 at 01:39:47PM +, Rodrigo Readi wrote:
> >> The command "dhclient -d run0" with or without "-d" seems to demonize,
> >> always, and is till now completely silent.
> >>
> >> Is this new behaviour normal? How I get it the old way?
> > You might want to look at the commit message for version 1.727 of
> > dhclient.c:
> >
> > http://cvsweb.openbsd.org/src/sbin/dhclient/dhclient.c
> >
> dhcpleased appears to be a useful & complete replacement
> for dhclient for most users
> 
> Right now I run dhclient on my gateway machine.
> I cut off its fingers when it tries to e.g. mess with routes or resolv.conf.
> I disable dhcpleased because I don't know -exactly- what it tries to do.
> 
> Replacing resolv.conf and configuring routes can be disabled in
> dhcpleased.conf.
> Are routes and resolv.conf the only things dhcpleased modifies beyond
> configuring
> the interface with the leased IP?
> 
> For instance, pair of sentences in dhcpleased(8) to the effect:
> "dhcpleased inserts the DNS server information
> from the DHCP server at the top of the existing /etc/resolv.conf.
> It configures the default route via the interface being configured."
> 
> Something like that is implied by using DHCP.
> Are other routes changed or deleted?
> Exactly what does the updated resolv.conf contain?
> DHCP can configure other services. Does dhcpleased do any of that?
> 
> thanks
> Geoff Steckel
> 



Re: dhclient -d run0

2022-12-21 Thread Geoff Steckel

On 12/21/22 09:05, Crystal Kolipe wrote:

On Wed, Dec 21, 2022 at 01:39:47PM +, Rodrigo Readi wrote:

The command "dhclient -d run0" with or without "-d" seems to demonize,
always, and is till now completely silent.

Is this new behaviour normal? How I get it the old way?

You might want to look at the commit message for version 1.727 of
dhclient.c:

http://cvsweb.openbsd.org/src/sbin/dhclient/dhclient.c


dhcpleased appears to be a useful & complete replacement
for dhclient for most users

Right now I run dhclient on my gateway machine.
I cut off its fingers when it tries to e.g. mess with routes or resolv.conf.
I disable dhcpleased because I don't know -exactly- what it tries to do.

Replacing resolv.conf and configuring routes can be disabled in 
dhcpleased.conf.
Are routes and resolv.conf the only things dhcpleased modifies beyond 
configuring

the interface with the leased IP?

For instance, pair of sentences in dhcpleased(8) to the effect:
"dhcpleased inserts the DNS server information
from the DHCP server at the top of the existing /etc/resolv.conf.
It configures the default route via the interface being configured."

Something like that is implied by using DHCP.
Are other routes changed or deleted?
Exactly what does the updated resolv.conf contain?
DHCP can configure other services. Does dhcpleased do any of that?

thanks
Geoff Steckel



Re: dhclient -d run0

2022-12-21 Thread Florian Obser
On 2022-12-21 15:04 UTC, Rodrigo Readi  wrote:
> Too much innovations, too much daemons ... :)

Things kinda went downhill after CSRG disbanded.



Re: dhclient -d run0

2022-12-21 Thread Crystal Kolipe
On Wed, Dec 21, 2022 at 03:04:01PM +, Rodrigo Readi wrote:
> Am Mi., 21. Dez. 2022 um 14:06 Uhr schrieb Crystal Kolipe
> :
> 
> > You might want to look at the commit message for version 1.727 of
> > dhclient.c:
> >
> > http://cvsweb.openbsd.org/src/sbin/dhclient/dhclient.c
> 
> And also /var/log/messages: "dhclient will go away, stop using it".
> 
> Before dhclient I do "ifconfig run0 nwid ... wpakey ... bssid ... up"
> 
> No idea where to park an "auto" there.

For IPv4 you probably want something like:

# ifconfig run0 inet autoconf

If you are using IPv6 you'll also likely want to use:

# ifconfig run0 inet6 autoconf

... and configure slaacd.

> And since I run unbound, I do not like that dhclient/dhcpleased touch
> resolv.conf.

You can disable resolvd and edit resolv.conf manually without any
interference :).



Re: dhclient -d run0

2022-12-21 Thread Rodrigo Readi
Am Mi., 21. Dez. 2022 um 14:06 Uhr schrieb Crystal Kolipe
:

> You might want to look at the commit message for version 1.727 of
> dhclient.c:
>
> http://cvsweb.openbsd.org/src/sbin/dhclient/dhclient.c

And also /var/log/messages: "dhclient will go away, stop using it".

Before dhclient I do "ifconfig run0 nwid ... wpakey ... bssid ... up"

No idea where to park an "auto" there.
And since I run unbound, I do not like that dhclient/dhcpleased touch
resolv.conf.

Too much innovations, too much daemons ... :)



Re: dhclient -d run0

2022-12-21 Thread Crystal Kolipe
On Wed, Dec 21, 2022 at 01:39:47PM +, Rodrigo Readi wrote:
> The command "dhclient -d run0" with or without "-d" seems to demonize,
> always, and is till now completely silent.
> 
> Is this new behaviour normal? How I get it the old way?

You might want to look at the commit message for version 1.727 of
dhclient.c:

http://cvsweb.openbsd.org/src/sbin/dhclient/dhclient.c



dhclient -d run0

2022-12-21 Thread Rodrigo Readi
The command "dhclient -d run0" with or without "-d" seems to demonize,
always, and is till now completely silent.

Is this new behaviour normal? How I get it the old way?

Thanks
Rod.



Re: dhclient on carp

2020-07-23 Thread David Gwynne



> On 23 Jul 2020, at 22:28, Guy Godfroy  wrote:
> 
> Doesn't work better.
> I guess Sebastian is right, carp has to be assigned an IP to come up.

yeah, i just read the code a bit. they have to be able to communicate to be 
able to elect which one is the active and which is the backup. i suggest using 
an address like one in 169.254.x.y/16 so the carps can elect.

> 
> Le 23/07/2020 à 03:15, David Gwynne a écrit :
>>> On 22 Jul 2020, at 22:59, Guy Godfroy  wrote:
>>> 
>>> Hello,
>>> 
>>> So I read in 6.7 release note that it's finally possible to use dhclient on 
>>> CARP interface. That's great news.
>>> 
>>> However, I'm not sure how to use it on a hostname.if file. I tried to 
>>> replace inet instruction directly with dhcp:
>>> 
>>>dhcp vhid 11 carpdev em1 pass  description "test"
>>> 
>>> 
>>> But that didn't do the trick: at boot time, none of my nodes carp were in 
>>> master state so dhclient didn't manage to get any lease.
>>> 
>>> So I have first to give a static IP to my carp in order to activate it, and 
>>> only then trigger dhcp:
>>> 
>>>inet [...] vhid 11 carpdev em1 pass  description "test"
>>> 
>>>dhcp
>>> 
>>> It doesn't feel right. Is there a better way to do this?
>> hostname.if0 lines don't have to all be address configurations. generally 
>> netstart just passes the statements directly to ifconfig.
>> does something like the following work in hostname.carp0?
>> description "test"
>> vhid 11 carpdev em1 pass 
>> dhcp
>> dlg
> 



Re: dhclient on carp

2020-07-23 Thread Guy Godfroy

Doesn't work better.
I guess Sebastian is right, carp has to be assigned an IP to come up.

Le 23/07/2020 à 03:15, David Gwynne a écrit :




On 22 Jul 2020, at 22:59, Guy Godfroy  wrote:

Hello,

So I read in 6.7 release note that it's finally possible to use dhclient on 
CARP interface. That's great news.

However, I'm not sure how to use it on a hostname.if file. I tried to replace 
inet instruction directly with dhcp:

dhcp vhid 11 carpdev em1 pass  description "test"


But that didn't do the trick: at boot time, none of my nodes carp were in 
master state so dhclient didn't manage to get any lease.

So I have first to give a static IP to my carp in order to activate it, and 
only then trigger dhcp:

inet [...] vhid 11 carpdev em1 pass  description "test"

dhcp

It doesn't feel right. Is there a better way to do this?


hostname.if0 lines don't have to all be address configurations. generally 
netstart just passes the statements directly to ifconfig.

does something like the following work in hostname.carp0?

description "test"
vhid 11 carpdev em1 pass 
dhcp

dlg





Re: dhclient on carp

2020-07-22 Thread David Gwynne



> On 22 Jul 2020, at 22:59, Guy Godfroy  wrote:
> 
> Hello,
> 
> So I read in 6.7 release note that it's finally possible to use dhclient on 
> CARP interface. That's great news.
> 
> However, I'm not sure how to use it on a hostname.if file. I tried to replace 
> inet instruction directly with dhcp:
> 
>dhcp vhid 11 carpdev em1 pass  description "test"
> 
> 
> But that didn't do the trick: at boot time, none of my nodes carp were in 
> master state so dhclient didn't manage to get any lease.
> 
> So I have first to give a static IP to my carp in order to activate it, and 
> only then trigger dhcp:
> 
>inet [...] vhid 11 carpdev em1 pass  description "test"
> 
>dhcp
> 
> It doesn't feel right. Is there a better way to do this?

hostname.if0 lines don't have to all be address configurations. generally 
netstart just passes the statements directly to ifconfig.

does something like the following work in hostname.carp0?

description "test"
vhid 11 carpdev em1 pass 
dhcp

dlg



Re: dhclient on carp

2020-07-22 Thread Sebastian Benoit
Guy Godfroy(guy.godf...@gugod.fr) on 2020.07.22 14:59:53 +0200:
> Hello,
> 
> So I read in 6.7 release note that it's finally possible to use dhclient 
> on CARP interface. That's great news.
> 
> However, I'm not sure how to use it on a hostname.if file. I tried to 
> replace inet instruction directly with dhcp:
> 
> dhcp vhid 11 carpdev em1 pass  description "test"
> 
> 
> But that didn't do the trick: at boot time, none of my nodes carp were 
> in master state so dhclient didn't manage to get any lease.
> 
> So I have first to give a static IP to my carp in order to activate it, 
> and only then trigger dhcp:
> 
> inet [...] vhid 11 carpdev em1 pass  description "test"
> 
> dhcp
> 
> It doesn't feel right. Is there a better way to do this?

Maybe someone will correct me on this, but I don't think so.
carp(4) needs an ip address to come up, thats how the protocol works.

Just pick one, there are many (from rfc1918 private use of course).



dhclient on carp

2020-07-22 Thread Guy Godfroy

Hello,

So I read in 6.7 release note that it's finally possible to use dhclient 
on CARP interface. That's great news.


However, I'm not sure how to use it on a hostname.if file. I tried to 
replace inet instruction directly with dhcp:


dhcp vhid 11 carpdev em1 pass  description "test"


But that didn't do the trick: at boot time, none of my nodes carp were 
in master state so dhclient didn't manage to get any lease.


So I have first to give a static IP to my carp in order to activate it, 
and only then trigger dhcp:


inet [...] vhid 11 carpdev em1 pass  description "test"

dhcp

It doesn't feel right. Is there a better way to do this?

Guy



Re: dhclient vio0 -> Segmentation fault

2019-04-06 Thread Stuart Henderson
Update to a newer snapshot.

On 2019-04-06, Matthew Graybosch  wrote:
> On Thu, Apr 4, 2019, at 1:19 AM, Greg Steuck wrote:
>> April 2 snapshot misbehaves badly on Google Compute Engine.
>> 
>> # dmesg | head
>> OpenBSD 6.5 (GENERIC.MP) #839: Tue Apr  2 20:38:19 MDT 2019
>> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
>> # dhclient -v -d vio0
>> vio0: DHCPDISCOVER - interval 1
>> vio0: DHCPOFFER from 169.254.169.254 (42:01:0a:80:00:01)
>> Segmentation fault
>> # ls -l /sbin/dhclient
>
> I don't think this is confined to Google Compute Engine. I just upgraded my 
> ThinkPad T430s to the April 2 snapshot, and I have a similar experience when 
> setting up both wired and wireless connections (em0 and iwn0) using DHCP. My 
> dhclient also segfaults after receiving DHCPOFFER from the local Verizon FIOS 
> router. 
>
> Sorry for the lack of dmesg, but I'm typing this from my phone. 
>



Re: dhclient vio0 -> Segmentation fault

2019-04-05 Thread Matthew Graybosch
On Thu, Apr 4, 2019, at 1:19 AM, Greg Steuck wrote:
> April 2 snapshot misbehaves badly on Google Compute Engine.
> 
> # dmesg | head
> OpenBSD 6.5 (GENERIC.MP) #839: Tue Apr  2 20:38:19 MDT 2019
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> # dhclient -v -d vio0
> vio0: DHCPDISCOVER - interval 1
> vio0: DHCPOFFER from 169.254.169.254 (42:01:0a:80:00:01)
> Segmentation fault
> # ls -l /sbin/dhclient

I don't think this is confined to Google Compute Engine. I just upgraded my 
ThinkPad T430s to the April 2 snapshot, and I have a similar experience when 
setting up both wired and wireless connections (em0 and iwn0) using DHCP. My 
dhclient also segfaults after receiving DHCPOFFER from the local Verizon FIOS 
router. 

Sorry for the lack of dmesg, but I'm typing this from my phone. 

-- 
Matthew Graybosch
https://www.matthewgraybosch.com
"Out of order? Even in the future nothing works."



dhclient vio0 -> Segmentation fault

2019-04-03 Thread Greg Steuck
April 2 snapshot misbehaves badly on Google Compute Engine.

# dmesg | head
OpenBSD 6.5 (GENERIC.MP) #839: Tue Apr  2 20:38:19 MDT 2019
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
# dhclient -v -d vio0
vio0: DHCPDISCOVER - interval 1
vio0: DHCPOFFER from 169.254.169.254 (42:01:0a:80:00:01)
Segmentation fault
# ls -l /sbin/dhclient

-r-xr-xr-x  1 root  bin  387640 Apr  2 19:24 /sbin/dhclient
# sha256 /sbin/dhclient

SHA256 (/sbin/dhclient) =
a3133d7c26d6bb77fab9b82738c68280863a67a6ef2141758725f502c3187cca

I don't know what source tree this corresponds to, but dhclient from this
revision works just fine:

commit 0459b7d7c4b6caf0847b615ddd2dc05e7ed59687 (HEAD, origin/master)
Author: benno 
Date:   Wed Apr 3 19:58:04 2019 +

YUL - Montreal Dorval International has been renamed Montreal-Pierre
Elliott Trudeau International on January 1, 2004.

Thanks
Greg


Re: [SOLVED] Re: apu2 em0/dhclient problems

2019-01-31 Thread Chris Cappuccio
Edgar Pettijohn [ed...@pettijohn-web.com] wrote:
> 
> Don't know why it works, but em1 works. I guess I'll rewrite my config files.
> 

This shouldn't be an acceptable solution to you. Unless the port is physically
damaged, you should figure out what's going on. Tcpdump is a great start. 

Chris



[SOLVED] Re: apu2 em0/dhclient problems

2019-01-29 Thread Edgar Pettijohn
On Tue, Jan 29, 2019 at 12:03:23PM -0600, Edgar Pettijohn wrote:
> 
> On Jan 29, 2019 11:01 AM, Marcus MERIGHI  wrote:
> >
> > Hello, 
> >
> > ed...@pettijohn-web.com (Edgar Pettijohn), 2019.01.27 (Sun) 18:44 (CET):
> > > I'm trying to replace my dieing soekris box with an apu2 dmesg below.
> > > However, I can't seem to get em0 to connect to my isp. It will work
> > > when connecting to the soekris box though. So I don't think its the 
> > > interface that is the problem. But everything I try seems to rule out
> > > eachother as the problem, leaving me in a viscious cycle.
> >
> > have you tried any of the other ethernet ports with your uplink?
> >
> 
> I haven't. I did consider it, but then em0 worked when connecting to my 
> router so I didn't. I guess it can't hurt to try anyway.
> 
> Thanks,
> 
> Edgar
> > Give it a go, I've had a similiar failure with em0 on apu2, running 
> > with em1 for the uplink since then without problems.
> >
> > Marcus

Don't know why it works, but em1 works. I guess I'll rewrite my config files.

Thanks,

Edgar
> >
> > > I'm going to try disabling pf and after that current. If you have
> > > any other suggestions please send them.
> > > 
> > > Thanks,
> > > 
> > > edgar
> > > 
> > > OpenBSD 6.4 (GENERIC.MP) #364: Thu Oct 11 13:30:23 MDT 2018
> > > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > > real mem = 1996152832 (1903MB)
> > > avail mem = 1926434816 (1837MB)
> > > mpath0 at root
> > > scsibus0 at mpath0: 256 targets
> > > mainbus0 at root
> > > bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x77fb7020 (7 entries)
> > > bios0: vendor coreboot version "4.0.7" date 02/28/2017
> > > bios0: PC Engines APU2
> > > acpi0 at bios0: rev 2
> > > acpi0: sleep states S0 S1 S2 S3 S4 S5
> > > acpi0: tables DSDT FACP SSDT APIC HEST SSDT SSDT HPET
> > > acpi0: wakeup devices PWRB(S4) PBR4(S4) PBR5(S4) PBR6(S4) PBR7(S4) 
> > > PBR8(S4) UOH1(S3) UOH3(S3) UOH5(S3) XHC0(S4)
> > > acpitimer0 at acpi0: 3579545 Hz, 32 bits
> > > acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> > > cpu0 at mainbus0: apid 0 (boot processor)
> > > cpu0: AMD GX-412TC SOC, 998.27 MHz, 16-30-01
> > > cpu0: 
> > > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> > > cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 
> > > 64b/line 16-way L2 cache
> > > cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully 
> > > associative
> > > cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully 
> > > associative
> > > cpu0: smt 0, core 0, package 0
> > > mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> > > cpu0: apic clock running at 99MHz
> > > cpu0: mwait min=64, max=64, IBE
> > > cpu1 at mainbus0: apid 1 (application processor)
> > > cpu1: AMD GX-412TC SOC, 998.13 MHz, 16-30-01
> > > cpu1: 
> > > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> > > cpu1: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 
> > > 64b/line 16-way L2 cache
> > > cpu1: ITLB 32 4KB entries fully associative, 8 4MB entries fully 
> > > associative
> > > cpu1: DTLB 40 4KB entries fully associative, 8 4MB entries fully 
> > > associative
> > > cpu1: smt 0, core 1, package 0
> > > cpu2 at mainbus0: apid 2 (application processor)
> > > cpu2: AMD GX-412TC SOC, 998.13 MHz, 16-30-01
> > > cpu2: 
> > > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> > > cpu2: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 
> > > 64b/line 16-way L2 cache
> > > cpu2: ITLB 32 4KB entries fully associative, 8 4MB entries fully 
> > > associative
> > > cpu2: DTLB 40 4KB entries fully associative, 8 4MB entries fully 
> > > associative
> > > cpu2: smt 0, core 2, package 0
> > > cpu3 at mainbus0: apid 3 (application processor)
> > > cpu3: AMD GX-412TC SOC, 998.13 MHz, 16-30-01
> > > cpu3: 
> > > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> > > cpu3: 32KB 64b/line 2-way I-cache, 

Re: apu2 em0/dhclient problems

2019-01-29 Thread Edgar Pettijohn


On Jan 29, 2019 11:01 AM, Marcus MERIGHI  wrote:
>
> Hello, 
>
> ed...@pettijohn-web.com (Edgar Pettijohn), 2019.01.27 (Sun) 18:44 (CET):
> > I'm trying to replace my dieing soekris box with an apu2 dmesg below.
> > However, I can't seem to get em0 to connect to my isp. It will work
> > when connecting to the soekris box though. So I don't think its the 
> > interface that is the problem. But everything I try seems to rule out
> > eachother as the problem, leaving me in a viscious cycle.
>
> have you tried any of the other ethernet ports with your uplink?
>

I haven't. I did consider it, but then em0 worked when connecting to my router 
so I didn't. I guess it can't hurt to try anyway.

Thanks,

Edgar
> Give it a go, I've had a similiar failure with em0 on apu2, running 
> with em1 for the uplink since then without problems.
>
> Marcus
>
> > I'm going to try disabling pf and after that current. If you have
> > any other suggestions please send them.
> > 
> > Thanks,
> > 
> > edgar
> > 
> > OpenBSD 6.4 (GENERIC.MP) #364: Thu Oct 11 13:30:23 MDT 2018
> > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > real mem = 1996152832 (1903MB)
> > avail mem = 1926434816 (1837MB)
> > mpath0 at root
> > scsibus0 at mpath0: 256 targets
> > mainbus0 at root
> > bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x77fb7020 (7 entries)
> > bios0: vendor coreboot version "4.0.7" date 02/28/2017
> > bios0: PC Engines APU2
> > acpi0 at bios0: rev 2
> > acpi0: sleep states S0 S1 S2 S3 S4 S5
> > acpi0: tables DSDT FACP SSDT APIC HEST SSDT SSDT HPET
> > acpi0: wakeup devices PWRB(S4) PBR4(S4) PBR5(S4) PBR6(S4) PBR7(S4) PBR8(S4) 
> > UOH1(S3) UOH3(S3) UOH5(S3) XHC0(S4)
> > acpitimer0 at acpi0: 3579545 Hz, 32 bits
> > acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> > cpu0 at mainbus0: apid 0 (boot processor)
> > cpu0: AMD GX-412TC SOC, 998.27 MHz, 16-30-01
> > cpu0: 
> > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> > cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 
> > 64b/line 16-way L2 cache
> > cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
> > cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
> > cpu0: smt 0, core 0, package 0
> > mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> > cpu0: apic clock running at 99MHz
> > cpu0: mwait min=64, max=64, IBE
> > cpu1 at mainbus0: apid 1 (application processor)
> > cpu1: AMD GX-412TC SOC, 998.13 MHz, 16-30-01
> > cpu1: 
> > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> > cpu1: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 
> > 64b/line 16-way L2 cache
> > cpu1: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
> > cpu1: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
> > cpu1: smt 0, core 1, package 0
> > cpu2 at mainbus0: apid 2 (application processor)
> > cpu2: AMD GX-412TC SOC, 998.13 MHz, 16-30-01
> > cpu2: 
> > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> > cpu2: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 
> > 64b/line 16-way L2 cache
> > cpu2: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
> > cpu2: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
> > cpu2: smt 0, core 2, package 0
> > cpu3 at mainbus0: apid 3 (application processor)
> > cpu3: AMD GX-412TC SOC, 998.13 MHz, 16-30-01
> > cpu3: 
> > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> > cpu3: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 
> > 64b/line 16-way L2 cache
> > cpu3: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
> > cpu3: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
> > cpu3: smt 0, core 3, package 0
> > ioapic0 at mainbus0: apid 4 pa 0xfec0, version 21, 24 pins
> > ioapic1 at mainbus0: apid 5 pa 

Re: apu2 em0/dhclient problems

2019-01-29 Thread Marcus MERIGHI
Hello, 

ed...@pettijohn-web.com (Edgar Pettijohn), 2019.01.27 (Sun) 18:44 (CET):
> I'm trying to replace my dieing soekris box with an apu2 dmesg below.
> However, I can't seem to get em0 to connect to my isp. It will work
> when connecting to the soekris box though. So I don't think its the 
> interface that is the problem. But everything I try seems to rule out
> eachother as the problem, leaving me in a viscious cycle.

have you tried any of the other ethernet ports with your uplink?

Give it a go, I've had a similiar failure with em0 on apu2, running 
with em1 for the uplink since then without problems.

Marcus

> I'm going to try disabling pf and after that current. If you have
> any other suggestions please send them.
> 
> Thanks,
> 
> edgar
> 
> OpenBSD 6.4 (GENERIC.MP) #364: Thu Oct 11 13:30:23 MDT 2018
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 1996152832 (1903MB)
> avail mem = 1926434816 (1837MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x77fb7020 (7 entries)
> bios0: vendor coreboot version "4.0.7" date 02/28/2017
> bios0: PC Engines APU2
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S1 S2 S3 S4 S5
> acpi0: tables DSDT FACP SSDT APIC HEST SSDT SSDT HPET
> acpi0: wakeup devices PWRB(S4) PBR4(S4) PBR5(S4) PBR6(S4) PBR7(S4) PBR8(S4) 
> UOH1(S3) UOH3(S3) UOH5(S3) XHC0(S4)
> acpitimer0 at acpi0: 3579545 Hz, 32 bits
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: AMD GX-412TC SOC, 998.27 MHz, 16-30-01
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
> 16-way L2 cache
> cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
> cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> cpu0: apic clock running at 99MHz
> cpu0: mwait min=64, max=64, IBE
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: AMD GX-412TC SOC, 998.13 MHz, 16-30-01
> cpu1: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> cpu1: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
> 16-way L2 cache
> cpu1: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
> cpu1: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 2 (application processor)
> cpu2: AMD GX-412TC SOC, 998.13 MHz, 16-30-01
> cpu2: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> cpu2: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
> 16-way L2 cache
> cpu2: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
> cpu2: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
> cpu2: smt 0, core 2, package 0
> cpu3 at mainbus0: apid 3 (application processor)
> cpu3: AMD GX-412TC SOC, 998.13 MHz, 16-30-01
> cpu3: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> cpu3: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
> 16-way L2 cache
> cpu3: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
> cpu3: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
> cpu3: smt 0, core 3, package 0
> ioapic0 at mainbus0: apid 4 pa 0xfec0, version 21, 24 pins
> ioapic1 at mainbus0: apid 5 pa 0xfec2, version 21, 32 pins, remapped
> acpihpet0 at acpi0: 14318180 Hz
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus -1 (PBR4)
> acpiprt2 at acpi0: bus 1 (PBR5)
> acpiprt3 at acpi0: bus 2 (PBR6)
> acpiprt4 at acpi0: bus 3 (PBR7)
> acpiprt5 at acpi0: bus 4 (PBR8)
> acpicpu0 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS
> acpicpu1 at acpi0: 

Re: apu2 em0/dhclient problems

2019-01-27 Thread Steve Williams

On 27/01/2019 1:44 p.m., Edgar Pettijohn wrote:

On Sun, Jan 27, 2019 at 09:34:54PM +0100, Mikkel C. Simonsen wrote:

Den 27-01-2019 kl. 19:45 skrev trondd:

On Sun, January 27, 2019 12:44 pm, Edgar Pettijohn wrote:

I'm trying to replace my dieing soekris box with an apu2 dmesg below.
However, I can't seem to get em0 to connect to my isp. It will work
when connecting to the soekris box though. So I don't think its the
interface that is the problem. But everything I try seems to rule out
eachother as the problem, leaving me in a viscious cycle.

I'm going to try disabling pf and after that current. If you have
any other suggestions please send them.

Thanks,

edgar

Does your ISP whitelist by MAC address?

My ISP locks the connection to a certain MAC for a number of hours. Tech
support can probably delete the old lease.

Best regards,

Mikkel


I don't think this is the case. I was able to connect directly to my laptop and
get a lease immediately.  Its odd... With base dhclient it goes something like:

em0 no link
em0. got link

and then nothing.

I installed isc-dhcp-client and it actually goes through the steps of the whole
DHCPDISCOVER...etc,etc. Unfortunantly it still ends with me not having a 
connection.
I doubt it will do anything, but I'm going to try updating the bios. Sort of 
like
checking the oil when the problem is a flat tire, but who knows.

Thanks,

edgar

Hi,

I just upgraded my APU2 yesterday and have no problems with my dhcp.  I 
have a cable internet connection through my ISP.


Do you have a /etc/dhclient.conf file?  I do not.

Perhaps try killing dhclient, then run it in debugging mode in the 
foreground.


/sbin/dhclient -i em0 -d -v

See what happens.

My /etc/hostname.em0 just has "dhcp" in it.

Here's some information from my system:

OpenBSD 6.4 (GENERIC.MP) #364: Thu Oct 11 13:30:23 MDT 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4261072896 (4063MB)
avail mem = 4122664960 (3931MB)

bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdffb7020 (7 entries)
bios0: vendor coreboot version "88a4f96" date 03/07/2016
bios0: PC Engines apu2

em0 at pci1 dev 0 function 0 "Intel I210" rev 0x03: msi, address 
00:0d:b9:44:62:7c


pcengine# ifconfig em0
em0: flags=8843 mtu 1500
    lladdr 00:0d:b9:44:62:7c
    index 1 priority 0 llprio 3
    groups: egress
    media: Ethernet autoselect (1000baseT full-duplex,master)
    status: active
    inet a.b.c.d netmask 0xffc0 broadcast a.b.c.something

You might also try running tcpdump while the dhcp is going on and watch 
the packet trace.  At a minimum, you could post the packet trace here 
for imput.


tcpdump -i em0

Cheers,
Steve W.





Re: apu2 em0/dhclient problems

2019-01-27 Thread Mikkel C. Simonsen

Den 27-01-2019 kl. 19:45 skrev trondd:

On Sun, January 27, 2019 12:44 pm, Edgar Pettijohn wrote:

I'm trying to replace my dieing soekris box with an apu2 dmesg below.
However, I can't seem to get em0 to connect to my isp. It will work
when connecting to the soekris box though. So I don't think its the
interface that is the problem. But everything I try seems to rule out
eachother as the problem, leaving me in a viscious cycle.

I'm going to try disabling pf and after that current. If you have
any other suggestions please send them.

Thanks,

edgar


Does your ISP whitelist by MAC address?


My ISP locks the connection to a certain MAC for a number of hours. Tech 
support can probably delete the old lease.


Best regards,

Mikkel



Re: apu2 em0/dhclient problems

2019-01-27 Thread Edgar Pettijohn
On Sun, Jan 27, 2019 at 09:34:54PM +0100, Mikkel C. Simonsen wrote:
> Den 27-01-2019 kl. 19:45 skrev trondd:
> > On Sun, January 27, 2019 12:44 pm, Edgar Pettijohn wrote:
> > > I'm trying to replace my dieing soekris box with an apu2 dmesg below.
> > > However, I can't seem to get em0 to connect to my isp. It will work
> > > when connecting to the soekris box though. So I don't think its the
> > > interface that is the problem. But everything I try seems to rule out
> > > eachother as the problem, leaving me in a viscious cycle.
> > > 
> > > I'm going to try disabling pf and after that current. If you have
> > > any other suggestions please send them.
> > > 
> > > Thanks,
> > > 
> > > edgar
> > 
> > Does your ISP whitelist by MAC address?
> 
> My ISP locks the connection to a certain MAC for a number of hours. Tech
> support can probably delete the old lease.
> 
> Best regards,
> 
> Mikkel
>

I don't think this is the case. I was able to connect directly to my laptop and
get a lease immediately.  Its odd... With base dhclient it goes something like:

em0 no link
em0. got link

and then nothing.

I installed isc-dhcp-client and it actually goes through the steps of the whole
DHCPDISCOVER...etc,etc. Unfortunantly it still ends with me not having a 
connection.
I doubt it will do anything, but I'm going to try updating the bios. Sort of 
like
checking the oil when the problem is a flat tire, but who knows.

Thanks,

edgar 



Re: apu2 em0/dhclient problems

2019-01-27 Thread trondd
On Sun, January 27, 2019 12:44 pm, Edgar Pettijohn wrote:
> I'm trying to replace my dieing soekris box with an apu2 dmesg below.
> However, I can't seem to get em0 to connect to my isp. It will work
> when connecting to the soekris box though. So I don't think its the
> interface that is the problem. But everything I try seems to rule out
> eachother as the problem, leaving me in a viscious cycle.
>
> I'm going to try disabling pf and after that current. If you have
> any other suggestions please send them.
>
> Thanks,
>
> edgar

Does your ISP whitelist by MAC address?


>
> OpenBSD 6.4 (GENERIC.MP) #364: Thu Oct 11 13:30:23 MDT 2018
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 1996152832 (1903MB)
> avail mem = 1926434816 (1837MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x77fb7020 (7 entries)
> bios0: vendor coreboot version "4.0.7" date 02/28/2017
> bios0: PC Engines APU2
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S1 S2 S3 S4 S5
> acpi0: tables DSDT FACP SSDT APIC HEST SSDT SSDT HPET
> acpi0: wakeup devices PWRB(S4) PBR4(S4) PBR5(S4) PBR6(S4) PBR7(S4)
> PBR8(S4) UOH1(S3) UOH3(S3) UOH5(S3) XHC0(S4)
> acpitimer0 at acpi0: 3579545 Hz, 32 bits
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: AMD GX-412TC SOC, 998.27 MHz, 16-30-01
> cpu0:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB
> 64b/line 16-way L2 cache
> cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully
> associative
> cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully
> associative
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> cpu0: apic clock running at 99MHz
> cpu0: mwait min=64, max=64, IBE
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: AMD GX-412TC SOC, 998.13 MHz, 16-30-01
> cpu1:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> cpu1: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB
> 64b/line 16-way L2 cache
> cpu1: ITLB 32 4KB entries fully associative, 8 4MB entries fully
> associative
> cpu1: DTLB 40 4KB entries fully associative, 8 4MB entries fully
> associative
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 2 (application processor)
> cpu2: AMD GX-412TC SOC, 998.13 MHz, 16-30-01
> cpu2:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> cpu2: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB
> 64b/line 16-way L2 cache
> cpu2: ITLB 32 4KB entries fully associative, 8 4MB entries fully
> associative
> cpu2: DTLB 40 4KB entries fully associative, 8 4MB entries fully
> associative
> cpu2: smt 0, core 2, package 0
> cpu3 at mainbus0: apid 3 (application processor)
> cpu3: AMD GX-412TC SOC, 998.13 MHz, 16-30-01
> cpu3:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
> cpu3: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB
> 64b/line 16-way L2 cache
> cpu3: ITLB 32 4KB entries fully associative, 8 4MB entries fully
> associative
> cpu3: DTLB 40 4KB entries fully associative, 8 4MB entries fully
> associative
> cpu3: smt 0, core 3, package 0
> ioapic0 at mainbus0: apid 4 pa 0xfec0, version 21, 24 pins
> ioapic1 at mainbus0: apid 5 pa 0xfec2, version 21, 32 pins, remapped
> acpihpet0 at acpi0: 14318180 Hz
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus -1 (PBR4)
> acpiprt2 at acpi0: bus 1 (PBR5)
> acpiprt3 at acpi0: bus 2 (PBR6)
> acpiprt4 at acpi0: bus 3 (PBR7)
> acpiprt5 at acpi0: bus 4 (PBR8)
> acpicpu0 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS
> acpicpu1 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS
> acpicpu2 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS
> acpicpu3 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS
> acpibtn0 at 

apu2 em0/dhclient problems

2019-01-27 Thread Edgar Pettijohn
I'm trying to replace my dieing soekris box with an apu2 dmesg below.
However, I can't seem to get em0 to connect to my isp. It will work
when connecting to the soekris box though. So I don't think its the 
interface that is the problem. But everything I try seems to rule out
eachother as the problem, leaving me in a viscious cycle.

I'm going to try disabling pf and after that current. If you have
any other suggestions please send them.

Thanks,

edgar

OpenBSD 6.4 (GENERIC.MP) #364: Thu Oct 11 13:30:23 MDT 2018
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 1996152832 (1903MB)
avail mem = 1926434816 (1837MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x77fb7020 (7 entries)
bios0: vendor coreboot version "4.0.7" date 02/28/2017
bios0: PC Engines APU2
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S2 S3 S4 S5
acpi0: tables DSDT FACP SSDT APIC HEST SSDT SSDT HPET
acpi0: wakeup devices PWRB(S4) PBR4(S4) PBR5(S4) PBR6(S4) PBR7(S4) PBR8(S4) 
UOH1(S3) UOH3(S3) UOH5(S3) XHC0(S4)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD GX-412TC SOC, 998.27 MHz, 16-30-01
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
16-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD GX-412TC SOC, 998.13 MHz, 16-30-01
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
cpu1: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
16-way L2 cache
cpu1: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu1: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: AMD GX-412TC SOC, 998.13 MHz, 16-30-01
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
cpu2: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
16-way L2 cache
cpu2: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu2: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: AMD GX-412TC SOC, 998.13 MHz, 16-30-01
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
cpu3: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 
16-way L2 cache
cpu3: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu3: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 4 pa 0xfec0, version 21, 24 pins
ioapic1 at mainbus0: apid 5 pa 0xfec2, version 21, 32 pins, remapped
acpihpet0 at acpi0: 14318180 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PBR4)
acpiprt2 at acpi0: bus 1 (PBR5)
acpiprt3 at acpi0: bus 2 (PBR6)
acpiprt4 at acpi0: bus 3 (PBR7)
acpiprt5 at acpi0: bus 4 (PBR8)
acpicpu0 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS
acpicpu1 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS
acpicpu2 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS
acpicpu3 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS
acpibtn0 at acpi0: PWRB
acpicmos0 at acpi0
cpu0: 998 MHz: speeds: 1000 800 600 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "AMD AMD64 16h Root Complex" rev 0x00
pchb1 at pci0 dev 2 function 0 "AMD AMD64 16h Host" rev 0x00
ppb0 at pci0 dev 2 function 2 "AMD AMD64 16h PCIE" 

dhclient hang on OpenBSD 6.3 on sis network card

2018-08-23 Thread root
Hello,
I'm running a diskless Soekris net4526 (i386 architecture) and I have
encountered a problem when using dhcp setting on my hostname.sis0 file.
The booting process stops at 'Starting network'.

If I set the interface's hostname.sis0 to static IP, everything works
OK.

If I bring up the interface statically and _then_ run netstart, it also
hangs as it does in the boot process.
air# echo "dhcp" >/etc/hostname.sis0
air# /etc/netstart -n sis0
ifconfig sis0  down;dhclient sis0
air# /etc/netstart sis0
At this point the machine stops responding and must be hard-reset. ^C
doesn't do anything.

If I replicate the steps /etc/netstart takes and run ifconfig and
dhclient separately, it appears as the problem resides in dhclient, as
it straight up freezes and doesn't respond to ^C:
air# ifconfig sis0 down
air# dhclient -v sis0

However, if I set my IP configuration statically to somewhere in my
subnet and then run dhclient, everything works as it should:
air# ifconfig sis0
sis0: flags=8843 mtu 1500
lladdr 00:00:24:c4:56:20
index 2 priority 0 llprio 3
groups: netboot
media: Ethernet autoselect (100baseTX full-duplex)
status: active
inet 192.168.16.11 netmask 0xff00 broadcast 192.168.16.255
air# dhclient -v sis0
sis0: DHCPDISCOVER - interval 1
sis0: DHCPOFFER from 192.168.16.1 (00:22:4d:a6:12:6f)
sis0: DHCPREQUEST to 255.255.255.255
sis0: DHCPACK from 192.168.16.1 (00:22:4d:a6:12:6f)
sis0: bound to 192.168.16.11 from 192.168.16.1 (00:22:4d:a6:12:6f)
air#

My dmesg output:
   OpenBSD 6.3 (GENERIC) #490: Sat Mar 24 14:31:33 MDT 2018
   dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
   cpu0: AMD Am486DX4 W/B or Am5x86 W/B 150 ("AuthenticAMD" 486-class)
   cpu0: FPU
   real mem  = 66600960 (63MB)
   avail mem = 51486720 (49MB)
   warning: no entropy supplied by boot loader
   mpath0 at root
   scsibus0 at mpath0: 256 targets
   mainbus0 at root
   bios0 at mainbus0: date 20/80/03, BIOS32 rev. 0 @ 0xf7840
   pcibios0 at bios0: rev 2.0 @ 0xf/0x1
   pcibios0: pcibios_get_intr_routing - function not supported
   pcibios0: PCI IRQ Routing information unavailable.
   pcibios0: PCI bus #0 is the last bus
   bios0: ROM list: 0xc8000/0x9000
   cpu0 at mainbus0: (uniprocessor)
   pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
   elansc0 at pci0 dev 0 function 0 "AMD ElanSC520 PCI" rev 0x00:
   product 0 stepping 1.1, CPU clock 133MHz, reset 0
   gpio0 at elansc0: 32 pins
   ath0 at pci0 dev 17 function 0 "Atheros AR5212" rev 0x01: irq 10
   ath0: AR5414 10.5 phy 6.1 rf2414 6.3 eeprom 5.2, FCC2A*, address
   00:0c:42:1b:f6:0e
   sis0 at pci0 dev 18 function 0 "NS DP83815 10/100" rev 0x00,
   DP83816A: irq 11, address 00:00:24:c4:56:20
   nsphyter0 at sis0 phy 0: DP83815 10/100 PHY, rev. 1
   isa0 at mainbus0
   isadma0 at isa0
   com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
   com0: console
   com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
   pckbc0 at isa0 port 0x60/5 irq 1 irq 12
   pckbd0 at pckbc0 (kbd slot)
   wskbd0 at pckbd0: console keyboard
   wdc1 at isa0 port 0x170/8 irq 15
   wd0 at wdc1 channel 0 drive 0: <064MB ATA Flash Disk>
   wd0: 1-sector PIO, LBA, 61MB, 125056 sectors
   wd0(wdc1:0:0): using BIOS timings
   pcppi0 at isa0 port 0x61
   spkr0 at pcppi0
   npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
   vscsi0 at root
   scsibus1 at vscsi0: 256 targets
   softraid0 at root
   scsibus2 at softraid0: 256 targets
   PXE boot MAC address 00:00:24:c4:56:20, interface sis0
   nfs_boot: using interface sis0, with revarp & bootparams
   nfs_boot: client_addr=192.168.16.11
   nfs_boot: server_addr=192.168.16.1 hostname=air
   root on 192.168.16.1:/var/exports/air
   nfs_boot: bootparam get swap: 60
   WARNING: no swap

Is there something I am missing?

-- 
Thanks in advance
Kristjan Komlosi



Re: dhclient release a lease?

2018-05-14 Thread Rob Schmersel
On Mon, 14 May 2018 19:36:12 -0400
Quartz <qua...@sneakertech.com> wrote:

> > Currently there is no facility in dhclient(8) to issue RELEASE
> > messages. I had no recollection of adding such a thing, and a
> > quick  
> 
> > confirmed there is no DHCPRELEASE related code.  
> 
> Ergh. OK thanks, that's super annoying that it's not there.
> 
> >Which
> > signal(s) are used elsewhere to trigger RELEASE? Goggle is not
> > coughing up an obvious answer. :-)  
> 
> It varies, IIRC on at least on other linux or bsd distro sending HUP 
> took a more literal approach ("hang up and leave") and sent a DHCP 
> release before nuking its lease cache, and I'm pretty sure somewhere 
> else you could send "SIGUSR2" or something.
> 

On Red Hat/Debian  (and derivatives) they use dhclient which has a -r
switch to release the lease. From the man page:

-r Release  the  current  lease and stop the running DHCP client as
previously recorded in the PID file. When shutdown via this method
dhclient-script will be executed with the specific  reason  for
calling the  script set.  The client normally doesn't release the
current lease as this is not required by the DHCP protocol but some
cable ISPs require their clients to notify the server if they wish  to
release an assigned IP address.



Re: dhclient release a lease?

2018-05-14 Thread Quartz

Currently there is no facility in dhclient(8) to issue RELEASE
messages. I had no recollection of adding such a thing, and a
quick



confirmed there is no DHCPRELEASE related code.


Ergh. OK thanks, that's super annoying that it's not there.


Which
signal(s) are used elsewhere to trigger RELEASE? Goggle is not
coughing up an obvious answer. :-)


It varies, IIRC on at least on other linux or bsd distro sending HUP 
took a more literal approach ("hang up and leave") and sent a DHCP 
release before nuking its lease cache, and I'm pretty sure somewhere 
else you could send "SIGUSR2" or something.




dhclient release a lease?

2018-05-14 Thread Quartz

How do I get dhclient to release its DHCP lease?

I want to be clear that I'm not interested in having it RENEW the lease 
but RELEASE it- in other words send the signal to the DHCP server "I'm 
going bye-bye, go ahead and put this IP address back in your free pool".


Other versions of dhclient on other OSs have commandline arguments that 
activate this behavior, or will accept SIGHUP or some other variant 
signal, but I can't figure out how to make this happen on openbsd.




Re: 6.3 - dhclient not working on wireless

2018-05-11 Thread Dumitru Mișu Moldovan
On 05/06/18 11:39, Stefan Sperling wrote:
> On Sat, May 05, 2018 at 11:03:52PM +0200, Riccardo Mottola wrote:

[…]

> A commit of mine accidentally broke WEP support back in August 2017.
> This was eventually fixed in -current 2 weeks ago. Nobody noticed
> that WEP was broken for 8 months...

[…]

This must be the reason WEP networks never worked for me, couldn't
figure it why until now…  I am a newcomer in the OpenBSD world and could
never get to connect through wireless tethering using my phone.  The
Nokia N9 only supports WEP for encryption.  I've tried once using an
unencrypted network with the N9 as hotspot, but strangers started
stealing my precious mobile data, even when in a train, next to me!  :-]

The only other alternative was tethering through an USB cable, which is
cumbersome, first of all because I can only get an SSH connection to the
phone's Dropbear SSH server, through which I have to proxy everything.
Also, if I'm outside with my notebook, I would rather have my phone not
connected to it with a cable.

Would also much appreciate a fix for -stable, as -current is not
feasible for me, unfortunately, because of work-related issues.



signature.asc
Description: OpenPGP digital signature


WEP broken (was: Re: 6.3 - dhclient not working on wireless)

2018-05-11 Thread Stefan Sperling
On Fri, May 11, 2018 at 04:56:19PM +0200, Riccardo Mottola wrote:
> Is a backport possible to "stable"?

I don't think it is worth the effort for us.

You are literally the only person I know of who has requested an
official backport of this fix. WEP was already broken in OpenBSD 6.2
which was released in October 2017. In all this time, nobody complained.
So it does not look like this problem affects many people.

The patch to fix WEP is trivial and should apply cleanly to
a 6.3 source tree if needed:

Index: ieee80211_proto.c
===
RCS file: /cvs/src/sys/net80211/ieee80211_proto.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -p -r1.83 -r1.84
--- ieee80211_proto.c   6 Feb 2018 22:14:52 -   1.83
+++ ieee80211_proto.c   27 Apr 2018 15:33:49 -  1.84
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_proto.c,v 1.83 2018/02/06 22:14:52 phessler Exp $   
*/
+/* $OpenBSD: ieee80211_proto.c,v 1.84 2018/04/27 15:33:49 stsp Exp $   
*/
 /* $NetBSD: ieee80211_proto.c,v 1.8 2004/04/30 23:58:20 dyoung Exp $   
*/
 
 /*-
@@ -948,7 +948,8 @@ justcleanup:
break;
}
ni->ni_rsn_supp_state = RSNA_SUPP_INITIALIZE;
-   ieee80211_crypto_clear_groupkeys(ic);
+   if (ic->ic_flags & IEEE80211_F_RSNON)
+   ieee80211_crypto_clear_groupkeys(ic);
break;
case IEEE80211_S_SCAN:
ic->ic_flags &= ~IEEE80211_F_SIBSS;
@@ -960,7 +961,8 @@ justcleanup:
ni->ni_associd = 0;
ni->ni_rstamp = 0;
ni->ni_rsn_supp_state = RSNA_SUPP_INITIALIZE;
-   ieee80211_crypto_clear_groupkeys(ic);
+   if (ic->ic_flags & IEEE80211_F_RSNON)
+   ieee80211_crypto_clear_groupkeys(ic);
switch (ostate) {
case IEEE80211_S_INIT:
 #ifndef IEEE80211_STA_ONLY
@@ -1006,7 +1008,8 @@ justcleanup:
break;
case IEEE80211_S_AUTH:
ni->ni_rsn_supp_state = RSNA_SUPP_INITIALIZE;
-   ieee80211_crypto_clear_groupkeys(ic);
+   if (ic->ic_flags & IEEE80211_F_RSNON)
+   ieee80211_crypto_clear_groupkeys(ic);
switch (ostate) {
case IEEE80211_S_INIT:
if (ifp->if_flags & IFF_DEBUG)






Re: 6.3 - dhclient not working on wireless

2018-05-11 Thread Riccardo Mottola

Hi,

Stefan Sperling wrote:

The keyword 'nwkey' indicates you are using WEP. Is that correct?


Yes!



A commit of mine accidentally broke WEP support back in August 2017.
This was eventually fixed in -current 2 weeks ago. Nobody noticed
that WEP was broken for 8 months...


I did notice that actually, but I upgraded two computers on a different 
timeframe. The first one being old, i supposed had different issues, I 
thought it had an issue with the PCMCIA adapter.. so i was unable to do 
further test
When I updated a more modern ThinkPad which was known good and which has 
both wired and wireless integrated networks I was able to track it down.


Is a backport possible to "stable"?



I'd suggest switching this wifi network to WPA2, or just leaving it open
since WEP is no better than leaving your wifi open in the first place.


Well, almost, but at least people don't accidentally hack, but must do 
that on purpose..




We provide WEP only for interop with legacy networks outside your control.


That's the case... certain devices do not support WPA2 on that network 
so it stays such and data is encrypted on a higher level (e.g. ssh 
connections)


Riccardo



Re: 6.3 - dhclient not working on wireless

2018-05-06 Thread Stefan Sperling
On Sat, May 05, 2018 at 11:03:52PM +0200, Riccardo Mottola wrote:
> Hi,
> 
> I upgraded to 6.3 and I cannot connect to a certain WiFi network anymore,
> or, better, ifconfig says it is connected and the LED says it is too, but
> then dhclient fails to get a lease from it.
> I can connect to the same network through wired ethernet and dhclient
> correctly gets an address from the same router.
> 
> What is going wrong? can I enable some further information?
> 
> Here you can see ifconfig "active":
> wpi0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>     lladdr 00:13:02:9a:52:1b
>     index 2 priority 4 llprio 3
>     groups: wlan
>     media: IEEE802.11 autoselect (DS1 mode 11g)
>     status: active
>     ieee80211: nwid westernesse chan 10 bssid f8:d1:11:b9:07:2a -16dBm
> nwkey

The keyword 'nwkey' indicates you are using WEP. Is that correct?

A commit of mine accidentally broke WEP support back in August 2017.
This was eventually fixed in -current 2 weeks ago. Nobody noticed
that WEP was broken for 8 months...

I'd suggest switching this wifi network to WPA2, or just leaving it open
since WEP is no better than leaving your wifi open in the first place.

We provide WEP only for interop with legacy networks outside your control.



6.3 - dhclient not working on wireless

2018-05-05 Thread Riccardo Mottola

Hi,

I upgraded to 6.3 and I cannot connect to a certain WiFi network 
anymore, or, better, ifconfig says it is connected and the LED says it 
is too, but then dhclient fails to get a lease from it.
I can connect to the same network through wired ethernet and dhclient 
correctly gets an address from the same router.


What is going wrong? can I enable some further information?

Here you can see ifconfig "active":
wpi0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    lladdr 00:13:02:9a:52:1b
    index 2 priority 4 llprio 3
    groups: wlan
    media: IEEE802.11 autoselect (DS1 mode 11g)
    status: active
    ieee80211: nwid westernesse chan 10 bssid f8:d1:11:b9:07:2a 
-16dBm nwkey


(getting very near to the access point doesn't help eiher).
 dhclient -v wpi0
wpi0: DHCPDISCOVER - interval 1
wpi0: DHCPDISCOVER - interval 1
wpi0: DHCPDISCOVER - interval 1
wpi0: DHCPDISCOVER - interval 1
wpi0: DHCPDISCOVER - interval 1
wpi0: DHCPDISCOVER - interval 1
wpi0: DHCPDISCOVER - interval 1
wpi0: DHCPDISCOVER - interval 1
wpi0: DHCPDISCOVER - interval 1
wpi0: DHCPDISCOVER - interval 1
wpi0: no lease ... sleeping

what's going wrong? how can I get more information?
It used to work: I have a small shell script I launch so i know I did 
not change anything, nor did the network configuration change.


Thanks,

Riccardo


Mandatory dmesg:
OpenBSD 6.3 (GENERIC.MP) #491: Sat Mar 24 14:38:11 MDT 2018
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Genuine Intel(R) CPU T2500 @ 2.00GHz ("GenuineIntel" 686-class) 2 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,MWAIT,VMX,EST,TM2,xTPR,PDCM,PERF,SENSOR

real mem  = 3219472384 (3070MB)
avail mem = 3146792960 (3001MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: date 04/01/10, BIOS32 rev. 0 @ 0xfd6b0, SMBIOS rev. 
2.4 @ 0xe0010 (68 entries)

bios0: vendor LENOVO version "79ETE6WW (2.26 )" date 04/01/2010
bios0: LENOVO 2007WRU
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT ECDT TCPA APIC MCFG HPET BOOT SSDT SSDT 
SSDT SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) EXP0(S4) EXP1(S4) EXP2(S4) 
EXP3(S4) PCI1(S4) USB0(S3) USB1(S3) USB2(S3) USB7(S3) HDEF(S4)

acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 166MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Genuine Intel(R) CPU T2500 @ 2.00GHz ("GenuineIntel" 686-class) 2 GHz
cpu1: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,MWAIT,VMX,EST,TM2,xTPR,PDCM,PERF,SENSOR

ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins
, remapped to apid 1
acpimcfg0 at acpi0 addr 0xf000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (AGP_)
acpiprt2 at acpi0: bus 2 (EXP0)
acpiprt3 at acpi0: bus 3 (EXP1)
acpiprt4 at acpi0: bus 4 (EXP2)
acpiprt5 at acpi0: bus 12 (EXP3)
acpiprt6 at acpi0: bus 21 (PCI1)
acpicpu0 at acpi0: !C3(100@57 io@0x1016), !C2(500@1 io@0x1014), 
C1(1000@1 halt), PSS
acpicpu1 at acpi0: !C3(100@57 io@0x1016), !C2(500@1 io@0x1014), 
C1(1000@1 halt), PSS

acpipwrres0 at acpi0: PUBS, resource for USB0, USB2, USB7
acpitz0 at acpi0: critical temperature is 127 degC
acpitz1 at acpi0: critical temperature is 99 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
"IBM0057" at acpi0 not configured
"IBM0071" at acpi0 not configured
"ATM1200" at acpi0 not configured
acpibat0 at acpi0: BAT0 model "92P1137" serial   121 type LION oem "SANYO"
acpiac0 at acpi0: AC unit offline
acpithinkpad0 at acpi0
acpidock0 at acpi0: GDCK not docked (0)
acpivideo0 at acpi0: VID_
acpivout0 at acpivideo0: LCD0
acpivideo1 at acpi0: VID_
acpivout at acpivideo1 not configured
bios0: ROM list: 0xc/0xfe00 0xd/0x1000 0xd1000/0x1000 
0xdc000/0x4000! 0xe/0x1!

cpu0: Enhanced SpeedStep 1995 MHz: speeds: 2000, 1667, 1333, 1000 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82945GM Host" rev 0x03
ppb0 at pci0 dev 1 function 0 "Intel 82945GM PCIE" rev 0x03: apic 1 int 16
pci1 at ppb0 bus 1
radeondrm0 at pci1 dev 0 function 0 "ATI Radeon Mobility X1400" rev 0x00
drm0 at radeondrm0
radeondrm0: apic 1 int 16
azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: msi
azalia0: codecs: Analog Devices AD1981HD, Conexant/0x2bfa, using Analog 
Devices AD1981HD

audio0 at azalia0
ppb1 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: apic 1 int 20
pci2 at ppb1 bu

Re: dhclient expects IPv4 address in dhclient.conf

2018-05-03 Thread Marc Peters
On Thu, May 03, 2018 at 12:05:40PM +0200, Paul de Weerd wrote:
> Stick a v6 recursor in /etc/resolv.conf.tail.  When dhclient updates
> /etc/resolv.conf, it'll append the contents of /etc/resolv.conf.tail
> to it and you will have your v6 resolver availble that way.  You could
> even ignore the v4 nameserver and use your manually configured
> nameservers only.  See resolv.conf(5).
> 
> The only thing I don't think is possible with base tools is having
> your v6 recursor listed *before* the dhcp offered recursor.
> 
> Cheers,
> 
> Paul 'WEiRD' de Weerd

Thank you for your answers. Actually, i would like to keep them as
backup, when doing upgrades or the bind package is not working as
expected. I will take a deeper dive into resolv.conf to have a look. I
thought, that an /etc/resolv.conf.head file would do the trick, but it seems to 
be
ignored on OpenBSD.



Re: dhclient expects IPv4 address in dhclient.conf

2018-05-03 Thread Paul de Weerd
On Thu, May 03, 2018 at 10:44:18AM +0200, Marc Peters wrote:
| On Thu, May 03, 2018 at 10:31:27AM +0200, Janne Johansson wrote:
| >Since manpage doesn't mention v6 namespace at all, I'd wager you would
| >have to
| >run something else to pick up v6 resolvers.
| 
| Yeah, that's right. Maybe, i stick to v4 resolvers for now or add it by
| hand, when i reboot it.

Stick a v6 recursor in /etc/resolv.conf.tail.  When dhclient updates
/etc/resolv.conf, it'll append the contents of /etc/resolv.conf.tail
to it and you will have your v6 resolver availble that way.  You could
even ignore the v4 nameserver and use your manually configured
nameservers only.  See resolv.conf(5).

The only thing I don't think is possible with base tools is having
your v6 recursor listed *before* the dhcp offered recursor.

Cheers,

Paul 'WEiRD' de Weerd

-- 
>[<++>-]<+++.>+++[<-->-]<.>+++[<+
+++>-]<.>++[<>-]<+.--.[-]
 http://www.weirdnet.nl/ 



Re: dhclient expects IPv4 address in dhclient.conf

2018-05-03 Thread Marc Peters
On Thu, May 03, 2018 at 10:31:27AM +0200, Janne Johansson wrote:
>Since manpage doesn't mention v6 namespace at all, I'd wager you would
>have to
>run something else to pick up v6 resolvers.

Yeah, that's right. Maybe, i stick to v4 resolvers for now or add it by
hand, when i reboot it.



Re: dhclient expects IPv4 address in dhclient.conf

2018-05-03 Thread Janne Johansson
2018-05-02 18:07 GMT+02:00 Marc Peters <m...@mpeters.org>:

> On Wed, May 02, 2018 at 04:24:50PM +0200, Janne Johansson wrote:
> > Seems common on other dhcpd's too:
> > https://lists.isc.org/pipermail/dhcp-users/2012-May/015511.html
> >
>
> ah, the option has a different name for IPv6 nameservers. Does the base
> dhclient recognize these different options, or do i have to give
> isc-dhcp-client a try for this?
>

Since manpage doesn't mention v6 namespace at all, I'd wager you would have
to
run something else to pick up v6 resolvers.

-- 
May the most significant bit of your life be positive.


Re: dhclient expects IPv4 address in dhclient.conf

2018-05-02 Thread Marc Peters
On Wed, May 02, 2018 at 04:24:50PM +0200, Janne Johansson wrote:
> Seems common on other dhcpd's too:
> https://lists.isc.org/pipermail/dhcp-users/2012-May/015511.html
> 

ah, the option has a different name for IPv6 nameservers. Does the base
dhclient recognize these different options, or do i have to give
isc-dhcp-client a try for this? 



Re: dhclient expects IPv4 address in dhclient.conf

2018-05-02 Thread Marc Peters
Am 2. Mai 2018 16:24:50 MESZ schrieb Janne Johansson <icepic...@gmail.com>:
>2018-05-02 16:06 GMT+02:00 Marc Peters <m...@mpeters.org>:
>
>> Hi misc,
>> dhclient hates me. I would like to prepend an IPv6 nameserver in the
>> dhclient configuration on my router when connecting to my ISP, but
>> dhclient gives me following error:
>>
>> em1: /etc/dhclient.conf line 17: expecting IPv4 address.
>> em1: prepend domain-name-servers "::1"
>> em1: ^
>> dhclient.conf ist plain simple:
>> ~ $ grep -v "#" /etc/dhclient.conf
>>
>> supersede host-name "router";
>>
>> prepend domain-name-servers 127.0.0.1;
>>
>> prepend domain-name-servers "::1";
>>
>> Is this intended?
>>
>>
>Seems common on other dhcpd's too:
>https://lists.isc.org/pipermail/dhcp-users/2012-May/015511.html

This looks like a server issue and fixed in the meantime, otherwise the Windows 
Clients won't get any v6 nameservers, as they don't get it from the RAs.

My issue is with dhclient setting something in /etc/resolve.conf.

-- 
Sent from my cell phone



Re: dhclient expects IPv4 address in dhclient.conf

2018-05-02 Thread Janne Johansson
2018-05-02 16:06 GMT+02:00 Marc Peters <m...@mpeters.org>:

> Hi misc,
> dhclient hates me. I would like to prepend an IPv6 nameserver in the
> dhclient configuration on my router when connecting to my ISP, but
> dhclient gives me following error:
>
> em1: /etc/dhclient.conf line 17: expecting IPv4 address.
> em1: prepend domain-name-servers "::1"
> em1: ^
> dhclient.conf ist plain simple:
> ~ $ grep -v "#" /etc/dhclient.conf
>
> supersede host-name "router";
>
> prepend domain-name-servers 127.0.0.1;
>
> prepend domain-name-servers "::1";
>
> Is this intended?
>
>
Seems common on other dhcpd's too:
https://lists.isc.org/pipermail/dhcp-users/2012-May/015511.html


-- 
May the most significant bit of your life be positive.


dhclient expects IPv4 address in dhclient.conf

2018-05-02 Thread Marc Peters
Hi misc,

dhclient hates me. I would like to prepend an IPv6 nameserver in the
dhclient configuration on my router when connecting to my ISP, but
dhclient gives me following error:

em1: /etc/dhclient.conf line 17: expecting IPv4 address.
em1: prepend domain-name-servers "::1"
em1: ^

dhclient.conf ist plain simple:
~ $ grep -v "#" /etc/dhclient.conf  
  
supersede host-name "router";   
  
prepend domain-name-servers 127.0.0.1;  
  
prepend domain-name-servers "::1";

Is this intended?

Best,
Marc

--
dmesg:
OpenBSD 6.3 (GENERIC.MP) #1: Sat Apr 21 14:26:25 CEST 2018

r...@syspatch-63-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8151306240 (7773MB)
avail mem = 7897186304 (7531MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xeaf40 (52 entries)
bios0: vendor American Megatrends Inc. version "0306" date
08/18/2011
bios0: ASUSTeK Computer INC. E45M1-I DELUXE
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG HPET SSDT SSDT
acpi0: wakeup devices SBAZ(S4) UAR1(S4) P0PC(S4) UHC1(S4) UHC2(S4)
USB3(S4) UHC4(S4) USB5(S4) UHC6(S4) UHC7(S4) PE20(S4) PE21(S4)
RLAN(S4) PE22(S4) PE23(S4) BR14(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD E-450 APU with Radeon(tm) HD Graphics, 1650.41 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,SSSE3,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,IBS,SKINIT,ITSC
cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache,
512KB 64b/line 16-way L2 cache
cpu0: 8 4MB entries fully associative
cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully
associative
acpitimer0: recalibrated TSC frequency 1649918204 Hz
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 199MHz
cpu0: mwait min=64, max=64, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD E-450 APU with Radeon(tm) HD Graphics, 1649.93 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,SSSE3,CX16,POPCNT,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,IBS,SKINIT,ITSC
cpu1: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache,
512KB 64b/line 16-way L2 cache
cpu1: 8 4MB entries fully associative
cpu1: DTLB 40 4KB entries fully associative, 8 4MB entries fully
associative
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 0 pa 0xfec0, version 21, 24 pins
, remapped to apid 0
acpimcfg0 at acpi0 addr 0xe000, bus 0-255
acpihpet0 at acpi0: 14318180 Hz
acpihpet0: recalibrated TSC frequency 1649928660 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 3 (PE20)
acpiprt2 at acpi0: bus 4 (PE21)
acpiprt3 at acpi0: bus -1 (PE22)
acpiprt4 at acpi0: bus -1 (PE23)
acpiprt5 at acpi0: bus -1 (BR15)
acpiprt6 at acpi0: bus -1 (PCE6)
acpiprt7 at acpi0: bus -1 (PCE7)
acpiprt8 at acpi0: bus -1 (PCE8)
acpiprt9 at acpi0: bus 1 (BR14)
acpicpu0 at acpi0: C2(0@100 io@0x1771), C1(@1 halt!), PSS
acpicpu1 at acpi0: C2(0@100 io@0x1771), C1(@1 halt!), PSS
acpibtn0 at acpi0: PWRB
"PNP0C14" at acpi0 not configured
cpu0: 1650 MHz: speeds: 1650 1320 825 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "AMD AMD64 14h Host" rev 0x00
radeondrm0 at pci0 dev 1 function 0 "ATI Radeon HD 6320" rev 0x00
drm0 at radeondrm0
radeondrm0: msi
azalia0 at pci0 dev 1 function 1 "ATI Radeon HD 6310 HD Audio" rev
0x00: msi
azalia0: no supported codecs
ppb0 at pci0 dev 4 function 0 "AMD AMD64 14h PCIE" rev 0x00: msi
pci1 at ppb0 bus 1
em0 at pci1 dev 0 function 0 "Intel 82576" rev 0x01: msi, address
90:e2:ba:e9:1a:3a
em1 at pci1 dev 0 function 1 "Intel 82576" rev 0x01: msi, address
90:e2:ba:e9:1a:3b
ahci0 at pci0 dev 17 function 0 "ATI SBx00 SATA" rev 0x40: apic 0
int 19, AHCI 1.2
ahci0: port 0: 6.0Gb/s
ahci0: port 1: 6.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, WDC WD10JPVX-22J, 01.0> SCSI3
0/direct fixed naa.50014ee60409ed8f
sd0: 953869MB, 512 bytes/sector, 1953525168 sectors
sd1 at scsibus1 targ 1 lun 0: <ATA, WDC WD10JPVX-22J, 01.0> SCSI3
0/direct fixed naa.50014ee604099ed2
sd1: 953869MB, 512 bytes/sector, 1953525168 sectors
ohci0 at pci0 dev 18 function 0 "ATI SB700 USB" rev 0x00: apic 0 int
18, version 1.0, legacy support
ehci0 at pci0 dev 18 function 2 "ATI SB700 USB2" rev 0x00: apic 0
int 17
usb0 at e

Re: Return back dhclient lease time displaying after renew an IP address manually

2018-04-27 Thread Denis
It was favourable to have lease information visible without any
additional commands right after new lease has been obtained...


On 4/26/2018 11:21 PM, Daniel Melameth wrote:
> On Thu, Apr 26, 2018 at 2:11 PM, Denis  wrote:
>> After upgrading 6.2amd64 -> 6.3amd64 there is no lease time info present
>> by renewing an IP address using '#sh /etc/netstart if0' command.
>>
>> Manually run dhclinent shows MAC address of a dhcpd server (very useful)
>> but lease time has been deprecated since 6.2 (very useful for different
>> dhcp servers lease time determining). Hope this helpful information will
>> be returned back in additional to dhcpd server's MAC added in 6.3.
> 
> cat /var/db/dhclient.leases.?
> 



Re: Return back dhclient lease time displaying after renew an IP address manually

2018-04-26 Thread Daniel Melameth
On Thu, Apr 26, 2018 at 2:11 PM, Denis  wrote:
> After upgrading 6.2amd64 -> 6.3amd64 there is no lease time info present
> by renewing an IP address using '#sh /etc/netstart if0' command.
>
> Manually run dhclinent shows MAC address of a dhcpd server (very useful)
> but lease time has been deprecated since 6.2 (very useful for different
> dhcp servers lease time determining). Hope this helpful information will
> be returned back in additional to dhcpd server's MAC added in 6.3.

cat /var/db/dhclient.leases.?



Return back dhclient lease time displaying after renew an IP address manually

2018-04-26 Thread Denis
After upgrading 6.2amd64 -> 6.3amd64 there is no lease time info present
by renewing an IP address using '#sh /etc/netstart if0' command.

Manually run dhclinent shows MAC address of a dhcpd server (very useful)
but lease time has been deprecated since 6.2 (very useful for different
dhcp servers lease time determining). Hope this helpful information will
be returned back in additional to dhcpd server's MAC added in 6.3.

Denis



Re: dhclient not renewing

2018-02-11 Thread Christer Solskogen
On Sun, Feb 11, 2018 at 5:05 AM, Kenneth R Westerback <kwesterb...@gmail.com
> 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;
}


Re: dhclient not renewing

2018-02-11 Thread Edgar Pettijohn



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

On Sun, Feb 11, 2018 at 12:47 AM,  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.




Re: dhclient not renewing

2018-02-11 Thread Christer Solskogen
On Sun, Feb 11, 2018 at 12:47 AM,  wrote:

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

hugs# hostname
hugs.antarctica.no
hugs# hostname -s
hugs


Re: dhclient not renewing

2018-02-10 Thread edgar

On Feb 10, 2018 5:07 PM, Christer Solskogen  
wrote:
>
> On Sat, Feb 10, 2018 at 11:16 PM, Edgar Pettijohn 
> 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



Re: dhclient not renewing

2018-02-10 Thread Christer Solskogen
On Sat, Feb 10, 2018 at 11:16 PM, Edgar Pettijohn 
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.


Re: dhclient not renewing

2018-02-10 Thread Edgar Pettijohn



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

On Sat, Feb 10, 2018 at 8:44 PM, Mihai Popescu <mih...@gmail.com> 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
 dera...@amd64.openbsd.org:/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;
}




Re: dhclient not renewing

2018-02-10 Thread Christer Solskogen
On Sat, Feb 10, 2018 at 8:44 PM, Mihai Popescu <mih...@gmail.com> 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
dera...@amd64.openbsd.org:/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;
}


Re: dhclient not renewing

2018-02-10 Thread Mihai Popescu
> 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



dhclient not renewing?

2018-02-10 Thread Christer Solskogen
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.


6.2: dhclient -L option appends, not overwrites

2017-10-26 Thread Mike
I just upgraded from 6.1 to 6.2 (amd64) and I'm noticing a differing
behavior with dhclient.

I use the -L option to write out the offered and effective leases.

With 6.1, when a lease was renewed, the -L lease file was overwritten
with the new information.

With 6.2, when a lease is renewed, it appears that the new information
is appended to the file specified by the -L option.

I had to implement a workaround in the scan of the lease file for the
information I need, and I've got that working again.  But the lease file
seems be increasing in size with each lease renewal (or when a lease is
obtained via a system reboot).  I had an ISP that put a 5 minute length
on their leases, and I have a concern that a short lease length like
that could generate a large -L lease file due to the appends.

Is this new behavior of appending to the file, rather than overwriting
it, expected behavior?

Thanks.



Re: Bug in dhclient, isc_named or misconfiguration ?

2017-09-09 Thread Zbyszek
I did that already (statically) but I find that as workaround. I think bug is 
in dhclient however I did not have time to investigate more. 

Thanks

Sent from iPhone
Zbyszek

> Wiadomość napisana przez Florian Ermisch <florian.ermi...@mailbox.org> w dniu 
> 09.09.2017, o godz. 10:50:
> 
> Hi Zbyszek,
> 
> are you required to run a DHCP client?
> I guess you get the same IP every time
> anyway (it's a VPS, right?) so why not 
> configure it statically?
> 
> Regards, Florian 
> 
> Am 7. September 2017 15:24:21 MESZ schrieb "Zbyszek Żółkiewski" 
> <zbys...@onefellow.com>:
>> Hi group,
>> 
>> Recently i come up with this problem: running isc_named + dhclient
>> cause isc_named to periodically loose binding to TCP port:
>> 
>> Sep  7 13:45:02 ns dhclient[12533]: DHCPREQUEST on vio0 to
>> 169.254.169.254
>> Sep  7 13:45:02 ns dhclient[12533]: DHCPACK from 169.254.169.254
>> (fe:00:00:88:fe:63)
>> Sep  7 13:45:02 ns named[76593]: no longer listening on
>> XXX.XXX.XXX.XXX#53
>> Sep  7 13:45:02 ns named[76593]: listening on IPv4 interface vio0,
>> XXX.XXX.XXX.XXX#53
>> Sep  7 13:45:02 ns named[76593]: binding TCP socket: address in use
>> Sep  7 13:45:02 ns dhclient[12533]: bound to XXX.XXX.XXX.XXX -- renewal
>> in 40027 seconds.
>> 
>> XXX is redacted public IP.
>> 
>> This is OpenBSD 6.1 
>> In bind i have already configured interface-interval 0; - but this do
>> not fix problem, any idea ? This problem looks like isolated to
>> OpenBSD.
>> 
>> Thanks,
>> 
>> _
>> Zbyszek Żółkiewski


smime.p7s
Description: S/MIME cryptographic signature


Re: Bug in dhclient, isc_named or misconfiguration ?

2017-09-09 Thread Florian Ermisch
Hi Zbyszek,

are you required to run a DHCP client?
I guess you get the same IP every time
anyway (it's a VPS, right?) so why not 
configure it statically?

Regards, Florian 

Am 7. September 2017 15:24:21 MESZ schrieb "Zbyszek Żółkiewski" 
<zbys...@onefellow.com>:
>Hi group,
>
>Recently i come up with this problem: running isc_named + dhclient
>cause isc_named to periodically loose binding to TCP port:
>
>Sep  7 13:45:02 ns dhclient[12533]: DHCPREQUEST on vio0 to
>169.254.169.254
>Sep  7 13:45:02 ns dhclient[12533]: DHCPACK from 169.254.169.254
>(fe:00:00:88:fe:63)
>Sep  7 13:45:02 ns named[76593]: no longer listening on
>XXX.XXX.XXX.XXX#53
>Sep  7 13:45:02 ns named[76593]: listening on IPv4 interface vio0,
>XXX.XXX.XXX.XXX#53
>Sep  7 13:45:02 ns named[76593]: binding TCP socket: address in use
>Sep  7 13:45:02 ns dhclient[12533]: bound to XXX.XXX.XXX.XXX -- renewal
>in 40027 seconds.
>
>XXX is redacted public IP.
>
>This is OpenBSD 6.1 
>In bind i have already configured interface-interval 0; - but this do
>not fix problem, any idea ? This problem looks like isolated to
>OpenBSD.
>
>Thanks,
>
>_
>Zbyszek Żółkiewski



Bug in dhclient, isc_named or misconfiguration ?

2017-09-07 Thread Zbyszek Żółkiewski
Hi group,

Recently i come up with this problem: running isc_named + dhclient cause 
isc_named to periodically loose binding to TCP port:

Sep  7 13:45:02 ns dhclient[12533]: DHCPREQUEST on vio0 to 169.254.169.254
Sep  7 13:45:02 ns dhclient[12533]: DHCPACK from 169.254.169.254 
(fe:00:00:88:fe:63)
Sep  7 13:45:02 ns named[76593]: no longer listening on XXX.XXX.XXX.XXX#53
Sep  7 13:45:02 ns named[76593]: listening on IPv4 interface vio0, 
XXX.XXX.XXX.XXX#53
Sep  7 13:45:02 ns named[76593]: binding TCP socket: address in use
Sep  7 13:45:02 ns dhclient[12533]: bound to XXX.XXX.XXX.XXX -- renewal in 
40027 seconds.

XXX is redacted public IP.

This is OpenBSD 6.1 
In bind i have already configured interface-interval 0; - but this do not fix 
problem, any idea ? This problem looks like isolated to OpenBSD.

Thanks,

_
Zbyszek Żółkiewski



Re: dhclient won't get any IP

2017-06-19 Thread Christer Solskogen
On Mon, Jun 19, 2017 at 10:11 AM, Stuart Henderson <s...@spacehopper.org>
wrote:

> On 2017-06-18, Christer Solskogen <christer.solsko...@gmail.com> wrote:
> > I'm running the latest snapshot, and I suspect that there is something
> > wrong with dhclient.
> > (or at least, that is the symptom)
> >
> >
> > Jun 18 20:50:14 tugs dhclient[79331]: DHCPDISCOVER on re2 - interval 1
> > Jun 18 20:50:14 tugs dhclient[79331]: DHCPOFFER from 51.174.112.1
> > (00:02:00:01:00:01)
> > Jun 18 20:50:14 tugs dhclient[79331]: lease declined: invalid host name
> in
> > host-name
>
> Please capture the packets:
>
> tcpdump -ni re2 -vvs1500 -X port bootps or bootpc
>
>
>

I've got this from Kenneth R Westerback:

"This would indicate that the DHCP option 12 (host-name) has a value
that is not a invalid DNS domain name. It appears I inadvertantly made
this a fatal error in recent changes, which it probably wasn't
before. i.e. the same error should be in your logs from before the
latest snapshot, but the lease was accepted.

I will check this out. Thanks."


Re: dhclient won't get any IP

2017-06-19 Thread Stuart Henderson
On 2017-06-18, Christer Solskogen <christer.solsko...@gmail.com> wrote:
> I'm running the latest snapshot, and I suspect that there is something
> wrong with dhclient.
> (or at least, that is the symptom)
>
>
> Jun 18 20:50:14 tugs dhclient[79331]: DHCPDISCOVER on re2 - interval 1
> Jun 18 20:50:14 tugs dhclient[79331]: DHCPOFFER from 51.174.112.1
> (00:02:00:01:00:01)
> Jun 18 20:50:14 tugs dhclient[79331]: lease declined: invalid host name in
> host-name

Please capture the packets:

tcpdump -ni re2 -vvs1500 -X port bootps or bootpc




Re: dhclient won't get any IP

2017-06-18 Thread Christer Solskogen
On Sun, Jun 18, 2017 at 10:54 PM, Edgar Pettijohn 
wrote:


>
> What is the `host-name` that it claims to be invalid?
>

I have no idea. dhclient.conf is empty.


Re: dhclient won't get any IP

2017-06-18 Thread Edgar Pettijohn



On 06/18/17 14:38, Christer Solskogen wrote:

I'm running the latest snapshot, and I suspect that there is something
wrong with dhclient.
(or at least, that is the symptom)


Jun 18 20:50:14 tugs dhclient[79331]: DHCPDISCOVER on re2 - interval 1
Jun 18 20:50:14 tugs dhclient[79331]: DHCPOFFER from 51.174.112.1
(00:02:00:01:00:01)
Jun 18 20:50:14 tugs dhclient[79331]: lease declined: invalid host name in
host-name


What is the `host-name` that it claims to be invalid?


Jun 18 20:50:14 tugs dhclient[79331]: DHCPDECLINE on re2
Jun 18 20:50:14 tugs dhclient[79331]: No acceptable DHCPOFFERS received.
Jun 18 20:50:14 tugs dhclient[79331]: No working leases in persistent
database - sleeping.
Jun 18 20:50:15 tugs dhclient[79331]: DHCPDISCOVER on re2 - interval 1
Jun 18 20:50:15 tugs dhclient[79331]: DHCPOFFER from 51.174.112.1
(00:02:00:01:00:01)
Jun 18 20:50:15 tugs dhclient[79331]: lease declined: invalid host name in
host-name
Jun 18 20:50:15 tugs dhclient[79331]: DHCPDECLINE on re2
Jun 18 20:50:15 tugs dhclient[79331]: No acceptable DHCPOFFERS received.
Jun 18 20:50:15 tugs dhclient[79331]: No working leases in persistent
database - sleeping.
Jun 18 20:50:16 tugs dhclient[79331]: DHCPDISCOVER on re2 - interval 1
Jun 18 20:50:16 tugs dhclient[79331]: DHCPOFFER from 51.174.112.1
(00:02:00:01:00:01)
Jun 18 20:50:16 tugs dhclient[79331]: lease declined: invalid host name in
host-name
Jun 18 20:50:16 tugs dhclient[79331]: DHCPDECLINE on re2

and it continues like this...
I installed isc-dhcp-client to see if the problem was my ISP but with that
client it works.




dhclient won't get any IP

2017-06-18 Thread Christer Solskogen
I'm running the latest snapshot, and I suspect that there is something
wrong with dhclient.
(or at least, that is the symptom)


Jun 18 20:50:14 tugs dhclient[79331]: DHCPDISCOVER on re2 - interval 1
Jun 18 20:50:14 tugs dhclient[79331]: DHCPOFFER from 51.174.112.1
(00:02:00:01:00:01)
Jun 18 20:50:14 tugs dhclient[79331]: lease declined: invalid host name in
host-name
Jun 18 20:50:14 tugs dhclient[79331]: DHCPDECLINE on re2
Jun 18 20:50:14 tugs dhclient[79331]: No acceptable DHCPOFFERS received.
Jun 18 20:50:14 tugs dhclient[79331]: No working leases in persistent
database - sleeping.
Jun 18 20:50:15 tugs dhclient[79331]: DHCPDISCOVER on re2 - interval 1
Jun 18 20:50:15 tugs dhclient[79331]: DHCPOFFER from 51.174.112.1
(00:02:00:01:00:01)
Jun 18 20:50:15 tugs dhclient[79331]: lease declined: invalid host name in
host-name
Jun 18 20:50:15 tugs dhclient[79331]: DHCPDECLINE on re2
Jun 18 20:50:15 tugs dhclient[79331]: No acceptable DHCPOFFERS received.
Jun 18 20:50:15 tugs dhclient[79331]: No working leases in persistent
database - sleeping.
Jun 18 20:50:16 tugs dhclient[79331]: DHCPDISCOVER on re2 - interval 1
Jun 18 20:50:16 tugs dhclient[79331]: DHCPOFFER from 51.174.112.1
(00:02:00:01:00:01)
Jun 18 20:50:16 tugs dhclient[79331]: lease declined: invalid host name in
host-name
Jun 18 20:50:16 tugs dhclient[79331]: DHCPDECLINE on re2

and it continues like this...
I installed isc-dhcp-client to see if the problem was my ISP but with that
client it works.


Re: Using isc-dhcp-client as alternate dhclient - Alias working (I think)

2016-10-13 Thread Ted Wynnychenko
Hello

I am responding to my original question.
I have been able to get isc-dhcp-client to work assigning an alias on the dhcp
interface.
In case this is of value to anyone, here is how I did it.

Obviously, I added isc-dhcp-client from packages.

I then created a new configuration file I called "isc-dhclient.conf"

In it, following the isc dhclient.conf man page, I added an "alias" section,
e.g.:

alias {
interface "em0";
fixed-address 10.0.0.0;
option subnet-mask 255.255.255.0;
}

Now, it seems, the isc dhclient modifies things on the system by calling
"dhclient-script" and passing it information as environment variables.  I
realized that the reason alias information wasn't being assigned was because the
"out-of-the-box" script included with the package completely ignores any alias
information sent to it.

So, I added two functions, and called them at (I think) the appropriate places,
to a new file dhclient-script-alias.
---
# diff /usr/local/sbin/dhclient-script /usr/local/sbin/dhclient-script-alias
23a24,36
> add_new_alias() {
>   if [ -n "$alias_ip_address" ]; then
>   ifconfig $interface inet alias $alias_ip_address netmask \
>   $alias_subnet_mask
>   fi
> }
>
> delete_old_alias() {
>   if [ -n "$alias_ip_address" ]; then
>   ifconfig $interface inet $alias_ip_address delete > /dev/null
2>&1
>   fi
> }
>
186a200,203
>   if [ "$old_ip_address" != "$alias_ip_address" ]; then
>   delete_old_alias
>   fi
>
198a216,218
>   if [ "$new_ip_address" != "$alias_ip_address" ]; then
>   add_new_alias
>   fi
216a237
>   delete_old_alias
237a259
>   delete_old_alias
---

Went back add added a "script" line to the isc-dhclient.conf file, as:

script "/usr/local/sbin/dhclient-script-alias";

Then modified /etc/hostname.em0 to run the isc dhclient.  But, before starting
the client, the interface needs to be brought up.  This resulted in:

# cat hostname.em0
! ifconfig em0 up
! /usr/local/sbin/dhclient -4 -cf /etc/isc-dhclient.conf -pf
/var/db/dhclient.pid em0

(I "know" - well, actually, "think" - that I could just use "up" for the first
line, but I did it this way.)

I also specified the /var/db location for the pid file, as the default location
(/var/run) for the pid file did not seem to work when starting the client during
boot (I don't know exactly why, but there was no "dhclient.pid" file present in
/var/run after boot, although it is created when starting the isc dhclient
manually on a running system).

Finally, I deleted a /etc/mygate file that was hanging around on the system.  (I
couldn't figure out why the default route was not being set correctly, but
eventually realized that removing the "dhcp" line from the hostname file told
netstart to stop ignoring the mygate file that was present, and so netstart
would reset the default route after the isc dhclient had set it correctly.)

So, I don't know if this will be of help to anyone.  I don't even know if the is
a sane way to do this.

But, I did come across a question or two about alias addresses with dhcp on
openbsd in the relatively recent past, so...

Ted

[demime 1.01d removed an attachment of type application/x-pkcs7-signature which 
had a name of smime.p7s]



Re: Using isc-dhcp-client as alternate dhclient

2016-09-23 Thread Stuart Henderson
On 2016-09-20, Theodore Wynnychenko <t...@uchicago.edu> wrote:
> First, I can't get the isc-dhcp-client to assign an alias to the interface,
> despite the documentation that states it should.

It seems to work if you preset the alias address on the interface
before running dhclient.

> Second, I (apparently) don't understand how to replace the base dhclient with
> the isc dhclient at boot.
>
> I tried modifying /etc/hostname.em0 from:
> ---
> dhcp NONE NONE NONE description "Uplink"
> ---
>
> To:
> ---
> ! /usr/local/sbin/dhclient -cf /etc/isc-dhclient.conf em0
> ---
>
> But this did not work.

Please define "did not work". What output did you get ("dmesg -s" might
help), what shows up in logs, etc?

> I now see in the hostname.if manpage that the command
> needs to be available in the single-user environment (/bin or /sbin)

AFAIK this is mostly for systems with /usr/local on NFS. I certainly
have some ports things successfully started from ! lines in hostname.if
files.



Re: Using isc-dhcp-client as alternate dhclient

2016-09-20 Thread Edgar Pettijohn
On 16-09-20 15:36:52, Theodore Wynnychenko wrote:
> Hello
> I would like to get the isc-dhcp-client working as a replacement for the base
> dhclient.
> 
> The primary reason for this is so that I can assign an alias to the interface.
> 
> But, I can't seem to figure out how to get this done.  I have two issues.
> 
> First, I can't get the isc-dhcp-client to assign an alias to the interface,
> despite the documentation that states it should.
> 
> I have created an /etc/isc-dhclient.conf file:
> ---
> timeout 60;
> retry 60;
> reboot 10;
> select-timeout 5;
> initial-interval 2;
> script "/usr/local/sbin/dhclient-script";
> 
> supersede domain-name "domain.com";
> supersede domain-name-servers d.n.s.1,d.n.s.2;
> 
> request subnet-mask, broadcast-address, time-offset, routers;
> 
> alias {
>   interface "em0";
>   fixed-address fi.xed.ip.addr;
>   option subnet-mask 255.255.255.0;
> }
> ---
> 
> But, after killing the running dhclient process (from base), removing the 
> leases
> at /var/db/dhclient.leases* and starting isc-dhcp-client with:
> 
> # /usr/local/sbin/dhclient -cf /etc/isc-dhclient.conf em0
> 
> the isc client is able to get a an offer from the dhcp server, but it does 
> _not_
> assign the alias address to the interface.  The only address is the 
> dynamically
> assigned one.
> 
> I can find no guidance on what I am doing wrong, and why the isc-dhcp-client 
> is
> not assigning the alias.
> 
> Second, I (apparently) don't understand how to replace the base dhclient with
> the isc dhclient at boot.
> 
> I tried modifying /etc/hostname.em0 from:
> ---
> dhcp NONE NONE NONE description "Uplink"
> ---
> 
> To:
> ---
> ! /usr/local/sbin/dhclient -cf /etc/isc-dhclient.conf em0
> ---
> 
> But this did not work.  I now see in the hostname.if manpage that the command
> needs to be available in the single-user environment (/bin or /sbin), but it
> seems to me that if I was doing this "right," I shouldn't need to move the isc
> client from the location that the package installed it in.  So, before I start
> moving things around, I wanted to check if this is the way to do it, or if I
> have missed something more appropriate.
> 
> Thanks for any advice.
> 
> Ted

ALIAS DECLARATIONS
alias {  declarations ... }

   Some DHCP clients running TCP/IP roaming protocols may require that in
   addition to the lease they may acquire via DHCP, their interface also
   be configured with a predefined IP alias so that they can have a
   permanent IP address even while roaming.  The Internet Systems
   Consortium DHCP client doesn't support roaming with fixed addresses
   directly, but in order to facilitate such experimentation, the dhcp
   client can be set up to configure an IP alias using the alias
   declaration.

   The alias declaration resembles a lease declaration, except that
   options other than the subnet-mask option are ignored by the standard
   client configuration script, and expiry times are ignored.  A typical
   alias declaration includes an interface declaration, a fixed-address
   declaration for the IP alias address, and a subnet-mask option
   declaration.  A medium statement should never be included in an alias
   declaration.

I think they are saying their dhcp-client cant handle fixed ip's so this is
some sort of workaround. These aren't the droids you're looking for. 

-- 
Edgar Pettijohn



Using isc-dhcp-client as alternate dhclient

2016-09-20 Thread Theodore Wynnychenko
Hello
I would like to get the isc-dhcp-client working as a replacement for the base
dhclient.

The primary reason for this is so that I can assign an alias to the interface.

But, I can't seem to figure out how to get this done.  I have two issues.

First, I can't get the isc-dhcp-client to assign an alias to the interface,
despite the documentation that states it should.

I have created an /etc/isc-dhclient.conf file:
---
timeout 60;
retry 60;
reboot 10;
select-timeout 5;
initial-interval 2;
script "/usr/local/sbin/dhclient-script";

supersede domain-name "domain.com";
supersede domain-name-servers d.n.s.1,d.n.s.2;

request subnet-mask, broadcast-address, time-offset, routers;

alias {
  interface "em0";
  fixed-address fi.xed.ip.addr;
  option subnet-mask 255.255.255.0;
}
---

But, after killing the running dhclient process (from base), removing the leases
at /var/db/dhclient.leases* and starting isc-dhcp-client with:

# /usr/local/sbin/dhclient -cf /etc/isc-dhclient.conf em0

the isc client is able to get a an offer from the dhcp server, but it does _not_
assign the alias address to the interface.  The only address is the dynamically
assigned one.

I can find no guidance on what I am doing wrong, and why the isc-dhcp-client is
not assigning the alias.

Second, I (apparently) don't understand how to replace the base dhclient with
the isc dhclient at boot.

I tried modifying /etc/hostname.em0 from:
---
dhcp NONE NONE NONE description "Uplink"
---

To:
---
! /usr/local/sbin/dhclient -cf /etc/isc-dhclient.conf em0
---

But this did not work.  I now see in the hostname.if manpage that the command
needs to be available in the single-user environment (/bin or /sbin), but it
seems to me that if I was doing this "right," I shouldn't need to move the isc
client from the location that the package installed it in.  So, before I start
moving things around, I wanted to check if this is the way to do it, or if I
have missed something more appropriate.

Thanks for any advice.

Ted



dhcp-class-identifier in dhclient

2016-04-16 Thread mxb
Hey,
is there any reason to no setting dhcp-class-indentifier by default in
dhclient?
My guess is that this is probably not mandatory?

//mxb



simple dhclient question

2016-02-24 Thread sven falempin
Hello Misc,

is it possible to change the defaul right access of leases info

$ cat /var/db/dhclient.leases.em0

cat: /var/db/dhclient.leases.em0: Permission denied

I have no secret in this file, but a user might want to check the routers
list,
or if the lease is still valid.

Is there a reason to only let wheel read that ?

-- 
-
() ascii ribbon campaign - against html e-mail
/\



Re: dhclient iwn0 *and* run0 -> lease duration confusion

2016-02-06 Thread Marcus MERIGHI
Kenneth Westerback was kind enough to give detailed explanation but
forgot to CC misc@, with his permission here it is:

++
Date: Thu, 4 Feb 2016 10:18:39 -0500
From: Kenneth Westerback <kwesterb...@gmail.com>
Subject: re: dhclient iwn0 *and* run0 -> lease duration confusion

That message does not report the lease time, it reports the real time
left before the lease expires after the bind completes.. Configuring
the interface can take finite time after receiving the lease and
starting the binding.

If you want to see what the actual lease durations are you must look
in the /var/db/dhclient.<if? files. If you are interested in the
unedited information in the lease you must use the -L option to
capture the offered as well as the effective lease.

 Ken
++

Bye, Marcus

mcmer-open...@tor.at (Marcus MERIGHI), 2016.02.02 (Tue) 10:21 (CET):
> Hello,
>
> it seems dhclient gets confused about lease durations when getting
> leases for two (wlan) interfaces from the same dhcp server.
>
> I'm not sure this is a bug or done that way intentionally.
>
> While working on the ds47d issue (bugs@) I had left an additional WLAN
> stick connected to the machine, both hostname.ifs contain
> nwid XX  # <- same on both
> wpakey YY# <- same on both
> dhcp # <- well yes same on both
>
> When booting I get these messages:
>
> First run, when I noticed:
>
> DHCPREQUEST on iwn0 to 255.255.255.255
> DHCPACK from 192.168.188.189 (80:1f:02:c1:fd:86)
> bound to 192.168.188.104 -- renewal in 900 seconds.
>^^^
> DHCPREQUEST on run0 to 255.255.255.255
> DHCPACK from 192.168.188.189 (80:1f:02:c1:fd:86)
> bound to 192.168.188.105 -- renewal in 898 seconds.
>^^^
>
> Second run, to make sure:
>
> DHCPREQUEST on iwn0 to 255.255.255.255
> DHCPACK from 192.168.188.189 (80:1f:02:c1:fd:86)
> bound to 192.168.188.104 -- renewal in 900 seconds.
>^^^
> DHCPREQUEST on run0 to 255.255.255.255
> DHCPACK from 192.168.188.189 (80:1f:02:c1:fd:86)
> bound to 192.168.188.105 -- renewal in 899 seconds.
>^^^
> Bye, Marcus



Re: dhclient iwn0 *and* run0 -> lease duration confusion

2016-02-02 Thread Mihai Popescu
| DHCPREQUEST on iwn0 to 255.255.255.255
| DHCPACK from 192.168.188.189 (80:1f:02:c1:fd:86)
| bound to 192.168.188.104 -- renewal in 900 seconds.
|
| DHCPREQUEST on run0 to 255.255.255.255
| DHCPACK from 192.168.188.189 (80:1f:02:c1:fd:86)
| bound to 192.168.188.105 -- renewal in 898 seconds.

Subnet mask criteria, maybe?



dhclient iwn0 *and* run0 -> lease duration confusion

2016-02-02 Thread Marcus MERIGHI
Hello, 

it seems dhclient gets confused about lease durations when getting
leases for two (wlan) interfaces from the same dhcp server.

I'm not sure this is a bug or done that way intentionally. 

While working on the ds47d issue (bugs@) I had left an additional WLAN
stick connected to the machine, both hostname.ifs contain
nwid XX  # <- same on both
wpakey YY# <- same on both
dhcp # <- well yes same on both

When booting I get these messages:

First run, when I noticed:

DHCPREQUEST on iwn0 to 255.255.255.255
DHCPACK from 192.168.188.189 (80:1f:02:c1:fd:86)
bound to 192.168.188.104 -- renewal in 900 seconds.
   ^^^
DHCPREQUEST on run0 to 255.255.255.255
DHCPACK from 192.168.188.189 (80:1f:02:c1:fd:86)
bound to 192.168.188.105 -- renewal in 898 seconds.
   ^^^

Second run, to make sure:

DHCPREQUEST on iwn0 to 255.255.255.255
DHCPACK from 192.168.188.189 (80:1f:02:c1:fd:86)
bound to 192.168.188.104 -- renewal in 900 seconds.
   ^^^
DHCPREQUEST on run0 to 255.255.255.255
DHCPACK from 192.168.188.189 (80:1f:02:c1:fd:86)
bound to 192.168.188.105 -- renewal in 899 seconds.
   ^^^
Bye, Marcus



carp dhclient

2016-02-01 Thread sven falempin
Dear Readers,
Without IP carp is marked as inactive,
i tried to set up a stupid IP on it and then call dhclient.
It sends packet but does configure interface.
:'(
Any particular reason for this ?
Thank you.

-- 
-
() ascii ribbon campaign - against html e-mail
/\



Re: carp dhclient

2016-02-01 Thread Jack J. Woehr

Josh Grosse wrote:

On 2016-02-01 11:32, sven falempin wrote:

Dear Readers,
Without IP carp is marked as inactive,


See https://sites.google.com/site/bsdstuff/dhcarp and adapt
to your requirements.


The Book of PF, 3rd Edition
A No-Nonsense Guide to the OpenBSD Firewall
by Peter N. M. Hansteen
ISBN-10: 1-59327-589-7
ISBN-13: 978-1-59327-589-1
Copyright 2015.


--
Jack J. Woehr # Science is more than a body of knowledge. It's a way of
www.well.com/~jax # thinking, a way of skeptically interrogating the universe
www.softwoehr.com # with a fine understanding of human fallibility. - Carl Sagan



Re: carp dhclient

2016-02-01 Thread Josh Grosse

On 2016-02-01 11:32, sven falempin wrote:

Dear Readers,
Without IP carp is marked as inactive,
i tried to set up a stupid IP on it and then call dhclient.
It sends packet but does configure interface.
:'(
Any particular reason for this ?
Thank you.


Carp requires static addresses. You can establish carp on
an inward network, and use carp advertisements in concert
with ifstated(8) to transfer the use of a MAC address between
active systems on the outer, dynamic network.

See https://sites.google.com/site/bsdstuff/dhcarp and adapt
to your requirements.



Re: dhclient broken on 2015-09-21 amd64 snapshot

2015-09-23 Thread Stuart Henderson
On 2015/09/23 08:16, Kurt Mosiejczuk wrote:
> On Wed, Sep 23, 2015 at 07:37:05AM +, Stuart Henderson wrote:
> > On 2015-09-22, Kurt Mosiejczuk  wrote:
> > > I just updated my current box to yesterdays (2015-09-21) snapshot.  Now
> > > it won't keep a network address.  
> 
> > That's a recent bug - should be fixed if you update again.
> 
> Excellent.  I'll watch my mirror for a newer snapshot.  It just occurred
> to me I didn't have a problem when using bsd.rd.  Hopefully that is still
> true when I try and install the new snapshot.
> 
> Can you point me at the bug fix?  I was looking at cvsweb again and the
> newest change I could see there is 2 weeks ago...

I believe this is the issue fixed by this commit - if you saved the
previous kernel before updating, you might be able to boot with that
instead.

-
PatchSet 4122 
Date: 2015/09/22 11:05:00
Author: mpi
Branch: HEAD
Tag: (none) 
Log:
When a connected route is deleted, pass the corresponding priority to
rtrequest1(9) otherwise the route will remain attached to a stale ifa.

Found by matthieu@

Members: 
route.c:1.240->1.241 

Index: src/sys/net/route.c
diff -u src/sys/net/route.c:1.240 src/sys/net/route.c:1.241
--- src/sys/net/route.c:1.240   Mon Sep 21 11:15:27 2015
+++ src/sys/net/route.c Tue Sep 22 10:05:00 2015
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.240 2015/09/21 11:15:27 mpi Exp $ */
+/* $OpenBSD: route.c,v 1.241 2015/09/22 10:05:00 mpi Exp $ */
 /* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $  */
 
 /*
@@ -1267,6 +1267,9 @@
 
if (flags & (RTF_LOCAL|RTF_BROADCAST))
prio = RTP_LOCAL;
+
+   if (flags & RTF_CONNECTED)
+   prio = RTP_CONNECTED;
 
error = rtrequest1(RTM_DELETE, , prio, , rtableid);
if (error == 0) {



Re: dhclient broken on 2015-09-21 amd64 snapshot

2015-09-23 Thread Kurt Mosiejczuk
On Wed, Sep 23, 2015 at 07:37:05AM +, Stuart Henderson wrote:
> On 2015-09-22, Kurt Mosiejczuk <kurt-open...@se.rit.edu> wrote:
> > I just updated my current box to yesterdays (2015-09-21) snapshot.  Now
> > it won't keep a network address.  

> That's a recent bug - should be fixed if you update again.

Excellent.  I'll watch my mirror for a newer snapshot.  It just occurred
to me I didn't have a problem when using bsd.rd.  Hopefully that is still
true when I try and install the new snapshot.

Can you point me at the bug fix?  I was looking at cvsweb again and the
newest change I could see there is 2 weeks ago...

> > Did the dhclient change get overlooked?  Am I doing something else
> > obviously wrong?

> This is unrelated, but dhclient just needed recompiling with the updated
> headers ("include files") to know about the larger ifmedia struct, it
> just uses it to check link status and didn't require any code changes.
> On the other hand ifconfig does more processing with the media status,
> e.g. passing the type to another function to look up the text description,
> so the variable types need changing so that the larger values fit.

Okay, good.  Also glad I didn't work hard on getting an up to date source
tree on the machine with no network currently to try and fix it :)

> BTW this ifmedia change was because we were running out of space in
> the structure for different media types (10base2, 10baseT, 100baseTX,
> 1000baseSX, 1000baseT etc for ethernet, various modulation types for
> 802.11 wireless, etc), the change allows space for more types for
> future use (e.g. there's an IEEE working group, 802.3bz, looking at
> standardizing 2.5/5Gb over cat5e, and other existing standards we don't
> support yet).

Cool.  Thanks for the explanation on the change.

--Kurt



Re: dhclient broken on 2015-09-21 amd64 snapshot

2015-09-23 Thread Kurt Mosiejczuk
On Wed, Sep 23, 2015 at 01:27:27PM +0100, Stuart Henderson wrote:
> On 2015/09/23 08:16, Kurt Mosiejczuk wrote:

> > Can you point me at the bug fix?  I was looking at cvsweb again and the
> > newest change I could see there is 2 weeks ago...

> I believe this is the issue fixed by this commit - if you saved the
> previous kernel before updating, you might be able to boot with that
> instead.

Ah.  So the bug is even more unrelated to dhclient than I was
thinking.  

A newer snapshot (from yesterday, 2015-09-22) was on my mirror today, and
booting from the bsd.rd worked for upgrading to the newer snapshot with
the fix.  I'm guessing whatever caused the bug isn't enabled for the
RAMDISK kernel.

--Kurt



Re: dhclient broken on 2015-09-21 amd64 snapshot

2015-09-23 Thread Stuart Henderson
On 2015-09-22, Kurt Mosiejczuk <kurt-open...@se.rit.edu> wrote:
> I just updated my current box to yesterdays (2015-09-21) snapshot.  Now
> it won't keep a network address.  

That's a recent bug - should be fixed if you update again.

> I'm seeing a note on the current FAQ from the 12th indicating the
> ifmedia options have been extended to 64 bits.  I'm seeing a change to
> ifconfig in the tree for this, but I don't see a corresponding change to
> dhclient in the tree (looking at cvsweb).  
>
> Did the dhclient change get overlooked?  Am I doing something else
> obviously wrong?

This is unrelated, but dhclient just needed recompiling with the updated
headers ("include files") to know about the larger ifmedia struct, it
just uses it to check link status and didn't require any code changes.
On the other hand ifconfig does more processing with the media status,
e.g. passing the type to another function to look up the text description,
so the variable types need changing so that the larger values fit.

BTW this ifmedia change was because we were running out of space in
the structure for different media types (10base2, 10baseT, 100baseTX,
1000baseSX, 1000baseT etc for ethernet, various modulation types for
802.11 wireless, etc), the change allows space for more types for
future use (e.g. there's an IEEE working group, 802.3bz, looking at
standardizing 2.5/5Gb over cat5e, and other existing standards we don't
support yet).



dhclient broken on 2015-09-21 amd64 snapshot

2015-09-22 Thread Kurt Mosiejczuk
I just updated my current box to yesterdays (2015-09-21) snapshot.  Now
it won't keep a network address.  

eisenhower# dhclient -d em0
DHCPREQUEST on em0 to 255.255.255.255
DHCPACK from 129.21.208.254 (d0:c2:82:f2:94:00)
SIOCAIFADDR failed (129.21.208.29): File exists
bound to 129.21.208.29 -- renewal in 5400 seconds.
Active address (129.21.208.29) deleted; exiting
eisenhower# ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 32768
priority: 0
groups: lo
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
inet 127.0.0.1 netmask 0xff00
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:1c:c4:1e:40:10
priority: 0
groups: egress
media: Ethernet autoselect (100baseTX full-duplex)
status: active
enc0: flags=0<>
priority: 0
groups: enc
status: active
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33144
priority: 0
groups: pflog

I'm seeing a note on the current FAQ from the 12th indicating the
ifmedia options have been extended to 64 bits.  I'm seeing a change to
ifconfig in the tree for this, but I don't see a corresponding change to
dhclient in the tree (looking at cvsweb).  

Did the dhclient change get overlooked?  Am I doing something else
obviously wrong?

(dmesg below)

--Kurt

OpenBSD 5.8-current (GENERIC.MP) #1375: Mon Sep 21 20:01:15 MDT 2015
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4135260160 (3943MB)
avail mem = 4005974016 (3820MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xeb920 (68 entries)
bios0: vendor Hewlett-Packard version "786E1 v01.16" date 08/17/2011
bios0: Hewlett-Packard HP Compaq dc7700 Small Form Factor
acpi0 at bios0: rev 0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC ASF! MCFG TCPA SLIC HPET
acpi0: wakeup devices COM1(S4) COM2(S4) PCI0(S4) PEG1(S4) IGBE(S4) PCX1(S4) 
PCX2(S4) HUB_(S4) USB1(S3) USB2(S3) USB3(S3) USB4(S3) USB5(S3) EUS1(S3) 
EUS2(S3) PBT
N(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 CPU 6700 @ 2.66GHz, 2660.32 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR
cpu0: 4MB 64b/line 16-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 265MHz
cpu0: mwait min=64, max=64, C-substates=0.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 CPU 6700 @ 2.66GHz, 2659.99 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR
cpu1: 4MB 64b/line 16-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 1
acpimcfg0 at acpi0 addr 0xf400, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG1)
acpiprt2 at acpi0: bus 32 (PCX1)
acpiprt3 at acpi0: bus -1 (PCX2)
acpiprt4 at acpi0: bus 7 (HUB_)
acpicpu0 at acpi0: C1(@1 halt!), PSS
acpicpu1 at acpi0: C1(@1 halt!), PSS
acpibtn0 at acpi0: PBTN
cpu0: Enhanced SpeedStep 2660 MHz: speeds: 2667, 2128, 1596 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82Q965 Host" rev 0x02
vga1 at pci0 dev 2 function 0 "Intel 82Q965 Video" rev 0x02
intagp0 at vga1
agp0 at intagp0: aperture at 0xe000, size 0x1000
inteldrm0 at vga1
drm0 at inteldrm0
inteldrm0: 1024x768
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel 82Q965 HECI" rev 0x02 at pci0 dev 3 function 0 not configured
em0 at pci0 dev 25 function 0 "Intel ICH8 IGP AMT" rev 0x02: msi, address 
00:1c:c4:1e:40:10
uhci0 at pci0 dev 26 function 0 "Intel 82801H USB" rev 0x02: apic 1 int 20
uhci1 at pci0 dev 26 function 1 "Intel 82801H USB" rev 0x02: apic 1 int 21
ehci0 at pci0 dev 26 function 7 "Intel 82801H USB" rev 0x02: apic 1 int 22
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 "Intel 82801H HD Audio" rev 0x02: msi
azalia0: codecs: Realtek ALC262
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801H PCIE" rev 0x02: msi
pci1 at ppb0 bus 32
uhci2 at pci0 dev 29 function 0 "Intel 82801H USB" rev 0x02: apic 1 int 20
uhci3 at pci0 dev 29 function 1 "Intel 82801H USB" rev 0x02: apic 1 int 21
ehci1 at pci0 

5.7: dhclient ignoring routers option

2015-06-19 Thread listas-it
Hello

dhclient on 5.7 won't set the client default gateway if other static
routes are present (same problem exists on 5.6, at least).

dhcpd server is running 5.6 stable with aprox 400 workstations and
appliances/printers with mixed OSs and versions all working fine.

At least both -windows and linux- are able to get and set default gw and
static routes.


The dhcpd.conf

subnet 172.16.192.0 netmask 255.255.254.0 {

# default gw
option routers 172.16.192.119;

# static route to new building
option classless-static-routes 192.168.10.0/24 172.16.192.149;
option classless-ms-static-routes 192.168.10.0/24 172.16.192.149;

# Ips we assign
range 172.16.192.153 172.16.192.249;


host stratus { hardware ethernet 00:00:00:00:00:01; fixed-address
172.16.192.219; }

... other host declarations ...
}


With the config as it is above, the routers option will be ignored, while
the 192.168.10.0/24 route will be set correctly.

If I comment out both classless-* options and restart the server,
routers will be honored and a default gateway set.


This is dhclient config:

testrat:/root{3}# cat /etc/dhclient.conf
#request subnet-mask, broadcast-address, routers, domain-name,
domain-name-servers;

require routers;
testrat:/root{4}#

No luck with and empty dhclient.conf.


Any ideas?

Thanks

Juan



Re: 5.7: dhclient ignoring routers option (SOLVED?)

2015-06-19 Thread listas-it
According to this:

http://undeadly.org/cgi?action=articlesid=20140204080515mode=expanded

This is expected behaviour as:

Note that classless-static-routes overrides the router option, and that a
default route must always be specified!

There's no such warning in the man pages for dhclient or dhcpd.

So, options like this (notice 0.0.0.0/0 and def gw first) seems to work:

option classless-static-routes 0.0.0.0/0 172.16.192.119, 192.168.10.0/24
172.16.192.149;

option classless-ms-static-routes 0.0.0.0/0 172.16.192.119,
192.168.10.0/24 172.16.192.149;

I think this could be made clear in the dhcp-options(5) man page.

Now it reads:

option classless-static-routes ip/prefix ip [, ip/prefix ip ...];
This option specifies a list of static routes in CDIR notation,
which should be sent to the client.

option classless-ms-static-routes ip/prefix ip [, ip/prefix ip ...];
This option does the same as classless-static-routes, but uses
option code 249 instead of 121, since Windows XP and Windows
Server 2003 ignore option 121.

Something in the line of:

Note: classless-static-routes overrides the router option and a default
route must always be specified!

The syntax for a route is '1.2.3.4/13 5.6.7.8', which says that the
gateway 5.6.7.8 is the way to get to the subnet 1.2.3.4/13. Thus in
dhclient.conf you can say 'default classless-static-routes 0/0 5.6.7.9,
1.2.3.4/13 5.6.7.8;'. i.e. the default route is 5.6.7.9 and the gateway
for 1.2.3.4/13 is 5.6.7.8.

Similarly you can specify the value that dhcpd supplies to clients.


Thanks

Juan


 Hello

 dhclient on 5.7 won't set the client default gateway if other static
 routes are present (same problem exists on 5.6, at least).

 dhcpd server is running 5.6 stable with aprox 400 workstations and
 appliances/printers with mixed OSs and versions all working fine.

 At least both -windows and linux- are able to get and set default gw and
 static routes.


 The dhcpd.conf

 subnet 172.16.192.0 netmask 255.255.254.0 {

 # default gw
 option routers 172.16.192.119;

   # static route to new building
 option classless-static-routes 192.168.10.0/24 172.16.192.149;
 option classless-ms-static-routes 192.168.10.0/24 172.16.192.149;

 # Ips we assign
 range 172.16.192.153 172.16.192.249;


 host stratus { hardware ethernet 00:00:00:00:00:01; fixed-address
 172.16.192.219; }

   ... other host declarations ...
 }


 With the config as it is above, the routers option will be ignored, while
 the 192.168.10.0/24 route will be set correctly.

 If I comment out both classless-* options and restart the server,
 routers will be honored and a default gateway set.


 This is dhclient config:

 testrat:/root{3}# cat /etc/dhclient.conf
 #request subnet-mask, broadcast-address, routers, domain-name,
 domain-name-servers;

 require routers;
 testrat:/root{4}#

 No luck with and empty dhclient.conf.


 Any ideas?

 Thanks

 Juan



dhclient lease declarations broken in current snapshots

2014-11-20 Thread Alessandro DE LAURENZIS
Folks,

just updated to latest snapshot (Nov 20):

root@poseidon:[~] uname -a
OpenBSD poseidon.atlantide.net 5.6 GENERIC.MP#579 amd64

and noticed that lease declarations in /etc/dhclient.conf no longer
work:

root@poseidon:[~] cat /etc/dhclient.conf 
# $OpenBSD: dhclient.conf,v 1.2 2011/04/04 11:14:52 krw Exp $
#
# DHCP Client Configuration
#
# See dhclient.conf(5) for possible contents of this file.
# When empty default values are used:
#
# Example:
#
# send dhcp-lease-time 3600;
# send host-name myhost;
# supersede host-name myhost;
# supersede domain-name my.domain;
# request subnet-mask, broadcast-address, time-offset, routers,
#   domain-name, domain-name-servers, host-name, lpr-servers, ntp-servers;
# require subnet-mask, domain-name-servers, routers;
initial-interval 1;
send host-name poseidon;
request subnet-mask, broadcast-address, routers, domain-name,
domain-name-servers, host-name;

# Lease declarations (fallback)
lease {
interface trunk0;
fixed-address 192.168.1.103;
option subnet-mask 255.255.255.0;
option routers 127.0.0.1;
option domain-name-servers 127.0.0.1;
option dhcp-lease-time 259200;
renew  4 2020/12/31 23:59:59 UTC;
rebind 4 2020/12/31 23:59:59 UTC;
expire 4 2020/12/31 23:59:59 UTC;
}

root@poseidon:[~] dhclient iwn0
/etc/dhclient.conf line 24: wrong interface name.
interface trunk0
  ^
Segmentation fault

Commenting out the lease section, all works as expected.

Am I missing something?

-- 
Alessandro DE LAURENZIS
[mailto:just22@gmail.com]
LinkedIn: http://it.linkedin.com/in/delaurenzis



Re: thinkpad wifi/dhclient issue

2014-09-30 Thread frantisek holop
the last part of this saga is, that i have moved
to a new place, and the issue went away. so it
seems it was router related.  just another strange
story from the home router front.

-f
-- 
i have nothing to say, but i can say it loudly.



Re: thinkpad wifi/dhclient issue

2014-09-27 Thread frantisek holop
frantisek holop, 25 Sep 2014 17:28:
 for everybody out there who likes a good mystery,
 the 900 ping issue has happened mid-day as well
 for the first time.  it is the equivalent of yanking
 the ethernet cable.  so it is not an exclusively
 resume connected, but resume (and startup) is
 a way to reproduce instantly.

i have realised that i dont have to wait 1 second
between every ping.

sudo ping -f -c 999 8.8.8.8

helps in some cases almost instantly.

-f
-- 
what a day may bring, a day may take away.



Re: thinkpad wifi/dhclient issue

2014-09-25 Thread frantisek holop
for everybody out there who likes a good mystery,
the 900 ping issue has happened mid-day as well
for the first time.  it is the equivalent of yanking
the ethernet cable.  so it is not an exclusively
resume connected, but resume (and startup) is
a way to reproduce instantly.

this time however when dhclient went to grab
a new lease, it started spinning and had to be killed.
so i made a debug version and hope to gdb attach
to it.

perhaps it is not a timeout, because network activity
must be present, if i dont start pinging, connections
never come back.  so perhaps it is filling up some
buffer?  what a nice guessing game :)

-f
-- 
my favorite mythical creature?  the honest politician.



thinkpad wifi/dhclient issue

2014-09-24 Thread frantisek holop
i have this strange issue with my thinkpad X60s
that i dont remember having before (the machine
was in storage for 2 years)

when i boot up (or resume), i get a dhcp lease
from my home router (another openbsd notebook
also works with that router using a usb dongle run0)

however after i get the lease, connections do not work.
if i rerun dhclient, i get the lease again, and still
no connections.

but the strange thing is, that some ~900 pings
later (~15 minutes), dhclient kicks in life again,
gets another lease, and voila, i have connections.
the 2 dhclient outputs look the same, no difference
whatsoever.  this also does not happen with em0,
connections work right after dhclient.

11:54:39 $ ping 8.8.8.8

PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=895 ttl=50 time=1034.245 ms
64 bytes from 8.8.8.8: icmp_seq=896 ttl=50 time=25.040 ms
64 bytes from 8.8.8.8: icmp_seq=897 ttl=50 time=23.596 ms
64 bytes from 8.8.8.8: icmp_seq=898 ttl=50 time=23.027 ms
64 bytes from 8.8.8.8: icmp_seq=899 ttl=50 time=22.841 ms
64 bytes from 8.8.8.8: icmp_seq=900 ttl=50 time=22.024 ms
64 bytes from 8.8.8.8: icmp_seq=901 ttl=50 time=22.273 ms
64 bytes from 8.8.8.8: icmp_seq=902 ttl=50 time=22.263 ms
64 bytes from 8.8.8.8: icmp_seq=903 ttl=50 time=23.256 ms
64 bytes from 8.8.8.8: icmp_seq=904 ttl=50 time=23.353 ms
64 bytes from 8.8.8.8: icmp_seq=905 ttl=50 time=23.646 ms
64 bytes from 8.8.8.8: icmp_seq=906 ttl=50 time=22.888 ms
64 bytes from 8.8.8.8: icmp_seq=907 ttl=50 time=22.238 ms
64 bytes from 8.8.8.8: icmp_seq=908 ttl=50 time=22.547 ms
64 bytes from 8.8.8.8: icmp_seq=909 ttl=50 time=22.211 ms
--- 8.8.8.8 ping statistics ---
904 packets transmitted, 9 packets received, 99.0% packet loss
round-trip min/avg/max/std-dev = 21.989/135.159/1033.790/317.715 ms
12:09:56 $


it definitely looks like some timeout, but timeout of what?
dmesg attached.

-f

OpenBSD 5.6-current (GENERIC.MP) #338: Wed Sep 10 17:55:18 MDT 2014
t...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Intel(R) Core(TM) Duo CPU L2400 @ 1.66GHz (GenuineIntel 686-class) 1.67 
GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,MWAIT,VMX,EST,TM2,xTPR,PDCM,PERF
real mem  = 2137354240 (2038MB)
avail mem = 2090008576 (1993MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 04/18/07, BIOS32 rev. 0 @ 0xfd690, SMBIOS 
rev. 2.4 @ 0xe0010 (67 entries)
bios0: vendor LENOVO version 7BETC9WW (2.10 ) date 04/18/2007
bios0: LENOVO 1705CTO
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT ECDT TCPA APIC MCFG HPET SLIC BOOT SSDT SSDT SSDT 
SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) DURT(S3) EXP0(S4) EXP1(S4) EXP2(S4) 
EXP3(S4) PCI1(S4) USB0(S3) USB1(S3) USB2(S3) USB7(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 166MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) Duo CPU L2400 @ 1.66GHz (GenuineIntel 686-class) 1.67 
GHz
cpu1: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,MWAIT,VMX,EST,TM2,xTPR,PDCM,PERF
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 2, remapped to apid 1
acpimcfg0 at acpi0 addr 0xf000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (AGP_)
acpiprt2 at acpi0: bus 2 (EXP0)
acpiprt3 at acpi0: bus 3 (EXP1)
acpiprt4 at acpi0: bus 4 (EXP2)
acpiprt5 at acpi0: bus 12 (EXP3)
acpiprt6 at acpi0: bus 21 (PCI1)
acpicpu0 at acpi0: C3, C2, C1, PSS
acpicpu1 at acpi0: C3, C2, C1, PSS
acpipwrres0 at acpi0: PUBS, resource for USB0, USB2, USB7
acpitz0 at acpi0: critical temperature is 127 degC
acpitz1 at acpi0: critical temperature is 97 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model 42T4629 serial   327 type LION oem SANYO
acpibat1 at acpi0: BAT1 not present
acpibat2 at acpi0: BAT2 not present
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
acpidock0 at acpi0: GDCK not docked (0)
bios0: ROM list: 0xc/0xea00! 0xcf000/0x1000 0xd/0x1000 0xdc000/0x4000! 
0xe/0x1!
cpu0: Enhanced SpeedStep 1663 MHz: speeds: 1667, 1333, 1000 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 Intel 82945GM Host rev 0x03
vga1 at pci0 dev 2 function 0 Intel 82945GM Video rev 0x03
intagp0 at vga1
agp0 at intagp0: aperture at 0xd000, size 0x1000
inteldrm0 at vga1
drm0 at inteldrm0
inteldrm0: 1024x768
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
Intel 82945GM Video rev

Re: Multiple, simultaneous interfaces using dhclient

2014-07-13 Thread Björn Ketelaars
It sounds like that your default inet route is overwritten after dhclient on 
vlan1 is issued. Did you have a look at the route table before and after each 
call of dhclient?

 On 13 Jul 2014, at 02:49, Rogier Krieger rkrie...@gmail.com wrote:
 
 Dear list,
 
 as my ISP is migrating to a new network setup, I'm forced to tinker with my
 local setup. Unfortunately, I'm struggling to get two interfaces (vlan0,
 vlan1) working simultaneously with DHCP.
 
 Separately, they work fine. Together, vlan1 drops my internet connection
 (vlan0); the latter won't return until I manually re-issue dhclient vlan0.
 Upon lease renewal, the same occurs, lest I kill the dhclient instance for
 vlan1.
 
 I wonder if I'm doing something silly. Is the having two simultaneous
 dhclient instances a supported setup? The second instance is for an IPTV
 set-top-box (STB) that I'd like to keep away from my regular LAN, hence the
 routing domains.
 
 I've disabled PF while trying to get this working, so as to minimise the
 amount of things I can do wrong.
 
 Does anyone have a cluebat for me? Insight greatly appreciated.
 
 Regards,
 
 
 
 Background:
 It's a FttH link that provides two tagged networks (vlan 34 for IP; vlan 4
 for IPTV). The latter provides an private range address (in 10.10.12.0/22)
 for a set-top-box.
 
 For the STB:
 - IPTV Traffic is to be NATed to vlan4 (towards the 10.10.12.0/22 and
 185.6.48.0/26  ranges)
 - Other/Internet traffic (e.g. program guides) needs to travel via the
 regular IP uplink (vlan 34) and should be NATed there
 
 
 
 # cat /etc/dhclient.conf
 supersede host-name fluor;
 prepend domain-name-servers 27.0.0.1;
 
 interface vlan1 {
#ignore routers;# vlan1 is in rdomain 1; default route won't hurt us
 }
 
 
 # cat /etc/hostname.em0
 description internal
 -inet6
 up
 
 # cat /etc/hostname.em1
 description uplink
 -inet6
 up
 
 # cat /etc/hostname.vlan0
 description ip (uplink)
 vlan 34 vlandev em1
 dhcp
 -inet6
 
 # cat /etc/hostname.vlan1
 description tv (uplink)
 rdomain 1
 group tv
 vlan 4 vlandev em1
 dhcp
 -inet6
 
 # cat /etc/hostname.vlan52
 description tv (downlink)
 rdomain 1
 group tv
 vlan 52 vlandev em0
 inet 10.0.52.1/24
 -inet6
 
 
 
 
 -- 
 If you don't know where you're going, any road will get you there.



Re: Multiple, simultaneous interfaces using dhclient

2014-07-13 Thread Rogier Krieger
On Sun, Jul 13, 2014 at 10:11 AM, Björn Ketelaars 
bjorn.ketela...@hydroxide.nl wrote:

 It sounds like that your default inet route is overwritten after dhclient
 on vlan1 is issued.


That's not something I'd expect, given that the dhclient instances should
be in separate routing domains.



 Did you have a look at the route table before and after each call of
 dhclient?


That was my initial suspicion and one of my reasons for trying to separate
things into rdomain 1.

I logged routing tables every second or so while manually running dhclient
for vlan1 (instead of via hostname.if).

Before:

# netstat -T0 -nrfinet
Internet:
DestinationGatewayFlags   Refs  Use   Mtu  Prio
Iface
default84.245.29.1UGS7  1871091 - 8
vlan0
84.245.29/24   link#5 UC 10 - 4
vlan0
84.245.29.100:30:88:16:ac:fd  UHLc   10 - 4
vlan0
127/8  127.0.0.1  UGRS   00 33144 8
lo0
127.0.0.1  127.0.0.1  UH 229313 33144 4
lo0
192.168.1.200:25:90:33:12:65  UHLc   0   16 - 4
lo0
224/4  127.0.0.1  URS00 33144 8
lo0

# netstat -T1 -nrfinet
Internet:
DestinationGatewayFlags   Refs  Use   Mtu  Prio
Iface
10.0.52/24 link#15UC 00 - 4
vlan52


# route -T1 exec /sbin/dhclient vlan1

Gives me an IP on vlan1 and routes in rdomain 1, but kills connectivity on
vlan0 after the first DHCPREQUEST goes out on vlan1.


# ps ax | grep dhclient | grep -v grep
23596 ??  Is  0:00.02 dhclient: vlan0 [priv] (dhclient)
27697 ??  Is  0:00.48 dhclient: vlan0 (dhclient)
12813 ??  Ss  0:00.00 dhclient: vlan1 [priv] (dhclient)
10342 p7  Z+  0:00.00 (dhclient)
 7017 p7  S+  0:00.01 dhclient: vlan1 (dhclient)

Note the zombie dhclient in between. I don't know why it's there. A few
seconds later, vlan1 appears to have its address and - I assume - the
zombie is reaped.

# ps ax | grep dhclient | grep -v grep
23596 ??  Is  0:00.02 dhclient: vlan0 [priv] (dhclient)
27697 ??  Is  0:00.48 dhclient: vlan0 (dhclient)
12813 ??  Ss  0:00.01 dhclient: vlan1 [priv] (dhclient)
19415 ??  Ss  0:00.00 dhclient: vlan1 (dhclient)

# netstat -T0 -nrfinet
Internet:
DestinationGatewayFlags   Refs  Use   Mtu  Prio
Iface
default84.245.29.1UGS7  1871093 - 8
vlan0
84.245.29/24   link#5 UC 10 - 4
vlan0
84.245.29.100:30:88:16:ac:fd  UHLc   10 - 4
vlan0
127/8  127.0.0.1  UGRS   00 33144 8
lo0
127.0.0.1  127.0.0.1  UH 229313 33144 4
lo0
192.168.1/24   link#2 UC 10 - 4
em1
192.168.1.200:25:90:33:12:65  UHLc   0   16 - 4
lo0
224/4  127.0.0.1  URS00 33144 8
lo0

# netstat -T1 -nrfinet
Internet:
DestinationGatewayFlags   Refs  Use   Mtu  Prio
Iface
default10.10.12.1 UGS00 - 8
vlan1
10.0.52/24 link#15UC 00 - 4
vlan52
10.10.12/22link#16UC 10 - 4
vlan1
10.10.12.1 link#16UHLc   10 - 4
vlan1


Forgive me for removing the Routing tables line from the netstat output.

Only after killing all dhclients and re-running dhclient vlan0, I get my
internet connectivity back.

Regards,

Rogier



Multiple, simultaneous interfaces using dhclient

2014-07-12 Thread Rogier Krieger
Dear list,

as my ISP is migrating to a new network setup, I'm forced to tinker with my
local setup. Unfortunately, I'm struggling to get two interfaces (vlan0,
vlan1) working simultaneously with DHCP.

Separately, they work fine. Together, vlan1 drops my internet connection
(vlan0); the latter won't return until I manually re-issue dhclient vlan0.
Upon lease renewal, the same occurs, lest I kill the dhclient instance for
vlan1.

I wonder if I'm doing something silly. Is the having two simultaneous
dhclient instances a supported setup? The second instance is for an IPTV
set-top-box (STB) that I'd like to keep away from my regular LAN, hence the
routing domains.

I've disabled PF while trying to get this working, so as to minimise the
amount of things I can do wrong.

Does anyone have a cluebat for me? Insight greatly appreciated.

Regards,



Background:
It's a FttH link that provides two tagged networks (vlan 34 for IP; vlan 4
for IPTV). The latter provides an private range address (in 10.10.12.0/22)
for a set-top-box.

For the STB:
- IPTV Traffic is to be NATed to vlan4 (towards the 10.10.12.0/22 and
185.6.48.0/26  ranges)
- Other/Internet traffic (e.g. program guides) needs to travel via the
regular IP uplink (vlan 34) and should be NATed there



# cat /etc/dhclient.conf
supersede host-name fluor;
prepend domain-name-servers 27.0.0.1;

interface vlan1 {
#ignore routers;# vlan1 is in rdomain 1; default route won't hurt us
}


# cat /etc/hostname.em0
description internal
-inet6
up

# cat /etc/hostname.em1
description uplink
-inet6
up

# cat /etc/hostname.vlan0
description ip (uplink)
vlan 34 vlandev em1
dhcp
-inet6

# cat /etc/hostname.vlan1
description tv (uplink)
rdomain 1
group tv
vlan 4 vlandev em1
dhcp
-inet6

# cat /etc/hostname.vlan52
description tv (downlink)
rdomain 1
group tv
vlan 52 vlandev em0
inet 10.0.52.1/24
-inet6




-- 
If you don't know where you're going, any road will get you there.



Re: dhclient question

2014-06-24 Thread Marcus MERIGHI
kwesterb...@gmail.com (Kenneth Westerback), 2014.06.23 (Mon) 18:53 (CEST):
 On 23 June 2014 06:24, Avi Cohen av...@rad.com wrote:
  In my application  (it is a router in the access)  I'm initially  running
  dhclient daemon without any  interface specified for dhcp.
  Then - on user request - we  add  interfaces  to dhclient.conf on run-time
 
  I have 3 questions  - that I'll appreciate if you can answer
 
 You can read dhclient(8) and dhclient.conf(5) man pages for details.
 But to summarize ...
 
 (You seem to ask 4 questions, so which one will you not appreciate an
 answer to? :-))
 
 
  1.   Is it possible to append  interfaces  to an existing dhclient.conf 
  ?
  or just to add a new (for example)  dhclient.conf-eth1?  [BTW - where to
  locate this file ?]
 
 You can append as many 'interface' statements as you like in the
 dhclient.conf file. If you want to run with a separate config file for
 a particular instance of dhclient you can use the '-c' option to
 specify the non-default file.
 
 
  2.When the daemon will  start the dhcp-request for this new  
  interface
  ?
 
 When you start it. Every interface's dhclient must be started
 separately. If you start a dhclient without specifying the interface
 it attempts to find an interface in the 'egress' group. If there is
 one and only one such interface then dhclient will use it. For other
 interfaces you must start other instances of dhclient, usually by
 creating a /etc/hostname.if file for that interface. The
 /etc/hostname.if file will be used at system startup or you can 'sh
 /etc/netstart if' as root.
 
  3.   Our application need to be informed whenever a new IP-address 
  (dhcp)
  is assigned for the interface.  How to do it ? by polling the 
  dhclient.leases
  ?  is there a notification from dhclient to  our application that we can use
  ?
 
 The best way to do that is with a program that monitors the routing
 socket, where you can see all address changes.

hint: route(8) monitor

Bye, Marcus

 Alternatively you can monitor the leases file or use the '-L' option
 to write out the offered and effective lease information if you want
 complete information on what is being received and used. Some people
 use the entr port (/usr/ports/sysutils/entr, http://entrproject.org/)
 to monitor the file(s).
 
 
  4.   4 - if I start the dhclient daemon without interface specified - I
  see that it sends  dhcp-request for all my exiting interfaces ? why ? how to
  disable this behavior and to send request for only
 
  Specified interfaces ? (but without specifying  it in the command line- but
  via dhclient.conf  ?
 
 Now you make me doubt you are running OpenBSD. Our dhclient does not
 send dhcp-request for all interfaces -- it sends dhcp-requests out one
 and only one interface. At least for the last 10 years or more.
 
 You must specify the interface via the command line, or have the
 /etc/netstart command build the command line for you from a
 hostname.if file.
 
  Ken
 
  Regards,
  Avi
 
 !DSPAM:53a85bed101242941456129!



Re: dhclient question

2014-06-24 Thread Stuart Henderson
On 2014-06-23, Kenneth Westerback kwesterb...@gmail.com wrote:
 Alternatively you can monitor the leases file or use the '-L' option
 to write out the offered and effective lease information if you want
 complete information on what is being received and used. Some people
 use the entr port (/usr/ports/sysutils/entr, http://entrproject.org/)
 to monitor the file(s).

FWIW, I'm doing this to monitor nameserver changes, here's an example.
Note that it relies on support that was added to dhclient post-5.5.

(entr is from packages; it's a nice simple kqueue watcher, so it
works by a trigger when the file is changed, rather than needing to
poll it periodically).

$ cat /etc/dhcp-watcher  
#!/bin/sh
gw=$(route -n get -inet 0.0.0.0 | awk '/interface/ {print $2}')
dns=$(awk '/domain-name-servers/ {gsub([;,],  , $3); print $3;}' 
/etc/dhclient.lease.$gw)
unbound-control forward_add . $dns  /dev/null
echo default now on $gw: $(unbound-control list_forwards) | logger -t 
dhcp-watcher

$ cat /etc/dhcp-watcher.run  
#!/bin/sh
/etc/dhcp-watcher
echo /etc/dhclient.lease.* | tr ' ' '\n' | entr /etc/dhcp-watcher

$ cat /etc/hostname.em0 
 
up -autoconfprivacy
!dhclient -L /etc/dhclient.lease.em0 em0
rtsol

$ cat /etc/hostname.iwn0
 
nwid rarara wpakey ackackmacaque wpaprotos wpa2 wpaciphers ccmp
!dhclient -L /etc/dhclient.lease.iwn0 iwn0
rtsol



dhclient question

2014-06-23 Thread Avi Cohen
Hello
In my application  (it is a router in the access)  I'm initially  running
dhclient daemon without any  interface specified for dhcp.
Then - on user request - we  add  interfaces  to dhclient.conf on run-time

I have 3 questions  - that I'll appreciate if you can answer

1.   Is it possible to append  interfaces  to an existing dhclient.conf ?
or just to add a new (for example)  dhclient.conf-eth1?  [BTW - where to
locate this file ?]

2.When the daemon will  start the dhcp-request for this new  interface
?

3.   Our application need to be informed whenever a new IP-address (dhcp)
is assigned for the interface.  How to do it ? by polling the dhclient.leases
?  is there a notification from dhclient to  our application that we can use
?

4.   4 - if I start the dhclient daemon without interface specified - I
see that it sends  dhcp-request for all my exiting interfaces ? why ? how to
disable this behavior and to send request for only

Specified interfaces ? (but without specifying  it in the command line- but
via dhclient.conf  ?



Regards,
Avi



Re: dhclient question

2014-06-23 Thread Kenneth Westerback
On 23 June 2014 06:24, Avi Cohen av...@rad.com wrote:
 Hello
 In my application  (it is a router in the access)  I'm initially  running
 dhclient daemon without any  interface specified for dhcp.
 Then - on user request - we  add  interfaces  to dhclient.conf on run-time

 I have 3 questions  - that I'll appreciate if you can answer

You can read dhclient(8) and dhclient.conf(5) man pages for details.
But to summarize ...

(You seem to ask 4 questions, so which one will you not appreciate an
answer to? :-))


 1.   Is it possible to append  interfaces  to an existing dhclient.conf ?
 or just to add a new (for example)  dhclient.conf-eth1?  [BTW - where to
 locate this file ?]

You can append as many 'interface' statements as you like in the
dhclient.conf file. If you want to run with a separate config file for
a particular instance of dhclient you can use the '-c' option to
specify the non-default file.


 2.When the daemon will  start the dhcp-request for this new  interface
 ?

When you start it. Every interface's dhclient must be started
separately. If you start a dhclient without specifying the interface
it attempts to find an interface in the 'egress' group. If there is
one and only one such interface then dhclient will use it. For other
interfaces you must start other instances of dhclient, usually by
creating a /etc/hostname.if file for that interface. The
/etc/hostname.if file will be used at system startup or you can 'sh
/etc/netstart if' as root.


 3.   Our application need to be informed whenever a new IP-address (dhcp)
 is assigned for the interface.  How to do it ? by polling the dhclient.leases
 ?  is there a notification from dhclient to  our application that we can use
 ?

The best way to do that is with a program that monitors the routing
socket, where you can see all address changes.

Alternatively you can monitor the leases file or use the '-L' option
to write out the offered and effective lease information if you want
complete information on what is being received and used. Some people
use the entr port (/usr/ports/sysutils/entr, http://entrproject.org/)
to monitor the file(s).


 4.   4 - if I start the dhclient daemon without interface specified - I
 see that it sends  dhcp-request for all my exiting interfaces ? why ? how to
 disable this behavior and to send request for only

 Specified interfaces ? (but without specifying  it in the command line- but
 via dhclient.conf  ?

Now you make me doubt you are running OpenBSD. Our dhclient does not
send dhcp-request for all interfaces -- it sends dhcp-requests out one
and only one interface. At least for the last 10 years or more.

You must specify the interface via the command line, or have the
/etc/netstart command build the command line for you from a
hostname.if file.

 Ken




 Regards,
 Avi



  1   2   3   4   >