[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Ethernet alias fails to brought up sometimes when booting up



Santiago Castillo Oli wrote:
> After boot, the aliased interfaces are up sometimes, but sometimes not.
> 
> This is the content of /etc/network/interfaces:

You don't have a gateway at all?  None?  Since I don't believe it I am
going to ignore that suggest having one.  But of course if you really
are on an isolated lan segment then you really won't have a gateway.

Do you *really* need to set the mtu to the default 1500?  Unless you
need to change it I recommend not adding that setting.

You are using a style of configuration that I believe to have been
deprecated.  In the old days you would use ifconfig to create eth1:1
but these days that is deprecated.  Now you assign a label eth1:1 to
an existing interface.

Instead of your previous I recommend using the up and down commands to
add alias labels to your device when the device comes up and to remove
them when the device goes down.  Review this following config file
modification of your file and then give this style a try and I think
it will work much better for you.

Note that /26 is the same as /255.255.255.192 but more compact.  And
/29 is the same as /255.255.255.248 and so forth.

Bob

auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet static
	address 192.168.1.100
	netmask	255.255.255.0
	gateway 192.168.1.1

# Computer room network
auto eth1
iface eth1 inet static
	address 192.168.33.62
	netmask 255.255.255.192
	# WiFi Network
	up   ip addr add 192.168.33.126/26 dev eth1 label eth1:1
	down ip addr del 192.168.33.126/26 dev eth1 label eth1:1
	# Printers Network
	up   ip addr add 192.168.33.246/29 dev eth1 label eth1:2
	down ip addr add 192.168.33.246/29 dev eth1 label eth1:2
	# Application server Network
	up   ip addr add 192.168.33.254/29 dev eth1 label eth1:3
	down ip addr add 192.168.33.254/29 dev eth1 label eth1:3

# DSL-Internet access
auto dsl-provider
iface dsl-provider inet ppp
	pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
	provider dsl-provider

Attachment: signature.asc
Description: Digital signature


Reply to: