Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Network doesn't start automatically
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
klopk
n00b
n00b


Joined: 19 May 2018
Posts: 12

PostPosted: Fri Apr 30, 2021 2:34 pm    Post subject: Network doesn't start automatically Reply with quote

I changed network card and configured /etc/conf.d/net, created symlink /etc/init.d/net.ens6, updated rc, but at boot time it says: "ERROR: interface ens6 does not exist".
I can start it manually by
Code:
/etc/init.d/net.ens6 start

and it works fine.
Any ideas?
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Fri Apr 30, 2021 2:42 pm    Post subject: Reply with quote

Hi
what is the output of
Code:

ip a
lspci
lspci -nkk

Maybe the new card is missing drivers.
_________________
:)
Back to top
View user's profile Send private message
joanandk
Apprentice
Apprentice


Joined: 12 Feb 2017
Posts: 169

PostPosted: Fri Apr 30, 2021 2:45 pm    Post subject: Re: Network doesn't start automatically Reply with quote

klopk wrote:
I changed network card and configured /etc/conf.d/net, created symlink /etc/init.d/net.ens6, updated rc, but at boot time it says: "ERROR: interface ens6 does not exist".
I can start it manually by
Code:
/etc/init.d/net.ens6 start

and it works fine.
Any ideas?


Maybe your interface gets loaded after the attempt to start net.ens6. Try loading the module with modules (/etc/conf.d/modules).
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21607

PostPosted: Fri Apr 30, 2021 3:22 pm    Post subject: Reply with quote

At what runlevel does the system try to start this interface? If unsure, show us the output of rc-update.
Back to top
View user's profile Send private message
klopk
n00b
n00b


Joined: 19 May 2018
Posts: 12

PostPosted: Fri Apr 30, 2021 6:19 pm    Post subject: Reply with quote

gentoo-bin stock kernel, drivers are loaded and network is working completely fine, but only with manual start.
Code:
~ # lspci | grep Ether
03:00.0 Ethernet controller: Mellanox Technologies MT27500 Family [ConnectX-3]
06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)

Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
       valid_lft forever preferred_lft forever
2: enp6s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether <MAC> brd ff:ff:ff:ff:ff:ff
3: ens6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether <MAC> brd ff:ff:ff:ff:ff:ff

Code:
~ # ls -l /sys/class/net/
total 0
lrwxrwxrwx 1 root root 0 Apr 30 20:46 enp6s0 -> ../../devices/pci0000:00/0000:00:1c.2/0000:06:00.0/net/enp6s0
lrwxrwxrwx 1 root root 0 Apr 30 20:40 ens6 -> ../../devices/pci0000:00/0000:00:02.0/0000:03:00.0/net/ens6
lrwxrwxrwx 1 root root 0 Apr 30 20:40 lo -> ../../devices/virtual/net/lo

run level is boot, just like previous card (it was intel 1Gb, installed with gentoo without problems)
Code:
               binfmt | boot
             bootmisc | boot
              cgroups |                                 sysinit
                devfs |                                 sysinit
                dmesg |                                 sysinit
                 fsck | boot
             hostname | boot
              hwclock | boot
              keymaps | boot
            killprocs |                        shutdown
    kmod-static-nodes |                                 sysinit
                local |      default nonetwork
           localmount | boot
             loopback | boot
              modules | boot
             mount-ro |                        shutdown
                 mtab | boot
             net.ens6 | boot
             netmount |      default
               procfs | boot
                 root | boot
         save-keymaps | boot
    save-termencoding | boot
            savecache |                        shutdown
                 sshd | boot
        stmpfiles-dev |                                 sysinit
      stmpfiles-setup | boot
               sysctl | boot
                sysfs |                                 sysinit
         termencoding | boot
                 udev |                                 sysinit
         udev-trigger |                                 sysinit
              urandom | boot

just tested on debian (same hardware) with no issues, but i want it to work on gentoo.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Fri Apr 30, 2021 6:26 pm    Post subject: Reply with quote

So i suppose that ens6 is this Mellanox card?
do you have these in your .config
Code:

CONFIG_NET_VENDOR_MELLANOX=y
CONFIG_MELLANOX_PLATFORM=y

If they are built as modules you will need an initrd to load them @boot
or build them into the kernel with above configs.
_________________
:)


Last edited by alamahant on Fri Apr 30, 2021 6:30 pm; edited 2 times in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21607

PostPosted: Fri Apr 30, 2021 6:26 pm    Post subject: Reply with quote

Perhaps boot is too early? I bring up net.lo in boot, but wait until default to bring up net.eth0.
Back to top
View user's profile Send private message
klopk
n00b
n00b


Joined: 19 May 2018
Posts: 12

PostPosted: Fri Apr 30, 2021 7:14 pm    Post subject: Reply with quote

alamahant wrote:
So i suppose that ens6 is this Mellanox card?
do you have these in your .config
Code:

CONFIG_NET_VENDOR_MELLANOX=y
CONFIG_MELLANOX_PLATFORM=y

If they are built as modules you will need an initrd to load them @boot
or build them into the kernel with above configs.

yes, both are present in config-5.10.27-gentoo-dist

just switched to default, same error, but only once (it was twice when boot), network still down.
Code:
               binfmt | boot
             bootmisc | boot
              cgroups |                                 sysinit
                devfs |                                 sysinit
                dmesg |                                 sysinit
                 fsck | boot
             hostname | boot
              hwclock | boot
              keymaps | boot
            killprocs |                        shutdown
    kmod-static-nodes |                                 sysinit
                local |      default nonetwork
           localmount | boot
             loopback | boot
              modules | boot
             mount-ro |                        shutdown
                 mtab | boot
             net.ens6 |      default
             netmount |      default
               procfs | boot
                 root | boot
         save-keymaps | boot
    save-termencoding | boot
            savecache |                        shutdown
                 sshd | boot
        stmpfiles-dev |                                 sysinit
      stmpfiles-setup | boot
               sysctl | boot
                sysfs |                                 sysinit
         termencoding | boot
                 udev |                                 sysinit
         udev-trigger |                                 sysinit
              urandom | boot
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Fri Apr 30, 2021 7:42 pm    Post subject: Reply with quote

These are the mellanox modules
Code:

mlx5_core
mlxsw_switchx2
mlxsw_minimal
mlxsw_switchib
mlxsw_core
mlxsw_i2c
mlxsw_pci
mlxsw_spectrum
mlx4_core
mlx4_en
mlxfw
mlxreg-io
mlxreg-hotplug


Maybe incude them in a /etc/modules-load.d/mellanox.conf file
_________________
:)
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