Console Switch – Digi PortServer

什麼是 Console Switch ,有些設備(通常是沒有 VGA 輸出的裝置,如 switch , Storage …)提供 Console 介面用以提供初次設定或是使用指令介面.但如果是實驗室或是大型機房,不可能找到這麼多電腦有 console (tty 或是 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
# 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 (解鎖 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
沒有解決問題,試試搜尋本站其他內容

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *

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