Hello, I was wondering if it was possible to add static DHCP addresses via a script//ssh, I did a little digging and i can’t seem to find enough infomation on it.
Thanks!
Hello, I was wondering if it was possible to add static DHCP addresses via a script//ssh, I did a little digging and i can’t seem to find enough infomation on it.
Thanks!
Yes, that’s possible. You’d run the same commands you’d run from an interactive session, both in an automated SSH session as well as a script. The only difference between scripts and interactive sessions is that it’s preferred to use ‘find’ commands to get references to entries that you manipulate, rather than referring to the numeric indices used usually in interactive sessions.
Thanks for the reply.
Im using winbox to configure the Router Board, i have about 50 mac addresses i need to put in as static, I might even be asking for the wrong thing, or asking the wrong way.. what I need to know is the commands i need to add 1 static IP from the SSH console and I can take it from there on the rest, and just copy/paste them in.
/ip dhcp-server lease add address=1.2.3.4 mac-address=aa:bb:cc:dd:ee:ff server=name_of_dhcp_server_instance disabled=no
Thanks!
Karma given.