2

I'm trying to determine if the order of the options matter

I'm using a script (represents an external remote interface) that is updating the /etc/network/interfaces file.

The script can set the IP Address, Default Gateway, and Netmask.

My question is does the order of the options matter i.e.

#standard options
auto eth0
iface eth0 inet static
address 192.168.0.71
netmask 255.255.255.0
gateway 192.168.0.1

#possible script output
auto eth0
iface eth0 inet static
netmask 255.255.255.0
gateway 192.168.0.1
address 192.168.0.71

Is this still an acceptable configuration?

5
  • I'd say that it shouldn't make any difference, but I won't guarantee that it doesn't... What distro are you on?
    – Jenny D
    Feb 25, 2014 at 15:32
  • 1
    This looks like either Debian or Ubuntu.
    – slm
    Feb 25, 2014 at 15:35
  • Is there any reason you don't have your script print stuff in the desired order?
    – terdon
    Feb 25, 2014 at 15:36
  • Why do you think it would matter? You're passing a bunch of options by name. Nothing defines a “correct” order. Feb 25, 2014 at 23:48
  • Debian variant, it's for an embedded system. The scripts are effectively an external UI interface so order can't be guaranteed. I didn't think it would matter just wanted some confirmation on it since the documentation doesn't indicate it as an explicit issue.
    – user61316
    Feb 26, 2014 at 16:12

1 Answer 1

1

In your specific case it does not matter but in case you get several interface, and also if you use conditional configuration the order can became important.
For example in this case

iface eth0 inet static
address 88.191.xxx.zzz 
netmask 255.255.255.255
broadcast 88.191.xxx.zzz 
#dns-nameservers 8.83.8.8 8.8.4.2
post-up route add 88.190.cc.1 dev eth0
post-up route add default gw 88.190.cc.1
post-down route del 88.190.cc.1 dev eth0
post-down route del default gw 88.190.cc.1

if you put the post-up post-down in the wrong order nothing works.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .