2

I have a CentOS server that only has IPv6 address. I want to send a ping to an IPv4 address with the ping Linux command. Is this possible?

[root@test conf.d]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc pfifo_fast state UP group default qlen 1000
    link/ether fa:16:3e:ab:f7:f0 brd ff:ff:ff:ff:ff:ff
    inet6 fd00:4888:1::10/64 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::f816:3eff:feab:f7f0/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether fa:16:3e:35:5c:ed brd ff:ff:ff:ff:ff:ff
    inet6 2001:1b70:4280:18e2::10/64 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::f816:3eff:fe35:5ced/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
[root@vnflcm-test-vnflcm-services-0 conf.d]# 
1
  • Is the IPv4 address in the same network segment? Commented Jan 15, 2022 at 0:34

2 Answers 2

3

It’s not possible without some help. The IPv6 machine doesn’t speak IPv4 and vice versa. You’ll need the help of a machine that speaks both: a NAT64 gateway.

You can find a few public ones for testing on https://go6lab.si/current-ipv6-tests/nat64dns64-public-test/. Not all of them are online all the time, so try a few.

The system works because IPv6 addresses are much bigger than IPv4 addresses. It is therefore possible to put an IPv4 address inside an IPv6 address. For example the address 8.8.8.8 can be reached through 2001:67c:27e4:1064::808:808 or 2001:67c:27e4:1064::8.8.8.8 (yes, this notation is perfectly valid!).

The DNS64 servers mentioned on the page above do this automatically for you, so it works fine even when using host names.

When you want to use this in production (for example to run an office network with only IPv6 while still being able to access the IPv4 internet) you should run your own NAT64 and DNS64 gateways.

1
  • example of such Linux tools: jool.mx/en/index.html (uses dedicated kernel module), (and there's also, but probably defunct, userland-over-tun-interface litech.org/tayga )
    – A.B
    Commented Feb 27, 2022 at 17:09
1

In short: No

IPv6 and IPv4 cannot interact, it is technically impossible to directly send this ping.

What you would need is a proxy with both IPv4- and IPv6-capability that may be used to forward pings between the two protocols.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .