Trouble in TP-Link land!

Some time back I wrote a post about how my D-Link DSL router’s Wifi broke down leaving me with no way to access critically important sites like Facebook, Twitter, Pinterest and Google+. So, I had to hunt down an old TP-Link MR3020 router and create a hideous looking wireless network that had more wires than I would have loved to have around. Thanks to all the goofing around I did back then (and recorded meticulously in that blog post), I have been able to browse the Interwebs and consume all the knowledge that is out there (e.g. mother kitteh’s love their little kitteh’s, doggeh’s love to chase their own tails, etc).

A few days back a strange and interesting phenomenon happened. I live in a small apartment that is probably not more than 30 ft in length and not more than 20 ft in width. This house would have been a great loft, if the builder hadn’t decided to provide “privacy” to the bedroom. So, there’s one big wall that separates the bedroom from the rest of the house.

The Wifi signal from the TP-Link MR-3020 router reaches most parts of the house, but, there’s a section of cupboards in the bedroom where it does not reach. I would not have detected that dead-zone had it not been for a tiny little Samsung N150 netbook that I am converting (at snail’s pace) into a simple home server. To keep things manageable, I put the Samsung N150 netbook, an external monitor and a Canon scanner+printer into one of the cupboards. But, with that setup in the cupboard, I was not able to access the Interwebs from the Samsung. And even worse, I was not able to access the Samsung N150 netbook and its connected printer/scanner from the other computers in my house. A quick check revealed what I was scared of: the Sammy had no Wifi connectivity!

Pulling the Sammy 2 feet out of the cupboard and into the open enabled it to connect to my home Wifi network. Hmm! What’s a human to do in such a situation? There’s only one thing: get more networking equipment. So, I quickly logged onto a local online retailer and ordered the cheapest Wifi box I could find, which incidentally happened to be a TP-Link WR702-N wireless device. This box is a tiny Wifi device that can be configured in various ways … if you can get to it!

So, the box arrived today (mid May 2014) afternoon, but, this being the peak summer season in India, I decided to ignore it till evening. Then, in the evening, I pulled the TP-Link WR702-N out of the box and decided to configure it in “repeater mode” with the hope of extending my current Wifi network’s range deep into the cupboards.

As with all TP-Link products, the router came packed in a neat little box. The device itself is very small in size, if you care about that aspect of it. The most shocking part of the whole package was a seemingly well written “Quick User Guide” (QUG) that was inside the package. Now … I like to live dangerously, so I don’t RTFM (read the fine manuals) that accompany the devices I buy. But, considering all the trouble I had earlier in configuring the TP-Link MR3020 router, I figured it would help to RTFM this time through. At first impression,  was I impressed with the beautifully done, poster size “Quick User Guide” that came with my new TP-Link WR702-N Wifi device? Yes I was!

According to the QUG all I had to do was connect to the “default/preconfigured” Wifi network on the TP-Link WR702-N Wifi device, configure it using a simple menu and I would be in networking heaven. Then reality hit me

Here is my suggestion if you get yourself the TP-Link WR702-N Wifi device: shred the freakin’ QUG and throw away the pieces so that you never mess your mind. God save the world! That TP-Link WR702-N Quick User Guide is not only utterly useless, it is completely wrong. Why do I say that: because you CANNOT connect to the “default, preconfigured” Wifi network on the TP-Link WR702-N. Since there’s no obvious way to get into the box, there’s no obvious way to configure the box! But, I figured out a way! Here’s what I did:

The TP-Link WR702-N has two ports: a tiny USB port and an Ethernet port. Cables for both the ports are provided with the box. So, connect the cables to the TP-Link WR702-N  appropriately. Then, connect the other ends of those cables to your computer. Now starts the fun part. Your computer/laptop/netbook/whatever is going to spin round and round to get an IP address from the TP-Link WR702-N, but, the TP-Link WR702-N is NOT going to give any IP address to your computer. Why? I don’t know! I really don’t! So, what should you do? Irrespective of whether you are on Windows, or Linux or Mac OS X, you gotta do these steps:

  • disable DHCP on your computer’s Ethernet port
  • configure a static IP address on your computer’s Ethernet port – anything in the 192.168.0/24 range would do, but, 192.168.0.254 is the TP-Link WR702-N device’s default address, so, I chose 192.168.0.200/24

In my specific case, my laptop runs Xubuntu 13.10, so I had to do all those things (disable DHCP and configure an IP address manuall) from the Network Manager configuration utility. VERY IMPORTANT: do NOT, and I repeat, DO NOT, try to configure the IP address for your computer’s Ethernet port from the shell. I tried being a smart whatever, but quickly realized that Network Manager continuously ran DHCP client on my Ethernet port. So, even if I configured the IP address manually (sudo ifconfig eth0 192.168.0.200/24 up), NM would undo that configuration within the next few moments and then go into a loop requesting IP address from the TP-Link WR702-N.

So, your best bet is to edit your network connections and add a new Ethernet interface that would have a manually configured IP address, in stead of a dynamically acquired IP address.

Network Connections shows two Ethernet interfaces: Eth0-1 and Eth0.

Setup two interfaces on your Linux box. Eth0-1 has a manually configured IP address that lets it connect to the TP-Link WR702-N device. Eth0 is the default Ethernet interface that fetches its IP address dynamically using DHCP.

Here is how my Eth0-1 is setup:

Eth0-1 configuration

Setup Eth0-1 with a manual IP address, 192.168.200.200/24 in this case. (NOTE that i had changed the IP address of the TP-Link WR702-N router to be 192.168.200.254 earlier.)

Once you have done that, login to the TP-Link WR702-N Wifi device and start setting it up. To do that you need to start your browser and point it to 192.168.0.254 (or 192.168.200.254 in my case). Assuming you haven’t done any changes yet, the login and password are both set to admin by default. Now, you would be tempted to get into the “Quick Setup” option provided by TP-Link WR702-N configuration utility/web page. But, don’t do that. In stead go through the process manually.

In my case, I wanted to configure the TP-Link WR702-N box as a Wifi Repeater. So, I had to setup the following:

In “Working Mode” I chose the “Repeater” mode as shown here and saved it.

Setting the TP-Link WR702-N in Wifi Repeater Mode

Setting the TP-Link WR702-N in Wifi Repeater Mode

In “Wireless Settings” I configured the Wifi network that I wanted to “repeat”. For this example, assume that the network name is “abracadabra” and the security password for the network is “bogusPassword”. Also, assume that the MAC address of the TP-Link MR3020 is “”64:70:02:55:55:55” which in TP-Link case translates as “64-70-02-55-55-55”. (Seriously! Who in his right mind uses dashes in stead of the universally accepted colons to write a MAC address? TP-Link does!) Don’t forget to save all that info once you have configured your TP-Link WR702-N device. So, here’s how the whole configuration looks in my case:

The wireless settings on my TP-Link WR702-N box setup as a Wifi Repeater

The wireless settings on my TP-Link WR702-N box setup as a Wifi Repeater.

In “DHCP Settings” I chose to disable DHCP because my TP-Link MR3020 issues appropriate, preconfigured, IP addresses to my notebooks, tablets, and phones.

Disable DHCP on the TP-Link WR702-N

Disable DHCP on the TP-Link WR702-N

Once all that was done, I chose to reboot!

Just reboot, already!

Just reboot, already!

Then, when the  TP-Link WR702-N came back up, it was ready to play its role in my network: that of a Wifi repeater.

Bottom line: never RTFM … especially TP-Link manuals and their online help. (JK)

Advertisements

Wireless Router + DSL Modem Rig

I put this note together for my future reference. But, then, a friend suggested that it may be helpful to others. So, I decided to post it here, on the Interwebs …

First, the backstory:

So I have had this D-Link 2730 DSL modem at home for the past year and half. Out of the box, this was a full fledged DSL-modem + Ethernet and Wifi router. Setting it up was easy, but, the Wifi on this box had always been pathetic. It started with “good signal upto about 10 ft” and gradually faded to “ok signal upto about 5 ft”.  Then, over the past 6 odd months, the Wifi started getting weaker to the point where it completely died out on March 3, 2014! That was a sad day because I had to tether my laptop to the modem over an Ethernet cable. And there was no way for my phones and tablet to connect to the Interwebs over wifi at home. So I wondered how to fix my no-Wifi at home situation.

Of course, the easiest answer was to go out there and buy another modem from an electronics retail store, like an Indian version of America’s Best Buy. India now has a lot of retail stores, big and small, that sell various computer accessories. The closest such store was just a few kms from my home. But, considering the heat and even worse, all the people interactions I would have to undertake to get a modem, I figured I would buy one online.

So, I checked at various online retail stores in India. And my favorite store so far, Flipkart, had the modem I wanted. But, ever since Flipkart goofed up my last order I have desisted from ordering anything from them. Also, with Flipkart the delivery timings are like “anytime from 9:00 am to 7:00 pm” which basically means that I would have to sit at home for an entire day just waiting for my shipment to come in.

There was a third way: I could go the route I had taken a few years back when I setup an old Linux laptop to be the Wifi gateway. Essentially, the Ethernet on the laptop was connected to the modem and then, using simple iptables configuration, I had setup the laptop as a Wifi gateway (with NetworkManager disabled). This had enabled my other notebooks to connect to the Wifi-gateway-laptop over Wifi (obviously) and then the laptop would forward all the traffic in/out the modem. But, this time through I was in no real mood to “use” an entire laptop for such a trivial task.

So, just as I was wondering if I should go out there and get myself a new modem a light bulb lit up in my head. Somewhere in all the stowed away “old equipment” I had a 3G router that I had bought a couple of years ago but never really used. So, if I could locate it:

  • I wouldn’t have to go out in the Indian heat
  • Even more importantly, I wouldn’t have to interact with all the people (the auto-rickshaw drivers, the unnecessarily arrogant boys and girls who work at those retail stores, the crazy sales people who want to sell me more than I want to buy, the always suspicious security that guard the retail stores, etc.)
  • I would learn some networking

So, if I could locate that 3G router then, it would be a win-win situation (no people interaction + learning networking). So, with all the will power I could muster, I pulled myself out of my chair and rummaged through all my boxes to ultimately find an old but unused TP-Link MR-3020 3G router in one of my boxes.

Alright! So, that’s the back story. Now onto the “putting together the networking rig” part of the story …

Setting up the networking rig:

I had a fairly basic configuration in mind.

A diagram of my home network made up of D-Link 2730U DSL modem and TP-Link MR3020 3G router

A diagram of my home network made up of D-Link 2730U DSL modem and TP-Link MR3020 3G router. This diagram was created using LibreOffice Draw. (NOTE: this diagram uses icons from Cisco and images from D-Link and TP-Link. See references at bottom of the page.)

Realize that this configuration is similar to the “old linux laptop as a Wifi gateway” mentioned earlier. The only difference here is that a physically big piece of hardware, the old linux laptop, has been replaced by a tiny piece of dedicated hardware, the TP-Link 3G router.

Setting up the TP-Link router wasn’t exactly “a charm”. The router has all these various modes called AP, WISP, WPS and what have you. It can act as a repeater, an client ap, a server ap and even more what have you. Without digressing: one of the biggest reasons Wifi is so frustrating is that you really need to know about all this stuff to figure out what you really want. Wifi is, clearly, not as simple and easy as Ethernet: plug-n-play. But, the biggest stupidity with this specific TP-Link MR3020 3G router is that it has this little “mechanical” switch which puts the router into various modes. So, I was never sure whether the physical/mechanical switch overrode the software configuration I did or was it the other way around. The confusion was further exacerbated by the fact that the TP-Link router continuously shows “help text” in the right-most frame of the router’s configuration web page. The fact is that this help text is complete and utter gibberish. (NOTE that I am not saying I know English well … but, I can assure you that the TP-Link 3G router help text is worse than the gibberish the Minions speak. I feel that TP-Link should hire an American technical writer to create sane user-manuals and online-help.) But, getting back to the point of this post …

After playing with various configuration settings for almost 2 hours and having forgotten English because of all the gibberish help the TP-Link 3G router kept showing on the side (just kidding … about the forgetting English part), I figured I had wasted enough time. What I wanted was really simple (see the diagram above) … so I did what most computer engineers do when they have faulty or not-working-as-expected computing equipment: I hard reset the TP-Link 3G router. But, before that I set the physical/mechanical switch on the TP-Link 3G router to “3G” mode. Then, I connected the box to my laptop over Ethernet and logged into it. Although it appeared to have been completely reset, I didn’t want to take chances with the Chinese (just kidding). So, I hunted down the “reset to factory defaults” link on the router’s configuration page and reset it once again.

Then, after the reboot, setting it up was “almost” fairly easy:

  • I enabled a Wifi network and secured it with WPA/WPA-2 (Personal) password
  • I enabled MAC filtering and added the Wifi MAC addresses of all my computers, phones and tablet
  • I setup the DHCP server on the box to dish out specific IP addresses to my computers. This makes it easy for me to transfer files from my phones and tablet to my computers. (NOTE that I run Open-SSH server on all of my computers. And I have Turbo Client on all of my phones and the tablet.)
  • I setup the box to connect to the Interwebs only over WAN and therefore to completely ignore 3G. This WAN connection is through the Ethernet port on the TP-Link 3G router.
This windows shows the TP-Link MR 3020 configured to use WAN (over Ethernet) and to completely ignore 3G.

The TP-Link MR 3020 configured to use WAN (over Ethernet) and to completely ignore 3G.

After saving that configuration I reboot the TP-Link 3G router and hooked it up to the D-Link 2730 over Ethernet.

With that setup, my computers, phones and tablet showed that they had a super strong Wifi signal like I had never seen in the past few years. 🙂 I got all of them to connect to my newly setup Wifi network. But, I couldn’t browse the Interwebs! 😦

Do you remember that earlier I said it was “almost” easy to setup? You see, the TP-Link 3G router has this crazy thing called MAC-clone which I had never seen/heard before and I hope I never have to deal with it again! Also, the gibberish help added to all the confusion. You see, earlier I had copied the MAC address of the D-Link modem into this “field” on the TP-Link 3G router’s configuration page because I was unable to figure out what the TP-Link help manual was trying to convey. But, since things weren’t working as expected, this seemed to be the only field that could be causing the problem. So, I “restored” that field to have the TP-Link 3G router’s MAC address. I saved the configuration, prayed to the Gods and reboot the 3G router. And after about 3 minutes, I was browsing the web like there was no tomorrow. 🙂

But, the show wasn’t over boys-n-girls. I still had to get a few things done on the D-Link 2730.

  • I directly connected my laptop to the D-Link modem over Ethernet and logged into the modem
  • I completely disabled Wifi (rather, whatever was left of it) on the D-Link 2730.
  • If you didn’t realize why I had to directly connect my laptop to the D-Link modem, then here it is: Because of the two address spaces (the TP-Link router gave out addresses in 192.168.0/24 on its Wifi. The D-Link modem gave out 192.168.1/24 on its Ethernet … thus giving the TP-Link router’s Ethernet port an IP address of 192.168.1.111) the D-Link modem had no way to get back to my computers. It probably assumed that any unknown IP address (even private IP?) should be routed out to the ISP. So, to get my computers and the D-Link modem to talk to each other I setup a static route on the D-Link 2730 so that all communication with 192.168.0.0/24 is directed back to the TP-Link 3G router (192.168.1.111) over Ethernet.

And finally, all was good. Now, I have a fairly decent Wifi signal all through my house. In fact, even my neighbors are getting it and I noticed they have already tried to hack in … so far unsuccessfully.

So, that’s that boys-n-girls. Thanks to my laziness (not wanting to go out in the heat) and craziness (wanting to learn the TP-Link gibberish and waste my time putting together this rig), I finally put together a rig that gives me decent Wifi access all through my house and lets me connect to the Interwebs. I am happy … for now.

References:

HTH!