/ ip dhcp-server option
add name="TFTP" code=66 value="10.120.10.10"
/ ip dhcp-server network
add address=10.120.21.0/24 gateway=10.120.21.1 netmask=24 \
dns-server=206.246.134.233,10.120.10.10 wins-server=10.120.10.10 \
ntp-server=206.246.134.2,206.246.134.66,206.246.134.1 domain="asc.local" \
dhcp-option=TFTP comment=""
Is it cirrect ???Code: Select all/ ip dhcp-server option add name[color=#FF0000]="TFTP"[/color] code=66 value="10.120.10.10" / ip dhcp-server network add address=10.120.21.0/24 gateway=10.120.21.1 netmask=24 \ dns-server=206.246.134.233,10.120.10.10 wins-server=10.120.10.10 \ ntp-server=206.246.134.2,206.246.134.66,206.246.134.1 domain="asc.local" \ [color=#FF0000]dhcp-option=TFTP comment="" [/color]
/ ip dhcp-server option
add name="option-242" code=242 value="MCIPADD=192.168.1.254,MCPORT=1719,HTTPSRVR=192.168.1.253"
/ ip dhcp-server network
add [insert your dhcp values here followed by] dhcp-option=option-242
i want it too ...How about real examples?
I want to set dHCP to do two things:
1) to turn NETBOIS off on client and
2) to set specific static route (for example: to set default gateway 10.50.0.1 for network 10.50.0.0/16).
I've been searching for something that works for a long time, but all I get is bunch of documents that list DHCP parameters and no Mikrotik example how to use them
option space Microsoft;
option Microsoft.disable-netbios-over-tcpip code 1 = unsigned integer 32;
option Microsoft.release-on-shutdown code 2 = unsigned integer 32;
option Microsoft.default-router-metric code 3 = unsigned integer 32;
if substring(option vendor-class-identifier, 0, 4) = "MSFT" {
vendor-option-space Microsoft;
option Microsoft.disable-netbios-over-tcpip 2; # disable
option Microsoft.release-on-shutdown 1;
}
# for Windows Vista and other non Windows DHCP clients
option classless-static-route code 121 = array of unsigned integer 8;
# for Windows 2000 and XP DHCP clients
option classless-static-route-ms code 249 = array of unsigned integer 8;
subnet 192.168.0.0 netmask 255.255.255.0 {
option routers 192.168.0.1;
option domain-name-servers 192.168.0.1;
option classless-static-route 24,192,168,1, 192,168,1,1, 24,192,168,2, 192,168,2,1;
option classless-static-route-ms 24,192,168,1, 192,168,1,1, 24,192,168,2, 192,168,2,1;
}
I'm sure that this not work. I've tried to setup that a lot of times. After that I've create ticket and answer from MT wasfirst:then :Code: Select all/ ip dhcp-server option add name="option-242" code=242 value="MCIPADD=192.168.1.254,MCPORT=1719,HTTPSRVR=192.168.1.253"
Code: Select all/ ip dhcp-server network add [insert your dhcp values here followed by] dhcp-option=option-242
odd, because it is working for me. that code was copied directly out of a working dhcp server running on 2.9.38I'm sure that this not work. I've tried to setup that a lot of times. After that I've create ticket and answer from MT was...
Just for Info:That is because option 66 is clearly defined.
Option 242, on the other hand, is not clearly defined (reserved status).
Hello Marcel,
Yes, you are correct static route could be assigned with DHCP-option.
Currently DHCP-Option 121 is not supported by RouterOS DHCP server, but we have plans to add support for this DHCP-Option.
Regards,
Sergejs
Is the client receiving dhcp specifically requesting option 46?anyone got a answer from MT regarding the netbios disabling (option 46)
i wan to disable netbios so that my clients are not allowed to talk to each other
setting dhcp options to give a client doesn't guarantee the client won't manually set them on their computer. a firewall as changeip mentioned would be a much better way to go since you have 100% control of it.So if there is noway ?
i am trying to do this because i got lot of clients connected on my AP and they are sharing files using netbios. Because of this my AP bandwidth also get slower.
any idea how i can achieve this
|Mask|d1|...|dn|r1|r2|r3|r4|(?)|dr1|dr2|dr3|dr4|
Option: 121,249
chain components, dec: 28,172,16,184,0,10,100,1,254,0,10,100,0,1
hex chain: 0x1CAC10B8000A6401FE000A640001
# mar/02/2010 18:11:45 by RouterOS 4.5
# software id = H3LP-H3R3
#
/ip dhcp-server
add address-pool=pool1 authoritative=yes bootp-support=static \
disabled=no interface=ether3 lease-time=1d name=dhcp1
/ip dhcp-server option
add code=121 name=static-route value=0x1CAC10B8000A6401FE000A640001
add code=249 name=static-alternative value=0x1CAC10B8000A6401FE000A640001
/ip dhcp-server config
set store-leases-disk=5m
/ip dhcp-server network
add address=10.100.0.0/23 comment="" dhcp-option=\
static-alternative,static-route dns-server=172.16.184.132 domain=\
int.example.com gateway=10.100.0.1 wins-server=172.16.184.165
/ip dhcp-server option
add code=242 name=option-242 value="'MCIPADD=192.168.2.15,MCPORT=1719,HTTPSRVR=192.168.2.15,L2QVLAN=11'"
/ip dhcp-server option
add code=242 name=option-242 value="s'MCIPADD=192.168.2.15,MCPORT=1719,HTTPSRVR=192.168.2.15,L2QVLAN=11'"
Add the default route to the Option 121, this is how it is standardized (the client must ignore Option 3 if Option 121 is present). This is the reason why Microsoft has defined Option 249, the only difference between Option 121 and Option 249 is this behavior.does anyone know how to enforce the default route on the clients when pushing also a static route?
thanks a lot, this put some light to it.
Add the default route to the Option 121, this is how it is standardized (the client must ignore Option 3 if Option 121 is present). This is the reason why Microsoft has defined Option 249, the only difference between Option 121 and Option 249 is this behavior.
0x0000C0A80203180A0800C0A80266
Sorry, indeed the prefix length of 0 means that 0 bytes of prefix follow.In fact, it is 0x00C0A80203180A0800C0A80266