pppoe-relay
Relay PPPoE packets between interfaces
SYNOPSIS
pppoe-relay [options]
PARAMETERS
-i iface
Listen on interface iface for PPPoE packets.
-c iface
Forward packets to PPPoE servers via interface iface.
-S address
Specify source IP address. Used as IP of relay agent.
-C address
Specify destination IP address of PPPoE servers. Required for server selection, otherwise relay will forward PPPoE packets to any server.
-n count
Exit after relaying count sessions.
-t timeout
Set idle timeout to timeout seconds.
-U
Enable filtering of unique AC-NAME's and SRV-NAME's.
-D
Do not set the destination MAC address on forwarded packets. By default destination MAC is set to interface configured to receive the packets
-q
Quiet mode.
-V
Print version number and exit.
-h
Show usage help.
DESCRIPTION
The pppoe-relay command acts as a PPPoE (Point-to-Point Protocol over Ethernet) relay agent. Its primary function is to forward PPPoE packets between PPPoE clients and a PPPoE access concentrator (typically a broadband modem or server). This is useful in situations where clients are on a different network segment than the concentrator, or when multiple concentrators are present.
pppoe-relay listens for PADI (PPPoE Active Discovery Initiation) packets from clients. When it receives a PADI, it adds its own Ethernet header to the packet and forwards it to all concentrators it can reach.
When a concentrator responds with a PADO (PPPoE Active Discovery Offer) packet, pppoe-relay stores information about the concentrator. When a client selects a concentrator, pppoe-relay forwards the PPPoE session setup packets (PADR, PADS) between the client and the selected concentrator. Subsequently, pppoe-relay forwards the PPP data packets during the session itself. This allows the client and concentrator to communicate even if they are not directly connected.
CAVEATS
The pppoe-relay command requires root privileges to run because it needs to bind to network interfaces and manipulate raw Ethernet packets. Proper network configuration is crucial for the relay agent to function correctly, including IP addresses, routing, and firewall rules. Incorrectly configured network settings can lead to network disruptions or security vulnerabilities.
TROUBLESHOOTING
If PPPoE sessions are not being established correctly, check the following:
1. Network Interface Configuration: Verify that the interfaces used by pppoe-relay are properly configured with the correct IP addresses and netmasks. Also, check the destination IP address of the access concentrator (-C option).
2. Routing: Ensure that the routing tables are configured correctly so that packets can be forwarded between the client network and the concentrator network.
3. Firewall Rules: Make sure that the firewall is not blocking PPPoE packets (EtherType 0x8863 and 0x8864).
4. Logging: Enable verbose logging to capture detailed information about the PPPoE packets being processed by the relay agent. Use tcpdump on specified interfaces to determine if PADI packets are being received and forwarded correctly.
HISTORY
The pppoe-relay command was developed to facilitate PPPoE connections across multiple network segments or when dealing with multiple access concentrators. It became particularly useful in environments where a single broadband connection was shared among multiple clients behind a router or gateway. Its development was driven by the need for a simple, reliable, and efficient PPPoE relaying solution for Linux-based systems.