0: Disabling NetworkManager or remove it
sudo apt-get purge network-manager
echo "manual" | sudo tee /etc/init/network-manager.override manual
sudo stop network-manager
1: install neutron
2:config eth0(/etc/network/interfaces.d/eth0.cfg)
auto eth0
iface eth0 inet manual
up ip link set dev $IFACE up
up ip link set $IFACE promisc on(only for VM NIC )
down ip link set $IFACE promisc off
down ip link set dev $IFACE down
up ip link set $IFACE promisc on(only for VM NIC )
down ip link set $IFACE promisc off
down ip link set dev $IFACE down
allow-hotplug br-ex
iface br-ex inet static
bridge_ports eth0
address 172.1.1.101
netmask 255.255.0.0
gateway 172.1.1.254
3.1 Remove default virbr0
During this process,
libvirt
creates a default virtual bridge (virbr0
) for the guests which you can check using :# virsh net-list --all |
Since we will be creating our own bridge using OVS and won’t need the default one, we can remove it :
# virsh net-destroy default # virsh net-autostart --disable default |
We can also remove
ebtables
as we will be using OVS instead of the default linux bridge :# aptitude purge ebtables |
3: ovs-vsctl add-port br-ex eth0
4: sudo /etc/init.d/networking restart
please make sure :
#ifconfig br-ex(ifconfig br-ex <ip> up ifconfig br-ex netmask 255.255.255.0)
#ip link set br-ex promisc on
#route -n(route add default gw <ip>
#ifup eth0
5:/etc/sysctl.conf
net.ipv4.ip_forward = 1
net.ipv4.conf.all.rp_filter=0
net.ipv4.conf.default.rp_filter=0
net.bridge.bridge-nf-call-ip6tables = 0
5:/etc/sysctl.conf
net.ipv4.ip_forward = 1
net.ipv4.conf.all.rp_filter=0
net.ipv4.conf.default.rp_filter=0
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0 net.bridge.bridge-nf-call-arptables = 0
Boot support (Ubuntu 14.04)
The boot support for the Openvswitch is implemented very different. It depends on the Openvswitch version, the Ubuntu version and the package repository. Up to now there is NO support to bring up the interfaces automatically. In any case, a patch is required.
All Ubuntu distributions are using Openvswitch packages(by November 2013), which do not have an openvswitch upstart script. One way to bring up interfaces here is using a few lines in /etc/rc.local or patching /etc/init.d/openvswitch-switch .
The necessary lines for /etc/rc.local would be:
$route add -net 10.0.0.0 netmask 255.255.255.0 dev eth0
$route add -net 10.0.0.0 netmask 255.255.255.0 gw 0.0.0.0
$route add -net 10.0.0.0 netmask 255.255.255.0 gw 0.0.0.0
1
2
3
4
5
6
7
8
|
#
# list the bridges
#
bridges=`awk '{ if ($1 == "allow-ovs") { print $2; } }' "${INTERFACES}"`
#
# and bring them up
#
[ -n "${bridges}" ] && ifup --allow=ovs ${bridges}
|
No comments:
Post a Comment