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?

10
  • 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, 2022 at 8: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, 2022 at 8: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, 2022 at 8:20
  • @Jos Somehow I don't have NetworkManager.conf files
    – Catto
    Oct 27, 2022 at 8:31
  • 1
    Issue the command lsb_release -a and paste the output into your question.
    – Jos
    Oct 27, 2022 at 8:59

1 Answer 1

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.

5
  • I just need to change ens2 to ens33? Sorry but it wont break anything right?
    – Catto
    Oct 27, 2022 at 8:31
  • 2
    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. Oct 27, 2022 at 8:35
  • If it works, it would be kind of you to accept and upvote. Thanks! 😎 Oct 27, 2022 at 8:48
  • Sorry for late response, I've changed it. How to check everything worked perfectly?
    – Catto
    Oct 28, 2022 at 2:31
  • Nvm, thanks for your answer. Finally I can connect to Internet
    – Catto
    Oct 28, 2022 at 2:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .