In: Computer Science
List down the basic components of network through which you are connected to internet and troubleshoot them each one by starting from your own system using cmd.
the basic components of network through which you are connected to internet and troubleshoot are:
1. How to check internet connection in CMD
To check whether your internet connection works, you can use Command Prompt to test your connection to a certain website or internet location. To do that, you can use the ping network command, followed by a web address or IP address. For instance, you can check the connectivity to Digital Citizen without opening a web browser, by typing the command "ping www.digitalcitizen.life." Then press Enter on your keyboard.
If the ping statistics don't show any loss of packets, your internet connection is working as it should. However, if you get lost packets, that means that either your internet connection is broken, or that the website you pinged is not online. To double-check your internet connection, ping at least another website, preferably one that it's always on, such as www.google.com.
2. How can I see all the network adapters on my computer using CMD?
To obtain detailed information about your network adapters and connections, use the ipconfig command. Open Command Prompt, type ipconfig, and press Enter. As you can see in the screenshot below, when you run this command, Windows displays the list of all the active network devices, whether they're connected or disconnected, and their IP addresses. You also get details such as their default gateway IP addresses, subnet masks and the state of each network adapter.
If you add the /all switch to the ipconfig command, you can get to a whole new level of detail: DNS information, the MAC (Media Access Control) (in the Physical Address field), and other information about each network component. Check out the picture below to see a sample of what you get from the "ipconfig /all" command.
3. How to check your network connection in CMD
If you want to check whether your network connection to the router is operating as it should, you can use a combination of the commands ipconfig and ping. First, get some cmd nic info about your adapter. In other words, open Command Prompt and run ipconfig. In the list of results, identify the network adapter that's used for connecting to the network you want to test. Then, in its details, find the IP address of your router and note it down. For example, if we'd want to check our Ethernet network connection, we'd run ipconfig and see that our router's IP address is 192.168.50.1.
The next step is to check that the network connection between the router and the computer is OK. To do that, it's enough to run the ping command on the router's IP address. In our example, that would mean that we have to run this command in CMD: ping 192.168.50.1.
If there are no packets lost, then the network connection tested is running well. Otherwise, there's a problem somewhere between your computer and the router, in which case you should check that your PC's network adapter is configured correctly, that the Ethernet cable is OK (if you're using a wired connection), and that the router is configured properly.
4. How to renew the IP address of your network adapter
When your network connection doesn't work as it should, your network adapter might not have the right IP address assigned. A quick way of trying to solve this issue is to renew its IP address and, fortunately, you can do that quickly, straight from the Command Prompt. Open CMD and run the following commands: ipconfig /release and ipconfig /renew. The first one (ipconfig /release) forces your network adapter to drop its assigned IP address, and the second command (ipconfig /renew) renews the network adapter's IP address.
5. How to get nic info about your network adapter's MAC addresses
One of the fastest and easiest ways to obtain the MAC addresses of your network adapters is to use the getmac command. In Command Prompt, type getmac and press Enter, as seen in the image below.
6. How can I see the computers and devices connected to my network using CMD?
In some cases, you might want to see what computers and devices are connected to the same network as you are. One of the easy and friendly ways to do that is to use the net view command. Launch Command Prompt and run net view. After a while, you should see a list of the computers and devices in your network.
However, there's a caveat about this command. Net view doesn't show all the computers and devices that are in the same network as you. Although it works well enough for private networks, it fails to identify devices such as smartphones or printers, and also has issues with computers that are running different operating systems. If you want to get a clear view of everything that's connected to your network, you should also check the next command.
7. How can I see all the devices connected to my network using CMD?
The best way to find all the devices connected to the same network as you is based on using the arp command. Open Command Prompt and run arp -a. The IP address shown first, next to Interface, displays your network adapter's IP address. Then, there's a list of IP addresses and MAC addresses (Physical Addresses). All the IP addresses that start with the same numbers as your network adapter are in the same network and/or subnet as you are. They are all devices connected to your network.
The next ones are not real devices, but IP addresses used for multicasting. They are commonly used by your real devices for streaming media on your network. In our example, the devices connected to the same network as our computer are all the ones that have IP addresses starting with 192.168.50.
If you want to see what those devices are, in a more human-friendly way, copy their MAC addresses and look them up on the internet using Google or on websites that let you check which vendors assign certain MAC addresses, such as DNS Checker. For instance, if you're looking for the MAC address 04-d9-f5-b5-b1-f0, you find that it's a device made by ASUS. In truth, it's an ASUS ZenWiFi router.
8. How to check your computer's network connections and open ports
You can get other useful cmd nic info from the netstat command, which lets you see the network connections that are active between your system and any other systems on your network or the internet.
If you add the -a parameter to the netstat command, you can get a list with all the connections and listening ports as "netstat -a".