This command, when executed with no options, displays the current IP address, the subnet mask and default gateway (network interfaces of the local machine)
/all: Displays all network configuration, including DNS, WINS, DHCP servers, etc ...
/renew [adapter]: Renews DHCP configuration for all adapters (if adapter is not specified) or a specific adapter indicated by the [adapter] parameter.
/release [adapter]: Sends a DHCPRELEASE message to the DHCP server to release the current DHCP configuration and cancel the IP address configuration for all adapters (if adapter is not specified) or a specific adapter indicated by the [adapter] parameter. This parameter disables TCP/IP for network cards configured to automatically obtain an IP address.
/flushdns: Empty and reset the DNS client resolver cache. This option is useful to exclude negative entries and all other entries added dynamically to the cache.
/displaydns: Displays the DNS client resolver cache, which includes entries preloaded from the local host file and any recently obtained records for name queries resolved by the host computer. The DNS Client service uses this information to quickly resolve frequently queried names, before querying the configured DNS servers.
/registerdns: Refreshes all DHCP leases and re-registers DNS names.
NETSTAT: Displays the status of the TCP/IP stack on the local machine
-a Displays active ARP entries by interrogating the current data protocol. If adr_inet is specified, only the physical and IP addresses of the specified computer are displayed. If more than one network interface uses ARP, entries for each ARP table are displayed.
-g is the same as -a
adr_inet Specifies an internet address.
-N adr_if Displays ARP entries for the network interface specified by adr_if.
-d Deletes the host specified by adr_inet.
-s Adds the host and associates the adr_inet internet address with the adr_eth physical address. The physical address is given as 6 hexadecimal bytes separated by hyphens. The entry is permanent.
adr_eth Specifies a physical address.
adr_if Specifies the internet interface whose address translation table should be modified. When not specified, the first applicable interface will be used.
NBTSTAT: Update cache of the LMHOSTS file. Displays protocol statistics and current TCP/IP connections using NBT (NetBIOS over TCP/IP).
-a (adapter status) display the table (names) of the remote machine (known name).
-A (adapter status) display the table (names) of the remote machine (IP address).
-c (cache) display the remote name cache including the IP addresses.
-n (names) Lists local NetBIOS names.
-r (resolved) Lists names resolved by broadcast and via WINS.
-R (Reload) Clear and reload the table cache with the remote names.
-S (Sessions) Lists the sessions table with the destination IP addresses.
-s (sessions) Lists the sessions table with the destination IP addresses converted to host names via the hosts file.
nbtstat -A @IP This command returns the NetBIOS name, system name, users connected ... to the remote machine.
telnet <IP or host>
telnet <IP or host> <port TCP>
The telnet command to access to a remote host in Terminal mode (passive screen) . It also allows you to check if any TCP service is running on a remote server by specifying the IP address after the TCP port number. Thus we can test whether the SMTP Service is running on a Microsoft Exchange server, using the IP address of the SMTP connector, and then 25 as the port number. The most common ports are:
and nbt (137-139).
HOSTNAME: Displays the name of the machine
FTP: Client to upload files
-s This option allows you to run FTP in batch mode: Specifies a text file containing FTP commands.
Nslookup sends DNS requests to a DNS server
nslookup [domain] [dns server]
The nslookup command to send DNS requests to a server. By default, if you do not specify the DNS server, the command will use the one that is configured for your network interface (the one you use to surf the internet, for example).