<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>RND(tech) - Linux</title>
    <link>http://www.khanh.net/blog/</link>
    <description>My random co-existence with technology...</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.5.5 - http://www.s9y.org/</generator>
    <pubDate>Sat, 22 Oct 2011 22:55:21 GMT</pubDate>

    <image>
        <url>http://www.khanh.net/blog/templates/bulletproof/img/s9y_banner_small.png</url>
        <title>RSS: RND(tech) - Linux - My random co-existence with technology...</title>
        <link>http://www.khanh.net/blog/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>LaCie brings Lightscribe to the rest of us</title>
    <link>http://www.khanh.net/blog/archives/7-LaCie-brings-Lightscribe-to-the-rest-of-us.html</link>
            <category>Apple/Mac</category>
            <category>Linux</category>
            <category>Windows</category>
    
    <comments>http://www.khanh.net/blog/archives/7-LaCie-brings-Lightscribe-to-the-rest-of-us.html#comments</comments>
    <wfw:comment>http://www.khanh.net/blog/wfwcomment.php?cid=7</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.khanh.net/blog/rss.php?version=2.0&amp;type=comments&amp;cid=7</wfw:commentRss>
    

    <author>nospam@example.com (Khanh Tran)</author>
    <content:encoded>
    LaCie announced today that they now offer a complete Lightscribe solution for all platforms.  That means now Mac OS X and even Linux users can write labels to Lightscribe media with Lightscribe drives.  Lightscribe is a technology that allows you to etch silk screen quality images on the label side of CD/DVD media.  Up until now, the technology was limited to Windows users due to lack of software.  Now with the LaCie LightScribe Labeler for MAC OS, SureThing for Windows and LaCie LightScribe Labeler for Linux, we have software available to the three major OS platforms.  Did I forget to mention the software is free from LaCie?  Yes, it really is.&lt;br /&gt;
&lt;br /&gt;
See:&lt;br /&gt;
&lt;a href=&quot;http://www.lacie.com/lightscribe&quot;&gt;http://www.lacie.com/lightscribe&lt;/a&gt; &lt;a href=&quot;http://www.lightscribe.com&quot;&gt;http://www.lightscribe.com&lt;/a&gt; 
    </content:encoded>

    <pubDate>Tue, 17 Oct 2006 15:16:33 -0700</pubDate>
    <guid isPermaLink="false">http://www.khanh.net/blog/archives/7-guid.html</guid>
    
</item>
<item>
    <title>using openSSH as a layer-2 ethernet bridge (VPN)</title>
    <link>http://www.khanh.net/blog/archives/51-using-openSSH-as-a-layer-2-ethernet-bridge-VPN.html</link>
            <category>Internet/Networking</category>
            <category>Linux</category>
    
    <comments>http://www.khanh.net/blog/archives/51-using-openSSH-as-a-layer-2-ethernet-bridge-VPN.html#comments</comments>
    <wfw:comment>http://www.khanh.net/blog/wfwcomment.php?cid=51</wfw:comment>

    <slash:comments>4</slash:comments>
    <wfw:commentRss>http://www.khanh.net/blog/rss.php?version=2.0&amp;type=comments&amp;cid=51</wfw:commentRss>
    

    <author>nospam@example.com (Khanh Tran)</author>
    <content:encoded>
    Consider the following network setup (which I live with by the way):&lt;br /&gt;
&lt;br /&gt;
[main LAN] &amp;lt;-----------------------------------------------------&amp;gt; [remote datacenter LAN]&lt;br /&gt;
(192.168.0.0/16) &amp;lt;-------- leased point-to-point ------------&amp;gt; (192.168.0.0/16)&lt;br /&gt;
&lt;br /&gt;
Both locations also have separate connections to the public Internet with different public IP subnets.  However, for this discussion it&#039;s not necessary to have different public IP subnets.  Under normal circumstances the local LAN and the remote LAN are the same logical LAN via the magic of the leased point to point line.&lt;br /&gt;
&lt;br /&gt;
However, today that p2p connection broke (physically between the two locations, out of our control).  This outage lasted several hours, but brought out an interesting use of SSH tunneling for ethernet bridging aka Layer-2 VPN or tunneling.  For this to work, you&#039;ll need to have at least openSSH 4.3, a somewhat recent linux distro and the bridge-utils package for your distro.  This also assumes you have a basic knowledge of IP and the linux command line.  I use openSuSE 11.0, but this should work for almost any similar linux.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s say for example, the main location has a linux box (router1) with two NICs:&lt;br /&gt;
eth0: 1.1.1.1 (the public interface)&lt;br /&gt;
eth1: unassigned IP, but connected to your LAN (192.168.0.0/16 in my case)&lt;br /&gt;
&lt;br /&gt;
On the other box, at the remote location (router2) we also have two NICs:&lt;br /&gt;
eth0: 2.2.2.2 (the public interface)&lt;br /&gt;
eth1: unassigned IP, but connected to your LAN (192.168.0.0/16 in my case)&lt;br /&gt;
&lt;br /&gt;
Both routers should be set with it&#039;s public IP gateway as the default route, working DNS, etc.  You&#039;ll want to enable IP forwarding (consult your specific distro) and in my case, I disabled the distro&#039;s firewall.  On the remote side (consider it the &amp;quot;server&amp;quot;), you&#039;ll need to edit your sshd config to allow remote root logins and tunnels via SSH.&lt;br /&gt;
&lt;br /&gt;
/etc/ssh/sshd_config:&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
PermitTunnel yes&lt;br /&gt;
&lt;br /&gt;
The root login is necessary to allow ssh to create the TAP devices for the bridge.  Because of that, you&#039;ll also want to add your local side&#039;s IPs to /etc/hosts.allow for the sshd process.  Now, on the local side (IP 1.1.1.1, which you might consider the client now) you&#039;ll want to &amp;quot;su root&amp;quot; and do the following:&lt;br /&gt;
&lt;br /&gt;
ssh -o Tunnel=ethernet -f  -w 0:0 2.2.2.2 true&lt;br /&gt;
&lt;br /&gt;
The -o switch sets client options on the command line.  We&#039;re specifying the tunnel type as ethernet (bridge) as opposed to point-to-point, which it&#039;ll do by default (for Layer-3 type VPN routing).  The -f switch just forks ssh in the background so we&#039;re returned to our &amp;quot;client&#039;s&amp;quot; command line and not remote&#039;s.  Since we&#039;ve done that, ssh will expect a remote command of some kind, so we&#039;ll just run &amp;quot;true&amp;quot;, effectively doing nothing.  The -w 0:0 switch actually sets up our tap devices on either side as tap0.  You can do -w 1:1 for tap1, -w 0:1 for tap0 on one side and tap1 on the other, etc.&lt;br /&gt;
&lt;br /&gt;
On both sides now, you should be able to see via ifconfig -a your eth0, eth1 and tap0 devices.  Make sure to call ifconfig with -a, or you&#039;ll only see interfaces with defined IPs.  Now that the two boxes are connected via the public Internet to each other via SSH, you can finally start to establish the bridge interface.  Now we&#039;ll use the bridge-utils binary to create a bridge interface called br0:&lt;br /&gt;
&lt;br /&gt;
brctl addbr br0&lt;br /&gt;
brctl addif br0 eth1&lt;br /&gt;
brctl addif br0 tap0&lt;br /&gt;
&lt;br /&gt;
Then you&#039;ll want to bring up all of your interfaces, if they aren&#039;t already:&lt;br /&gt;
&lt;br /&gt;
ifconfig eth1 up&lt;br /&gt;
ifconfig tap0 up&lt;br /&gt;
ifconfig br0 up&lt;br /&gt;
&lt;br /&gt;
Doing so will create the br0 interface, then bridge your eth1 and tap0 together and bring up the interfaces.  Don&#039;t forget, YOU MUST RUN THE brctl and ifconfig COMANDS ON BOTH SIDES!!!  Once you&#039;ve done this, you can check the remote side to see if it knows about the MAC addresses (from Layer-2) on the local side:&lt;br /&gt;
&lt;br /&gt;
brctl showmacs br0&lt;br /&gt;
&lt;br /&gt;
This will report on the known MAC address from the ARP protocol.  Depending on your network, you&#039;ll see a few or many.  Depending on your setup, you can get a DHCP address on the &amp;quot;other side&amp;quot; of the tunnel now or configure an appropriate IP and ping across as if you were on the same physical broadcast domain!&lt;br /&gt;
&lt;br /&gt;
As a final note, there&#039;s always a downside.  TCP encapsulated TCP is bad and will put a STRAIN on your hardware.  Make sure it&#039;s decent for the amount of anticipated traffic and use only as a quick and dirty solution or a temporary measure.  The following is good reading for why this is not a long-term, permanent solution:&lt;br /&gt;
&lt;a href=&quot;http://sites.inka.de/~W1011/devel/tcp-tcp.html&quot;&gt;http://sites.inka.de/~W1011/devel/tcp-tcp.html&lt;/a&gt; 
    </content:encoded>

    <pubDate>Tue, 18 Nov 2008 21:11:40 -0700</pubDate>
    <guid isPermaLink="false">http://www.khanh.net/blog/archives/51-guid.html</guid>
    
</item>
<item>
    <title>disabling NetBIOS over TCP/IP in Windows via BIND DHCPD</title>
    <link>http://www.khanh.net/blog/archives/59-disabling-NetBIOS-over-TCPIP-in-Windows-via-BIND-DHCPD.html</link>
            <category>Internet/Networking</category>
            <category>Linux</category>
            <category>Windows</category>
    
    <comments>http://www.khanh.net/blog/archives/59-disabling-NetBIOS-over-TCPIP-in-Windows-via-BIND-DHCPD.html#comments</comments>
    <wfw:comment>http://www.khanh.net/blog/wfwcomment.php?cid=59</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.khanh.net/blog/rss.php?version=2.0&amp;type=comments&amp;cid=59</wfw:commentRss>
    

    <author>nospam@example.com (Khanh Tran)</author>
    <content:encoded>
    This is scarce information on the Internet, so I&#039;m reposting!&lt;br /&gt;
&lt;br /&gt;
NetBIOS can be disabled now that it&#039;s fairly ancient networking.  You&#039;re using TCP/IP and DNS right?&lt;br /&gt;
I don&#039;t use Microsoft DHCP or DNS servers, so finding the information to set this is hard to come by.  To disable NetBIOS over TCP/IP in an ISC DHCP server, add the following to your dhcpd.conf:&lt;br /&gt;
&lt;br /&gt;
option vendor-encapsulated-options 01:04:00:00:00:02;&lt;br /&gt;
&lt;br /&gt;
It&#039;s that easy! 
    </content:encoded>

    <pubDate>Thu, 27 May 2010 08:31:40 -0700</pubDate>
    <guid isPermaLink="false">http://www.khanh.net/blog/archives/59-guid.html</guid>
    
</item>
<item>
    <title>more MythTV and Intel G33 video performance</title>
    <link>http://www.khanh.net/blog/archives/50-more-MythTV-and-Intel-G33-video-performance.html</link>
            <category>Linux</category>
            <category>Softwarez</category>
            <category>Video</category>
    
    <comments>http://www.khanh.net/blog/archives/50-more-MythTV-and-Intel-G33-video-performance.html#comments</comments>
    <wfw:comment>http://www.khanh.net/blog/wfwcomment.php?cid=50</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.khanh.net/blog/rss.php?version=2.0&amp;type=comments&amp;cid=50</wfw:commentRss>
    

    <author>nospam@example.com (Khanh Tran)</author>
    <content:encoded>
    Apparently the key to HD playback on MythTV using the Intel integrated X3100 video card (G33 chipset) is not the &quot;extra audio buffering&quot; setting.  In a previous post, I enabled this setting and suddenly my HD video stopped stuttering.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, that wasn&#039;t totally the solution.  When I started playing back my homemade DVDs (from iDVD), I noticed they were all playing back audio fine, but the video was choppy, like the frames were dropping.  The audio tracks on these DVDs were uncompressed PCM.  Anything else (like AC3) would be fine.  The issue was that I was using OSS for sound (via /dev/dsp).&lt;br /&gt;
