A method and system for automatically interconnecting IPv4 networks across
an IPv6 network are disclosed. The method includes receiving an IPv4
packet at an ingress router in the IPv6 network and finding the longest
match IPv4 routing entry for IPv4 addresses in the received packet to
identify an egress router in the IPv6 network. The IPv4 packet is
encapsulated to create an IPv6 packet, wherein destination and source
addresses of the encapsulated packet identify a subnet router anycast
corresponding to the ingress router and the egress router in the IPv6
network. The encapsulated packet is forwarded to the egress router.