Serial networking scenarios with Cisco-Routers

From Try-AS/400
Jump to navigation Jump to search

Sometimes, older, donated hardware comes without LAN I/O-adapters. Sometimes it has serial, synchronous capable communication I/O-adapters, though. This article shows several ways how to "network" AS/400 machines through these, with the help of (older) Cisco hard- and software, and points out pros and cons.

Note: This article is probably more about Cisco configuration than AS/400.

Cisco has provided a lot of configuration options to support different networking scenarios. Emphasis is to multiplex once separated IBM SNA and PC-/Workstation based traffic onto the same physical wiring. Expectably, huge cost savings for recurring bills resulted, because expensive leased lines could now be shared.
Decades later, the focus shifted from commercial applications to hobbyist uses, with their own set of use cases.

Technologies exploited for the desired outcomes are:

  • SDLC as transport protocol for SNA,
  • X.25 as transport protocol for higher-level protocols (SNA, IP),
  • Data Link Switching Plus (DLSw+) for transport of SNA over IP based links,
  • Local or remote media conversion between LANs and SDLC or QLLC (X.25).

This article does intentionally not cover SNASw, a reduced SNA "routing" stack within Cisco IOS. Depending on use case, it has proven to be awfully slow, may crash routers in some scenarios, and may be of limited use because it's configuration is fixed as a Branch Extender (BEX) node.

For clarity, the scenarios mentioned later always refer to two machines:

  • An existing AS/400 with LAN attachment (Token Ring, Ethernet), already established as APPN Network Node in the local LAN. This is the 9401-150 shown on the network plan's right side. This machine's name is Nibbler.
  • An additional machine with no LAN I/O adapters, which is meant to establish a network connection of sorts to the existing AS/400. This is the 9401-P03 shown on the network plan's left side. This machine's Name is Fiona.

Additional information is provided in the individual scenario descriptions.

Physical Layer Requirements

#6152 serial IOA (SPD), located in a P02
#2609 serial IOA (SPD), located in a P03
2609 Breakout-Brick — note that the Cisco cable is plugged directly which is wrong, and only shown for illustrational purposes.
IBM #2720 combined twinax- and serial IOA (PCI)
IBM #2721 dual serial IOA (PCI)

On the physical layer, some kind of serial connection is required. In earlier times, AS/400's often had an external modem, providing remote diagnostics capabilities through ECS (Electronic Customer Support), connected to a serial port. For the sake of simplicity, the AS/400 in question is assumed to already have a serial port, RS-232 style.

Note:|DE-9 or DB-25 connectors directly screwed to the chassis are meant for diagnostics and UPS connection. These are not normal serial ports!

Matching IBM V.24 Modem Cables for your particular hardware can be sourced e. g. through shops on the internet.

Cable designations:

Description Length Part Number Feature Code
RS232 Cable DB-25F to DB-25M 6.1 m 22F0149 #9022
(Germany) 22F0150
(Japan) 22F0151
RS232 PCI Communications Cable Mini-Centronics to DB-25M 44H7480 #0348
(Germany) 44H7482
(Japan) 44H7484

There are other serial connectivity options but these are very rare.

On the Cisco-side of affairs, just two things are necessary:

  • Cisco 16xx, 25xx, 26xx or similar router model with T-Type serial interface (card),
  • Cisco CAB-232 FC.

Note! It is of utmost importance to keep in mind that the AS/400 serial ports have sense pins, to know which kind of cable is attached. If you plug in an ordinary PC serial cable, and vary on the line description, you’ll eventually find the succinct message in the QSYSOPR message queue, that a cable could not be found. Therefore the requirement of an IBM V.24 Modem Cable, or a self made cable, or adapter, providing the necessary sense pin connectivity. For this reason, you'll need to plug the DB-25F socket connector of the Cisco cable to the modem cable, and not directly to the AS/400’s port.

It seems desirable to also provide means of Integration of serial only machinery into LANs. Cisco IOS provides functionality for such scenarios.

Software Requirements

Basically:

  • Some flavor of OS/400,
  • Cisco IOS for your particular model with a certain feature set.

See the Cisco Feature Navigator weblink for additional information. Over a long time, Cisco has flooded the market with many different Cisco routers. They fall into broad generation groups, but there are still differences which model can (may) run which IOS feature set. Also, there is the definition of "officially supported" of "works", and the unofficial "works anyway in certain scenarios". Bottom line: The resulting combinations are way too many to be described here. A general rule of thumb: The bigger the image, and the more characters the classic feature set description has, the more likely it will have what you need.

