Search Windows and Linux Networking

Wednesday, March 9, 2011

DHCP Server Basic

DHCP Server Basic 

What is DHCP Server?

       The Purpose of DHCP server in Network is to provide the TCP/IP Configuration to the Client. DHCP free up System Administrator from Manually configuring each host on the network. and quickly configure changes in a network configuration. And In The larger network, the greater benefit of using DHCP is that you do not need manually configure and maintain the record  Without dynamic address assignment, each host has to be configured manually and IP addresses must be carefully managed to avoid duplication or miss configuration.

      And Because settings and information are stored centrally, you can quickly and easily add or change a client setting (for example, the IP address of an alternate DNS server) for all clients on your network from a single location. Without a centralized database of configuration information, it is difficult to maintain a current view of the host settings or to change them.

DHCP provides five key benefits to those managing and maintaining a TCP/IP network:-
  1. Centralized administration of IP configuration:- DHCP IP configuration information
    can be stored in one location, enabling the administrator to centrally manage it. A DHCP
    server tracks all leased and reserved IP addresses and lists them in the DHCP console. You
    can use the DHCP console to determine the IP addresses of all DHCP-enabled devices on
    your network.
  2. Dynamic host configuration:- DHCP Server Automatically configure Host and update the changes dynamically.
  3. Seamless IP host configuration: -The use of DHCP ensures that DHCP clients get accurate and timely IP configuration parameters, such as the IP address, subnet mask, default gateway, IP address of the DNS server, and so on, without user intervention. Because the configuration is automatic, troubleshooting of miss configurations, such as mistyped numbers, is largely eliminated.
  4. Scalabilit :- As Scalability is censor  DHCP is Scala for both small and very large network.
  5. Flexibility :- Using DHCP gives the administrator increased flexibility, allowing the
    administrator to more easily change IP configurations when the infrastructure changes.
It provide following information to client but not limited to it. It Provide more than 70 TCP/IP configuration settings.
  • IP Address.
  • Subnet Mask
  • Default Gateway
  • DNS Domain Name
  • Address of DNS Server
  • Address of WINS Server.
  • And many more
How it Work ? OR DHCP Client And Server in DORA Process. 

      When you turn on DHCP on Client Computer to get TCP/IP information from DHCP Server. there are some communication will get between DHCP Client and DHCP Server. this process are called as DHCP DORA Process. DORA Means Discover, Offer, Request and acknowledgment .


  1. Discover: -When you turn on DHCP on client computer to get TCP/IP information from DHCP server. because client do not having IP address information about DHCP server to get TCP/IP information .It send broadcasts packet in a network to find DHCP server who can give him TCP/IP information.
  2. Offer: - If in network there are DHCP server running . All  DHCP server Responds to the broadcast by sending Offer Packet because Client do not having IP Address it also broadcasts back to client by offering TCP/IP configuration. (DHCP server ask Client for confirmation that it is ready to accept the offer else that IP address will be provided to other clients.)
  3. Request : - So Client computer responds with first DHCP offer by sending  Request Packet. for acceptance and because other Server not got any confirmation by client it know that client has not accecpted our offer so we can be able to give ipaddress to other client.DHCP Request packet are  uni cast packet because now client know IP address of DHCP server to contact. 
  4. Acknowledgment :- After receiving  the request packet DHCP Server send Acknowledgment packet to client that it can use this IP address .

(In next post we will see how to install, Configure and backup DHCP server in windows 2003 and 2008 server)



    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.