I'm starting to "play" with openvswitch and networking staff so I am a little bit newbie. I'm trying to have the following implementation as it depicted in this figure:
implementation
Both interfaces are physical with a private IP assignement.
*The enO interface is a managament interface
I use this to create the ovs-bridge
ovs-vsctl add-br ovsBr
ip add add 192.168.200.1/24 dev ovsBr
What should I do next?
Thank you in advance
If it's an educational task of sorts, then I believe one may not suggest a correct solution without seeing the textual description of the task. However, if you need to create a bridge and add enp6s0f1 and enp6s0f2 to it, then you probably want to do the following:
ovs-vsctl add-br ovsBr
ovs-vsctl add-port ovsBr enp6s0f1
ovs-vsctl add-port ovsBr enp6s0f2
Related
I am not able to find anything related to packstack answer file. Lets says in normal ovs , eno2 and eno3 were mapped to physnet1 but now I am using above ports with below conf:
ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev
ovs-vsctl add-port br0 eno2 -- set Interface eno2 type=dpdk options:dpdk-devargs=0000:02:00.1
ovs-vsctl add-port br0 eno3 -- set Interface eno3 type=dpdk options:dpdk-devargs=0000:02:00.2
How to do I proceed ahead with answer file ?
Can I keep it same and same way configure network on physnet1 ?
BTW, I have installed and enabled ovs-dpdk on compute m/c but havent done any change in controller, do I need any change there also ?
My controller node is showing compute node status as down after compute node upgrade/conf to ovs-dpdk. Though it is able to ping it. I restarted rabbitmq-server also but that didn't help.
If no change in controller, then How Can I associate above created bridge to Vm instance as those cmd ie openstack server add port needs to be executed in controller. Looks like I am missing on reading fully on ovs-dpdk usage.
I am new to Mininet and created a topology. I need to enable ECN in the switch created in the mininet topology.
How to enable ECN in the switch?
Thanks in advance
Regards
Hassaan Afridi
Since you use OVS version 2.0.2 your switch supports at least up to OpenFlow version 1.3. Explicit Congestion Notification (ECN) fields implemented from OpenFlow ver 1.1 and above. In order for the field to be applied thought you have to tell to mininet that you are going to use a version above 1.0 which is the default. To launch the mininet topo we have to go with a remote controller so we can pass flow modifications manually. To start mininet in the terminal we go with
sudo mn --topo single,3 --mac --controller remote --switch ovsk,protocols=OpenFlow13
Mininet is ok but we have to create a bridge to talk to the switch and there we will tell the switch that by this bridge we will pass OpenFlow ver 1.3 flow modifications. To do that in a new terminal we ssh at the mininet vm and we create the bridge with
sudo ovs-vsctl set bridge s1 protocols=OpenFlow13
So now we have a door opened to the switch to talk to and pass our flow mods in which we must define the openflow protocol version again. For a single mod we can do something like
sudo ovs-ofctl -O OpenFlow13 add-flow s1 in_port=1,actions=output:2
and
sudo ovs-ofctl -O OpenFlow13 add-flow s1 in_port=2,actions=output:1
Now we have passed 2 flow modifications manually and the ping between h1 and h2 should work perfectly. To install ECN flow mods we can do something like
sudo ovs-ofctl -O OpenFlow13 add-flow s1 dl_type=0x0800,nw_ecn=3,actions=output:3
Notice that as stated in the documentation of OpenFlow
When dl_type=0x0800 or 0x86dd is specified,matches the ecn bits in IP ToS or IPv6 traffic class fields .When dl_type is wildcarded or set to a value other than 0x0800 or 0x86dd, the value of nw_ecn is ignored
I found most of the configuration is for giving static or private network. But I want it to act as a different machine so it will get a separate IP address from the DHCP and I want to do it through nmcli.
Thanks in advance.
If you are using docker as tagged, rather than LXC, use pipework to map the wlan interface from the host to the container
pipework eth2 $CONTAINERID 10.10.9.9/24
or alternatively let the container do the dhcp negotiation for you
pipework eth1 $CONTAINERID dhclient
This setup is based on a macvlan interface so the same concept should work with LXC you just won't get the easy front end.
I'm confused if this is a docker question or an LXC question.
EDIT: as per the comments, wlan interface support in a bridge depends on the wlan vendor. It may work, or it may not work at all.
In any case, you should be able to create a bridge, add your wlan0 interface to the bridge, and then have your LXC container connect to this bridge directly. Then, when you run your DHCP client in the container, it will grab it from the wlan0 interface.
Configure bridge (manually for now)
# ifconfig wlan0 up
# brctl addbr br0
# brctl addif br0 wlan0
# ifconfig br0 up
# dhclient br0
Configure LXC configuration
If using traditional priviliged LXC, edit the container's config file at /var/lib/lxc/$NAME/config,
and update this value to point to your new bridge.
lxc.network.link = br0
Run DHCP in container
# lxc-attach -n $NAME
# dhclient eth0
# ip a
If the output to ip a shows the desired IP, you're all set!
If you want to make the configuration persistent, you'll have to add the bridge to your /etc/network/interfaces file.
IEEE 802.11 doesn’t like multiple MAC addresses on a single client, so bridge and macvlans are not the right solution here.
Use ipvlan in L2 mode.
I was setting up a openstack configuration using this document:
http://docs.openstack.org/juno/install-guide/install/apt/openstack-install-guide-apt-juno.pdf
and got to page 72 where it says to do this:
# ovs-vsctl add-port br-ex INTERFACE_NAME
but i put the wrong INTERFACE_NAME, and now i have to correct that mistake (it is a real interface, but the wrong one, i was supposed to put another one in there).
But i have trouble undoing that.
I tried:
# ovs-vsctl del-port br-ex INTERFACE_NAME
but it tells me that /etc/openvswitch/conf.db (or something like that) is read-only
i then tried
# ovs-vsctl del-br br-ex
Bu then it says that you cant just delete a port, you need to delete the entire bridge (or something like that). Which is wierd to me, i thought that that command would delete the bridge...
So does anyone know the correct way to delete the port i mistakenly made?
EDIT: And i tried all that as root.
EDIT2: I just tried on a practice machine do the same thing, make the same error and then fix it with:
# ovs-vsctl del-port br-ex INTERFACE_NAME
and it worked, no read-only nonesense, so i really dont get it.
Any suggestions?
I am planning on using KVM in order to virtualize some GNU/Linux and Windows machines at home.
My physical network is 1gbe using Link Aggregation at some stages. In the worst case, it's still 1gbe though.
I am wondering if it is possible to "emulate" 10gbe ethernet (or anything faster than 1gbe) between two virtual machines on the same host (or one VM and the host itself) by avoiding the physical network altogether. I think for this to work they'll need to be in the same network, connected to the same virtual switch and VLAN.
Yes.
Create a bridge using brctl tool on the host:
brctl addbr vm-bridge
ifconfig vm-bridge up
For each VM specify virtio-net NIC and add them to the bridge.
Create qemu-ifup script:
#!/bin/sh
switch=vm-bridge
/sbin/ifconfig $1 promisc 0.0.0.0
/usr/sbin/brctl addif ${switch} $1
Specify this script in "-netdev" parameter of QEMU:
-netdev tap,id=net1,vhost=on,script=/home/user/qemu-ifup,ifname=vm_net1