Skip to contentSkip to conversation

DNS server

DISCUSSION Anshuman Singh Rawat 2 participants 2 messages Feb 20, 2004 – Feb 21, 2004

lore
Share & tools
lore
#0 lore raw

Hi,
How does one enter preferred DNS addresses to be used in linux?

I found that IP address, netmask, network address can be assigned in this file /etc/sysconfig/network-scripts/ifcfg-eth0 for interface eth0.

Can DNS server list be added here too? If yes, what name is given for it?

DEVICE=eth0
IPADDR=208.164.186.4
NETMASK=255.255.255.248
NETWORK=208.164.186.1

What would the name be for DNS server?

Thanks.

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#1 lore raw
Quoted 5 lines · Anshuman Singh Rawat

Hi,
How does one enter preferred DNS addresses to be used in linux?

I found that IP address, netmask, network address can be assigned in this file /etc/sysconfig/network-scripts/ifcfg-eth0 for interface eth0.

Quoted 8 lines

Can DNS server list be added here too? If yes, what name is given for it?

DEVICE=eth0
IPADDR=208.164.186.4
NETMASK=255.255.255.248
NETWORK=208.164.186.1

What would the name be for DNS server?

The usual place to enter the DNS server addresses is in the file /etc/resolv.conf . This file has a man page you can consult for the details, but the simplest version just has lines like these:

        nameserver 192.168.1.40
        nameserver 192.168.1.2

Some configuration tools will modify or overwrite this file, and DHCP clients can modify it if they get DNS-server info as part of a lease ... so there are distro-specific and site-specific elements to this question.

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs