You are not logged in.

#1 2024-05-19 10:40:38

archuser38013
Member
Registered: 2024-01-27
Posts: 69

How to setup libvirt with ipv6?

I presume that is the problem as I have no internet connection on the vms and from the below investigation.

Ipv4 routing just works out the box for libvirt so does ipv6 require manual intervention to setup?

My new 4g dongle seems to use ipv6 as when I do

ip route

there are only the virbr interfaces left showing. I do however have internet access and when I do

ip addr show

the dongle interface looks like a v6 ip.

So how does one setup the virtual networks of libvirt for ipv6?

I am far from fluent in understanding networking and usually scrape by following step-by-step tutorials.

Is this SO thread what I am looking for?

Last edited by archuser38013 (2024-05-19 10:46:29)

Offline

#2 2024-05-19 11:27:24

seth
Member
Registered: 2012-09-03
Posts: 54,562

Re: How to setup libvirt with ipv6?

For IPv6 see https://wiki.archlinux.org/title/Libvirt#IPv6

But the IP version doesn't depend on your "dongle" but what kind of lease you get from the link partner - in doubt you have no lease at all and only a link local address.
So I'd look there first and itr.

the dongle interface looks like a v6 ip

Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855

Please post the output of

ip a; ip r; find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f

Offline

#3 2024-05-19 11:56:43

archuser38013
Member
Registered: 2024-01-27
Posts: 69

Re: How to setup libvirt with ipv6?

seth wrote:

For IPv6 see https://wiki.archlinux.org/title/Libvirt#IPv6

But the IP version doesn't depend on your "dongle" but what kind of lease you get from the link partner - in doubt you have no lease at all and only a link local address.
So I'd look there first and itr.

the dongle interface looks like a v6 ip

Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855

Please post the output of

ip a; ip r; find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f

Thanks for the reply.

As for the command, I will have to redact a load of IPs no? As there is a lot of output.

Not sure which addresses should and should not be shown publicly.

I see here this seems to cover what I am after.

Last edited by archuser38013 (2024-05-19 12:04:29)

Offline

#4 2024-05-19 12:02:32

seth
Member
Registered: 2012-09-03
Posts: 54,562

Re: How to setup libvirt with ipv6?

https://en.wikipedia.org/wiki/Private_network - for IPv6, it's sufficient (and somewhat private, one could probably infer the geographical area of your ISP) to preserve the first block.
If you're gonna obfuscate things, please use pseudonyms, ie replace the same number w/ the same pseudonym
eg.
fe80::xxxx:xxxx:xxxx:xxxx
fe80::xxxx:xxxx:xxxx:yyyy # to indicate it's different from the previous in the last block

Offline

#5 2024-05-19 12:15:53

archuser38013
Member
Registered: 2024-01-27
Posts: 69

Re: How to setup libvirt with ipv6?

seth wrote:

https://en.wikipedia.org/wiki/Private_network - for IPv6, it's sufficient (and somewhat private, one could probably infer the geographical area of your ISP) to preserve the first block.
If you're gonna obfuscate things, please use pseudonyms, ie replace the same number w/ the same pseudonym
eg.
fe80::xxxx:xxxx:xxxx:xxxx
fe80::xxxx:xxxx:xxxx:yyyy # to indicate it's different from the previous in the last block

I just did

ip addr show

and noticed that alone explicitly says so. The only ip issued for the dongle device is an inet6:

31: wwan0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
    link/none 
    altname xxxxxxxxx
    inet6 xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/64 scope global noprefixroute 
       valid_lft forever preferred_lft forever

With my ethernet device, in contrast, that shows both inet and inet6 fields.

Last edited by archuser38013 (2024-05-19 12:17:35)

Offline

#6 2024-05-19 12:19:07

seth
Member
Registered: 2012-09-03
Posts: 54,562

Re: How to setup libvirt with ipv6?

1. why do you have 31+ NICs? Stale docker devices??
2. "inet6 xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/64", what is the first block of that? "fe80"?

Offline

#7 2024-05-19 12:26:18

archuser38013
Member
Registered: 2024-01-27
Posts: 69

Re: How to setup libvirt with ipv6?

seth wrote:

1. why do you have 31+ NICs? Stale docker devices??
2. "inet6 xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/64", what is the first block of that? "fe80"?

1. Not docker, it is the dongle again I think because it has like 5 interfaces and if plugging out and in again it will go up +5 or so. That is my guess. There are huge gaps, they are not all populated. That or vms starting and stopping?
2. 2a00

Last edited by archuser38013 (2024-05-19 12:27:54)

Offline

#8 2024-05-19 12:30:07

archuser38013
Member
Registered: 2024-01-27
Posts: 69

Re: How to setup libvirt with ipv6?

Besides the issue with libvirt I am wondering...how is an internet connection established when there is no route showing in ip route? Internet is certainly working (on host) but yet no route.

Last edited by archuser38013 (2024-05-19 12:30:56)

Offline

#9 2024-05-19 12:35:04

seth
Member
Registered: 2012-09-03
Posts: 54,562

Re: How to setup libvirt with ipv6?

That's a publically routable IPv6, your ISP probably just doesn't provide any IPv4 mechanism and in that case you'll have to go with that.
Did you check https://wiki.archlinux.org/title/Libvirt#IPv6 ?

Edit:

ping -4 8.8.8.8

is most likely going to fail

ip -6 r

Last edited by seth (2024-05-19 12:38:29)

Offline

#10 2024-05-19 17:12:07

archuser38013
Member
Registered: 2024-01-27
Posts: 69

Re: How to setup libvirt with ipv6?

seth wrote:

That's a publically routable IPv6, your ISP probably just doesn't provide any IPv4 mechanism and in that case you'll have to go with that.
Did you check https://wiki.archlinux.org/title/Libvirt#IPv6 ?

Edit:

ping -4 8.8.8.8

is most likely going to fail

ip -6 r

Cool...

$ ip -6 r
xxxx:xxxx:xxxx:xxxx::/64 dev wwan0 proto kernel metric 700 pref medium
default via xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx dev wwan0 proto static metric 700 pref 
medium
$ ping -6 archlinux.org
PING archlinux.org (xxxx:xxx:xxxx:xxxx::1) 56 data bytes
64 bytes from archlinux.org (xxxx:xxx:xxxx:xxxx::1): icmp_seq=1 ttl=48 time=78.8 ms
64 bytes from archlinux.org (xxxx:xxx:xxxx:xxxx::1): icmp_seq=2 ttl=48 time=77.8 ms
64 bytes from archlinux.org (xxxx:xxx:xxxx:xxxx::1): icmp_seq=3 ttl=48 time=76.6 ms
^C
--- archlinux.org ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 76.583/77.738/78.819/0.914 ms
$ ping -4 archlinux.org
ping: connect: Network is unreachable

Thanks for your help.

Now I know where to look I shall look at the archwiki link as well as the libvirt wiki for ipv6 NAT. Shall mark as solved if all goes well.

Last edited by archuser38013 (2024-05-19 17:13:07)

Offline

Board footer

Powered by FluxBB