Wednesday, January 5, 2011
【 Weak current College 】 Windows networking commands (8)---Power By 【 China power house network 】
13, modify MAC address
HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Class\\
Find the right window for the "NIC" directory,
For example, a {4D36E972-E325-11CE-BFC1-08002BE10318}
Expand it, and under 0000, 0001, 0002 ... Branch "DriverDesc" found in the key value for the description of your network connection, such as "DriverDesc" value is "Intel82559FastEthernetLANonMotherboard" and then in the right window of a new string value named "Networkaddress, content is what you want MAC value, for instance, is" 004040404040 "and then restart the computer, the ipconfig/all to see.
Not long ago, we all want to live in the command line to change the IP and gateway. Previously under implemented like in NT4 is too troublesome, now under Windows2000 Netsh commands can implement this functionality.
Netsh is a local or remote computer Windows2000 network components command-line and scripting utility. In order to archive or to configure the other servers, the Netsh utility can also save a configuration script in a text file.
Netsh utility is a shell that uses additional Netsh help DLL, you can support multiple Windows2000 components. "Netsh help DLL" is used to monitor or configure a specific Windows2000 network components of other commands, which extends the functionality of Netsh. Each "Netsh help DLL" for the particular network component provides an environment and a set of commands. Each environment can have child environment. For example, in a routed environment in IP and IPX child environment, they are IP routing and IPX routing commands together.
Netsh command-line options include the following:
Usage: netsh [-aAliasFile] [-cContext] [-rRemoteMachine]
[Command|-fScriptFile]
The following command is valid:
The commands in this context:
?-Displays a list of commands.
Aaaa-changes to the aaaa context would would.
Add-Add a configuration item to the project list.
Delete-Deletes the item list for a configuration item.
Dhcp-change to the dhcp would context would.
Dump0-displays a configuration script.
Exec-run a script file.
Help-displays a list of commands.
Interface-interface changes that would would context.
Ras-changes to the ras would context would.
Routing-changes to routing would context would.
Set-update configuration settings.
Show-Show Info
Changes to wins-would wins would context.
The following child context is available:
routinginterfacerasdhcpwinsaaaa
If you need to order more help, type the command,
Followed by?.
-aAliasFile
Specifies the use of an alias file. Alias file contains the netsh command list and an alias version, so you can use the alias replaces the netsh command on the command line. You can use the alias file to other platforms in more familiar commands mapped to the appropriate netsh commands.
-cContext
Specifies that correspond to installed support dll command environment.
Command
Specifies the Netsh command to be executed.
-fScriptFile
ScriptFile file specified to run all of the netsh command.
-rRemoteMachine
Specifies the remote computer on which to run the netsh command, by name or IP address to specify the remote computer.
You can use the command abbreviations for meaningful short strings. For example, publish shipint command is equivalent to publishing showipinterface. The Netsh command can be global or specific environment. Global commands can be issued in any environment, and to General Netsh utility functions. Specific environment of the command with the environment. You can set the Publish command on the records in the log file to create the Netsh command session of the audit trail.
Lists the netsh global command.
Command description
.. Move up a level.
Or help to display command-line help.
Showversion display Windows and Netsh utility in the current version.
Shownetdlls display installed "Netsh help DLL" in the current version.
Add addhelper "Netsh help DLL.
Deletehelper delete "Netsh help DLL.
showhelperDisplays the installed "Netsh help DLL.
Cmd to create Windows2000 command window.
Online sets the current mode to online.
Offline sets the current mode is set to offline.
Setmode sets the current mode to online or offline.
Showmode displays the current mode.
Flush discards in offline mode and any changes.
Commit to submit to offline mode.
Setaudit-logging record tool on or off.
Showaudit-logging displays the current audit logging settings.
Setloglevel set the level of logging information
Showloglevel shows the level of logging information.
Setmachine configuration do the Netsh command.
Showmachine displays the Netsh command.
Exec implementation including the Netsh command script file.
Quit or exit bye or exit Netsh utility.
Add to an existing command addalias alias.
Deletealias delete existing command aliases.
Showalias displays all defined aliases.
Dump will be configured to write to a text file.
Popd is popped from the stack environment of script commands.
Pushd current environment stack of script commands.
Netsh utility has the following command:
Online
Online mode, at the Netsh command prompt to publish command is executed immediately.
Offline
Offline mode, the Netsh command prompt to publish command, accumulated and by publishing the commit global command to execute the batch mode. You can publish flush global command to discard accumulated commands.
Script
Use the-f command line option, or the Netsh command prompt publishing exec global commands, you can perform the specified file in all of the Netsh command.
To create the current configuration of the script, use the dump global command. Dump command under Netsh command output current run configuration. You can use this command to create scripts to configure a newserver or reconfigure the existing server. If you want to configure the components that make a big change, it is recommended that you use the dump command begin configuring session in case before making the change you need to restore configuration.
Interface commands
The following table lists the available on Windows2000 command prompt, type netsh commands that are used to manage the running Windows2000Server and the Routing and remote access service on the computer on which the interface settings. If there is a special feature multiple commands, each command with a slash (/).
When the command prompt, type the command, click in each command with netsh. To obtain accurate each command syntax, type the following at the command line. Options for example, to obtain netshinterface command from the command line "help", at the command prompt, type netshinterface?.
Command description
Interfaceset/showinterface enable, disable, connect, disconnect, and display the configuration for demand-dial interface.
Interfaceset/showcredentials in demand-dial interface configuration, or displays the user name, password, and domain name.
……… (Omit the two or three thousand words)
Closer to home, now come see the network settings under WIN2000.
D:\\>netsh
netsh>interface
interface>dump
#========================
# Interface configuration
#========================
pushdinterface
resetall
popd
# End of interface configuration
#----------------------------------
# Interface IP configuration
#----------------------------------
pushdinterfaceip
# "Local area connection 2" interface IP configuration
Setaddressname = "local area connection 2" source = dhcp
Setdnsname = "local area connection 2" source = dhcp
Setwinsname = "local area connection 2" source = dhcp
# "Local area connection interface IP configuration
Setaddressname = "local area connection"source = staticaddr = 192.168.1.10mask = 255.255.255.0
Setaddressname = "local area connection gateway = 192.168.0.1gwmetric = 1
setdnsnaMe = "local area connection" source = staticaddr = 192.168.0.1
Setwinsname = "local area connection" source = staticaddr = none
popd
# Interface IP configuration end
If you want to quickly modify a local IP address.
You can use the contents of the text is written to the following:
interfaceip
Setaddress static192.168.5.10255.255.255.0192.168.0.11 local connection
^^^^^^^^^^^^^^
Interface name IP address netmask gateway interface metric
The above is saved as local.sh
D:\\>netshexeclocal.sh
Labels:
[:]
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment