ppp interfaces in network namespace

Questions related to general functionality
Post Reply
proca
Posts: 7
Joined: 07 Dec 2018, 17:24

ppp interfaces in network namespace

Post by proca » 19 May 2020, 16:24

Dear members,

First of all I want to express my gratitude for the accel-ppp team for creating a great product.
My servers peaked 2500 pppoe users and 3Gbps in+out on a single 1x10G X710 intel card running on pcie 2.0 port.

I'm experimenting with the idea of having pppoe users redirected to a portal in certain scenarios so we can present messages to them.
iptables would be one way to go about it but I was seeing netns supported also.

My question: is there any way that I can tell accel-ppp to bring up a certain ppp interface inside a netns ?
This way I could change the default gateway inside that specific netns and route the user to a captive portal.

Thanks.

proca
Posts: 7
Joined: 07 Dec 2018, 17:24

Re: ppp interfaces in network namespace

Post by proca » 19 May 2020, 18:15

I managed to do this via ip-up scripts so far and it seems to work. I can run a sql query in the ip-up to dertermine where the user should go. would have liked a radius option though, less stress on the db.

I do see one warning message in the accel-ppp.log:
warn: ppp0: failed to get interface statistics

I presume since the interface is in another namespace we cannot get stats, so accounting does not work:
<Acct-Session-Time 1615> <Acct-Input-Octets 0> <Acct-Output-Octets 0> <Acct-Input-Packets 0> <Acct-Output-Packets 0> <Acct-Input-Gigawords 0> <Acct-Output-Gigawords 0>

can i trigger a disable for the interface statistics of a specific ppp interface so i get rid of the error ?

dimka88
Posts: 703
Joined: 13 Oct 2014, 05:51
Contact:

Re: ppp interfaces in network namespace

Post by dimka88 » 21 May 2020, 06:19

Hi, do you use `NAS-Port-Id=ns/` or pppd_compat(ip-up) script?
viewtopic.php?f=4&t=670

proca
Posts: 7
Joined: 07 Dec 2018, 17:24

Re: ppp interfaces in network namespace

Post by proca » 29 May 2020, 12:04

hi,

I've successfully used pppd_compat but this creates a small strain on the database as another sql query inside the ip-up script is needed to determine the routing table.
How can I use NAS-Port-Id=ns/ ? this atribute is used in the access-request and accounting.

I would need to get the NS as I get the framedipaddress for example.

Thanks

dimka88
Posts: 703
Joined: 13 Oct 2014, 05:51
Contact:

Re: ppp interfaces in network namespace

Post by dimka88 » 29 May 2020, 18:30

Hi, you need just send `NAS-Port-Id=<name space>/ ` in Access-Accept, This is all

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests