During transmissions over localhost which layers a

2019-05-26 19:39发布

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?

2条回答
smile是对你的礼貌
2楼-- · 2019-05-26 20:04

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.

查看更多
forever°为你锁心
3楼-- · 2019-05-26 20:15

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.

查看更多
登录 后发表回答