View Single Post
  #7  
Old 16th June 2012, 10:26
TiTex TiTex is offline
Senior Member
 
Join Date: Aug 2011
Location: Cluj-Napoca,Romania
Posts: 125
Thanks: 0
Thanked 18 Times in 17 Posts
Send a message via Skype™ to TiTex
Default

I made the same mistake as you a few years ago and helped me looking at startup logs i saw that whenever you use IP alliases you don't have to specify , infact you should not specify a gateway for your aliases since they are in the same network as the main IP and they will use the same gateway as the main IP, aslo you don't need to specify the network or/and broadcast address , this informations will be inherited from the main IP

in one of your startup logs you should see something like "RTNETLINK answers: File exists" , that File exists actually means that the route (the gateway) already exists in the routing table

so your interfaces file shoud look something like this
Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface

auto eth0

iface eth0 inet static
address 192.168.50.2
netmask 255.255.255.0
network 192.168.50.0
broadcast 192.168.50.255
gateway 192.168.50.1
# dns-* options are implemented by the resolvconf package, if installed
#dns-nameservers 192.168.50.2
#dns-search mtm.net

auto eth0:0

iface eth0:0 inet static
address 192.168.50.3
netmask 255.255.255.0

auto eth0:1

iface eth0:1 inet static
address 192.168.50.10
netmask 255.255.255.0
and don't forget to edit /etc/resolv.conf and add your nameservers
test it and let us know if all it's good

Last edited by TiTex; 16th June 2012 at 10:37.
Reply With Quote