During a connectivity investigation, comparable tests brought RTT down from roughly 106 ms to 37 ms. No new provider, no extra BGP session. The interesting part was finding out why.
More routes do not automatically mean better connectivity
When an autonomous system connects to several transit providers and Internet Exchange Points (IXPs), it is usually looking for more than resilience. Better reachability to other networks is part of the bargain too.
But the presence of alternatives does not make BGP choose the one with the lowest latency. It decides from route attributes and local policy, not from a live latency measurement between endpoints. We ran into that while looking at connectivity between PLDS (AS214507) and the Estonian network AS211494.
Looking at the outbound path
An initial traceroute to 185.235.143.1 came in at about 139 ms. The traffic left our network through Route64 in Sweden, despite PLDS also having a connection to CloudHosting (AS58269) in Latvia.
PLDS border routers sit in several European locations, joined by our own backbone and exchanging routes over iBGP. In that arrangement, preference for an external connection can matter more than the distance to the exit point.
A traceroute run directly from the Latvian border router, using the provider transport address, showed about 7 ms to the target. That route went through CloudHosting and RETN (AS9002).
To test connectivity between our actual address space and the destination, we temporarily sent traffic to this one address through the Latvian border and repeated the traceroute with a PLDS source address.
1 <internal next hop> 30.3 ms
2 87.246.183.153 30.4 ms
3 87.246.183.53 30.4 ms
4 87.245.239.45 30.8 ms
5 87.245.232.245 36.7 ms
6 185.235.143.1 106.0 ms
This is abbreviated output, with values rounded. The first hops looked as expected: around 30 ms to the Latvian border, then a few more milliseconds through the external networks. The RTT to the destination, however, was still above 100 ms.
Traceroute does not show the return path. Every RTT includes the reply from the responding hop, so the difference between these measurements was a reason to look at routing on the far side.
The route back
With help from the AS211494 NOC, we obtained the available routes to the PLDS prefix 185.227.77.0/24. Their Juniper border router had these alternatives:
185.227.77.0/24 *[BGP/170] localpref 300, from 213.184.52.1
AS path: 6939 213753 213753 213753 213753 11967 197324 214507 I
> to 213.184.52.35 via xe-0/1/5.0
[BGP/170] localpref 300, from 213.184.52.254
AS path: 6939 213753 213753 213753 213753 11967 197324 214507 I
> to 213.184.52.35 via xe-0/1/5.0
[BGP/170] localpref 200
AS path: 9002 58269 214507 I
> to 87.245.211.194 via xe-0/1/0.0
[BGP/170] localpref 100
AS path: 8728 12578 58269 214507 I
> to 212.7.30.186 via xe-0/1/2.0
The output is abbreviated: route ages and validation state are omitted.
| Source | LOCAL_PREF | AS_PATH length |
|---|---|---|
| Hurricane Electric via RTIX | 300 | 8 |
| RETN | 200 | 3 |
| AS8728 | 100 | 4 |
The Hurricane Electric (AS6939) route, received from both RTIX (AS207800) route servers, had the highest LOCAL_PREF. The repeated AS213753 entries in its AS_PATH did not change that result: AS_PATH length is a BGP best-path criterion, but it is considered after local preference.1
The AS211494 NOC also shared the original import policy:
policy-statement import-from-ix {
term set-local-pref {
then {
local-preference 300;
}
}
}
Preferring peering routes over transit is a common and often sensible policy. Economics and keeping traffic within the region can both play a part. A route server, though, can carry a member’s own prefixes as well as routes that have already crossed several autonomous systems.
Here the IX and its members provided useful additional reachability; the receiving network’s policy decided which route won. We had a comparable issue on our own side, where a distant transit exit had enough preference to outweigh another exit point’s advantages.
Where this fits in normal practice
The usual commercial hierarchy is customer above peer above transit, but the numbers are local policy, not a standard. RFC 4264 describes the same cost-driven preference and notes that LOCAL_PREF overrides AS-path length; published NTT policy, for example, distinguishes customer, peer and peer-backup preferences.2 3
Route servers make multilateral peering practical without replacing bilateral sessions where a separate policy is wanted. They do not decide the client’s import preference. Their job is normally to distribute routes subject to safety filters: route-server implementations commonly impose AS-path limits, use IRR route objects for prefix-origin data, and use an AS-SET to expand the ASNs permitted under a member’s policy. RPKI origin validation is a separate check against ROAs. RIPE guidance likewise treats a maintained customer cone as part of filtering customer announcements.4 5 6
That is a different problem from choosing among valid routes. We found examples of operators using several preference levels, including backup tiers, but not a general recommendation to rank IX routes by AS_PATH length. In our classification, prepended ASN repetitions count as path elements, so prepending can affect the category. In a conventional equal-LOCAL_PREF comparison, AS-path length is simply a later best-path criterion. Our split is therefore a local heuristic, not a claim about how IX imports ought to be run everywhere.
Four route combinations
After the first adjustment to route preference at AS211494, we repeated the traceroute through the Latvian border:
traceroute to 185.235.143.1 (185.235.143.1), 30 hops max, 60 byte packets
1 <internal next hop> 30.548 ms 30.444 ms 30.462 ms
2 87.246.183.153 30.446 ms 30.436 ms 30.396 ms
3 87.246.183.53 30.430 ms 30.491 ms 30.422 ms
4 87.245.239.45 51.804 ms 51.744 ms 30.925 ms
5 87.245.232.245 36.803 ms 36.745 ms 36.680 ms
6 185.235.143.1 37.201 ms 37.461 ms 37.417 ms
After returning to PLDS’s normal outbound route, RTT was about 72 ms.
| Outbound path | Return path, working hypothesis | Measurement source | RTT |
|---|---|---|---|
| Route64, Sweden | HE via RTIX | Initial diagnostic source | ~139 ms |
| CloudHosting, Latvia | HE via RTIX | Later diagnostic source | ~106 ms |
| Route64, Sweden | RETN | Later diagnostic source | ~72 ms |
| CloudHosting, Latvia | RETN | Later diagnostic source | ~37 ms |
The 37 ms result used a temporary outbound route. These are diagnostic results, not a claim about steady-state latency.
With the same measurement source and outbound path, the change on the return side took RTT from roughly 106 ms to 37 ms, a reduction of about 65%. The 37 ms result still came from a temporary route, not from a final change to PLDS’s normal policy.
These are diagnostic measurements, not a long-running statistical study. The BGP RIB confirms that the route choice changed on the remote side; it is not, by itself, proof of the whole return path taken by every packet. The original approximately 139 ms test and subsequent tests also used different measurement sources, so a strictly controlled comparison would need all four scenarios from one point.
From one exception to a general policy
AS211494 initially made an exception for routes from HE. That led to a better question: could the policy avoid classifying IX participants one by one?
Together with the AS211494 NOC, we looked at the distribution of paths received from one RTIX route server by AS_PATH length.
| AS_PATH length | IPv4 | IPv4 share | IPv6 | IPv6 share |
|---|---|---|---|---|
| 1 | 689 | 0.7% | 123 | 0.2% |
| 2 | 23,710 | 23.3% | 13,983 | 20.7% |
| 3 or more | 77,494 | 76.1% | 53,316 | 79.1% |
| Total | 101,893 | 100% | 67,422 | 100% |
These are approximate counts of Junos CLI output lines across several successive queries against a changing table, not an exact count of unique NLRIs. More than three quarters of the IPv4 sample and about 79% of IPv6 had an AS_PATH of three or more. That does not make those routes bad. It does show that routes given the same preference by the original policy were a mixed population.
Filter, or change preference?
We could have limited IX imports to paths of length one. In this sample, that would exclude more than 99% of the routes. Even allowing two elements would exclude more than three quarters.
Those routes may include useful customer networks of IX members, regional routes and prefixes not available through transit. We chose to differentiate LOCAL_PREF instead:
| Category | LOCAL_PREF |
|---|---|
| IX, AS_PATH = 1 | 300 |
| IX, AS_PATH = 2 | 250 |
| Primary transit | 200 |
| IX, other routes | 150 |
| Secondary transit | 100 |
Short IX paths retain their advantage. Longer ones give way to primary transit when another route to the same prefix exists. If there is no alternative, the IX route remains usable. And if the IX supplies a more-specific prefix, forwarding uses longest-prefix match regardless of the LOCAL_PREF on a less-specific route.
There is another consequence: AS-path prepending can change a route’s preference category. That fits its purpose as a signal that a path is less desirable, although the receiving network is not required to honour that signal. AS_PATH length is not a measure of physical distance or end-to-end performance. Several regional networks can make a better path than one global operator. This policy is a heuristic for one network, not a universal rule, and it does not replace announcement validation or filtering under an agreed peering policy.4
Testing the policy
AS211494 tested this Junos policy:
policy-options {
as-path ix-direct ".";
as-path ix-downstream ". .";
policy-statement import-from-ix {
term direct {
from as-path ix-direct;
then {
local-preference 300;
next policy;
}
}
term downstream {
from as-path ix-downstream;
then {
local-preference 250;
next policy;
}
}
term other {
then {
local-preference 150;
next policy;
}
}
}
}
It applies to IPv4 and IPv6. next policy preserves later processing in the existing import-policy chain; no new route-rejection condition was added.7 8
During the test, the routing table showed the expected result:
185.227.77.0/24 *[BGP/170] localpref 200
AS path: 9002 58269 214507 I
> to 87.245.211.194 via xe-0/1/0.0
[BGP/170] localpref 150, from 213.184.52.1
AS path: 6939 213753 213753 213753 213753 11967 197324 214507 I
> to 213.184.52.35 via xe-0/1/5.0
[BGP/170] localpref 150, from 213.184.52.254
AS path: 6939 213753 213753 213753 213753 11967 197324 214507 I
> to 213.184.52.35 via xe-0/1/5.0
[BGP/170] localpref 100
AS path: 8728 12578 58269 214507 I
> to 212.7.30.186 via xe-0/1/2.0
RETN was the preferred route to PLDS and the RTIX alternatives remained. At the time of the check, all 22 BGP sessions were established. Across both route servers, RTIX still supplied 24,451 active IPv4 BGP paths and 14,103 active IPv6 BGP paths. The available evidence covers this test, not subsequent retention of the configuration in production.
The IX continued to provide reachability. The change only altered when an IX route takes precedence over transit.
What we still need to change at PLDS
The experiment exposed a different feature of our distributed setup. LOCAL_PREF on an external route travels over iBGP, so a remote exit can beat a regional one before IGP metrics are compared.
The Latvian connection also provides mainly a default route. That limits our ability to steer traffic to selected outside networks through that border.
We are continuing to examine regional exit selection, the role of backup connections, and data-plane quality monitoring independent of BGP session state. That investigation deserves its own note.
Conclusion
Multihoming gives a network a choice of routes. Whether that choice is useful depends on the network’s own policy.
In this case, work with the AS211494 NOC let us examine both directions, test alternatives, and move from one exception to a more differentiated IX import policy. An Internet Exchange is a way to organise interconnection, not a guarantee that every route received there is shorter or has lower latency.
We thank the AS211494 NOC for promptly sharing technical data and working through the investigation with us.
-
RFC 4271, A Border Gateway Protocol 4 (BGP-4), section 9.1. ↩︎
-
NTT DATA, routing policy and BGP communities for AS2914. ↩︎
-
IXP Manager, route-server filtering. ↩︎
-
RIPE NCC, BGP filtering webinar slides. ↩︎
-
Juniper, Understanding AS Path Regular Expressions for BGP. ↩︎
-
Juniper, Understanding Routing Policy Actions. ↩︎