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
-
Have a look there: en.wikipedia.org/wiki/NAT64 , en.wikipedia.org/wiki/IPv6_transition_mechanism#Stateless_IP/… . A linux implementation: jool.mx/en/intro-xlat.html– A.BMay 28, 2022 at 17:11
-
1What are you attempting to achieve? IPv4 over a IPv6 network? If so a GRE tunnell may be a good solution?– vidarloMay 29, 2022 at 8:28
2 Answers
Routing cannot convert between IPv4 and IPv6. You need an application layer gateway for that.
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.
-
-
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? May 29, 2022 at 8: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. May 29, 2022 at 22:38