Last active
August 10, 2024 19:55
-
-
Save vinsentru/0cc170d84187048438186cbdbf1c8aaa to your computer and use it in GitHub Desktop.
Hercules SDL aka 4.x aka Hyperion networking on Linux with OS/390 or z/Os as a guest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Ok, listen up folks, the amount of old, outdated, wrong and misleading crap on this topic in the interiets if thru the roof. | |
| The important parts aka what and how, often left out of scope. | |
| So, to fix it and also to create a note for myself, this GIST. | |
| Here we're talking about just making the networking work, not some fancy bigblue stuff. | |
| Static routing, private subnet. | |
| So, what: | |
| - Hercules SDL compiled from sources: | |
| vinsentru@minipc:~/src/hyperion$ git branch -v | |
| * master f7d2360a (preparatory commits for release of 4.7) | |
| - Deuvian Linux | |
| vinsentru@minipc:~$ cat /etc/os-release | |
| PRETTY_NAME="Devuan GNU/Linux 5 (daedalus)" | |
| - And finally, OS/390 v2r10 | |
| First of all, if you compiled Hercules yourself, you'll probably need to set Setuid bit on hercifc: | |
| chmod u+s /usr/local/bin/hercifc # or where we hell is it on your system | |
| Next, the networking config in the hercules.cnf: | |
| 0E20.2 CTCI GUEST_IP HOST_IP | |
| In my case: | |
| 0E20.2 CTCI 192.168.88.210 192.168.88.53 | |
| That's it, you don't need anything else here | |
| RTFM: https://github.com/SDL-Hercules-390/hyperion/blob/master/readme/README.NETWORKING.md | |
| Next. I run Hercules with sudo to make things easy with networking. | |
| This is the script I use: | |
| vinsentru@minipc:~$ cat /usr/local/bin/hercsudo.sh | |
| sudo LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/hercules "$@" | |
| We need to do some stuff after Hercules started but before IPL. | |
| Enter hercules.rc: | |
| $ cat hercules.rc | |
| # Start the network | |
| shcmdopt enable | |
| sh echo "1" > /proc/sys/net/ipv4/conf/all/proxy_arp | |
| sh echo "1" > /proc/sys/net/ipv4/conf/all/forwarding | |
| If you don't run Hercules with sudo, add sudo to these commands. | |
| I'm IPL manually, but you may add IPL command to the same .rc script | |
| That's the whole Linux side setup. | |
| Now to the guest setup. IPL and login as usual. | |
| You'll need to edit an OS/390 TCP/IP PROFILE. (This is | |
| TCPIP.PROFILE.TCPIP for AD systems). Use 3.4, Luke! | |
| There you'll need to do two operations: comment out old shit | |
| and add the new one. | |
| Find the DEVICE lines and make them look like this: | |
| DEVICE CTCA1 CTC e20 | |
| LINK CTC1 CTC 1 CTCA1 | |
| Find HOME line and update it too: | |
| HOME | |
| GUEST_ADDR CTC1 | |
| where GUEST_ADDR is obv. should be the address you've used in the hercules.cnf | |
| Comment out the GATEWAY line and all related crap below. | |
| Instead, use the new config form: | |
| BEGINROUTES | |
| ; Destination Mask First-Hop Link MTU Options | |
| ROUTE YOUR_NET 255.255.255.0 = CTC1 mtu 1492 | |
| ROUTE default YOUR_GW CTC1 mtu 1492 | |
| ENDROUTES | |
| In my case it was: | |
| 000253 BEGINRoutes | |
| 000254 ; Destimation Mask First-Hop Link MTU | |
| 000255 ROUTE 192.168.88.0 255.255.255.0 = CTC1 mtu 1492 | |
| 000256 ROUTE DEFAULT 192.168.88.1 CTC1 MTU 1492 | |
| 000257 ENDRoutes | |
| Comment out defaultnet line as well. | |
| And the last thing, at the bottom of this file, make sure you have this: | |
| START CTCA1 | |
| That's it, save and exit this editor. | |
| Now in the Operator's console window run this command to stop TCPIP: | |
| STOP TCPIP | |
| Wait until it stops. Now you'll need to edit another file/member: | |
| Edit TCPIP.TCPIP.DATA. Change the HOSTNAME and DOMAINORIGIN lines as | |
| appropriate. Comment out the NSINTERADDR line, or point it to your name server if you | |
| know the IP address. | |
| Save/exit as usual. | |
| Start TCPIP again with | |
| START TCPIP | |
| That's it. | |
| Additional reading, part 6.22 in this book: https://www.redbooks.ibm.com/redbooks/pdfs/sg246204.pdf | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment