Create a mesh between two computers. How to set up a local network between two computers

💖 Do you like it? Share the link with your friends

29. 07.2018

Blog of Dmitry Vassiyarov.

How to create a local network between two computers - instructions

Hello.

In order not to quarrel with household members over who will take up space at the computer, many families acquire several PCs. There is often a need to transfer information from one to another. You don't have to use a flash drive if you combine them together. You can do the same at work.

In this publication, we will look at how to create a local network between two computers in various variations: with and without the Internet, via cable or Wi-Fi modules. You will also learn how to open full or partial access to the contents of one computer for other profiles.

Setting conditions

I will name general provisions that should be adhered to in any case:

  • All devices must have network adapters with working drivers. You can check this in Device Manager (Win+Pause/Break and select the desired section in the list on the left).

You need that under the line “Network adapters” there are no items with a yellow triangle, which indicates uninstalled firewood. If it is, click on the device and select the “Update Drivers” command.

  • It is advisable not to connect more than 3 PCs to the network if one of them will distribute the Internet. Otherwise they will all work slowly.
  • To organize a wired connection, you will need a twisted pair cable with an RJ-45 interface. It's inexpensive. Its length should be slightly greater than the distance between the computers.

  • If you connect several computers to one, you can use a network hub (hub), since you will not have enough connectors.

Physical connection

First, I’ll tell you how to combine hardware at the physical level in different cases:

  • If one of your computers has a wired Internet connection, you can use it from another device. It is enough to connect them with the above cable: plug one end into the network card of one computer, the other into the other.

  • Do the same when you need to organize a network without the Internet. For example, to use one hard drive.
  • Do you have a router? Then every device should be connected to it. In this case, a separate Internet cable from the provider must be connected to the router itself.

After merging the computers, you can proceed to setting up the system. In any case, it assumes the same actions. I’ll tell you using Windows 7 as an example. In subsequent generations, the algorithm is the same.

Setting a name for the group

First of all, we set the name of our network, because it must match on all computers:

  • Right-click on “My Computer”.
  • We enter “Properties”, and then into the section with additional parameters.
  • In the window that opens, we need the “Computer name” tab.
  • Next is the “Change” button.

  • In the line where the cursor is, enter the new name. Usually this is WORKGROUP.

Do the same on each machine.

Network and Sharing Center

To get into it and configure it, do the following:

  • Right-click on the Internet connection icon, which is located in the lower right corner of the screen, and select the appropriate item.

  • In the new window on the left side, find the “Change advanced settings” section.
  • The first 4 checkboxes must be enabled for all participants.


  • Scroll down and uncheck only the “Enable password protected sharing” option.
  • Don't forget to save your edits.

Assigning an IP address

If you are organizing a network using a router, then this step can be skipped. The fact is that the device itself assigns to computers via a DHCP server. When it is not there, you have to set them manually:

  • In the same Control Center we will work in the “Changing adapter settings” section.
  • Right-click on the desired connection to open “Properties”.

If you strictly followed the instructions, a window will pop up from the operating system or installed antivirus to select the connection type. Set the "Home Network" option.

Internet distribution

You don’t have a router and the Internet cable is connected to only one of your computers? You can allow other network participants to use the World Wide Web like this:

Just in case, I will warn you that these steps must be performed only on a computer with the Internet.

Wireless connection

You can organize a wireless mesh if your devices have a built-in or separately connected Wi-Fi module.

For this:

  • Go to the same Center.
  • Open the “Changing adapter settings” tab to check the activity of the modules on all computers. If not, the icons will be gray. In this situation, right-click on them and turn them on.

  • Return to the main menu and click on the “Set up a new connection or network” box.
  • Check the “Computer to Computer” version and click “Next”.

  • Read the rules and move on.
  • In the first field, enter the name of the network, and in the second, select the security method. Are you tired of entering your password every time? Please indicate the last point. But I recommend installing WPA2, since a code made of numbers and letters is more difficult to crack.
  • Save your work.

We allow you to use folders

So that you can access the folders of another from one computer, you should make them accessible. In slang, this action is called sharing. You can run it either for a separate folder or for an entire local drive.

Let's start with the first option:

  • Right-click on the object.
  • In the context list, move the cursor to the “Sharing” item.
  • If you are going to allow other profiles to only view the contents of the folder, select the “Sharing - HomeGroup (Read)” option; if you change it, then record it.

Do you want to allow other network members to use all the contents of the hard drive? Then follow these steps:

  • Go through the first two steps of the instructions above.
  • Now you have only one option available - “Advanced settings...”.
  • In the new window, click the button highlighted in blue with the same name.
  • In another window, check the top box and click the “Permissions” button.
  • If you intend to provide other participants with full access and the ability to change the contents of the disk, check the appropriate boxes.
  • Save your changes.

I think you have received the necessary information on all issues regarding the organization of a local network. On our blog you will also find answers to questions on many other computer topics.

Come again.

A local network (in our context, a home network) is a group of interconnected computers, laptops, printers, and televisions located within a house or room.
Advantages of using a local network:
- Access to general network services.
A) seamless exchange of file resources over the network (no need to transfer a file (photo, music, movie) from one computer to another using a USB drive; you can transfer it using a local home network).
B) Using a network printer. If you have a printer installed at home, using your home local network you can print from any computer/laptop to this printer.
C) Using a home network to build a gaming area. Many games support playing over a local network, and if you have one, you can play games with computers on your local network.
- All participants in the local network can access the Internet (if configured). If you use Wi-Fi to build a home local network, then tablets and phones can also be connected to the local network and access the Internet from them.
A local home network can be created in various ways, I will give diagrams of the most popular of them, starting with the most primitive and ending with more complex methods, with setting up the Internet on a local network.

Connecting two computers/laptops into a home local network using a network cable.

Let's look at the simplest way to connect two computers into a home network (computer - computer or computer - laptop). For this we need two computers/laptops and one network cable. Modern network cards are able to recognize what type of crimp your network cable has, so you can crimp it or buy a crimped cable Computer-Hub/Switch (direct crimp).

A schematic computer-to-computer connection looks like this:

The advantages of this method of creating a home network:

All you need to create a network is a cable and a clear head.

In this way, in most cases, you can only connect two computers/laptops, since most computers/laptops have one network card.

You must manually enter the IP address and mask on all computers/laptops on your home network.

Connecting several computers/laptops into a home local network using Wi-Fi.

For this method, you will need Wi-Fi on your computers/laptops.

Connection diagram:


The advantages of this method:

No wires

High workplace mobility

Connecting network devices into a home local network using a switch (switch).

For this method we need several computers/laptops, the same number of network cables and a switch (hub). The general connection diagram using a network switch looks like this:


Those. We connect one of the devices (laptop, computer, printer or TV) to each switch port.
The advantages of this method:
- Ability to connect more than two computers/laptops to a local network (depending on the number of ports in the switch)
Minuses:
- You need to additionally buy a switch (switch), it costs about 500 rubles.
- You must manually enter the IP address and mask on all computers/laptops on the local network.

Connecting computers into a home local network using a router.

Using a router, you can set up a home local network with the Internet; if your router supports Wi-Fi wireless data transfer, then in addition to computers, laptops, printers, and televisions, you can add tablets and phones to the local network.
Scheme of a home local network using a Wi-Fi router/router:


With this method of creating a local home network, you need to enable DHCP on the router - a service responsible for automatically distributing network settings (this function is enabled by default).
Pros of creating a home network using a router:

Helps to connect various devices (computer, laptop, printer, tablet, smartphone) into one local network.

Ability to set up Internet on your home network.

There is no need to manually configure network settings on each device.

The need to purchase a router (from 1000 rubles) and configure it.

By connecting two computers via a network, users can exchange information without using external devices. Transferring data over a local network is more convenient and faster than transferring data via email or, for example, a flash drive. A network between two computers or between a computer and a laptop is created in the same way.

