免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1033 | 回复: 1
打印 上一主题 下一主题

JUNOS学习笔记,基本命令及中文解(转) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-05-06 10:07 |只看该作者 |倒序浏览
[email=root@host%]root@host%[/email]  根用户的shell提示符
[email=user@host]user@host[/email]>  运行模式CLI提示符
[email=user@host]user@host[/email]#  配置模式提示符   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] 顶级编辑模式
[email=lab@J-9]lab@J-9[/email]# edit interfaces se-1/0/0
[edit interfaces se-1/0/0]接口se-1/0/0编辑模式
[email=lab@J-9#edit]lab@J-9#edit[/email] unit 0
[edit interfaces se-1/0/0 unit 0]接口0编辑模式
[email=lab@J-9#set]lab@J-9#set[/email] family inet address 10.210.1.1/30 设置IP地址  
[edit interfaces se-1/0/0 unit 0]
[email=lab@J-9#show]lab@J-9#show[/email]
family inet {
        address 10.219.1.1/30;
}
[edit interfaces se-1/0/0 unit 0]
[email=lab@J-9#delete]lab@J-9#delete[/email] family inet address 10.210.1.1/30
[edit interfaces se-1/0/0 unit 0]
[email=lab@J-9#show]lab@J-9#show[/email]
family inet;
[edit interfaces se-1/0/0 unit 0]
[email=lab@J-9#delete]lab@J-9#delete[/email] family inet 删除family inet,在接口上禁止所有IPv4处理
所有信息都删除
[edit interfaces se-1/0/0 unit 0]
[email=lab@J-9#show]lab@J-9#show[/email]
[edit interfaces se-1/0/0 unit 0]
[email=lab@J-9]lab@J-9[/email]#
[edit interfaces se-1/0/0 unit 0]
[email=lab@J-9#up]lab@J-9#up[/email]    进入上一层   
[edit interfaces se-1/0/0]
[email=lab@J-9#top]lab@J-9#top[/email]   返回顶层
[edit]
[email=lab@J-9#set]lab@J-9#set[/email] interfaces se-1/0/0 unit 0 family inet address 10.210.1.1/30  在顶层设置IPv4地址
[edit]
[email=lab@J-9#delete]lab@J-9#delete[/email] interfaces se-1/0/0 unit 0 family inet address 10.210.1.1/30   在顶层删除IPv4地址
[edit]
[email=lab@J-9#show]lab@J-9#show[/email] 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>

论坛徽章:
0
2 [报告]
发表于 2009-05-06 11:04 |只看该作者
这些只有高手能读懂啊,咱还没有通过认证考试那!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP