<?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=Ariadne</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=Ariadne"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Ariadne"/>
	<updated>2026-05-06T14:14:34Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=VRF&amp;diff=16894</id>
		<title>VRF</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=VRF&amp;diff=16894"/>
		<updated>2020-02-14T16:58:53Z</updated>

		<summary type="html">&lt;p&gt;Ariadne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[VRF]] or Virtual Routing and Forwarding (or perhaps Virtual Routing Functions) provide virtualization of the routing table.  They are useful for isolating services and entire networks from each other while avoiding the complexity of network namespaces.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
To make use of VRFs, you will need `iproute2` and a kernel that is capable of using eBPF installed.  Kernel 5.4.19-r1 and later are capable of using eBPF.&lt;br /&gt;
&lt;br /&gt;
== VRF creation ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to define VRFs is to add them to /etc/network/interfaces:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto vrf-mgmt&lt;br /&gt;
iface vrf-mgmt inet manual&lt;br /&gt;
    pre-up ip link add vrf-mgmt type vrf table 42&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then associate specific interfaces with VRFs using pre-up commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
    address 1.2.3.4&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 1.2.3.1&lt;br /&gt;
    pre-up ip link set eth0 master vrf-mgmt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== VRF-based Service Isolation ==&lt;br /&gt;
&lt;br /&gt;
Services can be isolated to specific VRFs when running OpenRC 0.42.1-r4 or newer.  You can set the &amp;lt;code&amp;gt;$vrf&amp;lt;/code&amp;gt; variable in an &amp;lt;code&amp;gt;/etc/conf.d&amp;lt;/code&amp;gt; file for a service to isolate it in most cases.&lt;br /&gt;
&lt;br /&gt;
For example, with sshd:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# echo &#039;vrf=&amp;quot;vrf-mgmt&amp;quot;&#039; &amp;gt;&amp;gt; /etc/conf.d/sshd&lt;br /&gt;
# rc-service sshd restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ariadne</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=VRF&amp;diff=16893</id>
		<title>VRF</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=VRF&amp;diff=16893"/>
		<updated>2020-02-14T16:50:18Z</updated>

		<summary type="html">&lt;p&gt;Ariadne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[VRF]] or Virtual Routing Functions provide virtualization of the routing table.  They are useful for isolating services and entire networks from each other while avoiding the complexity of network namespaces.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
To make use of VRFs, you will need `iproute2` and a kernel that is capable of using eBPF installed.  Kernel 5.4.19-r1 and later are capable of using eBPF.&lt;br /&gt;
&lt;br /&gt;
== VRF creation ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to define VRFs is to add them to /etc/network/interfaces:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto vrf-mgmt&lt;br /&gt;
iface vrf-mgmt inet manual&lt;br /&gt;
    pre-up ip link add vrf-mgmt type vrf table 42&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then associate specific interfaces with VRFs using pre-up commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
    address 1.2.3.4&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 1.2.3.1&lt;br /&gt;
    pre-up ip link set eth0 master vrf-mgmt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== VRF-based Service Isolation ==&lt;br /&gt;
&lt;br /&gt;
Services can be isolated to specific VRFs when running OpenRC 0.42.1-r4 or newer.  You can set the &amp;lt;code&amp;gt;$vrf&amp;lt;/code&amp;gt; variable in an &amp;lt;code&amp;gt;/etc/conf.d&amp;lt;/code&amp;gt; file for a service to isolate it in most cases.&lt;br /&gt;
&lt;br /&gt;
For example, with sshd:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# echo &#039;vrf=&amp;quot;vrf-mgmt&amp;quot;&#039; &amp;gt;&amp;gt; /etc/conf.d/sshd&lt;br /&gt;
# rc-service sshd restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ariadne</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=VRF&amp;diff=16892</id>
		<title>VRF</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=VRF&amp;diff=16892"/>
		<updated>2020-02-14T16:49:36Z</updated>

		<summary type="html">&lt;p&gt;Ariadne: Created page with &amp;quot;VRF or Virtual Routing Functions provide virtualization of the routing table.  They are useful for isolating services and entire networks from each other while avoiding th...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[VRF]] or Virtual Routing Functions provide virtualization of the routing table.  They are useful for isolating services and entire networks from each other while avoiding the complexity of network namespaces.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
To make use of VRFs, you will need `iproute2` and a kernel that is capable of using eBPF installed.  Kernel 5.4.19-r1 and later are capable of using eBPF.&lt;br /&gt;
&lt;br /&gt;
== VRF creation ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to define VRFs is to add them to /etc/network/interfaces:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto vrf-mgmt&lt;br /&gt;
iface vrf-mgmt inet manual&lt;br /&gt;
    pre-up ip link add vrf-mgmt type vrf table 42&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then associate specific interfaces with VRFs using pre-up commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
    address 1.2.3.4&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 1.2.3.1&lt;br /&gt;
    pre-up ip link set eth0 master vrf-mgmt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== VRF-based Service Isolation ==&lt;br /&gt;
&lt;br /&gt;
Services can be isolated to specific VRFs when running OpenRC 0.42.1-r4 or newer.  You can set the &amp;lt;code&amp;gt;$vrf&amp;lt;/code&amp;gt; variable in an &amp;lt;code&amp;gt;/etc/conf.d&amp;lt;/code&amp;gt; file for a service to isolate it in most cases.&lt;br /&gt;
&lt;br /&gt;
For example, with sshd:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
# echo &#039;vrf=&amp;quot;vrf-mgmt&amp;quot;&#039; &amp;gt;&amp;gt; /etc/conf.d/sshd&lt;br /&gt;
# rc-service sshd restart&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ariadne</name></author>
	</entry>
</feed>