Let's look at the hardware for creating the simplest peer-to-peer local network. For it, two computers equipped with a network card (network adapter, Ethernet adapter, network card) are enough. This device is necessary for interaction - signal transmission between devices on the network. The required controller may be built into the motherboard. You will find its output above one of the USB ports. Check for an updated driver. Communication lines for connecting computers to a network can be: wired, cable, radio channels. The most common and easiest way is to use a copper conductor. A more expensive conductor is fiber optic cable. Copper network cables come in varying degrees of security. To increase noise immunity, the wires are wrapped in foil, which serves as a reflective screen. You can find a suitable network cable at an office equipment store. To create a local network between two home computers, an unshielded twisted pair cable is sufficient. The four-pair CAT5 cable is most commonly used. Take a cable no more than 100 m long, crimping its ends using an RJ45 connector with special crimpers. Now it connects to the device without soldering or welding. If the indicator on the controller is on or blinking, then the cable is connected correctly. You can buy a ready-made, already “crimped” cable. Now all that remains is to configure the computers to exchange information over the local network, register their IP addresses, and open access to certain files and folders. In the Control Panel, go to the Network Connections section. There may be several of them, look for “Local Area Connection”. In the context menu of the connection (right mouse button on the icon), click “Properties”. A window will open, highlight the line “Internet Protocol (TCP/IP)”, click the “Properties” button. Check the radio button for “Use the following IP address:” and write down the computer’s IP address. It should be in the range 192.168.0.1 – 192.168.0.254. If there are two computers on the network, then their addresses can be “192.168.0.1” and “192.168.0.2”. Don't forget to click "OK" in each window. Make the same settings on another computer.


Go to the “Network Connections” window in the Control Panel, double-click on the icon to open “Local Area Connection”. If the “Status” field is “Connected,” then you have completed all the settings correctly. “Connection restricted” – indicates an error has been made. To open access to a folder on your computer, right-click on the folder or drive and check the “Sharing and Security” box. Through “Network Neighborhood” they will become available for data exchange in the group.


The last step is to set a computer name on the network and create a workgroup with a common name. Open the “Run” window (“Ctrl+R”), enter the command “sysdm.cpl” in the input field. It will open access to system properties. Specify a common name for the workgroup. For example, "WORKGROUP". Or open the computer properties, in the “Computer name” line, enter the name of your choice. For all settings to work, restart your computer.

It is not necessary to set a permanent IP address; you can skip this step, but with it the connection will be established faster. Computers equipped with wireless network cards can be connected to a network without cable connectors via a Wi-Fi router. No more equipment is required to create a network.

We are starting to publish a series of articles on the topic of deploying a small (within a home or small office) local network and connecting it to the Internet.

I believe that the relevance of this material today is quite high, since just in the last couple of months several of my friends who have a good knowledge of computers in general asked me questions about network topics that I considered obvious. Apparently they are not for everyone ;-)

Throughout the article, terms from the networking field will be used, most of them are explained in the mini-FAQ about networks compiled by Dmitry Redko.
Unfortunately, this material has not been updated for a long time. Although it has not lost its relevance, there are quite a lot of gaps in it, so if there are volunteers to fill these gaps, write to the email indicated at the end of this article.
The first time you use a network term, it will provide a hyperlink to an explanation of it in the FAQ. If some terms are not explained throughout the article or in the FAQ, feel free to mention this fact in where this article will be discussed.

So. In the first part, the simplest case will be considered. We have 2 or more computers with a network card built into the motherboard or installed separately, a switch (switch) or even without it, as well as an Internet channel provided by the nearest provider.

Let us note that all computers have the Microsoft Windows XP Professional operating system installed with Service Pack version 1. I will not say that this is the most widespread OS currently installed on computers, but it would take quite a long time to consider all the existing families of the same Microsoft (but if there are many suffering, we will analyze others). OS language version is English. In the Russian version, everything will work in the same way; readers will only need to find the correspondence of the Russian analogues of the names in the screenshots presented below.

If we have only two computers and there is no switch, then to create a network between two computers we need a network card in each of them and a cross-over cable to connect the computers with each other.

Why cross-over and why is a regular cable bad? In the 10 and 100 Mbit Ethernet standards (10Base-T and 100Base-TX), 4 wires are used for a twisted pair (two pairs of wires twisted together). Typically, a twisted pair cable has 8 wires, but only 4 of them are used (all eight are used in Gigabit Ethernet).

After receiving the cable, we connect the network cards of the computers using it and voila - everything should work (at the physical level). To check the functionality of the network at the physical level (signal level), it makes sense to look at the indicators (most often green) that are located on the network card near the RJ-45 connector. At least one of them must be responsible for indicating the presence of a link (physical connection). If the indicators on both network cards light up, then there is a physical link and the cable is crimped correctly. A lit indicator on only one of the two cards does not mean that everything is in order at the physical level. The blinking of these (or adjacent) indicators signals data transfer between computers. If the indicators on both cards do not light up, then the cable is most likely incorrectly crimped or damaged. It is also possible that one of the network cards has failed.

