7 We propose a southbound plugin that can control the off-the-shelf
8 commodity Ethernet switches for the purpose of building SDN using
9 Ethernet switches. For Ethernet switches, forwarding table, VLAN table,
10 and ACL are where one can install flow configuration on, and this is
11 done via SNMP and CLI in the proposed plugin. In addition, some settings
12 required for Ethernet switches in SDN, e.g., disabling STP and flooding,
15 .. figure:: ./images/snmp4sdn_in_odl_architecture.jpg
16 :alt: SNMP4SDN as an OpenDaylight southbound plugin
18 SNMP4SDN as an OpenDaylight southbound plugin
23 Just follow the steps:
25 Prepare the switch list database file
26 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29 `here <https://wiki.opendaylight.org/view/SNMP4SDN:switch_list_file>`__,
30 and we suggest to save it as */etc/snmp4sdn\_swdb.csv* so that SNMP4SDN
31 Plugin can automatically load this file. Note that the first line is
32 title and should not be removed.
34 Prepare the vendor-specific configuration file
35 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
38 `here <https://wiki.opendaylight.org/view/SNMP4SDN:snmp4sdn_VendorSpecificSwitchConfig_file>`__,
39 and we suggest to save it as
40 */etc/snmp4sdn\_VendorSpecificSwitchConfig.xml* so that SNMP4SDN Plugin
41 can automatically load this file.
43 Install SNMP4SDN Plugin
44 -----------------------
46 If using SNMP4SDN Plugin provided in OpenDaylight release, just do the
47 following from the Karaf CLI:
51 feature:install odl-snmp4sdn-all
56 Installation Troubleshooting
57 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
59 Feature installation failure
60 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
62 When trying to install a feature, if the following failure occurs:
66 Error executing command: Could not start bundle ...
67 Reason: Missing Constraint: Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.7))"
69 A workaround: exit Karaf, and edit the file
70 <karaf\_directory>/etc/config.properties, remove the line
71 *${services-${karaf.framework}}* and the ", \\" in the line above.
73 Runtime Troubleshooting
74 ~~~~~~~~~~~~~~~~~~~~~~~
76 Problem starting SNMP Trap Interface
77 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
79 It is possible to get the following exception during controller startup.
80 (The error would not be printed in Karaf console, one may see it in
81 <karaf\_directory>/data/log/karaf.log)
85 2014-01-31 15:00:44.688 CET [fileinstall-./plugins] WARN o.o.snmp4sdn.internal.SNMPListener - Problem starting SNMP Trap Interface: {}
86 java.net.BindException: Permission denied
87 at java.net.PlainDatagramSocketImpl.bind0(Native Method) ~[na:1.7.0_51]
88 at java.net.AbstractPlainDatagramSocketImpl.bind(AbstractPlainDatagramSocketImpl.java:95) ~[na:1.7.0_51]
89 at java.net.DatagramSocket.bind(DatagramSocket.java:376) ~[na:1.7.0_51]
90 at java.net.DatagramSocket.<init>(DatagramSocket.java:231) ~[na:1.7.0_51]
91 at java.net.DatagramSocket.<init>(DatagramSocket.java:284) ~[na:1.7.0_51]
92 at java.net.DatagramSocket.<init>(DatagramSocket.java:256) ~[na:1.7.0_51]
93 at org.snmpj.SNMPTrapReceiverInterface.<init>(SNMPTrapReceiverInterface.java:126) ~[org.snmpj-1.4.3.jar:na]
94 at org.snmpj.SNMPTrapReceiverInterface.<init>(SNMPTrapReceiverInterface.java:99) ~[org.snmpj-1.4.3.jar:na]
95 at org.opendaylight.snmp4sdn.internal.SNMPListener.<init>(SNMPListener.java:75) ~[bundlefile:na]
96 at org.opendaylight.snmp4sdn.core.internal.Controller.start(Controller.java:174) [bundlefile:na]
99 This indicates that the controller is being run as a user which does not
100 have sufficient OS privileges to bind the SNMPTRAP port (162/UDP)
102 Switch list file missing
103 ~~~~~~~~~~~~~~~~~~~~~~~~
105 The SNMP4SDN Plugin needs a switch list file, which is necessary for
106 topology discovery and should be provided by the administrator (so
107 please prepare one for the first time using SNMP4SDN Plugin, here is the
108 `sample <https://wiki.opendaylight.org/view/SNMP4SDN:switch_list_file>`__).
109 The default file path is /etc/snmp4sdn\_swdb.csv. SNMP4SDN Plugin would
110 automatically load this file and start topology discovery. If this file
111 is not ready there, the following message like this will pop up:
115 2016-02-02 04:21:52,476 | INFO| Event Dispatcher | CmethUtil | 466 - org.opendaylight.snmp4sdn - 0.3.0.SNAPSHOT | CmethUtil.readDB() err: {}
116 java.io.FileNotFoundException: /etc/snmp4sdn_swdb.csv (No such file or directory)
117 at java.io.FileInputStream.open0(Native Method)[:1.8.0_65]
118 at java.io.FileInputStream.open(FileInputStream.java:195)[:1.8.0_65]
119 at java.io.FileInputStream.<init>(FileInputStream.java:138)[:1.8.0_65]
120 at java.io.FileInputStream.<init>(FileInputStream.java:93)[:1.8.0_65]
121 at java.io.FileReader.<init>(FileReader.java:58)[:1.8.0_65]
122 at org.opendaylight.snmp4sdn.internal.util.CmethUtil.readDB(CmethUtil.java:66)
123 at org.opendaylight.snmp4sdn.internal.util.CmethUtil.<init>(CmethUtil.java:43)
129 Just follow the steps:
131 1. Prepare the switch list database file
132 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135 `here <https://wiki.opendaylight.org/view/SNMP4SDN:switch_list_file>`__,
136 and we suggest to save it as */etc/snmp4sdn\_swdb.csv* so that SNMP4SDN
137 Plugin can automatically load this file.
141 The first line is title and should not be removed.
143 2. Prepare the vendor-specific configuration file
144 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
147 `here <https://wiki.opendaylight.org/view/SNMP4SDN:snmp4sdn_VendorSpecificSwitchConfig_file>`__,
148 and we suggest to save it as
149 */etc/snmp4sdn\_VendorSpecificSwitchConfig.xml* so that SNMP4SDN Plugin
150 can automatically load this file.
152 3. Install SNMP4SDN Plugin
153 ~~~~~~~~~~~~~~~~~~~~~~~~~~
155 If using SNMP4SDN Plugin provided in OpenDaylight release, just do the
158 Launch Karaf in Linux console:
162 cd <Boron_controller_directory>/bin
163 (for example, cd distribution-karaf-x.x.x-Boron/bin)
169 Then in Karaf console, execute:
173 feature:install odl-snmp4sdn-all
178 For initialization, we need to feed SNMP4SDN Plugin the switch list.
179 Actually SNMP4SDN Plugin automatically try to load the switch list at
180 /etc/snmp4sdn\_swdb.csv if there is. If so, this step could be skipped.
181 In Karaf console, execute:
185 snmp4sdn:ReadDB <switch_list_path>
186 (For example, snmp4sdn:ReadDB /etc/snmp4sdn_swdb.csv)
187 (in Windows OS, For example, snmp4sdn:ReadDB D://snmp4sdn_swdb.csv)
190 `here <https://wiki.opendaylight.org/view/SNMP4SDN:switch_list_file>`__,
191 and we suggest to save it as */etc/snmp4sdn\_swdb.csv* so that SNMP4SDN
192 Plugin can automatically load this file.
196 The first line is title and should not be removed.
211 Execute topology discovery
212 ^^^^^^^^^^^^^^^^^^^^^^^^^^
214 The SNMP4SDN Plugin automatically executes topology discovery on
215 startup. One may use the following commands to invoke topology discovery
216 manually. Note that you may need to wait for seconds for itto complete.
220 Currently, one needs to manually execute *snmp4sdn:TopoDiscover*
221 first (just once), then later the automatic topology discovery can
222 be successful. If switches change (switch added or removed),
223 *snmp4sdn:TopoDiscover* is also required. A future version will fix
224 it to eliminate these requirements.
228 snmp4sdn:TopoDiscover
230 If one like to discover all inventory (i.e. switches and their ports)
231 but not edges, just execute "TopoDiscoverSwitches":
235 snmp4sdn:TopoDiscoverSwitches
237 If one like to only discover all edges but not inventory, just execute
242 snmp4sdn:TopoDiscoverEdges
244 You can also trigger topology discovery via the REST API by using
245 ``curl`` from the Linux console (or any other REST client):
249 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/topology:rediscover
251 You can change the periodic topology discovery interval via a REST API:
255 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>'}}"
256 For example, set the interval as 15 seconds:
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":'15'}}"
262 SNMP4SDN Plugin supports to show topology via REST API:
268 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/topology:get-edge-list
274 curl --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8181/restconf/operations/topology:get-node-list
276 - Get switches' ports list
280 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
282 - The three commands above are just for user to get the latest topology
283 discovery result, it does not trigger SNMP4SDN Plugin to do topology
286 - To trigger SNMP4SDN Plugin to do topology discover, as described in
287 aforementioned *Execute topology discovery*.
295 SNMP4SDN supports to add entry on FDB table via REST API:
301 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>}}"
304 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}}"
306 - Get FDB table entry
310 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>}}"
313 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}}"
315 - Set FDB table entry
317 (Notice invalid value: (1) non unicast mac (2) port not in the VLAN)
321 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>'}}"
324 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'}}"
326 - Delete FDB table entry
330 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>}}"
333 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}}"
338 SNMP4SDN supports to add entry on VLAN table via REST API:
344 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>}}"
347 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}}"
353 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>'}}"
356 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'}}"
362 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>}}"
365 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}}"
367 - Add VLAN and set ports
371 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>'}}"
374 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'}}"
380 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>'}}"
383 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'}}"
388 SNMP4SDN supports to add flow on ACL table via REST API. However, it is
389 so far only implemented for the D-Link DGS-3120 switch.
391 ACL configuration via CLI is vendor-specific, and SNMP4SDN will support
392 configuration with vendor-specific CLI in future release.
394 To do ACL configuration using the REST APIs, use commands like the
401 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>}}"
404 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}}"
406 - Create ACL profile (IP layer)
410 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>"}}"
413 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'}}"
415 - Create ACL profile (MAC layer)
419 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>}}"
422 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}}"
428 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>}}"
431 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}}"
435 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>"}}"
438 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'}}"
444 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>'}}"
445 (<acl_layer>: IP or ETHERNET)
446 (<acl_action>: PERMIT as permit, DENY as deny)
449 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'}}"
455 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>}}"
458 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}}"
460 Special configuration
461 ~~~~~~~~~~~~~~~~~~~~~
463 SNMP4SDN supports setting the following special configurations via REST
470 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>}}"
471 (true: enable, false: disable)
474 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}}"
480 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>}}"
483 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}}"
489 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>}}"
492 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}}"
498 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>}}"
501 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}}"
507 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>}}"
510 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}}"
516 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>}}"
519 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}}"
523 (Notice to give IP address with subnet prefix)
527 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>}}"
530 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}}"
536 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>'}}"
539 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'}}"
545 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>'}}"
548 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'}}"
550 Using Postman to invoke REST API
551 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
553 Besides using the curl tool to invoke REST API, like the examples
554 aforementioned, one can also use GUI tool like Postman for better data
557 - Install Postman: `Install Postman in the Chrome
558 browser <https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm?hl=en>`__
560 - In the chrome browser bar enter
568 Example: Get VLAN table using Postman
569 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
571 As the screenshot shown below, one needs to fill in required fields.
576 http://<controller_ip_address>:8181/restconf/operations/vlan:get-vlan-table
585 {input:{"node-id":<node_id>}}
587 {input:{"node-id":158969157063648}}
589 .. figure:: ./images/snmp4sdn_getvlantable_postman.jpg
590 :alt: Example: Get VLAN table using Postman
592 Example: Get VLAN table using Postman
597 So far the supported vendor-specific configurations:
599 - Add VLAN and set ports
601 - (More functions are TBD)
603 The SNMP4SDN Plugin would examine whether the configuration is described
604 in the vendor-specific configuration file. If yes, the configuration
605 description would be adopted, otherwise just use the default
606 configuration. For example, adding VLAN and setting the ports is
607 supported via SNMP standard MIB. However we found some special cases,
608 for example, certain Accton switch requires to add VLAN first and then
609 allows to set the ports. So one may describe this in the vendor-specific
612 A vendor-specific configuration file sample is
613 `here <https://wiki.opendaylight.org/view/SNMP4SDN:snmp4sdn_VendorSpecificSwitchConfig_file>`__,
614 and we suggest to save it as
615 */etc/snmp4sdn\_VendorSpecificSwitchConfig.xml* so that SNMP4SDN Plugin
616 can automatically load it.
621 - `SNMP4SDN Wiki <https://wiki.opendaylight.org/view/SNMP4SDN:Main>`__
623 - SNMP4SDN Mailing Lists:
624 (`user <https://lists.opendaylight.org/mailman/listinfo/snmp4sdn-users>`__,
625 `developer <https://lists.opendaylight.org/mailman/listinfo/snmp4sdn-dev>`__)
628 `troubleshooting <https://wiki.opendaylight.org/view/SNMP4SDN:User_Guide#Troubleshooting>`__