|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
Setting up Hercules networking with zOS under Linux (HowTo)This is the details of how I got Hercules and zOS TCPIP working on
Centos 5.2 Linux 64 bit. I used the tap interface instead of tun because it SIMPLIFIES the routing side of things. This was particularly useful at work in my Lab where I did not want to have to ask the network folks to propagate another route. All I needed was just an IP address on the subnet that the machine was attached to. From reading here and there I decided that we weren't going to be using a CTC. That would require all the routing and a small subnet that I wanted to avoid. So I created a new IODF with 2 3172 addresses at 0D20. You can pick any address you would like. I will leave the details of that to the reader. Changes to the Hercules configuration file: # LCS 0D20.2 LCS 192.168.2.109 The following was the setup for my TCPIP.PARMLIB member These are just lines out of it from the appropriate places, not the whole member. The '..' indicate missing lines DEVICE LCS1 LCS D20 NONETMAN AUTORESTART LINK ETH1 ETHERNET 0 LCS1 .. .. HOME 192.168.2.109 ETH1 .. BEGINRoutes .. ROUTE 192.168.2.0/24 = ETH1 MTU 1500 .. ROUTE DEFAULT 192.168.2.1 ETH1 MTU DEFAULTSIZE .. ENDRoutes .. .. START LCS1 To make this easier, I got the hostcmd program from the files section and assembled it and linked into a link list library (it needs to be APF authorized, so you can stick it wherever you have an APF authorized library) I chose to put it in the link list. Remember the SETCODE AC(1) in the lked step. Next I created HERC1C member in SYS1.PROCLIB //IEFPROC EXEC PGM=HOSTCMD,PARM='sh sudo ./echos.sh' Ok, now we have gotten over all the Hercules/zOS stuff (That's the easy part, if you are an MVS dude). Now as you see we are going to be some 'sudoing' in linux, so add the following to /etc/sudoers: urid ALL=(ALL) NOPASSWD: ALL Where "urid" is the UNIX id you are running hercules under. In the directory where you start hercules from create the following: echos.sh #!/bin/bash echo "1" >/proc/sys/net/ipv4/ip_forward echo "1" >/proc/sys/net/ipv4/conf/eth0/proxy_arp echo "1" >/proc/sys/net/ipv4/conf/tap0/proxy_arp Now chmod +x echos.sh In the script you start hercules, add a line: sudo chmod 666 /dev/net/tun So my runz18 looks like: #!/bin/bash sudo chmod 666 /dev/net/tun hercules -f conf/zos18.conf Now more changes to your hercules conf file #SHCMDOPT NODIAG8 DIAG8CMD ENABLE I.E. Make sure SHCMDOPT is the default and DIAG8 is turned on. Now to attack hercules: chmod chmod 6755 /usr/local/bin/hercifc This allows hercifc to run as root so it can manipulate the TAP device Now you can start hercules ./runz18 If you get the following message in your log, you have pretty much everything on the UNIX side setup: HHCLC073I 0D20: TAP device tap0 opened Anything else, and there are permission issues somewhere The devlist should look like devlist 0d20 0:0D20 3088 LCS Port 00 IP (tap0) open devlist 0d21 0:0D21 3088 LCS Port 00 IP (tap0) open If you see something like 0:0D20 3088 LCS Port 00 IP () then all is not well permission wise and things WILL NOT work. Ok, IPL, etc. Start net. Start TCPIP Once it comes up, S HERC1C or whatever you called it. This will put cause hercules to execute the echos.sh script which will set up all the goodies. The reason that you have to do this after you have started TCPIP is that the tap0/proxy_arp thingie doesn't exist until all is opened up. Good Luck |
|
|
Re: Setting up Hercules networking with zOS under Linux (HowTo)On Sunday 16 Nov 2008, August Treubig wrote:
> BEGINRoutes > .. > ROUTE 192.168.2.0/24 = ETH1 MTU 1500 > .. > ROUTE DEFAULT 192.168.2.1 ETH1 MTU DEFAULTSIZE > .. > ENDRoutes Thanks for the pointers, this was the part I had wrong, I should have used a netmask. > To make this easier, I got the hostcmd program from the files section > and assembled it and linked into a link list library (it needs to be > APF authorized, so you can stick it wherever you have an APF > authorized library) Using HOSTCMD is using a sledge-hammer to crack a nut! Simply add net.ipv4.ip_forward = 1 net.ipv4.conf.eth0.proxy_arp = 1 to /etc/sysctl.conf on the host and sh echo "1" >/proc/sys/net/ipv4/conf/tap0/proxy_arp to your hercules.rc file. HTH -- ------------------------------------------------------ Robin Atwood |
|
|
Re: Setting up Hercules networking with zOS under Linux (HowTo)Robin,
Thanks for the ideas on the first two. I am a Solaris guy and some of the Linux things aren't the same. But having that said. As I said in the original post, the tap0/proxy_arp file does not appear until after TCPIP actually opens the device. Your solution gets the following: sh ./dofix.sh HHCAO001I Hercules Automatic Operator thread started; tid=4221E940, pri=0, pid=30307 ./dofix.sh: line 2: /proc/sys/net/ipv4/conf/tap0/proxy_arp: No such file or directory HHCPN013I EOF reached on SCRIPT file. Processing complete. Even though the devlist shows: devlist 0d20 0:0D20 3088 LCS Port 00 IP (tap0) open August --- In hercules-390@..., Robin Atwood <robin.atwood@...> wrote: > > On Sunday 16 Nov 2008, August Treubig wrote: > > BEGINRoutes > > .. > > ROUTE 192.168.2.0/24 = ETH1 MTU 1500 > > .. > > ROUTE DEFAULT 192.168.2.1 ETH1 MTU DEFAULTSIZE > > .. > > ENDRoutes > > Thanks for the pointers, this was the part I had wrong, I should have used a > netmask. > > > To make this easier, I got the hostcmd program from the files section > > and assembled it and linked into a link list library (it needs to be > > APF authorized, so you can stick it wherever you have an APF > > authorized library) > > Using HOSTCMD is using a sledge-hammer to crack a nut! Simply add > > net.ipv4.ip_forward = 1 > net.ipv4.conf.eth0.proxy_arp = 1 > to /etc/sysctl.conf on the host and > > sh echo "1" >/proc/sys/net/ipv4/conf/tap0/proxy_arp > to your hercules.rc file. > > HTH > -- > ------------------------------------------------------ > Robin Atwood > |
|
|
Re: Re: Setting up Hercules networking with zOS under Linux (HowTo)On Thursday 20 Nov 2008, August Treubig wrote:
> But having that said. As I said in the original post, the > tap0/proxy_arp file does not appear until after TCPIP actually > opens the device. > > Your solution gets the following: > > sh ./dofix.sh > HHCAO001I Hercules Automatic Operator thread started; > tid=4221E940, pri=0, pid=30307 > ./dofix.sh: line 2: /proc/sys/net/ipv4/conf/tap0/proxy_arp: No such > file or directory > HHCPN013I EOF reached on SCRIPT file. Processing complete. > > Even though the devlist shows: > > devlist 0d20 > 0:0D20 3088 LCS Port 00 IP (tap0) open Oh. that is not the case on my Linux system, you can write the file before issuing the IPL command. I am using a .oat file but I doubt that makes a difference. What level of kernel do you have on your host system? -- ------------------------------------------------------ Robin Atwood |
|
|
Re: Setting up Hercules networking with zOS under Linux (HowTo)Centos Linux 5.2 x64 at
2.6.18-92.1.6.el5 Aug --- In hercules-390@..., Robin Atwood <robin.atwood@...> wrote: > > On Thursday 20 Nov 2008, August Treubig wrote: > > But having that said. As I said in the original post, the > > tap0/proxy_arp file does not appear until after TCPIP actually > > opens the device. > > > > Your solution gets the following: > > > > sh ./dofix.sh > > HHCAO001I Hercules Automatic Operator thread started; > > tid=4221E940, pri=0, pid=30307 > > ./dofix.sh: line 2: /proc/sys/net/ipv4/conf/tap0/proxy_arp: No such > > file or directory > > HHCPN013I EOF reached on SCRIPT file. Processing complete. > > > > Even though the devlist shows: > > > > devlist 0d20 > > 0:0D20 3088 LCS Port 00 IP (tap0) open > > Oh. that is not the case on my Linux system, you can write the file > issuing the IPL command. I am using a .oat file but I doubt that makes a > difference. What level of kernel do you have on your host system? > -- > ------------------------------------------------------ > Robin Atwood > |
|
|
Re: Re: Setting up Hercules networking with zOS under Linux (HowTo)On Friday 21 Nov 2008, August Treubig wrote:
> Centos Linux 5.2 x64 at > > 2.6.18-92.1.6.el5 I am running 2.6.23 so I doubt that is the issue. I had another thought this morning: are you pre-loading the tun module or does it load on demand? Another tack would be to try to use the Herc auto-operator facility to issue the echo when TCP/IP comes active. HTH -- ------------------------------------------------------ Robin Atwood |
|
|
Re: Setting up Hercules networking with zOS under Linux (HowTo)--- In hercules-390@..., August Treubig wrote:
> the tap0/proxy_arp file does not appear until after TCPIP > actually opens the device. > Your solution gets the following: ... > /proc/sys/net/ipv4/conf/tap0/proxy_arp: No such file or directory On Linux 2.4.18 it's the same. The tap0 device is not created until the guest TCP/IP opens the adapter. However, I found a tip in Jay Maynard's Share presentation at http://linuxvm.org/Present/SHARE108/S2865jma.pdf : echo "1" >/proc/sys/net/ipv4/conf/all/proxy_arp or alternatively add this line to /etc/sysctl.conf : net.ipv4.conf.all.proxy_arp = 1 This way you don't need to issue any extra commands after starting Hercules. Regards, Roger Bowler If it's "mainframe-like", it's not a mainframe! |
|
|
Re: Setting up Hercules networking with zOS under Linux (HowTo)Roger,
Yes that does fix the problem. So, I will rework my how to and re-put it out. I also had a problem with issuing a diag 8 command when I tried to do a "test" doing an attach of a device. The machine took a machine check. (That was interesting!). But have not had any problems with issuing the shell scripts doing the echo. --- In hercules-390@..., "Roger Bowler" <rogerbowler@...> wrote: > > --- In hercules-390@..., August Treubig wrote: > > the tap0/proxy_arp file does not appear until after TCPIP > > actually opens the device. > > Your solution gets the following: > ... > > /proc/sys/net/ipv4/conf/tap0/proxy_arp: No such file or directory > > On Linux 2.4.18 it's the same. The tap0 device is not created until > the guest TCP/IP opens the adapter. > > However, I found a tip in Jay Maynard's Share presentation at > http://linuxvm.org/Present/SHARE108/S2865jma.pdf : > > echo "1" >/proc/sys/net/ipv4/conf/all/proxy_arp > > or alternatively add this line to /etc/sysctl.conf : > > net.ipv4.conf.all.proxy_arp = 1 > > This way you don't need to issue any extra commands after starting > Hercules. > > Regards, > Roger Bowler > If it's "mainframe-like", it's not a mainframe! > |
| Free embeddable forum powered by Nabble | Forum Help |