荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: jjksam (晕啊!), 信区: Linux
标  题: Re: lo是什么,与eth0有什么关系?
发信站: 荔园晨风BBS站 (Tue Sep 10 13:39:56 2002), 转信


对大部分设备,Linux使用/dev目录中的文件.但这两个网络设备却在内核内部定义.
/dev目录中并没有于之对应的文件.
lo--回环设备. 该设备为有效处理发送给系统自身(例如, 同一系统上的X客户和X服务器
进行通讯时)的网络数据包而使用.
eth0--第一个以太网卡. 如果有多个以太网卡,则设备名称依次为eth1, eth2等.

用户始终会有一个回环设备(lo),不管是否有网络.回环设备将数据从一个进程传递到另一
个进程,而不需要经过网络.实际上,回环设备的整个思想是允许网络应用程序在同一个系统
上进行通讯.
(所以在编译内核的时候应该选上这个. 无论你是否有网络.)

另外还有ppp0,ppp1...和sl0,sl1等

FreeBSD下面的man可以看到, 找不到eth0的,因为FreeBSD下面的定义跟Linux的有点区别.
man lo
LO(4)                  FreeBSD Kernel Interfaces Manual
LO(4)

NAME
     lo - software loopback network interface

SYNOPSIS
     pseudo-device loop

DESCRIPTION
     The loop interface is a software loopback mechanism which may be used
for
     performance analysis, software testing, and/or local communication.  As
     with other network interfaces, the loopback interface must have network
     addresses assigned for each address family with which it is to be used.
     These addresses may be set or changed with the SIOCSIFADDR ioctl(2).
The
     loopback interface should be the last interface configured, as protocols
     may use the order of configuration as an indication of priority.  The
     loopback should never be configured first unless no hardware interfaces
     exist.

DIAGNOSTICS
     lo%d: can't handle af%d.  The interface was handed a message with ad-
     dresses formatted in an unsuitable address family; the packet was
     dropped.

SEE ALSO
     inet(4),  intro(4)

HISTORY
     The lo device appeared in 4.2BSD.

BUGS
     Previous versions of the system enabled the loopback interface automati-
     cally, using a nonstandard Internet address (127.1).  Use of that
address
     is now discouraged; a reserved host address for the local network should
     be used instead.

4.2 Berkeley Distribution        June 5, 1993                                1
【 在 cycker (努力学习积分) 的大作中提到: 】


--
    ~
  ' v '
 //   \\                  ←--这个是企鹅!
/(     )\
  ^ ~ ^

※ 修改:·jjksam 於 Sep 10 13:45:17 修改本文·[FROM: 192.168.0.234]
※ 来源:·荔园晨风BBS站 bbs.szu.edu.cn·[FROM: 192.168.0.234]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店