LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-06-2020, 01:56 AM   #1
achim_59
Member
 
Registered: Jan 2009
Location: Huenfeld, Germany
Distribution: Ubuntu 18.04
Posts: 113

Rep: Reputation: 4
Networking doesn't start correctly when logging onto a console instead of GUI (MATE) in Ubuntu 18.04


I'm trying to repair a neighbour's laptop (I'll just call him "D") and came to the conclusion I really need to run an update. The difficulty is that the laptop won't boot to a normal GUI interface (D uses MATE), so I am restricted to using the console. My attempts at resolving the problem can be seen in this forum thread:
https://www.linuxquestions.org/quest...356/page2.html

That brings me to the current problem. In order to run apt-get update and associated commands, I need to have a network connection. The information below is essentially from my last post on that other thread.

To find out what the networking status on D's machine is, I ran ifconfig with the following result:
Code:
enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.65  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::4de5:cf2e:fc25:61c4  prefixlen 64  scopeid 0x20<link>
        ether 20:1a:06:a1:a2:83  txqueuelen 1000  (Ethernet)
        RX packets 96  bytes 11742 (11.7 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 231  bytes 182660 (182.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16  

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  (Lokale Schleife)
        RX packets 559  bytes 76172 (76.1 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 559  bytes 76172 (76.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp3s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 28:e3:47:50:f7:dc  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
I've been told that ifconfig is deprecated, but the results are still valid. Interesting here is the first entry "enp2s0", which has been given the IP address 192.168.1.65, This address was allocated by my IPCop, so D's laptop obviously has an address within my home network. [By the way, before anybody wastes their time telling me that IPCop is no longer supported, I already know and it's not really relevant here.]

Next I tried to find out what DNS settings were in use. From what I've read so far the command systemd-resolve --status should provide some information. The results were less than encouraging:
Code:
Global
          DNSSEC NTA: 10.in-addr.arpa
                      16.172.in-addr.arpa
                      168.192.in-addr.arpa
                      17.172.in-addr.arpa
                      18.172.in-addr.arpa
                      19.172.in-addr.arpa
                      20.172.in-addr.arpa
                      21.172.in-addr.arpa
                      22.172.in-addr.arpa
                      23.172.in-addr.arpa
                      24.172.in-addr.arpa
                      25.172.in-addr.arpa
                      26.172.in-addr.arpa
                      27.172.in-addr.arpa
                      28.172.in-addr.arpa
                      29.172.in-addr.arpa
                      30.172.in-addr.arpa
                      31.172.in-addr.arpa
                      corp
                      d.f.ip6.arpa
                      home
                      internal
                      intranet
                      lan
                      local
                      private
                      test

Link 3 (wlp3s0)
      Current Scopes: none
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no

Link 2 (enp2s0)
      Current Scopes: none
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
I cannot fully interpret this, but it suggests that the LAN connection (enp2s0) is not able to access a DNS service. So the question then is: what can it "see" or access?

In a first attempt I tried nmcli device status:
Code:
STATE                  CONNECTIVITY  WIFI-HW  WIFI     WWAN-HW  WWAN    
connected (site only)  limited       enabled  enabled  enabled  enabled
Again, not encouraging, since it tells me that there is no access to the internet, only a connection to the local network.

So I tried nmcli device show to find out what the device IDs are (I've left out the WLAN stuff since that's not relevant. Besides... it isn't activated from what I can see in the results so far) :
Code:
GENERAL.DEVICE:                         enp2s0
GENERAL.TYPE:                           ethernet
GENERAL.HWADDR:                         20:1A:06:A1:A2:83
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (verbunden)
GENERAL.CONNECTION:                     Kabelgebundene Verbindung 1
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/1
WIRED-PROPERTIES.CARRIER:               an
IP4.ADDRESS[1]:                         192.168.1.65/24
IP4.GATEWAY:                            192.168.1.1
IP4.ROUTE[1]:                           dst = 0.0.0.0/0, nh = 192.168.1.1, mt = 20100
IP4.ROUTE[2]:                           dst = 192.168.1.0/24, nh = 0.0.0.0, mt = 100
IP4.ROUTE[3]:                           dst = 169.254.0.0/16, nh = 0.0.0.0, mt = 1000
IP4.DNS[1]:                             192.168.1.1
IP4.DOMAIN[1]:                          localdomain
IP6.ADDRESS[1]:                         fe80::4de5:cf2e:fc25:61c4/64
IP6.GATEWAY:                            --
IP6.ROUTE[1]:                           dst = ff00::/8, nh = ::, mt = 256, table=255
IP6.ROUTE[2]:                           dst = fe80::/64, nh = ::, mt = 256
IP6.ROUTE[3]:                           dst = fe80::/64, nh = ::, mt = 100
Right, so the connection ID is "Kabelgebundene Verbindung 1". So what does this connection have available to it? To ascertain that I tried the command nmcli connection show "Kabelgebundene Verbindung 1". And here I'm truly at a loss:
Code:
connection.id:                          Kabelgebundene Verbindung 1
connection.uuid:                        7b918410-9907-3c84-b648-f11188eb910a
connection.stable-id:                   --
connection.type:                        802-3-ethernet
connection.interface-name:              --
connection.autoconnect:                 yes
connection.autoconnect-priority:        -999
connection.autoconnect-retries:         -1 (default)
connection.auth-retries:                -1
connection.timestamp:                   1578163471
connection.read-only:                   no
connection.permissions:                 --
connection.zone:                        --
connection.master:                      --
connection.slave-type:                  --
connection.autoconnect-slaves:          -1 (default)
connection.secondaries:                 --
connection.gateway-ping-timeout:        0
connection.metered:                     unknown
connection.lldp:                        default
connection.mdns:                        -1 (default)
802-3-ethernet.port:                    --
802-3-ethernet.speed:                   0
802-3-ethernet.duplex:                  --
802-3-ethernet.auto-negotiate:          no
802-3-ethernet.mac-address:             20:1A:06:A1:A2:83
802-3-ethernet.cloned-mac-address:      --
802-3-ethernet.generate-mac-address-mask:--
802-3-ethernet.mac-address-blacklist:   --
802-3-ethernet.mtu:                     auto
802-3-ethernet.s390-subchannels:        --
802-3-ethernet.s390-nettype:            --
802-3-ethernet.s390-options:            --
802-3-ethernet.wake-on-lan:             default
802-3-ethernet.wake-on-lan-password:    --
ipv4.method:                            auto
ipv4.dns:                               --
ipv4.dns-search:                        --
ipv4.dns-options:                       ""
ipv4.dns-priority:                      0
ipv4.addresses:                         --
ipv4.gateway:                           --
ipv4.routes:                            --
ipv4.route-metric:                      -1
ipv4.route-table:                       0 (unspec)
ipv4.ignore-auto-routes:                no
ipv4.ignore-auto-dns:                   no
ipv4.dhcp-client-id:                    --
ipv4.dhcp-timeout:                      0 (default)
ipv4.dhcp-send-hostname:                yes
ipv4.dhcp-hostname:                     --
ipv4.dhcp-fqdn:                         --
ipv4.never-default:                     no
ipv4.may-fail:                          yes
ipv4.dad-timeout:                       -1 (default)
ipv6.method:                            auto
ipv6.dns:                               --
ipv6.dns-search:                        --
ipv6.dns-options:                       ""
ipv6.dns-priority:                      0
ipv6.addresses:                         --
ipv6.gateway:                           --
ipv6.routes:                            --
ipv6.route-metric:                      -1
ipv6.route-table:                       0 (unspec)
ipv6.ignore-auto-routes:                no
ipv6.ignore-auto-dns:                   no
ipv6.never-default:                     no
ipv6.may-fail:                          yes
ipv6.ip6-privacy:                       -1 (unknown)
ipv6.addr-gen-mode:                     stable-privacy
ipv6.dhcp-send-hostname:                yes
ipv6.dhcp-hostname:                     --
ipv6.token:                             --
proxy.method:                           none
proxy.browser-only:                     no
proxy.pac-url:                          --
proxy.pac-script:                       --
GENERAL.NAME:                           Kabelgebundene Verbindung 1
GENERAL.UUID:                           7b918410-9907-3c84-b648-f11188eb910a
GENERAL.DEVICES:                        enp2s0
GENERAL.STATE:                          activated
GENERAL.DEFAULT:                        yes
GENERAL.DEFAULT6:                       no
GENERAL.SPEC-OBJECT:                    --
GENERAL.VPN:                            no
GENERAL.DBUS-PATH:                      /org/freedesktop/NetworkManager/ActiveConnection/1
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/Settings/3
GENERAL.ZONE:                           --
GENERAL.MASTER-PATH:                    --
IP4.ADDRESS[1]:                         192.168.1.65/24
IP4.GATEWAY:                            192.168.1.1
IP4.ROUTE[1]:                           dst = 0.0.0.0/0, nh = 192.168.1.1, mt = 20100
IP4.ROUTE[2]:                           dst = 192.168.1.0/24, nh = 0.0.0.0, mt = 100
IP4.ROUTE[3]:                           dst = 169.254.0.0/16, nh = 0.0.0.0, mt = 1000
IP4.DNS[1]:                             192.168.1.1
IP4.DOMAIN[1]:                          localdomain
DHCP4.OPTION[1]:                        requested_subnet_mask = 1
DHCP4.OPTION[2]:                        requested_rfc3442_classless_static_routes = 1
DHCP4.OPTION[3]:                        subnet_mask = 255.255.255.0
DHCP4.OPTION[4]:                        domain_name_servers = 192.168.1.1
DHCP4.OPTION[5]:                        ip_address = 192.168.1.65
DHCP4.OPTION[6]:                        requested_static_routes = 1
DHCP4.OPTION[7]:                        dhcp_server_identifier = 192.168.1.1
DHCP4.OPTION[8]:                        requested_time_offset = 1
DHCP4.OPTION[9]:                        broadcast_address = 192.168.1.255
DHCP4.OPTION[10]:                       requested_interface_mtu = 1
DHCP4.OPTION[11]:                       dhcp_rebinding_time = 3004
DHCP4.OPTION[12]:                       requested_domain_name_servers = 1
DHCP4.OPTION[13]:                       dhcp_message_type = 5
DHCP4.OPTION[14]:                       requested_broadcast_address = 1
DHCP4.OPTION[15]:                       dhcp_renewal_time = 1654
DHCP4.OPTION[16]:                       routers = 192.168.1.1
DHCP4.OPTION[17]:                       requested_domain_name = 1
DHCP4.OPTION[18]:                       domain_name = localdomain
DHCP4.OPTION[19]:                       requested_routers = 1
DHCP4.OPTION[20]:                       expiry = 1578167206
DHCP4.OPTION[21]:                       host_name = didi-Lenovo-G500s
DHCP4.OPTION[22]:                       requested_netbios_scope = 1
DHCP4.OPTION[23]:                       requested_wpad = 1
DHCP4.OPTION[24]:                       requested_ms_classless_static_routes = 1
DHCP4.OPTION[25]:                       requested_netbios_name_servers = 1
DHCP4.OPTION[26]:                       network_number = 192.168.1.0
DHCP4.OPTION[27]:                       requested_domain_search = 1
DHCP4.OPTION[28]:                       next_server = 192.168.1.1
DHCP4.OPTION[29]:                       requested_ntp_servers = 1
DHCP4.OPTION[30]:                       dhcp_lease_time = 3600
DHCP4.OPTION[31]:                       requested_host_name = 1
IP6.ADDRESS[1]:                         fe80::4de5:cf2e:fc25:61c4/64
IP6.GATEWAY:                            --
IP6.ROUTE[1]:                           dst = ff00::/8, nh = ::, mt = 256, table=255
IP6.ROUTE[2]:                           dst = fe80::/64, nh = ::, mt = 256
IP6.ROUTE[3]:                           dst = fe80::/64, nh = ::, mt = 100
To save a bit of time, please note the entry:
Code:
IP4.DNS[1]:                             192.168.1.1
That is the IP address of my IPCop DNS. Now I know that works, otherwise I wouldn't be able to post this at all. Things like this give me the "heebee-geebees", because I cannot figure out what's going on. I have no idea how to find out either, because I'm not really a networking expert. I've been reading the man pages for nmcli, but I' don't know what I can do to rectify a situation where everything seems to be correct... er... apart from the fact that I can't access the internet from D's machine.

If anybody can provide some advice on how I can fix the internet access using the console, I would be very grateful.
 
Old 01-06-2020, 06:26 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,385

Rep: Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336
The reason his network won't boot is probably that X isn't going, so NetworkManager doesn't start.

You could have a look in Xorg.0.log to find why X isn't running. Post the errors and weird stuff near the end, but don't post the lot.

To set him up manually on wifi is doable, but is a major PITA. There's a rather long config line, unless your network is open. Post the output of
Code:
iwconfig enp2s0
and see if he's connected to your router or his own. To check his dns, run
Code:
sudo cat /etc/resolv.conf
As long as he has some server he can reach with ping, he should be ok. Just check the output of
Code:
route
also and post that. The default route should get him out online.

EDIT: If you want the really long line to manually connect, I'll dream one up for you.

Last edited by business_kid; 01-06-2020 at 06:28 AM.
 
1 members found this post helpful.
Old 01-06-2020, 09:15 AM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
I don't know NM well and can't interpret the nmcli output. The only time I have used systemd-resolve I created a dent in my wall from banging my head against it, so I am not that clued in there either. However, there are simpler ways to check network connectivity.

You do have an IP address, which tells me that there is some connectivity. My first question is, what makes you think you have no internet access? What error message (if any) do you get from apt-get update?

Sorry for this question, but is the laptop wired to a switch?
What does ping report? ping router, ping your-DNS-server, ping 1.1.1.1 etc.
What does your routing table look like? Run ip route to check.
How about testing DNS with the commands nslookup, host and/or dig (not sure which of them is installed)?
 
1 members found this post helpful.
Old 01-06-2020, 02:03 PM   #4
achim_59
Member
 
Registered: Jan 2009
Location: Huenfeld, Germany
Distribution: Ubuntu 18.04
Posts: 113

Original Poster
Rep: Reputation: 4
@business_kid:

The Xorg.0.log doesn't really look all that weird and there don't seem to be any obvious problems. That said, I'll have to have a closer look and filter out the rubbish. All that will take a bit of time, because I have to mount a USB drive, then copy the file to the USB drive, unmount it again, transfer to my machine.... you get the picture. Fact is that X isn't running (you got that right), but that is the initial problem as defined in the "Linux Desktop" forum post that I mentioned. The fact that X doesn't run is, IMO, a symptom and not a cause. It seems to be the snapd service that is causing the problem... maybe.

Still, I would like to get networking running. WLAN is not really an option, because that doesn't really start up at all. It's the wlp3s0 connection. I left the WLAN (AKA wifi) stuff out of my previous post, but here is what nmcli device gives back about it:
Code:
GENERAL.DEVICE:                         wlp3s0
GENERAL.TYPE:                           wifi
GENERAL.HWADDR:                         28:E3:47:50:F7:DC
GENERAL.MTU:                            1500
GENERAL.STATE:                          30 (nicht verbunden)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --

GENERAL.DEVICE:                         lo
GENERAL.TYPE:                           loopback
GENERAL.HWADDR:                         00:00:00:00:00:00
GENERAL.MTU:                            65536
GENERAL.STATE:                          10 (nicht verwaltet)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --
IP4.ADDRESS[1]:                         127.0.0.1/8
IP4.GATEWAY:                            --
IP6.ADDRESS[1]:                         ::1/128
IP6.GATEWAY:                            --
Sorry about the German (I've now changed the language temporarily), but "nicht verbunden" means "not connected" and "nicht verwaltet" means "not administered". In short: no wifi available. That's also why iwconfig enp2s0 gives a reply of "no wireless extensions". Before you ask: yes I do have a wifi service here.

The file resolv.conf just contains comments and the advice that the systemd.resolve --status gives details of the actual name servers. I posted the results of that command earlier in my original post on this forum.

The route command gave the following:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         _gateway        0.0.0.0         UG    20100  0        0 enp2s0
link-local      0.0.0.0         255.255.0.0     U     1000   0        0 enp2s0
192.168.1.0     0.0.0.0         255.255.255.0   U     100    0        0 enp2s0
I'm not quite sure how to interpret that, so I'll look it up on the man pages. I'll also edit the Xorg.0.log and post the results as soon as I can.

@berndbausch:

Most of the stuff you asked about is on that other post in the "Linux Desktop" forum. I should have thought of posting that here as well. Here's what I can tell you so far:

Yes, the laptop is connected via a switch... but then so is mine and, when I work from home, so is my work laptop. All 3 run Ubuntu 18.04.

Ping: I can ping the DNS on my local IPCop server, but I cannot ping anything on the internet like google or linuxquestions. When I try anything on the internet I get "name or service not found". That tells me fairly directly that domain names are not being resolved.

running apt-get update gave the following:
Code:
Ign:1 cdrom://Ubuntu 15.10 _Wily Werewolf_ - Release amd64 (20151021) wily InRelease
Fehl:2 http://archive.ubuntu.com/ubuntu bionic InRelease
  »archive.ubuntu.com« konnte nicht aufgelöst werden.
Fehl:3 http://de.archive.ubuntu.com/ubuntu bionic InRelease
  »de.archive.ubuntu.com« konnte nicht aufgelöst werden.
Fehl:4 http://de.archive.ubuntu.com/ubuntu bionic-updates InRelease
  »de.archive.ubuntu.com« konnte nicht aufgelöst werden.
Fehl:5 http://de.archive.ubuntu.com/ubuntu bionic-backports InRelease
  »de.archive.ubuntu.com« konnte nicht aufgelöst werden.
Fehl:6 http://de.archive.ubuntu.com/ubuntu zesty InRelease
  »de.archive.ubuntu.com« konnte nicht aufgelöst werden.
Fehl:7 http://de.archive.ubuntu.com/ubuntu zesty-updates InRelease
  »de.archive.ubuntu.com« konnte nicht aufgelöst werden.
Fehl:8 http://de.archive.ubuntu.com/ubuntu zesty-backports InRelease
  »de.archive.ubuntu.com« konnte nicht aufgelöst werden.
Fehl:9 http://security.ubuntu.com/ubuntu bionic-security InRelease
  »security.ubuntu.com« konnte nicht aufgelöst werden.
Fehl:10 http://security.ubuntu.com/ubuntu zesty-security InRelease
  »security.ubuntu.com« konnte nicht aufgelöst werden.
Fehl:11 http://archive.canonical.com/ubuntu zesty InRelease
  »archive.canonical.com« konnte nicht aufgelöst werden.
Fehl:12 cdrom://Ubuntu 15.10 _Wily Werewolf_ - Release amd64 (20151021) wily Release
  Bitte verwenden Sie apt-cdrom, um APT diese CD-ROM bekannt zu machen. apt-get update kann nicht dazu verwendet werden, neue CD-ROMs hinzuzufügen.
Fehl:13 https://repo.skype.com/deb stable InRelease
  »repo.skype.com« konnte nicht aufgelöst werden.
Fehl:14 http://ppa.launchpad.net/ubuntu-mate-dev/ppa/ubuntu artful InRelease
  »ppa.launchpad.net« konnte nicht aufgelöst werden.
Fehl:15 http://ppa.launchpad.net/ubuntu-mate-dev/ppa/ubuntu zesty InRelease
  »ppa.launchpad.net« konnte nicht aufgelöst werden.
Paketlisten werden gelesen...
In addition I also get reams of warning messages stating that certain packages are multiply configured. I really have to fix up D's sources.list and sources.list.d, but that will have to wait. First I really need to get the machine running normally again.

running ip route gives:
Code:
default via 192.168.1.1 dev enp2s0 proto dhcp metric 20100
169.254.0.0/16 dev enp2s0 scope link metric 1000
192.168.1.0/24 dev enp2s0 proto kernel scope link src 192.168.1.65 metric 100
I'm not certain what all that means, so I'll check on the man pages when I get a chance.

As for the other commands you recommend, I'll give them a go tomorrow. I'm hoping I'll get a bit more time to work on this then.

Thanks to both business_kid and bernbausch for their input. If anyone else can provide advice, all tips and hints are welcome.
 
Old 01-07-2020, 04:51 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,385

Rep: Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336
Getting the network card up is comparatively easy beside wifi. It needs it's module, & firmware both of which the kernel should have. Then you need to know what you're connecting to.

From your ifconfig output I can see that epn2s0 is the wifi and has an IP. Seeing as wifi nearly invariably connects via dhcp, it means that wifi has some connection. You can verify this with
Code:
iwconfig epn2s0
If you're connected, it should have an ESSID and Access Point set. Now where it's connected is interesting; My wifi used randomly connect to a dhcp server on my printer, which got me nowhere fast :-/.

Once you get some info on what you should be connecting the nic to, and how (fixed IP, DHCP, etc) we can handle that in all likelihood with a few commands.
 
Old 01-07-2020, 05:33 AM   #6
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Your routing table looks good.

It looks like you have, indeed, a problem with DNS. Ubuntu 18.04 uses systemd to manage DNS, and as I alluded, I had a hard time getting it to work a few months back.

It turns out that the PC's DNS server is either configured via DHCP, or by writing its IP address in /etc/systemd/resolved.conf. Here is my version of this file:
Code:
[Resolve]
DNS=192.168.1.16
FallbackDNS=1.1.1.1
Domains=home
DNS is my main DNS server, Domains is the domain I set up at home. FallbackDNS is the secondary server in case the first one breaks.

That's all I can contribute in good faith. You should pursue your troubleshooting with the systemd-resolve command; you started already but need somebody to help you with the output.
 
1 members found this post helpful.
Old 01-08-2020, 03:56 AM   #7
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,385

Rep: Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336
As berndbausch has pointed out, /etc/systemd/resolved.conf appears to be the canonical file. But as long as you're in the shell, you're going to have to populate it each time. I have Mint here, which is Ubuntu with a faster GUI, and the file looks like this
Code:
#DNS=
#FallbackDNS=
#Domains=
#LLMNR=no
#MulticastDNS=no
#DNSSEC=no
#Cache=yes
#DNSStubListener=yes
I'd recommend saving your resolv.conf (which is a symlink) as a bak file, and making a resolv.conf until you get X going. Here's mine
Code:
# Generated by dhcpcd from wlan0.dhcp
domain <my network>
domain <my router, which is entered in /etc/hosts>
nameserver 192.168.178.1 # <my router IP>
nameserver 208.67.222.222
nameserver 208.67.220.220
The last 2 lines are opendns servers. You don't need the 'domain' lines, you just want 2 dns servers.
 
1 members found this post helpful.
Old 01-08-2020, 03:05 PM   #8
achim_59
Member
 
Registered: Jan 2009
Location: Huenfeld, Germany
Distribution: Ubuntu 18.04
Posts: 113

Original Poster
Rep: Reputation: 4
@busuness_kid

I'm not sure why you figure that enp2s0 is a wifi connection. The data above suggests to me that it is an ordinary ethernet connection. (I think that's why it's called "en<something>") The wireless connection is wlp3s0 ("wl" ==> wireless LAN, perhaps?). But to make sure, I tried the iwconfig command on both.

iwconfig enp2s0:
Code:
enp2s0    no wireless extensions.
iwconfig wlp3s0:
Code:
wlp3s0    IEEE 802.11  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
So wlp3s0 is the wifi connection and it isn't up (or how ever one expresses it).

I could try editing /etc/resolv.conf after backing up the symlink, but I'm unsure what to do with it. According to the warning in the linked file, any content will be overwritten. Is there a command that I can use instead? Is there a reason not to put the necessary data into the file /etc/systemd/resolved.conf? I'm being a coward...

OK... I did the backup of the symlink, made the modifications you suggested in a new file called /etc/resolv.conf, and rebooted. After switching to root and remounting / as a writable file system, I tried ping www-google.com and "hey presto", it worked! I then tried apt-get update and apt-get upgrade and both of those worked (despite getting all the warnings about multiple repository configs). Unfortunately, when I rebooted, I got the same problem as before... the boot process hangs on the splash screen. (sigh)

That is what the other post (mentioned above) is all about, so I guess I'll try following up the problem there.

@berndbausch

I didn't try editing /etc/systemd/resolved.conf, because the hack suggested by business_kid worked. As you point out the most important entry is the DNS IP address. I'll check out the details in the man pages, and maybe I can avoid having to use that hack.

Thanks to both of you for the advice. I will mark this as solved.
 
Old 01-09-2020, 06:14 AM   #9
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,385

Rep: Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336
Good to heart my bodge worked. The reasoning behind it was that the links were

etc/resolv.conf -->/run/systemd/resolve/stub-resolv.conf and that's a null file of 0 bytes. So to get that, NetworkManager has to run. Catch-22.

Now that you ran X, /etc/resolv.conf is gone. Make a backup of it - you might need it.

I would boot to console, regain your internet access, run 'sudo apt-get dist-upgrade'. Then find Xorg.0.log. My Mint has it in /var/log; the other possible location is ~/.local/share/xorg/ grab a copy on a usb disk, and post the output of
Code:
cat Xorg.0.log |tail -n 30
and we'll have a look at what's dragging X down.

EDIT: to save hassle, use this command
Code:
cat > /etc/resolv.conf << eof
search 208.67.220.220
search 208.67.222.222
eof

Last edited by business_kid; 01-09-2020 at 06:18 AM.
 
Old 01-09-2020, 02:14 PM   #10
achim_59
Member
 
Registered: Jan 2009
Location: Huenfeld, Germany
Distribution: Ubuntu 18.04
Posts: 113

Original Poster
Rep: Reputation: 4
Thanks business_kid. I understand the logic behind the networking "kludge" you suggested. I must remember to reverse it when I no longer need it. Still, it's good to know how to set up networking without the network manager.

I'm afraid my successes, however, were not as far reaching as you think. I did not get X running and when I try the normal boot (not switching plymouth off) the system hangs at the splash screen as before.

Since this is not really a networking problem and I already have an open thread for the boot issue, I will continue with the earlier thread:
https://www.linuxquestions.org/quest...356/page2.html

You (and anyone else) are welcome to provide input there. I still do not know what is causing the boot sequence to simply "hang" at the splash screen.

Thanks again for your help with the networking problem.

Last edited by achim_59; 01-09-2020 at 02:16 PM. Reason: minor error
 
Old 01-10-2020, 04:21 AM   #11
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,385

Rep: Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336Reputation: 2336
Ok.

From my last post:
Quote:
Originally Posted by business_kid
I would boot to console, regain your internet access, run 'sudo apt-get dist-upgrade'. Then find Xorg.0.log. My Mint has it in /var/log; the other possible location is ~/.local/share/xorg/ grab a copy on a usb disk, and post the output of


Code:
cat Xorg.0.log |tail -n 30
and we'll have a look at what's dragging X down.
 
  


Reply

Tags
netwoking, ubuntu 18.04



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: MATE 1.14 Desktop Environment Available for Ubuntu MATE 16.04 LTS, Update Now LXer Syndicated Linux News 0 06-09-2016 04:03 AM
LXer: Ubuntu MATE Projects Donates Money to Debian, MATE, and Syncthing Developers LXer Syndicated Linux News 0 08-02-2015 04:23 PM
LXer: Ubuntu MATE 15.04 Arrives With MATE Desktop 1.8.2 and MATE Tweak LXer Syndicated Linux News 0 05-15-2015 09:30 AM
LXer: Ubuntu MATE 14.10 PPA Updated, Includes MATE 1.8, User Intervention Required LXer Syndicated Linux News 0 03-20-2015 08:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration