0% found this document useful (0 votes)
22 views

Network Commands

network commands for troubleshooting
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Network Commands

network commands for troubleshooting
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

network commands

1)ipconfig-utilized to verify a network connection as well as to verify your network settings.

/all - This command displays all of the configuration information for the DHCP client.

/release - This command is used to release the IP address that has been leased to the
computer.

/renew - This command is used to renew the lease on the computer's current IP address.

/flushdns - This command is used to flush the DNS resolver cache. The DNS resolver cache is
a temporary database that stores the IP addresses of websites that the
computer has recently visited.

/registerdns - This command is used to refresh all of the DHCP leases and re-register the
DNS names of all the devices on the network.

/displaydns - This command is used to display the contents of the DNS resolver cache.

/showclassid - This command displays all of the DHCP class IDs that are allowed for the
adapter. DHCP class IDs are used to group devices together and assign them
different lease times or other options.

/setclassid - This command is used to modify the DHCP class ID for the adapter.

2)ping-used to check for network errors and also connectivity issues between any two network
devices

-t -pings specified host until stopped(DoS)

-a - This option resolves addresses to hostnames. This means that the ping command will try
to look up the hostname of the IP address that you specify.

-n - This option specifies the number of echo requests to send. By default, the ping command
will send four echo requests.

-f - This option sets the Don't Fragment flag in the packet.

-i TTL - This option specifies the time to live (TTL) for the echo request packets.

-v TOS - This option specifies the type of service (TOS) for the echo request packets.

-r count - This option specifies the number of hops that the echo request packets should
take before returning.

-s count - This option specifies the number of timestamps that should be included in the echo
request packets.
-j host-list - This option specifies a loose source route for the echo request packets.

-k host-list - This option specifies a strict source route for the echo request packets.

-w timeout - This option specifies the timeout value in milliseconds to wait for each r eply.

3)netstat-used to display the TCP/IP network protocol statistics and information.

-a

Displays all connections and listening ports.

-e

Displays Ethernet statistics. This may be combined with the -s option.

-n

Displays addresses and port numbers in numerical form.

-p

proto Shows connections for the protocol specified by proto; proto may be TCP or
UDP. If used with the -s option to display per-protocol statistics, proto may be
TCP, UDP, or IP.

-r Displays the routing table.

-s

Displays per-protocol statistics. By default, statistics are shown for TCP, UDP and IP;
the -p option may be used to specify a subset of the default.

interval

Redisplays selected statistics, pausing interval seconds between each display.


Press CTRL+C to stop redisplaying statistics. If omitted, netstat will print the c
urrent configuration information once.

netstat -n and netstat -an->Displays active connections to the blocked websites.

4)net-used to update, fix, or view the network or network settings

net accounts-Adjust account settings.


net config-Displays your current server or workgroup settings

NET FILE

Display opened shared files on the server.

[id [/CLOSE]]

NET GROUP

Add, delete, view, and otherwise manage network workgroups.

[groupname [/COMMENT:"text"]] [/DOMAIN] groupname {/ADD [/COMMENT:"text"] |


/DELETE} [/DOMAIN] groupname username [...] {/ADD | /DELETE} [/DOMAIN]

NET Add, delete, view, and otherwise manage network groups.

LOCALGROUP

[groupname [/COMMENT:"text"]] [/DOMAIN] groupname {/ADD


[/COMMENT:"text"] | /DELETE} [/DOMAIN]

groupname name [...] {/ADD | /DELETE} [/DOMAIN]

NET NAME

Create or delete name used for messaging.

[name [/ADD | /DELETE]]

NET PAUSE

Pause the specified network service.

To get username of that particular IP address->net user 169.254.215.22

Adding students to the class

“net user subi subi@123 /add”

“icacls "C:\Users\lmaha\Downloads\VIT Downloads\Other Downloads" /grant subi:F”


5)tracert-used to visually see a network packet being sent and received and the amount of hops
required for that packet to get to its destination.

-d Do not resolve addresses to hostnames.

-h maximum_hops Maximum number of hops to search for target.

-j host-list Loose source route along host-list.

-w timeout Wait timeout milliseconds for each reply.

6)route-manually configure the routes in the routing table.

route print

-f

Clears the routing tables of all gateway entries. If this is used in conjunction with one of
the commands, the tables are cleared prior to running the command.

-P

When used with the ADD command, makes a route persistent across boots of the
system. By default, routes are not preserved when the system is restarted. When
used with the PRINT command, displays the list of registered persistent routes.
Ignored for all other commands, which always affect the appropriate persistent
routes. This option is not supported Windows'95. command

MASK

Specifies that the next parameter is the 'netmask' value.

netmask

Specifies a subnet mask value for this route entry. If not specified, it defaults to
255.255.255.255.

gateway

Specifies gateway.

interface

the interface number for the specified route.

METRIC

Specifies the metric, ie. cost for the destination.


7)nslookup-network administration command-line tool available for many

computer operating systems for querying the Domain Name System (DNS) to obtain domain
name or IP address mapping or for any other specific DNS record

nslookup -type=mx vtop.ac.in querying dns record

8)getmac-Display the Media Access Control (MAC) address and list of network protocols

associated with each address for all network cards in each computer, either locally or across a
network.

getmac /fo table/nh /v

9)“netsh advfirewall firewall show rule name=all”->Displays all the rules for current

firewall

-------------------------------------------------------------------------------------------

System commands

1)cacls-Microsoft Windows NT command that allows a user to edit and display the permissions
of NTFS partitions.

2)gpresult-Display Resultant Set of Policy information for a remote user and computer.

Finding the policies ->C:\> gpresult /user targetusername /scope computer /r

C:\> gpresult /s srvmain /u ss64dom\hiropln /p p@ssW23 /user targetusername /scope user

C:\> gpresult /s srvmain /u ss64dom\hiropln /p p@ssW23 /user targetusername /z >policy.txt

C:\> gpresult /s srvmain /u ss64dom\hiropln /p p@ssW23

3)recover-Recover a damaged file from a defective disk


4)chkdsk-check and repair disk problems

CHKDSK C: /F

Fixing Errors /F

5)regedit-Import, export or delete registry settings from a text (.REG) file

REGEDIT /E pathname Export the Registry (all HKLM plus current user)

6)msconfig-system utility to troubleshoot the Microsoft Windows startup process.

database lookup

dsquery user -lmaha 169.254.215.22| dsget user -empid

You might also like