I'm trying to understand the syntax of ifupdown a bit better, and on several sites detailing fairly straightforward static configurations, the example documentation includes a line stating `network' -- or something obviously similar. For example,

# The loopback network interface
auto lo eth0
iface lo inet loopback

# The primary network interface
iface eth0 inet static

What exactly does this line do? I can't imagine that it contains anything that the netmask + address doesn't convey about, for example, broadcast addresses. There is much useful documentation about the myriad array of powerful things that one can do with /etc/network/interfaces available online. Almost all of it details various aspects of networking. Therefore, googling isn't terribly helpful!

  • It's optional if you got already broadcast an address as explained by Julie. I haven't tested it but possibly it could let you use that line instead of the broadcast one.
    – phk
    Jan 2, 2017 at 0:21

1 Answer 1


The network doesn't have to be specified as it is simply the result of address & netmask (& is a binary and): & =

It may make it easier to understand by showing it in binary:

  11000000.10101000.00001010.00100001 (
& 11111111.11111111.11111111.00000000 (
  11000000.10101000.00001010.00000000 (
  • So it is just the network prefix. Why does ifconfig allow one to specify it separately, given the facts that essentially everyone has to use subnets, the binary and is many-to-one, and therefore I can't easily foresee a situation under which you might want to specify network explicitly?
    – Landak
    Jan 2, 2017 at 0:24
  • 1
    Many of those values are inter-changeable since they are calculations on one another and can easily be computed if not specified. Jan 2, 2017 at 0:27
  • A common static IP configuration only needs the IP address, gateway and network mask which in its simples form can be represented as address for the IP address, along with its gateway. Jan 2, 2017 at 0:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.