JUNOS學習筆記,基本命令及中文解

root@host% 根用戶的shell提示符
user@host> 運行模式CLI提示符
user@host# 配置模式提示符 configure進入配置模式
lci 進入CLI
補全 空格
? 查詢命令
show interface terse 查看接口
show interface terse | except fe- 查看除fe-的接口
show interface terse | match se-3 只查看se-3接口
show interface | last 顯示上一屏數據
show interfaces terse | count 顯示輸出行數
show interfaces lo0 | display set 結果通道
edit system
set host-name host
set domain-name example.com
set root-authentication plain-text-password
unit number 單元被用來標識物理接口的邏輯部分
circuit identifier 電路標識則是指邏輯隧道和電路
show log file-name 顯示日誌文件內容 show syslog 系統日誌
頂層配置元素
system:包括系統通用管理參數(主機名,驗證信息,訪問方式,日誌等)
interfaces:接口配置
protocols:路由協議配置
policy-options:路由策略配置
firewall:無狀態數據包過濾器和策略器
snmp:SNMP配置
排他鎖配置
configure exclusive 確保其他用戶能進行修改
configure private 可爲用戶提供他們自己的候選配置
[edit] 頂級編輯模式
lab@J-9# edit interfaces se-1/0/0
[edit interfaces se-1/0/0]接口se-1/0/0編輯模式
lab@J-9#edit unit 0
[edit interfaces se-1/0/0 unit 0]接口0編輯模式
lab@J-9#set family inet address 10.210.1.1/30 設置IP地址
[edit interfaces se-1/0/0 unit 0]
lab@J-9#show
family inet {
address 10.219.1.1/30;
}
[edit interfaces se-1/0/0 unit 0]
lab@J-9#delete family inet address 10.210.1.1/30
[edit interfaces se-1/0/0 unit 0]
lab@J-9#show
family inet;
[edit interfaces se-1/0/0 unit 0]
lab@J-9#delete family inet 刪除family inet,在接口上禁止所有IPv4處理
所有信息都刪除
[edit interfaces se-1/0/0 unit 0]
lab@J-9#show
[edit interfaces se-1/0/0 unit 0]
lab@J-9#
[edit interfaces se-1/0/0 unit 0]
lab@J-9#up 進入上一層
[edit interfaces se-1/0/0]
lab@J-9#top 返回頂層
[edit]
lab@J-9#set interfaces se-1/0/0 unit 0 family inet address 10.210.1.1/30 在頂層設置IPv4地址
[edit]
lab@J-9#delete interfaces se-1/0/0 unit 0 family inet address 10.210.1.1/30 在頂層刪除IPv4地址
[edit]
lab@J-9#show interfaces 可分層查看
se-1/0/0{
unit 0;
}
run show interface terse run命令允許你在配置模式下執行操作的命令
set neighbor 192.168.1.1 配置一個新鄰居
deactivate neighbor 192.168.1.1 停用此鄰居
activate neighbor 192.168.1.1 激活此鄰居
deactivate group internal 停用整個組
deactivate bgp 停用整個協議


把對fe-2/0/1的配置移到fe-2/0/0
rename interfaces fe-2/0/1 to fe-2/0/0

commit備份配置變成活動配置
copy interfaces fe-2/0/1 to fe-3/0/1 拷貝配置
rename address 10.14.243.238/28 to address 10.14.250.1/28重命名地址

rollback n 恢復以前的配置
版本號範圍是0到49,最近保存的版本號是0,就是當前活動配置的拷貝,最老的配置自動保存在版本49中

set unit 240 family inet address 10.14.250.17/28 primary
設10.14.250.17/28爲主IP
commit check 檢查修改,而無需實際提交修改
commit at 23:00 在將來每一計劃提交
commit confirmed 1 在一分鐘的時間內確認修改,否則將撤銷修改
commit and-quit 在確定修改的同時,執行有權限的模式
rollback 撤銷修改
rollback 顯示已保存文件名列表
show | compare rollback 2 比較候選配置和先前配置
rollback 2 載入已保存的配置
fe 快速以太網接口
ge 千兆以太網接口
so SONET接口
t3 DS3 接口
ct3-0/2/3
FPC 0/PIC 2/端口3 (端口從0開始計數)
fxp0:帶外快速以太網接口,用於管理M系列和T系列路由器
inet:IPv4配置
inet6:IPv6配置
mpls:MPLS配置
show interfaces fe-2/0/1 extensive | find Auton 查看自動協商速度
set speed 100m 設速度100
set link-mode full-duplex 設爲雙工
set gigether-options auto-negotiation 自動協商
set gigether-options flow-control 自動流控
設VLAN
set vlan-tagging
set unit 201 vlan-id 301
set unit 201 family inet address 172.16.1.1/24
聚合以太網

set interfaces fe-3/0/0 unit 0 proxy-arp 啓用代理arp
啓用路由器對迴環請求進行相應
t3-options feac-loop-respond
或t1-options remoto-lookback-respond
擾碼
payload-scrambler選項
interfaces{
t3-0/2/0{
t3-options{
payload-scrambler;
}
}
}
no-payload-scrambler選項
interfaces{
so-0/1/0{
sonset-options{
no-payload-scrambler;
}
}
}
校驗和
fcs32命令
interfaces{
so-0/1/0{
sonet-options{
fcs 32;
}
}
}
封裝思科HDLC
set encapsulation cisco-hdlc
刪除思科HDLC封裝
delete encapsulation cisco-hdlc
使用PPP封裝,並同時採用兩種壓縮
set ppp-options comprssion acfc pfc
封裝PPP
set encapsulation ppp
接口狀態
show interfaces descriptions
接口IP地址和狀態
show interfaces terse
show interfaces fe-2/0/1 brief
show interfaces fe-2/0/1
show interfaces fe-2/0/1 detail
show interfaces fe-2/0/1 extensive
要獲得串行鏈路的線路信息,請使用詳細信息標記
要獲得第二層鏈路錯誤信息,需要使用extensive
查看特定IP協議
show route
show bgp summary
show bgp neighbor
show ospf
路由優先值
直接 0
本地 0
靜態 5
OSPF內部 10
RIP 100
聚合 130
OSPF AS 外部 150
BGP(包括EBGP和IBGP) 170

查看隱藏路由
show route hidden
擦看隱藏路由擴展信息
show route hidden extensive
show route 172.17.24.0/21
查看路由
show route 172.17.24.0/21 exact
查看路由詳細信息
show route 172.17.24.0/21 exact detail
show route 172.17.24.0/21 exact extensive

查看路由器已經接受的路由
show route receive-protocol bgp 10.14.243.254
查看如何修改默認路由的下一躍點
show route receive-protocol bgp 10.14.243.254 hidden 0/0 exact extensive
查看正在發送那些路由
show route advertising-protocol bgp 10.14.243.254
查看自動安裝是否在運行
show system autoinstallation status
Tracing=debug (cisco)
clear log filename 清除日誌和追蹤文件
file delete filename 刪除日誌和追蹤文件
show system storage 查看系統存儲空間
show route protocol static 查看協議路由
【OSPF】
set area 2 stub 創建stub區域
set area 3 nssa 創建not-so-stubby區域
發送默認路由到兩者
set area 2 stub default-metric 1
set area 3 nssa default-lsa default-metric 1
set area 0 interface fe-0/0/1.0 在0號區域添加一個端口
area 2= area 0.0.0.2
set area 2 interface fe-2/0/0.0 passive 配置在被動形式下運行
set area 2 interface fe-0/0/0.0 metric 200 將度量值配置成200
show | no-more=show run(cisco)
show ospf database=show ip ospf database(cisco)類似只要把cisco中的ip去掉
show ospf interface
show ospf interface fe-0/0/1.0 extensive 查看ospf接口詳細信息
show ospf neighbor 查看ospf鄰居信息
show route protocol ospf 從ospf中得到了那些路由
【BGP】
set auotonomous-system 65432 配置自動系統號
show bgp summary
show bgp neighbor 10.19.23.17
show route receive-protocol bgp <neighbour ip>
show route advertising-protocol bgp <neighbor ip address>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章