juniper交换机基本操作手册

更新时间:2024-04-16 04:05:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

juniper交换机操作手册

信息中心网络产品开发部

一、Juniper管理界面说明: ....................................................................................................... 4 二、典型配置 .................................................................................................................................. 4

2.1系统配置模式典型配置.................................................................................................... 4

2.1.1 configure ............................................................................................................ 4 2.1.2 Monitor ................................................................................................................ 4 2.1.3 Ping ...................................................................................................................... 4 2.1.4 telnet .................................................................................................................. 5 2.1.5 Traceroute .......................................................................................................... 5 2.1.6 Restart ................................................................................................................ 5 2.1.7 Request ................................................................................................................ 5

2.1.7.1 系统重启 ................................................................................................... 5 2.1.7.2 保存救援配置 ........................................................................................... 5 2.1.7.3 系统软件升级: ....................................................................................... 5 2.1.8 Show ...................................................................................................................... 6

2.1.8.1查看系统硬件信息: ................................................................................ 6

2.1.8.1.1查看系统硬件警告: .................................................................... 6 2.1.8.1.2查看系统硬件环境信息 ................................................................ 6 2.1.8.1.3查看板卡cpu和内存情况 ............................................................ 7 2.1.8.1.4查看交换机硬件的注册及型号 .................................................... 7 2.1.8.1.5查看插槽具体信息 ........................................................................ 7 2.1.8.1.6查看路由引擎的CPU/内存/启动时间等信息: ......................... 7 2.1.8.2查看当前系统配置 .................................................................................... 8 2.1.8.3 查看poe口的供电情况: ....................................................................... 9 2.1.8.4 查看系统信息: ....................................................................................... 9

2.1.8.4.1查看系统备份配置 ...................................................................... 10 2.1.8.4.2 查看系统保存操作的基本信息 ................................................. 10 2.1.8.4.3 查看系统当前时间及启动时间 ................................................. 10 2.1.8.4.4查看系统传输层连接情况 .......................................................... 10 2.1.8.4.5查看系统进程占用资源情况 ...................................................... 11 2.1.8.4.6查看系统各类软件版本情况 ...................................................... 11

2.2管理配置模式典型配置.................................................................................................. 12

2.2.1配置模式介绍...................................................................................................... 12

2.2.1.1使用set命令 .......................................................................................... 12 2.2.1.2使用edit命令 ........................................................................................ 13 2.2.2 相关注意事项 ..................................................................................................... 13 2.2.3配置二层端口...................................................................................................... 14 2.2.4 配置三层端口 ..................................................................................................... 14 2.2.5配置基本接口参数: .......................................................................................... 15 2.2.6 vlan的相关配置................................................................................................ 15

2.2.6.1配置vlan................................................................................................. 15 2.2.6.2 将vlan部署到接口上 ........................................................................... 15 2.2.6.3配置三层vlan端口 ................................................................................ 16 2.2.6.4将三层vlan接口与vlan匹配 .............................................................. 16 2.2.7三层协议配置...................................................................................................... 16

2.2.7.1静态路由相关配置 .................................................................................. 16 2.2.7.2 OSPF协议相关配置 ................................................................................ 16

2.2.7.2.1 区域配置 ..................................................................................... 16 2.2.7.2.2 配置末节及nssa区域 ............................................................... 17 2.2.7.2.3 ospf类型配置 ............................................................................ 17 2.2.7.2.4 ospf邻居参数配置 .................................................................... 17

2.2.8 链路聚合配置 ..................................................................................................... 17

2.2.8.1 配置链路聚合参数 ................................................................................. 17 2.2.8.2 配置接口进入链路聚合接口 ................................................................. 18 2.2.8.3 配置聚合接口参数 ................................................................................. 18 2.2.9 日常保障配置 ..................................................................................................... 19

2.2.9.1 密码恢复 ................................................................................................. 19 2.2.9.2 恢复出厂设置 ......................................................................................... 19

一、Juniper管理界面说明:

Juniper交换机一共有两种管理界面:传统CLI界面与J-web界面。以下将主要介绍CLI方式:

Juniper交换机os设计风格与UNIX类似,初始登陆时要求输入用户名和密码,目前用户名为root,密码为root123.用户名和密码输入正确后,将可以进入交换机管理界面进行管理操作。Juniper交换机主要有三个层次的管理模式: root%

该模式下交换机仍处于LINUX系统下,可通过Lniux系统命令对OS系统进行操作,但无法实现对于交换机的管理操作。在该界面下输入cli,可进入交换机系统管理界面 root>

该模式下可以对系统配置进行设置,类似于cisco的en模式,可以通过ping和traceroute命令等对网络的连通性进行测试,可以检查系统软硬件的各方面的情况,查看系统配置,debug系统信息,保存系统配置,重启设备等等,但无法完成对于接口和协议等更深层次的配置。通过输入configure进入管理配置界面 [edit] root#

该模式类似于cisco的conf t模式,可以实现二、三层的配置,具体配置将在后面一一说明。

二、典型配置

2.1系统配置模式典型配置

在root>模式下输入?可以看到可以进行的操作,我们主要将会使用到的命令有以下几个: configure Manipulate software configuration information monitor Show real-time debugging information ping Ping remote target

request Make system-level requests restart Restart software process show Show system information telnet Telnet to another host traceroute Trace route to remote host

2.1.1 configure

与cisco中的conf t一个用途,进入管理配置界面

2.1.2 Monitor

相当于cisco中的debug命令。

2.1.3 Ping

与cisco的拓展ping命令类似,可以对ping包数、间隔、源地址、目的地址、大小进行设置,基本的ping命令格式如下:

root> ping inet 目的地址 source 源地址 size 包大小 count 包数 interval 间隔 例:

root> ping inet 192.168.1.1 source 1.1.1.1 size 1500 count 100 interval 5

2.1.4 telnet

远程登录,用法一样

2.1.5 Traceroute

与cisco中相关命令用法一样

2.1.6 Restart

软件重启交换机

2.1.7 Request

对交换机进行基本的操作。该命令下我们主要用到的是system目录下的命令,主要有以下几个:

root> request system ? Possible completions:

configuration Request operation on system configuration reboot Reboot the system

software Perform system software extension or upgrade 可以实现以下几个功能:

2.1.7.1 系统重启

系统硬件重启可以通过以下命令实现: root> request system reboot in 5

其中in 5为可选项,含义为延时5min重启,也可以通过at [time]来指定重启时间

2.1.7.2 保存救援配置

该配置将被保存并永远不会被删除,当交换机出现故障无法读取之前配置,可以通过rollback命令来实现恢复。命令使用如下:

root> request system configuration rescue save/delete

save为保存当前配置到救援配置,delete为删除当前救援配置。在需要恢复时,可以再recovery模式下通过命令rollback rescue来实现恢复。

2.1.7.3 系统软件升级:

升级J-os,命令如下:

root> request system software add 文件名 root 其中文件名为保存在系统中的文件,

如:/var/tmp/jinstall-ex-9.1R1.8-domestic-signed.tgz

2.1.8 Show

与cisco中一样,查看系统信息,基本使用方法与cisco类似,所使用的命令也与cisco类似,以下介绍几个经常相对有所不同的命令:

2.1.8.1查看系统硬件信息:

通过?可以使用的命令如下:

root> show chassis ? Possible completions:

alarms Show alarm status

environment Show component status and temperature, cooling system speeds

fpc Show Flexible PIC Concentrator status hardware Show installed hardware components lcd Show LCD display

location Show physical location of chassis mac-addresses Show media access control addresses

pic Show Physical Interface Card state, type, and uptime routing-engine Show Routing Engine status 其中经常需要使用的有以下几种功能

2.1.8.1.1查看系统硬件警告:

root> show chassis alarms 1 alarms currently active

Alarm time Class Description

2009-11-13 17:33:43 UTC Major Management Ethernet Link Down

2.1.8.1.2查看系统硬件环境信息 root> show chassis environment

Class Item Status Measurement Power FPC 0 Power Supply 0 OK FPC 0 Power Supply 1 Absent

Temp FPC 0 CPU OK 30 degrees C / 86 degrees F FPC 0 EX-PFE1 OK 37 degrees C / 98 degrees F FPC 0 EX-PFE2 OK 50 degrees C / 122 degrees F FPC 0 EX-PFE3 OK 40 degrees C / 104 degrees F FPC 0 GEPHY Front Left OK 24 degrees C / 75 degrees F FPC 0 GEPHY Front Middle OK 31 degrees C / 87 degrees F FPC 0 GEPHY Front Right OK 27 degrees C / 80 degrees F FPC 0 Uplink Conn OK 31 degrees C / 87 degrees F Fans FPC 0 Fan 1 OK Spinning at normal speed FPC 0 Fan 2 OK Spinning at normal speed FPC 0 Fan 3 OK Spinning at normal speed

2.1.8.1.3查看板卡cpu和内存情况 root> show chassis fpc

Temp CPU Utilization (%) Memory Utilization (%) Slot State (C) Total Interrupt DRAM (MB) Heap Buffer 0 Online 5 0 1024 24

2.1.8.1.4查看交换机硬件的注册及型号 root> show chassis hardware Hardware inventory:

Item Version Part number Serial number Description Chassis BP0209157084 EX4200-48T

FPC 0 REV 17 750-021254 BP0209157084 EX4200-48T, 8 POE CPU BUILTIN BUILTIN FPC CPU

PIC 0 BUILTIN BUILTIN 48x 10/100/1000 Base-T PIC 1 REV 04 711-021270 AR0209167624 4x GE SFP Power Supply 0 REV 03 740-020957 AT0508378588 PS 320W AC Fan Tray Fan Tray

2.1.8.1.5查看插槽具体信息

root> show chassis pic fpc-slot 0 pic-slot 0 FPC slot 0, PIC slot 0 information:

Type 48x 10/100/1 000 Base-T State Online

Uptime 59 minutes, 41 seconds

2.1.8.1.6查看路由引擎的CPU/内存/启动时间等信息: root> show chassis routing-engine Routing Engine status: Slot 0:

Current state Master

Temperature 30 degrees C / 86 degrees F DRAM 1024 MB

Memory utilization 24 percent CPU utilization:

User 6 percent Kernel 1 percent Interrupt 0 percent Idle 93 percent

Model EX4200-48T, 8 POE Serial ID BP0209157084

Start time 2009-11-13 17:18:47 UTC

Uptime 1 hour, 2 minutes, 19 seconds Load averages: 1 minute 5 minute 15 minute

0.11 0.07 0.06

2.1.8.2查看当前系统配置

与cisco中show running-configure作用类似,相关命令如下: root> show configuration

## Last commit: 2009-11-13 17:18:02 UTC by root version \system {

root-authentication {

encrypted-password gxDzYMJYlN4yE; ## SECRET-DATA }

syslog { user * {

any emergency; }

file messages { any notice;

authorization info; }

file interactive-commands { interactive-commands any; } }

commit {

factory-settings {

reset-chassis-lcd-menu;

reset-virtual-chassis-configuration; }

} }

interfaces { ge-0/0/0 { unit 0 {

family ethernet-switching; } }

ge-0/0/1 { unit 0 {

family ethernet-switching; } }

ge-0/0/2 { unit 0 {

family ethernet-switching; } }

protocols {

igmp-snooping { vlan all; }

lldp {

interface all; }

lldp-med {

interface all; } rstp; } poe {

interface all; }

Juniper采用的编程风格的系统信息显示系统

2.1.8.3 查看poe口的供电情况:

相关命令如下:

root> show poe interface

Interface Admin status Oper status Max power Priority Power consumption Class ge-0/0/0 Enabled OFF 15.4W Low 0.0W 0 ge-0/0/1 Enabled OFF 15.4W Low 0.0W 0 ge-0/0/2 Enabled OFF 15.4W Low 0.0W 0 ge-0/0/3 Enabled OFF 15.4W Low 0.0W 0 ge-0/0/4 Enabled OFF 15.4W Low 0.0W 0 ge-0/0/5 Enabled OFF 15.4W Low 0.0W 0 ge-0/0/6 Enabled OFF 15.4W Low 0.0W 0 ge-0/0/7 Enabled OFF 15.4W Low 0.0W 0

root> show poe controller

Controller Maximum Power Guard band Management index power consumption

0 130 W 0W 0W Static

2.1.8.4 查看系统信息:

通过命令root> show system可以查看到系统的相关信息,我们主要使用的命令有以下几个:

root> show system ?

Possible completions:

commit Show pending commit requests (if any) and commit history configuration Show configuration information connections Show system connection activity

reboot Show any pending halt or reboot requests rollback Show rolled back configuration software Show loaded JUNOS extensions storage Show local storage data

uptime Show time since system and processes started 以下将一一介绍这些命令的使用场合

2.1.8.4.1查看系统备份配置 类似于cisco中的show startup-configure,如前面介绍,一共有两种备份信息:rollback和rescue,查看命令分别如下:

root> show system configuration rescue root> show system rollback [number]

2.1.8.4.2 查看系统保存操作的基本信息 命令如下:

root> show system commit

0 2009-11-13 17:18:02 UTC by root via cli 1 2009-11-13 17:16:07 UTC by root via cli 2 2009-11-13 17:08:08 UTC by root via cli 3 2009-11-13 17:07:33 UTC by root via cli 4 2009-11-13 17:05:53 UTC by root via cli 5 2009-11-13 16:52:51 UTC by root via button rescue 2009-11-13 17:22:00 UTC by root via cli

2.1.8.4.3 查看系统当前时间及启动时间 命令如下:

root> show system uptime

Current time: 2009-11-13 18:48:28 UTC

System booted: 2009-11-13 17:18:47 UTC (01:29:41 ago) Protocols started: 2009-11-13 17:19:40 UTC (01:28:48 ago)

Last configured: 2009-11-13 17:18:02 UTC (01:30:26 ago) by root 6:48PM up 1:30, 1 user, load averages: 0.10, 0.07, 0.06

2.1.8.4.4查看系统传输层连接情况

类似于主机上的netstate命令,可以查看传输层TCP和UDP的连接情况,有助于病毒及恶意攻击的预防和阻止,相关命令如下: root> show system connections

Active Internet connections (including servers)

Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp4 0 0 *.6161 *.* LISTEN

tcp4 0 0 *.9000 *.* LISTEN

tcp4 0 0 128.0.0.1.33001 128.0.0.1.56071 ESTABLISHED tcp4 0 0 *.666 *.* LISTEN

tcp4 0 0 128.0.0.1.33001 128.0.0.1.64192 ESTABLISHED tcp4 0 0 128.0.0.1.64192 128.0.0.1.33001 ESTABLISHED tcp4 0 0 *.33001 *.* LISTEN tcp4 0 0 *.33003 *.* LISTEN tcp4 0 0 *.6151 *.* LISTEN udp46 0 0 *.49152 *.* udp46 0 0 *.4784 *.* udp46 0 0 *.3784 *.*

2.1.8.4.5查看系统进程占用资源情况

可以对系统综合资源的使用情况进行详细的评估,相关命令如下 root> show system storage fpc0:

-------------------------------------------------------------------------- Filesystem Size Used Avail Capacity Mounted on /dev/da0s1a 184M 83M 87M 49% / devfs 1.0K 1.0K 0B 100% /dev devfs 1.0K 1.0K 0B 100% /dev/ ……

2.1.8.4.6查看系统各类软件版本情况 相关命令如下:

root> show system software fpc0:

-------------------------------------------------------------------------- Information for jbase:

Comment:

JUNOS Base OS Software Suite [9.2-20081126.1] Information for jcrypto-ex:

Comment:

JUNOS Crypto Software Suite [9.2-20081126.1] Information for jdocs-ex:

Comment:

JUNOS Online Documentation [9.2-20081126.1] Information for jkernel-ex:

Comment:

JUNOS Kernel Software Suite [9.2-20081126.1]

Information for jpfe-ex42x:

Comment:

JUNOS Packet Forwarding Engine Enterprise Software Suite [9.2-20081126.1] Information for jroute-ex:

Comment:

JUNOS Routing Software Suite [9.2-20081126.1] Information for jswitch-ex:

Comment:

JUNOS Enterprise Software Suite [9.2-20081126.1] Information for junos:

Comment:

JUNOS Base OS boot [9.2-20081126.1] Information for jweb-ex:

Comment:

JUNOS Web Management [9.2-20081126.1]

以上便是系统配置模式下在日常运维工作中经常会用到的一些命令,在系统配置模式下只能实现一些交换机最基本的功能,对于vlan、协议以及其他更深层次的配置将在管理配置模式下一一进行介绍。

2.2管理配置模式典型配置

在系统配置模式下输入root> configure便进入管理配置模式,在介绍相关典型配置之前,先对管理配置模式进行大概的介绍:

2.2.1配置模式介绍

在管理配置模式下可以对于路由协议,二层协议、vlan等进行详细的配置,主要的配置方法有两种:

2.2.1.1使用set命令

这种模式类似于cisco的catos 的配置方法,通过在根目录下的一条语句完成所有的配置需求,简化配置过程。典型的set配置方式如下:

root# set interfaces ge-0/0/1 unit 0 family inet address 192.168.1.1/24

这种配置方式的缺点在于结构层次不够清晰,删除配置语句需要通过delete命令来实现,管理人员必须对交换机已有配置非常熟悉才能进行良好有效的配置,配置方式过于直接,一旦配置错误修改配置时间较长

2.2.1.2使用edit命令

这种配置模式与cisco传统的ios配置模式较为类似,将配置过程逐渐层次化,典型配置如下: [edit]

root# edit interfaces

[edit interfaces] root# edit ge-0/0/1

[edit interfaces ge-0/0/1] root# edit unit 0

[edit interfaces ge-0/0/1 unit 0] root# edit family inet

[edit interfaces ge-0/0/1 unit 0 family inet] root# set address 192.168.1.1/24 简单点说,这种配置模式就是set配置模式的分解动作,相关配置可以在子目录中修改删除,随着层次的深入,返回根目录也变得越来越麻烦,可以通过使用up和top命令来实现,区别在于up只能返回一层,top直接返回根目录,相关比较配置如下: [edit interfaces ge-0/0/1 unit 0 family inet] root# up

[edit interfaces ge-0/0/1 unit 0] root# top

[edit] root#

2.2.2 相关注意事项

以上介绍了Juniper交换机在管理模式下的两种配置方法,需要注意的是,与cisco配置不一样,cisco配置完毕后立即生效,在Juniper交换机中需要commit之后配置才会生效,否则在退出管理模式的时候会有错误提示: [edit]

root# exit The configuration has been changed but not committed Exit with uncommitted changes? [yes,no] (yes) no

在commit之前可以通过root# show | compare 命令来确认配置 [edit]

root# show | compare

[edit interfaces ge-0/0/1 unit 0] + family inet {

+ address 192.168.1.1/24;

+ }

通过将当前配置与上一次保存配置进行比较,确认保存配置是否正确,其中+表示新增的命令,—表示删除的命令。

在比较完毕后,通过root# commit check 来检查配置在语法上是否正确 root# commit check

[edit interfaces ge-0/0/1 unit 0] 'family'

When ethernet-switching family is configured on an interface, no other family type can be configured on the same interface. error: configuration check-out failed 在检查正确无误后,便可以保存了。

Set配置方法与edit配置方法在本质上是一致的,由于edit的配置与cisco配置较为类似,本操作手册中将以相对较为陌生的set方式作为配置模式

在Juniper交换机中,配置命令设计的十分灵活,可以通过多种方式实现同样的配置,本操作手册只提供相关标准配置。

2.2.3配置二层端口

相关命令: [edit]

root# set interfaces ge-0/0/1 unit 0 family ethernet-switching

其中unit 0指的是该接口为主接口,在Juniper交换机中子接口是通过unit来进行配置,0表示为主接口。1-16385为子接口

2.2.4 配置三层端口

相关命令如下:

root# set interfaces ge-0/0/1 unit 0 family inet address 192.168.1.1/24

inet表示为ipv4的地址,可以选择inet6配置ipv6的地址,这里掩码通过/[num]的形式实现配置

需要注意的是,Juniper交换机中所有接口默认为2层接口,如果直接在接口下配置IP会报错: [edit]

root# commit check

[edit interfaces ge-0/0/0 unit 0] 'family'

When ethernet-switching family is configured on an interface, no other family type can be configured on the same interface. error: configuration check-out failed

所以在配置三层接口的时候,需要先删除二层接口配置: [edit]

root# edit interfaces ge-0/0/0 unit 0

[edit interfaces ge-0/0/0 unit 0]

root# delete family ethernet-switching

2.2.5配置基本接口参数:

配置端口描述 [edit]

root@host# set interfaces ge-3/0/0 description “to_BJ-4200-1” 配置端口MTU [edit]

root@host# set interfaces ge-3/0/0 mtu 9216 配置端口速率 [edit]

root@host# set interfaces ge-3/0/0 ether-options speed 1g 配置端口双工 [edit]

root@host# set interfaces ge-3/0/0 ether-options link-mode full-duplex 配置端口自动协商 [edit]

root@host# set interfaces ge-3/0/0 ether-options auto-negotiation

2.2.6 vlan的相关配置

Vlan的配置主要包括三个阶段: ? 配置vlan

? 配置三层vlan接口 ? 在接口上配置vlan模式 以下将一一介绍

2.2.6.1配置vlan

相关命令如下: [edit]

root# set vlans sn vlan-id 100 配置vlan id为100.取名为sn的vlan

2.2.6.2 将vlan部署到接口上

相关命令: [edit]

root# set interfaces ge-0/0/1 unit 0 family ethernet-switching port-mode ? Possible completions:

access Interface mode is access trunk Interface mode is trunk access和trunk的含义与cisco交换机一致,在trunk模式下可以对允许的vlan进行设置,

相关命令如下:

root# set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members Possible completions:

VLAN name, tag or range string [ Open a set of values all All VLANs default mgmt

需要注意的是,新增加的vlan在commit之前是不会出现在members的列表中的

2.2.6.3配置三层vlan端口

命令如下: [edit]

root# set interfaces vlan unit 0 family inet address 192.168.2.1/24

与cisco命令不同的是,Juniper交换机中三层vlan接口与vlan是相互独立的,因此即便创建了相关的vlan,在接口目录下也不会出现相应的vlan接口,在第一次配置三层vlan接口的时候,interfaces后面的vlan不会自行创建,需要手动输入。如果需要创建多个三层vlan接口,可以通过更改unit后面的数字来实现

2.2.6.4将三层vlan接口与vlan匹配

命令如下: [edit]

root# set vlans test l3-interface vlan.0

则命名为test的vlan下的所有终端可将网段设置在192.168.2.1/24的网段下,并通过过三层vlan接口实现透传。vlan.后面的数字与创建三层vlan接口时unit后面的数字相匹配

2.2.7三层协议配置

在三层协议配置部分,主要介绍静态路由和ospf协议的相关配置

2.2.7.1静态路由相关配置

相关命令如下: [edit]

root# set routing-options static route 192.168.4.0/24 next-hop 192.168.1.2 可以看出Juniper交换机与静态路由相关的配置与cisco相似。

2.2.7.2 OSPF协议相关配置

Ospf协议的简单配置主要有以下几个方面: 2.2.7.2.1 区域配置 相关命令如下: [edit]

root# set protocols ospf area 0 interface ge-0/0/1

与cisco不同的是,Juniper交换机ospf的配置是基于接口的,interface ge-0/0/1这句配置就相当于cisco中的network命令,将接口上的网段发布到相关的ospf域中

2.2.7.2.2 配置末节及nssa区域 相关命令如下: [edit]

root# set protocols ospf area 1 nssa/stub {no-summaries} no-summaries为可选选项,

2.2.7.2.3 ospf类型配置 相关命令如下:

root# set protocols ospf area 1 interface ge-0/0/1 interface-type ? Possible completions:

p2mp Point-to-multipoint NBMA p2p Point-to-point Juniper交换机默认接口类型为广播型

2.2.7.2.4 ospf邻居参数配置 相关命令如下: [edit]

root# set protocols ospf area 1 interface ge-0/0/1 ? Possible completions:

<[Enter]> Execute this command

dead-interval Dead interval (seconds) (1..65535) disable Disable OSPF on this interface hello-interval Hello interval (seconds) (1..255) metric Interface metric (1..65535)

dead-interval与hello-interval为ospf邻居建立时需协商的参数,metric相当于cisoc中的cost值。

2.2.8 链路聚合配置

链路聚合配置目的是将一台设备中多个端口捆绑使用,达到线路冗余的目的,与cisco的EtherChannle类似。Juniper交换机中的链路聚合配置也分二层链路聚合和三层链路聚合, 链路聚合主要分为以下几个步骤进行: ? 配置链路聚合参数

? 将接口配置进入链路聚合接口 ? 配置聚合接口参数 以下将一一介绍几个步骤

2.2.8.1 配置链路聚合参数

命令如下: [edit]

root# set chassis aggregated-devices ethernet device-count 2

device-count为Juniper交换机中可以配置聚合接口的数量,最多为64个。

2.2.8.2 配置接口进入链路聚合接口

命令如下: [edit]

root# set interfaces ge-0/0/9 ether-options 802.3ad ae0 [edit]

root# set interfaces ge-0/0/10 ether-options 802.3ad ae0

这样就将9和10口加入了聚合接口,由于先前的配置中设置聚合接口的数量为2,所以配置时会出现ae0、ae1两个聚合接口,用户可以自行选择要使用的聚合接口。但须注意的是,聚合接口不可以使用逻辑接口,即unit num 不可以使用,而且在加入聚合接口后接口速度会被改为1g,否则会报错: [edit interfaces ge-0/0/11] 'ether-options'

warning: Adding child member to an aggregate interface with the speed set to AUTO will force the link speed to 1G [edit interfaces ge-0/0/11] 'unit 0'

logical unit is not allowed on aggregated links error: configuration check-out failed

通过相关命令修改后即可顺利加入聚合接口: [edit]

root# delete interfaces ge-0/0/11 unit 0 [edit]

root# set interfaces ge-0/0/11 ether-options speed 1g [edit]

root# commit check

configuration check succeeds

2.2.8.3 配置聚合接口参数

需先将聚合接口配置协议并激活,相关命令如下: [edit]

root# set interfaces ae0 aggregated-ether-options lacp active 在配置好协议之后,可以选择将聚合接口配置为二层接口或者三层接口,配置方法与普通接口类似,相关命令如下: 二层接口 [edit]

root# set interfaces ae0 unit 0 family ethernet-switching port-mode access 三层接口 [edit]

root# set interfaces ae0 unit 0 family inet address 192.168.6.1/24

需注意的是,与三层vlan接口配置类似,ae0接口不会自动出现在接口列表中,需要手动输入。

至此,聚合接口配置完毕

2.2.9 日常保障配置

2.2.9.1 密码恢复

如果Juniper 设备的Root 密码丢失,而且没有其他的超级用户权限,那么就需要执行密码恢复,该操作需要中断Juniper设备的正常功能。 要进行密码恢复,请按照下面操作进行: ? 重新启动Juniper设备。 ? 在启动过程中,console 上出现下面的提示的时候,按空格键中断正常启动方式然后再

进入单用户状态:

Hit [Enter] to boot immediately, or any other key for command prompt. Booting [kernel] in 9 seconds... < Press any key other than return > ok boot –s

? 执行密码恢复:在以下提示文字后输入recovery

Enter full pathname of shell or 'recovery' for root password recovery or RETURN for /bin/sh: recovery Starting CLI ... root>

? 进入配置模式,删除root密码:

root> configure

Entering configuration mode [edit]

root# set system root-authentication plain-text-password 输入两遍新的口令并确认重新启动后,Juniper设备密码已被修改

2.2.9.2恢复出厂设置

步骤如下:

? 交换机LED屏旁有两个按钮,上面的为menu按钮,下面的为enter按钮。 ? 按menu至MAINTENANCE MENU,按enter进入。

? 按menu至factory default,按enter恢复出厂设置。

本文来源:https://www.bwwdw.com/article/u24p.html

Top