pjc5520 发表于 2003-5-2 18:22:41

loopback设备有什么用?

在编译内核的时候,在字符设备里有两项loopback和net loopback(好像是这两个,可能名称记错了)有什么用,我记得有说过loopback设备可以用来加载iso。net loopback是不是和网络有很大关系。我这一次编译2.4.20时两个都没选,没什么大问题。就是我的网卡开机时不能自动激活了(我已经设置了。但手工激活可以,不妨碍使用)。是不是和net loopback有关。以前我只选择loopback,网卡可以自动激活。

Dragonfly 发表于 2003-5-2 22:15:39

i only know block device had a loopback device option. that is nothing with network. u network problem is not because of this one.

pjc5520 发表于 2003-5-2 22:43:30

对对对,是block device里面的。我记错了。我记得在启动时有一项是bring up loopback 过程是吧。那是干什么用的。我用redhat8时,用他自带的网卡驱动来驱动我的网卡时,就在这个过程停下了。我跳过网络设备,才能进入系统。然后装上网卡驱动,这个过程就能顺利过去。我现在用的是redhat9,他自带的网卡驱动可以顺利通过这个过程,我用自己编译的2.4.20,不选择loop back device和net loopback device(可能是这个名字,就在loopback device下面),选择开机时激活网卡,我发现就没有这个过程,网卡也不能激活。所以我觉得loopback跟网络是不是有一定的关系。(说得是不是不是很明白。 :-D )

Dragonfly 发表于 2003-5-2 23:14:42

i only remember one loopback device under block device. can u tell me where i can find another one?
at least this one has no relationship with networking. it is used to let a file act as a block device. for example, mount an iso file

i can not find this net loopback device(可能是这个名字,就在loopback device下面

pjc5520 发表于 2003-5-2 23:19:49

这两个紧挨着。一上一下。loopback device在上面。

Dragonfly 发表于 2003-5-2 23:38:24

this is my 2.4.20 kenrel menuconfig. i do not know where to find net look back device. what is u kernel version?

Micro Memory MM5415 Battery Backed RAM support (EXPERIMENTAL)         │ │
│ │       <M> Loopback device support                                             │ │
│ │       < > Network block device support                                          │ │
│ │       < > RAM disk support                                                      │ │
│ │       [*] Per partition statistics in /proc/partitions

pjc5520 发表于 2003-5-3 15:37:10

│ │ < > Network block device support │ │
好像是这个吧,我记错了。不好意思 :oops: 。那这个跟网卡有关系吧。

吴文官 发表于 2003-5-3 15:43:33

环回地址?
127.0.0.1
就是信息通过你自己的网卡发送到你自己的机子上,即使没有网卡同样可以发送。

Dragonfly 发表于 2003-5-4 07:13:55

│ │ < > Network block device support │ │
好像是这个吧,我记错了。不好意思 :oops: 。那这个跟网卡有关系吧。

no, that is nbd. it is a way to use a remote nbd server to export a file as a block device. then u local nbd driver can use that block device and export it to u. then u can write/read asif it is a local device. its source code is a good example to learn kernel level socket programming, and block device driver programming.
more info can be found fromhttp://www.xss.co.at/linux/NBD/

吴文官 发表于 2003-5-4 12:52:38

loopback
环回
作用:测试NIC(network interface card)
正常的NIC可以向网络发送数据,也可以从网络接收数据。
lo的作用是模拟向网络发送数据,再接收发送的数据。
IP:127.0.0.1对应localhost,即使没有网卡,这个IP也存在,(如果打开了httpd服务,可以在浏览器的地址栏输入localhost或127.0.0.1访问自己的计算机。这时lo的作用就是以IP-127.0.0.1发送数据再接收来自127.0.0.1的数据。说白了就是自己发送给自己以测试网络是否正常。

Dragonfly 发表于 2003-5-4 22:44:16

i think loopback can test network protocols, not network devices (nic), the ip traffic to lookback will not arrive nic. the network throughput via looback is much higher than a nic can do, even without wire cost.

pjc5520 发表于 2003-5-7 16:46:29

谢谢各位。我有点懂了

Dragonfly 发表于 2003-5-7 21:29:27

welcome

Dragonfly 发表于 2003-5-8 00:32:52

i check the drivers/net/loopback.c. so my knowledge is confirmed again that loopback can be used to check whether network protocol code is ok or not. nothing to do with certain NIC.

吴文官 发表于 2003-5-9 11:09:22

yes
i kown
I have found several mistakes in the book named 《Unix 技术内幕》
页: [1] 2
查看完整版本: loopback设备有什么用?