lo linux 环回端口,本地环回接口lo The Loopback Network Interface lo--用Enki学Linux系列(2)...

当你执行ifconfig命令时会看到一个名为lo的接口,似乎它没有与任何物理设备通信:

If you run the ifconfig command you’ll see an interface designated lo that doesn’t appear to correspond to any physical device:$ ifconfig

lo

Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

inet6 addr: ::1/128 Scope:Host

UP LOOPBACK RUNNING MTU:65536 Metric:1

RX packets:31 errors:0 dropped:0

overruns:0 frame:0

TX packets:31 errors:0 dropped:0

overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:2240 (2.2 KB)

TX bytes:2240 (2.2 KB)

$

lo接口(lo代替“loopback”)是一个特别的,虚拟的网络接口,它的所有流量(上行或下行)不用任何处理或修改,自动发送给接口本身。它被配置了127.0.0.1这个不能公开使用,永远指设备本身的特殊IP。

The lo interface (lo stands for “loopback”) is a special, virtual network interface in which all traffic (up or down) is automatically sent back to the interface itself without any processing or modification. It is assigned the IP address 127.0.0.1, which is a special IP address that can’t ever be used publicly and always refers to the machine itself.

把本地环回接口和IP127.0.0.1想象成一个反身代词:它永远是“这个设备本身”的意思。“localhost”经常被用来表示同样的意思。

Think of the loopback interface and the 127.0.0.1 IP as a reflexive pronoun: it always means “this machine itself”. The term “localhost” is often used to mean the same thing in this context.

环回接口用来查错和运行本机内部的网络服务。比如,我们可能需要运行一个web应用的开发版本,但不希望将它连接到整个互联网。我们可以将它配置成仅通过环回接口发送接收数据,然后通过http://127.0.0.1访问。

The loopback interface is used for debugging and running machine-internal network services. For example, we might have a development version of a web application running and don’t want it available to the internet at large. We could configure it to only send/receive traffic over the loopback interface and then access it at http://127.0.0.1.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值