IPv6-only broadband: 464XLAT city by city, a NAT64 pool next to CGNAT

A broadband city can swap its home routers for ones with a CLAT (ip6Go /
ip6Stop, from the city panel's Home broadband). Over 30 to 180 days an even
share of the homes moves each day, paid as the routers go in ($4 a home),
waiting while cash is short; starting needs only the first day's share. New
homes in a swapping or finished city get the new router at the same price.
The panel says how many addresses it frees and what it does to the monthly
IPv4 bill.

ip4Use splits homes into public, behind CGNAT and IPv6-only: the NAT64 pool
(ceil(IPv6-only homes / NAT64 ratio), 64/128/256, default 128) comes right
after business blocks, before dual-stack homes. NAT64 gateways cost the same
per Gbps of IPv4 as CGNAT boxes; NAT64 refunds sit under CGNAT's at the same
ratio and never reach zero. The IPv4 share of home traffic is now a curve:
0.55 on day 0, two points less a year, floor 0.2. Out-of-space advice names
the sharing left to stretch. Everything is under rule ip4; old saves load
unchanged (no field means dual stack).
This commit is contained in:
jvanvik 2026-11-07 07:01:34 +01:00
parent 3bc1641a46
commit 69328ce257
25 changed files with 812 additions and 54 deletions

View file

@ -315,7 +315,7 @@ const API_CMD={
quote:a=>({setup:0,monthly:ip4InMo(Number(a.len)),blocked:[ip4On()?'':tr('ip4.off'),ip4On()&&ip4Full()?tr('ip4.too_many',{n:IP4_BLK}):''].filter(Boolean)}),
doc:'Lease an IPv4 block of this prefix length by the month, at today\'s rate (fixed for the lease). Hand it back with ip4Return. Refused at 256 blocks, like ip4Buy.'},
ip4Sell:{args:[['id','entityId']],confirm:'double',watch:['ip4'],
doc:'Sell an owned block (not leased out) for 92% of the market price. Refused within two years of its last transfer, or when the customers signed would no longer fit with every home behind CGNAT.'},
doc:'Sell an owned block (not leased out) for 92% of the market price. Refused within two years of its last transfer, or when the customers signed would no longer fit with every dual-stack home behind CGNAT and the IPv6-only homes in the NAT64 pool.'},
ip4Out:{args:[['id','entityId']],watch:['ip4'],
doc:'Lease an owned block out through a broker for a monthly income, while your own customers still fit without it.'},
ip4Back:{args:[['id','entityId']],watch:['ip4'],
@ -324,6 +324,13 @@ const API_CMD={
doc:'Hand a leased-in block back, ending its monthly fee, when your customers still fit without it.'},
ip4Nat:{args:[['v','ip4Ratio']],watch:['ip4'],
doc:'Set how many broadband homes share one IPv4 address behind CGNAT (8, 16, 32 or 64). More frees space for business customers but more gamers ask for refunds; fewer is refused when the customers signed would not fit.'},
ip4Nat64:{args:[['v','ip4Ratio64']],watch:['ip4'],
doc:'Set how many IPv6-only homes share one IPv4 address in the NAT64 pool (64, 128 or 256). Their refunds are well under CGNAT\'s at the same ratio and shrink as the world moves to IPv6; fewer is refused when the customers signed would not fit.'},
ip6Go:{args:[['city','cityId']],watch:['pops.#city'],
quote:a=>({setup:ip6Cost(a.city),days:ip6Days(a.city),monthly:Math.round(ip6Mo(a.city,(R.rev&&R.rev.eyeballs)||0)),blocked:[ip6Why(a.city)].filter(Boolean)}),
doc:'Take a broadband city IPv6-only (464XLAT): swap its dual-stack home routers for ones with a CLAT over the quoted days, paid day by day as they go in (setup is the whole swap; starting needs only the first day\'s share on hand, and it waits while cash is short). Those homes then need no IPv4 of their own, only a share of the NAT64 pool; new homes there get the new router too, at the swap\'s price a router, paid the day they join (even short of cash: a new home needs it). monthly is what it does to the IPv4 bill (NAT64 gateways and refunds against the CGNAT it saves; negative saves). Frees what the city panel says for new customers.'},
ip6Stop:{args:[['city','cityId']],watch:['pops.#city'],
doc:'Stop a city\'s swap to IPv6-only. The homes already swapped stay IPv6-only (their routers are paid for, nothing comes back); new homes come dual stack again. ip6Go resumes it for the rest.'},
/* ---------- security, China, incidents ---------- */
buildScrub:{args:[['city','cityId'],['tier','scrubTier',false]],watch:['scrubs'],
quote:a=>{const T=SCRUB_TIERS[a.tier||0];return {setup:T?T.cost:undefined,monthly:T?T.mo:undefined};},
@ -498,7 +505,7 @@ const API_CMD={
const API_VIEW={
pieOpen:{args:[],doc:'Open Pie Control, the rocket company\'s panel.'},
ip4Open:{args:[],doc:'Open the bank at its Address space section: your IPv4 blocks, who uses them, CGNAT and the transfer market.'},
ip4Open:{args:[],doc:'Open the bank at its Address space section: your IPv4 blocks, who uses them, CGNAT, the NAT64 pool and the transfer market.'},
ip4Pick:{args:[['v','ip4Len']],doc:'Pick the block size the Address space market quotes (a prefix length, 24 to 16).'},
pieGovOpen:{args:[],doc:'Open the bank at its Government money section: the rocket company\'s fund auctions, the Pitcairn grant and the Ex-Im Pie Bank (it used to be Pie Control\'s Gov tab).'},
pieTab:{args:[['t','pieTab']],doc:'Switch the Pie Control tab: traffic, co (the company, its books and the Founder\'s posts), fly (launches) or dish.'},