3 ms·
A network layering violation is when a protocol at one layer relies on its information being carried in protocols on other layers. It's not just when the addres
by zamadatix 10d ago
A network layering violation is when a protocol at one layer relies on its information being carried in protocols on other layers. It's not just when the addressing bits happen to match between layers, which would be done by the host locally without a separate L2 protocol anyways. Nor was what you're discussing a requirement of IPv6, it was an optional addressing scheme. Nor did it take on as a popular option. Nor does it do anything to explain why IPv4 leaking address resolution down instead of self containing it is supposed to be a correct example.
- cyberax 10d ago> A network layering violation is when a protocol at one layer relies on its information being carried in protocols on other layers. That's exactly what's happening in IPv6. The host address leaks information about the underlying hardware into higher-level protocols. For example, you can't use a /80 site prefix because there aren't enough bits left for the hardware address mapping. In contrast, IPv4 works just fine over Ethernet that has more MACs than the entire IPv4 address space. > Nor was what you're discussing a requirement of IPv6, it was an optional addressing scheme. It was a requirement initially. > Nor does it do anything to explain why IPv4 leaking address resolution down instead of self containing it is supposed to be a correct example. WTF is "leaking down"? The higher protocol levels are supposed to use lower protocol levels. "Leaking down" would mean, for example, that you need to set MACs of your network cards to be equal to IPv4 addresses.
- zamadatix 10d ago> That's exactly what's happening in IPv6. The host address leaks information about the underlying hardware into higher-level protocols I think there is still confusion what "A network layering violation is when a protocol at one layer relies on its information being carried in protocols on other layers" means. As a practical examples: "Reading a book has a main character 'John' in it and deciding to use that as your name in your speech" is not a layering violation for speech. At no point does anyone need to read to understand your name is John while speaking with you nor does anything break when you change your mind and decide to be called Andsynstd even though it has never been written in a book written in a book. "You can find my name if you read that book over there" is a layering violation. They have to stop using speech with you, switch to reading the book at a completely different layer of communication, and then suddenly start calling you John in speech even though it was never communicated in speech. If they just say "what's your name" and you say "John" they don't need to get any information from outside the network layer, regardless if the bits in your response also contained your L2 address or not. In your example, that you read your hardware as one option to come up with your address does not force anyone on the network to use a protocol other than IPv6 to learn your address and talk with you. The litmus test for this is "if you replace Ethernet with a different L2 which can't transport any protocol but L3 protocols on top of it, can you still resolve addresses?" If the answer is no then it's handled externally, if the external handling happens on L2 then it's a layering violation. > It was a requirement initially. Not at all. From section 2.4.1 of RFC 1884 in 1995, which introduced the concept of IPv6 addressing architecture you can continue reading past the paragraph mentioning the example of a link-local derived address to see it was never the only example: Another unicast address format example is where a site or organization requires additional layers of internal hierarchy. In this example the subnet ID is divided into an area ID and a subnet ID. Its format is: | s bits | n bits | m bits | 128-s-n-m bits | +----------------------+---------+--------------+-----------------+ | subscriber prefix | area ID | subnet ID | interface ID | +----------------------+---------+--------------+-----------------+ This technique can be continued to allow a site or organization to add additional layers of internal hierarchy. It may be desirable to use an interface ID smaller than a 48-bit IEEE 802 MAC address to allow more space for the additional layers of internal hierarchy. These could be interface IDs which are administratively created by the site or organization. > WTF is "leaking down"? The higher protocol levels are supposed to use lower protocol levels. Hopefully this is already explained in the part about what a layering violation actually is, but the problem is indeed not related to IPv4 riding on top of an L2. Oblivious transport of higher layers is the point of abstracted layers. The problem is ARP, an L2 protocol, is not oblivious to the information of the layers above it, such as L3 IP information, breaking the abstraction. IPv6 corrected this, the neighbor exchange information is always encapsulated in an L3 packet.
- cyberax 10d agoAre you a bot? "Layering violation" has a pretty clear meaning in CS. It means that a layer needs information from an upper layer for the system to work, or if a lower-level layer internal details are not abstracted properly. For example, NATs are a layering violation because a router, which is supposed to work on the level of individual packets, needs to understand the details of sessions established in higher protocols (TCP, SIP, FTP, ...) and mangle the packets accordingly.7 The other way around is IPv6. The details of SLAAC that are driven by 64-bit MACs of the Ethernet layer. They make it impossible to use masks larger than 64 bits. The largest installed base of devices (Android) does NOT support DHCP, which is the only non-manual way to configure such addresses. > The problem is ARP, an L2 protocol And? What is your point? ARP is not a layering violation, it operates at the correct layer and properly abstracts it. MAC addresses are an internal detail of its functionality, they don't leak into upper layers.
- zamadatix 9d ago> Are you a bot? Beep boop :). No, at least not last I checked. I'm just a guy who's day job was developing a NOS which targets both ASICs and a custom software-based forwarding pipelines at one of the main enterprise network vendors. Nowadays I'm PLM for it but kinda miss getting to spend years working with every single bit of these kinds of protocols. > "Layering violation" has a pretty clear meaning in CS. It means that a layer needs information from an upper layer for the system to work Maybe you're used to layering in areas of CS outside of networking? E.g. page 476 of TCP IP Illustrated by Fall and Stevens gives an example in the opposite direction than what you just said: The careful reader will note that this causes a so-called layering violation. That is, the UDP protocol (transport layer) is directly processing bits “owned” by IP (network layer). That said, you're correct NAT is still also another network layering violation driven by IPv4's limitations. > The details of SLAAC that are driven by 64-bit MACs of the Ethernet layer. MACs of the Ethernet layer are 48 bits. > They make it impossible to use masks larger than 64 bits. The largest installed base of devices (Android) does NOT support DHCP, which is the only non-manual way to configure such addresses. Android does not use the MAC address derivation mode of SLAAC, it uses randomized addresses mode of SLAAC for privacy. There are several such standardized modes for SLAAC which are not based on the link layer identifier. This should follow because Android's most common IPv6 interface is the cellular radio which does not even have an Ethernet MAC to derive from. > And? What is your point? The part you cut off: is not oblivious to the information of the layers above it, such as L3 IP information, breaking the abstraction. This point will only make or not make sense once we agree what a layering violation in networking is, until then there's not really sense trying to debate it.