Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've 2 linux computers, one redhat (client), and one ubuntu (set up with shared internet connection as described here)

At the moment, on the wired connection between the computers, I can ping the other computer from both sides; IP addresses are setup statically. The ubuntu computer has access to the internet through wireless.

I want to setup the redhat client to be able to access the same DNS server as the ubuntu one uses. In the article above, it is assumed that the client is another ubuntu box, and they advise to do the following:

prepend domain-name-servers 208.67.222.222,208.67.220.220;

However, the redhat client doesn't have the file /etc/dhcp3/dhclient.conf. Is there another way of achieving the above in redhat?

(I've tried to setup the ubuntu box as a dhcp server using dnsmasq, but it didn't work)

(BTW, I thought I needed a crossover cable for this type of setup, but that didn't work - an ordinary ethernet cable was fine)

share|improve this question
    
On the crossover cable issue: years ago, only high-end networking equipment did the crossing over for you. Nowadays, I think all Ethernet cards and all switches automatically cross over if needed. –  Gilles Oct 14 '10 at 18:47
add comment

3 Answers

DNS servers are specified in all Linux distribution in the file /etc/resolv.conf it should contain:

nameserver 208.67.222.222
nameserver 208.67.220.220

for your servers. However, when using dynamic network setup instead of static, the setup tool used might overwrite this.

It's not clear which version of RedHat you use, so I've got to shoot in the dark a bit, but if you have system-config-network, this is probably the right tool to use for network configuration. More modern systems normally use network-manager.

share|improve this answer
1  
And usually on rpm based systems you can specify the DNS servers in the eth config files, too (/etc/sysconfig/network-script/ifcfg-eth0 for example). It depends on your version of Linux, but it should work. In ifcfg-ethX you specify DNS1 = 208.67.222.222 and DNS2 =.... This works at least on Mandriva and it may work on RedHat/Fedora, too, but I'm not sure. –  Patkos Csaba Oct 15 '10 at 6:41
add comment
up vote 0 down vote accepted

I hadn't set up NAT on the ubuntu server.

When that was set up I didn't need any 'prepend' stuff as I was able to set the IP address of the DNS server on the client (redhat, in resolv.conf) to be the same IP address as the ubuntu server was using. NAT handled the translation from one network to the other.

The instructions for setting up NAT on the ubuntu server I got from here:

http://ubuntuforums.org/showthread.php?t=713874

Thanks fschmitt for your answer.

share|improve this answer
add comment

Redhat also uses client config file:

$ man dhclient

The DHCP client normally gets its configuration information from /etc/dhclient.conf

That file by default is not created, so you can copy the following sample file and edit to suite you need. My client ver is 3.0.5, so the file path is:

/usr/share/doc/dhclient-3.0.5/dhclient.conf.sample
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.