It's important to understand the roles of the different involved components.

  • the serial-only machine Fiona is an APPN end node,
  • the protocol to running over the serial cable is either SDLC, or X.25,
  • the Cisco router converts the SDLC (SDLLC) or X.25 (QLLC) frames to a format being compatible with Token Ring,
  • Fiona's APPN session terminates on Nibbler.[1]

Configuration preparations

Obtain the resource names of the serial ports.

On the AS/400 systems, type wrkhdwrsc *cmn to get a list of communication hardware, and associated ports. Examples:

  • V3/SPD:
Resource        Type  Text
CMB01           917B  Combined function IOP
  LIN01         2609  Comm Adapter
    LIN011      2609  V.24 Port
    LIN012      2609  V.24 Port
  • V4/PCI:
Resource      Type  Status                Text
LIN01         2720  Operational           Comm Adapter
  CMN01       2720  Operational           V.24 Port   

Note! OS/400 V3 seems to not designate ports as CMN, but as LIN with three digits. Newer releases designate ports on an adapter as CMN.

On Cisco IOS, type show interfaces description to get a list of interfaces. Serial interfaces are designated by starting with Se.

Interface                      Status         Protocol Description
Et0                            up             up
Se0                            down           down

Apart from this, components are expected to have some basic configuration settings applied:

  • OS/400:
    • Basic network settings reviewed in dspneta and subsequently chgneta
    • QAUTOCFG system variable switched to on
    • LAN configuration established for LAN capable machines
  • Cisco IOS:
    • Basic settings applied
    • Basic network configuration established

Scenario 1: Purely local SNA APPN connection over SDLC

Network Plan

This scenario is for when all involved components are reasonably close together physically, e. g. in the same room.

  • Pro: Fairly easy to configure, applicable to other machinery than just AS/400's,
  • Con: Maximum speed is 19200 bps.

Configuration: Cisco IOS (2612)

source-bridge ring-group 512
dlsw local-peer
!
interface Serial0/0
 bandwidth 19
 no ip address
 encapsulation sdlc
 load-interval 60
 clock rate 19200
 sdlc role prim-xid-poll
 sdlc vmac 0004.acad.5900
 sdlc address C0
 sdlc partner 0004.acad.50d5 C0
 sdlc line-speed 19200
 sdlc simultaneous full-datmode
 sdlc dlsw C0
 hold-queue 128 out
 no shutdown
!
interface TokenRing0/0
 […]
 source-bridge 59 1 512

Configuration: OS/400 (Fiona)

crtctlappc ctld(nibbler) linktype(*sdlc) maxframe(1033) rmtcpname(nibbler) stnadr(c0) nodetype(*calc) tmsgrpnbr(*calc) autodltdev(*no) cmnrcylmt(10 1)
crtlinsdlc lind(sdlclin) rsrcname(lin011) nrzi(*no) linespeed(19200) maxframe(1033) duplex(*full) linkspeed(19200) ctl(nibbler) cmnrcylmt(10 1)

Notes

  • The number in source-bridge ring-group 512 is completely arbitrary.
  • sdlc vmac is the virtual MAC address Fiona is assigned on the Token Ring. The last byte must be 00, while IOS sets the last byte to the SDLC station address being given later.
  • sdlc address must be the same value as the STNADR parameter in the controller description.
  • sdlc partner creates an association from Nibbler’s MAC address on the Token Ring to the SDLC address of Fiona.
  • clock rate and sdlc line-speed must match each other, and the LINESPEED parameter of the line description.
  • sdlc simultaneous full-datmode corresponds (most likely[2]) to the line description's DUPLEX(*FULL).
  • The source-bridge statement in the physical Token Ring interface assigns the attached ring the number 59, designates it to the source bridge number 1, and bridges traffic to the virtual ring (group) number 512.
  • Because auto configuration is enabled, the device description for Fiona system will be created automatically at the first successful connection attempt to Nibbler.

Unclear:

  • How is the serial interface’s traffic redirected to the ring group 512? The group number is referenced globally, and in the Token Ring interface, which hints to the fact that you can’t use this in a complex configuration with more than one ring group, probably?

Proven to work:

  • Cisco 2612 with added WIC-1T, and image C2600-BINO3S3, Version 12.3(26)
  • Cisco 1601-R, and image C1600-BNR2SY, Version 12.3(26)

Initiation, and function verification

  • On Fiona, vary on line and controller descriptions:
