Entries order in /etc/network/interfaces












4















I have a device with two interfaces, eth0 and eth1. One should get its IP from a DHCP server and the other should get its IP statically.



If my /etc/network/interfaces file is configured as follows:



auto lo
iface lo inet loopback

auto eth1
iface eth1 inet dhcp
iface eth1 inet6 auto

auto eth0
iface eth0 inet static
address 10.10.10.10
netmask 255.255.255.0


Everything works great, eth1 gets its IP from the DHCP server, eth0 sets its IP statically from the information given, but if I try to change the order in the file, such as



auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 10.10.10.10
netmask 255.255.255.0

auto eth1
iface eth1 inet dhcp
iface eth1 inet6 auto


In this case, eth1 fails to get an IP.



Does the /etc/network/interface care about the order of each interfaces, such that the admin should place the interfaces that get IPs through DHCP first, then the static ones, or is there a different error in the configuration I have made?










share|improve this question















migrated from stackoverflow.com Nov 21 '17 at 20:24


This question came from our site for professional and enthusiast programmers.



















  • Which OS are you using? Is this Ubuntu or Debian?

    – Tgilgul
    Nov 21 '17 at 11:40











  • It's a Debian. But as far as I know Ubuntu is a Debian distribution.

    – Ancuta
    Nov 21 '17 at 12:01






  • 1





    Which version? The interface was changed in newer versions.

    – Tgilgul
    Nov 21 '17 at 14:11






  • 1





    I have a repro on Ubuntu17.04. Might be a known issue. Need to check with Debian. In any case, this question should probably be on another SE site, maybe Unix & Linux.

    – Tgilgul
    Nov 21 '17 at 15:47






  • 1





    I found this bug: bugs.debian.org/cgi-bin/bugreport.cgi?bug=779681 which says dhcp is unconfiguring previous configurations. Might be related. Other than that I don't see anything related in the list of debian bugs for ifupdown package: bugs.debian.org/cgi-bin/…

    – Tgilgul
    Nov 23 '17 at 13:04
















4















I have a device with two interfaces, eth0 and eth1. One should get its IP from a DHCP server and the other should get its IP statically.



If my /etc/network/interfaces file is configured as follows:



auto lo
iface lo inet loopback

auto eth1
iface eth1 inet dhcp
iface eth1 inet6 auto

auto eth0
iface eth0 inet static
address 10.10.10.10
netmask 255.255.255.0


Everything works great, eth1 gets its IP from the DHCP server, eth0 sets its IP statically from the information given, but if I try to change the order in the file, such as



auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 10.10.10.10
netmask 255.255.255.0

auto eth1
iface eth1 inet dhcp
iface eth1 inet6 auto


In this case, eth1 fails to get an IP.



Does the /etc/network/interface care about the order of each interfaces, such that the admin should place the interfaces that get IPs through DHCP first, then the static ones, or is there a different error in the configuration I have made?










share|improve this question















migrated from stackoverflow.com Nov 21 '17 at 20:24


This question came from our site for professional and enthusiast programmers.



















  • Which OS are you using? Is this Ubuntu or Debian?

    – Tgilgul
    Nov 21 '17 at 11:40











  • It's a Debian. But as far as I know Ubuntu is a Debian distribution.

    – Ancuta
    Nov 21 '17 at 12:01






  • 1





    Which version? The interface was changed in newer versions.

    – Tgilgul
    Nov 21 '17 at 14:11






  • 1





    I have a repro on Ubuntu17.04. Might be a known issue. Need to check with Debian. In any case, this question should probably be on another SE site, maybe Unix & Linux.

    – Tgilgul
    Nov 21 '17 at 15:47






  • 1





    I found this bug: bugs.debian.org/cgi-bin/bugreport.cgi?bug=779681 which says dhcp is unconfiguring previous configurations. Might be related. Other than that I don't see anything related in the list of debian bugs for ifupdown package: bugs.debian.org/cgi-bin/…

    – Tgilgul
    Nov 23 '17 at 13:04














4












4








4








I have a device with two interfaces, eth0 and eth1. One should get its IP from a DHCP server and the other should get its IP statically.



If my /etc/network/interfaces file is configured as follows:



auto lo
iface lo inet loopback

auto eth1
iface eth1 inet dhcp
iface eth1 inet6 auto

auto eth0
iface eth0 inet static
address 10.10.10.10
netmask 255.255.255.0


Everything works great, eth1 gets its IP from the DHCP server, eth0 sets its IP statically from the information given, but if I try to change the order in the file, such as



auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 10.10.10.10
netmask 255.255.255.0

auto eth1
iface eth1 inet dhcp
iface eth1 inet6 auto


In this case, eth1 fails to get an IP.



Does the /etc/network/interface care about the order of each interfaces, such that the admin should place the interfaces that get IPs through DHCP first, then the static ones, or is there a different error in the configuration I have made?










share|improve this question
















I have a device with two interfaces, eth0 and eth1. One should get its IP from a DHCP server and the other should get its IP statically.



If my /etc/network/interfaces file is configured as follows:



