QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5985|回复: 15

loopback设备有什么用?

[复制链接]
发表于 2003-5-2 18:22:41 | 显示全部楼层 |阅读模式
在编译内核的时候,在字符设备里有两项loopback和net loopback(好像是这两个,可能名称记错了)有什么用,我记得有说过loopback设备可以用来加载iso。net loopback是不是和网络有很大关系。我这一次编译2.4.20时两个都没选,没什么大问题。就是我的网卡开机时不能自动激活了(我已经设置了。但手工激活可以,不妨碍使用)。是不是和net loopback有关。以前我只选择loopback,网卡可以自动激活。
发表于 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.
回复

使用道具 举报

 楼主| 发表于 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跟网络是不是有一定的关系。(说得是不是不是很明白。
回复

使用道具 举报

发表于 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下面
回复

使用道具 举报

 楼主| 发表于 2003-5-2 23:19:49 | 显示全部楼层
这两个紧挨着。一上一下。loopback device在上面。
回复

使用道具 举报

发表于 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
  • 回复

    使用道具 举报

     楼主| 发表于 2003-5-3 15:37:10 | 显示全部楼层
    │ │ < > Network block device support │ │
    好像是这个吧,我记错了。不好意思 。那这个跟网卡有关系吧。
    回复

    使用道具 举报

    发表于 2003-5-3 15:43:33 | 显示全部楼层
    环回地址?
    127.0.0.1
    就是信息通过你自己的网卡发送到你自己的机子上,即使没有网卡同样可以发送。
    回复

    使用道具 举报

    发表于 2003-5-4 07:13:55 | 显示全部楼层
    [quote:53a0d87efe="pjc5520"]│ │ < > Network block device support │ │
    好像是这个吧,我记错了。不好意思 。那这个跟网卡有关系吧。[/quote]

    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 from  http://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的数据。说白了就是自己发送给自己以测试网络是否正常。
    回复

    使用道具 举报

    发表于 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.
    回复

    使用道具 举报

     楼主| 发表于 2003-5-7 16:46:29 | 显示全部楼层
    谢谢各位。我有点懂了
    回复

    使用道具 举报

    发表于 2003-5-7 21:29:27 | 显示全部楼层
    welcome
    回复

    使用道具 举报

    发表于 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 技术内幕》
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    GMT+8, 2024-9-19 18:51 , Processed in 0.084771 second(s), 15 queries .

    © 2021 Powered by Discuz! X3.5.

    快速回复 返回顶部 返回列表