dhcp test

Shawn Routhier sar at isc.org
Thu Nov 29 21:38:24 UTC 2012

On Nov 29, 2012, at 2:10 AM, caterwaul wrote:

> Hi friends,
> I just start to use ISC dhcp(dhcp-4.2.4-P2) and have some questions about its test to ask. Thank you in advance.
> 1  In tests/HOWTO-unit-test
> It says the following directories contain unit tests: client/ common/ dhcpctl/. But actually only common/ directory does. 
> How about other directories?

I believe the intention was to add more tests over time.

> 2 In tests/DHCPv6/README
> It says:
> To use, the DHCPv6 server must be running in test mode to send back to
> the originating port. (The scripts can be changed to bind to the
> appropriate client port, but they don't now, and have to run as root
> to do this). In server/dhcpv6.c, look for this comment:
> /* For testing, we reply to the sending port, so we don't ne ed a root */
> /* client */
> 		to_addr.sin6_port = remote_port;
> /*		to_addr.sin6_port = packet->client_port;*/
> And change the code to use the client_port value.
> How does it work by using client_port generally?
> How to run DHCPv6 in test mode?
I believe the test mode refers to using the test configuration and using
the client port from the incoming packet instead of the well known port.
See the REPLY_TO_SOURCE_PORT option in includes/site.h to enable
this feature.

> 3 In tests/DHCPv6/README
> It says You will need to modify one of the test configuration files to use one of the physical subnets that your machine uses, in the subnet6 statement.
> How should I modify that configuration file in detail? Please give me a example.

See the bottom of tests/DHCPv6/test-a.conf.  There is a stanza of
subnet6 fe80::20c:29ff:fe42:820/128 {

You may need to adjust that to use a subnet known to your machine.

> 4 In tests/DHCPv6
> Are all these pearl script used to test only DHCPv6 server?

> BR/Jim
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20121129/32cb4a91/attachment.html>

More information about the dhcp-users mailing list