
pppoe Command in Linux
The pppoe in Linux is a client for PPPoE (Point-to-Point Protocol over Ethernet). It is commonly used in Linux-based systems to establish an internet connection over DSL. PPPoE is a protocol used by many ADSL internet providers.
Table of Contents
Here is a comprehensive guide to the options available with the pppoe command −
- Installation of pppoe Command in Linux
- Syntax of pppoe Command
- pppoe Command Options
- Examples of pppoe Command in Linux
Installation of pppoe Command in Linux
The pppoe client must be installed to use Linux. To install it on Ubuntu, Kali Linux, Debian, and other Debian-based distributions, use the following command:
sudo apt install pppoe
To install it on CentOS, use the following command:
sudo yum install pppoe
To install it on Fedora, use the command given below:
sudo dnf install pppoe
To verify the installation, check the version of the pppoe client using the following command:
pppoe -V

Syntax of pppoe Command
The syntax of the pppoe command in Linux is as follows:
pppoe -A [pppoe_options]
The pppoe -A in the above syntax scans for available PPPoE access concentrators. The [pppoe_options] field is used to specify PPPoE-specific options mentioned in the next section.
pppoe Command Options
The options for pppoe client are listed below:
Option | Description |
---|---|
-I interface | Specifies the Ethernet interface (e.g., eth0). The interface must be up but should not have an assigned IP address. |
-T timeout | Exits if no session traffic is detected for the specified timeout (in seconds). Use with lcp-echo-interval in pppd to prevent unintended disconnections. |
-D file_name | Dumps all packet data to the specified file for debugging. Generates large output and may affect performance. |
-V | Displays the version number and exits. |
-A | Sends a PADI packet and lists available access concentrators. Not for use with pppd. |
-S service_name | Connects only to access concentrators providing the specified service. Usually not needed unless multiple services exist. |
-C ac_name | Connects only to the specified access concentrator. Used when multiple concentrators are available. If -S and -C are both specified, both must match. |
-U | Uses the Host-Uniq tag in discovery packets, allowing multiple pppoe instances to run without interference. |
-m MSS | Sets the TCP Maximum Segment Size. Recommended: -m 1412 when using a LAN behind a PPPoE gateway to prevent MTU issues. |
-p file | Writes the process ID to the specified file for easy process management. |
-e sess:mac | Skips the discovery phase and connects directly using the given session ID and MAC address. Intended for pppoe-server. |
-n | Prevents opening a discovery socket. Designed for pppoe-server. |
-k | Sends a PADT frame to terminate an existing session. Must be used with -e to specify the session. Useful when a peer fails to detect session termination. |
-d | Performs discovery, prints session details, and exits without starting a connection. Used for pre-session handling. |
-f disc:sess | Sets Ethernet frame types for PPPoE discovery and session packets. Default: 8863:8864. Use only if dealing with non-standard frame types. |
-h | Displays usage information and exits. |
Examples of pppoe Command in Linux
This section explores how to use the pppoe client in Linux with examples:
- Discovering PPPoE Servers
- Setting Custom Timeout
- Connecting to a Specific Concentrator
- Setting the Maximum Segment Size (MSS)
- Terminating a Specific Session
- Enabling Discovery Mode
- Displaying Usage Help
Discovering PPPoE Servers
To discover the PPPoE servers, use the -I and -A options with the pppoe client command:
pppoe -I eth0 -A
The above command lists available PPPoE access concentrators and displays their service names and MAC addresses.
Setting Custom Timeout
To set the custom timeout, use the -T option. For example, to set the timeout to 20 seconds, use the pppoe command in the following way:
pppoe -I eth0 -T 20
The above command exits if no session traffic is detected for 20 seconds. It helps prevent stale connections.
Connecting to a Specific Concentrator
To connect to a specific concentrator, use the -C option with the concentrator name:
pppoe -I eth0 -C myconcentrator
Setting the Maximum Segment Size (MSS)
To set the maximum segment size (MSS), use the -m option. For example, the following command sets the TCP Maximum Segment Size (MSS) to 1412 bytes:
pppoe -I eth0 -m 1412
It helps prevent MTU (Maximum Transmission Unit) issues when using a LAN behind a PPPoE gateway.
Terminating a Specific Session
To terminate a specific session, use the -k option:
pppoe -I eth0 -e 0x1234:00:11:22:33:44:55 -k
In the above command, the -e option is required to specify the session ID (0x1234) and peer MAC address (00:11:22:33:44:55).
Enabling Discovery Mode
To enable the discovery mode, use the -d option:
pppoe -I eth0 -d
The above command performs PPPoE discovery to identify available access concentrators. It prints session details (Session ID and MAC address) but does not start a connection.
Displaying Usage Help
To display the usage help, use the -h option with the pppoe command:
pppoe -h

Conclusion
The pppoe client in Linux is a useful tool for establishing internet connections over DSL using the Point-to-Point Protocol over Ethernet (PPPoE). It allows users to discover access concentrators, configure connection settings, and manage sessions efficiently. With various options, it supports features like setting timeouts, specifying interfaces, debugging, and terminating sessions.