Routing

 View Only
last person joined: 3 days ago 

Ask questions and share experiences about ACX Series, CTP Series, MX Series, PTX Series, SSR Series, JRR Series, and all things routing, including portfolios and protocols.
  • 1.  MX80 Inline NAT

    Posted 04-08-2019 05:29

    Hi folks, according to the documentation the inline 1:1 nat shoud work but apparantly for me it does not work.

    This is the configuration I use:

     

    set chassis fpc 0 pic 0 inline-services bandwidth 1g
    set interfaces si-0/0/0 unit 0 family inet
    
    set services nat rule SRC-NAT1 match-direction input
    set services nat rule SRC-NAT1 term r1 from source-address 10.0.0.16/32
    set services nat rule SRC-NAT1 term r1 then translated translation-type basic-nat44
    set services nat rule SRC-NAT1 term r1 then translated source-pool p1
    
    set services nat pool p1 address XXX.140.140.211/32
    
    set services service-set INT-STYLE-SS-NAT1 nat-rules SRC-NAT1
    set services service-set INT-STYLE-SS-NAT1 interface-service service-interface si-0/0/0.0
    
    set interfaces xe-0/0/0 unit 0 family inet service input service-set INT-STYLE-SS-NAT1
    set interfaces xe-0/0/0 unit 0 family inet service output service-set INT-STYLE-SS-NAT1

    Statistics:

    # run show services inline nat statistics
    
     Service PIC Name                                      si-0/0/0
    
     Control Plane Statistics
         Received IPv4 packets                                28767
         ICMPv4 error packets pass through                    0
         ICMPv4 error packets locally generate                0
         Dropped IPv4 packets                                 0
         Received IPv6 packets                                0
         ICMPv6 error packets pass through for NPTv6          0
         ICMPv6 error packets locally generated for NPTv6     0
         Dropped IPv6 packets                                 0
    
     Data Plane Statistics           Packets                  Bytes
         IPv4 NATed packets            0                       0
         IPv4 deNATed packets          0                       0
         IPv4 error packets            0                       0
         IPv4 skipped packets          0                       0
         IPv6 NATed packets            0                       0
         IPv6 deNATed packets          0                       0
         IPv6 error packets            0                       0
         IPv6 skipped packets          0                       0

    Received IPv4 packets is increasing but no nat is done

     

    # run show services inline nat pool
    Interface: si-0/0/0, Service set: INT-STYLE-SS-NAT1
      NAT pool: p1, Translation type: BASIC NAT44
        Address range: XXX.140.140.211-XXX.140.140.211
        NATed packets: 0, deNATed packets: 0, Errors: 0, Skipped packets: 0
    

     

    Out interface:

    set interfaces xe-0/0/0 unit 0 family inet service input service-set INT-STYLE-SS-NAT1
    set interfaces xe-0/0/0 unit 0 family inet service output service-set INT-STYLE-SS-NAT1
    set interfaces xe-0/0/0 unit 0 family inet address xxx.140.140.210/29
    set interfaces xe-0/0/0 unit 0 family inet address xxx.140.140.211/29
    set interfaces xe-0/0/0 unit 0 family inet address xxx.140.140.212/29

     

    In interface:

    set interfaces xe-0/0/1 unit 400 vlan-id 400
    set interfaces xe-0/0/1 unit 400 family inet address XXX.29.203.33/27
    set interfaces xe-0/0/1 unit 400 family inet address 10.0.0.1/24

    Am I missing some configuration or ?

     

    Thanks,

    Dan



  • 2.  RE: MX80 Inline NAT
    Best Answer

    Posted 04-08-2019 06:13

    Hi,

     

    According to https://www.juniper.net/documentation/en_US/junos/topics/example/nat-inline.html

    On the ’inside’ interface, specify that traffic will be sent through the service set defined above.
    [edit interfaces xe-0/0/0 unit 0]
    user@MX# set family inet service input service-set INT-STYLE-SS-NAT1
    user@MX# set family inet service output service-set INT-STYLE-SS-NAT1

    In your scenario inside interface is xe-0/0/1.

    Pleasy apply service-set to interface xe-0/0/1 instead of xe-0/0/0.

     

    Regards,

    Roman



  • 3.  RE: MX80 Inline NAT

    Posted 04-08-2019 07:10

    great, it is working with your solution!