Avatar of Goutham
GouthamFlag for India

asked on 

how to assign the gateway and dns entires from the dhcp when configured with ddns

Dear Experts:
Configured ddns using dhcp and bind packages, working perfectly now the requirement is to enable the dhcp for the mobile users (laptop users) where they will be getting the ip address , gateway and dns from the dhcp .
------------------
1.static zones  are used for the the servers
2.dynamic zones for the desktops and workstations but this does not have gateway or dns so not internet.
3. now the requirement is to handle for the mobile laptop users, how to handle for mobile users , (if same laptops are used by the mobile users then can capture the mac and use this for reserving particular ip address).
how to acheive the above "3" is it by defining the mac and ip address , gateway and dns in the dhcpd.conf please suggest me how to declare this in the dhcpd.conf.
Please help, thanks in advance.


DHCPDNS

Avatar of undefined
Last Comment
Goutham
Avatar of Papertrip
Papertrip
Flag of United States of America image

Is it required to have laptops and mobile devices on a separate subnet from the desktops?  Why do you want to do MAC address matching?

The information for gateway and DNS servers is configured globally in dhcpd.conf using the 'options' directive, but if it needs to be different for a particular subnet declaration then you just put those options into that statement.

From a previous question of yours, I have an excerpt of your dhcpd.conf, which appears to be setup properly, so I'm not sure why #2  isn't working.  FYI all of this is completely unrelated to you having DDNS setup.

# option definitions common to all supported networks...
option domain-name "dyn.shriramdb.com";
option domain-name-servers 192.168.1.244;
option routers 192.168.1.244;
option broadcast-address 192.168.1.255;
option ntp-servers 192.168.1.244;

Open in new window


Avatar of Goutham
Goutham
Flag of India image

ASKER

Hi Sir, thanks for the reply, i am not looking at separate subnet for laptops and mobile devices.
As of now if manually assign the ip , gateway and dns as per the static zones internet is working for those systems. have assigned for servers and few desktops and work stations.

How to make the laptop (mobile users) to get internet connection, when pointed laptops to obtain ip and dns server automatically they get the ipaddress but they are not getting internet.

Actually,  option routers should be 192.168.1.2  as the router eth0 ip is 192.168.1.2 and this serves as gateway for the entire lan. i think if i change option routers to 192.168.1.2 then laptop users will get internet , please suggest me is this correct.

Thanks in advance








Avatar of Papertrip
Papertrip
Flag of United States of America image

Actually,  option routers should be 192.168.1.2  as the router eth0 ip is 192.168.1.2 and this serves as gateway for the entire lan. i think if i change option routers to 192.168.1.2 then laptop users will get internet , please suggest me is this correct.

Correct.
Avatar of Goutham
Goutham
Flag of India image

ASKER

Thanks sir, with this any user pointing their system to the dhcp server then they will be able to access internet , Sir, is it possible to control, that is only laptop users should have internet access and for all the other desktop users internet should not be availble, i dod not know how to acheive this please help.

Is it something like the below or all the mobile and laptop users
host laptopuser1 {
      hardware ethernet 08:00:2b:4c:59:23;
     fixed-address 192.168.1.222;
       option routers 192.168.1.2 # actual router#
   }
---------------------------------------
and in the main options-routers giving a fake which is non router so that other than the mac address declaration internet will not be accessible

please suggest me to go further or is any other medthod, please help.
Avatar of Papertrip
Papertrip
Flag of United States of America image

Something like that should not be done through DHCP, you should create a new subnet on your network and configure your router and/or firewall to disallow that subnet to reach the internet.

Once you do that, then you just create a new subnet declaration for it in dhcpd.conf, and you won't need to change any options.
Avatar of Papertrip
Papertrip
Flag of United States of America image

Sorry that last sentence is incorrect.
You will need to change options as your gateway and broadcast will not be the same for the new subnet.

You can probably use DHCP for what you are trying to do, but it really isn't the right way and I would expect it to cause problems for you in the future, if you can even get it to work in the first place.
Avatar of Papertrip
Papertrip
Flag of United States of America image

If you setup a new subnet, you will need to add a new interface to your dhcp server that listens on that subnet and then create a new subnet declaration that listens on that interface with all the correct network info for that subnet.  There may be a "better" way to do this perhaps using vlan tagging, but I'm not positive about that and don't have time to research it right this moment.
Avatar of Papertrip
Papertrip
Flag of United States of America image

http://linuxmanpages.com/man5/dhcpd.conf.5.php

Read the sections labeled "ADDRESS POOLS" and "ALLOW AND DENY WITHIN POOL DECLARATIONS"
ASKER CERTIFIED SOLUTION
Avatar of Papertrip
Papertrip
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Goutham
Goutham
Flag of India image

ASKER

Sir, Thank you very much for the support. will go through the provided links and do it accordingly. Thanks once again.
DNS
DNS

The Domain Name System (DNS) is a hierarchical, globally distributed system responsible for associating the name of a computer, service or other resource into an IP address for connecting to the Internet or a private network. Most prominently, it translates domain names to the numerical IP addresses needed for the purpose of computer services and devices worldwide.

29K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo