Computing.Net > Forums > Windows 2000 > Determining Which Cable is Which

Determining Which Cable is Which

Reply to Message Icon

Original Message
Name: Chris
Date: December 17, 2002 at 07:54:08 Pacific
Subject: Determining Which Cable is Which
OS: Win2kAS + WinNT4
CPU/Ram: NA
Comment:

I have the role of Network Administrator thrust on me at work, a nightclub. All the POS (point of sale) machines run on WinNT4 (don't ask me why) and the server and office machines are Win2k Adv Serv (don't ask me why the office machines are servers :| ).

Anyhoos, we are getting a few new servers so that we in actuality have separate networks on each floor of the nightclub. However, all the network cable is jumbled together and plugged into 1 Ethernet Switch.

Now it's my task to figure out which wire goes to which machine.

To do this, I've switched the network of only 21 machines to use static ip addressing instead of DHCP.

Now I'd like to create a small batch file that tries to ping each ip address and appends to a report.txt, so I can determine which IP ADDRESS is no longer responding after I unplug 1 cable and run the script.

However, instead of just creating 1 long boring .bat file (which unfortunately I have, and does work) I'd like to be kinda clever and use an IF structure and some GOTOs along with some sort of counter VARIABLE and 2 VARIABLES... 1 for the Machine Name and 1 for the Machine's IP Address. So basically all I have to do is assign the variables for Machine IP and Name and Counter, then using an IF structure use a GOTO... then change the value of the 3 variables, the use a goto... so that in effect my code that actually does the PINGING and APPENDING to report.txt is in one spot and not repeated ad infinitum.

However, my problem lies in the IF statement (or perhaps my variables). Can someone plz lend some advice to this complete novice :)

Here's a smidgen of my code (testing web-based ip's as I'm currently at home and not at work, once the technical side is known, I can apply it at work :) ):


@ECHO off
SET counter = 3

:BLUESNEWS
CLS
PING www.bluesnews.com
PAUSE
SET counter = 2
GOTO BEGIN

:FILEPLANET
CLS
PING www.fileplanet.com
PAUSE
SET counter = 1
GOTO BEGIN

:BEGIN
IF "%%counter%"=="3" GOTO BLUESNEWS ELSE
IF %%counter% == "2" GOTO FILEPLANET ELSE
IF %%counter% == "1" GOTO END ELSE

:END
::CLS
::ECHO Finish!!!
PAUSE


Report Offensive Message For Removal


Response Number 1
Name: Dave C
Date: December 17, 2002 at 08:17:37 Pacific
Subject: Determining Which Cable is Which
Reply: (edit)

I'm sorry, I can't help with the programming end of it, but if all you want to do is see when a computer is disconnected by unplugging a cord, you sure are going a long way to cover a short distance!

YOu can go to Download.com and find all sorts of network monitoring utilities that are free, graphic based, and can tell you everything you need to know! They quickly scan all IP's, and keep logs of when they lose network connection, whit time, how long, ect ect. Seems far easier to do something like that then to write your program yourself!

but if you prefer to write your own program, and as an old Commodore fanatic, I can't blame you.. you might find more help in the DOS or Programming forums on these boards!


Report Offensive Follow Up For Removal

Response Number 2
Name: wanderer
Date: December 17, 2002 at 08:31:15 Pacific
Subject: Determining Which Cable is Which
Reply: (edit)

So are these home runs to the switch with no patch panel or do you have a patch panel? Is this a managed switch?

First off you want to know more then just what machine is at the other end of the cable. You want to organize this by floor groupings. Any half *&^ cabling company will label the outlets and should also label the patch panel. You should be able to tell the groupings of cables by where they come from as a bunch. You want to number the outlets and the patch or cable end at the switch. I would recommend a labeling format of floor number\outlet number. So the first floor could be A and the outlet 12 giving you A12. Mark this in a diagram posted with the switch.

If this is a managed switch you can logon to the switch and actually see what ports are up and what ports are down when you disconnect them. Even better is a managed switch keeps track of mac addresses per port so if you write down each wkst by name and mac address, you can see in the switch each mac address to each port number. No disconnecting or running scripts required.


Report Offensive Follow Up For Removal

Response Number 3
Name: Mark
Date: December 17, 2002 at 12:35:09 Pacific
Subject: Determining Which Cable is Which
Reply: (edit)

Chris,
The simplest way to see what computer is connected to each wire is to have someone at the workstation and you stand at the switch / Hub. Then have that person unplug the wire from the computer and you watch for the light to go out on the switch. Then you will know what wire it is using. If you missed the light going out just plug it in again and the light should come back on. Then repeat. Hope this helps.

Mark


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Determining Which Cable is Which

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




How often do you use Computing.Net?

Every Day
Once a Week
Once a Month
This Is My First Time!


View Results

Poll Finishes In 3 Days.
Discuss in The Lounge