Of course, what is described in the previous paragraph does not mean that the operating system sees the network card. The lighting of the indicators only indicates the presence of a physical link between the computers, nothing more. In order for Windows to see a network card, you need a driver for this card (usually, the operating system itself finds the one you need and installs it automatically). Quote from the forum: " Just yesterday I diagnosed a case with a connected network card that was not fully inserted into the PCI connector. As a result, the network “physically” worked, but the OS did not see it.».

Let's consider the second situation. There is a switch and two or more computers. If two computers can still be connected without a switch, then if there are three (or more), then combining them without a switch is a problem. Although the problem can be solved - to combine three computers, you need to insert two network cards into one of them, switch this computer to router mode and connect it to the two remaining machines. But a description of this process is beyond the scope of this article. Let us dwell on the fact that to unite three or more computers into one local network, you need a switch (however, there are other options: you can connect computers using a FireWire interface or a USB DataLink cable; as well as using wireless (WiFi) cards, transferred to Ad Hoc operating mode... but more on that in the next series).

Computers are connected to the switch using a straight cable. Which termination option (568A or 568B) will be chosen is absolutely not important. The main thing to remember is that on both sides of the cable it (the termination) matches.

After crimping the cable (or purchasing it in a store) and connecting all existing computers to the switch, you should check the presence of a physical link. The check proceeds similarly to the method described above for two computers. The switch should also have indicators next to the ports to indicate the presence of a physical connection. It may well turn out that the indicators are not located next to the port (top, side, bottom) but are placed on a separate panel. In this case, they will be numbered according to port numbers.

Having reached this paragraph, we already have 2 or more computers physically connected to a local network. Let's move on to setting up the operating system.

First, let's check that the IP addressing settings on the network card are correct. By default, Windows OS (2K/XP) itself assigns the necessary IP addresses to the cards, but it’s better to see for yourself.

Let's go to the network card settings. This can be done in two ways, through the control panel (Start -> Control Panel -> Network Connection)


Or, if the Network Places is on the desktop, then just right-click on it and select Properties.


In the window that appears, select the required network adapter (usually there is only one). The new window tells us quite a lot of information. Firstly, the connection status (in this case - Connected, i.e. there is a physical connection) and its speed (100 Mbit). As well as the number of sent and received packets. If the number of received packets is zero, and there is more than one computer on the network (turned on), then this may indicate a malfunction of our network card or switch port (if the computer is connected to it). It is also possible that the cable itself is faulty.


By selecting the Support tab, you can find out the current IP address and subnet mask assigned to the network card. By default, Windows OS gives adapters IP addresses in the range 169.254.0.0 -- 169.254.255.254 with a subnet mask of 255.255.0.0. Discussion of masks, subnet classes, and so on is beyond the scope of this article. The main thing to remember is that the subnet mask of all computers on the same network must be the same, but the IP addresses must be different. But again, the digits of the IP address, which coincide in positions with the non-zero digits of the subnet mask, must be the same on all computers, i.e. in this example, all hosts from the local network in the IP address will have the same first two digit positions - 169.254.


The IP settings of the network card can also be set manually (Network adapter properties -> Properties -> Internet Protocol (TCP/IP) -> Properties). But in most cases, it makes sense to set the settings to the default value (automatic detection of IP address and DNS) and the operating system will configure the network adapters itself.


In addition to network addresses, all computers must be given the same workgroup name. This is configured in the system settings (System Properties). You can get there through the control panel (System -> Computer Name). Of course, you can give different names to workgroups. This is convenient if you have many computers on the network and need to somehow logically divide the working machines among themselves. The consequence of this will be the appearance of several workgroups in the network environment (instead of one).


or, if the My Computer icon was displayed on the desktop, then right-click on this icon and select (Properties -> Computer Name).


In the window that appears (appearing after clicking the Change button), you can change the computer name (each machine has its own unique name). And then you need to enter the name of the working group. All computers on the local network must have the same workgroup name.

After this, the OS will ask you to reboot, which you will need to do.

On any of the computers you can “share” (i.e. put into public access) directories. This is done as follows:


In Explorer, right-click on the directory and select Properties.


