Related Documentation
Configuring Dynamic Source Address and Port Translation for IPv6 Networks
Network Address Port Translation (NAPT) is a method by which many network addresses and their TCP/UDP ports are translated into a single network address and its TCP/UDP ports. This translation can be configured in both IPv4 and IPv6 networks. This section describes the steps for configuring NAPT in IPv6 networks. For information about configuring NAPT in IPv4 networks, see Configuring Dynamic Source Address and Port Translation in IPv4 Networks.
To configure NAPT, you must configure a rule at the [edit services nat] hierarchy level for dynamically translating the source IPv6 addresses.
To configure NAPT in IPv6 networks:
- In configuration mode, go to the [edit services nat] hierarchy level.[edit]user@host# edit services nat
- Define the pool of IPv6 source addresses that must be
used for dynamic translation. For NAPT, also specify port numbers
when configuring the source pool. [edit services nat]user@host# set pool pool name address IPv6 source addressesuser@host# set pool pool name port source ports
For example:
[edit services nat]user@host# set pool IPV6-NAPT-Pool address 2002::1/96user@host# set pool IPV6-NAPT-Pool port automatic - Define a NAT rule for translating the source addresses.
To do this, set the match-direction statement of the rule
as input. In addition, define a term that uses napt-66 as the translation type for translating the addresses of the pool
defined in the previous step.[edit services nat]user@host# set rule rule name match-direction inputuser@host# set rule rule name term term name then translated source-pool pool nameuser@host# set rule rule name term term name then translated translation-type napt-66
For example:
[edit services nat]user@host# set rule IPV6-NAPT-Rule match-direction inputuser@host# set rule IPV6-NAPT-Rule term t1 then translated source-pool IPV6-NAPT-Pooluser@host# set rule IPV6-NAPT-Rule term t1 then translated translation-type napt-66 - Enter the up command to navigate to the [edit services] hierarchy level. [edit services nat]user@host# up
- Define a service set to specify the services interface
that must be used, and reference the NAT rule implemented for NAPT
translation.[edit services]user@host# set service-set service-set name interface- service service-interface services interfaceuser@host# set service-set service-set name nat-rules rule name
For example:
[edit services]user@host# set service-set IPV6-NAPT-ServiceSet interface-service service-interface ms-0/1/0user@host# set service-set IPV6-NAPT-ServiceSet nat-rules IPV6-NAPT-Rule - Define the trace options for the adaptive services PIC.[edit services]user@host# set adaptive-services-pics traceoptions flag tracing parameter
For example:
[edit services]user@host# set adaptive-services-pics traceoptions flag all