# Force old networkd/systemd networking

## microugly

I apologise in advanced if I'm getting terms wrong with networkd an systemd.

I have create a base-box for Vagrant using Veewee and the definition available at https://github.com/hyamamoto/gentoo-bento.

By default it defines networking with this batch of code which doesn't work:

```
# bring up network interface and sshd on boot (for older systemd naming scheme, eth0)

chroot "$chroot" /bin/bash <<DATAEOF

ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules

DATAEOF

chroot "$chroot" /bin/bash <<DATAEOF

cd /etc/conf.d

echo 'config_eth0=( "dhcp" )' >> net

ln -s net.lo /etc/init.d/net.eth0

rc-update add net.eth0 default

rc-update add sshd default

DATAEOF
```

But it also provides this alternative method which does work:

```
# bring up network interface and sshd on boot (Alt. for new systemd naming scheme, enp0s3)

chroot "$chroot" /bin/bash <<DATAEOF

cd /etc/conf.d

sed -i "s/eth0/enp0s3/" /etc/udhcpd.conf

echo 'config_enp0s3=( "dhcp" )' >> net

ln -s net.lo /etc/init.d/net.enp0s3

rc-update add net.enp0s3 default

rc-update add sshd default

DATAEOF
```

The problem now is that Vagrant itself seem to use the old method of setting up networking when you configure Vagrant to provide a static IP for the box.  This has been reported as a problem at https://github.com/mitchellh/vagrant/issues/4345

What I'm wondering is if there is a way I can force Gentoo to use the old network setup method when it gets installed, to make it compatible with Vagrant until a fix is available. What I should be looking for to be able to do that?

----------

## eccerr0r

You may be mixing up systemd with udev, which is the portion of the packages that's naming the interfaces funny.  Unless you're actually using systemd, which you are probably not, systemd is not doing anything here...

I got from http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ :

Try replacing "ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules"

with "ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules"

----------

