# openvswitch is not creating bridge interface



## Claud (Aug 27, 2012)

Hello guys,
I do not know if it is a bug or some unexpected behaviour on my machine.
I have FreeBSD 
	
	



```
claud 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Sun Aug 19 21:55:41 EEST 2012     root@claud:/usr/obj/usr/src/sys/MYBSD9  amd64
```
(compiled new kernel for the atheros 11n option, nothing else changed)
I installed openvswitch from ports and added them into rc.conf for onestart,
I start ovsdb-server service without problem, when i start ovs-vswitchd service I get this:


```
Starting ovs_vswitchd.
2012-08-27T16:17:13Z|00001|reconnect|INFO|unix:/usr/local/var/run/openvswitch/db.sock: connecting...
2012-08-27T16:17:13Z|00002|reconnect|INFO|unix:/usr/local/var/run/openvswitch/db.sock: connected
2012-08-27T16:17:13Z|00003|ofproto|WARN|unknown datapath type system
2012-08-27T16:17:13Z|00004|ofproto|WARN|could not create datapath bridge0 of unknown type system
2012-08-27T16:17:13Z|00005|bridge|ERR|failed to create bridge bridge0: Address family not supported by protocol family
```

As you can see there is a problem for the already configured vswitch into the db bridge0 .

```
ovs-vsctl show
58b4c460-08db-4d8f-bb9a-a52db4788d25
    Bridge "bridge0"
        Port "wlan0"
            Interface "wlan0"
        Port "bridge0"
            Interface "bridge0"
                type: internal
```

created with 
	
	



```
ovs-vsctl add-br bridge0 and
ovs-vsctl add-port bridge0 wlan0
```
Now, ifconfig -a displays no bridge0 interface(abnormal behavour)
I have the following kernel modules loaded:

```
Id Refs Address            Size     Name
 1   43 0xffffffff80200000 11cdaa0  kernel
 2    1 0xffffffff813ce000 f420     aio.ko
 4    1 0xffffffff813e1000 6668     sem.ko
 5    1 0xffffffff813e8000 c2f0     tmpfs.ko
 6    3 0xffffffff813f5000 6f48     libiconv.ko
 7    1 0xffffffff813fc000 2438     libmchain.ko
 8    1 0xffffffff813ff000 11c8     cd9660_iconv.ko
 9    1 0xffffffff81401000 11e0     msdosfs_iconv.ko
10    1 0xffffffff81612000 42a0     linprocfs.ko
11    2 0xffffffff81617000 1e17c    linux.ko
12    1 0xffffffff81636000 25b      linux_adobe.ko
13    1 0xffffffff81637000 64a91    radeon.ko
14    1 0xffffffff8169c000 139a7    drm.ko
15    1 0xffffffff816b0000 2655     if_tap.ko
16    1 0xffffffff816b3000 589b     if_bridge.ko
17    1 0xffffffff816b9000 3537     bridgestp.ko
```


----------



## Claud (Aug 27, 2012)

And the wuestion is someone else tried to do this, had the same problems?
Is there something i did wrong (openvswitch is compiled without treadsafe config)


----------



## emaste@ (Aug 30, 2012)

*Creating bridge*



			
				Claud said:
			
		

> ```
> ovs-vsctl add-br bridge0 and
> ovs-vsctl add-port bridge0 wlan0
> ```



For the FreeBSD port you'll need to set the netdev type as well - try:


```
ovs-vsctl add-br bridge0 -- set bridge bridge0 datapath_type=netdev
```


----------



## Claud (Sep 3, 2012)

Thanks emaste,
I managed to make some tests. The scenarios are like this.
After i create the vswitch with :

```
ovs-vsctl add-br bridge0 -- set bridge bridge0 datapath_type=netdev
ovs-vsctl add-port bridge0 wlan0
```
Create a tap interface:

```
ifconfig create tap
```
add tap interface to the switch

```
ovs-vsctl add-port bridge0 tap0
```

Now i wanted to see if a host in virtualbox with bridge mode network to tap0 ( http://golanzakai.blogspot.ro/2012/01/openvswitch-with-virtualbox.html  - here You can see what I mean)  would make the guest machine member of my network through openvswitch.
It seems it  doesn`t work, i`ve tried also with re0, the wired interface as a member of opnvswitch, nothing.
If I create the bridge manually and add tap0 and re0 to as members it works.
Any suggestions?


----------



## emaste@ (Sep 6, 2012)

Claud said:
			
		

> If I create the bridge manually and add tap0 and re0 to as members it works.
> Any suggestions?



Can you explain what you mean by "create the bridge manually?"

I would also suggest trying host-only networking, but you may then experience the issue described by https://www.virtualbox.org/pipermail/vbox-dev/2012-August/005316.html.


----------



## Claud (Sep 7, 2012)

emaste@ said:
			
		

> Can you explain what you mean by "create the bridge manually?"
> 
> I would also suggest trying host-only networking, but you may then experience the issue described by https://www.virtualbox.org/pipermail/vbox-dev/2012-August/005316.html.



Hi,
Ok, on creating the bridge manually I meant by using 
	
	



```
ifconfig bridge create
```
 and after that

```
ifconfig tap create
```
 and 
	
	



```
ifconfig bridge0 addm tap0 addm re0 up
```
.So it was a way to test if by creating a virtualbox bridge interface to tap0 i was able to provide my guest access to my network. It worked.
This was for testing.
If I do the same, with openvswitch, create the bridge, the tap interface, add also the port re0 and i make Virtualbox guest bridge the tap0 interface, my guest cannot access the network.
The ideea is like this:
[physical roter] -> [re0] - [tap0 in bridge0 with re0] - [ virtuabox network bridge to tap0]

I`ve added even a test with vboxnet0 as port in openvswitch , no luck.

If we can make some more test please say what and i will provide logs. I hope you understand what i want to test.(The guest machines as  a member of the same network with the host, with openvswitch)


----------



## pheonix (Nov 20, 2015)

Correct me if I'm mistaken, but if you create the bridge manually then you are not using openvswitch!


----------



## SirDice (Nov 20, 2015)

pheonix please look at the date of the last post. You're responding to a thread that's three years old.


----------



## pheonix (Nov 24, 2015)

iI know, but this was the most relevant post iI found concerning the issues iI have.


----------

