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?

1 Answer 1

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.

2
  • 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, 2010 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, 2010 at 13:58

You must log in to answer this question.

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