Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for Native SNA support #348

Closed
vinatron opened this issue Dec 21, 2020 · 242 comments
Closed

Request for Native SNA support #348

vinatron opened this issue Dec 21, 2020 · 242 comments
Assignees
Labels
Enhancement This issue does not describe a problem but rather describes a suggested change or improvement.

Comments

@vinatron
Copy link

vinatron commented Dec 21, 2020

Hello,

I have been a community member for a few years and now have some hardware of my own. This really isn't an issue, however I would like to have SNA support in Hercules to be able to test SNA typologies without having to keep my frame online.

I am interested in assisting with adding support in any way I can because the original system had an OSA adapter defined in OSC mode for SNA console access. If I can help contribute any data to help with the addition of SNA into Hercules, please let me know.

I don't however have a communications controller. If I did, I would give data on those as well to have Native SNA on the 370 as well. My end goal is to have a Cisco and IBM SNA network going between a client node and my AS/400 and Mainframe systems, and use Communication Tools MVS/VM bridge on the AS/400 to setup NJE connections over SNA because that's how the manual explains the connection process.

Thanks for the continued development on the software. It is greatly appreciated. Also, any additional data you may need, my machine isn't the newest, however I can give any data that you may need. It's a z114-M05 with 2 CPs and 8GB of storage "RAM". I also have plans to try and connect my ESCON tape device and see if I can transfer data to real tapes.

Kind Rearguards,
Vincent

@Fish-Git
Copy link
Member

Hi Vincent!

We currently have no plans to add SNA support to Hercules, but that's probably only because we're short on manpower and already have more "To Do" items on our list than is possible to finish in a lifetime! Nevertheless, we will keep your request open. You can never know when someone might come around and decide to take a crack at it.   ;-)

Thanks for the enhancement request and enjoy your personal mainframes!

@Fish-Git Fish-Git added the Enhancement This issue does not describe a problem but rather describes a suggested change or improvement. label Dec 27, 2020
@vinatron
Copy link
Author

vinatron commented Dec 27, 2020

You're very welcome. I will definitely provide any information I need, SNA related or not.

@vinatron
Copy link
Author

I made a mistake in the adapter classification I suppose I should correct it. As stated before I said OSC that is an error that's like the current 3270 emulation that's done by Hercules. What I meant was OSE which is OSA non-QDIO which is capable of doing SNA traffic. And for reference OSD would be QDIO mode if anyone wanted to know.

@PoC-dev

This comment has been minimized.

@PoC-dev
Copy link

PoC-dev commented Jan 27, 2021

Hello Vincent,

My end goal is to have a Cisco and IBM SNA network going between a client node and my AS/400 and Mainframe systems, and use Communication Tools MVS/VM bridge on the AS/400 to setup NJE connections over SNA because that's how the manual explains the connection process.

This matches exactly my goal, and thus I'm highly interested in getting in touch with you! My AS/400 model 150 runs V4R5 (no license keys needed in this particular combination). Since Hercules doesn't support 802.2 DLC, and EE was first available on the iSeries platform with V5R3 or V5R4, there's no direct way to connect Hercules and my 150.

What exactly is the Cisco (Router?) supposed to do? I know some images (or licenses on newer hardware) provide a SNAsw branch extender node support. Depending on the scenario being built, this is a serious limitation of using NNs on both sides of the logical SNAsw ports (EE, and 802.2 DLC). Currently I'm using this feature to tinker with VTAM and OS/400. Details on Request. You can find my mail address on my Github profile page.

:wq! PoC

@vinatron
Copy link
Author

vinatron commented Jan 28, 2021

Nice work!

I sent an email with my system details. If you don't get it, my AS/400 system is a 9406-270 running V5R4 and my Cisco Router is a 2811 with a SNAsw image loaded on it.

I plan on making a links to other systems on the internet and want to use the Cisco router to handle the SNA traffic coming in over DMVPN links. If you want to join when the network is rebuilt, let me know.

@mcisho
Copy link
Contributor

mcisho commented Jan 31, 2021

Hello Patrik,

A couple of questions. Firstly, are you in the process of doing the changes for SNA on LCS? Secondly, how did you manage to make VTAM use the LCS?

As a result of your interest I've been looking at the config code for LCS, with the intention of firstly allowing SNA LCS's to be defined without using the OAT, and secondly to allow the OAT to specify preconfigured tap interface names. I made the changes to LCS to support preconfigured interfaces ages ago, but decided to leave the OAT until there appeared to be some demand.

I'm attempting to reproduce the results you have achieved. I have an XCA (I copied the one you published in one of the H390-MVS messges) which activated successfully, but does nothing with the LCS. Do I need other VTAM definitions, e.g. an SWNET? My understanding is that an XCA simply defines the hardware to be used for a connection, but the hardware isn't used until a connection is started. Is that correct? I know next to nothing about VTAM resource definition, so any help would be greatly appreciated.

Ian

@PoC-dev
Copy link

PoC-dev commented Jan 31, 2021

Hello Ian,

Thanks for participating!

A couple of questions. Firstly, are you in the process of doing the changes for SNA on LCS?

I'd love to do, if I only knew what needs to be changed. :-)

As a result of your interest I've been looking at the config code for LCS, with the intention of firstly allowing SNA LCS's to be defined without using the OAT, and secondly to allow the OAT to specify preconfigured tap interface names. I made the changes to LCS to support preconfigured interfaces ages ago, but decided to leave the OAT until there appeared to be some demand.

