juniper EX系列交换机 CLI命令行操作模式

news2024/9/21 12:41:21

JUNOS有两种模式:操作模式和配置模式。

1,操作模式

监控和排错 软件,网络连接、路由器硬件。

2,配置模式

test@lab2>

配置路由器包括:interface、路由信息、路由协议、用户访问、系统硬件参数。

test@lab2> configure

[edit]

test@lab2#

操作模式

(1)命令层次

(2)主要命令

{master}

lab@ex4200-vc> ?

Possible completions:

  clear                Clear information in the system

  configure            Manipulate software configuration information

  file                 Perform file operations

  help                 Provide help information

  monitor              Show real-time debugging information

  mtrace               Trace multicast path from source to receiver

  op                   Invoke an operation script

  ping                 Ping remote target

  quit                 Exit the management session

  request              Make system-level requests

  restart              Restart software process

  set                  Set CLI properties, date/time, craft interface message

  show                 Show system information

  ssh                  Start secure shell on another host

  start                Start shell

  telnet               Telnet to another host

  test                 Perform diagnostic debugging

  traceroute           Trace route to remote host

{master}

lab@ex4200-vc>    

(3)可以配合使用下列管道符号 |

  compare              Compare configuration changes with prior version

  count                Count occurrences

  display              Show additional kinds of information

  except               Show only text that does not match a pattern

  find                 Search for first occurrence of pattern

  hold                 Hold text without exiting the --More-- prompt

  last                 Display end of output only

  match                Show only text that matches a pattern

  no-more              Don't paginate output

  request              Make system-level requests

  resolve              Resolve IP addresses

  save                 Save output text to file

  trim                 Trim specified number of columns from start of line

(4)使用set cli 命令设置 cli 环境

{master}

lab@ex4200-vc> set cli ?

Possible completions:

  complete-on-space    Set whether typing space completes current word

  directory            Set working directory

  idle-timeout         Set maximum idle time before login session ends

  prompt               Set CLI command prompt string

  restart-on-upgrade   Set whether CLI prompts to restart after software upgrade

  screen-length        Set number of lines on screen

  screen-width         Set number of characters on a line

  terminal             Set terminal type

  timestamp            Timestamp CLI output

{master}

(5)编辑环境在VT-100

(6)空格键功能

lab@ex4200-vc> show i     

                     ^

'i' is ambiguous.

Possible completions:

  igmp                 Show Internet Group Management Protocol information

  igmp-snooping        Show IGMP snooping information

  ike                  Show Internet Key Exchange information

  interfaces           Show interface information

  ipsec                Show IP Security information

  isis                 Show Intermediate System-to-Intermediate System information

(7)?号命令提示

lab@ex4200-vc> ?

Possible completions:

  clear                Clear information in the system

  configure            Manipulate software configuration information

  file                 Perform file operations

  help                 Provide help information

  monitor              Show real-time debugging information

  mtrace               Trace multicast path from source to receiver

  op                   Invoke an operation script

  ping                 Ping remote target

  quit                 Exit the management session

  request              Make system-level requests

  restart              Restart software process

  set                  Set CLI properties, date/time, craft interface message

  show                 Show system information

  ssh                  Start secure shell on another host

  start                Start shell

  telnet               Telnet to another host

  test                 Perform diagnostic debugging

  traceroute           Trace route to remote host

配置模式

(1) 进入配置模式

root@lab2> configure

Entering configuration mode

[edit]

root@lab2#

example:

root@lab2#set system services ftp

system {

services {

ftp;

}

}

(2) 配置模式层次

(3)使用edit 命令类似于cd 命令

使用edit chassis alarm ethernet 可以直接在ethernet 这一级操作而不需要 set chassis alarm Ethernet 操作。

(4) 使用up 和top 命令

user@host# up

[edit chassis alarm]

user@host# top

[edit]

(5)显示Candidate 配置

[edit]

user@host# show chassis alarm

user@host# edit chassis alarm

[edit chassis alarm]

user@host# show

 [edit chassis alarm]

(6)区分配置文件

 比较Candidate 与active 配置的区别

[edit chassis]

user@host# show | compare

alarm {

xxx {

+ xxx xxx

- xxx xxx;

}

}

其它选项

user@host# show | compare filename

user@host# show | compare rollback number

(7)配置的差异更新

root@router# show | compare

[edit interfaces]

[edit]

root@router# show | compare | save /var/tmp/patch.cfg

Wrote 9 lines of output to '/var/tmp/patch.cfg'

[edit]

root@router# load patch /var/tmp/patch.cfg

load complete

(8)删除配置

[edit]

user@host# edit chassis alarm xxx

[edit chassis alarm xxxx]

user@host# delete xxx

[edit chassis alarm xxxx]

user@host# delete xxx

[edit chassis alarm xxxx]

user@host#

9)配置生效

 使用 commit 是配置生效。rollback 恢复配置。

ser@host#commit

and-quit 如果配置成功退出配置模式

at 在定义的时间后commit 配置

check 检测配置,不改变配置

confirmed 知道回滚等到下一个commit 模式是10 分钟

 rollback 恢复配置。系统默认9 个配置在 /config/ 3 个。file show /config/6 个

rollback 或rollback 0 就恢复到刚刚改变的配置

(10)配置模式层次改变。

 使用exit 退回到上一层配置模式

 使用exit configuration-mode 从任意层次退去配置模式

(11)保存加载配置文件

可以使用save filename 在任何配置模式保持这个层次的配置内容到一个指定存放位置便于下

一次load。

[edit]

cli# save filename

[edit]

cli#

 load (replace | merge | override)

replace 取代现有的配置并且配置正确

merge 合并配置

override 取代现有的配置

user@host# load merge /var/db/config/juniper.conf.4

 可以通过 show system storage 查看文件系统,或用file show <pathname>来查看。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1271443.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

音视频开发:音频fdk-aac编码

编码的大概流程见下图 1.获取编码器: avcodec_find_encoder_by_name("libfdk_aac") 2.检查PCM格式是否被编码器支持 3.创建编码上下文: AVCodecContext *ctx avcodec_alloc_context3(codec) 4.给上下文设置参数 5.打开编码器: avcodec_open2 6.创建AVFrame: a…

NoSQL 数据建模错误会降低性能

数据建模错误是破坏性能的最简单方法之一。当您使用 NoSQL 时&#xff0c;特别容易搞砸&#xff0c;&#xff08;讽刺的是&#xff09;NoSQL 往往用于对性能最敏感的工作负载。NoSQL 数据建模最初可能看起来非常简单&#xff1a;只需对数据进行建模以适应应用程序的访问模式。但…

SAP 如何检查已安装的SAP UI5 版本

第一个方法是直接从FLP中查看 但是部分高版本的FLP中没有这个about&#xff0c; 那么在当前界面可以使用&#xff1a;CTRL ALT SHIFT S 查看当前版本 根据此版本&#xff0c;去进行你的UI5的开发吧

字符串函数-C语言

介绍 字符串函数&#xff0c;简单说&#xff0c;就是处理字符串的函数&#xff0c;头文件是string.h&#xff0c;以下是今天的讲解中会讲到的一系列字符串函数 头文件&#xff1a;#include<string.h>strlen&#xff1a;求字符串长度strcpy&#xff1a;拷贝字符串strcat&…

物联网实训室虚拟仿真软件建设方案

一、概述 物联网实训室虚拟仿真软件旨在紧密围绕立德树人的根本任务&#xff0c;充分依托先进的数字技术&#xff0c;并对接物联网行业的发展趋势和人才需求。通过对比真实企业工作环境&#xff0c;融合创新创业教育基因&#xff0c;秉承虚拟仿真技术与教育教学深度融合的理念&…

艺海泛舟——尹星从艺六十年作品展暨学术交流首展作品(二)

简历&#xff1a; 1944年1月25日出生于山西省阳高县&#xff0c;内蒙古师范学院艺术系美术专业&#xff0c;师从水彩之父李剑晨&#xff0c;北京京华美术学院创立者邱石冥&#xff0c;徐坚。与吴冠中&#xff0c;朱德群&#xff0c;赵无极&#xff0c;杨飞云是同门。擅长&…

解决CentOS下PHP system命令unoconv转PDF提示“Unable to connect or start own listener“

centos系统下&#xff0c;用php的system命令unoconv把word转pdf时提示Unable to connect or start own listene的解决办法 unoconv -o /foo/bar/public_html/upload/ -f pdf /foo/bar/public_html/upload/test.docx 2>&1 上面这个命令在shell 终端能执行成功&#xff0c…

优测云服务平台- 探索性测试策略分享

版权声明&#xff1a;本文作者 优测团队测试专家 郑凯泽 南明玮。 探索性测试是对常规的系统测试、新需求测试及专项测试的重要补充&#xff0c;往往能在短时间内发现更多的问题&#xff0c;一起来看看优测测试专家的分享吧~ 一、背景 优测团队长期承接腾讯社交产品、办公产…

​在做接口测试的时候,如果接口还没有开发好,你这边应该怎么去介入测试?

&#x1f4e2;专注于分享软件测试干货内容&#xff0c;欢迎点赞 &#x1f44d; 收藏 ⭐留言 &#x1f4dd; 如有错误敬请指正&#xff01;&#x1f4e2;交流讨论&#xff1a;欢迎加入我们一起学习&#xff01;&#x1f4e2;资源分享&#xff1a;耗时200小时精选的「软件测试」资…

机械臂仿真之vrep如添加视觉传感器

基于视觉的机械臂作业任务&#xff0c;如何在vrep中加入视觉传感器&#xff0c;并获取画面&#xff1f;

【elementUI】el-tab相关问题

Tabs 标签页 分隔内容上有关联但属于不同类别的数据集合。 <template><el-tabs v-model"activeName" tab-click"handleClick"><el-tab-pane label"用户管理" name"first">用户管理</el-tab-pane><el-tab-p…

什么是云安全?如何制定云安全战略

云计算允许组织通过互联网按需向其客户、合作伙伴或员工提供关键业务应用程序、服务和资源&#xff0c;换句话说&#xff0c;不再需要物理维护资源&#xff0c;每当通过 Internet 从计算机访问文件或服务时&#xff0c;都是在访问云。 迁移到云可以帮助企业增强安全性、简化运…

zemax之初级像差理论与像差校正——球差

一、初级像差理论 1.1厚透镜初级像差 由于结构和机械强度的需要&#xff0c;任何光学透镜都具有一定厚度。对于正透镜其边缘厚度一般不应小于3mm&#xff1b;对于负透镜&#xff0c;中心厚度不应小于透镜孔径1/10~1/15&#xff0c;以防止安装和固定变形。 除此之外透镜的厚度…

为什么要在项目中使用TypeScript?

随着越来越多的开发人员采用TypeScript&#xff0c;人们需要了解在下一个项目中应该使用TypeScript的原因。尽管它在早期应用中遇到了一些阻力&#xff0c;但在过去十年&#xff0c;它迅速成为一种广泛使用的编程语言。 以下介绍如何使用TypeScript以及它给开发人员带来的一些好…

每日一练 | 华为认证真题练习Day140

1、如图所示&#xff0c;网络管理员希望将SWA与SWB之间的两条物理链路手工聚合成一条Eth-trunk链路&#xff1b;下列描述正确的是&#xff08;&#xff09;。 A. 不能被聚合 B. 聚合后可以正常工作 C. 可以聚合&#xff0c;聚合后只有GE端口能收发数据 D. 可以聚合&#xff…

选择合适的企业邮箱供应商的策略与技巧

如果您的公司是一个业务遍布全球的组织&#xff0c;选择合适的企业邮箱供应商将是一个重要的决策。 以下是在选择全球适用的企业邮箱供应商时应考虑的关键因素&#xff1a; 全球覆盖和数据中心位置&#xff1a;确保企业邮箱供应商在您业务遍及的国家和地区均具备良好的服务覆盖…

功能全面又强大的同步备份软件,你找到了吗?

随着企业规模的不断扩大&#xff0c;许多企业都会拥有自己的数据中心。因此每日员工都需要在服务器与服务中心之间调取文件&#xff0c;同时还需要对每日新增的业务数据进行实时同步。如果量比较小&#xff0c;一般问题不大&#xff1b;一旦数据比较大&#xff0c;量也比较大&a…

(Ant X6)子组件里的流程图画布无法显示

(Ant X6)子组件里的流程图画布无法显示 问题背景&#xff1a;侧导航页面都是子组件,建模页面的画布无法显示 解决前&#xff1a; 解决后&#xff1a; 解决思路&#xff1a;点击建模菜单时再次加载对应组件 在 Vue 中&#xff0c;每个组件都有一个唯一的 key 属性。当组件的 ke…

强化学习-DQN

网上看来很多&#xff0c;但是还是觉得这篇文章将得最好&#xff1a; 可视化强化学习解释 - Deep Q Networks&#xff0c;循序渐进 |Ketan Doshi 博客 (ketanhdoshi.github.io)

VirtualBox 7.0.8(虚拟机软件)

VirtualBox是一款开源的虚拟机软件&#xff0c;它是使用Qt编写&#xff0c;在Sun被Oracle收购后正式更名成Oracle VM VirtualBox。它可以在VirtualBox上安装并且执行Solaris、Windows、DOS、Linux、OS/2 Warp、BSD等系统作为客户端操作系统。使用者可以在VirtualBox上安装并且运…