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)
- 25,198
- 648