-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
accel-ppp: T5688: Standardized pool configuration in accel-ppp #2501
Conversation
25ab253
to
bf86c11
Compare
bf86c11
to
75fd367
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea but I pointed out a few things that can be improved.
</valueHelp> | ||
<valueHelp> | ||
<format>ipv4range</format> | ||
<description>IPv4 address range inside /24 network</description> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
accel-ppp disallows larger ranges?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. I took it from their manual
x.x.x.x/mask[,name=pool_name][,next=next_pool_name] or x.x.x.x-y[,name=pool_name][,next=next_pool_name]
Also specifies range of remote address of ppp interfaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you link me to the relevant section? The part you quote doesn't say anything about /24 specifically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://docs.accel-ppp.org/configuration/ip-pool.html
But these docs are with old info. The latest docs are in manuals from sources of accel-ppp
<description>Name of IP pool</description> | ||
</valueHelp> | ||
<constraint> | ||
<regex>[-_a-zA-Z0-9.]+</regex> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't remember if accel-ppp has constraints on pool names, but this regex feels too lax, e.g., it allows ...
or -._.-
as valid pool names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have just copied it from
https://github.com/vyos/vyos-1x/blob/current/interface-definitions/include/accel-ppp/client-ip-pool-name.xml.i
to proceed with compatibility.
<description>Default Gateway, mask send to the client</description> | ||
</valueHelp> | ||
<constraint> | ||
<validator name="ipv4-prefix"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really allow network addresses like 192.0.2.0/25
as gateway addresses? Technically, in peer-to-peer networks, it may work, but I'd like to clarify that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accel-PPP allows it. I have checked it on ipoe and it works.
set service ipoe-server authentication mode 'noauth'
set service ipoe-server client-ip-pool TEST range '10.0.0.3-10.0.0.7'
set service ipoe-server gateway-address '10.0.0.0/25'
On client side:
PC2> ip dhcp
DORA IP 10.0.0.3/25 GW 10.0.0.0
PC2> show ip
NAME : PC2[1]
IP/MASK : 10.0.0.3/25
GATEWAY : 10.0.0.0
DNS :
DHCP SERVER : 10.0.0.0
DHCP LEASE : 595, 600/300/525
MAC : 00:50:79:66:68:01
LPORT : 20025
RHOST:PORT : 127.0.0.1:20026
MTU : 1500
PC2> ping 1.1.1.1
84 bytes from 1.1.1.1 icmp_seq=1 ttl=64 time=0.833 ms
84 bytes from 1.1.1.1 icmp_seq=2 ttl=64 time=1.421 ms
I think it is a network engineer's responsibility to set a proper IP address.
@@ -0,0 +1,59 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe I should add range option to ipaddrcheck
. I'll look into it, if it takes a while, we can merge this first, then replace the validator part.
75fd367
to
ab2fb4b
Compare
ab2fb4b
to
4c0bd3b
Compare
def test_accel_name_servers(self): | ||
self.basic_config() | ||
self.cli_commit() | ||
self.assertTrue(True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whats the usecase of a smoketest asserting True all the time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have changed to skip this test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have created test.
def test_accel_local_authentication(self): | ||
self.basic_config() | ||
self.cli_commit() | ||
self.assertTrue(True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whats the usecase of a smoketest asserting True all the time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have changed to skip this test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have created test.
def test_accel_name_servers(self): | ||
self.basic_config() | ||
self.cli_commit() | ||
self.assertTrue(True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whats the usecase of a smoketest asserting True all the time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have changed to skip this test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have created test.
4c0bd3b
to
a5ca24a
Compare
Standardized pool configuration for all accel-ppp services. 1. Only named pools are used now. 2. Allows all services to use range in x.x.x.x/mask and x.x.x.x-x.x.x.y format 3. next-pool can be used in all services 2. Allows to use in ipoe gw-ip-address without pool configuration which allows to use Fraimed-IP-Address attribute by radius. 3. Default pool name should be explicidly configured with default-pool. 4. In ipoe netmask and range subnet can be different.
a5ca24a
to
422eb46
Compare
@Mergifyio backport sagitta |
✅ Backports have been created
|
Change Summary
Standardized pool configuration for all accel-ppp services.
Types of changes
Related Task(s)
Related PR(s)
Component(s) name
l2tp, sstp, pptp, pppoe, ipoe
Proposed changes
Standardized pool configuration for all accel-ppp services.
New cli to configure client-ip-pool
For l2tp, sstp, pptp, pppoe:
For example:
For ipoe:
Allows multiple gateway-address
For example:
Smoketests were added
Migration scripts were added
How to test
Smoketest result
Checklist: