Вы находитесь на странице: 1из 7

It is sometimes useful to know the network commands to analyze or configure your TCP/IP networks Here is the list of commands

that can be used in the command prompt: Ping PIN : Test the network connection with a remote IP address

ping!t "IP or host# ping!l $%&' "IP or host#

The !t option to ping continuously until Ctrl!C is pressed( If you specify the !t option you can always get statistics without interrupting pings by pressing Ctrl ) *reak

This command is also useful to generate network load by specifying the size of the packet with the !l option and the packet size in bytes( Tracert T+,C-+T: .isplays all intermediate IP addresses through which a packet passes through/ between the local machine and the specified IP address(

tracert "0IP or host# tracert !d "0IP or host#

This command is useful if the ping command does return any data/ to determine at what le1el the connection failed( IpConfig

IPC2N3I : .isplays or refresh the TCP/IP configuration

ipconfig /all "/release "adapter## "/renew "adapter## /flushdns /displaydns /registerdns "!a# "!a# "!a#

This command/ when e4ecuted with no options/ displays the current IP address/ the subnet mask and default gateway 5network interfaces of the local machine6

/all: .isplays all network configuration/ including .N7/ 8IN7/ .HCP ser1ers/ etc ((( /renew "adapter#: +enews .HCP configuration for all adapters 5if adapter is not specified6 or a specific adapter indicated by the "adapter# parameter( /release "adapter#: 7ends a .HCP+-9-,7- message to the .HCP ser1er to release the current .HCP configuration and cancel the IP address configuration for all adapters 5if adapter is not specified6 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: -mpty and reset the .N7 client resol1er cache( This option is useful to e4clude negati1e entries and all other entries added dynamically to the cache( /displaydns: .isplays the .N7 client resol1er cache/ which includes entries preloaded from the local host file and any recently obtained records for name :ueries resol1ed by the host computer( The .N7 Client ser1ice uses this information to :uickly resol1e fre:uently :ueried names/ before :uerying the configured .N7 ser1ers( /registerdns: +efreshes all .HCP leases and re!registers .N7 names(

Net7tat N-T7T,T: .isplays the status of the TCP/IP stack on the local machine

N-T7T,T "!a# "!e# "!n# "!s# "!p proto# "!r# "inter1al#

!a .isplays all connections and listening ports 5ser1er!side connections are normally inhibited6( !e .isplays -thernet statistics( Can be combined with the !s option( !n .isplays addresses and port numbers in numerical form( !p proto 7hows connections for the protocol specified by proto/ proto may be TCP or ;.P( ;sed with the !s option to display per!protocol statistics/ proto may be TCP/ ;.P or IP( !r .isplays the contents of the routing table( !s .isplays statistics by protocol( *y default/ statistics on TCP/ ;.P and IP are displayed/ the !p option can be used to specify a subset( inter1al: +e!display the selected statistics/ pausing after a specific <inter1al< 5in seconds6 between each display( Press Ctrl ) C to stop displaying statistics( !abno1 .isplays processes using the internet connection 5local IP address/ port/ remote IP adress and the PI. of the process that uses the connection as well as its name6(

+oute +2;T-: .isplays or modifies the routing table

+2;T- "!f# "command "destination# "=,7> network mask# "gateway#

!f Clears the routing tables of all gateway entries( ;sed in con?unction with one of the below <commands</ the tables are cleared before e4ecuting the command( !p =akes the entry into the table/ residual 5after reboot6(

7pecify one of four commands:

.-9-T-: .eletes a route( P+INT: .isplays a route( ,..: ,dds a route( CH,N -: =odifies an e4isting route( destination: 7pecifies the host( =,7>: If the =,7> keyword is present/ the ne4t parameter is interpreted as the network mask parameter( netmask: Pro1ided/ it specifies the 1alue of the subnet mask to be associated with this route entry( ;nspecified/ it takes the default 1alue of &@@(&@@(&@@(&@@( ateway: 7pecifies the gateway( =-T+IC: 7pecifies the cost metric for the destination

,rp ,+P: +esol1ing IP addresses to =,C addresses( .isplays and modifies the translation tables of IP addresses to physical addresses used by the ,+P address resolution protocol(

,+P !s adrAinet adrAeth "adrAif# ,+P !d adrAinet "adrAif# ,+P !a "adrAinet# "!N adrAif#

!a .isplays acti1e ,+P entries by interrogating the current data protocol( If adrAinet is specified/ only the physical and IP addresses of the specified computer are displayed( If more than one network interface uses ,+P/ entries for each ,+P table are displayed( !g is the same as !a adrAinet 7pecifies an internet address( !N adrAif .isplays ,+P entries for the network interface specified by adrAif(

!d .eletes the host specified by adrAinet( !s ,dds the host and associates the adrAinet internet address with the adrAeth physical address( The physical address is gi1en as B he4adecimal bytes separated by hyphens( The entry is permanent( adrAeth 7pecifies a physical address( adrAif 7pecifies the internet interface whose address translation table should be modified( 8hen not specified/ the first applicable interface will be used(

Nbtstat N*T7T,T: ;pdate cache of the 9=H27T7 file( .isplays protocol statistics and current TCP/IP connections using N*T 5Net*I27 o1er TCP/IP6(

N*T7T,T "!a +emote Name# "!, IP address# "!c# "!n# "!r# "!+# "!s# "7# "inter1al#

!a 5adapter status6 display the table 5names6 of the remote machine 5known name6( !, 5adapter status6 display the table 5names6 of the remote machine 5IP address6( !c 5cache6 display the remote name cache including the IP addresses( !n 5names6 9ists local Net*I27 names( !r 5resol1ed6 9ists names resol1ed by broadcast and 1ia 8IN7( !+ 5+eload6 Clear and reload the table cache with the remote names( !7 57essions6 9ists the sessions table with the destination IP addresses( !s 5sessions6 9ists the sessions table with the destination IP addresses con1erted to host names 1ia the hosts file( -4ample : nbtstat !, 0IP This command returns the Net*I27 name/ system name/ users connected ((( to the remote machine(

Telnet T-9N-T

telnet CIP or hostD telnet CIP or hostD Cport TCPD

The telnet command to access to a remote host in Terminal mode 5passi1e screen6 ( It also allows you to check if any TCP ser1ice is running on a remote ser1er by specifying the IP address after the TCP port number( Thus we can test whether the 7=TP 7er1ice is running on a =icrosoft -4change ser1er/ using the IP address of the 7=TP connector/ and then &@ as the port number( The most common ports are:

ftp 5&$6/ telnet 5&E6/ smtp 5&@6/ www 5F%6/ kerberos 5FF6/ popE 5$$%6/ nntp 5$$G6 and nbt 5$EH!$EG6(

Hostname H27TN,=-: .isplays the name of the machine 3tp 3TP: Client to upload files

ftp !s:CfileD

!s This option allows you to run 3TP in batch mode: 7pecifies a te4t file containing 3TP commands(

Nslookup Nslookup sends .N7 re:uests to a .N7 ser1er

nslookup "domain# "dns ser1er#

The nslookup command to send .N7 re:uests to a ser1er( *y default/ if you do not specify the .N7 ser1er/ the command will use the one that is configured for your network interface 5the one you use to surf the internet/ for e4ample6(

Вам также может понравиться