Oh wait, duh.  You're using dhcp-server network.  Your network should be
192.168.1.0/24 not 192.168.1.1/24 (it's the network, not the IP).


Josh Luthman
Office: 937-552-2340
Direct: 937-552-2343
1100 Wayne St
Suite 1337
Troy, OH 45373


On Tue, Jul 8, 2014 at 6:56 PM, Josh Luthman <[email protected]>
wrote:

> You don't use netmask=$LANSubnet in /ip addr
>
> The variable becomes irrelevant, too
>
>
> Josh Luthman
> Office: 937-552-2340
> Direct: 937-552-2343
> 1100 Wayne St
> Suite 1337
> Troy, OH 45373
>
>
> On Tue, Jul 8, 2014 at 6:53 PM, Paul McCall <[email protected]> wrote:
>
>> I am writing a script to configure customer CPE (Tiks) and this is my
>> first time using variables.  Almost all of the script is working as
>> expected, with a couple exceptions
>>
>> I have these variables defined...
>>
>> :global LANAddress  192.168.1.1/24
>> :global LANSubnet 24
>> :global LANGateway 192.168.1.1
>>
>> And this is part of the script that fails.... I get "invalid network"
>> when I use any of the  variables in this section.  I don't understand why
>>
>> /ip dhcp-server network
>> add address=$LANAddress dns-server=4.2.2.2,4.2.2.3 \
>> domain=yourdomain.net gateway=$LANGateway netmask=$LANSubnet
>>
>> 2nd part of the "problem" is building or concatenating strings to a new
>> variable.
>>
>> For Instance if I wanted to "build" the LANAddress (192.168.1.1/24) from
>> the LANGateway (192.168.1.1) and add a "/" then add the LANSubnet (24) I
>> cant seem to figure it out.
>>
>> I was thinking something like this, but it doesn't work:
>> :global COMBINEDVAR $ LANGateway . $ LANSubnet
>>
>> Any suggestions  on these two "issues" ?
>>
>>
>>
>> Paul McCall, Pres.
>> PDMNet / Florida Broadband
>> 658 Old Dixie Highway
>> Vero Beach, FL 32962
>> 772-564-6800 office
>> 772-473-0352 cell
>> www.pdmnet.com<http://www.pdmnet.com/>
>> [email protected]<mailto:[email protected]>
>>
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <
>> http://mail.butchevans.com/pipermail/mikrotik/attachments/20140708/978b3f11/attachment.html
>> >
>> _______________________________________________
>> Mikrotik mailing list
>> [email protected]
>> http://mail.butchevans.com/mailman/listinfo/mikrotik
>>
>> Visit http://blog.butchevans.com/ for tutorials related to Mikrotik
>> RouterOS
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.butchevans.com/pipermail/mikrotik/attachments/20140708/a8f11175/attachment.html>
_______________________________________________
Mikrotik mailing list
[email protected]
http://mail.butchevans.com/mailman/listinfo/mikrotik

Visit http://blog.butchevans.com/ for tutorials related to Mikrotik RouterOS

Reply via email to