Directories are shared in the Sharing tab. For the first time we will be asked to agree that we understand what we are doing.


In all subsequent ones, you just need to check the Share this folder box (the directory will be accessible over the network only in read mode). If you need to allow changing data over the network, you will have to check the box Allow Network User to Change my Files.


After confirmation (clicking OK), the directory icon will change to the one shown in the screenshot.


From other computers, you can access shared directories by going to the network environment (My Network Places), located in the Start menu or on the desktop, selecting View Workgroup Computers,


and then click on the desired computer name.


The shared directories will be presented in the window that appears.


After selecting any of them, you can work with them in the same way as if they were located on the local computer (but if the permission to change files when sharing a directory was not activated, then you will not be able to change the files, only view and copy).

Please note that the method described above will work without problems if both computers (on which the directory was shared and which is trying to access it over the network) have the same usernames with the same passwords. In other words, if you, working under the user USER1, have shared a directory, then in order to access it from another computer, the user USER1 must also be created on it with the same password (as on the first computer). The rights of the user USER1 on another computer (the one from which they are trying to access the shared resource) can be minimal (it is enough to give him guest rights).

If the above condition is not met, problems may arise with access to shared directories (drop-down windows with messages like access denied, etc.). These problems can be avoided by activating a guest account. True, in this case, ANY user inside the local network will be able to see your shared directories (and in the case of a network printer, print on it) and, if changes to files by network users were allowed there, then anyone will be able to change them, including deleting them.

Activation of a guest account is done as follows:
Start -> Control Panel ->
The control panel looks like the one in the screenshot after clicking the Switch to Classic View button (switch to classic view)
-> administration -> computer management ->

In the computer management window that appears, select the local user and group management tab, find the Guest account and activate it. By default, in Windows, a guest account is already created in the system, but is blocked.

A few words about adding users to the system (more on this in the following articles). In the same local user and group management manager, right-click on an empty space in the user list and select New user(add new user).

In the window that appears, enter the login (in this case, user2 was entered), full name and description, the last two values ​​are optional. Next, assign a password, and in the next field, repeat the same password. Unchecking User must change password at next logon(the user must change the password the next time he logs in), allows the user to log in with the given password and will not require him to change it the first time he logs in. And the jackdaw opposite Password never expires(the password will never become outdated), makes it possible to use the specified password indefinitely.

By default, the newly created user is included in the group Users(users). Those. The user will have fairly limited rights. However, there will be quite a lot of them and you can log in to your local computer under this login and work quite comfortably. You can further limit the rights (to a minimum) of this user by removing him from the group Users and entering into the group Guests(guests). To do this, right-click on the user and select Properties(properties),

Member of -> Add, in the window that appears, click on Advanced(additionally)

Click Find Now(find). And in the list that appears, select the desired group (Guest).

The user has been added to the Guest group. All that remains is to remove it from the Users group: select it and click on the button Remove(delete).

More flexible control of access to shared resources can be obtained by disabling the Simple File Sharing mode in Explorer settings. But this is again beyond the scope of the current article.

Providing public access (sharing) of printers is done in a similar way. On the computer to which the printer is connected, select its icon (via Start -> Printers), right-click on it, select properties.

Printer sharing is managed in the Sharing tab. You need to select the Shared As item and enter the name of the printer under which it will be visible in the network environment.

On other computers connected to the same local network, the network printer will most likely appear in the printer menu. If this does not happen, launch the Add Printer icon (add printer),

which will call a wizard for connecting printers.

We tell him that we want to connect a network printer.

In the next menu we indicate that we want to find the printer in the network environment. You can also enter a direct UNC to the printer, for example, \computer1printer1, using the Connect to this Printer item.
UNC (Universal Naming Convention) - Universal network path, used in operating systems from Microsoft. Represented as \computer_name shared_resource name, where computer_name = NetBIOS machine name, and shared_resource name = name of a shared directory, printer, or other device.

If we selected the item to search for a printer in the network environment, then after clicking the Next button, a network environment viewing window will appear, where you need to select the shared printer. After this operation, you can send documents for printing from the local machine to a remote printer.

So. We now have a working local network. It's time to give her access to the Internet. Later in this article we will tell you how to organize such access using one of the computers as a router. To do this, it must have two network cards. For example, one is built into the motherboard, and the second is external, inserted into the PCI slot. Or two external ones, it doesn’t matter.

We connect the wire coming from the provider to the second network card of the router (the first one looks into the local network). This could be a twisted pair cable (crossover or straight cable) from an ADSL modem, or a twisted pair cable installed by local network installers in your area, or something else.

It is quite possible that the ADSL modem (or other similar device) is connected to the computer via a USB interface, then a second network card is not needed at all. It is also possible that the router computer is a laptop that has one network card connected by wire to the local network and a WI-FI (wireless) network card connected to the provider’s wireless network.

The main thing is that two network interfaces are visible in the Network Connections window. In this case (see screenshot), the left interface (Local Area Connection 5) is responsible for access to the local network, and the right (Internet) is responsible for access to the global Internet. Of course, the names of the interfaces will differ in each specific case.

Before implementing the following steps, the front end (facing the Internet) must be configured. Those. From the computer-future-router, Internet access should already work. I omit this setting, since it is physically impossible to provide for all possible options. In general, the interface should automatically receive the necessary settings from the provider (via a DHCP server). You can check whether the network card has received any addresses, similar to the method described above in this article. There are options when a representative of the provider gives you a list of parameters for manually configuring the adapter (as a rule, this is an IP address, a list of DNS servers and a gateway address).

To activate Internet access for the entire local network, right-click on the external (facing the Internet) interface.

Select the Advanced tab. And here we check the box next to the item Allow other Network Users to Connect through this Computer's Internet Connection. If you need this Internet access to be controlled from other computers on the local network, enable Allow other Network Users to Control...

If the machine does not use any additional firewall (firewall), in addition to the one built into Windows (i.e., a program that was additionally installed on the machine), then be sure to turn on the firewall (protecting our router from the outside world) - Protect my Computer and Network . If an additional firewall is installed, then the built-in protection can not be activated, but only the external firewall can be configured. The main thing is that the firewall on the interface facing the Internet must be turned on, built-in or external.

After confirmation (pressing the OK button), the router mode is activated on the computer, implemented through the NAT mechanism. And above the network interface where this mechanism is activated, a palm symbol appears (a lock on top means that firewall protection is enabled for this interface).

A direct consequence of this mode is a change in the address on the local (facing the local network) interface of the router to 192.168.0.1 with a subnet mask of 255.255.255.0. In addition, on the computer acting as a router, the DHCP service is activated (the router begins distributing the necessary IP addressing parameters to all computers on the local network), and DNS (converting IP addresses to domain names and vice versa). The router becomes the default gateway for all other computers on the network.

And here's what it looks like from the point of view of the rest of the computers on the local network. They all receive the necessary IP addressing settings from the router via DHCP. To do this, of course, their network cards must be configured to automatically obtain an IP address and DNS. If this has not been done, then nothing will work. Setting up automatic acquisition of an IP address and DNS was described above. It is possible that the computer will not receive the necessary addresses from the router immediately; in order not to wait, you can click the Repair button, which will force the DHCP service to provide the necessary information.

If the network card is configured correctly, computers will receive addresses from the range 192.168.0.2---254 with a mask of 255.255.255.0. The default gateway (default gw) and DNS server will be set to 192.168.0.1 (router address).

From this moment on, computers on the local network must have access to the Internet. You can check this by opening a website in Internet Explorer or pinging any host on the Internet, for example, www.ru. To do this, click Start -> Run and in the window that appears, type
ping www.ru -t
Of course, instead of www.ru, you can choose any other host on the Internet that works and responds to pings. The “-t” switch allows infinite ping (without it, only four packets will be sent, after which the command will complete its work and the window with it will close).

If the Internet channel is operating normally, the screen output from the ping command should be approximately the same as in the screenshot, i.e. replies must go. If the host does not respond (i.e. the Internet channel does not work or something is configured incorrectly on the router), then timeouts will appear instead of replies. By the way, not all providers allow the ICMP protocol, which is used by the ping command. In other words, it is quite possible that “ping does not work”, but there is Internet access (sites open normally).

