Giles Coochey
2017-Mar-08 10:43 UTC
[CentOS] From Networkmanager to self managed configuration files
On 08/03/17 10:38, John Hodrien wrote:> On Wed, 8 Mar 2017, Giles Coochey wrote: > >> ifconfig enp0s25 192.168.0.1 netmask 255.255.255.0 >> route add default gw 192.168.0.254 enp0s25 >> echo nameserver 8.8.8.8 > /etc/resolv.conf >> echo nameserver 8.8.4.4 >> /etc/resolv.conf > > Oh okay, you really do want to back away from Redhat entirely. That's > entirely your choice. > > What you end up with if you take this approach widely is effectively > your own > linux distribution. >Not really, Redhat/Centos has a lot to offer, but for me, networking is a one-time configuration, and the best way to configure it is using something that falls within this principle: https://en.wikipedia.org/wiki/KISS_principle I'm not flaming NetworkManager, I'm just stating that for many (perhaps most), it is over-engineered for a server orientated distribution. I can run with the script above on 30 server instances, and it doesn't, as yet, break any of the other features of Centos that I enjoy. -- Regards, Giles Coochey +44 (0) 7584 634 135 +44 (0) 1803 529 451 giles at coochey.net
John Hodrien
2017-Mar-08 10:52 UTC
[CentOS] From Networkmanager to self managed configuration files
On Wed, 8 Mar 2017, Giles Coochey wrote:> Not really, Redhat/Centos has a lot to offer, but for me, networking is a > one-time configuration, and the best way to configure it is using something > that falls within this principle: > > https://en.wikipedia.org/wiki/KISS_principle > > I'm not flaming NetworkManager, I'm just stating that for many (perhaps > most), it is over-engineered for a server orientated distribution. I can run > with the script above on 30 server instances, and it doesn't, as yet, break > any of the other features of Centos that I enjoy.It means you're stuck in your own hand crafted niche. Which is fine, but it's up to you to maintain the niche, or you find yourself using obsolete tools like ifconfig and route. I'd argue there's a gulf between keeping things simple and doing things your own way. jh
Giles Coochey
2017-Mar-08 10:58 UTC
[CentOS] From Networkmanager to self managed configuration files
On 08/03/17 10:52, John Hodrien wrote:> > It means you're stuck in your own hand crafted niche. Which is fine, > but it's > up to you to maintain the niche, or you find yourself using obsolete > tools > like ifconfig and route. > > I'd argue there's a gulf between keeping things simple and doing > things your > own way. >I'm sure there are drop in replacements for ifconfig and route, but even if deprecated I have not needed to revisit that script for many years, so I'm not changing it. When it does eventually break I have to look at four lines to discover where the problem might be, I can troubleshoot it by trying to run each line manually and see what is going on. When qw hit a bug in NetworkManager that breaks something specific that you're doing then you can try to raise a bug with upstream, or you could try to review the thousands of lines of code that make it up and try to fix the problem yourself. Or perhaps you'll do what I did, remove it and put in a 4 line script. -- Regards, Giles Coochey +44 (0) 7584 634 135 +44 (0) 1803 529 451 giles at coochey.net
Steve Clark
2017-Mar-08 12:09 UTC
[CentOS] From Networkmanager to self managed configuration files
On 03/08/2017 05:43 AM, Giles Coochey wrote:> > On 08/03/17 10:38, John Hodrien wrote: >> On Wed, 8 Mar 2017, Giles Coochey wrote: >> >>> ifconfig enp0s25 192.168.0.1 netmask 255.255.255.0 >>> route add default gw 192.168.0.254 enp0s25 >>> echo nameserver 8.8.8.8 > /etc/resolv.conf >>> echo nameserver 8.8.4.4 >> /etc/resolv.conf >> Oh okay, you really do want to back away from Redhat entirely. That's >> entirely your choice. >> >> What you end up with if you take this approach widely is effectively >> your own >> linux distribution. >> > Not really, Redhat/Centos has a lot to offer, but for me, networking is > a one-time configuration, and the best way to configure it is using > something that falls within this principle:I agree - they are trying to make it like windows, and when something doesn't work correctly you have no clue what is going on in the black box!> https://en.wikipedia.org/wiki/KISS_principle > > I'm not flaming NetworkManager, I'm just stating that for many (perhaps > most), it is over-engineered for a server orientated distribution. I can > run with the script above on 30 server instances, and it doesn't, as > yet, break any of the other features of Centos that I enjoy. >-- Stephen Clark *NetWolves Managed Services, LLC.* Director of Technology Phone: 813-579-3200 Fax: 813-882-0209 Email: steve.clark at netwolves.com http://www.netwolves.com
Steve Clark
2017-Mar-08 12:14 UTC
[CentOS] From Networkmanager to self managed configuration files
On 03/08/2017 05:52 AM, John Hodrien wrote:> On Wed, 8 Mar 2017, Giles Coochey wrote: > >> Not really, Redhat/Centos has a lot to offer, but for me, networking is a >> one-time configuration, and the best way to configure it is using something >> that falls within this principle: >> >> https://en.wikipedia.org/wiki/KISS_principle >> >> I'm not flaming NetworkManager, I'm just stating that for many (perhaps >> most), it is over-engineered for a server orientated distribution. I can run >> with the script above on 30 server instances, and it doesn't, as yet, break >> any of the other features of Centos that I enjoy. > It means you're stuck in your own hand crafted niche. Which is fine, but it's > up to you to maintain the niche, or you find yourself using obsolete tools > like ifconfig and route. > > I'd argue there's a gulf between keeping things simple and doing things your > own way. > > jhYes it is really hard! ip address add 192.168.0.1/24 dev enp0s25 ip route add default via 192.168.0.254 dev enp0s25 echo nameserver 8.8.8.8 > /etc/resolv.conf echo nameserver 8.8.4.4 >> /etc/resolv.conf -- Stephen Clark *NetWolves Managed Services, LLC.* Director of Technology Phone: 813-579-3200 Fax: 813-882-0209 Email: steve.clark at netwolves.com http://www.netwolves.com
David Both
2017-Mar-08 12:25 UTC
[CentOS] From Networkmanager to self managed configuration files
On 03/08/2017 05:43 AM, Giles Coochey wrote:> > > On 08/03/17 10:38, John Hodrien wrote: >> On Wed, 8 Mar 2017, Giles Coochey wrote: >> >>> ifconfig enp0s25 192.168.0.1 netmask 255.255.255.0 >>> route add default gw 192.168.0.254 enp0s25 >>> echo nameserver 8.8.8.8 > /etc/resolv.conf >>> echo nameserver 8.8.4.4 >> /etc/resolv.conf >> >> Oh okay, you really do want to back away from Redhat entirely. That's >> entirely your choice. >> >> What you end up with if you take this approach widely is effectively >> your own >> linux distribution. >> > Not really, Redhat/Centos has a lot to offer, but for me, networking > is a one-time configuration, and the best way to configure it is using > something that falls within this principle: > > https://en.wikipedia.org/wiki/KISS_principle > > I'm not flaming NetworkManager, I'm just stating that for many > (perhaps most), it is over-engineered for a server orientated > distribution. I can run with the script above on 30 server instances, > and it doesn't, as yet, break any of the other features of Centos that > I enjoy. >I do not agree with your conclusions about NetworkManager. First, I use it on several servers and firewalls that - theoretically at least - should never change. Some of the most tiresome problems I have had to fix were what happened due to renaming of NICs after replacing a bad one, or a 100Mb with a Gb NIC, or adding a new NIC to connect with a new network. NetworkManager keeps NIC naming consistent with no surprises. I am getting ready to install two new NICs in a firewall/router that already has two NICs and I am not dreading that change as I would have with the old network service. I have had excellent results with NetworkManager and am very happy with it. I see it as a significant improvement over the old network service. If you are concerned about performance issues - don't worry - you won't have any. It works fine on my RaspberryPI forewall/router using CentOS 7 for ARM and on my ancient EeePC that runs a full installation of Fedora 25. Don't try to fix something that isn't broken. -- ********************************************************* David P. Both, RHCE Millennium Technology Consulting LLC Raleigh, NC, USA 919-389-8678 dboth at millennium-technology.com www.millennium-technology.com www.databook.bz - Home of the DataBook for Linux DataBook is a Registered Trademark of David Both ********************************************************* This communication may be unlawfully collected and stored by the National Security Agency (NSA) in secret. The parties to this email do not consent to the retrieving or storing of this communication and any related metadata, as well as printing, copying, re-transmitting, disseminating, or otherwise using it. If you believe you have received this communication in error, please delete it immediately.
John Hodrien
2017-Mar-08 12:39 UTC
[CentOS] From Networkmanager to self managed configuration files
On Wed, 8 Mar 2017, Steve Clark wrote:> Yes it is really hard! > > ip address add 192.168.0.1/24 dev enp0s25 > ip route add default via 192.168.0.254 dev enp0s25 > echo nameserver 8.8.8.8 > /etc/resolv.conf > echo nameserver 8.8.4.4 >> /etc/resolv.confThis is still a deliberately trivial case, as already said, with no teaming/bonding/vlan type fun in the mix. You're free to disentangle yourself from the bits of CentOS you don't like, and there's nothing at all stopping you, but after a while what you're supporting isn't CentOS. I realise this is only one little part of the whole, but still. jh
Steve Clark
2017-Mar-08 13:16 UTC
[CentOS] From Networkmanager to self managed configuration files
On 03/08/2017 07:39 AM, John Hodrien wrote:> On Wed, 8 Mar 2017, Steve Clark wrote: > >> Yes it is really hard! >> >> ip address add 192.168.0.1/24 dev enp0s25 >> ip route add default via 192.168.0.254 dev enp0s25 >> echo nameserver 8.8.8.8 > /etc/resolv.conf >> echo nameserver 8.8.4.4 >> /etc/resolv.conf > This is still a deliberately trivial case, as already said, with no > teaming/bonding/vlan type fun in the mix.Let us have a vote - how many of us do teaming/bonding/vlans on our servers? Our networking gear does that in our installation.> You're free to disentangle yourself from the bits of CentOS you don't like, > and there's nothing at all stopping you, but after a while what you're > supporting isn't CentOS. I realise this is only one little part of the whole, > but still. > > jh > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >-- Stephen Clark *NetWolves Managed Services, LLC.* Director of Technology Phone: 813-579-3200 Fax: 813-882-0209 Email: steve.clark at netwolves.com http://www.netwolves.com
Andreas Benzler
2017-Mar-08 13:48 UTC
[CentOS] From Networkmanager to self managed configuration files
Hello David, It was not to flame something about NetworkManager. There some application that "needs" to wheel the old way. I would never have thought it would be such an enlightenment for such a small, old thing. 1. There is a file that isn't always needed (/etc/sysconfig/network) 2. I wanne have the same result in the old style. (NOZEROCONF=yes) And just by the way. My Desktop computer here runs with the NetworkManager. 1. Outside lan 2. A dummy bridge adapter fired by the NetworkManager (With a island name server + dhcp for kvm) 3. An internal lan that can also run an Centos Diskless computer. That was not my intention; really not. For a network starter it is an absolute must to know, how it works in practically. Not me. Sorry to everyone
Jonathan Billings
2017-Mar-08 14:54 UTC
[CentOS] From Networkmanager to self managed configuration files
On Wed, Mar 08, 2017 at 10:43:57AM +0000, Giles Coochey wrote:> https://en.wikipedia.org/wiki/KISS_principle > > I'm not flaming NetworkManager, I'm just stating that for many (perhaps > most), it is over-engineered for a server orientated distribution. I can run > with the script above on 30 server instances, and it doesn't, as yet, break > any of the other features of Centos that I enjoy.If you'd like a really simple solution that avoids NetworkManager, I suggest using systemd-networkd (both systemd-networkd and systemd-resolved packages required). I've used it to set up a bridge on my workstattion for use with libvirtd/kvm, and it is just as simple a text file but future compatible. Heck, it probably even works on other distros that use systemd. Here's a super-simple static configuration: # cat /etc/systemd/network/10-static-eno1.network [Match] name=eno1 [Network] Address=192.168.1.2 Gateway=192.168.1.1 DNS=192.168.1.1 You need to make sure that /etc/resolv.conf is a symlink /run/systemd/resolve/resolv.conf if you want the systemd-resolved service to manage it. Just disable NetworkManager and network services and enable the systemd-networkd and systemd-resolved services. Honestly, I've found systemd-networkd very useful for the more complex networking on my workstation (bridged VMs to external network) but its also useful for my tiny VMs that don't need extra daemons running. -- Jonathan Billings <billings at negate.org>
Giles Coochey
2017-Mar-08 15:00 UTC
[CentOS] From Networkmanager to self managed configuration files
On 08/03/17 14:54, Jonathan Billings wrote:> > If you'd like a really simple solution that avoids NetworkManager, I > suggest using systemd-networkd (both systemd-networkd and > systemd-resolved packages required). I've used it to set up a bridge > on my workstattion for use with libvirtd/kvm, and it is just as simple > a text file but future compatible. Heck, it probably even works on > other distros that use systemd. > > Here's a super-simple static configuration: > > # cat /etc/systemd/network/10-static-eno1.network > [Match] > name=eno1 > > [Network] > Address=192.168.1.2 > Gateway=192.168.1.1 > DNS=192.168.1.1 > > You need to make sure that /etc/resolv.conf is a symlink > /run/systemd/resolve/resolv.conf if you want the systemd-resolved > service to manage it. Just disable NetworkManager and network > services and enable the systemd-networkd and systemd-resolved > services. > > Honestly, I've found systemd-networkd very useful for the more complex > networking on my workstation (bridged VMs to external network) but its > also useful for my tiny VMs that don't need extra daemons running. >That's interesting, I'll snapshot and perhaps take that tangent on the next build and see how it goes. -- Regards, Giles Coochey +44 (0) 7584 634 135 +44 (0) 1803 529 451 giles at coochey.net
Seemingly Similar Threads
- From Networkmanager to self managed configuration files
- From Networkmanager to self managed configuration files
- From Networkmanager to self managed configuration files
- From Networkmanager to self managed configuration files
- From Networkmanager to self managed configuration files