Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Configuring Translation Type for Translation Between IPv6 and IPv4 Networks

To configure the translation type as basic-nat-pt, you must configure the DNS ALG application, the NAT pools and rules, a service set with a service interface, and trace options. This topic includes the following tasks:

Configuring the DNS ALG Application

To configure the DNS ALG application:

  1. In configuration mode, go to the [edit applications] hierarchy level.
    [edit]user@host# edit applications
  2. Configure the ALG to which the DNS traffic is destined at the [edit applications] hierarchy level. Define the application name and specify the application protocol to use in match conditions in the first NAT rule or term.
    [edit applications]user@host# set application application-name application-protocol application-protocol

    In the following example, the application name is dns-alg and application protocol is dns.

    [edit applications]user@host# set application dns-alg application-protocol dns
  3. Verify the configuration by using the show command at the [edit applications] hierarchy level.
    [edit applications]
    user@host# show 
    application dns-alg {
        application-protocol dns;
    }

Configuring the NAT Pool and NAT Rule

To configure the NAT pool and NAT rule:

  1. In configuration mode, go to the [edit services nat] hierarchy level.
    [edit]user@host# edit services nat
  2. Configure the NAT pool and its address.
    [edit services nat]user@host# set pool pool-name address address

    In the following example, the name of the NAT pool is p1 and the address is 10.10.10.2/32.

    [edit services nat]user@host# set pool p1 address 10.10.10.2/32
  3. Configure the source pool and its address.
    [edit services nat]user@host# set pool source-pool-name address address

    In the following example, the name of the source pool is src_pool0 and the source pool address is 20.1.1.1/32.

    [edit services nat]user@host# set pool src_pool0 address 20.1.1.1/32
  4. Configure the destination pool and its address.
    [edit services nat]user@host# set pool destination-pool-name address address

    In the following example, the name of the destination pool is dst_pool0 and the destination pool address is 50.1.1.2/32.

    [edit services nat]user@host# set pool dst_pool0 address 50.1.1.2/32
  5. Configure the rule and the match direction.
    [edit services nat]user@host# set rule rule-name match-direction match-direction

    In the following example, the rule name is rule-basic-nat-pt and the match direction is input.

    [edit services nat]user@host# set rule basic-nat-pt match-direction input
  6. Configure the term and the input conditions for the NAT term.
    [edit services nat]user@host# set rule rule-basic-nat-pt term term from from

    In the following example, the term is t1 and the input conditions are source-address 2000::2/128, destination-address 4000::2/128, and applications dns_alg.

    [edit services nat]user@host# set rule rule-basic-nat-pt term t1 from source-address 2000::2/128 [edit services nat]user@host# set rule rule-basic-nat-pt term t1 from destination-address 4000::2/128 [edit services nat]user@host# set rule rule-basic-nat-pt term t1 from applications dns_alg
  7. Configure the NAT term action and the properties of the translated traffic.
    [edit services nat]user@host# set rule rule-basic-nat-pt term t1 then term-action translated-property

    In the following example, the term action is translated and the properties of the translated traffic are source-pool src_pool0, destination-pool dst_pool0, and dns-alg-prefix 10:10:10::0/96.

    [edit services nat]user@host# set rule rule-basic-nat-pt term t1 then translated source-pool src_pool0 [edit services nat]user@host# set rule rule-basic-nat-pt term t1 then translated destination-pool dst_pool0 [edit services nat]user@host# set rule rule-basic-nat-pt term t1 then translated dns-alg-prefix 10:10:10::0/96
  8. Configure the translation type.
    [edit services nat]user@host# set rule rule-basic-nat-pt term t1 then translated translation-type translation-type

    In the following example, the translation type is basic-nat-pt.

    [edit services nat]user@host# set rule rule-basic-nat-pt term t1 then translated translation-type basic-nat-pt
  9. Configure another term and the input conditions for the NAT term.
    [edit services nat]user@host# set rule rule-basic-nat-pt term term-name from from

    In the following example, the term name is t2 and the input conditions are source-address 2000::2/128 and destination-address 10:10:10::0/96.

    [edit services nat]user@host# set rule rule-basic-nat-pt term t2 from source-address 2000::2/128 [edit services nat]user@host# set rule rule-basic-nat-pt term t2 from destination-address 10:10:10::0/96
  10. Configure the NAT term action and the property of the translated traffic.
    [edit services nat]user@host# set rule rule-basic-nat-pt term t2 then term-action translated-property

    In the following example, the term action is translated and the property of the translated traffic is source-prefix 19.19.19.1/32.

    [edit services nat]user@host# set rule rule-basic-nat-pt term t2 then translated source-prefix 19.19.19.1/32
  11. Configure the translation type.
    [edit services nat]user@host# set rule rule-basic-nat-pt term t2 then translated translation-type translation-type

    In the following example, the translation type is basic-nat-pt.

    [edit services nat]user@host# set rule rule-basic-nat-pt term t2 then translated translation-type basic-nat-pt
  12. Verify the configuration by using the show command at the [edit services nat] hierarchy level.
    [edit services nat]
    user@host# show 
    pool p1 {
        address 10.10.10.2/32;
    }
    pool src_pool0 {
        address 20.1.1.1/32;
    }
    pool dst_pool0 {
        address 50.1.1.2/32;
    }
    rule rule-basic-nat-pt {
        match-direction input;
        term t1 {
            from {
                source-address {
                    2000::2/128;
                }
                destination-address {
                    4000::2/128;
                }
                applications dns_alg; 
            }
            then {
                translated {
                    source-pool src_pool0;
                    destination-pool dst_pool0;
                    dns-alg-prefix 10:10:10::0/96;
                    translation-type {
                        basic-nat-pt;
                    }
                }
            }
        }
        term t2 {
            from {
                source-address {
                    2000::2/128;
                }
                destination-address {
                    10:10:10::0/96;
                }
            }
            then {
                translated {
                    source-prefix 19.19.19.1/32;
                    translation-type {
                        basic-nat-pt;
                    }
                }
            }
        }
    }

Configuring the Service Set for NAT

To configure the service set for NAT:

  1. In configuration mode, go to the [edit services] hierarchy level.
    [edit]user@host# edit services
  2. Configure the service set.
    [edit services]user@host# edit service-set service-set-name

    In the following example, the name of the service set is ss_dns.

    [edit services]user@host# edit service-set ss_dns
  3. Configure the service set with NAT rules. 
    [edit services service-set ss_dns]user@host# set nat-rules rule-name

    In the following example, the rule name is rule-basic-nat-pt.

    [edit services service-set ss_dns]user@host# set nat-rules rule-basic-nat-pt
  4. Configure the service interface.
    [edit services service-set ss_dns]user@host# set interface-service service-interface service-interface-name

    In the following example, the name of service interface is sp-1/2/0.

    [edit services service-set ss_dns]user@host# set interface-service service-interface sp-1/2/0
  5. Verify the configuration by using the show services command from the [edit] hierarchy level.
    [edit]
    user@host# show services 
        service-set ss_dns {                
            nat-rules rule-basic-nat-pt;         
            interface-service {             
                service-interface sp-1/2/0; 
            }                               
        }

Configuring Trace Options

To configure the trace options:

  1. In configuration mode, go to the [edit services adaptive-services-pics] hierarchy level.
    [edit]user@host# edit services adaptive-services-pics
  2. Configure the trace options.
    [edit services adaptive-services-pics]user@host# set traceoptions flag tracing parameter

    In the following example, the tracing parameter is all.

    [edit services adaptive-services-pics]user@host# set traceoptions flag all
  3. Verify the configuration by using the show command at the [edit services] hierarchy level.
    [edit services]
    user@host# show
    adaptive-services-pics {                
        traceoptions {                      
            flag all;                       
        }                                   
    }

Published: 2012-11-28

Published: 2012-11-28