Discussion:
Option 43?
Tina Siegenthaler
2008-02-29 15:02:47 UTC
Permalink
Hi list

We recently bought an UPS from APC with a network card that should
allow administration of the UPS over the network. However, I can't get
it to accept a IP address from our DHCP server. According to the
manual of the UPS network card, it will first look for a BOOTP server
(which it does), and when it doesn't find one will then check for a
DHCP server. And indeed, that is what I'm seeing in the dhcpd.log:

Feb 29 15:06:52 zoolse0339 dhcpd: BOOTREQUEST from 00:c0:b7:73:37:74
via en0: BOOTP from dynamic client and no dynamic leases

(repeated many times)

then, after about 13 minutes, it finally tries DHCP:

Feb 29 15:19:58 zoolse0339 dhcpd: DHCPDISCOVER from 00:c0:b7:73:37:74
via en0
Feb 29 15:19:59 zoolse0339 dhcpd: DHCPOFFER on 130.60.225.18 to
00:c0:b7:73:37:74 via en0
Feb 29 15:21:03 zoolse0339 dhcpd: DHCPREQUEST for 130.60.225.18
(130.60.23.4) from 00:c0:b7:73:37:74 via en0
Feb 29 15:21:03 zoolse0339 dhcpd: DHCPACK on 130.60.225.18 to
00:c0:b7:73:37:74 via en0

which seems to work, at least at first. I can ping the IP, but about
15 seconds later, it starts again issuing BOOTREQUESTS:

Feb 29 15:21:18 zoolse0339 dhcpd: BOOTREQUEST from 00:c0:b7:73:37:74
via en0: BOOTP from dynamic client and no dynamic leases

and I can no longer ping it. 15 minutes later it tries again a
DHCPDISCOVER etc etc...

Now, the manual of the UPS also states:

"A properly configured DHCP server responds with a DHCP offer that
includes all the setting that the (network) Management Card needs for
network communication. The DHCP offer also includes the Vendor
Specific Information option (DHCP option 43). By default, the
Management Card ignores DHCP offers that do not encapsulate the APC
cookie in DHCP option 43 using the following hexadecimal format:
Option 43 = 01 04 31 41 50 43
where
- the first byte (01) is the code
- the second byte (04) is the length
- the remaining bytes (31 41 50 43) are the APC cookie."

Well, that seems pretty clear, but obviously, the UPS network card is
not ignoring the OFFER, but accepts it at first, but then decides to
drop the assigned IP after some time...

I did a tcpdump on the DHCP server to check what the UPS is sending
and what the DHCP server sends back. The UPS sends this DHCPDISCOVER:

Bootstrap Protocol
Message type: Boot Request (1)
Hardware type: Ethernet
Hardware address length: 6
Hops: 1
Transaction ID: 0x0000e86e
Seconds elapsed: 64
Bootp flags: 0x0000 (Unicast)
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 0.0.0.0 (0.0.0.0)
Next server IP address: 0.0.0.0 (0.0.0.0)
Relay agent IP address: 130.60.225.1 (130.60.225.1)
Client MAC address: American_73:37:74 (00:c0:b7:73:37:74)
Server host name not given
Boot file name not given
Magic cookie: (OK)
Option: (t=53,l=1) DHCP Message Type = DHCP Request
Option: (53) DHCP Message Type
Length: 1
Value: 03
Option: (t=61,l=10) Client identifier
Option: (61) Client identifier
Length: 10
Value: 0000C0B7733774000000
Option: (t=50,l=4) Requested IP Address = 130.60.225.18
Option: (50) Requested IP Address
Length: 4
Value: 823CE112
Option: (t=54,l=4) Server Identifier = 130.60.225.4
Option: (54) Server Identifier
Length: 4
Value: 823CE104
Option: (t=55,l=14) Parameter Request List
Option: (55) Parameter Request List
Length: 14
Value: 0603010F42430D2C2B3A3B2A020C
6 = Domain Name Server
3 = Router
1 = Subnet Mask
15 = Domain Name
66 = TFTP Server Name
67 = Bootfile name
13 = Boot File Size
44 = NetBIOS over TCP/IP Name Server
43 = Vendor-Specific Information
58 = Renewal Time Value
59 = Rebinding Time Value
42 = Network Time Protocol Servers
2 = Time Offset
12 = Host Name
Option: (t=60,l=3) Vendor class identifier = "APC"
Option: (60) Vendor class identifier
Length: 3
Value: 415043
Option: (t=61,l=7) Client identifier
Option: (61) Client identifier
Length: 7
Value: 0100C0B7733774
Hardware type: Ethernet
Client MAC address: American_73:37:74 (00:c0:b7:73:37:74)
Option: (t=77,l=4) User Class Information
Option: (77) User Class Information
Length: 4
Value: 53554D58
End Option

