Hi,
I have done some simple modifications to simple_switch_13.py based on your
previous instruction, I am getting strange switch behavior which can be
seen after dumping switch flow table, even ping sometimes doesn't work
between pc in port 1 and port 6 even when flows are installed..in my
opinion flows are forwarded to incoming port and output port(see flow table
below..am I correct..?).....
Basically what I'm trying is to set up flows only between two switch ports
(pica8) or to be able to direct traffic from one incoming port (e.g
in_port =1 to just one or two other ports)...simply just using out_port=6
(destination switch port number) doesn't seem to work for me properly..is
there anything else I can do to improve the code below....thanks
.... ........................
# learn a mac address to avoid FLOOD next time.
self.mac_to_port[dpid][src] = in_port
out_port=6
actions = [parser.OFPActionOutput(out_port)]
# install a flow to avoid packet_in next time
match= parser.OFPMatch(in_port=in_port,eth_dst=dst)
self.add_flow(datapath, 1, match, actions)
data = None
msg.buffer_id == ofproto.OFP_NO_BUFFER
data = msg.data
out = parser.OFPPacketOut(datapath=datapath,
buffer_id=msg.buffer_id,
in_port=in_port, actions=actions,
data=data)
datapath.send_msg(out)
.............
root@PicOS-OVS#ovs-ofctl dump-flows br0
OFPST_FLOW reply (OF1.3) (xid=0x2):
cookie=0x0, duration=70.497s, table=0, n_packets=15, n_bytes=900,
priority=0 actions=CONTROLLER:65535
cookie=0x0, duration=67.663s, table=0, n_packets=30, n_bytes=3008,
priority=1,in_port=6,dl_dst=5c:26:0a:48:0e:08 actions=output:6
cookie=0x0, duration=67.709s, table=0, n_packets=31, n_bytes=3136,
priority=1,in_port=1,dl_dst=ff:ff:ff:ff:ff:ff actions=output:6
P.S. this dl_dst=5c:26:0a:48:0e:08 is unknown
dl_dst=5c:26:0a:48:0e:01 belongs to port 6 (instead)...
I am sorry for this question but this is the only way for me to learn
better the functionality between switch and ryu controller..
Anna
On Wed, Feb 19, 2014 at 11:35 PM, FUJITA Tomonori <
[email protected]> wrote:
> On Wed, 19 Feb 2014 16:33:28 +0000
> Anna kos <[email protected]> wrote:
>
> > Hi there,
> >
> > I working on pica8 switches and using ryu controller for SDN research. I
> am
> > sorry if my question will sound so dull but I have tried to manipulate
> many
> > ways with codes and matching field but I cannot succeed the result.
> >
> > Initially what I'm trying to do is just set up flow between two switch
> > ports, tried to make changes to simple_switch_13.py so instead of packet
> > flooding all ports as in normal switch I only wanted packet to go to
> > certain ports...I have been trying for days and days and I have not been
> > able to do it...can you please help me with a practical example on how to
> > do the code..please help I need to do this 'simple' stuff asap so I'd
> move
> > on !!!
>
> simple_switch_13.py has the code to send packets to a certain port
> instead of flooding to all ports.
>
> https://github.com/osrg/ryu/blob/master/ryu/app/simple_switch_13.py#L83
>
> As you can see, out_port is OFPP_FLOOD or a certain port number. The
> latter is for you, use the number as an argument for OFPActionOutput:
>
> https://github.com/osrg/ryu/blob/master/ryu/app/simple_switch_13.py#L88
>
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel