Linux - Network Configuration (ip, route, dhclient, systemd-resolve, netplan)
Вставка
- Опубліковано 2 жов 2019
- Find code and diagrams at: www.EliTheComputerGuy.com
Configuring Networking at the command line in Linux can be confusing. It’s important to know that you use many different application to manage networking and these applications may be different based on your distribution or version.
ifconfig - See IP address and Network Interface ID (deprecated, but works)
ip addr - See IP address and Network Interface ID
route -n - view default gateway
systemd-resolve --status - view DNS
sudo dhclient -v -r - DHCP release
sudo dhclient -v - DHCP renew
Set Static IP Address
Navigate to: /etc/netplan/
sudo vim file.yaml - edit thye file that ends in yaml
network:
version: 2
renderer: networkd
ethernets:
ens3:
dhcp4: no
addresses:
- 192.168.121.199/24
gateway4: 192.168.121.1
nameservers:
addresses: [8.8.8.8, 1.1.1.1]
sudo netplan apply - apply network changes - Наука та технологія
Eli, Thanks for the content: went through your networking series & learnt a lot.
This intro to Linux series I really enjoyed, binged for 3 days & made it through!
Next your further Linux and programming classes.
Your teaching style is really straightforward & enjoyable, also really funny; much better than many other people's dry classes...
Cheers for the free selfless work you do.
Another masterpiece from the legend. Had issues editing netplan until now. Thanks.
Thank you for the Linux command summary in the video description. It's very useful.
Great intro to Linux vid series, Mr. Eli! Enjoyed it very much, and hopefully some things wil retain...
Good job mr. Eli you are doing very good job and sharing your knowledge with us ..thank you so much I have shared it to my frnds as well in India they also loved it .
Great content! Thanks a million times. Keep up the good work. Again, thanks.
I am brand new in Linux and I had started to learn and stopped almost 5 times now, This has been very to the point. Meanwhile when you wanted to show the error output when you changed from addresses to addresse. I will try it in my vLab to see the output. Thanks again.
Yes.. I was expecting to what errors it throws wrt the change of “addresses” to “addresse”
After several days of headaches trying to connect to my Ubuntu server, I found this video and it was the real solution. Thanks! :)
Brother I want to thank you because I watched 4 minutes of this video, my first ever video watching your content and boom I've cracked the puzzle
Thank you so much for great video, keep up your great work THUMBS up 👍
Great !! Thanks for your detailed explanation. :)
Another wonderful and useful tutorial...
💯💯💯
Thanks man!! The indentations were different on my set-up but everything worked ;)
Cheers buddy - that was very helpful
this has been a journey :)
It's a nice content it's so helpful thank you Eli 👏👏
Thanks. That last one I'll have to watch over.👍😃
Wow thanks you so you make networking easy for me.
Noooo, dude you're selling out! Where's the orange shirt?!? Great vids, btw. Good and useful stuff. Thanks
Need more of these
...in mine (also ubunt serb 18.04) it also has optional: true and below that a line version: 2
What does those two lines refer to?
thanks u help us a lot
so how we know which one to use during install ? where cant see the terminal ? do we use the #s from the the router ? its router public ip ? gate ? net ? or just what the computer gives you ? cause the during installs it doesnt seem to notice the public ip on its own ?
Thank you for this share, it’s educational and you are a great teacher!
May I ask, is it possible to define with NIC is the or shall be the main one (indirectly configuring the interfaces? In nmtui one can archive that and it is just point and click. But in my case doing that breaks my system which is on a Pi5, Raspberry OS 64 Lite and with OMV on top of it all.. when I sat the system up I only had the built in NIC of the Pi5, recently I got myself a 2.5Gb NIC and did’t know better so I reached out to Pi5 forums and got recommended using NetworkManager and since then I’m unable to use the system. I can boot it and using a HDMI adapter attach a monitor but as long as I don’t fix my configuration of the NIC’s using SystemD my setup will keep having errors on boot and be unstable since OMV uses that and seem to be having majors issues cause of my configuration using nmtui)
Would appreciate your input in this matter!
You got a sub either way ofc.
Thank you!!!
I am trying to set up NAT on Ubuntu 18.04. So, can you please tell me the list of configuration files I need to change, and is the Ubuntu18.04 NAT configuration process different than Ubuntu16.0X?
Good video!🎉
Cool. Do you have a video of routing, ports, services management and firewall?
Nice video
Help. When I enter sudo ip -6 route del default and add a new one,
sooner or later the new route disappears and the old route returns. I
need it gone; it links to a link-local-adress that is gone.
I cannot set static IP as it says invalid inconsistent indentation Version 2 or ethernets once changed
Good job explaining this Eli. Btw, do you practice Brazilian Jiujitsu by any chance?
note, Ubuntu 22.04, "systemd-resolve --status" is now "resolvectl status".
Thanks!
thanks king
Thanks.
How are we supposed to setup an ip range for a dchp server
Needs me an iptables video.
Yes. Please.
Thanks for the quality content. I am working on setting up my 1st server ever and it's Ubuntu 22.04 and it's so funny how many different ways there are to skin a cat. This is not how I edited my yaml file and yet both ways work.
I am learning a lot about Linux and the more I learn, the more I see how much I still have to learn
when the teacher says: "this might make your brain hurt" you know you're coming out of this with PTSD
thank you
Thanks
Does Eli have a discord?
the Jason of the web
aren't u suppose to use 'ip route' for default gateway?
when i use bridge-adpater, then run the ifconfig command. I see enp0s3 but there is no inet address. What does this mean?
I think if you renew your DHCP lease it may fix this. I had a similar problem & this worked..
we need a unified model. code and clicks in live. meaning surfing and maybe logging whats happening exsample updates etc. so you can click and learn ^^
on Debian ifconfig and route -n didn't work. I guess they got updated out of existence
You need to do an apt-get install nettools
Hi How to configure ntp using netplan?
I have used dhcp4-overrides: use-ntp but its not working
I love… correction LOVE Arch Linux… but I often use mint too. Lol 😂
This is the output from Linux Mint 20.
$ cat /etc/netplan/1-network-manager-all.yaml
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
As the content of the file suggests, I have used NetworkManager set the static IP address.
All I want is to connect the files on the 2 PCs I own. It would be nice to add my 2 smartphones and a future Thinkpad laptop. Do I need this video or is there an easier way? I've shared a few files from one PC to a smartphone using Bluetooth. But, I need to mainly share videos and LibreOffice and maybe PDF files- to keep them synced and updated. I am using a flash drive for this now for this - moving it from one PC to the other. Also, I dual-boot on one PC, so is there an easy enough way to include those files on WIndows in my network? I don't have or want a server at this point.
never mind. syncthing and nextcloud work just fine and also connect my phones. nextcloud is the easiest of the two, but I prefer to use them for separate file categories for now.
I love you Eli!!!!!!!!!!!!!!!!!!
Why the 10.0.1.14 address is a class C? I know that based on its mask is a class C, but is not supposed to be used on Class A? btw, good video :)
Just ignore all talk about classes, nobody cares about those anymore (but yes, the reserved 10/8 netblock used to be called class A and when used as a /24 subnet it’s a class C subnet)
Because of CIDR ( Classless InterDomain Routing)
Please consider not repeat yourself. On recorded video backtracking is just a click. As one example take for instance your description of option -v.
_Hyphen hyphen_
we are still so primitiff we still have no helpster aka hal 9kD
i mean c64 adventures had better sys ^^
that wasn't hard to understand eli lol
hurting is not o k my friend
This guy acts like we know what he is talking about
you like talking but making it short is really not your strength