I can't see an option 43 here??? There's an option 60 which contains
the vendor class identifier "APC"... Forgive me if I'm being stupid,
but I have no experience with these options, we just have a very plain
DHCP server setup...

The OFFER that the server send back looks like this:

Bootstrap Protocol
Message type: Boot Reply (2)
Hardware type: Ethernet
Hardware address length: 6
Hops: 1
Transaction ID: 0x0000e86e
Seconds elapsed: 64
Bootp flags: 0x0000 (Unicast)
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 130.60.225.18 (130.60.225.18)
Next server IP address: 0.0.0.0 (0.0.0.0)
Relay agent IP address: 130.60.225.1 (130.60.225.1)
Client MAC address: American_73:37:74 (00:c0:b7:73:37:74)
Server host name not given
Boot file name not given
Magic cookie: (OK)
Option: (t=53,l=1) DHCP Message Type = DHCP Offer
Option: (53) DHCP Message Type
Length: 1
Value: 02
Option: (t=54,l=4) Server Identifier = 130.60.23.4
Option: (54) Server Identifier
Length: 4
Value: 823C1704
Option: (t=51,l=4) IP Address Lease Time = 6 hours
Option: (51) IP Address Lease Time
Length: 4
Value: 00005460
Option: (t=6,l=8) Domain Name Server
Option: (6) Domain Name Server
Length: 8
Value: 823C8003823C4033
IP Address: 130.60.128.3
IP Address: 130.60.64.51
Option: (t=3,l=4) Router = 130.60.225.1
Option: (3) Router
Length: 4
Value: 823CE101
Option: (t=1,l=4) Subnet Mask = 255.255.255.128
Option: (1) Subnet Mask
Length: 4
Value: FFFFFF80
Option: (t=15,l=6) Domain Name = "uzh.ch"
Option: (15) Domain Name
Length: 6
Value: 757A682E6368
Option: (t=58,l=4) Renewal Time Value = 3 hours
Option: (58) Renewal Time Value
Length: 4
Value: 00002A30
Option: (t=59,l=4) Rebinding Time Value = 5 hours, 15 minutes
Option: (59) Rebinding Time Value
Length: 4
Value: 000049D4
End Option
Padding


It obviously contains no option 43. OK, it seems that I somehow have
to include this vendor specific information option in the OFFER, so
that if a client sends option 60 = 41 50 43, the server will include
option 43 = 01 04 31 41 50 43 in its OFFER. Any hints how I should be
doing this? The UPS already has its own class and subclass. can I
include option 43 there?

TIA, Tina
Perry, Keith
2008-02-29 15:47:54 UTC
Permalink
Option 43 is used by the client so that it will accept a DHCP offer only
from a DHCP server specifically configured for it. Sounds like you need
to specify the string "APC" as a vendor encapsulated option for the APC
UPS to work properly. Option 60 can be used to place the APC UPS in a
class. The example configuration snippet below shows how to create a
class using Option 60, assign a device within that class to a subnet,
and send the correct Option 43 string in the DHCP offer.

************************************************************************
*
# The following class identifier is used by the APC UPS: "APC"

class "APCUPS" {
match if substring (option vendor-class-identifier, 0, 3) = "APC";
}


# The following line populates the lease file with the Vendor Class
Identifier that the client sends.

set vendor-string = option vendor-class-identifier;