Finally, I’ll dwell a little more on the NAT mechanism. NAT - Network Address Translation, i.e. technology for broadcasting (converting) network addresses. Using this mechanism, several machines from one network can access another network (in our case, several machines from a local network can access the global Internet) using only one IP address (the entire network is masked under one IP address). In our case, this will be the IP address of the external interface (second network card) of the router. The IP addresses of packets from the local network, passing through NAT (towards the Internet), are rewritten with the address of the external network interface, and returning back, the correct (local) IP address of the machine that sent the original data packet is restored on the packets. In other words, machines from the local network work under their own addresses without noticing anything. But from the point of view of an external observer located on the Internet, only one machine is working on the network (our router with the NAT mechanism activated), and another two, three, hundred machines from the local network located behind the router are not visible to the observer at all.

On the one hand, the NAT mechanism is very convenient. After all, having received only one IP address (one connection) from the provider, you can connect at least a hundred machines to the global network, literally by making a few mouse clicks. Plus, the local network is automatically protected from intruders - it is simply not visible to the outside world, with the exception of the computer-router itself (numerous vulnerabilities of the Microsoft OS family are again beyond the scope of this article, I will only note that to activate the protection, i.e. turn on the firewall on external interface of the router, as mentioned above, is required). But there is also another side to the coin. Not all protocols (and therefore not all applications) will be able to work through NAT. For example, ICQ will refuse to transfer files. Netmeeting most likely will not work, there may be problems with access to some ftp servers (working in active mode), etc. But for the vast majority of programs, the NAT mechanism will remain completely transparent. They simply won’t notice it, continuing to work as if nothing had happened.

But. What to do if there is a WEB or some other server inside the local network that should be visible from the outside? Any user contacting the address http://my.cool.network.ru (where my.cool.network.ru is the router address) will be sent to port 80 (by default WEB servers respond on this port) of the router, which does nothing does not know about the WEB server (because it is not located on it, but somewhere inside the local network BEHIND it). Therefore, the router will simply respond with a reply (at the network level), thereby showing that it really has not heard anything about the WEB (or any other) server.

What to do? In this case, you need to configure redirection (redirection) of some ports from the external interface of the router to the local network. For example, let's configure port 80 redirection inward to the web server (which we have on our computer 169.254.10.10):

In the same menu where NAT was activated, click the Settings button and select Web Server (HTTP) in the window that appears.

Since we have chosen the standard HTTP protocol, which was already included in the list before us, there is no need to select the external port (External Port) to which the router will receive connections and the internal port (Internel Port) to which the connection to the local network will be redirected , - the standard value 80 is already set there. The protocol type (TCP or UDP) is also already defined. All that remains is to set the IP address of the machine on the local network, where the incoming Internet connection to the web server will be redirected. Although, as I was correctly corrected in the forum, it is better to set not the IP address, but the name of this machine. Since the IP address (which is issued automatically by the DHCP server) may well change, but the machine name will not (it can only be changed manually).

Now, from the point of view of an external observer (located on the Internet), a web server has appeared on port 80 on the router (the local network behind it is still not visible). He (the observer) will work with it as usual, without assuming that the web server is actually located on a completely different machine. Comfortable? I guess so.

If you need to give external access to some non-standard service (or a standard one, but not included in the list in advance), then instead of selecting services from the list in the above screenshot, you will need to click the Add button and enter all the required values ​​manually.

Instead of a conclusion

In the first part of the series of articles, the possibility of organizing local network access to the Internet using the built-in capabilities of Windows XP from Microsoft was considered. We should not forget that the computer-router obtained as a result of configuration must work constantly, because if it is turned off, other hosts on the local network will lose access to the Internet. But a constantly running computer is not always convenient (it makes noise, gets hot, and also eats up electricity).

Options for organizing access of local networks to the global one are not limited to those described above. The following articles will look at other methods, for example through hardware routers. The latter have already appeared in reviews on our website, but in those articles the emphasis was on testing the capabilities, without much explanation of what these capabilities give the user. We will try to correct this annoying omission.

Navigation

  • Part one - building a simple wired network
  • Part three - using WEP/WPA encryption in wireless networks

If you want to play on two PCs without using the Internet, instantly transfer files from different devices without USB drives, then you need to know how to create a local network between two computers. This technology of connecting two PCs has been used for quite a long time, and even today it has not lost its relevance.

Local network example

A local network is a group of interconnected devices: PCs, televisions, printers, usually located no further than one room. The devices use shared memory and servers, thus complementing each other. This connection allows you to create a gaming area for several PCs, easily and fairly quickly transfer any data, print documents if one common printer is installed, and do much more. Connecting devices today most often occurs using a router, but other connections can also be used, which you can read about below.

