Subject: Re: Can't assign requested address
To: chandru <chandrashekhar.mullaparthi@gmail.com>
From: Brian Buhrow <buhrow@lothlorien.nfbcal.org>
List: port-i386
Date: 11/08/2005 07:48:22
	What's the lease time on your dhcp address?  What happens if you
assign an address manually?  Can you telnet to a port on your MAC
successfully?
	Two possibilities come to mind:

1.  The lease time on your dhcp address is short enough that dhclient is
dropping it before you can connect to anything.  This seems highly
unlikely, given your output, but it occurs to me, so I offer it up for what
it's worth.

2.  More likely, the problem is actually on your MAC.  I think if you were
to run tcpdump on your fxp0 interface while trying to connect to an outside
address, you'd find that the MAC sends back a response which causes errno
to be set to 49, which is throwoing you off the scent of the problem.  the
MAC is doing the NAT, right, is the ADSL router also doing NAT?  Are you
somehow getting tripped up by double NAT?

	In any case, a little time with tcpdump on the fxp0 interface on your
NetBSD box will, I think, be quite enlightening.  It will answer the
question, is the problem local or remote, where remote is the MAC, and
remote is in the NetBSD box itself.
-Brian
On Nov 8,  2:25pm, chandru wrote:
} Subject: Re: Can't assign requested address
} I can reproduce this error by writing a simple C program which tries
} to connect to port 80 on a given IP address. It is the connect() call
} which is failing with errno set to 49 (pretty obvious but I wanted to
} make sure). This must be a problem with my setup but I can't figure
} out what it is.
} 
} cheers
} Chandru
} 
} On 08/11/05, chandru <chandrashekhar.mullaparthi@gmail.com> wrote:
} > All,
} >
} > using: NetBSD-2.1
} > network topology:
} >
} > NetBSD machine
} >           |
} >           | Cross over cable
} >           V
} >          Mac (with Internet connection sharing)
} >           |
} >           |  WiFi
} >           V
} > ADSL modem
} >
} > - I've started dhclient on the BSD machine and it has an IP
} > address(192.168.2.3).
} >
} > # ifconfig fxp0
} > fxp0 : flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
} >            address: 00:d0:59:16:54:ec
} >            media : Ethernet autoselect (100baseTX full-duplex)
} >            status : active
} >            inet 192.168.2.3 netmask 0xffffff00 broadcast 192.168.2.255
} >            inet6 fe80::2d0:59ff:fe16:54ec%fxp0 prefixlen 64 scopeid 0x1
} >
} > # host www.google.com
} > www.google.com is a nickname for www.l.google.com
} > www.l.google.com has address 72.14.207.99
} > www.l.google.com has address 72.14.207.104
} >
} > So far so good...
} >
} > # nslookup www.google.com
} > *** Can't find server name for address 192.168.2.1 : Non-existent host/domain
} > *** Can't find server name for address ::: No response from server
} > *** Default servers are not available
} >
} > # telnet www.google.com 80
} > Trying 216.239.59.99...
} > telnet: connect to address 216.239.59.99: Can't assign requested address
} > Trying 216.239.59.103...
} > telnet: connect to address 216.239.59.99: Can't assign requested address
} > Trying 216.239.59.104...
} > telnet: connect to address 216.239.59.99: Can't assign requested address
} > Trying 216.239.59.147...
} > telnet: connect to address 216.239.59.99: Can't assign requested address
} >
} > Besides the fact that the addresses for Google changed while I was
} > typing this email, I don't understand why I am not able to connect out
} > to the internet. Searching for this error in the sources, I found
} >
} > src/lib/libc/gen/errlist.c
} >         "Can't assign requested address",       /* 49 - EADDRNOTAVAIL */
} >
} > Searching for this in Google didn't yield anything useful. What am I
} > doing wrong?
} >
} > cheers
} > Chandru
} >
} 
>-- End of excerpt from chandru