2

I have to configure an ubuntu hardy server network interface.

The service hoster told me that this is the network data for the machine:

IP Range:  111.111.200.74 to 111.111.200.78
Netmask:   255.255.255.248
Broadcast: 111.111.200.79
Gateway:   111.111.200.73
Subnet:    111.111.200.72/29

I am only using the first IP address. I will update the /etc/hosts file with 111.111.200.74, but I am still unsure how the /etc/network/interfaces file should be. This is my plan:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
  address   111.111.200.74
  netmask   255.255.255.248
  network   111.111.200.???
  broadcast 111.111.200.79
  gateway   111.111.200.73

As you can see I don't know how to build the network line. How would I calculate the data for the network line and what is the result?

(I changed the first 2 octets of the subnet, they are not "111.111" in the real setup.)

Edit: This is what I will use, constructed from the accepted answer below:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
  address   111.111.200.74
  netmask   255.255.255.248
  # the following line is optional/redundant, 
  # because address and netmask are given above:
  network   111.111.200.72
  broadcast 111.111.200.79
  gateway   111.111.200.73
user12096
  • 927
  • 6
  • 23
  • 39

1 Answers1

2

you should be able to leave that out as long as your netmask and address are correct.

There are also online calculators like subnet-calculator.com if you want to fill it in.

In your current example it's included in "111.111.200.72/29". "/29" is the encoded subnetmask, "111.111.200.72" is the network ip

tliff
  • 145
  • 1
  • 1
  • 9
  • So in this example there would be no need to visit that page? I use the line "network 111.111.200.72" and that's it? Just to be on the safe side. Thank you – user12096 Mar 26 '10 at 09:31
  • yes, you dont have to calculate it, .72 is correct or just leave out the line completely, works fine too – tliff Mar 26 '10 at 09:35
  • I updated the machine's config and restarted networking, it seems alive :-) Thank you! – user12096 Mar 26 '10 at 09:44