<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nailko</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nailko"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Nailko"/>
	<updated>2026-05-06T08:48:05Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:VLAN&amp;diff=26354</id>
		<title>Talk:VLAN</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:VLAN&amp;diff=26354"/>
		<updated>2024-01-29T15:02:11Z</updated>

		<summary type="html">&lt;p&gt;Nailko: update on config recommandations&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hello,&lt;br /&gt;
&lt;br /&gt;
Using the following configuration Alpine 3.19.0 kernel 6.6.13-0-lts does not seem to work depsite the vlan package being present. &lt;br /&gt;
&lt;br /&gt;
auto vlan8&lt;br /&gt;
iface vlan8&lt;br /&gt;
	address 192.168.0.2/24&lt;br /&gt;
	gateway 192.168.0.1&lt;br /&gt;
	vlan-raw-device eth0&lt;br /&gt;
&lt;br /&gt;
Has anyone tested this recently ?&lt;/div&gt;</summary>
		<author><name>Nailko</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=VLAN&amp;diff=26353</id>
		<title>VLAN</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=VLAN&amp;diff=26353"/>
		<updated>2024-01-29T14:57:56Z</updated>

		<summary type="html">&lt;p&gt;Nailko: config fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article shows how to configure a network interface as an IEEE 802.1q VLAN trunk.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
{{Note| Alpine Linux v2.4 or later is required}}&lt;br /&gt;
==Installation==&lt;br /&gt;
First, install the &#039;&#039;vlan&#039;&#039; package. This will give you support for vlans in the &#039;&#039;/etc/network/interfaces&#039;&#039; file.&lt;br /&gt;
{{Cmd|apk add vlan}}&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
Edit the &#039;&#039;/etc/network/interfaces&#039;&#039; file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto eth0.8&lt;br /&gt;
iface eth0.8 inet static&lt;br /&gt;
	address 192.168.0.2/24&lt;br /&gt;
	gateway 192.168.0.1&lt;br /&gt;
	vlan-raw-device eth0&lt;br /&gt;
	vlan_id 8&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
With the &#039;&#039;vlan&#039;&#039; package installed, ifup will find the trailing .8 in eth0.8 and will create a vlan interface with vid 8 over eth0.&lt;br /&gt;
&lt;br /&gt;
Alternativly with vlan8 over eth0:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto vlan8&lt;br /&gt;
iface vlan8&lt;br /&gt;
	address 192.168.0.2/24&lt;br /&gt;
	gateway 192.168.0.1&lt;br /&gt;
	vlan-raw-device eth0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A static ip address was used in the examples shown above, but dhcp can be used as well.&lt;br /&gt;
&lt;br /&gt;
== Example with bridges associated with VLANs over bonding with differing MTUs on the various VLANs ==&lt;br /&gt;
This serves as an example of some of the more complicated networking possible. Particularly, this would work well for a hypervisor attached to a dedicated storage VLAN. Less complicated implementations can be achieved by merely removing the non-applicable parts.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
auto bond0&lt;br /&gt;
  iface bond0 inet manual&lt;br /&gt;
  bond_slaves eth0 eth1&lt;br /&gt;
  bond_mode 802.3ad&lt;br /&gt;
  bond_miimon 100&lt;br /&gt;
  bond_xmit_hash_policy layer2+3&lt;br /&gt;
  post-up ip link set dev bondi0 mtu 9000&lt;br /&gt;
&lt;br /&gt;
iface bond0.1&lt;br /&gt;
&lt;br /&gt;
auto br1&lt;br /&gt;
iface br1&lt;br /&gt;
  address 192.168.1.196/24&lt;br /&gt;
  gateway 192.168.1.1&lt;br /&gt;
  bridge_ports bond0.1&lt;br /&gt;
  bridge_stp off&lt;br /&gt;
  bridge_fd 0.0&lt;br /&gt;
  post-up ip link set dev bond0.1 mtu 1500&lt;br /&gt;
&lt;br /&gt;
iface bond0.10 inet manual&lt;br /&gt;
&lt;br /&gt;
auto br10&lt;br /&gt;
  iface br10 inet static&lt;br /&gt;
  address 192.168.10.1/24&lt;br /&gt;
  bridge_ports bond0.10&lt;br /&gt;
  bridge_stp off&lt;br /&gt;
  bridge_fd 0.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example with two interfaces on the same adapter. One with vlan and one without ==&lt;br /&gt;
&lt;br /&gt;
Since linux doesn&#039;t allow multiple default gateways we need to use a second routing table using iproute2&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add iproute2}}&lt;br /&gt;
&lt;br /&gt;
Then we&#039;ll add two new routig tables to the config file. One for each network&lt;br /&gt;
&lt;br /&gt;
{{Cmd|echo &amp;quot;1 rt1&amp;quot; &amp;gt;&amp;gt; /etc/iproute2/rt_tables;echo &amp;quot;2 rt2&amp;quot; &amp;gt;&amp;gt; /etc/iproute2/rt_tables;}}&lt;br /&gt;
&lt;br /&gt;
Now we need to edit /etc/network/interfaces&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
# the native interface without a vlan (also called untagged)&lt;br /&gt;
&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0&lt;br /&gt;
        address 192.168.1.100/24&lt;br /&gt;
        gateway 192.168.1.1&lt;br /&gt;
        post-up ip route add 192.168.1.0/24 dev eth0 src 192.168.1.100 table rt1&lt;br /&gt;
        post-up ip route add default via 192.168.1.1 dev eth0 table rt1 # the actual gateway for this interface&lt;br /&gt;
        post-up ip rule add from 192.168.1.100/32 table rt1&lt;br /&gt;
        post-up ip rule add to 192.168.1.100/32 table rt1&lt;br /&gt;
&lt;br /&gt;
# second interface with the vlan tag 5&lt;br /&gt;
auto eth0.5&lt;br /&gt;
iface eth0.5&lt;br /&gt;
    address 192.168.5.100/24&lt;br /&gt;
    post-up ip route add 192.168.5.0/24 dev eth0.5 src 192.168.5.100 table rt2&lt;br /&gt;
    post-up ip route add default via 192.168.5.1 dev eth0.5 table rt2 # the actual gateway for this interface&lt;br /&gt;
    post-up ip rule add from 192.168.5.100/32 table rt2&lt;br /&gt;
    post-up ip rule add to 192.168.5.100/32 table rt2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that if you want to add a third interface this way, you&#039;ll have to add another routing table&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;/div&gt;</summary>
		<author><name>Nailko</name></author>
	</entry>
</feed>