# Script to set Ether1 for a Static IP address setstatic.rsc # Version 1.0.0 :local input do={:terminal style escaped; :put $1; :return;} :local ipaddrl [$input "Enter IP Address:"]; :local submaskl [$input "Enter Subnet Mask:"]; :local gatewayl [$input "Enter Default Gateway:"]; :local networkl ($ipaddrl & $submaskl); :put "Set Static IP" #setup Enets with Static Ip address #first we put on the static IP address used typed in values above. /ip address; remove [find comment~"Static Wan"]; add address="$ipaddrl/$submaskl" interface=ether1 network=$networkl disabled=no comment="Placeholder for Static Wan"; :put "Add Gateway"; #next we add the gateway that was typed in above /ip route; remove [find comment~"StaticRoute"]; /ip route add dst-address=0.0.0.0/0 gateway=$gatewayl comment="StaticRoute"; :put "Disable DHCP client"; #last we disable the DHCP client /ip dhcp-client; set [find comment~"defconf"] disabled=yes; :put "Script finished";