WIDE-DHCPv6 is an IPv6 DHCPv6 implementation. It was originally developed

by the KAME project, but is now maintained separately.
ok naddy@
This commit is contained in:
stsp 2009-01-01 19:01:14 +00:00
parent 3ea4ebd19d
commit 62f2607592
6 changed files with 193 additions and 0 deletions

43
net/wide-dhcpv6/Makefile Normal file
View File

@ -0,0 +1,43 @@
# $OpenBSD: Makefile,v 1.1.1.1 2009/01/01 19:01:14 stsp Exp $
COMMENT= client and servers for the WIDE DHCPv6 protocol
DISTNAME= wide-dhcpv6-20080615
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=wide-dhcpv6/}
HOMEPAGE= http://wide-dhcpv6.sourceforge.net/
MAINTAINER= Stefan Sperling <stsp@stsp.name>
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
CONFIGURE_STYLE= gnu
WANTLIB= c
NO_REGRESS= Yes
do-install:
.for p in dhcp6c dhcp6s dhcp6relay dhcp6ctl
${INSTALL_PROGRAM} ${WRKSRC}/$p ${PREFIX}/sbin
@mv ${WRKSRC}/$p.8 ${WRKSRC}/$p.8.dist
@sed s!/usr/local/etc!${SYSCONFDIR}!g < ${WRKSRC}/$p.8.dist > \
${WRKSRC}/$p.8
${INSTALL_MAN} ${WRKSRC}/$p.8 ${PREFIX}/man/man8
.endfor
.for m in dhcp6c.conf.5 dhcp6s.conf.5
@mv ${WRKSRC}/$m ${WRKSRC}/$m.dist
@sed s!/usr/local/etc!${SYSCONFDIR}!g < ${WRKSRC}/$m.dist > \
${WRKSRC}/$m
${INSTALL_MAN} ${WRKSRC}/$m ${PREFIX}/man/man5
.endfor
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/wide-dhcpv6
${INSTALL_DATA} ${WRKSRC}/dhcp6s.conf.sample \
${PREFIX}/share/examples/wide-dhcpv6/
${INSTALL_DATA} ${WRKSRC}/dhcp6c.conf.sample \
${PREFIX}/share/examples/wide-dhcpv6/
.include <bsd.port.mk>

5
net/wide-dhcpv6/distinfo Normal file
View File

@ -0,0 +1,5 @@
MD5 (wide-dhcpv6-20080615.tar.gz) = EBHhZYUP5A0+My2tK/0wsw==
RMD160 (wide-dhcpv6-20080615.tar.gz) = S32BFd5skLj0h4or8lpf1qzuoTo=
SHA1 (wide-dhcpv6-20080615.tar.gz) = iCnEyHGnTczAM1g5/wpOdjtrTyQ=
SHA256 (wide-dhcpv6-20080615.tar.gz) = VaZhdKHt6r2QApuDyz//jgtjcYpVbOlbl9RkqH/RvYE=
SIZE (wide-dhcpv6-20080615.tar.gz) = 215354

View File

@ -0,0 +1,58 @@
$OpenBSD: patch-dhcp6c_conf_sample,v 1.1.1.1 2009/01/01 19:01:14 stsp Exp $
--- dhcp6c.conf.sample.orig Thu Dec 1 07:35:11 2005
+++ dhcp6c.conf.sample Thu Jul 17 22:32:18 2008
@@ -1,11 +1,30 @@
-# The followings are a sample configuration for requiring the "stateless"
-# DHCPv6 service.
+# The following is an example for use with IPv6 auto-configuration.
+# The "information-only" statement makes dhcp6c exchange informational
+# configuration parameters with servers. A list of DNS server addresses
+# is an example of such parameters. This statement is useful when the
+# client does not need stateful configuration parameters such as IPv6
+# addresses or prefixes.
+
interface ne0 {
information-only;
};
+# The following is a sample configuration for a client on a LAN
+# where IPv6 addresses are assigned via DHCPv6 ("stateful address
+# assignment"). Use this if you want the client to query the
+# DHCPv6 server for an IPv6 address and for DNS servers, as in
+# traditional IPv4 DHCP.
-# The followings are a sample configuration to be delegated an IPv6 prefix
+interface em0 {
+ send ia-na 0;
+ send rapid-commit;
+ send domain-name-servers;
+};
+
+id-assoc na {
+};
+
+# The following is an example configuration for delegation of an IPv6 prefix
# from an upstream service provider. With this configuration dhcp6c will
# send solicit messages containing an IA_PD option, with an IAID 0, on to
# an upstream PPP link, ppp0. After receiving some prefixes from a server,
@@ -22,3 +41,20 @@ id-assoc pd {
sla-id 1;
};
};
+
+# If a shared secret was to be configured in both the client and the server
+# for DHCPv6 authentication, it would be specified in this file as follows:
+
+keyinfo kame-key {
+ realm "kame.net";
+ keyid 1;
+ secret "5pvW2g48OHPvkYMJSw0vZA==";
+};
+
+# And the interface statement would be modified as follows:
+
+interface ppp0 {
+ send ia-pd 0;
+ send authentication kame;
+};
+

