I figured it out. For the openvswitch I used the following configuration. The hypervisor connects to the internal vlan. Later, you can see where I can connect the vms to the external vlan by changing the vlan it is connected to.
``` allow-ovs br0 iface br0 inet manual ovs_type OVSBridge ovs_ports eth0 allow-ovs vlan1 iface vlan1 inet dhcp ovs_bridge br0 ovs_ports eth0 ovs_type OVSPort ovs_options tag=1 ovs_extra set interface vlan1 type=internal allow-br0 eth0 iface eth0 inet manual ovs_bridge br0 ovs_type OVSPort ``` On my openwrt, I have the following. On two of the ports, it has tagged vlans. ``` config interface 'lan' option ifname 'eth0.1' option type 'bridge' option proto 'static' option ipaddr '192.168.1.1' option netmask '255.255.255.0' option ip6assign '60' config interface 'wan' option ifname 'eth0.2' option type 'bridge' option proto 'static' option ipaddr '173.228.81.239' option netmask '255.255.255.0' option gateway '173.228.81.1' option dns '173.228.81.232 208.201.224.11' config interface 'wan2' option interface 'br-wan' option proto 'static' option ipaddr '192.168.2.1' option netmask '255.255.255.0' config interface 'wan6' option ifname '@wan' option proto 'dhcpv6' config switch option name 'switch0' option reset '1' option enable_vlan '1' config switch_vlan option device 'switch0' option vlan '1' option ports '0t 2 4t 5t' config switch_vlan option device 'switch0' option vlan '2' option ports '0t 1 3 4t 5t' ``` And with my xen VMs, I can connect them to the vlan of choice using the following. ``` # Networking # dhcp = 'dhcp' vif = [ 'mac=00:16:3E:D4:36:71,bridge=br0.1' ] ``` Now to get nflow data out of the switch! On Mon, Jan 15, 2018 at 03:38:35PM -0800, Brian E. Lavender wrote: > I put openvswitch on Debian. If I connect the machine up to a regular > lan with no vlans, I can configure an IP address with the following it > will show br0 getting an IP address. > > llow-ovs br0 > iface br0 inet dhcp > ovs_type OVSBridge > ovs_ports eth0 > > allow-br0 eth0 > iface eth0 inet manual > ovs_bridge br0 > ovs_type OVSPort > > But, I have another setup where the wire coming in on eth0 has trunked > vlans. I would like to have some sort of network interface that connects > to vlan 1 on the trunk. I have yet to figure this out. Any tips? > > > > Thanks, > > brian > -- > Brian Lavender > http://www.brie.com/brian/ > > "There are two ways of constructing a software design. One way is to > make it so simple that there are obviously no deficiencies. And the other > way is to make it so complicated that there are no obvious deficiencies." > > Professor C. A. R. Hoare > The 1980 Turing award lecture > > _______________________________________________ > vox-tech mailing list > vox-tech@lists.lugod.org > http://lists.lugod.org/mailman/listinfo/vox-tech -- Brian Lavender http://www.brie.com/brian/ "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." Professor C. A. R. Hoare The 1980 Turing award lecture _______________________________________________ vox-tech mailing list vox-tech@lists.lugod.org http://lists.lugod.org/mailman/listinfo/vox-tech