Check my DHCP lease?2019 Community Moderator ElectionForce dhcp client to get a new leaseDHCP configuration for iPXEHow to know DHCP options value on debian/ubuntu and other linuxTesting DHCP range; multiple addresses per interfaceHow to skip DHCP if no cable connected to ethernet in Debianreset of a ubiquiti networks power ap - no loveWhen no dhcp server answer, how can I force dhclient to use the static lease from dhclient.conf instead of a previous dhcp lease?dhcp not setting FQDN hostname on centos 7 (no NetworkManager)Ubuntu 16.04 not getting dhcp leaseDHCP server does not include NTP server addresses in the DHCP ACK message
Fear of getting stuck on one programming language / technology that is not used in my country
What are the advantages of simplicial model categories over non-simplicial ones?
Why "had" in "[something] we would have made had we used [something]"?
Electoral considerations aside, what are potential benefits, for the US, of policy changes proposed by the tweet recognizing Golan annexation?
Calculating total slots
What should you do if you miss a job interview (deliberately)?
Is there a RAID 0 Equivalent for RAM?
Can I still be respawned if I die by falling off the map?
Unexpected behavior of the procedure `Area` on the object 'Polygon'
What is the highest possible scrabble score for placing a single tile
Plot of a tornado-shaped surface
How can "mimic phobia" be cured or prevented?
How should I respond when I lied about my education and the company finds out through background check?
Pre-mixing cryogenic fuels and using only one fuel tank
Hero deduces identity of a killer
How could a planet have erratic days?
Using substitution ciphers to generate new alphabets in a novel
Does the UK parliament need to pass secondary legislation to accept the Article 50 extension
Open a doc from terminal, but not by its name
What does "Scientists rise up against statistical significance" mean? (Comment in Nature)
Why does a simple loop result in ASYNC_NETWORK_IO waits?
Multiplicative persistence
Why does AES have exactly 10 rounds for a 128-bit key, 12 for 192 bits and 14 for a 256-bit key size?
Biological Blimps: Propulsion
Check my DHCP lease?
2019 Community Moderator ElectionForce dhcp client to get a new leaseDHCP configuration for iPXEHow to know DHCP options value on debian/ubuntu and other linuxTesting DHCP range; multiple addresses per interfaceHow to skip DHCP if no cable connected to ethernet in Debianreset of a ubiquiti networks power ap - no loveWhen no dhcp server answer, how can I force dhclient to use the static lease from dhclient.conf instead of a previous dhcp lease?dhcp not setting FQDN hostname on centos 7 (no NetworkManager)Ubuntu 16.04 not getting dhcp leaseDHCP server does not include NTP server addresses in the DHCP ACK message
Is there a way to show my current (client) DHCP lease?
Or even better - retrieve all options/infos sent with DHCPACK
?
networking dhcp dhclient
add a comment |
Is there a way to show my current (client) DHCP lease?
Or even better - retrieve all options/infos sent with DHCPACK
?
networking dhcp dhclient
2
/var/lib/dhcp/dhclient.leases
?
– heemayl
May 20 '16 at 22:49
@heemayl this file is empty in my case (Ubuntu 15.10), maybe because NetworkManager is acquiring dhcp lease (?)
– madneon
May 20 '16 at 23:03
ipconfig getpacket <ifname>
oripconfig getv6packet <ifname>
on Mac OS X.
– thrig
May 20 '16 at 23:21
@heemayl, Nope.No such file or directory
– Cerin
Nov 21 '17 at 21:46
@heemayl was correct for the directory. On Debian Stretch I found infos in "/var/lib/dhcp/dhclient.eth0.leases"
– Larsen
Nov 16 '18 at 11:58
add a comment |
Is there a way to show my current (client) DHCP lease?
Or even better - retrieve all options/infos sent with DHCPACK
?
networking dhcp dhclient
Is there a way to show my current (client) DHCP lease?
Or even better - retrieve all options/infos sent with DHCPACK
?
networking dhcp dhclient
networking dhcp dhclient
edited May 20 '16 at 22:41
madneon
asked May 20 '16 at 22:30
madneonmadneon
6281616
6281616
2
/var/lib/dhcp/dhclient.leases
?
– heemayl
May 20 '16 at 22:49
@heemayl this file is empty in my case (Ubuntu 15.10), maybe because NetworkManager is acquiring dhcp lease (?)
– madneon
May 20 '16 at 23:03
ipconfig getpacket <ifname>
oripconfig getv6packet <ifname>
on Mac OS X.
– thrig
May 20 '16 at 23:21
@heemayl, Nope.No such file or directory
– Cerin
Nov 21 '17 at 21:46
@heemayl was correct for the directory. On Debian Stretch I found infos in "/var/lib/dhcp/dhclient.eth0.leases"
– Larsen
Nov 16 '18 at 11:58
add a comment |
2
/var/lib/dhcp/dhclient.leases
?
– heemayl
May 20 '16 at 22:49
@heemayl this file is empty in my case (Ubuntu 15.10), maybe because NetworkManager is acquiring dhcp lease (?)
– madneon
May 20 '16 at 23:03
ipconfig getpacket <ifname>
oripconfig getv6packet <ifname>
on Mac OS X.
– thrig
May 20 '16 at 23:21
@heemayl, Nope.No such file or directory
– Cerin
Nov 21 '17 at 21:46
@heemayl was correct for the directory. On Debian Stretch I found infos in "/var/lib/dhcp/dhclient.eth0.leases"
– Larsen
Nov 16 '18 at 11:58
2
2
/var/lib/dhcp/dhclient.leases
?– heemayl
May 20 '16 at 22:49
/var/lib/dhcp/dhclient.leases
?– heemayl
May 20 '16 at 22:49
@heemayl this file is empty in my case (Ubuntu 15.10), maybe because NetworkManager is acquiring dhcp lease (?)
– madneon
May 20 '16 at 23:03
@heemayl this file is empty in my case (Ubuntu 15.10), maybe because NetworkManager is acquiring dhcp lease (?)
– madneon
May 20 '16 at 23:03
ipconfig getpacket <ifname>
or ipconfig getv6packet <ifname>
on Mac OS X.– thrig
May 20 '16 at 23:21
ipconfig getpacket <ifname>
or ipconfig getv6packet <ifname>
on Mac OS X.– thrig
May 20 '16 at 23:21
@heemayl, Nope.
No such file or directory
– Cerin
Nov 21 '17 at 21:46
@heemayl, Nope.
No such file or directory
– Cerin
Nov 21 '17 at 21:46
@heemayl was correct for the directory. On Debian Stretch I found infos in "/var/lib/dhcp/dhclient.eth0.leases"
– Larsen
Nov 16 '18 at 11:58
@heemayl was correct for the directory. On Debian Stretch I found infos in "/var/lib/dhcp/dhclient.eth0.leases"
– Larsen
Nov 16 '18 at 11:58
add a comment |
4 Answers
4
active
oldest
votes
I used dhcpdump
when I was testing DHCP. It will dump both sides of the DHCP transaction. If you leave it running it will log the options passed.
You may want to restart your DHCP client to see the initial negotiation. The renewal request should contain all the running configuration.
add a comment |
I'm not aware of a way to query this information on the client. If you are on the server you can see information on the client leases in /var/lib/dhcp/dhclient.leases
. From the client the only way i know is:
sudo grep dhclient /var/log/syslog
Which should give you something like:
May 20 18:34:38 [machine_name] dhclient: DHCPREQUEST on eth0 to [DHCP_SERVER_IP] port 67
May 20 18:34:38 [machine_name] dhclient: DHCPACK from [DHCP_SERVER_IP]
May 20 18:34:38 [machine_name] dhclient: bound to [client_dhcp_ip] -- renewal in 1517 seconds.
add a comment |
depending on your distro, it should be located in /var/lib/dhcp
under dhclient.interface.leases or /var/lib/dhclient.leases
. you can also specify the path of your dhclient.leases file by passing -lf when starting dhclient.
@madeon it should be under/var/lib/dhcp/dhclient.interface.leases e.g /var/lib/dhcp/dhclient.eth0.leases
– RDCortez
May 20 '16 at 23:08
add a comment |
With NetworkManager use nmcli
to query the DHCP status for your active connection (assuming one) with
nmcli -f ipv4.method con show "`nmcli -t -f NAME connection `"
Fot full DHCP information use -f DHCP4
. Adjust for ipv6 as necessary.
New contributor
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f284550%2fcheck-my-dhcp-lease%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
I used dhcpdump
when I was testing DHCP. It will dump both sides of the DHCP transaction. If you leave it running it will log the options passed.
You may want to restart your DHCP client to see the initial negotiation. The renewal request should contain all the running configuration.
add a comment |
I used dhcpdump
when I was testing DHCP. It will dump both sides of the DHCP transaction. If you leave it running it will log the options passed.
You may want to restart your DHCP client to see the initial negotiation. The renewal request should contain all the running configuration.
add a comment |
I used dhcpdump
when I was testing DHCP. It will dump both sides of the DHCP transaction. If you leave it running it will log the options passed.
You may want to restart your DHCP client to see the initial negotiation. The renewal request should contain all the running configuration.
I used dhcpdump
when I was testing DHCP. It will dump both sides of the DHCP transaction. If you leave it running it will log the options passed.
You may want to restart your DHCP client to see the initial negotiation. The renewal request should contain all the running configuration.
answered May 21 '16 at 1:47
BillThorBillThor
7,7231426
7,7231426
add a comment |
add a comment |
I'm not aware of a way to query this information on the client. If you are on the server you can see information on the client leases in /var/lib/dhcp/dhclient.leases
. From the client the only way i know is:
sudo grep dhclient /var/log/syslog
Which should give you something like:
May 20 18:34:38 [machine_name] dhclient: DHCPREQUEST on eth0 to [DHCP_SERVER_IP] port 67
May 20 18:34:38 [machine_name] dhclient: DHCPACK from [DHCP_SERVER_IP]
May 20 18:34:38 [machine_name] dhclient: bound to [client_dhcp_ip] -- renewal in 1517 seconds.
add a comment |
I'm not aware of a way to query this information on the client. If you are on the server you can see information on the client leases in /var/lib/dhcp/dhclient.leases
. From the client the only way i know is:
sudo grep dhclient /var/log/syslog
Which should give you something like:
May 20 18:34:38 [machine_name] dhclient: DHCPREQUEST on eth0 to [DHCP_SERVER_IP] port 67
May 20 18:34:38 [machine_name] dhclient: DHCPACK from [DHCP_SERVER_IP]
May 20 18:34:38 [machine_name] dhclient: bound to [client_dhcp_ip] -- renewal in 1517 seconds.
add a comment |
I'm not aware of a way to query this information on the client. If you are on the server you can see information on the client leases in /var/lib/dhcp/dhclient.leases
. From the client the only way i know is:
sudo grep dhclient /var/log/syslog
Which should give you something like:
May 20 18:34:38 [machine_name] dhclient: DHCPREQUEST on eth0 to [DHCP_SERVER_IP] port 67
May 20 18:34:38 [machine_name] dhclient: DHCPACK from [DHCP_SERVER_IP]
May 20 18:34:38 [machine_name] dhclient: bound to [client_dhcp_ip] -- renewal in 1517 seconds.
I'm not aware of a way to query this information on the client. If you are on the server you can see information on the client leases in /var/lib/dhcp/dhclient.leases
. From the client the only way i know is:
sudo grep dhclient /var/log/syslog
Which should give you something like:
May 20 18:34:38 [machine_name] dhclient: DHCPREQUEST on eth0 to [DHCP_SERVER_IP] port 67
May 20 18:34:38 [machine_name] dhclient: DHCPACK from [DHCP_SERVER_IP]
May 20 18:34:38 [machine_name] dhclient: bound to [client_dhcp_ip] -- renewal in 1517 seconds.
answered May 20 '16 at 22:55
user1794469user1794469
1,6421923
1,6421923
add a comment |
add a comment |
depending on your distro, it should be located in /var/lib/dhcp
under dhclient.interface.leases or /var/lib/dhclient.leases
. you can also specify the path of your dhclient.leases file by passing -lf when starting dhclient.
@madeon it should be under/var/lib/dhcp/dhclient.interface.leases e.g /var/lib/dhcp/dhclient.eth0.leases
– RDCortez
May 20 '16 at 23:08
add a comment |
depending on your distro, it should be located in /var/lib/dhcp
under dhclient.interface.leases or /var/lib/dhclient.leases
. you can also specify the path of your dhclient.leases file by passing -lf when starting dhclient.
@madeon it should be under/var/lib/dhcp/dhclient.interface.leases e.g /var/lib/dhcp/dhclient.eth0.leases
– RDCortez
May 20 '16 at 23:08
add a comment |
depending on your distro, it should be located in /var/lib/dhcp
under dhclient.interface.leases or /var/lib/dhclient.leases
. you can also specify the path of your dhclient.leases file by passing -lf when starting dhclient.
depending on your distro, it should be located in /var/lib/dhcp
under dhclient.interface.leases or /var/lib/dhclient.leases
. you can also specify the path of your dhclient.leases file by passing -lf when starting dhclient.
answered May 20 '16 at 23:03
RDCortezRDCortez
213
213
@madeon it should be under/var/lib/dhcp/dhclient.interface.leases e.g /var/lib/dhcp/dhclient.eth0.leases
– RDCortez
May 20 '16 at 23:08
add a comment |
@madeon it should be under/var/lib/dhcp/dhclient.interface.leases e.g /var/lib/dhcp/dhclient.eth0.leases
– RDCortez
May 20 '16 at 23:08
@madeon it should be under
/var/lib/dhcp/dhclient.interface.leases e.g /var/lib/dhcp/dhclient.eth0.leases
– RDCortez
May 20 '16 at 23:08
@madeon it should be under
/var/lib/dhcp/dhclient.interface.leases e.g /var/lib/dhcp/dhclient.eth0.leases
– RDCortez
May 20 '16 at 23:08
add a comment |
With NetworkManager use nmcli
to query the DHCP status for your active connection (assuming one) with
nmcli -f ipv4.method con show "`nmcli -t -f NAME connection `"
Fot full DHCP information use -f DHCP4
. Adjust for ipv6 as necessary.
New contributor
add a comment |
With NetworkManager use nmcli
to query the DHCP status for your active connection (assuming one) with
nmcli -f ipv4.method con show "`nmcli -t -f NAME connection `"
Fot full DHCP information use -f DHCP4
. Adjust for ipv6 as necessary.
New contributor
add a comment |
With NetworkManager use nmcli
to query the DHCP status for your active connection (assuming one) with
nmcli -f ipv4.method con show "`nmcli -t -f NAME connection `"
Fot full DHCP information use -f DHCP4
. Adjust for ipv6 as necessary.
New contributor
With NetworkManager use nmcli
to query the DHCP status for your active connection (assuming one) with
nmcli -f ipv4.method con show "`nmcli -t -f NAME connection `"
Fot full DHCP information use -f DHCP4
. Adjust for ipv6 as necessary.
New contributor
New contributor
answered yesterday
jnasjnas
1011
1011
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f284550%2fcheck-my-dhcp-lease%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
/var/lib/dhcp/dhclient.leases
?– heemayl
May 20 '16 at 22:49
@heemayl this file is empty in my case (Ubuntu 15.10), maybe because NetworkManager is acquiring dhcp lease (?)
– madneon
May 20 '16 at 23:03
ipconfig getpacket <ifname>
oripconfig getv6packet <ifname>
on Mac OS X.– thrig
May 20 '16 at 23:21
@heemayl, Nope.
No such file or directory
– Cerin
Nov 21 '17 at 21:46
@heemayl was correct for the directory. On Debian Stretch I found infos in "/var/lib/dhcp/dhclient.eth0.leases"
– Larsen
Nov 16 '18 at 11:58