Why Network Troubleshooting Will Change Your Life.
OK maybe it won’t change your life but it will demand a considerable amount of your time until you get it running properly.
Windows domain best practice is to use the domain server/s for DNS & DHCP. While these features are typically enabled on routers they cause a lot of grief on a Windows domain. Routers may know where the main DNS servers are on the Internet but they have no idea where your network servers are.
Consequently, the router will start looking for your server on the Internet 1st and then start interrogating your network. That yields an unnecessary lag time for searches for machines that are on your network.
This article primarily addresses a single server domain but the principles are similar for larger environments.
DNS – Domain Name System
If you are experiencing a lag time trying to find or connect to your server using a Fully Qualified Domain Name (FQDN) then your network may be misconfigured. Best practice is to have your DNS server reference itself and all the other PCs get their information from the local DNS server.
Since we are mainly focused on single-server domains then DNS will be on the domain controller.
Example:
domain – example.com
LAN – 192.168.0.xxx
gateway – 192.168.0.1
server.example.com – 192.168.0.2
DNS – 192.168.0.2
Once we setup the server static IP to use itself for DNS then the server won’t have any problems finding machines on the local network.
DHCP – Dynamic Host Configuration Protocol
The easy way to setup PCs on your network is to use DHCP. This tells the device where your DNS server, gateway are in addition to assigning an IP address from a pool. For a home setup it’s easy enough to let the Internet router take care of these responsibilities. For a domain, however, we want our server to handle DNS and DHCP too.
We will want to disable DNS & DHCP on the router (gateway) and add the roles to the server.
The DHCP server will issue is from our address pool and set the client PCs DNS to use the server ip for DNS.
Static ip Addresses
Machines like the server need static ips so that we always know what address it has. If you allow devices to use DHCP addresses then they may or may not get the same ip every time which can lead to more network problems for devices you connect to via an ip.
In our example, the server is at 192.168.0.2 on our Local Area Network (LAN). That means we had to assign an ip outside of the DHCP pool, subnet mask, gateway and DNS server (itself).
Best practice is to use a static ip for your server so we don’t end up with some sort of conflict. If other devices use static ips, then you will need to adjust the DNS on those devices if they are not set to your server.
In Conclusion
Network troubleshooting may not change your life but it will definitely improve the quality of time you spend on your attached computers.
Windows 7 sometimes has issues with printing to a local printer using a Remote Desktop Connection (RDC).
The 1st step is to verify that printers are checked on the Local Resources tab of the Remote Desktop Connection. It is checked by default.
Local Printing Using Remote Desktop – Install the Same Driver
Local Resources – RDC
If you have the same printer model at home as one at the office then Windows may be confused. It’s best if you install the same printer driver for office & home. The best bet is to check the manufacturer’s website for a driver that fits all of the Operating Systems involved.
Example:
Scenario – Home & Office both have Gestetner P7325N printers. Office Print Server is 2003 Standard while the connecting remote PC & the Office PC is Windows 7.
Common driver for most Operating Systems – PCL Mini Driver 2.16
32 bit Operating System/64 bit Operating System
32 bit & 64 bit machines may also complicate the process. If necessary install the driver 32 bit O/S on a 32 bit machine & the 64 bit driver on a 64 bit machine. Share both printers & PCs can then choose a matching printer.
You can ascertain if your PC is 64 bit by right clicking “My Computer” and selecting properties. In the System section you will see “64-bit Operating System” or something similar if it’s 64-bit. 32-bit Operating Systems may just list the Operating System without denoting it as 32-bit.
Add Printer Wizard
Also check to see if you can add a local printer on the remote PC.
Run the Add Printer Wizard for “Local Printer” & find any printer that has the PC Name attached to it. It may not look remotely like the printer you are searching for but there probably won’t be a lot of choices.
How remote desktop connections make you a better worker.
Using a remote desktop connection lets you effectively get to work faster and address the situation ASAP.
Creating Remote Desktop Connections
Remote Desktop Connections allow you to remotely control host machines via the magic of the Internet and RDP (Remote Desktop Protocol).
For the purposes of this article we will assume you are connecting from your home PC or laptop to a remote office (remote host). This means that we will need access to the router at the office.
Hypothetical Remote Host:
FQDN – mymail.somecollege.edu
the default port for RDP 3389
no VPN (Virtual Private Network)
static IP
connect to a host on the WAN (WAN – Wide Area Network)
Typically we would ping the FQDN to make sure the IP is valid. Since this is a non-existent machine that won’t work so we’ll pretend it translates to a usable IP.
Remote Desktop Connections Home or Work
If we wanted to control our PC from work then our PC at home would be the remote host and we would need to access the router at home.
If your PC or laptop is connected to the host’s LAN then you could possibly access host via a private IP on your (e.g., 192.168.x.x or 10.x.x.x,). Private IPs are not routable so only work on the LAN.
Setup PC or Laptop
When we setup Remote Desktop Connections we need the IP address or fully qualified domain name (FQDN) of the host. You can usually find your public ip by visiting a site like WhatsMyIp.
You can get to the Remote Desktop Connection (RDC) program by clicking Start and typing “Remote Desktop Connection”. You won’t have to type more than a few letters before you will see the program.
Once you have the RDC window open you can enter the FQDN or the public ip of the PC in the Computer field.
I prefer to save my connections for future use by clicking Show Options. This will allow you to save the User Name and credentials. If this is a shared machine then you should click “Always ask for credentials“.
Setup Remote Host Machine
The host has to be prepared for this remote connection so we have to enable remote control. You get to Remote Settings by right clicking My Computer and selecting Properties. Allowing Remote Control of your PC opens the RDP port in the Windows Firewall for you.
We will give our host machine a static ip of 192.168.1.100 so it can be found by our router when we connect via RDP. Typically machines use DHCP to get the private IP gateway, DNS, and other network information. If you run ipconfig from a CMD prompt you will see the information you need to setup a static IP.
If you have a software firewall like Zone Alarm you will have to allow the incoming IP or block of IPs. This can be a problem if you connect from many places or your IP changes often. If that’s the case a remote control application like TeamViewer will be much easier to setup.
Setup Router on Host’s LAN
OK, the host is setup and you have an RDC connection. The final piece of the puzzle is to add the router NAT (Network Address Translation). The router is the gateway to the Internet at large. The public IP of our entity mymail.somecollege.edu is probably the same IP as the gateway.
When the RDC connection connects to the public IP it’s up to the router or a VPN to find the host machine. In our case, it’s the router that will determine where this host is. The location of the settings vary but it usually something like “Port Forwarding”. The router will also determine if only your home IP is allowed to make this connection or if it’s open to the public. Strong passwords will help secure the connection if the host is open to the public.
For RDP, the protocol used by Remote Desktop Connections, we need to forward traffic to the private IP of our host using port 3389. If we specified a port in our connection then this port would have to be forwarded to the private IP of our host and change the port to 3389.
Example:
RDC using default port 3389
mymail.somecollege.edu –> forwards traffic to port 3389 to port 3389 on the host machineRDC using port 3390
mymail.somecollege.edu:3390 –> forwards traffic to port 3390 to port 3389 on the host machine
It’s also possible to hack the registry port for the specific machine for RDP but most routers handle this for you.
In Conclusion
You really are a better worker using remot desktop connections so it’s worth the effort to get them working.
Note: There are alternatives like Teamviewer and LogMeIn which are easier to use but can be costly.
Combining Multiple Networks can be tricky. Perhaps you had everything on the same network and replaced or introduced new hardware.
Let’s say that you have a small network with printers, PCs, Macs, connected via a switch to your Internet Service Provider’s, (ISP‘s) router/modem. This is not the best network design but it’s common for home and small offices. For the most part this network will work OK but you lose some security & versatility by using the ISP provided router/modem.
If our router/modem fails in the above scenario you will typically call your ISP to provide another router/modem. Since they are not likely to configure the router/modem you may end up with a new network. Let’s say that they switched you from the LAN of 192.168.0.1 to 192.168.1.1.
Since you are now on a new network anything with a static ip won’t work. DHCP devices should be fine. There are several alternatives to fix the new network:
Change the router subnets.
Technicians connecting network cable.
While this is the simplest change there may be issues that you don’t foresee and you won’t get a lot of help from the ISP. This also requires you to have the credentials. Typically you can find these on the router itself unless it’s been changed. Even if it has you can use a reset.
You may find yourself stranded from the router if you are connecting through the existing network. That’s one reason you need a direct connection to the router. All in all this simple change may be the most intimidating.
Change the Printers with static ips
Printers typically are assigned static ips which are outside the scope of DHCP. This prevents a conflicting ip from showing up on your network. In general printer ips are not that difficult to change through the menu. In some cases, you may need credentials to make the changes.
You will need to update the ip on the ports of printers or just remove & add the printer. The latter is the best method since it will force the computer to download the driver.
You may also need to calibrate your printer to make sure image quality is OK.
Windows 8
Windows 8
Windows 8 adds another obstacle to making changes. For starters there’s no start bar. You can swipe from right edge and search for Printer or Control Panel.
You can use the Charm bar (position mouse in the top or bottom right corners of the screen or Windows C) to search. An easier method is to right-click to get the lower left corner of the screen. This opens the Quick Access Menu. Likewise Windows “i” opens another Charm Bar Settings with the Control Panel.
Once you get into the printer properties changing the printers is much the same as in Windows 7. It’s probably best to just remove the printer and add it back with the new ip.
MAC
Macs make things easy but it’s not always apparent that you are getting the results you want. Once your printers are up and running on the new ip it’s simple enough to go to any print menu and add the printer.
The preferred method is to delete the printer from the Print Center (/Applications/Utilities/) and then add the printer with the new ip.
Testing
You will want to print a test page from all workstations and check the print quality. Look closely since some issues may clip the print and/or use too wide a margin.
Microsoft changed its name from SkyDrive to OneDrive and promised that there would not be anything we would have to worry about.
One day I noticed that some of my files were not current on OneDrive.
Although this article specifically addresses issues with OneDrive it applies to other cloud services like DropBox & Google drive in a general way. If you have issues with updating from your existing cloud service some of these steps may help.
My Workflow
New Workflow
My workflow used to be entirely in the cloud but that didn’t work out.
Maybe you will have better luck with OneDrive Duplicate Folders.
My unconventional advice is to work on files locally and then propagate them to the cloud solution of choice.
I prefer DropBox as it hangs up less on me than OneDrive.
I typically do my work on my desktop and let it synchronize to my laptop & phone.
Old Workflow
I use Dreamweaver to maintain about 50 sites and the SkyDrive path is part of the setup for the sites. I also have an XAMPP test server setup in Dreamweaver for the 50 or so websites I handle. I use a host reference for simplicity in accessing my files from a browser.
I backup Dreamweaver by exporting all the sites to a folder so I can easily re-create the sites on a new PC and/or my laptop.
I use Git repositories & external repositories for version control.
The Problem – OneDrive Duplicate Folders
Everything worked fine for some time. Then one day I noticed that I wasn’t seeing fresh files downloaded from the cloud. Further investigation showed two OneDrives in my User folder. The set with the cloud icon was being uploaded and the other was not.
Figure 1 – New & old OneDrive (old SkyDrive)
It wasn’t obvious how I ended up with two OneDrive folders. Further investigation showed one had OneDrive in the path while the old folder had SkyDrive. Naturally all my paths in Dreamweaver were set to the latter. Ditto for my test server.
New OneDrive path
C:\Users\Randy\OneDrive\webroot
Old OneDrive path
C:\Users\Randy\SkyDrive\webroot
Possible Solutions
I tried unlinking and re-linking to OneDrive but that didn’t merge the double OneDrives.
Next, I tried uninstalling & re-installing OneDrive. That started the OneDrive folder over again and just downloaded the files from the cloud which was not what I wanted since those had not been updated.
The Solution That Worked
Lastly, I uninstalled & re-installed OneDrive while pausing the installation at the 1st step. This time, I copied my updated files into the newly created OneDrive folder. That took a while since I had over 7G & thousands of files. Once it was copied over, I let the OneDrive installation finish. Finally, OneDrive was updating as I wanted.
That still left me with the original OneDrive folder. I could probably have moved them rather copying but I like to make sure things are working as I expected before burning that bridge.
Fixing Dreamweaver
Now I had to correct the paths in my Dreamweaver setup so that I could use the new OneDrive. Otherwise, the files wouldn’t be updated. To make sure I was using the correct folder, I moved the original OneDrive (SkyDrive) folder so there wouldn’t be any confusion. I could have just deleted it but I like to make sure everything is working properly before taking that step.
Changing the paths for each site & the test server became tedious with 50 sites. I created a fresh set of backups for all my sites and used a tool to manipulate the .ste files to change all the references to SkyDrive. Once the files had the proper reference, I removed all my sites & imported the new setup files.
NOTE: The Dreamweaver backup files are XML so editing is not an issue. The password hash is not difficult to decode so make sure these are stored in a secure location.
Fixing My Test Server
XAMPP Apace files had to be updated to use the new path.
httpd.conf (c:\xampp\apache\conf)
<Directory “C:\Users\Randy\OneDrive\webroot”>
Options Indexes MultiViews
Order Allow,Deny
Allow from all
</Directory>
hosts – C:\Windows\System32\drivers\etc Open editor as administrator
127.0.0.1 oneroot.loc
Fixing Git Repositories
My initial problem was that my OneDrive folder was not uploading to the cloud and consequently not propagating to my other devices. I wasn’t sure how long this had gone on but it seemed recent.
After getting my OneDrive back in operation, I found that there were some places that had not synched properly. I suspect that the copy in the cloud must have taken precedent over my final copies on my PC. This is where Git proved to be a lifesaver. I reviewing the histories of the out of date websites & found that it showed local changes had not been incorporated. After merging everything was as I expected it. I reviewed the history of all my websites and found only a couple that needed merges. These were recently updated sites that never uploaded with the old OneDrive.
The merge folder created the additional versions of my affected files so I added entries into .gitignore to ignore them.
Example:
Figure 2 – merge created files with the name of my PC
I added the following to my .gitignore so the newly created files wouldn’t be an issue.
*Randy-660s*
It was comforting to not only fix my synchronization problems with Git but also vindicate the rest of my websites.
Fixing My Laptop
I had to repeat the same steps that I used for my PC on my laptop.
Uninstall OneDrive
Start the install & pause it while copying the SkyDrive files into the newly created OneDrive folder.
Finish the OneDrive install after files have finished copying
Move the SkyDrive folder to an external drive
Remove Dreamweaver sites
Import Dreamweaver sites
Setup XAMPP apache files
Setup host file
The Unconventional Fix that Works
What works best for me is to selective synchronize folders and keep copies on my external drive.
For static files that don’t change much, they can be uploaded to the cloud and removed from synchronization.
I set the main folders to synchronize and uncheck the sub-folders. That way I can add to the folder & get it uploaded.
This is not a totally automated but it’s the unconventional fix that works for OneDrive Duplicate Folders.