KEMBAR78
Network Commands | PDF | Computer Science | Internet
0% found this document useful (0 votes)
77 views21 pages

Network Commands

The document provides an overview of various network commands including ARP, NSLOOKUP, NBTSTAT, NETSH, NETSTAT, PATHPING, PING, and TRACERT. Each command includes syntax, options, and examples for usage, aimed at troubleshooting and managing network connections and configurations. The commands are essential for diagnosing network issues and configuring network settings effectively.

Uploaded by

Ritika Lohiya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views21 pages

Network Commands

The document provides an overview of various network commands including ARP, NSLOOKUP, NBTSTAT, NETSH, NETSTAT, PATHPING, PING, and TRACERT. Each command includes syntax, options, and examples for usage, aimed at troubleshooting and managing network connections and configurations. The commands are essential for diagnosing network issues and configuring network settings effectively.

Uploaded by

Ritika Lohiya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 21

Network commands

ARP - Address Resolution Protocol

Display and modify the IP-to-Physical address translation tables used by address
resolution protocol.

Syntax
View the contents of the local ARP cache table
ARP -a [ip_addr] [-N if_addr]

Add a static Arp entry for frequent accessed hosts


ARP -s ip_addr eth_addr [if_addr]

Delete an entry
ARP -d ip_addr [if_addr]

Description
-a Display current ARP entries.
May include more than one network interface. If ip_addr is
specified, the IP and Physical addresses for only the
specified computer are displayed.
-g Same as -a.
-N if_addr Display the ARP entries for the network interface specified
by if_addr
-d ip_addr Delete the host specified by ip_addr.
-d * will delete all hosts.

-s Add the host and associates the Internet address ip_addr


with the Physical address eth_addr. The Physical address is
given as 6 hexadecimal bytes separated by hyphens. The entry
is permanent.

eth_addr Specifies a physical address.

if_addr If present, this specifies the Internet address of the


interface whose address translation table should be
modified. If not present, the first applicable interface
will be used.

If two hosts on the same sub-net cannot ping each other successfully, try running ARP -a
to list the addresses on each computer to see if they have the correct MAC addresses.

A host's MAC address can be checked using IPCONFIG. If another host with a duplicate
IP address exists on the network, the ARP cache may have had the MAC address for the
other computer placed in it. ARP -d is used to delete an entry that may be incorrect.
Examples

Display the ARP cache tables for all interfaces:


arp –a Display the ARP cache table for the interface on IP address 10.1.4.99:

arp -a -N 10.1.4.99

Add a static ARP cache entry on IP addr 10.1.4.77 to the physical address 00-AA-21-4A-
2F-9A:

arp -s 10.1.4.77 00-AA-21-4A-2F-9A

NSLOOKUP (TCP/IP)
Lookup IP addresses on a NameServer.

Syntax
Lookup the ip address of MyHost:

NSLOOKUP [-option] MyHost

Lookup ip address of MyHost on MyNameServer:

NSLOOKUP [-option] MyHost MyNameServer

Enter "command mode":

NSLOOKUP

Command Mode options:

help or ? - print a list of Command Mode options


exit or ^C - exit "command mode"

set all - print options, current server and host


finger [USER] - finger the optional NAME at the current default
host
MyHost - print ip address of MyHost
MyHost MyNameServer - print ip address of MyHost on MyNameServer
set [no]debug - print debugging info
set [no]d2 - print exhaustive debugging info

set domain=NAME - set default domain name to NAME


set root=NAME - set root server to NAME
root - set current default server to the root
server NAME - set default server to NAME, using current default
server
lserver NAME - set default server to NAME, using initial server
set srchlist=N1[/N2/.../N6] - set domain to N1 and search list to N1,
N2,...

set retry=X - set number of retries to X


set timeout=X - set initial time-out interval to X seconds
set [no]defname - append domain name to each query
set [no]recurse - ask for recursive answer to query
set [no]search - use domain search list
set [no]vc - always use a virtual circuit
set class=X - set query class (for example, IN (Internet), ANY)
set [no]msxfr - use MS fast zone transfer
set ixfrver=X - current version to use in IXFR transfer request
set type=X - set query type
set querytype=X - set query type
(e.g. A, ANY, CNAME, MX, NS, PTR, SOA, SRV)

ls [opt] DOMAIN [> FILE] - list addresses in DOMAIN


(and optionally output to FILE)

-d - list all records


-t TYPE - list records of the given Type (for example, A,
CNAME,
MX, NS, PTR, and so on)
-a - list Aliases and canonical names.

view FILE - sort an 'ls' output file and view it with pg

Example:

C:\> nslookup -querytype=TXT -timeout=10 porttest.dns-oarc.net

NBTSTAT.exe
Display protocol statistics and current TCP/IP connections using NBT (NetBIOS over
TCP/IP).

Syntax
By Name
NBTSTAT -a Remote_host_Name [options] [interval]

By IP address
NBTSTAT -A IP_address [options] [interval]

Key
-a (adapter status) List the remote machine's name table given its
name
-A (Adapter status) List the remote machine's name table given its
IP address
-c (cache) List NBT's cache of remote [machine] names
and their IP addresses
-n (names) List local NetBIOS names.
-r (resolved) List names resolved by broadcast and via WINS
-R (Reload) Purge and reloads the remote cache name table
-S (Sessions) List sessions table with the destination IP
addresses
-s (sessions) List sessions table converting destination IP
addresses to computer NETBIOS names.
-RR (ReleaseRefresh) Send Name Release packets to WINS and then,
starts Refresh

interval Redisplay selected statistics, pausing interval


seconds
between each display. Press Ctrl+C to stop
redisplaying
statistics.

NETSH
Configure Interfaces, Routing protocols, Filters, Routes, Routing & remote access.

Syntax
NETSH [-r router name] [-a AliasFile] [-c Context] [Command | -f
ScriptFile]

Key
context may be any of:
DHCP, ip, ipx, netbeui, ras, routing,
autodhcp, dnsproxy, igmp, mib, nat, ospf, relay, rip, wins.

Under Windows XP the available contexts are:


AAAA, DHCP, DIAG, IP, RAS, ROUTING, WINS

To display a list of commands that can be used in a context, type


the
context name followed by a space and a ? at the netsh> command
prompt.
e.g.
netsh> routing ?

command may be any of:

/exec script_file_name
Load the script file and execute commands from it.

/offline
Set the current mode to offline.
changes made in this mode are saved, but require a
"commit"
or "online" command to be set in the router.

/online
Set the current mode to online.
Changes in this mode are immediately reflected in the
router.

/commit Commit any changes made in the offline mode to the


router.

/popd Pop a context from the stack.


/pushd Push current context onto the stack.

/set mode [mode =] online | offline


Set the current mode to online or offline.

/abort Discard changes made in offline mode.

/add helper DLL_name


Install the helper .dll file in netsh.exe.

/delete helper .dll file name


Remove the helper .dll file from Netsh.exe.

/show alias list all defined aliases.


/show helper list all top-level helpers.
/show mode show the current mode.

/alias List all aliases.

/alias [alias_name]
Display the string value of the alias.

/alias [alias_name] [string1] [string2 ...]


Set alias_name to the specified strings.

/unalias alias_name
Delete an alias.

/dump - file name


Dump or append configuration to a text file.

/bye Exit NETSH


/exit Exit NETSH
/quit Exit NETSH
/h Display help
/help Display help
/? Display help

Examples

Set LAN connection to DHCP


NETSH set address name="Local Area Connection" source=dhcp

Set LAN connection to the static IP address 192.168.5.99


NETSH set address name="MyLocal AreaConnection" source=static addr=192.168.5.99
mask=255.255.255.0 gateway=192.168.5.1

Show IP configuration
NETSH interface ip show config

Connect to port
NETSH diag connect iphost www.ss64.com 80
Export IP settings to file
NETSH -c interface dump > netsh.txt

Import IP settings from a file


NETSH -f netsh.txt

NETSTAT.exe
Display current TCP/IP network connections and protocol statistics.

Syntax
NETSTAT [options] [-p protocol] [interval]

Key
-a Display All connections and listening ports.
-e Display Ethernet statistics. (may be combined with -s)
-n Display addresses and port numbers in Numerical form.
-r Display the Routing table.
-o Display the Owning process ID associated with each connection.

-b Display the exe involved in creating each connection or


listening port.*
-v Verbose - use in conjunction with -b, to display the sequence of
components involved for all executables.

-p protocol
Show only connections for the protocol specified;
may be any of: TCP, UDP, TCPv6 or UDPv6.
If used with the -s option then the following protocols
may also be specified: IP, IPv6, ICMP,or ICMPv6.

-s Display per-protocol statistics. By default, statistics are


shown for IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, and UDPv6;
(The v6 protocols are not available under 2k and NT4)
The -p option may be used to display just a subset of these.

interval Redisplay statistics, pausing interval seconds between


each display. (default=once only) Press CTRL+C to stop.

* Where available this will display the sequence of components involved in creating the
connection or listening port. (Typically well-known executables which host multiple
independent components.) This option will display the executable name in [ ] at the
bottom, with the component it called on top, repeated until TCP/IP is reached. The -b
option can be time-consuming and will fail unless you have sufficient permissions.

PATHPING
Trace route and provide network latency and packet loss for each router and link in the
path. Combines the functionality of PING and TRACERT.
Syntax
PATHPING [-n] [-h max_hops] [-g host_list] [-p period]
[-q num_queries] [-w timeout] [-i IPAddress] [-4 ] [-6 ]
[TargetName]

Key
-g host_list - Loose source route along host-list.
-h max_hops - Maximum number of hops to search for target.
-i address - Use the specified source address.
-n - Do not resolve addresses to hostnames.
-p period - Wait period milliseconds between pings.
-q num_queries - Number of queries per hop.
-w timeout - Wait timeout milliseconds for each reply.
-P - Test for RSVP PATH connectivity.
-R - Test if each hop is RSVP aware.
-T - Test connectivity to each hop with Layer-2 priority tags.
-4 - Force using IPv4.
-6 - Force using IPv6.

Pathping is invaluable for determining which routers or subnets may be having network
problems - it displays the degree of packet loss at any given router or link.

Pathping sends multiple Echo Request messages to each router between a source and
destination over a period of time and computes aggregate results based on the packets
returned from each router.

Pathping performs the equivalent of the tracert command by identifying which routers are
on the path.

To avoid network congestion and to minimize the effect of burst losses, pings should be
sent at a sufficiently slow pace (not too frequently.)

When -p is specified, pings are sent individually to each intermediate hop. When -w is
specified, multiple pings can be sent in parallel. It's therefore possible to choose a
Timeout parameter that is less than the wait Period * Number of hops.

Firewalls
Like tracert PathPing uses Internet Control Message Protocol (ICMP) over TCP/IP. Many
firewalls will block ICMP traffic by default. If an attacker is able to forge ICMP redirect
packets, he or she can alter the routing tables on the host and possibly subvert the security
of the host by causing traffic to flow via a path you didn't intend.

PING
Test a network connection - if successful, ping returns the ip address.

Syntax
PING [options] destination_host
Options
-w timeout Timeout in milliseconds to wait for each reply.
-i TTL Time To Live.
-v TOS Type Of Service.
-a Resolve addresses to hostnames.
-n count Number of echo requests to send.
-t Ping the destination host until interrupted.
-l size Send buffer size.
-f Set Don't Fragment flag in packet.
-r count Record route for count hops.
-s count Timestamp for count hops.
-j host_list Loose source route along host_list.
-k host_list Strict source route along host_list.
destination_host The name of the remote host

A response of "Request timed out" means there was no response to the ping attempt in
the default time period of one second.
If the latency of the response is more than one second. Use the -w option on the ping
command to increase the time-out. For example, to allow responses within five seconds,
use ping -w 5000.

A successful PING does NOT always return an %errorlevel% == 0


Therefore to reliably detect a successful ping - pipe the output into FIND and look for the
text "TTL"

Note that "Reply" in the output of PING does not always indicate a positive response.
You may receive a message from a router such as: Reply from 192.168.1.254:
Destination Net Unreachable.

Four steps to test an IP connection with ping:

1) Ping the loopback address to verify that TCP/IP is installed and configured correctly
on the local computer.
PING 127.0.0.1

2) Ping the IP address of the local computer to verify that it was added to the network
correctly.
PING IP_address_of_local_host

3) Ping the IP address of the default gateway to verify that the default gateway is
functioning and that you can communicate with a local host on the local network.
PING IP_address_of_default_gateway

4) Ping the IP address of a remote host to verify that you can communicate through a
router.
PING IP_address_of_remote_host

Examples
PING -n 1 -w 7500 Server_06

PING -w 7500 MyHost |find "TTL=" && ECHO MyHost found

PING -w 7500 MyHost |find "TTL=" || ECHO MyHost not found

PING -n 5 -w 7500 www.microsoft.com

PING -n 5 -w 7500 microsoft.com

PING is named after the sound that a sonar makes.

Ping times below 10 milliseconds often have low accuracy.

A time of 10 milliseconds is roughly equal to a distance of 930 Miles, travelling a straight


line route at the speed of light.

TRACERT
Trace Route - Find the IP address of any remote host. TRACERT is useful for
troubleshooting large networks where several paths can be taken to arrive at the same
point, or where many intermediate systems (routers or bridges) are involved.

Syntax
TRACERT [options] target_name

Key
target_name The HTTP or UNC name of the host

Options:
-d Do not resolve addresses to hostnames.
(avoids performing a DNS lookup)

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


(default=30)

-j host-list Trace route along given host-list.


up to 9 hosts in dotted decimal notation, separated
by spaces.

-w timeout Wait timeout milliseconds for each reply.

The functionality of TRACERT is the same under all versions of windows but the output
is cosmetically improved under XP.

Tracert uses the IP TTL field and ICMP error messages to determine the route from one
host to another through a network.

Care must be taken with tracert as it shows the optimal route, not necessarily the actual
route. To be accurate, it is possible to ping from a UNIX machine back to the PC using
the -R option to record the route taken - but only if the particular network devices support
it.

This diagnostic tool determines the path taken to a destination by sending ICMP Echo
Request messages with varying Time to Live (TTL) values to the destination.

TTL (Time to Live) calculation


TTL is effectively a count of the (maximum) number of links to the destination host.
Each router along the path decrements the TTL in an IP packet by at least 1 before
forwarding it.

When the TTL on a packet reaches 0, the router is expected to return an ICMP Time
Exceeded message to the source computer.

Tracert determines the path by sending the first Echo Request message with a TTL of 1
and incrementing the TTL by 1 on each subsequent transmission until either the target
host responds or the maximum number of hops is reached.

This process relys on intermediate routers to return ICMP Time Exceeded messages.
However, some routers do not return Time Exceeded messages for packets with expired
TTL values and are invisible to the tracert command. In this case, a row of asterisks (*) is
displayed for that hop.

Firewalls
Many firewalls will block ICMP traffic by default. If an attacker is able to forge ICMP
redirect packets, he or she can alter the routing tables on the host and possibly subvert the
security of the host by causing traffic to flow via a path you didn't intend.

Examples

TRACERT www.doubleclick.net

TRACERT 123.45.67.89

TRACERT local_server

Windows XP syntax

NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |


HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION | SHARE |
START | STATISTICS | STOP | TIME | USE | USER | VIEW ]

NET Adjust account settings.


ACCOUNTS
[/FORCELOGOFF:{minutes | NO}] [/MINPWLEN:length]
[/MAXPWAGE:{days | UNLIMITED}] [/MINPWAGE:days]
[/UNIQUEPW:number] [/DOMAIN]
NET Add other networked computers with Windows Domain Controller.
COMPUTER
\\computername {/ADD | /DEL}
NET CONFIG Displays your current server and/or workgroup settings.

[SERVER | WORKSTATION]
NET Continues the use of service.
CONTINUE
[service]
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.

[service]
NET PRINT Manage network print jobs.

\\computername\sharename
[\\computername] job# [/HOLD | /RELEASE | /DELETE]
NET SEND Sends messages to other users, computers, or messaging names on
the network. The Messenger service must be running to receive
messages.
You can send a message only to an name that is active on the
network. If the message is sent to a username, that user must be
logged on and running the Messenger service to receive the
message.

{name | * | /DOMAIN[:name] | /USERS} message


NET SESSION Display all sessions connected to the computer and deletes them if
specified.

[\\computername] [/DELETE]
NET SHARE Create and manage a local network share.

sharename
sharename=drive:path [/USERS:number | /UNLIMITED]
[/REMARK:"text"]
[/CACHE:Manual | Documents| Programs | None ]
sharename [/USERS:number | /UNLIMITED]
[/REMARK:"text"]
[/CACHE:Manual | Documents | Programs | None]
{sharename | devicename | drive:path} /DELETE
NET START Start the specified network service.

[service]
NET Display network statistics of the workstation or server.
STATISTICS
[WORKSTATION | SERVER]
NET STOP Stop the specified network service.

service
NET TIME Display the time and date of another network computer.

[\\computername | /DOMAIN[:domainname] |
/RTSDOMAIN[:domainname]] [/SET]
[\\computername] /QUERYSNTP
[\\computername] /SETSNTP[:ntp server list]
NET USE Connects or disconnects your computer from a shared resource or
displays information about your connections.

[devicename | *] [\\computername\sharename[\volume]
[password | *]]
[/USER:[domainname\]username]
[/USER:[dotted domain name\]username]
[/USER:[username@dotted domain name]
[/SMARTCARD]
[/SAVECRED]
[[/DELETE] | [/PERSISTENT:{YES | NO}]]

NET USE {devicename | *} [password | *] /HOME

NET USE [/PERSISTENT:{YES | NO}]


NET USER Displays users on the computer and/or domain.

[username [password | *] [options]] [/DOMAIN]


username {password | *} /ADD [options] [/DOMAIN]
username [/DELETE] [/DOMAIN]
NET VIEW Displays a list of computers in a specified workgroup or the shared
resources available on a specified computer.

[\\computername [/CACHE] | /DOMAIN[:domainname]]


NET VIEW /NETWORK:NW [\\computername]

Windows 2000 syntax

NET CONFIG Displays your current workgroup settings.

NET CONFIG [/YES]

/YES Carries out the NET CONFIG command without


first prompting you to provide information or
confirm actions.
NET DIAG Runs the Microsoft Network Diagnostics program to test the
hardware connection between two computers and to display
information about a single computer.

NET DIAGNOSTICS [/NAMES | /STATUS]

/NAMES Specifies a diagnostic server name in order to avoid


conflicts when NET DIAG is used simultaneously by
multiple users. This option works only when the network
uses a NetBIOS protocol.
/STATUS Enables you to specify a computer about which you
want network diagnostics information.
NET HELP Displays information about NET commands and error messages.
command /?
NET HELP [suffix]
NET HELP errornum

command / Specifies the Microsoft NET command that you want


? information about.
suffix Specifies the second word of the command you want
information about. For example, the suffix of NET
VIEW is VIEW.
errornum Specifies the number of the error message that you
want information about.
NET INIT Loads protocol and network-adapter drivers without binding them
to Protocol Manager. This command may be required if you are
using a third-party network-adapter driver. You can then bind the
drivers to Protocol Manager by typing NET START NETBIND.

NET INITIALIZE [/DYNAMIC]

/DYNAMIC Loads the Protocol Manager dynamically. This is


useful with some third-party networks, such as
Banyan(R) VINES(R), to resolve memory problems.
NET LOGOFF Breaks the connection between your computer and the shared
resources to which it is connected.

NET LOGOFF [/YES]

Carries out the NET LOGOFF command without first


/YES prompting you to provide information or confirm
actions.
NET LOGON Identifies you as a member of a workgroup.

NET LOGON [user [password | ?]] [/DOMAIN:name] [/YES]


[/SAVEPW:NO]

user Specifies the name that identifies you in your


workgroup. The name you specify can contain up to
20 characters.
password The unique string of characters that authorizes you
to gain access to your password-list file. The
password can contain up to 14 characters.
? Specifies that you want to be prompted for your
password.
/DOMAIN Specifies that you want to log on to a Microsoft
Windows NT or LAN Manager domain. name
Specifies the Windows NT or LAN Manager
domain you want to log on to.
/YES Carries out the NET LOGON command without first
prompting you to provide information or confirm
actions.
/SAVEPW:NOCarries out the NET LOGON command without
prompting you to create a password-list file.

If you would rather be prompted to type your user name and


password instead of specifying them in the NET LOGON command
line, type NET LOGON without options.
NET Changes your logon password.
PASSWORD
NET PASSWORD [oldpassword [newpassword]]
NET PASSWORD \\computer | /DOMAIN:name [user
[oldpassword [newpassword]]]

oldpassword Specifies your current password.


newpassword Specifies your new password. It can have as many
as 14 characters.
computer Specifies the Windows NT or LAN Manager server
on which you want to change your password.
/DOMAIN Specifies that you want to change your
password on a Windows NT or LAN Manager
domain.
Name Specifies the Windows NT or LAN Manager
domain on which
you want to change your password.
user Specifies your Windows NT or LAN Manager user
name.

The first syntax line above is for changing the password for your
password-list file. The second syntax line above is for changing
your password on a Windows NT or LAN Manager server or
domain.
NET PRINT Displays information about print queues and controls print jobs.

NET PRINT \\computer[\printer] | port [/YES]


NET PRINT \\computer | port [job# [/PAUSE | /RESUME |
/DELETE]] [/YES]

computer Specifies the name of the computer whose print


queue you want information about.
printer Specifies the name of the printer you want
information about.
port Specifies the name of the parallel (LPT) port on
your computer that is connected to the printer you
want information about.
job# Specifies the number assigned to a queued print job.
You can specify the below options.
/PAUSE Pauses a print job.
/RESUME Restarts a print job that has been paused.
/DELETE Cancels a print job.
/YES Carries out the NET PRINT command without first
prompting you to provide information or confirm
actions.

When you specify the name of a computer by using the NET


PRINT command, you receive information about the print queues
on each of the shared printers that are connected to the computer.
NET SEND NET SEND {name | * | /DOMAIN[:name] | /USERS} message

Sends messages to other users, computers, or messaging names on


the network. The Messenger service must be running to receive
messages.

You can send a message only to an name that is active on the


network. If the message is sent to a username, that user must be
logged on and running the Messenger service to receive the
message.

name Is the username, computername, or messaging


name to send the message to. If the name is a
computername that contains blank characters,
enclose the alias in quotation marks (" ").
* Sends the message to all the names in your
group.
/ Sends the message to all the names in the
DOMAIN[:name] workstation domain. If name is specified, the
message is sent to all the names in the specified
domain or workgroup.
/USERS Sends the message to all users connected to the
server.
message Is text to be sent as a message.
NET SHARE NET SHARE sharename

sharename=drive:path [/USERS:number |
/UNLIMITED]
[/REMARK:"text"]
[/CACHE:Manual | Automatic |
No ]
sharename [/USERS:number |
/UNLIMITED]
[/REMARK:"text"]
[/CACHE:Manual | Automatic |
No ]
{sharename | devicename | /DELETE
drive:path}
NET START Starts services. NOTE: Services cannot be started from a command
prompt within Windows.

NET START [BASIC | NWREDIR | WORKSTATION |


NETBIND | NETBEUI | NWLINK] [/LIST] [/YES]
[/VERBOSE]

BASIC Starts the basic redirector.


NWREDIR Starts the Microsoft Novell(R) compatible
redirector.
WORKSTATIONStarts the default redirector.
NETBIND Binds protocols and network-adapter drivers.
NETBEUI Starts the NetBIOS interface.
NWLINK Starts the IPX/SPX-compatible interface.
/LIST Displays a list of the services that are running.
/YES Carries out the NET START command without
first prompting you to provide information or
confirm actions.
/VERBOSE Displays information about device drivers and
services as they are loaded.

To start the workgroup redirector you selected during Setup, type


NET START without options. In general, you don't need to use any
of the options.
NET STOP Stops services. NOTE: Services cannot be stopped from a command
prompt within Windows.

NET STOP [BASIC | NWREDIR | WORKSTATION |


NETBEUI | NWLINK] [/YES]

NET STOP Stops the basic redirector.


BASIC Stops the basic redirector.
NWREDIR Stops the Microsoft Novell(R) compatible
redirector.
WORKSTATIONStops the default redirector.
NETBEUI Stops the NetBIOS interface.
NWLINK Stops the IPX/SPX compatible interface.
/YES Carries out the NET STOP command without
first prompting you to provide information or
confirm actions.

To stop the workgroup redirector, type NET STOP without options.


This breaks all your connections to shared resources and removes
the NET commands from your computer's memory.
NET TIME Displays the time on or synchronizes your computer's clock with
the shared clock on a Microsoft Windows for Workgroups,
Windows NT, Windows 95, or NetWare time server.

NET TIME [\\computer | /WORKGROUP:wgname] [/SET]


[/YES]

computer Specifies the name of the computer (time server)


whose time you want to check or synchronize
your computer's clock with.
/WORKGROUP Specifies that you want to use the clock on a
computer (time server) in another workgroup.
wgname Specifies the name of the workgroup containing a
computer whose clock you want to check or
synchronize your computer's clock with. If there
are multiple time servers in that workgroup, NET
TIME uses the first one it finds.
/SET Synchronizes your computer's clock with the
clock on the computer or workgroup you specify.
/YES Carries out the NET TIME command without
first prompting you to provide information or
confirm actions.
NET USE Connects or disconnects your computer from a shared resource or
displays information about your connections.

NET USE [drive: | *] [\\computer\directory [password | ?]]


[/SAVEPW:NO] [/YES] [/NO]
NET USE [port:] [\\computer\printer [password | ?]]
[/SAVEPW:NO] [/YES] [/NO]

NET USE drive: | \\computer\directory /DELETE [/YES]


NET USE port: | \\computer\printer /DELETE [/YES]
NET USE * /DELETE [/YES]

NET USE drive: | * /HOME


drive Specifies the drive letter you assign to a shared
directory.
* Specifies the next available drive letter. If used
with /DELETE, specifies to disconnect all of
your connections.
port Specifies the parallel (LPT) port name you assign
to a shared printer.
computer Specifies the name of the computer sharing the
resource.
directory Specifies the name of the shared directory.
printer Specifies the name of the shared printer.
password Specifies the password for the shared resource, if
any.
? Specifies that you want to be prompted for the
password of the shared resource. You don't need
to use this option unless the password is optional.
/SAVEPW:NO Specifies that the password you type should not
be saved in your password-list file. You need to
retype the password the next time you connect to
this resource.
/YES Carries out the NET USE command without first
prompting you to provide information or confirm
actions.
/DELETE Breaks the specified connection to a shared
resource.
/NO Carries out the NET USE command, responding
with NO automatically when you are prompted to
confirm actions.
/HOME Makes a connection to your HOME directory if
one is specified in your LAN Manager or
Windows NT user account.

To list all of your connections, type NET USE without options.


NET VER Displays the type and version number of the workgroup redirector
you are using.

NET VER
NET VIEW Displays a list of computers in a specified workgroup or the shared
resources available on a specified computer.

NET VIEW [\\computer] [/YES]


NET VIEW [/WORKGROUP:wgname] [/YES]

computer Specifies the name of the computer whose shared


resources you want to see listed.
/WORKGROUP Specifies that you want to view the names of the
computers in another workgroup that share
resources.
wgname Specifies the name of the workgroup whose
computer names you want to view.
/YES Carries out the NET VIEW command without
first prompting you to provide information or
confirm actions.

To display a list of computers in your workgroup that share


resources, type NET VIEW without options.

Examples

net use z: \\computer\folder

Map the Z: drive to the network path //computer/folder.

net send mrhope "There is hope!"

Send a text message to the computer with a host name of mrhope the message There is
hope!. Note: This command only works for Windows versions that support this
command.

Note: Many computers today have also disabled the messenger service, if this service is
disabled you will be unable to send/receive net send messages. Additional information
about how this service is disabled can be found on document CH0000519. If you need
this service enabled, follow the instructions on this page and choose to enable the service
instead of disabling it.

net config workstation

Display additional information about the network such as the computers name,
workgroup, logon domain, DNS, and other useful information.

net view \\hope

View the available computers and their shared resources you may use either of the below
commands. The first example displays available computers. The last command would
display the shared resources on the hope computer.

net localgroup

Display all groups currently setup on the computer you're running the command on.

net share
Display all network shares on your computer.

net share hope=c:\hope\files

Create a share called "hope" for the "c:\hope\files" directory.

IPCONFIG

You might also like