Documentation to SXP 91/21991/6
authorMartin Mihálek <martin.mihalek@pantheon.sk>
Fri, 5 Jun 2015 15:09:36 +0000 (17:09 +0200)
committerMartin Mihálek <martin.mihalek@pantheon.sk>
Tue, 9 Jun 2015 16:22:31 +0000 (18:22 +0200)
Change-Id: If4e0cfaaa3a6fc935da2208e7710757ecd6bc2ea
Signed-off-by: Martin Mihálek <martin.mihalek@pantheon.sk>
manuals/developer-guide/src/main/asciidoc/bk-developers-guide.adoc
manuals/developer-guide/src/main/asciidoc/sxp/odl-sxp-dev.adoc [new file with mode: 0644]
manuals/user-guide/src/main/asciidoc/bk-user-guide.adoc
manuals/user-guide/src/main/asciidoc/sxp/odl-sxp-user.adoc [new file with mode: 0644]

index 121cdd8d87d2dd08b37070cab6ac3628b1f6a5d8..08e27952c8d332f9272c0903867b8136fd01c24d 100644 (file)
@@ -100,6 +100,8 @@ include::didm/didm-dev.adoc[]
 
 include::vtn/vtn-dev.adoc[]
 
+include::sxp/odl-sxp-dev.adoc[]
+
 :numbered!:
 
 ///////
diff --git a/manuals/developer-guide/src/main/asciidoc/sxp/odl-sxp-dev.adoc b/manuals/developer-guide/src/main/asciidoc/sxp/odl-sxp-dev.adoc
new file mode 100644 (file)
index 0000000..d37ea5d
--- /dev/null
@@ -0,0 +1,40 @@
+== SXP Developer Guide
+
+=== Overview
+SXP (Source-Group Tag eXchange Protocol) project is an effort to enhance OpenDaylight platform with IP-SGT (IP Address to Source Group Tag) bindings that can be learned from connected SXP-aware network nodes. The current implementation supports SXP protocol version 4 according to the Smith, Kandula - SXP https://tools.ietf.org/html/draft-smith-kandula-sxp-02[IETF draft]. All protocol legacy versions 1-3 are supported as well. Additionally, version 4 adds bidirectional connection type as an extension of a unidirectional one.
+
+=== SXP Architecture
+The SXP Server manages all connected clients in separate threads and a common SXP protocol agreement is used between connected peers. Each SXP network peer is modelled with its pertaining class, e.g., SXP Server represents the SXP Speaker, SXP Listener the Client. The server program creates the ServerSocket object on a specified port and waits until a client starts up and requests connect on the IP address and port of the server. The client program opens a Socket that is connected to the server running on the specified host IP address and port.
+
+The SXP Listener maintains connection with its speaker peer. From an opened channel pipeline, all incoming SXP messages are processed by various handlers. Message must be decoded, parsed and validated.
+
+The SXP Speaker is a counterpart to the SXP Listener. It maintains a connection with its listener peer and sends composed messages.
+
+The SXP Binding Handler extracts the IP-SGT binding from a message and pulls it into the SXP-Database. If an error is detected during the IP-SGT extraction, an appropriate error code and sub-code is selected and an error message is sent back to the connected peer. All transitive messages are routed directly to the output queue of SXP Binding Dispatcher.
+
+The IP-SGT Manager handles bindings from multiple connections. If a new data has been added into or deleted from the SXP-Database, or binding’s contributor change is detected, the manager performs an arbitration process above the SXP-Database to resolve the binding duplicity and prevent possible information loops. Finally, it updates the IP-SGT-Master database that consists only of valid and unique bindings, i.e., a single binding per IP address.
+
+The IP-SGT Manager also contains RPCs that can be used by other OpenDaylight plugins, or by making REST calls, to add, update or to delete bindings in or from the SXP-database.
+
+The SXP Binding Dispatcher represents a selector that will decides how many data from the SXP-database will be sent and when. It is responsible for message content composition based on maximum message length.
+
+=== Key APIs and Interfaces
+As this project is fairly small, it provides only few features that install and
+provide all APIs and implementations for this project.
+
+* sxp-controller
+* sxp-api
+* spx-core
+
+==== sxp-controller
+RPC request handling
+
+==== sxp-api
+Contains data holders and entiies
+
+==== spx-core
+Main logic and core features
+
+=== API Reference Documentation
+https://wiki.opendaylight.org/images/9/91/SXP_Restconf_Interface_and_Dynamic_Tree.pdf[Restconf Interface and Dynamic Tree]
+
index 98b9e53612f5be9db83778c419cebf674ca885d8..199ad39790e139447068b3243627bf17c71ddecc 100644 (file)
@@ -61,3 +61,5 @@ include::didm/didm-user.adoc[]
 include::nic/nic-user.adoc[NIC]
 
 include::vpnservice/vpnservice-user.adoc[VPN Service]
