2004-07-08 08:14:28 +00:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 2003
|
|
|
|
.\" Fraunhofer Institute for Open Communication Systems (FhG Fokus).
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
2004-07-08 10:31:12 +00:00
|
|
|
.\" Author: Hartmut Brandt <harti@FreeBSD.org>
|
2004-07-08 08:14:28 +00:00
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
2003-06-13 12:33:33 +00:00
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2003-08-12 14:20:32 +00:00
|
|
|
.Dd August 11, 2003
|
2003-06-13 12:33:33 +00:00
|
|
|
.Dt NATMIP 4
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm natmip
|
|
|
|
.Nd IP over ATM PVCs
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Cd "device atm"
|
|
|
|
.Cd "options NATM"
|
|
|
|
.Sh DESCRIPTION
|
2004-07-03 18:29:24 +00:00
|
|
|
The NATM protocol stack includes support for IP over ATM.
|
|
|
|
Without any
|
2003-06-13 12:33:33 +00:00
|
|
|
additional signalling stacks or other modules it is possible to build
|
|
|
|
a CLIP (classical IP over ATM) network based on PVCs.
|
|
|
|
.Pp
|
2004-07-08 10:31:12 +00:00
|
|
|
An ATM network card
|
|
|
|
.Li ( en0
|
|
|
|
in this example) is configured for IP by something
|
2003-06-13 12:33:33 +00:00
|
|
|
like:
|
|
|
|
.Pp
|
2004-07-08 10:31:12 +00:00
|
|
|
.Dl "ifconfig en0 128.252.200.1 netmask 0xffffff00 up"
|
2003-06-13 12:33:33 +00:00
|
|
|
.Pp
|
2003-08-12 14:20:32 +00:00
|
|
|
IP routing is done with special interface routes (routes with directly
|
|
|
|
reachable destinations) with a link layer gateway address.
|
|
|
|
The link layer address specifies the ATM interface through which the
|
|
|
|
destination can be reached, the virtual channel that connects to the
|
|
|
|
destination and the ATM characteristics of this channel.
|
|
|
|
The address part of the link layer address (see
|
|
|
|
.Xr link_addr 3 )
|
|
|
|
consists of a fixed part (the first 5 bytes) and a part that
|
2004-07-03 18:29:24 +00:00
|
|
|
depends on the kind of the PVC (UBR, CBR, VBR, ABR).
|
|
|
|
Multi-byte values
|
2003-08-12 14:20:32 +00:00
|
|
|
are big-endian encoded: the bytes with the lower numbers contain the
|
|
|
|
higher order bits.
|
|
|
|
.Bl -tag -width "bytes 12...12" -offset indent
|
|
|
|
.It byte 0
|
2004-07-03 18:29:24 +00:00
|
|
|
Is a flag byte.
|
|
|
|
Currently only flag 0x20 is used.
|
2003-08-12 14:20:32 +00:00
|
|
|
When set, all IP frames are LLC/SNAP encapsulated before putting them into
|
|
|
|
an AAL5 frame.
|
|
|
|
Setting this flag is recommended and allows interoperability with other
|
|
|
|
CLIP implementations.
|
|
|
|
Note that BPF works only with LLC/SNAP encapsulation.
|
|
|
|
.It byte 1
|
|
|
|
This is the VPI of the channel.
|
|
|
|
.It bytes 2...3
|
2004-07-03 18:29:24 +00:00
|
|
|
VCI of the channel.
|
|
|
|
Must not be zero.
|
2003-08-12 14:20:32 +00:00
|
|
|
.It byte 4
|
2004-07-03 18:29:24 +00:00
|
|
|
Traffic type.
|
|
|
|
One of 0 (UBR), 1 (CBR), 2 (ABR), 3 (VBR).
|
2003-08-12 14:20:32 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The variable part for UBR connections may be either empty or three bytes:
|
|
|
|
.Bl -tag -width "bytes 12...12" -offset indent
|
|
|
|
.It bytes 5...7
|
|
|
|
Specifies the peak cell rate for UBR.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The variable part for CBR connections must be three bytes:
|
|
|
|
.Bl -tag -width "bytes 12...12" -offset indent
|
|
|
|
.It bytes 5...7
|
|
|
|
Specifies the peak cell rate for CBR.
|
|
|
|
.El
|
2003-06-13 12:33:33 +00:00
|
|
|
.Pp
|
2003-08-12 14:20:32 +00:00
|
|
|
The variable part for VBR connections must be 9 bytes long and specifies three
|
|
|
|
values:
|
|
|
|
.Bl -tag -width "bytes 12...12" -offset indent
|
|
|
|
.It bytes 5...7
|
|
|
|
Specifies the peak cell rate for VBR.
|
|
|
|
.It bytes 8...10
|
|
|
|
This is the sustainable cell rate.
|
|
|
|
.It bytes 11...13
|
|
|
|
The maximum burst size.
|
|
|
|
.El
|
2003-06-13 12:33:33 +00:00
|
|
|
.Pp
|
2003-08-12 14:20:32 +00:00
|
|
|
The variable part for ABR connections must be 19 bytes long and specifies the
|
|
|
|
following values:
|
|
|
|
.Bl -tag -width "bytes 12...12" -offset indent
|
|
|
|
.It bytes 5...7
|
|
|
|
Specifies the peak cell rate for ABR.
|
|
|
|
.It bytes 8...10
|
|
|
|
The minimum cell rate.
|
|
|
|
.It bytes 11...13
|
|
|
|
The initial cell rate.
|
|
|
|
.It bytes 14...16
|
|
|
|
The transient buffer exposure.
|
|
|
|
.It byte 17
|
|
|
|
The NRM value.
|
|
|
|
.It byte 18
|
|
|
|
The TRM value.
|
|
|
|
.It bytes 19...20
|
|
|
|
The ADTF value.
|
|
|
|
.It byte 21
|
|
|
|
The rate increase factor (RIF).
|
|
|
|
.It byte 22
|
|
|
|
The rate decrease factor (RDF).
|
|
|
|
.It byte 23
|
|
|
|
The cutoff decrease factor (CDF).
|
|
|
|
.El
|
2003-06-13 12:33:33 +00:00
|
|
|
.Pp
|
2003-08-12 14:20:32 +00:00
|
|
|
To add a PVC the
|
2004-07-08 10:31:12 +00:00
|
|
|
.Xr route 8
|
2003-08-12 14:20:32 +00:00
|
|
|
utility can be used:
|
2004-07-08 10:31:12 +00:00
|
|
|
.Bd -ragged -offset indent
|
|
|
|
.Nm route Cm add
|
|
|
|
.Fl iface Aq Ar "remote\ IP\ address"
|
|
|
|
.Fl link Ao Ar iface Ac : Ns Aq Ar lladdr
|
|
|
|
.Ed
|
2003-08-12 14:20:32 +00:00
|
|
|
.Pp
|
|
|
|
The
|
2004-07-08 10:31:12 +00:00
|
|
|
.Ar iface
|
2003-08-12 14:20:32 +00:00
|
|
|
is the ATM interface through which
|
2004-07-08 10:31:12 +00:00
|
|
|
.Ar "remote\ IP\ address"
|
2003-08-12 14:20:32 +00:00
|
|
|
can be reached and
|
2004-07-08 10:31:12 +00:00
|
|
|
.Ar lladdr
|
2003-08-12 14:20:32 +00:00
|
|
|
is the link layer address as a string of dot-separated, hexadecimal bytes.
|
|
|
|
.Pp
|
2004-07-03 18:29:24 +00:00
|
|
|
NATM also supports the old, original format.
|
|
|
|
This consists of 4 byte
|
2003-08-12 14:20:32 +00:00
|
|
|
link layer addresses (and the channels are implicit UBR):
|
|
|
|
.Bl -tag -width "bytes 12...12" -offset indent
|
|
|
|
.It byte 0
|
|
|
|
Flags:
|
2003-06-13 12:33:33 +00:00
|
|
|
.Bl -tag -width "0x02" -offset indent -compact
|
|
|
|
.It 0x01
|
|
|
|
use AAL5.
|
|
|
|
.It 0x02
|
|
|
|
if using AAL5, use an LLC/SNAP header.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
Thus, parameter 3 means AAL5 and LLC/SNAP encapsulation (this is the required
|
|
|
|
setting for interworking with other CLIP clients).
|
|
|
|
Note that BPF works only with LLC/SNAP encapsulation.
|
2003-08-12 14:20:32 +00:00
|
|
|
.It byte 1
|
|
|
|
VPI for the channel
|
|
|
|
.It bytes 2...3
|
|
|
|
VCI for the channel
|
|
|
|
.El
|
2003-06-13 12:33:33 +00:00
|
|
|
.Sh EXAMPLES
|
|
|
|
Suppose you have 3 hosts 128.252.200.1, 128.252.200.2 and
|
|
|
|
128.252.200.3 connected by ATM through PVCs:
|
|
|
|
.Pp
|
|
|
|
.Bl -item -offset indent -compact
|
|
|
|
.It
|
2003-08-12 14:20:32 +00:00
|
|
|
between 128.252.200.1 and 128.252.200.2: 0xc9 UBR
|
2003-06-13 12:33:33 +00:00
|
|
|
.It
|
2003-08-12 14:20:32 +00:00
|
|
|
between 128.252.200.1 and 128.252.200.3: 0xca VBR
|
2003-06-13 12:33:33 +00:00
|
|
|
.It
|
2003-08-12 14:20:32 +00:00
|
|
|
between 128.252.200.2 and 128.252.200.3: 0xcb CBR
|
2003-06-13 12:33:33 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
2003-08-12 14:20:32 +00:00
|
|
|
The parameters for the VBR channel are: PCR 50000, SCR 10000, MBS 10.
|
|
|
|
The peak cell rate for the CBR channel is 100000.
|
|
|
|
.Pp
|
2003-06-13 12:33:33 +00:00
|
|
|
To enable the links use the following commands:
|
|
|
|
.Pp
|
|
|
|
on host 128.252.200.1:
|
|
|
|
.Bd -literal -offset indent -compact
|
2004-07-08 10:31:12 +00:00
|
|
|
ifconfig en0 128.252.200.1 netmask 0xffffff00 up
|
|
|
|
route add -iface 128.252.200.2 -link en0:3.0.0.c9.0
|
|
|
|
route add -iface 128.252.200.3 -link en0:3.0.0.ca.3.0.c3.50.0.27.10.0.0.a
|
2003-06-13 12:33:33 +00:00
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
on host 128.252.200.2:
|
|
|
|
.Bd -literal -offset indent -compact
|
2004-07-08 10:31:12 +00:00
|
|
|
ifconfig en0 128.252.200.2 netmask 0xffffff00 up
|
|
|
|
route add -iface 128.252.200.1 -link en0:3.0.0.c9.0
|
|
|
|
route add -iface 128.252.200.3 -link en0:3.0.0.cb.1.1.86.a0
|
2003-06-13 12:33:33 +00:00
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
on host 128.252.200.3:
|
|
|
|
.Bd -literal -offset indent -compact
|
2004-07-08 10:31:12 +00:00
|
|
|
ifconfig en0 128.252.200.3 netmask 0xffffff00 up
|
|
|
|
route add -iface 128.252.200.1 -link en0:3.0.0.ca.3.0.c3.50.0.27.10.0.0.a
|
|
|
|
route add -iface 128.252.200.2 -link en0:3.0.0.cb.1.1.86.a0
|
2003-06-13 12:33:33 +00:00
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
This can also be done in
|
|
|
|
.Xr rc.conf 5 :
|
|
|
|
.Pp
|
|
|
|
on host 128.252.200.1:
|
|
|
|
.Bd -literal -offset indent -compact
|
|
|
|
network_interfaces="lo0 en0"
|
|
|
|
ifconfig_en0="inet 128.252.200.1 netmask 255.255.255.0"
|
|
|
|
static_routes="host2 host3"
|
2003-08-12 14:20:32 +00:00
|
|
|
route_host2="-iface 128.252.200.2 -link en0:3.0.0.c9.0"
|
|
|
|
route_host3="-iface 128.252.200.3 -link en0:3.0.0.ca.3.0.c3.50.0.27.10.0.0.a"
|
2003-06-13 12:33:33 +00:00
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
on host 128.252.200.2:
|
|
|
|
.Bd -literal -offset indent -compact
|
|
|
|
network_interfaces="lo0 en0"
|
|
|
|
ifconfig_en0="inet 128.252.200.2 netmask 255.255.255.0"
|
|
|
|
static_routes="host1 host3"
|
2003-08-12 14:20:32 +00:00
|
|
|
route_host1="-iface 128.252.200.1 -link en0:3.0.0.c9.0"
|
|
|
|
route_host3="-iface 128.252.200.3 -link en0:3.0.0.cb.1.1.86.a0"
|
2003-06-13 12:33:33 +00:00
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
on host 128.252.200.3:
|
|
|
|
.Bd -literal -offset indent -compact
|
|
|
|
network_interfaces="lo0 en0"
|
|
|
|
ifconfig_en0="inet 128.252.200.3 netmask 255.255.255.0"
|
|
|
|
static_routes="host1 host2"
|
2003-08-12 14:20:32 +00:00
|
|
|
route_host1="-iface 128.252.200.1 -link en0:3.0.0.ca.3.0.c3.50.0.27.10.0.0.a"
|
|
|
|
route_host2="-iface 128.252.200.2 -link en0:3.0.0.cb.1.1.86.a0"
|
2003-06-13 12:33:33 +00:00
|
|
|
.Ed
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr en 4 ,
|
2003-06-23 14:46:12 +00:00
|
|
|
.Xr fatm 4 ,
|
2004-07-04 20:55:50 +00:00
|
|
|
.Xr hatm 4 ,
|
|
|
|
.Xr natm 4 ,
|
|
|
|
.Xr patm 4
|
2003-06-13 12:33:33 +00:00
|
|
|
.Sh AUTHORS
|
|
|
|
.An Chuck Cranor
|
|
|
|
of Washington University implemented the NATM protocol layer
|
|
|
|
along with the EN ATM driver in 1996 for
|
|
|
|
.Nx .
|