1 .. _snmp4sdn-user-guide:
9 We propose a southbound plugin that can control the off-the-shelf
10 commodity Ethernet switches for the purpose of building SDN using
11 Ethernet switches. For Ethernet switches, forwarding table, VLAN table,
12 and ACL are where one can install flow configuration on, and this is
13 done via SNMP and CLI in the proposed plugin. In addition, some settings
14 required for Ethernet switches in SDN, e.g., disabling STP and flooding,
17 .. figure:: ./images/snmp4sdn_in_odl_architecture.jpg
18 :alt: SNMP4SDN as an OpenDaylight southbound plugin
20 SNMP4SDN as an OpenDaylight southbound plugin
25 Just follow the steps:
27 Prepare the switch list database file
28 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 `here <https://wiki.opendaylight.org/view/SNMP4SDN:switch_list_file>`__,
32 and we suggest to save it as */etc/snmp4sdn\_swdb.csv* so that SNMP4SDN
33 Plugin can automatically load this file. Note that the first line is
34 title and should not be removed.
36 Prepare the vendor-specific configuration file
37 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40 `here <https://wiki.opendaylight.org/view/SNMP4SDN:snmp4sdn_VendorSpecificSwitchConfig_file>`__,
41 and we suggest to save it as
42 */etc/snmp4sdn\_VendorSpecificSwitchConfig.xml* so that SNMP4SDN Plugin
43 can automatically load this file.
45 Install SNMP4SDN Plugin
46 -----------------------
48 If using SNMP4SDN Plugin provided in OpenDaylight release, just do the
49 following from the Karaf CLI:
53 feature:install odl-snmp4sdn-all
58 Installation Troubleshooting
59 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
61 Feature installation failure
62 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64 When trying to install a feature, if the following failure occurs:
68 Error executing command: Could not start bundle ...
69 Reason: Missing Constraint: Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.7))"
71 A workaround: exit Karaf, and edit the file
72 <karaf\_directory>/etc/config.properties, remove the line
73 *${services-${karaf.framework}}* and the ", \\" in the line above.
75 Runtime Troubleshooting
76 ~~~~~~~~~~~~~~~~~~~~~~~
78 Problem starting SNMP Trap Interface
79 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
81 It is possible to get the following exception during controller startup.
82 (The error would not be printed in Karaf console, one may see it in
83 <karaf\_directory>/data/log/karaf.log)
87 2014-01-31 15:00:44.688 CET [fileinstall-./plugins] WARN o.o.snmp4sdn.internal.SNMPListener - Problem starting SNMP Trap Interface: {}
88 java.net.BindException: Permission denied
89 at java.net.PlainDatagramSocketImpl.bind0(Native Method) ~[na:1.7.0_51]
90 at java.net.AbstractPlainDatagramSocketImpl.bind(AbstractPlainDatagramSocketImpl.java:95) ~[na:1.7.0_51]
91 at java.net.DatagramSocket.bind(DatagramSocket.java:376) ~[na:1.7.0_51]
92 at java.net.DatagramSocket.<init>(DatagramSocket.java:231) ~[na:1.7.0_51]
93 at java.net.DatagramSocket.<init>(DatagramSocket.java:284) ~[na:1.7.0_51]
94 at java.net.DatagramSocket.<init>(DatagramSocket.java:256) ~[na:1.7.0_51]
95 at org.snmpj.SNMPTrapReceiverInterface.<init>(SNMPTrapReceiverInterface.java:126) ~[org.snmpj-1.4.3.jar:na]
96 at org.snmpj.SNMPTrapReceiverInterface.<init>(SNMPTrapReceiverInterface.java:99) ~[org.snmpj-1.4.3.jar:na]
97 at org.opendaylight.snmp4sdn.internal.SNMPListener.<init>(SNMPListener.java:75) ~[bundlefile:na]
98 at org.opendaylight.snmp4sdn.core.internal.Controller.start(Controller.java:174) [bundlefile:na]
101 This indicates that the controller is being run as a user which does not
102 have sufficient OS privileges to bind the SNMPTRAP port (162/UDP)
104 Switch list file missing
105 ~~~~~~~~~~~~~~~~~~~~~~~~
107 The SNMP4SDN Plugin needs a switch list file, which is necessary for
108 topology discovery and should be provided by the administrator (so
109 please prepare one for the first time using SNMP4SDN Plugin, here is the
110 `sample <https://wiki.opendaylight.org/view/SNMP4SDN:switch_list_file>`__).
111 The default file path is /etc/snmp4sdn\_swdb.csv. SNMP4SDN Plugin would
112 automatically load this file and start topology discovery. If this file
113 is not ready there, the following message like this will pop up:
117 2016-02-02 04:21:52,476 | INFO| Event Dispatcher | CmethUtil | 466 - org.opendaylight.snmp4sdn - 0.3.0.SNAPSHOT | CmethUtil.readDB() err: {}
118 java.io.FileNotFoundException: /etc/snmp4sdn_swdb.csv (No such file or directory)
119 at java.io.FileInputStream.open0(Native Method)[:1.8.0_65]
120 at java.io.FileInputStream.open(FileInputStream.java:195)[:1.8.0_65]
121 at java.io.FileInputStream.<init>(FileInputStream.java:138)[:1.8.0_65]
122 at java.io.FileInputStream.<init>(FileInputStream.java:93)[:1.8.0_65]
123 at java.io.FileReader.<init>(FileReader.java:58)[:1.8.0_65]
124 at org.opendaylight.snmp4sdn.internal.util.CmethUtil.readDB(CmethUtil.java:66)
125 at org.opendaylight.snmp4sdn.internal.util.CmethUtil.<init>(CmethUtil.java:43)
131 Just follow the steps:
133 1. Prepare the switch list database file
134 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
137 `here <https://wiki.opendaylight.org/view/SNMP4SDN:switch_list_file>`__,
138 and we suggest to save it as */etc/snmp4sdn\_swdb.csv* so that SNMP4SDN
139 Plugin can automatically load this file.
143 The first line is title and should not be removed.
145 2. Prepare the vendor-specific configuration file
146 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
149 `here <https://wiki.opendaylight.org/view/SNMP4SDN:snmp4sdn_VendorSpecificSwitchConfig_file>`__,
150 and we suggest to save it as
151 */etc/snmp4sdn\_VendorSpecificSwitchConfig.xml* so that SNMP4SDN Plugin
152 can automatically load this file.
154 3. Install SNMP4SDN Plugin
155 ~~~~~~~~~~~~~~~~~~~~~~~~~~
157 If using SNMP4SDN Plugin provided in OpenDaylight release, just do the
160 Launch Karaf in Linux console:
164 cd <Boron_controller_directory>/bin
165 (for example, cd distribution-karaf-x.x.x-Boron/bin)
171 Then in Karaf console, execute:
175 feature:install odl-snmp4sdn-all
180 For initialization, we need to feed SNMP4SDN Plugin the switch list.
181 Actually SNMP4SDN Plugin automatically try to load the switch list at
182 /etc/snmp4sdn\_swdb.csv if there is. If so, this step could be skipped.
183 In Karaf console, execute:
187 snmp4sdn:ReadDB <switch_list_path>
188 (For example, snmp4sdn:ReadDB /etc/snmp4sdn_swdb.csv)
189 (in Windows OS, For example, snmp4sdn:ReadDB D://snmp4sdn_swdb.csv)
192 `here <https://wiki.opendaylight.org/view/SNMP4SDN:switch_list_file>`__,
193 and we suggest to save it as */etc/snmp4sdn\_swdb.csv* so that SNMP4SDN
194 Plugin can automatically load this file.
198 The first line is title and should not be removed.
213 Execute topology discovery
214 ^^^^^^^^^^^^^^^^^^^^^^^^^^
216 The SNMP4SDN Plugin automatically executes topology discovery on
217 startup. One may use the following commands to invoke topology discovery
218 manually. Note that you may need to wait for seconds for itto complete.
222 Currently, one needs to manually execute *snmp4sdn:TopoDiscover*
223 first (just once), then later the automatic topology discovery can
224 be successful. If switches change (switch added or removed),
225 *snmp4sdn:TopoDiscover* is also required. A future version will fix
226 it to eliminate these requirements.
230 snmp4sdn:TopoDiscover
232 If one like to discover all inventory (i.e. switches and their ports)
233 but not edges, just execute "TopoDiscoverSwitches":
237 snmp4sdn:TopoDiscoverSwitches
239 If one like to only discover all edges but not inventory, just execute
244 snmp4sdn:TopoDiscoverEdges
246 You can also trigger topology discovery via the REST API by using
247 ``curl`` from the Linux console (or any other REST client):
251 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/topology:rediscover
253 You can change the periodic topology discovery interval via a REST API:
257 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/topology:set-discovery-interval -d "{"input":{"interval-second":'<interval_time>'}}"
258 For example, set the interval as 15 seconds:
259 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/topology:set-discovery-interval -d "{"input":{"interval-second":'15'}}"
264 SNMP4SDN Plugin supports to show topology via REST API:
270 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/topology:get-edge-list
276 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/topology:get-node-list
278 - Get switches' ports list
282 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/topology:get-node-connector-list
284 - The three commands above are just for user to get the latest topology
285 discovery result, it does not trigger SNMP4SDN Plugin to do topology
288 - To trigger SNMP4SDN Plugin to do topology discover, as described in
289 aforementioned *Execute topology discovery*.
297 SNMP4SDN supports to add entry on FDB table via REST API:
303 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/fdb:get-fdb-table -d "{input:{"node-id":<switch-mac-address-in-number>}}"
306 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/fdb:get-fdb-table -d "{input:{"node-id":158969157063648}}"
308 - Get FDB table entry
312 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/fdb:get-fdb-entry -d "{input:{"node-id":<switch-mac-address-in-number>, "vlan-id":<vlan-id-in-number>, "dest-mac-addr":<destination-mac-address-in-number>}}"
315 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/fdb:get-fdb-entry -d "{input:{"node-id":158969157063648, "vlan-id":1, "dest-mac-addr":158969157063648}}"
317 - Set FDB table entry
319 (Notice invalid value: (1) non unicast mac (2) port not in the VLAN)
323 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/fdb:set-fdb-entry -d "{input:{"node-id":<switch-mac-address-in-number>, "vlan-id":<vlan-id-in-number>, "dest-mac-addr":<destination-mac-address-in-number>, "port":<port-in-number>, "type":'<type>'}}"
326 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/fdb:set-fdb-entry -d "{input:{"node-id":158969157063648, "vlan-id":1, "dest-mac-addr":187649984473770, "port":23, "type":'MGMT'}}"
328 - Delete FDB table entry
332 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/fdb:del-fdb-entry -d "{input:{"node-id":<switch-mac-address-in-number>, "vlan-id":<vlan-id-in-number>, "dest-mac-addr":<destination-mac-address-in-number>}}"
335 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/fdb:del-fdb-entry -d "{input:{"node-id":158969157063648, "vlan-id":1, "dest-mac-addr":187649984473770}}"
340 SNMP4SDN supports to add entry on VLAN table via REST API:
346 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/vlan:get-vlan-table -d "{input:{node-id:<switch-mac-address-in-number>}}"
349 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/vlan:get-vlan-table -d "{input:{node-id:158969157063648}}"
355 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/vlan:add-vlan -d "{"input":{"node-id":<switch-mac-address-in-number>, "vlan-id":<vlan-id-in-number>, "vlan-name":'<vlan-name>'}}"
358 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/vlan:add-vlan -d "{"input":{"node-id":158969157063648, "vlan-id":123, "vlan-name":'v123'}}"
364 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/vlan:delete-vlan -d "{"input":{"node-id":<switch-mac-address-in-number>, "vlan-id":<vlan-id-in-number>}}"
367 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/vlan:delete-vlan -d "{"input":{"node-id":158969157063648, "vlan-id":123}}"
369 - Add VLAN and set ports
373 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/vlan:add-vlan-and-set-ports -d "{"input":{"node-id":<switch-mac-address-in-number>, "vlan-id":<vlan-id-in-number>, "vlan-name":'<vlan-name>', "tagged-port-list":'<tagged-ports-separated-by-comma>', "untagged-port-list":'<untagged-ports-separated-by-comma>'}}"
376 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/vlan:add-vlan-and-set-ports -d "{"input":{"node-id":158969157063648, "vlan-id":123, "vlan-name":'v123', "tagged-port-list":'1,2,3', "untagged-port-list":'4,5,6'}}"
382 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/vlan:set-vlan-ports -d "{"input":{"node-id":<switch-mac-address-in-number>, "vlan-id":<vlan-id-in-number>, "tagged-port-list":'<tagged-ports-separated-by-comma>', "untagged-port-list":'<untagged-ports-separated-by-comma>'}}"
385 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/vlan:set-vlan-ports -d "{"input":{"node-id":"158969157063648", "vlan-id":"123", "tagged-port-list":'4,5', "untagged-port-list":'2,3'}}"
390 SNMP4SDN supports to add flow on ACL table via REST API. However, it is
391 so far only implemented for the D-Link DGS-3120 switch.
393 ACL configuration via CLI is vendor-specific, and SNMP4SDN will support
394 configuration with vendor-specific CLI in future release.
396 To do ACL configuration using the REST APIs, use commands like the
403 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/acl:clear-acl-table -d "{"input":{"nodeId":<switch-mac-address-in-number>}}"
406 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/acl:clear-acl-table -d "{"input":{"nodeId":158969157063648}}"
408 - Create ACL profile (IP layer)
412 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/acl:create-acl-profile -d "{input:{"nodeId":<switch-mac-address-in-number>,"profile-id":<profile_id_in_number>,"profile-name":'<profile_name>',"acl-layer":'IP',"vlan-mask":<vlan_mask_in_number>,"src-ip-mask":'<src_ip_mask>',"dst-ip-mask":"<destination_ip_mask>"}}"
415 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/acl:create-acl-profile -d "{input:{"nodeId":158969157063648,"profile-id":1,"profile-name":'profile_1',"acl-layer":'IP',"vlan-mask":1,"src-ip-mask":'255.255.0.0',"dst-ip-mask":'255.255.255.255'}}"
417 - Create ACL profile (MAC layer)
421 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/acl:create-acl-profile -d "{input:{"nodeId":<switch-mac-address-in-number>,"profile-id":<profile_id_in_number>,"profile-name":'<profile_name>',"acl-layer":'ETHERNET',"vlan-mask":<vlan_mask_in_number>}}"
424 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/acl:create-acl-profile -d "{input:{"nodeId":158969157063648,"profile-id":2,"profile-name":'profile_2',"acl-layer":'ETHERNET',"vlan-mask":4095}}"
430 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/acl:del-acl-profile -d "{input:{"nodeId":<switch-mac-address-in-number>,"profile-id":<profile_id_in_number>}}"
433 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/acl:del-acl-profile -d "{input:{"nodeId":158969157063648,"profile-id":1}}"
437 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/acl:del-acl-profile -d "{input:{"nodeId":<switch-mac-address-in-number>,"profile-name":"<profile_name>"}}"
440 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/acl:del-acl-profile -d "{input:{"nodeId":158969157063648,"profile-name":'profile_2'}}"
446 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/acl:set-acl-rule -d "{input:{"nodeId":<switch-mac-address-in-number>,"profile-id":<profile_id_in_number>,"profile-name":'<profile_name>',"rule-id":<rule_id_in_number>,"port-list":[<port_number>,<port_number>,...],"acl-layer":'<acl_layer>',"vlan-id":<vlan_id_in_number>,"src-ip":"<src_ip_address>","dst-ip":'<dst_ip_address>',"acl-action":'<acl_action>'}}"
447 (<acl_layer>: IP or ETHERNET)
448 (<acl_action>: PERMIT as permit, DENY as deny)
451 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/acl:set-acl-rule -d "{input:{"nodeId":158969157063648,"profile-id":1,"profile-name":'profile_1',"rule-id":1,"port-list":[1,2,3],"acl-layer":'IP',"vlan-id":2,"src-ip":'1.1.1.1',"dst-ip":'2.2.2.2',"acl-action":'PERMIT'}}"
457 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/acl:del-acl-rule -d "{input:{"nodeId":<switch-mac-address-in-number>,"profile-id":<profile_id_in_number>,"profile-name":'<profile_name>',"rule-id":<rule_id_in_number>}}"
460 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/acl:del-acl-rule -d "{input:{"nodeId":158969157063648,"profile-id":1,"profile-name":'profile_1',"rule-id":1}}"
462 Special configuration
463 ~~~~~~~~~~~~~~~~~~~~~
465 SNMP4SDN supports setting the following special configurations via REST
472 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/config:set-stp-port-state -d "{input:{"node-id":<switch-mac-address-in-number>, "port":<port_number>, enable:<true_or_false>}}"
473 (true: enable, false: disable)
476 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/config:set-stp-port-state -d "{input:{"node-id":158969157063648, "port":2, enable:false}}"
482 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/config:get-stp-port-state -d "{input:{"node-id":<switch-mac-address-in-number>, "port":<port_number>}}"
485 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/config:get-stp-port-state -d "{input:{"node-id":158969157063648, "port":2}}"
491 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/config:get-stp-port-root -d "{input:{"node-id":<switch-mac-address-in-number>, "port":<port_number>}}"
494 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/config:get-stp-port-root -d "{input:{"node-id":158969157063648, "port":2}}"
500 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/config:enable-stp -d "{input:{"node-id":<switch-mac-address-in-number>}}"
503 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/config:enable-stp -d "{input:{"node-id":158969157063648}}"
509 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/config:disable-stp -d "{input:{"node-id":<switch-mac-address-in-number>}}"
512 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/config:disable-stp -d "{input:{"node-id":158969157063648}}"
518 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/config:get-arp-table -d "{input:{"node-id":<switch-mac-address-in-number>}}"
521 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/config:get-arp-table -d "{input:{"node-id":158969157063648}}"
525 (Notice to give IP address with subnet prefix)
529 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/config:set-arp-entry -d "{input:{"node-id":<switch-mac-address-in-number>, "ip-address":'<ip_address>', "mac-address":<mac_address_in_number>}}"
532 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/config:set-arp-entry -d "{input:{"node-id":158969157063648, "ip-address":'10.217.9.9', "mac-address":1}}"
538 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/config:get-arp-entry -d "{input:{"node-id":<switch-mac-address-in-number>, "ip-address":'<ip_address>'}}"
541 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/config:get-arp-entry -d "{input:{"node-id":158969157063648, "ip-address":'10.217.9.9'}}"
547 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://<controller_ip_address>:8181/restconf/operations/config:delete-arp-entry -d "{input:{"node-id":<switch-mac-address-in-number>, "ip-address":'<ip_address>'}}"
550 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/config:delete-arp-entry -d "{input:{"node-id":158969157063648, "ip-address":'10.217.9.9'}}"
552 Using Postman to invoke REST API
553 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
555 Besides using the curl tool to invoke REST API, like the examples
556 aforementioned, one can also use GUI tool like Postman for better data
559 - Install Postman: `Install Postman in the Chrome
560 browser <https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm?hl=en>`__
562 - In the chrome browser bar enter
570 Example: Get VLAN table using Postman
571 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
573 As the screenshot shown below, one needs to fill in required fields.
578 http://<controller_ip_address>:8181/restconf/operations/vlan:get-vlan-table
587 {input:{"node-id":<node_id>}}
589 {input:{"node-id":158969157063648}}
591 .. figure:: ./images/snmp4sdn_getvlantable_postman.jpg
592 :alt: Example: Get VLAN table using Postman
594 Example: Get VLAN table using Postman
599 So far the supported vendor-specific configurations:
601 - Add VLAN and set ports
603 - (More functions are TBD)
605 The SNMP4SDN Plugin would examine whether the configuration is described
606 in the vendor-specific configuration file. If yes, the configuration
607 description would be adopted, otherwise just use the default
608 configuration. For example, adding VLAN and setting the ports is
609 supported via SNMP standard MIB. However we found some special cases,
610 for example, certain Accton switch requires to add VLAN first and then
611 allows to set the ports. So one may describe this in the vendor-specific
614 A vendor-specific configuration file sample is
615 `here <https://wiki.opendaylight.org/view/SNMP4SDN:snmp4sdn_VendorSpecificSwitchConfig_file>`__,
616 and we suggest to save it as
617 */etc/snmp4sdn\_VendorSpecificSwitchConfig.xml* so that SNMP4SDN Plugin
618 can automatically load it.
623 - `SNMP4SDN Wiki <https://wiki.opendaylight.org/view/SNMP4SDN:Main>`__
625 - SNMP4SDN Mailing Lists:
626 (`user <https://lists.opendaylight.org/mailman/listinfo/snmp4sdn-users>`__,
627 `developer <https://lists.opendaylight.org/mailman/listinfo/snmp4sdn-dev>`__)
630 `troubleshooting <https://wiki.opendaylight.org/view/SNMP4SDN:User_Guide#Troubleshooting>`__