NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: vlan



On Wed, Mar 14, 2018 at 11:41:32PM +0700, Robert Elz wrote:
>     Date:        Wed, 14 Mar 2018 15:31:23 +0000
>     From:        Patrick Welche <prlw1%cam.ac.uk@localhost>
>     Message-ID:  <20180314153123.GD6381@quark>
> 
>   | Rather than the traditional /etc/ifconfig.vlan0, I thought I would try the
>   | fancy rc.conf variables:
>   |
>   | net_interfaces="vlan0"
>   | ifconfig_vlan0="create;vlan 1 vlanif wm0;inet 192.168.1.1 netmask 0xffffff00"
>   |
>   | but after a reboot, no complaints in /var/run/rc.log, but also no vlan0...
> 
> What do you have auto_ifconfig set to?
> 
> /etc/defaults/rc.conf has ...
> 
> auto_ifconfig=YES                               # config all avail. interfaces
> net_interfaces=""                               # used only if above is NO
> 
> Note the comment on the second .    If you set auto_ifconfog=NO
> then you are also going to need wm0 in net_interfaces (before vlan0 I presume)
> or it will not be configured.

I think I now see the issue... I only tried net_interfaces="vlan0" because
after a reboot, vlan0 wasn't created.

In /etc/rc.d/network, I see:

                for cloner in $(/sbin/ifconfig -C); do
                        for int in /etc/ifconfig.${cloner}[0-9]*; do
                                [ ! -f $int ] && break
                                tmp="$tmp ${int##*.}"
                        done

ifconfig -C certainly returns vlan, but then it looks as though I need
the /etc/ifconfig.vlan0 file rather than being able to try the
fancy variable (c.f., original message...).

Might need a -a -n eval \$ifconfig_$cloner or somesuch...


Cheers,

Patrick


Home | Main Index | Thread Index | Old Index