<?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; Linux</title>
	<atom:link href="http://www.linuxaddicted.de/blog/tag/linux/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>Inbound Traffic Shaping made (pretty) easy</title>
		<link>http://www.linuxaddicted.de/blog/2009/01/28/inbound-traffic-shaping-made-pretty-easy/</link>
		<comments>http://www.linuxaddicted.de/blog/2009/01/28/inbound-traffic-shaping-made-pretty-easy/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 17:50:40 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Kernel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[QoS]]></category>

		<guid isPermaLink="false">http://www.linuxaddicted.de/blog/?p=186</guid>
		<description><![CDATA[<p>It&#8217;s not that easy to get trafic shaping done with Linux especially when it comes to inbound traffic. After some serious research i found this howto which is a excellent starting point. The supplied script can be easily customized and works pretty good. If there&#8217;s interest i can post my version for incoming traffic <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.linuxaddicted.de/blog/2009/01/28/inbound-traffic-shaping-made-pretty-easy/">Inbound Traffic Shaping made (pretty) easy</a></span>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s not that easy to get trafic shaping done with Linux especially when it comes to inbound traffic. After some serious research i found this <a href="http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/ADSL-Bandwidth-Management-HOWTO.html">howto</a> which is a excellent starting point. The supplied script can be easily customized and works pretty good. If there&#8217;s interest i can post my version for incoming traffic only.</p>
<p>You have to apply the IMQ patch (can be found <a href="http://www.linuximq.net/patches.html">here</a>) to your kernel to get this working. IMQ is necessary because Linux can only limit outgoing traffic with builtin kernel settings.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxaddicted.de/blog/2009/01/28/inbound-traffic-shaping-made-pretty-easy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Qualcomm MSM6275 UMTS Vodafone card</title>
		<link>http://www.linuxaddicted.de/blog/documentation/qualcomm-msm6275-umts-vodafone-card/</link>
		<comments>http://www.linuxaddicted.de/blog/documentation/qualcomm-msm6275-umts-vodafone-card/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 21:06:56 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ppp]]></category>
		<category><![CDATA[umts]]></category>
		<category><![CDATA[vodafone]]></category>

		<guid isPermaLink="false">http://blog.linuxaddicted.de/?page_id=99</guid>
		<description><![CDATA[Preferences <p /> <p>First of all make sure UMTS card is recognized by your system. You need PCMCIA support enabled in your kernel. If you compiled it as modules load the modules.</p> <p>deathstar ~ # lspci ... 04:00.0 Network controller: Option N.V. Qualcomm MSM6275 UMTS chip ... </p> Nozomi &#8211; Accessing the card <p <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.linuxaddicted.de/blog/documentation/qualcomm-msm6275-umts-vodafone-card/">Qualcomm MSM6275 UMTS Vodafone card</a></span>]]></description>
			<content:encoded><![CDATA[<h3>Preferences</h3>
<hr />
<p />
<p>First of all make sure UMTS card is recognized by your system. You need PCMCIA support enabled in your kernel. If you compiled it as modules load the modules.</p>
<p><code>deathstar ~ # lspci<br />
...<br />
04:00.0 Network controller: Option N.V. Qualcomm MSM6275 UMTS chip<br />
...<br />
</code></p>
<h3>Nozomi &#8211; Accessing the card</h3>
<hr />
<p />
<p>Download und build the Nozomi kernel module. You can get it <a href="http://www.pharscape.org/component/option,com_forum/Itemid,68/page,viewforum/f,5/"><b>here</b></a>.</p>
<p><code>cd nozomi_2.21alpha_060917<br />
mkdir -p /lib/modules/KERNEL_VERSION/kernel/drivers/pci/hotplug (if it doesn't exists)<br />
make<br />
depmod<br />
modprobe nozomi<br />
</code></p>
<p>After you succeeded in loading the nozomi module you should see something like this in dmesg:</p>
<p><code>nozomi 0000:04:00.0: Nozomi driver nozomi_tty<br />
Initializing Nozomi driver 2.21alpha (build date: Jun  9 2008 15:00:29)<br />
nozomi 0000:04:00.0: Version of card: 3<br />
nozomi 0000:04:00.0: Initialization OK!<br />
</code></p>
<h3>PPP Configuration</h3>
<hr />
<p />
<p>You have to supply the PIN to your SIM-card. There are two ways to accomplish this:</p>
<ul>
<li>Add &#8220;AT+CPIN=MY_SIM_PIN&#8221; to your chat script</li>
<li>Use a little Perl script (for example if you use a PIN app)</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> warnings<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #0000ff;">$SIG</span><span style="color: #009900;">&#123;</span>ALRM<span style="color: #009900;">&#125;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">sub</span> <span style="color: #009900;">&#123;</span> <span style="color: #000066;">die</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;timeout: no response from modem $modem<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> §pin   <span style="color: #339933;">=</span> <span style="color: #000066;">shift</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$modem</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'/dev/noz0'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span>MODEM<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;+&lt;&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$modem</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">or</span> <span style="color: #000066;">die</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;Failed to open modem $modem: $!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">print</span><span style="color: #009900;">&#40;</span>MODEM <span style="color: #ff0000;">&quot;AT+CPIN=<span style="color: #000099; font-weight: bold;">\&quot;</span>$pin<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\r</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #009999;">&lt;MODEM&gt;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">m/OK/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066;">close</span><span style="color: #009900;">&#40;</span>MODEM<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066;">print</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;PIN accepted<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">m/ERROR/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066;">close</span><span style="color: #009900;">&#40;</span>MODEM<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066;">print</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;PIN rejected<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Now it&#8217;s time to create the PPP config and chat scripts.</p>
<h3>/etc/ppp/peers/umts</h3>
<hr />
<p />
<p><code><br />
# Most GPRS phones don't reply to LCP echo's<br />
lcp-echo-failure 0<br />
lcp-echo-interval 0<br />
# Keep pppd attached to the terminal:<br />
# Comment this to get daemon mode pppd<br />
nodetach<br />
# Debug info from pppd:<br />
# Comment this off, if you don't need more info<br />
debug<br />
# Connect script:<br />
# scripts to initialize the UMTS modem and start the connection,<br />
connect /etc/ppp/peers/umts-connect-chat<br />
# Disconnect script:<br />
# AT commands used to 'hangup' the UMTS connection.<br />
disconnect /etc/ppp/peers/umts-disconnect-chat<br />
# Serial device to which the UMTS card is connected:<br />
/dev/noz0<br />
# Serial port line speed<br />
115200<br />
# Hardware flow control:<br />
# Use hardware flow control with cable, Bluetooth and USB but not with IrDA.<br />
crtscts  # serial cable, Bluetooth and USB, on some occations with IrDA too<br />
#nocrtscts # IrDA<br />
# Ignore carrier detect signal from the modem:<br />
local<br />
# IP addresses:<br />
# - accept peers idea of our local address and set address peer as 10.0.0.1<br />
# (any address would do, since IPCP gives 0.0.0.0 to it)<br />
# - if you use the 10. network at home or something and pppd rejects it,<br />
# change the address to something else<br />
0.0.0.0:0.0.0.0<br />
# pppd must not propose any IP address to the peer!<br />
noipdefault<br />
# Accept peers idea of our local address<br />
ipcp-accept-local<br />
# Add the ppp interface as default route to the IP routing table<br />
defaultroute<br />
# DNS servers from the phone:<br />
# some phones support this, some don't.<br />
usepeerdns<br />
# ppp compression:<br />
# ppp compression may be used between the phone and the pppd, but the<br />
# serial connection is usually not the bottleneck in GPRS, so the<br />
# compression is useless (and with some phones need to disabled before<br />
# the LCP negotiations succeed).<br />
novj<br />
nobsdcomp<br />
novjccomp<br />
nopcomp<br />
noaccomp<br />
# The phone is not required to authenticate:<br />
noauth<br />
mtu 1500<br />
mru 1500<br />
</code></p>
<h3>/etc/ppp/peers/umts-connect-chat</h3>
<hr />
<p />
<p><code>exec chat             \<br />
  TIMEOUT   5       \<br />
  ECHO    ON        \<br />
  ABORT   '\nBUSY\r'      \<br />
  ABORT   '\nERROR\r'     \<br />
  ABORT   '\nNO ANSWER\r'     \<br />
  ABORT   '\nNO CARRIER\r'    \<br />
  ABORT   '\nNO DIALTONE\r'   \<br />
  ABORT   '\nRINGING\r\n\r\nRINGING\r'  \<br />
  ''    \rAT        \<br />
  TIMEOUT   12        \<br />
  SAY   "Press CTRL-C to close the connection at any stage!"  \<br />
  SAY   "\ndefining PDP context...\n" \<br />
  OK    ATH       \<br />
  OK    ATE1        \<br />
  OK    'AT+CGDCONT=1,"IP","web.vodafone.de","",0,0'  \<br />
  OK    ATD*99#       \<br />
  TIMEOUT   22        \<br />
  SAY   "\nwaiting for connect...\n"  \<br />
  CONNECT   ""        \<br />
  SAY   "\nConnected." \<br />
  SAY   "\nIf the following ppp negotiations fail,\n" \<br />
  SAY   "try restarting the phone.\n"<br />
</code></p>
<h3>/etc/ppp/peers/umts-disconnect-chat</h3>
<hr />
<p />
<p><code><br />
exec /usr/sbin/chat -V -s -S  \<br />
ABORT   "BUSY"    \<br />
ABORT   "ERROR"   \<br />
ABORT   "NO DIALTONE" \<br />
SAY   "\nSending break to the modem\n"  \<br />
""    "\K"    \<br />
""    "+++ATH"  \<br />
SAY   "\nPDP context detached\n"<br />
</code></p>
<h3>Time to go online</h3>
<hr />
<p />
<p><code>deathstar ~ # pppd call gprs<br />
Press CTRL-C to close the connection at any stage!<br />
defining PDP context...<br />
AT<br />
OK<br />
ATH<br />
OK<br />
ATE1<br />
OK<br />
AT+CGDCONT=1,"IP","web.vodafone.de","",0,0<br />
OK<br />
waiting for connect...<br />
ATD*99#<br />
CONNECT<br />
Connected.<br />
If the following ppp negotiations fail,<br />
try restarting the phone.<br />
Serial connection established.<br />
using channel 1<br />
Using interface ppp0<br />
Connect: ppp0 <--> /dev/noz0<br />
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x9aa17e40>]<br />
rcvd [LCP ConfReq id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0x90ae7a2e>
<pcomp> <accomp>]<br />
No auth is possible<br />
sent [LCP ConfRej id=0x0 <auth chap MD5>
<pcomp> <accomp>]<br />
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x9aa17e40>]<br />
rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x90ae7a2e>]<br />
sent [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x90ae7a2e>]<br />
sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15>]<br />
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]<br />
rcvd [LCP DiscReq id=0x2 magic=0x90ae7a2e]<br />
rcvd [LCP ProtRej id=0x3 80 fd 01 01 00 0c 1a 04 78 00 18 04 78 00]<br />
rcvd [IPCP ConfNak id=0x1 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]<br />
sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]<br />
rcvd [IPCP ConfNak id=0x2 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]<br />
sent [IPCP ConfReq id=0x3 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]<br />
rcvd [IPCP ConfNak id=0x3 <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]<br />
sent [IPCP ConfReq id=0x4 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]<br />
rcvd [IPCP ConfReq id=0x0]<br />
sent [IPCP ConfNak id=0x0 <addr 0.0.0.0>]<br />
rcvd [IPCP ConfNak id=0x4 <addr 77.24.36.100> <ms-dns1 139.7.30.125> <ms-dns3 139.7.30.126>]<br />
sent [IPCP ConfReq id=0x5 <addr 77.24.36.100> <ms-dns1 139.7.30.125> <ms-dns3 139.7.30.126>]<br />
rcvd [IPCP ConfAck id=0x5 <addr 77.24.36.100> <ms-dns1 139.7.30.125> <ms-dns3 139.7.30.126>]<br />
rcvd [IPCP ConfReq id=0x1]<br />
sent [IPCP ConfAck id=0x1]<br />
Could not determine remote IP address: defaulting to 10.64.64.64<br />
local  IP address 77.24.36.100<br />
remote IP address 10.64.64.64<br />
primary   DNS address 139.7.30.125<br />
secondary DNS address 139.7.30.126<br />
Script /etc/ppp/ip-up started (pid 8494)<br />
Script /etc/ppp/ip-up finished (pid 8494), status = 0x1<br />
</code></p>
<p />
Welcome to mobile Internet using your Vodafone UMTS card <img src='http://www.linuxaddicted.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>If you have any trouble don&#8217;t hesitate to contact me: daniel@linuxaddicted.de</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxaddicted.de/blog/documentation/qualcomm-msm6275-umts-vodafone-card/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Nagios Plugins</title>
		<link>http://www.linuxaddicted.de/blog/projects/nagios-plugins/</link>
		<comments>http://www.linuxaddicted.de/blog/projects/nagios-plugins/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 20:53:00 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://blog.linuxaddicted.de/?page_id=65</guid>
		<description><![CDATA[<p>These are some of the Nagios plugins i wrote which may be useful for you. You may download them via http://www.nagiosexchange.org too. All plugins are released under GPLv2 license.</p> <p></p> check_imap_mailbox <p /> <p>Details</p> <p>This plugin monitors a given IMAP mailbox for new mail. When a new mail arrived a CRITICAL error will be <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.linuxaddicted.de/blog/projects/nagios-plugins/">Nagios Plugins</a></span>]]></description>
			<content:encoded><![CDATA[<p>These are some of the Nagios plugins i wrote which may be useful for you. You may download them via <a href="http://www.nagiosexchange.org">http://www.nagiosexchange.org</a> too. All plugins are released under GPLv2 license.</p>
<p><a name="check_imap_mailbox"></a></p>
<h3>check_imap_mailbox</h3>
<hr />
<p />
<p><strong>Details</strong></p>
<p>This plugin monitors a given IMAP mailbox for new mail. When a new mail arrived a CRITICAL error will be returned. No new mail(s) will result in OK</p>
<p><strong>Depencies</strong></p>
<ul>
<li>Mail::IMAPClient <a href="http://search.cpan.org/~djkernen/Mail-IMAPClient-2.2.9/IMAPClient.pod">from CPAN</a></li>
<li>Getopt::Long <a href="http://search.cpan.org/~jv/Getopt-Long-2.37/lib/Getopt/Long.pm">from CPAN</a></li>
</ul>
<p><strong>Usage</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Usage: check_imap_mailbox <span style="color: #7a0874; font-weight: bold;">&#91;</span>PARAMETERS<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
Parameters:
&nbsp;
  <span style="color: #660033;">--host</span>=<span style="color: #7a0874; font-weight: bold;">&#91;</span>HOSTNAME<span style="color: #7a0874; font-weight: bold;">&#93;</span>      : Name or IP address of IMAP server
  <span style="color: #660033;">--user</span>=<span style="color: #7a0874; font-weight: bold;">&#91;</span>USERNAME<span style="color: #7a0874; font-weight: bold;">&#93;</span>      : Username to connect with
  <span style="color: #660033;">--pass</span>=<span style="color: #7a0874; font-weight: bold;">&#91;</span>PASSWORD<span style="color: #7a0874; font-weight: bold;">&#93;</span>      : Password to connect with
  <span style="color: #660033;">--folder</span>=<span style="color: #7a0874; font-weight: bold;">&#91;</span>IMAP FOLDER<span style="color: #7a0874; font-weight: bold;">&#93;</span> : The IMAP folder to check</pre></div></div>

<p><strong>Download latest version: </strong><center><a href="http://www.linuxaddicted.de/blog/downloads/check_imap_mailbox.gz"><img src="http://www.linuxaddicted.de/blog/wp-content/plugins/download-monitor/img/download.gif" /></a><br />check_imap_mailbox / version 0.1 / size 1.25 kB / dlcount 407</center></p>
<p><a name="check_jk_status"></a></p>
<h3>check_jk_status</h3>
<hr />
<p />
<p><strong>Details</strong></p>
<p>Check the current status of a given JK loadbalancer. The status is fetched from the management URL (jkstatus). The plugin returns CRITICAL as soon as a cluster node has failed.</p>
<p><strong>Depencies</strong></p>
<ul>
<li>XML::Simple <a href="http://search.cpan.org/~grantm/XML-Simple-2.18/lib/XML/Simple.pm">from CPAN</a></li>
<li>Getopt::Long <a href="http://search.cpan.org/~jv/Getopt-Long-2.37/lib/Getopt/Long.pm">from CPAN</a></li>
<li>wget <a href="http://www.gnu.org/software/wget/">from gnu.org</a></li>
</ul>
<p><strong>Usage</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Usage: check_jk_status <span style="color: #7a0874; font-weight: bold;">&#91;</span>PARAMETERS<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
Parameters:
  <span style="color: #660033;">--host</span>=<span style="color: #7a0874; font-weight: bold;">&#91;</span>HOSTNAME<span style="color: #7a0874; font-weight: bold;">&#93;</span>        : Name or IP address of JK management interface
  <span style="color: #660033;">--balancer</span>=<span style="color: #7a0874; font-weight: bold;">&#91;</span>JK BALANCER<span style="color: #7a0874; font-weight: bold;">&#93;</span> : Name of the JK balancer</pre></div></div>

<p><strong>Download latest version: </strong> <center><a href="http://www.linuxaddicted.de/blog/downloads/check_jk_status.gz"><img src="http://www.linuxaddicted.de/blog/wp-content/plugins/download-monitor/img/download.gif" /></a><br />check_jk_status / version 0.1 / size 1.72 kB / dlcount 319</center></p>
<p><a name="check_foundry_ports"></a></p>
<h3>check_foundry_ports</h3>
<hr />
<p />
<p><strong>Details</strong></p>
<p>Compare the port status of Foundry switches against a given list and returns CRITICAL if any of the ports has status different from the defined value. May indicate that a switch/server failed or a new unauthorized connection took place.</p>
<p><strong>Depencies</strong></p>
<ul>
<li>Getopt::Long <a href="http://search.cpan.org/~jv/Getopt-Long-2.37/lib/Getopt/Long.pm">from CPAN</a></li>
<li>snmpget <a href="http://net-snmp.sourceforge.net/">from net-snmp.sourceforge.net</a></li>
</ul>
<p><strong>Usage</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Usage: check_foundry_ports <span style="color: #7a0874; font-weight: bold;">&#91;</span>PARAMETERS<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
Parameters:
	    <span style="color: #660033;">--host</span>=<span style="color: #7a0874; font-weight: bold;">&#91;</span>HOSTNAME<span style="color: #7a0874; font-weight: bold;">&#93;</span>            : Hostname or IP-Address of Foundry device
	    <span style="color: #660033;">--community</span>=<span style="color: #7a0874; font-weight: bold;">&#91;</span>SNMP COMMUNITY<span style="color: #7a0874; font-weight: bold;">&#93;</span> : SNMP community string
	    <span style="color: #660033;">--port</span>=<span style="color: #7a0874; font-weight: bold;">&#91;</span>INTERFACE NR<span style="color: #7a0874; font-weight: bold;">&#93;</span>        : The interface number to check <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span>,<span style="color: #000000;">22</span>,...<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p><strong>Download latest version: </strong><center><a href="http://www.linuxaddicted.de/blog/downloads/check_foundry_ports.gz"><img src="http://www.linuxaddicted.de/blog/wp-content/plugins/download-monitor/img/download.gif" /></a><br />check_foundry_ports / version 0.9 / size 1.91 kB / dlcount 250</center></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxaddicted.de/blog/projects/nagios-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tipps &amp; Tricks</title>
		<link>http://www.linuxaddicted.de/blog/documentation/tipps-tricks/</link>
		<comments>http://www.linuxaddicted.de/blog/documentation/tipps-tricks/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 18:35:12 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[hints]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[tipps]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://blog.linuxaddicted.de/?page_id=117</guid>
		<description><![CDATA[Foundry Edgelron 24G-A Spanning Tree <p /> <p>Intensive Tests haben gezeigt das es keinen Sinn macht auf dem Foundry Switch 24G-A &#8220;Spanning Tree per VLAN&#8221; zu verwenden. Bei meiner letzten Installation war die Last durch die 15+X VLAN&#8217;s zu hoch. Es kam immer wieder zu Ausfällen dieser Switches die dann auch immer die anderen <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.linuxaddicted.de/blog/documentation/tipps-tricks/">Tipps &#038; Tricks</a></span>]]></description>
			<content:encoded><![CDATA[<h3>Foundry Edgelron 24G-A Spanning Tree</h3>
<hr />
<p />
<p>Intensive Tests haben gezeigt das es keinen Sinn macht auf dem Foundry Switch 24G-A &#8220;Spanning Tree per VLAN&#8221; zu verwenden. Bei meiner letzten Installation war die Last durch die 15+X VLAN&#8217;s zu hoch. Es kam immer wieder zu Ausfällen dieser Switches die dann auch immer die anderen 24G-A&#8217;s in Mitleidenschaft gezogen haben. Es empfiehlt sich dann im Regelfall (wenn das Netz nicht zu groß ist) einen SPT über alle Komponenten zu legen.</p>
<h3>Bondig + STP</h3>
<hr />
<p />
<p>In den Defaults der meisten Switches kommt es zu Problemen beim bonding von Interfaces. Das zeigt sich durch eine extrem lange Zeitspanne bis das Interface aktiv wird. Eine mögliche Ursache ist die Spanning-Tree Einstellung auf dem Switch. Es sollte eigentlich jeder Port bei dem bekannt ist, dass keine weiteren aktiven Netzwerkkomponenten angeschlossen sind, als Edge-Port definiert werden.<br />
Das hat den Vorteil das der Port sofort aktiviert wird und falls sich doch eine aktive Komponente dahinter verbirgt ist dieser dennoch voll nutzbar. Das gilt zumindest für Foundry Komponenten. Ich hatte bisher noch keine Möglichkeit es bei anderen Herstellern zu verifizieren.</p>
<h3>Linux &#8211; LDAP Timeout Probleme</h3>
<hr />
<p />
<p>Bei der Anbindung von Linux Servern gibt es einiges zu beachten:</p>
<dl>
<dt><strong>OpenSSH ( > 4.7) + LPK Patch</strong></dt>
<dd>
<p>Das Verhalten hat sich mit dieser Version grundlegend geändert. Nach dem Update der OpenSSH hat die LDAP Anmeldung nicht mehr funktioniert. Die Fehlermeldung deutete darauf hin, dass der User nicht in der passenden Gruppe war. Ein lokaler switch auf den User war aber ohne Probleme möglich und zeigte auch die richtige Gruppenzugehörigkeit. Nach intensiver Suche und einiger Zeit im IRC hat sich folgende Lösung ergeben.</p>
<p>In der Konfiguration von sshd (/etc/ssh/sshd_config) müssen folgende Parameter **<br />
<color red>entfernt</color>** werden:</p>
<p><code>LpkSearchTimelimit 3<br />
LpkBindTimelimit 3<br />
</code></p>
</dd>
<dt><strong>Bind Policy in /etc/ldap.conf</strong></dt>
<dd>Die bind_policy in /etc/ldap.conf sollte auf jeden Fall auf soft gesetzt werden. Anderenfalls kommt es zu endlosen Timeouts. Sollte der Connect fehlschlagen wird bei jeder Anfrage dennoch ein Reconnect gemacht. </p>
<p><code>bind_policy soft<br />
</code></p>
</dd>
<dt><strong>LDAP Timeout bei Routing Problemen</strong></dt>
<dd>Sämtliche Einstellung die den Timeout beeinflussen sollen sind hinfällig wenn der LDAP-Server nicht durch eine der Routen erreichbar ist. Dann kommt der volle Timeout zum Tragen.</dd>
</dl>
<h3>OpenGear Key Sequences</h3>
<hr />
<p />
<p>Folgende Key Sequences könnten für die Administration von OpenGear Console Server&#8217;s hilfreich sein.</p>
<p><code>~.  : Close Session<br />
~b  : Send Brake<br />
~h  : Show History<br />
</code></p>
<h3>OpenGear Security</h3>
<hr />
<p />
<p>Bis heute ist es nicht ohne Modifikationen möglich Public Key Authentication mit OpenGear Console Servers zu nutzen. Hier der Workaround:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#########################################</span>
<span style="color: #666666; font-style: italic;">##  Modify Root's home directory</span>
<span style="color: #666666; font-style: italic;">#########################################</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># vi /etc/conf/passwd</span>
--<span style="color: #000000; font-weight: bold;">&gt;</span> Change root homedir to <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>users<span style="color: #000000; font-weight: bold;">/</span>root
&nbsp;
<span style="color: #666666; font-style: italic;">#########################################</span>
<span style="color: #666666; font-style: italic;">## Create directory and fix permissions</span>
<span style="color: #666666; font-style: italic;">#########################################</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># mkdir /etc/conf/users/root/.ssh</span>
<span style="color: #666666; font-style: italic;"># chmod 0700 /etc/conf/users/root/.ssh</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#########################################</span>
<span style="color: #666666; font-style: italic;">## Copy ssh key to console server</span>
<span style="color: #666666; font-style: italic;">#########################################</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># cat [PATH]/id_dsa.pub | ssh root@xyz &quot;cat - &gt; /etc/conf/users/root/.ssh/authorized_keys&quot;</span></pre></div></div>

<h3>BigIP Sessions via Console</h3>
<hr />
<p />
<p>Die BigIP&#8217;s von <a href="http://www.f5.com">F5</a> können fast komplett per SSH/Console gemanaged werden. Das Linux System sorgt dafür das man sich sofort heimisch fühlt. Um sich alle aktuellen Verbindungen anzusehen hilft das &#8220;Swiss Army Knife&#8221; bigpipe:</p>
<p><code>[root@bigip:Active] admin # bigpipe conn all show<br />
1.2.3.4:21606 <-> any:any <-> 192.168.1.4:8   icmp<br />
11.22.33.44:10465 <-> 167.2.3.4:https <-> 192.168.33.2:webcache   tcp<br />
...<br />
</code></p>
<h3>ePower Switches per Console schalten</h3>
<hr />
<p />
<p>Die ePower Switches sind im Prinzip schaltbare Steckdosen. Normalerweise werden einzelne Ports über ein Webfrontend geschaltet (siehe dazu: **[[dev:admin_toolbox|Admin Toolbox]]**. Das Ganze funktioniert aber auch über die serielle Schnittstelle. Und zwar so:</p>
<ul>
<li>In die höchste Ebene wechseln (/RS und dann **nicht** TAB drücken)</li>
<li>Die Syntax ist: Pxy=z (x=Steckdosenleiste, y=Port, z=Status)</li>
<li>Stati (0=aus, 1=an, r=reboot, t=toggle)</li>
<li>ENTER</li>
</ul>
<h3>SSH Key Exchange Einzeiler</h3>
<hr />
<p />
<p><code><br />
# cat ~/.ssh/id_dsa.pub | ssh USER@TARGET "cat - >> ~/.ssh/authorized_keys"<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxaddicted.de/blog/documentation/tipps-tricks/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>
		<item>
		<title>Documentation</title>
		<link>http://www.linuxaddicted.de/blog/documentation/</link>
		<comments>http://www.linuxaddicted.de/blog/documentation/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 21:13:17 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Docs]]></category>
		<category><![CDATA[Howots]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.linuxaddicted.de/?page_id=68</guid>
		<description><![CDATA[<p>This are some some howto&#8217;s i wrote. Please leave a comment if these documents were helpful for you.</p> Postfix Relay based on OpenLDAP HA Linux Router Qualcomm MSM6275 UMTS Vodafone card F5 BigIP client certificates Tipps &#38; Tricks ]]></description>
			<content:encoded><![CDATA[<p>This are some some howto&#8217;s i wrote. Please leave a comment if these documents were helpful for you.</p>
<ul>
<li><a href="/howtos-and-documentation/postfix-relay-based-on-openldap/">Postfix Relay based on OpenLDAP</a></li>
<li><a href="/howtos-and-documentation/ha-linux-router/">HA Linux Router</a></li>
<li><a href="/howtos-and-documentation/qualcomm-msm6275-umts-vodafone-card">Qualcomm MSM6275 UMTS Vodafone card</a></li>
<li><a href="/howtos-and-documentation/bigip-client-certificates">F5 BigIP client certificates</a></li>
</ul>
<hr />
<ul>
<li><a href="/howtos-and-documentation/tipps-tricks">Tipps &amp; Tricks</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxaddicted.de/blog/documentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

