Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We have some servers in a data center but the data center does not offer a DHCP service. We want to have some computers setup with DHCP and others that have static IP's.

Currently our WAN cable going directly into a switch and statically setting the IP's on our computers. Now my question is if I connect the WAN cable to a router then connect the router to the switch, will the router act as a bridge/switch and still allow the network traffic to the computers with static IP's (note: some of the computers might have static IP's in different subnets)?

Is a router the only option to achieve this? I have read that I could possibly setup a DHCP service on one of the computers but will the other computers be able to "see" it for DHCP?

Thanks for your help.

EDIT:

Our setup is pretty complex because we use a ton of virtual machines. Right now we are using VMWare Workstation 7 (on 4 different servers) and because our servers are in a data center we have the VM's connected to the VMWare NAT interfaces (over 80+ VMs and do not want to statically set each with an IP). But VMWare's NATing performance is very slow and causing some of the VM's to intermittently lose their network connections.

To add to the complexity our data center has issued us to sets of IP stacks, which unfortunately are on different subnets.

So we want to move away from using VMWares NATing and setup a DHCP server or router.

Each of the VM Host servers have 2 1GB NIC card. Currently each has a static IP and I wanted to route half of the VM's to one (eth0) and the other half to the other (eth1) using VMWare bridging.

If I setup a DHCP server on each host (because I do not want to route all DHCP traffic (40+ VMs) through 1 nic - potentially a lot of data being sent), can 1 NIC provide the DHCP while the other connect to the internet? And if thats the case will the Guest VM's be able to get an IP address from the Host's DHCP service?

Each host is running Ubuntu and I found this link:

https://help.ubuntu.com/community/dhcp3-server (multiple interfaces section)

Will that configuration work for our setup?

Sorry, I realize this if complex and I truly appreciate help/feedback.

share|improve this question
    
Why don't you set up a DHCP server on one of your servers? –  DKNUCKLES Oct 19 '11 at 16:32
    
Funny you ask, i was just researching that. But how would the computers setup with DHCP "see" or know where the DHCP server is? Does the DHCP broadcast something to say "Hey, I am the DHCP server"? Thanks. –  thiesdiggity Oct 19 '11 at 16:40
    
Are we talking public or private IPs here? Can you take control of the statics in your router and just route the combined traffic to the data center gateway or do you need to just add DHCP functionality aside from what is statically assigned from the data center? –  MaQleod Oct 19 '11 at 16:56
    
Your clients that are set up to receive IP addresses dynamically will send out DHCP Discovery packets on your subnet to find available DHCP servers. You can set up a DHCP relay to forward addresses to computer that don't exist on your current subnet as well. –  DKNUCKLES Oct 19 '11 at 17:01
    
Do you have enough public IP addresses for all 80 VMs, or will you be creating a private network for them and still doing NAT? –  sciurus Oct 19 '11 at 17:55

5 Answers 5

Which router are you using? If your router supports IP Reservation (Statically declared list mapping IPs to MAC addresses) the this should be a cakewalk. Most of the Cisco routers support this (Even my WRT310 on DD-WRT has this).

So all you need to do is let your router use DHCP with a statically created list of of IP assignments for the machines you need static IPs for.

share|improve this answer
    
OP states they don't have a router and that WAN cable plugs into a switch. –  DKNUCKLES Oct 19 '11 at 17:05

It sounds like you are renting multiple static IP addresses from the ISP. By adding a router you are changing the network topology.

One method is to simply plugin a NAT enabled router and use it as a DHCP server. Configure DHCP reservations for the server computers. Then setup port forwarding for each service you require. The disadvantage here is that you have only 1 public IP address. So all those extra IP's you are paying for should be cancelled as they are not used. This also means that if you host multiple services on the same port, then you need to solve that issue too.

http://mysite.com:80/

will conflict with

http://mysite2.com:80/ so it should become

http://mysite2.com:8080/

You can subscribe to a url forwarding service to allow

http://mysite2.com/ to invisibly forward to http://mysite2.com:8080/

Another option is to simply move the servers in front of the router (keep them on a switch). You can also buy multiple routers. Just depends on what you need, how much you want to spend, how much skill you have to do these things etc...

share|improve this answer

If you want to do DHCP, you need a DHCP server - say a box running Linux or Windows Server (ther are DHCP servers running on windows client, even). If you want to route packets you need a router. Any relation among the two is purely incidental (consisting in that many routers can also act as DHCP servers). That's it though - saying "I needed DHCP so I got a router" is more or less like saying "I wanted to listen to the radio so I bought a car".

This said: DHCP is a MAC base protocol - say, ethernet - so a DHCP server will always be "seen" by other computers. What happens is that, at address reservation time, the node will broadcast on the wire a DHCP configuration request - and the server will answer and negotiate what is needed (this is why you never have more than one DHCP server on the same physical segment).

A DHCP server also allows you (if you so choose) to allocate addresses permanently to a given MAC address, so you can configure your entire network with DHCP only.

Now the fact that you also subnet is a routing issue indeed. And how you configure it depends a lot from the brand. Anyway, it won't be difficult, I'd say you'll need a static and a default route at most.

Now, one thing you want to think at is, how you keep your DHCP and name resolution in sync - meaning, if your machine is (locally) called 'blooper', unless some precautions are taken will answer to a different name after it has been DHCP configured. For this reason if you are on windoze and can manage the PDC, that machine would be the best choice for DHCP server, as it makes most tasks pretty seamless.

Cheers.

share|improve this answer
    
Thanks for the info on DHCP. I realize now that a router is probably not the best way to go. I will look into setting up a DHCP server. With that I have another noob question which I think I know the answer but just want clarification. By setting up a DHCP server all network traffic will be routed through it's NIC, correct? So if we have a ton of network traffic could that potentially cause a bottle neck? –  thiesdiggity Oct 19 '11 at 17:49
    
Egads no! That would be the router. A DHCP server does (mostly) two things: (1) hands out network parameters (address, name, dns server, default routes....) to clients that are allowed to ask for them; (2) manages the assignments it has done (leases) by expiring them, renewing them, etc. Some servers will add dynamic dns updates, master/backup server capabilities and other bells and whistles. The client will then proceed to send its packets wherever he best pleases. (Friendly advice: get a good book on networking and read up on the basics. Trial and error is bound to bring you lots of grief) –  Alien Life Form Oct 20 '11 at 8:08

As long as your default gateway, subnet, DNS servers and IP addresses are listed properly on your computers' network settings, this set up should work fine.

For the computers in different subnets, you'll need to create a route of some sort so they can communicate with the computers on your local network.

share|improve this answer

What you need is bridging with packet filtering, and decent (non-consumer) routers are usually capable of this. You do need your bridge to rest between your machines and the data center.

Definitions:

  • Inside interface: bridge port facing your machines
  • Outside interface: bridge port facing the data center

Your bridge needs to offer DHCP service to only the inside interface. It must not forward DHCP requests across the bridge. For Cisco hardware, bridge-group and access-list commands will work in tandem to achieve this. I've also setup such a creature using a Linux box with multiple NICs using brctl and iptables. DHCP service doesn't have to come from the bridge device, but the bridge does need to filter it so it doesn't pass and start offering DHCP to the whole data center.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.