Routing
Highlighted
Routing

BGP multipath and unequal uplinks (bandwidth community)

‎03-11-2020 06:23 PM

We have 3 inbound links from our ISP with unequal available bandwidth. We have 3 BGP sessions and we receive just the default route (0.0.0.0/0) via each BGP session.

 

Link 1: 4Gbps

Link 2: 4Gbps

Link 3: 3Gbps

 

My goal is to configure our side so that outgoing traffic is spread evenly across 3 links. Configuration seems correct, routing table shows correct load balancing values, however the actual traffic volume still 33%/33%/33%

 

Here is what I did so far: I configured per-packet load balancing, and added bandwidth communities:

 

 

routing-options {
    forwarding-table {
        export LOAD-BALANCE;
    }
}
...
protocols {
 bgp {
group ISPLINK1 {
type external;
import IMPORT-ISPLINK1;
remove-private;
peer-as 174;
multipath;
neighbor ...;
}
 group ISPLINK2 {
type external;
import IMPORT-ISPLINK2;
remove-private;
peer-as 174;
multipath;
neighbor ...;
}

group ISPLINK3 {
type external;
import IMPORT-ISPLINK3;
remove-private;
peer-as 174;
multipath;
neighbor ...;
}
}



policy-options {
    policy-statement IMPORT-ISPLINK1 {
        term default_route {
            from {
                route-filter 0.0.0.0/0 exact;
            }
            then {
                local-preference add 100;
                community add bw-4G;
                accept;
            }
        }
        term default {
            then reject;
        }
    }
    policy-statement IMPORT-ISPLINK2 {
        term default_route {
            from {
                route-filter 0.0.0.0/0 exact;
            }
            then {
                local-preference add 100;
                community add bw-4G;
                accept;
            }
        }
        term default {
            then reject;
        }
    }
    policy-statement IMPORT-ISPLINK3 {
        term default_route {
            from {
                route-filter 0.0.0.0/0 exact;
            }
            then {
                local-preference add 100;
                community add bw-3G;
                accept;
            }
        }
        term default {
            then reject;
        }
    }
    policy-statement LOAD-BALANCE {
        then {
            load-balance per-packet;
        }
    }
    community bw-3G members bandwidth:OUR_ASN:3000;
    community bw-4G members bandwidth:OUR_ASN:4000;
}

 

This seems to be reflected in routing table:

 

> show route 1.1.1.1 detail

inet.0: 2389 destinations, 2397 routes (2388 active, 0 holddown, 1 hidden)
0.0.0.0/0 (5 entries, 1 announced)
        *BGP    Preference: 170/-201
                Next hop type: Router, Next hop index: 0
                Address: 0x46c7e70
                Next-hop reference count: 2
                Source: ...
                Next hop: ISPLINK1_IP via xe-0/2/0.0 balance 36%, selected
                Session Id: 0x0
                Next hop: ISPLINK3_IP via xe-0/2/1.0 balance 27%
                Session Id: 0x0
                Next hop: ISPLINK2_IP via xe-0/2/2.0 balance 36%
                Session Id: 0x0
                State: <Active Ext>
                Local AS: ... Peer AS:  174
                Age: 15:57
                Validation State: unverified
                Task: BGP_xxxx
                Announcement bits (4): 0-KRT 2-BGP_Listen.0.0.0.0+179 3-BGP_RT_Background 4-Resolve tree 1
                AS path: 174 I
                Communities: bandwidth:Local_as:4000
                Accepted Multipath
                Localpref: 200
                Router ID: ...

 

However actual outgoing traffic distribution is still equal share (33/33/33).

 

What am I missing?

 

2 REPLIES 2
Highlighted
Routing

Re: BGP multipath and unequal uplinks (bandwidth community)

‎03-11-2020 08:54 PM

Hi Boomstick, 

 

I hope you are doing great! 

 

Configuration looks fine and operational output shows the correct load balancing information, can you please let me know how did you confirm that the traffic is still going 33% over each ISP link?

 

Pablo 🙂

Highlighted
Routing

Re: BGP multipath and unequal uplinks (bandwidth community)

‎03-12-2020 01:21 AM

Hi Pablo,

 

how did you confirm that the traffic is still going 33% over each ISP link?

 

I was able to confirm this by two methods:

 

1) using iftop utility available in the shell

 

2) using snmp-based monitoring (we have hourly/daily charts for each port)

 

Basically seems like these changes had zero effect on real data transfers. Even if I adjust one knob to 1%, that link is still at 33%.

Feedback