1

A group of computers connected by a layer 2 Switch, can communicate each other by the layer 2 address i.e. MAC address. Does IP address also require on LAN(Layer 2) network(assuming there is no Router exists in the given LAN network) to communicate messages between hosts for a given applications(HTTP,FTP)?

For example, Computer A running a browser and trying to access a http server hosted on computer B. Now both the computer A and B are connected by a Layer 2 Switch(Ethernet Switch). Now in this scenario http shouldn't require an IP address.. rather MAC is enough to communicate between computer A and B. But still we do provide IP to both the computer .. WHY?

0
2

The answer to your question is that it depends on the protocol. It is true that some protocols will work at layer 2 alone (for example NetBIOS), but others were written from the ground up to use upper layer protocols like IP (layer 3) and TCP (layer 4). The two you refer to are HTTP and FTP. Both of them rely on TCP to establish the virtual circuit session, so by nature of the protocol they cannot work at layer 2 alone.

If you need detailed description on how the protocol works, the RFCs are a great source. See the HTTP 1.1 RFC doc here

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