设为首页收藏本站language→→ 语言切换

鸿鹄论坛

 找回密码
 论坛注册

QQ登录

先注册再绑定QQ

查看: 4335|回复: 30
收起左侧

Juniper路由器基本命令及中文解

  [复制链接]
发表于 2013-2-21 16:07:58 | 显示全部楼层 |阅读模式
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 &#123
address 10.219.1.1/30;
&#125
[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&#123
unit 0;
&#125
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&#123
t3-0/2/0&#123
t3-options&#123
payload-scrambler;
&#125
&#125
&#125
no-payload-scrambler选项
interfaces&#123
so-0/1/0&#123
sonset-options&#123
no-payload-scrambler;
&#125
&#125
&#125
校验和
fcs32命令
interfaces&#123
so-0/1/0&#123
sonet-options&#123
fcs 32;
&#125
&#125
&#125
封装思科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>


                               
登录/注册后可看大图
该贴已经同步到 goodluck的微博
发表于 2013-2-21 17:14:11 | 显示全部楼层
沙发 2013-2-21 17:14:11 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-2-23 12:26:37 | 显示全部楼层
收藏一下
板凳 2013-2-23 12:26:37 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-2-24 15:12:00 | 显示全部楼层
地板 2013-2-24 15:12:00 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-3-4 09:19:54 | 显示全部楼层
看帖子的要发表下看法
5# 2013-3-4 09:19:54 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-3-4 16:31:01 | 显示全部楼层
6# 2013-3-4 16:31:01 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-3-6 22:42:17 | 显示全部楼层
写的蛮详细的哦~
7# 2013-3-6 22:42:17 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-3-27 17:02:19 | 显示全部楼层
8# 2013-3-27 17:02:19 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-5-4 11:37:34 | 显示全部楼层
9# 2013-5-4 11:37:34 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-6-29 11:43:31 | 显示全部楼层
好东西就要共享
10# 2013-6-29 11:43:31 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-7-22 20:37:01 | 显示全部楼层
天下有这样的好事
11# 2013-7-22 20:37:01 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-7-31 14:38:33 | 显示全部楼层
好帖子
12# 2013-7-31 14:38:33 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-9-25 22:49:31 | 显示全部楼层
13# 2013-9-25 22:49:31 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-10-18 10:58:52 | 显示全部楼层
14# 2013-10-18 10:58:52 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2014-1-20 14:46:12 | 显示全部楼层
顶。感谢楼主分享
15# 2014-1-20 14:46:12 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2024-3-28 22:21 , Processed in 0.093372 second(s), 8 queries , Redis On.  

  Powered by Discuz!

  © 2001-2024 HH010.COM

快速回复 返回顶部 返回列表