ftp: bind: can't assign requested address

Alexander Dupuy dupuy at cs.columbia.edu
Sat May 20 04:01:48 AEST 1989


The messages describing the cause as being a problem with /etc/hosts were
only partly correct.  If /etc/hosts is incorrect, and you are running yp,
things will generally work, but you will see the FTP problems you
describe.  But the true cause of the problem is not /etc/hosts, it is the
interface configuration.

When a diskless machine boots, it determines its IP address via RARP,
allowing it to load /vmunix, etc.  But even though it knows the IP
address, it doesn't set the IP address in the kernel interface structure.
This must be done with ifconfig.  If the ifconfig in rc.boot fails for
whatever reason, either no entry in /etc/hosts, or other problems, things
will generally work, but you will see the "bind: can't assign requested
address" when running ftp.

A good way to check that this is the problem is to run "ifconfig xx0"
where xx is either ec, ie, or le, as appropriate.  You should see
something like this

ie0: flags=63<UP,BROADCAST,NOTRAILERS,RUNNING>
        inet 128.59.16.20 netmask ffff0000 broadcast 128.59.0.0

If the inet value is garbage, you have this problem.  Try running the
ifconfig commands from rc.boot manually, or edit rc.boot so that errors
messages from ifconfig won't go down the bitbucket (/dev/null).  Here's
the relevant piece of our modified 4.0 rc.boot file:

# 
# Configure primary network interface (and loopback) only.  Other interfaces
# are configured in rc.local.  Try to give some indication on the console if
# there are problems.
# 
opts="up -trailers netmask + broadcast cu-net"
loopopts="up netmask 255.0.0.0"

hostname $hostname
ifconfig ec0 $hostname $opts ||
ifconfig ie0 $hostname $opts ||
ifconfig le0 $hostname $opts ||
ifconfig lo0 $hostname $opts				>/dev/console 2>&1
ifconfig lo0 localhost $loopopts			>/dev/console 2>&1

If you have 3.x, something similar should work.

I remember this all being hashed out quite some time ago on sun-spots; perhaps
Phil should add this to his list of answers to frequently asked sun-spots
questions.

@alex

inet: dupuy at cs.columbia.edu
uucp: ...!rutgers!cs.columbia.edu!dupuy



More information about the Comp.sys.sun mailing list