BIND, DHCP
-
- Lance Naik
- Posts: 44
- Joined: Thu Aug 31, 2006 8:52 pm
- Location: Lahore Pakistan
- Contact:
BIND, DHCP
I installed Bind9 on Ubuntu for caching. I noticed that on restart, contents of /etc/resolv.conf were cleared and the only nameserver visibile was my gateway. I figured that it was happening because my system was obtaining dhcp address from the gateway. I reconfigured my system for a static address and it works now. I want to know if there is a way to configure dhcp client to only obtain address, mask and gateway from dhcp server and use nameservers of its own?
-
- Havaldaar
- Posts: 145
- Joined: Fri Jun 03, 2005 12:19 pm
- Location: Rawalpindi Islamabad
- Contact:
Re: BIND, DHCP
usewaqaskhawaja wrote:I installed Bind9 on Ubuntu for caching. I noticed that on restart, contents of /etc/resolv.conf were cleared and the only nameserver visibile was my gateway. I figured that it was happening because my system was obtaining dhcp address from the gateway. I reconfigured my system for a static address and it works now. I want to know if there is a way to configure dhcp client to only obtain address, mask and gateway from dhcp server and use nameservers of its own?
host ns2 {
next-server ns2.your-domain.com;
hardware ethernet 00:02:c3:d0:e5:83;
fixed-address 40.175.42.254;
}
Muhammad Irfan
03335246272
03335246272
Re: BIND, DHCP
you've figured out that it's receiving those settings from the dhcp server. that leaves you halfway to solving the problem.
look in /etc for dhcp configuration stuff.
look in /etc for dhcp configuration stuff.
-
- Lance Naik
- Posts: 41
- Joined: Sat Jan 13, 2007 1:36 pm
- Location: Bangladesh
- Contact:
subnet 10.0.0.0 netmask 255.255.255.0 {
option routers 10.0.0.30;
option subnet-mask 255.255.255.0;
option domain-name-servers 202.111.222.195, 212.122.13.200;
option time-offset -18000; # Eastern Standard Time
default-lease-time 21600;
max-lease-time 43200;
host your-host {
hardware ethernet 00:E0:4C:2F:FE:57;
fixed-address 10.0.0.2;
}
option routers 10.0.0.30;
option subnet-mask 255.255.255.0;
option domain-name-servers 202.111.222.195, 212.122.13.200;
option time-offset -18000; # Eastern Standard Time
default-lease-time 21600;
max-lease-time 43200;
host your-host {
hardware ethernet 00:E0:4C:2F:FE:57;
fixed-address 10.0.0.2;
}
Best Regards,
SAKI
8801712764543
SAKI
8801712764543
-
- Lance Naik
- Posts: 44
- Joined: Thu Aug 31, 2006 8:52 pm
- Location: Lahore Pakistan
- Contact:
Dear waqas
look for the following lines in your /sbin/dhclient-script file.
CHANGE IT TO
I hope this will help you.... but note dont change the other lines... then your dhclient script may malfunction.
Regards
look for the following lines in your /sbin/dhclient-script file.
Code: Select all
if [ -z "${dhc_dbus}" ] || (( ( dhc_dbus & 1 ) != 1 )); then
make_resolv_conf
Code: Select all
if [ -z "${dhc_dbus}" ] || (( ( dhc_dbus & 1 ) != 1 )); then
# make_resolv_conf
Regards
waqaskhawaja wrote:Yes, I don't have access to the dhcp server. That is why I was asking about available options for dhcp client.
Sohail Riaz, RHCE
HPC Consultant
Email : sohaileo@gmail.com, riazsx@aramco.com
Web : http://www.sohailriaz.com
HPC Consultant
Email : sohaileo@gmail.com, riazsx@aramco.com
Web : http://www.sohailriaz.com
-
- Lance Naik
- Posts: 44
- Joined: Thu Aug 31, 2006 8:52 pm
- Location: Lahore Pakistan
- Contact: