Relay ident. and response modification

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Relay ident. and response modification

Gregory Sloop
Relay ident. and response modification Ok, that subject isn't very clear, so let me try to explain.

[I'm kind of grasping for a way to handle a situation that's unusual - at least to me - and so I'm just thinking about ways to go about it. Thus my question might not have a sensible answer/solution.]

Explaining the layout logical and physical is also complicated - so let me just ask this.

I'll have multiple relay agents handling relay of DHCP requests to the DHCP server.

Depending on which relay agent handles the request I want to return a different set of gateways. [Different gateways, but the same subnet.]
So, for example
-request from Client 1 comes through agent A. [Subnet 10.0.0.1/24] and I want to return Gateway X
-request from Client 2 comes through agent B. [Subnet 10.0.0.1/24] and I want to return Gateway Y

Recap: Both client 1 & 2 will get an IP from the same subnet, but will/should get different gateways depending on which relay they use. [I have no other easy way (I can think of) to distinguish the client, other than which relay the request comes through.]

Is this possible?
Pointers as to how?

TIA
-Greg

[hidden email]
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

RE: Relay ident. and response modification

Patrick Trapp
Relay ident. and response modification

I have to ask why you want hosts in the same subnet to get a different gateway. Why not just set up separate subnets – if you need traffic to pass between the subnets, let their respective gateways handle that. That’s what gateways do, right?

 

From: dhcp-users [mailto:[hidden email]] On Behalf Of Gregory Sloop
Sent: Tuesday, September 26, 2017 1:12 PM
To: Users of ISC DHCP <[hidden email]>
Subject: Relay ident. and response modification

 

Ok, that subject isn't very clear, so let me try to explain.

[I'm kind of grasping for a way to handle a situation that's unusual - at least to me - and so I'm just thinking about ways to go about it. Thus my question might not have a sensible answer/solution.]

Explaining the layout logical and physical is also complicated - so let me just ask this.

I'll have multiple relay agents handling relay of DHCP requests to the DHCP server.

Depending on which relay agent handles the request I want to return a different set of gateways. [Different gateways, but the same subnet.]
So, for example
-request from Client 1 comes through agent A. [Subnet 10.0.0.1/24] and I want to return Gateway X
-request from Client 2 comes through agent B. [Subnet 10.0.0.1/24] and I want to return Gateway Y

Recap: Both client 1 & 2 will get an IP from the same subnet, but will/should get different gateways depending on which relay they use. [I have no other easy way (I can think of) to distinguish the client, other than which relay the request comes through.]

Is this possible?
Pointers as to how?

TIA
-Greg


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Relay ident. and response modification

Simon Hobson
Patrick Trapp <[hidden email]> wrote:

> I have to ask why you want hosts in the same subnet to get a different gateway. Why not just set up separate subnets – if you need traffic to pass between the subnets, let their respective gateways handle that. That’s what gateways do, right?

My best guess is some form of crude load balancing ?

The only thing I can think of involves classes, something like :

class g1 {
  match if GIAddr=10.0.0.1
  set option gateway 10.0.0.1
}
and so on. The syntax there isn't right, sorting that is left as an exercise for the reader ;-)

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Relay ident. and response modification

Gregory Sloop
Re: Relay ident. and response modification


SH> Patrick Trapp <[hidden email]> wrote:

>> I have to ask why you want hosts in the same subnet to get a different gateway. Why not just set up separate subnets – if you need traffic to pass between the subnets, let their respective gateways handle that. That’s what gateways do, right?

SH> My best guess is some form of crude load balancing ?

SH> The only thing I can think of involves classes, something like :

SH> class g1 {
SH>   match if GIAddr=10.0.0.1
SH>   set option gateway 10.0.0.1
SH> }
SH> and so on. The syntax there isn't right, sorting that is left as an exercise for the reader ;-)

SH> _______________________________________________
SH> dhcp-users mailing list
[hidden email]
SH> https://lists.isc.org/mailman/listinfo/dhcp-users

Hmmm. Interesting. Nice idea.
I'll see about that.

Matching, when I've paid attention to it (when it comes up on the list), seems pretty complicated (never works like you'd expect.) Any tips, or good FAQ, docs?

Thanks!
-Greg


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: Relay ident. and response modification

Simon Hobson
Gregory Sloop <[hidden email]> wrote:

> SH> _______________________________________________
> SH> dhcp-users mailing list
> SH> [hidden email]
> SH> https://lists.isc.org/mailman/listinfo/dhcp-users
>
> Hmmm. Interesting. Nice idea.
> I'll see about that.
>
> Matching, when I've paid attention to it (when it comes up on the list), seems pretty complicated (never works like you'd expect.) Any tips, or good FAQ, docs?

In the few cases I've used classes, matching has "just worked" - but you have to be careful to get your expressions right. "man dhcpd.conf" and "man dhcp-eval" (IIRC) give adequate information.

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users