Thursday, July 31, 2008

Ubuntu and Router Continued

I had been working on getting VMware or some other virtualization product to let me run Windows XP on top of an Ubuntu Linux system, when I ran into problems with my router. This post describes the steps I took in getting a connection going again, before returning to that main discussion. There is also a previous post on how I got the router going in the first place. The router in question was a Linksys WRT54GL Wireless-G 2.4GHz 54Mbps broadband router. In hopes of getting it going, I consulted its manual, a PDF on its installation CD. It explained that the button I had accidentally punched, on the front of the router, had something to do with the router's SecureEasySetup function. It said the light would stop flashing when the router had finished generating its SSID and WPA Personal Key. It was not clear, from the manual, what I should do in this case. I tried punching the button again. At first, it did nothing, but when I punched it and held it for a second or so, it started flashing white. This continued for several minutes. When it was done, I tried again to load a page in Firefox on the secondary computer. This failed. I connected the secondary computer directly to the modem, bypassing the router, and tried again. The webpage I had been trying to reach came up almost immediately. Likewise for another. The problem, at least for the secondary computer, was the router. I installed a months-old copy of Symantec AntiVirus on the WinXP installation on the primary machine, for what it was worth, and tried the same trick with it, connecting it directly to the modem. It did not work. I rebooted that machine into Ubuntu and tried connecting there. Its webpages, too, loaded fine when the machine was directly connected to the modem, but not when it was connected to the router. So for both computers, the router was the problem. But what was the solution? I guessed that I might have reset the router when I picked it up and inadvertently punched that button. I noticed that I was able to get as far as the password screen when I typed 192.168.1.1 into Firefox's address bar and hit Enter, but I just got an error message when I typed 192.168.1.2 or 192.168.1.100. But System > Administration > Network Tools > Devices > Network Device > Ethernet interface (eth0) was reporting an IP address of 192.168.1.100. I dimly recalled that I had configured it to something other than 192.168.1.1 (which, according to p. 22 of the Linksys manual, was the default) when I was setting it up. So now, using the default username (leave it blank) and password (admin) specified in the manual, I was able to log into the router at 192.168.1.1. My logic was challenged, however, because when I tried to change the 1 to 100 in the router's internal webpage, I got an error message saying, "Starting IP address can't be LAN address." I went to Administration > Status, there in the router, and saw that I was running firmware version 4.30.11, dated August 7, 2007. It was a year old. Also, it stated that its IP address was 192.168.1.64, and that the default gateway was 192.168.1.254. I had no idea what to do with this information. I plugged the primary computer into the modem directly. I was going to do an online chat with Linksys tech support, but that required the Java Runtime Environment. I had not yet installed that, and was not sure how -- it was more difficult in Ubuntu than in Windows, where I would just click on an icon. So instead I went through their Ask Linksys option. The first step, they said, was pinging. I had to translate somewhat -- their instructions were for Windows, and I was now trying this on Ubuntu. Basically, I used Ubuntu's Network Tools > Ping for www.linksys.com and got an indication that that address could not be found. I then used Ping for 192.168.1.1 (the router) and got 100% success. I plugged both computers back into the router and, on the secondary computer, went back to the router's webpage. Following instructions, I clicked on Wireless > Basic Wireless Settings and changed my network name to something unique. I went to the Wireless Security tab and set it up, which I had not done on the secondary computer because I had just been using a wired connection. One of the Linksys webpages, which I had left open, told me that the 192.168.1.100 visible in Network Tools was the computer's IP address. Another said that 192.168.1.1 was the default gateway. I was at a loss. I ate and sat and thought. I booted the main computer back into Windows to try Linksys EasyLink Home Networking. That was silly; I had forgotten that the main computer couldn't go online at all, not as long as it was plugged into the router. I tried ping and ipconfig in a Windows DOS box. Pinging the router got zero success. Entering 192.168.1.1 into the Internet Explorer address line yielded an error. It seemed that the Windows setup had problems beyond just the router. I went back to the secondary computer, where at least I had contact with the router. I finally did find a Linksys tech support page that seemed on target. I followed its advice to change the router's local IP address to 192.168.2.1. Now I was not able to contact the router at all. It was a brick. I bought another router. This was a Linksys WRT54GS. I noticed that one of the sheets accompanying it had an 800 number for tech support. I hadn't been able to find one on the Linksys webpage, else I would have used it. But now we were in a new chapter. I ran the new router's installation CD in a Windows XP boot on the primary computer. This wasn't a Linux-based router, and maybe that's why its installation procedure was somewhat different. This one promptly advised me that it didn't find an active network adapter on the primary computer, and that reminded me -- gee, I haven't installed the motherboard drivers in this basic Windows installation yet. VMware and VirtualBox hadn't seemed to need them. Installing them had sometimes been frustrating and time-consuming in the past. How about if I tried setting up the router in Linux first? I rebooted into Ubuntu and meanwhile looked up some advice. As advised, I went into System > Administration > Network > Connections, unlocked, and changed the Properties of the wired connection to DHCP, and plugged in the router. That proved to be incorrect; it was better left on the Automatic setting, not specifying DHCP. I got the router's internal webpage and followed a Linksys instruction to change the local IP address to 192.168.2.1. The internal webpage confirmed that this change was successful, but was then unable to go any further, and eventually gave me an "Unable to connect" error. As I reviewed the Linksys instructions for Windows, I thought the problem might be that I had failed to release and renew my IP address. The consensus on that seemed to be that I should enter these lines:

sudo ifdown eth0 sudo ifup eth0
possibly followed by "/etc/init.d/networking restart"; but the first of those lines got me "interface eth0 not configured" and the second one returned "Ignoring unknown interface eth0=eth0." I did not get those error messages, however, when I tried a different version:
sudo ifconfig eth0 down sudo ifconfig eth0 up
However, I was still able to ping 192.168.2.1 with 100% success. Plainly, I did not know what I was doing; just as plainly, though, I was not successful, so far, in finding the right sources of information. Surely those sources were out there; they just weren't coming up in my Google searches. What I was getting, instead, was a lot of confused people and, time after time, bits of advice that were partly helpful, that worked for some people and not for others, from which I could hope for tiny steps of forward progress. I had hesitated to call the Linksys tech support number because I doubted they would know anything about Linux. There had been no mention of Linux in the Linksys materials I had reviewed so far. As I recalled, they had previously told me that tech support for Linux was not free. My impression was that fee rates for tech support were pretty high. It then occurred to me that I may have confused the router by repeatedly unplugging and replugging the Ethernet cable. I was sharing one DSL connection between two computers, using one to write these words and research the issues, and then plugging in the other one to test the next idea or suggestion. This did not seem likely; all of the correct lights were on when I did plug in the router. But I rebooted the primary computer anyway, just in case. Sadly, that did not help. I tried contacting the router at 192.168.2.1 on the secondary computer. That too was unsucessful, as were attempts at 192.168.1.1 and 192.168.1.100. Lights on the router were flashing, but all I was getting was "Unable to connect." On a good night's sleep, I felt refreshed and ready to approach this issue again. First, I would try the advice that someone had given, in response to my question posted on the Ubuntu Networking & Wireless forum:
there is really no need to go to 192.168.2.1 unless you have some weird network. Anyways try reseting it to defaults so you can get back into the configuration screen. Hold the reset button in for 15 seconds or so. I actually pull the power out while holding it and plug it back in while I am still holding it down. That should clear out any problems in the router.
The person offering this advice had posted more than 1,000 times in the Ubuntu forums, it said, so I had to think s/he was reliable. I did it exactly as s/he advised, having discovered in the meantime that the reset button was actually on the back of this new router, and the function of the button on front was apparently somewhat different. This procedure did enable me to contact the router at 192.168.1.1 in Ubuntu on both machines. As with the previous router, I was able to ping the router (192.168.1.1) successfully from both computers. In the router's webpage, I changed the network name and set up wireless security. But I still had no connection. I called Linksys Tech Support (800-326-7114) and went through their automated help guide. They had only Windows and Mac options, so I chose Windows. The guide proceeded at a very patient pace. I hate to say it, but it was better than speaking with a human, because I was able to take notes, repeat steps multiple times if it took that long for me to make sure I got them right, etc. The guide took me through the steps of powering down the modem, router, and computer, and then powering them back up, one by one, waiting until the Internet light was solid on the modem and the power light was solid on the router before plugging in or turning on the next item. When the computer came back up in Ubuntu, I started Firefox. They had me go to 192.168.1.1 again. There, I checked for Status > IP Address. Mine began with 192.168. In that case, they wanted me to go to Setup > Basic Setup > Local IP Address and change it to 192.168.2.1, then Save Settings. I did that. This gave me a new message: "Settings are successful. Please release/renew IP." They didn't have me do anything to release/renew except just restart the computer. The other nice thing about the automated phone guide was that, of course, I didn't have to remain online to keep getting instructions when, as now, I was rebooting (if I'd had only one computer). Anyway, these instructions didn't do the job. I still wasn't able to go online on the primary computer, so I had to speak with a technician. While I was waiting for him, I made sure both computers were plugged into the router, and I tried going online with the secondary computer. Unlike the first one, it was working through the router now. The technician, as it turned out, would not help me with Linux -- he said they did not support it. I told him I had a Windows dual boot. In that case, he referred me to his senior technician. He was going to transfer me to that senior technician, but the call was disconnected when he attempted to transfer. I had a case number, and I left it at that for the moment. I posted a reply on the discussion thread I had started in the forum, and meanwhile I rebooted the primary computer into Windows XP. I made a System Restore backup point and proceeded to install drivers for all items with yellow exclamation mark circles in Control Panel > System > Hardware > Device Manager. This resulted in the first instance when Windows failed to start up. I hit the reset button and tried again. Windows booted and everything was good, including its connection to the Internet through the router. I rebooted into Ubuntu again. Now the Internet connection worked there too. Very strange. I disconnected that Linksys WRT54GS router and reconnected the Linksys WRT54GL, which had now sat on a table for about 24 hours. It, too, was now working fine. Very strange! The factors that contributed to a solution on this issue, I think, were the reset procedure and/or letting the router sit, which someone had said was helpful; going to the Linksys tech support 800 number, and especially the automated procedure, which I had not used previously; and perhaps getting some distance from the problem, which had reached the point of frustration and counterproductive redundancy on the previous evening.

0 comments: