How to Configure a DHCP Server on a Layer 3 Switch or a Router?

Dynamic Host Configuration Protocol or DHCP is a network management protocol. DHCP is used to assign an Internet protocol (IP) address to any device or any node on a network. A DHCP client uses the DHCP protocol. An IP address can be defined as a unique numeric identifier that is assigned to each computer. Manually we can assign the computers with the IP addresses, but there can be a lot amount of problems that can arise because of this, like the risk of duplicating the IP addresses and so many, and it is a time-consuming process also. To overcome these problems, DHCP is a service that takes care by automatically assigning IP addresses to DHCP clients. In this article, we will learn the process of how to configure a DHCP server.

Configure a Router-Based DHCP Server

  • MTR# configure terminal
  • MTR(config)# ip dhcp excluded-address 172.16.1.1 172.16.1.9
  • MTR(config)# ip dhcp excluded-address 172.16.2.1 172.16.2.9
  • MTR(config)# ip dhcp pool DATA_SCOPE
  • MTR(dhcp-config)# network 172.16.2.0 255.255.255.0
  • MTR(dhcp-config)# default-router 172.16.2.1
  • MTR(dhcp-config)# dns-server 4.2.2.2
  • MTR(dhcp-config)# exit
  • MTR(config)# ip dhcp pool VOICE_SCOPE
  • MTR(dhcp-config)#netowrk 172.16.1.0 255.255.255.0
  • MTR(dhcp-config)# default-router 172.16.1.1
  • MTR(dhcp-config)# option 150 ip 172.16.1.1
  • MTR(dhcp-config)# dns-server 4.2.2.2
  • Post a Comment

    Previous Post Next Post