Understanding Kubernetes Networking. Part 1: Container Networking

  Переглядів 73,419

The Learning Channel

The Learning Channel

3 роки тому

Kubernetes is all about networking. In this series, we will examine various aspects of Kubernetes networking such as cluster and POD networks, Container Network Interface (CNI), services, and network policies. To get started though we need to have a basic understanding of the OSI network model, network appliances (physical and virtual), overlay networks, and container networking fundamentals. In this first installment, we will cover those basics. Hope you will me join in this journey.
Complete playlist for these series: • Kubernetes Networking ...
Keywords: Container network, Container networking, basic networking concepts, OSI model
Thanks!
My Other Videos:
► Cilium Kubernetes CNI Provider, Part 1: Overview of eBPF and Cilium and the Installation Process • Cilium Kubernetes CNI ...
►Cilium Kubernetes CNI Provider, Part 2: Security Policies and Observability Leveraging Hubble
• Cilium Kubernetes CNI ...
► Cilium Kubernetes CNI Provider, Part 3: Cluster Mesh
• Cilium Kubernetes CNI ...
► What is VXLAN and How It is Used as an Overlay Network in Kubernetes?
• What is VXLAN and How ...
► Managing Linux Log-ins, Users, and Machines in Active Directory (AD): Part 2- Join Linux Machines to AD:
• Managing Linux Logins,...
► Managing Linux Log-ins, Users, and Machines in Active Directory (AD): Part 1- Setup AD:
• Managing Linux Logins,...
► Sharing Resources between Windows and Linux:
• Sharing Resources betw...
► Kubernetes kube-proxy Modes: iptables and ipvs, Deep Dive:
• Kubernetes kube-proxy ...
►Kubernetes: Configuration as Data: Environment Variables, ConfigMaps, and Secrets:
• Kubernetes: Configurat...
►Configuring and Managing Storage in Kubernetes:
• Configuring and Managi...
► Istio Service Mesh - Securing Kubernetes Workloads:
• Istio Service Mesh - S...
► Istio Service Mesh - Intro
• Istio Service Mesh (si...
► Understanding Kubernetes Networking. Part 2: POD Network, CNI, and Flannel CNI: Plug-in: • Understanding Kubernet...
► Understanding Kubernetes Networking Part 3: Calico Kubernetes CNI Provider in-depth:
• Understanding Kubernet...
► Understanding Kubernetes Networking. Part 4: Kubernetes Services:
• Kubernetes services - ...
► Understanding Kubernetes Networking. Part 5: Intro to Kubernetes Network Policies:
• Understanding Kubernet...
► Understanding Kubernetes Networking. Part 6: Calico Network Policies:
• Understanding Kubernet...
► A Docker and Kubernetes tutorial for beginners:
• A Docker and Kubernete...
► Setup a "Docker-less" Multi-node Kubernetes Cluster On Ubuntu Server:
• Setup a "Docker-less" ...
►Step by Step Instructions on Setting up Multi-Node Kubernetes Cluster on CentOS: • Step by Step Instructi...
►Setup and Configure CentOS Linux Server on A Windows 10 Hypervisor - UKposts: • Setup and Configure Ce...
►Setup NAT (Network Address Translation) on Hyper-V: • Setup NAT (Network Add...
► Enable Nested Virtualization on Windows to run WSL 2 (Linux) and Hyper-V on a VM: • Enable Nested Virtuali...
►Setup a Multi-Node MicroK8S Cluster on Windows 10: • Setup a Multi Node Mic...
► Detailed Windows Terminal, (WSL 2), Linux, Docker, and Kubernetes Install Guide on Windows 10:
• Detailed Windows Termi...

КОМЕНТАРІ: 201
@TheLearningChannel-Tech
@TheLearningChannel-Tech Рік тому
The source code for demos are here: github.com/gary-RR/myUKposts_video_container_networking
@Rma998
@Rma998 Рік тому
this guys is distinguish level engineer and create free content, god bless you and your family
@horusheard3203
@horusheard3203 Рік тому
This series is criminally underrated.Good work here boss.
@chandanpatra4709
@chandanpatra4709 2 роки тому
With this introductory video, you have comforted a lot of DevOps engineers. This is amazing. Thank you!
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Thank you and glad you found it helpful!
@balanvenkatachalam9451
@balanvenkatachalam9451 Рік тому
This video is an incredible asset for learning microservices networking!!! Thank you!
@ravipillai7662
@ravipillai7662 Рік тому
This series is just brilliant!
@techpetla3901
@techpetla3901 Рік тому
Highly underrated channel. Awesome explanation.
@_aayushrastogi
@_aayushrastogi 2 роки тому
I searched the whole internet to found this type of basis to pro series thank you man...
@silviunikita
@silviunikita 7 місяців тому
Excellent lesson with a relevant example scenario. Thank you very much.
@arunreddy1436
@arunreddy1436 2 місяці тому
Thank God, finally found an interesting stuff to understand networking internals , thank you so much Sir for investing your time on this...
@alexanderkrutko644
@alexanderkrutko644 Рік тому
Perfect learning! It was useful as usual. Thank you so much!
@mitchynz
@mitchynz 2 роки тому
An excellent deep dive. Better than anything on Udemy or UKposts.
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Thanks very much Mitch, much appreciated!
@maverickkoti82
@maverickkoti82 2 роки тому
Amazing Explanation of the networking concepts. Great Job. Thank you !
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Glad it was helpful!
@pruthvireddy6703
@pruthvireddy6703 Рік тому
One of the best explanations, thanks a lot :)
@mhamd2020
@mhamd2020 3 місяці тому
This tutorial is so fantastic. I've spent weeks reading netowrking books but could not implement any of their examples. This video put it all in a cleaver and comprehensive example. Million thanks for the amazing very clear step by step explanations. I watched and implement it step by step. Will continue the other parts.
@IsanHawke
@IsanHawke 2 роки тому
This is the most informative you-tube instructional video ever! Thank you!!
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Thank you very much, glad it was helpful!
@techdoteverything
@techdoteverything 2 роки тому
This is an extremely informative and in-depth coverage of different elements in networking. Kudos to you.
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
@Chetan Mishra, many thanks for your kind words! Glad you found it useful. Thanks again.
@insurance5225
@insurance5225 6 місяців тому
thanks for the detailed and clear explanation of networking
@gpltaylor
@gpltaylor 2 місяці тому
Simply the BEST video on the internet for understanding Docker Networking! Thank you, this must have taken a very long time to setup.
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 місяці тому
You're very welcome!
@laobaixing244
@laobaixing244 2 роки тому
Thanks a lot for so great teaching video! Networking has been fuzzy for developers and you make it clear and easy!!!
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
You are very welcome and thank for your kind feedback!
@atmajakota7348
@atmajakota7348 Місяць тому
Best thing found on internet.... Kudos to the efforts 😃
@srinisarva9003
@srinisarva9003 Рік тому
Superb ! one of the best videos i have comes across networking on youtube , Thanks a Lot
@santosharakere
@santosharakere 11 місяців тому
Amazing video/ explanation Sir. Looking forward to go see all videos.
@ld5345
@ld5345 2 місяці тому
fantastic, thanks for your sharing.
@aboubacaralaindioubate6086
@aboubacaralaindioubate6086 2 роки тому
Very Great Job, thank's. Pedagogic, methodic and clear explanation. Thank you once again.
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
@Aboubacar Alain DIOUBATE , many thanks for your kind words, and glad you found it helpful! Thank you again.
@ravikiranvemulapalli514
@ravikiranvemulapalli514 2 роки тому
Thanks for sharing, very nice
@divyanshusaxena148
@divyanshusaxena148 2 роки тому
great work and videos brother. i have watched kubeproxy iptables and ipvs earlier, and now i will go through every video you have uploaded. Such in depth information i was looking for and you have it all. I will become a K8S pro soon. Keep creating such content.
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Thanks very much! Please subscribe to be notified of future videos and spread the word!
@techwithmohitkr
@techwithmohitkr 2 роки тому
Excellent series. I would recommend everyone to watch this. I have recommended my followers for your series as well.
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Hi Mohit, thank you very much.
@maxsterling9908
@maxsterling9908 3 місяці тому
Thank you very much. This was so informative and I learned a lot.
@user-fg6ng7ej6w
@user-fg6ng7ej6w Рік тому
great detailed videos, thanks a lot
@pr3915
@pr3915 Рік тому
Excellent explanation!!
@rajnikant8622
@rajnikant8622 2 роки тому
Great video, Thanks for such an elaborated video.
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Glad you enjoyed it!
@Passport2Passion
@Passport2Passion 3 роки тому
Great video. Excellent explanation. Thank you
@TheLearningChannel-Tech
@TheLearningChannel-Tech 3 роки тому
Glad it was helpful!
@elabeddhahbi3301
@elabeddhahbi3301 Рік тому
thank you for you effort
@ramprasad_v
@ramprasad_v Рік тому
Excellent explanation
@benmoody9334
@benmoody9334 Місяць тому
Great content, very helpful and gave me a good bit of clarity on some things.. some bits have still gone over my head but still great stuff.
@TheLearningChannel-Tech
@TheLearningChannel-Tech Місяць тому
Glad it was helpful!
@453nabeel
@453nabeel 3 роки тому
Dude you have done an amazing job. I was looking for this for long time. Thank you
@TheLearningChannel-Tech
@TheLearningChannel-Tech 3 роки тому
@NABEEL NASIR , many thanks for the kind words and glad you found it helpful! Please consider subscribing as I am working on new materials related to Kubernetes control plane and services that you may also find useful. Thanks again!
@453nabeel
@453nabeel 3 роки тому
@@TheLearningChannel-Tech I have subscribed to your channel. I will share your channel with all my friends. Will you be making series on kubernetes for beginners from scratch?
@TheLearningChannel-Tech
@TheLearningChannel-Tech 3 роки тому
@@453nabeel Thank you! I'll put Kubernetes for beginners on my list of future videos. Thank you for your suggestions. Cheers!
@453nabeel
@453nabeel 3 роки тому
@@TheLearningChannel-Tech if you don't mind can you please tell when will you upload kubernetes series. Thanks
@TheLearningChannel-Tech
@TheLearningChannel-Tech 3 роки тому
@@453nabeel I'm currently in the middle of another video so I'd say it will be a month out.
@user-yj7db8be6x
@user-yj7db8be6x 10 місяців тому
concise and clear contents even for non English speaker!
@TheLearningChannel-Tech
@TheLearningChannel-Tech 10 місяців тому
Glad to hear it, thank you!
@tusharsharma1307
@tusharsharma1307 Рік тому
Fantastic content.
@sunils5834
@sunils5834 Рік тому
really helpful. Thank you for making such a wonderful video.
@TheLearningChannel-Tech
@TheLearningChannel-Tech Рік тому
You're very welcome!
@sSP1878
@sSP1878 Рік тому
Awesome sesion
@juansanchezmadueno3573
@juansanchezmadueno3573 3 роки тому
Great video! Thank you!
@TheLearningChannel-Tech
@TheLearningChannel-Tech 3 роки тому
Glad you liked it!
@apusingh1967
@apusingh1967 Рік тому
top class thanks much
@fd9141
@fd9141 2 роки тому
This is great. Very educational.
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Thank you!
@rodrigomarques
@rodrigomarques 2 роки тому
Great Job. Thanks.
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Thank you!
@pengdu7751
@pengdu7751 3 роки тому
great work!
@TheLearningChannel-Tech
@TheLearningChannel-Tech 3 роки тому
Thank you! Cheers!
@sathchithanand
@sathchithanand Рік тому
Awesome
@jagadishg5331
@jagadishg5331 Рік тому
Thanks!
@chanpreetsingh007
@chanpreetsingh007 2 роки тому
Great work.
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Thank you! Cheers!
@TheRohitprakhar
@TheRohitprakhar Рік тому
Amazing. I am a subscriber now.
@TheLearningChannel-Tech
@TheLearningChannel-Tech Рік тому
Thanks, and welcome aboard!
@dohai2105
@dohai2105 2 роки тому
thanks you verry much for a great video
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Thank you and glad you liked it!
@sandeeprazdan1976
@sandeeprazdan1976 3 роки тому
Very very good explanation
@TheLearningChannel-Tech
@TheLearningChannel-Tech 3 роки тому
Many thanks for kind words!
@rougearlequin
@rougearlequin 3 роки тому
The illustration at minute 20:00 makes the virtual concepts very easy to assimilate
@pengdu7751
@pengdu7751 3 роки тому
indeed
@DaljeetSingh1
@DaljeetSingh1 2 роки тому
very nice explanation
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Thank you!
@montesdeocaaldo8604
@montesdeocaaldo8604 2 роки тому
Good 👍
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Thanks
@KrishnaKumar-ks3mj
@KrishnaKumar-ks3mj Рік тому
This is an excellent video and the series will clear all the doubts the begineers have, could you please pass the link of the commands you executred in the demo mate, Thanks in advance !
@TheLearningChannel-Tech
@TheLearningChannel-Tech Рік тому
Hi, you can get them here: github.com/gary-RR/myUKposts_video_container_networking
@davidlira8853
@davidlira8853 2 роки тому
That diagram at like 20 minutes was really good
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Thank you David, glad you liked it!. Thanks again for watching.
@avioyon
@avioyon 2 роки тому
Great job!! Thanks a ton. This video expose all underlying communication between vm to vm as well as container to container. By the way would you please share the script which is used for readiness of your lab environment?
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Thank you for your feedback! You can find the scripts here: github.com/gary-RR/myUKposts_video_container_networking. You'll need two Linux VMs to run these. I used Ubuntu, please read the "README.md" file for more info. Thanks again for watching an your kind words.
@avioyon
@avioyon 2 роки тому
Thanks for your kind information
@vipinchawria
@vipinchawria 2 роки тому
Very good explanation. Thank you so much for putting in the effort to prepare this video. I have a dumb question. In VM1 setup, you never really connected bridge to eth0 of VM1. Is connectivity from bridge to eth0 is due to ip forwarding being enabled here or something else?
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
@vipinchawria , thanks for your kind words! When a bridge is created, it is automatically connected to the default Ethernet adaptor (eth0 in this case), you won't need to run any script. Hope this helps. Thanks again.
@vipinchawria
@vipinchawria 2 роки тому
@@TheLearningChannel-Tech Thank you
@EinsteinNewtonify
@EinsteinNewtonify 3 роки тому
Nice dude
@TheLearningChannel-Tech
@TheLearningChannel-Tech 3 роки тому
Glad you like it
@geetikabatra
@geetikabatra 21 день тому
Hey! Great video. A quick question about the daigram at 20:40, is NAT part of the router if we everything is a physical device?
@TheLearningChannel-Tech
@TheLearningChannel-Tech 20 днів тому
Hi, yes, the NAT translation is done within the physical router. I just showed it outside the router for clarity.
@geetikabatra
@geetikabatra 18 днів тому
@@TheLearningChannel-Tech Thanks a lot for clarification.
@richardrichard8349
@richardrichard8349 2 роки тому
Well explained view of how networking components are put together. One question where can the scripts be found to try this out for myself and experiment with? Thanks
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Hey Richard, thanks, you can get the scripts here: github.com/gary-RR/myUKposts_video_container_networking.
@rsraszka
@rsraszka 2 роки тому
@@TheLearningChannel-Tech Many Thanks!
@manojkumarmanojkumar
@manojkumarmanojkumar 2 роки тому
Thanks
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Welcome
@vjgaur3739
@vjgaur3739 2 роки тому
Nice 🙏 .I have one query if this is Usecases of cloud k8s or it beyond what cloud platform is using?
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
@vj gaur, hello and thanks for your feedback. I'm guessing you are asking about the container use cases? If so, no they are not tied to the cloud Kubernetes or even Docker for that matter. Namespaces and containers are Linux kernel constructs. Docker and by extension Kubernetes provide environments to host and manage containers. Kubernetes can be hosted internally or on a public cloud, however, for this course you won't need any cloud or Docker/Kubernetes access. The examples can be run on Linux VM(s). Hope this helps.
@jeyagopalchinnadurai6158
@jeyagopalchinnadurai6158 Рік тому
Thanks for the excellant content. The IP address for Ubuntu VM2's eth0 should be 192.168.0.11 in the diagram.
@TheLearningChannel-Tech
@TheLearningChannel-Tech Рік тому
Thanks, yes that was a typo.
@tomknud
@tomknud 9 місяців тому
@21:00 you launch into the namespace ethernet isolation with a list of crucial elements. You magically utilize a virtual kernel bridge without having introduced it or explaining it.
@TheLearningChannel-Tech
@TheLearningChannel-Tech 9 місяців тому
Hi, the virtual switch is the gateway through which the containers which are on a different subnet than the host can communicate to the host and the outside world. That concept was discussed in earlier video in case you may be interested to watch: ukposts.info/have/v-deo/iImSoamQiImep40.html
@nagendersingh35
@nagendersingh35 Рік тому
Great video!! Liked and subscribed. I have one question, for the container communication when the nodes are in different networks, what is the role of router and UDP tunnel? Shouldn't the router alone be capable to handle the cross-network communication? Thanks in advance! 🙏
@TheLearningChannel-Tech
@TheLearningChannel-Tech Рік тому
Tunnels are used when two networks are in different subnets and don't have a direct line of communication. A good example is Kubernetes pods that are created on different nodes. The pods that are on the same node are on the same subnet and can freely communicate with each other, not so with pods on different nodes. In those situations, tunneling is one method of providing an L2 network bridges between pod networks, leveraging an underlaying L3 network.
@nagendersingh35
@nagendersingh35 Рік тому
@@TheLearningChannel-Tech Thank you for the response. Providing connectivity between different networks is job of router, right? So using the router only these servers can reach to each other, so what is the need of tunnel? Thanks again!
@TheLearningChannel-Tech
@TheLearningChannel-Tech Рік тому
@@nagendersingh35 Yes, but you'll need to manually define routes for destinations. This is not an issue when there are a limited number of networks but in the case of containers (think Kubernetes), there may be thousands of nodes that host containers, manually creating these routes on routers are impractical. Thus, tunnels are set up, and the router knows how to deliver the message to the destination node. Once the message is delivered, a UDP tunnel is established between the two pod networks where pods can communicate.
@nagendersingh35
@nagendersingh35 Рік тому
@@TheLearningChannel-Tech Totally makes sense now. Thank you so much! 🙌
@triparnakar5836
@triparnakar5836 4 місяці тому
@TheLearningChannel-Tech -- Question: At 24:40, Why is the eth0 IP 192.168.0.10, shouldn't it be 192.168.0.11, as per the Ubuntu VM2 IP mentioned in the slide before this?
@TheLearningChannel-Tech
@TheLearningChannel-Tech 4 місяці тому
Hi, yes, that is a typo.
@shinemet
@shinemet 2 роки тому
Hi, great video, learned a ton from it! one question, why do we need a udp tunnel when the vm's ip's are on a different subnet? why a router isn't enough? thanks!
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Hi, great question, remember that containers (think Kubernetes PODs) are created at scale and although the container hosts are connected on L3 networks, adjusting routes manually to guide packets from one container on one host to containers on other hosts is not practical. L4 tunnels are an important tool to automate container connectivity in those scenarios. This technique is used in VXLAN.
@shinemet
@shinemet 2 роки тому
@@TheLearningChannel-Tech Thanks for the answer! so basically, if there are more than 2 nodes, there will be a "mesh" of tunnels between all nodes bridges?
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
@@shinemet Hi Ben, in practice such as VXLAN tunnels, these tunnels are temporarily established and torn down once the POD to POD connection and request/response have been completed. So they are not permanent to participate in any mesh.
@shinemet
@shinemet 2 роки тому
@@TheLearningChannel-Tech Thanks :), one last question I have. I saw your video about Flannel, basically when you are saying that L4 tunnels are automating containers connectivity, this connectivity is between containers on different nodes, right? and I saw a virtual interface called "flannel" this creature is responsible for this l4 tunneling automation?
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
@@shinemet Hi Ben, Correct, only the POD communication that crosses VMs will go through the UPD tunnel. The technology that Flannel uses is called VXLAN. On each node, an adaptor called VXLAN Tunnel Endpoint (VTEP for short) is installed, the "flannel" adaptor you referred to. When a POD calls another POD, the traffic is intercepted by the VTEP and additional ethernet and VXLAN header is added to send the traffic to other side. The VTEP on the destination VM intercepts the packet and routes it to the destination POD. If you want to know more about how VXLAN works, you can watch my VXLAN video: ukposts.info/have/v-deo/j319h3ppsGh6yGg.html . Hope this helps!
@yasirkaram
@yasirkaram 5 місяців тому
@TheLearningChannel-Tech, I have quick question, is it possible to host a routing OS like OpenWRT or other inside VM or container to provide networking and traffic routing to other containers and/or VM's running on same hardware, knowing that the hardware is intel x86 based mini PC router with 6 LAN ports and 2 WLAN interfaces, reason is that I want to get utmost of this hardware to run app's as well as acting as router, if this is doable, which is best network fabric here? is a bridge or macvlan is better?
@TheLearningChannel-Tech
@TheLearningChannel-Tech 5 місяців тому
I haven't really used OpenWRT but I believe it is meant for embedded devices. For containers you really don't need that. Containers are usually hosted on Kubernetes and CNI provides such as Calico and Cilium provide all the necessary plumbing for containers to talk to each other regardless of location (same node or other nodes). Check out my other videos on Kubernetes. This video is just an intro to container networking to learn some basic ideas. In practice the CNI providers take care of all the details.
@yasirkaram
@yasirkaram 5 місяців тому
@@TheLearningChannel-Tech I guess you're right, the need for routing at layer 1 & 2 can be done without additional software, using k8 CNI at NIC level, but maybe Macvlan is needed to capture traffic from all NIC's, not sure if am right
@kernael711
@kernael711 Рік тому
HI. thank you so much for this lecture, may i ask please ask for the linux commands you used for this lecture? I would like to save it for a reference. thanks again!
@TheLearningChannel-Tech
@TheLearningChannel-Tech Рік тому
Hi, you can find scripts here: github.com/gary-RR/myUKposts_video_container_networking
@kernael711
@kernael711 Рік тому
Thank you, this is the most helpful content ive seen and it made me understand container networking better. ill be sharing this with my coworkers. thanks again!
@TheLearningChannel-Tech
@TheLearningChannel-Tech Рік тому
@@kernael711 Thank you and glad it was helpful!
@santosh4a3
@santosh4a3 2 роки тому
Hello, Is there Any reason why we're assigning IP addresses only to 1 end of the veth cables that connects into the namespace (veth11,21) and not to the other end that is connecting to the bridge network (veth10,20)? I was of the opinion that both the ends need to be assigned with the IP addresses. Thanks
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Hi, there is no point in assigning an IP to the host side of veth. Its job is simply to connect the POD's ethernet interface to host, that's all.
@santosh4a3
@santosh4a3 2 роки тому
@@TheLearningChannel-Tech perfect. Thank you so much.
@sakshatbagadi5206
@sakshatbagadi5206 Рік тому
I tried this setup on Aws with two linux vms inside same subnet. I m not able to ping from between network namespaces on different hosts.
@TheLearningChannel-Tech
@TheLearningChannel-Tech Рік тому
I haven't tried it on AWS per se but try the following(change IPs to reflect your scenario): To establish the udp tunnel (make sure to run these as root (sudo -i)): 1- On "ubuntu1" run: socat UDP:192.168.0.11:9000,bind=192.168.0.10:9000 TUN:172.16.0.100/16,tun-name=tundudp,iff-no-pi,tun-type=tun & #***Note that I removed "iff-up" switch from command on "ubuntu1" because I was getting an error. 2- On "ubuntu2" run: socat UDP:192.168.0.10:9000,bind=192.168.0.11:9000 TUN:172.16.1.100/16,tun-name=tundudp,iff-no-pi,tun-type=tun,iff-up & 3- Return to "ubuntu1" and run ip link set dev tundudp up
@gaurvendrasingh4573
@gaurvendrasingh4573 Рік тому
Sir, i am very new to all these concepts , but your videos are very easy to understand. I have a question (It may be a stupid question) , bridge is layer 2 device , and layer 2 devices use MAC addresses, so why we assign an IP address to it ?
@TheLearningChannel-Tech
@TheLearningChannel-Tech Рік тому
Hi, IP is still needed for a variety of reasons such as routing out or in calls to/in from other networks. Also, layer 2 doesn't have a concept of lookup like DNS in layer 3. When a device wants to send a message to another device, it will have to send out an ARP request to find the other device's MAC address.
@gaurvendrasingh4573
@gaurvendrasingh4573 Рік тому
@@TheLearningChannel-Tech Thank you sir
@joericcie1451
@joericcie1451 2 роки тому
Hi man! Can you tell me what the problem is when I run socat command the test ip route command shows 172.16.1.2 via _my_home_gateway dev eth0 src 192.168.1.10 instead tundudp. I've noticed that the route to bridge subnet in the second part of your video is omitted. And also in my lab tundudp on both sides in down state. Should I insert missed routes on my home router? And clarify the exact IP addresses in your last part of video - 192.168.1.11 and 192.168.0.10? Because in first part IP addressess must be in one network.
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
@Johnny Russian, Hi Johny, After successfully establishing the UDP tunnel, the ip route should show something similar to this: ip route default via 192.168.0.1 dev eth0 proto static metric 100 169.254.0.0/16 dev eth0 scope link metric 1000 172.16.0.0/16 dev tundudp proto kernel scope link src 172.16.1.100 172.16.1.0/24 dev br0 proto kernel scope link src 172.16.1.1 192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.11 metric 100 Also: ip link show type tun 8: tundudp: mtu 1500 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 500 link/none Here are my IP addresses and subnet mask on two ubuntu machines: ubuntu1: 192.168.0.10 (mask 255.255.255.0) ubuntu2: 192.168.0.11 (mask 255.255.255.0) Make sure both machines can ping each other and there are no network issues. To establish the udp tunnel (make sure to run these as root (sudo -i)): 1- On "ubuntu1" run: socat UDP:192.168.0.11:9000,bind=192.168.0.10:9000 TUN:172.16.0.100/16,tun-name=tundudp,iff-no-pi,tun-type=tun & #***Note that I removed "iff-up" switch from command on "ubuntu1" because I was getting an error. 2- On "ubuntu2" run: socat UDP:192.168.0.10:9000,bind=192.168.0.11:9000 TUN:172.16.1.100/16,tun-name=tundudp,iff-no-pi,tun-type=tun,iff-up & 3- Return to "ubuntu1" and run ip link set dev tundudp up There is an unfortunate typo on the slide, IPs should read 192.168.0.10 and 192.168.0.11. UKposts does not allow modifying the video once uploaded. Hope this helps!
@joericcie1451
@joericcie1451 2 роки тому
@@TheLearningChannel-Tech Thanks man! It helped a lot. You're doing a great job.
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Glad you it helped.
@GK-rl5du
@GK-rl5du Рік тому
Hi. thanks for all your efforts in making complicated topics easily digestable for beginners like me. Is there a way I can get the links to the commands that you've used in this video? I want to experiment them myself. EDIT: got the Github link from another recent reply. It would really help others, if you could please add it the video description, or you can add a comment and pin it.
@TheLearningChannel-Tech
@TheLearningChannel-Tech Рік тому
Noted.
@jayashankaradm1942
@jayashankaradm1942 2 роки тому
Thanks for the great video, I tried running same test on my local server (two Ubuntu VMs created). But I was unable to ping from one namespaces to another namespace on same VM (This issue even on another VM also). Can you please let me know what I am missing here.
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Hi, Since I can't see your code, I'll provide the code that I used for the video below, go through it for your trouble shooting, good luck! #!bash NS1="NS1" NS2="NS2" NODE_IP="192.168.0.10" BRIDGE_SUBNET="172.16.0.0/24" BRIDGE_IP="172.16.0.1" IP1="172.16.0.2" IP2="172.16.0.3" TO_NODE_IP="192.168.0.11" TO_BRIDGE_SUBNET="172.16.1.0/24" TO_BRIDGE_IP="172.16.1.1" TO_IP1="172.16.1.2" TO_IP2="172.16.1.3" echo "Creating the namespaces" sudo ip netns add $NS1 sudo ip netns add $NS2 ip netns show echo "Creating the veth pairs" sudo ip link add veth10 type veth peer name veth11 sudo ip link add veth20 type veth peer name veth21 ip link show type veth #ip link show veth11 #ip link show veth20 echo "Adding the veth pairs to the namespaces" sudo ip link set veth11 netns $NS1 sudo ip link set veth21 netns $NS2 echo "Configuring the interfaces in the network namespaces with IP address" sudo ip netns exec $NS1 ip addr add $IP1/24 dev veth11 sudo ip netns exec $NS2 ip addr add $IP2/24 dev veth21 echo "Enabling the interfaces inside the network namespaces" sudo ip netns exec $NS1 ip link set dev veth11 up sudo ip netns exec $NS2 ip link set dev veth21 up echo "Creating the bridge" sudo ip link add br0 type bridge ip link show type bridge ip link show br0 #sudo ip link delete br0 echo "Adding the network namespaces interfaces to the bridge" sudo ip link set dev veth10 master br0 sudo ip link set dev veth20 master br0 echo "Assigning the IP address to the bridge" sudo ip addr add $BRIDGE_IP/24 dev br0 echo "Enabling the bridge" sudo ip link set dev br0 up echo "Enabling the interfaces connected to the bridge" sudo ip link set dev veth10 up sudo ip link set dev veth20 up echo "Setting the loopback interfaces in the network namespaces" sudo ip netns exec $NS1 ip link set lo up sudo ip netns exec $NS2 ip link set lo up sudo ip netns exec $NS1 ip a sudo ip netns exec $NS2 ip a echo "Setting the default route in the network namespaces" sudo ip netns exec $NS1 ip route add default via $BRIDGE_IP dev veth11 sudo ip netns exec $NS2 ip route add default via $BRIDGE_IP dev veth21
@jayashankaradm1942
@jayashankaradm1942 2 роки тому
@@TheLearningChannel-Tech Thanks for your quick response. I was able to make progress now after disabling docker on my server. But I am still not clear how docker caused this issue . Any IP filtering is done at L2 bridge here ?
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
@@jayashankaradm1942 Docker also uses a bridged network so it is possible that perhaps there was an IP conflict.
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Did you get this squared away and the ping working?
@jayashankaradm1942
@jayashankaradm1942 2 роки тому
@@TheLearningChannel-Tech Yes, It worked when docker is down. Btw In the demo there two Ubuntu VMs (VM1 and VM2) are these VMs are on same host machine or is it two different physical servers.
@oceanmih2646
@oceanmih2646 23 дні тому
I just downloaded the shell script from your github repository, and tried it, but the ping only works for the namespace in the same node, failed to namespace of the other node I am confused a lot. I really appreciate if you can help.
@TheLearningChannel-Tech
@TheLearningChannel-Tech 22 дні тому
Make sure you follow the instructions below and change the IP addresses to match your environment: # ------------------- Overlay setup --------------------- # To establish the udp tunnel (make sure to run these as root (sudo -i)): 1- On "ubuntu1" run: socat UDP:192.168.0.11:9000,bind=192.168.0.10:9000 TUN:172.16.0.100/16,tun-name=tundudp,iff-no-pi,tun-type=tun & #***Note that I removed "iff-up" switch from command on "ubuntu1" because I was getting an error. 2- On "ubuntu2" run: socat UDP:192.168.0.10:9000,bind=192.168.0.11:9000 TUN:172.16.1.100/16,tun-name=tundudp,iff-no-pi,tun-type=tun,iff-up & 3- Return to "ubuntu1" and run ip link set dev tundudp up #echo "Disables reverse path filtering" #sudo bash -c 'echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter' #sudo bash -c 'echo 0 > /proc/sys/net/ipv4/conf/eth0/rp_filter' #sudo bash -c 'echo 0 > /proc/sys/net/ipv4/conf/br0/rp_filter' #sudo bash -c 'echo 0 > /proc/sys/net/ipv4/conf/tundudp/rp_filter
@oceanmih2646
@oceanmih2646 13 днів тому
@@TheLearningChannel-Tech The ubuntu1 and ubuntu2 are on the same subnet, is it necessary to set up the UDP tunnel?
@raheelmasood8656
@raheelmasood8656 11 місяців тому
I am able to ping bridge from both NS1 AND NS2 but they are not able to communicate with each other.
@TheLearningChannel-Tech
@TheLearningChannel-Tech 11 місяців тому
The scripts are here: github.com/gary-RR/myUKposts_video_container_networking If after following the scripts still doesn't work then there might be something local on your machines that prevents. This. Good luck.
@user-ed4tm1gi9v
@user-ed4tm1gi9v 2 роки тому
hi, I created two ec2 in aws and they are in same subnet. On vm1 ping vm2's br0 not working
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Hi, In order for the one container on one machine to be able to communicate to another container on the other VM, you must set up a UDP tunnel as described below: First, I assume "eth0" on each VM is the interface that has with the one that an IP address is associated with it, you can run the following command to verify: ip addr Here are my IP addresses and subnet mask on two ubuntu machines: ubuntu1: 192.168.0.10 (mask 255.255.255.0) ubuntu2: 192.168.0.11 (mask 255.255.255.0) Make sure both machines can ping each other and there are no network issues. To establish the udp tunnel (make sure to run these as root (sudo -i)): 1- On "ubuntu1" run: socat UDP:192.168.0.11:9000,bind=192.168.0.10:9000 TUN:172.16.0.100/16,tun-name=tundudp,iff-no-pi,tun-type=tun & #***Note that I removed "iff-up" switch from command on "ubuntu1" because I was getting an error. 2- On "ubuntu2" run: socat UDP:192.168.0.10:9000,bind=192.168.0.11:9000 TUN:172.16.1.100/16,tun-name=tundudp,iff-no-pi,tun-type=tun,iff-up & 3- Return to "ubuntu1" and run ip link set dev tundudp up #echo "Disables reverse path filtering" #sudo bash -c 'echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter' #sudo bash -c 'echo 0 > /proc/sys/net/ipv4/conf/eth0/rp_filter' #sudo bash -c 'echo 0 > /proc/sys/net/ipv4/conf/br0/rp_filter' #sudo bash -c 'echo 0 > /proc/sys/net/ipv4/conf/tundudp/rp_filter' #To verify that the tunnel is up, run: ip link show type tun 8: tundudp: mtu 1500 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 500 link/none Hope this helps.
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Did you get this resolved?
@SystemsProgramming
@SystemsProgramming Рік тому
Is it possible to provide the commands used in the video?
@TheLearningChannel-Tech
@TheLearningChannel-Tech Рік тому
Hi, you can find scripts here: github.com/gary-RR/myUKposts_video_container_networking
@MrKenna81
@MrKenna81 2 роки тому
is there a github repo with some of these steps ?
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Hi, Yes, you can get the scripts here: github.com/gary-RR/myUKposts_video_container_networking.
@user-ob3dp9kl9t
@user-ob3dp9kl9t 2 роки тому
Unfortunately, ping the remote vm (I mean 192.168.0.11) is not working on Ubuntu 20.04: Destination Port Unreachable. Does anyone encounter the same problem?
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Hi, If you have a switch (not router) between two Ubuntu machines then change the IP address of "ubuntu2" to "192.168.0.11". So you should have ubuntu1: 192.168.0.10 ubuntu2: 192.168.0.11 Make the change and make sure you can ping each machine from the other. To establish the udp tunnel (make sure to run these as root (sudo -i)): 1- On "ubuntu1" run: socat UDP:192.168.0.11:9000,bind=192.168.0.10:9000 TUN:172.16.0.100/16,tun-name=tundudp,iff-no-pi,tun-type=tun & #***Note that I removed "iff-up" switch from command on "ubuntu1" because I was getting an error. 2- On "ubuntu2" run: socat UDP:192.168.0.10:9000,bind=192.168.0.11:9000 TUN:172.16.1.100/16,tun-name=tundudp,iff-no-pi,tun-type=tun,iff-up & 3- Return to "ubuntu1" and run ip link set dev tundudp up Good luck!
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
@Михаил Поливаха, Where you able to resolve it?
@user-ob3dp9kl9t
@user-ob3dp9kl9t 2 роки тому
@@TheLearningChannel-Tech I do not have a route between my hosts - they are on the same LAN. I have managed to solve it via linux vxlan interfaces. As far as I know this is the techince which is used by flannel by the way, correct me if I am wrong. But I will retry with you solution. Thank you so much!
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Correct, Flannel uses VXLAN which relies on a UDP connection. If you got it working then great, no need to switch to the raw socat.
@randythamrin5976
@randythamrin5976 2 роки тому
@@TheLearningChannel-Tech got It, this part make me confused for a while because in the picture of ubuntu2 eth0: 192.168.1.11 but on bash script you executed them as 192.168.0.11/24, which means in the same network with Ubuntu1VM. and we no need to route them.
@indranilbanerjee5521
@indranilbanerjee5521 3 роки тому
Gr8 explanation Sir,can you create a video of vxlan
@TheLearningChannel-Tech
@TheLearningChannel-Tech 3 роки тому
Hi Indranil, thank you for your kind feedback! I'm currently working on a video on Calico but will add your suggestion to the future videos. Thanks.
@faizyakob4429
@faizyakob4429 2 роки тому
I think the eth0 in Ubuntu2 VM should be 192.168.0.11 in the picture.
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Hi, thanks for your comment, correct, that was a typo in the slide.
@vuhoanghiep1993
@vuhoanghiep1993 3 роки тому
sorry but eth0 is 192.168.0.11 right?
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Good catch! , it should be 192.168.0.11. Thank you for catching it!
@pkkurra123
@pkkurra123 2 роки тому
@@TheLearningChannel-Tech It should be 192.168.0.11 or 192.168.0.x and not 192.168.9.1 according to the reply. If it's 192.168.9.1 or 192.168.1.11, they will be on different subnets! Please correct me if I am wrong.
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
@@pkkurra123 It was a typo, I meant 192.168.0.11. Fixed it, Thanks!
@tracylee8446
@tracylee8446 2 роки тому
Hi There, I got device not found issue since I was using enp0s5 not eth0, but after my change, I got Error: Nexthop has invalid gateway.... Any suggestion?
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Hi Tracy, First, please issue this command from a terminal: ip addr The interface name that has the device IP associated with it is your default interface, assuming you only have one network card associated with your host. Second, what command you were executing when encountered the error messages? Thanks.
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
Please let me know if you still need help with this. The "ip addr" will determine if you should use "eth0" or "enp0s5". Normally "eth0" is the default adaptor but not on all Linux distros. Also mention what command caused the error messages. Thanks and have a god day.
@tracylee8446
@tracylee8446 2 роки тому
@@TheLearningChannel-Tech Hi thanks a lot !!!! I was still facing the issue please see below reply
@TheLearningChannel-Tech
@TheLearningChannel-Tech 2 роки тому
@@tracylee8446 Hi Tracy, not sure which reply you are referring to? Please do the the following: 1- Run the following command from a terminal on your Linux VM and copy the results in your post: ip addr 2- Specify what command caused the errors you mentioned in your original post. Thanks.
@tracylee8446
@tracylee8446 2 роки тому
@@TheLearningChannel-Tech oh hi what I tried the command is sudo ip route add $TO_BRIDGE_SUBSET via $TO_NODE_IP dev enp0s5, my ip addr is 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp0s5: mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 00:1c:42:83:5d:62 brd ff:ff:ff:ff:ff:ff inet 192.168.1.107/24 brd 192.168.1.255 scope global dynamic noprefixroute enp0s5 valid_lft 86388sec preferred_lft 86388sec inet6 2001:569:524e:d900:794:db69:5ee1:373a/64 scope global temporary dynamic valid_lft 14682sec preferred_lft 14382sec inet6 2001:569:524e:d900:9d3e:9042:7dfb:3b22/64 scope global dynamic mngtmpaddr noprefixroute valid_lft 14682sec preferred_lft 14382sec inet6 fe80::5004:d94:9598:75c0/64 scope link noprefixroute valid_lft forever preferred_lft forever
@oceanmih2646
@oceanmih2646 23 дні тому
awesome useful ,really really awesome video
Network Namespaces Basics Explained in 15 Minutes
15:32
KodeKloud
Переглядів 104 тис.
didn't want to let me in #tiktok
00:20
Анастасия Тарасова
Переглядів 9 млн
顔面水槽がブサイク過ぎるwwwww
00:58
はじめしゃちょー(hajime)
Переглядів 79 млн
Excited Dog Zooms In and Out of Sliding Door!
00:18
The Pet Collective
Переглядів 16 млн
OpenAI SHOCKED Everyone! Voice, Vision, & Free?!
8:58
Theoretically Media
Переглядів 23 тис.
Do NOT Learn Kubernetes Without Knowing These Concepts...
13:01
Travis Media
Переглядів 203 тис.
What is VXLAN and How It is Used as an Overlay Network in Kubernetes?
48:53
The Learning Channel
Переглядів 9 тис.
VLAN Switching vs VXLAN Bridging - Packet Walk
37:37
CCIE On The Spectrum
Переглядів 8 тис.
NEW GPT-4o: My Mind is Blown.
6:28
Joshua Chang
Переглядів 59 тис.
Life of a Packet [I] - Michael Rubin, Google
34:19
CNCF [Cloud Native Computing Foundation]
Переглядів 81 тис.
Layer 2 vs Layer 3 Switches
6:02
PowerCert Animated Videos
Переглядів 556 тис.
Best OS for programming? Mac vs Windows vs Linux debate settled
8:40
Индуктивность и дроссель.
1:00
Hi Dev! – Электроника
Переглядів 121 тис.
How about that uh?😎 #sneakers #airpods
0:13
Side Sphere
Переглядів 8 млн