<?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>&#124; marked &#124; &#187; server</title>
	<atom:link href="http://www.kathmann.com/tag/server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kathmann.com</link>
	<description>geek stuff, real life and some fun</description>
	<lastBuildDate>Mon, 02 Jan 2012 00:21:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Gimme powerrrr</title>
		<link>http://www.kathmann.com/2008/10/28/gimme-powerrrr/</link>
		<comments>http://www.kathmann.com/2008/10/28/gimme-powerrrr/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 23:17:42 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[ict / computers]]></category>
		<category><![CDATA[failure]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[power]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.kathmann.com/?p=165</guid>
		<description><![CDATA[There was a power failure at the NIKHEF data center tonight, one of the (if not THE) biggest AMSiX hubs. Ouch! All connectivity lost to the super data center my little server is in. So&#8230;server doing fine, data center doing fine, upstream data link dead. Damn. Back up inside two hours is pretty good though, [...]]]></description>
			<content:encoded><![CDATA[<p>There was a power failure at the <a title="NIKHEF" href="http://www.nikhef.nl/" target="_blank">NIKHEF</a> data center tonight, one of the (if not THE) biggest <a title="AMSwhatiX?" href="http://en.wikipedia.org/wiki/Amsterdam_Internet_Exchange" target="_blank">AMSiX</a> hubs. Ouch! All connectivity lost to the super data center my little server is in. So&#8230;server doing fine, data center doing fine, upstream data link dead. Damn.</p>
<p>Back up inside two hours is pretty good though, tip &#8216;o the hat to the engineers over there.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kathmann.com/2008/10/28/gimme-powerrrr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using EtherChannel for high availability on Cisco switches</title>
		<link>http://www.kathmann.com/2008/07/21/using-etherchannel-for-high-availability-on-cisco-switches/</link>
		<comments>http://www.kathmann.com/2008/07/21/using-etherchannel-for-high-availability-on-cisco-switches/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 15:27:15 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[ict / computers]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[catalyst]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[high availability]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[switch]]></category>

		<guid isPermaLink="false">http://www.kathmann.com/?p=66</guid>
		<description><![CDATA[When building high availability networks or systems the three golden rules are: No single points of failure All failovers are automatic and swift Use non-proprietary technologies where possible When coupling server to the network I myself quite like using EtherChannel. EtherChannel allows multiple physical Ethernet links to combine into one logical channel, which allows the [...]]]></description>
			<content:encoded><![CDATA[<p>When building high availability networks or systems the three golden rules are:</p>
<ol>
<li>No single points of failure</li>
<li>All failovers are automatic and swift</li>
<li>Use non-proprietary technologies where possible</li>
</ol>
<p>When coupling server to the network I myself quite like using EtherChannel. EtherChannel allows multiple physical Ethernet links to combine into one logical channel, which allows the links in the channel to share traffic load, as well as redundancy in the event that one or more links in the channel fail. So you have at least two cables linking a server to a switch, and with some intelligence in setting up the link you both double the bandwidth available to that server and make sure that a dead cable doesn&#8217;t leave your server dead in the water and you racing to the data center.</p>
<h3>Equipment used</h3>
<p>As a big friend of <a title="Cisco, Inc." href="http://www.cisco.com" target="_blank">Cisco</a> equipment I&#8217;ll use a Cisco switch to show the configuration at the switch end, although many other managed switches from other brands do support the EtherChannel standards as well. Of course the server (or in fact the network card) also needs to support the configuration, I&#8217;ll be using an <a title="Hewlett-Packard, Inc." href="http://www.hp.com" target="_blank">HP</a> ProLiant server today with an HP Dual Port ProLiant Network Adapter (again, other brands of course also support this configuration).<br />
Another note: All commands used below are Cisco IOS commands. if you&#8217;re using a switch running CatOS please scroll to the end of this article for a short recap of the used commands for CatOS.</p>
<p>First you&#8217;ll need to check if your switch supports EtherChannel by using the show command on one of the ports you&#8217;d like to use, and look for the &#8216;Channel&#8217; key word:</p>
<pre>asp-lsw-01#<strong>show interface Gi1/5 capabilities
</strong>GigabitEthernet1/5
Model: WS-C4948-RJ-45
Type: 10/100/1000-TX
Speed: 10,100,1000,auto
Duplex: half,full,auto
Auto-MDIX: no
Trunk encap. type: 802.1Q,ISL
Trunk mode: on,off,desirable,nonegotiate
<span style="color: #008000;"><strong>Channel: yes
</strong></span>Broadcast suppression: percentage(0-100), hw
Flowcontrol: rx-(off,on,desired),tx-(off,on,desired)
VLAN Membership: static, dynamic
Fast Start: yes
CoS rewrite: yes
ToS rewrite: yes
Inline power: no
SPAN: source/destination
UDLD: yes
Link Debounce: no
Link Debounce Time: no
Port Security: yes
Dot1x: yes
Maximum MTU: 9198 bytes (Jumbo Frames)
Multiple Media Types: no
Diagnostic Monitoring: N/A
Queuing: rx-(N/A), tx-(1p3q1t, Sharing/Shaping)
asp-lsw-01#</pre>
<p>Hooray, my switch understands EtherChannels. To check the capabilities of your network card you&#8217;ll have to refer to the manufacturer&#8217;s information I&#8217;m afraid.</p>
<h3>Cabling</h3>
<p>As Cisco puts it:</p>
<blockquote><p>The EtherChannel should start on a single device and end on another single device. The device can be a switch, a switch stack, a workstation, or a server.</p>
<ul>
<li>Within a single switch chassis, the EtherChannel can start or end on different modules. This setup is applicable for Cisco Catalyst 4000/4500/6000/6500 switches.</li>
<li>Within a single switch stack, the EtherChannel can start or end on different stack members.</li>
</ul>
</blockquote>
<p>Do note that CatOS-based Cisco switches do have stricter requirements on EtherChannels, basically you can only create EtherChannels on adjoining odd/even pairs, otherwise the switch will not accept your port selections.</p>
<p>Rule of thumb on cabling: <span style="text-decoration: underline;">never</span> <span style="text-decoration: underline;">ever</span> connect a cable to a port on your network without configuring it first! Especially connecting multiple cables to the same end device can produce some very unexpected and nasty results on your network as for example STP goes haywire on ill-configured ports and disables entire trees of switches on your LAN. Connect the cables <span style="text-decoration: underline;">only</span> <span style="text-decoration: underline;">after</span> finishing your configuration.</p>
<h3>Understanding EtherChannel negotiation and port mode</h3>
<p>EtherChannel ports can use two protocols for EtherChannel negotiation: either the Cisco-proprietary PAgP or LACP (IEEE 802.3ad). I generally prefer using accepted cross-brand standards (see HA golden rule 3 above) , so we&#8217;ll use LACP here as well. When setting an EtherChannel mode in a Cisco switch, your choices are &#8216;on&#8217;, &#8216;off&#8217;, &#8216;active&#8217;, &#8216;passive&#8217;, &#8216;desirable&#8217; or &#8216;auto&#8217;. Each mode setting forces a particular negotiation protocol and behaviour as such:</p>
<table border="0">
<tbody>
<tr>
<td><strong>Mode</strong></td>
<td><strong>Negotiation</strong></td>
<td><strong>Operation</strong></td>
</tr>
<tr>
<td>on</td>
<td>None</td>
<td>Enables EtherChannel, does not negotiate</td>
</tr>
<tr>
<td>off</td>
<td>None</td>
<td>Disables EtherChannel</td>
</tr>
<tr>
<td>active</td>
<td>LACP</td>
<td>Initiates negotiation to enable EtherChannel</td>
</tr>
<tr>
<td>passive</td>
<td>LACP</td>
<td>Responds to received negotiation requests</td>
</tr>
<tr>
<td>desirable</td>
<td>PAgP</td>
<td>Initiates negotiation to enable EtherChannel</td>
</tr>
<tr>
<td>auto</td>
<td>PAgP</td>
<td>Responds to received negotiation requests</td>
</tr>
</tbody>
</table>
<p>I shall not bore you with the pros and cons of using negotiation vs. fixed configuration, you will have to decide for yourself here whether you&#8217;ll use <strong>on</strong> or <strong>active</strong> mode. In this example I&#8217;ll be using <strong>active</strong> mode.</p>
<h3>Configuring the switch</h3>
<p>As an EtherChannel uses multiple ports, you will have to repeat these steps for all ports you wish to couple in this channel.</p>
<p>1. Set the port to switchport mode (optional, only necessary on L2/L3 switches):</p>
<pre>asp-lsw-01(config)#<strong>int Gi1/5</strong>
asp-lsw-01(config-if)#<strong>switchport</strong></pre>
<p>2. If you&#8217;re using VLANs, set the port to access mode for the correct VLAN (I&#8217;m using VLAN 2 in this example):</p>
<pre>asp-lsw-01(config-if)#<strong>switchport access vlan 2</strong>
asp-lsw-01(config-if)#<strong>switchport mode access</strong></pre>
<p>3. As this ports connects to a server directly (as opposed to a part of the network infrastructure such as another switch) you can enable portfast, thus shortening the time the port takes to become active. <span style="text-decoration: underline;">Never</span> <span style="text-decoration: underline;">ever</span> enable portfast on ports connected to other switches etc.</p>
<pre>asp-lsw-01(config-if)#<strong>spanning-tree portfast</strong>
%Warning: portfast should only be enabled on ports connected to
a single host. Connecting hubs, concentrators, switches, bridges,
etc... to this interface  when portfast is enabled, can cause
temporary bridging loops. Use with CAUTION</pre>
<pre>%Portfast has been configured on GigabitEthernet1/5 but will
only have effect when the interface is in a non-trunking mode.</pre>
<p>4. Configure the port for EtherChannel using the mode you chose earlier. Make sure you use an unused channel group number.</p>
<pre>asp-lsw-01(config-if)#<strong>channel-group 1 mode active</strong>
Creating a port-channel interface Port-channel 1</pre>
<p>This concludes the configuration of the switch port (don&#8217;t forget to perform these steps on all ports that have to be linked in the EtherChannel!).</p>
<h3>Configuring the server</h3>
<p>As we&#8217;re using an HP ProLiant server we can configure the EtherChannel using the HP Network Configuration Utility. Other brands and types will have their own drivers and software to get this done. One thing to keep in mind is that the NIC software may not call the setup &#8220;EtherChannel&#8221; but may use other terms like &#8220;Teaming&#8221; (which is what HP calls it).</p>
<p>1. Start the HP Network Configuration Utility (from the task bar of the Start menu):</p>
<p><img class="alignnone" title="screenshot 1" src="/upload/etherchannel/ios_etherchannel_01.gif" alt="" width="575" height="410" /></p>
<p>2. Select both listed NICs and click the &#8216;Team&#8217; button. This will immediately create the team:</p>
<p><img class="alignnone" title="screenshot 2" src="/upload/etherchannel/ios_etherchannel_02.gif" alt="" width="575" height="410" /></p>
<p>3. Select the team and click the &#8216;Properties&#8217; button:</p>
<p><img class="alignnone" title="screenshot 3" src="/upload/etherchannel/ios_etherchannel_03.gif" alt="" width="575" height="410" /></p>
<p>4. Pick the appropriate Team Type Selection, in our case &#8220;802.3ad&#8221; (which is the IEEE standard number for LACP):</p>
<p><img class="alignnone" title="screenshot 4" src="/upload/etherchannel/ios_etherchannel_04.gif" alt="" width="575" height="437" /></p>
<p>5. Choose the Transmit Load Balancing Method from the next drop-down list, and click &#8216;Ok&#8217; after you&#8217;ve made your selection.</p>
<p>6. Apply the configuration, after which the server will want to reboot. After the reboot, go back to the HP Network Configuration Utility to check that the Teaming is functioning as expected (i.e.: showing a green icon).</p>
<p>If all went well you should now have a new network adapter in your Windows network configuration. This is the adapter you will use to configure the network from now on (i.e.: IP address, file and printer sharing, etc.).</p>
<h3>More, more, more&#8230;</h3>
<p>Now that you have an EtherChannel link to your switch, ponder in this: what if the switch fails? You would in fact still lose connectivity to the server. Yowsa. Remember HA golden rule number 1: No single points of failure. You could actually create two EtherChannels (so using four network cables in total), each to a separate but interconnected switch, thus ensuring that even a switch failure wouldn&#8217;t kill the traffic to your server. If both switches are configured properly STP (Spanning Tree Protocol) will disable one of the EtherChannels while the primary is active, but will fail over to the second link if the first one dies.<br />
How far are you willing to go for HA?</p>
<h3>CatOS: a slightly different approach</h3>
<p>If your Cisco switch happens to be running CatOS, the EtherChannel modes and the commands to configure the switch ports are somewhat different. The modes are:</p>
<table border="0">
<tbody>
<tr>
<td><strong>Mode</strong></td>
<td><strong>Operation</strong></td>
</tr>
<tr>
<td>on</td>
<td>Enables EtherChannel, does not negotiate</td>
</tr>
<tr>
<td>off</td>
<td>Disables EtherChannel</td>
</tr>
<tr>
<td>desirable</td>
<td>Initiates negotiation to enable EtherChannel</td>
</tr>
<tr>
<td>auto</td>
<td>Responds to received negotiation requests</td>
</tr>
</tbody>
</table>
<p>Using the same example as before the commands on CatOS would be:</p>
<p>1. assign the ports to the correct VLAN (VLAN 2 in this example, being set on ports 5/1 and 5/2 (as CatOS works with port sets)):</p>
<pre>old-sw-01 (enable)<strong>set vlan 2 5/1-2
</strong>old-sw-01 (enable)<strong>set trunk 5/1-2 off</strong></pre>
<p>2. Enable portfast (optional):</p>
<pre>old-sw-01 (enable)<strong>set spantree portfast 5/1-2 enable</strong></pre>
<p>3. Enable EtherChannel on the port set:</p>
<pre>old-sw-01 (enable)<strong>set port channel 5/1-2 mode on</strong></pre>
<p>4. Set the load distribution method:</p>
<pre>old-sw-01 (enable)<strong>set port channel all distribution mac source</strong></pre>
<p>This concludes the configuration of the switch ports, as you can see you don&#8217;t need to repeat these steps on CatOS as you&#8217;ve just configured both ports in the set in one go.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kathmann.com/2008/07/21/using-etherchannel-for-high-availability-on-cisco-switches/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>How bots can kill a server</title>
		<link>http://www.kathmann.com/2008/04/13/how-bots-can-kill-a-server/</link>
		<comments>http://www.kathmann.com/2008/04/13/how-bots-can-kill-a-server/#comments</comments>
		<pubDate>Sun, 13 Apr 2008 22:47:49 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[ict / computers]]></category>
		<category><![CDATA[robots]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[standards]]></category>

		<guid isPermaLink="false">http://www.kathmann.com/?p=27</guid>
		<description><![CDATA[I&#8217;m running a pretty friendly little (LAMP) server here, hosting domains, email and web sites for friends and my own little side projects. Some sites are straight-up HTML and some are dynamic PHP sites, running WordPress or Joomla. Last week I noticed a major dip in the server&#8217;s performance, which got worse and worse nearing [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m running a pretty friendly little (<a title="LAMP @ Wikipedia" href="http://en.wikipedia.org/wiki/LAMP_(software_bundle)" target="_blank">LAMP</a>) server here, hosting domains, email and web sites for friends and my own little side projects. Some sites are straight-up HTML and some are dynamic PHP sites, running WordPress or Joomla.</p>
<p>Last week I noticed a major dip in the server&#8217;s performance, which got worse and worse nearing the weekend. A quick scan revealed that my Apache processes were taking up around 90 &#8211; 95% of the CPU capacity with no real direct sign of the offending site. It took my 30 minutes to write and run a script that disabled the hosted sites one by one and then checked the CPU results. The &#8216;culprit&#8217; appeared to be <a title="moqub.com" href="http://www.moqub.com" target="_blank">moqub.com</a>, a (Dutch) blog run my a friend of mine with a steady following of readers.</p>
<p>As I had recently upgraded her WordPress to version 2.5 my first suspicion was that the new software was messing up my server&#8230;but then again my own site also runs WordPress 2.5, and if I put some stress on this blog the CPU was still quietly ticking over, not stressing out as with her site. But still&#8230;her WordPress was the result of upgrade upon upgrade, each version having been added on to with lots of plugins, so I just couldn&#8217;t be sure. I set up a fresh site on the server, did a clean WordPress 2.5 install, imported Moqub&#8217;s posts, comment and links, added the theme (after verifying its 2.5 compatibility) and diverted the visitors to the new site. Hey presto, the CPU was back up to 90% again, even when I disabled all customisations and the extra theme. Yikes.</p>
<p>As I now knew that the problem was not with WordPress itself, I started digging around in the logs. I found that there was an extraordinary amount of requests from a single IP address, identifying itself as a &#8220;Microsoft Search Bot 4.0&#8243;. Well, that should be easy to fix: I built a custom <a title="Some info on robots.txt" href="http://www.robotstxt.org/" target="_blank">robots.txt</a> that should have shushed all robot traffic except for GoogleBot, but to no avail. The bot never even tried to read the text file, it just went straight for the content, running several threads at once at high speed and thus maxing out the CPU.<br />
A little research showed the IP address belonged to the <a title="...the culprits..." href="http://www.biblionetdrenthe.nl/" target="_blank">Provincial Central Library in Drenthe</a> (a province in the east of The Netherlands). This was no coincidence as Moqub writes about libraries and the use of information systems in them. Still, as their robot misbehaved I had no alternative but to completely block the IP address the robot was originating from. Ahh&#8230;peace and quiet on the server at last.</p>
<p>Now the question bugs me: why do robots still misbehave and completely ignore the <em>robots.txt</em> file, accepted (as far as I know) as the de facto standard in blocking or guiding robot traffic? And this was no home-brew, this was a Microsoft robot. Am I just being silly and naive in expecting &#8220;professional&#8221; software to behave according to the rules?</p>
<p>The lesson for me here was that badly run scripts can really mess up your server, especially if they decide to dig in to dynamically generated pages. And there really is not a whole lot you can do about it if they decide to completely ignore the standards in place.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kathmann.com/2008/04/13/how-bots-can-kill-a-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