# APC Network
subnet 10.1.0.0 netmask 255.255.192.0 {
pool {
deny dynamic bootp clients;
option routers 10.1.63.254;
option broadcast-address 10.1.63.255;
option subnet-mask 255.255.192.0;
range 10.1.0.201 10.1.63.250;
authoritative;
filename "APC.bin";
next-server 10.1.0.1;
option vendor-encapsulated-options "APC";
allow members of "APCUPS";
ping-check TRUE;
************************************************************************
*

Keith Perry


-----Original Message-----
From: dhcp-users-***@isc.org [mailto:dhcp-users-***@isc.org] On
Behalf Of Tina Siegenthaler
Sent: Friday, February 29, 2008 10:03 AM
To: dhcp-***@isc.org
Subject: Option 43?

Hi list

We recently bought an UPS from APC with a network card that should allow
administration of the UPS over the network. However, I can't get it to
accept a IP address from our DHCP server. According to the manual of the
UPS network card, it will first look for a BOOTP server (which it does),
and when it doesn't find one will then check for a DHCP server. And
indeed, that is what I'm seeing in the dhcpd.log:

Feb 29 15:06:52 zoolse0339 dhcpd: BOOTREQUEST from 00:c0:b7:73:37:74 via
en0: BOOTP from dynamic client and no dynamic leases

(repeated many times)

then, after about 13 minutes, it finally tries DHCP:

Feb 29 15:19:58 zoolse0339 dhcpd: DHCPDISCOVER from 00:c0:b7:73:37:74
via en0 Feb 29 15:19:59 zoolse0339 dhcpd: DHCPOFFER on 130.60.225.18 to
00:c0:b7:73:37:74 via en0
Feb 29 15:21:03 zoolse0339 dhcpd: DHCPREQUEST for 130.60.225.18
(130.60.23.4) from 00:c0:b7:73:37:74 via en0 Feb 29 15:21:03 zoolse0339
dhcpd: DHCPACK on 130.60.225.18 to
00:c0:b7:73:37:74 via en0

which seems to work, at least at first. I can ping the IP, but about
15 seconds later, it starts again issuing BOOTREQUESTS:

Feb 29 15:21:18 zoolse0339 dhcpd: BOOTREQUEST from 00:c0:b7:73:37:74 via
en0: BOOTP from dynamic client and no dynamic leases

and I can no longer ping it. 15 minutes later it tries again a
DHCPDISCOVER etc etc...

Now, the manual of the UPS also states:

"A properly configured DHCP server responds with a DHCP offer that
includes all the setting that the (network) Management Card needs for
network communication. The DHCP offer also includes the Vendor Specific
Information option (DHCP option 43). By default, the Management Card
ignores DHCP offers that do not encapsulate the APC cookie in DHCP
option 43 using the following hexadecimal format:
Option 43 = 01 04 31 41 50 43
where
- the first byte (01) is the code
- the second byte (04) is the length
- the remaining bytes (31 41 50 43) are the APC cookie."

Well, that seems pretty clear, but obviously, the UPS network card is
not ignoring the OFFER, but accepts it at first, but then decides to
drop the assigned IP after some time...

I did a tcpdump on the DHCP server to check what the UPS is sending
and what the DHCP server sends back. The UPS sends this DHCPDISCOVER:

Bootstrap Protocol
Message type: Boot Request (1)
Hardware type: Ethernet
Hardware address length: 6
Hops: 1
Transaction ID: 0x0000e86e
Seconds elapsed: 64
Bootp flags: 0x0000 (Unicast)
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 0.0.0.0 (0.0.0.0)
Next server IP address: 0.0.0.0 (0.0.0.0)
Relay agent IP address: 130.60.225.1 (130.60.225.1)
Client MAC address: American_73:37:74 (00:c0:b7:73:37:74)
Server host name not given
Boot file name not given
Magic cookie: (OK)
Option: (t=53,l=1) DHCP Message Type = DHCP Request
Option: (53) DHCP Message Type
Length: 1
Value: 03
Option: (t=61,l=10) Client identifier
Option: (61) Client identifier
Length: 10
Value: 0000C0B7733774000000
Option: (t=50,l=4) Requested IP Address = 130.60.225.18
Option: (50) Requested IP Address
Length: 4
Value: 823CE112
Option: (t=54,l=4) Server Identifier = 130.60.225.4
Option: (54) Server Identifier
Length: 4
Value: 823CE104
Option: (t=55,l=14) Parameter Request List
Option: (55) Parameter Request List
Length: 14
Value: 0603010F42430D2C2B3A3B2A020C
6 = Domain Name Server
3 = Router
1 = Subnet Mask
15 = Domain Name
66 = TFTP Server Name
67 = Bootfile name
13 = Boot File Size
44 = NetBIOS over TCP/IP Name Server
43 = Vendor-Specific Information
58 = Renewal Time Value
59 = Rebinding Time Value
42 = Network Time Protocol Servers
2 = Time Offset
12 = Host Name
Option: (t=60,l=3) Vendor class identifier = "APC"
Option: (60) Vendor class identifier
Length: 3
Value: 415043
Option: (t=61,l=7) Client identifier
Option: (61) Client identifier
Length: 7
Value: 0100C0B7733774
Hardware type: Ethernet
Client MAC address: American_73:37:74 (00:c0:b7:73:37:74)
Option: (t=77,l=4) User Class Information
Option: (77) User Class Information
Length: 4
Value: 53554D58
End Option

I can't see an option 43 here??? There's an option 60 which contains the
vendor class identifier "APC"... Forgive me if I'm being stupid, but I
have no experience with these options, we just have a very plain DHCP
server setup...

The OFFER that the server send back looks like this:

Bootstrap Protocol
Message type: Boot Reply (2)
Hardware type: Ethernet
Hardware address length: 6
Hops: 1
Transaction ID: 0x0000e86e
Seconds elapsed: 64
Bootp flags: 0x0000 (Unicast)
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 130.60.225.18 (130.60.225.18)
Next server IP address: 0.0.0.0 (0.0.0.0)
Relay agent IP address: 130.60.225.1 (130.60.225.1)
Client MAC address: American_73:37:74 (00:c0:b7:73:37:74)
Server host name not given
Boot file name not given
Magic cookie: (OK)
Option: (t=53,l=1) DHCP Message Type = DHCP Offer
Option: (53) DHCP Message Type
Length: 1
Value: 02
Option: (t=54,l=4) Server Identifier = 130.60.23.4
Option: (54) Server Identifier
Length: 4
Value: 823C1704
Option: (t=51,l=4) IP Address Lease Time = 6 hours
Option: (51) IP Address Lease Time
Length: 4
Value: 00005460
Option: (t=6,l=8) Domain Name Server
Option: (6) Domain Name Server
Length: 8
Value: 823C8003823C4033
IP Address: 130.60.128.3
IP Address: 130.60.64.51
Option: (t=3,l=4) Router = 130.60.225.1
Option: (3) Router
Length: 4
Value: 823CE101
Option: (t=1,l=4) Subnet Mask = 255.255.255.128
Option: (1) Subnet Mask
Length: 4
Value: FFFFFF80
Option: (t=15,l=6) Domain Name = "uzh.ch"
Option: (15) Domain Name
Length: 6
Value: 757A682E6368
Option: (t=58,l=4) Renewal Time Value = 3 hours
Option: (58) Renewal Time Value
Length: 4
Value: 00002A30
Option: (t=59,l=4) Rebinding Time Value = 5 hours, 15 minutes
Option: (59) Rebinding Time Value
Length: 4
Value: 000049D4
End Option
Padding


It obviously contains no option 43. OK, it seems that I somehow have to
include this vendor specific information option in the OFFER, so that if
a client sends option 60 = 41 50 43, the server will include option 43 =
01 04 31 41 50 43 in its OFFER. Any hints how I should be doing this?
The UPS already has its own class and subclass. can I include option 43
there?

TIA, Tina












- - - - - Appended by Scientific Atlanta, a Cisco company - - - - -
This e-mail and any attachments may contain information which is confidential,
proprietary, privileged or otherwise protected by law. The information is solely
intended for the named addressee (or a person responsible for delivering it to
the addressee). If you are not the intended recipient of this message, you are
not authorized to read, print, retain, copy or disseminate this message or any
part of it. If you have received this e-mail in error, please notify the sender
immediately by return e-mail and delete it from your computer.
Glenn Satchell
2008-03-01 12:42:01 UTC
Permalink
Hi Tina

Yes, you need to define you option 43. See the dhcp-options man page -
this describes all the standard DHCP options. Look for the section
titled "VENDOR ENCAPSULATED OPTIONS", which is option 43. If you
already have a class for APC units, then that would be a good place to
define option 43 as it will be defined for all devices that match the
class. The simplest way to define the value is something like this:

option vendor-encapsulated-options 01:04:31:41:50:43;

DHCP option names and numbers are listed in RFC1533, and in the ISC
DHCPD source file common/tables.c

regards,
-glenn
Post by Perry, Keith
Subject: Option 43?
Date: Fri, 29 Feb 2008 16:02:47 +0100
Hi list
We recently bought an UPS from APC with a network card that should
allow administration of the UPS over the network. However, I can't get
it to accept a IP address from our DHCP server. According to the
manual of the UPS network card, it will first look for a BOOTP server
(which it does), and when it doesn't find one will then check for a
Feb 29 15:06:52 zoolse0339 dhcpd: BOOTREQUEST from 00:c0:b7:73:37:74
via en0: BOOTP from dynamic client and no dynamic leases
(repeated many times)
Feb 29 15:19:58 zoolse0339 dhcpd: DHCPDISCOVER from 00:c0:b7:73:37:74
via en0
Feb 29 15:19:59 zoolse0339 dhcpd: DHCPOFFER on 130.60.225.18 to
00:c0:b7:73:37:74 via en0
Feb 29 15:21:03 zoolse0339 dhcpd: DHCPREQUEST for 130.60.225.18
(130.60.23.4) from 00:c0:b7:73:37:74 via en0
Feb 29 15:21:03 zoolse0339 dhcpd: DHCPACK on 130.60.225.18 to
00:c0:b7:73:37:74 via en0
which seems to work, at least at first. I can ping the IP, but about
Feb 29 15:21:18 zoolse0339 dhcpd: BOOTREQUEST from 00:c0:b7:73:37:74
via en0: BOOTP from dynamic client and no dynamic leases
and I can no longer ping it. 15 minutes later it tries again a
DHCPDISCOVER etc etc...
"A properly configured DHCP server responds with a DHCP offer that
includes all the setting that the (network) Management Card needs for
network communication. The DHCP offer also includes the Vendor
Specific Information option (DHCP option 43). By default, the
Management Card ignores DHCP offers that do not encapsulate the APC
Option 43 = 01 04 31 41 50 43
where
- the first byte (01) is the code
- the second byte (04) is the length
- the remaining bytes (31 41 50 43) are the APC cookie."
Well, that seems pretty clear, but obviously, the UPS network card is
not ignoring the OFFER, but accepts it at first, but then decides to
drop the assigned IP after some time...
I did a tcpdump on the DHCP server to check what the UPS is sending
Bootstrap Protocol
Message type: Boot Request (1)
Hardware type: Ethernet
Hardware address length: 6
Hops: 1
Transaction ID: 0x0000e86e
Seconds elapsed: 64
Bootp flags: 0x0000 (Unicast)
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 0.0.0.0 (0.0.0.0)
Next server IP address: 0.0.0.0 (0.0.0.0)
Relay agent IP address: 130.60.225.1 (130.60.225.1)
Client MAC address: American_73:37:74 (00:c0:b7:73:37:74)
Server host name not given
Boot file name not given
Magic cookie: (OK)
Option: (t=53,l=1) DHCP Message Type = DHCP Request
Option: (53) DHCP Message Type
Length: 1
Value: 03
Option: (t=61,l=10) Client identifier
Option: (61) Client identifier
Length: 10
Value: 0000C0B7733774000000
Option: (t=50,l=4) Requested IP Address = 130.60.225.18
Option: (50) Requested IP Address
Length: 4
Value: 823CE112
Option: (t=54,l=4) Server Identifier = 130.60.225.4
Option: (54) Server Identifier
Length: 4
Value: 823CE104
Option: (t=55,l=14) Parameter Request List
Option: (55) Parameter Request List
Length: 14
Value: 0603010F42430D2C2B3A3B2A020C
6 = Domain Name Server
3 = Router
1 = Subnet Mask
15 = Domain Name
66 = TFTP Server Name
67 = Bootfile name
13 = Boot File Size
44 = NetBIOS over TCP/IP Name Server
43 = Vendor-Specific Information
58 = Renewal Time Value
59 = Rebinding Time Value
42 = Network Time Protocol Servers
2 = Time Offset
12 = Host Name
Option: (t=60,l=3) Vendor class identifier = "APC"
Option: (60) Vendor class identifier
Length: 3
Value: 415043
Option: (t=61,l=7) Client identifier
Option: (61) Client identifier
Length: 7
Value: 0100C0B7733774
Hardware type: Ethernet
Client MAC address: American_73:37:74 (00:c0:b7:73:37:74)
Option: (t=77,l=4) User Class Information
Option: (77) User Class Information
Length: 4
Value: 53554D58
End Option
I can't see an option 43 here??? There's an option 60 which contains
the vendor class identifier "APC"... Forgive me if I'm being stupid,
but I have no experience with these options, we just have a very plain
DHCP server setup...
Bootstrap Protocol
Message type: Boot Reply (2)
Hardware type: Ethernet
Hardware address length: 6
Hops: 1
Transaction ID: 0x0000e86e
Seconds elapsed: 64
Bootp flags: 0x0000 (Unicast)
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 130.60.225.18 (130.60.225.18)
Next server IP address: 0.0.0.0 (0.0.0.0)
Relay agent IP address: 130.60.225.1 (130.60.225.1)
Client MAC address: American_73:37:74 (00:c0:b7:73:37:74)
Server host name not given
Boot file name not given
Magic cookie: (OK)
Option: (t=53,l=1) DHCP Message Type = DHCP Offer
Option: (53) DHCP Message Type
Length: 1
Value: 02
Option: (t=54,l=4) Server Identifier = 130.60.23.4
Option: (54) Server Identifier
Length: 4
Value: 823C1704
Option: (t=51,l=4) IP Address Lease Time = 6 hours
Option: (51) IP Address Lease Time
Length: 4
Value: 00005460
Option: (t=6,l=8) Domain Name Server
Option: (6) Domain Name Server
Length: 8
Value: 823C8003823C4033
IP Address: 130.60.128.3
IP Address: 130.60.64.51
Option: (t=3,l=4) Router = 130.60.225.1
Option: (3) Router
Length: 4
Value: 823CE101
Option: (t=1,l=4) Subnet Mask = 255.255.255.128
Option: (1) Subnet Mask
Length: 4
Value: FFFFFF80
Option: (t=15,l=6) Domain Name = "uzh.ch"
Option: (15) Domain Name
Length: 6
Value: 757A682E6368
Option: (t=58,l=4) Renewal Time Value = 3 hours
Option: (58) Renewal Time Value
Length: 4
Value: 00002A30
Option: (t=59,l=4) Rebinding Time Value = 5 hours, 15 minutes
Option: (59) Rebinding Time Value
Length: 4
Value: 000049D4
End Option
Padding
It obviously contains no option 43. OK, it seems that I somehow have
to include this vendor specific information option in the OFFER, so
that if a client sends option 60 = 41 50 43, the server will include
option 43 = 01 04 31 41 50 43 in its OFFER. Any hints how I should be
doing this? The UPS already has its own class and subclass. can I
include option 43 there?
TIA, Tina
Tina Siegenthaler
2008-03-03 11:14:30 UTC
Permalink
Hi Keith, hi Glenn

Thanks for your help! Now it's working, the UPS gets its IP. Since we
have only this one UPS, plus it is the only device on our net that
needs vendor specific options, I went with the simpler solution of
Glenn, just adding "option vendor-encapsulated-options
01:04:31:41:50:43" to the already existing class of the UPS (which
matches the device based on the hardware address). The solution of
Keith was a bit too complicated for me, even if it is probably more
flexible.
Meanwhile, I've looked up option 43 also in the DHCP Handbook, so that
I'm now understanding what this is about and what I've been adding to
my config (always a good thing, to know what' you're doing :-)).

So, thanks again for the wuick help!

Tina

Continue reading on narkive:
Loading...