Edit L2 VPN Client

To edit L2 VPN client, use the following request:

PUT /nsx/edges/:edge_id/vpn/l2_vpn/service.xml 
PUT /nsx/edges/:edge_id/vpn/l2_vpn/service.json

XML Request Example

curl -i -X PUT http://onapp.test/nsx/edges/128/vpn/l2_vpn/service.xml -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d <nsx_l2_vpn_service><ca_certificate>certificate-38</ca_certificate><certificate_auth_enabled>true</certificate_auth_enabled><egress_optimization type="array"><egress_optimization>32.23.3.3</egress_optimization></egress_optimization><enabled>true</enabled><encryption_algorithm type="array"><encryption_algorithm>AES128-GCM-SHA256</encryption_algorithm></encryption_algorithm><mode>client</mode><proxy_address>123.3.33.4</proxy_address><proxy_port>2722</proxy_port><proxy_user_name>user</proxy_user_name><proxy_user_password>%b5u`=8G[GK#vHe`</proxy_user_password><secure_proxy_enabled>true</secure_proxy_enabled><server_address>123.3.23.3</server_address><server_port>433</server_port><sub_interfaces type="array"><sub_interface>10</sub_interface><sub_interface>11</sub_interface></sub_interfaces><user_id>user</user_id><user_password>%b5u`=8G[GK#vHe`</user_password></nsx_l2_vpn_service>"

JSON Request Example

url -i -X PUT http://onapp.test/nsx/edges/115/vpn/l2_vpn/service.json -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{"nsx_l2_vpn_service":{"enabled":true,"mode":"client","server_address":"123.3.23.3","server_port":"433","encryption_algorithm":["AES128-GCM-SHA256"],"egress_optimization":["32.23.3.3"],"user_id":"user","user_password":"%b5u`=8G[GK#vHe`","proxy_address":"123.3.33.4","proxy_port":"2722","proxy_user_name":"user","proxy_user_password":"%b5u`=8G[GK#vHe`","ca_certificate":"certificate-38","sub_interfaces":["10","11"],"certificate_auth_enabled":true,"secure_proxy_enabled":true}}'

Where:

enabled* - true if L2 VPN service is enabled; otherwise, false

mode*client

server_address* - the address of the L2 VPN server to which this client is to be connected

server_port* - the default port to which the L2 VPN client must connect to

encryption_algorithm* - the encryption algorithm for communicating with the server

egress_optimization* - the gateway IP address of the sub interfaces or the IP addresses to which traffic should not flow over the tunnel

user_id* - a user name with which the server is to be authenticated

user_password* - a password with which the peer site is to be authenticated

proxy_address - the proxy server address; required if secure_proxy_enabled is true

proxy_port - the proxy server port; required if secure_proxy_enabled is true

proxy_user_name - a user name with which the proxy server is to be authenticated; required if secure_proxy_enabled is true

proxy_user_password - a user password with which the proxy server is to be authenticated; required if secure_proxy_enabled is true

ca_certificate - the identifier of the CA certificate for this client

sub_interfaces - the indexes of the sub interfaces

certificate_auth_enabled* - true if certificate client authentication is enabled; otherwise, false

secure_proxy_enabled* - true if only secure proxy connections are enabled; otherwise, false