Hi, I try to add DHCP-Server option 252
RoS version 6.0rc13 on CCR1016-12G
/ip dhcp-server option add name=wpad code=252 value=http://192.168.0.235/wpad.dat
and get error “failure: Unknown data type!”
In RoS version 5.24 this option works fine.
Hi, I try to add DHCP-Server option 252
RoS version 6.0rc13 on CCR1016-12G
/ip dhcp-server option add name=wpad code=252 value=http://192.168.0.235/wpad.dat
and get error “failure: Unknown data type!”
In RoS version 5.24 this option works fine.
Look at this to se how to do it..
http://forum.mikrotik.com/t/dhcp-options-option-60-66-not-working/65046/1
You have to add " and ’ to the beginning and to the end of the string.
Like this
/ip dhcp-server option add name=wpad code=252 value="'http://192.168.0.235/wpad.dat'"
It works, thanks!
SOLVED.
if you are adding hex value, you can simply use
value=“0xaa0a0b0c”
when printing you will see raw value set to aa0a0b0c
if you want to add some text as a value for option use
value=“‘your text’”
result raw-value=796f75722074657874
if you add text and hex value in one value option use
value=“'your text’0xaa0a0b0c”
result raw-value=796f75722074657874aa0b0c0d
So, we have a client asking us this morning as well.
I need is option 156 set to:
FtpServers=10.230.11.51,country=1,launguage=1,Layer2Tagging=1,vlanid=111
Simply adding the ’ ’ on the ends of the string worked!
Thanks!
Brad
Hi,
Could someone in Mikrotik confirm if this is a bug or not. I have only seen this issue on latest ROS 6.18.
When I upgraded to 6.18 and started testing the DHCP option function. I use Option 43 on lots of sites (over 50) and it always works pretty well.
I have been / in the past entering it like this on ROS 6.1
/ip dhcp-server option add code=43 name=option43 value=“‘172.17.30.253’”
Correct Result:
/ip dhcp-server option> print
0 option43 43 ‘172.17.30.253’ 3137322e31372e33302e323533
However on ROS 6.18 when I use the same command
/ip dhcp-server option add code=43 name=option43 value=“‘172.17.30.253’”
Incorrect Result:
/ip dhcp-server option> print
0 option43 43 ‘172.17.30.253’ ac111efd
Obviously there is a difference in HEX values 3137322e31372e33302e323533 and ac111efd
My option 43 did not work as a result.
Fix: I entered the string value that I wanted as HEX using this website http://chxo.com/scripts/hex2string.php
/ip dhcp-server option add code=43 name=option43 value=0x3137322e31372e33302e323533
It Works
/ip dhcp-server option> print
0 option43 43 0x3137322e31372e33302e323533 3137322e31372e33302e323533
Mikrotik has updated the wiki on this.
It’s more clear now how to edit this.
Copy from the :Wiki
Parameter’s value.
Starting from v6.8 available data types for options are:
0xXXXX - hex string (works also in v5)
‘XXXXX’ - string (works also in v5 but without ’ ’ around the text)
$(XXXXX) - variable (currently there are no variables for server)
‘10.10.10.10’ - IP address
s’10.10.10.10’ - IP address converted to string
‘10’ - decimal number
s’10’ - decimal number converted to string
Now it is also possible to combine data types into one, for example: “0x01’vards’$(HOSTNAME)”
For example if HOSTNAME is ‘kvm’, then raw value will be 0x0176617264736b766d
Thanks.. Didn’t see the update on the wiki.
I can confirm that this works in ROS 6.18
/ip dhcp-server option add code=43 name=option43 value=“s’172.17.30.253’”
/ip dhcp-server option> print
0 option43 43 s’172.17.30.253’ 3137322e31372e33302e323533
Hello,
i need a little help with moving DHCP configuration (options) from ISC DHCP server to MikroTik. I have two separate vlans and subnets (one for untag and other for tagged traffic). Here is my configuration.
Global dhcpd.conf:
option space genexis;
option genexis.gaps code 1 = text;
option space vivso code width 4 length width 1;
option vivso.genexis code 25167 = encapsulate genexis;
option vivso.iana code 0 = string;
option op125 code 125 = encapsulate vivso;
class “drgos” {match if substring (option vendor-class-identifier, 0, 6) = “drgos-”;}
Untagged vlan.conf
option genexis.gaps = “m=0;v=10;s=IP ADDRESS;”;
option vivso.iana 01:01:01;
Tagged vlan.conf
option genexis.gaps = “m=0;v=10;s=IP ADDRESS;”;
option vivso.iana 01:01:01;
Thanks in advance!