Need Help. Why dhcrelay agent donot write information into option 82 ?

Glenn Satchell Glenn.Satchell at uniq.com.au
Wed Aug 30 16:37:06 UTC 2006


>Subject: Need Help. Why dhcrelay agent donot write information into option 82 ?
>Date: Wed, 30 Aug 2006 11:20:46 -0400
>From: "York Chen" <ychen at bluecatnetworks.com>
>To: <dhcp-users at isc.org>
>
>Hi All,
> 
>
>I am using Dhcpd(V3.0.4) and Dhclient( V3.0.1) to do some tests on
>option82.
>
> 
>
>1. We wrote dhcpd.conf like this.
>
>......
>
>  subnet 172.18.210.0 netmask 255.255.255.0
>
>  {
>
>    log ( info, "Lease for start ! ");
>
>    if exists agent.circuit-id
>
>    {
>
>      log ( info,concat( "Lease ",binary-to-ascii (10, 8, ".",
>leased-address)," agent.circuit-id exist"));
>
>    }else{
>
>      log ( info,concat( "Lease ",binary-to-ascii (10, 8, ".",
>leased-address)," agent.circuit-id not exist"));
>
>    }
>
>    log ( info, "Lease for end ! ");
>
>    range 172.18.210.10 172.18.210.110;
>
>  }
>
>......
>
> 
>
>2. Start dhcpd in (172.18.210.5)
>
>   /usr/sbin/dhcpd
>
> 
>
>3. Start dhcrelay agent in (eth1:172.20.210.8 , eth0:172.18.210.8)
>
>  /usr/sbin/dhcrelay -d -a -i eth1 172.18.210.8
>
> 
>
>4.Send a dhcp request from a dhclient to dhcrelay agent (172.20.210.3) .
>dhcrelay agent  can relay it  to dhcpd and dhcpd can perform this dhcp
>lease.
>
>   Dhclient also got this ip address 172.18.210.110.
>
> 
>
> 1 lease has been added into dhcpd.leases file :
>
>......
>
>  lease 172.18.210.110 {
>
>    starts 3 2006/08/30 14:27:20;
>
>    ends 4 2006/08/31 14:27:20;
>
>    binding state active;
>
>    next binding state free;
>
>    hardware ethernet 00:30:48:84:01:60;
>
>  }
>
> 
>
>5. Following is the Syslog. I found  agent.circuit-id not exists.
>
>    dhcrelay agent does not write anything in agent.circuit-id.
>
>    
>
>......
>
>Aug 30 10:27:20 new dhcpd: Lease for start !
>
>Aug 30 10:27:20 new dhcpd: Lease 172.18.210.110 agent.circuit-id not
>exist
>
>Aug 30 10:27:20 new dhcpd: Lease for end !
>
>Aug 30 10:27:20 new dhcpd: DHCPREQUEST for 172.18.210.110 from
>00:30:48:84:01:60  via eth0
>
>Aug 30 10:27:20 new dhcpd: DHCPACK on 172.18.210.110 to
>00:30:48:84:01:60 via eth0
>
>......
>
> 
>
>What is wrong? Any suggestions ?
>
> 
>
>thanks in advance.
>
> 
>
>-----------------------------------------------------------------
>
>York Chen 
>
>e-mail: ychen at bluecatnetworks.com
>
>-----------------------------------------------------------------

Hi York,

If the client and dhcp server are on the same subnet, then the dhcp
server will see the original broadcast (DHCPDISCOVER) from the client
and respond directly to it. In this situation the relay agent is not
being used. You can see this in the logs for the DHCPREQUEST and
DHCPACK because it says "via eth0". If it was using the relay agent it
would add "via 172.18.210.8" or whatever the address on the relay was.

You need to test this with a client requesting from a different subnet,
eg 172.20.210.x. Note that you also need to add the eth1 interface to
the dhcrelay startup. Normal practice is to not specify any interfaces
and let dhcrelay listen on all.

regards,
-glenn
--
Glenn Satchell       mailto:glenn.satchell at uniq.com.au  |  Heard about
Uniq Advances Pty Ltd           http://www.uniq.com.au  |  the new Unix
PO Box 70 Paddington NSW Australia 2021                 |  sports car?
tel:0409-458-580   tel:02-9380-6360   fax:02-9380-6416  |  The  rwx



More information about the dhcp-users mailing list