VXLAN overlay networks with Open vSwitch.

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ต.ค. 2024
  • VXLAN overlay networks with Open vSwitch.
    Twitter: @davidmahler
    LinkedIn: / davidmahler
    Demonstration of configuring a VXLAN tunnel manually using Open vSwitch. Connecting VMs together through the tunnel, allowing logical separation of tenant traffic from each other and from the physical underlay network. Emulated with mininet (mininet.org)
    Links:
    Me
    / davidmahler
    Intro to Cloud Overlay Networks: • Introduction to Cloud ...
    Intro to OpenFlow: • Introduction to OpenFlow
    Intro to Open vSwitch: • OpenFlow flow entries ...
    Intro to Mininet: • Introduction to Mininet
    Open vSwitch
    openvswitch.org
    Brent Salisbury (Network Static Blog):
    networkstatic.n...
    Derek Chamorro (The Random Security Guy Blog):
    www.therandomse...
    IETF Network Virtualization Overlays working group
    datatracker.ie...
    VXLAN IETF draft:
    datatracker.ie...
    Commands used:
    Build tunnel (from SERVER1 shown):
    ovs-vsctl add-port s1 vtep -- set interface vtep type=vxlan option:remote_ip=192.168.2.20 option:key=flow ofport_request=10
    Flow entries (from SERVER1 shown)
    table=1,tun_id=100,dl_dst=00:00:00:00:00:01,actions=output:1
    table=1,tun_id=200,dl_dst=00:00:00:00:00:01,actions=output:2
    table=1,tun_id=100,dl_dst=00:00:00:00:00:02,actions=output:10
    table=1,tun_id=200,dl_dst=00:00:00:00:00:02,actions=output:10
    table=1,tun_id=100,arp,nw_dst=10.0.0.1,actions=output:1
    table=1,tun_id=200,arp,nw_dst=10.0.0.1,actions=output:2
    table=1,tun_id=100,arp,nw_dst=10.0.0.2,actions=output:10
    table=1,tun_id=200,arp,nw_dst=10.0.0.2,actions=output:10
    table=1,priority=100,actions=drop

