Option 122 (aka. 177) Packetcable

Ivan V. Borodin vanchik at yandex.ru
Thu Mar 30 07:32:41 UTC 2006


В ср, 29/03/2006 в 22:29 -0500, Kelvin Williams пишет:
> I have spent the day scouring the web and archives of this list searching
> for the proper way of implementing Option 122 (or Option 177) for the
> provisioning of Packetcable MTAs.  The methods I have found don't seem to
> work properly.
>  
> 
> If anyone could provide a copy of a working dhcpd.conf utilizing Option 122
> or 177 and running on version 3.0.3 - please share.
> 
>  
> Thanks,
> 
> Kw

## dhcpd.conf
##

...
...

## Option 122 for Cablelabs Client Configuration (RFC 3495, RFC 3594)
option space PC-MTA;
option PC-MTA.DHCP-server-1     code 1 = ip-address;
option PC-MTA.DHCP-server-2     code 2 = ip-address;
option PC-MTA.Provision-server  code 3 = { integer 8, string };
#you can use FQDN (first '0') or IP-address (first '1') in this subopt
#option PC-MTA.Provision-server code 3 = { integer 8, ip-address };
option PC-MTA.AS-REQ_AS-REP     code 4 = { integer 32, integer 32, integer 32 };
option PC-MTA.AP-REQ_AP-REP     code 5 = { integer 32, integer 32, integer 32 };
option PC-MTA.Kerberos-realm    code 6 = string;
option PC-MTA.TGS-util          code 7 = integer 8;
option PC-MTA.Provision-timer   code 8 = integer 8;
option PC-MTA.Ticket-ctrl-mask  code 9 = integer 16;
option PC-MTA-122 code 122 = encapsulate PC-MTA;


host PKTC-CM-001 {
	...
	...
	option PC-MTA.DHCP-server-1 192.168.10.1;
}

host PKTC-MTA-001 {
	...
	...
	# ivan.bcs.vimcom.ru
	option PC-MTA.Provision-server 0 04:69:76:61:6e:03:62:63:73:06:76:69:6d:63:6f:6d:02:72:75:00;
	# HYBRYD.2
	option PC-MTA.Kerberos-realm 06:48:59:42:52:49:44:01:32:00;
}


Here is a little Perl script to encode FQDN and Kerberos Realm Names:

#!/usr/bin/perl -w
# Encodes FQDN and Kerberos Realm Names for CCC

use strict;

my $str = shift or die "Usage: $0 <domain or realm name>";
die "Bad name" if ($str =~ m{[ :/@#]});

printf("%-9s: %s\n", "Domain",   convert(lc($str)));
printf("%-9s: %s\n", "Kerberos", convert(uc($str)));
exit;

#######

sub convert {

        my $str = shift;
        my @rez;
        my @labels = (split(/\./, $str));
        push(@rez, length, unpack("C*", $_)) foreach (@labels);
        push(@rez, 0);
        $_ = sprintf("%02x", $_) foreach @rez;
        $str = join(":", @rez);
        return $str;
}
#####################

Use Ethereal or your favorite sniffer to see option 55 (Parameter
Request List) in DHCPDISCOVER from your CM and MTA (or carefully read
PacketCable specs from www.packetcable.com). However, carefully read all
RFCs (and corresponding RFCs too :) ).



More information about the dhcp-users mailing list