L3VPN Service: User Guide¶
Overview¶
L3VPN Service in OpenDaylight provides a framework to create L3VPN based on BGP-MP. It also helps to create Network Virtualization for DC Cloud environment.
Modules & Interfaces¶
L3VPN service can be realized using the following modules -
VPN Service Modules¶
VPN Manager : Creates and manages VPNs and VPN Interfaces
BGP Manager : Configures BGP routing stack and provides interface to routing services
FIB Manager : Provides interface to FIB, creates and manages forwarding rules in Dataplane
Nexthop Manager : Creates and manages nexthop egress pointer, creates egress rules in Dataplane
Interface Manager : Creates and manages different type of network interfaces, e.g., VLAN, l3tunnel etc.,
Id Manager : Provides cluster-wide unique ID for a given key. Used by different modules to get unique IDs for different entities.
MD-SAL Util : Provides interface to MD-SAL. Used by service modules to access MD-SAL Datastore and services.
All the above modules can function independently and can be utilized by other services as well.
Configuration Interfaces¶
The following modules expose configuration interfaces through which user can configure L3VPN Service.
BGP Manager
VPN Manager
Interface Manager
FIB Manager
Configuration Interface Details¶
Data Node Path : /config/bgp:bgp-router/
Fields :
local-as-identifier
local-as-number
REST Methods : GET, PUT, DELETE, POST
Data Node Path : /config/bgp:bgp-neighbors/
Fields :
List of bgp-neighbor
REST Methods : GET, PUT, DELETE, POST
Data Node Path : /config/bgp:bgp-neighbors/bgp-neighbor/``{as-number}``/
Fields :
as-number
ip-address
REST Methods : GET, PUT, DELETE, POST
Data Node Path : /config/l3vpn:vpn-instances/
Fields :
List of vpn-instance
REST Methods : GET, PUT, DELETE, POST
Data Node Path : /config/l3vpn:vpn-interfaces/vpn-instance
Fields :
name
route-distinguisher
import-route-policy
export-route-policy
REST Methods : GET, PUT, DELETE, POST
Data Node Path : /config/l3vpn:vpn-interfaces/
Fields :
List of vpn-interface
REST Methods : GET, PUT, DELETE, POST
Data Node Path : /config/l3vpn:vpn-interfaces/vpn-interface
Fields :
name
vpn-instance-name
REST Methods : GET, PUT, DELETE, POST
Data Node Path : /config/l3vpn:vpn-interfaces/vpn-interface/``{name}``/adjacency
Fields :
ip-address
mac-address
REST Methods : GET, PUT, DELETE, POST
Data Node Path : /config/if:interfaces/interface
Fields :
name
type
enabled
of-port-id
tenant-id
base-interface
type specific fields
when type = l2vlan
vlan-id
when type = stacked_vlan
stacked-vlan-id
when type = l3tunnel
tunnel-type
local-ip
remote-ip
gateway-ip
when type = mpls
list labelStack
num-labels
REST Methods : GET, PUT, DELETE, POST
Data Node Path : /config/odl-fib:fibEntries/vrfTables
Fields :
List of vrfTables
REST Methods : GET, PUT, DELETE, POST
Data Node Path : /config/odl-fib:fibEntries/vrfTables/``{routeDistinguisher}``/
Fields :
route-distinguisher
list vrfEntries
destPrefix
label
nexthopAddress
REST Methods : GET, PUT, DELETE, POST
Data Node Path : /config/odl-fib:fibEntries/ipv4Table
Fields :
list ipv4Entry
destPrefix
nexthopAddress
REST Methods : GET, PUT, DELETE, POST
Provisioning Sequence & Sample Configurations¶
Installation¶
Edit etc/custom.properties and set the following property: vpnservice.bgpspeaker.host.name = <bgpserver-ip> <bgpserver-ip> here refers to the IP address of the host where BGP is running.
Run ODL and install VPN Service feature:install odl-vpnservice-core
Use REST interface to configure L3VPN service
Pre-requisites:¶
BGP stack with VRF support needs to installed and configured
Configure BGP as specified in Step 1 below.
Create pairs of GRE/VxLAN Tunnels (using ovsdb/ovs-vsctl) between each switch and between each switch to the Gateway node
Create *l3tunnel interfaces corresponding to each tunnel in interfaces DS as specified in Step 2 below.*
Step 1 : Configure BGP¶
1. Configure BGP Router¶
REST API : PUT /config/bgp:bgp-router/
Sample JSON Data
{
"bgp-router": {
"local-as-identifier": "10.10.10.10",
"local-as-number": 108
}
}
2. Configure BGP Neighbors¶
REST API : PUT /config/bgp:bgp-neighbors/
Sample JSON Data
{
"bgp-neighbor" : [
{
"as-number": 105,
"ip-address": "169.144.42.168"
}
]
}
Step 2 : Create Tunnel Interfaces¶
Create l3tunnel interfaces corresponding to all GRE/VxLAN tunnels created with ovsdb (refer Prerequisites). Use following REST Interface -
REST API : PUT /config/if:interfaces/if:interfacce
Sample JSON Data
{
"interface": [
{
"name" : "GRE_192.168.57.101_192.168.57.102",
"type" : "odl-interface:l3tunnel",
"odl-interface:tunnel-type": "odl-interface:tunnel-type-gre",
"odl-interface:local-ip" : "192.168.57.101",
"odl-interface:remote-ip" : "192.168.57.102",
"odl-interface:portId" : "openflow:1:3",
"enabled" : "true"
}
]
}
Following is expected as a result of these configurations¶
Unique If-index is generated
Interface-state operational DS is updated
Corresponding Nexthop Group Entry is created
Step 3 : OS Create Neutron Ports and attach VMs¶
At this step user creates VMs.
Step 4 : Create VM Interfaces¶
Create l2vlan interfaces corresponding to VM created in step 3
REST API : PUT /config/if:interfaces/if:interface
Sample JSON Data
{
"interface": [
{
"name" : "dpn1-dp1.2",
"type" : "l2vlan",
"odl-interface:of-port-id" : "openflow:1:2",
"odl-interface:vlan-id" : "1",
"enabled" : "true"
}
]
}
Step 5: Create VPN Instance¶
REST API : PUT /config/l3vpn:vpn-instances/l3vpn:vpn-instance/
Sample JSON Data
{
"vpn-instance": [
{
"description": "Test VPN Instance 1",
"vpn-instance-name": "testVpn1",
"ipv4-family": {
"route-distinguisher": "4000:1",
"export-route-policy": "4000:1,5000:1",
"import-route-policy": "4000:1,5000:1",
}
}
]
}
Following is expected as a result of these configurations¶
VPN ID is allocated and updated in data-store
Corresponding VRF is created in BGP
If there are vpn-interface configurations for this VPN, corresponding action is taken as defined in step 5
Step 5 : Create VPN-Interface and Local Adjacency¶
this can be done in two steps as well
1. Create vpn-interface¶
REST API : PUT /config/l3vpn:vpn-interfaces/l3vpn:vpn-interface/
Sample JSON Data
{
"vpn-interface": [
{
"vpn-instance-name": "testVpn1",
"name": "dpn1-dp1.2",
}
]
}
Note
name here is the name of VM interface created in step 3, 4
2. Add Adjacencies on vpn-interafce¶
REST API : PUT /config/l3vpn:vpn-interfaces/l3vpn:vpn-interface/dpn1-dp1.3/adjacency
Sample JSON Data
{
"adjacency" : [
{
"ip-address" : "169.144.42.168",
"mac-address" : "11:22:33:44:55:66"
}
]
}
its a list, user can define more than one adjacency on a vpn_interface
Above steps can be carried out in a single step as following
{
"vpn-interface": [
{
"vpn-instance-name": "testVpn1",
"name": "dpn1-dp1.3",
"odl-l3vpn:adjacency": [
{
"odl-l3vpn:mac_address": "11:22:33:44:55:66",
"odl-l3vpn:ip_address": "11.11.11.2",
}
]
}
]
}
Following is expected as a result of these configurations¶
Prefix label is generated and stored in DS
Ingress table is programmed with flow corresponding to interface
Local Egress Group is created
Prefix is added to BGP for advertisement
BGP pushes route update to FIB YANG Interface
FIB Entry flow is added to FIB Table in OF pipeline