Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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???
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
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).
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.
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...
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?
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.
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...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.