aboutsummaryrefslogtreecommitdiff
path: root/share/man/man4/natmip.4
blob: 82b2e7401e6192d80c84d761bb0bc9098ae252d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
.\" $FreeBSD$
.\"
.Dd August 11, 2003
.Dt NATMIP 4
.Os
.Sh NAME
.Nm natmip
.Nd IP over ATM PVCs
.Sh SYNOPSIS
.Cd "device atm"
.Cd "options NATM"
.Sh DESCRIPTION
The NATM protocol stack includes support for IP over ATM.
Without any
additional signalling stacks or other modules it is possible to build
a CLIP (classical IP over ATM) network based on PVCs.
.Pp
An ATM network card (en0 in this example) is configured for IP by something
like:
.Pp
.Dl # ifconfig en0 128.252.200.1 netmask 0xffffff00 up
.Pp
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
depends on the kind of the PVC (UBR, CBR, VBR, ABR).
Multi-byte values
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
Is a flag byte.
Currently only flag 0x20 is used.
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
VCI of the channel.
Must not be zero.
.It byte 4
Traffic type.
One of 0 (UBR), 1 (CBR), 2 (ABR), 3 (VBR).
.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
.Pp
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
.Pp
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
.Pp
To add a PVC the
.Dq route
utility can be used:
.Pp
.Ic # route add -iface
.Ar <remote IP address>
.Ic -link
.Ar <iface> Ns Ic \&: Ns Ar <lladdr>
.Pp
The
.Ar <iface>
is the ATM interface through which
.Ar <remote IP address>
can be reached and
.Ar <lladdr>
is the link layer address as a string of dot-separated, hexadecimal bytes.
.Pp
NATM also supports the old, original format.
This consists of 4 byte
link layer addresses (and the channels are implicit UBR):
.Bl -tag -width "bytes 12...12" -offset indent
.It byte 0
Flags:
.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.
.It byte 1
VPI for the channel
.It bytes 2...3
VCI for the channel
.El
.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
between 128.252.200.1 and 128.252.200.2: 0xc9 UBR
.It
between 128.252.200.1 and 128.252.200.3: 0xca VBR
.It
between 128.252.200.2 and 128.252.200.3: 0xcb CBR
.El
.Pp
The parameters for the VBR channel are: PCR 50000, SCR 10000, MBS 10.
The peak cell rate for the CBR channel is 100000.
.Pp
To enable the links use the following commands:
.Pp
on host 128.252.200.1:
.Bd -literal -offset indent -compact
# 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
.Ed
.Pp
on host 128.252.200.2:
.Bd -literal -offset indent -compact
# 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
.Ed
.Pp
on host 128.252.200.3:
.Bd -literal -offset indent -compact
# 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
.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"
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"
.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"
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"
.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"
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"
.Ed
.Sh SEE ALSO
.Xr en 4 ,
.Xr hatm 4 ,
.Xr fatm 4 ,
.Xr patm 4 ,
.Xr natm 4
.Sh AUTHORS
.An Chuck Cranor
of Washington University implemented the NATM protocol layer
along with the EN ATM driver in 1996 for
.Nx .