<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Are you getting *any* packets in the PacketIn handler?<div><br></div><div>Have you tried running the forwarding.l2_learning component?  Does it work?  Do you see it print log messages about installing table entries?</div><div><br></div><div>Have you read the last question of the POX FAQ?</div><div><br></div><div>-- Murphy</div><div><br></div><div><div><div>On Dec 20, 2013, at 2:58 AM, Nguyen Duc Thinh <<a href="mailto:ducthinh3081991@gmail.com">ducthinh3081991@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Dear Murphy,<div>I am student and learning about POX. i have some trouble when catch ICMP Packet, i handle it in def _handle_PacketIn(self, event) function. When i have a ICMP packet, i will print "----------------ping ICMP-----------------", but nothing happen when i ping in mininet. This is my function:</div>
<div><br></div><div><div>def _handle_PacketIn(self, event):</div><div>        swid = int(event.dpid)</div><div>        packet = event.parsed</div><div>        if packet.type == ethernet.LLDP_TYPE:</div><div>            return CONTINUE</div>
<div>        match = of.ofp_match.from_packet(packet, event.port)</div><div>        if (match.nw_dst == self.router_addr[swid][0] and match.dl_type == packet.ARP_TYPE and match.nw_proto == arp.REPLY):</div><div>                self.learn_mac(match.nw_src,match.dl_src, event.port, swid)</div>
<div>                print "arp"</div><div>                '''print self.mac_table[match.nw_src][0]</div><div>                print self.mac_table[match.nw_src][1]</div><div>                print self.mac_table[match.nw_src][2]'''</div>
<div>        if (match.dl_type == packet.IP_TYPE and match.nw_proto == ipv4.ICMP_PROTOCOL):</div><div><span class="" style="white-space:pre">           </span># Bat goi tin ICMP</div><div><span class="" style="white-space:pre"> </span>        print "------------------------------------ping icmp-------------------------------------"</div>
<div><br></div><div>i added</div><div>core.openflow.addListenerByName("PacketIn", self._handle_PacketIn) </div><div>(in line 98)<br></div><div>Could you give me some advices,please !</div><div>Thanks in advance.</div>
<div><br></div><div><br></div>-- <br><div dir="ltr">Nguyen Duc Thinh (Mr)<br>Class: SET 03. Course: 54<br>School of Electronics and Telecommunications<br>Ha Noi University of Science and Technology (HUST)<br>No.1 Dai Co Viet Road, Hai Ba Trung District, Ha Noi, Viet Nam<br>
Phone: (+84)01692079006<br><a href="mailto:Yahoo%3Aducthinhnguyen91@yahoo.com" target="_blank">Yahoo: ducthinhnguyen91@yahoo.com</a><br>Skype: ducthinhnguyen91<br><br></div>
</div></div>
<span><ex.py></span></blockquote></div><br></div></body></html>