[ovs-discuss] IP address for switch interfaces
blp at ovn.org
Fri Jun 24 15:48:44 UTC 2016
Please don't drop the mailing list.
As I said, IP addresses must be bound to internal interfaces, not to
physical interfaces. The FAQ addresses this in more detail.
### Q: I created a bridge and added my Ethernet port to it, using commands
ovs-vsctl add-br br0
ovs-vsctl add-port br0 eth0
and as soon as I ran the "add-port" command I lost all connectivity
through eth0. Help!
A: A physical Ethernet device that is part of an Open vSwitch bridge
should not have an IP address. If one does, then that IP address
will not be fully functional.
You can restore functionality by moving the IP address to an Open
vSwitch "internal" device, such as the network device named after
the bridge itself. For example, assuming that eth0's IP address is
192.168.128.5, you could run the commands below to fix up the
ifconfig eth0 0.0.0.0
ifconfig br0 192.168.128.5
(If your only connection to the machine running OVS is through the
IP address in question, then you would want to run all of these
commands on a single command line, or put them into a script.) If
there were any additional routes assigned to eth0, then you would
also want to use commands to adjust these routes to go through br0.
If you use DHCP to obtain an IP address, then you should kill the
DHCP client that was listening on the physical Ethernet interface
(e.g. eth0) and start one listening on the internal interface
(e.g. br0). You might still need to manually clear the IP address
from the physical interface (e.g. with "ifconfig eth0 0.0.0.0").
There is no compelling reason why Open vSwitch must work this way.
However, this is the way that the Linux kernel bridge module has
always worked, so it's a model that those accustomed to Linux
bridging are already used to. Also, the model that most people
expect is not implementable without kernel changes on all the
versions of Linux that Open vSwitch supports.
By the way, this issue is not specific to physical Ethernet
devices. It applies to all network devices except Open vSwitch
On Fri, Jun 24, 2016 at 11:41:01AM +0000, Pynbiang Hadem wrote:
> Thanks Ben for your reply. Do you mean to say that there is no way to assign IP addresses to interfaces, s1-eth0, s1-eth1 and s1-eth2 ? Or can it be done at the controller application level?.
> On Thursday, 23 June 2016 10:15 PM, Ben Pfaff <blp at ovn.org> wrote:
> On Thu, Jun 23, 2016 at 07:07:31AM +0000, Pynbiang Hadem wrote:
> > Assume that an openflow switch has three interfaces, s1-eth0, s1-eth1
> > and s1-eth2. Is it possible to bind an IP address to each
> > interface?.
> If you are talking about an OVS bridge, no. IP addresses must be bound
> to internal interfaces, not to physical interfaces. If you need three
> IP addresses, common practice would be to use three internal interfaces.
> > If so, what kind of data-structure is used by OpenFlow for the
> > binding?. ThanksHadem
> I don't understand this question.
More information about the discuss