3C科技 娛樂遊戲 美食旅遊 時尚美妝 親子育兒 生活休閒 金融理財 健康運動 寰宇綜合

Zi 字媒體

2017-07-25T20:27:27+00:00
加入好友
邊做邊學,順便留個筆記,若有錯誤請不吝指教。 Junos基本操作及root密碼設定可參考我之前的文章:Juniper Junos基本操作、root密碼設定 所有Juniper相關文章列表:Juniper JunOS 系列文章列表 要在Juniper的介面上設定IP,需要在介面上設定family為inet。 如果你要設定的介面上已經有一個family ethernet-switching的設定請把它刪掉,因為一個介面不能同時具備Routing介面及Switching介面的特性: root@10.0.0.2# delete interfaces ge-0/0/23 unit 0 family ethernet-switching 進入設定模式後使用下列指進入要設定IP的介面下進行編輯: root@10.0.0.2# edit interfaces ge-0/0/23 unit 0 接著使用set address指令進行IP設定: {master:0}[edit interfaces ge-0/0/23 unit 0] root@10.0.0.2# set family inet address 10.0.0.2/30 Juniper在IP設定的遮罩部分是直接使用/來標示,如上方之設定即為IP:10.0.0.2 遮罩:255.255.255.252。 設定完成記得要commit才會生效,更多關於commit指令的內容可以參考:Juniper Junos提交設定(commit) 回到命令模式我們可以用指令查看該介面狀態: root@10.0.0.2> show interfaces terse ge-0/0/23 Interface Admin Link Proto Local Remote ge-0/0/23 up down ge-0/0/23.0 up down inet 10.0.0.2/30 我們可以看到已經成功在介面上設定IP了,不過介面的Link仍然是down的狀態,這裡我在另外一台Switch上做了10.0.0.1的IP,並用網路線將它們串起。再次查看介面狀態可以看到Link已經轉換成up了。 root@10.0.0.2> show interfaces terse ge-0/0/23 Interface Admin Link Proto Local Remote ge-0/0/23 up up ge-0/0/23.0 up up inet 10.0.0.2/30 這時候可以嘗試去ping對端的IP確認IP設定無誤。 root@10.0.0.2> ping 10.0.0.1 PING 10.0.0.1 (10.0.0.1): 56 data bytes 64 bytes from 10.0.0.1: icmp_seq=0 ttl=64 time=22.719 ms 64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=16.587 ms 64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=24.632 ms 64 bytes from 10.0.0.1: icmp_seq=3 ttl=64 time=21.865 ms

本文由KerKerwebsite提供 原文連結

寫了 5860316篇文章,獲得 23313次喜歡
精彩推薦