Routing

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.
Expand all | Collapse all

MS-MPC NAT pool /32

  • 1.  MS-MPC NAT pool /32

    Posted 01-29-2015 02:25

    Hello! 

    I'm trying to configure NAT on MS-MPC (MX480) . but the configuration is not applied.

    I want NAPT on one special destination-IP ( 8.8.8.8 example) to special pool consisting one IP.

     

    example:

    term DELTA_REAL_IP {
        from {
            destination-address {
                8.8.8.8/32;
            }
            source-prefix-list {
                BRAS_NETWORK_NAT;
            }
        }
        then {                              
            translated {
                destination-prefix 185.13.112.250/32;
                translation-type {
                    dnat-44;
                }
            }
        }
    }
    
    {master}[edit services nat rule AMS]
    admin@M# commit check 
    re0: 
    [edit services]
      'nat'
        Rule AMS has terms of different kind
    error: configuration check-out failed
    
    {master}[edit services nat rule AMS]
    admin@M# 

     

     

    I tryed this

    pool DELTA_REAL_IP {
    address 185.13.112.250/32;
    port {
    automatic {
    random-allocation;
    }
    }
    address-allocation round-robin;
    }

    term DELTA_REAL_IP { from { destination-address { 8.8.8.8/32; } source-prefix-list { BRAS_NETWORK_NAT; } } then { translated { source-pool DELTA_REAL_IP; translation-type { napt-44; } address-pooling paired; } } } } {master}[edit services nat] admin@M# commit check re0: error: AMS-NAT contraint check failed for pool DELTA_REAL_IP service-set AMS interface ams0 size of the pool should be >= AMS configured active member count [edit services] 'service-set AMS' service-set policies inconsistent for ams-interface configuration check succeeds re1: configuration check succeeds {master}[edit services nat] admin@M10_MX480#

     



  • 2.  RE: MS-MPC NAT pool /32

    Posted 01-29-2015 16:57

    If you're trying to do a dest-nat (make traffic to 8.8.8.8 go to 185.13.112.250 instead), the first one looks good.  The second one is set for a source-nat instead of dest-nat, that's why the error returned is different.

     

    You didn't provide the service-set config that contains the rule, but it is probably related.  Take a look at the Understanding Aggregated Multiservices Interfaces page.  There is a really large block on the second page that has a note about NAT44 and load balancing with AMS.  The validation may be failing if the load balancing configured in the service set isn't symmetric. That would sort of fit with the error message it returned in the first example.

     

    Oh, and there is this page too with a full example, although it is source rather than dest nat:

    http://www.juniper.net/techpubs/en_US/junos14.2/topics/example/nat-static-source-translation-ams.html

     

    -Chad



  • 3.  RE: MS-MPC NAT pool /32

    Posted 02-01-2015 01:12

    Hello! Thx for your answer.
    I read your example, but this does not apply to my situation

     

    I upload scheme for a better understanding of the problem.NAT MS.PNG



  • 4.  RE: MS-MPC NAT pool /32

    Posted 02-01-2015 05:17

    Hello,

     


    @radeon-1 wrote:

    Hello! 

    I'm trying to configure NAT on MS-MPC (MX480) . but the configuration is not applied.

    I want NAPT on one special destination-IP ( 8.8.8.8 example) to special pool consisting one IP.

     


    This is supported, but not with AMS with >1 active member.

    Use a special AMS with 1 active MAMS member or use plain MS interfaces.

     


    @radeon-1 wrote:


    {master}[edit services nat] admin@M# commit check re0: error: AMS-NAT contraint check failed for pool DELTA_REAL_IP service-set AMS interface ams0 size of the pool should be >= AMS configured active member count [edit services] 'service-set AMS' service-set policies inconsistent for ams-interface configuration check succeeds re1: configuration check succeeds {master}[edit services nat] admin@M10_MX480#

     


    JUNOS is trying to tell You that a NAPT pool with 1 public IP is not supported with AMS with >1 active member since there is no way to split /32 between 2 or more MAMS members.

     

    HTH

    Thanks

    Alex

     



  • 5.  RE: MS-MPC NAT pool /32

    Posted 02-01-2015 13:46

    Hello, Alex!

     

    I tried / 29, but it seems to me now the problem in return traffic

     

    Rule/ Trasnlation is works.

    but  

     

    {master}
    admin@M10_MX480> show services stateful-firewall flows extensive | match 8.8.8.8 
    ICMP 192.168.72.145 -> 8.8.8.8 Forward I 179
    ICMP 8.8.8.8 -> 185.13.112.252 Forward O 0
    
    {master}
    admin@M10_MX480>
    {master}
    admin@M10_MX480> show services stateful-firewall flows | match 8.8.8.8    
    UDP     192.168.72.144:61984 ->        8.8.8.8:53    Forward  I               5
    UDP            8.8.8.8:53    -> 185.13.112.253:41663 Forward  O               0
    UDP     192.168.72.144:64695 ->        8.8.8.8:53    Forward  I               5
    UDP            8.8.8.8:53    -> 185.13.112.253:22013 Forward  O               0
    ICMP    192.168.72.144       ->        8.8.8.8       Forward  I              87
    ICMP           8.8.8.8       -> 185.13.112.253       Forward  O               0
    
    {master}
    admin@M10_MX480> 
    
    
    
    {master}
    admin@M10_MX480> show route table inet.0 185.13.112.253 extensive    
    
    inet.0: 541141 destinations, 924298 routes (540938 active, 0 holddown, 620 hidden)
    185.13.112.253/32 (1 entry, 1 announced)
    TSI:
    KRT in-kernel 185.13.112.253/32 -> {Service}
    Aggregated into 185.13.112.0/22
            *Static Preference: 1
                    Next hop type: Service
                    Address: 0x16568224
                    Next-hop reference count: 12
                    Next hop: 
                    Next-hop service: AMS
                    Next-hop index: 620
                    State: <Active Int ProxyArp>
                    Age: 5:22 
                    Validation State: unverified 
                    Task: RPD Unix Domain Server./var/run/rpd_serv.local
                    Announcement bits (3): 0-KRT 5-Resolve tree 2 7-Aggregate 
                    AS path: I
    
    {master}
    admin@M10_MX480> show route table inet.0 185.13.112.162 extensive    
    
    inet.0: 541141 destinations, 924298 routes (540938 active, 0 holddown, 620 hidden)
    185.13.112.160/29 (1 entry, 1 announced)
    TSI:
    KRT in-kernel 185.13.112.160/29 -> {Service}
    Aggregated into 185.13.112.0/22
            *Static Preference: 1
                    Next hop type: Service
                    Address: 0x16568224
                    Next-hop reference count: 12
                    Next hop: 
                    Next-hop service: AMS
                    Next-hop index: 620
                    State: <Active Int ProxyArp>
                    Age: 5:23 
                    Validation State: unverified 
                    Task: RPD Unix Domain Server./var/run/rpd_serv.local
                    Announcement bits (3): 0-KRT 5-Resolve tree 2 7-Aggregate 
                    AS path: I
    
    {master}
    admin@M10_MX480> 
    
    
    
    
    {master}
    admin@M10_MX480> show configuration services    
    service-set AMS {
        nat-rules AMS;
        next-hop-service {
            inside-service-interface ams0.10;
            outside-service-interface ams0.20;
        }
    }
    nat {
        pool OFFICE {
            address-range low 185.13.112.160 high 185.13.112.191;
            port {
                automatic {
                    random-allocation;
                }
            }
            address-allocation round-robin;
        }
        pool TEST_PBA {
            address-range low 185.13.112.192 high 185.13.112.200;
            port {
                automatic {
                    random-allocation;
                }
                secured-port-block-allocation block-size 64 max-blocks-per-address 8;
            }
            address-allocation round-robin;
            mapping-timeout 120;
        }
        pool DELTA_REAL_IP {
            address 185.13.112.248/29;
            port {
                automatic {
                    random-allocation;
                }
            }
            address-allocation round-robin;
        }
        rule AMS {
            match-direction input;
            term DELTA_REAL_IP {
                from {
                    source-address {
                        192.168.72.0/24;
                    }
                    destination-address {
                        8.8.8.8/32;
                    }
                }
                then {
                    translated {
                        source-pool DELTA_REAL_IP;
                        translation-type {
                            napt-44;        
                        }
                        address-pooling paired;
                    }
                }
            }
            term OFFICE {
                from {
                    source-address {
                        192.168.72.0/24;
                    }
                    application-sets ALG_WITHOUT_EIM_EIF;
                }
                then {
                    translated {
                        source-pool OFFICE;
                        translation-type {
                            napt-44;
                        }
                        address-pooling paired;
                    }
                }
            }
            term OFFICE_IEM {
                from {
                    source-address {
                        192.168.72.0/24;
                    }
                }
                then {
                    translated {
                        source-pool OFFICE;
                        translation-type {
                            napt-44;
                        }
                        mapping-type endpoint-independent;
                        filtering-type {
                            endpoint-independent;
                        }
                        address-pooling paired;
                    }
                }
            }
            term BRAS {
                from {
                    source-address {
                        10.141.0.0/16;
                        10.144.0.0/16;
                        10.145.0.0/16;
                        10.146.0.0/16;
                        10.148.0.0/16;
                        10.149.0.0/16;
                        10.150.0.0/16;
                        10.152.0.0/16;      
                        10.153.0.0/16;
                        10.154.0.0/16;
                        10.155.0.0/16;
                        10.156.0.0/16;
                    }
                    application-sets ALG_WITHOUT_EIM_EIF;
                }
                then {
                    translated {
                        source-pool OFFICE;
                        translation-type {
                            napt-44;
                        }
                        address-pooling paired;
                    }
                }
            }
            term BRAS_IEM {
                from {
                    source-address {
                        10.141.0.0/16;
                        10.144.0.0/16;
                        10.145.0.0/16;
                        10.146.0.0/16;
                        10.148.0.0/16;
                        10.149.0.0/16;
                        10.150.0.0/16;
                        10.152.0.0/16;
                        10.153.0.0/16;
                        10.154.0.0/16;
                        10.155.0.0/16;
                        10.156.0.0/16;
                    }
                }
                then {
                    translated {
                        source-pool OFFICE;
                        translation-type {
                            napt-44;
                        }
                        mapping-type endpoint-independent;
                        filtering-type {
                            endpoint-independent;
                        }
                        address-pooling paired;
                    }
                }
            }
        }
    }
    
    {master}
    admin@M10_MX480>

     



  • 6.  RE: MS-MPC NAT pool /32

    Posted 02-02-2015 08:36

    Hello,

    Two points:

    1/ You need to announce Your NAT pool to outside world, via BGP or else.

    2/ PBA is supported on MS-MPC only from 14.2R2 onwards.

    Also, all commands on MS-MPC start with "show services sessions...".

    "show services stateful-firewall..."  commands are for MS-DPC.

    HTH

    Thanks

    Alex



  • 7.  RE: MS-MPC NAT pool /32

    Posted 02-02-2015 08:46

    hello!

     

    1) i already announce this all network ( /22 ) to EBGP peer.

    all the resources available on the Internet, except for 8.8.8.8 ( term DELTA_REAL_IP) 

     

    admin@M10_MX480> ...ertising-protocol bgp 87.245.253.189 | match 185.13.
    * 185.13.112.0/22         Self                                    I
    
    {master}
    admin@M10_MX480>
    

     2) Ok, thx. 

     



  • 8.  RE: MS-MPC NAT pool /32

    Posted 02-02-2015 09:21

    Hello,

    And what happens if Your subs try to access 8.8.4.4?

    Thanks

    Alex



  • 9.  RE: MS-MPC NAT pool /32

    Posted 02-02-2015 11:29

    everything is OK.

    I can not now showcased the result. 



  • 10.  RE: MS-MPC NAT pool /32

    Posted 02-03-2015 06:46

    Hello!

    The problem was back in traffic with another border. my trouble 😞

     

    Now trying to do the translation in a pool consisting of a single address.

     

    JTAC was trying to make with the help (SecureMeeting)  within 2 hours. But the workaround is not found.



  • 11.  RE: MS-MPC NAT pool /32

    Posted 02-03-2015 12:41

    Hi there,

    Glad You found the problem.

     


    @radeon-1 wrote:

     

     

    Now trying to do the translation in a pool consisting of a single address.

     

    JTAC was trying to make with the help (SecureMeeting)  within 2 hours. But the workaround is not found.


    There is no workaround for AMS with 2+ active MAMS and single /32 pool, period.

    You need to change the NAT HA design and use another AMS with 1 active MAMS, or use plain MS interfaces.

    HTH

    Thanks

    Alex



  • 12.  RE: MS-MPC NAT pool /32

    Posted 02-04-2015 05:34

    Hello!

    Where i can read about this case? book or example?

     

     

    ps: Allocate a single address pool (/32) <> service interface "expensive"



  • 13.  RE: MS-MPC NAT pool /32

    Posted 02-05-2015 11:43

    Hello,

     


    @radeon-1 wrote:

    Hello!

    Where i can read about this case? book or example?

     

     


    Try this free book  https://www.juniper.net/uk/en/training/jnbooks/day-one/networking-technologies-series/deploying-cgnat/ 

     


    @radeon-1 wrote:

     

     

     

    ps: Allocate a single address pool (/32) <> service interface "expensive"


    You don't have to dedicate 1 NPU for this /32 pool. You can have an NPU working as a member of AMS (MAMS), and use MS subinterfaces on same NPU to drive another/different NAT service-set.

    HTH

    Thanks
    Alex



  • 14.  RE: MS-MPC NAT pool /32
    Best Answer

    Posted 02-05-2015 11:43

    Hello,

     


    @radeon-1 wrote:

    Hello!

    Where i can read about this case? book or example?

     

     


    Try this free book  https://www.juniper.net/uk/en/training/jnbooks/day-one/networking-technologies-series/deploying-cgnat/ 

     


    @radeon-1 wrote:

     

    ps: Allocate a single address pool (/32) <> service interface "expensive"


    You don't have to dedicate 1 NPU for this /32 pool. You can have an NPU working as a member of AMS (MAMS), and use MS subinterfaces on same NPU to drive another/different NAT service-set.

    HTH

    Thanks
    Alex

     



  • 15.  RE: MS-MPC NAT pool /32

    Posted 02-06-2015 00:39

    Hello! 

     

    Is good news!! i will try this feature. 

    THX!