Page MenuHomeVyOS Platform

Radius attribute "Framed-Pool" for PPPoE
Closed, ResolvedPublicFEATURE REQUEST

Description

Very similar to https://phabricator.vyos.net/T2580 but for PPPoE instead of IPoE.

something like:

set service pppoe-server client-ip-pool name POOL1 subnet '192.0.2.0/24'

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Improvement (missing useful functionality)

Related Objects

Event Timeline

Could you send the full accel-ppp working configuration that you expect?

Sure.

/run/accel-pppd/pppoe.conf:

### generated by accel_pppoe.py ###
[modules]
log_syslog
pppoe
shaper
radius
ippool
auth_pap
auth_chap_md5
auth_mschap_v1
auth_mschap_v2


[core]
thread-count=1

[log]
syslog=accel-pppoe,daemon
copy=1
level=5


[client-ip-range]
disable

[ip-pool]
gw-ip-address=10.255.255.10
100.64.0.0/20,name=MYPOOL

[ipv6-nd]
AdvAutonomousFlag=1

[ipv6-pool]

[dns]
dns1=8.8.8.8

[ipv6-dns]


[radius]
verbose=1
server=172.31.255.2,57LncuYHW2Wk,auth-port=1812,acct-port=1813,req-limit=0,fail-time=0
acct-timeout=3
timeout=3
max-try=3
bind=172.31.255.1
gw-ip-address=10.255.255.10

[common]
single-session=deny

[ppp]
verbose=1
check-ip=1
ccp=0
unit-preallocate=0
min-mtu=1492
mppe=prefer
lcp-echo-interval=30
lcp-echo-timeout=0
lcp-echo-failure=3
mtu=1492

[pppoe]
verbose=1
ac-name=BNGTEST

interface=eth1

[cli]
tcp=127.0.0.1:2001

The actual behavior, the server receives eth1:: recv [RADIUS(1) Access-Accept id=1 <Mikrotik-Rate-Limit "500k/1000k 0/0 0/0 0/0 8 0/0"> <Framed-Pool "MYPOOL">], the client logs in, but does not receive any IP address:

vyos@BNG:~$ show pppoe-server sessions
ifname |  username   | ip | ip6 | ip6-dp |    calling-sid    | rate-limit | state |  uptime  | rx-bytes | tx-bytes
--------+-------------+----+-----+--------+-------------------+------------+-------+----------+----------+----------
 ppp0   | cliente0001 |    |     |        | 0c:f5:78:4e:00:00 |            | start | 00:00:01 | 14 B     | 0 B

Adding this to pppoe.conf solves the problem

[ip-pool]
100.64.0.0/20,name=MYPOOL
vyos@BNG:~$ show pppoe-server sessions
ifname |  username   |     ip     | ip6 | ip6-dp |    calling-sid    | rate-limit | state  |  uptime  | rx-bytes | tx-bytes
--------+-------------+------------+-----+--------+-------------------+------------+--------+----------+----------+----------
 ppp0   | cliente0001 | 100.64.0.0 |     |        | 0c:f5:78:4e:00:00 |            | active | 00:00:02 | 173 B    | 182 B
Viacheslav changed the task status from Open to In progress.Feb 6 2023, 1:28 PM
Viacheslav claimed this task.

@fernandolcx Will be present in the next rolling release, could you test it (after 20230209)?

set service pppoe-server client-ip-pool name POOL1 gateway-address '192.0.2.1'
set service pppoe-server client-ip-pool name POOL1 subnet '192.0.2.0/24'
Viacheslav changed the task status from In progress to Needs testing.Feb 9 2023, 8:18 AM
 service {
+    pppoe-server {
+        authentication {
+            mode radius
+            radius {
+                server 172.31.255.2 {
+                    key 123456
+                }
+            }
+        }
+        interface eth1 {
+        }
+    }
 }

when I commit, throws me:

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/service_pppoe-server.py", line 114, in <module>
    verify(c)
  File "/usr/libexec/vyos/conf_mode/service_pppoe-server.py", line 60, in verify
    verify_accel_ppp_base_service(pppoe)
  File "/usr/lib/python3/dist-packages/vyos/configverify.py", line 424, in verify_accel_ppp_base_service
    for _, v in config['client_ip_pool']['name'].items():
KeyError: 'client_ip_pool'

Everything just worked fine.

Just a small note: when commiting something like:

service {
    pppoe-server {
        authentication {
            mode radius
            radius {
                server 172.31.255.2 {
                    acct-port 1813
                    key 123456
                }
            }
        }
        client-ip-pool {
            name POOL_IPV4_PPPOE_BLOQUEADOS {
                gateway-address 10.255.255.1
                subnet 10.0.0.0/24
            }
            name POOL_IPV4_PPPOE_CGNAT {
                gateway-address 10.255.255.1
                subnet 100.64.0.0/20
            }
        }
        interface eth1 {
        }
    }
}

It warns me with Warning: No PPPoE client pool defined but I did.

The rest looks OK.

 service {
+    pppoe-server {
+        authentication {
+            mode radius
+            radius {
+                server 172.31.255.2 {
+                    key 123456
+                }
+            }
+        }
+        interface eth1 {
+        }
+    }
 }

when I commit, throws me:

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/service_pppoe-server.py", line 114, in <module>
    verify(c)
  File "/usr/libexec/vyos/conf_mode/service_pppoe-server.py", line 60, in verify
    verify_accel_ppp_base_service(pppoe)
  File "/usr/lib/python3/dist-packages/vyos/configverify.py", line 424, in verify_accel_ppp_base_service
    for _, v in config['client_ip_pool']['name'].items():
KeyError: 'client_ip_pool'

@fernandolcx you skipped option global option for gateway-address and don't use the gateway in the named pool. I'll take a look

set service pppoe-server gateway-address '192.0.2.1'
Viacheslav moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.