1 .. _snmp4sdn-dev-guide:
3 SNMP4SDN Developer Guide
4 ========================
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 The modules in the plugin are depicted as the following figure.
27 .. figure:: ./images/snmp4sdn_modules.jpg
28 :alt: Modules in the SNMP4SDN Plugin
30 Modules in the SNMP4SDN Plugin
32 - AclService: add/remove ACL profile and rule on the switches.
34 - FdbService: add/modify/remove FDB table entry on the switches.
36 - VlanService: add/modify/remove VLAN table entry on the switches.
38 - TopologyService: query and acquire the subnet topology.
40 - InventoryService: acquire the switches and their ports.
42 - DiscoveryService: probe and resolve the underlying switches as well
43 as the port pairs connecting the switches. The probing is realized by
44 SNMP queries. The updates from discovery will also be reflected to
47 - MiscConfigService: do kinds of settings on switches
49 - Supported STP and ARP settings such as enable/disable STP, get
50 port’s STP state, get ARP table, set ARP entry, and others
52 - VendorSpecificHandler: to assist the flow configuration services to
53 call the switch-talking modules with correct parameters value and
56 - Switch-talking modules
58 - For the services above, when they need to read or configure the
59 underlying switches via SNMP or CLI, these queries are dealt with
60 the modules SNMPHandler and CLIHandler which directly talk with
61 the switches. The SNMPListener is to listen to snmp trap such as
62 link up/down event or switch on/off event.
67 In terms of the architecture of the SNMP4SDN Plugin’s features, the
68 features include flow configuration, topology discovery, and
69 multi-vendor support. Their architectures please refer to Wiki
71 Design <https://wiki.opendaylight.org/view/SNMP4SDN:Developer_Guide#Design>`__).
73 Installation and Configuration Guide
74 ------------------------------------
76 - Please refer to the *Getting Started Guide* in
77 https://www.opendaylight.org/downloads, find the SNMP4SDN section.
79 - For the latest full guide, please refer to Wiki (`Installation
80 Guide <https://wiki.opendaylight.org/view/SNMP4SDN:Installation_Guide>`__,
82 Configuration <https://wiki.opendaylight.org/view/SNMP4SDN:User_Guide#Configuration>`__).
87 - For the latest full guide, please refer to Wiki (`User Guide -
88 Tutorial <https://wiki.opendaylight.org/view/SNMP4SDN:User_Guide#Tutorial_.2F_How-To>`__).
90 Programmatic Interface(s)
91 -------------------------
93 SNMP4SDN Plugin exposes APIs via MD-SAL with YANG model. The methods
94 (RPC call) and data structures for them are listed below.
105 - get-node-connector-list
107 - set-discovery-interval (given interval time in seconds)
113 - node: composed of node-id, node-type
115 - node-connector: composed of node-connector-id,
116 node-connector-type, node
118 - topo-edge: composed of head-node-connector-id,
119 head-node-connector-type, head-node-id, head-node-type,
120 tail-node-connector-id, tail-node-connector-type, tail-node-id,
128 - add-vlan (given node ID, VLAN ID, VLAN name)
130 - add-vlan-and-set-ports (given node ID, VLAN ID, VLAN name, tagged
131 ports, untagged ports)
133 - set-vlan-ports (given node ID, VLAN ID, tagged ports, untagged
136 - delete-vlan (given node ID, VLAN ID)
138 - get-vlan-table (given node ID)
145 - create-acl-profile (given node ID, acl-profile-index, acl-profile)
147 - del-acl-profile (given node ID, acl-profile-index)
149 - set-acl-rule (given node ID, acl-index, acl-rule)
151 - del-acl-rule (given node ID, acl-index)
153 - clear-acl-table (given node ID)
157 - acl-profile-index: composed of profile-id, profile name
159 - acl-profile: composed of acl-layer, vlan-mask, src-ip-mask,
162 - acl-layer: IP or ETHERNET
164 - acl-index: composed of acl-profile-index, acl-rule-index
166 - acl-rule-index: composed of rule-id, rule-name
168 - acl-rule: composed of port-list, acl-layer, acl-field, acl-action
170 - acl-field: composed of vlan-id, src-ip, dst-ip
172 - acl-action: PERMIT or DENY
179 - set-fdb-entry (given fdb-entry)
181 - del-fdb-entry (given node-id, vlan-id, dest-mac-adddr)
183 - get-fdb-entry (given node-id, vlan-id, dest-mac-adddr)
185 - get-fdb-table (given node-id)
189 - fdb-entry: composed of node-id, vlan-id, dest-mac-addr, port,
192 - fdb-entry-type: OTHER/INVALID/LEARNED/SELF/MGMT
199 - set-stp-port-state (given node-id, port, is\_nable)
201 - get-stp-port-state (given node-id, port)
203 - get-stp-port-root (given node-id, port)
205 - enable-stp (given node-id)
207 - disable-stp (given node-id)
209 - delete-arp-entry (given node-id, ip-address)
211 - set-arp-entry (given node-id, arp-entry)
213 - get-arp-entry (given node-id, ip-address)
215 - get-arp-table (given node-id)
220 DISABLE/BLOCKING/LISTENING/LEARNING/FORWARDING/BROKEN
222 - arp-entry: composed of ip-address and mac-address
229 - reload-db (The following 4 RPC implemention is TBD)
233 - delete-switch-entry
241 - switch-info: compose of node-ip, node-mac, community,
242 cli-user-name, cli-password, model
247 - `SNMP4SDN Wiki <https://wiki.opendaylight.org/view/SNMP4SDN:Main>`__
249 - SNMP4SDN Mailing List
250 (`user <https://lists.opendaylight.org/mailman/listinfo/snmp4sdn-users>`__,
251 `developer <https://lists.opendaylight.org/mailman/listinfo/snmp4sdn-dev>`__)
253 - `Latest troubleshooting in
254 Wiki <https://wiki.opendaylight.org/view/SNMP4SDN:User_Guide#Troubleshooting>`__