[pox-dev] install table entry
Murphy McCauley
murphy.mccauley at gmail.com
Mon Nov 18 20:07:52 PST 2013
On Nov 17, 2013, at 5:06 AM, farshad tajedin <farshad.tajedin at gmail.com> wrote:
> hi
> i want install a table entry to a specific switch. i have two question:
> 1) how i find a host for example h1(is defined in my mininet topology) connect to which port of my a switch for example S1 (is defined in my mininet topology)
> 1)how i find a specific switch by which port connecte to a host?
If you mean in a totally generic way... I don't know that there's really an answer here. And OpenFlow doesn't provide any specific help. Components like POX's host_tracker try to infer information about hosts from their packets, but it's just inference. host_tracker is an attempt to be fairly generic about it, but you may find that writing your own component with your own set of assumptions will do better.
If you mean specifically in Mininet, if you're using the --mac option and normal host naming, then the number in a host name corresponds to its MAC address, which may be helpful to you (i.e., h3 -> 00:00:00:00:00:03).
In a broader sense, the same topology file in Mininet should always create the network the same way. So you can hard-code the topology (or pieces of it) into the controller as well, or use the same algorithm for generating the Mininet topology and the controller's idea of the topology (I believe this is the approach used by RipL-POX, for example).
I'm probably missing some possibilities here. The best way to do it depends on what you're really trying to accomplish.
> 2)how i distinguish between my switch in my code in pox?, with 'dpid'?
Yes.
Good luck.
-- Murphy
More information about the pox-dev
mailing list