Use DHCP only one time

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












This is my /etc/network/interfaces.d/eth0 file.



#auto eth0
#iface eth0 inet dhcp

auto eth0
iface eth0 inet static
address 172.16.68.75
netmask 255.255.255.0
network 172.16.68.0
broadcast 17.16.68.255
gateway 172.16.68.1


I currently have it setup to use a static IP address, however I really prefer to use DHCP so I can use MAC address reservations and manage them from my router. The only problem I’m having is, a couple of times a day this server goes down, and the logs indicate it is trying to renew its ip. Is there a way to do this, either at boot or the network starting?







share|improve this question
















  • 2




    Set longer lease times for DHCP?
    – muru
    May 15 at 7:15










  • @muru do you have an example?
    – WhiskerBiscuit
    May 15 at 7:25










  • Not without knowing what DHCP server you're using.
    – muru
    May 15 at 7:25










  • My mistake, the lease time is set on the server, not the client, so I guess that won’t work.
    – WhiskerBiscuit
    May 15 at 7:28










  • Why won't it work ? Have you tried ?
    – solsTiCe
    May 15 at 7:52















up vote
1
down vote

favorite












This is my /etc/network/interfaces.d/eth0 file.



#auto eth0
#iface eth0 inet dhcp

auto eth0
iface eth0 inet static
address 172.16.68.75
netmask 255.255.255.0
network 172.16.68.0
broadcast 17.16.68.255
gateway 172.16.68.1


I currently have it setup to use a static IP address, however I really prefer to use DHCP so I can use MAC address reservations and manage them from my router. The only problem I’m having is, a couple of times a day this server goes down, and the logs indicate it is trying to renew its ip. Is there a way to do this, either at boot or the network starting?







share|improve this question
















  • 2




    Set longer lease times for DHCP?
    – muru
    May 15 at 7:15










  • @muru do you have an example?
    – WhiskerBiscuit
    May 15 at 7:25










  • Not without knowing what DHCP server you're using.
    – muru
    May 15 at 7:25










  • My mistake, the lease time is set on the server, not the client, so I guess that won’t work.
    – WhiskerBiscuit
    May 15 at 7:28










  • Why won't it work ? Have you tried ?
    – solsTiCe
    May 15 at 7:52













up vote
1
down vote

favorite









up vote
1
down vote

favorite











This is my /etc/network/interfaces.d/eth0 file.



#auto eth0
#iface eth0 inet dhcp

auto eth0
iface eth0 inet static
address 172.16.68.75
netmask 255.255.255.0
network 172.16.68.0
broadcast 17.16.68.255
gateway 172.16.68.1


I currently have it setup to use a static IP address, however I really prefer to use DHCP so I can use MAC address reservations and manage them from my router. The only problem I’m having is, a couple of times a day this server goes down, and the logs indicate it is trying to renew its ip. Is there a way to do this, either at boot or the network starting?







share|improve this question












This is my /etc/network/interfaces.d/eth0 file.



#auto eth0
#iface eth0 inet dhcp

auto eth0
iface eth0 inet static
address 172.16.68.75
netmask 255.255.255.0
network 172.16.68.0
broadcast 17.16.68.255
gateway 172.16.68.1


I currently have it setup to use a static IP address, however I really prefer to use DHCP so I can use MAC address reservations and manage them from my router. The only problem I’m having is, a couple of times a day this server goes down, and the logs indicate it is trying to renew its ip. Is there a way to do this, either at boot or the network starting?









share|improve this question











share|improve this question




share|improve this question










asked May 15 at 7:12









WhiskerBiscuit

1314




1314







  • 2




    Set longer lease times for DHCP?
    – muru
    May 15 at 7:15










  • @muru do you have an example?
    – WhiskerBiscuit
    May 15 at 7:25










  • Not without knowing what DHCP server you're using.
    – muru
    May 15 at 7:25










  • My mistake, the lease time is set on the server, not the client, so I guess that won’t work.
    – WhiskerBiscuit
    May 15 at 7:28










  • Why won't it work ? Have you tried ?
    – solsTiCe
    May 15 at 7:52













  • 2




    Set longer lease times for DHCP?
    – muru
    May 15 at 7:15










  • @muru do you have an example?
    – WhiskerBiscuit
    May 15 at 7:25










  • Not without knowing what DHCP server you're using.
    – muru
    May 15 at 7:25










  • My mistake, the lease time is set on the server, not the client, so I guess that won’t work.
    – WhiskerBiscuit
    May 15 at 7:28










  • Why won't it work ? Have you tried ?
    – solsTiCe
    May 15 at 7:52








2




2




Set longer lease times for DHCP?
– muru
May 15 at 7:15




Set longer lease times for DHCP?
– muru
May 15 at 7:15












@muru do you have an example?
– WhiskerBiscuit
May 15 at 7:25




@muru do you have an example?
– WhiskerBiscuit
May 15 at 7:25












Not without knowing what DHCP server you're using.
– muru
May 15 at 7:25




Not without knowing what DHCP server you're using.
– muru
May 15 at 7:25












My mistake, the lease time is set on the server, not the client, so I guess that won’t work.
– WhiskerBiscuit
May 15 at 7:28




My mistake, the lease time is set on the server, not the client, so I guess that won’t work.
– WhiskerBiscuit
May 15 at 7:28












Why won't it work ? Have you tried ?
– solsTiCe
May 15 at 7:52





Why won't it work ? Have you tried ?
– solsTiCe
May 15 at 7:52
















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',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
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%2f1036404%2fuse-dhcp-only-one-time%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1036404%2fuse-dhcp-only-one-time%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Unable to execute new pre-installation script (/var/lib/dpkg/tmp.ci/preinst)

Running the scala interactive shell from the command line

Do not install recommended packages of dependencies