[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-API] xcp + ubuntu + openvswitch VLAN problem
i giveup the vlan , change to openflow , i changed the vif script in /usr/lib/xcp/script/ add a function like that: handle_openflow_script() { local action="">
local domid=$2 local devid=$3 local MACID=$(ovs-vsctl get interface vif${domid}.${devid} external_ids:attached-mac) local OFPORT=$(ovs-vsctl get interface vif${domid}.${devid} ofport)
MACID="${MACID%\"}" MACID="${MACID#\"}" echo "$action domid $domid devid $devid macid $MACID ofport $OFPORT" >> /root/odp-base.txt case "$action" in online|move) #icmp ret=$(ovs-ofctl add-flow xenbr1 in_port=${OFPORT},dl_type=0x0800,nw_proto=1,dl_src=${MACID},priority=2,idle_timeout=0,action="">
#tcp ret=$(ovs-ofctl add-flow xenbr1 in_port=${OFPORT},dl_type=0x0800,nw_proto=6,dl_src=${MACID},priority=2,idle_timeout=0,action=""> #udp ret=$(ovs-ofctl add-flow xenbr1 in_port=${OFPORT},dl_type=0x0800,nw_proto=17,dl_src=${MACID},priority=2,idle_timeout=0,action="">
#arp ret=$(ovs-ofctl add-flow xenbr1 in_port=${OFPORT},dl_type=0x0806,dl_src=${MACID},priority=2,idle_timeout=0,action=""> #other output from this port drop
ret=$(ovs-ofctl add-flow xenbr1 in_port=${OFPORT},priority=1,idle_timeout=0,action=""> #icmp ret=$(ovs-ofctl add-flow xenbr1 in_port=1,dl_type=0x0800,nw_proto=1,dl_dst=${MACID},priority=4,idle_timeout=0,action="">
#tcp ret=$(ovs-ofctl add-flow xenbr1 in_port=1,dl_type=0x0800,nw_proto=6,dl_dst=${MACID},priority=4,idle_timeout=0,action=""> #udp ret=$(ovs-ofctl add-flow xenbr1 in_port=1,dl_type=0x0800,nw_proto=17,dl_dst=${MACID},priority=4,idle_timeout=0,action="">
#arp ret=$(ovs-ofctl add-flow xenbr1 in_port=1,dl_type=0x0806,dl_dst=${MACID},priority=4,idle_timeout=0,action=""> #other input from this port drop
ret=$(ovs-ofctl add-flow xenbr1 in_port=1,priority=3,idle_timeout=0,action="">
;; remove|offline) ret=$(ovs-ofctl del-flows xenbr1 in_port=${OFPORT})
ret=$(ovs-ofctl del-flows xenbr1 in_port=1,dl_dst=${MACID}) ;; esac } and anytime when vm start or reboot or shutdown, it will be called.
On Tue, Jun 19, 2012 at 5:16 PM, pf shineyear <shinepf@xxxxxxxxx> wrote: still have this problem, alway recive this: _______________________________________________ Xen-api mailing list Xen-api@xxxxxxxxxxxxx http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |