Thanks, although you have some inaccuracy, my test passed base your advice.

1. create vlan
export int_if="bnx1"
# ifconfig vlan0 destroy

ifconfig vlan0 create
ifconfig vlan0 vlan 10 vlandev ${int_if}

ifconfig vlan1 create
ifconfig vlan1 vlan 11 vlandev ${int_if}
...

/bin/echo "inet 192.168.0.201 255.255.255.0 NONE vlan 10 vlandev
${int_if}" > /etc/hostname.vlan0
/bin/echo "inet 192.168.1.201 255.255.255.0 NONE vlan 11 vlandev
${int_if}" > /etc/hostname.vlan1
...

2.  use normal subnet directive in dhcpd.conf, NOT shared-network !

authoritative;

default-lease-time 14400;
max-lease-time 43200;

option domain-name "example.com";
option domain-name-servers 192.168.0.1, 210.21.4.130, 202.96.128.166;

subnet 192.168.0.0 netmask 255.255.255.0 {
    option routers 192.168.0.1;
    range 192.168.0.50 192.168.0.149;
}

subnet 192.168.1.0 netmask 255.255.255.0 {
    option routers 192.168.1.1;
    range 192.168.1.50 192.168.1.149;
}
...

3.  run dhcpd, no vlan dev required for arguments

dhcpd -df ${int_if}

2008/6/16 Fernando Quintero <[EMAIL PROTECTED]>:
> You need create vlans interfaces in order to work with dhcp and a switch
> with vlans.
>
> Create each vlan in the openbsd server and run the dhcp daemon on these,
> using the dhcpd_flags="" in rc.conf
>
> #ifconfig vlan0 create
> #ifconfig vlan0 100 vlandev fxp0
>
> where 100 is the vlan tag, and fxp0 is the real nic.
>
> create so vlans as you need.
>
> remember create /etc/hostname.vlanX files to keep the conf after reboot.
>
> then you can try:
>
> #dhcpd fxp0 vlan0 vlan1 vlan2 ...
>
> and try again.

Reply via email to