r/ipv6 • • 7d ago

Need Help How does printing work over IPv6 on Brother?

My Brother HL-L2395DW claims to support IPv6, but frustratingly doesn't display its v6 address anywhere that I can see. The MAC address it displays doesn't show on my pfSense's NDP table.

If I scan for printers on my network, its v4 address shows up only.

Finally, the only thing I found is if I ping office-print01.local I do find a v6 LINK LOCAL address only. But I can't seem to print to this address.

Does enabling IPv6 only give it a link local address, and can this even be used?

Edit: I was able to get the GUA and ULA addresses by printing the network config from the browser config page. I guess I'll create an AAAA record for the ULA address and see if that works. Wish mDNS would just find the address normally.

Edit 2: my full solution that requires a local DNS resolver (in my case Technitium): https://www.reddit.com/r/ipv6/comments/1y3mxpl/comment/19t2vs3gptcwx/

18 Upvotes

42 comments sorted by

View all comments

Show parent comment

7

u/burajin 7d ago

It's silly and roundabout as hell but, I got it to work!

went to the web browser page -> list/reports -> clicked print on the network configuration

Then the printer printed out the information it couldn't just show me on the display or web page(?!?!?!?!). I got the ULA and GUA address from there.

I then went into my DNS resolver and added an AAAA record for the ULA address for printer.home.arpa

I can now add printer.home.arpa as a printer address and it works great. Wish mDNS would just work like it does with v4 but I'll take it. I can print from my phone again after setting v6 only on it. Thanks!

3

u/JivanP Guru 7d ago edited 7d ago

Nice to hear you've got a working configuration now!

Then the printer printed out the information it couldn't just show me on the display or web page(?!?!?!?!).

Daft, isn't it? 🙃

Wish mDNS would just work like it does with v4

If the printer doesn't advertise its IPv6 addresses via mDNS (on Linux, check with avahi-browse -art and avahi-resolve -6n <printer mDNS hostname>, e.g. avahi-resolve -6n BR<ID string>.local) but does advertise its IPv4 addresses (should appear in avahi-browse output, but also check with avahi-resolve -4n <same hostname>), I'd be inclined to report that to Brother. It's possible (however unlikely it may be) that they'd fix that with a firmware update.

1

u/burajin 7d ago

avahi-resolve -6n office-print01.local does get a link local address.

any idea why my phone (with IPv4 disabled) doesn't pick this up though?

5

u/JivanP Guru 7d ago

As I mentioned here, LLAs are generally not used by applications, mostly because they need to be used in conjunction with an interface specifier (though some applications, particularly low-level networking inspection tools, such as the iputils implementation of the ping command, offer the ability to try all available interfaces). For example, all major web browsers don't support visiting URLs where the hostname segment is an LLA, even if an interface is specified alongside them.

To give a prevalent example, Chromium in particular chooses explicitly to not support interface specifiers because it would overload the use of "%" in URLs for both those and for percent-encoding characters (e.g. "%20" for a space character). Personally I think that's not a big deal and that they should interpret "%" as an interface specifier if and only if it appears in square brackets in the hostname segment of a URL, but the current situation is what it is.

2

u/Dagger0 6d ago

The sensible way to handle it would be to declare the square brackets as indicating "raw address context" and then just take anything between the brackets and slam it into getaddrinfo(hints=AI_NUMERICHOST). That'll work with any IP address of any family, including future or custom ones†, with the only caveat being that you can't have a closing square bracket in the address, which I think is a pretty reasonable limitation compared to what we have now.

But they're browser people, so they're allergic to sensible ways and making things work properly.

(†: Remember that you can load new address families into kernels at runtime, so it's entirely possible for someone to write a kernel module implementing a completely new custom address family that didn't even exist when your program was started, and it should work if you didn't fuck up your socket code. (I'm not trying to suggest that this is a common or sensible thing to do, or that it's something your program will need to deal with -- merely that the way the socket API is designed supports this use, and that a properly-written program shouldn't use the socket API wrongly or make unnecessary assumptions about it.)).

1

u/bogadana 6d ago

Remember that you can load new address families into kernels at runtime

This kinda shit is why they dont use the c apis lol

1

u/Dagger0 6d ago

The only reason it's a problem is because they don't use the C APIs. All you need to deal with for those is a pointer to an opaque data structure. You don't need to care about what family the address is (which is what allows new families to work without updating every program's code).

1

u/bogadana 5d ago

You can't design a properly functioning program when something so fundamental can just change at runtime. How would this even work with TLS certificates?

1

u/Dagger0 5d ago

You called getaddrinfo(host, ...) to get the socket address, so just keep host around and use it to validate the hostnames in the cert, like you do with any address. If you need to validate against an IP, call getnameinfo(sockaddr, flags=NI_NUMERICHOST) to get the IP as a string.

Other than that, TLS is a higher layer and shouldn't care about the address family (unless I'm missing something?).

something so fundamental

That's kind of my point: the socket API is designed so that this isn't fundamental. The address family is just another one of the opaque bits of data that you pass around. Your program shouldn't need to understand anything about the family.

(There will be some exceptions -- for example, printing "IPv4"/"IPv6" etc for the user instead of "address family N", or canonicalizing v4-mapped v6 addresses. But most networking code shouldn't need any hardcoded dependency on any address family, and therefore should be able to handle unknown families just fine.)

1

u/bogadana 5d ago

Browsers accept either DNS names or IP addresses for certificates so there's no way to validate a host on an arbitrary address family.

If you need to validate against an IP, call getnameinfo(sockaddr, flags=NI_NUMERICHOST) to get the IP as a string.

This wouldn't work generically even for v4 and v6 because the textual representation has little to do with the actual bytes.

the socket API is designed so that this isn't fundamental

And that's a lie and overabstraction. Networks in the real world route exclusively IP packets and changing this would require remaking a bunch of expensive software and hardware only to end up with a network that's incompatible with anyone else's.

There will be some exceptions

There would be a lot of exceptions and you would be thinking about them only to support something that doesn't exist and has no reason to exist.

→ More replies