SRX Services Gateway
Reply
EA
Visitor
EA
Posts: 4
Registered: ‎10-23-2009
0
Accepted Solution

Advertise NAT pools to BGP

[ Edited ]

NAT Pools:

1.1.1.0/24

2.2.2.0/24

3.3.3.0/24

 

SRX has interface in only one of these networks (1.1.1.1) with a BGP peer at 1.1.1.254.

 

Since 1.1.1.0/24 is active in our routing table, no problem getting that into our BGP advertisement.

 

What is the most appropriate way to inject the 2.2.2.0/24 and 3.3.3.0/24 NAT pools into BGP?

 

Static route with discard action? Static route with receive action? Other?

Super Contributor
tbehrens
Posts: 348
Registered: ‎04-30-2010
0

Re: Advertise NAT pools to BGP

My standard method is to create a discard static route and use that for the BGP export.

 

There are other methods. Choose one you like best. I like discard, it's worked well for me.

 

Like this:

 

routing-options {
    static {
        route 2.0.0.0/24 discard;

  }

}

 

policy-options {
    policy-statement public-to-bgp {
        from {
            protocol static;
            route-filter 2.0.0.0/24 exact;
        }
        then accept;
    }
}

 

protocols {
    bgp {
        export public-to-bgp;

  }

}

EA
Visitor
EA
Posts: 4
Registered: ‎10-23-2009
0

Re: Advertise NAT pools to BGP

That works. I guess the NAT process grabs it before it actually discards it. It seemed to work that way but it felt counter-intuitive to tell it to discard traffic destined for a network for which I wanted to receive traffic. Thanks for the reply.
Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.