&lt;br /&gt;
The trick here is to use ALSA.  Changing the sound output in MythTV to ALSA and undoing the &quot;extra audio buffering&quot; yielded HD playback and smooth DVDs with PCM audio.&lt;br /&gt;
&lt;br /&gt;
So far, I can get the Intel X3100 to perform well with MPEG-2 HD (720p and 1080i) content, DVDs (with greedyhdeint x2) and MPEG-4/AAC video at HD frame sizes but low bitrates.  Unfortunately, h.264 video from the HD PVR 1212 with 720p frame sizes at high bitrates (the 7, 10 and 13.5 samples found &lt;a href=&quot;http://www.mythtv.org/wiki/index.php/Hauppauge_HD-PVR&quot;&gt;here&lt;/a&gt;) still peg my Core 2 Duo 2.53GHz at 102%+ 
    </content:encoded>

    <pubDate>Fri, 07 Nov 2008 20:30:10 -0700</pubDate>
    <guid isPermaLink="false">http://www.khanh.net/blog/archives/50-guid.html</guid>
    
</item>
<item>
    <title>compare a burned dvd or cd with iso file in linux</title>
    <link>http://www.khanh.net/blog/archives/61-compare-a-burned-dvd-or-cd-with-iso-file-in-linux.html</link>
            <category>Linux</category>
    
    <comments>http://www.khanh.net/blog/archives/61-compare-a-burned-dvd-or-cd-with-iso-file-in-linux.html#comments</comments>
    <wfw:comment>http://www.khanh.net/blog/wfwcomment.php?cid=61</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.khanh.net/blog/rss.php?version=2.0&amp;type=comments&amp;cid=61</wfw:commentRss>
    

    <author>nospam@example.com (Khanh Tran)</author>
    <content:encoded>
    This is something I&#039;ve been meaning to write for a while.  By using this script and md5sum, you can verify that data burned to CD/DVD matches the original ISO file in Linux.  It&#039;s a bit tricky, as it&#039;s not as simple as just running md5sum against /dev/dvd (the whole disc).  That&#039;s because more than just the data in the ISO is written to the media (finalizing the disc, etc.).&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
#Script to check md5sum of iso file against disc in drive&lt;br /&gt;
#DEPENDS on md5sum existing in path&lt;br /&gt;
#&lt;br /&gt;
#script should be called like:&lt;br /&gt;
# ./md5check.sh file.iso /dev/dvd&lt;br /&gt;
&lt;br /&gt;
ckFile=$1&lt;br /&gt;
ckDrv=$2&lt;br /&gt;
&lt;br /&gt;
echo &quot;Getting file extents...&quot;&lt;br /&gt;
fext=$(( $(ls -l $ckFile | awk &#039;{ print $5 }&#039;) / 2048 ))&lt;br /&gt;
&lt;br /&gt;
echo &quot;Getting md5sum of file...&quot;&lt;br /&gt;
fileMD5sum=`cat $ckFile | md5sum`&lt;br /&gt;
&lt;br /&gt;
echo &quot;Getting md5sum of disc in drive...&quot;&lt;br /&gt;
drvMD5sum=`dd if=$ckDrv bs=2048 count=$fext | md5sum`&lt;br /&gt;
&lt;br /&gt;
echo &quot;File md5sum:  &quot; $fileMD5sum&lt;br /&gt;
echo &quot;Drive md5sum: &quot; $drvMD5sum&lt;br /&gt;
&lt;br /&gt;
if [ &quot;$fileMD5sum&quot; = &quot;$drvMD5sum&quot; ]; then&lt;br /&gt;
        echo &quot; &quot;&lt;br /&gt;
        echo &quot;md5sum of&quot; $ckFile &quot;and&quot; $ckDrv &quot;match.&quot;&lt;br /&gt;
        echo &quot; &quot;&lt;br /&gt;
else&lt;br /&gt;
        echo &quot; &quot;&lt;br /&gt;
        echo &quot;********************************&quot;&lt;br /&gt;
        echo &quot;********&lt;strong&gt;  WARNING!!! **********&quot;&lt;br /&gt;
        echo &quot;********************************&quot;&lt;br /&gt;
        echo &quot;**&lt;/strong&gt; md5sum DOES NOT MATCH!!! ***&quot;&lt;br /&gt;
        echo &quot;********************************&quot;&lt;br /&gt;
        echo &quot;*********  WARNING!!! **********&quot;&lt;br /&gt;
        echo &quot;********************************&quot;&lt;br /&gt;
        echo &quot; &quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
&lt;/blockquote&gt; 
    </content:encoded>

    <pubDate>Sat, 26 Mar 2011 18:06:30 -0700</pubDate>
    <guid isPermaLink="false">http://www.khanh.net/blog/archives/61-guid.html</guid>
    
</item>

</channel>
</rss>
