Launching the access point from the command line. How to distribute Wi-Fi Internet using the Windows command line

Many of us are already accustomed to the fact that the router is entirely responsible for the wireless network in our home or office. But sometimes it can happen that you urgently need to open Internet access for your tablet or phone, but you only have one laptop connected to the network at hand. What should I do?
Yes, it’s very simple - distribute WiFi via the command line, using the functionality available for this in Windows 10!
The conditions are as follows: First - yours wireless adapter should support this function (available on almost all modern laptops). Secondly, you will not be able to use Wi-Fi on this laptop yourself.

Setting up WiFi sharing on the command line:

As an example, I will consider the Windows 10 operating system. previous version OS from Microsoft does everything in a similar way.

Step 1. Launch the command line with Administrator rights. The easiest way to do this is by clicking right click mouse on the Start button.

There will be a corresponding item in the menu that opens.

Step 2. We indicate required parameters. In the window command line enter a command like:

netsh wlan set hostednetwork mode=allow ssid=Set-Os key=121223344

Here SSID is the name of the distributed WiFi network that clients will see when searching. Key is the password they will have to enter when trying to connect. Visually it looks like this:

Create open network, that is, you can’t do it without a password. This is a mandatory requirement!

Step 3. Let's launch Wi-Fi. In order for the adapter to switch to access point mode and launch the wireless network with the parameters specified above, you need to run the following command:

You will need to enter it every time you go to distribute WiFi from your laptop.

Note: For convenience, you can create a text file on your desktop using Notepad and copy this command into it:

Then we rename the file, changing its extension from *.txt to *.bat

Now, when you launch it, your improvised access point will automatically launch.
If you need to make it start every time you boot your computer or laptop, just place the created BAT file in the Startup folder of the Start menu.

Step 4. We provide clients with Internet access. The previous three steps simply allow you to create a simple wireless local area network, but there is no access from it to the global network. In order for your Wi-Fi to still distribute the Internet, you need to open the list of network connections. To do this, press the key combination Win+R and enter the command ncpa.cpl. A list of connections will appear in front of you. First, let's find a new connection in the list, which represents the WiFi network we created. In my example, it is called “Connection via local network* 4". It may have a different number for you, but the meaning remains the same. We need to share Internet access with it. To do this, we find the connection through which our laptop is connected itself. Usually this or High Speed PPPoE connection or a regular LAN - Ethernet (like mine). Right-click on it and select the “Properties” menu item. A window will open in which you need to select the “Access” tab.


Check the “Allow other network users to use the connection” checkbox. After this, the list of connections will become available home network. Here you need to select our access point created above. Click the “OK” button.

Now you can check your work. Our laptop should provide excellent Internet access via WiFi.

If suddenly at some point you want to disable distribution, just enter the command on the command line:


This command will disconnect the access point and all clients connected to it.

Possible problems:

1. When trying to create Windows network 10 writes "The group or resource is not in the correct state to perform the required operation"— make sure that the WiFi adapter of your laptop or computer is turned on and working without problems. Sometimes this message appears if the driver network card does not support the ability to distribute Wi-Fi. Then it makes sense to try updating the driver to the latest one from the manufacturer’s website.

2.If clients constantly see the message “Obtaining an IP address” when trying to connect, then the problem is most likely due to disabled DCHP and Server services. Check that they are enabled and running.

3. Clients connect, but there is no Internet access. Very often this happens when there is a problem with the DNS service on the distributing laptop. Try manually registering the addresses of DNS servers 8.8.8.8 and 8.8.4.4 on clients.

The need to know how to distribute wifi from a windows 8 laptop is determined by the capabilities of modern laptops. All laptops produced today are equipped with adapters for wireless networks (WiFi), but these adapters not only receive signals from wireless networks, but can also transmit them.

Setup via command line

In the previous Windows 7 operating system, you could enable Internet distribution via wifi in two ways, using standard software. Unfortunately, using the default tools, there is only one way to distribute Wi-Fi from a Windows 8 laptop. This method is the command line.

In fact, not only the command line will be used. First of all, check if the wireless network is ok. Go to Control Panel, click Network and Internet, then open Network Connections and make sure you have wireless network. If it is present, then everything is in order, and you can move on to the next steps. If there is no network, install drivers for the WiFi module. Download them from the laptop manufacturer's website.



To set up wifi distribution on a Windows 8 laptop, you need to come up with the name of your network and password. Launch Command Prompt as an administrator by pressing Win+X and selecting the appropriate menu item. In the command line window you need to enter the command:

netsh wlan set hostednetwork mode=allow ssid=f1comp key=12345678

f1comp is the Wi-Fi network name you created, and 12345678 is the Wi-Fi password you created. Press Enter. Information about changing the hosted network mode, name and password will appear.


netsh wlan start hostednetwork

If the command is entered without errors, you will see information about starting the network. At this stage, we are configured to distribute Wi-Fi via windows laptop 8, and the command line is no longer needed. Close it. However, that's not all yet - only the WiFi network works, providing access to "shared" files and folders.


Now you need to distribute the Internet from a Windows 8 laptop. Everything here is quite simple - you just need to allow general access to the Internet. Right-click on the network connection icon to open the “Network and Sharing Center.” In the window that appears on the left, follow the link "Change adapter settings" to the "Network connections" window. Here, right-click to open context menu and select “Properties” of the adapter through which you connect the Internet to your laptop. By going to the "Access" tab, check the boxes that allow sharing to the Internet. Here, select our created network as your home network. Save your settings. Now you know how to distribute Windows 8 wifi through a laptop.


How to configure a network in the interface operating system Windows 7, read. With customization methods Wi-Fi distribution from a Windows 10 laptop can be found.

Setting up through third-party programs

Actually, for those who don’t like the command line, there is another way to distribute the Internet via windows laptop 8. This method involves using special programs. Let's take Connectify HotSpot for example.

Connectify HotSpot is a program for distributing Wi-Fi via a Windows 8 laptop.


There are three types of programs: one free and two paid. Let's stick with the free one.

Launch the program. In the "Internet to Share" field, you need to select an Internet connection to your laptop from the drop-down list. In the "Hotspot name" field we set the name of the access point, in the Password field - the password. Click "Start Hotspot". After a few seconds, you can connect devices via Wi-Fi. As you can see, there is nothing complicated about how to distribute a network from a Windows 8 laptop using programs.

Setting up WiFi distribution on Windows 8.1


Let's talk about how to distribute wifi through a Windows 8 laptop 1. In truth, Windows 8.1 is the older sister of the G8. So in order to distribute the Internet from a Windows 8 1 laptop using the command line, you need to perform all the same steps as described above for Windows 8.

Do you want to distribute Wi-Fi from a Windows 8 1 laptop using programs? Please! Consider, for example, the MyPublicWiFi program, which creates a virtual WiFi hotspot. After starting the program, enter the Network Name, Network Key and select network connection with the Internet, then turn on the network. Don't forget to check if sharing is enabled on your existing internet connection. With these simple steps you can configure your laptop to distribute wifi windows 8 1.

Conclusion

Now you have several ways in your arsenal to distribute Wi-Fi through a Windows 8 laptop. In fact, we made a router out of a laptop and saved a decent amount. True, each of the above methods has its own disadvantages.

If you want to distribute the Internet via wifi Windows 8 using the command line, you will have to start the wifi command every time after a reboot/shutdown. In the case of using programs, there is also a disadvantage - system resources are wasted.

If you are wondering how to distribute wifi from windows computer 8, then you can do this in at least two ways. Only here it is worth saying that the computer should have wifi adapter, otherwise nothing will work.

Among other things, you learned how to distribute Wi-Fi from a laptop 8 1. If something remains unclear, watch the video.

It is known that connecting any gadget: smartphone, laptop, tablet or other device to high-speed Internet via wifi is possible if you have a router.

But there are situations when there is no modem nearby, but the Internet is very necessary. IN in this case great solution The laptop will be used as a wifi modem.

Connection setup

Any laptop can be a point for accessing the Internet; it needs a built-in modem inside.

In this case, you can distribute wifi to other devices, but the network coverage may be small. The power of the built-in modem is not high enough.

For these purposes, you can resort to a special modem amplifier in a laptop.

