Ask Your Question
1

What is the "internal" interface and port for on Openvswitch?

asked 2013-08-20 01:19:58 -0500

tudor gravatar image

updated 2013-08-22 20:50:00 -0500

Why does each bridge need to have a port and interface with the same name marked as type "internal"?

If I attempt to delete them, for example, it says that the port does not exist. How else are they used?

e.g.

$ovs-vsctl show
e1bbbcb1-e20d-48e5-ae89-823c1a485625
    Bridge br-tun
        Port br-tun
            Interface br-tun
                type: internal
        Port patch-int
            Interface patch-int
                type: patch
                options: {peer=patch-tun}
    Bridge br-int
        Port br-int
            Interface br-int
                type: internal
        Port "int-br-eth1"
            Interface "int-br-eth1"
        Port patch-tun
            Interface patch-tun
                type: patch
                options: {peer=patch-int}
    Bridge "br-eth0"
        Port "phy-br-eth0"
            Interface "phy-br-eth0"
        Port "eth0"
            Interface "eth0"
        Port "br-eth0"
            Interface "br-eth0"
                type: internal
    Bridge "br-eth1"
        Port "br-eth1"
            Interface "br-eth1"
                type: internal
        Port "eth1"
            Interface "eth1"
    ovs_version: "1.4.0+build0"

$ovs-vsctl del-port br-eth1
ovs-vsctl: no port named br-eth1
edit retag flag offensive close merge delete

Comments

You probably will get a better response from the OVS mailing list.

darragh-oreilly gravatar imagedarragh-oreilly ( 2013-08-20 03:31:55 -0500 )edit

Thanks! Have emailed this to the OVS list and will report back their answer. :-)

tudor gravatar imagetudor ( 2013-08-20 19:37:19 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
6

answered 2013-08-22 20:40:12 -0500

tudor gravatar image

updated 2013-08-22 20:47:27 -0500

The internal interface and port in each bridge is both an implementation requirement and exists for historical reasons relating to the implementation of Linux bridging module.

This is referred to as the "local" interface and port. In newer releases of OpenVSwitch, this message has been changed to reflect this, e.g.:

$ovs-vsctl del-port br-eth1
ovs-vsctl: cannot delete port br-eth1 because it is the local port for bridge br-eth1 (deleting this port requires deleting the entire bridge)

The purpose is to hold the IP for the bridge itself (just like some physical bridges do). This is also useful in cases where a bridge has a physical interface that would normally have its own IP. Since assigning a port to an IP wouldn't happen in a physical bridge, assigning an IP to the physical interface would be incorrect, as packets would stop at the port and not be passed across the bridge.

This usage is shown in the documenation under the FAQ:

Q: I created a bridge and added my Ethernet port to it, using commands like these:

   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 situation:

   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 ... (more)

edit flag offensive delete link more
0

answered 2014-08-25 16:02:13 -0500

I suspect the internal interface is also needed to originate/accept frames for spanning tree protocol.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

3 followers

Stats

Asked: 2013-08-20 01:19:58 -0500

Seen: 29,940 times

Last updated: Aug 22 '13