View File

@ -0,0 +1,71 @@
$OpenBSD: patch-dhcp6s_conf_sample,v 1.1.1.1 2009/01/01 19:01:14 stsp Exp $
--- dhcp6s.conf.sample.orig Thu Jul 17 22:07:54 2008
+++ dhcp6s.conf.sample Thu Jul 17 22:26:35 2008
@@ -1,5 +1,5 @@
-# The followings are a sample configuration to provide a DNS server address
-# for every client as well as to delegate a permanent IPv6 prefix
+# The following is an example configuration which provides a DNS server
+# address to every client, and also delegates a permanent IPv6 prefix
# 2001:db8:1111::/48 to a client whose DUID is 00:01:00:01:aa:bb.
option domain-name-servers 2001:db8::35;
@@ -9,13 +9,29 @@ host kame {
prefix 2001:db8:1111::/48 infinity;
};
-# The followings are a sample configuration to provide an IPv6 address
-# from an address pool 2001:db8:1:2::1000-2000 for 3600[s].
-# Note. You have to send an RA to fxp0; otherwise a client cannot be sure
-# about the prefix-length and the default router. If you want to prevent
-# stateless address configuration via RA, please set the autonomous-flag to
-# OFF in your RA configuration.
+# If a shared secret was to be configured in both the server and the client
+# for DHCPv6 authentication, it would be specified in this file as follows:
+keyinfo kame {
+ realm "kame.net";
+ keyid 1;
+ secret "5pvW2g48OHPvkYMJSw0vZA==";
+};
+
+# And the host statement would be modified as follows:
+
+host kame {
+ duid 00:01:00:01:aa:bb;
+ prefix 2001:db8:1111::/48 infinity;
+ delayedkey kame;
+};
+
+# The following is an example configuration which provides an IPv6 address
+# from an address pool (2001:db8:1:2::1000-2000) with a lease time of 3600
+# seconds to any client attached to the fxp0 interface. Note that you have
+# to send router advertisements on fxp0, i.e. run rtadvd(8) on that interface.
+# Otherwise a client cannot know the prefix-length and the default router.
+
interface fxp0 {
address-pool pool1 3600;
};
@@ -23,3 +39,23 @@ interface fxp0 {
pool pool1 {
range 2001:db8:1:2::1000 to 2001:db8:1:2::2000 ;
};
+
+# The following is an example configuration which provides fixed IPv6
+# addresses to two known clients. It also provides every client with a
+# DNS server. Note that you have to send router advertisements on fxp0,
+# i.e. run rtadvd(8) on the interface the clients are attached to.
+# Otherwise a client cannot know the prefix-length and the default router.
+
+option domain-name-servers 2001:db8::35;
+
+host puffy {
+ duid 00:01:00:01:0f:5b:29:7f:00:04:5a:35:1e:a1;
+ address 2001:db8:111::180 infinity;
+};
+
+host tux {
+ duid 00:01:00:01:0f:36:5f:31:00:0a:e4:3e:f2:4e;
+ address 2001:db8:111::181 infinity;
+};
+
+

View File

@ -0,0 +1,2 @@
WIDE-DHCPv6 is an IPv6 DHCPv6 implementation. It was originally developed
by the KAME project, but is now maintained separately.

14
net/wide-dhcpv6/pkg/PLIST Normal file
View File

@ -0,0 +1,14 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2009/01/01 19:01:14 stsp Exp $
@man man/man5/dhcp6c.conf.5
@man man/man5/dhcp6s.conf.5
@man man/man8/dhcp6c.8
@man man/man8/dhcp6ctl.8
@man man/man8/dhcp6relay.8
@man man/man8/dhcp6s.8
@bin sbin/dhcp6c
@bin sbin/dhcp6ctl
@bin sbin/dhcp6relay
@bin sbin/dhcp6s
share/examples/wide-dhcpv6/
share/examples/wide-dhcpv6/dhcp6c.conf.sample
share/examples/wide-dhcpv6/dhcp6s.conf.sample