Introduction to Linux Network Namespaces

  Рет қаралды 122,332

David Mahler

David Mahler

Күн бұрын

An introduction to Linux network namespaces.
Twitter: @davidmahler
LinkedIn: / davidmahler
This video is lab style in that you can follow along on your own system or just watch. I walk through 2 examples mimicking how Mininet emulates hosts and how OpenStack provides DHCP services (they both use network namespaces)
links:
My Intro to OVS video - • Introduction to Open v...
My Intro to Mininet video - • Introduction to Mininet
references
man7.org/linux/man-pages/man8/...
openvswitch.org
mininet.org
Bob Lantz, Brian O'Connor Mininet presentation - • Stanford NetSeminar : ...
docs.openstack.org (networking documentation)
www.opencloudblog.com (linux networking entries)
Commands used:
Checking out L2/L3:
ip link
ip address
ip route
add an ip address to an interface:
ip address add (ip/mask length) dev (intf name)
turn an interface up
ip link set dev (intf name) up
=========
Add network namespace:
ip netns add (name)
Delete network namespace:
ip netns del (name)
Execute a command in a specific namespace:
ip netns exec (name) (command to execute)
Move a port to a namespace:
ip link set (intf name) netns (net namespace name)
What net namespace is a process ID running in?
ip netns identify (pid)
==========
OVS
add a vSwitch:
ovs-vsctl add-br (name)
add an interface to OVS instance:
ovs-vsctl add-port (OVS name) (intf name)
Create a veth pair:
ip link add (end1 name) type veth peer name (end2 name)
Place a port in a vlan:
ovs-vsctl set port (intf name) tag=(vlan number)
Make a port type internal:
ovs-vsctl set port (intf name) type=internal
==============

