Utility netsh command backup network configuration

Source: Internet
Author: User
Tags wan miniport

If a user is using a laptop and often travels between the home and the company, backing up the network configuration avoids reconfiguring after the network configuration changes. You can use the "ipconfig/batch bak-netcfg" command to back up the network configuration under the Windows98 system. Under the WINDOWS2000/XP system, you can use the Netsh command.
To back up all network-related configuration information on the host to the C-drive Test.txt file, you can run the command:
Netsh dump>c:\test.txt
To back up the remote access connection and TCP/IP configuration interface parameters in this machine to test.txt under C, you can run the command: netsh interface dump>test.txt.
Examples are as follows:
C:\>netsh Dump>c:\test.txt, then we can find the Test.txt file in the C-disk, change the contents of the file as follows:
#========================
# interface Configuration
#========================
Pushd interface




popd
# End of Interface configuration






# ----------------------------------
# IPHTTPS Configuration
# ----------------------------------
Pushd interface Httpstunnel


Reset




popd
# End of Iphttps configuration






#========================
# IPV4 Configuration
#========================
pushd interface IPv4


Reset
Set global defaultcurhoplimit=64 icmpredirects=enabled taskoffload=enabled




popd
# IPV4 Configuration End






# ----------------------------------
# IPV6 Configuration
# ----------------------------------
pushd interface IPv6


Reset




popd
# End of IPV6 configuration






# ----------------------------------
# ISATAP Configuration
# ----------------------------------
pushd interface ISATAP






popd
# ISATAP Configuration End






# ----------------------------------
# 6to4 Configuration
# ----------------------------------
Pushd Interface 6to4


Reset






popd
# 6to4 Configuration End






# ----------------------------------
# ISATAP Configuration
# ----------------------------------
pushd interface ISATAP






popd
# ISATAP Configuration End




#========================
# Port Agent Configuration
#========================
Pushd interface Portproxy


Reset




popd


# End of Port proxy configuration






# ----------------------------------
# TCP Configuration
# ----------------------------------
pushd Interface TCP


Reset


Global Settings rss=enabled chimney=automatic autotuninglevel=normal congestionprovider=none ecncapability=disabled timestamps= Disabled netdma=enabled dca=enabled




popd
# TCP Configuration End






# ----------------------------------
# Teredo Configuration
# ----------------------------------
Pushd interface Teredo
Set state type=client servername=teredo.ipv6.microsoft.com. servervirtualip=0.0.0.0






popd
# Teredo Configuration End






# ----------------------------------
# 6to4 Configuration
# ----------------------------------
Pushd Interface 6to4


Reset






popd
# 6to4 Configuration End




# ------------------------------------
# Bridge configuration (not supported)
# ------------------------------------


# ------------------------------------
# Bridge Configuration End
# ------------------------------------


# ----------------------------------------
# Wired LAN Configuration
# ----------------------------------------
pushd LAN




popd


# End of wired LAN configuration.




Mobile Broadband configuration Dump not supported


# ==========================================================
# Health Registration Authority configuration
# ==========================================================
PUSHD nap HRA


popd
# End of NAP HRA configuration



# -----------------------------------------
# Remote Access Configuration
# -----------------------------------------
pushd RAS


Set AuthMode mode = Standard
Delete authtype type = PAP
Delete authtype type = Md5chap
Delete authtype type = MSCHAPv2
Delete authtype type = EAP
Delete authtype type = CERT
Add AuthType type = MSCHAPv2
Delete link TYPE = SWC
Delete link TYPE = LCP
Add LINK TYPE = SWC
Add LINK TYPE = LCP
Delete Multilink type = MULTI
Add Multilink type = MULTI
Set conf confstate = disabled
Set type Ipv4rtrtype = Lananddd Ipv6rtrtype = None Rastype = IPv4
Set Wanports device = "WAN Miniport (IKEv2)" rasinonly = disabled Ddinout = disabled Ddoutonly = disabled Maxports = 2
Set Wanports device = "WAN Miniport (L2TP)" rasinonly = disabled Ddinout = disabled Ddoutonly = disabled Maxports = 2
Set Wanports device = "WAN Miniport (PPPOE)" ddoutonly = disabled
Set Wanports device = "WAN Miniport (PPTP)" rasinonly = disabled Ddinout = disabled Ddoutonly = disabled Maxports = 2
Set Wanports device = "WAN Miniport (SSTP)" rasinonly = disabled Ddinout = disabled Ddoutonly = disabled Maxports = 2


Set User name = Administrator Dialin = Policy Cbpolicy = None
Set User name = Guest Dialin = Policy Cbpolicy = None


Set Ikev2connection idletimeout = 5 Nwoutagetime = 30
Set Ikev2saexpiry Saexpirytime = 480 Sadatasizelimit = 100


popd


# Remote access configuration ends.







# -----------------------------------------
# Remote Access Diagnostics configuration
# -----------------------------------------
PUSHD RAS Diagnostics


Set Rastracing component = * state = disabled


Set modemtracing state = disabled


Set cmtracing state = disabled


Set Securityeventlog state = disabled


Set LogLevel events = Warn




popd


# Remote Access Diagnostics configuration ended







# -----------------------------------------
# Remote Access IP configuration
# -----------------------------------------
pushd RAS IP


Delete Pool


Set Negotiation mode = Allow
Set access mode = All
Set Addrreq mode = Deny
Set broadcastnameresolution mode = Enabled
Set Addrassign method = Auto
Set Preferredadapter


popd


# End of remote access IP configuration.





# -----------------------------------------
# Remote Access IPV6 configuration
# -----------------------------------------
pushd RAS IPv6






Set Negotiation mode = Deny
Set access mode = All
Set Routeradvertise mode = Enabled


popd


# Remote Access IPV6 configuration ends.




# -----------------------------------------
# Remote Access AAAA configuration
# -----------------------------------------
pushd RAS AAAA




popd


# The remote access AAAA configuration ends.








# -----------------------------------------
# WinHTTP Proxy Server configuration
# -----------------------------------------
pushd WinHTTP


Reset Proxy


popd


# WinHTTP Proxy Server configuration at the end


You can use Backup to quickly restore network settings If an operation error occurs or if the server network fails when you make a network setup adjustment later:
Netsh-f c:\test.txt or netsh exec c:\test.txt

Utility netsh command backup network configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.