Hi,
I have pushed a new alpine edge snapshot. It contains the support for
bridges, bonding and vlan (and vde2) configuring directly
in /etc/network/interfaces script.
I have also removed some really old way of configuring vlans and bridge
in init.d scripts. I think we only want support ifup/ifdown style for
those.
I have also added metric to default gateways from udhcpc. It should now
do approx the same as what dhcpcd does. For wifi it will sett metric to
300 + ifindex and for others 200 + ifindex. This will make it easier
when you have multiple gateways with dhcp, for example multi ISP.
I have not started with the setup scripts yet. this snapshot is
supposed to help me with that.
Please test.
Thanks!
---
Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org
Help: alpine-devel+help@lists.alpinelinux.org
---
On 03/16/2012 10:22 AM, Natanael Copa wrote:
> Hi,>> I have pushed a new alpine edge snapshot. It contains the support for> bridges, bonding and vlan (and vde2) configuring directly> in /etc/network/interfaces script.>
<snip>
>> Please test.
vlans and bridge tested - here's an example config:
...
auto vlan161
iface vlan161 inet static
vlan-raw-device eth0
address 192.168.1.10
netmask 255.255.255.224
# Synthesized interfaces
auto br0
iface br0 inet dhcp
pre-up ifup vlan65
hostname wifi
bridge-ports vlan65
# vap0 is added by hostapd
post-down ifdown vlan65
....
One small thing, in if-pre-up.d/vlan, line 19:
*) [ -n "${IF_VLAN_ID}" -o -n "${IF_VLAN_RAW_DEVICE}" ] || exit 0 ;;
That doesn't set NAME1 like the others. Even if it did, (NAME1=VLAN),
ip still has problems finding the interface.
I was trying somthing insane like
iface foo inet dhcp
vlan-raw-device eth0
vlan-id 161
hostname foo
Not sure that should be allowed - if not, perhaps change line 19 to
something like:
*) echo "Interface name is not valid for vlan" ; exit 1;;
---
Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org
Help: alpine-devel+help@lists.alpinelinux.org
---
On Wed, 21 Mar 2012 08:41:30 -0700
Nathan Angelacos <nangel@alpinelinux.org> wrote:
> On 03/16/2012 10:22 AM, Natanael Copa wrote:> > Hi,> >> > I have pushed a new alpine edge snapshot. It contains the support> > for bridges, bonding and vlan (and vde2) configuring directly> > in /etc/network/interfaces script.> >> <snip>> >> > Please test.> > vlans and bridge tested - here's an example config:> > ...> auto vlan161> iface vlan161 inet static> vlan-raw-device eth0> address 192.168.1.10> netmask 255.255.255.224> > # Synthesized interfaces> auto br0> iface br0 inet dhcp> pre-up ifup vlan65> hostname wifi> bridge-ports vlan65> # vap0 is added by hostapd> post-down ifdown vlan65> ....> > > One small thing, in if-pre-up.d/vlan, line 19:> > *) [ -n "${IF_VLAN_ID}" -o -n "${IF_VLAN_RAW_DEVICE}" ] || exit> 0 ;;> > > That doesn't set NAME1 like the others. Even if it did,> (NAME1=VLAN), ip still has problems finding the interface.> > I was trying somthing insane like> > iface foo inet dhcp> vlan-raw-device eth0> vlan-id 161> hostname foo
I don't think there are any vlan name type for creating a vlan
interfaces named 'foo'. (see vconfig man page. set_name_type
and vlan_name_types in /usr/include/linux/if_vlan.h)
> Not sure that should be allowed - if not, perhaps change line 19 to > something like:> > *) echo "Interface name is not valid for vlan" ; exit 1;;
actually, it is probably allowed to create vlan interfaces with any
name using iproute2. I removed the code that does that uses it though
since the busybox iproute does not support it. We could probably make
it work by detecting if its bb iproute or not. (i wanted ship something
working rather than aim for perfect and not ship at all)
Care to file a bug so i don't forget it?
-nc
---
Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org
Help: alpine-devel+help@lists.alpinelinux.org
---
>>> Not sure that should be allowed - if not, perhaps change line 19 to>> something like:>>>> *) echo "Interface name is not valid for vlan" ; exit 1;;>> actually, it is probably allowed to create vlan interfaces with any> name using iproute2. I removed the code that does that uses it though> since the busybox iproute does not support it. We could probably make> it work by detecting if its bb iproute or not. (i wanted ship something> working rather than aim for perfect and not ship at all)>> Care to file a bug so i don't forget it?
I think its good to only allow names like vlan[0-9]+
Alpine Linux is BusyBox based. This script should be run when Alpine
is first installed - iproute2 shouldn't be loaded.
If someone wants to load iproute2, they should be smart enough to
configure the interfaces themselves.
---
Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org
Help: alpine-devel+help@lists.alpinelinux.org
---