<?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>engin aydogan</title>
	<atom:link href="http://engin.bzzzt.biz/feed/" rel="self" type="application/rss+xml" />
	<link>http://engin.bzzzt.biz</link>
	<description>&#039;s journal</description>
	<lastBuildDate>Fri, 09 Mar 2012 20:56:52 +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>Making multiple VPN connections and using them at the same time</title>
		<link>http://engin.bzzzt.biz/2012/03/09/making-multiple-vpn-connections-and-using-them-at-the-same-time/</link>
		<comments>http://engin.bzzzt.biz/2012/03/09/making-multiple-vpn-connections-and-using-them-at-the-same-time/#comments</comments>
		<pubDate>Fri, 09 Mar 2012 20:56:52 +0000</pubDate>
		<dc:creator>engin</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://engin.bzzzt.biz/?p=549</guid>
		<description><![CDATA[As I figured how to make certain clients on LAN to use a VPN, I was a bit unsatisfied with the performance of the VPN connection (read: low transfer rates). Then I remembered that we can add multiple routes (explained here). Which means one connection a client makes are routed via VPN0, the other  [...]]]></description>
			<content:encoded><![CDATA[<p>As I figured <a href="http://engin.bzzzt.biz/2012/03/09/making-certain-clients-on-lan-use-a-particular-vpn-connection-with-mikrotik/">how to make certain clients on LAN to use a VPN</a>, I was a bit unsatisfied with the performance of the VPN connection (read: low transfer rates). Then I remembered that we can add multiple routes (<a href="http://www.mikrotik.com/testdocs/ros/2.9/ip/route.php">explained here</a>). Which means one connection a client makes are routed via VPN0, the other one is routed from VPN1. Hell, you can even add same VPN again and again so that it is used more often.</p>
<p>So as an addition to my previous post, you can simple add more VPN connections in interfaces. Then at the same routing rule, you can add all those VPN connection as gateways. It looks like this:</p>
<pre>[admin@MikroTik] &gt; ip route print
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 A S  0.0.0.0/0                          pptp-out2          1
                                           pptp-out1
                                           pptp-out3</pre>
<p>It is the rule that matches the packets with route-mark, I added more gateways to it. Now when a connection is made, it is routed via one of these.</p>
<p>Now, you can use all the cumulative bandwidth all these servers allocated for you.</p>
<p>Though, I couldn&#8217;t make burst of multiple connection attempts distributed over these gateways yet. Which means, if a client opens many connections rapidly, they are all routed from one gateway. If I can figure this out,  a segmented downloading for instance, would be MUCH faster with many VPN servers utilized.</p>
]]></content:encoded>
			<wfw:commentRss>http://engin.bzzzt.biz/2012/03/09/making-multiple-vpn-connections-and-using-them-at-the-same-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making certain clients on LAN use a particular VPN connection with Mikrotik</title>
		<link>http://engin.bzzzt.biz/2012/03/09/making-certain-clients-on-lan-use-a-particular-vpn-connection-with-mikrotik/</link>
		<comments>http://engin.bzzzt.biz/2012/03/09/making-certain-clients-on-lan-use-a-particular-vpn-connection-with-mikrotik/#comments</comments>
		<pubDate>Fri, 09 Mar 2012 19:15:35 +0000</pubDate>
		<dc:creator>engin</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://engin.bzzzt.biz/?p=542</guid>
		<description><![CDATA[Today, I received my RB-750GL from (kablosuzmarket.com) within 24h of my purchase, kudos for the excellent service. Rushed home to use this beast.
I had this idea for some time. To make certain devices on the LAN (i.e. Apple TV) to use a VPN connection so they appear to be from US (or whever the  [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I received my RB-750GL from (<a href="http://www.kablosuzmarket.com">kablosuzmarket.com</a>) within 24h of my purchase, kudos for the excellent service. Rushed home to use this beast.</p>
<p>I had this idea for some time. To make certain devices on the LAN (i.e. Apple TV) to use a VPN connection so they appear to be from US (or whever the VPN server is). With Mikrotik it took just about half an hour to figure out how to do this.</p>
<p>1. Add your VPN connection into interface. In my case, I needed PPTP Client. Make sure it&#8217;s connected successfully.</p>
<pre>
[admin@MikroTik] /interface> print
Flags: D - dynamic, X - disabled, R - running, S - slave
 #     NAME                                          TYPE             MTU   L2MTU
 0  R  ether1-gateway                                ether            1500  1598
 1  R  ether2-local-master                           ether            1500  1598
 2  R  ether3-local-slave                            ether            1500  1598
 3     ether4-local-slave                            ether            1500  1598
 4     ether5-local-slave                            ether            1500  1598
 5  R  pppoe-out1                                    pppoe-out        1480
 6  R  pptp-out1                                     pptp-out         1404
</pre>
<p>Last one is my VPN connection.<br />
2. Prepare the address list of the devices you want to use this new VPN connection.</p>
<pre>
[admin@MikroTik] /ip firewall address-list> print
Flags: X - disabled, D - dynamic
 #   LIST                                         ADDRESS
 0   usvpn-addrlist                               192.168.1.104
 1   usvpn-addrlist                               192.168.1.254
</pre>
<p>3. Add firewall rules to mark-route packets from this address list. I&#8217;ve marked them as &#8220;usvpn&#8221;.</p>
<pre>
[admin@MikroTik] /ip firewall mangle> print
Flags: X - disabled, I - invalid, D - dynamic
 0   chain=prerouting action=mark-routing new-routing-mark=usvpn passthrough=yes src-address-list=usvpn-addrlist
</pre>
<p>4. Now, route packets marked with &#8220;usvpn&#8221; route-mark via pptp1 interface.</p>
<pre>
[admin@MikroTik] > ip route print
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 A S  0.0.0.0/0                          pptp-out1          1
 1 ADS  0.0.0.0/0                          78.171.192.1       1
 2 ADC  10.10.0.1/32       10.10.0.2       pptp-out1          0
 3 ADC  10.10.2.1/32       10.10.43.56     pppoe-out1         0
 4 ADC  192.168.1.0/24     192.168.1.1     ether2-local-ma... 0
</pre>
<p>The details are not visible in this print. When adding new route, just select the Gateway (pptp1) and Routing Mark (usvpn).</p>
<p>Now test if your devices are out in the US :)</p>
]]></content:encoded>
			<wfw:commentRss>http://engin.bzzzt.biz/2012/03/09/making-certain-clients-on-lan-use-a-particular-vpn-connection-with-mikrotik/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows, PHP, cURL SSL certificate problem.</title>
		<link>http://engin.bzzzt.biz/2012/02/02/windows-php-curl-ssl-certificate-problem/</link>
		<comments>http://engin.bzzzt.biz/2012/02/02/windows-php-curl-ssl-certificate-problem/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 21:22:31 +0000</pubDate>
		<dc:creator>engin</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://engin.bzzzt.biz/?p=538</guid>
		<description><![CDATA[When you use a library that wraps an API (Facebook PHP SDK, AWS PHP SDK) usage, it often boils down to cURL in the core. These libraries often want to communicate over SSL by default. So, any call you make on these libraries involves a cURL request over a SSL connection. The problem with this is  [...]]]></description>
			<content:encoded><![CDATA[<p>When you use a library that wraps an API (Facebook PHP SDK, AWS PHP SDK) usage, it often boils down to cURL in the core. These libraries often want to communicate over SSL by default. So, any call you make on these libraries involves a cURL request over a SSL connection. The problem with this is that cURL does not ship CA certificates bundle any more, so SSL certificates of the sites the requests are addressed to cannot be verified.</p>
<p>For instance, with AWS PHP SDK, you&#8217;ll get the following error if your cURL setup is not fixed:</p>
<pre><strong>Fatal error</strong>: Uncaught exception 'cURL_Exception' with message 'cURL resource: Resource id #10; cURL error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (cURL error code 60). See http://curl.haxx.se/libcurl/c/libcurl-errors.html for an explanation of error codes.' in C:\Users\Engin\Code\PHP\unuttumbile\AWSSDKforPHP\lib\requestcore\requestcore.class.php:824
Stack trace:
#0 C:\Users\Engin\Code\PHP\unuttumbile\AWSSDKforPHP\services\s3.class.php(895): RequestCore-&gt;send_request()
#1 C:\Users\Engin\Code\PHP\unuttumbile\AWSSDKforPHP\services\s3.class.php(1125): AmazonS3-&gt;authenticate('php-sdk-getting...', Array)
#2 C:\Users\Engin\Code\PHP\unuttumbile\AWSSDKforPHP\_samples\cli-s3_get_urls_for_uploads.php(60): AmazonS3-&gt;create_bucket('php-sdk-getting...', 's3-us-west-1.am...')
#3 {main}
thrown in <strong>C:\Users\Engin\Code\PHP\unuttumbile\AWSSDKforPHP\lib\requestcore\requestcore.class.php</strong> on line <strong>824</strong></pre>
<p>cURL explains the situation in depth <a href="http://curl.haxx.se/docs/sslcerts.html">here</a>.</p>
<p>2 step easy <strong>solution</strong>:</p>
<div>
<ol>
<li><span style="line-height: normal;">Generate CA bundle yourself via scripts provided by cURL. Either via <a href="https://raw.github.com/bagder/curl/master/lib/mk-ca-bundle.pl">mk-ca-bundle.pl</a> (PERL) or <a href="https://raw.github.com/bagder/curl/master/lib/mk-ca-bundle.vbs">mk-ca-bundle.vbs</a> (Windows Shell). Then copy it to c:\Windows just for convenience.</span>
<pre>Engin@Engin-VAIO ~
$ perl mk-ca-bundle.pl
Downloading 'certdata.txt' ...
Processing  'certdata.txt' ...
Done (137 CA certs processed, 32 untrusted skipped).

Engin@Engin-VAIO ~
$ cp ca-bundle.crt /cygdrive/c/Windows/ -vf
`ca-bundle.crt' -&gt; `/cygdrive/c/Windows/ca-bundle.crt'</pre>
</li>
<li><span style="line-height: normal;">Then add the following line in your php.ini&#8217;s [PHP] section. Note that this configuration option is available since PHP 5.3.7. See <a href="http://www.php.net/manual/en/curl.configuration.php">not so very detailed info</a>.</span>
<pre>[PHP]
curl.cainfo = c:\windows\ca-bundle.crt</pre>
</li>
<li>Restart your HTTP server and you&#8217;re done.</li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://engin.bzzzt.biz/2012/02/02/windows-php-curl-ssl-certificate-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>9Gagtension &#8211; Facebook comment, message and chat trendy meme emoticons support</title>
		<link>http://engin.bzzzt.biz/2011/12/16/9gagtension-facebook-comment-message-and-chat-trendy-meme-emoticons-support/</link>
		<comments>http://engin.bzzzt.biz/2011/12/16/9gagtension-facebook-comment-message-and-chat-trendy-meme-emoticons-support/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 06:39:44 +0000</pubDate>
		<dc:creator>engin</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://engin.bzzzt.biz/?p=531</guid>
		<description><![CDATA[I noticed I was using quite some meme references in my Facebook comments such as :sweet jesus: or :mother of god:. So, yesterday evening, I put together an Chrome extension for this. Very simple.

List of memes and other information: http://engin.bzzzt.biz/9gagtension
Source code:  [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed I was using quite some meme references in my Facebook comments such as <b>:sweet jesus:</b> or <b>:mother of god:</b>. So, yesterday evening, I put together an Chrome extension for this. Very simple.</p>
<p><img class="aligncenter" src="9gagtension/screenshot2.jpg" alt="" /></p>
<p>List of memes and other information: <a href="http://engin.bzzzt.biz/9gagtension/">http://engin.bzzzt.biz/9gagtension</a></p>
<p>Source code: <a href="https://github.com/engina/9gagtension">https://github.com/engina/9gagtension</a></p>
<p>This is where you install: <a href="https://chrome.google.com/webstore/detail/adafadjkcdmlkijioppodjdkfknihkml">Chrome Extension Page</a></p>
]]></content:encoded>
			<wfw:commentRss>http://engin.bzzzt.biz/2011/12/16/9gagtension-facebook-comment-message-and-chat-trendy-meme-emoticons-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows routing problem: Network is unreachable</title>
		<link>http://engin.bzzzt.biz/2011/12/13/windows-routing-problem-network-is-unreachable/</link>
		<comments>http://engin.bzzzt.biz/2011/12/13/windows-routing-problem-network-is-unreachable/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 08:57:51 +0000</pubDate>
		<dc:creator>engin</dc:creator>
				<category><![CDATA[networks]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[routing]]></category>
		<category><![CDATA[self note]]></category>

		<guid isPermaLink="false">http://engin.bzzzt.biz/?p=521</guid>
		<description><![CDATA[I don&#8217;t know what got broken, or how did it get broken but IP connections on my interface which is using AUTO IP (169.254.0.0/16) stopped working all of a sudden.

$ nc  -nvvvv 169.254.2.206 23
(UNKNOWN) [169.254.2.206] 23 (?) : Network is unreachable
 sent 0, rcvd 0

When I explicitly bind to the  [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know what got broken, or how did it get broken but IP connections on my interface which is using AUTO IP (169.254.0.0/16) stopped working all of a sudden.</p>
<pre>
$ nc  -nvvvv 169.254.2.206 23
(UNKNOWN) [169.254.2.206] 23 (?) : Network is unreachable
 sent 0, rcvd 0
</pre>
<p>When I explicitly bind to the correct interface it worked.</p>
<pre>
$ nc -s 169.254.46.68 -nvvvv 169.254.2.206 23
(UNKNOWN) [169.254.2.206] 23 (?) open
Welcome to ENDA Administration Terminal
Password:
</pre>
<p>The fact that the error is returned immediately and the content of the error points out that it is a routing problem. So I checked my routing table.</p>
<pre>
$ route -4 print
===========================================================================
Interface List
 37...00 1f 1f ea 7f 52 ......150Mbps Wireless 802.11b/g/n Nano USB Adapter
 28...00 ff 2d 67 65 d4 ......TAP-Win32 Adapter V9
 10...00 1d ba 68 a5 ac ......Intel(R) 82567LM Gigabit Network Connection
  1...........................Software Loopback Interface 1
 12...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
 39...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
 26...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
 38...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0      192.168.1.1    192.168.1.104     25
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
    169.254.46.68  255.255.255.255         On-link     169.254.46.68    356
      192.168.1.0    255.255.255.0         On-link     192.168.1.104    281
    192.168.1.104  255.255.255.255         On-link     192.168.1.104    281
    192.168.1.255  255.255.255.255         On-link     192.168.1.104    281
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
        224.0.0.0        240.0.0.0         On-link     169.254.46.68    356
        224.0.0.0        240.0.0.0         On-link     192.168.1.104    281
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  255.255.255.255  255.255.255.255         On-link     169.254.46.68    356
  255.255.255.255  255.255.255.255         On-link     192.168.1.104    281
===========================================================================
Persistent Routes:
  Network Address          Netmask  Gateway Address  Metric
          0.0.0.0          0.0.0.0      192.168.1.1  Default
          0.0.0.0          0.0.0.0      192.168.1.1  Default
===========================================================================
</pre>
<p>Looks like the problem is</p>
<pre>
169.254.46.68  255.255.255.255         On-link     169.254.46.68    356
</pre>
<p>Netmask should have been 255.255.0.0, so that any 169.254.C.D would be carried on with this routing record. So I deleted the faulty line </p>
<pre>
route -4 delete 169.254.46.68
</pre>
<p>then issued </p>
<pre>
route -4 add 169.254.0.0 mask 255.255.0.0 0.0.0.0 metric 3 if 10
</pre>
<p>10 being my Ethernet adapter as can be seen on the top &#8220;route -4 print&#8221;. Tricky part for me was to get the gateway was &#8220;On-link&#8221; in the routing table, after a couple of tries I figured using &#8220;0.0.0.0&#8243; as the gateway just makes it &#8220;On-link&#8221;. After all, whole point of AUTO IP networks is that there&#8217;s no router present :)</p>
<p>
Now, it works, but after reboots these could be screwed up all over again (despite the fact that route has -p parameter). We&#8217;ll see.</p>
]]></content:encoded>
			<wfw:commentRss>http://engin.bzzzt.biz/2011/12/13/windows-routing-problem-network-is-unreachable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mikrotik RouterOS: How to track each user&#8217;s bandwidth usage ?</title>
		<link>http://engin.bzzzt.biz/2011/09/23/mikrotik-routeros-how-to-track-each-users-bandwidth-usage/</link>
		<comments>http://engin.bzzzt.biz/2011/09/23/mikrotik-routeros-how-to-track-each-users-bandwidth-usage/#comments</comments>
		<pubDate>Fri, 23 Sep 2011 14:36:53 +0000</pubDate>
		<dc:creator>engin</dc:creator>
				<category><![CDATA[networks]]></category>
		<category><![CDATA[mikrotik]]></category>
		<category><![CDATA[routeros]]></category>

		<guid isPermaLink="false">http://engin.bzzzt.biz/?p=509</guid>
		<description><![CDATA[There are many ways to keep an eye on your users with RouterOS. Two ways to track user bandwidth hoggers:

Use packet sniffer to collect a sample (about a few minutes when there is problem), then examine the data in Connections and Hosts tab.

Pros

Does not consume resources all the  [...]]]></description>
			<content:encoded><![CDATA[<p>There are many ways to keep an eye on your users with RouterOS. Two ways to track user bandwidth hoggers:</p>
<ol>
<li><span class="Apple-style-span" style="line-height: 18px;">Use packet sniffer to collect a sample (about a few minutes when there is problem), then examine the data in Connections and Hosts tab.</span></li>
<ol>
<li><span class="Apple-style-span" style="line-height: 18px;">Pros</span></li>
<ol>
<li><span class="Apple-style-span" style="line-height: 18px;">Does not consume resources all the time</span></li>
</ol>
<li><span class="Apple-style-span" style="line-height: 18px;">Cons</span></li>
<ol>
<li><span class="Apple-style-span" style="line-height: 18px;">Not convenient, you have to do a few clicks and wait for some time to see the result.</span></li>
<li><span class="Apple-style-span" style="line-height: 18px;">You cannot directly act upon the hogger.</span></li>
</ol>
</ol>
<li><span class="Apple-style-span" style="line-height: 18px;">Use Firewall rules to match packets for each host and add rate column.</span></li>
<ol>
<li><span class="Apple-style-span" style="line-height: 18px;">Pros</span></li>
<ol>
<li><span class="Apple-style-span" style="line-height: 18px;">You can see bandwidth usage of each IP on your network in real time</span></li>
<li><span class="Apple-style-span" style="line-height: 18px;">You can act upon any user and enforce bandwidth limits</span></li>
</ol>
<li><span class="Apple-style-span" style="line-height: 18px;">Cons</span></li>
<ol>
<li><span class="Apple-style-span" style="line-height: 18px;">I&#8217;ve added ~250 rules to match the traffic for each IP and it caused around ~15% CPU overhead on 300MHz CPU.</span></li>
</ol>
</ol>
</ol>
<div><span class="Apple-style-span" style="line-height: 18px;">As for making all the rules for the firewall. Obviously, I won&#8217;t enter those rules by hand, thanks to Mikrotik&#8217;s shell it is very easy:</span></div>
<pre>:for i from=2 to=254 do={/ip firewall filter add chain=forward dst-address="193.168.1.$i" action=passthrough}</pre>
<p>Passthrough means &#8220;do nothing&#8221;. We just use the rule to match the packets to each IP then we make use of the rule statistics to get the information we want.</p>
]]></content:encoded>
			<wfw:commentRss>http://engin.bzzzt.biz/2011/09/23/mikrotik-routeros-how-to-track-each-users-bandwidth-usage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mysterious performance problems with your good old network</title>
		<link>http://engin.bzzzt.biz/2011/09/23/mysterious-performance-problems-with-your-good-old-network/</link>
		<comments>http://engin.bzzzt.biz/2011/09/23/mysterious-performance-problems-with-your-good-old-network/#comments</comments>
		<pubDate>Fri, 23 Sep 2011 14:24:59 +0000</pubDate>
		<dc:creator>engin</dc:creator>
				<category><![CDATA[networks]]></category>

		<guid isPermaLink="false">http://engin.bzzzt.biz/?p=501</guid>
		<description><![CDATA[Even though we haven&#8217;t changed our network infrastructure for quite some time we started to have network performance problems. Eventually, the network started to stop working from time to time. Router stopped handing out DHCP leases and sometimes freeze all of a sudden.
Not only this, but the  [...]]]></description>
			<content:encoded><![CDATA[<p>Even though we haven&#8217;t changed our network infrastructure for quite some time we started to have network performance problems. Eventually, the network started to stop working from time to time. Router stopped handing out DHCP leases and sometimes freeze all of a sudden.</p>
<p>Not only this, but the networked device which we are developing also started to suffer severely from network problems. The performance was so bad, we couldn&#8217;t connect to it over LAN and even if we did, it was a very fragile connection.</p>
<p>We have changed many ADSL Modem routers that you could find on your computer hardware store. None of them could handle it.</p>
<p>Lately, we bought a Mikrotik RB/450. It is a tiny box with 300 MHz CPU and 64MB RAM. With RouterOS installed on it, which is a Linux based solution. I put our ADSL Modem in Bridge Mode, than used the PPPoE client on the RouterOS to connect to the internet. This way, there is basically no load on the ADSL Modem. And voila! Network is performing fantastically.</p>
<p>Couple of observations:</p>
<ol>
<li><span class="Apple-style-span" style="line-height: 18px;">With around 30 active clients, you get 250-600 active connections in NAT table at any given time. </span></li>
<li><span class="Apple-style-span" style="line-height: 18px;">Our monthly bandwidth usage is around 190 GB</span></li>
</ol>
<div><span style="font-size: medium;"><strong><span class="Apple-style-span" style="line-height: 18px;">But why did this started to happen now ?</span></strong></span></div>
<p>The reason the routers started falling is probably the evolving technology and internet using habits of users. Browsers are using more and more connections and users are opening more and more tabs. There <a href="http://www.smallnetbuilder.com/index.php?option=com_chart&amp;Itemid=&amp;chart=124">this</a> web site which claims listing how many simultaneous connections can a router handle. I haven&#8217;t checked reliability of their measurement methods but if we assume the list is accurate, you&#8217;d see there are plenty of routers that can&#8217;t handle 250 connections (which is our minimum).</p>
<p>I&#8217;m extremely pleased with the Mikrotik RB/450 and I recommended it to any SOHO.</p>
<p>The performance problem of our networked devices is another story however. Since, our PCs and devices are connected to the same switch, our connection does not even require a router to orchestrate the packets. Only problem a router could cause trouble for us is the DHCP problem, which can be worked around with assigning static IPs.</p>
<p>However, I started to get suspicious about all the broadcast traffic new Windows versions was generating lately. Then, I did some experiments with our networked device which was having serious network problems, I noticed that it works as expected when</p>
<ol>
<li><span class="Apple-style-span" style="line-height: 18px;">It is directly connected to the PC</span></li>
<li><span class="Apple-style-span" style="line-height: 18px;">Only the device and the PC was connected to a switch &#8212; and nothing else is connected to the switch.</span></li>
</ol>
<div><span class="Apple-style-span" style="line-height: 18px;">When I plug the company LAN to the switch the device started performing poorly again because it tried to check if all those broadcast messages was actually something useful or not. The problem is, there&#8217;s no hardware filtering available on the device. As an additional challenge, hardware buffer of the Ethernet is implemented as a FIFO, so I can&#8217;t read arbitrary points in the buffer. So, I have to copy the whole hardware buffer to user space before I can actually filter on it. Filtering is easy and not a problem but copying the data is. I&#8217;ll see if I can optimize this in the near future.</span></div>
<div></div>
<div></div>
<div>Moral of the day, new protocols that use broadcasting aggressively are not good network citizens.</div>
]]></content:encoded>
			<wfw:commentRss>http://engin.bzzzt.biz/2011/09/23/mysterious-performance-problems-with-your-good-old-network/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>uIP 1.0 for Windows</title>
		<link>http://engin.bzzzt.biz/2011/07/12/uip-1-0-for-windows/</link>
		<comments>http://engin.bzzzt.biz/2011/07/12/uip-1-0-for-windows/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 09:34:56 +0000</pubDate>
		<dc:creator>engin</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[stuff i coded]]></category>
		<category><![CDATA[uip]]></category>

		<guid isPermaLink="false">http://engin.bzzzt.biz/?p=488</guid>
		<description><![CDATA[Thanks to some other guy&#8217;s (Higepon, I assume) efforts (whom site is now offline), I got uIP-1.0 to run on my Windows 7. You can see and get the code yourself https://github.com/engina/uip-1.0-win
Engin@Engin-VAIO ~/Code/uip-1.0-win/x86-gcc
$ ./uip
0 - (TAP-Win32 Adapter V9)
          [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to some other guy&#8217;s (<a href="http://higepon.monaos.org/moin.py/Higepon">Higepon</a>, I assume) efforts (whom site is now offline), I got uIP-1.0 to run on my Windows 7. You can see and get the code yourself <a href="https://github.com/engina/uip-1.0-win">https://github.com/engina/uip-1.0-win</a></p>
<pre>Engin@Engin-VAIO ~/Code/uip-1.0-win/x86-gcc
$ ./uip
0 - (TAP-Win32 Adapter V9)
         fe80::b89d:19c6:5f43:ec4e%32 [0]
         0.0.0.0 [0]
1 - (VMware Virtual Ethernet Adapter)
         fe80::b98e:1fe8:9121:d0f2%24 [0]
         192.168.67.1 [0]
2 - (Microsoft)
         fe80::b4cb:2e7f:d890:9004%21 [0]
         0.0.0.0 [0]
3 - (Microsoft)
         192.168.1.223 [0]
4 - (Microsoft)
         fe80::cd43:876e:3b0b:5b79%14 [0]
         0.0.0.0 [0]
5 - (Microsoft)
         fe80::2daf:5bd7:5b32:618e%15 [0]
         192.168.1.111 [0]
6 - (VMware Virtual Ethernet Adapter)
         fe80::5431:7f2f:1920:632c%23 [0]
         192.168.9.1 [0]
7 - (Intel(R) 82567LM Gigabit Network Connection)
         fe80::5872:faab:8d21:2e44%10 [0]
         192.168.1.142 [0]
Choose:</pre>
<p>This is useful as a debugging aid, a reference implementation and rapid development.</p>
]]></content:encoded>
			<wfw:commentRss>http://engin.bzzzt.biz/2011/07/12/uip-1-0-for-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Importing something of a bit of a value for personal use in Turkey — part 3 finale</title>
		<link>http://engin.bzzzt.biz/2011/04/07/importing-something-of-a-bit-of-a-value-for-personal-use-in-turkey-%e2%80%94-part-3-finale/</link>
		<comments>http://engin.bzzzt.biz/2011/04/07/importing-something-of-a-bit-of-a-value-for-personal-use-in-turkey-%e2%80%94-part-3-finale/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 06:28:22 +0000</pubDate>
		<dc:creator>engin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://engin.bzzzt.biz/?p=479</guid>
		<description><![CDATA[In the third installment of the series :) I have managed to get my package in my third visit to customs. This time everything took 2 hours I paid another €23 (for storage I think). OK, it boils down to this;
1. Ordered items cost: € 524.97
2. Tax paid here %18, €94,49
3. Total distance traveled to  [...]]]></description>
			<content:encoded><![CDATA[<p>In the third installment of the series :) I have managed to get my package in my third visit to customs. This time everything took 2 hours I paid another €23 (for storage I think). OK, it boils down to this;</p>
<p>1. Ordered items cost: € 524.97<br />
2. Tax paid here %18, €94,49<br />
3. Total distance traveled to get it: ~400km which costs €100 for me here.<br />
4. Another €23 (for storage I assume)<br />
5. Other expenses €20 (see <a href="http://engin.bzzzt.biz/2011/04/02/importing-something-of-a-bit-of-a-value-for-personal-use-in-turkey-part-2/">part 2</a>)</p>
<p><strong>Conclusion</strong>:</p>
<p>Ordered item: €524<br />
Total expenses: €237 (%45 of item cost)</p>
<p>Anyway, I got all my stuff, including two sets of 8G RAM (one set for my vaio, one set for my macbook) and a C300 256G SSD.</p>
<p>I must tell you that, at first I was not impressed with the performance of SSD when I directly cloned my original hard disk to it. It was noticeably faster but not in a pants-dropping way.</p>
<p>Then, I&#8217;ve installed Windows 7 on it. I must say that it is quite fast, i.e. it cold starts Adobe Fireworks in 3 seconds, and hot starts in 1 second. Of course these are not scientific measurements, as I don&#8217;t care about those very much either. The perceived speed determines the user experience. So far, it is quite good. Very snappy. We can attribute some of these perforamnce increase to MS technologies such as pre-fetch and superfetch. Oh well&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://engin.bzzzt.biz/2011/04/07/importing-something-of-a-bit-of-a-value-for-personal-use-in-turkey-%e2%80%94-part-3-finale/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Workbench fetching&#8230; problem solved</title>
		<link>http://engin.bzzzt.biz/2011/04/06/mysql-workbench-fetching-problem-solved/</link>
		<comments>http://engin.bzzzt.biz/2011/04/06/mysql-workbench-fetching-problem-solved/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 20:55:22 +0000</pubDate>
		<dc:creator>engin</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://engin.bzzzt.biz/?p=473</guid>
		<description><![CDATA[In my previous post about Restoring MySQL Databases from an HDD Image I&#8217;ve talked about restoring previous a MySQL development environment from a backup. First of all, there&#8217;s a documentation about it, which admittedly I haven&#8217;t read. I have simply copied @@datadir and my applications apparently  [...]]]></description>
			<content:encoded><![CDATA[<p>In my previous post about <a title="Restoring MySQL Databases from an HDD Image" href="http://engin.bzzzt.biz/2011/03/31/restoring-mysql-databases-from-an-hdd-image/">Restoring MySQL Databases from an HDD Image</a> I&#8217;ve talked about restoring previous a MySQL development environment from a backup. First of all, there&#8217;s a <a title="InnoDB Backup" href="http://dev.mysql.com/doc/refman/5.0/en/innodb-backup.html">documentation</a> about it, which admittedly I haven&#8217;t read. I have simply copied @@datadir and my applications apparently worked fine but Workbench didn&#8217;t like it very much. Whenever I tried to expand database tables it kept telling me &#8220;Fetching&#8230;&#8221;. I checked the error logs and it looks something like this:</p>
<pre>110406 23:09:00 [Note] Plugin 'FEDERATED' is disabled.
110406 23:09:00 InnoDB: The InnoDB memory heap is disabled
110406 23:09:00 InnoDB: Mutexes and rw_locks use Windows interlocked functions
110406 23:09:00 InnoDB: Compressed tables use zlib 1.2.3
110406 23:09:01 InnoDB: Initializing buffer pool, size = 128.0M
110406 23:09:01 InnoDB: Completed initialization of buffer pool
110406 23:09:01 InnoDB: highest supported file format is Barracuda.
110406 23:09:01  InnoDB: Waiting for the background threads to start
110406 23:09:02 InnoDB: 1.1.5 started; log sequence number 3061735
110406 23:09:02 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
110406 23:09:02 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
110406 23:09:02 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
110406 23:09:02 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
110406 23:09:02 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
110406 23:09:02 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
110406 23:09:02 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
110406 23:09:02 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
110406 23:09:02 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
110406 23:09:02 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
110406 23:09:02 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
110406 23:09:02 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
110406 23:09:02 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
110406 23:09:02 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
110406 23:09:02 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
110406 23:09:02 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
110406 23:09:02 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
110406 23:09:02 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
110406 23:09:02 [Note] Event Scheduler: Loaded 0 events
110406 23:09:02 [Note] C:\PROGRA~2\EASYPH~1.0\MySql\bin\mysqld.exe: ready for connections.
Version: '5.5.10-log'  socket: ''  port: 3306  MySQL Community Server (GPL)
110406 23:13:36 [ERROR] Incorrect definition of table mysql.proc: expected column 'comment' at position 15 to have type text, found type char(64).</pre>
<p>If you look careful enough you&#8217;ll <strong>see </strong><em><strong>please run mysql_upgrade to create it</strong></em> . So I&#8217;ve just did it and viola! It looks like fixed. Everything is working fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://engin.bzzzt.biz/2011/04/06/mysql-workbench-fetching-problem-solved/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

