[pox-dev] handle ICMP in POX

Murphy McCauley murphy.mccauley at gmail.com
Fri Dec 20 10:53:55 PST 2013


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 <ducthinh3081991 at 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: ducthinhnguyen91 at yahoo.com
> Skype: ducthinhnguyen91
> 
> <ex.py>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.noxrepo.org/pipermail/pox-dev-noxrepo.org/attachments/20131220/e2378776/attachment.htm>


More information about the pox-dev mailing list