Discussion:
IP over 802.2 with LLC/SNAP
Alan Ott
2011-07-27 03:52:27 UTC
Permalink
Hi,

What I have is a fairly straight-forward question, but takes a little
background to get there.

I have an ancient computer (Gould 3267) that I'm trying to interface
with both a Windows computer and an embedded Linux computer over
UDP/Ethernet. Since the Gould doesn't have any IP support, I have to
make the IP packet myself. Also, because of the way the Gould's Ethernet
driver works, sent packets all use the type/length field in the Ethernet
header to represent the length and therefore are unable to specify that
the packet contains IP data in the Ethernet header. To get around this,
I added an 802.2 LLC/SNAP header to my packet[1]. My packet looks good
in Wireshark, and I have it working well communicating with the Windows
PC. However, I can't seem to get Linux to recognize the packet as IP,
and thus I am unable to receive it using the normal socket interface on
the Linux system.

So the question is, does Linux support IP over 802.2 with LLC/SNAP? Is
there a sysfs/proc entry that I have to turn on to make this work (I
didn't find one)? I have the LLC2 module loaded, and I believe my packet
to be correct, since Windows recognizes it and since Wireshark doesn't
give any red flags on it. I've been unable to find anything about this
kind of thing in my searching.

I put a sample capture file of the packets I'm sending at [2] for those
interested.

Alan.

[1] So the packet looks like this:
Ethernet Header
LLC/SNAP header
IP Header
UDP Header
data

[2] www.signal11.us/~alan/testraw.pcap
Ben Pfaff
2011-07-27 05:13:01 UTC
Permalink
[I'm not sure that linux-net is an active list, are you looking
Post by Alan Ott
So the question is, does Linux support IP over 802.2 with
LLC/SNAP?
No, I don't think that it does. I tested this perhaps a year
ago, out of curiosity as much as anything else, and could not
find a way to make it work.
Post by Alan Ott
Is there a sysfs/proc entry that I have to turn on to make this
work (I didn't find one)?
I did not find one at the time.

I did find that one router on my company's network (I think it
was a Cisco) transformed the 802.2 LLC/SNAP headers into Ethernet
II headers as packets passed through it, which effectively acted
as a gateway to allow Linux to talk IP over 802.2 LLC/SNAP. But
I don't think that it translated in the other direction.
--
Ben Pfaff
http://benpfaff.org
Alan Cox
2011-07-27 12:32:09 UTC
Permalink
Post by Alan Ott
So the question is, does Linux support IP over 802.2 with LLC/SNAP? Is
there a sysfs/proc entry that I have to turn on to make this work (I
didn't find one)? I have the LLC2 module loaded, and I believe my packet
to be correct, since Windows recognizes it and since Wireshark doesn't
give any red flags on it. I've been unable to find anything about this
kind of thing in my searching.
Linux supports LLC/SNAP and various things over it (IPX/Appletalk DDP
etc) but not IP over it, as it's one of those standards bodies driven
bogosities which nobody ever actually deployed.

You are about the first person in the known universe to care 8). Now
there isn't any reason for not supporting it. The receive side is a case
of using register_snap_client() and piping the frames into the IP stack.

The send side could be tackled two ways I can see, one would be to allow
for snap protocols to be set somehow on devices and routes, the other
that might be simply would be to create a 'snapifier' device that added
snap headers then routed the frame via the bound physical device as
802.2 LLC. That way you'd be able to do

route add gould-relic dev snap0

In both cases you'd need to tackle ARP but that seems to need no
configuration as SNAP requests get SNAP replies, and so on.

It should be a 'simple matter of hacking' and there are example devices
that fiddle with packets and add headers etc you can nick a lot of code
from. I figure if you can write an IP stack for an ancient Gould system
you can probably do that.

The other way is to use the Linux raw packet interfaces, open a raw
socket, push a BPF filter onto it to just get the frames for IP/SNAP and
ARP/SNAP then modify them and feed them to the kernel tun/tap interface.

Alan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Rick Jones
2011-07-27 16:26:36 UTC
Permalink
Post by Alan Cox
Post by Alan Ott
So the question is, does Linux support IP over 802.2 with LLC/SNAP? Is
there a sysfs/proc entry that I have to turn on to make this work (I
didn't find one)? I have the LLC2 module loaded, and I believe my packet
to be correct, since Windows recognizes it and since Wireshark doesn't
give any red flags on it. I've been unable to find anything about this
kind of thing in my searching.
Linux supports LLC/SNAP and various things over it (IPX/Appletalk DDP
etc) but not IP over it, as it's one of those standards bodies driven
bogosities which nobody ever actually deployed.
Well... Hewlett-Packard deployed it in the 80's and 90's in MPE and
HP-UX, HP-UX because until the mid-ish 1990's MPE only spoke 802.2 not
"Ethernet." By the late 1990's I think it was gone from HP-UX.

rick jones
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Continue reading on narkive:
Loading...