The following pieces of information must be with a computer to communicate over TCP/IP network →
If you run the ipconfig command you will see the details about your network, including:
- Physical Address of your device (MAC).
- IP address along with subnet mask.
- Default Gateway (the router assigned for sending IP packets).
- DNS Server IP
Computer A wants to talk to B and C. The computer A uses its subnet mask to find out if B and C are local or remote. Then to communicate locally with B, A follows:
- Step 1: A asks for B’s MAC Address using ARP.
- Step 2: B replies to A with its MAC Address.
- Step 3: A uses frames to communicate with B.
All communications between A and B would require a switch (layer 2 device). The default gateway(layer 3 device) will not be used in this case.
Now, let’s see how A talks with C:
- Step 1: A asks for the MAC address of the default gateway using ARP.
- Step 2: The default gateway replies to A with its MAC Address.
- Step 3: A sends its IP packets to the default gateway, which delivers the message of A to C.
References :
[Address Resolution Protocol (ARP)
ARP is a layer 2 protocol (Data Link Layer) for mapping an IP address to a MAC address on a local area network.medium.com](https://medium.com/networks-security/address-resolution-protocol-arp-6d3b586b23c0 "medium.com/networks-security/address-resolu..")
[Subnet Mask
Every host on a network has an IP address and a subnet mask.medium.com](https://medium.com/networks-security/subnet-mask-dbd1e2f0a829 "medium.com/networks-security/subnet-mask-db..")