饮鸩止渴 发表于 2007-04-29 10:07

Terminal Concentrator 使用说明(n年前的旧作)

1 Terminal Concentrator简介
Terminal Concentrator又称Management Network Console,简称MN Console。其功能是实现Console口的集中的网络的控制,简化管理,节省显示器、键盘或者转换器的成本。我们使用的是annex终端集中器。
MN Console共有八个端口,通过专用线和需要管理的主机console端口连接,其中第一个端口具有特殊的管理作用。另外还有网口,用来配置IP地址实现telnet。
MN Console开关在后面板,前面板用作显示状态,还有一个Test按钮,用来配置管理的时候使用。
2 配置方法
2.1 启动到配置状态
1. 检查连接线,在配置状态,最好网线就绪,另外在管理的主机上连上专用线,接到MN Console的1端口
2. 打开MN Console电源,在5秒钟之内按下前面板的Test按钮,会亮起黄灯,开始自检
3. 登陆到管理主机,本次使用的是F280,在上面运行:
#tiphardwire
显示connected,回车,显示:
monitor::
这个时候已经正式登陆到终端集中器的配置界面。
2.2 输入?获得帮助
monitor:: ?
Monitor Commands:
addr [-d]            configure the Ethernet interface
boot [-v] []   download and run a file from host or self
   boot [-l] []   download, saves to self and run a file from host
config               show hardware configuration and rev info
console-baud         set console baudrate for remote diagnostics maintenance
erase                erase non-volatile memory
help               (or "?") print this list of commands
image [-d|]    display and/or set the load image & TFTP load/dump names
ipx [-d]             set IPX load/dump file server
lat [-d]             set LAT key
mop [-d]             set MOP load/dump address
net                  Ethernet standalone external loopback test
ping               send ICMP ECHO_REQUEST, host
ports [-d]         port tests with current status of ports displayed
sequence [-d|] display and edit the interface sequence
slip [-d] []   configure a SL/IP interface
stats [-slip]      display network error statistics
All of the commands will prompt for any additional
information they need, and require no arguments.
所有可用命令已经列出来了。
2.3 配置IP地址
配置IP地址使用addr命令,下面是一个例子:
monitor:: addr
Enter Internet address ::
Enter Subnet mask ::
Enter Preferred load host Internet address ::
*** Warning: Load host and Internet address are the same ***
Enter Broadcast address ::
Enter Preferred dump address ::
Select type of IP packet encapsulation (ieee802/ethernet) []::
    Type of IP packet encapsulation:
Load Broadcast Y/N ::
当然这个例子里我什么都没有改,;因为原来已经配好了。如果需要修改,可以在冒号后面输入需要更改的值。
使用addr –d可以看到刚才的配置
monitor:: addr -d
Ethernet address (hex): 00-80-2D-ED-21-23
Internet address: 192.212.87.62
Subnet masks: 192.255.255.0
Preferred load host address:
Broadcast address: 192.212.87.255
Preferred dump address: 0.0.0.0
Type of IP packet encapsulation:
Load Broadcast: N
2.4 配置sequence
使用sequence命令可以配置sequence,例如:
monitor:: sequence

Enter a list of 1 to 4 interfaces to attempt to use for downloading code or upline dumping. Enter them in the order they should be tried, separated by commas or spaces. Possible interfaces are:

Ethernet: net
SELF: self

Enter interface sequence :: self
Interface sequence: self
Sequence是用来下载代码或者上传代码的,可以依次输入4个,但是实际上我们只有两个。
2.5 写入配置
输入~.来写入配置并断开session,如下:
monitor:: ~ .
然后等待至少两分钟,terminal concentrator激活网络。
2.6 打开所有端口的访问
可以按照以下步骤:
#telnet192.168.2.211
Rotaries Defined:
    cli                              -
Enter Annex port name or number: cli
Annex Command Line Interpreter   *   Copyright 1991 Xylogics, Inc.
annex: su
Password:
annex# admin
Annex administration MICRO-XL-UX R7.0.1, 8 ports
admin : port all
admin: set port mode slave
       You may need to reset the appropriate port, Annex subsystem
   or reboot the Annex for changes to take effect.
admin: quit

annex#: boot
bootfile: Press Return
warning: Press Return
       *** Annex (10.0.0.2) shutdown message from port v1 ***
       Annex (10.0.0.2) going down IMMEDIATELY
现在已经打开了所有端口的访问,配置完成。
3 MN Console的管理
3.1 登陆到管理状态
配置完成以后,可以使用telnet对它进行管理,直接运行:
#telnet 192.168.2.211
看到界面:
Rotaries Defined:
    cli                              -
Enter Annex port name or number: cli
Annex Command Line Interpreter   *   Copyright 1991 Xylogics, Inc.
annex:
输入cli看到最后一行的状态,这时是一般管理状态。
在此状态下,输入su,可以进入特权管理状态,要求密码。配置以后,密码默认是IP地址。
annex: su
Password:
annex#
两个状态提示符不一样,而且后一种特权状态命令比较多。
在此状态下,输入admin可以进入本地管理状态:
annex# admin
Annex administration MICRO-XL-UX R7.0.1, 8 ports
admin :
3.2 三种状态的可用命令
输入?可以随时得到帮助。
1. 普通管理状态
annex: ?
                   Annex Command Summary
Name   Syntax                         Description
===============================================================================
?      ? []                  :Display help on Annex commands
bg       bg [%][%,+,-,,]       :Put a job in the background
fg       fg [%][%,+,-,,]       :Return to an established job
hangup   hangup                         :Hangup and reset an Annex port
help   help []               :Display help on Annex commands
hosts    hosts [-qn] []         :Display status of hosts/name servers
jobs   jobs                           :Display current jobs (sessions)
kill   kill [%][%,+,-,,]...:Terminate a job
lock   lock []               :Lock Annex port
netstatnetstat [-AaimnpQRrSst]      :Display network statistics
rlogin   rlogin[-l ]      :Connect to host using RLOGIN protocol
stats    stats [-sm ]:Display Annex statistics
stty   stty ]...    :Show/Set Annex port parameters
telnet   telnet [-rst] [ [] :Connect to host using TELNET protocol
who      who [[-l] []@...]:Show Annex users
2. 特权管理状态
annex# ?
                   Annex Command Summary
Name   Syntax                         Description
===============================================================================
?      ? [] [-m macro]       :Display help on Annex commands
admin    admin                        :Enters local administration function
arp      arp [-ads] [] [] [ :Display/change Ethernet ARP tables
bg       bg [%][%,+,-,,]       :Put a job in the background
boot   boot [-adhq] [+]MM] [      :Manipulate control lines
cp       cp      :copies a file to another file
edit   edit               :edit configuration files
fg       fg [%][%,+,-,,]       :Return to an established job
hangup   hangup                         :Hangup and reset an Annex port
help   help [] [-m macro]    :Display help on Annex commands
hosts    hosts [-qaffn] [...]   :Display/modify hosts/name servers
jobs   jobs                           :Display current jobs (sessions)
kill   kill [%][%,+,-,,]...:Terminate a job
lock   lock []               :Lock Annex port
ls       ls                           :lists the local EEPROM directory
more   more                     :list a file to the terminal
more:
mv       mv      :renames a file
netstatnetstat [-AaimnpQRrSst]      :Display network statistics
passwd   passwd                         :Change Annex password
ping   ping [-rv][ ] :Send ICMP ECHO_REQUEST packets to host
procs    procs [-r] [-ppid] [-ddev]   :Show Annex processes
rlogin   rlogin[-l ]      :Connect to host using RLOGIN protocol
rm       rm                   :deletes a file(s)
ppp      ppp                            :Convert port to a PPP interface
slip   slip                           :Convert port to a SLIP interface
stats    stats -scm    :Display or Clear Annex statistics
stty   stty ]...    :Show/Set Annex port parameters
su       su                           :Enter or exit administrative mode
tap      tap [-aksvx]             :Wiretap a port
telnet   telnet [-rst] [ [] :Connect to host using TELNET protocol
who      who [[-l] []@...]:Show Annex users
annex#
3. 本地管理状态
annex# admin
Annex administration MICRO-XL-UX R7.0.1, 8 ports
admin : ?
      help or ?:display this help screen
      broadcast:send a broadcast message to a port or ports
             port:enter default port set
             quit:terminate administrator
            reset:reset a port or subsystem
             show:display the current value of an eeprom parameter
            set:modify the value of an eeprom parameter
admin :
3.3 复位端口
如果连接的时候出现connection refused,这就是有另外的人在连接端口,如果确信没有别的人在连接端口,就是端口出现了错误,需要复位端口。
例如,我们连接2端口:
#telnet192.168.2.2115003
Trying 192.168.2.211...
telnet: Unable to connect to remote host: Connection refused
按照如下的办法进行复位:
#telent192.168.2.211
Rotaries Defined:
    cli                              -
Enter Annex port name or number: cli
Annex Command Line Interpreter   *   Copyright 1991 Xylogics, Inc.
annex: su
Password:
annex# who
Port What User             Location          When         IdleAddress
3   PSVR ---            ---               ---         :14130.33.2.109
v1CLI---            ---               ---                130.33.2.109
annex# admin reset 3
annex# hangup
然后就可以正常登陆3端口。
3.4 配置网关
我们可以给MN Console配置默认网关,下面是一个例子:
admin-ws# telnet tc1
Trying 192.9.200.1 ...
Connected to 192.9.200.1.
Escape character is '^]'.

Enter Annex port name or number: cli
...
annex: su
Password: root_password
annex: edit config.annex
(Editor starts)
Ctrl-W:save and exit Ctrl-X:exit Ctrl-F:page down Ctrl-B:page up
%gateway
net default gateway 192.9.200.2 metric 1 active ^W
annex# admin set annex routed n
You may need to reset the appropriate port, Annex subsystem or
reboot the Annex for changes to take effect.
annex# boot
3.5 其它管理
由于其他管理对整个项目来说用不到,所以在此不详述了。
4 MN Console的应用
4.1 登陆到机器console
我们应用MN Console的主要目的是对主机进行串口的集中管理,应用比较简单,在第一次配置IP以后,就可以在任意跟局域网相连的主机上用telnet登陆MN Console联接的主机的Console口。
某个主机接在某个端口上,那么这个主机的Console口就对应MN Console的一个telnet的端口,比如2端口对应5002,3端口对应5003,以此类推。
比如这样一个案例,我们的6800接在3端口,我们这样使用6800的console口:
root@XXbk
# telnet 192.168.2.211 5003
Trying 192.168.2.211...
Connected to 192.168.2.211.
Escape character is '^]'.
XXdb console login: root
Password:
Nov 20 16:52:47 XXdb login: ROOT LOGIN /dev/console
Last login: Wed Nov 20 15:43:19 from 130.33.2.167
Sun Microsystems Inc.   SunOS 5.8       Generic Patch   October 2001
root@XXdb
#
现在你就已经在XXdb这台主机的Console上了。
4.2 进入ok状态
如果有必要使用主机的openboot,可以有多个途径。
1. 如果已经使用例如:
#telnet 192.168.2.211 5003
的命令登陆到了系统,可以使用halt命令
#halt
系统关闭进入openboot
ok>
2. 如果已经登陆,出现紧急情况时,可以直接使用下面的方法:
输入ctrl + ],即^],进入telnet>提示符,然后输入:
telnet>sendbreak
可以直接进入ok状态
3. 如果你有耐心,可以设置eeprom的auto-boot?变量为false,重新启动机器进入ok状态
#eepromauto-boot?=false
#reboot
ok>



本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/6098/showart_288682.html
页: [1]
查看完整版本: Terminal Concentrator 使用说明(n年前的旧作)