=ping: sendto: Can't assign requested address= in fib spaces
zjef at mail2tor.com
zjef at mail2tor.com
Wed Sep 14 19:59:24 UTC 2016
Hello Alan,
thank you for guidelines.
Here are some outputs from box:
uname -a
FreeBSD bp 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r305382: Tue Sep 6
03:03:40 CEST 2016
root at fb12-bpim1:/freebsd/crochet-freebsd/work/obj/arm.armv6/usr/src/sys/MYKERNEL
arm
ifconfig -a
dwc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=80008<VLAN_MTU,LINKSTATE>
ether 02:47:03:c1:b1:95
inet 192.168.188.254 netmask 0xffffff00 broadcast 192.168.188.255
inet6 fe80::47:3ff:fec1:b195%dwc0 prefixlen 64 scopeid 0x1
inet6 2001:a61:2:2701:47:3ff:fec1:b195 prefixlen 64 autoconf
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet 127.0.0.1 netmask 0xff000000
inet 127.0.0.2 netmask 0xffffffff
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
pflog0: flags=141<UP,RUNNING,PROMISC> metric 0 mtu 33184
groups: pflog
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1500
options=80000<LINKSTATE>
inet6 fe80::5cfd:b867:e963:74c7%tun0 prefixlen 64 scopeid 0x4
inet6 fd6c:9bdf:37b4:5ef8::1 prefixlen 64
inet 10.9.0.1 --> 10.9.0.2 netmask 0xffffffff
groups: tun
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
Opened by PID 88745
tun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1500
options=80000<LINKSTATE>
inet6 fe80::5cfd:b867:e963:74c7%tun1 prefixlen 64 scopeid 0x5
inet6 fd6c:9bdf:97b6:7ef7::1 prefixlen 64
inet 10.8.0.1 --> 10.8.0.2 netmask 0xffffffff
groups: tun
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
Opened by PID 19613
tun2: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1500
options=80000<LINKSTATE>
inet6 fe80::5cfd:b867:e963:74c7%tun2 prefixlen 64 scopeid 0x6
inet6 2001:678:f0:1040:3df1:1db0:377:e28f prefixlen 64
inet 10.128.0.7 --> 10.128.0.1 netmask 0xffff0000
groups: tun
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
Opened by PID 4911
$ sudo pfctl -si
Status: Disabled for 0 days 00:00:43 Debug: Urgent
State Table Total Rate
current entries 3
...
# netstat -rn
[7/411]
Routing tables
Internet:
Destination Gateway Flags Netif Expire
default 192.168.188.1 UGS dwc0
10.8.0.0/24 10.8.0.2 UGS tun1
10.8.0.1 link#5 UHS lo0
10.8.0.2 link#5 UH tun1
10.9.0.0/24 10.9.0.2 UGS tun0
10.9.0.1 link#4 UHS lo0
10.9.0.2 link#4 UH tun0
10.128.0.0/16 10.128.0.24 UGS lo0
10.128.0.1 link#6 UH tun2
10.128.0.7 link#6 UHS lo0
127.0.0.1 link#2 UH lo0
127.0.0.2 link#2 UH lo0
192.168.177.0/24 192.168.188.2 UGS dwc0
192.168.188.0/24 link#1 U dwc0
192.168.188.254 link#1 UHS lo0
Internet6:
Destination Gateway Flags
Netif Expire
::/96 ::1 UGRS
lo0
default fe80::c225:6ff:febb:4afc%dwc0 UG
dwc0
::1 link#2 UH
lo0
::ffff:0.0.0.0/96 ::1 UGRS
lo0
2001:678:f0:1040::/64 link#6 U
tun2
2001:678:f0:1040:3df1:1db0:377:e28f link#6 UHS
lo0
2001:a61:2:2701::/64 link#1 U
dwc0
2001:a61:2:2701:47:3ff:fec1:b195 link#1 UHS
lo0
fd6c:9bdf:37b4:5ef8::/64 link#4 U
tun0
fd6c:9bdf:37b4:5ef8::1 link#4 UHS
lo0
fd6c:9bdf:97b6:7ef7::/64 link#5 U
tun1
fd6c:9bdf:97b6:7ef7::1 link#5 UHS
lo0
fe80::/10 ::1 UGRS
lo0
fe80::%dwc0/64 link#1 U
dwc0
fe80::47:3ff:fec1:b195%dwc0 link#1 UHS
lo0
fe80::%lo0/64 link#2 U
lo0
fe80::1%lo0 link#2 UHS
lo0
fe80::%tun0/64 link#4 U
tun0
fe80::5cfd:b867:e963:74c7%tun0 link#4 UHS
lo0
fe80::5cfd:b867:e963:74c7%tun1 link#5 UHS
lo0
fe80::%tun2/64 link#6 U
tun2
fe80::5cfd:b867:e963:74c7%tun2 link#6 UHS
lo0
ff02::/16 ::1 UGRS
lo0
# setfib 2 netstat -rn
Routing tables (fib: 2)
Internet:
Destination Gateway Flags Netif Expire
default 10.128.0.1 UGS tun2
10.8.0.2 link#5 UH tun1
10.9.0.2 link#4 UH tun0
10.128.0.1 link#6 UH tun2
127.0.0.1 link#2 UH lo0
127.0.0.2 link#2 UH lo0
192.168.188.0/24 link#1 U dwc0
Internet6:
Destination Gateway Flags
Netif Expire
::/96 ::1 UGRS
lo0
default 2001:678:f0:1040::1 UGS
tun2
::1 link#2 UH
lo0
::ffff:0.0.0.0/96 ::1 UGRS
lo0
2001:678:f0:1040::/64 link#6 U
tun2
2001:a61:2:2701::/64 link#1 U
dwc0
fd6c:9bdf:37b4:5ef8::/64 link#4 U
tun0
fd6c:9bdf:97b6:7ef7::/64 link#5 U
tun1
fe80::/10 ::1 UGRS
lo0
fe80::%dwc0/64 link#1 U
dwc0
fe80::%lo0/64 link#2 U
lo0
fe80::%tun0/64 link#4 U
tun0
fe80::%tun2/64 link#6 U
tun2
ff02::/16 ::1 UGRS
lo0
In ktrace/kdump output I can't see bind call.
( http://pastebin.com/raw/Nua7AgMj )
Here is excerpt from ktrace with relevant messages:
# setfib 2 ktrace ping 8.8.8.8
...
90046 ping CALL socket(PF_INET,SOCK_RAW,IPPROTO_ICMP)
90046 ping RET socket 3
90046 ping CALL socket(PF_INET,SOCK_RAW,IPPROTO_ICMP)
90046 ping RET socket 4
90046 ping CALL getuid
90046 ping RET getuid 0
90046 ping CALL setuid(0)
90046 ping RET setuid 0
90046 ping CALL getuid
90046 ping RET getuid 0
90046 ping CALL
socketpair(PF_LOCAL,SOCK_NONBLOCK|SOCK_STREAM,0,0xbfbee7d8)
90046 ping RET socketpair 0
90046 ping CALL connect(0x3,0x27b10,0x10)
90046 ping STRU struct sockaddr { AF_INET, 8.8.8.8:0 }
90046 ping RET connect 0
...
90046 ping CALL sendto(0x3,0x17af8,0x40,0,0,0)
90046 ping RET sendto -1 errno 49 Can't assign requested address
Also there is no bind call in ktrace output of "host" command:
( http://pastebin.com/raw/s92YjcVK )
# setfib 2 ktrace host www.cisco.com 8.8.8.8
99478 host CALL socket(PF_INET,SOCK_DGRAM,IPPROTO_UDP)
99478 host RET socket 3
99478 host CALL sendto(0x3,0x20829000,0x1f,0,0x2082b000,0x10)
99478 host STRU struct sockaddr { AF_INET, 8.8.8.8:53 }
99478 host RET sendto -1 errno 49 Can't assign requested address
99478 host CALL close(0x3)
99478 host RET close 0
99478 host CALL socket(PF_INET,SOCK_DGRAM,IPPROTO_UDP)
99478 host RET socket 3
99478 host CALL sendto(0x3,0x20829000,0x1f,0,0x2082b000,0x10)
99478 host STRU struct sockaddr { AF_INET, 8.8.8.8:53 }
99478 host RET sendto -1 errno 49 Can't assign requested address
99478 host CALL close(0x3)
99478 host RET close 0
99478 host CALL fstat(0x1,0xbfbfea70)
99478 host STRU struct stat {dev=1895890688, ino=100, mode=020620,
nlink=1, uid=553, gid=4, rdev=100, atime=1473879488, mtime=1473879488,
ctime=1473879488, birthtime=-1, size=0, blksize=4096, blocks=0, flags=0x0
}
99478 host RET fstat 0
99478 host CALL ioctl(0x1,TIOCGETA,0xbfbfea3c)
99478 host RET ioctl 0
99478 host CALL write(0x1,0x2082c000,0x35)
99478 host GIO fd 1 wrote 53 bytes
";; connection timed out; no servers could be reached
"
All possible source addresses fail in ping the same way as ping without src:
setfib -2 ktrace ping -S 10.9.0.1 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 10.9.0.1: 56 data bytes
ping: sendto: Can't assign requested address
ping: sendto: Can't assign requested address
setfib -2 ktrace ping -S 10.8.0.1 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 10.8.0.1: 56 data bytes
ping: sendto: Can't assign requested address
^C
--- 8.8.8.8 ping statistics ---
1 packets transmitted, 0 packets received, 100.0% packet loss
setfib -2 ktrace ping -S 192.168.188.254 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 192.168.188.254: 56 data bytes
ping: sendto: Can't assign requested address
ping: sendto: Can't assign requested address
setfib -2 ktrace ping -S 10.128.0.7 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 10.128.0.7: 56 data bytes
ping: sendto: Can't assign requested address
ping: sendto: Can't assign requested address
setfib -2 ping -S 127.0.0.1 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 127.0.0.1: 56 data bytes
ping: sendto: Can't assign requested address
ping: sendto: Can't assign requested address
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 0 packets received, 100.0% packet loss
Thanks
> That "Can't assign requested address" suggests that the problem might
> have nothing to do with fibs. Can you show us your "ifconfig" output?
> It would also help to know what local address ping is trying to
> assign. You can figure that out by doing "setfib 2 ktrace ping
> 8.8.8.8; kdump" and searching for "bind". Once you know that, you can
> try playing with ping's "-S" option to set different local addresses.
>
> -Alan
>
> On Tue, Sep 13, 2016 at 5:21 PM, <zjef at mail2tor.com> wrote:
>> Here is the nestat -rn output:
>>
>>
>>
>> setfib -2 netstat -rn
>> Routing tables (fib: 2)
>>
>> Internet:
>> Destination Gateway Flags Netif Expire
>> default 10.128.0.1 UGS tun2
>> 10.8.0.2 link#5 UH tun1
>> 10.9.0.2 link#4 UH tun0
>> 10.128.0.1 link#6 UH tun2
>> 127.0.0.1 link#2 UH lo0
>> 192.168.188.0/24 link#1 U dwc0
>>
>> Internet6:
>> Destination Gateway Flags
>> Netif Expire
>> ::/96 ::1 UGRS
>> lo0
>> default 2001:678:f0:1020::1 UGS
>> tun2
>> ::1 link#2 UH
>> lo0
>> ::ffff:0.0.0.0/96 ::1 UGRS
>> lo0
>> 2001:678:f0:1020::/64 link#6 U
>> tun2
>> 2001:a61:51:f501::/64 link#1 U
>> dwc0
>> fd6c:9bdf:37b4:5ef8::/64 link#4 U
>> tun0
>> fd6c:9bdf:97b6:7ef7::/64 link#5 U
>> tun1
>> fe80::/10 ::1 UGRS
>> lo0
>> fe80::%dwc0/64 link#1 U
>> dwc0
>> fe80::%lo0/64 link#2 U
>> lo0
>> fe80::%tun0/64 link#4 U
>> tun0
>> fe80::%tun1/64 link#5 U
>> tun1
>> fe80::%tun2/64 link#6 U
>> tun2
>> ff02::/16 ::1 UGRS
>> lo0
>>
>>
>>
>>> On Tue, Sep 13, 2016 at 4:41 PM, <zjef at mail2tor.com> wrote:
>>>> Hi,
>>>>
>>>> in r305382 on my router-box I see some issue with ICMP and UDP in IPv4
>>>> in
>>>> non-default fib spaces. PF is disabled. For example,
>>>>
>>>> UDP:
>>>>
>>>> setfib -2 host -vvv www.cisco.com 8.8.8.8
>>>> Trying "www.cisco.com"
>>>> ;; connection timed out; no servers could be reached
>>>>
>>>> setfib -2 host -6 www.cisco.com 2001:4860:4860::8888
>>>> Using domain server:
>>>> Name: 2001:4860:4860::8888
>>>> Address: 2001:4860:4860::8888#53
>>>> Aliases:
>>>>
>>>> www.cisco.com is an alias for www.cisco.com.akadns.net.
>>>> ....
>>>>
>>>>
>>>> ICMP:
>>>>
>>>> setfib -2 ping 8.8.8.8
>>>> PING 8.8.8.8 (8.8.8.8): 56 data bytes
>>>> ping: sendto: Can't assign requested address
>>>> ping: sendto: Can't assign requested address
>>>> ...
>>>>
>>>>
>>>> setfib -2 ping6 www.cisco.com
>>>> PING6(56=40+8+8 bytes) 2001:678:f0:1020:27:cb57:2682:767a -->
>>>> 2a02:26f0:12:197::90
>>>> 16 bytes from 2a02:26f0:12:197::90, icmp_seq=0 hlim=54 time=99.343 ms
>>>> ...
>>>>
>>>>
>>>> Also TCP in IPv4 is not affected:
>>>>
>>>> setfib -2 curl -o /tmp/index.html http://www.cisco.com
>>>> % Total % Received % Xferd Average Speed Time Time Time
>>>> Current
>>>> Dload Upload Total Spent Left
>>>> Speed
>>>> 100 73038 0 73038 0 0 68094 0 --:--:-- 0:00:01
>>>> --:--:--
>>>> 68259
>>>>
>>>>
>>>> In FreeBSD 11 the networking worked smoothly in fib spaces.
>>>>
>>>> Is it known problem?
>>>>
>>>> Thanks
>>>>
>>>> Jim
>>>>
>>>
>>> What is the output of "setfib 2 netstat -rn"?
>>> _______________________________________________
>>> freebsd-net at freebsd.org mailing list
>>> https://lists.freebsd.org/mailman/listinfo/freebsd-net
>>> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
>>>
>>
>>
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
>
More information about the freebsd-net
mailing list