ipv4 takes precedence over ipv6

Cristian Chera

New Member
Feb 19, 2021
1
0
1
32
Hi everyone,

I am new to proxmox and I have decided to give it a go, so I virtualised pfsense in proxmox. Everything works as expected except that when pinging google from the lan pfsense network the ping command falls back on to the ipv4 interface.
I need to mention that ping6 google works as excepted as well as ping google from the host machine which use an ipv6 by default. I am slightly confused as I thought ipv6 takes precedence over the ipv4 by default.

More info about my experimental setup:
- Router from my ISP
- PVE node with 1 NIC connected straight to the router from ISP
- pfsense virtualised on the PVE node (the physical NIC is used for the WAN port, LAN port is a Linux Bridge)
- pfsense WAN set to DHCP and DHCP6 (both ipv4 and ipv6 are correctly assigned by the router from ISP)
- pfsense LAN set to static ip (10.0.0.1/16 and fdf7:c7e3:cd66:82ff::/64)
- pfsense ipv6 NAT outbound rule for the WAN interface
- VM connected to the LAN network provided by pfsense

When I ping google from the VM it defaults to ipv4. ping6 google works as expected. (sorry for redundancy)
If I connect the VM straight to the vmbr0 linux bridge of the pve node then ping does use the ipv6 by default.

Please let me know if you want me to show you what the ip -6 route show command returns.

Question: Why does ping use ipv4 by default? I want ipv6 to take precedence over the ipv4.

Thanks,
Cristian
 
Last edited:
are you running the `ping` on the pfsense (which has freebsd as base) - in that case it might simply be the fact that some BSD systems' ping implementation are v4 only (they use ping6 for ipv6)

if the guest behind the pfsense has that problem my first guess is that it has something to do with your selection of `fdf7:` as prefix - see https://en.wikipedia.org/wiki/IPv6_address#Unique_local_addresses
- try using a global prefix
- else check out the manpage for `gai.conf(5)`

I hope this helps!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!