Assigning a service policy to a LIF
Starting with ONTAP 9.5, you can assign a service policy to a LIF either at the time of creating the LIF or by modifying the LIF. A service policy defines the list of services that can be used with the LIF.
About this task
In ONTAP 9.5, you can assign service policies only for LIFs in the admin SVM. In ONTAP 9.6, you can additionally assign service policies for LIFs in the data SVMs.Depending on when you want to assign the service policy to a LIF, perform one of the following actions:
If you are... | Assign the service policy by entering the following command... |
---|---|
Creating a LIF | network interface create -vserver svm_name -lif lif_name -home-node node_name -home-port port_name {(-address IP_address -netmask IP_address) | -subnet-name subnet_name} -service-policy service_policy_name |
Modifying a LIF | network interface modify -vserver svm_name -lif lif_name -service-policy service_policy_name |
When you specify a service policy for a LIF, you need not specify the data protocol and role for the LIF. Creating LIFs by specifying the role and data protocols is also supported.
Note
A service policy can only be used by LIFs in the same SVM that you specified when creating the service policy.
Examples
The following example shows how to modify the service policy of a LIF to use the default-management service policy:
cluster1::> network interface modify -vserver cluster1 -lif lif1 -service-policy default-management
Give documentation feedback