|
Navigate to the Services level in the configuration
hierarchy.
|
In the configuration editor hierarchy, select Services.
|
From the top of the configuration hierarchy, enter
edit services
|
|
Define a service set—for example, nat-service-set.
Assign the defined NAT rule to the service set—for example, nat-rule.
|
- Next to Service set, click Add new
entry.
- In the Service set name box, type nat-service-set.
- From the Nat rules choice list, select Nat
rules.
- Next to Nat rules, click Add new entry.
- In the Rule name box, type the name of the defined NAT
rule—for example, nat-rule.
- Click OK.
|
Set the service set and assign the NAT rule to it:
set service-set service-set-name nat-rules nat-rule-name
|
|
Define a service set type and virtual service interface sp-0/0/0 as
the service interface for nat-service-set.
|
- From the Service type choice list, select Interface
service.
- Next to Interface service, click Configure.
- In the Service interface box, type sp-0/0/0.
- Click OK.
|
Define the service set type and the service interface:
set service-set nat-rule-set interface-service service-interface
sp-0/0/0
|
|
Navigate to the Interfaces level in the configuration
hierarchy.
|
In the configuration editor hierarchy, select Interface.
|
From the top of the configuration hierarchy, enter
edit interface
|
|
Configure the sp-0/0/0 service interface.
|
- Next to Interface, click Add new entry.
- In the Interface name box, type sp-0/0/0.
- Click OK.
- Click sp-0/0/0.
- Next to Unit, click Add new entry.
- In the Interface unit number box, type 0.
- Next to Inet, select the check box.
- Click OK.
|
Set the service interface:
set interfaces sp-0/0/0 unit 0 family inet
|
|
Apply nat-service-set to the input and output sides
of the physical interface on which NAT is to be enabled—for example t1–0/0/0.
|
- In the configuration editor hierarchy, select Interface>t1–0/0/0>
Unit>0>Family>Inet
- Next to Service, click Configure.
- Next to Input, click Configure.
- Next to Service set, click Add new entry.
- In the Service set name box, type nat-service-set.
- Click OK twice.
- Next to Output, click Configure.
- Next to Service set, click Add new entry.
- In the Service set name box, type nat-service-set.
- Click OK.
|
From the top of the configuration hierarchy, apply the service set to
the interface:
set interfaces t1–0/0/0 unit 0 family inet service input service-set
nat-service-set
set interfaces t1–0/0/0 unit 0 family inet service output
service-set nat-service-set
|