0

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?

Catto
  • 103
  • 1
  • 5
  • 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. – guiverc Oct 27 '22 at 08:17
  • @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 – Catto Oct 27 '22 at 08:20
  • 1
    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. – Jos Oct 27 '22 at 08:20
  • @Jos Somehow I don't have NetworkManager.conf files – Catto Oct 27 '22 at 08:31
  • 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. – guiverc Oct 27 '22 at 08:36
  • 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 – Catto Oct 27 '22 at 08:37
  • 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) – guiverc Oct 27 '22 at 08:39
  • 1
    Issue the command lsb_release -a and paste the output into your question. – Jos Oct 27 '22 at 08:59
  • Hi guys sorry for late response. Finally I can connect to internet using answer from Artur – Catto Oct 28 '22 at 02:34
  • Also thanks for your help – Catto Oct 28 '22 at 02:35

1 Answers1

5

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.

Artur Meinild
  • 26,018