I had this question about ipv6 forwarding.I have an Ubuntu machine with 2 network interfaces (eth0,eth1). Lets say the interface eth1 supports ipv6 addressing and has an ipv6 address of bbbb::100/64. Now when I enable ipv6 forwarding on the ubuntu machine and ping bbbb::100 from another computer on the same LAN on eth0, I can see the message reaching the interface eth1 on wireshark. now I am really curious as to how this works. The first neigbour solicitation should be going through my router. The router looks up its ipv6 neighbour table and sees that there is no match so it does a link local broadcast. Thats the first time, and the interface eth1 responds since the interface eth0 forwards the ip packet which is not meant for it into the interface eth1. But after this I am curious as to how a path is established between the eth0 interface and eth1.
How do all messages with the prefix bbbb::100 get routed into the interface eth1 ? How does the router know that when a packet comes in with bbbb::100 it should forward it to the eth0 interface which will then forward it to the eth1 interface. From eth0 to eth1 I get how it works. But how does the router know it should forward it to the eth0 interface on the Ubuntu computer on the first place.
In essence how does a router route to a eth1 interface on a computer when ipv6 forwarding is enabled on the same computer which has the eth0 interface.
So lets say eth1 has a host: Lets call it host A.
eth0 has a host . host c
The ubuntu computer is host B(both eth0 and eth1 is prsent here)
I will refer to the router as Router.
So when C pings A, it goes through the router to B. B forwards it to the eth1 interface and then A listens and responds. So this is okay for link local broadcast . But what about unicast . How will the routing take place?