cancel
Showing results for 
Search instead for 
Did you mean: 

How do you retrieve running config on a vSwitch?

How do you retrieve running config on a vSwitch?

Khargharia__Bit
Extreme Employee
How do you retrieve running config on a vSwitch?
9 REPLIES 9

Karthik_D
New Contributor
Hi , Thanks for your help..At 2nd point , you mentioned "10.127.13.234" is server where OVSDB manager is running.For my case how to find that??where i can check my OVSDB manager ip..
Thanks in Advance..

sdkarthikk@gmail.com

Masadi__Ravi
Extreme Employee
OVSDB works with AD-SAL only. Follow below steps to connect to OVSDB manager and to read/write data to it.

1. Configure OVS manager to listen in passive mode using below cli
sudo ovs-vsctl set-manager ptcp:6640

2. using RESTCLIENT, Connect to the OVSDB Manager by issuing below REST API.
http://10.127.13.240:8080/controller/nb/v2/connectionmanager/node/MINI1/address/10.127.13.234/port/6...

10.127.13.240 is my Controller IP and 10.127.13.234 server where OVSDB manager is running.
MINI1 is the name that I assigned to OVSDB manager to reference it in later REST API.

3. after connecting to OVSDB manager, you can use below REST API to read data from OVSDB
http://10.127.13.240:8080/controller/nb/v2/connectionmanager/nodes
http://10.127.13.240:8080/ovsdb/nb/v2/node/OVS/MINI1/tables/open_vswitch/rows/
http://10.127.13.240:8080/ovsdb/nb/v2/node/OVS/MINI1/tables/port/rows
http://10.127.13.240:8080/ovsdb/nb/v2/node/OVS/MINI1/tables/bridge/rows
http://10.127.13.240:8080/ovsdb/nb/v2/node/OVS/MINI1/tables/interface/rows/

4. Use below POST API to create a bridge
http://10.127.13.240:8080/controller/nb/v2/networkconfig/bridgedomain/bridge/OVS/MINI1/br1
with below data in the body part of request.
{}
5. to delete the bridge, use the above API with DELETE method.

Magreth_Mushi
New Contributor
Thanks Bithika,

Now I know I don't need netconf if I will keep working with OVS. I have been using the OVSDB to manually configure the switches, but I would like to know what configurations to do in order to enable this command (ovs-vsctl show) to be sent by the MD-SAL plugin when the session is initialized with MD-SAL.

Thanks,
Magreth

Khargharia__Bit
Extreme Employee
vSwitch (OVS) is configured via OVSDB. The following command dumps the OVSDB database: "ovs-vsctl show".

You can also get the config via OVSDB queries. Here is the schema used by OVS vswitchd:

http://openvswitch.org/ovs-vswitchd.conf.db.5.pdf

Hello,

https://github.com/homework/openvswitch/blob/master/ovsdb/ovsdb-server.c

Can you please guide me what all API Calls does ovsdb-server.c uses?
GTM-P2G8KFN