This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
technical:ppp-pppoe-basic [2023/10/14 19:20] admin [Config file] |
technical:ppp-pppoe-basic [2023/10/15 06:56] (current) admin [Connecting a Client] |
||
---|---|---|---|
Line 19: | Line 19: | ||
===== Config file ===== | ===== Config file ===== | ||
* Accel-ppp has a single configuration file with various sections. // | * Accel-ppp has a single configuration file with various sections. // | ||
- | * Below is our slimmed down **accel-ppp.conf** file which removed | + | * Below is our slimmed down **accel-ppp.conf** file. |
+ | * We removed | ||
<file bash accel-ppp.conf> | <file bash accel-ppp.conf> | ||
[modules] | [modules] | ||
Line 38: | Line 39: | ||
mtu=1400 | mtu=1400 | ||
mru=1400 | mru=1400 | ||
- | # | ||
- | #pcomp=deny | ||
- | #ccp=0 | ||
- | # | ||
ipv4=require | ipv4=require | ||
ipv6=deny | ipv6=deny | ||
Line 48: | Line 45: | ||
ipv6-accept-peer-intf-id=1 | ipv6-accept-peer-intf-id=1 | ||
lcp-echo-interval=20 | lcp-echo-interval=20 | ||
- | # | ||
lcp-echo-timeout=120 | lcp-echo-timeout=120 | ||
unit-cache=1 | unit-cache=1 | ||
- | # | ||
[pppoe] | [pppoe] | ||
verbose=1 | verbose=1 | ||
- | # | ||
- | # | ||
- | # | ||
- | # | ||
called-sid=mac | called-sid=mac | ||
- | #tr101=1 | ||
- | # | ||
- | # | ||
- | # | ||
- | # | ||
- | # | ||
- | # | ||
- | # | ||
- | # | ||
- | # | ||
- | # | ||
interface=enp0s3 | interface=enp0s3 | ||
Line 86: | Line 66: | ||
dae-server=127.0.0.1: | dae-server=127.0.0.1: | ||
verbose=1 | verbose=1 | ||
- | #timeout=3 | ||
- | #max-try=3 | ||
- | # | ||
- | # | ||
- | # | ||
- | #acct-on=0 | ||
- | acct-interim-interval=120 | ||
- | # | ||
- | # | ||
- | # | ||
- | # | ||
- | # | ||
[client-ip-range] | [client-ip-range] | ||
Line 105: | Line 73: | ||
[ip-pool] | [ip-pool] | ||
gw-ip-address=192.168.0.1 | gw-ip-address=192.168.0.1 | ||
- | # | ||
- | ## | ||
attr=Framed-Pool | attr=Framed-Pool | ||
192.168.0.2-255 | 192.168.0.2-255 | ||
Line 119: | Line 85: | ||
log-emerg=/ | log-emerg=/ | ||
log-fail-file=/ | log-fail-file=/ | ||
- | # | ||
- | # | ||
- | # | ||
copy=1 | copy=1 | ||
- | #color=1 | ||
- | # | ||
- | # | ||
- | # | ||
level=3 | level=3 | ||
Line 132: | Line 91: | ||
vendor=Mikrotik | vendor=Mikrotik | ||
attr=Mikrotik-Rate-Limit | attr=Mikrotik-Rate-Limit | ||
- | # | ||
- | # | ||
- | # | ||
- | # | ||
- | #latency=50 | ||
- | #mpu=0 | ||
- | #mtu=0 | ||
- | #r2q=10 | ||
- | # | ||
- | # | ||
- | # | ||
- | #ifb=ifb0 | ||
up-limiter=police | up-limiter=police | ||
down-limiter=tbf | down-limiter=tbf | ||
- | # | ||
- | # | ||
- | # | ||
- | #fwmark=1 | ||
- | # | ||
- | # | ||
- | # | ||
verbose=1 | verbose=1 | ||
Line 159: | Line 99: | ||
telnet=127.0.0.1: | telnet=127.0.0.1: | ||
tcp=127.0.0.1: | tcp=127.0.0.1: | ||
- | # | ||
- | # | ||
</ | </ | ||
Line 250: | Line 188: | ||
* There are a couple of log files which you can **tail -f** in order to help troubleshoot if things are not working as intented. | * There are a couple of log files which you can **tail -f** in order to help troubleshoot if things are not working as intented. | ||
< | < | ||
- | system@osboxes: | + | cd / |
+ | ls -l | ||
total 2576 | total 2576 | ||
-rw------- 1 root root 1781664 Sep 26 19:05 accel-ppp.log | -rw------- 1 root root 1781664 Sep 26 19:05 accel-ppp.log | ||
Line 369: | Line 308: | ||
261 36732 MASQUERADE | 261 36732 MASQUERADE | ||
</ | </ | ||
+ | |||
+ | ===== Connecting a Client ===== | ||
+ | * Everything is now set up and ready for the first client to connect. | ||
+ | * We will use OpenWrt with the following /// | ||
+ | * The PPPoE username is '' | ||
+ | <code bash> | ||
+ | |||
+ | config interface ' | ||
+ | option device ' | ||
+ | option proto ' | ||
+ | option ipaddr ' | ||
+ | option netmask ' | ||
+ | |||
+ | config device | ||
+ | option name ' | ||
+ | option type ' | ||
+ | list ports ' | ||
+ | |||
+ | config interface ' | ||
+ | option device ' | ||
+ | option proto ' | ||
+ | option username ' | ||
+ | option password ' | ||
+ | </ | ||
+ | * This device has to be connected to the **same network** (broadcast domain) where our Accel-ppp server is running in order for the network packets to reach the PPPoE server. | ||
+ | |||
+ | ===== Checking The Log File ===== | ||
+ | * The Accel-ppp log file will give us more feedback when a client connects. | ||
+ | * Run the following command | ||
+ | < | ||
+ | sudo tail -f / | ||
+ | </ | ||
+ | * Here is the output we got | ||
+ | < | ||
+ | [2023-10-15 02: | ||
+ | [2023-10-15 02: | ||
+ | [2023-10-15 02: | ||
+ | [2023-10-15 02: | ||
+ | [2023-10-15 02: | ||
+ | [2023-10-15 02: | ||
+ | [2023-10-15 02: | ||
+ | |||
+ | </ | ||
+ | |||
+ | ===== Using accel-cmd ===== | ||
+ | * You can get more information on the current running instance of Accel-ppp by using the accel-cmd program. | ||
+ | < | ||
+ | accel-cmd show stat | ||
+ | </ | ||
+ | * Results in the following in our case | ||
+ | < | ||
+ | accel-cmd show stat | ||
+ | uptime: 0.08:17:34 | ||
+ | cpu: 0% | ||
+ | mem(rss/ | ||
+ | core: | ||
+ | mempool_allocated: | ||
+ | mempool_available: | ||
+ | thread_count: | ||
+ | thread_active: | ||
+ | context_count: | ||
+ | context_sleeping: | ||
+ | context_pending: | ||
+ | md_handler_count: | ||
+ | md_handler_pending: | ||
+ | timer_count: | ||
+ | timer_pending: | ||
+ | sessions: | ||
+ | starting: 0 | ||
+ | active: 1 | ||
+ | finishing: 0 | ||
+ | pppoe: | ||
+ | starting: 0 | ||
+ | active: 1 | ||
+ | delayed PADO: 0 | ||
+ | recv PADI: 4 | ||
+ | drop PADI: 0 | ||
+ | sent PADO: 4 | ||
+ | recv PADR(dup): 4(0) | ||
+ | sent PADS: 4 | ||
+ | filtered: 0 | ||
+ | radius(1, 164.160.89.129): | ||
+ | state: active | ||
+ | fail count: 0 | ||
+ | request count: 0 | ||
+ | queue length: 0 | ||
+ | auth sent: 4 | ||
+ | auth lost(total/ | ||
+ | auth avg query time(5m/ | ||
+ | acct sent: 7 | ||
+ | acct lost(total/ | ||
+ | acct avg query time(5m/ | ||
+ | interim sent: 254 | ||
+ | interim lost(total/ | ||
+ | interim avg query time(5m/ | ||
+ | |||
+ | </ | ||
+ | * To see the current active sessions | ||
+ | < | ||
+ | accel-cmd show sessions | ||
+ | </ | ||
+ | * Result in the following: | ||
+ | < | ||
+ | | ||
+ | --------+----------+-------------------+-------------+------------+-------+------+--------+---------- | ||
+ | | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||