Creating dhcp client after new interface seems to fail.
Posted: Wed Jan 18, 2017 3:55 pm
Hi
I've been working on a script that does the following:
1) create a new virtual interface
2) create a new ip dhcp client for that interface.
Now, my script works up until the point of creating the dhcp client.
For some reason it is not being created, I think it has to do with the fact that I create the dhcp client to fast after creating the interface.
Anyone have a possible solution for this issue?
Thanks!
I've been working on a script that does the following:
1) create a new virtual interface
2) create a new ip dhcp client for that interface.
Now, my script works up until the point of creating the dhcp client.
For some reason it is not being created, I think it has to do with the fact that I create the dhcp client to fast after creating the interface.
Anyone have a possible solution for this issue?
Thanks!
Code: Select all
:global SSID "Test";
:global AmountOfClients 5;
:global SecurityProfile "TNDefault";
:global MasterInterface "wlan1";
:global VirtualClientPrefix ("virt-" . $MasterInterface . "-");
#ONLY CHANGE VARIABLES ABOVE THIS LINE
:for i from=1 to=$AmountOfClients step=1 do={
#create new 2.4GHz virtual client
/interface wireless add master-interface=$MasterInterface mode=station security-profile=$SecurityProfile ssid=$SSID name=($VirtualClientPrefix . $i);
#create DHCP client for virtual client
/ip dhcp-client add interface=($VirtualClientPrefix . $i) disabled=no;
}