{"id":14,"date":"2008-05-11T11:43:16","date_gmt":"2008-05-11T16:43:16","guid":{"rendered":"http:\/\/bda.ath.cx\/blog\/?p=14"},"modified":"2010-06-26T22:23:25","modified_gmt":"2010-06-27T03:23:25","slug":"firewire-networking-in-linux","status":"publish","type":"post","link":"http:\/\/bda.ath.cx\/blog\/2008\/05\/11\/firewire-networking-in-linux\/","title":{"rendered":"Firewire Networking in Linux"},"content":{"rendered":"<p>Every time I copy data between my desktop and laptop, I think about how it would be faster if my laptop had gigabit ethernet. I have a gigabit switch and an onboard gigabit NIC on my desktop, but the laptop is slow old 100BaseT. However I do this rarely enough that shelling out 30 bucks for a gigabit PC card would be a waste of money (I could buy a NDS game for $30!).<\/p>\n<p>Then it occurs to me that both computers have firewire, and I have a firewire cable. I know you can do networking over firewire, but does it require a special cable? Out of mainline kernel drivers? Nope and nope. It&#8217;s this easy:<\/p>\n<p><!--more--><\/p>\n<p>On each computer:<\/p>\n<pre>$ sudo modprobe eth1394\r\n\r\n$ dmesg | grep eth1394\r\n\r\n[ 2829.651634] eth1394: eth1: IPv4 over IEEE 1394 (fw-host0)\r\n[ 2829.652104] eth1394: eth2: IPv4 over IEEE 1394 (fw-host1)\r\n\r\n$ sudo ifconfig eth2 192.168.XXX.Y broadcast 192.168.XXX.255 \\\r\n                     netmask 255.255.255.0<\/pre>\n<p>Where 192.168.XXX. is a local network block not already in use, and Y is 1 on the first machine and 2 on the second. If you have multiple firewire host cards and ports, you will get multiple ethernet devices. I plugged the cable into my Audigy, which I guessed correctly was the second host, so I used eth2. I then shoved these commands into $HOME\/bin\/fweth.sh on each computer so I can start it up quickly next time. The eth device numbers should be the same every time if you don&#8217;t have any other dynamic network devices. I then added entries to \/etc\/hosts so I can ssh\/unison\/scp without typing the IPs.<\/p>\n<p>Preliminary experiments suggests the connection is screamingly fast. Great success!<\/p>\n<p>Note: I&#8217;m pretty sure eth1394 has been in the mainline kernel for a long time, and most distributions likely include the module in the default installation. I&#8217;m using Ubuntu Hardy with stock kernel, 64-bit and 32-bit on desktop and laptop respecitively, and no tinkering was necessary. Also a word of warning: according to the linux ieee1394 faq, eth1394 is &#8220;neither stable nor fully standards (RFC 2734) compliant&#8211;but getting close!&#8221;. YMMV.<\/p>\n<p>Windows XP and Mac OS X also have firewire networking, but I&#8217;m not sure how well they interoperate with each other and with the Linux version. I&#8217;m curious to know if anyone tries it.<\/p>\n<p>UPDATE: I installed sidux and upgraded to kernel 2.6.27, and eth1394 stopped working &#8211; the interfaces were not even created. It turns out that the new firewire subsystem does not yet include a port of eth1394, and sidux blacklists the old system in favor of the new by default. Editing \/etc\/modprobe.d\/ieee1394 accordingly and loading ohci1394 fixed the problem.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Every time I copy data between my desktop and laptop, I think about how it would be faster if my laptop had gigabit ethernet. I have a gigabit switch and an onboard gigabit NIC on my desktop, but the laptop is slow old 100BaseT. However I do this rarely enough that shelling out 30 bucks [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[81],"class_list":["post-14","post","type-post","status-publish","format-standard","hentry","category-linux","tag-networking"],"_links":{"self":[{"href":"http:\/\/bda.ath.cx\/blog\/wp-json\/wp\/v2\/posts\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bda.ath.cx\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bda.ath.cx\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bda.ath.cx\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/bda.ath.cx\/blog\/wp-json\/wp\/v2\/comments?post=14"}],"version-history":[{"count":5,"href":"http:\/\/bda.ath.cx\/blog\/wp-json\/wp\/v2\/posts\/14\/revisions"}],"predecessor-version":[{"id":169,"href":"http:\/\/bda.ath.cx\/blog\/wp-json\/wp\/v2\/posts\/14\/revisions\/169"}],"wp:attachment":[{"href":"http:\/\/bda.ath.cx\/blog\/wp-json\/wp\/v2\/media?parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bda.ath.cx\/blog\/wp-json\/wp\/v2\/categories?post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bda.ath.cx\/blog\/wp-json\/wp\/v2\/tags?post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}