Are you getting *any* packets in the PacketIn handler? Have you tried running the forwarding.l2_learning component? Does it work? Do you see it print log messages about installing table entries?
Have you read the last question of the POX FAQ? -- Murphy On Dec 20, 2013, at 2:58 AM, Nguyen Duc Thinh <ducthinh3081...@gmail.com> wrote: > Dear Murphy, > 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: > > def _handle_PacketIn(self, event): > swid = int(event.dpid) > packet = event.parsed > if packet.type == ethernet.LLDP_TYPE: > return CONTINUE > match = of.ofp_match.from_packet(packet, event.port) > if (match.nw_dst == self.router_addr[swid][0] and match.dl_type == > packet.ARP_TYPE and match.nw_proto == arp.REPLY): > self.learn_mac(match.nw_src,match.dl_src, event.port, swid) > print "arp" > '''print self.mac_table[match.nw_src][0] > print self.mac_table[match.nw_src][1] > print self.mac_table[match.nw_src][2]''' > if (match.dl_type == packet.IP_TYPE and match.nw_proto == > ipv4.ICMP_PROTOCOL): > # Bat goi tin ICMP > print "------------------------------------ping > icmp-------------------------------------" > > i added > core.openflow.addListenerByName("PacketIn", self._handle_PacketIn) > (in line 98) > Could you give me some advices,please ! > Thanks in advance. > > > -- > Nguyen Duc Thinh (Mr) > Class: SET 03. Course: 54 > School of Electronics and Telecommunications > Ha Noi University of Science and Technology (HUST) > No.1 Dai Co Viet Road, Hai Ba Trung District, Ha Noi, Viet Nam > Phone: (+84)01692079006 > Yahoo: ducthinhnguye...@yahoo.com > Skype: ducthinhnguyen91 > > <ex.py>