macos script

Daniel Le daniel.le at exfo.com
Tue Nov 3 04:17:29 UTC 2009


An add-on note: in reading the output again, I realized that the client
does receive advertisements from the server, re. RCV: Advertise message
on eth0 from fe80::21e:f7ff:fe84:85c3.

-----Original Message-----
From: Daniel Le 
Sent: Monday, November 02, 2009 10:56 PM
To: 'Jeremy C. Reed'
Cc: dhcp-users at lists.isc.org
Subject: RE: macos script

Jeremy, thanks. I appreciate it.

You're right. I replaced "#!/bin/bash" with "#!/bin/sh" and dhclient was
able to recognize and run the Linux dhclient-script, i.e. no error
message of " execve (/sbin/dhclient-script, ...): No such file or
directory". I also replaced "ip=/sbin/ip" with "ip=/bin/ip" as my Linux
platform installs the ip program under /bin.

However, I am still not out of the wood yet with the rest, and really
hope you can spend some more cycles to look at the following.

New output of "dhclient -6 -d -v"
=============================
/sbin #dhclient -6 -d -v
Internet Systems Consortium DHCP Client 4.1.0p1
Copyright 2004-2009 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

ip: either "dev" is duplicate, or "permanent" is a garbage.
Bound to *:546
Listening on Socket/eth0
Sending on   Socket/eth0
PRC: Soliciting for leases (INIT).

------- REPETITIVE PART --------------------
XMT: Forming Solicit, 0 ms elapsed.
XMT:  X-- IA_NA 17:26:70:03
XMT:  | X-- Request renew in  +3600
XMT:  | X-- Request rebind in +5400
XMT: Solicit on eth0, interval 1050ms.
RCV: Advertise message on eth0 from fe80::21e:f7ff:fe84:85c3.
RCV:  X-- IA_NA 17:26:70:03
RCV:  | X-- starts 1257215311
RCV:  | X-- t1 - renew  +0
RCV:  | X-- t2 - rebind +0
RCV:  | X-- [Options]
RCV:  X-- Server ID: 00:03:00:01:00:1e:f7:84:85:80
IA_NA status code NoAddrsAvail: "NOADDRS-AVAIL"
PRC: Lease failed to satisfy.
----------------------------------------------
XMT: Forming Solicit, 1050 ms elapsed.
XMT:  X-- IA_NA 17:26:70:03
XMT:  | X-- Request renew in  +3600
XMT:  | X-- Request rebind in +5400
XMT: Solicit on eth0, interval 2070ms.
RCV: Advertise message on eth0 from fe80::21e:f7ff:fe84:85c3.
RCV:  X-- IA_NA 17:26:70:03
RCV:  | X-- starts 1257215312
RCV:  | X-- t1 - renew  +0
RCV:  | X-- t2 - rebind +0
RCV:  | X-- [Options]
RCV:  X-- Server ID: 00:03:00:01:00:1e:f7:84:85:80
IA_NA status code NoAddrsAvail: "NOADDRS-AVAIL"
PRC: Lease failed to satisfy.
...

1. Does the repetitive error message "IA_NA status code NoAddrsAvail:
"NOADDRS-AVAIL"; PRC: Lease failed to satisfy" mean the DHCPv6 server (a
Cisco router C3750 and is the only server in my test setup) has not
joint the multicast group All_DHCP_Relay_Agents_and_Servers(ff05: :1:2)
on the interface where it accepts incoming DHCPv6 messages, or the
server has no IPv6 addresses configured in its pool, or no useable IPv6
addresses in the IA, and so the client keeps retrying, in its init
state, to  collect DHCPv6 advertisements from DHCPv6 servers (following
client's Solicit message) until some timeout? Interestingly, I do seem
to get a good IPv6 *global* address after I ran the dhclient command, or
perhaps it came from the IPv6 Neighboring Discovery stateless address
autoconfiguration?

2. Do I need to specify the -s <DHCPv6 server address>, or there is no
need because the client uses by default the well-known link scope
multicast All_DHCP_Relay_Agents_and_Servers(ff05: :1:2)? I see that the
client does correctly listen on (bound to) UDP port 546.

3. Is it ok to not use the dhclient command argument -cf
<path/dhclient.conf" to get an IPv6 dynamic address from a DHCPv6 server
in a same link/subnet?

4. If dhclient.conf configuration file is used, can multiple network
interfaces share a same dhclient.conf file, or should each interface
uses a separate config file? My plan is to run one dhclient process per
network interface, e.g. invoke one dhclient command per interface:
dhclient eth0, dhclient eth1, dhclient eth2, instead of dhclient eth0
eth1 eth3.

5. What does " ip: either "dev" is duplicate, or "permanent" is a
garbage" refer to?


-----Original Message-----
From: Jeremy C. Reed [mailto:jreed at isc.org] 
Sent: Monday, November 02, 2009 8:45 PM
To: Daniel Le
Cc: dhcp-users at lists.isc.org
Subject: RE: macos script

On Mon, 2 Nov 2009, Daniel Le wrote:

>> From: Jeremy C. Reed [mailto:jreed at isc.org] 
>> Does /bin/bash exist?
>> 
>> ls -ld /bin/bash

> Glad that you asked! My Linux platform does not bash shell.
> /etc #ls -ld /bin/bash
> ls: /bin/bash: No such file or directory
> 
> It uses BusyBox Ash shell (#!/bin/sh). Is it possible to workaround
> this? I hope I don't have to rewrite dhclient-script.

>From a quick look, I didn't see any BASHisms and it says it is based on 
the NetBSD script. (I believe that "Ash" and NetBSD "sh" have similar 
lineage, but I don't know about the "BusyBox" version of it.) I assume 
#!/bin/sh would be better. Please try that and report if you have any 
problems.


Jeremy C. Reed


echo "V'q" hfr ArgOFQ hfreynaq jvgu Yvahk vafgrnq bs OhflObk. | \
 tr "OQVYAFnqrsuvyabefghjkl" "BDILNSadefhilnorstuwxy"



More information about the dhcp-users mailing list