Hi
I have vrrp setup with transition scripts for enabling and disabling pppoe interface. Looks like configuration is working correctly but after transition i need to connect to primary firewall and disconnect and connect pppoe interface. Is there any way how to automate disconnect and connect ? I tried sleep in same up transition script and then call disconnect and connect but looks like this is not working.
Thanks for help
tjh
April 5, 2024, 9:41pm
2
I used to have this working fine back on Vyos 1.2 with transition scripts.
Please share your Vyos version and the scripts you’re using
Hi here are my scripts.
VyOS version on both firewalls : VyOS 1.5-rolling-202403120022
up.sh
#!/bin/vbash
if [ "$(id -g -n)" != 'vyattacfg' ] ; then
exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@"
fi
source /opt/vyatta/etc/functions/script-template
configure
delete interfaces wireguard wg0 disable
delete interfaces pppoe pppoe0 disable
commit
save
sleep 10
disconnect interface pppoe0
connect interface pppoe0
sleep 30
disconnect interface pppoe0
connect interface pppoe0
exit
down.sh
#!/bin/vbash
if [ "$(id -g -n)" != 'vyattacfg' ] ; then
exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@"
fi
source /opt/vyatta/etc/functions/script-template
configure
set interfaces wireguard wg0 disable
set interfaces pppoe pppoe0 disable
commit
exit
Bailey
April 9, 2024, 1:35pm
4
down.sh link to read here >
#!/bin/vbash
if [ "$(id -g -n)" != 'vyattacfg' ] ; then
exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@"
fi
source /opt/vyatta/etc/functions/script-template
configure
set interfaces wireguard wg0 disable
set interfaces pppoe pppoe0 disable
commit
exit
You might want to try using the sleep command after disconnecting interface pppoe0 instead of doing it before reconnecting.
Ok my bad working script.
#!/bin/vbash
if [ "$(id -g -n)" != 'vyattacfg' ] ; then
exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@"
fi
source /opt/vyatta/etc/functions/script-template
configure
delete interfaces wireguard wg0 disable
delete interfaces pppoe pppoe0 disable
commit
save
sleep 15
run disconnect interface pppoe0
sleep 5
run connect interface pppoe0
exit
system
Closed
May 9, 2024, 11:16pm
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.