Thank you Stefan! Below is explanation how I should configure my
bridge(4). That was exactly my issue, dhcpd(8) was running on sis0, which
didn't had cable plugged in. Now I'm using vether(4) and all works like
a charm.

On Tue, Aug 24, 2010 at 10:55:01PM +0200, Stefan Sperling wrote:
> re http://marc.info/?l=openbsd-misc&m=128260593928878&w=2
> (sorry not subscribed to misc so this mail has no in-reply-to headers)
> 
> I've hit the same problem some time ago.
> 
> The root of the problem is related to the way network drivers call bpf(4)
> hooks. Drivers need to pass packets to bpf so that dhcpd can see them.
> Some drivers always pass packets to bpf, but some only do so if the link
> state of the interface is up. This means that with some drivers, dhcpd will
> see packets only if the interface it is listening on has a cable plugged
> into it. E.g. my net5501 soekris with dhcpd listening on vr0 could only
> serve DHCP when the vr0 interface had a cable plugged into it (so for a
> while I patched the vr driver to always call the bpf hook, but that's a
> crude workaround...)
> 
> But as of 4.7, we have vether(4), which nicely solves this problem.
> Try putting your dhcpd on a vether interface, and add the vether
> interface to the bridge. Then dhcpd should see packets from all other
> bridge member interfaces just fine. You can add the router's IPs to the
> vether interface -- the other bridge ports don't need to have IP addresses.
> You can think of the vether interface as an additional port of the bridge
> which can safely be used by the machine itself.


Below my current setup which works under:

OpenBSD 4.8 (GENERIC) #136: Mon Aug 16 09:06:23 MDT 2010
    dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC




==> /etc/hostname.bridge0 <==
description "link to virtual hosts"
add vether0
add sis0
add sis1
add sis2
add sis3
up

==> /etc/hostname.sis0 <==
up description "part of bridge0"

==> /etc/hostname.sis1 <==
up description "part of bridge0"

==> /etc/hostname.sis2 <==
up description "part of bridge0"

==> /etc/hostname.sis3 <==
up description "part of bridge0"

==> /etc/hostname.vether0 <==
inet 192.168.110.1 255.255.255.0 NONE description "part of bridge0"
inet alias 192.168.3.1 255.255.255.0

==> /etc/hostname.vr0 <==
dhcp description "internet uplink"

==> /etc/hostname.vr1 <==
inet 192.168.101.1 255.255.255.0 NONE description "link to net4511"

==> /etc/hostname.vr2 <==
inet 192.168.102.1 255.255.255.0 NONE description "link to linksys"

==> /etc/hostname.vr3 <==
inet 192.168.103.1 255.255.255.0 NONE description "link to netgear switch"

# grep ^dhcpd /etc/rc.conf.local
dhcpd_flags="vr1 vr2 vr3 vether0"               # enabled

-- 
best regards
q#

Reply via email to