Difference between revisions of "DHCP"

From Bashlinux
Jump to: navigation, search
(Created page with "__NOTOC__ === How to send client-ID to DHCP Server === The Client ID could be type MAC address or ASCII, to setup a custom Client-ID to be sent to DHCP Server, create or edit ...")
 
Line 17: Line 17:
 
option ms-classless-static-routes code 249 = array of integer 8;
 
option ms-classless-static-routes code 249 = array of integer 8;
 
 
# Playtika routes
+
# Bashlinux routes
option rfc3442-classless-static-routes 24, 11, 22, 33, 10, 20, 30, 100;
+
option rfc3442-classless-static-routes 24, 11,22,33, 10,20,30,100
option ms-classless-static-routes 24, 11, 22, 33, 10, 20, 30, 100;
+
22, 51,52,53 10,20,30,100;
  +
option ms-classless-static-routes 24, 11,22,33, 10,20,30,100
  +
22, 51,52,53, 10,20,30,100;
   
 
; RFC 3442: Definition of the DHCP option to configure the list of static routes on the client
 
; RFC 3442: Definition of the DHCP option to configure the list of static routes on the client

Revision as of 22:39, 16 June 2015

How to send client-ID to DHCP Server

The Client ID could be type MAC address or ASCII, to setup a custom Client-ID to be sent to DHCP Server, create or edit the /etc/dhclient.conf file and add the client ID as follows.

  • If the client ID is type MAC addres, the place a 1 before the MAC addres likes:
send dhcp-client-identifier 1:xx:xx:xx:xx:xx:xx;
  • If you want an ASCII string, all you have to set is:
send dhcp-client-identifier "\0MYCLIENT-xxxxxxxx";
RFC 2131
The convention is 0 for ASCII and 1 for MAC address, but some times it doesn't work, so you might want to try without the leading zero if the example above doesn't work.

How to push a route from the DHCP server

Assuming the network that needs to be pushed is 11.22.33.00/24 and the traffic to that network needs to be routed via 10.20.30.100, then setup the following options on /etc/dhcp/dhcpd.conf

# RFC3442 routes
option rfc3442-classless-static-routes code 121 = array of integer 8;

# MS routes
option ms-classless-static-routes code 249 = array of integer 8;

# Bashlinux routes
option rfc3442-classless-static-routes 24, 11,22,33, 10,20,30,100
                                       22, 51,52,53 10,20,30,100;
option ms-classless-static-routes 24, 11,22,33, 10,20,30,100
                                  22, 51,52,53, 10,20,30,100;
RFC 3442
Definition of the DHCP option to configure the list of static routes on the client