PROFINET DCP and DHCP


We often get the question: Why doesn’t PROFINET use Dynamic Host Configuration Protocol (DHCP) for IP address assignment as DCHP is used extensively in the office? Answer:  DHCP could be used, optionally, but there are some differences you should know between DHCP and PROFINET DCP.

PROFINET DCP

In our previous lesson on PROFINET Discovery and Configuration Protocol (DCP) we explained what it is and how it is commonly used.  PROFINET devices are typically assigned device names and IP addresses using DCP which gives us an easy way to do local network management via the PROFINET IO controller and with the engineering tool. DCP is mandatory on every PROFINET device.  But why not use DHCP for address management?

DHCP

DHCPvDCPDHCP provides a similar method to handle address assignment and can be used in some special installations.  It requires the use of a DHCP server.  A host (client) makes a request on boot up and the server hands out a ‘leased’ IP Address based on server settings. That’s a problem, as DHCP relies on a server being available and supported by somebody, usually outside the scope of the automation application.  What if IT has gone home for the night or the server is down for the latest security patch?  Also, a software tool needs to be used to fix the IP address list or add devices to the DHCP server pool.

Another issue we often see is that the first letter in DHCP stands for “Dynamic” which means the IP address could change from its original value.  This is not optimal, since PROFINET networks rely on static addresses based on the engineering configuration rather than addresses which can change.  Since the IP address is leased it could also expire after a certain period and needs to be requested again.  Is there always availability (for an address or server) and what about for device replacement?

DHCP also makes device replacement difficult since Ethernet Media Access Control (MAC) addresses are typically bound to the DHCP server.  If replacing a device, a MAC address would change, thereby preventing the new device from obtaining an address and leaving the process dead in the water until someone reconfigures the DHCP server.

Why DCP?

An advantage of PROFINET DCP is that it’s available for the control engineer to use in the engineering tool or via the PROFINET IO controller which allows assigning device (host) names and IP addresses.  So the address management is already local, available and controlled directly from the PROFINET application.  IP addresses do not expire and are unique for every device based on its device name. This solution also makes device replacement possible without using tools for the network management.

In some special cases, a network component such as a managed switch might support DHCP if it’s a non-critical device or function.  For example to access the web page on the switch for diagnostics.

In conclusion, DHCP can only be employed if you are careful about it and realize its shortcomings for Industrial Automation applications.  Check with the product vendor if you really need the DHCP service for a special purpose.  In PROFINET systems, we recommend that you refrain from using DHCP and use PROFINET DCP for the easiest network management solution possible.  From the PROFI Interface Center, find out even more about PROFINET at one of our upcoming certified training classes.