5

In Linux, to define aliases, we have to modify /etc/network/interfaces..

Something like this:

auto eth0:1
iface eth0:1 inet static
address 192.168.1.60
netmask 255.255.255.0
network x.x.x.x
broadcast x.x.x.x
gateway x.x.x.x

What does network mean here?

migrated from stackoverflow.com Jan 24 '10 at 16:48

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

6

For your case, network is 192.168.1.0, which means your ip address is in the network range, 192.168.1.0 to 192.168.1.255

You can always get your network base address easily by doing ip & mask, where & is logical AND.

  • i need to set my alias ip as 10.192.161.95 and gateway as 10.192.161.2 what should be my netmask and network? I want to access all 10.X.X.X ips through this gateway. – Kumar Jan 24 '10 at 13:52
  • your netmask should be 255.0.0.0 and network would be 10.0.0.0, and your gateway server/router should also be set as netmask 255.0.0.0 – S.Mark Jan 24 '10 at 13:58

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.