Useful Tips

How to connect 2 computers to a local network via a network cable


It works on the principle of a wiki, which means that many of our articles are written by several authors. When creating this article, 9 people worked on its editing and improvement, including anonymously.

The number of sources used in this article: 6. You will find a list of them at the bottom of the page.

If you connect two laptops on a local network, you can quickly transfer data between two computers or play multiplayer games. You can connect two laptops over a local network using a cable or wirelessly.

What do you need to start work?

1) 2 computers with network cards, to which we will connect the twisted pair cable.

All modern laptops (computers), as a rule, have at least one network interface card in their arsenal. The easiest way to find out if you have a network card on your PC is to use some utility to view PC features (for such utilities, see this article:

By the way, you can also pay attention to all the connectors that are on the laptop (computer) case. If there is a network card, you will see a standard RJ45 connector (see. Fig. 2).

Fig. 2. RJ45 (standard laptop case, side view).

2) Network cable (the so-called twisted pair).

The easiest option is to simply buy such a cable. True, this option is suitable if your computers are not far from each other and you do not need to lead the cable through the wall.

If the situation is reverse, you may need to crimp the cable in place (which means that specials will be needed. pliers, cable of the desired length and RJ45 connectors (the most common connector for connecting to routers and network cards)) This is described in detail in this article:

Fig. 3. Cable 3 m long (twisted pair).

Connecting 2 computers to the network with a cable: all actions in order

(The description will be built on the basis of Windows 10 (in principle, in Windows 7, 8, the setting is identical). Some terms are simplified or distorted, in order to more easily explain specific settings)

1) Connecting computers with a network cable.

There is nothing tricky here - just connect the computers with a cable and turn on both of them. Often, next to the connector, there is a green LED that will signal you that you have connected the computer to a network.

Fig. 4. Connect the cable to the laptop.

2) Setting the computer name and workgroup.

The next important nuance is that both computers (cable-connected) should have:

  1. same working groups (in my case it is WORKGROUP, see fig. five),
  2. different computer names.

To set these settings, go to "MY COMPUTER» (or this computer), then anywhere, click the right mouse button and in the pop-up context menu, select the link "The properties". Then you can see the name of your PC and workgroup, as well as change them (see the green circle in fig. five).

Fig. 5. Setting the computer name.

After changing the name of the computer and its workgroup, be sure to restart the PC.

3) Configuring a network adapter (setting IP addresses, subnet masks, DNS servers)

Then you need to go to the Windows control panel, the address: Control Panel Network and Internet Network and Sharing Center .

On the left will be the link "Change adapter settings", It needs to be opened (those. we will open all the network connections that are on the PC).

Actually, then you should see your network adapter, if it is connected to another PC cable, then no red crosses should be lit on it (see pic 6, most often, the name of such an Ethernet adapter) You must right-click on it and go to its properties, then go to the protocol properties "IP version 4"(You need to go into these settings on both PCs).

Fig. 6. Adapter properties.

Now on one computer you need to set the following data:

  1. IP Address:,
  2. Subnet Mask: (as in Figure 7).

Fig. 7. IP setting on the “first” computer.

On the second computer, you need to set slightly different parameters:

  1. IP Address:,
  2. Subnet Mask:,
  3. The main gateway:,
  4. Preferred DNS server: (as in Figure 8).

Fig. 8. IP setting on the second PC.

Next, save the settings. Directly setting up the local connection itself is completed. Now, if you go into Explorer and click on the “Network” link (on the left) - you should see the computers in your workgroup (however, while we have not yet opened access to files, we’ll do it now ...).

To open access to a folder (or disk) for users of a local network

This is probably the most common thing that users need, united in a local network. This is done quite simply and quickly, consider everything in steps ...

1) Enabling file and printer sharing

Go to the Windows control panel along the path: Control Panel Network and Internet Network and Sharing Center.

Fig. 9. Network and Sharing Center.

