Console Switch – Digi PortServer

什麼是 Console Switch ,有些設備(通常是沒有 VGA 輸出的裝置,如 switch , Server , Storage …)提供 Console 介面用以提供初次設定或是使用指令介面.但如果是實驗室或是大型機房,不可能找到這麼多電腦有 console (或是 USB serial port) ,這時候可以透過 Console Switch .

使用上也很簡單只需要透過乙太網路就可以同時連接多個序列裝置(serial port).

參考文件 : https://www.digi.com/resources/documentation/digidocs/pdfs/90001535.pdf

設定 Console Switch 固定 IP

Terminal Console (Port 16) 預設為:

  • VT-100
  • 9600 baud
  • 8-bit characters
  • 1 stop bit
  • No Parity
  • Software flow control

如果上述的方式無法連線,在開機的時候同時按下 Console Switch 面板上的 < > 鍵,就可以進去.

# set config ip=172.16.0.4
# set config submask=255.255.255.0
# set config gateway=172.16.0.254
# set ports range=1-16 dev=prn
# set line range=1-12 baud=115200
# set config
# boot action=reset

Console Switch Terminal connections 設定

指令:

set line [Options...]

Sets/displays serial line parameters table entries.
Available bauds are: 75,110,134,150,200,300,600,1200,1800,2400,4800,9600,14400,19200,28800,38400,57600,76800,115200

範例 : 將 Port 13~16 連線 baud rate 設定為 115200

telnet 172.16.0.4,23
user: root , password: dbps
#> set line

serial# baud   csize parity stopb break   error   inpck istrip onlcr otab

  1     115200 8     N      1     ignore  null    off   off    off   off
  2     115200 8     N      1     ignore  null    off   off    off   off
  3     115200 8     N      1     ignore  null    off   off    off   off
  4     115200 8     N      1     ignore  null    off   off    off   off
  5     115200 8     N      1     ignore  null    off   off    off   off
  6     115200 8     N      1     ignore  null    off   off    off   off
  7     115200 8     N      1     ignore  null    off   off    off   off
  8     115200 8     N      1     ignore  null    off   off    off   off
  9     115200 8     N      1     ignore  null    off   off    off   off
 10     115200 8     N      1     ignore  null    off   off    off   off
 11     115200 8     N      1     ignore  null    off   off    off   off
 12     115200 8     N      1     ignore  null    off   off    off   off
 13     9600   8     N      1     ignore  null    off   off    off   off
 14     9600   8     N      1     ignore  null    off   off    off   off
 15     9600   8     N      1     ignore  null    off   off    off   off
 16     9600   8     N      1     ignore  null    off   off    off   off
#> set line range=13-16 baud=115200
#> set line

serial# baud   csize parity stopb break   error   inpck istrip onlcr otab

  1     115200 8     N      1     ignore  null    off   off    off   off
  2     115200 8     N      1     ignore  null    off   off    off   off
  3     115200 8     N      1     ignore  null    off   off    off   off
  4     115200 8     N      1     ignore  null    off   off    off   off
  5     115200 8     N      1     ignore  null    off   off    off   off
  6     115200 8     N      1     ignore  null    off   off    off   off
  7     115200 8     N      1     ignore  null    off   off    off   off
  8     115200 8     N      1     ignore  null    off   off    off   off
  9     115200 8     N      1     ignore  null    off   off    off   off
 10     115200 8     N      1     ignore  null    off   off    off   off
 11     115200 8     N      1     ignore  null    off   off    off   off
 12     115200 8     N      1     ignore  null    off   off    off   off
 13     115200 8     N      1     ignore  null    off   off    off   off
 14     115200 8     N      1     ignore  null    off   off    off   off
 15     115200 8     N      1     ignore  null    off   off    off   off
 16     115200 8     N      1     ignore  null    off   off    off   off
#> quit

Console Switch (重設密碼)

Command:

newpass

重設 root 的密碼

telnet 172.16.0.4,23
user: root , password: ####
#> newpass
current passwd:
new password:
repeat new password:

Console Switch (解鎖 console)

有時候 telnet 完之後沒有正常關閉會造成 Connection refused ,可以透過下面方式來解鎖.

telnet 172.16.0.4,23
user: root , password: dbps
#> who

TTY  user            Connected from      Connected to        sessions