But there are several methods for distributing Wi-Fi from a laptop: using Windows tools through the installation wizard, and access is carried out using applications and utilities.

Another method: you can distribute Wi-Fi from a laptop via the command line.

You can connect according to this principle. If you open a window at the bottom of the screen on the Start panel, you will see a line that is used to search for the desired program.

This is the line we need; with its help, Wi-Fi is distributed to devices. If you start typing the word "cmd" or "command. line" A program will pop up at the top of the window. this is who she is. Opens only "as administrator".


Open at the bottom of the Start screen


Then a black screen will open, and you should write the following characters there:

Netsh wlan set hostednetwork mode=allow ssid="Your name" key="your password"

Enter everything without quotes.



In ssid you name your network, it can be modified. Also don't forget to come up with strong password. But remember that this is not just a set of numbers.

After all, it is these numbers that contain the network password when connecting to the Internet. When you write it down, remember the password numbers and write it down. Feel free to press “Enter” now.

To start our network, you should enter “netsh wlan start hostednetwork” in the line. A message should appear stating that the newly created new network has been launched.




While the network is being launched, we carry out certain options so that the developed line has access to the Internet network.

So that all the necessary devices can be used as well. We find here in “Network Sharing Center” Connect button to connect this laptop, turn it on.

Switch to the “Properties” menu. In the access window, a command is indicated to allow the use of other devices and subsequently use this connection.

Finally, click on the new connection in the list. And the number and name will be indicated there.


As a result of the operations performed, it is possible to connect a variety of devices to the formed network. Smartphones, other laptops, tablets, computers, etc.

To connect, you must use the network password that was set earlier. New network accessible to the Internet, so other gadgets also connect to it.

Below is a list of necessary commands that allow you to manage the new network:

  • to start select “netsh wlan start hostednetwork”
  • monitoring the operation of “netsh wlan show hostednetwork”
  • termination of "netsh wlan stop hostednetwork"

Having stopped the distribution using the command, then we start it again.

After completing all these steps, the laptop needs to be rebooted. Try to enter startup commands immediately.

If an error was discovered during the process, then the network was never found. Information will instantly appear notifying you of this.

Let's correct this obstacle by introducing settings:

  • "netsh wlan set hostednetwork mode disallow";
  • "netsh wlan set hostednetwork mode-allow".

In the manager window there is network adapter, you need to find it and connect it. Team “to engage”. To see them, you need to go to “View” and check the box next to "Show hidden devices".


Automatic network start

After each reboot of the laptop, you will need to turn on the distribution again. Thus, it is possible to stop it using the command as presented above.

But it’s very inconvenient to enter data every time to start the network. You can set the wireless network to start automatically every time you turn on the system.

If you want to make sure that access starts automatically along with the system boot, then there is a guide.

A .bat file is created with the launch of the network, and is simply added to startup. When you turn on the laptop, it will automatically start and execute the command.

After all this, the laptop will begin to provide the Internet without your participation. And to create this, an access point must already be configured. and the Internet is distributed manually.

To do this, we create a new one on the desktop Text Document. Name it start_ wifi. bat. The main thing is to use the Latin alphabet and the part.bat., you can choose any name itself.

After renaming, it will change after right-clicking and selecting the “edit” command.

Open notepad, paste the command to run there, and save. For automatic installation Just add the file to startup.

The folder opens as follows: press the “Windows” and “R” keys together, then you will see startup - confirm. When the startup folder is open, copy the .bat file.

We reboot the laptop and we can see the command line flash on the monitor. This indicates that the access point is starting.

After these operations, you will be able to connect to the Internet via a wireless network even in the absence of a router.

Connection errors

Sometimes when trying to establish a wireless line, problems arise. The firewall may simply block access.

Other devices cannot access the Internet, but the network has been found. Disable your antivirus software for a while.

If, after turning it off, the connection to the network is established correctly, then it is necessary to supplement wifi connection to the list of connections in order to avoid blocking.

For example, in ESET Smart Security needs to do the following:

1 Open additional settings;


2 Open the “Network” tab and look at the "Custom firewall". To the region "Filtering mode" and there - "Interactive mode".