Thanks a lot!

Do I understand right that a preconfigured interface includes the need to provide a MAC address for the interface by facilities of the hosting OS, because can't set the MAC via OAT anymore?

And, does your change permit a possible mixed mode between SNA and IP via LCS?

I'm attempting to reproduce the results you have achieved. I have an XCA (I copied the one you published in one of the H390-MVS messges) which activated successfully, but does nothing with the LCS.

This is the sole, and full member I'm using for my tests. I've only commented out the minor nodes 01..06.

*/* ------------------------------------------------------------------
*/*
*/* 3172 (LSAPLAN) ETHERNET ADAPTER1 (E40)
*/*
*/* ------------------------------------------------------------------
*/*
XCAE40E  VBUILD TYPE=XCA
*/*
XPE40E   PORT  CUADDR=E40,ADAPNO=1,SAPADDR=4,MEDIUM=CSMACD,            -
               DELAY=0,TIMER=30
*/*
XGE40E   GROUP DIAL=YES,CALL=IN,ANSWER=ON,ISTATUS=ACTIVE,              -
               DYNPU=YES
*/*
*/* ----------------------------------------- XCAE40E PERIPHERAL NODES
*/*
XGEL00    LINE
XGEP00      PU
*/*
*XGEL01    LINE
*XGEP01      PU
*/*
*XGEL02    LINE
*XGEP02      PU
*/*
*XGEL03    LINE
*XGEP03      PU
*/*
*XGEL04    LINE
*XGEP04      PU
*/*
*XGEL05    LINE
*XGEP05      PU
*/*
*XGEL06    LINE
*XGEP06      PU

Do I need other VTAM definitions, e.g. an SWNET? My understanding is that an XCA simply defines the hardware to be used for a connection, but the hardware isn't used until a connection is started. Is that correct?

Honestly, I don't know for sure. I've enabled VTAM to be APPN aware, by setting NODETYPE=NN,CONNTYPE=APPN ATCSTR00. This in turn enables incoming connections to be accepted, as I could verify with an EE connection.

To my understanding (with a heavy bias towards APPN), activating the XCA40E resource must prepare the hardware to accept incoming connections, even if there's no switched major node for an outbound connection.

I know next to nothing about VTAM resource definition, so any help would be greatly appreciated.

Welcome to the club of the clueless. ;-) I have been reading these manuals, at least in parts:

  • SC27-3672-01 z/OS Communications Server SNA Network Implementation Guide
  • SC27-3673-02 z/OS Communications Server SNA Operation
  • SC27-3675-02 z/OS Communications Server SNA Resource Definition Reference
  • SC27-3676-00 z/OS Communications Server SNA Resource Definition Samples

Probably also helpful:

  • SC27-3665-01 z/OS Communications Server Quick Reference
  • SC27-3666-00 z/OS Communications Server SNA Customization
  • SC27-3669-00 z/OS Communications Server SNA Programmer's LU 6.2 Guide
  • SC27-3670-00 z/OS Communications Server SNA Programmer's LU 6.2 Reference
  • SC27-3671-02 z/OS Communications Server SNA Messages
  • SC27-3674-00 z/OS Communications Server SNA Programming

My finding so far is that understanding VTAM needs SNA expertise, and understanding SNA needs VTAM expertise. I have not yet managed to break this tie.

There is an awful lot of general SNA documentation available. Because SNA has come a long way, documentation is plentiful. I don't know yet it it's of any help to read all from oldest to newest for getting a better understanding about the development taking place over decades.

:wq! PoC

@vinatron
Copy link
Author

vinatron commented Jan 31, 2021

My first introduction to SNA was Communication Tools for AS/400.

Now I have started to learn about the zSeries VTAM system, so it's a process I need to get OSA/SF working to activate my non-QDIO OSE adapters apparently. But so far I've gotten SNA on OS/2 AS/400 Cisco SNAsw and Windows SNA server. But yes, it makes it easier when you have Hercules to work with SNA so I don't have to run my 2KW z114 system to test the routing.

Keep up the good work, and if you need any information from my system, please let me know. I will try my best to provide all I can.

@mcisho
Copy link
Contributor

mcisho commented Jan 31, 2021

Do I understand right that a preconfigured interface includes the need to provide a MAC address for the interface by facilities of the hosting OS, because can't set the MAC via OAT anymore?

Yes. The following are the commands (from a script) I use to set up a preconfigured tap interface on a Fedora host for use with Hercules:

sudo ip tuntap add mode tap dev tap211
sudo nmcli dev set tap211 managed no
sudo ip link set dev tap211 address c6:d6:c7:0e:22:80
sudo ip -4 addr add dev tap211 192.168.232.104/26
sudo ip link set dev tap211 mtu 1500
sudo ip link set dev tap211 up

And, does your change permit a possible mixed mode between SNA and IP via LCS?

Yes and no. If you want to use a single tap interface for both IP and SNA via LCS, you would have to use the OAT to define the IP and SNA devices, all with the same port number, just like today. However, if you specify a single device LCS for SNA, it would use a tap interface that was exclusively for its use, just like a two device LCS for IP does today.

This is the sole, and full member I'm using for my tests. I've only commented out the minor nodes 01..06.
... NODETYPE=NN,CONNTYPE=APPN ATCSTR00.

Thanks, I'll try later.

Ian

@PoC-dev
Copy link

PoC-dev commented Jan 31, 2021

Hello Ian,

Yes.

Okay, thanks for clarification.

Yes and no. If you want to use a single tap interface for both IP and SNA via LCS, you would have to use the OAT to define the IP and SNA devices, all with the same port number, just like today.

I see. That's no big deal for me.

However, if you specify a single device LCS for SNA, it would use a tap interface that was exclusively for its use, just like a two device LCS for IP does today.

Understood: Because IP needs two devices.

Thanks, I'll try later.

I'm looking forward to what you've found!

:wq! PoC

@PoC-dev
Copy link

PoC-dev commented Jan 31, 2021

Hello Vincent,

My first introduction to SNA was Communication Tools for AS/400 now I have started to learn about the zSeries VTAM system so it's a process

Good luck! See my answer to Ian above: VTAM is a huge beast to tame. I gave up to do this as a second task running with low priority. It's just too much and I need to dedicate a lot more energy into it.

I need to get OSA/SF working to activate my non-QDIO OSE adapters apparently.

I can't help you with that, unfortunately. But see my list of IBM documents above. There is a lot of helpful content regarding VTAM configuration.

But so far I've gotten SNA on OS/2 AS/400 Cisco SNAsw and Windows SNA server.

Congrats!

But yes it makes it easier when you have Hercules to work with SNA so I don't have to run my 2KW z114 system to test the routing.

Indeed! And I bet, the time needed between "start Hercules" and "system has finished all IPL related work" is a lot less than "switching on power" and "system has finished all IPL related work" on your z114. Even though the z114 is a lot more cool, in a 2 kW heating way. ;-)

Keep up the good work and if you need any information from my system please let me know I will try my best to provide all I can.

Thanks! Unfortunately, I can't see how a real z114 with an OSE might help. But then, Ian wrote that an OSE isn't too different to an LCS. So maybe this could be a way. Ian, your comment?

:wq! PoC

@vinatron
Copy link
Author

vinatron commented Jan 31, 2021

Yes. I am just saying if you need any packet captures or anything of that nature.

Also, apparently, while reading an OSA/SF manual, a LCS is the name for the TCPIP operating mode and an LSA is the type for a SNA operating mode, which I found interesting, but they all use the same controller base type of OSE.

I'm working on transferring VTAM from VM/ESA to zVM and Dumping OS/390 for MVS VTAM to work with. I have VSE VTAM up already, but just haven't started defining SNA links yet.

@mcisho
Copy link
Contributor

mcisho commented Jan 31, 2021

Hi Patrik, thanks, your definition works for me too. Ian

@vinatron
Copy link
Author

vinatron commented Jan 31, 2021

I can also put my machine in service mode and collect service data about the operation of the adapters, if that can be of some use. I've found out a little bit on how to do operations like this poking around in the SE menus. They definitely take a while to come up. Faster than the OS/2 SE machines, but the Primary takes significantly longer than the alternate. I assume that's because the primary is spinning up more services.

@PoC-dev
Copy link

PoC-dev commented Feb 1, 2021

Hello Vincent,

I can also put my machine in service mode and collect service data about the operation of the adapters, if that can be of some use. I've found out a little bit on how to do operations like this poking around in the SE menus.

Thank you for your kind offer. Unfortunately, I'm not really skilled enough in Mainframe Terms to know how and if your possibilities could help in enhancing the LCS driver. Hopefully, the other devs maybe can shed some light?

:wq! PoC

@vinatron
Copy link
Author

vinatron commented Feb 1, 2021

Possibly. I'm open to anything that may help in some way shape or from.

@PoC-dev
Copy link

PoC-dev commented Feb 1, 2021

Hello,

In case someone missed: Yesterday I reworked my findings post.

:wq! PoC

@Fish-Git
Copy link
Member

Fish-Git commented Feb 1, 2021

In case someone missed: Yesterday I reworked my findings post.

Just out of curiosity, what "findings post" would that be?

@PoC-dev
Copy link

PoC-dev commented Feb 1, 2021

Abstract

These are the collected findings as Documented in the groups.io Mailing List H390-MVS at the end of January 2021 regarding Implementation of SNA support in Hercules-Hyperion to use 802.2 DLC on Ethernet via TAP device. They have been updated on Jan 30, 2021.

Consent between all devs so far was: There is no SNA support in Hercules. This wasn't sufficient for me.

Documentation for the LCS device hinted to partial SNA support, because the OAT file might contain a SNA directive. Looking at the ctc_lcs.c file revealed that a basic handling of SNA frames is already implemented. It is not known to which extent. This was my motivation to clarify this ambiguity.

Ian states:

QETH is OSD only. SNA would use an OSE(?), which is pretty much identical to LCS.

So I didn't bother to even look at QETH.

Testbed configuration includes

  • Hercules Hyperion 4.3 Release running on a stock Debian 10 Linux,
  • OS/390 V2R10 ADCD, being freely available from archive.org.

Thanks to (in no particular Order) Fish, Harold Grovesteen, and Ian Shorter for helping to shed some light on that issue.

Hercules configuration details

Hercules has been configured with a stock LCS device. Only one, because according to Ian, only TCP/IP support needs two devices: One for reading from and one to write into. E40 is documented as AWS3172, VTAM 3172 emulation in the original P390 configuration file, so I assume the HCD configuration of the guest OS is correct for that type of device also.

0E40 LCS --oat hercules.oat --debug

The OAT file provides a means to route packets to the available ports of the virtual 3172.

*********************************************************
* Dev   Mode  Port  Entry specific information          *
*********************************************************
  0E40  SNA   00
  HWADD 00 02:00:FE:DF:00:42

After the start of Hercules, a virtual device tap0 is automatically created. I bridge this device to an unused NIC in my test equipment:

ip link add br0 type bridge
ip link set dev eth0 up
ip link set dev eth0 master br0
bridge link set dev eth0 state 3
ip link set dev tap0 up
ip link set dev tap0 master br0
bridge link set dev tap0 state 3

Maybe the link state settings are not necessary, because they are handled by STP. STP is off by default.

Guest OS

Before trying anything, I applied the change regarding a missing interrupt handler as laid out in the New User's Cookbook accompanying the distribution.

MIH

It required changing the parmlib member IECIOS00:

MIH TIME=00:00,DEV=E40

I verified successfully that it works after the next IPL, with D IOS,MIH,DEV=E40:

0E40=00:00.

Note: I have added the same configuration change to the E20-E21 devices (CTCI), used solely for IP connectivity before I tried to get E40 running. So far, I've not observed adverse effects.

VTAM

VTAM configuration is mainly unchanged from the original file in sys1.local.vtamlist(xcae40e). The comment in that file states: 3172 (LSAPLAN) ETHERNET ADAPTER1 (E40). Definition:

XPE40E PORT CUADDR=E40,ADAPNO=1,SAPADDR=4,MEDIUM=CSMACD,DELAY=0,TIMER=30

Note: In the original member, this line is split to fit in one line.

The OAT documentation mentions ports starting with 0, while the VTAM configuration mentions ADAPNO=1 by default. It is not yet clear if this is an off-by-one glitch, or another error condition/inconsistency. Further testing might be necessary.

Findings

Trying to activate this major node in VTAM immediately raises an error in the guest OS console:

IST1023E START I/O TIMEOUT OCCURRED FOR CUA=0E40

The LCS debug output revealed, that VTAM sends a command frame which is not recognized by the command handler:

HHC00933D 0:0E40 CTC: executing command other (0x41)

I extended the code for ctc_lcs.c and the header file defining the commands, so command 0x41 is redirected to a TCP/IP Start LAN command handler, and 0x42 to the accompanying Stop LAN command handler. See attached diffs:

With help from Ian and Fish, I managed to get some debugging output, including a CCW trace (type t+0E40 into console, in addition to the already enabled debug mode of the LCS driver).

This is the output while IPL was progressing. Obviously some guest OS driver probing or even initializing the hardware:

HHC01334I 0:0E40 CHAN: ORB: IntP:00F4AF50 Key:0 LPM:80 Flags:08000 ....F....... ........ CCW:1F50E8E0
HHC01315I 0:0E40 CHAN: ccw 14300001 00000000
HHC01312I 0:0E40 CHAN: stat 0C00, count 0001
HHC00806I Processor CP00: I/O interrupt code 00010022 parm 00F4AF50 id 28000000
HHC01317I 0:0E40 CHAN: scsw 00804007, stat 0C00, count 0001, ccw 1F50E8E8
HHC01318I 0:0E40 CHAN: test I/O: cc=0
HHC01334I 0:0E40 CHAN: ORB: IntP:00F4AF50 Key:0 LPM:80 Flags:08000 ....F....... ........ CCW:1F50E8F0
HHC01315I 0:0E40 CHAN: ccw E4200100 1F50E8F8
HHC01312I 0:0E40 CHAN: stat 0C00, count 00F9=>FF308860 30880100 00000000 00800100 ..h-.h..........
HHC00806I Processor CP00: I/O interrupt code 00010022 parm 00F4AF50 id 28000000
HHC01317I 0:0E40 CHAN: scsw 00804007, stat 0C00, count 00F9, ccw 1F50E8F8
HHC01318I 0:0E40 CHAN: test I/O: cc=0
HHC01334I 0:0E40 CHAN: ORB: IntP:00F4AF50 Key:0 LPM:80 Flags:08000 ....F....... ........ CCW:1F503DA0
HHC01315I 0:0E40 CHAN: ccw E4200100 1F503728
HHC01312I 0:0E40 CHAN: stat 0C00, count 00F9=>FF308860 30880100 00000000 00800100 ..h-.h..........
HHC00806I Processor CP00: I/O interrupt code 00010022 parm 00F4AF50 id 28000000
HHC01317I 0:0E40 CHAN: scsw 00804007, stat 0C00, count 00F9, ccw 1F503DA8
HHC01318I 0:0E40 CHAN: test I/O: cc=0

The activation of the XCAE40E resource yields the following output:

HHC01334I 0:0E40 CHAN: ORB: IntP:00F4AF50 Key:0 LPM:80 Flags:08000 ....F....... ........ CCW:0AAF27F8
HHC01315I 0:0E40 CHAN: ccw 03300001 0AAF27F8
HHC01312I 0:0E40 CHAN: stat 0C00, count 0001
HHC00806I Processor CP00: I/O interrupt code 00010022 parm 00F4AF50 id 28000000
HHC01317I 0:0E40 CHAN: scsw 00804007, stat 0C00, count 0001, ccw 0AAF2800
HHC01318I 0:0E40 CHAN: test I/O: cc=0
HHC01332I 0:0E40 CHAN: halt subchannel
HHC01300I 0:0E40 CHAN: halt subchannel: cc=0
HHC00806I Processor CP00: I/O interrupt code 00010022 parm 00F4AF50 id 28000000
HHC01317I 0:0E40 CHAN: scsw 00802001, stat 0C00, count 0001, ccw 0AAF2800
HHC01318I 0:0E40 CHAN: test I/O: cc=0
HHC01334I 0:0E40 CHAN: ORB: IntP:00F4AF50 Key:6 LPM:80 Flags:08000 ....F....... ........ CCW:0B702358
HHC01315I 0:0E40 CHAN: ccw C3200001 00000000
HHC01312I 0:0E40 CHAN: stat 0C00, count 0000
HHC00806I Processor CP00: I/O interrupt code 00010022 parm 00F4AF50 id 28000000
HHC01317I 0:0E40 CHAN: scsw 60804007, stat 0C00, count 0000, ccw 0B702360
HHC01318I 0:0E40 CHAN: test I/O: cc=0
HHC01334I 0:0E40 CHAN: ORB: IntP:00F4AF50 Key:6 LPM:80 Flags:08000 ....F....... ........ CCW:0B702360
HHC01315I 0:0E40 CHAN: ccw E42000FF 0B702398
HHC01312I 0:0E40 CHAN: stat 0C00, count 00F8=>FF308860 308801E3 D3E2C3F6 C640F9F9 ..h-.h.TLSC6F 99
HHC00806I Processor CP00: I/O interrupt code 00010022 parm 00F4AF50 id 28000000
HHC01317I 0:0E40 CHAN: scsw 60804007, stat 0C00, count 00F8, ccw 0B702368
HHC01318I 0:0E40 CHAN: test I/O: cc=0
HHC01334I 0:0E40 CHAN: ORB: IntP:00F4AF50 Key:6 LPM:80 Flags:08000 ....F....... ........ CCW:0B702368
HHC01315I 0:0E40 CHAN: ccw 01200018 0B702498=>00160000 41000000 00000000 00000000 ................
HHC00981D 0:0E40 LCS: Accept data of size 24 bytes from guest
HHC00979D LCS: data: +0000< 00160000 41000000 00000000 00000000  ....A........... ................
HHC00979D LCS: data: +0010< 00000000 00000000                    ........         ........        
HHC00922D 0:0E40 CTC: lcs command packet received
HHC00979D LCS: command: +0000< 00160000 41000000 00000000 00000000  ....A........... ................
HHC00979D LCS: command: +0010< 00000000 0000                        ......           ......          
HHC00933D 0:0E40 CTC: executing command start lan (sna)
HHC02499I Hercules utility hercifc - Hercules Network Interface Configuration Program - version 4.3.0.0-SDL
HHC01414I (C) Copyright 1999-2020 by Roger Bowler, Jan Jaeger, and others
HHC01417I ** The SoftDevLabs version of Hercules **
HHC01415I Build date: Jan 26 2021 at 21:04:13
HHC00978D CTC: lcs device port 00: STILL trying to enqueue REPLY frame to device 0E40 00000000 0.0.0.0
HHC00978D CTC: lcs device port 00: STILL trying to enqueue REPLY frame to device 0E40 00000000 0.0.0.0
[Repeated endlessly]

After three minutes, a timeout value was reached for minor nodes of XCAE40E:
STC00004 IST380I ERROR FOR ID = XGEL00 - REQUEST: ACTLINK,SENSE: 081C0000

This console message is accompanied by this debug output of Hercules:

HHC01332I 0:0E40 CHAN: halt subchannel
HHC01300I 0:0E40 CHAN: halt subchannel: cc=0
HHC00806I Processor CP00: I/O interrupt code 00010022 parm 00F4AF50 id 28000000
HHC01317I 0:0E40 CHAN: scsw 60806001, stat 0000, count 0000, ccw 0B702370
HHC01318I 0:0E40 CHAN: test I/O: cc=0
HHC00978D CTC: lcs device port 00: STILL trying to enqueue REPLY frame to device 0E40 00000000 0.0.0.0
HHC00978D CTC: lcs device port 00: STILL trying to enqueue REPLY frame to device 0E40 00000000 0.0.0.0
[Repeated endlessly]

The inactivation of the resource yields no more channel communication to the LCS.

There never was one single frame visible in a tcpdump running on the associated tap interface.

Forcing an AS/400 to send XID frames to the MAC of the LCS unsurprisingly yielded no reaction, neither from Hercules Tracing, nor from VTAM.

Summary

  • SNA support is partially contained in the LCS driver,
  • VTAM sends command 0x41 which isn't recognized by the stock LCS driver. Thus VTAM gets no response back and reports an I/O timeout.
  • VTAM doesn't recognize the answer frame provided by the TCP/IP code being abused for SNA, thus the I/O timeout prevails the change.

@Fish-Git
Copy link
Member

Fish-Git commented Feb 1, 2021

Abstract

These are the collected findings as Documented in ...

Ah yes! I remember seeing that post! I wonder what happened to it? Did you delete it? In any case, I guess it's not that important anymore, since you've now posted a more current version of it. Thank you for that.

@Fish-Git
Copy link
Member

Fish-Git commented Feb 1, 2021

  • OS/390 V2R10 ADCD, being freely available from archive.org.

Question: for documentation purposes and for the benefit of others who might be interested, do you have the direct URL available? Thanks.

@Fish-Git
Copy link
Member

Fish-Git commented Feb 1, 2021

Ian (no last name known)

Shorter. His name is Ian Shorter.

@wrljet
Copy link
Member

wrljet commented Feb 1, 2021

OS/390 V2R10 ADCD, being freely available from archive.org.

@PoC-dev
Copy link

PoC-dev commented Feb 2, 2021

Hello Fish,

Ah yes! I remember seeing that post! I wonder what happened to it? Did you delete it?

No, it's just hidden.

In any case, I guess it's not that important anymore, since you've now posted a more current version of it. Thank you for that.

You're welcome!

:wq! PoC

@PoC-dev
Copy link

PoC-dev commented Feb 2, 2021

Hello Fish,

Shorter. His name is Ian Shorter.

Thanks. Corrected.

:wq! PoC

@PoC-dev
Copy link

PoC-dev commented Feb 2, 2021

Dear Devs,

Does one of you have the expertise to guide Vincent "@vinatron" through enabling a CCW trace on real hardware?

With his OSA card in non-QDIO-Mode and with tracing active while he's activating a XCA major node in VTAM, if we then see the command 41 show up, we'd achieve a huge step forward, by proving that the channel communication words are most likely the same for OSA-non-QDIO, and LCS.

Opinions, anybody?

:wq! PoC

@Fish-Git
Copy link
Member

Fish-Git commented Feb 3, 2021

Does one of you have the expertise to guide Vincent "@vinatron" through enabling a CCW trace on real hardware?

That certainly sounds like an excellent idea, Patrick!

Unfortunately I myself have zero experience with modern mainframe hardware. The last mainframes I had hands-on experience with with System/370's and 4300's!

Hopefully someone else who does have hands-on experience will read this and provide some instruction to help us out. Or maybe this question should be asked on the main Hercules list/forum? Maybe someone there might know? (I'm not sure how many members read GitHub Issues so we might have better luck asking the question to a wider audience.)

@PoC-dev
Copy link

PoC-dev commented Feb 3, 2021

Hello Vincent,

Apparently GTF is what we need to utilize. Do you want to read and learn yourself, or do you require a ready-made action plan? For the latter, I'd also need to read about it. Do not hesitate to ask questions, if they arise.

@Fish-Git: IBM provides a lot of documentation. It's most often the question what to search for.  :-)

:wq! PoC

@mcisho
Copy link
Contributor

mcisho commented Jan 3, 2022

Jeff, a question. Truncation occurs under Hercules when you 3270 into OS/390 and attempt to logon to VM. Does truncation occur if you 3270 into VM and attempt to logon to OS/390? Similarly on the R390, is the link disrupted if you 3270 into VM and attempt to logon to OS/390?

I don't have any VM 2.4 manuals, and have yet to find a manual the might describe the VM equivalent of GTF trace. If the truncation/disruption occurs from VM to OS/390 the search can end, and a GTF trace on OS/390 should illustrate what Hercules' LCS needs to do.

@jeff-snyder
Copy link

jeff-snyder commented Jan 3, 2022

Ian,

Here are traces of VM to OS/390 traffic. Again, two copies for comparison, one R/390(VM) to Hercules(OS/390) and the other Hercules(VM) to Hercules(OS/390).

In the R390-VM trace, after bringing up the APPN link, I connected to a terminal on VM, dialed into VTAM and then connected outbound to the OS/390 image running on Hercules. Note: you'll see in the trace, the first time I tried connecting to a non-existent APPLID, ML05TSO. Don't be distracted. When I connected to A06TSO, I was successful. :)

This OS/390 system generates a full screen of line mode messages before invoking ISPF. After I put in my password and was logged into TSO, I then went into a wait (x-system), waiting for those messages. Eventually, I hit reset and enter and I went into another wait (x-wait) with no additional output. In reviewing the network trace, I see the "SCREEN ERASURE CAUSED BY ERROR RECOVERY" message, but that never made it to the terminal.

In the Hercules to Hercules trace, I activated the APPN link and connected to the VM system. I dialed into VTAM and logged in to the JS95TSO APPLID on OS/390. This system does not generate all the line mode messages, just a couple and then it invokes ISPF. I saw the messages on the terminal and the got 3 asterisks and "input inhibited" when it invoked ISPF.

I have limited experience with VM, but I've been told that the trace command there only captures the I/O instructions and CCWs, with none of the data being transferred. If you think that would be helpful we could try that.

@jeff-snyder
Copy link

Sorry, forgot to mention... No disruption to APPN or the link between the systems in either of the scenarios above.

Also, I've got a bunch of VM/ESA 2.4 manuals. If you're interested, contact me off list and I'll send them to you. (jsnyder1369 at gmail) They zip up to 60+ MB, so probably a little big for email but we'll find a way.

@mcisho
Copy link
Contributor

mcisho commented Jan 4, 2022

Jeff,

We need to repeat the r390 exercise of 3270 to VM then logon to OS390 while a GTF trace is running on OS390. Are you au fait with running GTF traces, and the parameters which are needed (they have been mentioned several times in this very long issue!).

Where is this r390, is it at Marco's?

Ian

@ocram-zz
Copy link

ocram-zz commented Jan 4, 2022

Where is this r390, is it at Marco's?

yes, it‘s the same setup where you took the traces. Hercules is running on the linux vm, where the mirror port is connected.

Marco

@jeff-snyder
Copy link

jeff-snyder commented Jan 4, 2022

Ian,

Here's the trace you requested. I started the trace before I brought up the APPN link, so you've got all the activity up to the point where the session hung. To confirm, once the link was up, I connected a 3270 session to VM on the R/390 and dialed into VTAM. I then logged on to APPLID A06TSO on the OS/390 on Hercules. One note, this time the session included more of the line mode messages at the beginning of the TSO session before it hung, approximately 1/3 of a screen on a mod 4.


Editor's Note: as a courtesy, here's the same thing as a .pdf file:

@mcisho
Copy link
Contributor

mcisho commented Jan 5, 2022

Well now I'm completely confused, nothing unexpected or unexplainable occurred between OS/390 VTAM and the 3172.

Once Jeff had logged on to applid A06TSO the following outputs from VTAM to the 3172 were seen.

At 23:59:23.394101 TH sequence 10 was output which did a 3270 Erase Write Alternate to display on row 1 the message:-
ICH70001I IBMUSER LAST ACCESS AT 23:34:11 ON TUESDAY, JANUARY 4, 2022

At 23:59:23.517952 TH sequence 11 was output which did a 3270 Write to display on row 2 the message:-
IKJ56455I IBMUSER LOGON IN PROGRESS AT 23:59:23 ON JANUARY 4, 2022

At 23:59:25.170004 TH sequence 12 was output which did a 3270 Write to display on row 3 the message:-
IKJ56951I NO BROADCAST MESSAGES

At 23:59:26.152871 TH sequence 13 was output which did a 3270 Write to display on rows 4 to 14 the messages starting with:-
a row of 60-odd asterisks
and ending with:-
THEY WANT. P390A THROUGH P390Z AND TESTER ARE RESTRICTED

Whatever happened next was internal to VTAM because no TH sequence 14 was output, the next output was TH sequence 15.

At 23:59:26.175103 TH sequence 15 was output which did a 3270 Erase Write Alternate to display on rows 1 and 2 the messages:-
IKT00405I SCREEN ERASURE CAUSED BY ERROR RECOVERY PROCEDURE
three asterisks

At 23:59:26.189519 TH sequence 16 was then output which again did a 3270 Erase Write Alternate to display on rows 1 and 2 the messages:-
IKT00405I SCREEN ERASURE CAUSED BY ERROR RECOVERY PROCEDURE
three asterisks

All of the above outputs received a response TH/RH from the remote end. At this point the 3270 session is hung. The next activity was at 00:00:26.594691 when VTAM polled the 3172 to check it was still active. The trace was stopped shortly after that.

I guess this is an example of cross-domain 3270 sessions hanging, which have been mentioned several times here and elsewhere.

Jeff, have you tried a cross-domain session using a 3270 without extended features? I have NT4 with SNA Server, and using its 3270 client I can only logon to OS/390 when extended features are disabled.

@jeff-snyder
Copy link

jeff-snyder commented Jan 6, 2022

Hi Ian,

I think I've found a way for us to get I/O traces from VM. Could you take a look at the attached file and see if it is useful? I thinks it's got pretty much the same data as the MVS traces, but one thing is different. Apparently the data buffers do not get cleared when new data is written to them and the formatting program just prints the whole buffer, so residual data from previous I/Os show up in the output after the actual data transferred. I set the data buffer size to 2048 because I know some of the I/Os that have been truncated by Hercules have been 1500+ bytes. I'm hoping you can get the length of the data that was transferred from the CCW and just ignore the rest of the buffer.

In the trace, you should see the APPN link being brought up and then a logon attempt from the OS/390 system to APPLID JS94VM on VM.

This was done on my local images, running on Hercules. If this looks like you can use it, I can try doing this again after a fresh IPL of the VM system, to clear the data buffers and maybe make it more readable. Unfortunately, I won't be able to IPL the VM on the R/390 if we want to try this there. Hopefully, we can get what we need on the first take if we need to go that way. :)

FYI, in response to your question, no I haven't tried a cross-domain session without extended features. I tried turning off extended data stream support in WC3270 using the S: prefix on the IP address and got the "screen erasure caused by error recovery" logging on to OS/390 from a local terminal, when it tried to go into ISPF full screen. I'm pretty sure I'd have to find or create a "non EDS" logmode for that test to be successful and I haven't found one yet. (To be honest, I got side tracked looking at the I/O trace and didn't look very long...)

@mcisho
Copy link
Contributor

mcisho commented Jan 6, 2022

Hi Jeff,

Excellent, the trace is exactly what is required. As you say, pita it traces the whole input buffer rather than just the input, but the input does contain the lengths we need, so not a big deal.

When you get to do the real trace, can you please do a concurrent packet trace, to tie everything together.

Cheers, Ian

@jeff-snyder
Copy link

jeff-snyder commented Jan 7, 2022

Hi Ian,

Here are the traces you requested. In the zip file, I've included the console logs from OS/390 and from VTAM on VM as well as the VM IO trace and the packet capture.

I've got to apologize, I was having a bad night. I tried to dial up the APPN link (twice!) from VM before I had activated the XCA on OS/390. Normally, I'd have started over so you'd have a clean trace, but I wanted to capture the VM IO buffers before they had been reused, so you'll see those attempts in the trace.

@mcisho
Copy link
Contributor

mcisho commented Jan 7, 2022

Hi Jeff,

Thanks for your efforts getting the traces, and no need to apologize, we all have bad nights!

I have just done commit 261bb51 to the develop branch to make Hercules handle the oversized output correctly. Can you please check that it produces the same results as the R390? I would do it myself, but I don't have the environment available. At least not yet.

Of course, the change won't make cross-domain 3270 work, but Hercules' LCS emulation should now make it break it in the same way as the R390's LCS3172 emulation makes it break!

Ian

@jeff-snyder
Copy link

jeff-snyder commented Jan 8, 2022

Hey Ian,

Good news, you're close. It fails on the VM side, like it did on the R/390. Hooray, it's broken! :)

Bad news, the OS/390 side did not fail as well, like it did with the R/390 <-> Hercules scenario. Darn, it's not broken! :(

So, it looks like the link lasted long enough to tell the peer what was going on and close the link (gracefully?) on the R/390.

In the attached zip files, I have console logs, a packet trace and an IO trace, if you want to take a look.

@mcisho
Copy link
Contributor

mcisho commented Jan 8, 2022

Hi Jeff,

Sorry, I had made a typo which caused the wrong return code to be returned to VTAM (0x7656 instead of 0x7657). Hopefully the correct return code will cause the failure to be properly propagated to the partner. Commit 7c7fc9c to the develop branch has the correct return code. Can you please re-test?

Ian

@jeff-snyder
Copy link

jeff-snyder commented Jan 8, 2022

Hey Ian,

I see in the console log that the 0x7657 return code was returned by the LCS this time, but still no response from the other side.

I cloned after Fish applied his commit (96fa94b-Fix TIMERINT DEFAULT to conform to documentation/design) to the branch. It didn't look related, so I didn't rebuild after I discovered the difference, but if you think it might be significant, I can do that and retest.

Here are the traces. FYI, I forgot and left the packet trace running while I shut things down, so you've got probably 6 - 8 extra packets in there.

@mcisho
Copy link
Contributor

mcisho commented Jan 10, 2022

Having studied the R390 traces again, I think I misunderstood what happened. I believed that the over long data sent by VM resulted in the VM LCS doing something, which further study proved not to be the case, the VM LCS simply ignores the over long data. The connection being terminated is initiated by the OS/390 end, 12 seconds after the VM end has ignored the over long data.

It took me a while to almost completely understand what happened, greatly hampered by the clocks on the various systems not being synchronized, and the VM console messages having no time stamps. I say almost because I'm still not certain of the timing of packets arriving/departing relative to actions between VM and LCS.

I intend to revert the changes made in commit 7c7fc9c, and instead produce a message when the over long data arrives but otherwise ignore the data.

@ocram-zz
Copy link

Would it help to have another R/390 in this setup for tracing a connection between two "real" emulations?

@blackbit42
Copy link

Would it help to have another R/390 in this setup for tracing a connection between two "real" emulations?

If you have spare P/390 R/390 cards, I am happy to take one!
SCNR. :-)

@ocram-zz
Copy link

;)

@Fish-Git
Copy link
Member

(@vinatron. @PoC-dev, @mcisho, @wrljet, @Peter-J-Jansen, @wably, @jeff-snyder, @ocram-zz, @jmaynard, etc...)

ALL:

Should this issue maybe be closed at this point in time now?

It seems to be mostly done now.   (completely done?)

Besides, we can always re-open it again (or better, open a NEW issue) if any new bugs are ever discovered.

Just asking!

Thanks.

@vinatron
Copy link
Author

From what I've done so far I haven't seen any issues.

@jmaynard
Copy link
Contributor

I think we can close it. Once we get SNA networking runinng in general on the P/390, and if the same techniques don't work on Hercules, then we can revisit this.

@PoC-dev
Copy link

PoC-dev commented Mar 16, 2022

Please close. New bug reports can be filed individually, with the required additional information.

@vinatron
Copy link
Author

A friend of mine and I had OS/390 talking to a workstation over SNA we also had it talking to SNASw but that's not as useful as if you had full APPN support. However when directly connecting to OS/390 from PCOMM the connection worked flawlessly as far as I can tell I should probably test zOS to see if o can get APPN HPR working however non HPR works ok it's just nice to have HPR I enjoy having it on my AS/400.

@PoC-dev
Copy link

PoC-dev commented Mar 16, 2022

Your posting is confusing. Please make shorter sentences. Are you having a Hercules issue or what do you want to tell us?

I'm deliberately not using HPR, but just plain APPN in conjunction with (older) AS/400's like my model 150. I've read that APPN traffic is handled by the IOA's IOP, while HPR traffic needs to be handled by the main CPU.

@vinatron
Copy link
Author

Fair enough I mean to be fair all the problems I've had so far were known issues with the vtam version I was dealing with. Also I have a 270 running V5R3 and HPR doesn't seem to cause me any issues there either. Anyway as far as I can tell from my limited testing I have found no issues with Hercules itself but mainly my own implementations inside VTAM to be the issue of any exist. I guess what I'm trying to say is I think the communication adapter is working perfectly it's just my VTAM skills that aren't that great yet.

@PoC-dev
Copy link

PoC-dev commented Mar 16, 2022

Thank you for clarification.

@wrljet
Copy link
Member

wrljet commented Mar 16, 2022

I have no opinion on this one. I know absolutely nothing about SNA.

@Fish-Git
Copy link
Member

From what I've done so far I haven't seen any issues.

I think we can close it. Once we get SNA networking runinng in general on the P/390, and if the same techniques don't work on Hercules, then we can revisit this.

Please close. New bug reports can be filed individually, with the required additional information.

Thanks guys. Closing.

@Fish-Git Fish-Git removed the Ongoing Issue is long-term. Variant of IN PROGRESS: it's being worked on but maybe not at this exact moment. label Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement This issue does not describe a problem but rather describes a suggested change or improvement.
Projects
None yet
Development

No branches or pull requests