Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Configuring Static Source Translation in IPv4 Networks

    To configure the translation type as basic-nat44, you must configure the NAT pool and rule, service set with service interface, and trace options. This topic includes the following tasks:

    1. Configuring the NAT Pool and Rule
    2. Configuring the Service Set for NAT
    3. Configuring Trace Options

    Configuring the NAT Pool and Rule

    To configure the NAT pool, rule, and term:

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

      In the following example, the pool name is src_pool and the address is 10.10.10.2/32.

      [edit services nat]user@host# set pool src_pool address 10.10.10.2/32
    3. Configure the NAT rule and the match direction.
      [edit services nat]user@host# set rule rule-name match-direction match-direction

      In the following example, the NAT rule name is rule-basic-nat44 and the match direction is input.

      [edit services nat]user@host# set rule rule-basic-nat44 match-direction input
    4. Configure the source address in the from statement.
      [edit services nat]user@host# set rule rule-basic-nat44 term term-name from from

      In the following example, the term name is t1 and the input condition is source-address 3.1.1.2/32.

      [edit services nat]user@host# set rule rule-basic-nat44 term t1 from source-address 3.1.1.2/32
    5. Configure the NAT term action and properties of the translated traffic.
      [edit services nat]user@host# set rule rule-basic-nat44 term t1 then term-action translated-property

      In the following example, the term action is translated and the property of the translated traffic is source-pool src_pool.

      [edit services nat]user@host# set rule rule-basic-nat44 term t1 then translated source-pool src_pool
    6. Configure the translation type. 
      [edit services nat]user@host# set rule rule-basic-nat44 term t1 then translated translation-type translation-type

      In the following example, the translation type is basic-nat44.

      [edit services nat]user@host# set rule rule-basic-nat44 term t1 then translated translation-type basic-nat44
    7. Verify the configuration by using the show command at the [edit services] hierarchy level:
      [edit services]
      user@host# show
      nat {
          pool src_pool {
              address 10.10.10.2/32;
          }
          rule rule-basic-nat44 {
              match-direction input;
              term t1 {
                  from {
                      source-address {
                          3.1.1.2/32;
                      }
                  }
                  then {
                      translated {
                          source-pool src_pool;
                          translation-type {
                              basic-nat44;
                          }
                      }
                  }
              }
          }
      }

    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 service set name is s1.

      [edit services]user@host# edit service-set s1
    3. For the s1 service set, set the reference to the NAT rules configured at the [edit services nat] hierarchy level.
      [edit services service-set s1]user@host# set nat-rules rule-name

      In the following example, the rule name is rule-basic-nat44.

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

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

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

    Configuring Trace Options

    To configure the trace options at the [edit services adaptive-services-pics] hierarchy level:

    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-07-02