During transmissions over localhost which layers are used in OSI Model?

安稳与你 提交于 2019-12-07 20:35:04

问题


While transmiting data via localhost address or 127.0.0.1 which layers are used in the OSI model?

I believe communication starts through application layer and goes down till some layer but no data goes through physical layer, or does any?


回答1:


Traffic to 127.0.0.1 will be looped back by the internet layer of the TCP/IP model, which is matched in the OSI model by the Network layer. This is the layer where routing and address resolution take place.




回答2:


I believe (although I'd be happy to be corrected) that data may actually go down as far as Layer 2 ("Datalink Layer").

There's no need to add any protocol headers or encoding to handle loopback interfaces, but never-the-less the operating system will normally treat the loopback interfaces as if they were real interfaces, each with their own packet counters, etc.

There's no reason at all why a loopback interface can't be used for non-IPv4 protocols - indeed many current systems automatically put an IPv6 address on the loopback interfaces.

In that sense a loopback interface is just a "null" Layer 2 device.



来源:https://stackoverflow.com/questions/415832/during-transmissions-over-localhost-which-layers-are-used-in-osi-model

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!