Hi,

There are many ways to do this and none of this is particularly more
appealing.  If you are using Python, you can try dpkt or scapy.
Handcrafting it is not that bad for ARP either.  If you are using
C/C++, I do not know of nice libraries to use here so anyone who has
any idea can educate me too.

In general, you can craft all sort of packets in NOX and it is not
clear than NOX is responsible for support that.

Regards
KK

On 16 February 2011 13:20, Bob Lantz <rla...@cs.stanford.edu> wrote:
> Generating ARPs in OpenFlow is a frequently encountered problem (a FEP?)!! 
> And how to do so conveniently and correctly might be something of what I call 
> a FABNAQ - a Frequently Asked But Never (or rarely adequately) Answered 
> Question. (FABNAQs are great because they generate lots of Google results 
> which don't actually answer the question.)
>
> So, if you have working code to generate correct ARP replies, I think sending 
> it to the list would be helpful for posterity!
>
> Also, for NOX developers - what is the preferred easy way to generate ARP 
> packets? If it's not simple or convenient, is there a way to make it more so?
>
> -Bob
>
> On Feb 16, 2011, at 12:18 PM, Niky Riga wrote:
>
>> Hi Aaron,
>>
>> that might not be an issue at all, but I don't see in your code where you 
>> set the ethernet headers (basically the src and dst) for the arp reply.
>>
>> If you want, I have some code that I wrote a while back to send arp replies, 
>> that seemed to work as expected. I can forward it along if this is helpful.
>>
>> --niky
>>
>> On 2/16/11 2:59 PM, Aaron Rosen wrote:
>>> Hello,
>>>
>>> I'm trying to send arp replies from my nox controller though for some
>>> reason my packets don't seem to be getting sent out and I was hoping
>>> someone could point out where I'm going wrong. This is the code I
>>> have:
>>>
>>>      if packet.type == ethernet.ARP_TYPE:
>>>             arppacket = arp.arp(packet.next.arr, packet.next.prev)
>>>             if arppacket.opcode == arppacket.REQUEST:
>>>                 tmp_dst = arppacket.protodst
>>>                 arppacket.protodst =  arppacket.protosrc
>>>                 arppacket.protosrc =  tmp_dst
>>>                 arppacket.hwdst = arppacket.hwsrc
>>>                 arppacket.hwsrc = mac_to_int('\xd2\x85\xde\x8e\xf6\x13')
>>>                 arppacket.opcode = arppacket.REPLY
>>>                 packet.next = arppacket;
>>>                 self.send_openflow(dpid, None, packet.arr,
>>> openflow.OFPP_FLOOD, inport);
>>>                 print "ARP REPLY SEND!!"
>>>                 return CONTINUE
>>>
>>> When I run tcpdump on the node that is sending the requests I does not
>>> see any of these packets.
>>>
>>> I'm trying to look at my openflow traffic with wireshark but for some
>>> reason I'm not seeing any. Though at my controller I'm definitely
>>> getting the packets. (I think this may because I'm using mininet? I've
>>> tried all the interfaces on my machine in wireshark). Though when I
>>> try this using the Openflow Tutorial provided VM i'm also not seeing
>>> any 'of' packets in wireshark there? (Any idea why)?
>>>
>>> Thanks,
>>>
>>> Aaron
>>>
>>>
>>>
>>
>> _______________________________________________
>> nox-dev mailing list
>> nox-dev@noxrepo.org
>> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
>
>
> _______________________________________________
> nox-dev mailing list
> nox-dev@noxrepo.org
> http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
>

_______________________________________________
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org

Reply via email to