Problem configuring vlan interfaces on startup

2006-12-08 Thread Brian Candler
I'm running OpenBSD 4.0. My external interface, fxp0, is a tagged trunk.

I've configured it as follows:

# head /etc/hostname.fxp* /etc/hostname.vlan*
== /etc/hostname.fxp0 ==
up

== /etc/hostname.vlan0 ==
dhcp vlan 853 vlandev fxp0

== /etc/hostname.vlan1 ==
inet 10.69.255.254 netmask 255.255.255.224 vlan 841 vlandev fxp0

== /etc/hostname.vlan2 ==
inet 10.70.207.142 netmask 255.255.255.240 vlan 842 vlandev fxp0

== /etc/hostname.vlan3 ==
inet 192.168.0.250 netmask 255.255.255.0 vlan 843 vlandev fxp0
inet alias 192.168.1.250 netmask 255.255.255.0
inet alias 192.168.2.250 netmask 255.255.255.0
inet alias 192.168.168.250 netmask 255.255.255.0

However, what I find is that on power-up, my vlan0 interface is configured
correctly (it picks up an IP address via DHCP), but interfaces vlan1-vlan3
are not configured. So I end up configuring them by hand, for example by

  # ifconfig vlan1 $(cat /etc/hostname.vlan1)
  # ifconfig vlan2 $(cat /etc/hostname.vlan2)
  # sed 's/^/ifconfig vlan3 /' /etc/hostname.vlan3 | sh

which works fine.

So I was just wondering, is there something I've missed which is needed to
get them to self-configure at startup?

Thanks,

Brian.



Re: Problem configuring vlan interfaces on startup

2006-12-08 Thread Mathieu Sauve-Frankel
 So I was just wondering, is there something I've missed which is needed to
 get them to self-configure at startup?

you could start by reading the man page. 

pay attention to the examples in hostname.if(5), it should be pretty obvious
what you've done wrong. 

-- 
Mathieu Sauve-Frankel



Re: Problem configuring vlan interfaces on startup

2006-12-08 Thread Brian Candler
On Fri, Dec 08, 2006 at 10:06:23PM +0900, Mathieu Sauve-Frankel wrote:
  So I was just wondering, is there something I've missed which is needed to
  get them to self-configure at startup?
 
 you could start by reading the man page. 
 
 pay attention to the examples in hostname.if(5), it should be pretty obvious
 what you've done wrong. 

Hmm. That's what happens when two syntaxes are almost the same, but not
quite.

I did read that page previously, and what entered my brain was that these
lines just contained arguments to ifconfig. But they're not.

Thanks for pointing me to what I needed.

Regards,

Brian.