vrycfg cfgobj(sdlclin) cfgtype(*lin) status(*on)
  • After a brief pause, the Cisco console should indicate that the serial port goes up:[3]
%LINK-3-UPDOWN: Interface Serial0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
  • On Fiona, looking into the QSYSOPR-Message Queue should show that the line has successfully been varied on, and a connection to the controller NIBBLER has been established through SDLCLIN.
  • On the Cisco Router, you should see output of show interface ser0/0 similar to the following:
Serial0/0 is up, line protocol is up 
  Hardware is PowerQUICC Serial
  MTU 1500 bytes, BW 19 Kbit, DLY 20000 usec, 
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation SDLC, loopback not set
    Router link station role: PRIMARY (DCE)
    Router link station metrics:
      slow-poll not configured
      T1 (reply time out) 300 milliseconds
      N1 (max frame size) 16472 bits
      N2 (retry count) 7 
      poll-pause-timer 10 milliseconds
      poll-limit-value 1
      k (windowsize) 7
      modulo 8
      sdlc vmac: 0004.ACAD.59--
  sdlc addr C0 state is CONNECT
      cls_state is CLS_IN_SESSION
      VS 5, VR 6, Remote VR 5, Current retransmit count 0
      Hold queue: 0/200 IFRAMEs 1109/1325
      TESTs 0/0 XIDs 2258/19, DMs 0/0 FRMRs 0/1
      RNRs 1/0 SNRMs 10/0 DISC/RDs 3/1 REJs 0/0
      Poll: clear, Poll count: 0, ready for poll, chain: C0/C0
  Last input never, output 00:00:00, output hang never
  Last clearing of "show interface" counters 1d17h
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/128 (size/max)
  1 minute input rate 0 bits/sec, 49 packets/sec
  1 minute output rate 0 bits/sec, 49 packets/sec
     7467200 packets input, 15548792 bytes, 0 no buffer
     Received 0 broadcasts, 0 runts, 21 giants, 0 throttles
     21 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     7468810 packets output, 15116960 bytes, 0 underruns
     0 output errors, 0 collisions, 26 interface resets
     0 output buffer failures, 0 output buffers swapped out
     10 carrier transitions
     DCD=up  DSR=up  DTR=up  RTS=up  CTS=up
  • On the Cisco Router, you should see output of show dlsw local-circuit similar to the following:
 key         mac-addr    sap    state        port 	rif
2197187452   0004.acad.59c0 04  CONNECTED      Se0/0 	--no rif--
                 PCEP: 82AB8B88  UCEP: 82F66B7C
          0004.acad.50d5 04  CONNECTED      To0/0 	0600.2001.03B0
                 PCEP: 82F511AC  UCEP: 82F66B7C

  • On Nibbler, you should see Fiona in wrkappnsts option(*loc)[4].

Configuration corrections

The APPC Controller on Nibbler has been automatically created with default values. This includes maxframe being set to the default for Token Ring, aka 16393 Bytes. This will result in connection instabilities, if not corrected.

  • On Fiona vary off line and controller descriptions (optional):
vrycfg cfgobj(sdlclin) cfgtype(*lin) status(*off)
  • On the Token Ring-AS/400 vary off the controller description:
vrycfg cfgobj(fiona) cfgtype(*ctl) status(*off)
  • Change configuration to match parameters:
chgctlappc ctld(fiona) maxframe(1033) inlcnn(*ans) nodetype(*calc) autodltdev(*no) cmnrcylmt(10 1) ctlown(*user)
  • I suggest to run wrkctld and manually set swtdsc (press F11) to *no. Otherwise, you'll get a log of unneeded messages about torn down connections. It depends on the OS release if this option shows up.
  • Vary on configuration objects on both AS/400, starting with Nibbler.
vrycfg cfgobj(fiona) cfgtype(*ctl) status(*on)
vrycfg cfgobj(sdlclin) cfgtype(*lin) status(*on)

You now should be able to enjoy a stable, albeit somewhat slow connection to your incarnation of Fiona, with each and every service running over SNA.

Scenario 2: Remote SNA APPN connection over SDLC and DLSw

Network Plan

This scenario shows a configuration when connectivity between the two involved AS/400's is limited to TCP/IP, e. g. Ethernet or even WAN/VPN. An additional Router is required, here this is a Cisco 1601-R. This scenario uses DLSw transport for passing traffic between the involved routers. Otherwise, the configuration on Fiona and Nibbler is the same. Hence, this isn't repeated here.

  • Pro: Still fairly easy to configure, applicable to other machinery than just AS/400's,
  • Con: Maximum speed is still 19200 bps.

The main differences for the Cisco configuration is the establishment of Data Link Switching (DLSw), because of this, only configuration differences are pointed out.

Configuration: Cisco IOS (2612)

This one has the IP address 192.168.1.5.

no dlsw local-peer
source-bridge fst-peername 192.168.1.5
source-bridge keepalive 12
source-bridge ring-group 512
dlsw local-peer peer-id 192.168.1.5 lf 1500 keepalive 12 biu-segment
dlsw remote-peer 0 tcp 192.168.1.97

Configuration: Cisco IOS (1601-R)

This one has the IP address 192.168.1.97.

source-bridge fst-peername 192.168.1.97
source-bridge keepalive 12
source-bridge ring-group 512
dlsw local-peer peer-id 192.168.1.97 lf 1500 keepalive 12 biu-segment
dlsw remote-peer 0 tcp 192.168.1.5

Notes

The purely router-local ring-group 512 has now been connected through a TCP-Session over DLSw between both involved routers.

If both routers are located in the same L2 segment, one can use FST instead of TCP. I didn't get this to work, most likely because I'm using Ethernet Subinterfaces with Vlan-Tags on my 2612.

Proven to work:

  • Cisco 2612 with added WIC-1T, and image C2600-BINO3S3, Version 12.3(26)
  • Cisco 1601-R, and image C1600-BNR2SY, Version 12.3(26)

Initiation, and function verification

Initiation procedure is the same as noted above.

You should see output akin to the following for the show dlsw peers command.

Peers:                state     pkts_rx   pkts_tx  type  drops ckts TCP   uptime
 TCP 192.168.1.5     CONNECT        131       131  conf      0    1   0 00:19:47
Total number of connected peers: 1
Total number of connections:     1

Configuration corrections

Corrections procedure is the same as noted above, if the controller description has been created automatically.

Scenario 3: Remote SNA APPN connection over X.25 and DLSw

Network Plan

This scenario builds on the previously established DLSw scenario. The main difference is that instead of SDLC, X.25 is used as transport protocol on the serial link. All other configurations are the same.

  • Pro: Maximum speed is 64 kbps, more than three times SDLC,
  • Con: More complicated to configure, possibly not applicable to other machinery than just AS/400's

The main differences for the Cisco configuration is the establishment of Data Link Switching (DLSw), because of this, only configuration differences are pointed out.

Configuration: Cisco IOS (1601-R)

First, you need to reset the serial interface to its default values, to get rid of the SDLC configuration quickly.

default interface Serial0

Next, the new configuration is established.

interface Serial0
 description Fiona LIN011
 bandwidth 64
 no ip address
 encapsulation x25 dce
 load-interval 60
 x25 modulo 128
 x25 ltc 100
 x25 win 8
 x25 wout 8
 x25 ips 1024
 x25 ops 1024
 x25 pvc 1 qllc 0004.acad.59c0
 ignore-dcd
 clock rate 64000
 qllc dlsw pvc 1 vmacaddr 0004.acad.59c0 partner 0004.acad.50d5 

Configuration: OS/400 (Fiona)

crtlinx25 lind(x25line) rsrcname(lin011) lglchle((001 *pvc)) netadr(00000000000000) cnninit(*local) interface(*rs232v24) linespeed(19200) dftpktsize(1024) modulus(128) dftwdwsize(8) linkspeed(64000) cmnrcylmt(10 1)
crtctlappc ctld(nibbler) linktype(*x25) line(x25line) maxframe(1024) rmtcpname(nibbler) exchid(05641700) netlvl(1984) lglchlid(006) nodetype(*calc) tmsgrpnbr(*calc) autodltdev(*no) cmnrcylmt(10 1)

Notes

  • The x25 pvc, and qllc dlsw pvc 1 work together to establish a virtual MAC address for the X.25 virtual circuit, and the eventual Token Ring peer.
  • You cannot create the line description with the full speed outright due to error CPD26DC (Maximum line speed for RS-232/V.24 is 19200 bps.). Create the line with linespeed(19200), and subsequently edit the lind again, setting the desired speed of 64 kbps.
  • The exchid of Nibbler can be found by viewing its line description for the Token Ring IOA.

Proven to work:

  • Cisco 2612 with added WIC-1T, and image C2600-BINO3S3, Version 12.3(26)
  • Cisco 1601-R, and image C1600-BNR2SY, Version 12.3(26)

