1 L3VPN Service: User Guide
2 =========================
7 L3VPN Service in OpenDaylight provides a framework to create L3VPN based
8 on BGP-MP. It also helps to create Network Virtualization for DC Cloud
14 L3VPN service can be realized using the following modules -
19 1. **VPN Manager** : Creates and manages VPNs and VPN Interfaces
21 2. **BGP Manager** : Configures BGP routing stack and provides interface
24 3. **FIB Manager** : Provides interface to FIB, creates and manages
25 forwarding rules in Dataplane
27 4. **Nexthop Manager** : Creates and manages nexthop egress pointer,
28 creates egress rules in Dataplane
30 5. **Interface Manager** : Creates and manages different type of network
31 interfaces, e.g., VLAN, l3tunnel etc.,
33 6. **Id Manager** : Provides cluster-wide unique ID for a given key.
34 Used by different modules to get unique IDs for different entities.
36 7. **MD-SAL Util** : Provides interface to MD-SAL. Used by service
37 modules to access MD-SAL Datastore and services.
39 All the above modules can function independently and can be utilized by
40 other services as well.
42 Configuration Interfaces
43 ~~~~~~~~~~~~~~~~~~~~~~~~
45 The following modules expose configuration interfaces through which user
46 can configure L3VPN Service.
56 Configuration Interface Details
57 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
59 1. Data Node Path : */config/bgp:bgp-router/*
63 i. local-as-identifier
67 b. REST Methods : GET, PUT, DELETE, POST
69 2. Data Node Path : */config/bgp:bgp-neighbors/*
73 i. List of bgp-neighbor
75 b. REST Methods : GET, PUT, DELETE, POST
78 */config/bgp:bgp-neighbors/bgp-neighbor/``{as-number}``/*
86 b. REST Methods : GET, PUT, DELETE, POST
88 1. Data Node Path : */config/l3vpn:vpn-instances/*
92 i. List of vpn-instance
94 b. REST Methods : GET, PUT, DELETE, POST
96 2. Data Node Path : */config/l3vpn:vpn-interfaces/vpn-instance*
102 ii. route-distinguisher
104 iii. import-route-policy
106 iv. export-route-policy
108 b. REST Methods : GET, PUT, DELETE, POST
110 3. Data Node Path : */config/l3vpn:vpn-interfaces/*
114 i. List of vpn-interface
116 b. REST Methods : GET, PUT, DELETE, POST
118 4. Data Node Path : */config/l3vpn:vpn-interfaces/vpn-interface*
124 ii. vpn-instance-name
126 b. REST Methods : GET, PUT, DELETE, POST
129 */config/l3vpn:vpn-interfaces/vpn-interface/``{name}``/adjacency*
137 b. REST Methods : GET, PUT, DELETE, POST
139 1. Data Node Path : */config/if:interfaces/interface*
155 b. type specific fields
157 i. when type = *l2vlan*
161 ii. when type = *stacked\_vlan*
165 iii. when type = *l3tunnel*
175 iv. when type = *mpls*
181 c. REST Methods : GET, PUT, DELETE, POST
183 1. Data Node Path : */config/odl-fib:fibEntries/vrfTables*
189 b. REST Methods : GET, PUT, DELETE, POST
192 */config/odl-fib:fibEntries/vrfTables/``{routeDistinguisher}``/*
196 i. route-distinguisher
206 b. REST Methods : GET, PUT, DELETE, POST
208 3. Data Node Path : */config/odl-fib:fibEntries/ipv4Table*
218 b. REST Methods : GET, PUT, DELETE, POST
220 Provisioning Sequence & Sample Configurations
221 ---------------------------------------------
226 1. Edit *etc/custom.properties* and set the following property:
227 *vpnservice.bgpspeaker.host.name = <bgpserver-ip>* *<bgpserver-ip>*
228 here refers to the IP address of the host where BGP is running.
230 2. Run ODL and install VPN Service *feature:install odl-vpnservice-core*
232 Use REST interface to configure L3VPN service
237 1. BGP stack with VRF support needs to installed and configured
239 a. *Configure BGP as specified in Step 1 below.*
241 2. Create pairs of GRE/VxLAN Tunnels (using ovsdb/ovs-vsctl) between
242 each switch and between each switch to the Gateway node
244 a. *Create *l3tunnel* interfaces corresponding to each tunnel in
245 interfaces DS as specified in Step 2 below.*
247 Step 1 : Configure BGP
248 ~~~~~~~~~~~~~~~~~~~~~~
250 1. Configure BGP Router
251 ^^^^^^^^^^^^^^^^^^^^^^^
253 **REST API** : *PUT /config/bgp:bgp-router/*
261 "local-as-identifier": "10.10.10.10",
262 "local-as-number": 108
266 2. Configure BGP Neighbors
267 ^^^^^^^^^^^^^^^^^^^^^^^^^^
269 **REST API** : *PUT /config/bgp:bgp-neighbors/*
279 "ip-address": "169.144.42.168"
284 Step 2 : Create Tunnel Interfaces
285 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
287 Create l3tunnel interfaces corresponding to all GRE/VxLAN tunnels
288 created with ovsdb (`refer Prerequisites <#prer>`__). Use following REST
291 **REST API** : *PUT /config/if:interfaces/if:interfacce*
300 "name" : "GRE_192.168.57.101_192.168.57.102",
301 "type" : "odl-interface:l3tunnel",
302 "odl-interface:tunnel-type": "odl-interface:tunnel-type-gre",
303 "odl-interface:local-ip" : "192.168.57.101",
304 "odl-interface:remote-ip" : "192.168.57.102",
305 "odl-interface:portId" : "openflow:1:3",
311 Following is expected as a result of these configurations
312 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
314 1. Unique If-index is generated
316 2. *Interface-state* operational DS is updated
318 3. Corresponding Nexthop Group Entry is created
320 Step 3 : OS Create Neutron Ports and attach VMs
321 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
323 At this step user creates VMs.
325 Step 4 : Create VM Interfaces
326 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
328 Create l2vlan interfaces corresponding to VM created in step 3
330 **REST API** : *PUT /config/if:interfaces/if:interface*
339 "name" : "dpn1-dp1.2",
341 "odl-interface:of-port-id" : "openflow:1:2",
342 "odl-interface:vlan-id" : "1",
348 Step 5: Create VPN Instance
349 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
351 **REST API** : *PUT /config/l3vpn:vpn-instances/l3vpn:vpn-instance/*
360 "description": "Test VPN Instance 1",
361 "vpn-instance-name": "testVpn1",
363 "route-distinguisher": "4000:1",
364 "export-route-policy": "4000:1,5000:1",
365 "import-route-policy": "4000:1,5000:1",
371 Following is expected as a result of these configurations
372 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
374 1. VPN ID is allocated and updated in data-store
376 2. Corresponding VRF is created in BGP
378 3. If there are vpn-interface configurations for this VPN, corresponding
379 action is taken as defined in step 5
381 Step 5 : Create VPN-Interface and Local Adjacency
382 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
384 *this can be done in two steps as well*
386 1. Create vpn-interface
387 ^^^^^^^^^^^^^^^^^^^^^^^
389 **REST API** : *PUT /config/l3vpn:vpn-interfaces/l3vpn:vpn-interface/*
398 "vpn-instance-name": "testVpn1",
399 "name": "dpn1-dp1.2",
406 name here is the name of VM interface created in step 3, 4
408 2. Add Adjacencies on vpn-interafce
409 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
412 /config/l3vpn:vpn-interfaces/l3vpn:vpn-interface/dpn1-dp1.3/adjacency*
421 "ip-address" : "169.144.42.168",
422 "mac-address" : "11:22:33:44:55:66"
427 its a list, user can define more than one adjacency on a
430 Above steps can be carried out in a single step as following
437 "vpn-instance-name": "testVpn1",
438 "name": "dpn1-dp1.3",
439 "odl-l3vpn:adjacency": [
441 "odl-l3vpn:mac_address": "11:22:33:44:55:66",
442 "odl-l3vpn:ip_address": "11.11.11.2",
449 Following is expected as a result of these configurations
450 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
452 1. Prefix label is generated and stored in DS
454 2. Ingress table is programmed with flow corresponding to interface
456 3. Local Egress Group is created
458 4. Prefix is added to BGP for advertisement
460 5. BGP pushes route update to FIB YANG Interface
462 6. FIB Entry flow is added to FIB Table in OF pipeline