/
Event-Driven CPE Configuration with ONEOS script
Event-Driven CPE Configuration with ONEOS script
|
|
---|---|
|
|
Add DHCP | countdown : only once after 30sec?? watchdog: every 30sec |
| jlksite2#show running-config event
event manager applet addDHCP
event timer countdown time 30
action 1.0 cli "config t"
action 1.1 cli "interface giga 0/0"
action 1.2 cli "ip add dhcp"
action 1.3 cli exit
action 1.4 cli exit
action 1.5 cli "save runn"
exit
|
| load |
| event manager applet ONBOOT
event timer countdown time 60
action 1.0 puts "*** Getting S/N ***"
action 2.0 cli "show system status | include S/N"
action 2.2 regexp "S\/N ([A-Za-z0-9]+)" $_cli_result match SN
action 2.4 puts "*** S/N = $SN ***"
action 2.6 puts "*** Getting Certificates for $SN ***"
action 3.0 cli "copy https://<username>:<password>@repo.aellis.net/repository/HomeLab/Certs/$SN.p12 /security/sdwan.p12"
action 3.1 cli "copy https://<username>:<password>@repo.aellis.net/repository/HomeLab/Certs/newkey_rsa_1.pub /security/ssh/sdwan_rsa.pub"
action 4.0 puts "*** Enrolling Certificates ***"
action 4.2 cli "crypto pki enroll TP_sign_device"
action 4.4 cli "crypto pki enroll TP_verify_sdwan"
action 5.0 puts "*** Configuring SSH ***"
action 5.2 cli "configure terminal"
action 6.0 cli "username uccallhome password ekinops123 15 encrypted 0 type 2"
action 6.2 cli "ip ssh authorized-key uccallhome /security/ssh/sdwan_rsa.pub"
action 6.4 cli "ip ssh auth-method automatic"
action 7.0 puts "*** Removing ONBOOT EEM ***"
action 7.2 cli "no event manager applet ONBOOT"
action 7.4 cli end
action 8.0 puts "*** Saving Configuration ***"
action 8.2 cli "save running-config"
action 9.0 puts "*** Getting latest application database ***"
action 9.1 cli "copy https://<username>:<password>@repo.aellis.net/repository/HomeLab/ApplicationDatabase/saas_apps_ekinops_ascii_v250.json saas_apps.json"
action 9.2 cli "tic saas database install saas_apps.json"
action 9.3 puts "*** Completed ***
end |
|
|
|
|
|
|
|
|
, multiple selections available,
Related content
netconfig config and display
netconfig config and display
More like this
track ip route
track ip route
Read with this
dhcp.template contrail 3.2
dhcp.template contrail 3.2
More like this
OneOS6-LIM Basic config ssh callhome
OneOS6-LIM Basic config ssh callhome
More like this
schedule download of signature
schedule download of signature
More like this
3- event script: ping an IP@ every 60sec
3- event script: ping an IP@ every 60sec
More like this