LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-19-2023, 05:48 AM   #1
banderas20
Member
 
Registered: Aug 2018
Posts: 138

Rep: Reputation: Disabled
Question ip - ifconfig - netplan - interfaces file


Hi!

I'm struggling to configure a quite simple network using Debian. I can't see the difference between using the following commands to set the networking parameters.

ip
ifconfig
netplan
/etc/network/interfaces file

When to use one or another?
Why so many tools for the same purpose?
Does any of them cause conflict with the other?

Thanks!
 
Old 09-19-2023, 09:41 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
ifconfig is the old now deprecated command but still included in many distributions.

ip is the new improved ifconfig command.

Neither ip or ifconfig commands are permanent.

The /etc/network/interfaces file is the old way to manually configure the network interfaces. Typically the lo (local loopback adapter) is still configured via the interfaces file. In most distributions now days Network Manager is in control and you typically use the desktop applet to configure networking.

Ubuntu now uses netplan by default which replaces the traditional interfaces file with a yaml based configuration file.

debian by default uses network manager. As posted you can use the desktop applet or nmcli from the command line to configure your network. If you turn off Network Manager you can go back to using the old interfaces file.
 
Old 09-20-2023, 02:26 AM   #3
banderas20
Member
 
Registered: Aug 2018
Posts: 138

Original Poster
Rep: Reputation: Disabled
[QUOTE=michaelk;6454643]ifconfig is the old now deprecated command but still included in many distributions.

ip is the new improved ifconfig command.

Neither ip or ifconfig commands are permanent.

The /etc/network/interfaces file is the old way to manually configure the network interfaces. Typically the lo (local loopback adapter) is still configured via the interfaces file. In most distributions now days Network Manager is in control and you typically use the desktop applet to configure networking.
Quote:
Originally Posted by michaelk View Post
Ubuntu now uses netplan by default which replaces the traditional interfaces file with a yaml based configuration file.

debian by default uses network manager. As posted you can use the desktop applet or nmcli from the command line to configure your network. If you turn off Network Manager you can go back to using the old interfaces file.
"Neither ip or ifconfig commands are permanent". That was one thing I was struggling to. Thanks for clarifying.

I also had to create my /etc/network/interfaces file manually, since the directory was empty. So I should use either "interfaces" file or "netplan" yaml file. But never both of them, to avoid conflicts. ¿Is that correct?

¿What is the major difference between Network Manager and systemd-networkd?

Thanks for your straightforward reply!
 
Old 09-20-2023, 08:58 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
Yes running multiple networking services will conflict with each other.

To use the old interfaces file you need to disable Network Manager and enable the networking service. With debian I would just use the Network Manager and configure the network adapters as required. What are you trying to accomplish?
 
Old 09-20-2023, 10:42 AM   #5
banderas20
Member
 
Registered: Aug 2018
Posts: 138

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
Yes running multiple networking services will conflict with each other.

To use the old interfaces file you need to disable Network Manager and enable the networking service. With debian I would just use the Network Manager and configure the network adapters as required. What are you trying to accomplish?
Nothing special. Just came across several tutorials explaining different tools and I wanted to have clear the difference.

Thanks!
 
  


Reply

Tags
ifconfig, netplan, netwoking, network



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
[help] netplan config file order laxebisu Linux - Networking 0 12-20-2022 05:49 PM
NETPLAN — static route between interfaces, separate subnets --ubuntu 18.04 jazzmice Linux - Networking 8 11-01-2020 06:33 PM
Netplan file for static wifi IP is ignored qajaq Linux - Networking 2 05-28-2020 11:30 AM
Why "-bash: ifconfig : command not found" when typing "$ifconfig" dangdtvn Linux - Server 9 09-20-2013 06:01 AM
connecting /sbin/ifconfig to bash command ifconfig flammable2 Fedora 4 11-12-2005 07:58 AM

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

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