以下小节专门介绍特定的网络技术。这些章节中包含的信息不一定适用于任何其他类型的网络技术。主题按字母顺序排序。
ARCNet 设备名称为 `arc0e
`、`arc1e
`、`arc2e
` 等或 `arc0s
`、`arc1s
`、`arc2s
` 等。内核检测到的第一张卡被分配为 `arc0e
` 或 `arc0s
`,其余的按照检测到的顺序依次分配。末尾的字母表示您选择的是以太网封装数据包格式还是 RFC1051 数据包格式。
内核编译选项:
Network device support --->
[*] Network device support
<*> ARCnet support
[ ] Enable arc0e (ARCnet "Ether-Encap" packet format)
[ ] Enable arc0s (ARCnet RFC1051 packet format)
一旦您正确构建了内核以支持您的以太网卡,那么配置该卡就很容易了。
通常您会使用类似这样的命令
root# ifconfig arc0e 192.168.0.1 netmask 255.255.255.0 up
root# route add -net 192.168.0.0 netmask 255.255.255.0 arc0e
请参考 `/usr/src/linux/Documentation/networking/arcnet.txt
` 和 `/usr/src/linux/Documentation/networking/arcnet-hardware.txt
` 文件以获取更多信息。ARCNet 支持由 Avery Pennarun 开发,`apenwarr@foxnet.net
`。
AF_APPLETALK
)
Appletalk 支持没有特殊的设备名称,因为它使用现有的网络设备。
内核编译选项:
Networking options --->
<*> Appletalk DDP
Appletalk 支持允许您的 Linux 机器与 Apple 网络互操作。一个重要的用途是在您的 Linux 和 Apple 计算机之间共享打印机和磁盘等资源。这需要额外的软件,称为 netatalk。Wesley Craig `netatalk@umich.edu
` 代表了密歇根大学的 `Research Systems Unix Group` 团队,他们开发了 netatalk 软件包,该软件包提供了实现 Appletalk 协议栈和一些实用工具的软件。netatalk 软件包可能已随您的 Linux 发行版提供,或者您必须从其位于 密歇根大学 的主站点通过 ftp 下载。
要构建和安装软件包,请执行类似操作
user% tar xvfz .../netatalk-1.4b2.tar.Z
user% make
root# make install
您可能需要在调用 make 来实际编译软件之前编辑 `Makefile
`。具体来说,您可能需要更改 DESTDIR 变量,该变量定义了文件稍后将被安装的位置。默认的 /usr/local/atalk 是相当安全的。
要使一切正常工作,您需要做的第一件事是确保 `/etc/services
` 文件中存在适当的条目。您需要的条目是
rtmp 1/ddp # Routing Table Maintenance Protocol
nbp 2/ddp # Name Binding Protocol
echo 4/ddp # AppleTalk Echo Protocol
zip 6/ddp # Zone Information Protocol
下一步是在 `/usr/local/atalk/etc
` 目录(或您安装软件包的任何位置)中创建 Appletalk 配置文件。
要创建的第一个文件是 `/usr/local/atalk/etc/atalkd.conf
` 文件。最初,此文件只需要一行,给出支持您的 Apple 机器所在的网络的网络设备的名称
eth0
Appletalk 守护程序将在运行后添加额外的详细信息。
您可以从您的 Linux 机器导出文件系统到网络,以便网络上的 Apple 机器可以共享它们。
为此,您必须配置 `/usr/local/atalk/etc/AppleVolumes.system
` 文件。还有另一个配置文件名为 `/usr/local/atalk/etc/AppleVolumes.default
`,它具有完全相同的格式,并描述了具有访客权限连接的用户将接收哪些文件系统。
有关如何配置这些文件以及各种选项的完整详细信息,请参阅 afpd 手册页。
一个简单的例子可能如下所示
/tmp Scratch
/home/ftp/pub "Public Area"
这将导出您的 `/tmp
` 文件系统作为 AppleShare 卷 `Scratch`,并将您的 ftp 公共目录作为 AppleShare 卷 `Public Area`。卷名不是强制性的,守护程序会为您选择一些,但指定它们也无妨。
您可以非常简单地与您的 Apple 机器共享您的 Linux 打印机。您需要运行 papd 程序,它是 Appletalk 打印机访问协议守护程序。当您运行此程序时,它将接受来自您的 Apple 机器的请求,并将打印作业假脱机到您的本地行式打印机守护程序以进行打印。
您需要编辑 `/usr/local/atalk/etc/papd.conf
` 文件来配置守护程序。此文件的语法与您常用的 `/etc/printcap
` 文件相同。您给定义的名称在 Appletalk 命名协议 NBP 中注册。
一个示例配置可能如下所示
TricWriter:\
:pr=lp:op=cg:
这将使名为 `TricWriter` 的打印机可用于您的 Appletalk 网络,并且所有接受的作业都将使用 lpd 打印到 Linux 打印机 `lp
`(如 `/etc/printcap
` 文件中所定义)。条目 `op=cg
` 表示 Linux 用户 `cg
` 是打印机的操作员。好的,您现在应该准备好测试此基本配置。netatalk 软件包附带了一个 rc.atalk 文件,它应该可以正常工作,所以您只需执行
root# /usr/local/atalk/etc/rc.atalk
一切都应该启动并正常运行。您应该看不到任何错误消息,并且软件将在启动时向控制台发送消息指示每个阶段。
要测试软件是否正常运行,请转到您的 Apple 机器之一,拉下 Apple 菜单,选择“选择器”,单击“AppleShare”,您的 Linux 机器应该会出现。
/etc/rc.d/rc.inet1
` 文件之前启动 Appletalk 软件。.AppleDesktop
`` 和 Network Trash Folder
的目录。然后,对于您访问的每个目录,它都会在其下方创建一个 .AppleDouble
,以便它可以存储资源分支等。因此,在导出 `/` 之前请三思,之后您将有很长一段时间要清理。/proc/net/
` 目录中找到。有关如何为 Linux 配置 Appletalk 的更详细描述,请参阅 Anders Brownworth 在 thehamptons.com 上的 Linux Netatalk-HOWTO 页面。
Werner Almesberger `<werner.almesberger@lrc.di.epfl.ch>
` 正在管理一个为 Linux 提供异步传输模式支持的项目。有关项目状态的最新信息可以从 lrcwww.epfl.ch 获取。
AF_AX25
)
在 `2.0.*
` 内核中,AX.25 设备名称为 `sl0
`、`sl1
` 等;在 `2.1.*
` 内核中,设备名称为 `ax0
`、`ax1
` 等。
内核编译选项:
Networking options --->
[*] Amateur Radio AX.25 Level 2
AX25、Netrom 和 Rose 协议在 AX25-HOWTO 中进行了介绍。这些协议被世界各地的业余无线电操作员用于分组无线电实验。
这些协议的大部分实现工作由 Jonathon Naylor 完成,`jsn@cs.nott.ac.uk
`。
DECNet 的支持目前正在开发中。您应该期望它出现在较新的 `2.1.*
` 内核中。
FDDI 设备名称为 `fddi0
`、`fddi1
`、`fddi2
` 等。内核检测到的第一张卡被分配为 `fddi0
`,其余的按照检测到的顺序依次分配。
Larry Stefani,`lstefani@ultranet.com
`,开发了 Digital Equipment Corporation FDDI EISA 和 PCI 卡的驱动程序。
内核编译选项:
Network device support --->
[*] FDDI driver support
[*] Digital DEFEA and DEFPA adapter support
当您构建内核以支持 FDDI 驱动程序并安装后,FDDI 接口的配置几乎与以太网接口的配置相同。您只需在 ifconfig 和 route 命令中指定适当的 FDDI 接口名称。
帧中继设备名称对于 DLCI 封装设备为 `dlci00
`、`dlci01
` 等,对于 FRAD 为 `sdla0
`、`sdla1
` 等。
帧中继是一种新的网络技术,旨在适应 `突发性` 或间歇性的数据通信流量。您可以使用帧中继访问设备 (FRAD) 连接到帧中继网络。Linux 帧中继支持 RFC-1490 中描述的 IP over Frame Relay。
内核编译选项:
Network device support --->
<*> Frame relay DLCI support (EXPERIMENTAL)
(24) Max open DLCI
(8) Max DLCI per device
<*> SDLA (Sangoma S502/S508) support
Mike McLagan,`mike.mclagan@linux.org
`,开发了帧中继支持和配置工具。
目前唯一支持的 FRAD 是 Sangoma Technologies `S502A
`、`S502E
` 和 `S508
`。
要在重建内核后配置 FRAD 和 DLCI 设备,您需要帧中继配置工具。这些工具可从 ftp.invlogic.com 获取。编译和安装这些工具很简单,但缺少顶级 Makefile 使其成为一个相当手动的过程
user% tar xvfz .../frad-0.15.tgz
user% cd frad-0.15
user% for i in common dlci frad; make -C $i clean; make -C $i; done
root# mkdir /etc/frad
root# install -m 644 -o root -g root bin/*.sfm /etc/frad
root# install -m 700 -o root -g root frad/fradcfg /sbin
rppt# install -m 700 -o root -g root dlci/dlcicfg /sbin
请注意,之前的命令使用 sh 语法,如果您改用 csh 风格(例如 tcsh),则 for 循环将看起来不同。
安装工具后,您需要创建一个 `/etc/frad/router.conf
` 文件。您可以使用此模板,它是示例文件之一的修改版本
# /etc/frad/router.conf
# This is a template configuration for frame relay.
# All tags are included. The default values are based on the code
# supplied with the DOS drivers for the Sangoma S502A card.
#
# A '#' anywhere in a line constitutes a comment
# Blanks are ignored (you can indent with tabs too)
# Unknown [] entries and unknown keys are ignored
#
[Devices]
Count=1 # number of devices to configure
Dev_1=sdla0 # the name of a device
#Dev_2=sdla1 # the name of a device
# Specified here, these are applied to all devices and can be overridden for
# each individual board.
#
Access=CPE
Clock=Internal
KBaud=64
Flags=TX
#
# MTU=1500 # Maximum transmit IFrame length, default is 4096
# T391=10 # T391 value 5 - 30, default is 10
# T392=15 # T392 value 5 - 30, default is 15
# N391=6 # N391 value 1 - 255, default is 6
# N392=3 # N392 value 1 - 10, default is 3
# N393=4 # N393 value 1 - 10, default is 4
# Specified here, these set the defaults for all boards
# CIRfwd=16 # CIR forward 1 - 64
# Bc_fwd=16 # Bc forward 1 - 512
# Be_fwd=0 # Be forward 0 - 511
# CIRbak=16 # CIR backward 1 - 64
# Bc_bak=16 # Bc backward 1 - 512
# Be_bak=0 # Be backward 0 - 511
#
#
# Device specific configuration
#
#
#
# The first device is a Sangoma S502E
#
[sdla0]
Type=Sangoma # Type of the device to configure, currently only
# SANGOMA is recognized
#
# These keys are specific to the 'Sangoma' type
#
# The type of Sangoma board - S502A, S502E, S508
Board=S502E
#
# The name of the test firmware for the Sangoma board
# Testware=/usr/src/frad-0.10/bin/sdla_tst.502
#
# The name of the FR firmware
# Firmware=/usr/src/frad-0.10/bin/frm_rel.502
#
Port=360 # Port for this particular card
Mem=C8 # Address of memory window, A0-EE, depending on card
IRQ=5 # IRQ number, do not supply for S502A
DLCIs=1 # Number of DLCI's attached to this device
DLCI_1=16 # DLCI #1's number, 16 - 991
# DLCI_2=17
# DLCI_3=18
# DLCI_4=19
# DLCI_5=20
#
# Specified here, these apply to this device only,
# and override defaults from above
#
# Access=CPE # CPE or NODE, default is CPE
# Flags=TXIgnore,RXIgnore,BufferFrames,DropAborted,Stats,MCI,AutoDLCI
# Clock=Internal # External or Internal, default is Internal
# Baud=128 # Specified baud rate of attached CSU/DSU
# MTU=2048 # Maximum transmit IFrame length, default is 4096
# T391=10 # T391 value 5 - 30, default is 10
# T392=15 # T392 value 5 - 30, default is 15
# N391=6 # N391 value 1 - 255, default is 6
# N392=3 # N392 value 1 - 10, default is 3
# N393=4 # N393 value 1 - 10, default is 4
#
# The second device is some other card
#
# [sdla1]
# Type=FancyCard # Type of the device to configure.
# Board= # Type of Sangoma board
# Key=Value # values specific to this type of device
#
# DLCI Default configuration parameters
# These may be overridden in the DLCI specific configurations
#
CIRfwd=64 # CIR forward 1 - 64
# Bc_fwd=16 # Bc forward 1 - 512
# Be_fwd=0 # Be forward 0 - 511
# CIRbak=16 # CIR backward 1 - 64
# Bc_bak=16 # Bc backward 1 - 512
# Be_bak=0 # Be backward 0 - 511
#
# DLCI Configuration
# These are all optional. The naming convention is
# [DLCI_D<devicenum>_<DLCI_Num>]
#
[DLCI_D1_16]
# IP=
# Net=
# Mask=
# Flags defined by Sangoma: TXIgnore,RXIgnore,BufferFrames
# DLCIFlags=TXIgnore,RXIgnore,BufferFrames
# CIRfwd=64
# Bc_fwd=512
# Be_fwd=0
# CIRbak=64
# Bc_bak=512
# Be_bak=0
[DLCI_D2_16]
# IP=
# Net=
# Mask=
# Flags defined by Sangoma: TXIgnore,RXIgnore,BufferFrames
# DLCIFlags=TXIgnore,RXIgnore,BufferFrames
# CIRfwd=16
# Bc_fwd=16
# Be_fwd=0
# CIRbak=16
# Bc_bak=16
# Be_bak=0
当您构建了 `/etc/frad/router.conf
` 文件后,剩下的唯一步骤是配置实际设备本身。这只比普通的网络设备配置稍微复杂一些,您需要记住在 DLCI 封装设备之前启动 FRAD 设备。由于命令数量较多,这些命令最好放在 shell 脚本中
#!/bin/sh
# Configure the frad hardware and the DLCI parameters
/sbin/fradcfg /etc/frad/router.conf || exit 1
/sbin/dlcicfg file /etc/frad/router.conf
#
# Bring up the FRAD device
ifconfig sdla0 up
#
# Configure the DLCI encapsulation interfaces and routing
ifconfig dlci00 192.168.10.1 pointopoint 192.168.10.2 up
route add -net 192.168.10.0 netmask 255.255.255.0 dlci00
#
ifconfig dlci01 192.168.11.1 pointopoint 192.168.11.2 up
route add -net 192.168.11.0 netmask 255.255.255.0 dlci00
#
route add default dev dlci00
#
AF_IPX
)
IPX 协议最常用于 Novell NetWare(tm) 局域网环境。Linux 包括对该协议的支持,并且可以配置为充当网络端点或 IPX 路由器。
内核编译选项:
Networking options --->
[*] The IPX protocol
[ ] Full internal IPX network
IPX 协议和 NCPFS 在 IPX-HOWTO 中进行了更深入的介绍。
AF_NETROM
)
NetRom 设备名称为 `nr0
`、`nr1
` 等。
内核编译选项:
Networking options --->
[*] Amateur Radio AX.25 Level 2
[*] Amateur Radio NET/ROM
AX25、Netrom 和 Rose 协议在 AX25-HOWTO 中进行了介绍。这些协议被世界各地的业余无线电操作员用于分组无线电实验。
这些协议的大部分实现工作由 Jonathon Naylor 完成,`jsn@cs.nott.ac.uk
`。
AF_ROSE
)
在 `2.1.*
` 内核中,Rose 设备名称为 `rs0
`、`rs1
` 等。Rose 在 `2.1.*
` 内核中可用。
内核编译选项:
Networking options --->
[*] Amateur Radio AX.25 Level 2
<*> Amateur Radio X.25 PLP (Rose)
AX25、Netrom 和 Rose 协议在 AX25-HOWTO 中进行了介绍。这些协议被世界各地的业余无线电操作员用于分组无线电实验。
这些协议的大部分实现工作由 Jonathon Naylor 完成,`jsn@cs.nott.ac.uk
`。
SAMBA 是会话管理块协议的实现。Samba 允许 Microsoft 和其他系统挂载和使用您的磁盘和打印机。
SAMBA 及其配置在 SMB-HOWTO 中进行了详细介绍。
STRIP 设备名称为 `st0
`、`st1
` 等。
内核编译选项:
Network device support --->
[*] Network device support
....
[*] Radio network interfaces
< > STRIP (Metricom starmode radio IP)
STRIP 是一种专门为 Metricom 无线电调制解调器系列设计的协议,用于斯坦福大学进行的名为 MosquitoNet 项目 的研究项目。即使您对该项目没有直接兴趣,这里也有很多有趣的阅读材料。
Metricom 无线电连接到串行端口,采用扩频技术,通常能够达到约 100kbps 的速度。有关 Metricom 无线电的信息可从 Metricom Web 服务器 获取。
目前,标准网络工具和实用程序不支持 STRIP 驱动程序,因此您必须从 MosquitoNet Web 服务器下载一些自定义工具。有关您需要的软件的详细信息,请访问:MosquitoNet STRIP 页面。
配置摘要是,您使用修改后的 slattach 程序将串行 tty 设备的线路规程设置为 STRIP,然后像配置以太网一样配置生成的 `st[0-9]
` 设备,但有一个重要的例外,由于技术原因,STRIP 不支持 ARP 协议,因此您必须手动为子网上的每个主机配置 ARP 条目。这应该不会太繁琐。
令牌环设备名称为 `tr0
`、`tr1
` 等。令牌环是一种 IBM 标准 LAN 协议,它通过提供一种机制来避免冲突,该机制允许 LAN 上一次只有一个站有权发送数据。`令牌` 一次由一个站持有,持有令牌的站是唯一允许发送数据的站。当它发送完数据后,它将令牌传递给下一个站。令牌在所有活动站之间循环,因此得名 `令牌环`。
内核编译选项:
Network device support --->
[*] Network device support
....
[*] Token Ring driver support
< > IBM Tropic chipset based adaptor support
令牌环的配置与以太网的配置相同,除了要配置的网络设备名称。X.25 是由 `C.C.I.T.T.`(世界大多数地区的电信公司认可的标准机构)定义的基于电路的分组交换协议。X.25 和 LAPB 的实现正在开发中,最新的 `2.1.*
` 内核包含正在进行的工作。
Jonathon Naylor `jsn@cs.nott.ac.uk
` 正在领导开发工作,并且已经建立了一个邮件列表来讨论与 Linux X.25 相关的事宜。要订阅,请向 `majordomo@vger.rutgers.edu
` 发送消息,并在消息正文中包含文本 "subscribe linux-x25
"。
配置工具的早期版本可以从 Jonathon 的 ftp 站点 ftp.cs.nott.ac.uk 获取。
Wavelan 设备名称为 `eth0
`、`eth1
` 等。
内核编译选项:
Network device support --->
[*] Network device support
....
[*] Radio network interfaces
....
<*> WaveLAN support
WaveLAN 网卡是一种扩频无线局域网卡。实际上,该卡看起来很像以太网卡,并且配置方式也大致相同。您可以从 Wavelan.com 获取有关 Wavelan 网卡的信息。