LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 01-03-2006, 09:16 PM   #1
gigsz
LQ Newbie
 
Registered: Dec 2005
Posts: 18

Rep: Reputation: 0
dhcp???


ey is it possible that my linux machine will dynamically give the dns servers for the client connecting to it...

i have two internet connection.. first is xxx.xxx.xxx.1 and the second is xxx.xxx.xxx.8

the dns server for .1 is xxx.xxx.xxx.11 and xxx.xxx.xxx.10

theh dns server for .8 is xxx.xxx.xxx.223 and
xxx.xxx.xxx.224

so is it possible that i configure my client to obtain an ip address automatically and with xxx.xxx.xxx.5 (linux machine) as the gateway and it will change its dns servers to the connection (.1 or .8) being used???

thanks....
 
Old 01-04-2006, 02:49 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well yes, that's exactly what DHCP is designed to do. you might want to look at a painfully simple implementation like dnsmasq over the more complex dhcpd
 
Old 01-04-2006, 08:04 AM   #3
Mishra100
Member
 
Registered: Jan 2005
Posts: 44

Rep: Reputation: 15
If those IPs are on seperate networks then you will have to setup routing between them. If you have two internet connectons then I would guess you have two different networks. They need to be able to talk to each other. If you want clients to recieve DHCP addresses on totally different networks, you will need seperate DHCP servers (or at least seperate interfaces on your dhcp server).
 
Old 01-04-2006, 05:08 PM   #4
flashingcurser
Member
 
Registered: Jan 2003
Distribution: many win/nix/mac
Posts: 259

Rep: Reputation: 32
You should be able to do this with one nic and dnsmasq.
1 set up an alias interface like eth0:1 (eth0 on one subnet eth0:1 on the other)
You will have to google a little for your distro.
2 create copy the dnsmasq.conf rename one of them to somthing like dnsmasq2.conf
3 edit each dnsmasq.conf's to their specific functions
4 start dnsmasq something like:
/usr/bin/dnsmasq -C /etc/dnsmasq1.conf -i eth0 && /usr/bin/dnsmasq -C /etc/dnsmasq2.conf -i eth0:1
5 test
6 edit your startup scripts accordingly.



dan
 
Old 01-04-2006, 05:33 PM   #5
assacin
LQ Newbie
 
Registered: Jan 2006
Location: India
Distribution: fedora , debian & red hat , RHEL
Posts: 13

Rep: Reputation: 0
Hello,
I guess u r asking about DHCP & not DNS. This can be solved if u configure the servers as DHCP servers & your clients as DHCP clients. If u want to configure your client machine as a DHCP client then issue #chkconfig as root & tell it to assign IP automatically or frm DHCP server for eth0 interface.
Hope it will solve your probs...

Happy Computing :-)
 
Old 01-05-2006, 12:19 AM   #6
gigsz
LQ Newbie
 
Registered: Dec 2005
Posts: 18

Original Poster
Rep: Reputation: 0
thanks for the help..

ey, acid_kewpie mentioned that dhcpd is more difficult than dnsmasq.. wel i have no luck with dnsmasq because i cannot install it... the howto of dnsmasq on the net is not that easy to undestand.. anyway... the dhcpd.conf file has xxx.xxx.xxx.8 as my default gw of my router.. and when i manually change my default router to xxx.xxx.xxx.1 and start the dhcpd, it does not change back to xxx.xxx.xxx.8... or is this just normal...

and also it is possible to configure my dhcpd to have 2 gateways with different dns servers for each gateway?
 
Old 01-05-2006, 12:35 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
it doesn't make sense to have a different dns server for each gateway, as it's not until after you have finished with dns that you have the ip address of the destination and can therefore decide which gateway to use.
 
Old 01-05-2006, 12:53 AM   #8
gigsz
LQ Newbie
 
Registered: Dec 2005
Posts: 18

Original Poster
Rep: Reputation: 0
here's the set.up...

the network has 2 internet connections .8 and .1 the linux box is configured as a router on some pc within the same network... the 2 connections have different dns servers... so what i want to do now is to change the dns server for the client if one connection is down... the dafault gw now is .1 with .11 and .10 as dns servers.. so if .1 is down, i want .8 to become the gw with .25 and .26 as dns...

is this possible?

i'm not really good at networking so forgive me if how i explain my problem is not that easy to understand...

=)

Last edited by gigsz; 01-05-2006 at 12:58 AM.
 
Old 01-05-2006, 01:45 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
just set resolv.conf to use dns services from both networks.
 
Old 01-05-2006, 02:14 AM   #10
gigsz
LQ Newbie
 
Registered: Dec 2005
Posts: 18

Original Poster
Rep: Reputation: 0
ok.. i'll see if it works.. thanks
 
  


Reply



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
DHCP problems - multiple DHCP servers sat86 Linux - Networking 4 10-02-2005 05:43 AM
ADSL DHCP A-OK, but Mandrake 10.1 to be DHCP for other subnet is a problem turnbui Linux - Networking 2 08-20-2005 09:34 AM
why DHCP client not sending own host name in DHCP request packet? sonika_singhi Linux - Networking 7 05-28-2005 05:18 AM
forward dns from dhcp to dhcp Fark Linux - Networking 3 03-31-2004 10:40 AM
XP Pro Build 2600/sp1 v.1105 DHCP Client to Redhat 8.0 DHCP Server - Problems atomant Linux - Networking 5 06-28-2003 11:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:46 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration