2

I have some machines running on the same network. One node is the control node which distributes traffic coming to it to the other nodes. The thing is that I want to have a custom protocol header between MAC header and IP(or whatever) payload incoming to the control node.

Control node receives this any packet like this:

------------------------------------------------
| Layer 2 | IP(or whatever protocol) | Payload |
------------------------------------------------

This packet should be distributed like this to other nodes

----------------------------------------------------------------
| Layer 2 | Custom Header | IP(or whatever protocol) | Payload |
----------------------------------------------------------------

I want some directions to do such a thing, Is there any current solution which I can use and I have to hack kernel for it from the scratch. A similar approach is to use L2TP but that runs over IP layer so I don't want that.

I also want this communication to be appeared as a separate interface in Linux like tun0 apart from physical eth0 interface.

1

There is no layer "2.5". That would violate the whole OSI model, so I'm going to say there is unlikely to be such a thing as no one would have a purpose for it, or want to adapt some purpose to make use of it. It would also involve a lot of kernel hacking, and that modified kernel would have to be used by every device accessing the network downstream from the control node.

The purpose of layer 3, the network layer, is addressing/routing. There is no data appropriate for insertion between layer 2 and layer 3, since data other than hardware (layer 2) and software (layer 3) addresses is part of the payload.

You could replace layer 3 IP stuff with some software routing protocol of your own, transforming incoming packets, but it is hard to see what the point of that would be.

Of course, if you explain more specifically what you want to accomplish, someone might have a suggestion.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.