Subject: Re: Can't assign requested address
To: None <port-i386@netbsd.org>
From: chandru <chandrashekhar.mullaparthi@gmail.com>
List: port-i386
Date: 11/08/2005 14:25:48
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=3D8843<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/do=
main
> *** 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
>