Backup and Restore TCP/IP configurations.


Today while helping a co-worker, I came across a problem that needed to fix the TCP/IP. I used a technique, which are no longer used, for some time now, clean/repair the WinSock.

Being a server with multiple NICs and multiple ip’s, it makes sense to make a backup first.

The fastest way to backup and restore static IP and DNS address detail is using the command line.

The Network Shell (Netsh) utility lets you configure numerous networking settings of Windows, including IP address and DNS details. If you assign static IP or DNS addresses in your network, you might find it useful to export and import your TCP/IP configuration with Netsh.

For example, if you need to reset/repair the Networking Stack, it´s better you backup first your configurations :).

To dump the TCP/IP configuration:

netsh -c interface dump > filename.txt

To import the TCP/IP configuration:

netsh -f filename.txt

Please enjoy :).