LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 02-10-2010, 09:12 AM   #1
IanVaughan
Member
 
Registered: Jun 2009
Location: Brighton, UK
Posts: 49

Rep: Reputation: 16
Where do I put DNS settings for my DHCP server?


Where and what settings do I need, to enable machines on my subnet to find the DNS servers, as machines not on my subnet do?

I have a windows machine on a corp network (ie not on my subnet) :-
Code:
H:\>ipconfig /all

Windows IP Configuration

        Host Name . . . . . . . . . . . . : <removed>
        Primary Dns Suffix  . . . . . . . : <removed>.co.uk
        Node Type . . . . . . . . . . . . : Hybrid
        IP Routing Enabled. . . . . . . . : No
        WINS Proxy Enabled. . . . . . . . : No
        DNS Suffix Search List. . . . . . : <removed>.co.uk
                                            <removed>.co.uk
                                            <removed>.co.uk
                                            co.uk

Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . : a.b.c.co.uk
        Description . . . . . . . . . . . : Marvell Yukon 88E8057 PCI-E Gigabit Ethernet Controller
        Physical Address. . . . . . . . . : 00-01-6C-49-F6-xx
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : Yes
        IP Address. . . . . . . . . . . . : 172.24.150.51
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 172.24.150.1
        DHCP Server . . . . . . . . . . . : 172.24.10.13
        DNS Servers . . . . . . . . . . . : 172.24.10.13
                                            172.30.70.52
        Primary WINS Server . . . . . . . : 172.24.10.14
        Secondary WINS Server . . . . . . : 172.21.100.108
        Lease Obtained. . . . . . . . . . : 10 February 2010 14:01:13
        Lease Expires . . . . . . . . . . : 11 February 2010 14:01:13
I have a Router/Gateway DevilLinux box with a subnet behind it.

The Gateway primary interface IP address is : 172.24.150.50
Allocated address for the gateway : 172.24.150.50/24
Our default gateway is : 172.24.150.1
We have been allocated the IP address range 192.168.109.0/27

$ cat /etc/dhcpd.conf
Code:
# DHCP Server Configuration file.
authoritative;
default-lease-time 14400;
max-lease-time 14400;
lease-file-name "/etc/dhcpd.leases";
get-lease-hostnames false;
use-host-decl-names on;
ddns-update-style none;
#option subnet-mask 255.255.255.0;

subnet 192.168.109.0 netmask 255.255.255.224 {
#        option ip-forwarding off;
        option subnet-mask 255.255.255.224;

#  option domain-name-servers 192.168.1.1;
  option routers 192.168.109.1;
  option broadcast-address 192.168.109.31;
  range 192.168.109.2 192.168.109.30;
}
cat /etc/sysconfig/nic/ifcfg-eth0
Code:
#NIC Card (internal subnet)
DEVICE=eth0
ONBOOT=yes
MODULE=autoselect
DHCP=server
IP=192.168.109.1
NETMASK=255.255.255.224
BROADCAST=192.168.109.255
cat /etc/sysconfig/nic/ifcfg-eth1
Code:
#onBoard NIC - External network to company network
DEVICE=eth1
ONBOOT=yes
MODULE=autoselect
DHCP=no
IP=172.24.150.50
NETMASK="255.255.255.224"
BROADCAST="172.24.150.63"
ROUTE="$ROUTE default/0.0.0.0:172.24.150.1"
Many thanks! Ian
 
Old 02-10-2010, 09:39 AM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by IanVaughan View Post
Where and what settings do I need, to enable machines on my subnet to find the DNS servers, as machines not on my subnet do?

I have a windows machine on a corp network (ie not on my subnet) :-
Code:
H:\>ipconfig /all

Windows IP Configuration

        Host Name . . . . . . . . . . . . : <removed>
        Primary Dns Suffix  . . . . . . . : <removed>.co.uk
        Node Type . . . . . . . . . . . . : Hybrid
        IP Routing Enabled. . . . . . . . : No
        WINS Proxy Enabled. . . . . . . . : No
        DNS Suffix Search List. . . . . . : <removed>.co.uk
                                            <removed>.co.uk
                                            <removed>.co.uk
                                            co.uk

Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . : a.b.c.co.uk
        Description . . . . . . . . . . . : Marvell Yukon 88E8057 PCI-E Gigabit Ethernet Controller
        Physical Address. . . . . . . . . : 00-01-6C-49-F6-xx
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : Yes
        IP Address. . . . . . . . . . . . : 172.24.150.51
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 172.24.150.1
        DHCP Server . . . . . . . . . . . : 172.24.10.13
        DNS Servers . . . . . . . . . . . : 172.24.10.13
                                            172.30.70.52
        Primary WINS Server . . . . . . . : 172.24.10.14
        Secondary WINS Server . . . . . . : 172.21.100.108
        Lease Obtained. . . . . . . . . . : 10 February 2010 14:01:13
        Lease Expires . . . . . . . . . . : 11 February 2010 14:01:13
I have a Router/Gateway DevilLinux box with a subnet behind it.

The Gateway primary interface IP address is : 172.24.150.50
Allocated address for the gateway : 172.24.150.50/24
Our default gateway is : 172.24.150.1
We have been allocated the IP address range 192.168.109.0/27

$ cat /etc/dhcpd.conf
Code:
# DHCP Server Configuration file.
authoritative;
default-lease-time 14400;
max-lease-time 14400;
lease-file-name "/etc/dhcpd.leases";
get-lease-hostnames false;
use-host-decl-names on;
ddns-update-style none;
#option subnet-mask 255.255.255.0;

subnet 192.168.109.0 netmask 255.255.255.224 {
#        option ip-forwarding off;
        option subnet-mask 255.255.255.224;

#  option domain-name-servers 192.168.1.1;
  option routers 192.168.109.1;
  option broadcast-address 192.168.109.31;
  range 192.168.109.2 192.168.109.30;
}
cat /etc/sysconfig/nic/ifcfg-eth0
Code:
#NIC Card (internal subnet)
DEVICE=eth0
ONBOOT=yes
MODULE=autoselect
DHCP=server
IP=192.168.109.1
NETMASK=255.255.255.224
BROADCAST=192.168.109.255
cat /etc/sysconfig/nic/ifcfg-eth1
Code:
#onBoard NIC - External network to company network
DEVICE=eth1
ONBOOT=yes
MODULE=autoselect
DHCP=no
IP=172.24.150.50
NETMASK="255.255.255.224"
BROADCAST="172.24.150.63"
ROUTE="$ROUTE default/0.0.0.0:172.24.150.1"
Many thanks! Ian


if the machines on your network are getting their ip details from your dhcp server, you need the option

Code:
option domain-name-servers

example

Code:
option domain-name-servers   ns1.redhat.com, ns2.redhat.com;

example2

Code:
option domain-name-servers  1.2.3.4,  5.6.7.8;
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Network settings / DNS Server settings uid0sd Linux - Newbie 3 02-22-2007 03:39 PM
DNS server settings FC5 mickza Linux - Networking 1 01-28-2007 08:34 AM
DNS Server: What to put for nameserver entry and more... Swakoo Linux - Networking 7 01-13-2006 01:35 PM
How do you make the ip masquerade server/dhcp server broadcast dns to lan cmisip Linux - Networking 6 01-25-2003 10:43 PM


All times are GMT -5. The time now is 03:39 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration