I have servers connected to multiple Juniper EX4200 based virtual chassis. In order to make them hot swappable without manual reconfiguration, I would like to be able to always give the same IP, with DHCP, to servers connected to a specific switch port.

Or, alternatively, to be able for the server to know which port it has been connected to.

Is any of these setups possible?

Thanks.

link|improve this question

feedback

3 Answers

up vote 1 down vote accepted

Cisco switches offer a feature called "DHCP Server Port-Based Address Allocation", which implements DHCP option 82 (aka "DHCP Relay Agent Information"); in the general case, you should just need a switch which supports DHCP Option 82 and a DHCP server which knows what to do with that information. I don't know the specifics of your switch or DHCP server though.

link|improve this answer
Thanks a lot ;) – Pierre Jan 17 at 11:06
feedback

That's backwards. DHCP has no knowledge of switch-ports. How is that supposed to work ?

You can give out a fixed ip to a specific mac-address by DHCP (a so-called DHCP reservation) but that requires that whatever swap you make preserves the mac-address.

As I have no knowledge of this Juniper equipment I have no idea if this is possible in your case.

Virtual machines typically have either a static mac-address that moves with the VM to whatever physical hardware which is hosting it. Or they have a dynamically generated mac-address that can change when you move it to different hardware. The static one is what you would need.

link|improve this answer
It's entirely possible with DHCP relay agent information, if the switch supports it. – Andrew Jan 17 at 0:44
feedback

The only way I can think of to do this is to put each port in its own VLAN and subnet. Then for that subnet, configure a DHCP pool with only a single IP address.

link|improve this answer
Grin.. I hadn't thought of that one. It would work but (shudder) I would not want to be the one to maintain the documentation for that particular data-center. – Tonny Jan 16 at 22:38
@Tonny - agreed. It's an ugly hack, but should theoretically work. – ErikA Jan 16 at 22:39
feedback

Your Answer

 
or
required, but never shown

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