+
+include::sxp/odl-sxp-user.adoc[]
diff --git a/manuals/user-guide/src/main/asciidoc/sxp/odl-sxp-user.adoc b/manuals/user-guide/src/main/asciidoc/sxp/odl-sxp-user.adoc
new file mode 100644 (file)
index 0000000..c57e142
--- /dev/null
@@ -0,0 +1,162 @@
+== SXP User Guide
+
+=== Overview
+SXP (Source-Group Tag eXchange Protocol) project is an effort to enhance OpenDaylight platform with IP-SGT (IP Address to Source Group Tag) bindings that can be learned from connected SXP-aware network nodes. The current implementation supports SXP protocol version 4 according to the Smith, Kandula - SXP https://tools.ietf.org/html/draft-smith-kandula-sxp-02[IETF draft]. All protocol legacy versions 1-3 are supported as well. Additionally, version 4 adds bidirectional connection type as an extension of a unidirectional one.
+
+=== SXP Architecture
+The SXP Server manages all connected clients in separate threads and a common SXP protocol agreement is used between connected peers. Each SXP network peer is modelled with its pertaining class, e.g., SXP Server represents the SXP Speaker, SXP Listener the Client. The server program creates the ServerSocket object on a specified port and waits until a client starts up and requests connect on the IP address and port of the server. The client program opens a Socket that is connected to the server running on the specified host IP address and port.
+
+The SXP Listener maintains connection with its speaker peer. From an opened channel pipeline, all incoming SXP messages are processed by various handlers. Message must be decoded, parsed and validated.
+
+The SXP Speaker is a counterpart to the SXP Listener. It maintains a connection with its listener peer and sends composed messages.
+
+The SXP Binding Handler extracts the IP-SGT binding from a message and pulls it into the SXP-Database. If an error is detected during the IP-SGT extraction, an appropriate error code and sub-code is selected and an error message is sent back to the connected peer. All transitive messages are routed directly to the output queue of SXP Binding Dispatcher.
+
+The IP-SGT Manager handles bindings from multiple connections. If a new data has been added into or deleted from the SXP-Database, or binding’s contributor change is detected, the manager performs an arbitration process above the SXP-Database to resolve the binding duplicity and prevent possible information loops. Finally, it updates the IP-SGT-Master database that consists only of valid and unique bindings, i.e., a single binding per IP address.
+
+The IP-SGT Manager also contains RPCs that can be used by other OpenDaylight plugins, or by making REST calls, to add, update or to delete bindings in or from the SXP-database.
+
+The SXP Binding Dispatcher represents a selector that will decides how many data from the SXP-database will be sent and when. It is responsible for message content composition based on maximum message length.
+
+=== Configuring SXP
+The OpenDaylight Karaf distribution comes pre-configured with baseline SXP
+configuration.
+
+- *22-sxp-controller-one-node.xml* (defines the basic parameters)
+
+=== Administering or Managing SXP
+By RPC (response is XML document containing requested data or operation status):
+
+* Get Connections
+POST http://127.0.0.1:8181/restconf/operations/sxp-controller:get-connections
+[source,xml]
+----
+<input xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <requested-node>0.0.0.100</requested-node>
+</input>
+----
+* Add Connection
+POST http://127.0.0.1:8181/restconf/operations/sxp-controller:add-connection
+[source,xml]
+----
+<input xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <connections>
+  <connection>
+   <!--vpn>vpn1</vpn-->
+   <peer-address>172.20.161.50</peer-address>
+   <!--source-ip></source-ip-->
+   <tcp-port>64999</tcp-port>
+   <!-- Password setup: default | none -->
+   <password>default</password>
+   <!-- Mode: speaker/listener/both -->
+   <mode>speaker</mode>
+   <version>version4</version>
+   <description>Connection to ASR1K</description>
+   <!-- Timers setup: 0 to disable specific timer usability, the default value will be used -->
+   <connection-timers>
+    <!-- Speaker -->
+    <hold-time-min-acceptable>45</hold-time-min-acceptable>
+    <keep-alive-time>30</keep-alive-time>
+   </connection-timers>
+  </connection>
+  <connection>
+   <!--vpn>vpn1</vpn-->
+   <peer-address>172.20.161.178</peer-address>
+   <!--source-ip></source-ip-->
+   <tcp-port>64999</tcp-port>
+   <!-- Password setup: default | none -->
+   <password>default</password>
+   <!-- Mode: speaker/listener/both -->
+   <mode>listener</mode>
+   <version>version4</version>
+   <description>Connection to ISR</description>
+   <!-- Timers setup: 0 to disable specific timer usability, the default value will be used -->
+   <connection-timers>
+    <!-- Listener -->
+    <!-- NON-CONFIGURABLE delete-hold-down-time -->
+    <reconciliation-time>120</reconciliation-time>
+    <hold-time>90</hold-time>
+    <hold-time-min>90</hold-time-min>
+    <hold-time-max>180</hold-time-max>
+   </connection-timers>
+  </connection>
+ </connections>
+</input>
+----
+
+* Delete Connection
+POST http://127.0.0.1:8181/restconf/operations/sxp-controller:delete-connection
+[source,xml]
+----
+<input xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <peer-address>172.20.161.50</peer-address>
+</input>
+----
+* Add Binding Entry
+POST http://127.0.0.1:8181/restconf/operations/sxp-controller:add-entry
+[source,xml]
+----
+<input xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <ip-prefix>192.168.2.1/32</ip-prefix>
+ <sgt>20</sgt >
+</input>
+----
+* Update Binding Entry
+POST http://127.0.0.1:8181/restconf/operations/sxp-controller:update-entry
+[source,xml]
+----
+<input xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <original-binding>
+  <ip-prefix>192.168.2.1/32</ip-prefix>
+  <sgt>20</sgt>
+ </original-binding>
+ <new-binding>
+  <ip-prefix>192.168.3.1/32</ip-prefix>
+  <sgt>30</sgt>
+ </new-binding>
+</input>
+----
+* Delete Binding Entry
+POST http://127.0.0.1:8181/restconf/operations/sxp-controller:delete-entry
+[source,xml]
+----
+<input xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <ip-prefix>192.168.3.1/32</ip-prefix>
+ <sgt>30</sgt >
+</input>
+----
+* Get Node Bindings 
++
+This RPC gets particular device bindings. An SXP-aware node is identified with a unique Node-ID. If a user requests bindings
+for a Speaker 20.0.0.2, the RPC will search for an appropriate path, which contains 20.0.0.2 Node-ID, within locally learnt
+SXP data in the SXP database and replies with associated bindings.
+POST http://127.0.0.1:8181/restconf/operations/sxp-controller:get-node-bindings
+[source,xml]
+----
+<input xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <requested-node>20.0.0.2</requested-node>
+</input>
+----
+* Get Binding SGTs
+POST http://127.0.0.1:8181/restconf/operations/sxp-controller:get-binding-sgts
+[source,xml]
+----
+<input xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <ip-prefix>192.168.12.2/32</ip-prefix>
+</input>
+----
+
+==== Use cases for SXP
+Cisco has a wide installed base of network devices supporting SXP. By including SXP in OpenDaylight, the binding of policy groups to IP addresses can be made available for possible further processing to a wide range of devices, and applications running on OpenDaylight. The range of applications that would be enabled is extensive. Here are just a few of them:
+
+OpenDaylight based applications can take advantage of the IP-SGT binding information. For example, access control can be defined by an operator in terms of policy groups, while OpenDaylight can configure access control lists on network elements using IP addresses, e.g., existing technology.
+
+Interoperability between different vendors. Vendors have different policy systems. Knowing the IP-SGT binding for Cisco makes it possible to maintain policy groups between Cisco and other vendors.
+
+OpenDaylight can aggregate the binding information from many devices and communicate it to a network element. For example, a firewall can use the IP-SGT binding information to know how to handle IPs based on the group-based ACLs it has set. But to do this with SXP alone, the firewall has to maintain a large number of network connections to get the binding information. This incurs heavy overhead costs to maintain all of the SXP peering and protocol information. OpenDaylight can aggregate the IP-group information so that the firewall need only connect to OpenDaylight. By moving the information flow outside of the network elements to a centralized position, we reduce the overhead of the CPU consumption on the enforcement element. This is a huge savings - it allows the enforcement point to only have to make one connection rather than thousands, so it can concentrate on its primary job of forwarding and enforcing.
+
+OpenDaylight can relay the binding information from one network element to others. Changes in group membership can be propagated more readily through a centralized model. For example, in a security application a particular host (e.g., user or IP Address) may be found to be acting suspiciously or violating established security policies. The defined response is to put the host into a different source group for remediation actions such as a lower quality of service, restricted access to critical servers, or special routing conditions to ensure deeper security enforcement (e.g., redirecting the host’s traffic through an IPS with very restrictive policies). Updated group membership for this host needs to be communicated to multiple network elements as soon as possible; a very efficient and effective method of propagation can be performed using OpenDaylight as a centralized point for relaying the information.
+
+Although the IP-SGT binding is only one specific piece of information, and although SXP is implemented widely in a single vendor’s equipment, bringing the ability of OpenDaylight to process and distribute the bindings, is a very specific immediate useful implementation of policy groups. It would go a long way to develop both the usefulness of OpenDaylight and of policy groups.
+
+