Routing

last person joined: 2 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.  Weighting BGP default routes

    Posted 11-12-2012 15:02

    Hi.

     

    I'm relatively new to BGP on JunOS, and I have what may be a simple query, and may not.

     

    I have a JunOS based edge router running BGP. It is connected to two ISP's, and getting BGP routes from both of them.

     

    It is also getting a default route advertised from both of them. My company has its own ASN and subnet, which we advertise via both uplinks no problem.

     

    The links are asymetrical - we have a different amount of allowable data on each of them - and I'd like to tweak the outbound configuration a bit to force most of the traffic over one link unless there is a noticable better path out the other one.

     

    I have configured a local preference on each link to give the "better" link a higher priority, but as I understand it this affects *all* outbound traffic - what I want to do is weight only the default route - so that one 0.0.0.0/0 route is at, for example, local preference 500, and the other 0.0.0.0/0 is at local preference 400.

     

    Is this even possible, or am I asking too much from JunOS/BGP?

     

    Any assistence appreciated.

     

    Thanks



  • 2.  RE: Weighting BGP default routes
    Best Answer

     
    Posted 11-12-2012 16:02

    Hi Darren,

     

    Yes you can do it with JUNOS with import policy just like below:

     

    Assuming you are peering with two ISPs (172.168.1.2 and 3.3.3.3) and want to prefer 3.3.3.3.

     

    suryak@PE# show protocols bgp
    group ext {
        import LP_MOD;
        neighbor 172.168.1.2 {
            peer-as 500;
        }
        neighbor 3.3.3.3 {
            multihop;
            local-address 1.1.1.1;
            peer-as 200;
        }
    }

    suryak@PE# show policy-options policy-statement LP_MOD
    term a {
        from {
            neighbor 3.3.3.3;
            route-filter 0.0.0.0/0 exact;
        }
        then {
            local-preference 500;
        }
    }
    term b {
        from {
            neighbor 172.168.1.2;
            route-filter 0.0.0.0/0 exact;
        }
        then {
            local-preference 400;
        }
    }



     

    Regards

    Surya



  • 3.  RE: Weighting BGP default routes

    Posted 11-12-2012 16:09

    Surya.

     

    Perfect, thanks! I'll do just that!

     

    Cheers!



  • 4.  RE: Weighting BGP default routes

     
    Posted 11-12-2012 16:24

    Hi Darren,

     

    In case if you want to distribute the traffic (which makes use of default route) asymmetrically, then you can make use of bandwidth community as well.

     

    show policy-options policy-statement LP_MOD                                   
    term a {
        from {
            neighbor 3.3.3.3;
            route-filter 0.0.0.0/0 exact;
        }
        then {
            community add bw_high;
        }
    }
    term b {
        from {
            neighbor 172.168.1.2;
            route-filter 0.0.0.0/0 exact;
        }
        then {
            community add bw_low;
        }
    }

     

    For more please refer:

    http://forums.juniper.net/t5/Routing/Bandwidth-Management/m-p/95228#M4619

     

    Regards

    Surya



  • 5.  RE: Weighting BGP default routes

    Posted 11-12-2012 16:29

    It's not so much the bandwidth is different (it's not), it's that the allowable traffic per month is different - one link has 4 times the included data per month that the other does, so I'd rather not push outbound traffic through the second one unless the primary one has an issue.

     

    Your original solution will suit me perfectly, thank you. If there's a better "specified" route in the table, then use it - but if not, and the outbound traffic hits the "default route" definition, then use the link with more data allowance if possible.

     

    Cheers.