[ovs-discuss] Persistent Address on OVS Bridge

Gurucharan Shetty shettyg at nicira.com
Tue Mar 17 20:08:50 UTC 2015


On Tue, Mar 17, 2015 at 11:09 AM, Amer <amer7777 at hotmail.com> wrote:
> Thank you
> I am facing same problems and I thing the next question will be:
> How to make the OVS-bridge br0
> a gateway for hosts that are connected to it. For example if we have 4 hosts
> connected to the OVS-bridge br0 and the bridge connect to a network, as
> usual,
> is the following configuration correct
The below configuration looks correct and should create br1 and add
the ethX ports to it.
I do not understand all the requirements of your 'make the OVS-bridge
br0  a gateway for hosts that are connected to it' use case to comment
on how well it will work.


>
> 1
> iface br1 inet static
>     address 192.168.1.1
>     netmask 255.255.255.0
>     ovs_type OVSBridge
>     ovs_ports eth0 eth1 eth2 eth4
>
> allow-br0 eth0
> iface eth0 inet manual
>     ovs_bridge br0
>     ovs_type OVSPort
>
> allow-br0 eth1
> iface eth1 inet manual
>     ovs_bridge br0
>     ovs_type OVSPort
>
> allow-br0 eth2
> iface eth0 inet manual
>     ovs_bridge br0
>     ovs_type OVSPort
>
> allow-br0 eth3
> iface eth1 inet manual
>     ovs_bridge br0
>     ovs_type OVSPort
>
> And the br0 IP as a gateway to the hosts.
>
>
> Best regards,
> Amer
>
>
>
> ‏‫من جهاز الـ iPhone الخاص بي‬
>
> ‫في ٢٦ جما١، ١٤٣٦ هـ، الساعة ٥:٣٥ م، كتب ‏Gurucharan Shetty
> ‏<shettyg at nicira.com>:‬
>
> On Tue, Mar 17, 2015 at 6:10 AM, Kyle Fazzari
> <openvswitch at status.e4ward.com> wrote:
>
> Hello all.
>
>
> This may be a bit of a newbie question, for which I apologize. When I
>
> originally created my bridge with ovs-vsctl, I lost network
>
> connectivity. I quickly found this:
>
> http://openvswitch.org/pipermail/discuss/2014-April/013598.html , and
>
> simply setting the address on br0 worked fine.
>
>
> However, I want this to happen at boot time. I'm on Ubuntu 14.04. From
>
> what I've read, it sounds like OVS maintains its own database, which
>
> explains why after running
>
>
>    ovs-vsctl add-br br0
>
>    ovs-vsctl add-port br0 eth0
>
>
> when I reboot, br0 still exists.
>
> correct.
>
> However, I'd like br0 to have an
>
> address when it comes back up. If it was a regular interface obviously
>
> I'd put this information in /etc/network/interfaces, but it's not.
>
> However, I've seen articles like this
>
> (http://www.opencloudblog.com/?p=240) that imply that I could
>
> configure this all via /etc/network/interfaces, but I didn't do it
>
> that way initially and now my database already has the bridge defined.
>
> Official information about using 'interfaces' in section "Debian
> network scripts integration":
> https://github.com/openvswitch/ovs/blob/master/debian/openvswitch-switch.README.Debian
>
>
> If I remember correctly, rebooting after 'interfaces' populated
> properly with the bridge already created may not be a problem. If it
> is a problem, delete your bridge. If you worry about loosing network
> connectivity, change the ip address back to eth0 in the same line as
> the del-br command.
>
> You can also test your changes to interfaces with
> (ifup --allow=ovs $list_of_bridges, ifdown --allow=ovs $list_of_bridges)
>
>
>
> What do I do? I just want to specify a static IP address for br0 when
>
> it comes up at boot, whether it's in my /etc/network/interfaces or
>
> not.
>
>
> Thank you!
>
>
> Kyle
>
> _______________________________________________
>
> discuss mailing list
>
> discuss at openvswitch.org
>
> http://openvswitch.org/mailman/listinfo/discuss
>
> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> http://openvswitch.org/mailman/listinfo/discuss



More information about the discuss mailing list