In this guide I will take you through the steps to seemlessly network a Desktop computer with a Laptop (or another Desktop) in which you are the sole user of both. This guide will discuss the following:
To make sure our intentions are the same, I should give a little background on my setup/situation. I recently purchased a laptop for college and being the geek that I am, I wanted to use it together with my desktop computer. To not do so would be completely retarded. Both the laptop and desktop have WinXP Pro SP1. I have a crappy dialup connection; however, I'm always connected to it on my desktop. Being that my modem is internal and I have no router, it would be wise for me to take advantage of the Internet Connection Sharing (ICS) feature of XP to turn my desktop essentially into a router (technically called a gateway). This would allow the laptop to have basic internet access for tasks like websurfing and chatting, provided that the desktop is on. To connect the two computers, I, of course, have two Network Interface Cards (NICs) and some Cat5, but I'm also using a switch (in case other computers are plugged in temporarily). I occasionally have guests hook up to my network to share files and sometimes attend LAN parties elsewhere. I also recognize the need to be able to browse the desktop files easily from the laptop and vice versa. After all, they're both my computers. And since the laptop is made to be away from home, I need to have some important files synchronized between the two computers. Through this complex but practical setup, the laptop really acts as a mobile extension of my desktop.
There are a number of different setups that you can use to get your two computers networked, though. There are three good possibilities that we shall examine. One is to use a router. This device manages communication between two networks: the Internet (WAN or Wide-Area Network) and a LAN (Local Area Network). You would connect the WAN link into your external DSL/Cable/Dialup modem and the LAN ports thus connect to the individual computers. This is the most popular method to network home computers while maintaining an internet connection. If this option is available to you, I would recommend it. Decent routers cost about $50, and since most computers come with onboards NICs these day, you'll only need to purchase a small amount of Cat5 cable to be in business. If your laptop has wireless capabilities, you may want to look into a wired/wireless router. They cost nearly twice as much but allow you to take the laptop all over your home and still access the internet and desktop files. The following images are some diagrams I made in case you need help visualizing the setups.
Another good way to network two computers is with a switch like I have done. For you to have internet access with a switch, ICS would have to be employed on the desktop. However, you still get the added port availability with or without ICS, which is good for LAN parties. You may hear some old-timers mention using hubs instead of switches, but pay them no mind; although essentially the same device, hubs are archaic and cost about the same as a good switch (unmanaged). You can get away with using neither, though, by connecting the two computers directly together. The secret here is that you'll need a crossover Cat5 cable. These are almost indistinguishable from straight-though Cat5 cables, because only the transmit and receive wires inside have been reversed at one end.
No matter how you do the network setup, once you see the "LAN is now connected" balloon message pop up, you're ready to start the software-level network setup. If you were using a router to connect the computers, your IP addresses should be given out automatically. If they aren't, then connect to the router (see its documentation) and make sure DHCP is enabled or that you aren't manually setting the IP addresses on the computers. To get the TCP/IP settings, go to Network Connections in the Control Panel. Select your NIC here and open its properties. I'd recommend here that you make sure "Show icon in notification area when connected" is checked. This will allow you to check your IP address very easily by clicking the network connection icon in the systray and going to the Support tab. Open the TCP/IP settings by clicking the protocol in the list and clicking properties. To use DHCP on a router or gateway to assign your IP for you, make sure "Obtain an IP address automatically" is selected.
If you're not using a router or ICS, then you can set your IP addresses manually in the aforementioned settings. In the IP address field, enter 192.168.0.1 when configuring your desktop and 192.168.0.2 for the laptop. When you hit OK, an error dialog will pop up about the subnet mask; just hit OK and it will fill it in for you. You can test the connectivity by pinging both computers from the other. Open the command prompt by running "cmd", then type "ping 192.168.0.1" at the laptop. When you hit enter, you should see four ping replies. If instead you see "Request timed out", then you have a problem. [insert generic home network troubleshooting site].
Internet Connection Sharing...
If you want to set up ICS like I did so that your laptop (and potentially other computers) can use the internet, you'll need to already have an internet connection and a free NIC on the desktop. ICS doesn't take long to set up if you do it correctly. Before you get started, you may want to make certain that the necessary services are available for use by ICS and the Network Setup Wizard. At the desktop computer, run "services.msc". In this list, you'll want to make sure the following services are started and set to automatically startup: "Application Layer Gateway Service", "DHCP Client", "Internet Connection Firewall (ICF) / Internet Connection Sharing (ICS)", "Network Connections", "Network Location Awareness (NLA)", and "Remote Access Connection Manager" (if you have SP2, you may not have some of these services named the same). You will also want to make sure "Computer Browser" and "Server" are set the same way as you'll need these for file sharing later. Now you should run the Network Setup Wizard to set up ICS. You can get to it from a number of places: the left pane tasks of the Network Connections folder, the start menu at Start>Programs>Accessories>Communications, or just run "%SystemRoot%\System32\rundll32.exe hnetwiz.dll,HomeNetWizardRunDll". I personally like using this wizard to set up ICS on the gateway computer (the desktop) because it will help to get all the kinks out that one may miss when setting up ICS manually. When it opens, click next a couple times. At the "Select a connection method." step, make sure the top item is checked. At the next step, select your modem or the NIC that connects to your external modem. You may be asked about bridging connections in the next step. Generally, you shouldn't bridge the connections unless you have a specific reason to do so. Then, you're asked about the computer's name and description. You've probably already filled in the name and description is not required, so go on. The next step asks for the workgroup name. You can leave it MSHOME, but I'd suggest something else (some people use their last name here). The next step displays a confirmation, and then it should successfully complete the wizard in about a minute.
When setting up the laptop for ICS, you can use the same wizard, but I'd recommend doing it manually for stability. Go to the System properties (Win + Break) in the Control Panel. In the Computer Name tab, make sure you "Change..." your workgroup to the one you used when setting up the desktop computer's ICS. You can also change your computer name here. Computer names will become important when sharing files and folders. You'll be asked to restart when you hit OK; you can do this anytime before continuing to the next section of this guide. Next, go to the TCP/IP settings for your NIC (on the laptop still). "Obtain an IP address automatically" should be selected so that your IP address is given out by the desktop computer. The same will happen with any other computers that connect temporarily to your network (assuming the desktop is on), making LAN parties hassle-free. In the Domain Name Server fields below, set the "Preferred DNS Server" to your desktop's IP address (192.168.0.1). Click "Advanced...". In the "Default Gateways" section, click "Add...". Enter the desktop IP address again here. OK out of these four windows and then wait a second while Windows gets your IP from the desktop. The internet connection on your desktop should be shared now. Connect to your ISP on the desktop if you aren't connected already and then try to open a website from your laptop. Instant messengers should also work from the laptop. However, if you want to run something like eMule, you'll need to set up port forwarding from the desktop modem's properties ("Advanced" tab, click "Settings...").
If you're using XP Home on either computer, you will have to stop at this step. This is because the Home version only allows "Simple File Sharing". To set these computers up to have two (or more) levels of share permissions, we'll have to disable "Simple File Sharing" and use what I call NTFS-style sharing (because it uses Access Control Lists like NTFS security). To turn off "Simple File Sharing", open a Windows Explorer window and go to "Folder Options" under the "Tools" menu. In the "View" tab, uncheck "Use simple file sharing" at the bottom of the "Advanced Settings" list. Do this for both computers.
Now you need to make sure Guest accounts are enabled and usable on both computers. Guest accounts allow network users to view your shared files like "Simple File Sharing" would. They'll only have permission to view shared files that allow "Everyone" or only "Guests". You don't have to worry about the Guest account if you don't plan to share any files with other people, even when taking the laptop on the road. However, to plan to not share files is probably an oversight, so you might as well make sure this works now instead of when you need it.
To test the Guest accounts on your two computers, you have to type the name of the opposite computer prefixed with two slashes into the address field in Windows Explorer (alternatively, you can browse to the computer by going to "My Network Places>Entire Network>Microsoft Windows Network>workgroup name>computer name"). For example, to access my desktop shares from my laptop, I would type in "\\serpent" in the address field. Unless you were sharing files already with "Simple File Sharing", you probably won't see any shares except "Shared Documents" at this time.
If instead you see an error message about not having the right permissions, you'll need to edit some advanced Group Policy settings on the computer you're trying to access. To do this, run "gpedit.msc". Browse to "Computer Configuration>Windows Settings>Security Settings>Local Policies". If you got an error saying "Logon failure: account currently disabled.", open the subfolder "Security Options". Make sure the setting "Accounts: Guest account status" is set to enabled. Note that this is not the same as the Guest account when you logon to your computer; this is only for network logon, thus it won't appear on the Welcome Screen. If you got an error saying "Logon failure: the user has not been granted the requested logon type at this computer.", open the subfolder "User Rights Assignment". Make sure the setting "Deny access to this computer from the network" does not contain "Guest(s)" or "Everyone". While you're looking at the Group Policy settings, go to the "Security Options" folder and make sure "Network Access: Sharing and security model for local accounts" is set to "Classic" and not "Guest Only". This will allow Guests and other user accounts to be accessible, which we'll need for the next section.
Access Control Lists...
When "Simple File Sharing" is disabled, you'll be able to use Access Control Lists (ACLs) to determine which users have what access to what files. This is immensely powerful, however you probably won't run into too many opportunities to use it. By default, when you share a folder, it will give Read access to Everyone. This is the default permission setting for "Simple File Sharing" as well. It means exactly what it sounds: everyone that connects to your computer will have access to the share provided they have a local account or the guest account is enabled (however, this does not include anonymous logons unless enabled in the Group Policy settings). Read permission means that a user can list folder contents and read files. Change permission means that a user can create, modify, and delete files and folders. I wouldn't recommend setting anything shared to Everyone to Full Control permission, though, as this entails that users can change permissions on files and folders. It's also a good practice to only keep the default "Shared Documents" set to Change permission and make sure to move out files that you want to keep from there.
There are two ways to share folders. The easiest way is to right-click a folder in Windows Explorer and select "Sharing and Security...". Then you click "Share this folder". Go to the "Security" tab if there is one (there will be if the drive the share is on uses NTFS) and click "Add..." if there is no Everyone group listed. Type "Everyone" in the box that comes up and hit OK. The permissions here default to reading files like the share permissions did. You should change these to match the share permissions if needed. If Everyone is given access via share permissions and not NTFS security permissions, then the share will be visible but can't be opened.
The other way to share is with the Computer Management console. Although this isn't as straight-forward as the first method, it offers better management of shares. You can open the Computer Management console by running "compmgmt.msc". Browse to "System Tools>Shared Folders". To add new shares, open the "Shares" folder and then right-click and select "New File Share". A wizard will come up to walk you through it, however be mindful about which permissions you end up setting with the wizard. This folder is generally useful just to see what you're actually sharing as a whole and then removing old shares if desired. In the adjacent "Sessions" folder, you can see a list of all the network users connected to your computer and some statistics (like whether or not they're a guest). You can also close a user's session, which closes their open files and forces them to relogon to continue. The "Open Files" folder shows all the network users' open files, which you may close from here if you want to piss them off.
You may have noticed a few more odd shares in the "Shares" list of the Computer Management console. You'll typically see ADMIN$, C$ (D$, etc.), and IPC$. These are called Admin Shares. We'll be using these to share all your files. Don't worry, though, because they aren't published in your list of shares and have permissions set to only allow access to local users that are in the Administrators group. You cannot edit these permissions, however you do not need to. You only need to create yourself another account that's in the Administrators group on each computer. This could be a slight issue if you've named your primary logon account name the same on both computers (for example, if I logged on to both computers named as Snake), but it'll still work.
In the Computer Management console, browse to "System Tools>Local Users and Groups>Users". Right-click and select "New User...". If you have different primary logon names for the laptop and desktop, then use the username and password for the opposite computer here. Uncheck "User must change password at next logon", check "Password never expires", and click "Create". If you didn't give your accounts passwords originally, you'll still need to use one when creating the new matching accounts. Then you can change the original accounts to have matching passwords by right-clicking on them and selecting "Set Password...". There's one last step you'll need to take on your new matching accounts before they'll work with Admin Shares, though. You have to make them a member of the Administrators group. You do this selecting "Properties" in the right-click menu. Go to the "Member Of" tab and click "Add...". Type "Administrators" in the window that opens. Hit "Check Names" and then "OK".
If you had the same primary account name on both computers, then you'll be doing about the same thing. You'll need to come up with a new admin account name for both computers. These will be used only for the admin shares. For example, if both my primary logon account names were Snake, then I'd have to create two new matching accounts on both computers and they could be named something like ShareDesktop and ShareLaptop. They will need the same account settings mentioned above. If you feel more comfortable creating accounts using the User Accounts options in the Control Panel, that will also work.
Mapped Network Drives...
Now that we have our cross-linked user accounts with admin privileges, we can take advantage of those Administrative Shares. You could access them by simply opening the other computer plus the share name. For example, "\\serpent\c$" would open my desktop's C drive. The same method will work with all your hard drives. However, Windows can make accessing the admin shares even easier with Network Drive Mapping. The idea behind this is that you can link a local logical drive with a remote physical drive or share. The mapped drive will appear like any other drive in Windows, which allows you to save and open files from the other computer a lot quicker.
To use the Network Drive Mapping, open Windows Explorer. Under the "Tools" menu, click "Map Network Drive...". Select a drive letter to map the drive to. It doesn't matter what letter, however one near the end of the alphabet is preferable in case you add more drives to your computer. If you have multiple drives, keep them in alphabetical order when mapping for simplicity. In the folder field, type the name of the computer followed by the admin share name (don't forget the $ symbol). For example, to map to my laptop's C drive, I would enter "\\serpentmobile\c$". Don't try to browse, because admin shares are hidden anyways. Make sure "Reconnect at logon" is checked and then click "Finish". If you get an error, try ending your session from the opposite computer using the Computer Management console mentioned earlier.
If you had the same primary account name on both computers, you need to click on the link that says "Connect using a different user name." In the box that opens, you will need to type in one of the the two new matching user accounts you made and then the password.