3

When a computer, Computer A, wants to communicate with Computer B, it (Computer A) will use MAC and IP addresses. It will send the packet of information to Switch, which, based upon the MAC destination address contained in the packet of information, will look on its lookup table if the computer that owns the mentioned MAC Destination Address is available on the LAN network, right?

If it is unable to locate the computer on the LAN (suppose here that the lookup table is full), will it send it to Router, or does Computer A decide to send directly to the MAC address of the Network Interface Card of Router (the link with the WAN or the Internet for my LAN)?

I am a little bit confused related to the way that switches communicate with routers. When and how is this done?

enter image description here

4

A host will first determine if the destination IP address is on the same network. If not, it will send the IP packet to its configured gateway.

A switch doesn't decide this, and, to a switch, a router is just another host. The MAC address to which a frame is delivered is determined by the host before the host encapsulates the packet in a frame.

  • you mean CA decides and knows that the IP destination address of CB is not on the network ? – user24308 Apr 7 '16 at 18:50
  • I still don't get it ? – user24308 Apr 7 '16 at 18:51
  • Frame is an information packet, right ? you mean by host : Computer A or Computer B ? – user24308 Apr 7 '16 at 18:52
  • 1
    Exactly, A host has a configured IP address and mask. It masks its IP address to get its network. It will mask a destination address to get the network of the destination. If the two networks are not identical, it knows that the destination is on a different network. If the destination is on a different network, it will send the packet to its configured gateway. – Ron Maupin Apr 7 '16 at 18:53
  • A frame is a layer-2 datagram, and a packet is a layer-3 datagram. A packet has the layer-3 (IP) source and destination addresses. A frame has the layer-2 (MAC) source and destination addresses. A layer-4 datagram (TCP/UDP) has layer-4 source and destination addresses (ports). – Ron Maupin Apr 7 '16 at 18:55

Your Answer

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