ความคิดเห็น • 107

  • @suriyanath
    @suriyanath 9 ปีที่แล้ว +2

    Great work David... able to understand many things within few minutes... I could understand the hard work behind it... God bless you...

    • @DavidMahler
      @DavidMahler  9 ปีที่แล้ว

      +Suriyanath Seralathan Thanks so much for the feedback!

  • @ChandraSekhar-dq9iz
    @ChandraSekhar-dq9iz 10 ปีที่แล้ว +1

    Hello David,
    Thanks for another nice video....
    Actually I am trying the same topology in real scenario except one VM per host.
    My setup details are as below:
    2 Linux hosts with Ubuntu 12.04 LTS with Xen hypervisor
    OVS 1.9.3 installed in both hosts
    Host1:
    VM1-10.0.0.1
    OVS version 1.9.3
    Interface Xenbr0 bridged to eth0 of host1
    Xenbr0(pc1)-192.168.1.10
    Host2:
    VM2-10.0.0.2
    OVS version 1.9.3
    Interface Xenbr0 bridged to eth0 of host2
    Xenbr0(pc2)-192.168.2.20
    I have used a Linux PC to act as a router in-between the 2 hosts…
    Kindly could you provide me the configuration you used for the vxlan tunneling and the OVS setup..
    Any help would be appreciated……

    • @DavidMahler
      @DavidMahler  10 ปีที่แล้ว

      Hi - I have the commands for one side in the video description (might have to hit more). The other side is similar but also seen just after the 8min mark or so....

    • @ChandraSekhar-dq9iz
      @ChandraSekhar-dq9iz 10 ปีที่แล้ว

      David Mahler
      Hi, Thank you for your reply.
      I am actually doing my Thesis in live migration of VM's over WAN using VXLAN approach.
      I would need the configuration commands for the bridging interfaces S1,S2 and VTEP to be able to set up my test bed on Linux systems. Also, I have a VM interface named Xenbr0 which I dont understand how to relate to the OVS bridges S1 and S2.
      Any help would be greatly appreciated.
      Email id: cse414@gmail.com

  • @Angelas20
    @Angelas20 4 ปีที่แล้ว

    If I want to make overlay network for more than two VM's, what would be next hop? For two VM, it is clear..next hop just each other. Can you clarify what if I want to make overlay network for 10 VMs?

  • @JonMajorCCIE47884
    @JonMajorCCIE47884 8 ปีที่แล้ว +1

    This video is such a life saver lol. I was in need of a quick and dirty vxlan solution, came back to this because I couldn't remember the syntax for populating flows.

    • @DavidMahler
      @DavidMahler  8 ปีที่แล้ว +1

      Hey Jon! Hope all is well - eagerly awaiting your next video ;-).
      th-cam.com/channels/q38rzWCvF-vAXbFchugzXA.html

    • @JonMajorCCIE47884
      @JonMajorCCIE47884 8 ปีที่แล้ว

      Thank you sir, and soon. Very soon!

  • @chinvannak1076
    @chinvannak1076 5 ปีที่แล้ว

    you use this command "ovs-vsctl add-port s1 vtep -- set interface vtep type=vxlan option:remote_ip=192.168.2.20 option:key=flow ofport_request=10" to add vxlan tunnel on open Vswitch, if i am using kvm switch what should be the command?
    Thank,

  • @ibrahimmansour940
    @ibrahimmansour940 8 ปีที่แล้ว

    Hi David, I’d like you to help me with VxLAN configurations on Ubuntu using Linux bridge/openvswitch.
    I need to create an overlay network (10.10.10.0/24) on two different subnets (192.168.1.0/24 & 172.16.1.0/24) and the configuration should be permanent.
    Also, VMs with IP addresses within the overlay network should be able to access the internet and the underlaying subnets.
    Many thanks in advance.
    Ibrahim.

  • @teripotter1
    @teripotter1 2 ปีที่แล้ว

    Hello David Mahler. I hope my message finds you in good health. Iam a student and I needed some help regarding vxlan tunneling. My scenario is that I have two seperate openstack clouds and I want to establish vxlan tunneling from an instance in one cloud to an instance in another cloud. Thanks alot

  • @almazabd8175
    @almazabd8175 10 ปีที่แล้ว

    Thank you for nice video. I want to connect lxc containers on several computers with vxlan, with dynamically created route to lxc containers. Also I need vxlan link encryption. Please help with it.
    Thanks..

  • @kawish_alley
    @kawish_alley 5 ปีที่แล้ว

    I want to setup a topology and set a vxlan tunnel between two different network one on public ip and other have private ip. How can I achieved this? thanks

  • @amazotron3471
    @amazotron3471 9 ปีที่แล้ว +1

    As an SDN newbie, this has been very helpful. Thank you!

    • @DavidMahler
      @DavidMahler  9 ปีที่แล้ว

      Allan Clarke You're welcome!

  • @sanketraut
    @sanketraut 9 ปีที่แล้ว

    Hello +david Mahler,
    I tried to implement your topology in mininet, but when I give flows by "sh ovs-ofctl server1 flows.txt" in server1
    It given me error message "Invalid Ethernet address", which is destination host mac address.
    So, could you please help me with the same.

  • @erwinadrados4747
    @erwinadrados4747 3 ปีที่แล้ว

    Hello. Can you provide the exact python script for vxlan.py? :)

  • @avinashshankarpalli2130
    @avinashshankarpalli2130 6 ปีที่แล้ว

    Thanks David for awesome video and explation. How is this concept different from VXLAN EVPN?

  • @martin0google
    @martin0google 7 ปีที่แล้ว

    Thanks for the wonderful explanation , Is it possible to cover the actual emulation of three VM's along with the topology explanation ?

  • @mikescott3355
    @mikescott3355 7 ปีที่แล้ว

    Could you please post the text of your vxlan.py custom topology? I am trying to learn from example with regard to scripting custom topo's

    • @DavidMahler
      @DavidMahler  7 ปีที่แล้ว

      gist.github.com/anonymous/bad4b7d7dcb277958edf0a7a2ae67836 is almost the same I believe, just need to update IPs

  • @safourajanosepah5069
    @safourajanosepah5069 6 ปีที่แล้ว

    This video is really useful but I don't know what is flow.txt?

  • @jonathanbrown2102
    @jonathanbrown2102 7 ปีที่แล้ว

    This is a great tutorial. Is it possible to achieve this without having to specify MAC or IP addresses in the flows? Is it possible to simply indicate that anything connected on openflow port 1 is on VNI 100 and anything on openflow port 2 is on VNI 200 and then allow MAC learning to proceed as usual as if it were a standard switch? Essentially, if I left out the bottom half of your flows.txt document would it still work? Thanks!

    • @DavidMahler
      @DavidMahler  7 ปีที่แล้ว

      Thanks, I *think* so, I'd have to lab it up.

  • @saravananramesh7847
    @saravananramesh7847 7 ปีที่แล้ว

    Can I technically add a port number to the remote_ip while adding the vtep to the switch?

  • @anbarasanm9302
    @anbarasanm9302 9 ปีที่แล้ว

    Hi David, I tried the same setup. But I was not able to ping one mininet host from another. Although I could see the packets with vxlan headers from one machine reaching the physical interface of other machine. Not sure what happens post that. How should I debug this?

    • @anbarasanm9302
      @anbarasanm9302 9 ปีที่แล้ว

      Could you share the python script for mininet simulation?

  • @jorgehumbertogomezvelasque6420
    @jorgehumbertogomezvelasque6420 7 ปีที่แล้ว

    Thanks for the explanation
    Just a short question.
    Once the packet arrive to the other server (the one who has the destination ip address), how is this then forwarded to the Openvswitch,and specifically to the vtep port ? . I mean, there just the information about the IP, What if there are multiple OVS at the remote node .
    Thanks again

    • @DavidMahler
      @DavidMahler  7 ปีที่แล้ว

      the VTEP is on an OVS instance. If there are multiple OVS bridges that's fine - they need to be connected together of course to get from the one with the VTEP to another - and forwarding can be normal L2 forwarding or openflow rules on the OVS instances

  • @jong-hakchoe4913
    @jong-hakchoe4913 9 ปีที่แล้ว

    Thank you for this excellent video! It is really helpful for beginners.
    I want to try exact same thing you did. Is it possible for you to post custom topology file - vxlan.py file?

    • @DavidMahler
      @DavidMahler  9 ปีที่แล้ว

      Hi Jong-Hak. Thanks for the comment - please see my reply to Zafar a few months ago.....(probably have to hit "read more" to expand my comment).

  • @calltokumarg
    @calltokumarg 10 ปีที่แล้ว

    Hi David,
    Very good video post, thanks. Looking forward for some videos like in SDN, NFV and OVS which will be helpfull for beginers.
    Thanks..

  • @sugiantoso
    @sugiantoso 9 ปีที่แล้ว +2

    Thank you for the effort!

  • @infoinfo5566
    @infoinfo5566 8 ปีที่แล้ว

    I like the videos, all the videos were very helpful. I watched all of your videos in one day, since my experience is mostly in traditional type of networking surprisingly it was very easy to follow, and make sense of how to track packet flow, from one end to another across variety types of typologies. I can not imagine someone understanding all of this without solid foundation to networking.

    • @DavidMahler
      @DavidMahler  8 ปีที่แล้ว

      Wow, all of them in one day? That's awesome, you must be tired of my voice ;-). You're right, most require some networking knowledge.

  • @chinvannak1076
    @chinvannak1076 5 ปีที่แล้ว

    In this case, can blue 1 communicate red 1?

  • @svensubunitnillson1568
    @svensubunitnillson1568 5 ปีที่แล้ว

    would the vxlan tunnel support doubletagged vlans or is this just for untagged traffic, as i understand it the payload doesnt matter as long as its layer2.

    • @DavidMahler
      @DavidMahler  5 ปีที่แล้ว

      I don't see why not.

  • @KhayamGondal
    @KhayamGondal 9 ปีที่แล้ว

    Thanks David for this amazing video. I have one question. If i don't know what IPs are assigned to VMs than how will i configure ARP flows?

    • @amanpreetsingh6835
      @amanpreetsingh6835 6 ปีที่แล้ว

      docs.openvswitch.org/en/latest/faq/issues/ find your answer here.

  • @RyanDunbar1
    @RyanDunbar1 10 ปีที่แล้ว

    How would the config looks like it you add another server (SERVER3 192.168.3.30) and add new tenant VM blue3,red3, plus green3 ?
    can the tun_id be automated ?
    can all of the flow config be automated ?
    what if you move a VM to another server ?

    • @RyanDunbar1
      @RyanDunbar1 10 ปีที่แล้ว

      that's if. :)

    • @DavidMahler
      @DavidMahler  10 ปีที่แล้ว

      Hi Ryan check out this post from Brent Salisbury's blog which I reference:
      networkstatic.net/setting-overlays-open-vswitch/

  • @yasharpartovi4204
    @yasharpartovi4204 7 ปีที่แล้ว

    Hi David, Thank you so much for your great videos. Would you please share the script codes for this video also? Thanks

    • @DavidMahler
      @DavidMahler  7 ปีที่แล้ว +1

      gist.github.com/anonymous/bad4b7d7dcb277958edf0a7a2ae67836 is close

  • @sanketraut
    @sanketraut 9 ปีที่แล้ว

    Hey +David Mahler ,
    How to connect server1 mininet (vm1) to Router (vm3), and server 2 mininet (vm2) to Router (vm3 )??
    During your demo are you using 4 th vm for mininet controller??

    • @DavidMahler
      @DavidMahler  9 ปีที่แล้ว

      sanket raut Hi, I used virtual box and used internal networks to connect the 3 VMs in a line. The 'router' I believe I just had ubuntu with ip forwarding enabled between 2 interfaces (each interface connected to one of the other vms through VB internal network)

    • @poorniman84
      @poorniman84 8 ปีที่แล้ว

      +sanket raut Hi Sanket, were you able to create the exact setup in VirtualBox?

  • @saravananramesh7847
    @saravananramesh7847 7 ปีที่แล้ว

    Thanks for the amazing video :)
    Query: Why does my vxlan bridge break on manually adding the flows.txt?

    • @DavidMahler
      @DavidMahler  7 ปีที่แล้ว

      You're welcome. Sorry I don't know.

  • @kwabenaapprey5909
    @kwabenaapprey5909 9 ปีที่แล้ว

    Excellent video David! Thanks for taking the time to put this video together and making it available for those new to VXLAN such as myself.

    • @DavidMahler
      @DavidMahler  9 ปีที่แล้ว

      +Kwabena Apprey You're welcome!

  • @patadia
    @patadia 8 ปีที่แล้ว

    Hey David, you have inspired me to setup my on army of mininets (mininenions) :).

    • @DavidMahler
      @DavidMahler  8 ปีที่แล้ว

      Ha, keep an eye on them!

  • @zafarqos
    @zafarqos 10 ปีที่แล้ว

    Thanks for another nice video. So you used mininet on two VMs. Can you please guide to some link showing the setup on how can they communication with each other?

    • @DavidMahler
      @DavidMahler  10 ปีที่แล้ว +3

      Hello Zafar,
      Thanks. The VMs just need to be able to reach each other. Then for Mininet (just for the demo) I used a custom topology like below as an example for "server1"
      from mininet.net import Mininet
      from mininet.node import Controller
      from mininet.cli import CLI
      from mininet.log import setLogLevel, info
      def server1():
      "Create an empty network and add nodes to it."
      net = Mininet( controller=None )
      info( '*** Adding hosts
      ' )
      red1 = net.addHost( 'red1', ip='10.0.0.1', mac='00:00:00:00:00:01')
      blue1 = net.addHost( 'blue1', ip='10.0.0.1', mac='00:00:00:00:00:01')
      info( '*** Adding switch
      ' )
      s1 = net.addSwitch( 's1' )
      info( '*** Creating links
      ' )
      net.addLink( red1, s1 )
      net.addLink( blue1, s1 )
      info( '*** Starting network
      ')
      net.start()
      info( '*** Running CLI
      ' )
      CLI( net )
      info( '*** Stopping network' )
      net.stop()
      if __name__ == '__main__':
      setLogLevel( 'info' )
      server1()

    • @ViktorGoldberg
      @ViktorGoldberg 9 ปีที่แล้ว

      David Mahler Thanks for your excellent work David! Just realized that TH-cam strips some underscores. I think in the last section
      if __name__
      ...
      It should actually say:
      if ___name___
      ...
      Cheers!

  • @stampeder1686
    @stampeder1686 8 ปีที่แล้ว

    Now we need another of your great videos on using VxLAN over BGP.

    • @DavidMahler
      @DavidMahler  8 ปีที่แล้ว

      Thanks Glenn. That is something I should look at further, I've done VXLAN in a DC only so far and no BGP.

  • @abdelmounaimbouroudi4640
    @abdelmounaimbouroudi4640 5 ปีที่แล้ว

    Thank you for this video, could you please do a tutorial video on Service Function Chaining with ODL and Mininet ?!

    • @DavidMahler
      @DavidMahler  5 ปีที่แล้ว +1

      Thanks for the comment! You're welcome!

    • @gedcib
      @gedcib 3 ปีที่แล้ว

      @@DavidMahler Could you approve linkedin invitation? I need your help with OpenvSwitch issue we are facing.

  • @rpf23543
    @rpf23543 7 ปีที่แล้ว

    great explanation, I really like how nicely and detailed you introduce the setup, before you start with the actual test. Thanks a lot for the effort!

    • @DavidMahler
      @DavidMahler  7 ปีที่แล้ว

      Thanks for the feedback! ...and for commenting again!!

  • @etcpriority
    @etcpriority 8 ปีที่แล้ว

    Hi,
    I am new to this.
    Can anyone please tell me from where did we infer that red1 got OF port as 1?

    • @DavidMahler
      @DavidMahler  8 ปีที่แล้ว

      You can try ovs-ofctl show to see mappings of OF port numbers to names you might see in "ip a" or "ifconfig". Also ovs-appctl show/fdb can show the mac address table which can help as well.

    • @etcpriority
      @etcpriority 8 ปีที่แล้ว

      Thank you. :)

  • @ThedrumMachine78
    @ThedrumMachine78 10 ปีที่แล้ว

    Hi David your videos are great! When are you planning to do some more? :)

    • @DavidMahler
      @DavidMahler  10 ปีที่แล้ว +1

      Thanks Gabriel! I did just post one a couple of days ago. Introduction to SDN:
      th-cam.com/video/DiChnu_PAzA/w-d-xo.html

  • @anuragraghuvanshi5952
    @anuragraghuvanshi5952 8 ปีที่แล้ว

    Thanks for this knowledge!!!
    Query: do i need Router VM for this setup?

    • @DavidMahler
      @DavidMahler  8 ปีที่แล้ว

      Hi, thanks for the comment. No, I just had it there to show L2 overlay on a L3 network (crossing the router and still have L2 adjacencies between the VMs)

  • @shravansk
    @shravansk 7 ปีที่แล้ว

    Hey David, can you please tell how you did 3 VMs setup and connect them ?

    • @DavidMahler
      @DavidMahler  7 ปีที่แล้ว +1

      It's been a while, but if I recall correctly the 2 VMs acting as compute hosts had internal network ports in Virtual Box (say int1 and int2). The VM in the middle I just had to give in an interface in int1 and int2, set net.ipv4.ip_forward = 1, and set "gateway" IPs as needed on the interfaces - so it then acted like a basic router.

    • @shravansk
      @shravansk 7 ปีที่แล้ว

      Is it not possible to emulate the above setup using mininet somehow ?

  • @poorniman84
    @poorniman84 8 ปีที่แล้ว

    Very nice video. Can you please share the python script for creating network topology?

    • @DavidMahler
      @DavidMahler  8 ปีที่แล้ว

      +Poornima N I looked through my old files try this ... gist.github.com/anonymous/bad4b7d7dcb277958edf0a7a2ae67836 the IPs need to be updated

    • @poorniman84
      @poorniman84 8 ปีที่แล้ว

      Thanks a lot David

    • @poorniman84
      @poorniman84 8 ปีที่แล้ว +1

      +David Mahler, how to setup IP address 192.168.1.10 and 192.168.2.20 to switches s1 and s2?

  • @augustking964
    @augustking964 8 ปีที่แล้ว

    would you pls show the detail of vxlan.py?

    • @DavidMahler
      @DavidMahler  8 ปีที่แล้ว +1

      gist.github.com/anonymous/bad4b7d7dcb277958edf0a7a2ae67836 is close, just need to update IPs I believe

    • @anferneegui
      @anferneegui 6 ปีที่แล้ว

      seems the mac part is missing.

  • @NetworkStatic
    @NetworkStatic 8 ปีที่แล้ว

    Fantastic Video, great presentation!

    • @DavidMahler
      @DavidMahler  8 ปีที่แล้ว

      +Brent Salisbury Thanks that means a lot coming from one of if not the best networking blogger out there. Major props for networkstatic.net/

  • @agostinhomaia9025
    @agostinhomaia9025 3 ปีที่แล้ว

    Awesome! Thank you.

  • @srinivasvenumuddala5970
    @srinivasvenumuddala5970 7 ปีที่แล้ว

    really very useful video!!!

  • @KedarMendhurwar
    @KedarMendhurwar 9 ปีที่แล้ว

    nice work Dave :D

    • @DavidMahler
      @DavidMahler  9 ปีที่แล้ว

      Kedar Mendhurwar Thanks Kedar.

  • @erezcohen9200
    @erezcohen9200 9 ปีที่แล้ว

    Very well done!

  • @katywu1
    @katywu1 9 ปีที่แล้ว

    Great stuff David

  • @hashtagnerdz6745
    @hashtagnerdz6745 10 ปีที่แล้ว

    Great Work !!

  • @blockchain-dr-huang
    @blockchain-dr-huang 10 ปีที่แล้ว

    Nice video.

  • @yangwang7971
    @yangwang7971 7 ปีที่แล้ว

    thank you !

  • @jianweimao4345
    @jianweimao4345 6 ปีที่แล้ว

    good job

  • @videotonghop5692
    @videotonghop5692 8 ปีที่แล้ว

    thanks