<?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>gHacks technology news &#187; Linux network addresses</title> <atom:link href="http://www.ghacks.net/tag/linux-network-addresses/feed/" rel="self" type="application/rss+xml" /><link>http://www.ghacks.net</link> <description>A technology blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Sat, 20 Mar 2010 15:17:27 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.2</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Assign IPv6 addresses in Linux</title><link>http://www.ghacks.net/2009/07/08/assign-ipv6-addresses-in-linux/</link> <comments>http://www.ghacks.net/2009/07/08/assign-ipv6-addresses-in-linux/#comments</comments> <pubDate>Tue, 07 Jul 2009 22:37:22 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Knowledge]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[The Web]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[/etc/init.d/networks]]></category> <category><![CDATA[ipv6]]></category> <category><![CDATA[Linux network addresses]]></category><guid isPermaLink="false">http://www.ghacks.net/?p=13965</guid> <description><![CDATA[It is inevitable that IPv6 addresses are going to eventually take over. When that happens you will need to know just how to assign an IPv6 address in your Linux operating system. Of course this will only be necessary on a system that uses a static IP address, but when you&#8217;re using Linux that can [...]]]></description> <content:encoded><![CDATA[<p>It is inevitable that IPv6 addresses are going to eventually take over. When that happens you will need to know just how to assign an IPv6 address in your Linux operating system. Of course this will only be necessary on a system that uses a static IP address, but when you&#8217;re using Linux that can happen fairly often. Having this knowledge on hand will make this transition seamless.</p><p>Of course you will have to have a kernel that is compiled with IPv6 support. Most modern Linux distributions already have this built in. You also have to have your IPv6 addresses handy. I use <a title="IPv6 calculator" href="http://grox.net/utils/ipv6.php" target="_blank">this</a> simple web-based IPv6 calculator. With that tool select the IPv4 to IPv6 conversion and you should be good to go. So with everything in hand, you are ready to configure.</p><p><span id="more-13965"></span><img src="http://www.ghacks.net/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" alt="" /><strong>IPv6 support</strong></p><p>First make sure your kernel supports IPv6. To do this you can first run the command:</p><p><em>sudo lsmod|less</em></p><p>and search the listing to see if ipv6 is there. If not try loading it with the command:</p><p><em>sudo /sbin/modprobe ipv6</em></p><p>Now issue the <em>lsmod</em> command to see if it is there. It should be.</p><p><strong>Configuration</strong></p><p>The file you want to configure will be the standard network interface configuration. Remember you are going to configure for static IP addresses. The file in question is <strong>/etc/network/interfaces</strong>. Most likely this is either not configured (if you are using DHCP) or set up for IPv4. We are going to blow that away now. We are also going to add something to this file that will ensure IPv6 is loaded properly and that your networking us making use of the new address scheme.</p><p>The details of our configuration:</p><p>IPv4 address: 192.168.1.10</p><p>IPv6 Address: 2002:c0a8:10a::</p><p>IPv4 gateway: 192.168.1.1</p><p>IPv6 gateway: 2002:c0a8:0101::</p><p>Now let&#8217;s add this to the <strong>/etc/network/interfaces </strong>file. The new file will look like this:</p><p><code>#IPV6 static configuration<br /> iface eth0 inet6 static<br /> pre-up modprobe ipv6<br /> address 2002:c0a8:10a::</code><code><br /> netmask <span>64</span><br /> gateway 2002:c0a8:0101::</code><code><br /> </code></p><p>Notice the &#8220;pre-up&#8221; command. That is where we ensure that IPv6 is added to the kernel, otherwise you run the risk of attempting to use an IPv6 address in a system that is looking for an IPv4 address.</p><p>Now you will want to restart networking with the command:</p><p><em>/etc/init.d/networking restart</em></p><p>You should now have an IPv6 address enabled.</p><p><strong>Testing</strong></p><p>Before you assume everything is working, let&#8217;s make sure first. You can check your IP routing with the command:</p><p><em>ip -6 route show</em></p><p>The above command should return something like:</p><p><em>2002:c0a8:0100/64 dev eth0 proto kernel  scope  link src 2002:c0a8:10a</em></p><p>You can also check by pinging with the <em>ping6 </em>tool. A good IPv6 address to try is the Google address. Issue this command:</p><p><em>ping6 ipv6.google.com</em></p><p>If IPv6 isn&#8217;t working you will get error:</p><p><em>Network is unreachable</em></p><p>If IPv6 is working you will see the standard ping results in your terminal window.</p><p><strong>Final thoughts</strong></p><p>It&#8217;s only a matter of time before IPv6 is the defacto standard for network addressing. When that happens you do not want to be behind the curve or you&#8217;ll lose out fast. Make sure you know how to configure your Linux servers for IPv6 static addressing. You&#8217;ll be glad you do when the time comes.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/07/08/assign-ipv6-addresses-in-linux/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 6/13 queries in 0.004 seconds using disk

Served from: www.ghacks.net @ 2010-03-20 15:27:11 -->