Initiation, and function verification

Initiation procedure is the same as noted above.

You should see output akin to the following for the show x25 interface serial0 command.

PVC 1,  State: D1,  Interface: Serial0
  Started 00:20:54, last input 00:10:30, output 00:10:31
     qllc 0004.acad.59c0
  Window size input: 8, output: 8
  Packet size input: 1024, output: 1024
  PS: 80  PR: 80  ACK: 79  Remote PR: 80  RCNT: 1  RNR: no
  P/D state timeouts: 0  timer (secs): 0
  data bytes 21173/110662 packets 208/209 Resets 1/0 RNRs 0/0 REJs 0/0 INTs 0/0

You should see output akin to the following for the show qllc serial0 command.

Interface Serial0
 vc 1
   Circuit State P4/D1, Logical Link State QLOpened 0004.acad.59c0(04)->0004.acad.50d5(04)
   0 packets held 

Configuration corrections

Corrections procedure is the same as noted for Scenario 1, if the controller description has been created automatically.

Scenario 3a: IP over X.25

This scenario builds on the previously established X.25 scenario. It adds TCP/IP transport over a secondary X.25 virtual circuit.

  • 192.168.1.246 is the IP address for Fiona,
  • 192.168.1.245 is the IP address for the Cisco 1601-R.

Configuration: Cisco IOS (1601-R)

Only parameters to be changed are mentioned.

interface Serial0
 ip address 192.168.59.245 255.255.255.252
 x25 pvc 2 ip 192.168.59.246

Configuration: OS/400 (Fiona)

First, you need to add another virtual circuit to the line description. You can't do that remotely, because you must vary off the line.

vrycfg cfgobj(x25lin011) cfgtype(*lin) status(*off)
chglinx25 lind(x25line) lglchle((001 *pvc) (002 *pvc))
vrycfg cfgobj(x25lin011) cfgtype(*lin) status(*on)

Then you can add the according TCP/IP interface configuration.

addtcpifc intnetadr('192.168.1.246') lind(x25line) subnetmask('255.255.255.252') mtu(1024) pvclglchli(002)
addtcprte rtedest(*dftroute) subnetmask(*none) nexthop('192.168.1.245') mtu(1024)
addtcprsi intnetadr('192.168.1.245') pvclglchli(002)

Notes

Proven to work:

  • Cisco 1601-R, and image C1600-BNR2SY, Version 12.3(26)

Initiation, and function verification

Depending on if you have started TCP/IP before, you need to issue either strtcp, or strtcpifc intnetadr('192.168.1.246').

You should see output akin to the following for the show x25 interface serial0 command.

PVC 1,  State: D1,  Interface: Serial0
  Started 03:07:34, last input 00:09:47, output 00:09:47
     qllc 0004.acad.59c0
  Window size input: 8, output: 8
  Packet size input: 1024, output: 1024
  PS: 122  PR: 36  ACK: 35  Remote PR: 122  RCNT: 1  RNR: no
  P/D state timeouts: 0  timer (secs): 0
  data bytes 2915564/2073274 packets 3733/2832 Resets 3/0 RNRs 0/0 REJs 0/0 INTs 0/0
PVC 2,  State: D1,  Interface: Serial0
  Started 00:22:29, last input 00:18:33, output 00:18:33
  Connects <no address> <-> ip 192.168.59.246
  Data PID none
  Window size input: 8, output: 8
  Packet size input: 1024, output: 1024
  PS: 29  PR: 24  ACK: 23  Remote PR: 29  RCNT: 1  RNR: no
  P/D state timeouts: 0  timer (secs): 0
  data bytes 1965/1917 packets 29/24 Resets 0/1 RNRs 0/0 REJs 0/0 INTs 0/0

Configuration corrections

How to establish routing within your local LAN for the example subnet being described above is not within the scope of this article.

Also, issue go cfgtcp, and check/correct configurations, such as DNS information, services to be started at IPL time, etc.

See also

Weblinks

Footnotes

  1. This can be another AS/400 but is not necessarily so.
  2. There are also half-duplex and full-duplex commands to configure an interface which aren't used here.
  3. If you’re connected remotely, make sure you’ve set term moni.
  4. Note that this command doesn't exist in V3.
  5. Very old documentation linked intentionally. Note: The configuration option tunnel was renamed to xot in newer IOS releases.

Acknowledgements

Thanks to Dave Brown for initial pointers.