On Mar 19, 2012, at 2:22 PM, Vishal wrote:

> Is there an API to get it ?
> 
> basically, I want to get the IP address of the connection over which 
> switch/dp id  is registering ?

Yes.  get_switch_ip() gives you the IP of the switch.  
get_switch_controller_ip() should give you the other end.
From Python, it's self.ctxt.get_switch_ip(<numeric dpid>), I think.
From C++, it's on Component.


> I am using openVswitch and using ovs-vsctl  to add ports to bridge and 
> register to OF controller. Is there a way to set the dpid when using 
> ovs-vsctl?
> I saw that ovs-dpctl has options for setting the dpid but seems like both do 
> not work together.

This is really an OVS question, but yes:
ovs-vsctl set bridge br0 other-config:datapath-id=0123456789abcdef


Hope that helps.

-- Murphy

Reply via email to