For your Windows computer or your Windows Server to obtain an IP address assigned by the pfSense DHCP server, you have 2 options: use the graphical interface (GUI) or use the command line (cmd.exe).
To get started, open the "Network Connections" setting available on Windows.
If necessary, search for it via the start menu search engine.
Disable the network adapter of this client PC or server.
Then, reactivate it.
Now, double click on this network adapter.
Click "Details".
As you can see, the DHCP client is enabled for this network adapter and your machine has received:
To force a Windows computer or a Windows Server to obtain a new IP address from a DHCP server, it is best to use the command line.
To do this, launch the Windows (Server) command prompt (cmd.exe) as administrator (if necessary).
Free the IP address used by your computer or server by typing the command:
Batch
ipconfig /release
As you can see, the IP configuration configuration for your network adapter has been cleared.
In the GUI, the status of your network adapter will be "Unidentified Network" since your computer or server no longer has access to the network.
If you look at the IP address defined by Windows (Server), you will see that it starts with "169.254.".
Which means, in short, that no IP address has been defined for this network adapter.
Next, request a new IP address from your network's DHCP server by typing the command:
Batch
ipconfig /renew
As you can see, your computer has been assigned an IP address.
You will also see that other information included in the DHCP response appears here.
Such as: the DNS suffix specific to the connection, the subnet mask and the default gateway that your machine will use to access the Internet.
In the GUI, the status of your network card will be "Network X".
If you look at your network connection details, you will again see that your machine received its IPv4 address, the default gateway address, ... from your IPv4 DHCP server.
To see the list of DHCP leases on pfSense, go to: Status -> DHCP Leases.
On the "DHCP Leases" page that appears, you will find a "Leases" section with the list of DHCP leases concerning DHCP clients:
In the "Leases in Use" section you will find a summary of the IP address ranges that your DHCP server can distribute for the listed pfSense interfaces, as well as the number of IP addresses currently in use (# of leases in use) by IP address range.
Source : DHCPv4 Status | pfSense Documentation.
If there is a problem with the pfSense DHCP server, make sure it is currently running and check the DHCP logs to find any problems encountered in your case.
To do this, go to: Status -> Services.
Make sure the "dhcpd" service (DHCP Service) is running.
Otherwise, start it using the "Play" icon located in the "Actions" column.
Note that you can easily access DHCP logs by clicking the icon on the right end of this service.
Otherwise, go through the "Status -> System Logs" menu and go to the "DHCP" tab of the page that appears.
As you can see, the DHCP server used is that of ISC: Internet Systems Consortium DHCP Server.
In the event of a problem, do not hesitate to use the keywords "ISC" and "DHCP" on your favorite search engine if you cannot find the solution with the keywords "pfSense" "DHCP".
Plain Text
Apr 10 11:12:14 dhcpd 69766 Internet Systems Consortium DHCP Server 4.4.2-P1 Apr 10 11:12:14 dhcpd 69766 Copyright 2004-2021 Internet Systems Consortium.
In the DHCP logs, you will find messages sent and received by your DHCP server and DHCP clients.
Plain Text
Apr 10 11:12:52 dhcpd 69766 DHCPDISCOVER from 00:0c:29:d6:23:1d via vmx1 Apr 10 11:12:53 dhcpd 69766 DHCPOFFER on 10.0.0.10 to 00:0c:29:d6:23:1d (win10-pc) via vmx1 Apr 10 11:12:53 dhcpd 69766 DHCPREQUEST for 10.0.0.10 (10.0.0.1) from 00:0c:29:d6:23:1d (win10-pc) via vmx1 Apr 10 11:12:53 dhcpd 69766 DHCPACK on 10.0.0.10 to 00:0c:29:d6:23:1d (win10-pc) via vmx1
By default, you must have one DHCP server per network where you want to dynamically distribute IP addresses to your machines.
However, it is also possible to install a single DHCP server in a network and use DHCP relay agents in the subnets where you want to distribute IP addresses.
This way, the IP address ranges can all be configured on the DHCP server and the DHCP relay agents will only forward requests and responses from one network to another.
It will therefore act as an intermediary between your client machines and the DHCP server.
To enable the pfSense DHCP relay agent, go to: Services -> DHCP Relay.
However, if the pfSense DHCP server is already enabled in your case, an error message will appear.
Indeed, the DHCP relay agent listens on the same port (UDP 67) as a DHCP server to be able to automatically receive DHCP requests from client machines on your network without any particular configuration being required for them.
Plain Text
DHCP Server is currently enabled. Cannot enable the DHCP Relay service while the DHCP Server is enabled on any interface.
To resolve the problem, go to: Services -> DHCP Server.
Uncheck the "Enable DHCP server on LAN interface" box to disable the DHCP server on the LAN interface of pfSense.
Click "Save" at the bottom of the page to save the change.
Then, return to the menu: Services -> DHCP Relay.
Now, the DHCP Relay agent configuration page appears with a "DHCP Relay Configuration" section:
Source : DHCPv4 & DHCPv6 Relay | pfSense Documentation.
Firewall 5/21/2025
Firewall 5/28/2025
Firewall 5/17/2025
Firewall 5/23/2025
Pinned content
Contact
® InformatiWeb-Pro.net - InformatiWeb.net 2008-2022 - © Lionel Eppe - All rights reserved.
Total or partial reproduction of this site is prohibited and constitutes an infringement punishable by articles L.335-2 and following of the intellectual property Code.
No comment