📄 the stun protocol.htm
字号:
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=gb_2312-80">
<meta name="date" content="Thu Feb 20 11:29:42 1997">
<meta name="author" content="lmc">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>Cisco - The STUN Protocol</title>
</head>
<body bgcolor="#FFFFFF">
<h1>The STUN Protocol</h1>
<hr>
<h2>Introduction</h2>
<p>This document will introduce you to some of the basic
configuration commands for the STUN protocol and give you
configuration examples for reference. </p>
<p>If you are using the SDLC STUN protocol with an IBM AS/400
configured as a multidrop line, you may need to ensure (with
cabling) that the Carrier Detect (Receive Line Signal Detect, or
RLSD) pin leading into your Primary SNA device is held low. </p>
<h2>Choosing the STUN Protocol</h2>
<p><b>stun protocol-group [</b><i>group-number</i><b>] basic</b> </p>
<blockquote>
<p>The basic STUN protocol is unconcerned with details of
serial protocol addressing, so it is used when addressing is
unimportant. Use it when you want to use STUN to replace one
or more sets of point-to-point (not multi-drop) serial links
by using a protocol other than SDLC. </p>
</blockquote>
<p><b>stun protocol-group [</b><i>group-number</i><b>] sdlc</b> </p>
<blockquote>
<p>The SDLC STUN protocol is used for placing the routers in
the midst of either point-to-point or multipoint (multidrop)
SDLC links. </p>
</blockquote>
<h2>Defining How Frames Will Be Forwarded</h2>
<p><b>stun route {all/address </b><i>address-number</i><b>} tcp </b><i>ip-address</i>
<b>[local-ack] [priority]</b> </p>
<blockquote>
<p>The keyword <b>all</b> is used when all traffic received
on the input interface is to be propagated, regardless of the
address in the frame. The keyword <b>address</b> specifies
how a serial frame with a specific address will be
propagated. The <b>address</b> is the only <b>stun route</b>
command form allowed with the SDLC STUN protocol. The basic
STUN protocol accepts either <b>all</b> or <b>address</b>.
STUN SDLC only supports address. </p>
<p>Using the <b>tcp</b> keyword encapsulates the serial
packet with TCP/IP. This type of encapsulation allows you to
propagate serial frames across arbitrary media types and
topologies. Packet delivery is guaranteed by TCP, but there
is a trade-off in performance. </p>
<p>The IP address that is entered here identifies the STUN
peer (as defined by the <b>stun peer-name</b> command) on the
remote side of the link. </p>
<p>Use the <b>local-ack</b> keyword if you have SDLC sessions
that need to be locally terminated. This must be coded on the
peered routers at both ends of the connection. </p>
<p>The <b>priority</b> keyword enables priority queuing for
the SDLC frames. </p>
<p><b>NOTE:</b> This priority feature adds to CPU overhead.
Use it selectively. </p>
</blockquote>
<p><b>stun route {all/address </b><i>address-number</i><b>}
interface serial</b> <i>interface-number</i><b> [direct]</b> </p>
<blockquote>
<p>Specifying the <b>interface serial</b> keywords causes the
serial packets to be encapsulated in HDLC. For HDLC
encapsulation, the other end of the designated serial line
must also be configured for HDLC encapsulation. </p>
<p><b>NOTE:</b> HDLC encapsulation is the default on Cisco
serial lines. </p>
<p>Specify the interface number for the outbound serial
interface as the interface-number parameter. </p>
<p>The <b>direct</b> keyword is used when it is a directly
connected STUN link, for instance, two SDLC devices that talk
to each other connected to two interfaces on the same router,
and not a serial connection to another STUN peer. </p>
</blockquote>
<h2>Encoding Method</h2>
<p><b>nrzi-encoding</b> </p>
<blockquote>
<p>Serial controllers can generally use NRZ or NRZI encoding
in their communication. If the encoding method is set
incorrectly, no local traffic will be understood from that
controller. The quickest way to troubleshoot this type of
problem is to change the router encoding method. </p>
<p>The router uses NRZ encoding by default. NRZ/NRZI encoding
is local to the link. The router will encode correctly for
any attached link that is correctly defined. One router
serial link could be using NRZ and the other router serial
link could be using NRZI. </p>
<p>This command is not accepted on the AGS or the 4000 2T
NIM. These platforms require hardware jumper changes. </p>
</blockquote>
<h2>Examples</h2>
<h3>Example 1</h3>
<p>This configuration uses the basic STUN protocol. Frames are
forwarded with the <b>stun route all</b> command, so the address
of the device is unimportant in the configuration. The serial
packets are encapsulated in HDLC and sent directly out the serial
line. NRZ encoding is used at both ends. </p>
<pre>
STUN HDLC STUN
</pre>
<p>-------- ------- | |--- --------131.108.24.31 -------- |main
|--| FEP | / |Router|-------- |Router|-------- -----------
|frame|--|Device| ---| A |S0 / S1/0| B |S1/1 / | sdlc | ------- |
| | | --------| | ------|controller -------- --------
131.108.24.30-------- ----------- 9600 bps 56 kbps 9600 bps </p>
<p>Router A Configuration: </p>
<pre> stun peer-name 131.108.23.31
stun protocol-group 1 basic</pre>
<pre> interface Serial0
ip address 131.108.24.31 255.255.255.192 </pre>
<pre> interface Serial1
no ip address
encapsulation stun
clockrate 9600
stun group 1
stun route all interface serial0 </pre>
<pre> interface TokenRing0
ip address 131.108.23.31 255.255.255.192
ring-speed 16 </pre>
<p>Router B Configuration: </p>
<pre> stun peer-name 131.108.26.31
stun protocol-group 1 basic</pre>
<pre> interface Serial1/0
ip address 131.108.24.30 255.255.255.192
clock rate 56000 </pre>
<pre> interface Serial1/1
ip address 131.108.25.31 255.255.255.192
encapsulation stun
clockrate 9600
stun group 1
stun route all interface serial1/0 </pre>
<pre> interface TokenRing0/0
ip address 131.108.26.31 255.255.255.192
ring-speed 16 </pre>
<h3>Example 2</h3>
<pre>
--------
| |------- --------131.2.1.1 ------- --------
| FEP | / S1|Router|------- ( ) ------- |Router|
|Device| ----| A |S0 / ( FRAME ) / S1/0| B |
| | 131.5.1.1| | -------( RELAY ) -------| |
-------- -------- ( ) 131.2.1.2 --------
------- S1/1 | 131.108.25.31
5600 bps \
| 5600 bps
------------
| sdlc |
|controller|
------------
</pre>
<p>This configuration uses the SDLC STUN protocol. Frames are
forwarded with the <b>stun route address</b> command, destined
for a controller address of 04. The serial packets are
encapsulated in TCP and sent to the STUN peer at the remote end
of the link. In this configuration, it doesn't matter what is
inside the Frame Relay cloud. NRZI encoding is used at both ends.
IP routing is on. </p>
<p>Router A Configuration: </p>
<pre>
stun peer-name 132.1.1.1
stun protocol-group 1 sdlc</pre>
<pre> interface Serial0
ip address 132.2.1.1 255.255.0.0
encapsulation FRAME-RELAY
frame-relay lmi-type Annex D
frame-relay map IP 132.2.1.2 30 broadcast </pre>
<pre> interface Serial1
bandwidth 56
encapsulation stun
stun group 1
stun route address 4 tcp 132.4.1.1
nrzi-encoding
clockrate 56000 </pre>
<pre> interface TokenRing0
ip address 132.1.1.1 255.255.0.0
ring-speed 16
ip route 132.4.1.1 255.255.255.255 132.2.1.2 </pre>
<p>Router B Configuration: </p>
<pre>
stun peer-name 132.4.1.1
stun protocol-group 1 sdlc
</pre>
<pre> interface Serial1/0
encapsulation FRAME-RELAY
frame-relay lmi-type Annex D
frame-relay map IP 132.2.1.1 30 broadcast </pre>
<pre> interface Serial1/1
encapsulation stun
stun group 1
stun route address 4 tcp 132.1.1.1
nrzi-encoding
clockrate 56000 </pre>
<pre> interface TokenRing0/0
ip address 132.4.1.1 255.255.0.0
ring-speed 16
ip route 132.1.1.1 255.255.255.255 132.2.1.1 </pre>
<hr>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -