Wednesday, November 23, 2011

Turning Your PC into a DD-WRT Wired Router - From Windows

Normally, when we cover DD-WRT and other firmware replacements for wireless routers, we discuss flashing (or uploading) the firmware to a router. However, DD-WRT also has an X86 version that can be installed onto just about any generic PC.

This is great if you don’t have a compatible router lying around and don’t want to track one down with the right model and version number. Plus it lets you exceed the usual 16MB of RAM and slow CPU in the off-the-shelf consumer-level routers.

In this tutorial, we’ll build and set up a DD-WRT machine.

Features on a normal dd-wrt firmware (wifi router):
http://www.dd-wrt.com/wiki/index.php/What_is_DD-WRT%3F

Limitations of the X86 version

Keep in mind; if you want to go the free route, you’ll only have a wired router—but you can add separate access points. Wi-Fi support is only available in the registered version by purchasing a Professional Activation for € 20.00 ($28.36).

You also lose these features for any X86 version of DD-WRT:

  • USB Support. For example, you can’t connect USB drives or printers to share them on the network.
  • Journaling Flash File System (jffs). Normally this would let you store files directly on the router, such as for NoCatSplash hotspot captive portal pages and other custom configuration.
  • Itsy Package Management System (Ipkg). This would have let you add features from OpenWRT that aren’t already in DD-WRT.
Putting the DD-WRT machine together

First, make sure you have an X86 compatible PC, i386 or greater, which is just about any old PC. You need only 16MB or more of RAM. However, you do need at least two network (Ethernet) cards, one for the Internet and others for the LAN.

Don’t forget a spare hard drive. It must be dedicated to the cause as it will be reformatted and repartitioned.

Though a monitor and keyboard aren’t required, they’re useful if you run into problems, so you can access the console.

Getting ready for the installation

We’re going to use a Windows-based program to upload the DD-WRT disk image to the spare hard drive. So you need to take the drive out of the DD-WRT machine and temporarily put it into a working computer.

On your working computer, you need to download the transfer utility, physdiskwrite, and the desired X86 version of DD-WRT. At the time of this writing, the most current release is v24 Service Pack 1. If going the free route download dd-wrt_public_vga.image or dd-wrt_full_vga.image if you’re purchasing a license.

It’s easier to download the DD-WRT file to the physdiskwrite folder.

Verify the drive assignments

When you upload the disk image to the drive, the utility will be referencing the computer’s drives using the disk numbers. So you’re absolutely sure you have the right disk—and not the one you use every day—you should verify the drive assignments.

You can open the Computer Management program to view the Disk Management utility in Windows:

In Vista, click Control Panel > System and Maintenance > Administrative Tools > Computer Management.

In XP, Control Panel > Performance and Maintenance > Administrative Tools > Computer Management.

The disk numbers (Disk0, Disk1, Disk2, etc.) are shown on the graph of drives and partitions.

Transferring the image using physdiskwrite

When you’re ready, here’s how to install DD-WRT X86 onto your hard drive from your working computer:

1.    Bring up a Command Prompt. If using Vista, click the Start button, type cmd into the search box, right-click the cmd icon, and select Run as administrator. In XP, simply click Start > Run, type cmd and hit Enter.

2.    Navigate to the directory where you have the physdiskwrite utility and disk image. It might be easier to browse to the location in Windows and copy the location from the address bar. Then in the Command Prompt you’d type cd, paste in the path, and hit Enter.

3.    Type physdiskwrite -u dd-wrt_public_vga.image and hit Enter. Adjust the image file name if you’re using a different one.

4.    Type the disk number of the spare drive. WARNING: Remember, this completely erases everything from the drive and you’ll lose any files on it.

5.    After it completes, shut down and unplug the computer to remove the drive and put it back in the DD-WRT machine.

Getting started with DD-WRT X86

After DD-WRT boots up, the router should start working. You should hook the WAN/Internet cable up to the ether0 interface, which is usually the built-in or on-board Ethernet port, if any. The remaining interfaces are for the LAN/network. You can connect them to computers or to a switch.

You can figure out which interface is which by referencing the console screen after hooking up a cable to the interfaces. It tells you the status, which includes the interface number.

The default IP address is of the router is 192.168.1.1. The DHCP server is enabled, just like with the firmware versions, so users will automatically receive an IP. To access the Web GUI, type the IP of the router into a browser. To access the console on the machine, hit Enter. The default username is root and the password is admin.

Read our other DD-WRT tutorials

Now that you have a DD-WRT router up and running—hopefully—take a look at all the tutorials we have on the subject. Maybe extend your range with WDS, build a wireless bridge, use multiple SSIDs, and much more.

Eric Geier is the author of many networking and computing books, including Home Networking All-in-One Desk Reference For Dummies (Wiley 2008) and 100 Things You Need to Know about Microsoft® Windows Vista (Que 2007).

Taken From: http://www.wi-fiplanet.com/tutorials/article.php/3835526

Tuesday, November 22, 2011

TDR test in Cisco Devices - Cable Testing

I love finding stuff like this. In the course of my daily Internet browsing, today I came across this post from a while back on the CCNP Recertification blog. It turns out a number of Cisco switches (apparently the 3560/3750, and some 4500 and 6500 modules) have a TDR (Time Domain Reflectometer) embedded in each interface. How cool is that?

Cisco's documentation shows the simple but very handy two-part command syntax.

   Switch# test cable-diagnostics tdr interface g0/1

TDR test started on interface Gi0/1

A TDR test can take a few seconds to run on an interface

Use 'show cable-diagnostics tdr' to read the TDR results.
   Switch# show cable-diagnostics tdr int g0/1


TDR test last run on: March 01 00:09:06

Interface Speed Local pair Pair length Remote pair Pair status
--------- ----- ---------- ------------------ ----------- -----
Gi0/1 auto Pair A 20 +/- 4 meters N/A Open

Pair B 20 +/- 4 meters N/A Open

Pair C 21 +/- 4 meters N/A Open

Pair D 20 +/- 4 meters N/A Open
This output shows a cable approximately 20 meters in length connected to interface G0/1, with nothing attached to the far end. If you're like me, your first thought is "very cool, but is it accurate?" I grabbed a couple spare cables of various lengths and set about an unscientific benchmark. I measured each cable in three manners: by hand, with my Fluke TDR, and with a Catalyst 3560G-24PS-S. My observed results are below.

Cable Length Fluke 3560 ----------------------------------------------

A 69 ft 69 ft 20 +/- 4m (~66 ft)

B 21 ft 21 ft 6 +/- 4m (~20 ft)

C 83 ft 83 ft 25 +/- 4m (~82 ft)

As you can see, the 3560 is impressively accurate, even without its allowed 4m variance. My next consideration was whether a TDR test would disrupt interface operation. Trying it on a live port while running a constant ping yielded no observable effect, not even a brief disconnection pop-up. This is clearly a very handy tool. I only wish Cisco would do more to publicize cool features like this.
Taken From: http://packetlife.net/blog/2008/mar/28/investigating-ciscos-built-in-tdr/