Rebecca, `dpctl del-flows` let you delete the flows you installed. For example, suppose you have three openflow entries. 1) in_port=1,dl_dst=00:00:00:00:00:01,actions=output:2 2) in_port=1,actions=output:2 3) in_port=2,actions=output:3
The command dpctl del-flows unix:/var/run/dp0 in_port=1 will delete all flow entries that match "in_port=1", i.e., delete both the 1st and 2nd entries. dpctl --strict del-flows unix:/var/run/dp0 in_port=1 will delete only the 2nd flow entry (notice "--strict" option). dpctl --strict del-flows unix:/var/run/dp0 will delete all three entries. dpctl has lot more features. Run `man dpctl` to learn them (or `nroff -man dpctl.8 | less`) And.. you said in your first email that you're using POX. Why you need to install flow tables manually? (Why not let POX install them?) - Masa On May 16, 2012, at 8:09 PM, Rebecca Last Name wrote: > Thnaks Masa! Now i have a clearer picture for what i am doing. I have add > flow to the wrong port, that's why i cannot ping the host. I have 1 more > question. How can i delete the flow i added previously?? Thank you! > > Hi Swan, looking forward to hear your answer. =) Thanks! > > From: Masayoshi Kobayashi <mkoba...@stanford.edu> > To: Rebecca Last Name <rebecca_chan...@yahoo.com> > Cc: "openflow-discuss@lists.stanford.edu" > <openflow-discuss@lists.stanford.edu> > Sent: Thursday, 17 May 2012 10:56 AM > Subject: Re: [openflow-discuss] How to add flow correctly? > > Hi Rebecca, > > The 2nd add-flow command does not make sense to me (both incoming port and > outgoing port are port 2). > From the 1st add-flow command, I assume your hosts are attached to port 1 and > port 3 (nf2c0 and nf2c2). > If so, the 2nd add-flow command should be: > dpctl add-flow unix:/var/run/dp0 in_port=3,actions=output:1 > (you don't need to specify "*" for wildcarding fields). > > > Another question is, do in_port=3 refers to nf2c3? what is output:1 and > > output:2? > > If you create openflow datapath by > > ./openflow/udatapath/ofdatapath --detach punix:/var/run/dp0 -d 004E46324304 > > -i nf2c0,nf2c1,nf2c2,nf2c3 > then nf2c0, nf2c1, nf2c2, nf2c3 are referred as port 1, 2, 3, 4 in dpctl (and > OpenFlow protocol), respectively. > For example, a command `dpctl add-flow unix:/var/run/dp0 > in_port=3,actions=output:1` installs a flow entry > that forwards all the packets arriving port nf2c2 to port nf2c0. > > Hope this helps. > > - Masa > > On May 16, 2012, at 7:23 PM, Rebecca Last Name wrote: > > > Hi everyone. > > > > I'm having difficulties to add flow to the switch. > > > > I assigned the datapath-id using the command below: (obtain from: > > http://yuba.stanford.edu/foswiki/bin/view/OpenFlow/Deployment/HOWTO/LabSetup#3_2_Setup_OpenFlow_Switch_on_Net) > > ./openflow/udatapath/ofdatapath --detach punix:/var/run/dp0 -d 004E46324304 > > -i nf2c0,nf2c1,nf2c2,nf2c3 > > > > I'm using POX controller and the switch can communicate with the > > controller. But i'm having problem to ping the 2 computer hosts. > > I added the flow using : > > dpctl add-flow unix:/var/run/dp0 > > in_port=3,dl_vlan=*,dl_src=*,dl_dst=*,dl_type=*,nw_src=*,nw_dst=*,nw_proto=*,tp_src=*,tp_dst=*,icmp_type=*,icmp_code=*,actions=output:1 > > dpctl add-flow unix:/var/run/dp0 > > in_port=2,dl_vlan=*,dl_src=*,dl_dst=*,dl_type=*,nw_src=*,nw_dst=*,nw_proto=*,tp_src=*,tp_dst=*,icmp_type=*,icmp_code=*,actions=output:2 > > > > Then, I dpctl dump-flows unix:/var/run/dp0 > > The result is > > stats_reply (xid=0xff3765f9): flags=none type=1(flow) > > cookie=0, duration_sec=16s, duration_nsec=911000000s, table_id=1, > > priority=32768, n_packets=0, n_bytes=0, > > idle_timeout=60,hard_timeout=0,in_port=3,actions=output:1 > > > > Actually i do not understand the meaning of those arguments inside the > > add-flow command. Can someone please explain to me? After i added the flow, > > my computer hosts still cannot ping each other. Do i add flow correctly? > > > > Another question is, do in_port=3 refers to nf2c3? what is output:1 and > > output:2? > > Hope to hear from you all soon. Thank you very much! > > _______________________________________________ > > openflow-discuss mailing list > > openflow-discuss@lists.stanford.edu > > https://mailman.stanford.edu/mailman/listinfo/openflow-discuss > > - Masa > > > - Masa _______________________________________________ openflow-discuss mailing list openflow-discuss@lists.stanford.edu https://mailman.stanford.edu/mailman/listinfo/openflow-discuss