alanhc
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- title: serial over lan hackmd: url: https://hackmd.io/YCvG3CJFSAmUFEWuB_doHA title: serial over lan lastSync: 2025-06-05T05:54:53.556Z --- ## 什麼是 SoL? - **Serial over LAN** 是一種技術,允許使用者透過網路(通常是 Ethernet)來**遠端存取主機的序列埠(Serial Port)**,也就是說SoL是將傳統串列埠資料轉封包,經網路傳送,再還原為串列資料的過程。 ## 爲什麼需要 SoL? - 傳統串列埠(如 RS-232)需直接接線,非常不方便遠端操作。 - BMC(Baseboard Management Controller)透過 SoL: - 在作業系統開機前也能觀察主機輸出(BIOS/UEFI/Post)。 - 可搭配 IPMI 或 Redfish 管理介面啟用/停止 SoL。 - 達到「無人值守的伺服器管理」。 ## Components |組件|本質角色|解釋| |---|---|---| |主機 COM1|實體輸出|主機 BIOS/OS 的序列輸出通常連到此| |BMC UART|中繼橋接|BMC 接收主機 UART 資料| |IPMI LAN|傳輸媒介|BMC 將 UART 資料轉封包送往管理者| |管理端|控制台|使用 `ipmitool sol activate` 之類指令遠端接收輸出| ## SoL 封包走向 ``` +--------------------------------------+ | 主機 UART (串列埠 COM) | +--------------------------------------+ | | UART 字元流 (bytes) V +--------------------------------------+ | BMC UART 接收緩衝區 | | 將 bytes 包裝成 IPMI 封包 (RMCP+ UDP) | +--------------------------------------+ | | UDP/IP 封包 (IPMI SoL payload) V +--------------------------------------+ | 遠端管理者 IPMI Console (ipmitool) | | 將封包還原成 UART 字元 | +--------------------------------------+ ``` ## 封包格式(IPMI v2.0) - SoL 是使用 **RMCP+(Remote Management Control Protocol)封包**,透過 UDP port `623`。 - 封包內包含: - `Payload Type = SerialOverLan` - `Sequence Number` - `Data`:真實的串列字元 - `ACK/NACK`:可靠傳輸確認 ## 常見 `ipmitool` 指令 | 指令 | 功能 | | ------------------------------------------------------------------ | --------------- | | `ipmitool -I lanplus -H <BMC_IP> -U <user> -P <pw> sol info` | 查看 SoL 狀態 | | `ipmitool -I lanplus -H <BMC_IP> -U <user> -P <pw> sol activate` | 啟用 SoL,進入串列監控畫面 | | `ipmitool -I lanplus -H <BMC_IP> -U <user> -P <pw> sol deactivate` | 關閉 SoL | | `ipmitool sol set timeout 15` | 設定閒置 timeout | | `ipmitool sol set privilege-level admin` | 設定存取權限 | ## 常見使用場景(Usecases) | Usecase | 解釋 | | -------------------- | ---------------------------------------------- | | ✅ 遠端開機畫面觀察 | BIOS/POST 階段出現錯誤可即時察看 | | ✅ OS kernel panic 偵錯 | 如果有串列 console 輸出,可保留錯誤紀錄 | | ✅ 安裝 OS 時遠端互動 | Debian / CentOS / Ubuntu netinstall 可以完全透過 SoL | | ✅ 偵錯無法登入的系統 | 無 SSH 時仍可存取 Console 觀察 | | ✅ 無人值守測試 | 搭配 PXE boot + SoL 可自動部署伺服器 | ## 延伸 | 概念 | 說明 | | -------------------------- | ----------------------------------------------- | | **Console Redirection** | BIOS 設定,允許將畫面輸出轉導到串列埠 | | **IPMI v2.0** | 所有 SoL 操作依據 IPMI v2.0 中 SerialOverLAN 指令定義 | | **Redfish ConsoleService** | 現代 BMC 支援透過 Redfish 取代 IPMI SoL(如 WebSocket 串流) |

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully