<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>My two ¢&#039;s &#187; keepalived</title>
	<atom:link href="http://www.linuxaddicted.de/blog/tag/keepalived/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.linuxaddicted.de/blog</link>
	<description>A Gentoo addict, linux admin and developer</description>
	<lastBuildDate>Wed, 31 Mar 2010 12:12:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>OpenVPN active/active cluster</title>
		<link>http://www.linuxaddicted.de/blog/2010/02/01/openvpn-activeactive-cluster/</link>
		<comments>http://www.linuxaddicted.de/blog/2010/02/01/openvpn-activeactive-cluster/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 18:49:10 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[keepalived]]></category>
		<category><![CDATA[OpenVPN]]></category>

		<guid isPermaLink="false">http://www.linuxaddicted.de/blog/?p=293</guid>
		<description><![CDATA[<p>Code snippets are for Gentoo systems but it should be easy to adapt this for other systems</p> <p>This is a small howto explaining how to run a active/active Cluster (keeplaived) setup with OpenVPN. The active/active reflects that both cluster nodes run the same OpenVPN instance. In server mode this setup leads to routing problems <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.linuxaddicted.de/blog/2010/02/01/openvpn-activeactive-cluster/">OpenVPN active/active cluster</a></span>]]></description>
			<content:encoded><![CDATA[<p><em>Code snippets are for Gentoo systems but it should be easy to adapt this for other systems</em></p>
<p>This is a small howto explaining how to run a active/active Cluster (keeplaived) setup with OpenVPN. The active/active reflects that both cluster nodes run the same OpenVPN instance. In server mode this setup leads to routing problems as both nodes have the tunnel route added during startup (not after connect). This results in routing trouble as i needed the passive node to access the VPN tunnel via the active node. This is how i solved it:<br />
<span id="more-293"></span></p>
<h2>Routing setup</h2>
<p>Both firewall nodes have a static route which forwards tunnel traffic to one of the internal cluster IP&#8217;s. The metric for this route is 2 so a active tunnel is preferred over that static route.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">routes_eth2</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #ff0000;">&quot;192.168.44.0/24 via 192.168.20.254 metric 2&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>It doesn&#8217;t matter which node is active and gets the VPN connects as the other node has the right routing entries.</p>
<h2>OpenVPN configuration</h2>
<p>This setup requires the use of sudo or to run the OpenVPN daemon as root (sudo, sudo, sudo!!!). First we disable to automatically adding of routes and specify scripts for client-connect and client-disconnect. Dont forget to set script security.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">route-noexec
client-connect <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>openvpn<span style="color: #000000; font-weight: bold;">/</span>cluster_routing.sh
client-disconnect <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>openvpn<span style="color: #000000; font-weight: bold;">/</span>cluster_routing.sh
script-security <span style="color: #000000;">3</span></pre></div></div>

<h2>cluster_routing.sh</h2>
<p>This is a simple version of the script but it should be sufficient to work in most scenarios.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## This is useful for debugging and to get the available env vars</span>
<span style="color: #666666; font-style: italic;">##exec &amp;gt; /tmp/ovpn.debug.$$ 2&amp;gt;&amp;amp;1; set -x</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${script_type}</span>&quot;</span> == <span style="color: #ff0000;">&quot;client-connect&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>;
<span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>route add <span style="color: #660033;">-net</span> <span style="color: #800000;">${route_network_1}</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">24</span> gw <span style="color: #800000;">${route_vpn_gateway}</span>
<span style="color: #000000; font-weight: bold;">else</span>
    <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>route del <span style="color: #660033;">-net</span> <span style="color: #800000;">${route_network_1}</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">24</span> gw <span style="color: #800000;">${route_vpn_gateway}</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span></pre></div></div>

<p>This script adds and removes the needed route to get a operational tunnel.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxaddicted.de/blog/2010/02/01/openvpn-activeactive-cluster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HA Linux Router</title>
		<link>http://www.linuxaddicted.de/blog/documentation/ha-linux-router/</link>
		<comments>http://www.linuxaddicted.de/blog/documentation/ha-linux-router/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 21:32:38 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[Cluster]]></category>
		<category><![CDATA[HA]]></category>
		<category><![CDATA[Howots]]></category>
		<category><![CDATA[keepalived]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.linuxaddicted.de/?page_id=76</guid>
		<description><![CDATA[<p>This howto describes the setup of a HA Linux router based on Gentoo and Keepalived. I&#8217;m writing this because there&#8217;s not really a good documentation on this topic so far. At least as i searched for it.</p> Requirement <p>The intended router requires this config and tools:</p> Kernel with activcated VLAN support(CONFIG_VLAN_8021Q=y) Keepalived installed vconfig <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.linuxaddicted.de/blog/documentation/ha-linux-router/">HA Linux Router</a></span>]]></description>
			<content:encoded><![CDATA[<p>This howto describes the setup of a HA Linux router based on Gentoo and Keepalived. I&#8217;m writing this because there&#8217;s not really a good documentation on this topic so far. At least as i searched for it.</p>
<h3>Requirement</h3>
<hr />
<p>The intended router requires this config and tools:</p>
<ul>
<li>Kernel with activcated VLAN support(CONFIG_VLAN_8021Q=y)</li>
<li>Keepalived installed</li>
<li>vconfig installed</li>
<li>Optionally bonding support in Kernel and ifenslave installed</li>
</ul>
<h3>Network Configuration</h3>
<hr />
<p>This configuration example is designed for 8 NIC&#8217;s and 20 VLAN&#8217;s. The following config is split to make it more readable but belongs completely to /etc/conf.d/net.</p>
<p><strong>VLAN-Interface-Mapping</strong></p>
<p><i>Depending on your network and traffic you have to find a VLAN-interface-mapping that matches your environment.</i></p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#######################################################</span>
<span style="color: #666666; font-style: italic;">## VLAN &lt;--&gt; Interface Mapping</span>
<span style="color: #666666; font-style: italic;">#######################################################</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## eth0: VLAN 20 - 22</span>
vlans_eth0<span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;20 21 22&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## eth1: VLAN 22</span>
vlans_eth1<span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;22&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## eth2: VLAN 23 - 24</span>
vlans_eth2<span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;23 24&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## eth3: VLAN 25 26 27 28</span>
vlans_eth3<span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;25 26 27 28&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## eth4: VLAN 29</span>
vlans_eth4<span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;29&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## eth5: VLAN 30 - 34</span>
vlans_eth5<span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;30 31 32 33 34&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## eth6: VLAN 35 - 38 </span>
vlans_eth6<span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;35 36 37 38&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## eth7: VLAN 39 - 40</span>
vlans_eth7<span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;39 40&quot;</span></pre></div></div>

<p><strong>VLAN Settings</strong></p>
<p>This  VLAN setup will lead to interfaces named vlanXX. See the manpage of vconfig if you prefer a different setup. Then it&#8217;s time to disable the &#8220;parent interfaces&#8221;. You can&#8217;t use a interface in mixed mode: VLAN&#8217;s <strong>or</strong> single interface.</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#######################################################</span>
<span style="color: #666666; font-style: italic;">## VLAN Interface naming scheme</span>
<span style="color: #666666; font-style: italic;">#######################################################</span>
&nbsp;
vconfig_eth0<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;set_name_type VLAN_PLUS_VID_NO_PAD&quot;</span> <span style="color: #009900;">&#41;</span>
vconfig_eth1<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;set_name_type VLAN_PLUS_VID_NO_PAD&quot;</span> <span style="color: #009900;">&#41;</span>
vconfig_eth2<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;set_name_type VLAN_PLUS_VID_NO_PAD&quot;</span> <span style="color: #009900;">&#41;</span>
vconfig_eth3<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;set_name_type VLAN_PLUS_VID_NO_PAD&quot;</span> <span style="color: #009900;">&#41;</span>
vconfig_eth4<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;set_name_type VLAN_PLUS_VID_NO_PAD&quot;</span> <span style="color: #009900;">&#41;</span>
vconfig_eth5<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;set_name_type VLAN_PLUS_VID_NO_PAD&quot;</span> <span style="color: #009900;">&#41;</span>
vconfig_eth6<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;set_name_type VLAN_PLUS_VID_NO_PAD&quot;</span> <span style="color: #009900;">&#41;</span>
vconfig_eth7<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;set_name_type VLAN_PLUS_VID_NO_PAD&quot;</span> <span style="color: #009900;">&#41;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#######################################################</span>
<span style="color: #666666; font-style: italic;">## Disable interfaces for &quot;normal&quot; use</span>
<span style="color: #666666; font-style: italic;">#######################################################</span>
&nbsp;
config_eth0<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;null&quot;</span> <span style="color: #009900;">&#41;</span>
config_eth1<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;null&quot;</span> <span style="color: #009900;">&#41;</span>
config_eth2<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;null&quot;</span> <span style="color: #009900;">&#41;</span>
config_eth3<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;null&quot;</span> <span style="color: #009900;">&#41;</span>
config_eth4<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;null&quot;</span> <span style="color: #009900;">&#41;</span>
config_eth5<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;null&quot;</span> <span style="color: #009900;">&#41;</span>
config_eth6<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;null&quot;</span> <span style="color: #009900;">&#41;</span>
config_eth7<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;null&quot;</span> <span style="color: #009900;">&#41;</span></pre></div></div>

<p><strong>IP Adresses</strong></p>
<p>Now it&#8217;s time to assign addresses to our VLAN interfaces. I myself prefer the last 3 adresses of every subnet as router addresses.</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #339933;">|</span>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<span style="color: #339933;">|</span>
<span style="color: #339933;">|</span>            192<span style="color: #339933;">.</span>168<span style="color: #339933;">.</span>45<span style="color: #339933;">.</span>0<span style="color: #339933;">/</span><span style="color: #cc66cc;">25</span>
<span style="color: #339933;">|</span>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<span style="color: #339933;">|</span>
<span style="color: #339933;">|</span> Router<span style="color: #339933;">-</span>VIP  <span style="color: #339933;">==&gt;</span> 192<span style="color: #339933;">.</span>168<span style="color: #339933;">.</span>45<span style="color: #339933;">.</span>254 Cluster IP
<span style="color: #339933;">|</span> Router<span style="color: #339933;">-</span>A    <span style="color: #339933;">==&gt;</span> 192<span style="color: #339933;">.</span>168<span style="color: #339933;">.</span>45<span style="color: #339933;">.</span>253 Real<span style="color: #339933;">-</span>IP Node A
<span style="color: #339933;">|</span> Router<span style="color: #339933;">-</span>B    <span style="color: #339933;">==&gt;</span> 192<span style="color: #339933;">.</span>168<span style="color: #339933;">.</span>45<span style="color: #339933;">.</span>252 Real<span style="color: #339933;">-</span>IP Node B
&nbsp;
config_vlan20<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;10.1.20.0/24&quot;</span> <span style="color: #009900;">&#41;</span>
config_vlan21<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;10.1.21.0/24&quot;</span> <span style="color: #009900;">&#41;</span>
config_vlan22<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;10.1.22.0/24&quot;</span> <span style="color: #009900;">&#41;</span>
config_vlan23<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;10.1.23.0/24&quot;</span> <span style="color: #009900;">&#41;</span>
config_vlan24<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;10.1.24.0/24&quot;</span> <span style="color: #009900;">&#41;</span>
config_vlan25<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;10.1.25.0/24&quot;</span> <span style="color: #009900;">&#41;</span>
config_vlan26<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;10.1.26.0/24&quot;</span> <span style="color: #009900;">&#41;</span>
config_vlan27<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;10.1.27.0/24&quot;</span> <span style="color: #009900;">&#41;</span>
config_vlan28<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;10.1.28.0/24&quot;</span> <span style="color: #009900;">&#41;</span>
config_vlan29<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;10.1.29.0/24&quot;</span> <span style="color: #009900;">&#41;</span>
config_vlan30<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span> <span style="color: #ff0000;">&quot;10.1.30.0/24&quot;</span> <span style="color: #009900;">&#41;</span>
<span style="color: #339933;">...</span></pre></div></div>

<p><strong>Routing</strong></p>
<p>If you&#8217;re familiar with Gentoo&#8217;s routing syntax you shouldn&#8217;t be surprised to see how it works.</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;">routes_vlan21<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;192.168.99.0/27 via 10.1.21.5&quot;</span><span style="color: #009900;">&#41;</span>
routes_vlan31<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;default via 10.1.31.1&quot;</span><span style="color: #009900;">&#41;</span></pre></div></div>

<h3>Keepalived Configuration</h3>
<hr />
<p><strong>MASTER: /etc/keepalived/keepalived.conf</strong></p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">## Unique identifier for every router</span>
global_defs <span style="color: #009900;">&#123;</span>
   router_id router<span style="color: #339933;">-</span>a
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## Sync Group</span>
vrrp_sync_group SG_A <span style="color: #009900;">&#123;</span>
  group <span style="color: #009900;">&#123;</span>
          VI_21 <span style="color: #666666; font-style: italic;"># VLAN 21</span>
          VI_22 <span style="color: #666666; font-style: italic;"># VLAN 22</span>
          VI_23 <span style="color: #666666; font-style: italic;"># VLAN 23</span>
          VI_24 <span style="color: #666666; font-style: italic;"># VLAN 24</span>
          VI_25 <span style="color: #666666; font-style: italic;"># VLAN 25</span>
          VI_26 <span style="color: #666666; font-style: italic;"># VLAN 26</span>
          VI_27 <span style="color: #666666; font-style: italic;"># VLAN 27</span>
          VI_28 <span style="color: #666666; font-style: italic;"># VLAN 28</span>
          VI_29 <span style="color: #666666; font-style: italic;"># VLAN 29</span>
          VI_30 <span style="color: #666666; font-style: italic;"># VLAN 30</span>
          VI_31 <span style="color: #666666; font-style: italic;"># VLAN 31</span>
&nbsp;
          <span style="color: #339933;">...</span>
        <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## VLAN 21</span>
vrrp_instance VI_21 <span style="color: #009900;">&#123;</span>
    interface vlan21
    state MASTER
    virtual_router_id <span style="color: #cc66cc;">21</span>
    priority <span style="color: #cc66cc;">80</span>
    advert_int <span style="color: #cc66cc;">1</span>
    authentication <span style="color: #009900;">&#123;</span>
        auth_type PASS
        auth_pass <span style="color: #339933;">&gt;</span>FreakShow_<span style="color: #339933;">&lt;</span>
    <span style="color: #009900;">&#125;</span>
    virtual_ipaddress <span style="color: #009900;">&#123;</span>
        10<span style="color: #339933;">.</span>1<span style="color: #339933;">.</span>21<span style="color: #339933;">.</span>254
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## VLAN 22</span>
vrrp_instance VI_22 <span style="color: #009900;">&#123;</span>
    interface vlan22
    state MASTER
    virtual_router_id <span style="color: #cc66cc;">22</span>
    priority <span style="color: #cc66cc;">80</span>
    advert_int <span style="color: #cc66cc;">1</span>
    authentication <span style="color: #009900;">&#123;</span>
        auth_type PASS
        auth_pass <span style="color: #339933;">&gt;</span>FreakShow_<span style="color: #339933;">&lt;</span>
    <span style="color: #009900;">&#125;</span>
    virtual_ipaddress <span style="color: #009900;">&#123;</span>
        10<span style="color: #339933;">.</span>1<span style="color: #339933;">.</span>22<span style="color: #339933;">.</span>254
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #339933;">...</span></pre></div></div>

<p><strong>SLAVE: /etc/keepalived/keepalived.conf</strong></p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">## Unique identifier for every router</span>
global_defs <span style="color: #009900;">&#123;</span>
   router_id router<span style="color: #339933;">-</span>b
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## Sync Group</span>
vrrp_sync_group SG_B <span style="color: #009900;">&#123;</span>
  group <span style="color: #009900;">&#123;</span>
          VI_21 <span style="color: #666666; font-style: italic;"># VLAN 21</span>
          VI_22 <span style="color: #666666; font-style: italic;"># VLAN 22</span>
          VI_23 <span style="color: #666666; font-style: italic;"># VLAN 23</span>
          VI_24 <span style="color: #666666; font-style: italic;"># VLAN 24</span>
          VI_25 <span style="color: #666666; font-style: italic;"># VLAN 25</span>
          VI_26 <span style="color: #666666; font-style: italic;"># VLAN 26</span>
          VI_27 <span style="color: #666666; font-style: italic;"># VLAN 27</span>
          VI_28 <span style="color: #666666; font-style: italic;"># VLAN 28</span>
          VI_29 <span style="color: #666666; font-style: italic;"># VLAN 29</span>
          VI_30 <span style="color: #666666; font-style: italic;"># VLAN 30</span>
          VI_31 <span style="color: #666666; font-style: italic;"># VLAN 31</span>
&nbsp;
          <span style="color: #339933;">...</span>
        <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## VLAN 21</span>
vrrp_instance VI_21 <span style="color: #009900;">&#123;</span>
    interface vlan21
    state SLAVE
    virtual_router_id <span style="color: #cc66cc;">21</span>
    priority <span style="color: #cc66cc;">50</span>
    advert_int <span style="color: #cc66cc;">1</span>
    authentication <span style="color: #009900;">&#123;</span>
        auth_type PASS
        auth_pass <span style="color: #339933;">&gt;</span>FreakShow_<span style="color: #339933;">&lt;</span>
    <span style="color: #009900;">&#125;</span>
    virtual_ipaddress <span style="color: #009900;">&#123;</span>
        10<span style="color: #339933;">.</span>1<span style="color: #339933;">.</span>21<span style="color: #339933;">.</span>254
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## VLAN 22</span>
vrrp_instance VI_22 <span style="color: #009900;">&#123;</span>
    interface vlan22
    state SLAVE
    virtual_router_id <span style="color: #cc66cc;">22</span>
    priority <span style="color: #cc66cc;">50</span>
    advert_int <span style="color: #cc66cc;">1</span>
    authentication <span style="color: #009900;">&#123;</span>
        auth_type PASS
        auth_pass <span style="color: #339933;">&gt;</span>FreakShow_<span style="color: #339933;">&lt;</span>
    <span style="color: #009900;">&#125;</span>
    virtual_ipaddress <span style="color: #009900;">&#123;</span>
        10<span style="color: #339933;">.</span>1<span style="color: #339933;">.</span>22<span style="color: #339933;">.</span>254
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #339933;">...</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.linuxaddicted.de/blog/documentation/ha-linux-router/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

