Routing

last person joined: yesterday 

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.  BGP - Originating Networks

    Posted 10-01-2009 15:10

      Let's say I have a BGP connection to an ISP, and I want to advertise or "originate" a network to my ISP.   Let's say the network is 5.5.5.0/24.  In cisco I would use a command like "network 5.5.5.0 mask 255.255.255.0" to ensure I advertise that route to my BGP neighbors.

     

      In Juniper, I read that the default "export" policy for BGP is "Accept and export active BGP routes".  My router doesn't have any "active BGP routes" (lets say it just gets a default route from the ISP via BGP).  So by default my router wouldn't advertise any routes to the ISP via BGP correct?

     

      Let's say I have a prefix list that just contained 5.5.5.0/24.  If I have a policy statement that states "if from my prefix list, then accept", that would then initiate advertisement of the 5.5.5.0/24 network correct?



  • 2.  RE: BGP - Originating Networks

    Posted 10-01-2009 23:45

    Hello,

     

    In order to advertise a route in BGP that has not been learned via BGP, two conditions must be reunited:

     1/ The route needs to be active in the routing table

     2/ You need to match and accept this route in a policy that is applied as "export" in BGP

     

    A prefix-list is just that: a list of prefixes... it is just a handy way of referring to one or more ranges of addresses (say your core backbone...) but this does not imply these routes exist in the routing table. So a prefix-list addresses 2/ but not 1/.

     

    Typically, you define an aggregate-route (5.5.5/24) to make it active in the routing-table (with a next-hop of discard or reject) and then match this in the export policy.

     

    Regards,

    /david 



  • 3.  RE: BGP - Originating Networks
    Best Answer

    Posted 10-02-2009 06:03

    Much like David said, the route needs to be active in the routing table and then you just need to write an export policy for it.

     

    In my case, what I did was I put in a static route on my border router that routed the IP addresses I wanted to originate to the inside of our network:

     

    set routing-options static route 5.5.5.0/24 next-hop ....

     

    Afterwards I went ahead and created the prefix list and the export policy (I used exact here because I did not want anything else leaking out on accident.  You can use different switches that would also export shorter or longer routes)

     

    policy-options {
        prefix-list your-ips {
            5.5.5.0/24;
        }
        policy-statement your-ips-to-advertise {
            term fgcu-ips {
                from {
                    prefix-list-filter your-ips exact;
                }
                then accept;
            }
            term reject-all-else {
                then reject;
            }
        }

    }

     

    Then the export policy goes into your protocols statement:

     

    protocols {
        bgp {
            group your-bgp-peers {
                export your-ips-to-advertise;
                neighbor your-isps-ip-here {
                    peer-as XXXX;
                }
            }
        }
    }

     

    Hope that helps!

     

    SH