Skip to content

Instantly share code, notes, and snippets.

@gdesatrigraha
Created October 12, 2018 20:13
Show Gist options
  • Select an option

  • Save gdesatrigraha/1d6c30ab085609906e0b81e3174820e0 to your computer and use it in GitHub Desktop.

Select an option

Save gdesatrigraha/1d6c30ab085609906e0b81e3174820e0 to your computer and use it in GitHub Desktop.
#!/bin/sh
# create ovs bridge named bridge0
nmcli conn add type ovs-bridge conn.interface bridge0 autoconnect yes
# add add a port to the bridge for the internal ovs interface (iface0)
nmcli conn add type ovs-port conn.interface port0 master bridge0 autoconnect yes
# add internal ovs interface to the create port0
nmcli conn add type ovs-interface conn.interface iface0 master port0 autoconnect yes ipv4.method auto
# add another port to the bridge for our ethernet interface
nmcli conn add type ovs-port conn.interface port1 master bridge0 autoconnect yes
# attach our ethernet interface to the port
nmcli conn add type ethernet conn.interface enp5s0 master port1 autoconnect yes
@ji-podhead
Copy link

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment