<?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=Captaindave</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=Captaindave"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Captaindave"/>
	<updated>2026-05-01T19:14:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=VLAN&amp;diff=11532</id>
		<title>VLAN</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=VLAN&amp;diff=11532"/>
		<updated>2015-12-22T06:23:27Z</updated>

		<summary type="html">&lt;p&gt;Captaindave: A much more thorough example, giving the reader a template from which to remove unneeded functionality.&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&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
	gateway 192.168.0.1&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;
Alternative with vlan8 over eth0:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto vlan8&lt;br /&gt;
iface vlan8 inet static&lt;br /&gt;
	address 192.168.0.2&lt;br /&gt;
	netmask 255.255.255.0&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;
In those examples a static ip address was used but it works with dhcp 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 excising those parts inapplicable.&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 bond0 mtu 9000&lt;br /&gt;
&lt;br /&gt;
iface bond0.1 inet manual&lt;br /&gt;
&lt;br /&gt;
auto br1&lt;br /&gt;
iface br1 inet static&lt;br /&gt;
address 192.168.1.196&lt;br /&gt;
netmask 255.255.255.0&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&lt;br /&gt;
netmask 255.255.255.0&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;
[[Category:Networking]]&lt;/div&gt;</summary>
		<author><name>Captaindave</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=VLAN&amp;diff=11531</id>
		<title>VLAN</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=VLAN&amp;diff=11531"/>
		<updated>2015-12-21T16:34:30Z</updated>

		<summary type="html">&lt;p&gt;Captaindave: Got rid of configuration that would throw errors on boot; added per-VLAN MTU changes for purposes of illustration&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&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
	gateway 192.168.0.1&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;
Alternative with vlan8 over eth0:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto vlan8&lt;br /&gt;
iface vlan8 inet static&lt;br /&gt;
	address 192.168.0.2&lt;br /&gt;
	netmask 255.255.255.0&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;
In those examples a static ip address was used but it works with dhcp as well.&lt;br /&gt;
&lt;br /&gt;
== Example with vlans over bonding with differing MTUs on the various VLANs ==&lt;br /&gt;
In this example we will [[Bonding|bond]] eth1 and eth2 interfaces and create vlan trunks with vid 8, 64 and 96. The gateway (ISP) is on eth0.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet dhcp&lt;br /&gt;
&lt;br /&gt;
auto bond0&lt;br /&gt;
# use manual because the bond0 interface should not have any ip.&lt;br /&gt;
# set your largest MTU here.&lt;br /&gt;
iface bond0 inet manual&lt;br /&gt;
	bond-slaves eth1 eth2&lt;br /&gt;
	post-up ip link set dev bond0 mtu 9000&lt;br /&gt;
&lt;br /&gt;
# uses &amp;quot;default&amp;quot; MTU of 9000&lt;br /&gt;
auto bond0.8&lt;br /&gt;
iface bond0.8 inet static&lt;br /&gt;
	address 10.65.8.1&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
# uses standard MTU of 1500&lt;br /&gt;
auto bond0.64&lt;br /&gt;
iface bond0.64 inet static&lt;br /&gt;
	address 10.65.64.1&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
	mtu 1500&lt;br /&gt;
&lt;br /&gt;
auto bond0.96&lt;br /&gt;
iface bond0.96 inet static&lt;br /&gt;
	address 10.65.96.1&lt;br /&gt;
	netmask 255.255.255.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;/div&gt;</summary>
		<author><name>Captaindave</name></author>
	</entry>
</feed>