LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 02-23-2018, 04:07 AM   #1
pepperslq
LQ Newbie
 
Registered: Feb 2018
Posts: 11

Rep: Reputation: Disabled
Upgraded Stretch->Buster, lost network. How to set up simple DHCP connection?


Standalone desktop, initial installation was a long time ago (Wheezy or Jessie), and I've been upgrading with apt since then, without problems. After upgrading to Buster, some programs broke due to missing libraries - and worst of all, there was no network up, on reboot.

I had been using a cable modem, with dhcp - nothing fancy. It had always "worked" so I didn't look into how it was working. Now, I'm completely lost as to the best way to set it up.

Manually running "ifconfig eth0 up" and "dhclient eth0" after every reboot does work, and Internet connectivity seems fine with them.

BUT - what is the best way to set up an automatic, basic dhcp Internet connection? Searching yields a confusing, conflicting set of programs that could be involved:

1) network-manager
2) dhcpcd
3) resolvconf
4) sysctl
5) init.d/networking
6) ifconfig
7) isc-dhcp-client
8) systemd
9) various conflicting config files...

I have no idea how systemd impacts all this, and the systemd documentation might as well be hieroglyphics - it's completely bewildering. I can't make any sense of it.

Is there any simple guide to choosing which to use for a non-sysadmin user? Which of the above would be used by default with a fresh installation (I'd rather not go that route if I can avoid it)? The closest I've come is https://wiki.debian.org/NetworkConfiguration - but this just lists options without saying which to use and why.

Last edited by pepperslq; 02-26-2018 at 02:39 AM. Reason: solved
 
Old 02-24-2018, 03:11 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Pi OS & Android
Posts: 11,930

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
You're usually best using what the distro uses. Personally I run slackware where you have the option of not using network manager, grub2, systems, or any of that [expletive deleted].

Resolved.conf is rewritten by just about everything as is the kernel routing table. Try
Code:
route
and see that you have your network device in there doing something. You can add or delete routes to get it there as default (man route). Then try your dhcpcd/dhclient eth0 or whatever your network device is. Post the errors.
 
Old 02-24-2018, 03:44 AM   #3
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,755

Rep: Reputation: 565Reputation: 565Reputation: 565Reputation: 565Reputation: 565Reputation: 565
Moving from stable to testing isn't an upgrade.

Easiest is just to define it in /etc/network/interfaces - pretty much every other tool reads/respects that.
 
Old 02-24-2018, 06:40 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 15,616
Blog Entries: 9

Rep: Reputation: 4516Reputation: 4516Reputation: 4516Reputation: 4516Reputation: 4516Reputation: 4516Reputation: 4516Reputation: 4516Reputation: 4516Reputation: 4516Reputation: 4516
i don't quite understand why you felt compelled to use testing instead of stable.
if this is the same install since wheezy, on the same machine, you very likely won't benefit from newer packages, rather the opposite.

if you installed wheezy first and steadily dist-upgraded, you went through the whole change from sysvinit to systemd. i have no idea if you have conflicting services now, and which of the 2 init systems has the lead or takes care of networking.
you have to hunt that down.

maybe, to make things easier, you could purge all high-level network applications - only networkmanager i guess - and get the basics working.
if you only use one wired internet connection, you don't really need networkmanager anyway.

maybe you also need to understand the difference between internet connection and name resolving.
try this:
Code:
ping 207.241.224.2
ping archive.org
if the first works, but the latter doesn't, means you have a name resolving (DNS) problem.

PS: imo archwiki has the best resources for understanding systemd: https://wiki.archlinux.org/index.php/Systemd
 
Old 02-24-2018, 12:53 PM   #5
pepperslq
LQ Newbie
 
Registered: Feb 2018
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
i don't quite understand why you felt compelled to use testing instead of stable.
Thanks for your reply.

I had been using Stretch (and earlier releases) since it was testing, using apt to upgrade and dist-upgrade along the way - once Stretch became stable, I switched to Buster (or "testing").

What is the point of being able to dist-upgrade with apt if conflicts between releases aren't resolved? (that's not a challenge to your post, I am trying to understand it better)

Quote:
you went through the whole change from sysvinit to systemd. i have no idea if you have conflicting services now, and which of the 2 init systems has the lead or takes care of networking. you have to hunt that down.

maybe you also need to understand the difference between internet connection and name resolving.
Yes, I did upgrade along the way - the "hunting down" part is what I'm trying to figure out ;P What does a default, fresh install use to bring up the interface and start DHCP? I can't find that, specifically.

I understand the concepts of internet connections and DNS - the problem is I don't know which combination of programs to use to achieve them, which ones a default install uses, or what was being used before in Stretch.

I don't mind figuring it out by trial and error, but I'm trying to avoid installing something that creates an irresolvable conflict, or trashes systemd, etc., and then being forced to do a total reinstall.

I did read through the Arch Wiki on systemd, thanks.
 
Old 02-24-2018, 01:02 PM   #6
pepperslq
LQ Newbie
 
Registered: Feb 2018
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
You're usually best using what the distro uses. Personally I run slackware where you have the option of not using network manager, grub2, systems, or any of that [expletive deleted].
Thanks for your reply!

I'm trying to use what the distro uses - but that's the problem ;P I can't figure out what the default is, or what is being used in testing that wasn't being used in Stretch.

I can connect, by manually using ifconfig and dhclient which works fine, but I don't know what I should be using to set that up automatically, or whether there are any conflicts to be aware of or how systemd plays into all of this.

I have run Slackware before, and I definitely like the minimalist/traditional focus.
 
Old 02-24-2018, 11:54 PM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 15,616
Blog Entries: 9

Rep: Reputation: 4516Reputation: 4516Reputation: 4516Reputation: 4516Reputation: 4516Reputation: 4516Reputation: 4516Reputation: 4516Reputation: 4516Reputation: 4516Reputation: 4516
Quote:
Originally Posted by pepperslq View Post
What does a default, fresh install use to bring up the interface and start DHCP? I can't find that, specifically.
for a wired connection - systemd-networkd.

Quote:
Originally Posted by pepperslq View Post
I can connect, by manually using ifconfig and dhclient which works fine, but I don't know what I should be using to set that up automatically
for a wired connection - systemd-networkd.

https://wiki.archlinux.org/index.php/Systemd-networkd
https://wiki.debian.org/systemd
 
1 members found this post helpful.
Old 02-26-2018, 02:38 AM   #8
pepperslq
LQ Newbie
 
Registered: Feb 2018
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
for a wired connection - systemd-networkd.

https://wiki.archlinux.org/index.php/Systemd-networkd
Thanks ondoho!

I went the systemd route, and it seems to be working OK.

For anyone with the same problem, this is what I did:

1) create a config file in /etc/systemd/network, as shown in the archlinux wiki page above
2) systemctl enable systemd-resolved.service
3) systemctl enable systemd-networkd.service
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
set DHCP connection in slackware Trikster Linux - Networking 1 12-06-2011 11:34 AM
Network connection lost bfrank Linux - Networking 3 08-30-2007 10:13 AM
DHCP lost connection? Frank Soranno *BSD 2 08-22-2006 10:09 AM
Lost network connection... szofiel Linux - Networking 0 05-24-2006 09:00 PM
Lost network connection omarcb Linux - Hardware 1 02-12-2004 12:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:17 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