Community discussions

MikroTik App
 
Beelze
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Tue Mar 04, 2014 12:21 pm

RouterOS DHCP-client options

Fri May 23, 2014 12:28 pm

I installed an isc-dhcp-server on ubuntu dekstop 12.04 to provide DHCP information to a RB2011.
I want this dhcp server to provide the following information
- IP-address;
- tftp server name;
- bootfile name;
- hostname dhcp-server;

My /etc/dhcp/dhcpd.conf file:
subnet 192.168.1.0 netmask 255.255.255. 0 {
range 192.168.1.2 192.168.1.254;
option subnet-mask 255.255.255.0;
next-server 192.168.1.1;
#DHCP option 67
option bootfile-name "RouterOS.conf";
option host-name "192.168.1.1";
option tftp-server-name "192.168.1.1";
default-lease-time 86400;
max-lease-time 86400;
}
Capturing the DHCP ACK packet with wireshark on the DHCP interface shows the following information:
Message type: Boot Reply (2)
Hardware type: Ethernet
Hardware address length: 6
Hops: 0
Transaction ID: 0xd72f8ee1
Seconds elapsed: 2
Bootp flags: 0x8000 (Broadcast)
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 192.168.1.1 (192.168.1.2)
Next server IP address: 192.168.1.1 (192.168.1.1)
Relay agent IP address: 0.0.0.0 (0.0.0.0)
Client MAC address: Routerbo_bc:da:ae (00:0c:42:bc:da:ae)
Client hardware address padding: 000000000000000000
Server host name not given <----
Boot file name not given <----
Magic cookie: DHCP
Option: (t=53, l=1) DHCP Message Type = DHCP ACC
Option: (t=54, l=4) DHCP Server Identifier = 192.168.1.1
Option: (t=51, l=4) IP Address Lease Time = 1 day
Option: (t=1, l=4) Subnet Mask 255.255.255.0
Option: (t=3, l=4) Router = 192.168.1.1
End Option
Padding
I've read in http://wiki.mikrotik.com/wiki/Manual:IP/DHCP_Client the manual that it doesn't automatically asks for option 66 and 67, or does it?
It is a little outdated, but I need confirmation if RouterOS can be told where to find its configuration file (boot file) and where (TFTP server address).

Can I add an extra DHCP option in the option parameter request list of the isc-dhcp-server?
 
Beelze
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Tue Mar 04, 2014 12:21 pm

Re: RouterOS DHCP-client options

Fri May 23, 2014 2:02 pm

I've added the following lines in my /etc/dhcp/dhcpd.conf file:
if exists dhcp-parameter-request-list {
append dhcp-parameter-request-list 1,3,6,33,42,66,67,121;
}
The Parameter Request List in the DHCP Request from the RB2011 doesn't include option 66 and 67.
The DHCP ACK actually does give the correct TFTP server name (66) and Bootfile name (67). How can I make this work so that the RB2011 does something with these values?
 
Beelze
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 60
Joined: Tue Mar 04, 2014 12:21 pm

Re: RouterOS DHCP-client options

Fri May 23, 2014 5:47 pm

What I want in the end is have the RB2011 router connect to a DHCP server and get the name and location of a configuration file.

This file needs to be executed on the RB2011 and ready for use.

Can this be done without ever touching the RB2011? I have seen it on other vendors.

Who is online

Users browsing this forum: Amazon [Bot], Huy0880 and 138 guests