Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Network not working [Solved]
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
pankaj13
n00b
n00b


Joined: 05 Sep 2019
Posts: 20

PostPosted: Fri Aug 21, 2020 8:15 pm    Post subject: Network not working [Solved] Reply with quote

Hi,

I did a fresh install of Gentoo using following:

Code:

#eselect profile show
deffault/linux/amd64/17.1/desktop/gnome/systemd


Here is some more information:
Code:

# uname -a
Linux localhost 5.4.48-gentoo #2 SMP Thu Aug 20 04:09:24 PDT 2020 x86_64 Intel(R) Core(TM) i3-3227U CPU @ 1.90GHz GenuineIntel GNU/Linux


Here is the output of lspci
Code:

00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C216 Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C216 Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation HM76 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C216 Chipset Family SMBus Controller (rev 04)
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet controller (rev 05)
02:00.0 Network controller: Broadcom Inc. and subsidiaries BCM43142 802.11b/g/n (rev 01)


The NetworkManager is starting and running as a service:
Code:

     Loaded: loaded (/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2020-04-17 05:37:17 PDT; 10min ago
TriggeredBy: ● systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)
   Main PID: 148 (systemd-network)
     Status: "Processing requests..."
        CPU: 497ms
     CGroup: /system.slice/systemd-networkd.service
             └─148 /lib/systemd/systemd-networkd

Apr 17 05:41:05 localhost systemd-networkd[148]: enp1s0: Link UP
Apr 17 05:41:06 localhost systemd-networkd[148]: enp1s0: Gained carrier
Apr 17 05:41:08 localhost systemd-networkd[148]: enp1s0: Gained IPv6LL
Apr 17 05:42:37 localhost systemd-networkd[148]: enp1s0: Link DOWN
Apr 17 05:42:37 localhost systemd-networkd[148]: enp1s0: Lost carrier
Apr 17 05:43:37 localhost systemd-networkd[148]: enp1s0: Link UP
Apr 17 05:43:39 localhost systemd-networkd[148]: enp1s0: Gained carrier
Apr 17 05:43:41 localhost systemd-networkd[148]: enp1s0: Gained IPv6LL
Apr 17 05:45:41 localhost systemd-networkd[148]: sit0: Link UP
Apr 17 05:45:41 localhost systemd-networkd[148]: sit0: Gained carrier


But I cannot get the network started on wired connection, I tried the Gnome network option which seems to recognize the wired adapter but turning it on does nothing.

Any pointers where to look or troubleshoot to get network working?

Thanks,
Pankaj


Last edited by pankaj13 on Fri Aug 21, 2020 10:36 pm; edited 1 time in total
Back to top
View user's profile Send private message
alamahant
Guru
Guru


Joined: 23 Mar 2019
Posts: 557

PostPosted: Fri Aug 21, 2020 9:41 pm    Post subject: Reply with quote

What is shown from your "systemctl status" is that you do NOT use NetworkManager but systemd-networkd.
There are 2 workarrounds.
1.Install network-manager and let it handle the network
Code:

emerge -va networkmanager
systemctl disable systemd-networkd
systemctl mask systemd-networkd
systemctl enable NetworkManager
reboot

or
2.Configure systemd-networkd to work.
Code:

mkdir /etc/systemd/network


and create a file /etc/systemd/network/my-wired.network with this content
Code:

[Match]
Name=enp1s0

[Network]
Address=192.168.2.8/24
Gateway=192.168.2.1
DNS=8.8.8.8

substituting accordingly to reflect YOUR network
finally
Code:

systemctl enable --now systemd-networkd
reboot

What is the output of
Code:
lsmod | grep r8169


:D


Last edited by alamahant on Fri Aug 21, 2020 11:00 pm; edited 1 time in total
Back to top
View user's profile Send private message
pankaj13
n00b
n00b


Joined: 05 Sep 2019
Posts: 20

PostPosted: Fri Aug 21, 2020 10:31 pm    Post subject: Reply with quote

@alamahant thanks for a detailed response!!

I followed your suggestions for enabling systemd-networkd and the good news is that I can ping 8.8.8.8 but pinging google.com gives "Temporary failure in name resolution".

The output of "lsmod | grep r8169" is NULL.

Any suggestions?

-----------------------
Scratch that query, I solved it by putting "8.8.8.8" in /etc/resolv.conf :D
Back to top
View user's profile Send private message
alamahant
Guru
Guru


Joined: 23 Mar 2019
Posts: 557

PostPosted: Fri Aug 21, 2020 11:01 pm    Post subject: Reply with quote

You have to manually enter the nameserver(=DNS) in
/etc/resolv.conf in the format
Code:

nameserver 192.168.2.1

use your own and delete any other junk you find in this file.
NOTE:If you dont want to use google nameserver 8.8.8.8 you can give your router address also(same as the gateway)
I though maybe your nic uses the r8169 driver but maybe not.If you can ping then A driver is loaded.
You can find which one by running
Code:

lspci -v

and try to locate your ethernet card stanza.
it will show something like
Code:

Kernel driver in use: r8169
Kernel modules: r8169


in my case.....
A CAVEAT:
If you want to configure network from desktop applet then you will probably need NetworkManager.
I dont know if the network gui utils for desktop will work only with systemd-networkd.
:D
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