~alpine/devel

3 2

[alpine-devel] snapshot for 120316

Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20120316182256.7217b654@alpinelinux.org>
Sender timestamp
1331918576
DKIM signature
missing
Download raw message
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
---
Nathan Angelacos <nangel@alpinelinux.org>
Details
Message ID
<4F69F6AA.7010006@alpinelinux.org>
In-Reply-To
<20120316182256.7217b654@alpinelinux.org> (view parent)
Sender timestamp
1332344490
DKIM signature
missing
Download raw message
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
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20120321223736.30ff87e5@alpinelinux.org>
In-Reply-To
<4F69F6AA.7010006@alpinelinux.org> (view parent)
Sender timestamp
1332365856
DKIM signature
missing
Download raw message
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
---
Nathan Angelacos <nangel@alpinelinux.org>
Details
Message ID
<4F6C0B5F.10502@alpinelinux.org>
In-Reply-To
<20120321223736.30ff87e5@alpinelinux.org> (view parent)
Sender timestamp
1332480863
DKIM signature
missing
Download raw message
>
>> 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
---
Reply to thread Export thread (mbox)