This commit is contained in:
CroneKorkN 2025-07-11 23:49:46 +02:00
parent e4e3c57f20
commit cca320e2f4
Signed by: cronekorkn
SSH key fingerprint: SHA256:v0410ZKfuO1QHdgKBsdQNF64xmTxOF8osF1LIqwTcVw
5 changed files with 27 additions and 3 deletions

View file

@ -126,6 +126,7 @@ def queuing_disciplines(metadata):
'Service': {
'Type': 'oneshot',
'ExecStart': f'/sbin/tc qdisc replace root dev {network_name} {network_conf["qdisc"]}',
'RemainAfterExit': 'yes',
},
'Install': {
'WantedBy': 'network-online.target',

View file

@ -6,5 +6,5 @@ persist
maxfail 0
lcp-echo-interval 20
lcp-echo-failure 3
plugin rp-pppoe.so enp2s0
plugin rp-pppoe.so ${interface}
user "${user}"

View file

@ -7,6 +7,7 @@ files = {
'content_type': 'mako',
'mode': '0644',
'context': {
'interface': node.metadata.get('pppoe/interface'),
'user': node.metadata.get('pppoe/user'),
},
'needs': {
@ -33,4 +34,9 @@ svc_systemd = {
'file:/etc/ppp/chap-secrets',
},
},
'qdisc-ppp0.service': {
'needs': {
'svc_systemd:pppoe-isp.service',
},
},
}

View file

@ -23,7 +23,21 @@ defaults = {
'RestartSec': 5,
},
},
'qdisc-ppp0.service': {
'Unit': {
'Description': 'setup queuing discipline for interface ppp0',
'After': 'sys-devices-virtual-net-ppp0.device',
'BindsTo': 'sys-devices-virtual-net-ppp0.device',
},
'Service': {
'Type': 'oneshot',
'ExecStart': '/sbin/tc qdisc replace root dev ppp0 cake bandwidth 30Mbit rtt 50ms diffserv4 nat egress',
'RemainAfterExit': 'yes',
},
'Install': {
'WantedBy': 'network-online.target',
},
}
},
},
}

View file

@ -29,7 +29,9 @@
'dhcp_server': True,
},
'external': {
'interface': 'enp2s0',
'type': 'vlan',
'vlan_interface': 'internal',
'id': 3,
'ipv4': '10.0.98.2/24',
#'qdisc': 'cake bandwidth 35Mbit diffserv4',
},
@ -60,6 +62,7 @@
'hostname': 'home.resolver.name',
},
'pppoe': {
'interface': 'external',
'user': '!decrypt:encrypt$gAAAAABocUfodLqCBKPPN7H9S64yJ7kRddtaWI0nQU2oklPMEjBhMsir4NL2yjkcHXAN-Ozqn6FCokyE1AL8ek3c5CqAvd83jkxZytp-oclrKqUD9uhUCy4=',
'secret': '!decrypt:encrypt$gAAAAABocUhmDqFZsyHYBIP2qdMFIS1eWT_bPdyv98cHzIgeKFAxDfcCrVJwDxVPFDDMa_7UT76HDJLvtdYQ8mFl2RL0yR8k2A=='
},