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.
not shure if this is linux related but it involves linux too
I've got one problem. I have dhcp server running on Win server 2003 which sholud supply ip addresses on four subnets. The problem is that I want for clients on specific subnet to get ip address from specific range. For example: client issue broadcast message requesting dhcp server, dhcp offers him ip address and what I want to happen is that that offer is from specific range for that subnet for example 192.168.1.10-254. So is there ayn way to configure client (like set dhcp class on client maybe) so dhcp could recognize from which pool of ip address should it offer a lease??
Offcourse if I've a router and every network segment goes to one router's nic which is configured with ip address from that range,dhcp will know from which range to issue ip address am I wright? But the problem is that I have Debian firewall/gateway and three nic's. One nic is connected to my adsl modem and is configured with pppoe connection and firewall separates those two networks (private and public). Two other nics are in bond mode (trunk mode) so there's only two nic's (one with pppoe and the other one virtually adapter). That virtually adapter ip address is for example 192.168.0.1 and four alias ip addresses (for every subnet) so when broadcast message reaches dhcp it sees request from 192.168.0.1.
Is there any way around this? Some solution maybe which I can apply to my clients so dhcp will know by client configuration from which pool to issue a lease. Client computers runs on win xp. Thanks
if you have multiple subnets then a dhcp server will give a lease based on the subnet it came from. There is no magic configuration required. If you define dhcp config declarations for a certain subnet, then that subnet will be served either based on the local subnet, or the data in the bootp relay packet if you're using a dhcp relay agent on a router / switch.
Yes, I understand that, but the problem is that router on which clients are connected (Debian) is on 192.168.1.1 and other for subnets are actually ip alias address on bond0 interface (192.168.1.1). So two nics are in bonding mode. Bond0 interfac ip address is 192.168.1.1. Alias ip address on bond0 interfaces are 192.168.2.1, 3.1, 4.1, 5.1 so it can route traffic on those subnets. What happens when clients broadcast dhcp requests is that they will get ip address from 192.168.1.0 range am I wrigh? So i thing that there's no solution to this problem in implementation like this. If I want it to work I sholud remove alias ip addresses and buy 4 new nics and than plug it to the switch. Or it could be achived with alias ip addresses?
if you are using an *ALIAS* on an interface, bonded or otherwise - that much is irrelevant, that is not in the same subnet, then that is WRONG, and you should NEVER do that. If you have tagged vlan interfaces on the same nic, then that is just fine, and everything will behave as if they were separate nics.
... "(Debian) is on 192.168.1.1 and other for subnets are actually ip alias address on bond0 interface (192.168.1.1)"... That was just an example, this is my real config:
etho - 192.168.100.5/30 (interface that is connected to my modem and got pppoe connection running on top off it)
Dhcp address is 192.168.100.33/27 with default gateway 192.168.100.62/27
So what I want to accomplish is that when client requests ip address from example 192.168.100.64/27 subnet that it gets ip address from that range (gateway which will provide relay should be alias ip address 192.168.100.94/27) and not from 192.168.100.4/30 range which is my bond0 primary address.
But what I am not shure is that how it could be accomplished becouse dhcp discovery are broadcast packets with source ip 0.0.0.0. How my router could recognize which subnet I want to apply to that host??? That's the reason why I thought that I must implement something to client computers so dhcp could recognize incoming dhcp requests with subnet I want to use for that host. An example of somethink like this are client dhcp classes. If you want different configuration for some clients on the same network, you could configure hosts with different dhcp classes and on dhcp server setup specific configuration for that class (for example different router address than one specified for default scope) I konw it's a little bit messy but i really need help!
Is this ok? Can it work somehow like this or should I change something?
Thanks for replays!
Last edited by tech_soul8; 03-24-2012 at 02:05 PM.
those are different subnets, it is not meant to work, dhcpd knows what interface it is listening on, and will only give leases for that subnet. Fix your networking, don't hack around its faults.
those are different subnets, it is not meant to work, dhcpd knows what interface it is listening on, and will only give leases for that subnet. Fix your networking, don't hack around its faults.
You mean I have to change my bond0 address and put it in /27 range??
No I mean not break fundamental tcp/ip addressing principles and only use one subnet. Buy a vlan capable switch, buy more nics or some other sort of responsible redesign. Is this in a business?? I really hope not.
No this is not a business and that's the reason why configuration looks like this. This is something what I choose for my final exam and the reason why I'm trying to set it up like this is becouse I lack professional equipment and I'm running it all on virtualbox to be shure that everythig is working ok the way I implement it. In real world scenario router would have 5 nics with separate subnets and than everything would be easy.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.