Search Windows and Linux Networking

Wednesday, February 9, 2011

Taking Backup and Restore your Network Configuration by command line


Taking Backup and Restore  your Network Configuration by command line.

Hi Friends,
     As I promise, I will show you how to configure your (LAN) Network using GUI and from Command line. today , I will show you how to configure your LAN from GUI and from Command line. and I also show you how to take your network configuration backup and restore quickly.

To allow your system (Computer ) to communicate to other network system it required following basic information TCP/IP network
That is:-

Required :
1)IP Address  (Logical Number to system to identify  it should be unique )
2) Subnet mask (To find out the Network information )

Optional :
3) Default Gateway (Exit point or interpriter how know how to reach to other network Basically it is the ip address of your Router (A Device that handle layer 3 information and know how to route the packet ) )
4) DNS Server : IP address of your DNS server that resole your human known host name to the ip address. It is required for naming resolution.
5) WINS Server: same as DNS use in Window network.


Network Configuration Using GUI

    The Most easiest method for configuring your network is GUI.

1) To configure you network interface open  network connection window by Right Clicking on "My Network Places" from your Desktop then select Property

OR
By Start ----Run---(Type ) ncpa.cpl and click ok . It will open Network connection Windows there you find all interface on you system.look like:



2) Now Right Click On You "Local Area Connection" interface or any you want to configure and select property . It look like this:
3) In "Local Area Connection " Property windows Select Internet Protocol (TCP/IP) and Click On properties button. It will open new window Internet protocol TCP/IP property windows
4) If you want to allow DHCP server to Configure you network select option obtain IP address automatically and if you want configure you network manually Select use following IP address. and there type the IP Configuration that you given by your Network Administrator or By your ISP (Internet Service Provider )  for example I am configuring my network with following 

5) Click OK to apply it . then Click OK to Close Local Area Connection Property windows .and close your Network connection windows. that's it so ease.

Network Configuration Using Command line:

    This method is little difficult but very interesting for quickly change your network configuration.

Suppose I want to configure same setting using command line the command name is netsh

If I you want to configure your Local Area Connection with DHCP 

1) Open the command prompt by typing CMD in Start- ---Run ---(Type "cmd") and then Click OK.
    It will open Dos command prompt .
2) Now in Command prompt type the following Command to configure your Local Area Connection interface to use DHCP:

netsh interface ip set address "Local Area Connection" dhcp







In Above command "Local Area Connection " is the name of the interface card you want to configure as DHCP

that's it. It will configure your Local Area Connection to obtain IP automatically .

If I you want to configure your Local Area Connection manually with same ip setting I use in GUI Configuration.in Single line:

netsh interface ip set address "Local Area Connection" static 192.168.19.2 255.255.255.0 192.168.19.1 1

In Above command 
 "Local Area Connection " is the name of your interface card that you want to confiure
"192.168.19.2" the IP address you want to assign to interface card
"255.255.255.0" is the Subnet mask for given interface card.
"192.168.19.1" is the Default Gateway for interface card (If you not want to assign Default Gateway simply use 0.0.0.0 )
"1" for matrix.
it will configure your system Local Area Connection with use following IP address option. and add  IP address information like IP address, Subnet mask and Default Gateway.

Now we add DNS infomation to our Local Area Connection interface by using following command

To Configure Primary DNS server use the command
netsh interface ip add dns "Local Area Connection" 202.54.10.4

To Configure Secondary DNS Server Use the following command:

netsh interface ip add dns "Local Area Connection" 202.205.5.5 index=2

It will Add your DNS server inforamtion on your Local Area Connection Interface.

Backup your Network Configuration:

To Backup your All Network Interface Configuration to the txt file as office_LAN.txt on C drive Use the following commad:

netsh -c interface dump > c:/office_LAN.txt

It will take your network connection backup to c drive as office_LAN.txt

Restore Your Network Configuration from your backup you have taken:
netsh -f c:/office_LAN.txt

It will restore your network connection Configuration as same as the time you have taken backup.

2 comments:

  1. I just want to say that It was very good post, it helped me in finding a good affiliate, Windows Network Setup

    ReplyDelete
  2. Thanks For Posting This ...
    it will Work Fine...
    bt let me ask u something.. will it is backuped my internet settings like local area connection settings & all things??????
    pls answer me..
    Or mail me. :azimpoptani@gmail.com

    ReplyDelete