PPPoE

From VyOS Wiki
Jump to: navigation, search
Warning sign.png This page is migrated to Readthedocs .
Information found on this page is migrated to readthedocs and information found here could be outdated or misleading. https://vyos.readthedocs.io/en/latest/interfaces/pppoe.html


Configuration Summary

There are two main ways to setup VyOS to connect over a PPPoE internet connection. This is due to most ISPs (Internet Service Providers) providing a DSL modem that is also a wireless router.

First Method:
(Common for Homes)
In this method, the DSL Modem/Router connects to the DSL ISP for you with your credentials preprogrammed into the device and it gives you a local IP address such as 192.168.1.0/24 be default. For home networks this is usually fine and saves you trouble but if you want to run a configuration of your own controlled by VyOS, this would mean a Double Firewall, a Double NAT, and double Router as both the DSL Modem/Router and the VyOS would act as firewalls, NATs, and Routers and if you try to do more then just browse Web Sites this will usually cause you trouble.

Second Method:
(Common for Businesses)
In order to have full control and make use of multiple static public IP addresses, your VyOS will have to initiate the PPPoE connection and control it. In order for this method to work, you will have to figure out how to make your DSL Modem/Router switch into a Bridged Mode so it only acts as a DSL Transceiver device to connect between the Ethernet link of your VyOS and the phone cable.

  • Once your DSL Transceiver is in Bridge Mode, you should get no IP address from it.
  • Please make sure you connect to the Ethernet Port 1 if your DSL Transeiver has a switch, as some of them only work this way.

Once you have an Ethernet device connected, i.e. eth0, then you can configure it to open the PPPoE session for you and your DSL Transceiver (Modem/Router) just acts to translate your messages in a way that vDSL/aDSL understands.

Here is an example configuration:

set interface ethernet eth0 description "DSL Modem"
set interface ethernet eth0 duplex auto
set interface ethernet eth0 smp_affinity auto
set interface ethernet eth0 speed auto
set interface ethernet eth0 pppoe 0 default-route auto
set interface ethernet eth0 pppoe 0 mtu 1492
set interface ethernet eth0 pppoe 0 name-server auto
set interface ethernet eth0 pppoe 0 user-id <PPPoE Username>
set interface ethernet eth0 pppoe 0 password <PPPoE Password>

Notes:

  • You should add a firewall to your configuration above as well by assigning it to the pppoe0 itself as shown here:
set interface ethernet eth0 pppoe 0 firewall in name NET-IN
set interface ethernet eth0 pppoe 0 firewall local name NET-LOCAL
set interface ethernet eth0 pppoe 0 firewall out name NET-OUT
  • You need your PPPoE credentials from your DSL ISP in order to configure this. The usual username is in the form of name@host.net
  • The largest MTU size you can use with DSL is 1492 due to PPPoE overhead. If you are switching from a DHCP based ISP like cable then be aware that things like VPN links may need to have their MTU sizes adjusted to work within this limit.
  • With the 'default-route' option set to 'auto', VyOS will only add the Default Gateway you receive from your DSL ISP to the routing table if you have no other WAN connections. If you wish to use a Dual WAN connection, change the 'default-route' option to 'force'.

TCP MSS clamping
After creating PPPoE connection, you also need to setup TCP MSS clamping of outgoing connections from your LAN, otherwise you will find that you can ping the Internet but fail to load most of websites. Here is the configuration (assuming eth1 is the LAN port):

set policy route MSS description "TCP MSS clamping for PPPoE"
set policy route MSS rule 5 protocol tcp
set policy route MSS rule 5 tcp flags SYN
set policy route MSS rule 5 set tcp-mss 1452
set interface ethernet eth0 pppoe 0 policy route MSS
set interface ethernet eth1 policy route MSS

Note the value of tcp-mss is 1452 = 1492 - 20 (IP header) - 20 (TCP header)

Testing: You can test connecting and disconnecting with the below commands:

disconnect interface pppoe0
connect interface pppoe0

Logging: You can check the PPPoE connection logs with the following:

show interfaces pppoe pppoe0
  • This command shows the current statistics, status and some of the settings (i.e. MTU) for the current connection on pppoe0.
show interfaces pppoe pppoe0 log
  • This command shows the entire log for the PPPoE connection starting with the oldest data. Scroll down with the <space> key to reach the end where the current data is.
show interfaces pppoe pppoe0 log tail
  • This command shows the same log as without the 'tail' option but only starts with the last few lines and continues to show added lines until you exit with 'Ctrl' + 'x'

Configuration Commands

PPPoE over Ethernet interfaces (e.g. CenturyLink Fiber)

interfaces ethernet <eth#> pppoe <unit#> Defines a PPPoE configuration on an Ethernet interface

<eth#> = Ethernet interface (e.g. eth0)
<unit#> = PPPoE unit number (0-15)

Usage: Use this command to configure a PPPoE unit on an Ethernet interface.

interfaces ethernet <eth#> pppoe <unit#> access-concentrator <text> Allows you to define and restrict connectivity to a specific access concentrator

<eth#> = Ethernet interface (e.g. eth0)
<unit#> = PPPoE unit number (0-15)
<text> = Access concentrator name

Usage: Use this command to restrict the PPPoE session to a specific access concentrator.
Note: The PPPoE discovery process is documented in RFC 2516

interfaces ethernet <eth#> pppoe <unit#> connect-on-demand Instructs the system to establish the PPPoE session on-demand when outbound traffic is detected

<eth#> = Ethernet interface (e.g. eth0)
<unit#> = PPPoE unit number (0-15)

Usage: Use this command to establish a PPPoE session on-demand when outbound traffic is detected.
Note: On-demand connectivity is disabled by default.

interfaces ethernet <eth#> pppoe <unit#> default-route <auto|none|force> Defines how the system will handle the default route

<eth#> = Ethernet interface (e.g. eth0)
<unit#> = PPPoE unit number (0-15)
<auto> = Configure the default route when link comes up [Default]
<none> = Don't configure the default route when link comes up
<force> = Configure and replace the existing default route when the link comes up

Usage: Use this command to specify whether the system adds a default route that points to the PPPoE endpoint after successfully establishing a session.

interfaces ethernet <eth#> pppoe <unit#> disable Administratively disables the PPPoE unit

<eth#> = Ethernet interface (e.g. eth0)
<unit#> = PPPoE unit number (0-15)

Usage: Use this command to administratively disable the PPPoE unit.

interfaces ethernet <eth#> pppoe <unit#> enable-ipv6 Activates support for IPv6 on the connection

<eth#> = Ethernet interface (e.g. eth0)
<unit#> = PPPoE unit number (0-15)

Usage: Use this command to enable support for IPv6 on the connection.
Note: IPv6 over PPPoE support requires VyOS 1.2.0 or higher.

interfaces ethernet <eth#> pppoe <unit#> idle-timeout <#> Defines the delay in seconds before disconnecting idle on-demand sessions

<eth#> = Ethernet interface (e.g. eth0)
<unit#> = PPPoE unit number (0-15)
<#> Idle timeout in seconds (0-4294967295)

Usage: Use this command to establish an idle timeout when utilizing on-demand connectivity.
Note: 0 = never close the connection. Idle connections are never disconnected by default.

interfaces ethernet <eth#> pppoe <unit#> local-address <ipv4 address> Defines the IPv4 address of the local endpoint of the PPPoE session

<eth#> = Ethernet interface (e.g. eth0)
<unit#> = PPPoE unit number (0-15)
<ipv4 address> = IPv4 address of the local end of the PPPoE link

Usage: Use this command to set the local endpoint address.

interfaces ethernet <eth#> pppoe <unit#> mtu <#> Defines the Maximum Transmission Unit for the interface

<eth#> = Ethernet interface (e.g. eth0)
<unit#> = PPPoE unit number (0-15)
<#> = Maximum Transmission Unit (68-1500)

Usage: Use this command to set the MTU for the PPPoE unit.
Note: The effective maximum MTU is 1492 due to the 8-byte PPPoE packet overhead. If not set, the MTU will be set to 8 bytes less than the parent Ethernet interface.

interfaces ethernet <eth#> pppoe <unit#> name-server <auto|none> Defines how the system will handle name servers provided by the peer

<eth#> = Ethernet interface (e.g. eth0)
<unit#> = PPPoE unit number (0-15)
<auto> = Use the name servers provided by the peer [Default]
<none> = Do not use the name servers provided by the peer

Usage: Use this command to specify whether the system utilizes the name servers provided by the peer after successfully establishing a session.

interfaces ethernet <eth#> pppoe <unit#> password <text> Defines the password used during authentication

<eth#> = Ethernet interface (e.g. eth0)
<unit#> = PPPoE unit number (0-15)
<text> = Password for authenticating local machine to PPPoE server

Usage: Use this command to define the password used during authentication.

interfaces ethernet <eth#> pppoe <unit#> redirect <text> Defines the destination interface for incoming packet redirection

<eth#> = Ethernet interface (e.g. eth0)
<unit#> = PPPoE unit number (0-15)
<text> = Interface name

Usage: Use this command to enable packet redirection.

interfaces ethernet <eth#> pppoe <unit#> remote-address <ipv4 address> Defines the IPv4 address of the remove endpoint of the PPPoE session

<eth#> = Ethernet interface (e.g. eth0)
<unit#> = PPPoE unit number (0-15)
<ipv4 address> = IPv4 address of the remote end of the PPPoE link

Usage: Use this command to set the remote endpoint address.

interfaces ethernet <eth#> pppoe <unit#> service-name <text> Allows you to define and restrict connectivity only to access concentrators advertising a particular service name

<eth#> = Ethernet interface (e.g. eth0)
<unit#> = PPPoE unit number (0-15)
<text> = Service name

Usage: Use this command to restrict the PPPoE session to a specific service name.
Note: The PPPoE discovery process is documented in RFC 2516

interfaces ethernet <eth#> pppoe <unit#> user-id <text> Defines the username used during authentication

<eth#> = Ethernet interface (e.g. eth0)
<unit#> = PPPoE unit number (0-15)
<text> = Username for authenticating local machine to PPPoE server

Usage: Use this command to define the username used during authentication.