Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Force old networkd/systemd networking
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
microugly
n00b
n00b


Joined: 22 Dec 2013
Posts: 31

PostPosted: Thu Aug 21, 2014 9:43 pm    Post subject: Force old networkd/systemd networking Reply with quote

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:
Code:
# 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:
Code:
# 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?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Fri Aug 22, 2014 10:58 pm    Post subject: Reply with quote

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"
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum