Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[gentoo-user] how to restart the network, no net.enp1s0

756 views
Skip to first unread message

n952162

unread,
Jan 16, 2022, 4:00:05 AM1/16/22
to
Hello all,

my system runs fine, but when I want to restart my network, I find
there's no /etc/init.d/net.enp1s0 link or other interesting candidate. 
Do something change here?

What do I need to do to restart my network?

Dale

unread,
Jan 16, 2022, 4:40:04 AM1/16/22
to
I ran into something like this recently when switching to systemd udev
from eudev.  When I rebooted, my interface names were changed.  Here's
what you can try, maybe it will work.  Do ifconfig and see what it is
named exactly.  This is the relevant part of mine:


root@fireball / # ifconfig
enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
<<< SNIP >>>


Mine is named enp3s0.  So, the file needs to be named net.enp3s0.  I
think you have that already but that will confirm your info.  So, you
need to create a file that links to net.lo.  Mine looks like this:


root@fireball / # ls -al /etc/init.d/net*
lrwxrwxrwx 1 root root     6 Mar  1  2012 /etc/init.d/net.enp3s0 -> net.lo


I was in KDE so I used graphical tools.  In Krusader as root, must be
root to do this, I right clicked the net.lo file then selected Link
Handling.  It should pop up and ask you for a  name.  When it does, give
it the file name for your card but don't forget to put "net." in front
of it.  Whatever you do, don't delete net.lo or overwrite it.  I'm not
sure what all problems that would cause but I'm pretty sure it wouldn't
be good.  :-(  If you don't have Krusader, whatever tool you use that
has root privileges should have a way to create a link.

If you don't use a graphical file manager that has root abilities, man
ln and create the link with it.  I haven't used ln in so long, I can't
recall the proper way off the top of my head but it is pretty simple.  I
think what they call a soft link is enough.  As long as it looks similar
to mine above, you should be fine. 

Once you do one of those, you should be able to start, stop and restart
your network. 

Hope that helps.  

Dale

:-)  :-)

Oh, I looked in the Gentoo wiki, I couldn't find a way to do this
there.  Either my search abilities are lacking or it isn't there.  Maybe
it's in the handbook.  Since the handbook moved to the wiki, it just
isn't the same. If you searched before asking, it's no wonder you
couldn't find a answer. 

Dale

unread,
Jan 16, 2022, 4:50:04 AM1/16/22
to
I found this in the handbook.  Linky:

https://wiki.gentoo.org/wiki/Handbook:AMD64/Networking/Introduction

If my post above doesn't help, maybe that will.  Of course, replace the
relevant bits such and interface name.  ;-)  It shows the ln method. 

Dale

:-)  :-)

Mark Knecht

unread,
Jan 16, 2022, 1:10:04 PM1/16/22
to
Obviously the answers depends completely on how you are managing
services and what executables you have on your highly customizable
Gentoo machine, but possibly:

sudo service network-manager restart

sudo systemctl restart NetworkManager.service

sudo nmcli networking off && sudo nmcli networking on

sudo ifdown -a && sudo ifup -a

If you are using systemctl then

sudo systemctl status

is a good place to start, along with

nmcli

HTH,
Mark

n952162

unread,
Jan 21, 2022, 7:40:05 AM1/21/22
to
I guess openrc has fallen out of favor ...

n952162

unread,
Jan 21, 2022, 7:50:03 AM1/21/22
to
The point is, something has changed in openrc, and I was hoping somebody
knew about it.

It used to be that you could restart the network with:

  rc-service net.enp1s0 restart

which would use the link in /etc/init.d.  But that link is now gone,
although the network works.  Something fundamental has changed, I think,
and I thought it would pop out here, but I guess I'm the only one still
using openrc.



On 1/16/22 19:06, Mark Knecht wrote:

William Kenworthy

unread,
Jan 21, 2022, 8:00:05 AM1/21/22
to
There was a news item on network naming - it might be that.  A couple of
people got caught by it.

BillK

Peter Humphrey

unread,
Jan 21, 2022, 10:40:03 AM1/21/22
to
On Friday, 21 January 2022 12:48:51 GMT n952162 wrote:

> It used to be that you could restart the network with:
>
> rc-service net.enp1s0 restart
>
> which would use the link in /etc/init.d. But that link is now gone,
> although the network works. Something fundamental has changed, I think,
> and I thought it would pop out here, but I guess I'm the only one still
> using openrc.

Au contraire; my /etc/init.d/net.eth0 is still present. Or are you talking
about a ~amd64 system? Mine's not ~.

This machine faces no prospect of net interfaces coming and going, so I
specify net.ifnames=0 on the kernel command line to keep the eth0 name.

--
Regards,
Peter.

Jack

unread,
Jan 21, 2022, 2:40:04 PM1/21/22
to
On 2022.01.21 07:48, n952162 wrote:
> The point is, something has changed in openrc, and I was hoping
> somebody
> knew about it.
>
> It used to be that you could restart the network with:
>
>   rc-service net.enp1s0 restart
>
> which would use the link in /etc/init.d.  But that link is now gone,
> although the network works.  Something fundamental has changed, I
> think,
> and I thought it would pop out here, but I guess I'm the only one
> still
> using openrc.
I use openrc, and that link is still present (enp25s0 for me). I'm on
kernel 5.15.3, and am currently compiling 5.16.1. Up to date amd64
system with a select set of ~amd64 packages.

raffaele

unread,
Jan 22, 2022, 6:20:05 AM1/22/22
to
On 1/21/22 13:48, n952162 wrote:
> The point is, something has changed in openrc, and I was hoping somebody
> knew about it.
>
> It used to be that you could restart the network with:
>
>   rc-service net.enp1s0 restart
>
> which would use the link in /etc/init.d.  But that link is now gone,
> although the network works.  Something fundamental has changed, I think,
> and I thought it would pop out here, but I guess I'm the only one still
> using openrc.
>
>
The link is still fine here (~amd64):

$ ll /etc/init.d/net.enp3s0
lrwxrwxrwx 1 root root 6 Aug 20  2019 /etc/init.d/net.enp3s0 -> net.lo

# eix -I openrc
[I] sys-apps/openrc
     Available versions:  0.43.5-r1 0.44.10 **9999*l {audit bash debug
ncurses +netifrc newnet pam prefix selinux sysv-utils unicode}
     Installed versions:  0.44.10(10:20:03 AM 12/28/2021)(ncurses
netifrc pam unicode -audit -bash -debug -newnet -selinux -sysv-utils)
     Homepage:            https://github.com/openrc/openrc/
     Description:         OpenRC manages the services, startup and
shutdown of a host

I restart using:

# /etc/init.d/net.enp3s0 restart

raf
0 new messages