Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
user:ahorner:pppoe_server_guide [2022/10/12 20:34] – Start writing guide ahorneruser:ahorner:pppoe_server_guide [2022/10/12 22:14] ahorner
Line 8: Line 8:
 ===== Prerequisite Installation ===== ===== Prerequisite Installation =====
 To set up your PPPoE server, install the [[:packages:pkgdata:luci-app-rp-pppoe-server]] and [[:packages:pkgdata:rp-pppoe-server]] packages, either through the Software menu on the web UI, or using the following commands over SSH: To set up your PPPoE server, install the [[:packages:pkgdata:luci-app-rp-pppoe-server]] and [[:packages:pkgdata:rp-pppoe-server]] packages, either through the Software menu on the web UI, or using the following commands over SSH:
-```+<code>
 # Update your package index # Update your package index
 opkg update opkg update
Line 14: Line 14:
 # Install the packages # Install the packages
 opkg install luci-rp-pppoe-server rp-pppoe-server opkg install luci-rp-pppoe-server rp-pppoe-server
-```+</code>
  
-Usually, installiong [[:packages:pkgdata:luci-app-rp-pppoe-server]] will automatically install [[:packages:pkgdata:rp-pppoe-server]], but do confirm that [[:packages:pkgdata:rp-pppoe-server]] is installed before proceeding.+Usually, installing [[:packages:pkgdata:luci-app-rp-pppoe-server]] will automatically install [[:packages:pkgdata:rp-pppoe-server]], but do confirm that [[:packages:pkgdata:rp-pppoe-server]] is installed before proceeding.
  
 ===== Enabling RP PPPoE Server Configuration Menu ===== ===== Enabling RP PPPoE Server Configuration Menu =====
 Unfortunately, at the time of writing, the menu item for RP PPPoE Server does not immediately appear after installation as the configuration section for it is commented out. Usually, it should appear in the Services menu on your Web UI: Unfortunately, at the time of writing, the menu item for RP PPPoE Server does not immediately appear after installation as the configuration section for it is commented out. Usually, it should appear in the Services menu on your Web UI:
  
--- Image of menu item+{{:media:rp_pppoe_menu_item.png|RP PPPoE Server Menu Item}}
  
-If this menu item is already present, you may skip this section, otherwise you'll need to SSH into your device and modify the `/etc/config/pppoefile. If you are not comfortable using an SSH terminal, you may want to use an SCP client to browse and edit files graphically, an example of which being [[https://winscp.net|WinSCP]].+If this menu item is already present, you may skip this section, otherwise you'll need to SSH into your device and modify the ''/etc/config/pppoe'' file. If you are not comfortable using an SSH terminal, you may want to use an SCP client to browse and edit files graphically, an example of which being [[https://winscp.net|WinSCP]].
  
 The default contents of this file is as follows: The default contents of this file is as follows:
-``` +<code> 
-#default contents +#config pppoe_server 
-```+#       option interface eth1 
 +#       option ac_name access-concentrator-name 
 +#       list service_name service-name1 
 +#       list service_name service-name2 
 +#       option maxsessionsperpeer 0 
 +#       option localip 192.168.2.1 
 +#       option firstremoteip 192.168.2.2 
 +#       option maxsessions 64 
 +#       option optionsfile /etc/ppp/pppoe-server-options 
 +#       option randomsessions 1 
 +#       option unit 0 
 +#       option offset 0 
 +#       option timeout 60 
 +#       option mss 1468 
 +#       option sync 0
  
-You'll need to remove all the comment hashtags from each line, leaving the config file looking like so: +#config pppoe_relay 
-``` +#       list server_interface eth1 
-#uncommented +#       list client_interface eth0 
-```+#       list both_interface eth2 
 +#       option maxsessions 64 
 +      option timeout 60 
 +</code>
  
-After this, you'll need to force a pppoe configuration update with the command `uci commit pppoe`If you are unable to run this command (SCP client), you can reboot your device from the web UI instead.+You'll need to remove all the comment hashtags from each line of the first section only, leaving the config file looking like so: 
 +<code> 
 +config pppoe_server 
 +       option interface eth1 
 +       option ac_name access-concentrator-name 
 +       list service_name service-name1 
 +       list service_name service-name2 
 +       option maxsessionsperpeer 0 
 +       option localip 192.168.2.1 
 +       option firstremoteip 192.168.2.2 
 +       option maxsessions 64 
 +       option optionsfile /etc/ppp/pppoe-server-options 
 +       option randomsessions 1 
 +       option unit 0 
 +       option offset 0 
 +       option timeout 60 
 +       option mss 1468 
 +       option sync 0 
 + 
 +#config pppoe_relay 
 +#       list server_interface eth1 
 +#       list client_interface eth0 
 +#       list both_interface eth2 
 +#       option maxsessions 64 
 +#       option timeout 60 
 +</code> 
 + 
 +The best thing to do now is to reboot your device, after which the menu item will appear. 
 + 
 +===== Initial Configuration ===== 
 +The initial configuration of the PPPoE server is quite straightforward, but does require you to continually be aware that PPPoE is not the same as IP. 
 + 
 +Without going into too much detail, PPPoE directly sends Ethernet frames between devices using MAC addresses instead of IP addresses in order to establish a PPP tunnel. This PPP tunnel also runs over Ethernet frames, and IP runs on top of this established PPP tunnel. The main point here is that establishing IPs is handled by PPP, and not the DHCP server on your LAN. The significance of this will be explained later, when we choose where PPPoE traffic will be directed and what IP addresses will be handed out. 
 + 
 +We will go through each option one by one for the initial configuration of RP PPPoE Server. 
 + 
 +==== Interface ==== 
 +--picture of default interface selection 
 + 
 +The Interface option allows you to select what logical Interface will be used for the server. Because of the way OpenWrt manages interfaces, it is necessary to select a logical interface which has been configured in the Network -> Interfaces section of OpenWrt. This is because an interface will not be active until it is configured to be by OpenWrt. 
 + 
 +You should choose which port (or ports) on your physical device you would like the PPPoE server to run on. If you would like all of the ports that your LAN is on to also be used for PPPoE, choosing the ''LAN'' interface should be acceptable. You may however want to use one specific port on your device as a dedicated PPPoE port, in which case you should remove this port from any other bridges or logical interfaces, and create an Unmanaged interface without a firewall zone, as demonstrated below: 
 + 
 +--picture of creating and created unmanaged interface 
 + 
 +You are restricted to only selecting logical OpenWrt interfaces for use by the PPPoE server because the port(sthe server runs on must of course be enabledwhich is handled by OpenWrt for you using these logical interfaces. 
 + 
 +==== Access Concentrator Name ==== 
 +--picture of acn input 
 + 
 +The Access Concentrator Name is essentially the name of your PPPoE server. This allows you to run more than one PPPoE server on one LAN, and allow you to specify on the PPPoE client which one to connect to (citation needed). For the purposes of a single server, this option is not necessary as it should be autodetected by the PPPoE client, so the default name of ''access-concentrator-name'' is perfectly acceptable. 
 + 
 +==== Service Name ==== 
 +--picture of sn input 
 + 
 +Explanation needed 
 + 
 + 
 +==== Maximum Sessions Per Peer ==== 
 +-- picture of mspp input 
 + 
 +Maximum Sessions Per Peer specifies how many connections a single PPPoE user can have active at any one time. The default is '''', which means unlimited, and will allow you to simultaneously use as many PPPoE clients as you want with the same login credentials. It may be desirable to set this to 1 to only allow a single connection per user. 
 + 
 +==== IP of Listening Side ==== 
 +-- picture of iols 
 + 
 +PPP stands for Peer to Peer (P2P) Protocol, which means two peers are talking directly to each other. This IP address is the address the server will use in this P2P connection. This will be used as the default gateway of the IP connection running atop the PPP session (citation needed). You should configure this to be a different subnet to your LAN on which your DHCP server is running, which is further explained in the First Remote IP section. 
 + 
 +==== First Remote IP ==== 
 +-- picture of fri 
 + 
 +This is the first IP address that will be handed out to PPPoE clients when they connect. When establishing a PPP connection, the PPP daemon handles issuing of IP addresses to clients, and the DHCP server is not used. It is also important to note that PPP does not interact with the DHCP server to verify if it has already assigned an IP address to a client, and for this reason it is recommended to place PPPoE clients on a different subnet to the one DHCP is running, to prevent both PPP and DHCP issuing the same address to two different clients resulting in an IP conflict.
  • Last modified: 2024/05/25 14:58
  • by eloy