Skip to content

Instantly share code, notes, and snippets.

@yulis
Last active August 26, 2021 16:50
Show Gist options
  • Select an option

  • Save yulis/5c20aa7695fc859d357d2285d4c51e7d to your computer and use it in GitHub Desktop.

Select an option

Save yulis/5c20aa7695fc859d357d2285d4c51e7d to your computer and use it in GitHub Desktop.

Revisions

  1. yulis revised this gist Nov 16, 2016. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions vxlan.sh
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,13 @@
    #!/bin/bash

    # On Host A
    # On Host 192.168.100.25
    ovs-vsctl add-br testbr0
    ovs-vsctl add-port testbr0 testtun0 -- set interface testtun0 type=internal
    ovs-vsctl ifconfig testtun0 172.17.17.1 netmask 255.255.255.0
    ovs-vsctl add-port testbr0 testvxlan0 -- set interface testvxlan0 type=vxlan options:remote_ip=[HOST_B_IP]
    ovs-vsctl add-port testbr0 tun1 -- set interface tun1 type=internal
    ifconfig tun1 172.17.17.1 netmask 255.255.255.0
    ovs-vsctl add-port testbr0 testvxlan0 -- set interface testvxlan0 type=vxlan options:remote_ip=192.168.100.24

    # On Host B
    # On Host 192.168.100.24
    ovs-vsctl add-br testbr0
    ovs-vsctl add-port testbr0 testtun0 -- set interface testtun0 type=internal
    ovs-vsctl ifconfig testtun0 172.17.17.2 netmask 255.255.255.0
    ovs-vsctl add-port testbr0 testvxlan0 -- set interface testvxlan0 type=vxlan options:remote_ip=[HOST_A_IP]
    ovs-vsctl add-port testbr0 tun1 -- set interface tun1 type=internal
    ifconfig tun1 172.17.17.2 netmask 255.255.255.0
    ovs-vsctl add-port testbr0 testvxlan0 -- set interface testvxlan0 type=vxlan options:remote_ip=192.168.100.25
  2. yulis revised this gist Nov 16, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions vxlan.sh
    Original file line number Diff line number Diff line change
    @@ -4,10 +4,10 @@
    ovs-vsctl add-br testbr0
    ovs-vsctl add-port testbr0 testtun0 -- set interface testtun0 type=internal
    ovs-vsctl ifconfig testtun0 172.17.17.1 netmask 255.255.255.0
    ovs-vsctl add-port testbr0 testvxlan0 -- set interface testvxlan0 type=vxlan options:remote_ip=[HOST_1_IP]
    ovs-vsctl add-port testbr0 testvxlan0 -- set interface testvxlan0 type=vxlan options:remote_ip=[HOST_B_IP]

    # On Host B
    ovs-vsctl add-br testbr0
    ovs-vsctl add-port testbr0 testtun0 -- set interface testtun0 type=internal
    ovs-vsctl ifconfig testtun0 172.17.17.2 netmask 255.255.255.0
    ovs-vsctl add-port testbr0 testvxlan0 -- set interface testvxlan0 type=vxlan options:remote_ip=[HOST_2_IP]
    ovs-vsctl add-port testbr0 testvxlan0 -- set interface testvxlan0 type=vxlan options:remote_ip=[HOST_A_IP]
  3. yulis created this gist Nov 16, 2016.
    13 changes: 13 additions & 0 deletions vxlan.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    #!/bin/bash

    # On Host A
    ovs-vsctl add-br testbr0
    ovs-vsctl add-port testbr0 testtun0 -- set interface testtun0 type=internal
    ovs-vsctl ifconfig testtun0 172.17.17.1 netmask 255.255.255.0
    ovs-vsctl add-port testbr0 testvxlan0 -- set interface testvxlan0 type=vxlan options:remote_ip=[HOST_1_IP]

    # On Host B
    ovs-vsctl add-br testbr0
    ovs-vsctl add-port testbr0 testtun0 -- set interface testtun0 type=internal
    ovs-vsctl ifconfig testtun0 172.17.17.2 netmask 255.255.255.0
    ovs-vsctl add-port testbr0 testvxlan0 -- set interface testvxlan0 type=vxlan options:remote_ip=[HOST_2_IP]