ARP for Default Gateway question

sub-zerosub-zero Posts: 23Member ■□□□□□□□□□
Hi Guys,

So PC A wants to Ping PC B and both are in two different subnets.

I understand PC A logic will see that the address of PC B is in a different subnet , so PC will need to send the packet to it's Default gateway.

If PC A has the MAC address of it's DEfault Gateway, then it has all the information needed to complete the frame and send it, no probs here understanding this.

However, my question is, if PC A DOES NOT have the MAC address of it's Default gateway, would it first need to send a ARP request to learn the MAC address of Default Gateway and would that frame(ARP request) contain the destination IP address for the DEfault gateway? or still PC B?

And then once it gets an ARP reply from it's DEfault Gateway, PC A would the build a whole new frame with The newly learnt MAC address of it's DEfault Gateway and the destination IP addresss of PC B?

Or would the destination IP address of the intital ARP request still be PC B ?



I hope it makes sense, pretty new to all this.

Thanks

Comments

  • clarsonclarson Posts: 897Member ■■■■□□□□□□
    would it first need to send a ARP request to learn the MAC address of Default Gateway: yes

    would that frame(ARP request) contain the destination IP address for the DEfault gateway? yes

    And then once it gets an ARP reply from it's DEfault Gateway, PC A would the build a whole new frame with The newly learnt MAC address of it's DEfault Gateway and the destination IP addresss of PC B? yes

    Or would the destination IP address of the intital ARP request still be PC B ? No
    the initial arp request's destination ip address was the default gateway's ip address. not pc b.
  • sub-zerosub-zero Posts: 23Member ■□□□□□□□□□
    clarson wrote: »
    would it first need to send a ARP request to learn the MAC address of Default Gateway: yes

    would that frame(ARP request) contain the destination IP address for the DEfault gateway? yes

    And then once it gets an ARP reply from it's DEfault Gateway, PC A would the build a whole new frame with The newly learnt MAC address of it's DEfault Gateway and the destination IP addresss of PC B? yes

    Or would the destination IP address of the intital ARP request still be PC B ? No
    the initial arp request's destination ip address was the default gateway's ip address. not pc b.

    Thanks clarson for clearing that up for me. Just wanted some confirmation.

    Cheers.

    So just to sum it up, the initial ARP request has the Default Gateway as the Destination IP in packet. Once PC A sends a broacast to resolve the MAC address of the Default Gateway and gets a reply from the Default Gateway, then PC A learns the MAC address of the Default gateway.

    PC A then has all the needed info to create a whole new frame with Destination MAC address of the Default gateway, but now the IP packet contains PC B Destination IP address?

    Thanks, Hopefully I've understood now.
  • clarsonclarson Posts: 897Member ■■■■□□□□□□
    yes that is right
Sign In or Register to comment.