fujisan0907のブログ
Amebaでブログを始めよう!

css test










ヘッダ1ヘッダ2ヘッダ3
1項目説明
2項目2X XX XX説明2XXXXX XXX XXXXXX X XXXX XXX X XXX X X XX XXXXXXXXX X X XXXXXXXX X X XXXXX
1000hoge fugafoo bar baz --------- ----- - - ----- -- --- --- ---- -- --



table.exp {
//margin: 5px 40px 5px 50px;
border-color: #000000;
border-collapse: collapse;
border-style: solid;
border-width: 1px;
}

table.exp th{
background-color: #dcdcdc;
//padding: 2px 5px 2px 5px;
border-color: #000000;
border-collapse: collapse;
border-style: solid;
border-width: 1px;
}

table.exp td{
background-color: #f5f5f5;
//padding: 2px 5px 2px 5px;
border-color: #000000;
border-collapse: collapse;
border-style: solid;
border-width: 1px;
}



12345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
123456789012345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890
123456789012345678901234567890
12345678901234567890
1234567890

1234567890 123456789012345678901234567890123456789012345678901234567890
12345678901234567890 123456789012345678901234567890
123456789012345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890
123456789012345678901234567890
12345678901234567890
1234567890



pre.setup {
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
white-space: pre;
font-family: monospace;
font-size: 10px;
background-color: #000000;
color: #bfbfbf;
}

コンソールサーバ 富士通 GP7B3RM2(SII NS-2232のOEM) の設定 その2

ネットワーク設定を行った後、コンソールサーバとして設定する。

プロンプトを変更する

prompt '$:*(^)# ' → install:somebody(0)#

変数
$ ホスト名
* ユーザ名
^ tty番号

ファイル内容確認コマンド
show <filename>

ファイル編集コマンド
edit <filename>

+----<edit commands>----------------------------------+
| t: top line b: bottom line |
| n: next line l: list |
| p: previous line s: search string |
| d: delete line o: append line |
| c: change line y: store line |
| a: add line z: recover line |
| i: insert line j: jump line |
| q: quit e: exit |
+----<column edit commands>---------------------------+
| ^f: 1 column right ^b: 1 column left |
| ^t: top column |
| ^u: recover column(1 line) |
+-----------------------------------------------------+

よく使うコマンド
b 最後尾への移動
a 行を追加
c 行を変更(上書き)
e 保存して終了
q 保存しないで終了

変更するファイル
hosts
resolv.conf
services
hostname
netmask
ttygroup
ttys
gateways
rs232c.tty1
rs232c.tty2 <- rs232c.tty1をコピーする
rs232c.tty3 <- rs232c.tty1をコピーする
rs232c.tty4 <- rs232c.tty1をコピーする
rs232c.tty5 <- rs232c.tty1をコピーする
rs232c.tty6 <- rs232c.tty1をコピーする


ホスト名を設定する

install:somebody(0)# show hostname
# hostname
install:somebody(0)# edit hostname
0002< cs
0002 cs
install:somebody(0)# show hostname
# hostname
cs
install:somebody(0)#


デフォルトGWを設定する

install:somebody(0)# show gateways
# destination <dest-addr>[/<mask>] via <gateway> <cost>
# destination exnet/255.255.0.0 via exgw 10
install:somebody(0)# edit gateways
0003< destination 0.0/0 via defaultrouter 1
0003 destination 0.0/0 via defaultrouter 1
install:somebody(0)# show gateways
# destination <dest-addr>[/<mask>] via <gateway> <cost>
# destination exnet/255.255.0.0 via exgw 10
destination 0.0/0 via defaultrouter 1
install:somebody(0)#


自分のIPとデフォルトGWのIPをhostsに設定する

install:somebody(0)# show hosts
# <internet-address> <hostname>
127.1 localhost loghost
#
install:somebody(0)# edit hosts
0004< 192.168.1.1 defaultrouter
0004 192.168.1.1 defaultrouter
0005< 192.168.1.2 cs cs.example.jp
0005 192.168.1.2 cs cs.example.jp
install:somebody(0)# show hosts
# <internet-address> <hostname>
127.1 localhost loghost
#
192.168.1.1 defaultrouter
192.168.1.2 cs cs.example.jp
install:somebody(0)#


ネットマスクを設定する

install:somebody(0)# show netmask
# [<network-addr>] <netmask>

install:somebody(0)# edit netmask
0003< 192.168.1.0 255.255.255.0
0003 192.168.1.0 255.255.255.0
install:somebody(0)# show netmask
# [<network-addr>] <netmask>

192.168.1.0 255.255.255.0
install:somebody(0)#


参照DNSの設定

install:somebody(0)# show resolv.conf
# Sample resolv.conf file
#
# domain sample.edu
# nameserver 128.30.0.3
# nameserver 128.30.0.10
install:somebody(0)# edit resolv.conf
0006< domain example.jp
0006 domain example.jp
0007< nameserver 192.168.1.254
0007 nameserver 192.168.1.254
0008< nameserver 192.168.1.1
0008 nameserver 192.168.1.1
install:somebody(0)# show resolv.conf
# Sample resolv.conf file
#
# domain sample.edu
# nameserver 128.30.0.3
# nameserver 128.30.0.10
domain example.jp
nameserver 192.168.1.254
nameserver 192.168.1.1
install:somebody(0)#


コンソールの設定を行う

install:somebody(0)# show ttys
tty1 passive
tty2 cmd
tty3 cmd
tty4 cmd
tty5 cmd
tty6 cmd
install:somebody(0)# edit ttys
0001 tty1 passive
0002 tty2 cmd
0002> tty2 cmd
0002< tty2 passive
0002 tty2 passive
0003 tty3 cmd
0003> tty3 cmd
0003< tty3 passive
0003 tty3 passive
0004 tty4 cmd
0004> tty4 cmd
0004< tty4 passive
0004 tty4 passive
0005 tty5 cmd
0005> tty5 cmd
0005< tty5 passive
0005 tty5 passive
0006 tty6 cmd
0006> tty6 cmd
0006< tty6 passive
0006 tty6 passive
[END]
install:somebody(0)# show ttys
tty1 passive
tty2 passive
tty3 passive
tty4 passive
tty5 passive
tty6 passive
install:somebody(0)#

install:somebody(0)# show ttygroup
# ttygroup-file
# <group-name> ttyn [ttyn]...
rcon tty1
rconr1 ttyr1
rconr2 ttyr2

tty1 none none none secure

install:somebody(0)# edit ttygroup
install:somebody(0)# show ttygroup
# ttygroup-file
# <group-name> ttyn [ttyn]...
rcon1 tty1
rcon2 tty2
rcon3 tty3
rcon4 tty4
rcon5 tty5
rcon6 tty6

tty1 none none none
tty2 none none none
tty3 none none none
tty4 none none none
tty5 none none none
tty6 none none none
install:somebody(0)#

install:somebody(0)# show services
#
# services
#
ftp-data 20/tcp
ftp 21/tcp
telnet 8010/tcp
domain 53/udp
domain 53/tcp
#
snmp 161/udp # Simple Network Mgmt Protocol
snmp-trap 162/udp snmptrap # SNMP trap (event) messages
#
who 513/udp whod
syslog 514/udp
printer 515/tcp spooler # Printer server
route 520/udp router routed
#
# Local services.
#
xpt_tty1 1401/tcp
xpt_tty2 1402/tcp
xpt_tty3 1403/tcp
xpt_tty4 1404/tcp
xpt_tty5 1405/tcp
xpt_tty6 1406/tcp
#
rcon 23/tcp
rconr1 8011/tcp
rconr2 8013/tcp
install:somebody(0)# edit services
install:somebody(0)# show services
#
# services
#
ftp-data 20/tcp
ftp 21/tcp
telnet 23/tcp
domain 53/udp
domain 53/tcp
#
snmp 161/udp # Simple Network Mgmt Protocol
snmp-trap 162/udp snmptrap # SNMP trap (event) messages
#
who 513/udp whod
syslog 514/udp
printer 515/tcp spooler # Printer server
route 520/udp router routed
#
# Local services.
rcon1 65001/tcp
rcon2 65002/tcp
rcon3 65003/tcp
rcon4 65004/tcp
rcon5 65005/tcp
rcon6 65006/tcp
install:somebody(0)#


tty設定ファイルを作成

install:somebody(0)# dir
SETUP FILE LIST
NAME SIZE
hosts 114
hosts.equiv 21
resolv.conf 164
services 428
grpd.conf 92
lmon.conf 17
hostgroup 91
hostname 15
netmask 56
prcap 17
prgroup 35
servers 205
snmpconf 874
telnetd.conf 89
ttygroup 235
ttys 78
gateways 148
interface 107
command.def 802
command.tty0 768
rs232c.def 109
rs232c.tty0 109
rs232c.tty1 110
telnet.def 187
telnet.tty0 187
tcptimer.def 78
xpt.def 520
NSfilter.c 1406
prns 862
xptlpd.c 2881
install:somebody(0)# copy rs232c.def rs232c.tty1


シリアルケーブルを抜いてもtelnetセッションを切らないようにする

install:somebody(0)# show rs232c.tty1
#
baud 9600
parity none
stop 1
bitchar 8
flow xon
xon 11
xoff 13
er on
rs on
drhup on
busysize 128
install:somebody(0)# edit rs232c.tty1
0011> drhup on
0011< drhup off
install:somebody(0)# show rs232c.tty1
#
baud 9600
parity none
stop 1
bitchar 8
flow xon
xon 11
xoff 13
er on
rs on
drhup off
busysize 128
install:somebody(0)#


tty2~tty6用もコピーする

install:somebody(0)# copy rs232c.tty1 rs232c.tty2
install:somebody(0)# copy rs232c.tty1 rs232c.tty3
install:somebody(0)# copy rs232c.tty1 rs232c.tty4
install:somebody(0)# copy rs232c.tty1 rs232c.tty5
install:somebody(0)# copy rs232c.tty1 rs232c.tty6
install:somebody(0)# dir
SETUP FILE LIST
NAME SIZE
hosts 114
hosts.equiv 21
resolv.conf 164
services 428
grpd.conf 92
lmon.conf 17
hostgroup 91
hostname 15
netmask 56
prcap 17
prgroup 35
servers 205
snmpconf 874
telnetd.conf 89
ttygroup 235
ttys 78
gateways 148
interface 107
command.def 802
command.tty0 768
rs232c.def 109
rs232c.tty0 109
rs232c.tty1 110
rs232c.tty2 110
rs232c.tty3 110
rs232c.tty4 110
rs232c.tty5 110
rs232c.tty6 110
telnet.def 187
telnet.tty0 187
tcptimer.def 78
xpt.def 520
NSfilter.c 1406
prns 862
xptlpd.c 2881
install:somebody(0)#


再起動前状態

install:somebody(0)# netstat
TCP CONNECTION STATUS
install:somebody(0)# netstat -r
ROUTING TABLE
destination mask gateway if property cost
192.168.0.0 ffffff00 en0 direct -
192.168.0.1 ffffffff lo0 p-to-p,loop -
127.0.0.1 ffffffff lo0 p-to-p,loop -
install:somebody(0)#


設定を保存して再起動する。

install:somebody(0)# write
writing configuration to flash ROM .............. done.
install:somebody(0)# reboot
Do you really want to reboot [y/n] ? y


ROM BOOT...
checking file system.
loading configuration from flash ROM.
ETHERNET address : 08:00:83:XX:XX:XX
Serial No. : XXXXXXXX
H/W type : 0
Communication Server System Software 2000.09.20 Ver 2.0

setting up LAN port.
starting net services.
vupd: start listen[ftp]
telnetd: start listen[telnet]
grpd: start
login :


再起動後状態

# netstat
TCP CONNECTION STATUS
LISTEN <x 0,r 0> (0.0.0.0).65006 <--> (0.0.0.0).0
LISTEN <x 0,r 0> (0.0.0.0).65005 <--> (0.0.0.0).0
LISTEN <x 0,r 0> (0.0.0.0).65004 <--> (0.0.0.0).0
LISTEN <x 0,r 0> (0.0.0.0).65003 <--> (0.0.0.0).0
LISTEN <x 0,r 0> (0.0.0.0).65002 <--> (0.0.0.0).0
LISTEN <x 0,r 0> (0.0.0.0).65001 <--> (0.0.0.0).0
LISTEN <x 0,r 0> (0.0.0.0).23 <--> (0.0.0.0).0
LISTEN <x 0,r 0> (0.0.0.0).21 <--> (0.0.0.0).0
# netstat -r
ROUTING TABLE
destination mask gateway if property cost
0.0.0.0 00000000 192.168.1.1 en0 ----- 1
192.168.1.0 ffffff00 en0 direct -
192.168.1.2 ffffffff lo0 p-to-p,loop -
127.0.0.1 ffffffff lo0 p-to-p,loop -
#


これでP1につないだ機器に接続したい場合は、TeraTermなどからポートを65001番に指定してアクセスする。

設定が一通り終わったら設定ファイルをftpでgetしておく。

ID ftp
pass manager


ftpdを無効化するには servers ファイルの以下の行をコメントアウトする

/share/vupd # FTP server


不特定多数がアクセス可能なネットワークに接続する場合は、telnet用ID(somebody)やftp用ID(ftp)、特権モード用それぞれのパスワードを設定する。

コンソールサーバ 富士通 GP7B3RM2(SII NS-2232のOEM) の設定 その1

秋葉原にある中古ネットワーク取扱店
国際産業技術株式会社 ネットワーク専門店 http://www.network1.jp/
にて1,000円で売っていたので買ってみた。
現行品を新品で買うと10万以上する(NS-2240-04 4ポート 125,370円 http://nttxstore.jp/_II_SI13067577)ので使えればお得だし。

$fujisan0907のブログ-富士通 GP7B3RM2

富士通のSunサーバ互換機であるPRIMEPOWERのオプションとして売られていたものらしい。
http://primeserver.fujitsu.com/primepower/products/peripheral/other/gp7b3rm2/


LAN: 10BASE-T x1
COM: 機器コンソール操作用シリアルポート D-SUB9pin x1
COM: サービス用シリアルポート D-SUB25pin x6
電源: 電源内蔵式(3pin 100V-ACケーブルコネクタ)
(消費電力 0.08A/4W 1ヶ月の電気代は70円くらい?)
結構FANの音が大きく、一般家庭で稼動させていたらうるさい。


富士通のマニュアル(PDF)
https://updatesite.jp.fujitsu.com/unix/jp/download/driver/rc2000/pdf/C120-E046-02.pdf

GP7B3RM2 設定ツール(インストール版) 1.1
https://updatesite.jp.fujitsu.com/unix/jp/download/driver/rc2000/


これを本来のSII NS-2232相当として使いたい。ということで、SII製品の情報を収集。

NS-2232 Type R(NS-2232の後継機 RoHS対応版)
http://www.sii.co.jp/ns/product/NS2232/ns2232.html

NS-2232 Type R FAQ
http://www.sii.co.jp/ns/support/faq/2232all.html

NS-2232 Type Rの設定事例・ファーム・マニュアルなど
http://www.sii.co.jp/ns/support/dl/ns-2232.html
※ファームウェアは適用した場合どうなるかは未検証。
DL出来るファームウェアはSII製品向けになっていて、Ver1.0~1.3からVer1.4への
差分だった。今回購入したOEM版は入っているOSがすでにVer2.0となっており、
ダウンロードできる差分を適用した場合の影響が見えないため。


状況確認

接続
(D-SUB9pinの)CONSOLEポートとPCをクロスケーブルでつないでTeraTermなどでアクセス。

boot log

ROM BOOT...
checking file system.
loading configuration from flash ROM.
ETHERNET address : 08:00:83:XX:XX:XX
Serial No. : XXXXXXXX
H/W type : 0
Communication Server System Software 2000.09.20 Ver 2.0

setting up LAN port.
starting net services.
login :


ログイン
デフォルトのログインIDは "somebody" パスワードは なし。


login :somebody
passwd:
install >


ログインできると簡単な操作は出来るようになる。


install >help
lo logout
passwd set user password
ping test reachability to network hosts
su login superuser
telnet login a remote system using the TELNET protocol
xpt byte stream transfer
install >


設定などを行う場合は特権モードへ移行する。


install >su
passwd:
#


特権モードでは使えるコマンドが増える。


# help
auth add/delete/print user
clear clear setup files to default
console switch on/off console message
copy copy setup files
delete delete setup files
dir list setup file name
edit edit setup files
hangup reset the tty process
lo logout
mode set tty mode
netstat print network status/statistics
passwd set user password
ping test reachability to network hosts
prrm remove print job
reboot reboot the system
settty set tty parameters
show print setup files
shutdown shutdown the system
su login superuser
telnet login a remote system using the TELNET protocol
tstat print tty status/statistics
write write setup files to flash ROM or setup card
xpt byte stream transfer
#


設定を初期化する


# clear -all
clear [hosts] ... OK.
clear [hostname] ... OK.
clear [netmask] ... OK.
clear [pw] ... OK.
clear [gateways] ... OK.
clear [resolv.conf] ... OK.
clear [services] ... OK.
clear [snmpconf] ... OK.
clear [telnetd.conf] ... OK.
clear [interface] ... OK.
clear [hostgroup] ... OK.
clear [hosts.equiv] ... OK.
clear [grpd.conf] ... OK.
clear [lmon.conf] ... OK.
clear [prcap] ... OK.
clear [prgroup] ... OK.
clear [servers] ... OK.
clear [ttys] ... OK.
clear [ttygroup] ... OK.
clear [command.tty0] ... OK.
clear [rs232c.tty0] ... OK.
clear [telnet.tty0] ... OK.
clear [command.def] ... OK.
clear [rs232c.def] ... OK.
clear [telnet.def] ... OK.
clear [tcptimer.def] ... OK.
clear [xpt.def] ... OK.
clear [loadfile] ... OK.
#


設定変更後はフラッシュメモリへの書き込み&リブートが必要。

# write
writing configuration to flash ROM ............................ done.
#
# reboot
Do you really want to reboot [y/n] ? y


ROM BOOT...
checking file system.
loading configuration from flash ROM.
ETHERNET address : 08:00:83:XX:XX:XX
Serial No. : XXXXXXXX
H/W type : 0
Communication Server System Software 2000.09.20 Ver 2.0

setting up LAN port.
starting net services.
login :somebody
passwd:
install >su
passwd:
#


再起動後のSETUP FILE LISTは下記のとおり

# dir
SETUP FILE LIST
NAME SIZE
hosts 59
hosts.equiv 21
resolv.conf 97
services 487
grpd.conf 92
lmon.conf 17
hostgroup 91
hostname 12
netmask 30
prcap 17
prgroup 35
servers 205
snmpconf 874
telnetd.conf 89
ttygroup 113
ttys 58
gateways 110
interface 107
command.def 802
command.tty0 768
rs232c.def 109
rs232c.tty0 109
telnet.def 187
telnet.tty0 187
tcptimer.def 78
xpt.def 520
NSfilter.c 1406
prns 862
xptlpd.c 2881
#

これで工場出荷時状態へ戻ったはず。これからシリアルコンソールサーバとして使うための設定を行っていく。