<?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>LAMPDocs &#187; IP address</title>
	<atom:link href="http://www.lampdocs.com/tag/ip-address/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lampdocs.com</link>
	<description>Documenting the Open Source</description>
	<lastBuildDate>Mon, 05 Jul 2010 09:40:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Setting Up Network Interfaces in Linux</title>
		<link>http://www.lampdocs.com/home-personal/network-interfaces/</link>
		<comments>http://www.lampdocs.com/home-personal/network-interfaces/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 21:32:38 +0000</pubDate>
		<dc:creator>Vadim Cissa</dc:creator>
				<category><![CDATA[Other Recipes]]></category>
		<category><![CDATA[Broadcast address]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[DNS server address]]></category>
		<category><![CDATA[Gateway]]></category>
		<category><![CDATA[ifconfig]]></category>
		<category><![CDATA[interfaces]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[Internet Protocol]]></category>
		<category><![CDATA[IP address]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux drivers]]></category>
		<category><![CDATA[NAT]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[network interfaces linux]]></category>
		<category><![CDATA[network troubleshooting linux]]></category>
		<category><![CDATA[set up network ubuntu]]></category>
		<category><![CDATA[Subnet mask]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/?p=964</guid>
		<description><![CDATA[Everything you need to set up your network card with an Ubuntu configuration sample. 


Related posts:<ol><li><a href='http://www.lampdocs.com/home-personal/pppoe-connection/' rel='bookmark' title='Permanent Link: Setting Up PPPoE Connection in Linux'>Setting Up PPPoE Connection in Linux</a></li>
<li><a href='http://www.lampdocs.com/soho-administrators/setting-up-ssh-clients-on-windows-mobile-devices/' rel='bookmark' title='Permanent Link: Setting Up SSH clients on Windows Mobile Devices'>Setting Up SSH clients on Windows Mobile Devices</a></li>
<li><a href='http://www.lampdocs.com/home-personal/ipv6-advantages-and-its-configuration-in-os-linux/' rel='bookmark' title='Permanent Link: IPv6 advantages and its configuration in OS Linux'>IPv6 advantages and its configuration in OS Linux</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Nowadays computer provides us a great deal of opportunities (of course, the majority of users can easily go without many of them), but with no exaggerations &#8220;surfing the net&#8221; represents one of the most important and essential ones.  People who use Linux OS argue that given operating system is perfect for Web. In fact it&#8217;s hardly possible to disagree with them; however before you can start surfing the web the first thing you need to do is to configure <strong>network interfaces</strong>.</p>
<p>What are the network interfaces? They represent devices that are used to transmit and receive packages of data. The examples of network interface devices are: Ethernet card, ISDN adapter, modem and etc. You can imagine that a network interface is a mailbox or an end of pipe, where you can send information and receive an answer. The integral attribute of network interface is <strong>address</strong>.</p>
<p>Generally users encounter with IP (Internet Protocol) networks. In the given review we are going to consider IPv4 (4th version of IP addresses), which are still very popular among the end users. After that we will discuss how to setup a network connection in Linux, taking as an example Ethernet card (which presents an interface allowing to connect a PC to the net with the help of copper twisted pair cable with the data transfer speed of up to 1GB/s). You can setup other interfaces in a similar way. To setup the interface in Linux the following steps should be completed:</p>
<blockquote>
<ul>
<li>Physical installation of the card in the system (we suppose you&#8217;ve already done this step or the interface is in the motherboard of your computer; moreover don’t forget to plug in the cable as well)</li>
<li>Installation of the proper drivers, so Linux can work with your card</li>
<li>Specifying IP address and some other parameters, which are needed for IP network</li>
</ul>
</blockquote>
<p>In Linux OS network interfaces (as the majority of other devices) are set up with the help of text files, which can vary depending on distributions, for example:</p>
<table style="height: 92px;" border="0" cellspacing="0" cellpadding="0" width="538">
<tbody>
<tr>
<td width="163"><strong>Distribution </strong></td>
<td width="437"><strong>Interface and   routing setting</strong></td>
<td width="0" height="18"></td>
</tr>
<tr>
<td width="163">Debian</td>
<td width="437">/etc/init.d/network</td>
<td width="0" height="18"></td>
</tr>
<tr>
<td width="163">Ubuntu</td>
<td width="437">/etc/network/interfaces</td>
<td width="0" height="18"></td>
</tr>
<tr>
<td width="163">Slackware</td>
<td width="437">/etc/rc.d/rc.inet1</td>
<td width="0" height="18"></td>
</tr>
<tr>
<td width="163">RedHat</td>
<td width="437">/etc/sysconfig/network-scripts/ifup-&lt;ifname&gt;</td>
<td width="0" height="18"></td>
</tr>
</tbody>
</table>
<p>We are going to review it by Ubuntu example.</p>
<p><span id="more-964"></span></p>
<p>All Linux network interfaces have unique alphanumeric identifiers. For Ethernet interfaces the identifier consists of &#8220;Eth&#8221; prefix and interface ordinal number, which is generally assigned by OS depending on the order of devices on PCI bus; however in some cases it can be changed. Linux can work (and, of course, assign an identifier) just with those devices, which have proper drivers installed. Run <strong><em>ifconfig</em></strong> command in the terminal. In case you see your network card in the list, it means that Linux installed the drivers. Here is the way a response you should get may look:</p>
<p><a rel="attachment wp-att-965" href="http://www.lampdocs.com/home-personal/network-interfaces/attachment/01-ifconfig-command/"><img class="aligncenter size-full wp-image-965" title="01 - ifconfig command" src="http://www.lampdocs.com/wp-content/uploads/2009/09/01-ifconfig-command.png" alt="01 - ifconfig command" width="470" height="384" /></a></p>
<p>As you probably understood &#8220;eth0&#8243; means your network card. In case there are some network cards, for each one there will be an eth section with the order number.</p>
<p>Using <strong><em>dmesg | grep -i eth</em></strong> command you can specify the name of network interface that corresponds to your network card. Of course, it can be useful just in case you have several cards. Here is the way it looks:</p>
<p><a rel="attachment wp-att-966" href="http://www.lampdocs.com/home-personal/network-interfaces/attachment/02-the-name-of-interface/"><img class="aligncenter size-full wp-image-966" title="02 - the name of interface" src="http://www.lampdocs.com/wp-content/uploads/2009/09/02-the-name-of-interface.png" alt="02 - the name of interface" width="470" height="237" /></a></p>
<p>If you don&#8217;t see the card you need in the list, you will have to find and install the driver.</p>
<p>A <strong>driver </strong>is a small program that allows operating system to get the functionality of certain devices. Due to this fact the drivers for different operating systems differ from each other (still there are some exceptions, for instance, some drivers for Windows can be used in Linux as well).</p>
<p>In Linux drivers are implemented in the kernel by compilation or by installing special kernel module. Drivers are generally distributed in the same way as usual programs (in particular in the form of source code), but their installation may require some additional actions, thus it&#8217;s strongly recommended to get familiar with the README for a certain driver. The most probable sources for proper drivers are:</p>
<blockquote>
<ul>
<li>Webiste of device manufacturer</li>
<li>Website of your Linux distribution provider (in particular, update packages for Ubuntu, which include drivers, appear on a regular basis – drivers for some network cards you can find in the package <strong><em>linux-backports-modules-intrepid-generic).</em></strong></li>
<li>Hackers or communities websites</li>
</ul>
</blockquote>
<p>The process of configuring network interface for working in IP networks includes defining the following parameters:</p>
<p><strong>IP address of interface</strong>.  It represents 4 decimal numbers that are separated by periods. For example, 10.9.8.7. In case you connect your computer to an existing network, the address should be taken from network administrator; but if you create your own network, it&#8217;s recommended to choose IP address from special range: 10.0.0.0-10.255.255.255, 172.16.0.0-172.31.255.255 and 192.168.0.0-192.168.255.255</p>
<p><strong>Subnet mask (address mask). </strong>Given parameter is used to define the multitude of computer addresses, which are available in your network. If there is a necessity you can learn more <a href="http://en.wikipedia.org/wiki/Subnet_mask" target="_blank">here</a>. In small networks the most common mask value is 255.255.255.0.</p>
<p><strong>Gateway. </strong>If your network is going to have connection with other network (even with Internet), you need to define the address of routing computer (gateway), which is directly connected both with your network and the other one. All the data packages that are not masked by the above mentioned mask will be transferred to this router for redirection to the extranet.</p>
<p><strong>Broadcast address.</strong> It&#8217;s used to send the data to all computers in your network at once. In most cases there is no need to specify it because the system can automatically calculate it.</p>
<p><strong>DNS server address</strong>. It represents IP address of a server that transforms character names, which are convenient for users (for example, <a href="../../../../../">www.lampdocs.com</a>, <a href="http://www.linux.com/">www.linux.com</a> and etc), into appropriate IP addresses and vice versa. Generally such a server is maintained by your internet provider, moreover very often several servers are provided to ensure fault tolerance.</p>
<p>If the user wants to get rid of setting all the parameters, a special server can be created in the network – DHCP (Dynamic Host Configuration Protocol), which will automatically configure your network interface. Get in contact with the administrator of your network or your Internet provider to find out if there is a DHCP server. In case such a server doesn&#8217;t exist, you will need to specify all the settings manually; it&#8217;s not as hard to do and the procedure is almost the same as the one in Windows. Now we are going to show how you can do that in Ubuntu.</p>


<p>Related posts:<ol><li><a href='http://www.lampdocs.com/home-personal/pppoe-connection/' rel='bookmark' title='Permanent Link: Setting Up PPPoE Connection in Linux'>Setting Up PPPoE Connection in Linux</a></li>
<li><a href='http://www.lampdocs.com/soho-administrators/setting-up-ssh-clients-on-windows-mobile-devices/' rel='bookmark' title='Permanent Link: Setting Up SSH clients on Windows Mobile Devices'>Setting Up SSH clients on Windows Mobile Devices</a></li>
<li><a href='http://www.lampdocs.com/home-personal/ipv6-advantages-and-its-configuration-in-os-linux/' rel='bookmark' title='Permanent Link: IPv6 advantages and its configuration in OS Linux'>IPv6 advantages and its configuration in OS Linux</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/home-personal/network-interfaces/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
