Mail archive
alpine-user

Re: [alpine-user] Help configuring VLANs on my router & switch

From: Tyler <tylera_at_privatedemail.net>
Date: Mon, 18 Jun 2018 01:07:27 +0930

On 18/06/18 00:12, Ulf Volmer wrote:
> On 17.06.2018 15:56, Tyler wrote:
>
>> * eth0.2 ...
>> * vlan2 ...
>
> You can't use vlan2 and eth0.2 at the same time. You have to choose one
> of them.
>

I just had another look at the wiki and it seems I missed the word
*Alternative*

Okay so that does help minimize it somewhat but I still do see

RTNETLINK answers: File exists
run-parts: /etc/network/if-pre-up.d/vlan: exit status 2

twice for each "inet6 static" declaration of eth0.3 and eth0.4

My current /etc/network/interfaces

allow-hotplug eth0
auto eth0
iface eth0 inet manual

# VLAN 2 - ISP
auto eth0.2
iface eth0.2 inet static
   address 192.168.2.1
   netmask 255.255.255.0
   broadcast 192.168.2.255
   post-up /etc/network/fwmark_rules

# VLAN 3 - VPN =
auto eth0.3
iface eth0.3 inet static
   address 192.168.3.1
   netmask 255.255.255.0
   broadcast 192.168.3.255

iface eth0.3 inet6 static
   address fde4:8dba:e21c:3::1
   netmask 64

# VLAN 4 - LAN ONLY
auto eth0.4
iface eth0.4 inet static
   address 192.168.4.1
   netmask 255.255.255.0
   broadcast 192.168.4.255
   post-up /etc/network/route_LAN

iface eth0.4 inet6 static
   address fde4:8dba:e21c:4::1
   netmask 64

# External Interface to Modem
allow-hotplug eth1
auto eth1
iface eth1 inet static
   address 192.168.0.2
   netmask 255.255.255.252
   broadcast 192.168.0.3
   pre-up /sbin/ip link set eth1 up
   up ifup ppp0=service
   down ifdown ppp0=service
   post-down /sbin/ip link set eth1 up

# Link to ISP
iface service inet ppp
   provider service

I also noticed it doesn't seem possible in Alpine Linux with
(ifupdown-0.7.53.1-r1) to specify CIDR notation ie 192.168.2.1/24 and
then omit the netmask altogether. If you try to do that you get:

"ifup: don't have all variables for eth0/inet"

Yet their example for 0.7.53 has it included
https://salsa.debian.org/debian/ifupdown/blob/0.7.53/examples/network-interfaces

--
Tyler
---
Unsubscribe:  alpine-user+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-user+help_at_lists.alpinelinux.org
---
Received on Mon Jun 18 2018 - 01:07:27 GMT