Difference between revisions of "NOC:ctwug global settings"
From CTWUG Wiki
Bigmikedavis (talk | contribs) (New page: == Purpose == == Dependencies == == Script == == WMS == Wug Management System) |
(→Script) |
||
Line 4: | Line 4: | ||
== Script == | == Script == | ||
+ | #/ip dns set allow-remote-requests=yes primary-dns=172.18.1.1 | ||
+ | /system clock set time-zone-name=Africa/Johannesburg | ||
+ | /system ntp client set enabled=yes mode=unicast primary-ntp=172.18.1.1 | ||
+ | /snmp set enabled=yes | ||
+ | /ip firewall connection tracking set enabled=yes | ||
+ | /radius | ||
+ | :local id | ||
+ | :local fto 00:00:02 | ||
+ | :local fadd 172.18.0.1 | ||
+ | :local ffound 0 | ||
+ | :foreach id in [find comment=CTWUG] do={ | ||
+ | :if ( [get $id timeout] != $fto ) do=[set $id timeout=$fto] | ||
+ | :if ( [get $id address] != $fadd ) do=[set $id address=$fadd] | ||
+ | set $id comment=CTWUG | ||
+ | :set ffound 1 | ||
+ | } | ||
+ | :if ($ffound = 0) do={ | ||
+ | :foreach id in [find] do={ | ||
+ | :if ( [get $id timeout] != $fto ) do=[set $id timeout=$fto] | ||
+ | :if ( [get $id address] != $fadd ) do=[set $id address=$fadd] | ||
+ | set $id comment=CTWUG | ||
+ | } | ||
+ | } | ||
+ | /system script | ||
+ | :local fs | ||
+ | :foreach fs in [find] do={ | ||
+ | :if ( [:pick [get $fs name] 0 10] = "ctwug_mpls" ) do=[remove $fs] | ||
+ | :if ( [:pick [get $fs name] 0 13] = "ctwug_netflow" ) do=[remove $fs] | ||
+ | } | ||
+ | :if [/ip traffic-flow get enabled] do={ | ||
+ | /log info ("disabling netflows") | ||
+ | /ip traffic-flow set enabled=no | ||
+ | } | ||
== WMS == | == WMS == | ||
[[Wug Management System]] | [[Wug Management System]] |
Revision as of 11:24, 7 November 2012
Contents
Purpose
Dependencies
Script
#/ip dns set allow-remote-requests=yes primary-dns=172.18.1.1 /system clock set time-zone-name=Africa/Johannesburg /system ntp client set enabled=yes mode=unicast primary-ntp=172.18.1.1 /snmp set enabled=yes /ip firewall connection tracking set enabled=yes /radius :local id :local fto 00:00:02 :local fadd 172.18.0.1 :local ffound 0 :foreach id in [find comment=CTWUG] do={ :if ( [get $id timeout] != $fto ) do=[set $id timeout=$fto] :if ( [get $id address] != $fadd ) do=[set $id address=$fadd] set $id comment=CTWUG :set ffound 1 } :if ($ffound = 0) do={ :foreach id in [find] do={ :if ( [get $id timeout] != $fto ) do=[set $id timeout=$fto] :if ( [get $id address] != $fadd ) do=[set $id address=$fadd] set $id comment=CTWUG } } /system script :local fs :foreach fs in [find] do={ :if ( [:pick [get $fs name] 0 10] = "ctwug_mpls" ) do=[remove $fs] :if ( [:pick [get $fs name] 0 13] = "ctwug_netflow" ) do=[remove $fs] } :if [/ip traffic-flow get enabled] do={ /log info ("disabling netflows") /ip traffic-flow set enabled=no }