Command Line Commands and Network Settings

Command-Line Commands and Network Settings Back to Page 1

Practice-Labs Resources

  • PLABWIN10

Commands

Here are some often used Command line commands with which a Help Desk professional should be familiar.

ipconfig

In the Windows search window type Cmd.
(Command prompt screen displays).

Right-click/ Run as administrator.

(Command line displays).

Enter ipconfig.

Press Enter
(Basic configuration details about your system and its network displays)

If instead, you type ipconfig /all and press ENTER.
(a more detailed screen displays).

Note: In the above screen, “DHCP Enabled” is set to No. This means that a static IP address has been set for this machine.

hostname

At the command prompt type “hostname” and press ENTER.
(The host’s machine name displays).

ping

The ping command confirms connectivity between the sending machine and the destination address.

For example, type “ping 192.168.0.1” and press ENTER.
(Results display).

Connectivity with the destination address is confirmed by the four replies and the notice that there were zero “lost” packets.

Note: You can ping not only the destination’s address’s IP address, but you can also ping the destination’s machine name if you know it.

When a ping is sent, this is also called an echo request. In other words, the ping is requesting a reply (i.e., echo).

Extended ping

A regular ping stops after 4 results. The “-t” switch allows the echo requests and replies to continue indefinitely until you manually stop the request.

At the command prompt, type “ping 192.168.0.1 -t”.

Press ENTER.
(Results display).

Stopping a ping

To stop a ping or extended ping, press Ctrl+C, or close the command screen.

Nslookup

Name Server Lookup

This command brings back either the IP address of a device or its machine name, depending on which type of information is provided initially.

nslookup using IP address

The “nslookup 192.168.0.1” above would bring back the corresponding machine name.

nslookup using the machine name

The “nslookup plabdc01” above comes back with the “fully qualified domain name” of “Plabdc01.PRACTICELABS.COM”, along with its corresponding address “192.168.0.1”.

Netstat

Network Statistics

A network utility that shows TCP network connections (incoming and outgoing). Also used to monitor traffic and possible network threats.

In the command line, type “netstat -a” and press ENTER.
(All the current connections display).

In the above screencap, note that the address is followed by a port number. For example, in “192.168.0.1:389”, “389” is the port number.

Chkdsk

Check Disk

This command will scan a specified disk and list any issues (e.g., bad sectors, etc.). Note that it does not fix any discovered issues, only lists them

Thus “chkdsk: D” will scan drive D.

Adding the “/r” switch locates bad sectors and recovers readable information. (The disk must be idle.)

whoami

At the command prompt, type “whoami” and press ENTER.
(If used without parameters, whoami displays the current domain and user name.)

whoami /fqdn

At the command prompt, type “whoami /fqdn” and press ENTER.
(Result displays)

System folders

System and System32 folders contain the main Windows operating system files.

Path: C:/ Windows

System File Checker

This utility will scan and repair any issues with the system files.

At the command line, enter SFC /scannow and press ENTER.

Microsoft online documentation

Click the link below to access Microsoft’s online documentation, landing page.

https://docs.microsoft.com/en-us/

Windows Commands

Click the link below to access Microsoft’s online documentation for Windows commands:

https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/windows-commands

Searching Microsoft documentation

For example, to search for information on the “chkdsk” command, enter “chkdsk” in the Search field.

NOTE: These commands are used a lot in Azure, for example. GUI is not always available for everything you might want to do, so learning these commands, or how to find them when needed, is important.

Press Enter.
(Results display).

Click chkdsk.
(Documentation displays)

Network and Internet Settings

These settings determine how the host device connects with the rest of the local network, and beyond to the internet.

Click the network icon on the lower right.
(menu displays)

Click Open Network and Internet Settings.
(“Settings/Status” screen displays).

Click Ethernet.
(“Ethernet” settings display)

“Ethernet” is the networking technology that most pc’s use to connect devices to each other.

Under “Related Settings” click Network and Sharing Center.
(“Network and Sharing Center” displays.)

Notice, in this case, we have two adapters (“Access type” located on the right) for connecting to our two available networks.

Click Change adapter settings.
(“Network Connections” screen displays).

Right-click on Ethernet.
(menu displays).

Click Properties.
(“Properties” dialog box for the selected network adapter displays).

Currently, the internet protocol we are using is “Internet Protocol Version 4 (TCP/IP v4)”.

Click Properties.
(Dialog box displays. Here you can change the IP settings, as needed.).

  • If “Obtain an IP address automatically” is checked, it means that a DHCP server is dynamically providing the needed IP address to your host.
  • If “Use the following IP address” is checked, it means that your device is has been manually identified with a static (i.e., unchanging) IP address.

Before communicating with other devices on the network, a host needs to identify its own address. If DHCP is used, then a host is dynamically assigned an IP address by the DHCP server. This address is temporary and changes each time the host accesses the network. If DHCP is not used then an engineer must manually provide a static (i.e., unchanging) address for the host.

In the present example, we are bypassing the default dynamic setting, and are manually adding a static IP address to our host.

 

January 4, 2022

0 responses on "Command Line Commands and Network Settings"

    Leave a Message