-1
\$\begingroup\$

I am using pppd (in linux) to send ethernet data over a serial line to another computer. How can I preserve L2 headers while sending Ethernet frames over serial line? It seems the ppp protocol sends only the "L3 data" as its payload thus dropping the L2 headers including src/dst MAC addresses. What protocol, etc. should I use to preserve L2 headers?

\$\endgroup\$

closed as off-topic by PeterJ, Matt Young, Daniel Grillo, alexan_e, Vladimir Cravero Jul 10 '14 at 17:19

  • This question does not appear to be about electronics design within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 7
    \$\begingroup\$ This question appears to be off-topic because it is about a network protocol being used to communicate between two PCs. \$\endgroup\$ – PeterJ Jul 10 '14 at 11:35
1
\$\begingroup\$

pppd acts as a router, selecting which packets to forward over the serial link, since the speed of the serial link will generally be much lower than the rest of the LAN, and you don't want it to be any more of a bottleneck than necessary.

It sounds like you want the serial link in your application to function more like a bridge that connects two physically separate but logically unified network segments. This can be done, but it usually involves a communication link that has at least the same order of magnitude of speed as the LAN (e.g., T1, Frame Relay, etc.). If you want to do this over an asynchronous serial line, I think you're going to have to create that software yourself, since it sounds like a fairly unique requirement.

\$\endgroup\$
  • \$\begingroup\$ As you have correctly mentioned this is done in synchronous serial line (rate T1/E1) with the HDLC protocol. The HDLC uses the whole L2 frame including the headers (src/dst MAC, etc.) as its payload. The serial link we use is async. and I think we can not use HDLC. We can manage the rate of data by suppressing broadcast, etc. and allowing only a specific type of traffic into the system from the eth0 interface (that \$\endgroup\$ – user49114 Jul 12 '14 at 11:04
  • \$\begingroup\$ As you have correctly mentioned this is done in synchronous serial line (rate T1/E1) with the HDLC protocol. The HDLC uses the whole L2 frame including the headers (src/dst MAC, etc.) as its payload. The serial link we use is async. and I think we have to use ppp (and can not use HDLC). We can manage the rate of data by suppressing broadcasts, etc. and allowing only a specific type of traffic into the system. YET I DONT KNOW WHAT PROTOCOL TO USE, OR HOW I CAN MAKE THIS BRIDGE WORK OVER THE SERIAL LINE? \$\endgroup\$ – user49114 Jul 12 '14 at 11:11

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