From What I know, IPs are used to communicate b/w two different networks say LAN1 and LAN2... and MACs are used to communicate within a LAN.. I think this because my instructor says that Hubs and Switches are used to communicate within a LAN, That's why, they're Physical and Data Link Layer Devices.. While Routers are Network Layer Devices, Meaning they are used to connect two different networks.. So Can you commuincate within a LAN, with help of MAC Addresses only ? NO IPs ?
So Can you commuincate within a LAN, with help of MAC Addresses only ?
Yes, absolutely. That's actually what IP does, it uses the data link layer (L2) as transport vehicle, with the underlying layer having no idea what's going on above.
It is technically possible to run a transport protocol or even an application protocol directly on top of L2 - that was commonly used in the early days of network gaming. It is very clumsy though and has grown extremely complicated with more modern operating systems (requiring admin/root privileges or a fully fledged protocol stack handler), so it's not really practical.
And of course, "no IPs" doesn't exclude using different network-layer protocols like IPX or EtherTalk that are largely obsolete but would still work on top of the data link layer.
Of course, if you create your own communication protocols within the local network, it is only possible to communicate with the MAC address. however, this is not possible when it comes to messaging over TCP/IP protocols. The IP in the TCP/IP protocol stack tells you whether the message will be local or remote. So the answer the question is both yes and no.