博威---云架构决胜云计算

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3898|回复: 7

JUNOS学习笔记,基本命令及中文解释(原创)

[复制链接]
发表于 2008-1-13 07:44:48 | 显示全部楼层 |阅读模式
JUNOS学习笔记,基本命令及中文解释(原创)JUNOS学习笔记(原创)

[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>
 楼主| 发表于 2008-1-13 07:45:03 | 显示全部楼层
JUNOS学习笔记,基本命令及中文解
[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>
发表于 2008-1-25 15:48:20 | 显示全部楼层
还是原创好!
发表于 2008-5-17 22:28:03 | 显示全部楼层

juniper比cisco功能和性能都强!
发表于 2008-5-18 15:59:09 | 显示全部楼层

爱死你了

爱死你了,这么好的帖子

-------------------------
pet supply webpage: pet supply, Pet products,Dog carrier, archlord gold webpage: archlord gold, lineage2 adena,
发表于 2008-11-24 21:42:05 | 显示全部楼层
好东西
发表于 2009-8-11 11:45:24 | 显示全部楼层
谢谢楼主分享!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|boway Inc. ( 冀ICP备10011147号 )

GMT+8, 2024-5-4 08:38 , Processed in 0.091789 second(s), 16 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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