PNIs and IX ports are both peering: traffic leaves at the nearest one (#298)

Routing tried every PNI (rank 1) before any IX port (rank 2), like a
local-pref above peering, so a PNI in London pulled New York's traffic
across the Atlantic even with the same network at the New York IX. PNIs
now route at rank 2 with the IX ports, nearest first. At the same distance
the PNI goes first: an IX port counts as PNI_TIE (0.001) further away,
far below any link weight (at least 1). Distances compare as
(Da-Db)+(dta-dtb) so exits at one distance stay exactly equal, and the
POP-local shortcut skips lists that mix PNIs and IX ports. Backup only and
RouteScript's prefer pni keep their say. The traceroute, the reference
allocation in the tests and the RouteScript help follow.
This commit is contained in:
Frederic Jung 2026-11-06 06:31:21 +00:00
parent 7c65b9e7ed
commit f303f29f22
No known key found for this signature in database
16 changed files with 86 additions and 24 deletions

View file

@ -289,7 +289,7 @@ test('the map is not drawn while the dashboard covers the whole screen', () => {
function plainCompute(ev) {
const src = ev('compute.toString()');
let plain = src
.replace('if(!lst.hi&&ALONE[fci])', 'if(false)')
.replace('if(!lst.hi&&!lst.mx&&ALONE[fci])', 'if(false)')
.replace('if(!GN){\n // One scan', 'if(false){\n // One scan')
.replace('const ns=e.nets||NET_IDS;', 'const ns=NET_IDS;')
.replace('if(P.dead)return 0;', '').replaceAll('if(r<=1e-6){P.dead=1;return 0;}', '')