How do I route packets in my machine between interfaces (See yellow arrow). Eth0 receives IPv4 packets and I will like to channel it to Eth1 which will send IPv6 packets out.Image of dual stack machine with IPv4 and IPv6 interfaces
Asked
Active
Viewed 247 times
0
-
Have a look there: https://en.wikipedia.org/wiki/NAT64 , https://en.wikipedia.org/wiki/IPv6_transition_mechanism#Stateless_IP/ICMP_Translation . A linux implementation: https://www.jool.mx/en/intro-xlat.html – A.B May 28 '22 at 17:11
-
1What are you attempting to achieve? IPv4 over a IPv6 network? If so a GRE tunnell may be a good solution? – vidarlo May 29 '22 at 08:28
2 Answers
1
Routing cannot convert between IPv4 and IPv6. You need an application layer gateway for that.

Tilman Schmidt
- 4,101
- 12
- 27
1
IPv4 and IPv6 are different protocols, and cannot be directly routed between.
Move everything to IPv6 and you can have a single stack all the way through, which can be directly routed.
Or, tunnel IPv4 in IPv6. Maybe GRE, or some other VPN.
Or, insert a middlebox in between, terminating the IPv4 connection and starting an IPv6 one. Some kind of proxy or load balancer, for example.

John Mahowald
- 32,050
- 2
- 19
- 34
-
-
May I check for tunneling IPv4 in IPv6, what should I google for to find out how it works. Does it mean that whenever I reach the IPv6 leg, I should package the IPv4 packets within IPv6, transport it over the IPv6 protocol and then remove it and revert back to IPv4 when required? – Mervyn Heng May 29 '22 at 08:01
-
Design whatever network you need such that A can talk to C. If it must be IPv4, could have a 4 in 6 tunnel from B to C, and a new IPv4 address for C. Or, IPv6 only throughout could simplify things. – John Mahowald May 29 '22 at 22:38