Command Line Tools Flashcards
ipconfig
Displays current TCP/IP
network configuration values
ipconfig /all
View additional configuration information, such as DNS servers and MAC addresses
ipconfig /renew
Renew IP address
-computers ip address not working properly and you want to obtain new address from DHCP server
ipconfig /release
Release current IP address
-computers ip address not working properly and you want to obtain new address from DHCP server
ipconfig/flushdns
Erase DNS cache
-problems connecting to websites
Ping
Tests whether another host is available over the network-check if another host is “alive”
Ex: ping 192.168.0.1
Ping 127.0.0.1
Test whether TCP/IP installed properly, even if not wired to the network
IPv4
Also use ping loopback or ping localhost adding -4
Ping ::1
Ping for IPv6
Also use ping loopback or ping localhost adding -6
ping -t
Pings host until command is stopped
Plug and unplug cables to see which cables or ports are live
Monitor a connection over time to check packet drops and connection slowing
ping -n
Pings a host a specific number of times
Good baseline tool, run every day against a router or server and compare results
Ping -n 20 192.168.0.1
ping -l
Pings the host, but you can specify the number of bytes per packet to be sent
Beneficial when testing how a server, router or other device reacts to larger packet sizes
ping -1 1500 192.168.0.1
ping -a
Resolves addresses to hostnames, see hostname associated with IP address
ping -4
Forces use of IPv4 and results in IPv4-based data
ping -4 loopback results in reply from 127.0.0.1
ping -6
Forces use of IPv6 and results in IPv6-based data
ping -6 loopback will result in a reply from ::1
tracert
Sends packets to destinations beyond the local computer’s network. Pings each router along the way between you and the final destination
tracert /d
Does not resolve IP addresses to hostnames, shown as corresponding IP addresses only.
Connecting by IP address will always be faster than connecting by name
hostname
Displays the name of the local computer
Programmatically referred to as the %COMPUTERNAME% variable in any windows system
netstat
Shows network statistics for the local computer
Default command displays sessions to remote computers
Output:
Active connections
TCP %COMPUTERNAME% :1395 8.15.228.165: https ESTABLISHED
Netstat -n
Netstat -a
Netstat -an
Natsrat -nab
-See information numerically
-See TCP and UDP sessions
-See TCP and UDP in numeric format
-Include the executable name for each session shown
nslookup
name server lookup
Queries DNS servers to discover DNS details, including the IP addresses of hosts
Can aid in finding DNS servers and DNS records in a domain
dig
Linux equivalent of nslookup
Queries DNS servers to discover DNS details, including the IP addresses of hosts
Can aid in finding DNS servers and DNS records in a domain
net
Actually a collection of commands
net stop
Stop a service
net start
Start a service from command line
net view
See which computers are currently available on the network
net share
Share folders for other users to view
net use
View any currently mapped network drives
net use x: \computername\sharename
net user
Lists user accounts on the local computer
Create accounts from here using net user/add %username%
net user/active
Activate user accounts
net user /delete
Delete user accounts
arp
Address Resolution Protocol
Resolves between IP addresses and MAC addresses so data communications can flow from the OS to the physical network adapter