Linux宿主环境搭建
环境
OpenSUSE 13.1 32bit
Hercules 3.07
libpcap1
ACDC 1.10 CCKD
X3270
Linux IP:192.168.1.101,设置z/OS使用IP192.168.1.110
注意事项
hercifc和hercules的权限问题, 使用sudo hercules执行或者将二者chmod +s.
配置
根据Hercules主页中的TCP/IP networking with Hercules,配置示意如下:
su到root执行脚本
#!/bin/sh
iptables -t nat -F
iptables -t nat -X
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t nat -P OUTPUT ACCEPT
iptables -t mangle -F
iptables -t mangle -X
iptables -t mangle -P PREROUTING ACCEPT
iptables -t mangle -P INPUT ACCEPT
iptables -t mangle -P FORWARD ACCEPT
iptables -t mangle -P OUTPUT ACCEPT
iptables -t mangle -P POSTROUTING ACCEPT
iptables -F
iptables -X
iptables -P FORWARD ACCEPT
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -t raw -F
iptables -t raw -X
iptables -t raw -P PREROUTING ACCEPT
iptables -t raw -P OUTPUT ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
signal=`/sbin/lsmod | /bin/grep tun`
if [ "x$signal" = "x" ]; then
/sbin/modprobe tun
fi
ifconfig wlp3s0:0 192.168.1.110 netmask 255.255.255.0 up
iptables -t nat -A POSTROUTING -o wlp3s0 -s 192.168.2.0/24 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -o wlp3s0 -j SNAT --to 192.168.1.110
iptables -t nat -A PREROUTING -d 192.168.1.110 -j DNAT --to 192.168.2.105
其中wlp3s0
为网卡, 根据/sbin/ifconfig
的结果修改。
Hercules的配置文件中网络部分的配置。
0E20.2 3088 CTCI 192.168.2.105 192.168.2.1 -m 00-E0-4C-E5-11-81
IPL后进入z/OS后修改TCP的配置文件:
DEVICE CTC1 CTC E20
LINK CTC1L CTC 0 CTC1
HOME
192.168.2.105 CTC1L
PRIMARYINTERFACE CTC1L
GATEWAY
192.168.2.1 = CTC1L 1500 HOST
DEFAULTNET 192.168.2.1 CTC1L 1500 0
START CTC1
仿真终端
在Linux下x3270
可以像windows下的PCOMM一样用来模拟3270终端.
x3270包括一个可以在文本模式下使用的c3270
.
c3270 没有定义F3
快捷键,可以使用命令 exit
、end
等退出。