tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ipv6 gateway on different subnet



On Wed, Jan 22, 2025 at 6:30 AM Greg Troxel <gdt%lexort.com@localhost> wrote:

> See netinet6/nd6_nbr.c and netinet6/nd6_rtr.c which might be
> enlightening.
>
> Use "ndp -a" and "netstat -nr" to see what's in the routing table.
>
> Do "netstat -s", wait, and do it again, saving both results, and diff
> -U0 to see all changed counters, including ones you aren't expecting.

Am I supposed to have a ping from outside going while I do the
"netstat -s" or just run it a couple of times?

On first login today, ndp is empty, but ping worked, and after that
ndp had entries

ndp -a
Neighbor                                Linklayer Address  Netif Expire    S Fl

ping6 google.com
PING6(56=40+8+8 bytes) 2602:fed2:7116:d82c::1 --> 2607:f8b0:4023:1000::8b
16 bytes from 2607:f8b0:4023:1000::8b, icmp_seq=0 hlim=109 time=5.459 ms
16 bytes from 2607:f8b0:4023:1000::8b, icmp_seq=1 hlim=109 time=2.514 ms
^C
--- google.com ping6 statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 2.514/3.986/5.459/2.082 ms

ndp -a
Neighbor                                Linklayer Address  Netif Expire    S Fl
fe80::da67:d9ff:fe58:3d1b%vioif0        d8:67:d9:58:3d:1b vioif0 1s        D
2602:fed2:7116::1                       d8:67:d9:58:3d:1b vioif0 27s       R

2nd address did not work
ping6 -S 2602:fed2:7116:d82c::6 google.com
PING6(56=40+8+8 bytes) 2602:fed2:7116:d82c::6 --> 2607:f8b0:4023:1000::64
^C
--- google.com ping6 statistics ---
4 packets transmitted, 0 packets received, 100.0% packet loss

ifconfig
vioif0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ec_capabilities=0x1<VLAN_MTU>
    ec_enabled=0
    address: 00:16:3e:d7:cf:50
    status: active
    inet6 fe80::216:3eff:fed7:cf50%vioif0/64 flags 0 scopeid 0x1
    inet6 2602:fed2:7116:d82c::1/64 flags 0
    inet6 2602:fed2:7116:d82c::6/64 flags 0
    inet 23.173.152.249/24 broadcast 23.173.152.255 flags 0
lo0: flags=0x8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33624
    status: active
    inet6 ::1/128 flags 0x20<NODAD>
    inet6 fe80::1%lo0/64 flags 0 scopeid 0x2
    inet 127.0.0.1/8 flags 0

netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use    Mtu Interface
default            23.173.152.1       UGS         -        -      -  vioif0
23.173.152/24      link#1             UC          -        -      -  vioif0
23.173.152.249     link#1             UHl         -        -      -  lo0
127/8              127.0.0.1          UGRS        -        -  33624  lo0
127.0.0.1          lo0                UHl         -        -  33624  lo0
23.173.152.1       d8:67:d9:58:3d:1b  UHL         -        -      -  vioif0

Internet6:
Destination                             Gateway
Flags    Refs      Use    Mtu Interface
::/104                                  ::1
UGRS        -        -  33624  lo0
::/96                                   ::1
UGRS        -        -  33624  lo0
default                                 2602:fed2:7116::1
UGCS        -        -      -  vioif0
::1                                     lo0
UHl         -        -  33624  lo0
::127.0.0.0/104                         ::1
UGRS        -        -  33624  lo0
::224.0.0.0/100                         ::1
UGRS        -        -  33624  lo0
::255.0.0.0/104                         ::1
UGRS        -        -  33624  lo0
::ffff:0.0.0.0/96                       ::1
UGRS        -        -  33624  lo0
2001:db8::/32                           ::1
UGRS        -        -  33624  lo0
2002::/24                               ::1
UGRS        -        -  33624  lo0
2002:7f00::/24                          ::1
UGRS        -        -  33624  lo0
2002:e000::/20                          ::1
UGRS        -        -  33624  lo0
2002:ff00::/24                          ::1
UGRS        -        -  33624  lo0
2602:fed2:7116:d82c::/64                link#1
UC          -        -      -  vioif0
2602:fed2:7116:d82c::1                  link#1
UHl         -        -      -  lo0
2602:fed2:7116:d82c::6                  link#1
UHl         -        -      -  lo0
fe80::/10                               ::1
UGRS        -        -  33624  lo0
fe80::%vioif0/64                        link#1
UC          -        -      -  vioif0
fe80::216:3eff:fed7:cf50                link#1
UHl         -        -      -  lo0
fe80::%lo0/64                           fe80::1
U           -        -      -  lo0
fe80::1                                 lo0
UHl         -        -      -  lo0
ff01:1::/32                             link#1
UC          -        -      -  vioif0
ff01:2::/32                             ::1
UC          -        -  33624  lo0
ff02::%vioif0/32                        link#1
UC          -        -      -  vioif0
ff02::%lo0/32                           ::1
UC          -        -  33624  lo0
2602:fed2:7116::1                       d8:67:d9:58:3d:1b
UHL         -        -      -  vioif0

checking ndp one more time before I log off

ndp -a
Neighbor                                Linklayer Address  Netif Expire    S Fl
2602:fed2:7116::1                       d8:67:d9:58:3d:1b vioif0 23h57m16s S R

I ping google from ::6 again (which fails) and the fe80 address for
the router returns. Not sure if that means anything. It's gone from
ndp in a few seconds anyway.

ndp -a
Neighbor                                Linklayer Address  Netif Expire    S Fl
fe80::da67:d9ff:fe58:3d1b%vioif0        d8:67:d9:58:3d:1b vioif0 3s        D
2602:fed2:7116::1                       d8:67:d9:58:3d:1b vioif0 13s       R R

-- 
Thanks
Peter


Home | Main Index | Thread Index | Old Index