荔园在线
荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀
[回到开始]
[上一篇][下一篇]
发信人: georgehill (人生不定式), 信区: Linux
标 题: Configuring KAME for ATM connection(转寄)
发信站: BBS 荔园晨风站 (Sat Sep 16 11:32:01 2000), 站内信件
【 以下文字转载自 georgehill 的信箱 】
【 原文由 georgehill.bbs@smth.org 所发表 】
发信人: hhuu (什么是水,就是water啊), 信区: FreeBSD
标 题: Configuring KAME for ATM connection(转寄)
发信站: BBS 水木清华站 (Sat Sep 16 00:09:52 2000)
Configuring KAME for ATM connection
Jun-ichiro itojun Itoh, KAME Project
$Id: index.html,v 1.10 1998/10/04 16:35:29 itojun Exp $
Introduction
KAME advanced networking kit includes ATM support. However, ATM connection is
one of hard-to-configure item. This document tries
to describe how you can configure your ATM card for IPv4/v6 connections.
ATM drivers
To support PVC session over single ATM card, we included PVC driver support
into KAME kit. There are two versions of ATM driver used
in KAME kit.
ap0 PVC interface on en0 ATM NBMA (by Katsushi Kobayashi)
NOTE: Basically ap0 interface is obsolete. This was used in KAME/FreeBSD
until 980628 SNAP kit, and in KAME/BSDI until
980921 SNAP kit.
pvc0 PVC interface on en0 ATM NBMA (by Kenjiro Cho)
This driver came with ALTQ (alternate queueing policy) package, which can
be found at
http://www.csl.sony.co.jp/person/kjc/software.html.
Used in KAME/FreeBSD after ALTQ merge (980705 SNAP kit or later), and
KAME/BSDI (980928 SNAP kit or later).
To denote those two variants in the document, we place [ap0] and [pvc0] icon
throughout the document.
Configuring kernel
[ap0]: be sure to have the following defs in your kernel configuration file:
options NATM # native mode ATM
options ATM_PCR # ATM point-to-point pseudo device (ap0)
options ATM_MCAST_PVC_HACK # multicast over PVC
device en0 # "en0 at pci?" in BSDI
pseudo-device atm
pseudo-device natmptp 6 # have six interfaces, ap[0-5]
[pvc0]: be sure to have the following defs in your kernel configuration file:
options NATM # native mode ATM
device en0
pseudo-device atm
In [pvc0] implementation, PVC interface can be dynamically created. Therefore,
it is not required to denote the number of interfaces in the
kernel config file.
Installing userland tools
[ap0]: be sure to build and install apconfig, which is included in
kit/src/apconfig.
[pvc0] be sure to build ALTQ userland tools, which can be installed easily with
kit/ports/altq.
ATM Configuration
After properly configured the kernel and booted the kernel, we need to perform
a proper configuration. This section talks about common
cases only. For details please refer to manpages.
[ap0]: For [ap0] kernel, there will be PVC interface such as ap0 generated at
the bootstrap time. You just need to configure those interfaces,
by using apconfig. The following line configures ap0 to use VPI=0, VCI=53, and
20Mbps of bandwidth (via shaper):
# apconfig ap0:0/53 aal5 llc pcr 20m
You can disable shaper by using ubr or pcr 0.
# apconfig ap0:0/53 aal5 llc ubr
# apconfig ap0:0/53 aal5 llc pcr 0
In the past, apconfig was used with dotted hexadecimal arguments, like:
# apconfig ap0 en0:3.0.0.35.0.0.9.0
Just in case your configuration file has the notation, here we'll provide brief
description for the format. It is encouraged to switch to more
readable format (described above).
First hexadecimal value (3 in the above example) is a bitfield. bit 2^0 is
for AAL5, and bit 2^1 is for LLC/SNAP. The example shows
AAL5+LLC/SNAP case.
Third hexadecimal value (0 in the above example) is for VPI, and fourth
(35 in the above) is for VCI. Therefore, the example shows
VPI/VCI = 0/53 (VCI = 0x35 = 53).
Last three hexadecimal value (0.9.0 is for packet shaper. 0.9.0 stands for
0x000900 = 2304 cells/second. Hence, it means
976896bps (976896 = 2304 x 53 x 8).
[pvc0] STEP 1: generating PVC interfaces
First, you must generate PVC interfaces, such as pvc0, into the kernel. To do
this, perform the following:
# pvcsif en0
It will generate single interface. If you invoke pvcsif twice, two interfaces
will be generated.
Even though you can dynamically create interfaces on the fly, it is suggested
to generate PVC interfaces at bootstrap time. If you create
interfaces on the fly, you will have a hard time configuring routing daemons
(gated, for example). If you attempt to dynamically generate
PVC interfaces, you can get the name of the interface by pvcsif from standard
input:
# pvc=`pvcsif en0 -s`
[pvc0] STEP 2: configuring PVC connection
You can assign connection identifier (VPI/VCI pair) and bandwidth (by
configuring shaper) to pvc0, by using pvctxctl. For example:
# pvctxctl pvc0 0:53 -b 20M # VPI=0, VCI=53, shaper=20Mbps
You can disable shaper by using -b 0M or -p 0.
# pvctxctl pvc0 0:53 -b 0M # VPI=0, VCI=53, no shaper
Migration
If you are using KAME/FreeBSD, you may need to migrate from ap0 interface to
pvc0 interface. What you have to do are:
Generate PVC interfaces by pvcsif on boot
Configure PVC interfaces by pvctxctl, not apconfig
That's all.
Some more twists
In Japan, NTT (national phoneline company) is providing "ATM MegaLink" public
ATM leased line service. MegaLink service requires you
to limit the amount of your outgoing packets. If you plan to use KAME kernel to
connect your PC via the service, you may want to apply the
patch. The patch makes the ATM driver to be pessimistic about bandwidth
limitation (shaping).
Current status
Katsushi's implementation ([ap0]) has been used in 6bone-jp, Japan IPv6
experimental backbone, over public ATM connectivity services.
However, I guess there are few experiences on IPv4-only connectivity.
Kenjiro's implementation ([pvc0]) has recently been merged into, so IPv6
portion may not be very stable. IPv4 portion has been widely used
with ALTQ package, so it looks really stable.
Please feel free to submit bug reports to us, via GNATS database or mailing
list. Thanks!
--
行列中 作不朽文章
谈笑间 论古今英雄
痴狂里 诉红尘情爱
来去时 不枉一生风流
--------- bbs.ntu.edu.tw
※ 来源:·BBS 水木清华站 smth.org·[FROM: 166.111.161.33]
--
※ 转载:·BBS 荔园晨风站 bbs.szu.edu.cn·[FROM: 192.168.1.115]
[回到开始]
[上一篇][下一篇]
荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店