Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This question already has an answer here:

In almost all the network configuration examples I can find, I always see this "network" line appear with an address ending in .0.

auto eth0 iface eth0 inet static
    address 192.168.1.100
    netmask 255.255.255.0
 -> network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1

According to this post, the value can be found by applying the mask to the IP using a logical AND. If this is the case, why does the line even need to be in the file? Can I remove it?

share|improve this question

marked as duplicate by Ƭᴇcʜιᴇ007, slhck Apr 10 '13 at 14:23

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Yes. This answers my question perfectly. Thank you. I searched for an answer before posting my question but didn't find anything... Likely due to how common the word "network" is. –  Mr Grieves Apr 10 '13 at 14:15
    
I still don't understand why this line needs to be in the network file if it can be obtained simply by applying the mask to the ip. –  Mr Grieves Apr 10 '13 at 14:16
add comment

1 Answer 1

up vote 3 down vote accepted

It is the network address - see the man page here http://manpages.ubuntu.com/manpages/intrepid/man5/interfaces.5.html

If you know your IP and Netmask you can work out the Network address:

IP: 192.168.1.10
Netmask: 255.255.255.0
(Netmask means match first 3 chunks of your IP exactly and any for the last bit)
Network address: 192.168.1.0

Usually meaning that devices on your network will have an IP between 192.168.1.1 and 192.168.1.254 http://en.wikipedia.org/wiki/Subnetwork

Note: I have used interfaces files on several different Linux flavours and left out Network Address and its worked just fine. If it bothers you that much; backup, remove it and try!

share|improve this answer
add comment

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