<?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 &#124; Latest Tech News, Software And Tutorials &#187; ifconfig</title> <atom:link href="http://www.ghacks.net/tag/ifconfig/feed/" rel="self" type="application/rss+xml" /><link>http://www.ghacks.net</link> <description>A technology news blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Sat, 11 Feb 2012 09:52:46 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>Network Troubleshooting Basics: The Ipconfig Command</title><link>http://www.ghacks.net/2011/05/17/network-troubleshooting-basics-the-ipconfig-command/</link> <comments>http://www.ghacks.net/2011/05/17/network-troubleshooting-basics-the-ipconfig-command/#comments</comments> <pubDate>Tue, 17 May 2011 07:40:11 +0000</pubDate> <dc:creator>Ryan D. Lang</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Mac]]></category> <category><![CDATA[troubleshooting]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[flush dns]]></category> <category><![CDATA[ifconfig]]></category> <category><![CDATA[IP address]]></category> <category><![CDATA[ipconfig]]></category> <category><![CDATA[network troubleshooting]]></category> <category><![CDATA[router]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=45207</guid> <description><![CDATA[This article is the second in a series of the basics of network troubleshooting. Last time, the ping command was demonstrated. Now the ipconfig command will be covered (the Linux/Mac ifconfig &#038; route commands will be touched on too). While this is a basic tutorial, there are some advanced tips and topics included. The Ipconfig [...]]]></description> <content:encoded><![CDATA[<p>This article is the second in a series of the basics of network troubleshooting.  Last time, the <a
href="http://www.ghacks.net/2011/05/12/network-troubleshooting-basics-the-ping-command/">ping command</a> was demonstrated.  Now the ipconfig command will be covered (the Linux/Mac ifconfig &#038; route commands will be touched on too). While this is a basic tutorial, there are some advanced tips and topics included.</p><p><strong>The Ipconfig Command Basics</strong></p><p>The <a
href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ipconfig.mspx?mfr=true">ipconfig</a> command gets its name from the acronym IP (<a
href="http://www.ghacks.net/2010/04/19/how-do-i-find-my-ip-address/">Internet Protocol</a>) and a shortened term for configure.  Understanding this served as a mnemonic device for me when I was first learning networking.  It is used to display and configure your connection to the Internet.  This tutorial will focus on the display and what that means.</p><p><strong>Deciphering the Information</strong></p><p>To get to ipconfig, we have to get to the command line.</p><ul><li>Click Start, click Run, type in &#8220;cmd&#8221; &#038; hit enter.</li><li>Type in ipconfig &#038; hit enter. (you can use <strong>ipconfig /all</strong> for detailed information)</li></ul><p>You will get a screen that looks like this.</p><p><img
src="http://www.ghacks.net/wp-content/uploads/2011/05/ipconfig-windows.jpg" alt="ipconfig windows" title="ipconfig windows" width="435" height="211" class="alignnone size-full wp-image-45208" /></p><p>To find your router&#8217;s IP number, look next to &#8220;Default Gateway&#8221; (listed last).  For a mnemonic, think of the router as your gateway to the Internet or another network.  To find your computers&#8217; IP number, look next to &#8220;IP Address&#8221;.  Do not worry about the other information like the subnet mask.</p><p>In this case, the computer number is 192.168.1.4 while 192.168.1.1 is the router number.  It is common for 192.168.1.1 or 192.168.0.1 to be the router&#8217;s IP address.  There are a few reasons for this, which were covered in a <a
href="http://www.ghacks.net/2011/04/29/why-your-home-router-is-192-168-1-1/">previous article</a>.</p><p><strong>Ping Your Router (Default Gate)</strong></p><p>We are using the ipconfig command so that we can get the IP number of the router.  As discussed at the end of  the last article on the ping command, we want to ping our router.  If we can ping it, then it should be working properly.</p><p>To do this, type in <strong>ping</strong> and the router (default gateway) number as shown.</p><p><img
src="http://www.ghacks.net/wp-content/uploads/2011/05/ping-router.png" alt="ping router" title="ping router" width="437" height="235" class="alignnone size-full wp-image-45209" /></p><p><strong>Some Possible Problems</strong></p><p>Consider a case where the connection to the Internet seems down.  If you cannot ping the router, or the ipconfig command says the default gateway is 0.0.0.0, then the problem may be in the router.  The first thing to check is whether the router is on and everything is plugged in.  The next thing to try would be to either restart the computer or to try and ping the router from another computer.  From here, you may want to call your ISP&#8217;s help line and let them know what you have tried.  An experienced user may restart the router; I have found that mine needs this from time to time.  For a beginner, it is better to get some help.  You will learn from the experience.</p><p>There is a possibility that your router may be failing.  That has happened to me once before.  Fortunately, a friend helped me troubleshoot the device, so stay in touch with networking pals.  The culprit may likely have been heat from a lack of proper ventilation.  Be sure your router has proper air flow.  While they may run warm, if they are hot to the touch, it may be bad for the device (check your manual or consult your manufacturer).</p><p><strong>ipconfig Command Line Options</strong></p><p>Ipconfig has several command line options that you can utilize. You can display all of them with the command <strong>ipconfig /?</strong>. Here is a short selection of the most common uses.</p><ul><li><em>ipconfig /release</em> &#8211; Releases all IPv4 addresses (requires DHCP)</li><li><em>ipconfig /renew</em> &#8211; Renews all IPv4 addresses (requires DHCP)</li><li><em>ipconfig /flushdns</em> &#8211; <a
href="http://www.ghacks.net/2011/03/13/how-to-flush-the-dns-cache-in-windows/">Flushes the DNS cache</a></li></ul><p><strong>Linux &#038; Mac Use Ifconfig &#038; Route -n</strong></p><p>For those running <a
href="http://www.ghacks.net/2010/04/20/how-do-i-find-my-network-information-in-linux/">Linux</a> or are on a Mac, the commands to use are <a
href="https://help.ubuntu.com/10.04/serverguide/C/network-configuration.html">ifconfig</a> and <a
href="http://manpages.ubuntu.com/manpages/hardy/man8/route.8.html">route -n</a>.  Is ifconfig identical to ipconfig?  No.  The ifconfig command will show you your computer&#8217;s IP number and other information.  You just type in the command, ifconfig, into the terminal to find out information about how your computer connects to the Internet.  To get your router&#8217;s IP number, you use the route command with a -n (netstat -r should work too).  Both are shown in the screen shots.  Make sure you use lowercase letter; the commands are case sensitive.  (Side Note: Linux also has a <a
href="http://linuxcommand.org/man_pages/iwconfig8.html">iwconfig</a> command for wireless specific tweaking (e.g. frequency).)</p><p><img
src="http://www.ghacks.net/wp-content/uploads/2011/05/Screenshot-ifconfig.png" alt="ifconfig" title="ifconfig" width="519" height="156" class="alignnone size-full wp-image-45210" /></p><p><img
src="http://www.ghacks.net/wp-content/uploads/2011/05/Screenshot-route.png" alt="route" title="route" width="330" height="100" class="alignnone size-full wp-image-45211" /></p><p>Just a note about the Mac <a
href="http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man8/ifconfig.8.html">ifconfig</a> command.  We are using it to view network settings, which is fine.  In doing research for this article, I read that it is <a
href="http://en.wikipedia.org/wiki/Ifconfig">not advised</a> to use this to change settings.  From what I read, it works, but with possible complications.</p><h3>Closing</h3><p>We use ipconfig to find the router&#8217;s IP number.  Once you have that, you can ping the router to test if it is responsive.  The problem with the ping command is that, while it is fast, is doesn&#8217;t give you a lot of information.  For that, we use the tracert command, which will be covered next.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2011/05/17/network-troubleshooting-basics-the-ipconfig-command/feed/</wfw:commentRss> <slash:comments>14</slash:comments> </item> <item><title>Connect to a wireless network via command line</title><link>http://www.ghacks.net/2009/04/14/connect-to-a-wireless-network-via-command-line/</link> <comments>http://www.ghacks.net/2009/04/14/connect-to-a-wireless-network-via-command-line/#comments</comments> <pubDate>Tue, 14 Apr 2009 15:22:01 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Mobile Computing]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[ifconfig]]></category> <category><![CDATA[iwconfig]]></category> <category><![CDATA[iwlist]]></category> <category><![CDATA[wireless networking]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=12001</guid> <description><![CDATA[I know, the first thing you are asking is &#8220;Why would I want to have to connect to a wireless network from the command line?&#8221; To that question I can give you a simple answer&#8230;What if you want to create a script to run that will bring up your wireless network as soon as your [...]]]></description> <content:encoded><![CDATA[<p>I know, the first thing you are asking is &#8220;Why would I want to have to connect to a wireless network from the command line?&#8221; To that question I can give you a simple answer&#8230;What if you want to create a script to run that will bring up your wireless network as soon as your desktop is loaded? You could get really complex and create a start up script to load a desktop based on what wireless access point you needed to join. That&#8217;s one of the beauties of Linux, if you can dream it, you can do it.</p><p><span
id="more-12001"></span>But I am getting too far ahead of myself. Let&#8217;s get back to the basics shall we? First I am going to assume that your wireless card was detected by your distribution and has the proper drivers loaded. With that accomplished you will need to have the following tools:</p><ul><li>ifconfig: Enable your wireless device.</li><li>iwlist: List the available wireless access points.</li><li>iwconfig: Configure your wireless connection.</li><li>dhclient: Get your IP address via dhcp.</li></ul><p>The first command you need to use is ifconfig. With this command you are going to enable your wireless device. Most likely your device will be called wlan0. So in order to enable this you would enter the command (as root):</p><p><em>ifconfig wlan0 up</em></p><p>You won&#8217;t see any feedback unless there is a problem.</p><p>The next step is to scan for your wireless network to make sure it is available. Do this with the following command:</p><p><em>iwlist wlan0 scan</em></p><p>With this command you will see output like the following:</p><p><code>Cell 01 - Address: 00:21:43:4E:9B:F0<br
/> ESSID:"HAIR STROBEL"<br
/> Mode:Master<br
/> Channel:5<br
/> Frequency:2.432 GHz (Channel 5)<br
/> Quality=100/100? Signal level:-45 dBm? Noise level=-95 dBm<br
/> Encryption key:on<br
/> IE: WPA Version 1<br
/> Group Cipher : TKIP<br
/> Pairwise Ciphers (1) : TKIP<br
/> Authentication Suites (1) : PSK<br
/> IE: IEEE 802.11i/WPA2 Version 1<br
/> Group Cipher : TKIP<br
/> Pairwise Ciphers (1) : CCMP<br
/> Authentication Suites (1) : PSK<br
/> Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 22 Mb/s<br
/> 6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s<br
/> 36 Mb/s; 48 Mb/s; 54 Mb/s<br
/> Extra:tsf=000002f1d9be01b7</code></p><p>So you know this network is available. From the above output you can also see this network is employing WPA2, so you will need a passkey. If you don&#8217;t know that passkey, you are out of luck (which would be the case no matter if you were using a front end in Linux, Windows, or Mac.)</p><p>Now it&#8217;s time to configure your connection. To do this issue the command:</p><p><em>iwconfig wlan0 essid NETWORK_ID key WIRELESS_KEY</em></p><p>Where NETWORK_ID is the ESSID of the network with which you want to connect and WIRELESS_KEY is the security key needed to connect to the wireless access point.</p><p>Note: iwconfig defaults to using a HEX key. If you want to use an ascii key you will have to add the &#8220;s:&#8221; prefix to your key like so:</p><p><em>iwconfig wlan0 essid NETWORK_ID key s:WIRELESS_KEY</em></p><p>Now that you have your configuration set, it&#8217;s time to get an IP address with the help of dhclient. Issue the command:</p><p><em>dhclient wlan0</em></p><p>If no output is reported there are no errors. You should now be up and running.</p><p><strong>Make it a script</strong></p><p>Of course who wants to type out all of those commands. Instead of doing this you could create a script for this like so:</p><p><code>#! /bin/bash<br
/> ifconfig wlan0<br
/> iwconfig wlan0 essid NETWORK_ID key WIRELESS_KEY<br
/> dhclient wlan0</code></p><p>Where NETWORK_ID is the actually essid of the network and WIRELESS_KEY is the security key for that network. Save this script with the filename <strong>wireless_up.sh </strong>and then make this script executable with the command:</p><p><em>chmod u+x wireless_up.sh</em></p><p>You can make this a global command by placing this script in <strong>/usr/local/bin</strong>. You can now issue the command <strong>wireless_up.sh</strong> from anywhere in your directory structure and it will run, connecting you to the configured wireless access point.</p><p>If you frequent many wireless access points you can create a script for each one giving them each unique names. By doing this, when you need to connect to a specific access point, just run the script associated with that access point and you&#8217;re good to go.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/04/14/connect-to-a-wireless-network-via-command-line/feed/</wfw:commentRss> <slash:comments>35</slash:comments> </item> </channel> </rss>
