熱門分類
 載入中…
目錄

Juniper 初始設定教學:密碼、介面、路由、測試與備份還原全流程

    🧩 Juniper 初始設定與基本測試教學

    本篇說明 Juniper Junos OS 設備在首次啟用後的基本設置流程, 包含密碼修改、介面設定、Ping 測試與路由配置、以及設定檔備份與還原方式。 適用於 EX、SRX、MX 系列設備。


    🔐 1️⃣ 設定 Root 密碼

    進入設定模式:

    cli
    configure
      

    設定 Root 使用者密碼:

    set system root-authentication plain-text-password
    New password: ********
    Retype new password: ********
    commit
      

    💡 提醒:密碼輸入時不會顯示任何符號,屬正常現象。


    🌐 2️⃣ 設定網路介面 IP

    假設要設定 em1 為 LAN 介面,IP 為 192.168.20.254/24

    set interfaces em1 unit 0 family inet address 192.168.20.254/24
    commit
      

    確認介面狀態:

    show interfaces terse
      

    應可看到:

    em1.0 up up inet 192.168.20.254/24
      

    📡 3️⃣ Ping 測試(同網段)

    從 Juniper 測試連線到同網段設備(如 PC):

    ping 192.168.20.10
      

    若出現回應:

    64 bytes from 192.168.20.10: icmp_seq=0 ttl=64 time=1.2 ms
    --- 192.168.20.10 ping statistics ---
    1 packets transmitted, 1 packets received, 0% packet loss
      

    表示 LAN 連線正常。


    🛣️ 4️⃣ 設定靜態路由(通往其他網段)

    若要讓 Juniper 能連到外部網段,例如 192.168.10.0/24 經由 192.168.20.1:

    set routing-options static route 192.168.10.0/24 next-hop 192.168.20.1
    commit
      

    檢查路由表:

    show route
      

    應能看到目標路由條目:

    192.168.10.0/24 *[Static/5] 00:01:32
    >  via 192.168.20.1, em1.0
      

    🌍 5️⃣ Ping 測試(其他網段)

    確認跨網段連線是否正常:

    ping 192.168.10.100
      

    若可回應,代表靜態路由設置正確;若失敗,可檢查對方網段是否有回程路由。


    💾 6️⃣ 設定檔備份與還原

    將目前設定匯出為備份檔:

    file show /config/juniper.conf.gz
    file copy /config/juniper.conf.gz /var/tmp/backup.conf.gz
    file copy /config/juniper.conf.gz scp://user@192.168.20.10:/backup/
      

    若要從備份還原設定:

    load override /var/tmp/backup.conf.gz
    commit
      

    💡 提醒:使用 override 為完全覆蓋方式,若僅要合併可使用 merge


    ✅ 小結

    • 🔑 先設定 Root 密碼確保安全。
    • 🌐 設定管理介面 IP 以便遠端連線。
    • 📡 使用 Ping 測試同網段與跨網段連線狀況。
    • 🛣️ 靜態路由可讓不同子網互通。
    • 💾 定期備份設定檔以防止遺失。

    📚 參考資料

    — WWFandy・網路設備初始設定筆記

    🔗 分享這篇 LINE Facebook X

    沒有留言:

    張貼留言

    字級