[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:

in_port(3),eth(src="" packets:2, bytes:140, used:2.880s, actions:push_vlan(vid=3003,pcp=0),0,pop_vlan,2,push_vlan(vid=3003,pcp=0),1





On Tue, Jun 12, 2012 at 1:42 PM, pf shineyear <shinepf@xxxxxxxxx> wrote:
i think it could be the intel 82576 drive problem, https://forums.citrix.com/thread.jspa?threadID=280048&start=0&tstart=135

i can not follow the post thread because it's use xenserver and all upgrade package is for xenserver, 

i use ubuntu 12.04 with xcp , not fit for, so,

i try to upgrade igb to newest version , 3.4.7 but still not work with vlan tag.


On Mon, Jun 11, 2012 at 1:11 PM, pf shineyear <shinepf@xxxxxxxxx> wrote:
i just want to diff vm use diff vlan, why it's so difficult~~


On Mon, Jun 11, 2012 at 1:09 PM, pf shineyear <shinepf@xxxxxxxxx> wrote:
i think maybe im wrong?

the xe network-create and xe vlan-create is only for xcp bridge mode??

if i use openvswitch i should only use ovs tool to add vlan config??

what should i do ?


On Mon, Jun 11, 2012 at 12:48 PM, pf shineyear <shinepf@xxxxxxxxx> wrote:
hi all , 

i use ubuntu 12.04 with xcp , all config run very well except vlan

i use xe network-create and xe vlan-create to build vlan 3000

then startup a vm in this network, xapi0 fakebridge and vif1.0 all looks well, 

use ovs-vsctl list port i can see xapi0 and vif1.0 have beed taged with 3000

but i can not access the internent~~~

somebody can help me with this?

thanks.





_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.