Bandwidth distribution per ip

National operator here ask customers to distribute bandwidth between all ip's equally, e.g. if i have /22, and i have in it CDN from one of the big content providers, this CDN use only 3 ips for ingress bandwidth, so bandwidth distribution is not equal between ips and i am not able to use all my bandwidth.

And for me, it sounds like faulty aggregation + shaping setup, for example, i heard once if i do policing on some models of Cisco switch, on an aggregated interface, if it has 4 interfaces it will install 25% policer on each interface and if hashing is done by dst ip only, i will face such issue, but that is old and cheap model, as i recall.

Did anybody in the world face such requirements?
Is such requirements can be considered as legit?

That seems completely unworkable to me. I would think most environment are going to have heavy hitting devices like firewalls and servers that cause traffic aggregation points in the networks. If they shape on their customer's uplink port I don't see why the individual addresses matter at all. I've never heard of that one.

As far as policing on an aggregated interface it would seem to be better to police at a different point where all of the traffic for a given customer can be policed together regardless of the physical port it is received on.

Steven Naslund
Chicago IL

One such old and cheap model is ASR9k trident, typhoon and tomahawk.

It's actually pretty demanding problem, as technically two linecards
or even just ports sitting on two different NPU might as well be
different routers, they don't have good way to communicate to each
other on BW use. So N policer being installed as N/member_count per
link is very typical.

ECMP is fact of life, and even thought none if any provider document
that they have per-flow limitations which are lower than nominal rate
of connection you purchases, these do exist almost universally
everywhere. People who are most likely to see these limits are people
who tunnel everything, so that everything from their say 10Gbps is
single flow, from POV of the network.
In IPv6 world at least tunnel encap end could write hash to IPv6 flow
label, allowing core potentially to balance tunneled traffic, unless
tunnel itself guarantees order.

I don't think it's fair for operator to demand equal bandwidth per IP,
but you will expose yourself to more problems if you do not have
sufficient entropy. We are slowly getting solutions to this, Juniper
Trio and BRCM Tomahawk3 can detect elephant flows and dynamically
unequally map hash results to physical ports to alleviate the problem.

As person who is in love with embedded systems development, i just watched
today beautiful 10s of meters long 199x machine, where multi kW VFDs manage
huge motors(not steppers), dragging synchronously and printing on thin paper
with crazy speed and all they have is long ~9600 link between a bunch of encoders
and PLC dinosaur managing all this beauty. If any of them will apply a bit wrong
torque, stretched paper will rip apart.
In fact nothing complex there, and technology is ancient these days.
Engineers who cannot synchronize and update few virtual "subinstances"
policing ratio based on feedback, in one tiny, expensive box, with reasonable
update ratio, having in hands modern technologies, maybe incompetent?

National operator doesn't provide IPv6, that's one of the problems.
In most of cases there is no tunnels, but imperfection still exist.
When ISP pays ~$150k/month (bandwidth very expensive here), and because
CDN has 3 units & 3 ingress ips, and carrier have bonding somewhere over
4 links, it just means ~$37.5k is lost in rough estimations,
no sane person will accept that.
Sometimes one CDN unit are in maintenance, and 2 existing can perfectly
serve demand, but because of this "balancing" issues - it just go down,
as half of capacity missing.

But, tunnels in rare cases true too, but what we can do, if they don't have
reasonable DDoS protection tools all world have (not even blackholing).
Many DDoS-protection operators charge extra for more tunnel endpoints with
balancing, and this balancing is not so equal as well (same src+dst ip at best).
And when i did round-robin on my own solution, i noticed except
this "bandwidth distribution" issue, latency on each ip is unequal,
so RR create for me "out of order" issues.
Another problem, most popular services in region (in matters of bandwidth)
is facebook, whatsapp, youtube. Most of them is big fat flows running over
few ips. I doubt i can convince them to balance over more.

As appealing it is to say everyone, present company excluded, is
incompetent, I think explanation is more complex than that. Solution
has to be economic and marketable. I think elephant flow detection and
unequal mapping of hash result to physical interface is economic and
marketable solution, but it needs that extra level of abstraction,
i.e. you cannot just backport it via software if hardware is missing
that sort of capability.

Not being able to use all of your bandwidth is a common issue if you are provided a bonded connection (aka Link Aggregation Group). For example, you are provided a 4Gbps service over 4x1Gbps ethernet links. Ethernet traffic is not typically balanced across links per frame, because this could lead to out of order delivery or jitter, especially in cases where the links have different physical characteristics. Instead, a hashing algorithm is typically used to distribute traffic based on flows. This results in each flow having consistent packet order and latency characteristics, but does force a flow over a single link, resulting in the flow being limited to the performance of that link. In this context, flows can be based on src/dst MAC address, IP address, or TCP/UDP port information, depending on the traffic type (some IP traffic is not TCP/UDP and won't have a port) and equipment type (layer 3 devices typically hash by layer 3 or 4 info).

Your operator may be able to choose an alternative hashing algorithm that could work better for you (hashing based on layer 4 information instead of layer 3 or 2, for example). This is highly dependent on your provider's equipment and configuration - it may be a global option on the equipment or may not be an option at all. Bottom line, if you expected 4Gbps performance for each host on your network, you're unlikely to get it on service delivered through 4x 1Gbps links. 10Gbps+ links between you and your ISP's peers would better serve those needs (any 1Gbps bonds in the path between you and your provider's edge are likely to exhibit the same characteristics).

--Blake

No bonding to me, usually it is dedicated 1G/10G/etc link.
Also i simulated this bandwidth for "hashability", and any layer4 aware hashing
on cisco/juniper provided perfectly balanced bandwidth distribution.
On my tests i can see that they have some balancing clearly by dst ip only.

Are you claiming that your bandwidth is being equally divided 1024 ways (you mentioned a /22) or just that each host (IP) is not receiving the full bandwidth? What is the bandwidth ordered and what is the bandwidth you're seeing per host(IP)?

Even highly incompetent in such matters person as me, know, that some of
modern architecture challenges is when NPU consists of a large number of
"processing cores", each having his own counters, and additionally it might
be also multiple NPU handling same customer traffic. On such conditions
updating _precise_ counters(for bitrate measurements, for example) is not
trivial anymore as sum = a(1) + .. + a(n), due synchronization, shared resources
access and etc.
But still it's solvable in most of cases, even dead wrong way of running script
and changing policer value on each "unit" once per second mostly solve problem.
And if architecturally some NPU cannot do such job, it means they are flawed,
and should be avoided for specific tasks, same as some BCM chipset switches
with claimed 32k macs, but choking from 20k macs, because of 8192 entries tcam and
probably imperfect hash + linear probing on collision. Sure such switch is not
suitable for aggregation and termination.
Still, i am running some dedicated servers on colo in EU/US, some over 10G(bonding),
and _single_ ip on server, i never faced such balancing issues, thats why i am asking,
if someone had such carrier, who require to balance bandwidth between many ips,
with quite high precision, to not lose expensive bandwidth.

<<skipped>>

Are you claiming that your bandwidth is being equally divided 1024
ways (you mentioned a /22) or just that each host (IP) is not
receiving the full bandwidth? What is the bandwidth ordered and what
is the bandwidth you're seeing per host(IP)?

Some facts from today.
Ordered capacity 3.3Gbit
Received capacity ~2.1Gbit if they apply bandwidth limit
In this example they removed limit, but you can have approximate picture how bandwidth is distributed (top 20 ips):

[x.x.x.14 ] 22433902b 36435p avg 615b 0.81%b 1.10%p 26596 Kbit/s
[x.x.x.13 ] 22715108b 34887p avg 651b 0.82%b 1.06%p 26929 Kbit/s
[x.x.x.10 ] 22741911b 31719p avg 716b 0.83%b 0.96%p 26961 Kbit/s
[x.x.x.11 ] 23874482b 34157p avg 698b 0.87%b 1.04%p 28304 Kbit/s
[x.x.x.15 ] 24393258b 29622p avg 823b 0.89%b 0.90%p 28919 Kbit/s
[x.x.x.12 ] 24715746b 33880p avg 729b 0.90%b 1.03%p 29301 Kbit/s
[x.x.x.9 ] 25720774b 36000p avg 714b 0.93%b 1.09%p 30492 Kbit/s
[x.x.x.8 ] 29599218b 40647p avg 728b 1.07%b 1.23%p 35090 Kbit/s
[y.y.y.122 ] 52015361b 52743p avg 986b 1.89%b 1.60%p 61666 Kbit/s
[y.y.y.116 ] 52161788b 55435p avg 940b 1.89%b 1.68%p 61839 Kbit/s
[y.y.y.114 ] 55409677b 56945p avg 973b 2.01%b 1.73%p 65690 Kbit/s
[y.y.y.120 ] 59971853b 59782p avg 1003b 2.18%b 1.81%p 71098 Kbit/s
[y.y.y.126 ] 60821991b 65184p avg 933b 2.21%b 1.98%p 72106 Kbit/s
[y.y.y.117 ] 61811624b 58374p avg 1058b 2.24%b 1.77%p 73279 Kbit/s
[y.y.y.113 ] 62492070b 63001p avg 991b 2.27%b 1.91%p 74086 Kbit/s
[y.y.y.119 ] 63128246b 63545p avg 993b 2.29%b 1.93%p 74840 Kbit/s
[y.y.y.121 ] 64392950b 66418p avg 969b 2.34%b 2.01%p 76340 Kbit/s
[y.y.y.115 ] 65723751b 64100p avg 1025b 2.39%b 1.94%p 77917 Kbit/s
[y.y.y.124 ] 66646572b 62637p avg 1064b 2.42%b 1.90%p 79011 Kbit/s
[y.y.y.123 ] 70332553b 68284p avg 1030b 2.55%b 2.07%p 83381 Kbit/s
[y.y.y.125 ] 70545386b 67441p avg 1046b 2.56%b 2.04%p 83634 Kbit/s
[y.y.y.118 ] 71393238b 69490p avg 1027b 2.59%b 2.11%p 84639 Kbit/s
[x.x.x.6 ] 123028709b 137530p avg 894b 4.47%b 4.17%p 145855 Kbit/s
[x.x.x.4 ] 124816100b 137221p avg 909b 4.53%b 4.16%p 147974 Kbit/s
[x.x.x.7 ] 126130939b 143443p avg 879b 4.58%b 4.35%p 149532 Kbit/s
[x.x.x.3 ] 128316371b 139360p avg 920b 4.66%b 4.22%p 152123 Kbit/s
[x.x.x.0 ] 132445418b 143143p avg 925b 4.81%b 4.34%p 157018 Kbit/s
[x.x.x.1 ] 133197094b 143713p avg 926b 4.84%b 4.35%p 157910 Kbit/s
[x.x.x.2 ] 135346483b 146510p avg 923b 4.91%b 4.44%p 160458 Kbit/s
[x.x.x.5 ] 135366769b 147766p avg 916b 4.92%b 4.48%p 160482 Kbit/s
Average packet size 834 (with ethernet header, max avg sz 1514)
Time 6748, total bytes 2753819139, total speed 3188235 Kbit/s

As you can see max single ip takes is 4.48% of bandwidth.
Also i cannot waste ipv4 for larger pools, just because of some deadly
flawed equipment/configuration.

This indeed sounds unacceptable. I would suspect intentional
per-prefix policing, intended for broadband subscriber interfaces.

I have not heard of this. We typically purchase a connection and bring our own IP space. The capacity of the connection and the number of IP addresses (if any) are unrelated to each other.

That said, I would find a bonded ethernet connection acceptable in some applications. Bonded ethernet generally works well to increase aggregate bandwidth when used by multiple hosts whose individual bandwidth is well below the speed of each link in the bond. With few hosts, bonded ethernet connections are not likely to work well to increase bandwidth and would generally be unsuitable for providing connectivity to a single IP/host.

This is based on feedback from a colleague that spent several years in
Lebanon and did a fair amount of research into the AS-adjacency paths in
and out of the country, and the OSI layer 1 (submarine fiber to Cyprus,
etc) paths...

It sounds to me like your upstream carrier does not actually have any such
limitation in place and is making a nonsensical excuse, intended for
consumption by less technically savvy persons, as so why they're running
their international transit connections too too close to full.
International connectivity in and our of Beirut is quite costly on a $/Mbps
basis.

If you had the ability to see a traffic chart on one of their upstream
connections I would not be surprised to see that they're running a 10GbE
to, for example, telekom italia/sparkle at 87% utilization.

Hi,

sounds like you are hosting the origin for the CDN which causes issues.
Does the CDN care where it is pulling the data from?
Could you place a cheaper origin somewhere else? Like AWS, Italy,
Katar or Amsterdam? For 150k/month you can get a lot of
bandwidth/storage/rack space somewhere else.
An other option could be to use something like origin storage where
the content is stored on a CDN provider server already.
Other than that you could check the hashing with your upstream
provider and make them use layer 4 info as well. If they refuse you
might be able to free up some IPs by reducing ptp links to /31 or some
ugly NAT tricks where ports are pointing to different services. (Mail
ports go to mailserver and http to CDN unit)
For ~$37.5k you can also buy some more prefixes to announce.

Karsten

Hi,

In the case of ASR9K IOS-XR 6.0.1 added the following command:
"hw-module all qos-mode bundle-qos-aggregate-mode"

This splits the bandwidth over the links and takes into account the
link bandwidth; with bundle bandwidth 50G (with 10G+40G members) the
ratios become 5/1 and 5/4 respectively (it is supporting unbalanced
member link speeds).

Also the NPUs don't need to talk to each other on the ASR9K; the
central fabric arbiter has a view of bandwidth per VoQ and can control
the bandwidth across the LAG member interfaces when they are spread
over multiple lines cards and NPUs.

Cheers,
James,