2015年1月26日 星期一

Linux and Mac OS use serial port on virtualbox

由於使用多個系統加上又要用virtualbox來練習lab,因為virtualbox好像不會自己增加一個虛擬網卡,所以不像在windows系統可以互綁ip來透通,所以只好使用連接serial port的方式來連入。

Linux方式:
須先安裝screen

socat UNIX-CONNECT:/tmp/pipe_junos PTY,link=/tmp/pty & screen /tmp/pty

這樣就會有cosole畫面了


OSX的方式:
先安裝xcode
我使用iterm當terminal軟體
socat -d -d /tmp/pipe_Olive PTY
紅色部分為在virtualbox定義的名稱,這邊要打入你自己定義的才是。

lizhengyudeMBP:~ Chris$ socat -d -d /tmp/pipe_Olive PTY2015/01/27 10:33:26 socat[3332] N opening connection to LEN=17 AF=1 "/tmp/pipe_Olive"
2015/01/27 10:33:26 socat[3332] N successfully connected from local address LEN=16 AF=1 ""
2015/01/27 10:33:26 socat[3332] N successfully connected via
2015/01/27 10:33:26 socat[3332] N PTY is /dev/ttys001
2015/01/27 10:33:26 socat[3332] N starting data transfer loop with FDs [3,3] and [4,4]

然後再開另一個視窗,打入以下命令
screen /dev/ttys001
(黃底部分文字要一致)
就可以有console畫面了