3    in use
4    in use
5    in use
6    in use
7    in use
8    in use
9    in use
10   in use
11   in use
12   in use
17   Telnet          172.16.0.144        direct_tty10        0
18   Telnet          172.16.0.144        direct_tty11        0
19   Telnet          172.16.0.144        direct_tty09        0
20   Telnet          172.16.0.144        direct_tty12        0
21   Telnet          172.16.1.58         direct_tty05        0
22   Telnet          172.16.1.58         direct_tty06        0
23   Telnet          172.16.0.144        direct_tty08        0
24   Telnet          172.16.0.219        direct_tty03        0
25   Telnet          172.16.0.219        direct_tty04        0
26   root            172.16.0.219        local shell         0
27   Telnet          172.16.0.144        direct_tty07        0

Command:

kill (tty#)[-(tty#)]

kill – Reset/Initialize the specified tty device to its default state.

解鎖 Physical port tty03 & tty04 從剛剛的查詢可以看到對應到 TTY 24 ,25.

#> kill 24
#> kill 25
#> quit

如果還是不行就直接把 tty03 (3)& tty04(4) 斷線.

#> kill 3
#> kill 4
#> quit

Reset All Parts of the Configuration Except Network Settings to Defaults

#> boot action=eewrite

Re-Login telnet & setup.

telnet 172.16.0.4,23
user: root , password: ####

#> set line range=1 baud=115200 stopb=1 break=ignore inpck=off istrip=off onlcr=off otab=off
#> set flow range=1 ixon=on aixon=off ixoff=on ixany=off itoss=off altpin=off
#> set flow range=1 rts=off dtr=off cts=off dcd=off dsr=off ri=off
#> set line range=2 baud=115200 stopb=1 break=ignore inpck=off istrip=off onlcr=off otab=off
#> set flow range=2 ixon=on aixon=off ixoff=on ixany=off itoss=off altpin=off
#> set flow range=2 rts=off dtr=off cts=off dcd=off dsr=off ri=off
#> set line range=3 baud=115200 stopb=1 break=ignore inpck=off istrip=off onlcr=off otab=off
#> set flow range=3 ixon=on aixon=off ixoff=on ixany=off itoss=off altpin=off
#> set flow range=3 rts=off dtr=off cts=off dcd=off dsr=off ri=off
#> set line range=4 baud=115200 stopb=1 break=ignore inpck=off istrip=off onlcr=off otab=off
#> set flow range=4 ixon=on aixon=off ixoff=on ixany=off itoss=off altpin=off
#> set flow range=4 rts=off dtr=off cts=off dcd=off dsr=off ri=off
#> set line range=5 baud=115200 stopb=1 break=ignore inpck=off istrip=off onlcr=off otab=off
#> set flow range=5 ixon=on aixon=off ixoff=on ixany=off itoss=off altpin=off
#> set flow range=5 rts=off dtr=off cts=off dcd=off dsr=off ri=off
#> set line range=6 baud=115200 stopb=1 break=ignore inpck=off istrip=off onlcr=off otab=off
#> set flow range=6 ixon=on aixon=off ixoff=on ixany=off itoss=off altpin=off
#> set flow range=6 rts=off dtr=off cts=off dcd=off dsr=off ri=off
#> set line range=7 baud=115200 stopb=1 break=ignore inpck=off istrip=off onlcr=off otab=off
#> set flow range=7 ixon=on aixon=off ixoff=on ixany=off itoss=off altpin=off
#> set flow range=7 rts=off dtr=off cts=off dcd=off dsr=off ri=off
#> set line range=8 baud=115200 stopb=1 break=ignore inpck=off istrip=off onlcr=off otab=off
#> set flow range=8 ixon=on aixon=off ixoff=on ixany=off itoss=off altpin=off
#> set flow range=8 rts=off dtr=off cts=off dcd=off dsr=off ri=off
#> set line range=9 baud=115200 stopb=1 break=ignore inpck=off istrip=off onlcr=off otab=off
#> set flow range=9 ixon=on aixon=off ixoff=on ixany=off itoss=off altpin=off
#> set flow range=9 rts=off dtr=off cts=off dcd=off dsr=off ri=off
#> set line range=10 baud=115200 stopb=1 break=ignore inpck=off istrip=off onlcr=off otab=off
#> set flow range=10 ixon=on aixon=off ixoff=on ixany=off itoss=off altpin=off
#> set flow range=10 rts=off dtr=off cts=off dcd=off dsr=off ri=off
#> set line range=11 baud=115200 stopb=1 break=ignore inpck=off istrip=off onlcr=off otab=off
#> set flow range=11 ixon=on aixon=off ixoff=on ixany=off itoss=off altpin=off
#> set flow range=11 rts=off dtr=off cts=off dcd=off dsr=off ri=off
#> set line range=12 baud=115200 stopb=1 break=ignore inpck=off istrip=off onlcr=off otab=off
#> set flow range=12 ixon=on aixon=off ixoff=on ixany=off itoss=off altpin=off
#> set flow range=12 rts=off dtr=off cts=off dcd=off dsr=off ri=off
#> set line range=13 baud=115200 stopb=1 break=ignore inpck=off istrip=off onlcr=off otab=off
#> set flow range=13 ixon=on aixon=off ixoff=on ixany=off itoss=off altpin=off
#> set flow range=13 rts=off dtr=off cts=off dcd=off dsr=off ri=off
#> set line range=14 baud=115200 stopb=1 break=ignore inpck=off istrip=off onlcr=off otab=off
#> set flow range=14 ixon=on aixon=off ixoff=on ixany=off itoss=off altpin=off
#> set flow range=14 rts=off dtr=off cts=off dcd=off dsr=off ri=off
#> set line range=15 baud=115200 stopb=1 break=ignore inpck=off istrip=off onlcr=off otab=off
#> set flow range=15 ixon=on aixon=off ixoff=on ixany=off itoss=off altpin=off
#> set flow range=15 rts=off dtr=off cts=off dcd=off dsr=off ri=off
#> set line range=16 baud=115200 stopb=1 break=ignore inpck=off istrip=off onlcr=off otab=off
#> set flow range=16 ixon=on aixon=off ixoff=on ixany=off itoss=off altpin=off
#> set flow range=16 rts=off dtr=off cts=off dcd=off dsr=off ri=off
#> set port range= 1 dev=prn sess=4 termtype=vt100 uid=0 edelay=1 auto=off bin=off group=0
#> set port range= 1 dest=0.0.0.0 dport=0
#> set port range= 2 dev=prn sess=4 termtype=vt100 uid=0 edelay=1 auto=off bin=off group=0
#> set port range= 2 dest=0.0.0.0 dport=0
#> set port range= 3 dev=prn sess=4 termtype=vt100 uid=0 edelay=1 auto=off bin=off group=0
#> set port range= 3 dest=0.0.0.0 dport=0
#> set port range= 4 dev=prn sess=4 termtype=vt100 uid=0 edelay=1 auto=off bin=off group=0
#> set port range= 4 dest=0.0.0.0 dport=0
#> set port range= 5 dev=prn sess=4 termtype=vt100 uid=0 edelay=1 auto=off bin=off group=0
#> set port range= 5 dest=0.0.0.0 dport=0
#> set port range= 6 dev=prn sess=4 termtype=vt100 uid=0 edelay=1 auto=off bin=off group=0
#> set port range= 6 dest=0.0.0.0 dport=0
#> set port range= 7 dev=prn sess=4 termtype=vt100 uid=0 edelay=1 auto=off bin=off group=0
#> set port range= 7 dest=0.0.0.0 dport=0
#> set port range= 8 dev=prn sess=4 termtype=vt100 uid=0 edelay=1 auto=off bin=off group=0
#> set port range= 8 dest=0.0.0.0 dport=0
#> set port range= 9 dev=prn sess=4 termtype=vt100 uid=0 edelay=1 auto=off bin=off group=0
#> set port range= 9 dest=0.0.0.0 dport=0
#> set port range=10 dev=prn sess=4 termtype=vt100 uid=0 edelay=1 auto=off bin=off group=0
#> set port range=10 dest=0.0.0.0 dport=0
#> set port range=11 dev=prn sess=4 termtype=vt100 uid=0 edelay=1 auto=off bin=off group=0
#> set port range=11 dest=0.0.0.0 dport=0
#> set port range=12 dev=prn sess=4 termtype=vt100 uid=0 edelay=1 auto=off bin=off group=0
#> set port range=12 dest=0.0.0.0 dport=0
#> set port range=13 dev=prn sess=4 termtype=vt100 uid=0 edelay=1 auto=off bin=off group=0
#> set port range=13 dest=0.0.0.0 dport=0
#> set port range=14 dev=prn sess=4 termtype=vt100 uid=0 edelay=1 auto=off bin=off group=0
#> set port range=14 dest=0.0.0.0 dport=0
#> set port range=15 dev=prn sess=4 termtype=vt100 uid=0 edelay=1 auto=off bin=off group=0
#> set port range=15 dest=0.0.0.0 dport=0
#> set port range=16 dev=prn sess=4 termtype=vt100 uid=0 edelay=1 auto=off bin=off group=0
#> set port range=16 dest=0.0.0.0 dport=0
#> set route net=0.0.0.0 mask=0.0.0.0 gateway=172.16.0.254 metric=1 wanname=ether
沒有解決問題,試試搜尋本站其他內容

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步瞭解 Akismet 如何處理網站訪客的留言資料