Score:0

How to fix network disabled?

it flag

I don't know what's happening here, but I can't connect to internet using Ethernet/LAN.

When I run lshw -C net I got this result:

root@ubntnginx:/etc/netplan# lshw -C net
  *-network DISABLED        
       description: Ethernet interface
       product: RTL810xE PCI Express Fast Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: ens33
       version: 02
       serial: 18:a9:05:1a:b7:c1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical
       configuration: broadcast=yes driver=r8169 latency=0 link=no multicast=yes
       resources: irq:17 ioport:e800(size=256) memory:feaff000-feafffff memory:fdff0000-fdffffff memory:feac0000-feadffff

And this is result from ifconfig command:

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 9840  bytes 721798 (721.7 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9840  bytes 721798 (721.7 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

This is the result from cat /etc/netplan

cat /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
  ethernets:
    ens2:
      dhcp4: true
  version: 2

And this is from ip addr

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 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 18:a9:05:1a:b7:c1 brd ff:ff:ff:ff:ff:ff

When I check the network-manager status using sudo service network-manager status I got warning that the files in etc/network/interfaces is not found. And unlike this answer: here, I dont have files in /var/lib/NetworkManager/NetworkManager.state

Any Idea how to fix this?

guiverc avatar
cn flag
Your first paste (`lshw`) shows the disabled; but for us to help we'd benefit from details of what OS/product/release you're using, which you've not told us.
Catto avatar
it flag
@guiverc Sorry but I don't have any Idea about it, I just copy paste command that I found in this stackexchange and try to provide anything I can
uz flag
Jos
This happened to me after upgrading to 22.10. Look in `/etc/NetworkManager/NetworkManager.conf`. Does it say `managed=false`? Change it to true and restart NetworkManager.
Catto avatar
it flag
@Jos Somehow I don't have NetworkManager.conf files
guiverc avatar
cn flag
You've not provided your OS/release details which impact the presence of NetworkManager; you pasted a line which mentions `subiquity` in it which would imply you'd not be expected to have NM installed, but again you've not provided any OS/release details so we're having to guess.
Catto avatar
it flag
Sorry but like I said before, I don't have any Idea about it, I just copy paste command that I found in this stackexchange and try to provide anything I can in my question
guiverc avatar
cn flag
First details required are what release, ie. are you using Ubuntu 18.04 LTS Desktop, Ubuntu 18.04 LTS Server, Ubuntu Core 18?, Ubuntu 20.04 LTS Server? Ubuntu .... ie. what OS/product are the basic detail of your software stack that helps us understand what you're using. (Desktop systems have NM, Server systems generally use netplan... but we'd be guessing as we don't know what you're using, the `subiquity` reference implies to me it's a server installation - but that can be changed post-install & we still don't know your release)
uz flag
Jos
Issue the command `lsb_release -a` and paste the output into your question.
Catto avatar
it flag
Hi guys sorry for late response. Finally I can connect to internet using answer from Artur
Catto avatar
it flag
Also thanks for your help
Score:5
vn flag

It appears your active network adapter is named ens33 - your netplan config should be adjusted to accommodate this:

# This is the network config written by 'subiquity'
network:
  ethernets:
    ens33:
      dhcp4: true
  version: 2

Now run sudo netplan apply. This should hopefully give your interface ens33 an IP address from the DHCP server.

Catto avatar
it flag
I just need to change ens2 to ens33? Sorry but it wont break anything right?
Artur Meinild avatar
vn flag
Since you net is not working right now, what do you mean "break anything"? I believe your odds of getting net is much higher with the correct config, but I'm not giving any guarantees.
Artur Meinild avatar
vn flag
If it works, it would be kind of you to accept and upvote. Thanks!
Catto avatar
it flag
Sorry for late response, I've changed it. How to check everything worked perfectly?
Catto avatar
it flag
Nvm, thanks for your answer. Finally I can connect to Internet
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.