Alpine switching from static IP to DHCP on it's own

2 posts / 0 new
Last post
#1 Wed, 2016-08-03 12:37
hreidar
  • hreidar's picture
  • Offline
  • Last seen: 8 months 3 weeks ago
  • Joined: 2016-08-03

Hi, I'm having a problem with configuring the network on my Alpine 3.4.1. I have configured /etc/networking/interface as explained on the alpine wiki page but it seems to jump back at using dhcp each time I loose my ssh connection due to inactivity. Anyone experienced similar behaviour?

I'm running it as a VM on Vmware vSphere 5.5 and this is my /etc/networking/interface file:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 10.10.10.100
netmask 255.255.255.0
gateway 10.10.10.1
hostname docker-test

One other thing worth to mention is that I'm also running docker on this VM.

Fri, 2017-01-20 23:54
whallify
  • whallify's picture
  • Offline
  • Last seen: 4 months 1 week ago
  • Joined: 2017-01-20

I'm having the same issue - this is my first experience with alpine, and I'm fairly new to docker, which I just installed. In fact, I'm only using alpine because I had heard how nice it was to work with in a Docker environment.

For me, I'm using VMWare Workstation 12.5.2 on Win7 64-bit, installed Alpine 3.5, had some issues with repositories to get docker installed, so made some changes to that, changed the /etc/network/interfaces, hosts, resolv.conf, restarted networking and it all worked. SSH'ed in, worked for a while and then after some time, I couldn't connect.

I get on the console of the Alpine linux box, and I see the IP address changed to a DHCP assignment. However, the /etc/network/interfaces file is still as I had edited it, and if I restart networking, it gets a static IP again. For a while.

Did you find a fix?

Log in or register to post comments