RFC 1809

Using the Flow Label Field in IPv6

πŸ“… published June 1995, from ietf

Using the Flow Label Field in IPv6 πŸ¦‹

okay bestie, this is RFC 1809 and it's giving IPv6 deep dive πŸ’…. C. Partridge wrote it at BBN Systems and Technologies, it's part of the Network Working Group, it's filed as Informational (so it's advice, not a rulebook), and it's dated June 1995 πŸŽ€. The header doesn't list anything it obsoletes or updates, so it's standing on its own ✨.

Status of this Memo πŸ“

this memo provides information for the Internet community 🫢 it does not specify an Internet standard of any kind, so no pressure. distribution of this memo is unlimited.

Abstract 🌸

the whole point of this memo is to distill a bunch of opinions and suggestions from the End-to-End Research Group about handling Flow Labels into a set of suggestions for IPv6 πŸ’–. it's for information purposes only and is not one of the IPv6 specifications. distribution of this memo is unlimited (yes, it's said twice, the authors really wanted you to know πŸ™ˆ).

Introduction πŸ’œ

so this memo started as the report of a discussion at an End-to-End Research Group meeting in November 1994 ✨. the group talked through several issues about how to manage flow identifiers in IPv6. then the report got circulated to the IPv6 community, and their feedback changed this memo and the IPv6 specification, to fix some minor problems the End-to-End Group had raised πŸ”₯.

ngl the vibe is that a lot of the ideas made it into IPv6, but the why behind the design decisions didn't 😭. so this memo is here to give interested people the extra context 🧚.

Brief Description of the Flow Label πŸ“

the current draft of the IPv6 spec says every IPv6 header has a 24-bit Flow Label 🌈. (fun fact: the spec originally called for a 28-bit Flow ID field, which was the flow label plus a 4-bit priority field. the priority field is its own thing now, for reasons we'll get into at the end of this memo πŸ‘€.)

the Flow Label is a pseudo-random number between 1 and FFFFFF (hex) that's unique when you combine it with the source address πŸ’…. the zero Flow Label is reserved to mean no Flow Label is being used. the spec says a source must not reuse a Flow Label value until all the state info for its previous use has been flushed from all routers in the internet. no reusing until it's fully cleaned up, periodt 🧹.

the spec also says that all datagrams with the same (non-zero) Flow Label must have the same Destination Address, Hop-by-Hop Options header, Routing Header and Source Address contents. the big idea is that a router can just look up the Flow Label in a table and decide how to route and forward the datagram, without digging through the rest of the header πŸ¦‹.

Flow Label Issues πŸ€”

the IPv6 spec originally left a bunch of questions open, and these three were the biggest ones:

  1. what should a router do if a datagram with a (non-zero) Flow Label arrives and the router has no state for that Flow Label?
  2. how does an internet flush old Flow Labels?
  3. which datagrams should carry (non-zero) Flow Labels?

this memo is basically a recap of how the End-to-End Group tried to answer these πŸ’œ.

What Does a Router Do With Flow Labels for Which It Has No State? πŸ•΅οΈ

okay so say a datagram with a non-zero Flow Label shows up at a router, and the router realises it has no state info for that label. what's the correct move? πŸ€·β€β™€οΈ

the IPv6 spec lets routers ignore Flow Labels, and it also allows for the idea that IPv6 datagrams might carry flow setup info in their options πŸ’…. unknown Flow Labels can also happen if a router crashes and loses its state. during the recovery period, the router will get datagrams with Flow Labels it doesn't know. arguably that's not even an error, it's just part of recovery 🌸. then there's the spicy suggestion that every TCP connection gets its own Flow Label. if that gets adopted, routers might need an LRU cache to avoid Flow Label cache overflow, and then an active but infrequently used flow's state might have been intentionally thrown out 😭.

anyway, treating this as an error (dropping the datagram and sending an ICMP message) is inappropriate, no cap πŸ™…β€β™€οΈ. honestly, in most cases, forwarding the datagram like it had a zero Flow Label would give the flow better service than dropping it ✨.

of course, there are situations where routing as if the label were zero gives the wrong result πŸ™ˆ. picture a router with two paths to the destination: one is a high-bandwidth satellite link and the other is a low-bandwidth terrestrial link. a high-bandwidth flow obviously should go over the high-bandwidth link, but if the router loses the flow state, it might route the traffic over the low-bandwidth link, and then the flow could swamp it πŸ’€. these situations will probably be exceptions rather than the rule, so it seems reasonable to handle them with options that say that if the flow state is absent, the datagram needs special handling. (those options might be Hop-by-Hop, or only handled at some routers, depending on what the flow needs 🧚.)

it would be super desirable to have a way to tell end systems that the flow state got lost and needs refreshing πŸ₯Ί. one idea is adding a state-lost bit to the Flow Label field, but people are protective of those precious 24 bits, so eating into them is sensitive 😀. other options are adding options to the datagram saying its Flow Label was unknown, or sending an ICMP message back to the flow source πŸ¦‹.

in summary, the view is that the default rule should be: if a router gets a datagram with an unknown Flow Label, it treats the datagram as if the Flow Label is zero πŸ’–. as part of forwarding, the router looks at any hop-by-hop options and learns whether the datagram needs special handling. those options could be as simple as "drop this datagram if the Flow Label is unknown," or they could contain the flow state the router should have. there's clearly room to experiment with option design πŸ§ͺ.

Flushing Old Flow Labels 🧹

the flow mechanism assumes state tied to a given Flow Label is somehow stored in routers, so they know how to handle datagrams carrying that label 🧠. a serious problem is how to flush Flow Labels nobody's using anymore (the "stale" ones) out of the routers 😬.

stale Flow Labels can happen a bunch of ways, even if we assume the source always sends a message deleting a Flow Label when it's done with the flow. the internet might have partitioned since the flow was created 🌩️. the deletion message might get lost before it reaches all the routers. or the source might crash before it can send the deletion message at all πŸ’€. the point is, we can't count on the source (or, for the same reasons, a third party) to always clean up stale Flow Labels. routers will have to find a way to flush Flow Labels themselves πŸ’….

the obvious mechanism is a timer. routers should discard Flow Labels whose state hasn't been refreshed within some period of time ⏰. at the same time, a source that crashes has to observe a quiet time, where it creates no flows, until it knows all the Flow Labels from its previous life must have expired 😴. (sources can skip the quiet time by keeping info about active Flow Labels in stable storage that survives crashes πŸ’Ύ.) this is exactly how TCP initial sequence numbers are managed, and it seems like the same mechanism should work well for Flow Labels 🫢.

how the Flow Label and its state should be refreshed still needs some study πŸ”. there are two obvious options. the source could periodically send a special refresh message (like an RSVP Path message) to explicitly refresh the Flow Label and its state. or the router could treat every datagram carrying the Flow Label as an implicit refresh, or sources could send explicit refresh options 🌸. the choice is between periodically handling a special update message, or doing an extra computation on every datagram (namely, noting in the Flow Label's entry that it's been refreshed). pick your poison, bestie πŸ’œ.


πŸ”œ to be continued in part 2 🫢

Note about the Priority Field πŸ’…

okay so this part is lowkey a glow-up story πŸ¦‹ the original IPv6 spec smooshed the Priority and Flow Label fields together, and flows were allowed to redefine what the different Priority values meant 😭 the End-to-End group realized this was a whole problem, because if a router forwarded a datagram with a Flow Label it didn't recognize, it had to ignore Priority completely, since those priority values might have been redefined. like, the priorities might have been flipped upside down πŸ™ƒ the IPv6 community was like "nope, not it" and concluded this was undesirable πŸ’€

and ngl, it makes sense: when the Flow Label is unknown, the router can give way better service if it uses the Priority field to make a smarter routing decision ✨ so now Priority is its own distinct field, totally unaffected by the Flow Label πŸ‘‘ main character energy for that field fr fr


Acknowledgements 🫢

okay the thank-yous are so sweet πŸ₯Ή the author wants to acknowledge the members of the End-To-End Research Group, which was chaired by Bob Braden, whose discussions produced this memo 🌸 and they specifically thank Deborah Estrin for her help putting the memo together πŸ’– also big shoutouts to Richard Fox, Noel Chiappa, and Tony Li for their insightful comments on the draft πŸŽ€


Security Considerations πŸ’€

okay this one is short but it's giving pure honesty πŸ™ˆ the memo says, straight up, that security issues are not discussed in this memo 😬 so if you're looking for a security section here, it's not coming, bestie 🫠


Author's Address 🧚

the author is Craig Partridge at BBN Systems and Technologies πŸ’œ here's the full contact info:

Craig Partridge
BBN Systems and Technologies
10 Moulton St.
Cambridge, MA 02138

EMail: craig@aland.bbn.com
πŸ“¦ where this page comes from