RADIUSdesk

logo

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
technical:ppp-pppoe-basic [2023/10/15 04:43]
admin
technical:ppp-pppoe-basic [2023/10/15 06:56] (current)
admin [Connecting a Client]
Line 39: Line 39:
 mtu=1400 mtu=1400
 mru=1400 mru=1400
-#accomp=deny 
-#pcomp=deny 
-#ccp=0 
-#mppe=require 
 ipv4=require ipv4=require
 ipv6=deny ipv6=deny
Line 49: Line 45:
 ipv6-accept-peer-intf-id=1 ipv6-accept-peer-intf-id=1
 lcp-echo-interval=20 lcp-echo-interval=20
-#lcp-echo-failure=3 
 lcp-echo-timeout=120 lcp-echo-timeout=120
 unit-cache=1 unit-cache=1
-#unit-preallocate=1 
  
 [pppoe] [pppoe]
 verbose=1 verbose=1
-#ac-name=xxx 
-#service-name=yyy 
-#pado-delay=0 
-#pado-delay=0,100:100,200:200,-1:500 
 called-sid=mac called-sid=mac
-#tr101=1 
-#padi-limit=0 
-#ip-pool=pppoe 
-#ipv6-pool=pppoe 
-#ipv6-pool-delegate=pppoe 
-#ifname=pppoe%d 
-#sid-uppercase=0 
-#vlan-mon=eth0,10-200 
-#vlan-timeout=60 
-#vlan-name=%I.%N 
-#interface=eth1,padi-limit=1000 
 interface=enp0s3 interface=enp0s3
  
Line 87: Line 66:
 dae-server=127.0.0.1:3799,testing123 dae-server=127.0.0.1:3799,testing123
 verbose=1 verbose=1
-#timeout=3 
-#max-try=3 
-#acct-timeout=120 
-#acct-delay-time=0 
-#acct-delay-start=0 
-#acct-on=0 
-acct-interim-interval=120 
-#acct-interim-jitter=0 
-#default-realm= 
-#strip-realm=0 
-#attr-tunnel-type=My-Tunnel-Type 
-#nas-port-id-in-req=1 
  
 [client-ip-range] [client-ip-range]
Line 106: Line 73:
 [ip-pool] [ip-pool]
 gw-ip-address=192.168.0.1 gw-ip-address=192.168.0.1
-#vendor=Cisco 
-##attr=Cisco-AVPair 
 attr=Framed-Pool attr=Framed-Pool
 192.168.0.2-255 192.168.0.2-255
Line 120: Line 85:
 log-emerg=/var/log/accel-ppp/emerg.log log-emerg=/var/log/accel-ppp/emerg.log
 log-fail-file=/var/log/accel-ppp/auth-fail.log log-fail-file=/var/log/accel-ppp/auth-fail.log
-#log-debug=/dev/stdout 
-#syslog=accel-pppd,daemon 
-#log-tcp=127.0.0.1:3000 
 copy=1 copy=1
-#color=1 
-#per-user-dir=per_user 
-#per-session-dir=per_session 
-#per-session=1 
 level=3 level=3
  
Line 133: Line 91:
 vendor=Mikrotik vendor=Mikrotik
 attr=Mikrotik-Rate-Limit attr=Mikrotik-Rate-Limit
-#rate-multiplier=10000 
-#attr=Filter-Id 
-#down-burst-factor=0.1 
-#up-burst-factor=1.0 
-#latency=50 
-#mpu=0 
-#mtu=0 
-#r2q=10 
-#quantum=1500 
-#moderate-quantum=1 
-#cburst=1534 
-#ifb=ifb0 
 up-limiter=police up-limiter=police
 down-limiter=tbf down-limiter=tbf
-#leaf-qdisc=sfq perturb 10 
-#leaf-qdisc=fq_codel [limit PACKETS] [flows NUMBER] [target TIME] [interval TIME] [quantum BYTES] [[no]ecn] 
-#rate-multiplier=1 
-#fwmark=1 
-#rate-limit=2048/1024 
-#attr-down=PPPD-Downstream-Speed-Limit 
-#attr-up=PPPD-Upstream-Speed-Limit 
 verbose=1 verbose=1
  
Line 160: Line 99:
 telnet=127.0.0.1:2000 telnet=127.0.0.1:2000
 tcp=127.0.0.1:2001 tcp=127.0.0.1:2001
-#password=123 
-#sessions-columns=ifname,username,ip,ip6,ip6-dp,type,state,uptime,uptime-raw,calling-sid,called-sid,sid,comp,inbound-if,service-name,rx-bytes,tx-bytes,rx-bytes-raw,tx-bytes-raw,rx-pkts,tx-pkts,netns,vrf 
  
 </file> </file>
Line 395: Line 332:
         option password 'testing123'         option password 'testing123'
 </code> </code>
-  * This device is connected onto the same network (broadcast domain) where our Accel-ppp server is running so the network packets will reach the PPPoE server.+  * 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 
 +<code> 
 +sudo tail -f /var/log/accel-ppp/accel-ppp.log  
 +</code> 
 +  * Here is the output we got 
 +<code> 
 +[2023-10-15 02:53:26]:  info: enp0s8: send [RADIUS(1) Access-Request id=1 <User-Name "dirk"> <NAS-Identifier "accel-ppp"> <NAS-Port-Type Virtual> <Service-Type Framed-User> <Framed-Protocol PPP> <Calling-Station-Id "c4:4b:d1:00:97:49"> <Called-Station-Id "08:00:27:08:25:67"> <User-Password 0xa8b2cc499a76d411bc05892369653482>
 +[2023-10-15 02:53:26]:  info: enp0s8: recv [RADIUS(1) Access-Accept id=1 <Framed-Pool "pool1"> <Framed-Protocol PPP> <Mikrotik-Rate-Limit "512k/512k 1024k/1024k 1024k/1024k 100/100"> <Framed-Compression Van-Jacobson-TCP-IP> <Vendor-Specific 0x0000372a080600000200> <Vendor-Specific 0x0000372a070600000200>
 +[2023-10-15 02:53:26]:  info: ppp1: connect: ppp1 <--> pppoe(c4:4b:d1:00:97:49) 
 +[2023-10-15 02:53:26]:  info: ppp1: dirk: authentication succeeded 
 +[2023-10-15 02:53:26]:  warn: ppp1: IPV6CP: discarding packet 
 +[2023-10-15 02:53:26]:  info: ppp1: send [RADIUS(1) Accounting-Request id=1 <User-Name "dirk"> <NAS-Identifier "accel-ppp"> <NAS-Port 1> <NAS-Port-Id "ppp1"> <NAS-Port-Type Virtual> <Service-Type Framed-User> <Framed-Protocol PPP> <Calling-Station-Id "c4:4b:d1:00:97:49"> <Called-Station-Id "08:00:27:08:25:67"> <Acct-Status-Type Start> <Acct-Authentic RADIUS> <Acct-Session-Id "f2119cecef0b3356"> <Acct-Session-Time 0> <Acct-Input-Octets 0> <Acct-Output-Octets 0> <Acct-Input-Packets 0> <Acct-Output-Packets 0> <Acct-Input-Gigawords 0> <Acct-Output-Gigawords 0> <Framed-IP-Address 192.168.1.3>
 +[2023-10-15 02:53:26]:  info: ppp1: recv [RADIUS(1) Accounting-Response id=1] 
 + 
 +</code> 
 + 
 +===== Using accel-cmd ===== 
 +  * You can get more information on the current running instance of Accel-ppp by using the accel-cmd program. 
 +<code> 
 +accel-cmd show stat 
 +</code> 
 +  * Results in the following in our case 
 +<code> 
 +accel-cmd show stat 
 +uptime: 0.08:17:34 
 +cpu: 0% 
 +mem(rss/virt): 5240/244536 kB 
 +core: 
 +  mempool_allocated: 177084 
 +  mempool_available: 165700 
 +  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/5m/1m): 0/0/0 
 +  auth avg query time(5m/1m): 0/0 ms 
 +  acct sent: 7 
 +  acct lost(total/5m/1m): 0/0/0 
 +  acct avg query time(5m/1m): 0/0 ms 
 +  interim sent: 254 
 +  interim lost(total/5m/1m): 6/0/0 
 +  interim avg query time(5m/1m): 59/0 ms 
 + 
 +</code> 
 +  * To see the current active sessions 
 +<code> 
 +accel-cmd show sessions 
 +</code> 
 +  * Result in the following: 
 +<code> 
 + ifname | username |    calling-sid    |     ip      | rate-limit | type  | comp | state  |  uptime   
 +--------+----------+-------------------+-------------+------------+-------+------+--------+---------- 
 + ppp0   | dirk     | c4:4b:d1:00:97:49 | 192.168.1.4 | 512/512    | pppoe |      | active | 00:48:53  
 + 
 +</code> 
 + 
 + 
 +