2

I've setup my /etc/network/interfaces. But I have to always restart my network, not just start. /etc/init.d/networking restart on the system boot. Where is the problem? I want my network to start automatically on system boot up. Could you please help me?

My /etc/network/interfaces config

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0

# The primary network interface
iface eth0 inet static
address 192.168.1.21
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 192.168.1.1

Maybe rc.local could help me, but I don't think, it's the right way to do it. Or isn't it?

3
  • Is the behavior the same if you comment out the hotplug line?
    – chili555
    Jul 11, 2016 at 14:13
  • @chili555 still the same Jul 11, 2016 at 14:18
  • Are you certain the interface is eth0? ifconfig Are there any clues in the message log? dmesg | grep eth Is it possible that 192.168.1.21 is in the DHCP pool used by the router? Is there any improvement if you specify 192.168.1.150?
    – chili555
    Jul 11, 2016 at 15:45

0

You must log in to answer this question.

Browse other questions tagged .