Next, you will see several profiles: guest, for all users, private (Fig. 10, 11, 12). The task is simple: enable file and printer sharing everywhere, network discovery, and remove password protection. Just set the same settings as shown in fig. below.

Fig. 10. Private (clickable).

Fig. 11. Guestbook (clickable).

Fig. 12. All networks (clickable).

An important point. You need to make such settings on both computers on the network!

2) Sharing a disk / folder

Now just find the folder or drive you want to give access to. Then go to its properties and in the tab "Access"You will find the button"Advanced setup“, Press it, see fig. 13.

Fig. 13. Access to files.

In the advanced settings, check the box next to "Share folder"And go to the tab"permissions» (by default, read-only access will be open, i.e. All users on the local network can only view files, but not edit or delete them. In the "permissions" tab, you can give them any privileges, up to the complete removal of all files ...).

Fig. 14. Allow sharing of the folder.

Actually, save the settings - and your disk becomes visible throughout the local network. Now you can copy files from it (see. Fig. 15).

Fig. 15. Transferring a file over LAN ...

Sharing Internet for a local network

It is also a very common task that users face. As a rule, one computer in the apartment is connected to the Internet, and the rest get access from it (unless, of course, a router is installed :)).

1) First, go to the “network connections” tab (how to open it is described in the first part of the article. It can also be opened if you enter the control panel, and then enter “View network connections” in the search bar).

2) Next, you need to go to the properties of the connection through which Internet access is available (in my case, this is “wireless connection«).

3) Next, in the properties you need to open the tab "Access"And check the box next to"Allow other network users to use an Internet connection ..."(As in Fig. 16).

Fig. 16. Sharing the Internet.

4) It remains to save the settings and start using the Internet :).

How to connect a laptop to a laptop via wifi?

The easiest way to create such a local network is to connect the laptop to the laptop via wifi. Since all modern laptops are already equipped with a built-in wifi module, you can do with only standard means of the operating system, and you do not need any additional software or equipment.

To connect 2 laptops wirelessly:

  • - on one of the computers (for example, from which data will be transmitted) open “Network and Sharing Center” - “Change adapter settings”,
  • - on the existing network, call up the menu and select the “Properties” item in the list presented,
  • - then open the properties of “Internet Protocol 4 (TCP / IP)”: the parameters for obtaining “ip addresses” should be set to “Automatic”,

- then on both computers open “Change advanced sharing options” and in the drop-down list make sure that the items are active, the parameters shown in the following figure, these options open up network access).

In addition, you should disable password protection in the “All Networks” section,

- now you need to create a local wireless network between two laptops: open the "Command Prompt" (Win + P next cmd) and enter the command "netsh wlan set hostednetwork mode = allow ss>

- now it remains only to start the network: for this, the same “Command Line” with the command “netsh wlan start hostednetwork” is used,

- the network is active, now from the second laptop, search for available “wifi networks” and connect with the security key entered in the previous stage of the network,

- to connect to the target device, enter “Explorer” in the address bar - double slash + IP address of the connected laptop: it may look like this, the address can be found in the "Network Status" - "Information.

How to connect a laptop to a laptop via a network cable?

The second method includes low costs for the purchase of a “LAN cable”, compressed by the crossover method (reverse), and the process of setting up a local network between laptops is much simpler than the above. But you will have to pay for the connection speed with the mobility of the local network. And the settings will really take no more than a couple of minutes:

  • - connect laptops to each other with a “LAN cable”,
  • - in the "Network and Sharing Center" open "Change adapter settings" - properties of "Internet Protocol 4 (TCP / IP). Network connections can also be accessed with the “ncpa.cpl” command,

  • - write in the line “ip address”, the subnet mask will be detected automatically, and the main gateway can be left blank,

  • from the second computer do the same actions, only in the line "ip address" specify address from the same subnetas for the first laptop, but one more -,

The entire LAN between the two laptops is configured. You can connect to a computer by the same principle: ip_address or open "My Computer" - "Network" and find the laptop you need in the list.

If the desired device is not detected, check if you have checked all the check boxes for network discovery in the section “Change advanced sharing settings”.

Together with this method, you can use third-party programs to transfer files from laptop to laptop: for this work, the free program “HFS” (HTTP File Server), which does not require installation, is perfect.

How to connect a laptop to a laptop via usb?

If these options are not suitable for you, you can use the Easy Transfer Cable adapter using laptop usb ports to connect laptops to each other.

The cost of this cable is low: for a decent proven option you will have to pay about 500 rubles (for example, “Windows Easy Transfer Cable” from “ST Lab”).

So, to connect the laptop to the laptop via usb, connect the computers with the Easy Transfer Cable adapter and run the Total Comander program on both PCs. Next, on each computer, open the “Network” submenu and select “Establish Connection via LPT / USB Port”.

Now you need to choose which laptop will act as the “Server”, and which as the “Client” (a kind of flash drive).

But this method is not ideal, there are also disadvantages here:

  • - the computer that will receive the file may not be available until the transfer is completed,
  • - errors may occur during transmission between different-bit operating systems (between 64-bit and 32-bit or vice versa),
  • - Errors when transferring files between operating systems with different languages.

Of all the above methods, the best option for creating a laptop-to-laptop LAN is the wireless connection option. It is more mobile, since no wires are required and there is no significant effect on the performance of laptops. In addition, when connecting a laptop to a laptop via wifi, you can connect an unlimited number of devices with a fairly high data transfer rate.

Home LAN options

When creating a home local network, most often, two options are used:

  1. connect two computers (PC with laptop, PC with PC, etc.) using a cable (it is often called a twisted pair cable),
  2. acquire special. "box" called a Wi-Fi router. Using a network cable, they connect PCs to the router, and laptops, phones, tablets and other devices get Internet access via Wi-Fi (the most popular option today).

Option number 1 - connecting 2 PCs using twisted pair

Pros: simplicity and cheapness (you need 2 things: a network card, and a network cable), providing a sufficiently high speed that not every router is able to give out less radio waves in the room.

Cons: extra wires create confusion, get in the way, after reinstalling the Windows OS - you need to configure the network again so that Internet access is on the second PC (2), the first PC (1) - must be turned on.

What is needed: for each PC to have a network card, network cable. If you plan to connect more than 2 PCs to a local network (or to have one PC connected to the Internet, and simultaneously be on the local network) - one of the PC should have 2-3 or more network cards.

In general, if both PCs have network cards, and you have a network cable (also called an Ethernet cable), then connecting them using it is not difficult. I think there is nothing special to consider here.

Note: pay attention that usually on network cards a green (yellow) LED starts to light up when you connect a cable to it.

Two laptops connected by cable

Another important point!

Network cables for sale are different: not only in color and length. The fact is that there are cables for connecting the computer to the computer, but there are those that are used to connect the PC to the router.

For our task we need cross network cable (or cable, crimped cross way - here who calls what).

In the cross-over cable - the yellow and green pairs are interchanged at the end connectors, in the standard (for connecting a PC to the router) - the colors of the contacts are the same.

Twisted pair // network cable

In general, if two PCs are turned on, they are working, you connected them with a cable (the LEDs on the network cards blinked), the network icon next to the clock stopped displaying a red X - it means the PC found the network and is waiting for its settings. This is what we will do in the second section of this article.

Option No. 2 - connecting 2-3 or more PCs using a router

Pros: most devices: phones, tablets, laptops, etc. will gain access to the Wi-Fi network, fewer wires "underfoot", after reinstalling Windows - the Internet will work.

Cons: the purchase of a router (after all, some models are far from cheap), the device’s “complicated” setup, the radio waves of the router can affect health., Lower ping and hangs (if the router cannot cope with the load).

What is needed: a router (usually comes with a network cable to connect one PC to it).

With the connection of the router, as a rule, there are no big problems either: the cable coming from the Internet provider is connected to the special. the router’s connector (it is often called “Internet”), and local PCs are connected to other connectors (“Lan ports”). Those. the router becomes an intermediary (An example diagram is shown in the screenshot below. By the way, the modem on the right may not be in this diagram, it all depends on your Internet connection) .

The scheme of connecting to the Internet through a router

By the way, pay attention to the LEDs on the router case: when you connect the Internet cable from the provider, from the local PC - they should light up and blink. In general, setting up a Wi-Fi router is a separate big topic, and for each router, the instructions will be slightly different. Therefore, it is hardly possible to give universal recommendations in one single article.

By the way, when connected via a router, the local network is usually configured automatically (i.e., all computers connected via a network cable should already be on the local network, a couple of small strokes will remain (more about them below)). The main task after that is to set up a Wi-Fi connection and access to the Internet. But since this article is about a local network, I’m not focusing on this.

LAN settings (Windows 7, 8, 10)

In this section of the article I will give universal instructions, regardless of how your local network is organized: connected via a network cable, or using a router. Where the settings will relate to a particular option - there will be notes.

Note: all settings are relevant for Windows 7, 8, 8.1, 10.

Name of computer and workgroup

It is relevant for connecting through a router, and directly.

Allegory: each person has his own name, surname, middle name, date of birth, city, etc. - There are absolutely no two identical people. Also in the network - there should not be computers with the same name.

The first thing to do when setting up your local network is to check and configure workgroup name and computer name . Moreover, you need to do this on every computer in the local network!

To find out the computer name, open the Windows Control Panel at: Control Panel System and Security System (screen below). Next, make sure of the following:

  1. PC name and slave. the group must be in Latin
  2. each PC / laptop in the local network must have its own unique name (e.g. PC1, PC2, PC3),
  3. each pc / laptop should have одинаковая рабочая группа (например: WORKGROUP).

Чтобы изменить имя и рабочую группу - нажмите кнопку "Изменить параметры".

Имя компьютера, рабочая группа

Далее нажмите кнопку "Изменить", введите новое имя компьютера и рабочую группу. Сохраните настройки и перезагрузите компьютер (см. скрин ниже с подсказками).

Change workgroup and PC name

In general, when you bring all the names in accordance with the requirements above, you can proceed to the next configuration step.

Enabling printer and folder sharing

It is relevant for connecting through a router, and directly.

This innovation appeared in Windows 7, supposedly provides greater security for the OS (purely in my opinion, only creates the need for additional configuration of the local network). The bottom line is that by default, Windows blocks and prevents access to open and share folders, a printer, etc., until the security policy is “softened”.

To remove this lock and enable sharing, you need to:

    First open the Windows Control Panel: Control Panel Network and Internet Network and Sharing Center . Next, in the left menu, open the link "Change advanced sharing settings."

Change add. sharing options

  • Then, in turn, go to three tabs: private, guest and all networks. In each of them you need to set certain parameters. Let's go through each.
  • In the tab private , you need to put the sliders in front of the items: enable network discovery, enable file and printer sharing, allow Windows to manage home group connections (as in the screenshot below).

    Next, open the tab guest room , in it you need: enable network discovery, enable file and printer sharing (example in the screenshot below).

    Next, open the tab all networks , there you need to: disable sharing, use 128-bit encryption, disable sharing with password protection. Next, save the settings and restart the PC.

    Configure IP addresses, DNS, masks, gateways

    For a network organized using a router

    In general, for PCs connected to the local network using a router, you usually do not need to configure anything (everything works by default). If something is wrong, just in case, I recommend going in and checking the connection properties.

    To do this, you must first open "network connections" . This is done simply:

    1. first open the window Run - combination of buttons Win + r ,
    2. then enter the command ncpa.cpl and press Enter (works in all versions of Windows 7, 8, 10).

    How to open network connections // ncpa.cpl

    Next open LAN connection properties . (for this, simply click on the connection with the right mouse button - in the pop-up menu select the required one, see the screen below)

    LAN Connection Properties

    Next open IP Version 4 Properties (TCP / IPv4) and check if it is worth getting the IP and DNS addresses automatically. If this is not the case, set it to automatic, save the settings.

    Setting IP, DNS, Gateway

    To connect a PC to a PC via a network cable

    Pc 1

    By PC 1, I mean a computer that has two network cards: the provider’s Internet cable is connected to one of them, and the local network cable to PC 2 is connected to the second.

    Note: Although, the Internet cable from the provider does not have to be. If it is not, select PC 1 and PC 2 - at random.

    And so, open the properties of the network connection on the local network (how to do this - see a little higher in the article).

    Next, open IP Version 4 Properties (TCP / IPv4) and enter:

    1. IP Address:,
    2. subnet mask: (see screen below),
    3. save the settings.

    Pc 2

    AT IP Version 4 Properties (TCP / IPv4) second PC, you need to set the following parameters:

    1. IP Address:,
    2. subnet mask:,
    3. main gateway:,
    4. preferred DNS server: (see screen below),
    5. save the settings.

    Actually, the LAN setup itself is finished. Now you can start the most interesting thing - sharing and using shared resources of the local network. Actually, to what we were going.

    Sharing Internet access on a second PC

    Actual for PCs connected directly to a LAN cable.

    You need to configure PC 1 (i.e., the one to which we have connected the provider's Internet cable).

    First open network connections : click the combination Win + r we introduce ncpa.cpl , Further Enter .

    How to open network connections //ncpa.cpl

    Next, go to internet connection properties . (to do this, right-click on it)

    Internet connection properties

    Next, open the tab "Access" , and check the box next to "Allow other network users to use the Internet connection of this computer" . Save the settings.

    Allow other users to access the Internet

    If everything is done correctly, the Internet will be on both computers.

    Note: Naturally, the Internet should be on PC 2 - PC 1 must be turned on! This, by the way, is one of the inconveniences of such a local network, when connected via a router, the Internet will be regardless of which PC is on / off.

    Sharing folders / files for sharing

    1) Immediately get down to business: open the explorer, and right-click on the folder you want to share (that is, give access to it to all users on the local network). Next, select in the menu: share / individuals .

    2) Next, choose "Everything" users, and press the add button.

    3) Set the resolution: read or read and write.

    • reading is allowed: users will only be able to copy your files to themselves (neither will they be able to delete or modify them!),
    • reading and writing are allowed: LAN users will have full control over files in folders: they can delete all files, change any of them, etc. In general, I would not recommend providing such access to important and large folders (for transferring files, it is better to have a separate folder to which you give full access).

    Read or write

    4) Next, check the user rights again and press the button "Share" (need administrator rights).

    5) After a few seconds, Windows will inform you that the folder has been opened for public access. So everything went well.

    6) To access the folder:

    1. open the conductor
    2. then open the "Network" tab (left, bottom of the window),
    3. open computer name on which the folder was shared. As we see in the screenshot below - it is shared, you can go into it and start copying (reading) any files.

    Check // the folder is shared // now everyone can copy files from it

    Sharing a printer (shared network printer)

    1) The first thing to do is open the control panel: control panel / equipment and sound / devices and printers.

    2) Next, right-click on the printer to which you want to give access and make a network. In the popup context menu - open properties .

    3) Then open the tab "Access" and tick "Sharing this printer" . Save the settings (see screen below). Actually, the printer is now shared and it can be used by other PCs / laptops / tablets and other devices on the local network.

    How to share a printer

    4) To connect a network printer, open conductor select computer name on which the printer is shared. Next you should see it: click on it right click and select the option in the menu connecting .

    5) Then you can open any document, press Ctrl + P (Fay / Print), and try to print a page to a friend.

    Note: By default, in Windows, usually a different printer is specified (not the one you connected over the network). When printing, do not forget to change it.

    Regarding the local network printer - I recommend that you read my detailed article on this topic. It describes in more detail some points. The link is below.

    I’m completing the article on the sim. Good and fast setup for everyone.