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.
i would like to know if i have one interface with 2 or more ip address of diferent networks, can it be a DHCP server for the two or more networks it is conected to ?
I had configured it with only one ip address to only one network but i its not enough.
The problem with that is it has no way to distinguish which hosts should belong to which network unless you specify all of the MAC addresses. If you are serving DHCP to multiple subnets out one interface then since DHCP requests are layer 2 and don't involve the IP address (yet, at least not the request itself) you will be randomly placing the clients on either network. This is of course assuming it is even possible to get DHCP to listen for two subnets on the same interface, which I have never had reason to try (due to the issue stated above) so do not know if it's possible.
It seems to me that this could be interesting in 2 configurations :
1/ When using vlans... the dhcp requests would be in the one vlan or the other... so that should work.
2/ When forwarding dhcp request over a layer 3 network : I know that Cisco routers can forward packets from a subnet to another. They add the IP of their interface - which first received the dhcp request - in the request so that the dhcp server knows what IP to give. I've seen it, but I had not access to the dhcp server's config, so I don't know how this could work with Linux box (how to set up the Linux router ? How to set up the Linux dhcp server ?)
I wonder about these last 2 questions for a long time... I'll create another thread for these.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.