Пікірлер: 219
@columgaynor9254
@columgaynor9254 8 жыл бұрын
When it comes to clarity on tricky networking topics, you occupy an isolated namespace of your own. Nice video once again :)
@DavidMahler
@DavidMahler 8 жыл бұрын
Colum Gaynor That's awesome, can I put it on a plaque? Thanks!!
@columgaynor9254
@columgaynor9254 8 жыл бұрын
Absolutely!!!
@tackle4826mc
@tackle4826mc 5 жыл бұрын
Thank you. This still a good video since 2015 ❤
@DavidMahler
@DavidMahler 4 жыл бұрын
Thanks! :-)
@nig3ldoug1as63
@nig3ldoug1as63 3 жыл бұрын
Still enjoying it in 2021 :)
@fsamobby
@fsamobby 2 жыл бұрын
still enjoying it in 2022))
@Oswee
@Oswee 3 жыл бұрын
2021. This still is a huge GEM! Super valuable content!!! Thank you for making and sharing this!!!
@DavidMahler
@DavidMahler 2 жыл бұрын
Stop making me feel older, j/k, thanks for the comment!!!
@SatishKumar-jb9qm
@SatishKumar-jb9qm 6 жыл бұрын
It was a pure joy to watch these videos. Very well explained. Thank you!
@DavidMahler
@DavidMahler 6 жыл бұрын
Wow, that's great to hear, you're welcome Satish!
@archstampton5910
@archstampton5910 6 жыл бұрын
Thank you David. I am preparing the COA exam, you're videos are simply invaluables
@DavidMahler
@DavidMahler 6 жыл бұрын
Awesome, I'm glad they are helping!
@8802082642
@8802082642 7 жыл бұрын
Thanks David for explaining the complex topics in very understandable manner. Makes learning new technology easier.
@DavidMahler
@DavidMahler 7 жыл бұрын
Thanks so much Ankit!
@snowballwang285
@snowballwang285 3 жыл бұрын
man oh man, I can't express how helpful this video for me. Pls continue to do more topics on networking!!!
@DavidMahler
@DavidMahler 3 жыл бұрын
That is great, thanks for this!
@michalkratochvil2415
@michalkratochvil2415 5 жыл бұрын
Hands down one of the best presentations I've ever seen, easy to follow, just the right pace, focused on topic start-to-end. I wish I had come across your channel earlier..
@DavidMahler
@DavidMahler 4 жыл бұрын
Thanks!
@BryanChance
@BryanChance 3 жыл бұрын
It's David Mahler's ability to explain difficult concepts in a highly clear and practical manner. A semester or two worth of classes in under 30 minutes. The way the information is presented helps me retain that information. This is priceless. Thank you.
@DavidMahler
@DavidMahler 2 жыл бұрын
That's great, thanks for the kind detailed words!
@philipgarrett2409
@philipgarrett2409 8 жыл бұрын
This was really well done. Thanks for producing it.
@DavidMahler
@DavidMahler 8 жыл бұрын
+Philip Garrett Thanks for the comment! You're welcome!
@akk2766
@akk2766 8 жыл бұрын
What can I say - your videos are brain fodder for us networking types. Awesome... just awesome!
@DavidMahler
@DavidMahler 8 жыл бұрын
+akk2766 Ha! Thanks!
@sandsfamily1820
@sandsfamily1820 5 жыл бұрын
Awesome info David ....simple session but covers in-depth technical .Thank you for sharing your knowledge ... :) .
@DavidMahler
@DavidMahler 4 жыл бұрын
Thanks!
@ramaraokopparthi6551
@ramaraokopparthi6551 9 жыл бұрын
As always, your videos are good. Keep educating us. Thanks.
@DavidMahler
@DavidMahler 9 жыл бұрын
***** Thanks!
@RaseelBhagat
@RaseelBhagat 8 жыл бұрын
Very helpful and simplified, as usual. Thanks, David.
@DavidMahler
@DavidMahler 8 жыл бұрын
+Raseel Bhagat You're welcome, thanks for commenting and watching !!
@michaelmcz
@michaelmcz 8 жыл бұрын
Very nice. Thanks for putting this concise and informative video together. I will definitely be checking out your other videos!
@DavidMahler
@DavidMahler 8 жыл бұрын
+michaelmcz That's great to hear, thanks for the comments!
@brijeshgpt
@brijeshgpt 2 жыл бұрын
This video deserves a lot of clap. The best one I have came across. Brilliantly explained.
@DavidMahler
@DavidMahler Жыл бұрын
Thank you Brijesh!
@punchtheball5748
@punchtheball5748 4 жыл бұрын
What a nice tutorial, now I understand the Nuage Network much better on those OVS and network namespaces!
@DavidMahler
@DavidMahler 4 жыл бұрын
Cool, I don't know anything about Nuage, but should.....
@surendrapepakayala6966
@surendrapepakayala6966 3 жыл бұрын
Awesome tutorial on network namespaces. Would love more networking tutorials like this
@DavidMahler
@DavidMahler 3 жыл бұрын
Thanks for the comment!
@AndersFongen
@AndersFongen 7 жыл бұрын
Excellent lecture. Exactly the info that I needed. Thank you very much!
@DavidMahler
@DavidMahler 7 жыл бұрын
You're welcome!!
@DavidMahler
@DavidMahler 8 жыл бұрын
@sandeep Thanks for the detailed feedback! Really helps to hear what works. Just to show there is more than one way really. Also IIRC, that is how OpenStack does it (away from my lab atm, have to double check ;-) )
@sachinsr099
@sachinsr099 8 жыл бұрын
I can't thank you enough :) You are a gem of a tutor :) Keep Educating us :)
@DavidMahler
@DavidMahler 8 жыл бұрын
+SACHIN S R You're welcome, and thanks for the comments. I'll try :-)
@SMahay
@SMahay 5 жыл бұрын
I am going thorough Red hat open stack administrator course where i did not understand concept of NS clear, but after watching your video i can say now i have more clarity , you have provided detailed knowledgeable which cleared all my doubts . you are doing marvelous job , a Big thank you .
@DavidMahler
@DavidMahler 4 жыл бұрын
Thanks!
@HorstHachel
@HorstHachel 2 жыл бұрын
Helped me getting my virtual network finally running without any mutual interference. Thanks David!
@DavidMahler
@DavidMahler Жыл бұрын
great!
@pallaveet
@pallaveet 4 жыл бұрын
I wish to have seen this video earlier . Thank you so much for easy to understand and detailed description :)
@DavidMahler
@DavidMahler 4 жыл бұрын
You're very welcome!
@VenkateshRamkumar
@VenkateshRamkumar 8 жыл бұрын
Awesome David ... Thank you for sharing your knowledge ... :)
@DavidMahler
@DavidMahler 8 жыл бұрын
Thanks for the comment, and you are welcome!
@anuttamsharma
@anuttamsharma 4 жыл бұрын
You are REALLY GOOD and you make these concepts so easy to understand. Can't thank you enough.
@DavidMahler
@DavidMahler 4 жыл бұрын
Thanks for commenting!
@anuttamsharma
@anuttamsharma 4 жыл бұрын
David Mahler May I please ask you to make some videos to explain the concepts of Dockers, Containers, Kubernetes, etc. Thanks 😊
@brajesh42
@brajesh42 6 жыл бұрын
Awesome!!!!. Thanks for making these videos. They are very helpful. Please do keep making these videos/sessions.
@DavidMahler
@DavidMahler 6 жыл бұрын
Hi, Rajesh - thanks for continuing to support the page!
@marcusl.1874
@marcusl.1874 8 жыл бұрын
Thank you David for this video. Again a very nice video, which gives a good overview how Linux namespaces can be used in practice :-)
@DavidMahler
@DavidMahler 8 жыл бұрын
Marcus Lachmanez Thanks Marcus for watching and the kind comment!
@ss_sk06
@ss_sk06 8 жыл бұрын
An awesome presentation & explanation . Thanks for this video :)
@DavidMahler
@DavidMahler 8 жыл бұрын
+shakti shwetanshu You're welcome! Thanks for the comments!
@HT-ym1fm
@HT-ym1fm 2 жыл бұрын
very clear and concise explanation, good stuff
@DavidMahler
@DavidMahler 2 жыл бұрын
thanks!
@ratuldatta7147
@ratuldatta7147 3 жыл бұрын
Nice video David, watched a couple of your videos, incremental explanation helps building up the concept. Cheers!👍🏻
@DavidMahler
@DavidMahler 3 жыл бұрын
TY, cheers!
@Simon-xm5qx
@Simon-xm5qx 8 жыл бұрын
this is very sharp and clean. thanks for sharing !
@DavidMahler
@DavidMahler 8 жыл бұрын
+simon lee You're very welcome!
@petreadelin4289
@petreadelin4289 4 жыл бұрын
You are the true teacher of my networking knowledge. I wasted money on uni classes..
@DavidMahler
@DavidMahler 4 жыл бұрын
Ha, thanks!
@Getsaferoom
@Getsaferoom 9 жыл бұрын
David, thanks a lot for your video. The best way to explain something is to show how it works on a real system
@DavidMahler
@DavidMahler 9 жыл бұрын
Saferoom App You're welcome! That's the best way I learn too - have to be doing something actively or see it in action vs. power point alone.
@Niklaos
@Niklaos 11 ай бұрын
Great stuff! Thank you for putting this together. I wish you had added a section about connecting our 2 networks to the internet and not just keep them isolated but this is already great!
@DavidMahler
@DavidMahler 3 ай бұрын
Thanks! I believe I did talk about that in my OpenStack neutron videos
@visanana92
@visanana92 6 жыл бұрын
You helped me sooo much! I absolutely love your videos!
@DavidMahler
@DavidMahler 6 жыл бұрын
That's great, thanks!
@yugandharsarraju6385
@yugandharsarraju6385 8 жыл бұрын
Simply super. I Love your videos.
@DavidMahler
@DavidMahler 8 жыл бұрын
+Yugandhar Sarraju Thanks!
@sai1gon
@sai1gon 8 жыл бұрын
Thank you so much for the excellent tutorial about netns.
@DavidMahler
@DavidMahler 8 жыл бұрын
+sai1gon You're welcome!
@KingGrio
@KingGrio 3 жыл бұрын
Checking in in 2020, and gotta say that video is super.
@DavidMahler
@DavidMahler 3 жыл бұрын
Thanks!
@sandeepr5007
@sandeepr5007 8 жыл бұрын
Always clear, precise and concrete explanations as usual, David. This video was very useful. I like the incremental approach you take for explaining stuffs in neat organized way. Hats off to your efforts for clarity and precision. Cheers and You ROCK! I have one question. Why is that you connected DHCP namespaces to internal ports of OVS and not through VETH pairs (unlike Red/Green host namespace) ?
@glitterjohnson8657
@glitterjohnson8657 4 жыл бұрын
I too have the same question
@Marklavrinenko
@Marklavrinenko 8 жыл бұрын
thanks for great video. a lot of interesting information about network namespaces in a short time. Actually demo is easy to follow in your terminal.
@DavidMahler
@DavidMahler 8 жыл бұрын
+Марк Лавриненко Great, you're welcome!
@mbigras
@mbigras 5 жыл бұрын
I wish I could thumbs this up twice! Bravo!
@DavidMahler
@DavidMahler 5 жыл бұрын
Thank you!!
@koenvanderrijt5244
@koenvanderrijt5244 8 жыл бұрын
thanks for the crystal clear explanation!
@DavidMahler
@DavidMahler 8 жыл бұрын
+koen van der rijt You're welcome!!
@liukang85
@liukang85 4 жыл бұрын
This is so good... wish I had seen this years ago when starting my network-programming related job 🤣
@DavidMahler
@DavidMahler 4 жыл бұрын
Thanks!
@govardhanchintha2981
@govardhanchintha2981 9 жыл бұрын
Nice explanation !!! Thanks for the good tutorial
@DavidMahler
@DavidMahler 9 жыл бұрын
Govardhan Chintha You're welcome! Thanks for the comment.
@prasantakumarbehera7246
@prasantakumarbehera7246 8 жыл бұрын
Awesome video..Thanks a lot for sharing the knowledge.
@DavidMahler
@DavidMahler 8 жыл бұрын
+Prasanta Kumar Behera You're welcome!
@Iamstorm9x
@Iamstorm9x 7 жыл бұрын
great. I really like the way you presented!
@DavidMahler
@DavidMahler 7 жыл бұрын
Thank you!
@jeremybobbin2557
@jeremybobbin2557 5 жыл бұрын
David Mahler is a really great guy
@DavidMahler
@DavidMahler 4 жыл бұрын
So are you!
@ujjalsamanta5841
@ujjalsamanta5841 5 жыл бұрын
David Sir your lecture is too good. ..thanks sir. ..God bless you. .. pls make more video
@DavidMahler
@DavidMahler 5 жыл бұрын
Thanks Ujjal! OK ty!
@smaato1
@smaato1 7 жыл бұрын
very good presentation thx a lot David
@DavidMahler
@DavidMahler 7 жыл бұрын
Thanks!
@kuruvamaddileti7029
@kuruvamaddileti7029 7 жыл бұрын
The presentation is really good....!
@DavidMahler
@DavidMahler 7 жыл бұрын
Thanks!!
@cshivani
@cshivani 4 жыл бұрын
This is excellent tutorial! Thanks!
@DavidMahler
@DavidMahler 4 жыл бұрын
Thanks!
@mehuljv
@mehuljv 9 жыл бұрын
short and crisp! Thank you...
@DavidMahler
@DavidMahler 8 жыл бұрын
Mehul Vora yw!
@lbognini
@lbognini 8 жыл бұрын
Great video! I learnt a lot
@DavidMahler
@DavidMahler 8 жыл бұрын
+Lovoni Bognini Great!!
@speedseeder
@speedseeder 5 жыл бұрын
very nice presentation!
@DavidMahler
@DavidMahler 4 жыл бұрын
Thanks!
@KiranDevraaj
@KiranDevraaj 8 жыл бұрын
Really helpful Sir. Thank you very much.
@DavidMahler
@DavidMahler 8 жыл бұрын
+Kiran Devraaj You're very welcome!
@semirauthsala6001
@semirauthsala6001 5 жыл бұрын
wow nicely explained everything !! thanks
@DavidMahler
@DavidMahler 5 жыл бұрын
You're welcome, thanks for the comment!
@mikescott3355
@mikescott3355 7 жыл бұрын
This video is so much more than just linux namespaces.
@DavidMahler
@DavidMahler 7 жыл бұрын
Thanks for continuing to watch and comment Mike
@cantbefind
@cantbefind 7 жыл бұрын
Thanks David this is so greate.
@DavidMahler
@DavidMahler 7 жыл бұрын
Thanks Michael!
@saravanakumarp
@saravanakumarp 5 жыл бұрын
Great explanation!
@DavidMahler
@DavidMahler 5 жыл бұрын
Thanks!
@sangshinlee5849
@sangshinlee5849 7 жыл бұрын
Thanks a lot for your great videos.
@DavidMahler
@DavidMahler 7 жыл бұрын
You're very welcome!
@doniparthiravikiran
@doniparthiravikiran 5 жыл бұрын
Simply brillant!
@DavidMahler
@DavidMahler 5 жыл бұрын
Thank you sir!
@cleversonahum
@cleversonahum 4 жыл бұрын
Great video!
@DavidMahler
@DavidMahler 4 жыл бұрын
Glad you enjoyed it
@RaynerGS
@RaynerGS 5 жыл бұрын
Awesome, good job. Thanks.
@DavidMahler
@DavidMahler 4 жыл бұрын
Thanks!
@NEO-ku8vg
@NEO-ku8vg 8 жыл бұрын
Great (y) efforts appreciated
@DavidMahler
@DavidMahler 8 жыл бұрын
+vishal sharma Thanks a lot!
@udaymullangi
@udaymullangi 7 жыл бұрын
Nice explanation...
@DavidMahler
@DavidMahler 7 жыл бұрын
Thanks!
@ReverendBizarre123
@ReverendBizarre123 4 жыл бұрын
Fantastic!Thank you.
@DavidMahler
@DavidMahler 4 жыл бұрын
Thank you too!
@chinmaybharadwaj3285
@chinmaybharadwaj3285 7 жыл бұрын
Thanks, That was helpful
@DavidMahler
@DavidMahler 7 жыл бұрын
You're welcome, glad it helped!
@antonysilvester8774
@antonysilvester8774 8 жыл бұрын
Really helpful video. thanks a ton !!!!!!!!!!!!!!!!!
@DavidMahler
@DavidMahler 8 жыл бұрын
+Antony Silvester You're very welcome Antony!
@spiraldynamics6008
@spiraldynamics6008 6 жыл бұрын
very good work thank you
@DavidMahler
@DavidMahler 6 жыл бұрын
You're welcome!
@ujjalsamanta5841
@ujjalsamanta5841 5 жыл бұрын
wow amazing. .thank you sir
@DavidMahler
@DavidMahler 5 жыл бұрын
Thanks!
@tomknudcognizant5746
@tomknudcognizant5746 2 жыл бұрын
Good video, thanks. Would be even cooler to see how the kernel info changes inside.
@DavidMahler
@DavidMahler 2 жыл бұрын
Noted!
@sp-curiouscreature6273
@sp-curiouscreature6273 8 жыл бұрын
Awesome !! Thank you :)
@DavidMahler
@DavidMahler 8 жыл бұрын
Thanks for commenting!!
@karti321
@karti321 8 жыл бұрын
Simply superb!!l
@DavidMahler
@DavidMahler 8 жыл бұрын
Thanks! Thanks for commenting!
@reemuskumar1
@reemuskumar1 5 жыл бұрын
Thanks a lot. It made lot of things clear to me. I have one question. Do we need OVS to create the bridge or can we use the brctl to create the bridge ?
@mandelaakosu139
@mandelaakosu139 8 жыл бұрын
great stuff thumps up
@DavidMahler
@DavidMahler 8 жыл бұрын
Thanks Mandela!
@lmcfificoco
@lmcfificoco 7 жыл бұрын
Awesome !!! Thks a lot
@DavidMahler
@DavidMahler 7 жыл бұрын
Thanks! You're welcome!
@nickopenstacks2216
@nickopenstacks2216 7 жыл бұрын
I love your videos. What tool you use to record those videos? Thanks
@DavidMahler
@DavidMahler 7 жыл бұрын
Thanks, Camtasia Studio
@user-rv7gy4bu4b
@user-rv7gy4bu4b 11 ай бұрын
appreciated
@ijazahmad722
@ijazahmad722 8 жыл бұрын
wowowowow........awsome ...i love itttt , please post more on openstack neutron
@DavidMahler
@DavidMahler 8 жыл бұрын
+Ijaz Ahmad Ha! I do have one more I'm working on probably still a month out or so, unfortunately these dont pay the bills ;-)
@ijazahmad722
@ijazahmad722 8 жыл бұрын
+David Mahler why don't you work for linuxacademy.com/ , they are looking for instructors like you , you can do it part time , they will definitely hire you , because you are a natural instructor.
@ijazahmad722
@ijazahmad722 8 жыл бұрын
+David Mahler linuxacademy.workable.com/
@DavidMahler
@DavidMahler 8 жыл бұрын
+Ijaz Ahmad Thanks a lot for information about them, I'll take a look.
@paulmangham8129
@paulmangham8129 7 жыл бұрын
Great video David. Very impressed with all your content so far, keep up the good work :-) Workaround for tap interface problem on later versions of OVS ---------------------------------------------------------------------------------------------------- Like others I've had issues with the tap interface in a later version of OVS. Simply adding the tap interface manually doesn't seem to connect it to the vswitch when you make it an internal interface, and the tap interface never comes up (NO_CARRIER) after being fully configured and moved into the dhcp-r namespace. I have a workaround, but its a little odd. Either there's a bug somewhere, or my understanding of OVS/tap interfaces is even more limited than I thought... Anyway, this works for some reason: 1) In the root namespace "ip tuntap add mode tap tap-r" (creates a tap interface) 2) ovs-vsctl add-port OVS1 tap-r (adds it to the vswitch) 3) ip link set tap-r netns dhcp-r (move the tap interface to the dhcp-r namespace, but *before changing the interface type / port tag*) Now things get weird... 4) ovs-vsctl set interface tap-r type=internal (sets the tap-r interface to internal *but actually creates a new tap-r interface in the root namespace.* Since there's a "tap-r" already listed OVS doesn't generate an error. However, this tap-r is actually connected and can be brought up later) 5) ovs-vsctl set port tap-r tag=100 6) ip netns exec dhcp-r ip tuntap del mode tap tap-r (delete the original tap interface that we moved to dhcp-r) 7) ip link set tap-r netns dhcp-r (move the new, connected tap-r to the dhcp-r namespace) 8) continue with the rest of the config (ie bringing the interfaces up, dnsmasq config and enabling the red namespace dhclient) The process can be repeated for the tap-g interface and dhcp-g namespace. Not sure what's going on here really, particularly why a new tap interface is created when you set the interface type to internal after moving it to a different namespace... but after a lot of trial and error this is the only way I got the tap interface to come up with OVS version 2.5.2 and Ubuntu 16.04.02.
@DavidMahler
@DavidMahler 7 жыл бұрын
Thanks so much Paul for providing a solution on this, I haven't had cycles to dig into the issues yet
@moldrienperez9052
@moldrienperez9052 Жыл бұрын
Thanks for the video, and for the comments from Paul. I am having problems that I think have something to do with Paul comments, not exactly the same. I've tried his solution without success. I always get next error: "cannot find device "tap-r" after sending the command "ip link set tap-r netns dhcp-r" Wich is weird because tap-r device has been correctly created whith next commands: "ovs-vsctl add-port OVS1 tap-r" "ovs-vsctl set interface tap-r type=internal" "ovs-vsctl set port tap-r tap=100" May be the amount of time passed since the video was released, has come to changes in all or several sofware packages involved? I'm working with Ubuntu 14.04, Anyway, thanks for such a good video. I'll keep trying
@shiyasvp
@shiyasvp 3 жыл бұрын
Wonderful
@DavidMahler
@DavidMahler 3 жыл бұрын
Thank you
@ideaparkcc
@ideaparkcc 4 жыл бұрын
helpful video
@DavidMahler
@DavidMahler 3 жыл бұрын
TY!
@peterphan92
@peterphan92 8 жыл бұрын
Amazing! thanks! What's up with the audio when you were showing the dhcp ps ids?
@DavidMahler
@DavidMahler 8 жыл бұрын
+peterphan92 Thanks for the comment! Ya, I know about the audio issues. I didn't really realize until after uploading and having it up for a few weeks. This vid. was I think my first attempt at recording and editing video and audio separately. I believe I fixed the problem now for future videos though. Learning to edit is its own challenge!
@user-uc3qj7mq7s
@user-uc3qj7mq7s 7 жыл бұрын
Thank you for your video. could you please help with this question: I encountered with a problem with the simplest lab: I created three cirros instance​s in openstack and through CLI I created 2 namespaces Red and Green. I chosen ovs's qvo interfaces of two cirros VM and apply them to RED namespace (I found them using Nova interface-list instance_id). I applied IP address 192.168.1.1 and .2 respectively on those VMs, but they cannot ping each other. I see only ARP request without ARP reply. How do you think what's the problem in such behavior? Why two instances being in the same namespace cannot reach each other?
@DavidMahler
@DavidMahler 7 жыл бұрын
I'm not sure about this - this sounds not simple actually to me. Since OpenStack spins up virtual network config like Linux bridges, the OVS instances assigns local VLANs and puts OVS ports in them, sets up security groups, etc. A lot of moving parts there due to OpenStack - I guess some conflict amongst all that. Maybe something as simple as security groups needs to be updated? Otherwise, I have little idea, sorry. Network namespaces in OpenStack are used with Neutron routers and DHCP usually, not VMs
@DavidMahler
@DavidMahler 7 жыл бұрын
I'm not sure about this - this sounds not simple actually to me. Since OpenStack spins up virtual network config like Linux bridges, the OVS instances assigns local VLANs and puts OVS ports in them, sets up security groups, etc. A lot of moving parts there due to OpenStack - I guess some conflict amongst all that. Maybe something as simple as security groups needs to be updated? Otherwise, I have little idea, sorry. Network namespaces in OpenStack are used with Neutron routers and DHCP usually, not VMs
@DavidMahler
@DavidMahler 7 жыл бұрын
I'm not sure about this - this sounds not simple actually to me. Since OpenStack spins up virtual network config like Linux bridges, the OVS instances assigns local VLANs and puts OVS ports in them, sets up security groups, etc. A lot of moving parts there due to OpenStack - I guess some conflict amongst all that. Maybe something as simple as security groups needs to be updated? Otherwise, I have little idea, sorry. Network namespaces in OpenStack are used with Neutron routers and DHCP usually, not VMs
@flesz_
@flesz_ 2 жыл бұрын
Nice, so the built in linux namespace has dhcp component which is not part of openswitch?
@NikolaiPitaev
@NikolaiPitaev 7 жыл бұрын
Beautiful! Thanks! Probably, I am not the first one, who is asking about your output highlighting trick. How do you turn some output in SecureCRT to red and other lines to green? I know, SecureCRT can highlight, but you are doing this on click (like in PowerPoint). How?? :-)
@DavidMahler
@DavidMahler 7 жыл бұрын
Thanks! You are actually ha. It's Camtasia Studio the video editing app I've been using, not SecureCRT.
@legooos
@legooos 2 жыл бұрын
Looks very similar to vrf lite on Cisco routers
@qwe123727
@qwe123727 5 жыл бұрын
How creation of a new network name space different from running lxc-create command?
@fob3476
@fob3476 Жыл бұрын
How come you could move the tap ports into the network namespace while you had to use a veth pair for the other ports ? Could the eth0-r/g ports be connected to their respective namespaces without a veth pair ? I guess it is a feature of internal ports, but what are the differences ?
@pissedoffdude1
@pissedoffdude1 Жыл бұрын
My understanding is that they're both virtual devices. But on the one hand, let's say we're using OVS in a standard openstack setup, then the tap device can obviously only be added to a single neutron bridge like br-int. But with a veth pair you can add one end to br-int and the other br-ext, so you interconnect multiple bridges, and the veth pairs are what you'd like to use to do intercommunication between the different network namespaces
@mohamedrasvi547
@mohamedrasvi547 5 жыл бұрын
Awesome explanation 👏🏻 I have a doubt...when I try to ping green(vlan 200) from red(vlan100), will it ping or not? If not..how to connect two vlans?
@DavidMahler
@DavidMahler 5 жыл бұрын
A layer 3 device (router) is needed weather virtual or physical.
@mohamedrasvi547
@mohamedrasvi547 5 жыл бұрын
Thanks David Mahler How to assign layer 3 switch virtually?
@findingnory
@findingnory 3 жыл бұрын
@@DavidMahler You first need to assign a new subnet to one of your VLANs. You will surely run into issues trying to route between two VLANs operating within the same subnet. Most routers will not even let you place 2 different interfaces into the same subnet.
@muhammadkhizar3659
@muhammadkhizar3659 6 жыл бұрын
For assigning dynamic ip addresses to 2 clients (red and green) you created two DHCP processes in isolated namespaces, my question is why didn't you created two DHCP processes inside each of isolated client? why you created outside the clients?
@AndersFongen
@AndersFongen 7 жыл бұрын
Is it possible to run the ovswitch in a separate namespace as well?
@DavidMahler
@DavidMahler 7 жыл бұрын
I imagine so, I haven't tried though!
@gowthama1441
@gowthama1441 5 жыл бұрын
please share open vSwitch installation video(latest version)
@lin-ol9hv
@lin-ol9hv Жыл бұрын
when I type ip netns exec green dhclient eth0-g, there show dhclient is alreading running - exiting. I do this experiment step by step. Is there somebody has any ideas?
@jorgehumbertogomezvelasque6420
@jorgehumbertogomezvelasque6420 7 жыл бұрын
Hi I got the following error root@mininet-vm:/home/mininet# ovs-vsctl add-port OVS1 tap-r ovs-vsctl: Error detected while setting up 'tap-r'. See ovs-vswitchd log for details. Any ideas?
@DavidMahler
@DavidMahler 7 жыл бұрын
I reproduced this thanks for pointing it out, something with later releases of OVS since I made this vid. where before it added a port that doesn't yet exist. Haven't gotten to a solution but can play around if I can get myself some free time :-)
@mixwood1130
@mixwood1130 2 жыл бұрын
Now we have eBPF and Kubernetes!!! Wow!!!
@DavidMahler
@DavidMahler 2 жыл бұрын
Ha, I know!
@NoSuchCommand
@NoSuchCommand 9 жыл бұрын
I still cannot get the difference between tap and veth interfaces in their usefulness. Originally, I thought that OVS could not span several namespaces, so one had to use veth in order to have one side in the namespace and the other side in the root namespace part of the OVS bridge. But that also seems to be a common use case to have a tap interface in a namespace and to make it a port of a root namespace's OVS bridge. The conclusion would then be that OVS bridges can span namespaces. But what would be the real difference between tap and veth ? What are their specific use cases ? Or things you can/cannot do with each of them ?
@BarryTheCougar
@BarryTheCougar 9 жыл бұрын
NoSuchCommand A veth pair is effectively a virtual patch cable and the common use case for them is "patching" virtual bridges such as Linux bridges and OVS instances. A TAP devices is how a VM created by a hypervisor such as KVM implements it's vNIC. You can connect a TAP device to an OVS virtual bridge, however, OVS is not compatible with iptables rules applied directly to a TAP device connected directly to an OVS port. Often it's desirable to apply iptables rules directly to the TAP interface, as OpenStack does, so the usual connectivity method for a VM is TAP -> (traditional) Linux bridge -> veth pair -> OVS. When used as just a pipe between bridges, the veth pair does not need any IP addresses as it's purely a L2 forwarder. This is all explained really well in the OpenStack doco, docs.openstack.org/admin-guide-cloud/content/under_the_hood_openvswitch.html. Perhaps a mockup of this will be the subject of Mr Mahler's next video?
@NoSuchCommand
@NoSuchCommand 9 жыл бұрын
Barry the Cougar Thank you for your answer. Yes I knew all this filtering thing requiring Linux Bridges. But my question was more about this specific example in the video. Moreover, what I did not notice when I wrote my first comment is that, here, the tap~ interfaces are in fact just OVS internal ports that happen to be named tap~. So they are not proper kernel interface of type tap. And that seems to be the same method used by OpenStack Neutron according to the OpenStack Cloud Administrator Guide you mentioned. However, this document is a bit old - in fact, this part of the Cloud Admin Guide is not referenced anymore in the ToC; you can only access it through a search engine, although it is still a good and mostly accurate documentation - and I do not have the setup at hand to check it up on the latest Neutron version. In addition, Neutron's OVS mechanism, be it used standalone or through ML2, does not use veth pair to interconnect namespaces. It only uses them to interconnect the VMs' Linux Bridges to the integration virtual switch, which both are in the same namespace on the compute hosts. I can assume that the reason is you cannot make an OVS internal port also a port of a Linux Bridge. Namespaces in Neutron are only used by the L3 Agent (so only on the Network host if you do not use DVR) and each one of them is only populated by OVS internal ports My point, at first, was : in this video, there is no Linux Bridge. Couldn't we have done all this with ONLY either veth pairs or tap devices or OVS internal ports ?
@DavidMahler
@DavidMahler 9 жыл бұрын
NoSuchCommand The video probably would have been better served if I named those ports at the end OVSI-R and OVSI-G instead of TAP-R and TAP-G. Linux Kernel "tuntap" interfaces can't cross namespaces AFAIK. Also the mixing of VETH and OVS-INTERNAL ports in the 1 video was just because I smushed together 2 different scenarios into one - a bit artificial but just for lab/demo/exploring of namespaces. At some point I hope to do a OpenStack Neutron video but as you note as well it's a moving target with DVR etc. and I myself have much to research and learn still before I'm ready to do one. I'm also split on focusing on network automation as well at the moment so not sure when each will happen. Thanks for your comments!
@DavidMahler
@DavidMahler 9 жыл бұрын
Barry the Cougar Thanks for your additional information about iptables/Linux Bridging. Some point I hope to get to it more yes ;-).
@SarfarazAhmad89
@SarfarazAhmad89 8 жыл бұрын
could you please tie in the vxlan aspect with this namespaces ?
@DavidMahler
@DavidMahler 8 жыл бұрын
+Sarfaraz Ahmad Well they are both tools to provide isolation on physically shared infrastructure. So with VXLAN - on shared network links the VXLAN header/VNI provide isolation of tenants private traffic. Network namespaces provide isolated networking environments on shared physical hosts. So I'd say the tie is "isolation on shared resources" which is critical for cloud enablement.
@SarfarazAhmad89
@SarfarazAhmad89 8 жыл бұрын
+David Mahler yep i got that part. just a thought would it make sense to make a video demonstrating this multi vendors dnsmasq dhcp servers providing IPs over vxlan to vms running on another physical host? or maybe i need to revisit your vxlan demo using ovs video. P.S. Thanks a ton !! these are amazing ! Hope you keep up the excellent work !
@DavidMahler
@DavidMahler 8 жыл бұрын
Sarfaraz Ahmad Actually I'm planning an OpenStack video which will trace through packets and show vxlan and namespaces. Doing a basics one first then a deeper dive which will show that...stay tuned!
@SarfarazAhmad89
@SarfarazAhmad89 8 жыл бұрын
+David Mahler awesome .exactly what i had in mind ! looking forward to it .
@himanshusoni6021
@himanshusoni6021 7 жыл бұрын
on running this command: ovs-vsctl add-port ovs1 tap-r i get the following error: ovs-vsctl: Error detected while setting up 'tap-r'. See ovs-vswitchd log for details. Also somehow its still creating tap-r in the namespace but while running command: ip link set tap-r netns dhcp-g it shows following error: RTNETLINK answers: Invalid argument - i still see tap-r and tap-g in my root namespace WHY???? Please Help!
@DavidMahler
@DavidMahler 7 жыл бұрын
Yes Jorge Humberto Gomez Velasquez below mentioned the same, I'll look into it when I can, its related to a newer version of OVS.
@sangshinlee5849
@sangshinlee5849 7 жыл бұрын
I have problems. I can solve it by replacing dhcp-r to dhcp_r and tap-r to tap_r. I think it's a special character problem.
Introduction to Open vSwitch (OVS)
14:36
David Mahler
Рет қаралды 375 М.
Network Namespaces Basics Explained in 15 Minutes
15:32
KodeKloud
Рет қаралды 105 М.
Кәріс өшін алды...| Synyptas 3 | 10 серия
24:51
kak budto
Рет қаралды 1,3 МЛН
Неприятная Встреча На Мосту - Полярная звезда #shorts
00:59
Полярная звезда - Kuzey Yıldızı
Рет қаралды 1,8 МЛН
Китайка и Пчелка 10 серия😂😆
00:19
KITAYKA
Рет қаралды 2,1 МЛН
Linux File System/Structure Explained!
15:59
DorianDotSlash
Рет қаралды 4 МЛН
What's in a Name? - Linux Namespaces
21:13
DJ Ware
Рет қаралды 17 М.
Introduction to Cloud Overlay Networks - VXLAN
15:14
David Mahler
Рет қаралды 164 М.
Linux Network Namespaces with ip netns
9:18
theurbanpenguin
Рет қаралды 7 М.
Linux - Network Configuration (ip, route, dhclient, systemd-resolve, netplan)
23:35
Introduction to OpenStack Neutron
19:39
David Mahler
Рет қаралды 190 М.
Container Networking From Scratch - Kristen Jacobs, Oracle
34:44
CNCF [Cloud Native Computing Foundation]
Рет қаралды 59 М.
VM Networking ( Libvirt / Bridge )
43:39
octetz
Рет қаралды 73 М.
Кәріс өшін алды...| Synyptas 3 | 10 серия
24:51
kak budto
Рет қаралды 1,3 МЛН