0

is there any option to get something like this for IPv6 (inet6 or -6):

ip route get 8.8.8.8

Result:

8.8.8.8 via 94.**.***.1 dev ens3 src 94.**.**.112 uid 0
    cache

Where I can get the local IPv6 adress from the server (domain doesnt exists / is unknown in this setting)

Aeris
  • 123
  • 1
  • 1
  • 6
  • 3
    You can just plug in an IPv6 address too. `ip r get 2001:4860:4860::8888` – Michael Hampton Aug 09 '18 at 19:57
  • Sorry for the late replay, I wasn't able to go to the PC... Anyway.. after that im getting 2001:4860:4860::8888 from :: via fe80::1 dev ens3 proto ra src fe80::e864:5bff:fe35:de24 metric 1024 hoplimit 64 pref medium But the assigned IPv6 is: 2a03:4000:28:2d3::/64 – Aeris Aug 12 '18 at 16:40

1 Answers1

2

It's the same command, you just need to feed it an IPv6 address.

plugwash@bytemark2017:~$ ip route get 2000::
2000:: from :: via fe80::1 dev bond0  src 2001:41c9:1:3ce::1:10  metric 0 
    cache 
plugwash@bytemark2017:~$
Peter Green
  • 4,211
  • 12
  • 30
  • Sorry for the late replay, I wasn't able to go to the PC... Anyway.. after that im getting 2001:4860:4860::8888 from :: via fe80::1 dev ens3 proto ra src fe80::e864:5bff:fe35:de24 metric 1024 hoplimit 64 pref medium But the assigned IPv6 is: 2a03:4000:28:2d3::/64 – Aeris Aug 12 '18 at 16:40
  • @Aeris This system's IPv6 address is automatically assigned via SLAAC. If it's a server, it probably should have a statically assigned address. – Michael Hampton Aug 12 '18 at 21:05