r/linuxquestions • • Sep 16 '22

Where to learn Linux networking and different types of interfaces and usage of each

Is there any place I can learn and practice different ways Linux handle networking, like netplan, networkd, network-manager etc and the different types of virtual interfaces it has and what each of those does?

edit: I have used Linux as my primary distro for like 2 years before switching to mac for the job. I know about setting up LAN, basic understanding about setting up Wi-Fi/Ethernet networking via CLI. I have experienced setting up a small data center using proxmox and opennebula but mainly the systems part. I know about VLANs, OSI Model, TCP, UDP etc

What I want to learn is interfaces types and what are those used for and do a hands on setup or something.

48 Upvotes

21 comments sorted by

12

u/Aldrenean Sep 16 '22

4

u/rkh4n Sep 16 '22

It’s good but it doesn’t go into any sort of interface types etc

4

u/zebediah49 Sep 17 '22

Define "interface types".

Like -- eth vs eno vs wlan vs bridge vs bond vs vlan vs tun vs tap?

2

u/das7002 Sep 16 '22

What do you mean by “interface types?”

You might be better off taking a general networking class, than something Linux specific.

Getting a CCNA cert is useful even if you never touch Cisco gear just from the sheer amount of stuff you need to know.

1

u/DigitalDragon64 Sep 17 '22

You start with arch wiki as general information, going to man pages or the programs help for more details and then to the programs documentation if you want to know more

10

u/DigitalDragon64 Sep 16 '22

Ah yes, the holy scripts

2

u/[deleted] Sep 16 '22

If your focus is not primarily in networking I'm a firm believer you will learn about it over time. It's impossible not to be exposed to different networking issues as you go through your jobs. Now.. If networking will be your main thing then yeah. I agree with the rest, buying some gear at home should be the best approach. At least from personal experience as a DevOps dude.

1

u/rkh4n Sep 16 '22

I’ve a switch and spare laptop. I do have some experience in Dev ops. I’m software engineer by profession but I recently got introduced this vast world of networking so want to touch those advanced areas

2

u/MintChocolateEnema Sep 16 '22

If you want to get deeper into the lore of networks as a complete system, I definitely recommend Computer Networks by Andrew Tanenbaum.

It's got enough to provide a solid fundamental understanding of the different layers of the OSI model and I found his dry humor to be engaging for such a potentially dry topic. It's a pretty easy read.

I scored the hard copy for school, but I discovered later that the PDF can be found in various repos on GitHub.. not that I condone reaping rewards for free.

2

u/rkh4n Sep 16 '22

I’ll check thanks for suggestions

2

u/rkh4n Sep 16 '22

I’ll check thanks for suggestions

4

u/MasterChiefmas Sep 16 '22

If you want to get deeper into the lore of networks as a complete system

OP: Yeah more this, otherwise I think you are going about it a little backwards. There's TCP/IP networking, and there's how the various OSes implement configuring and managing it. What you really want to learn how TCP/IP networking works, and you'll learn how the tools the OS uses manages the network settings along the way. You learn the underpinnings work this way, rather than the apps.

You don't even need to buy any gear if you have a somewhat recent computer. You can setup a couple of VMs and learn a huge amount of the networking just learning how they interact in the virtual network. You can add multiple NICs in different virtual switches to the VMs to see interactions across different networks, or add a 3rd one, that bridges 2 vswitches and each of the other two in one of the switches, when you want to start learning some routing or other more advanced topics. Run different OSes in the VMs to learn how Windows vs Linux does things. You can actually do a tremendous amount of network learning configurations with no new physical hardware.

8

u/Trant2433 Sep 16 '22

Do you already understand networking in general e.g. can you setup and configure your own local lan? That’s the first goal, even if you do it with Windows boxes and nice off-the-shelf router.

Once you’ve got that, replace these nodes with Linux.

For example, turn off the Netgear or Asus or whatever off-the-shelf wifi router you might use, and instead try to obtain similar functionality with a spare laptop or RaspberryPi with both wifi and Ethernet. You’ll learn tons about how to setup up routing, IP forwarding & NAT, interaction between various interfaces and kernel modules, DNS, dhcp, etc.

Stop using windows on your personal PC / desktop and instead use some “advanced” Linux distro or remove all the pretty GUI tools. This will force you learn the underlying user space tools and kernel subsystems, systemd, etc. that configure networking on an individual machine.

2

u/btw_i_use_ubuntu Sep 17 '22

OP could also consider buying a MikroTik router. They do networking in a Linux style fashion (RouterOS is Linux based). They're not very forgiving for beginners but they have great documentation and tutorials and it would be easier to learn on than a bare Linux box. You can get a hEX on eBay for $35.

2

u/RogueIMP Sep 16 '22

Lookin to NetworkManager and the nmcli tools

-3

u/[deleted] Sep 16 '22

You could try... the information super highway

2

u/[deleted] Sep 16 '22

[removed] — view removed comment

1

u/rkh4n Sep 16 '22

Ah yes. It’s a great way to learn. I recently learnt a lot about VLANs setting up OpnSense for my home

2

u/[deleted] Sep 16 '22

[removed] — view removed comment

1

u/das7002 Sep 16 '22

To learn more about linux specifically, you can go full masochist mode and set it up on a generic linux box

Around 2010ish I had a server with only 2 public IPv4 addresses (even back then, IPv4 was expensive).

I setup a Debian VM and with a whole lot of iptables rules to handle everything for me. Initial setup is quite easy though, just enable net.ipv4.ip_forward and install dnsmasq!

Linux is really good at being a router if you know what you actually need it to do.