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?
1 Answers
Technically, only sending L3 data is the correct thing to do (or rather removing any L2 specifics at the incoming side (which may be ethernet, but could as well be token ring, couldn't it?) transfer the content the serial way (which means to do some rather trivial L2 encapsulating) and do the reverse at the receiving end (which may run yet another L2 protocol). So from the systematic, we are talking about routers. When we talk about the direct communication between the two ends, there is also no MAC (neither from ethernet, nor token ring, nor ...) involved, simply because there is no need to identify the commiunication partner - there is only "the other end". There is also no systematic way to somehow add the MAC of any of the other ethrenet interfaces, just like you don't add the MAC of eth0 to any communication going out via eth1.
What you want to create is a bridge across the serial line, sometnhing like this. But vbe aware of the drawbacks (such as proagating broadcasts)
- 23,380
- 43
- 145
- 225
- 598
- 1
- 6
- 21
-
1-1- The intention is to make a bridge that has a serial (async) interface. 1-2- The other interface (the incoming side as u call it) is eth0. 2- The traffic (broadcasts, etc) can be controlled by only allowing a certain type of traffic into the system (call it stream#1_port#x). 3- If the serial line was synchronous, the HDLC protocol could be used. 3-1- The HDLC uses the whole L2 frame including the headers (src/dst MAC, etc.) as its payload (exactly what I am looking for) 3-2- As far as I know HDLC can not be used over async serial lines. – user49114 Jul 12 '14 at 11:28
-
4- The eth0 is connected to a network and a number of "stream#1_port#x" traffic might come into the bridge that should be sent over the other side of the async serial line (based on the MAC addr. table). 5- FINALLY: It is clear that for the bridge to work the L2 headers should be preserved BUT HOW CAN I ACHIVE THIS GOAL? CAN I USE HDLC over the async serial line, or any other protocol resulting in the same effect? – user49114 Jul 12 '14 at 11:29