<div dir="ltr"><div><div><div><div><div><div>Dear all,<br><br></div>I set up a arch linux container on my arch box. <br></div>The container (dahlia) boots, works and connect fine.<br><br></div>Now I want to set up a static IP on the container, and I must admit I am loosing my mind.<br>
<br></div>The overall set up :<br></div>on host : <br>dhcpcd@enp7s0.service - dhcpcd on enp7s0<br> Loaded: loaded (/usr/lib/systemd/system/dhcpcd@.service; enabled)<br> Active: active (running) since Sun 2014-02-23 14:44:07 CET; 53min ago<br>
Process: 382 ExecStart=/usr/bin/dhcpcd -q -w %I (code=exited, status=0/SUCCESS)<br> Main PID: 515 (dhcpcd)<br> CGroup: /system.slice/system-dhcpcd.slice/dhcpcd@enp7s0.service<br> └─515 /usr/bin/dhcpcd -q -w enp7s0<br>
<br></div><div>$ ip addr<br>.......<br></div><div> inet <a href="http://192.168.1.87/24">192.168.1.87/24</a> brd 192.168.1.255 scope global enp7s0<br><br></div><div>--> Shall I use a bridge on host ?<br></div><div><br>
</div><div>On guest : <br><br></div><div>I disabled dhcpcd@.service, then <br></div><div>I was thinking using this profile (named dahliaVM) with netctl :<br><br>Description='A basic static ethernet connection'<br>
Interface=enp7s0<br>Connection=ethernet<br>IP=static<br>Address=('<a href="http://192.168.1.23/24">192.168.1.23/24</a>' '<a href="http://192.168.1.87/24">192.168.1.87/24</a>')<br>#Routes=('<a href="http://192.168.0.0/24">192.168.0.0/24</a> via 192.168.1.2')<br>
Gateway='192.168.1.254'<br>DNS=('212.147.10.180' '212.147.10.162')<br><br></div><div>the etc/systemd/system/netctl@dahliaVM.service is here with inside:<br><br>[Unit]<br>Description=A basic static ethernet connection<br>
BindsTo=sys-subsystem-net-devices-enp7s0.device<br>After=sys-subsystem-net-devices-enp7s0.device<br><br></div><div>Unfortunately this setup do not work.<br><br>gab@dahlia ➤➤ ~ % systemctl status netctl@dahliaVM.service <br>
netctl@dahliaVM.service - A basic static ethernet connection<br> Loaded: loaded (/etc/systemd/system/netctl@dahliaVM.service; static)<br> Active: inactive (dead)<br> Docs: man:netctl.profile(5)<br><br>Feb 23 14:46:51 dahlia systemd[1]: Dependency failed for A basic static ethernet connection.<br>
Feb 23 15:23:13 dahlia systemd[1]: Dependency failed for A basic static ethernet connection.<br>Feb 23 15:26:28 dahlia systemd[1]: Dependency failed for A basic static ethernet connection.<br><br></div><div>I was thinking too using the new systemd-network facility, but it is too new for me, and if the host is running systemd-git, the container is with systemd 208.<br>
<br></div><div>I would appreciate some help to set up a static Ip on the container different from the host IP.<br><br></div><div>Thank you<br></div>.<br>
</div>