Creating a connection

Creating a connection is quite easy, and also in different ways: through a router or cable. Setting up devices for both methods is quite similar. The difference lies mainly in the connection method: via cable or via Wi-Fi.

Communication via Wi-Fi, which is used much more often today, can be much more convenient, but connecting two PCs with a cable will cost less if you have not yet installed a router for some reason.

Connection via cable

The oldest type of communication between two machines. All you need to do is connect an RJ45 network cable. The cable must be a crossover cable, although regular straight cables can often work for modern computers. Still, when purchasing, it is better to check the type of cable with the seller. When you add the ends of the crossover cable, the colors of the ends of the wires will differ - this is its main difference. Also, the connection requires network cards on both devices, but today they are already installed. You just have to note that if the network card is already occupied by connecting to the Internet, then you won’t be able to use it.

This connection was just used before to play. But it may be convenient for some today, especially if you still have Windows XP, which has difficulty supporting wireless connections.

After connecting the cable itself, you need to know how to set up a local network between two computers:

  • Control Panel, select the item related to network connections.
  • We select what we created there, right-click on it, select “Properties”
  • Next, depending on “Windows”: for Windows XP select Internet Protocol (TCP/IP), for Windows 7/8/10 - Internet Protocol version 4.

  • Manually enter the IP address: 192.168.xxx.xxx. You can enter the last six digits yourself, the main thing is that they are not repeated on different devices.

  • On Windows 7, you will also need to go to the Network Control Center, there, through the “Settings” item, select “Private” for our network.
  • Then in Control Center, enable file sharing, network discovery, and turn off password access protection.

After this, you also need to set up sharing. This is done so that PCs can exchange any files. The methods vary on different OSes. On WindowsXP:

  1. Section Network connections, go to “Tools”, select “Folder Options”.
  2. “View” tab, check the box next to “Use simple file sharing.”
  3. Next, go to the “System Properties” window: RMB on “My Computer” - select Computer Name.
  4. Click “Change”, select “Is a member” of the working group. We come up with a common group name for both PCs.
  5. My computer, right-click on the hard drives (for example, Windows (C:)), in the “Access” tab, click on the link, set the sharing permission.

That's it, access to the files on the selected disks is completely open. With Windows 7/8/10 we proceed as follows:

  • Control Panel, then Folder Options.
  • Check the “Use Sharing Wizard” checkbox.
  • The following steps will be the same as for XP.

Connection via router

This is the most convenient method, since it allows you to connect not only two, but a larger number of computers or other devices that support Wi-Fi. You can play over this connection without lengthy settings.

IP addresses for such a connection will be set automatically. To use shared files, you will only need to share the files, and then add two computers to one workgroup, as described above.

Now, to transfer files, you just need to enter the computer name using the address bar: \\name\. You can also do this through the Network Connections section. It is also worth securing your personal or especially important files so that no one can access them from a nearby computer. To do this, it is best to specify drives that do not contain information important to you. For example, it is better not to make the disk that contains user account data open to everyone, or, using the file and folder settings menu, restrict access to them: RMB on the desired folder, then select the sharing settings there.

Playing on a local network

So, we managed to connect two devices to the same network without the Internet, allowing them to exchange files. How to start playing on a local network?

To do this, as a rule, you do not need to make any additional settings. We just turn on the game and, if you can play over a local connection, select the appropriate item, and then play over the one we have already created.

Connection to a shared server may vary for different games. You will need to enter the IP or PC name somewhere. For Minecraft, Counter Strike, for example, you will need to create a server. But as a rule, everything is done quite simply.

Hamachi

This happens quite rarely, but sometimes a game does not allow you to play over the Internet, but allows you to play it over a local network. Don’t despair, even if it turns out that your friend lives far from you.

The Hamachi program allows you to emulate a local connection and thus connect a PC to it via the Internet. To do this, you just need to download the program, register, and then create a new connection, give it a name and, if necessary, a password. After this, you can easily use this network to play.

As you can see, connecting computers into a local network is a fairly easy process. It won’t take you much time, and you can connect two PCs, and then play with your friends, both being away from them and being in the same room with them.

The methods for creating a connection are suitable for all Windows, from XP to Ten.



tell friends