[pox-dev] ARP request

Muhammad Furqan Gagan furqan.gagan at gmail.com
Thu Nov 14 14:13:07 PST 2013


Hy…

The links were useful but still I am getting this same buffer error.. I tried to change buffer id to 0XFFF…

but no luck 

in my controller I am creating separate object for every switch … I know this error might have some reason for this.. but now I cannot change my initial logic

so any ideas to resolve this error… ??

Thanks

MuhammAd

On Nov 13, 2013, at 3:15 PM, Amer <amer7777 at hotmail.com> wrote:

> Hello,
> 
> You can use:
> 1. Broadcast something as following
>   If match.dl_type = packet.ARP :
>       match.src=Packet.src
>       match.dst=packet.dst
>       action = FLOOD
> 
> 2. Set the ARP in each for each hosts using new version of mininet
> check this post in mininet archive
> https://mailman.stanford.edu/pipermail/mininet-discuss/2013-October/003258.html
> 
> 
> 3. Read MAC addresses from a file
> 
> http://pieknywidok.blogspot.com/2012/08/arp-and-ping-in-pox-building-pox-based.html?m=1
> 
> 4. Learn ARP/MAC address
> this how to learn MAC and can be used to respond to ARP if coupled with previous code 
> 
> http://lists.noxrepo.org/pipermail/pox-dev-noxrepo.org/2013-November/001190.html
> 
> I hope this is helpful
> 
> Thanks regards,
> Amer
> Sent from my iPhone
> 
> On ١٣‏/١١‏/٢٠١٣, at ١١:١٣ م, Muhammad Furqan Gagan <furqan.gagan at gmail.com> wrote:
> 
>> After implementing my this ARP code in my controller I am recieving this error:
>> 
>> ERROR:openflow.of_01:[00-00-00-00-00-03 4] OpenFlow Error:
>> [00-00-00-00-00-03 4] Error: header:
>> [00-00-00-00-00-03 4] Error:   version: 1
>> [00-00-00-00-00-03 4] Error:   type:    1 (OFPT_ERROR)
>> [00-00-00-00-00-03 4] Error:   length:  76
>> [00-00-00-00-00-03 4] Error:   xid:     117
>> [00-00-00-00-00-03 4] Error: type: OFPET_BAD_REQUEST (1)
>> [00-00-00-00-00-03 4] Error: code: OFPBRC_BUFFER_EMPTY (7)
>> [00-00-00-00-00-03 4] Error: datalen: 64
>> [00-00-00-00-00-03 4] Error: 0000: 01 0e 00 58 00 00 00 75  00 00 00 00 00 03 00 00   ...X...u........
>> [00-00-00-00-00-03 4] Error: 0010: 00 00 00 02 00 00 00 00  00 01 ff ff 00 00 08 06   ................
>> [00-00-00-00-00-03 4] Error: 0020: 00 01 00 00 0a 00 00 02  0a 00 00 01 00 00 00 00   ................
>> [00-00-00-00-00-03 4] Error: 0030: 00 00 00 00 00 00 00 00  00 00 00 0a 00 1e 80 00   …………….
>> 
>> Any ideas how to overcome?
>> 
>> Thanks
>> 
>> Muhammad
>> 
>> On Nov 13, 2013, at 1:03 PM, Muhammad Furqan Gagan <furqan.gagan at gmail.com> wrote:
>> 
>>> I have implemented this code to handle ARP.. is it ok ? I am not sure about that.. need your comments please
>>> 
>>>         a= packet.find('arp')
>>>         if a:
>>>             if a.prototype == arp.PROTO_TYPE_IP:
>>>                 if a.hwtype == arp.HW_TYPE_ETHERNET:
>>>                     if a.protosrc != 0:
>>>                         if a.protosrc in arp_tale:
>>>                             if a.hwsrc == True:
>>>                                 Mac = EthAddr(a.hwsrc)
>>>                                 arp_table[a.protosrc] = Mac:
>>> 
>>>               
>>>             if a.opcode == arp.REQUEST:
>>>             # Maybe we can answer
>>> 
>>>             if a.protodst in arp_table:
>>>                 r = arp()
>>>                 r.hwtype = a.hwtype
>>>                 r.prototype = a.prototype
>>>                 r.hwlen = a.hwlen
>>>                 r.protolen = a.protolen
>>>                 r.opcode = arp.REPLY
>>>                 r.hwdst = a.hwsrc
>>>                 r.protodst = a.protosrc
>>>                 r.protosrc = a.protodst
>>>                 Mac = arp_table[a.protodst]
>>>                 
>>>                 Mac = _dpid_to_mac(dpid)
>>>                 r.hwsrc = Mac
>>>                 e = ethernet(type=packet.type, src=_dpid_to_mac(dpid),
>>>                 dst=a.hwsrc)
>>>                 e.payload = r
>>>                 log.info("%s answering ARP for %s" % (dpid_to_str(dpid),
>>>                 str(r.protosrc)))
>>>                 msg = of.ofp_packet_out()
>>>                 msg.data = e.pack()
>>>                 msg.actions.append(of.ofp_action_output(port =
>>>                                                           of.OFPP_IN_PORT))
>>>                 msg.in_port = inport
>>>                 event.connection.send(msg)
>>>                      
>>>             else:
>>>                 msg = of.ofp_packet_out()
>>>                 msg.actions.append(of.ofp_action_output(port = of.OFPP_FLOOD))
>>>                 msg.data = event.ofp
>>>                 event.connection.send(msg.pack())
>>> 
>>> Thanks
>>> 
>>> Muhammad
>>> 
>>> On Nov 13, 2013, at 12:56 PM, Murphy McCauley <murphy.mccauley at gmail.com> wrote:
>>> 
>>>> Durga is spot on, but I'll throw in another couple things you might look at:
>>>> forwarding.l3_learning handles ARP
>>>> proto.arp_helper attempts to make it easier to work with ARP
>>>> 
>>>> (Oh, and misc.arp_responder has moved to proto.arp_responder in newer versions.)
>>>> 
>>>> -- Murphy
>>>> 
>>>> On Nov 13, 2013, at 2:06 AM, durga <c.vijaya.durga at gmail.com> wrote:
>>>> 
>>>>> 
>>>>> hello,
>>>>> Seems pox supports packet type as arp, can be found here (pox / pox / lib / packet / arp.py ), as well as may be you can get some help by refering to the below example.
>>>>>  pox / pox / misc / arp_responder.py 
>>>>> 
>>>>> Cheers!
>>>>> Durga
>>>>> 
>>>>> 
>>>>> 
>>>>> On Wed, Nov 13, 2013 at 8:35 PM, Muhammad Furqan Gagan <furqan.gagan at gmail.com> wrote:
>>>>> Hello,
>>>>> 
>>>>> Any one know how to handle ARP request in controller?
>>>>> 
>>>>> Thanks
>>>>> 
>>>>> Muhammad
>>>>> 
>>>> 
>>> 
>> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.noxrepo.org/pipermail/pox-dev-noxrepo.org/attachments/20131114/345a12c9/attachment-0002.htm>


More information about the pox-dev mailing list