|
Matching option agent.remote-id: msg#00374network.dhcp.isc.dhcp-server
*** From dhcp-server -- To unsubscribe, see the end of this message. *** Hello, We have been running a config for Cisco DSL NAS (NRP), with this bit in it (Redhat 7.3, dhcp-3.0pl2): class "default-economy" { spawn with option agent.remote-id; lease limit 1; } This works fine, each DSL line get's no more than 1 lease. We are now adding more NAS'es, and like customers from all NAS'es to receive a single IP address from the pool, but we like to decide what 'option routers' to hand out based on the NAS IP address. Our option 82 looks like this: 1:1:0:0:aa:b1:cc:26:30:4:0:2b; where bytes 5-9 (aa:b1:cc:26:30) are unique for each NAS. We have tried many different ways to match this, and base 'option routers' on it (using different classes, subclasses, 'if substring' statements). This is the last thing we tried: subnet xxx.xxx.128.0 netmask 255.255.128.0 { if ( substring (option agent.remote-id,4,5) = "aa:b1:cc:26:30" ) { option routers xxx.xxx.188.1; } else { option routers xxx.xxx.191.1; } authoritive; option subnet-mask 255.255.128.0; option domain-name "x.nl"; option domain-name-servers ns1.x.nl, ns2.x.nl; pool { allow members of "default-economy"; range xxx.xxx.188.10 xxx.xxx.188.254; range xxx.xxx.189.10 xxx.xxx.189.254; range xxx.xxx.190.10 xxx.xxx.190.254; range xxx.xxx.191.10 xxx.xxx.191.254; } } (Yes the subnet is a /17, we use proxyarp on the NAS'es) Somehow the matching never works, and the routers option in the lease is always xxx.xxx.191.1. It's not the syntax of the 'if substring' statement I think, as we tried this with classes as well, something like this: class "test1" { match if (same expr as above) match option agent.remote-id option routers xxx.xxx.188.1 lease limit 1 } class "test2" { match if (different expression) match option agent.remote-id option routers xxx.xxx.191.1 lease limit 1 } subnet { allow members of test1 allow members of test2 } In this case we got a 'no free leases' in the logfile, I think meaning that the option agent.remote-id hadn't matched either of the classes. Can anyone advice what we might be doing wrong? Thanks in advance, -- Nicolai van der Smagt UNIX Support Engineer BBned NV. PO Box 692 2130 AR Hoofddorp phone +31 23 565 9999 http://www.vandersmagt.nl/pgp-public-key.txt -- Attached file included as plaintext by Ecartis -- -- File: signature.asc -- Desc: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQA+N9whlptd+vdAeegRAgLIAJ9/0U/UXQmImx25X2rKUi9AZ7GPSgCfSzJZ lvlQT7w8SZh1P1AN2VlGvk8= =g7Q3 -----END PGP SIGNATURE----- ----------------------------------------------------------------------- List Archives : http://www.isc.org/ml-archives/dhcp-server/ Unsubscribe : http://www.isc.org/dhcp-lists.html -or- : mailto:dhcp-server-request@xxxxxxx?Subject=unsubscribe ----------------------------------------------------------------------- |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: dhcp leases expire before they start!: 00374, Simon Hobson |
|---|---|
| Next by Date: | Re: Anyone using Arris Cornerstone 1000?: 00374, Justin Ellison |
| Previous by Thread: | dhcp leases expire before they start!i: 00374, luke dobson |
| Next by Thread: | Re: Matching option agent.remote-id: 00374, Nicolai van der Smagt |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |