{"id":1529,"date":"2012-12-22T12:49:37","date_gmt":"2012-12-22T11:49:37","guid":{"rendered":"http:\/\/kudzia.eu\/b\/?p=1529"},"modified":"2012-12-22T18:59:14","modified_gmt":"2012-12-22T17:59:14","slug":"raspberry-pi","status":"publish","type":"post","link":"https:\/\/kudzia.eu\/b\/2012\/12\/raspberry-pi\/","title":{"rendered":"raspberry pi"},"content":{"rendered":"<p>few days ago, after 19 weeks of waiting, i have finally received my <a href=\"http:\/\/raspberrypi.org\">raspberry pi<\/a>.<br \/>\n<!--more--><br \/>\n<a href=\"https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2012\/12\/IMG_8061.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2012\/12\/IMG_8061.jpg\" alt=\"my raspberry pi\" width=\"800\" height=\"429\" class=\"aligncenter size-full wp-image-1530\" srcset=\"https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2012\/12\/IMG_8061.jpg 800w, https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2012\/12\/IMG_8061-300x160.jpg 300w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p>raspbian feels incredibly familiar, after all it&#8217;s just debian. i&#8217;ve spent one evening trying the graphical part &#8211; checking different websites under midori [verdict: not really a desktop browsing experience, but good enough to connect it to 40&#8243; flat screen and render some dashboards]; xbmc media player did not work for me [yet], but omxplayer did.<\/p>\n<p>the next step &#8211; checking what use can i make of it in the networking world. one of potential use cases is <a href=\"http:\/\/en.wikipedia.org\/wiki\/One-armed_router\">router-on-a-stick<\/a> and <a href=\"http:\/\/openvpn.net\">openvpn<\/a> endpoint. <\/p>\n<p>i have connected raspberry [raspberrypi] and some old pc running linux [pqd] into the same lan and run unscientific test using wget. i got:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n2012-12-22 11:27:51 (11.2 MB\/s) - `\/dev\/null' saved &#x5B;94682416\/94682416]\r\n<\/pre>\n<p>89Mbit\/s for bulk traffic without encryption, that&#8217;s an order of magnitude more than i would transfer via it [having typical office router in mind attached to an ADSL line].<\/p>\n<p>test of available bidirectional traffic checked with iperf gave me ~89Mbit\/s down and ~30Mbit\/s up.<\/p>\n<p>i have configured openvpn to use simplest\/least secure preshared key and run the same test via the encrypted tunnel having following configs:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\npqd:~# cat \/etc\/openvpn\/server.conf\r\ndev tun3\r\nifconfig 10.8.0.1 10.8.0.2\r\nsecret static.key # key was generated by running openvpn --genkey --secret static.key\r\nport 2011\r\nproto udp\r\nroot@raspberrypi:\/home\/pi# cat \/etc\/openvpn\/client.conf\r\ndev tun3\r\nifconfig 10.8.0.2 10.8.0.1\r\nsecret static.key\r\nport 2011\r\nproto udp\r\nremote 10.0.0.1\r\n<\/pre>\n<p>downloading the same file but via the vpn:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n2012-12-22 11:39:45 (1.57 MB\/s) - `\/dev\/null' saved &#x5B;94682416\/94682416]\r\n<\/pre>\n<p>12.5Mbit\/s this time for bulk traffic via openvpn. let&#8217;s see what happens if we disable encryption by commenting out the secret line and adding:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ncipher none\r\nauth none\r\n<\/pre>\n<p>this time i got 24Mbit\/s. so the price of additional round-trip kernel->userland[openvpn]->kernel is quite high &#8211; 89-24=65Mbit\/s of the performance lost; encrypting the data gives additional hit of 11Mbit\/s.<\/p>\n<p>how about latency? pinging directly via ethernet gives me response times of ~0.5ms; via encrypted openvpn: 1.5ms; via unencrypted openvpn: ~1.2ms.<\/p>\n<p>while playing with different configuration i&#8217;ve found <a href=\"http:\/\/community.openvpn.net\/openvpn\/wiki\/Gigabit_Networks_Linux\">Optimizing performance on gigabit networks<\/a> article which goes much more into the details.<\/p>\n<p>i&#8217;ve also tested tagged vlans. it &#8216;just worked&#8217; &#8211; no surprises here.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>few days ago, after 19 weeks of waiting, i have finally received my raspberry pi.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[47],"class_list":["post-1529","post","type-post","status-publish","format-standard","hentry","category-tech","tag-linux-networking"],"_links":{"self":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/1529","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/comments?post=1529"}],"version-history":[{"count":9,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/1529\/revisions"}],"predecessor-version":[{"id":1539,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/1529\/revisions\/1539"}],"wp:attachment":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/media?parent=1529"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/categories?post=1529"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/tags?post=1529"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}