Hi,

There is never a direct communication from Controller to the Host. The
controller speaks only to the switch.
So i don't think its possible to send data to the host directly.

However, your application may create a new packet with "*the data you want
to send*" as the *payload* and set the *nw_dst* field of the packet with
the target host's IP address.

Regards
Hadem

On Fri, Aug 26, 2016 at 1:47 PM, Alan Wang <[email protected]> wrote:

> Hi,
>
> I want to send packets from controller to HOST.
>
> I tried to use packet_out message,but failed.
>
> I guess packet_out message is only sent from controller to switch.
>
> Am i wrong? Can anyone help me to solve ?
>
> Thanks,
>
> Alan
>
>
>
>
>
>
>
>
> 2016-08-09 8:55 GMT+08:00 Yi Tseng <[email protected]>:
>
>>
>> Hi Alan,
>>
>> To receive packet generated from controller, you can use scapy, it's a
>> packet manipulation python library.
>>
>> For example, you can use sniff function from scapy and sniff capture
>> packet from host interface.
>>
>> http://www.secdev.org/projects/scapy/doc/usage.html#sniffing
>>
>>
>>
>> 2016-08-08 21:09 GMT+08:00 Alan Wang <[email protected]>:
>>
>>> HI,
>>>
>>> Thanks for tour reply!!
>>>
>>> However I want to use these data sent from the controller at host.
>>>
>>> How to receive packets from the controller and transfer it to txt file
>>> at the host?
>>>
>>> Thanks,
>>>
>>> Alan
>>>
>>> 2016-08-08 21:08 GMT+08:00 Alan Wang <[email protected]>:
>>>
>>>> HI,
>>>>
>>>> Thanks for tour reply!!
>>>>
>>>> However I want to use these data sent from the controller at host.
>>>>
>>>> How to receive packets from the controller and transfer it to txt file
>>>> at the host?
>>>>
>>>> Thanks,
>>>>
>>>> Alan
>>>>
>>>>
>>>>
>>>> 2016-08-08 10:51 GMT+08:00 Yi Tseng <[email protected]>:
>>>>
>>>>> Maybe you can use tcpdump or use scapy to receive specific interface?
>>>>>
>>>>> 2016-08-07 21:13 GMT+08:00 Alan Wang <[email protected]>:
>>>>>
>>>>>> HI,
>>>>>>
>>>>>> Thanks for your reply!!
>>>>>>
>>>>>> Can i get data from packet-out message in the computer of the host?
>>>>>>
>>>>>> for example:
>>>>>>
>>>>>> http://osrg.github.io/ryu-book/en/html/packet_lib.html#gener
>>>>>> ation-of-packets-serialization
>>>>>>
>>>>>> Application example
>>>>>>
>>>>>> Can i get data from host? Where data wiil be stored in the computer
>>>>>> of the host?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Alan
>>>>>>
>>>>>> 2016-08-05 13:31 GMT+08:00 Iwase Yusuke <[email protected]>:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> Please refer to the 'data' attribute of OFPPacketOut.
>>>>>>> You can set a binary type value, which you want send, into this
>>>>>>> attribute.
>>>>>>>   e.g.)
>>>>>>>     req = ofp_parser.OFPPacketOut(datapath, buffer_id,in_port,
>>>>>>> actions,
>>>>>>>                                   data=<BINARY_TYPE_VALUE>)
>>>>>>>
>>>>>>> FYI: For building a binary type packet data, Ryu provides the packet
>>>>>>> libraries.
>>>>>>> 'bin_packet' in the following example is a binary type value to send.
>>>>>>>   http://osrg.github.io/ryu-book/en/html/packet_lib.html#gener
>>>>>>> ation-of-packets-serialization
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Iwase
>>>>>>>
>>>>>>>
>>>>>>> On 2016年08月05日 14:19, Alan Wang wrote:
>>>>>>>
>>>>>>>> HI,
>>>>>>>>
>>>>>>>> Thanks for your reply!!
>>>>>>>>
>>>>>>>>
>>>>>>>> def send_packet_out(self, datapath, buffer_id, in_port):
>>>>>>>>
>>>>>>>>     ofp = datapath.ofproto
>>>>>>>>     ofp_parser = datapath.ofproto_parser
>>>>>>>>
>>>>>>>>     actions = [ofp_parser.OFPActionOutput(ofp.OFPP_FLOOD, 0)]
>>>>>>>>     req = ofp_parser.OFPPacketOut(datapath, buffer_id,in_port,
>>>>>>>> actions)
>>>>>>>>     datapath.send_msg(req)
>>>>>>>>
>>>>>>>>
>>>>>>>> In these codes of the example, i can't find data the controller
>>>>>>>> send.
>>>>>>>>
>>>>>>>> I think it can't send data what i want to send.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> Alan
>>>>>>>>
>>>>>>>>
>>>>>>>> 2016-08-05 12:04 GMT+08:00 Iwase Yusuke <[email protected]
>>>>>>>> <mailto:[email protected]>>:
>>>>>>>>
>>>>>>>>     Hi,
>>>>>>>>
>>>>>>>>     You can use Packet-Out messages for such purpose, I guess.
>>>>>>>>       http://ryu.readthedocs.io/en/latest/ofproto_v1_3_ref.html#ry
>>>>>>>> u.ofproto.ofproto_v1_3_parser.OFPPacketOut <
>>>>>>>> http://ryu.readthedocs.io/en/latest/ofproto_v1_3_ref.html#r
>>>>>>>> yu.ofproto.ofproto_v1_3_parser.OFPPacketOut>
>>>>>>>>
>>>>>>>>     Thanks,
>>>>>>>>     Iwase
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>     On 2016年08月05日 12:45, Alan Wang wrote:
>>>>>>>>
>>>>>>>>         Hi All,
>>>>>>>>
>>>>>>>>         I want to send some data controller collected from
>>>>>>>> Controller to Host.
>>>>>>>>
>>>>>>>>         What should i do ?
>>>>>>>>
>>>>>>>>         Thanks,
>>>>>>>>
>>>>>>>>         Alan.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>         ------------------------------
>>>>>>>> ------------------------------------------------
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>         _______________________________________________
>>>>>>>>         Ryu-devel mailing list
>>>>>>>>         [email protected] <mailto:
>>>>>>>> [email protected]>
>>>>>>>>         https://lists.sourceforge.net/lists/listinfo/ryu-devel <
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/ryu-devel>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ------------------------------------------------------------
>>>>>>>> ------------------
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Ryu-devel mailing list
>>>>>>>> [email protected]
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------
>>>>>> ------------------
>>>>>>
>>>>>> _______________________________________________
>>>>>> Ryu-devel mailing list
>>>>>> [email protected]
>>>>>> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Yi Tseng (a.k.a Takeshi)
>>>>> Taiwan National Chiao Tung University
>>>>> Department of Computer Science
>>>>> W2CNLab
>>>>>
>>>>> http://takeshi.tw
>>>>>
>>>>
>>>>
>>>
>>> ------------------------------------------------------------
>>> ------------------
>>>
>>> _______________________________________________
>>> Ryu-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>>
>>>
>>
>>
>> --
>> Yi Tseng (a.k.a Takeshi)
>> Taiwan National Chiao Tung University
>> Department of Computer Science
>> W2CNLab
>>
>> http://takeshi.tw
>>
>
>
> ------------------------------------------------------------
> ------------------
>
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>
>
------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to