day - 23 dhcp

Upload: -

Post on 03-Apr-2018

231 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 Day - 23 DHCP

    1/5

    What is DHCP?

    It gives IP Addresses Automatically to the

    Clients who is requesting for an IP Address

    Centralized IP Address Management

    DHCP prevents IP address Conflicts and helps conserve

    the use of client IP Address on the Network

    DHCP reduces the complexity and amount of

    administrative work by assigning TCP/IP configuration

    Client IP configuration is updated automatically

    IP addresses are entered

    manually

    IP address could be

    entered incorrectly

    Communication and

    network issues can result

    Frequent computer moves

    increase administrative

    effort

    IP addresses are supplied

    automatically

    Correct configuration

    information is ensure

    Client configuration is

    updated automatically

    A common source of

    network problems is

    eliminated

    Static IP Assigning Dynamic IP Assigning

    Why DHCP ? How DHCP Server works ?

    DHCP

    Server1

    DHCP

    Server1

    Linux

    Client

    Linux

    Client

    192.168.0.253

    192.168.0.253

    Windows

    Client

    Windows

    Client

    5e7c-3a2c-1d9c

    5e7c-3a2c-1d9c

    5e7c-3a2c-1d9a

    5e7c-3a2c-1d9a

    192.168.0.2

    192.168.0.2

    5e7c-3a2c-1d9b

    5e7c-3a2c-1d9b

    DHCP

    Server2

    DHCP

    Server2

    192.168.0.254

    192.168.0.254

    5e7c-3a2c-1d9d

    5e7c-3a2c-1d9d

  • 7/28/2019 Day - 23 DHCP

    2/5

  • 7/28/2019 Day - 23 DHCP

    3/5

  • 7/28/2019 Day - 23 DHCP

    4/5

    Requirements

    Packages

    dhcp*

    Port Numbers

    67 Bootp

    68 DHCP

    Configuration File

    /etc/dhcpd.conf

    Service

    dhcpd

    Daemon

    dhcpd

    DHCP Server Configuration

    DHCP

    Server

    DHCP

    Server

    LinuxClientLinuxClient

    192.168.0.253192.168.0.253

    WindowsClient

    WindowsClient

    5e7c-3a2c-1d9c5e7c-3a2c-1d9c

    5e7c-3a2c-1d9a5e7c-3a2c-1d9a

    5e7c-3a2c-1d9b5e7c-3a2c-1d9b

    Web

    Server

    Web

    Server

    192.168.0.254192.168.0.254

    5e7c-3a2c-1d9d5e7c-3a2c-1d9d

    Configuring DHCP Server

    Install the package by using one of the installation methods

    [root@comp1]# rpm -ivh --force --aid ftp://192.168.0.250/pub/Server/dhcp*

    Install the package by using one of the installation methods

    [root@comp1]# rpm -ivh --force --aid ftp://192.168.0.250/pub/Server/dhcp*

    Sample configuration file location

    /usr/share/doc/dhcp3.0.1/dhcpd.conf.sample

    Copying Sample file for Configuration

    [root@comp1 ~]# cp /usr/share/doc/dhcp3.0.1/dhcpd.conf.sample

    /etc/dhcpd.conf

    Sample configuration file location

    /usr/share/doc/dhcp3.0.1/dhcpd.conf.sample

    Copying Sample file for Configuration[root@comp1 ~]# cp /usr/share/doc/dhcp3.0.1/dhcpd.conf.sample

    /etc/dhcpd.conf

    /etc/dhcpd.conf

    To change the range and other options

    default-lease-time 21600;

    subnet 192.168.0.0 netmask 255.255.255.0 {

    option routers 192.168.0.254;

    option subnet-mask 255.255.255.0;

    option domain-name zoom.com";

    option domain-name-servers 192.168.0.253;

    range 192.168.0.1 192.168.0.100; }

    To change the range and other options

    default-lease-time 21600;

    subnet 192.168.0.0 netmask 255.255.255.0 {

    option routers 192.168.0.254;

    option subnet-mask 255.255.255.0;

    option domain-name zoom.com";

    option domain-name-servers 192.168.0.253;

    range 192.168.0.1 192.168.0.100; }

    To bind mac-address to IP address

    host server2 {

    option host-name server2.zoom.com";

    hardware ethernet 5E:7C:3A:2C:1D:9D;

    fixed-address 192.168.0.254; }

    To bind mac-address to IP address

    host server2 {

    option host-name server2.zoom.com";

    hardware ethernet 5E:7C:3A:2C:1D:9D;

    fixed-address 192.168.0.254; }

  • 7/28/2019 Day - 23 DHCP

    5/5

    DHCP Server

    To restart the DHCP services

    [root@comp1 ~]# service dhcpd restart

    To restart the DHCP services

    [root@comp1 ~]# service dhcpd restart

    DHCP Client Linux

    Install the package by using one of the installation methods[root@comp1]# rpm -ivh --force --aid ftp://192.168.0.250/pub/Server/dhclient*

    Install the package by using one of the installation methods

    [root@comp1]# rpm -ivh --force --aid ftp://192.168.0.250/pub/Server/dhclient*

    To get IP address from DHCP server

    [root@comp1~]# dhclient

    or

    [root@comp1 ~]# netconfig

    Check the box use dynamic IP configuration

    To get IP address from DHCP server

    [root@comp1~]# dhclient

    or

    [root@comp1 ~]# netconfig

    Check the box use dynamic IP configuration

    DHCP Client Windows

    Configuring DHCP Client

    Select My Network Places.

    Right click Properties.

    Select Local Area Connection

    Right click Properties.

    Double Click Internet Protocol (TCP/IP)

    Select Option Obtain an IP Address automatically

    Configuring DHCP Client

    Select My Network Places.

    Right click Properties.

    Select Local Area Connection

    Right click Properties.

    Double Click Internet Protocol (TCP/IP)

    Select Option Obtain an IP Address automatically