SRX

last person joined: 3 days ago 

Ask questions and share experiences about the SRX Series, vSRX, and cSRX.
  • 1.  Advertising Prefixes with BGP on SRX vs Cisco

    Posted 12-17-2014 16:59

    Must say surprised somewhat with lack of 'network' command under protocol bgp stanza, of course comparing with Cisco.

     

    Many of you will know to advertise a prefix to another iBGP or eBGP neighbor, the network command is normally used to this ...

     

    router bgp 65555

    router-id 1.1.1.1

    neighbor 2.2.2.2 remote-as 65556 (btw at this stage the router knows its going to be eBGP neighbor as AS is diff)

    network 192.168.1.0 mask 255.255.255.0 <---- voila - so long as this prefix is present in RT and next-hop is accessible, I shall advertise.

     

    two questions.

    1. With Junos is it completely necessary with both iBGP and eBGP, to use the group <name> type internal (for iBGP), or type external for eBGP when building up your BGP peerings?. If the AS is set under routing-options stanza, why is it then necessary to set 'types', surely the srx would know if it were iBGP or eBGP and apply the relevent behaviours i.e full-mesh / next-hop maintained etc.

     

    2. with the abscence of 'network' command (it seems), can i please as the equivalent in Junos (if there is one that is).

     

    thank you

     

     



  • 2.  RE: Advertising Prefixes with BGP on SRX vs Cisco

     
    Posted 12-17-2014 17:34

    1) I don't really see a problem with creating a minimum of two groups - one for internal and one for external.  I've actually never tried to configure two neighbors under the same group with one neighbor internal and one external, but it can probably be done.  You can set any group-level parameters at the neighbor level if you want.

     

    2) The Juniper policy, IMO, is much more scalable and powerful than IOS (IOS-XE, I'm told, is a different animal).  What you are asking can be done one of several ways, depending on what you want to achieve.  If all you want is to be able to nail up a route, you can configure a static route with a discard next-hop and export that static with an export policy:

     

    routing-options {
       static {
           route 192.168.1.0/24 discard;
       }
    }
    policy-options {
        policy-statement bgp-policy {
            term 1-export_route {
                from {
                    protocol static;
                    route-filter 192.168.1.0/24 exact;
                }
                then accept;
            }
        }
    }
    protocols {
        bgp {
            group ebgp {
                export bgp-policy;
            }
        }
    }

    Bear in mind that this is just the minimum of what you could use to advertise the route.  It would behoove you to read through the docs on routing policy:

     

    https://www.juniper.net/documentation/en_US/junos12.3/information-products/pathway-pages/config-guide-policy/config-guide-policy.html

     

    You can take one or many actions on that route prior to exporting it to BGP - set communities, change as-path, push it to a different policy to take further action, set origin, etc.  You will get used to it once you find how powerful the routing policy is in Junos.

     

    The only really annoying thing about Juniper BGP configuration that I've found in the 12+ years I've been working with Juniper is the lack of an equivalent "shutdown" command for individual BGP neighbors.



  • 3.  RE: Advertising Prefixes with BGP on SRX vs Cisco

    Posted 12-18-2014 04:13

    hi evt. appreciate taking time to reply.

     

    i do hear what you're saying about 'groups' point taken.

     

    the sample supplied was quite interesting, and one i'd class as 'redistributing' static into bgp. i'm clear on that.

     

    i find 'redistributing' static (or for that matter from any external source), slightly long-winded. acuse me of being lazy, i hold both hands up.

     

    what i was querying in my op was the equivalent to 'network' command for BGP, or even what is the method for advertising connected networks with BGP using junos



  • 4.  RE: Advertising Prefixes with BGP on SRX vs Cisco
    Best Answer

     
    Posted 12-18-2014 04:25

    There kind of isn't a one-to-one equivalent.  As I said, you can create an aggregate route (similar to creating a static route) and distribute that into BGP or you can have it as a connected network and distribute that into BGP.  Either way you look at it, you are distributing it into BGP somehow.

     

    The method for the two suggestions above is exactly the same as my prior suggestion, which is why I suggested reading through the policy documentation.  The only difference is that rather than configuring 'from protocol static', you configure 'from protocol aggregate' or 'from protocol direct' (direct is Junos' version of 'connected' routes).  The only difference here is that with 'aggregate', there needs to be contributing routes and I believe the Cisco equivalent is actually 'aggregate-address'.

     

    If it's that important that you have a "network" command, you can create a policy called "network" and export that to your BGP neighbors.



  • 5.  RE: Advertising Prefixes with BGP on SRX vs Cisco

    Posted 12-18-2014 04:32

    thats make a lot more sense now. thanks for that !

     

    i note there's prefix-list option though i'm just thinking out aloud now (probably used for filtering), but if not its perhaps the closest to specifying the prefixes that you wish to advertise.

     

    cheers : )



  • 6.  RE: Advertising Prefixes with BGP on SRX vs Cisco

     
    Posted 12-18-2014 04:39

    Yes, you could create a prefix-list with that network and have a 'from prefix-list xxxxxx' in your policy.  As I said, there's many ways you can get your networks into BGP.  Of course, the normal rules of BGP apply, where your router needs to already have the network in its routing table, either through an IGP, static, aggregate, or iBGP (if exporting to an eBGP neighbor or iBGP route-reflector client).