2

I keep getting an error when booting Alpine Linux Networking failed to start. I'm using a RPI3 which is connected by an ethernet cable to the box. Here's the /etc/network/interfaces :

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address 192.168.1.1
    netmask 255.255.255.0
    gateway 192.168.1.255

when typing netstat -r I have :

Destination   Gateway   Genmask         Flags MSS Window irtt Iface
192.168.1.0    *        255.2555.255.0  U       0 0         0 eth0

I turned it into dhcp and it worked. Any ideas as to the problem?

migrated from stackoverflow.com May 22 '16 at 16:30

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

0

Your gateway is wrong. With the subnet mask you are using, the gateway is not a valid ip address. Once you get the ip address via DHCP, run:

route -n | grep 0.0.0.0 | head -1 | awk '{print $2}'

And put that as gateway. Of course, the "address" entry should be different from the gateway.

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.