Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Junos OS CLI 如何映射到 Cisco IOS

常见 Junos OS CLI 命令如何映射到 Cisco IOS 命令。

Junos OS 整合了跨网络操作系统通用的标准网络功能。Junos OS CLI 使用自己独特的基于层次结构的语法对网络功能进行逻辑分组。借助这种一致的语法,您可以轻松识别自己在设备上的位置、找到所需的内容、在界面上移动以及输入命令。

Junos OS 的新用户通常熟悉 Cisco IOS 操作系统。下表显示了常见的 Junos OS CLI 配置语句和命令及其 Cisco IOS 等效命令:

Junos OS 命令 Cisco IOS 等效产品 Junos OS 命令说明

commit

write memory

完成并应用配置更改。

configure

configure terminal

从操作模式切换到配置模式。

set system host-name name

hostname name

设置设备主机名。

set system domain-name name

ip domain-name name

配置 DNS 域名。

show configuration

show running-config

显示活动配置。

show interfaces terse

show ip interface brief

提供所有接口的汇总状态。

edit interfaces interface

interface interface

输入指定接口的配置层次结构。

set interfaces interface unit number family inet address address

ip address address

在接口上配置 IPv4 地址

必须指定诸如 unit 0 此类的逻辑单元。

show version

show version

显示软件版本、型号和其他系统信息。

set system root-authentication plain-text-password

enable secret password

设置 root 用户的密码。

set system login user name class super-user authentication plain-text-password

username name privilege 15 secret password

创建具有超级用户权限和密码的本地用户帐户。

request system reboot

reload

触发系统重新启动。

show system uptime

show clock

显示当前时间和系统正常运行时间。

set date date-time

clock set

手动设置系统日期和时间。

set system time-zone time-zone

clock timezone

配置时区。

show chassis hardware

show inventory

显示设备中安装的硬件组件。

show chassis environment

show environment

显示环境状况。

show system processes extensive

show processes cpu

show processes memory

显示详细的进程列表,包括 CPU 和内存使用情况。

show system users

show users

列出当前登录的用户及其会话。

show log messages

show logging

显示系统日志消息文件。

monitor start messages

terminal monitor

开始将实时系统日志消息文件流式传输到您的终端。

monitor stop

terminal no monitor

停止监控终端上的日志。

set cli screen-length 0

terminal length 0

禁用分页,以便在没有提示的情况下显示长 ---(more)--- 输出。

start shell

terminal shell

退出 CLI 环境并创建一个 UNIX 级别的 shell。

request support information

show tech-support

生成包含配置、日志和硬件信息的全面支持信息快照。

file copy source destination

copy source destination

将文件从一个位置复制到另一个位置。

save configuration file

copy running-config tftp://server/file

将当前候选配置保存到文件中

set interfaces name description text

description text

设置接口的文本说明。

set interfaces name disable

shutdown

以管理方式禁用该接口。

show interfaces terse

show ip interface brief

显示接口的单行摘要。

show interfaces descriptions

show interfaces description

列出所有接口及其管理配置的说明和状态。

clear interfaces statistics

clear counters

清除接口流量统计信息计数器。

ping address rapid

ping address

向主机发送 ICMP 回显请求。该 rapid 选项在收到响应后立即发送 ping。

traceroute address

traceroute address

逐跳跟踪路由到主机。

show arp

show ip arp

显示 ARP 表。

clear arp

clear arp-cache

清除 ARP 缓存。

show lldp neighbors

show cdp neighbors

显示通过 LLDP 发现的邻接方。

set protocols lldp interface all

lldp run

在所有接口上启用 LLDP。

set system services telnet

line vty 0 4 transport input telnet

启用 Telnet 服务。

load factory-default

write erase

将设备配置重置为出厂默认设置。

set vlans name vlan-id id

vlan id name name

创建包含 ID 和名称的 VLAN。

set protocols rstp

spanning-tree mode rapid-pvst

启用快速生成树协议。

set protocols rstp interface interface1 edge

spanning-tree portfast

将接口配置为 RSTP 边缘端口。

show ethernet-switching table

show mac address-table

显示第 2 层转发表。

clear ethernet-switching table

clear mac address-table dynamic

清除以太网交换表中的动态条目。

set routing-options static route destination-prefix next-hop address

ip route

配置静态路由。

set protocols ospf area area interface interface

router ospf id network address wildcard area area

启用 OSPF。

set protocols ospf area area interface interface passive

passive-interface interface

将 OSPF 接口设置为被动接口。

set protocols ospf router-id id

router-id id (在 OSPF 路由器配置下)

配置 OSPF 路由器 ID。

show ospf neighbor

show ip ospf neighbor

显示 OSPF 邻接方关系。

show ospf database

show ip ospf database

显示 OSPF 链路状态数据库。

show ospf interface

show ip ospf interface

显示 OSPF 接口状态和参数。

set routing-options autonomous-system as-number

router bgp as-number

设置本地 BGP 自治系统编号。

set protocols bgp group name neighbor address peer-as as-number

neighbor address remote-as as-number

配置 BGP 邻接方。

show bgp summary

show ip bgp summary

显示 BGP 邻接方状态摘要。

show bgp neighbor

show ip bgp neighbors

显示有关 BGP 邻接方的详细信息。

show route protocol bgp

show ip bgp

显示通过 BGP 获知的路由表条目。

show route advertising-protocol bgp neighbor-address

show ip bgp neighbors neighbor-address advertised-routes

显示正在播发至特定 BGP 邻接方的路由。

clear bgp neighbor neighbor-address

clear ip bgp neighbor-address

清除与给定邻接方的 BGP 会话。

show isis adjacency

show clns neighbors

显示 IS-IS 邻居关系。

set firewall family family-name filter filter-name term term-name from source-address address then discard

access-list number deny address wildcard any

定义丢弃特定地址流量的防火墙过滤器。

set interfaces interface unit number family family-name filter input filter-name

ip access-group number in

将防火墙过滤器应用于接口的输入方向。

set snmp community name authorization read-only

snmp-server community name RO

定义具有只读访问权限的 SNMP 社区。

set snmp location "location"

snmp-server location location

设置 SNMP 系统位置字符串。

set snmp contact contact

snmp-server contact contact

设置 SNMP 联系信息。

set system ntp server address prefer

ntp server address prefer

配置 NTP 服务器以实现时间同步。

set system syslog host address

logging host address

将系统日志消息发送到指定的远程系统日志服务器。

ping address interface interface

ping address source interface

指定 ping 的源接口。

show cli history

show history

显示当前 CLI 会话的命令历史记录。

delete interfaces interface unit number family family address address

no ip address address

从接口中删除 IP 地址。

set routing-instances name instance-type vrf

ip vrf name

创建新的 VRF 路由实例。

set policy-options prefix-list name address

ip prefix-list name permit address

定义前缀列表。

show route forwarding-table

show ip cef

显示转转发表 (FIB)。

set interfaces interface ether-options no-auto-negotiation

no negotiation auto

禁用以太网自动协商

set interfaces interface-range name member-range interface to interface

interface range interface-range

将一系列相同的接口分组到一个接口范围中。

annotate statement comment

!

向配置中的语句添加注释。

rollback number

configure replace

将配置恢复为之前的版本。

request system software add package

copy tftp flash

安装软件更新包。

request system logout user

clear line number

强制注销已登录用户。

commit confirmed minutes

reload in minutes

使用回滚计时器提交配置。