On 2007/10/17 16:59, Frans Haarman wrote:
> Several times I have noticed my vlan not getting an IP when I use
> vlan 1 vlandev bge0 10.3.3.1 255.255.255.252 10.3.3.3
that's not the format shown in hostname.if(5).
Regular IPv4 network setup:
addr_family [alias] addr netmask broadcast_addr options
dest dest_addr
> It works everytime when I use:
> vlan 1 vlandev bge0
> 10.3.3.1 255.255.255.252 10.3.3.3
Not quite; this is also missing the address family.
Here are a few alternatives which work:
inet 10.3.3.1 255.255.255.252 10.3.3.3
vlan 1 vlandev bge0
vlan 1 vlandev bge0
inet 10.3.3.1 255.255.255.252 NONE
inet 10.3.3.1 255.255.255.252 NONE vlan 1 vlandev bge0
...and there are other possibilities.
(Also note that NONE can be used for broadcast_addr to select
the normal address automatically, I strongly recommend doing so).