1. Go to System Preferences → Network, then click "Create a new service" (plus sign in the bottom left corner of the window).
2. In the "Interface" list choose "VPN", in the "VPN Type" list select "L2TP over IPSec". Enter a connection name and click "Create".
3. Enter the IP address of your VPN gateway into the "Server Address" field. IP address is part of user credentials.
4. Enter the password and shared secret. They are parts of user credentials.
Now you can connect to the VPN.
By default, macOS will route 10/8 network via the VPN connection. You can use the following commands to check routing entries for a VPN connection:
ifconfig ppp0 netstat -rn | grep ppp0
You can also set the default netmask for PPP connections:
# cat /etc/ppp/options netmask 255.255.0.0