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.
Ive searched far and wide and cant seem to find an answer and I suspect its not possible. But I need to ask anyways.
I have a CentOS 5.4 server with DHCP server working. Its currently setup to handle DHCP requests for 2 VLANs. I have a 3rd VLAN that has its own DHCP server. I am wondering if I can setup dhcrelay to relay based on MAC address and relay it to the DHCP server for that VLAN.
I have a private domain with 16 WIN2K8R2 servers plus a WIN2K8R2 DC. I have 2 DNS servers listed for the network interface. The first one is for the DC, the second is for the public network. The windows interface is picking up a DHCP IP from a DHCP server that is on the same subnet as the DC instead of a DHCP server listed on the 2nd DNS subnet. If I switch the order of the DNS servers it picks up the correct IP.
So I was wondering if I could use dhcrelay on my 1st subnet to route incoming DHCP requests with a certain pool of MACs over to the other DHCP server. I know this can be done at the router level but is it possible to do it at the OS level?
well you wouldn't relay based on MAC, you just don't respond to the relayed bootp request on the server. So you get exactly what you want (as I read it) but you just configure the real remote DHCP for the specific MAC's, not the relay.
Well that's the thing. The correct DHCP server is configured to give IPs based on MACs(both DHCP servers are) But its not hitting the correct DHCP server. Its going to the DHCP server thats on the same VLAN(VLAN1) as the DC. I want it to get the IP from the other DHCP server(VLAN2). If I switch the DNS IPs on the WIN2K8 box it gets the IP based on the DNS IP that is listed first. But I need the DC DNS IP to be listed first. On the router its set so that VLAN2 is supposed to it's DHCP server.
The servers are Cisco UCS with VLAN2 as its native VLAN.
Hmm. That could work. But I do not have root access on the VLAN2 DHCP server. I do have root access to the VLAN1 DHCP server. Thats why I was hoping to use dhcrelay there. Is there a way to force a WIN2K8 server to use a particular DHCP server?
Well you can't make a client prefer a certain dhcp server, so you'd also need to condone the other server to NOT answer those requests. Personally I'd not want to use excessive lease times etc., but not to the extent of branding it a bad idea, just not my, erm, style.
Oh, you might also want to look at using a dhcp class on the client settings, that could actually give you something analogous to 'preferring' a server if they can be told to ignore our require a certain class id.
I found a simple yet I hope effective, low tech solution. Each server has 2 NICs. Once NIC is for management and the other is used for data. We are running VMs using the data NIC for their network. I set the DNS order on the management NIC to use VLAN2s DNS IP first and on the data NIC set it to use VLAN1s DNS IP. That seemed to have worked. They each get an IP on the correct interface for the correct VLAN.
I'm confused as to why WIN2K8R2 cares about DNS though. Shouldn't they get their DHCP server info from the router/switch? Anyways. I think this will work for me. Just need to verify the VMs pic up the correct network and should be set.
It works under Vista so it should work in Win 2008.
There is a script in Windows called netsh to manage the network interfaces from a batch file.
You could change this settings and every parts of the network.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.