auto lo
iface lo inet loopback

auto eth1
iface eth1 inet dhcp
iface eth1 inet6 auto

auto eth0
iface eth0 inet static
address 10.10.10.10
netmask 255.255.255.0


Everything works great, eth1 gets its IP from the DHCP server, eth0 sets its IP statically from the information given, but if I try to change the order in the file, such as



auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 10.10.10.10
netmask 255.255.255.0

auto eth1
iface eth1 inet dhcp
iface eth1 inet6 auto


In this case, eth1 fails to get an IP.



Does the /etc/network/interface care about the order of each interfaces, such that the admin should place the interfaces that get IPs through DHCP first, then the static ones, or is there a different error in the configuration I have made?







linux networking interface dhcp






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 5 mins ago









PRY

2,05231025




2,05231025










asked Nov 21 '17 at 10:47









AncutaAncuta

261




261




migrated from stackoverflow.com Nov 21 '17 at 20:24


This question came from our site for professional and enthusiast programmers.









migrated from stackoverflow.com Nov 21 '17 at 20:24


This question came from our site for professional and enthusiast programmers.















  • Which OS are you using? Is this Ubuntu or Debian?

    – Tgilgul
    Nov 21 '17 at 11:40











  • It's a Debian. But as far as I know Ubuntu is a Debian distribution.

    – Ancuta
    Nov 21 '17 at 12:01






  • 1





    Which version? The interface was changed in newer versions.

    – Tgilgul
    Nov 21 '17 at 14:11






  • 1





    I have a repro on Ubuntu17.04. Might be a known issue. Need to check with Debian. In any case, this question should probably be on another SE site, maybe Unix & Linux.

    – Tgilgul
    Nov 21 '17 at 15:47






  • 1





    I found this bug: bugs.debian.org/cgi-bin/bugreport.cgi?bug=779681 which says dhcp is unconfiguring previous configurations. Might be related. Other than that I don't see anything related in the list of debian bugs for ifupdown package: bugs.debian.org/cgi-bin/…

    – Tgilgul
    Nov 23 '17 at 13:04



















  • Which OS are you using? Is this Ubuntu or Debian?

    – Tgilgul
    Nov 21 '17 at 11:40











  • It's a Debian. But as far as I know Ubuntu is a Debian distribution.

    – Ancuta
    Nov 21 '17 at 12:01






  • 1





    Which version? The interface was changed in newer versions.

    – Tgilgul
    Nov 21 '17 at 14:11






  • 1





    I have a repro on Ubuntu17.04. Might be a known issue. Need to check with Debian. In any case, this question should probably be on another SE site, maybe Unix & Linux.

    – Tgilgul
    Nov 21 '17 at 15:47






  • 1





    I found this bug: bugs.debian.org/cgi-bin/bugreport.cgi?bug=779681 which says dhcp is unconfiguring previous configurations. Might be related. Other than that I don't see anything related in the list of debian bugs for ifupdown package: bugs.debian.org/cgi-bin/…

    – Tgilgul
    Nov 23 '17 at 13:04

















Which OS are you using? Is this Ubuntu or Debian?

– Tgilgul
Nov 21 '17 at 11:40





Which OS are you using? Is this Ubuntu or Debian?

– Tgilgul
Nov 21 '17 at 11:40













It's a Debian. But as far as I know Ubuntu is a Debian distribution.

– Ancuta
Nov 21 '17 at 12:01





It's a Debian. But as far as I know Ubuntu is a Debian distribution.

– Ancuta
Nov 21 '17 at 12:01




1




1





Which version? The interface was changed in newer versions.

– Tgilgul
Nov 21 '17 at 14:11





Which version? The interface was changed in newer versions.

– Tgilgul
Nov 21 '17 at 14:11




1




1





I have a repro on Ubuntu17.04. Might be a known issue. Need to check with Debian. In any case, this question should probably be on another SE site, maybe Unix & Linux.

– Tgilgul
Nov 21 '17 at 15:47





I have a repro on Ubuntu17.04. Might be a known issue. Need to check with Debian. In any case, this question should probably be on another SE site, maybe Unix & Linux.

– Tgilgul
Nov 21 '17 at 15:47




1




1





I found this bug: bugs.debian.org/cgi-bin/bugreport.cgi?bug=779681 which says dhcp is unconfiguring previous configurations. Might be related. Other than that I don't see anything related in the list of debian bugs for ifupdown package: bugs.debian.org/cgi-bin/…

– Tgilgul
Nov 23 '17 at 13:04





I found this bug: bugs.debian.org/cgi-bin/bugreport.cgi?bug=779681 which says dhcp is unconfiguring previous configurations. Might be related. Other than that I don't see anything related in the list of debian bugs for ifupdown package: bugs.debian.org/cgi-bin/…

– Tgilgul
Nov 23 '17 at 13:04










0






active

oldest

votes











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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f406128%2fentries-order-in-etc-network-interfaces%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 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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f406128%2fentries-order-in-etc-network-interfaces%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

CARDNET

Boot-repair Failure: Unable to locate package grub-common:i386

濃尾地震