<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">The OpenFlow controller can "discover" OpenFlow switches because the switches *explicitly come and tell the controller that they exist*.  Hosts don't do this.  To see hosts, they need to send packets which can be observed from the controller via packet-in.  Your statement about needing them to ping is incorrect -- if you code your controller appropriately, the hosts don't need to ping, they can send *anything*.  You actually can't do much better than this.  You can try to *get* hosts to send something, e.g., by pinging a broadcast address, and you can try taking advantage of discovery protocols like mDNS... but it still boils down to seeing the host send something.<div><br></div><div>You don't necessarily need to understand DHCP in order to realize that a host with a particular MAC address exists (though it can be helpful if there might also be routers which can obscure the L2 MAC address).  And you can't *make* a host send a DHCP request.  You're relying on it to be configured to do so (of course, you can also try to enforce this by only forwarding packets for hosts which have requested an address).<div><br></div><div>POX has a component called host_tracker which attempts to monitor hosts (see <a href="http://www.noxrepo.org/2013/06/pox-and-gephi">http://www.noxrepo.org/2013/06/pox-and-gephi</a> for a writeup on a visual demo of this) via passive detection and active ARP-pinging.  It also contains a forwarding application (topo_proactive) which uses the DHCP server to assign addresses to hosts and then installs table entries for them.  Have you looked at these?<br><div><br></div><div>As for what DHCP looks like, there's a Wikipedia article on this which explains it decently, and links to the RFC where it's defined.  On top of that, you could look at POX's DHCP packet class in pox.lib.packet (and maybe the POX's DHCP client and/or server).<br><div><div><div><div><br></div><div>-- Murphy</div><div><br><div><div><div>On Nov 23, 2013, at 11:03 AM, Amer <<a href="mailto:amer7777@hotmail.com">amer7777@hotmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="content-type" content="text/html; charset=utf-8"><div dir="auto"><div>Thank you</div><div>This means I should ping each host in the network to get the packets.</div><div>I want something automatic like openflow discovery to discover the clients. I have another question:</div><div>What does DHCP request message has (i.e., attributes)? In POX not in general.</div><div><br></div><div>Best regards,</div><div>Amer<br><br>Sent from my iPhone</div><div><br>On ٢٣‏/١١‏/٢٠١٣, at ٤:٣٤ م, durga <<a href="mailto:c.vijaya.durga@gmail.com">c.vijaya.durga@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:#993300">Hi Amer,</div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:#993300"><br>

</div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:#993300">I am not too sure if I understand your question,but to my current learning, all the above fields can be collected as in_port.src (mac ID), event.dpid (switch connection) and event.port( inport).</div>

</div><div class="gmail_extra"><br clear="all"><div>Cheers!<br>Durga<br><br></div>
<br><br><div class="gmail_quote">On Sat, Nov 23, 2013 at 10:47 PM, Amer <span dir="ltr"><<a href="mailto:amer7777@hotmail.com" target="_blank">amer7777@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hello,<br>
<br>
I want to collect MAC addresses of each host in the network and switch they connect to and port number.<br>
I think about DHCP and openflow discovery, but I do not know how to combine them.<br>
<br>
<br>
Best regards,<br>
Amer<br>
</blockquote></div><br></div>
</blockquote></div></blockquote></div><br></div></div></div></div></div></div></div></div></body></html>