This document will introduce you to some of the basic configuration commands for the STUN protocol and give you configuration examples for reference.
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.
stun protocol-group [group-number] basic
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.
stun protocol-group [group-number] sdlc
The SDLC STUN protocol is used for placing the routers in the midst of either point-to-point or multipoint (multidrop) SDLC links.
stun route {all/address address-number} tcp ip-address [local-ack] [priority]
The keyword all is used when all traffic received on the input interface is to be propagated, regardless of the address in the frame. The keyword address specifies how a serial frame with a specific address will be propagated. The address is the only stun route command form allowed with the SDLC STUN protocol. The basic STUN protocol accepts either all or address. STUN SDLC only supports address.
Using the tcp 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.
The IP address that is entered here identifies the STUN peer (as defined by the stun peer-name command) on the remote side of the link.
Use the local-ack 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.
The priority keyword enables priority queuing for the SDLC frames.
NOTE: This priority feature adds to CPU overhead. Use it selectively.
stun route {all/address address-number} interface serial interface-number [direct]
Specifying the interface serial 888 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.
NOTE: HDLC encapsulation is the default on Cisco serial lines.
Specify the interface number for the outbound serial interface as the interface-number parameter.
The direct 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.
nrzi-encoding
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.
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.
This command is not accepted on the AGS or the 4000 2T NIM. These platforms require hardware jumper changes.
This configuration uses the basic STUN protocol. Frames are forwarded with the stun route all 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.
STUN HDLC STUN
-------- ------- | |--- --------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
Router A Configuration:
stun peer-name 131.108.23.31 stun protocol-group 1 basic
interface Serial0 ip address 131.108.24.31 255.255.255.192
interface Serial1 no ip address encapsulation stun clockrate 9600 stun group 1 stun route all interface serial0
interface TokenRing0 ip address 131.108.23.31 255.255.255.192 ring-speed 16
Router B Configuration:
stun peer-name 131.108.26.31 stun protocol-group 1 basic
interface Serial1/0 ip address 131.108.24.30 255.255.255.192 clock rate 56000
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
interface TokenRing0/0 ip address 131.108.26.31 255.255.255.192 ring-speed 16
-------- | |------- --------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| ------------
This configuration uses the SDLC STUN protocol. Frames are forwarded with the stun route address 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.
Router A Configuration:
stun peer-name 132.1.1.1 stun protocol-group 1 sdlc
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
interface Serial1 bandwidth 56 encapsulation stun stun group 1 stun route address 4 tcp 132.4.1.1 nrzi-encoding clockrate 56000
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
Router B Configuration:
stun peer-name 132.4.1.1 stun protocol-group 1 sdlc
interface Serial1/0 encapsulation FRAME-RELAY frame-relay lmi-type Annex D frame-relay map IP 132.2.1.1 30 broadcast
interface Serial1/1 encapsulation stun stun group 1 stun route address 4 tcp 132.1.1.1 nrzi-encoding clockrate 56000
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