0

I am trying to understand how the ping command works in a situation like this:

Host A IPv6 address: 2001:A::A (MAC address AA-BB-CC-00-11-22)

Host B Ipv6 address: 2001:B::B (MAC address 22-44-66-00-EE-DD)

These two hosts are connected to a router, it has one interface for each different prefix, for example host A is connected to router's interface 2001:A::1 (MAC 77-88-99-00-DD-22) and host B is connected to router's interface 2001:B::1 (MAC 11-66-AA-00-33-88).

Let's assume that the caches on all devices are empty, router included. What should be the consequence of a ping command from A to B? ping 2001:B::B

1) host A does a router solicitation for its default gateway (A needs the MAC)

2) router advertisement from router to host A

3) icmp echo request from A to router (from A's MAC to router's MAC)

4) does the router need to perform a neighbor discovery in order to find the MAC address of B or not?

Everything else is a consequence of point 4.

Thanks

0

As I understand it, steps 1 and 2 are not a function of an ICMP request, but simply from being connected to an IPv6 network. This is different from IPv4 in that a NIC could remain quiet and simply listen to network traffic under certain circumstances, until either its host had something to transmit, or in response to a link-layer broadcast.

The RA from step 2, would nominally nominate itself as a default gateway.

So when Host A sends an ICMPv6 Echo Request to a host not on a local network, it will unicast it to the router's IPv6 address, in this case, 2001:A::1. The MAC address of the router interface was already declared during the Neighbour Discovery step, so no additional ARP has to be made: Host A will have 2001:A::A (MAC address AA-BB-CC-00-11-22) pre-mapped.

The router will receive a packet from Host A, for host B. The router knows that host B is directly connected on interface 2001:B::1, as well as Host B's MAC address, and so will unicast the ICMPv6 request to Host B.

Host B's MAC address would have already been determined independently of the ICMPv6 request when Host B was first connected to the router. This differs from IPv4, in which the router would have to make an ARP who-has broadcast on the B interface upon receiving a packet for a host on the B network.

1
  • IPv6 does not differ so much from IPv4, except that the terminology and protocols are a bit different. Address configuration and setting up routes are done separately, normally when the interface is brought up (just like with IPv4). Neighbour discovery is done when needed; the cached values don't live forever. When Host A sends a Echo Request to Host B, which is not on the same LAN, it does not change the destination IP address in the packet to that of the router, but the L2 frame is sent to the router's MAC address. This just like in IPv4. – Johan Myréen Feb 1 '18 at 19:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.