8.VLAN路由端口(RVI)的配置13 9.路由配置14 1.总体概述 本文档为Juniper Networks, Inc.编写。用于说明JuniperEX基本命令配置。 更多的信息请参考下面的网站: 2.软件操作 JUNOS软件是专门为互联网设计的第一种路由交换操作系统。它运行在Juniper网络公司的所有T-系列、M-系列和J-系列路由器和EX系列路由交换机上,而且目前正被部署在全球最大、增长最迅速的网络中。Junos使用FreeBSD内核,模块化的设计,提供卓越的故障恢复能力并确保能够简单地集成IPv6、MPLS等新功能。JUNOS软件提供的全套具有工业强度的路由协议、灵活的策略语言,可以高效地扩展以支持很大数量的网络接口和路由。基于标准的JUNOS软件可以支持互联网路由协议,同时控制路由器、交换机及其接口并实现对各种规模的网络的系统管理。简便易用的界面使您可以配置路由协议和接口属性、监控路由、检测并排除协议和网络连接故障。 Starting CLI ... root> 4.进入配置模式,删除root密码: root>configure Entering configuration mode [edit] root#delete system root-authentication root@router#commit commit complete [edit] root@router#exit Exiting configuration mode root@kenny> exit Reboot the system? [y/n]y Terminated 5.重新启动后,配置新的root密码。Juniper设备恢复正常。 3. JUNOSCLI模式 设备启动,登录进入系统后输入cli,即可进入JUNOS CLI模式,可进行设备调试。JUNOS CLI有两种模式:用户模式和配置模式,区分方法是他们的提示符不一样: Possible completions: <[Enter]> Execute this command connection-limit Maximum number of allowed connections (1..250) rate-limit Maximum number of connections per minute (1..250) Enter full pathname of shell or 'recovery' for root password recovery or RETURN for /bin/sh:recovery NOTE: Once in the CLI, you will need to enter configuration mode using Possible completions: <[Enter]> Execute this command connection-limit Maximum number of allowed connections (1..250) rate-limit Maximum number of connections per minute (1..250) root@host#commit confirmed commit confirmed will be automatically rolled back in 10 minutes unless confirmed commit complete # commit confirmed will be rolled back in 10 minutes 1.总体概述3 2.软件操作4 2.1.通过Console线缆连接Juniper设备4 2.2.设备启动5 2.3.设备重启5 2.4.JUNOS升级5 2.5.密码恢复6 3.JUNOS CLI模式8 4.Juniper设备的基本配置9 5.EX路由交换机初始配置向导EZSETUP11 6.端口配置11 7.VLAN配置12 Hit [Enter] to boot immediately, or any other key for command prompt. Booting [kernel] in 9 seconds... < Press any key other than return > okboot –s 3.执行密码恢复:在以下提示文字后输入recovery | Pipe through a command [edit] root@host#set system services telnet [edit] root@host#commit 配置路由器FTP服务 user@host#set system services ftp#配置FTP服务 root@host#set system services ftp ? [edit] root@host#commit commit complete [edit] root@host# 4.Juniper设备的基本配置 配置路由器设备名 user@host#set system hostnamehostname#配置设备名 root@host>edit Entering configuration mode 启动完成后,看看到login提示符,输入用户名为root,缺省密码是空。进入系统后输入cli命令进入Junoscommand line interface,可以进行设备调试。如下例: login: root Password: Terminal type? [vt100] y root%cli root> 2.3.设备重启 [edit] root@host#set system host-name DEMO [edit] root@DEMO#commit 配置路由器Telnet服务 user@host#set system services telnet#配置telnet服务 root@host#set system services telnet ? #配置端口MTU user@host#set interfacege-slot/pic/portspeedport-speed Juniper设备重启必须按照下面的步骤进行操作: 1.用console设备连接到Juniper设备的CONSOLE端口上。 2.使用具有足够权限的用户名和密码登陆CLI命令行界面。 3.在提示符下输入下面的命令: user@host>request systemreboot 4.等待console设备的输出,确认Juniper设备软件已经重新启动。 2.将Console线缆的DB9插头一头插到PC或者笔记本电脑的COM口上,另外一端插到Juniper设备的CONSOLE口上。。 3.打开计算机中的终端软件工具。例如:CRT或者Windows自带的超级终端。设置如下: 端口:选择第二步中Console线缆插入到PC上的端口,通常为COM 1或者COM 2 2.4.JUNOS升级 Juniper设备JUNOS软件升级必须按照下面的步骤进行操作: 1.用console设备连接到Juniper设备的CONSOLE端口上。 2.下载新的JUNOS软件,放置到FTP服务器上。 3.将新的JUNOS软件复制到Juniper设备上,使用下面的命令: 4.user@host>file copy ftp://username:passwordfilename/var/tmp/filename 命令直接生效和保存:用命令commit生效和保存配置 root@host#commit commit complete [edit] root@host# 需要确认的命令生效和保存:分两步完成,用命令commit confirm保存配置后,不在固定时间(缺省为10分钟)内用commit命令确认,则系统自动回退原有配置,请注意: 波特率:9600 数据位:8位 停止位:1位 流控:无 4.打开配置到的CRT或者超级终端,按“Enter”键,屏幕出现登陆的提示符,即连接成功。如果没有显示,请检查线缆或者终端的配置是否正确。 如果出现任何现场无法解决的问题,请寻求Juniper TAC的帮助,参阅。 2.2.设备启动 加电启动Juniper设备。系统第一次启动建议通过Console端口登陆。 root@host# [edit] root@host#commit 5. EX路由交换机初始Байду номын сангаас置向导EZSETUP 在第一次登录系统后,直接输入ezsetup命令进入初始配置向导,在此向导中,顺序输入: 系统名称hostname 系统密码 是否启用Telnet服务 是否启用SSH服务 交换机管理模式:带外/带内 用缺省VLAN "default"管理 缺省VLAN的地址和网关 系统时间和日期 系统时区 保存配置 即可方便完成路由交换机初始配置 6.端口配置 配置物理端口 user@host#set interfacege-slot/pic/portdescriptiondescription #配置端口描述 user@host#set interfacege-slot/pic/portmtumtu-number root@host%cli root@host> 配置模式 user@host##配置模式 通过在用户模式使用edit命令进入配置模式,它的提示符是#号: root@host>edit Entering configuration mode [edit] root@host# 配置生效和保存 Juniper设备配置保存可以有两种方式: 用户模式 user@host>#用户模式 在用户模式下可以显示路由器的配置、端口状态、路由信息等,它的提示符是>号。登录后输入cli即进入路由器的用户模式: host (ttyp6) login:root Password: --- JUNOS 9.1R1.8 built 2007-07-07 00:49:05 UTC 如果Juniper设备的Root密码丢失,而且没有其他的超级用户权限,那么就需要执行密码恢复,该操作需要中断Juniper设备的正常功能。 要进行密码恢复,请按照下面操作进行: 1.重新启动Juniper设备。 2.在启动过程中,console上出现下面的提示的时候,按任意键中断正常启动方式,然后再进入单用户状态: | Pipe through a command [edit] root@host#set system services ftp [edit] root@host#commit 配置DNS服务器 user@host#set system name-serverdns-address#配置模式 通过在用户模式使用edit命令进入配置模式: NOTE: the 'configure' command to make any required changes. For example, NOTE: to reset the root password, type: NOTE: configure NOTE: set system root-authentication plain-text-password 本节将描述JUNOS的一些应急操作,这些操作都会影响设备的正常功能,操作时请谨慎使用: 动 2.1.通过Console线缆连接Juniper设备 使用下面的步骤连接路由器的Console接口: 1.准备好Juniper设备自带的Console线缆(如果没有的话,请准备两个DB9-RJ45转接头和一条RJ45-RJ45反转线) NOTE: (enter the new password when asked) NOTE: commit NOTE: exit NOTE: exit NOTE: When you exit the CLI, you will be asked if you want to reboot NOTE: the system 5.升级前,执行下面的命令备份旧的软件及设定: user@host>request systemsnapshot 6.安装新的JUNOS软件: user@host>request system software addsourcereboot 其中source参数为通过上一步骤保存在系统中的文件,如: 2.5.密码恢复