-->
  • Recent Articles

    How to Configure MAC binding in DHCP Server

    How to Configure MAC binding in DHCP Server


    Configuring MAC binding in DHCP server means permanently assigning static IP to the DHCP client using client MAC address.

    1. Check the DHCP Service is running

    [root@ip-10.x.x.x ~]# systemctl status dhcpd.service


    2. PING to all the clients to get the IP which you want configure MAC binding.

    #ping  <client_FQDN>

    3. Run ARP command to get the MAC ID associated with the IP.


    # arp -a

    ARP


    4. Edit the configuration and change as required

    [root@ip-10.x.x.x ~]# vim /etc/dhcp/dhcpd.conf

    host nfsserver {
     hardware ethernet 02:45:58:66:fa:c7;
     fixed-address 10.0.XXX.XXX;
    }

    As shown above we have to add  MAC address and host IP address. If you want to configure MAC binding for multiple servers then copy the same line and paste below and change there MAC address, hostname and IP address accordingly.

    5. Test configuration file before restarting DHCP server.

    [root@ip-10.x.x.x ~]# dhcpd configtest

    6. Restart DHCP service

    [root@ip-10.x.x.x ~]# systemctl restart dhcpd.service
    [root@ip-10.x.x.x ~]# systemctl status dhcpd.service

    7. That’s it restart network services in client and verify specified IP address it will get. Try restarting the network service multiple times,  you will get same IP address from DHCP lease.

    No comments