Mailing List Archive

show ipv6 destination cache on BSD host
Hi list!

I'm struggling to find a way to display IPv6 destination cache on a FreeBSD or UNIX (not Linux) system.

This is the way on Linux:
ip -6 route get <address>

Mac OS X:
netstat -f inet6 -narlW

...and Windows:
netsh interface ipv6 show destinationcache

...but on FreeBSD (I've tried with 9 and 10), netstat -narlW does not show any entries despite the local routes. On OS X option -a does the trick, but on FreeBSD I see no difference in output with or without -a.

Is there any other option for a BSD machine to figure out the Path MTU value for a certain IPv6 destination? OK, except tcpdump, of course ;-).

Any hint is appreciated!
Thanks!

Kind regards,
Matjaž
Re: show ipv6 destination cache on BSD host [ In reply to ]
On 30 Jan 2014, at 10:12, Matjaz Straus Istenic <matjaz@njetwork.si> wrote:

> Hi list!
>
> I'm struggling to find a way to display IPv6 destination cache on a FreeBSD or UNIX (not Linux) system.
>
> This is the way on Linux:
> ip -6 route get <address>
>
> Mac OS X:
> netstat -f inet6 -narlW
>
> ...and Windows:
> netsh interface ipv6 show destinationcache
>
> ...but on FreeBSD (I've tried with 9 and 10), netstat -narlW does not show any entries despite the local routes. On OS X option -a does the trick, but on FreeBSD I see no difference in output with or without -a.
>
> Is there any other option for a BSD machine to figure out the Path MTU value for a certain IPv6 destination? OK, except tcpdump, of course ;-).

How about sysctl -o net.inet.tcp.hostcache.list ?

--
Rui Paulo
Re: show ipv6 destination cache on BSD host [ In reply to ]
On 30. jan. 2014, at 20:33, Rui Paulo <rpaulo@apple.com> wrote:

> On 30 Jan 2014, at 10:12, Matjaz Straus Istenic <matjaz@njetwork.si> wrote:
>
>> ...Is there any other option for a BSD machine to figure out the Path MTU value for a certain IPv6 destination? OK, except tcpdump, of course ;-).
>
> How about sysctl -o net.inet.tcp.hostcache.list ?
>
Yes! Great thanks for this info!

> --
> Rui Paulo

Kind regards,
Matjaž
Re: show ipv6 destination cache on BSD host [ In reply to ]
ndp -an

?

Sent from my iWotsit.

> On 30 Jan 2014, at 18:12, Matjaz Straus Istenic <matjaz@njetwork.si> wrote:
>
> Hi list!
>
> I'm struggling to find a way to display IPv6 destination cache on a FreeBSD or UNIX (not Linux) system.
>
> This is the way on Linux:
> ip -6 route get <address>
>
> Mac OS X:
> netstat -f inet6 -narlW
>
> ...and Windows:
> netsh interface ipv6 show destinationcache
>
> ...but on FreeBSD (I've tried with 9 and 10), netstat -narlW does not show any entries despite the local routes. On OS X option -a does the trick, but on FreeBSD I see no difference in output with or without -a.
>
> Is there any other option for a BSD machine to figure out the Path MTU value for a certain IPv6 destination? OK, except tcpdump, of course ;-).
>
> Any hint is appreciated!
> Thanks!
>
> Kind regards,
> Matjaž
Re: show ipv6 destination cache on BSD host [ In reply to ]
On 30. jan. 2014, at 21:13, Nick Hilliard <nick@inex.ie> wrote:

> ndp -an
Well, this is for local IPv6 ND cache only. I'm looking for a command to display the _destination_ cache in order to check for changed Path MTU. Rui's suggestions works fine:

# in this example 2001:xxxx:e813:a00::d25 is behind a link with MTU of 1400 bytes:
root@FreeBSD:~ # ping6 -m -s 5000 2001:xxxx:e813:a00::d25
PING6(5048=40+8+5000 bytes) 2001:xxxx:e811:b00:20c:29ff:fe78:31fb --> 2001:xxxx:e813:a00::d25
5008 bytes from 2001:xxxx:e813:a00::d25, icmp_seq=0 hlim=63 time=1.088 ms
5008 bytes from 2001:xxxx:e813:a00::d25, icmp_seq=1 hlim=63 time=0.903 ms
5008 bytes from 2001:xxxx:e813:a00::d25, icmp_seq=2 hlim=63 time=0.985 ms
^C
--- 2001:xxxx:e813:a00::d25 ping6 statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.903/0.992/1.088/0.076 ms

root@FreeBSD:~ # sysctl -o net.inet.tcp.hostcache.list
net.inet.tcp.hostcache.list:
IP address MTU SSTRESH RTT RTTVAR BANDWIDTH CWND SENDPIPE RECVPIPE HITS UPD EXP
2001:xxxx:e813:a00::d25 1400 0 0ms 0ms 0 0 0 0 11 1 3600
^^^^^^

>
> ?
>
> Sent from my iWotsit.
>
>> On 30 Jan 2014, at 18:12, Matjaz Straus Istenic <matjaz@njetwork.si> wrote:
>>
>> Hi list!
>>
>> I'm struggling to find a way to display IPv6 destination cache on a FreeBSD or UNIX (not Linux) system.
>>
>> This is the way on Linux:
>> ip -6 route get <address>
>>
>> Mac OS X:
>> netstat -f inet6 -narlW
>>
>> ...and Windows:
>> netsh interface ipv6 show destinationcache
>>
>> ...but on FreeBSD (I've tried with 9 and 10), netstat -narlW does not show any entries despite the local routes. On OS X option -a does the trick, but on FreeBSD I see no difference in output with or without -a.
>>
>> Is there any other option for a BSD machine to figure out the Path MTU value for a certain IPv6 destination? OK, except tcpdump, of course ;-).
>>
>> Any hint is appreciated!
>> Thanks!
>>
>> Kind regards,
>> Matjaž
Re: show ipv6 destination cache on BSD host [ In reply to ]
I've listed the appropriate commands here:
http://njetwork.wordpress.com/2014/01/30/show-ipv6-destination-cache/

Cheers,
Matjaž
Re: show ipv6 destination cache on BSD host [ In reply to ]
On Thu, Jan 30, 2014 at 09:20:18PM +0100, Matjaz Straus Istenic wrote:
> On 30. jan. 2014, at 21:13, Nick Hilliard <nick@inex.ie> wrote:
>
> > ndp -an
> Well, this is for local IPv6 ND cache only. I'm looking for a command to display the _destination_ cache in order to check for changed Path MTU. Rui's suggestions works fine:

Ah. For NetBSD, this seems to be what you want:

agent:> netstat -f inet6 -nr | grep D
Destination Gateway Flags Refs Use Mtu Interface
2001:638:e813:a00::d25 fe80::20d:61ff:fe46:50ad%xennet0 UGHD 0 1 1280 xennet0
2a01:170:1012:77::25 fe80::20d:61ff:fe46:50ad%xennet0 UGHD 1 14 1280 xennet0