How to release DHCP lease on shutdown





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I have several users with dual boot machines with Windows 10 and Ubuntu 18.04, both using wireless networking. Both OSes go on different networks from each other. When booting from Ubuntu to Windows, we're having a problem that the DHCP lease for the IP used in Ubuntu is still active when Windows boots, so it's getting an IP in the wrong network. I need to find a way to release the lease on shutdown so this does not occur.



Can someone please give me some guidance on this?










share|improve this question























  • Does your DHCP server happen to be Windows Server, and are the two wireless networks in the same supergroup?

    – Kaz Wolfe
    Feb 13 at 21:13











  • In the wrong network or simply different IP addresses; i.e. 192.168.1.6 and 192.168.1.7? Welcome to Ask Ubuntu.

    – chili555
    Feb 13 at 22:30













  • The IP address is fine per physical system as long as multiple physical systems don't have the same IP. But having both Windows and Ubuntu on the same system using the same IP won't hurt anything unless the system is actually running both at the same time like in a VM. That is how I run it at home because I set an IP reservation for the MAC address and not the OS.

    – Terrance
    Feb 13 at 23:07











  • For me it's a problem because the Linux system is in an isolated VLAN on my company's network. 10.64.240.0. Windows is on the main company VLAN. The 2 VLANs do not have any connectivity between them. With the Windows OS booted and the wireless port getting an IP from the wrong VLAN, it makes using WiFi impossible.

    – Todd Sargent
    Feb 14 at 14:17











  • The problem then that you are bumping into here is that the lease time is handled by the server and not the client, so chances are releasing the IP from Ubuntu before rebooting is probably not going to work. You can try running sudo dhclient -r right before you reboot and see if that works, but I have a feeling that it won't since it is the DHCP that gives out the leases and that they are stored in the dhcp.leases file on the server until they expire. You will probably need to ask IT or someone if they can assign you reserved/static IPs that you can set statically on the system.

    – Terrance
    Feb 14 at 15:06




















0















I have several users with dual boot machines with Windows 10 and Ubuntu 18.04, both using wireless networking. Both OSes go on different networks from each other. When booting from Ubuntu to Windows, we're having a problem that the DHCP lease for the IP used in Ubuntu is still active when Windows boots, so it's getting an IP in the wrong network. I need to find a way to release the lease on shutdown so this does not occur.



Can someone please give me some guidance on this?










share|improve this question























  • Does your DHCP server happen to be Windows Server, and are the two wireless networks in the same supergroup?

    – Kaz Wolfe
    Feb 13 at 21:13











  • In the wrong network or simply different IP addresses; i.e. 192.168.1.6 and 192.168.1.7? Welcome to Ask Ubuntu.

    – chili555
    Feb 13 at 22:30













  • The IP address is fine per physical system as long as multiple physical systems don't have the same IP. But having both Windows and Ubuntu on the same system using the same IP won't hurt anything unless the system is actually running both at the same time like in a VM. That is how I run it at home because I set an IP reservation for the MAC address and not the OS.

    – Terrance
    Feb 13 at 23:07











  • For me it's a problem because the Linux system is in an isolated VLAN on my company's network. 10.64.240.0. Windows is on the main company VLAN. The 2 VLANs do not have any connectivity between them. With the Windows OS booted and the wireless port getting an IP from the wrong VLAN, it makes using WiFi impossible.

    – Todd Sargent
    Feb 14 at 14:17











  • The problem then that you are bumping into here is that the lease time is handled by the server and not the client, so chances are releasing the IP from Ubuntu before rebooting is probably not going to work. You can try running sudo dhclient -r right before you reboot and see if that works, but I have a feeling that it won't since it is the DHCP that gives out the leases and that they are stored in the dhcp.leases file on the server until they expire. You will probably need to ask IT or someone if they can assign you reserved/static IPs that you can set statically on the system.

    – Terrance
    Feb 14 at 15:06
















0












0








0








I have several users with dual boot machines with Windows 10 and Ubuntu 18.04, both using wireless networking. Both OSes go on different networks from each other. When booting from Ubuntu to Windows, we're having a problem that the DHCP lease for the IP used in Ubuntu is still active when Windows boots, so it's getting an IP in the wrong network. I need to find a way to release the lease on shutdown so this does not occur.



Can someone please give me some guidance on this?










share|improve this question














I have several users with dual boot machines with Windows 10 and Ubuntu 18.04, both using wireless networking. Both OSes go on different networks from each other. When booting from Ubuntu to Windows, we're having a problem that the DHCP lease for the IP used in Ubuntu is still active when Windows boots, so it's getting an IP in the wrong network. I need to find a way to release the lease on shutdown so this does not occur.



Can someone please give me some guidance on this?







networking dual-boot dhcp






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 13 at 21:10









Todd SargentTodd Sargent

12




12













  • Does your DHCP server happen to be Windows Server, and are the two wireless networks in the same supergroup?

    – Kaz Wolfe
    Feb 13 at 21:13











  • In the wrong network or simply different IP addresses; i.e. 192.168.1.6 and 192.168.1.7? Welcome to Ask Ubuntu.

    – chili555
    Feb 13 at 22:30













  • The IP address is fine per physical system as long as multiple physical systems don't have the same IP. But having both Windows and Ubuntu on the same system using the same IP won't hurt anything unless the system is actually running both at the same time like in a VM. That is how I run it at home because I set an IP reservation for the MAC address and not the OS.

    – Terrance
    Feb 13 at 23:07











  • For me it's a problem because the Linux system is in an isolated VLAN on my company's network. 10.64.240.0. Windows is on the main company VLAN. The 2 VLANs do not have any connectivity between them. With the Windows OS booted and the wireless port getting an IP from the wrong VLAN, it makes using WiFi impossible.

    – Todd Sargent
    Feb 14 at 14:17











  • The problem then that you are bumping into here is that the lease time is handled by the server and not the client, so chances are releasing the IP from Ubuntu before rebooting is probably not going to work. You can try running sudo dhclient -r right before you reboot and see if that works, but I have a feeling that it won't since it is the DHCP that gives out the leases and that they are stored in the dhcp.leases file on the server until they expire. You will probably need to ask IT or someone if they can assign you reserved/static IPs that you can set statically on the system.

    – Terrance
    Feb 14 at 15:06





















  • Does your DHCP server happen to be Windows Server, and are the two wireless networks in the same supergroup?

    – Kaz Wolfe
    Feb 13 at 21:13











  • In the wrong network or simply different IP addresses; i.e. 192.168.1.6 and 192.168.1.7? Welcome to Ask Ubuntu.

    – chili555
    Feb 13 at 22:30













  • The IP address is fine per physical system as long as multiple physical systems don't have the same IP. But having both Windows and Ubuntu on the same system using the same IP won't hurt anything unless the system is actually running both at the same time like in a VM. That is how I run it at home because I set an IP reservation for the MAC address and not the OS.

    – Terrance
    Feb 13 at 23:07











  • For me it's a problem because the Linux system is in an isolated VLAN on my company's network. 10.64.240.0. Windows is on the main company VLAN. The 2 VLANs do not have any connectivity between them. With the Windows OS booted and the wireless port getting an IP from the wrong VLAN, it makes using WiFi impossible.

    – Todd Sargent
    Feb 14 at 14:17











  • The problem then that you are bumping into here is that the lease time is handled by the server and not the client, so chances are releasing the IP from Ubuntu before rebooting is probably not going to work. You can try running sudo dhclient -r right before you reboot and see if that works, but I have a feeling that it won't since it is the DHCP that gives out the leases and that they are stored in the dhcp.leases file on the server until they expire. You will probably need to ask IT or someone if they can assign you reserved/static IPs that you can set statically on the system.

    – Terrance
    Feb 14 at 15:06



















Does your DHCP server happen to be Windows Server, and are the two wireless networks in the same supergroup?

– Kaz Wolfe
Feb 13 at 21:13





Does your DHCP server happen to be Windows Server, and are the two wireless networks in the same supergroup?

– Kaz Wolfe
Feb 13 at 21:13













In the wrong network or simply different IP addresses; i.e. 192.168.1.6 and 192.168.1.7? Welcome to Ask Ubuntu.

– chili555
Feb 13 at 22:30







In the wrong network or simply different IP addresses; i.e. 192.168.1.6 and 192.168.1.7? Welcome to Ask Ubuntu.

– chili555
Feb 13 at 22:30















The IP address is fine per physical system as long as multiple physical systems don't have the same IP. But having both Windows and Ubuntu on the same system using the same IP won't hurt anything unless the system is actually running both at the same time like in a VM. That is how I run it at home because I set an IP reservation for the MAC address and not the OS.

– Terrance
Feb 13 at 23:07





The IP address is fine per physical system as long as multiple physical systems don't have the same IP. But having both Windows and Ubuntu on the same system using the same IP won't hurt anything unless the system is actually running both at the same time like in a VM. That is how I run it at home because I set an IP reservation for the MAC address and not the OS.

– Terrance
Feb 13 at 23:07













For me it's a problem because the Linux system is in an isolated VLAN on my company's network. 10.64.240.0. Windows is on the main company VLAN. The 2 VLANs do not have any connectivity between them. With the Windows OS booted and the wireless port getting an IP from the wrong VLAN, it makes using WiFi impossible.

– Todd Sargent
Feb 14 at 14:17





For me it's a problem because the Linux system is in an isolated VLAN on my company's network. 10.64.240.0. Windows is on the main company VLAN. The 2 VLANs do not have any connectivity between them. With the Windows OS booted and the wireless port getting an IP from the wrong VLAN, it makes using WiFi impossible.

– Todd Sargent
Feb 14 at 14:17













The problem then that you are bumping into here is that the lease time is handled by the server and not the client, so chances are releasing the IP from Ubuntu before rebooting is probably not going to work. You can try running sudo dhclient -r right before you reboot and see if that works, but I have a feeling that it won't since it is the DHCP that gives out the leases and that they are stored in the dhcp.leases file on the server until they expire. You will probably need to ask IT or someone if they can assign you reserved/static IPs that you can set statically on the system.

– Terrance
Feb 14 at 15:06







The problem then that you are bumping into here is that the lease time is handled by the server and not the client, so chances are releasing the IP from Ubuntu before rebooting is probably not going to work. You can try running sudo dhclient -r right before you reboot and see if that works, but I have a feeling that it won't since it is the DHCP that gives out the leases and that they are stored in the dhcp.leases file on the server until they expire. You will probably need to ask IT or someone if they can assign you reserved/static IPs that you can set statically on the system.

– Terrance
Feb 14 at 15:06












0






active

oldest

votes












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1118050%2fhow-to-release-dhcp-lease-on-shutdown%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • 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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1118050%2fhow-to-release-dhcp-lease-on-shutdown%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Human spaceflight

Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

張江高科駅