Juniper--Juniper的基本配置.doc_第1页
Juniper--Juniper的基本配置.doc_第2页
Juniper--Juniper的基本配置.doc_第3页
Juniper--Juniper的基本配置.doc_第4页
Juniper--Juniper的基本配置.doc_第5页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Juniper-Juniper的基本配置(献给要学juniper的同学)本专题所有Juniper的配置环境均为qemu+free bsd 4.8 mini+JUNOS Base OS boot 7.2R4.2+4块虚拟出来的tap网卡,由于Juniper的路由器支持传统意义的VR-VPN,也就是可以把一个路由器当成多个路由器来用(16个),所以用一个路由器也可以完成多个路由器的互连。Juniper的基本配置:root# cli#相当于cisco的enrootcli configure#相当于cisco的configure terminaleditroot# set system host-name router1#配置路由器的名字为router1root# set system domain-name #配置路由器所在域为root# set interfaces fxp0 unit 0 family inet address /24#配置fxp0 unit 0的接口地址,fxp0代表管理接口,unit 0代表子接口,inet代表是ipv4地址。root# set system backup-router #backup-router是本路由器的直连路由器,在路由器启动的时候,#JUNOS路由软件(routing protocol process, RPD)没有立即启动,#路由器将自动生成一条到back-up router的缺省路由,当路由器启动完成后再自动删除这条路由。root# set system name-server #DNS的地址root# set system root-authentication plain-text-password#设置明文密码New password:Retype password:#输入并且确认密码,要求字母和数字。root# commit#确认配置,在没有确认配置的时候所有配置都是不生效的!rootrouter1# exitrootrouter1#保存配置用save命令editavivarouter1# save configuration-march02Wrote 433 lines of configuration to configuration-march02#察看保存过的文件用run file list命令avivarouter1# run file list/var/home/aviva:.ssh/configuration-march02#用保存的文件载入配置用load replace命令。load replace XXXJunOS的show命令在configure模式下可以用show命令查看当前视图下的配置,Juniper有多种视图在命令前面的方括号里面能看到所在的视图名称:确省视图为system视图,如下,只有edit显示在上面editrootstim# showversion 7.2R4.2;system host-name stim;domain-name ;syslog user * any emergency;file messages any notice;authorization info;file interactive-commands interactive-commands any;interfaces fxp0 unit 0 family inet address /24;下面一种是interface视图,不同视图下,用show命令show出来的结果是不一样的。edit interfacesrootstim# showfxp0 unit 0 family inet address /24;下面要介绍的命令是show | display set,这个命令能够查看在该视图下曾经做过一些什么操作。edit interfacesrootstimRouterA# show | display setset interfaces fe-0/0/1 unit 0 family inet address /24set interfaces se-0/0/2 unit 0 family inet address /24set interfaces se-0/0/3 serial-options clocking-mode dceset interfaces se-0/0/3 unit 0 family inet address /24set interfaces lo0 unit 0 family inet address /32用show compare命令查看配置过的脚本rootstim# edit system servicesedit system servicesrootstim# set telnetedit system servicesrootstim# exiteditrootstim# exitThe configuration has been changed but not committedExit with uncommitted changes? yes,no (yes) norootstim# show | compareedit system+ services + telnet;+ JunOS其他常用操作:无论做什么操作的时候Juniper都需要通过commit命令使配置生效,这点和cisco huawei不是很一样,cisco huawei的做法是配置上去立即生效。用commit check查看配置是否正确,如图在commit check的时候发生报错,需要修改。editrootstimrouter1# commit checkedit protocols rip group alpha-rip-groupneighbor fe-0/0/0.0Failed to configure neighbor fe-0/0/0.0: already in group alpha-rip-grouperror: configuration check-out failed每次我们想commit配置的时候都需要退出到cli界面,需要打多个quit命令,这里介绍一个直接的办法,如果想保存配置并且回到用户视图下可以用commit and-quitedit protocols ospfrootstim# edit area 0edit protocols ospf area rootstim# commit and-quit用top命令直接回到system视图下edit protocols ospfrootstim# topeditrootstim# edit protocols ospfedit protocols ospfrootstim# edit area 0edit protocols ospf area rootstim# topeditrootstim#如果配置出问题需要回滚配置的时候可以用rollback命令。rootstim# rollback ?Possible completions: Execute this command0 2007-09-30 13:58:53 UTC by root via cli1 2007-09-30 13:42:55 UTC by root via cli2 2007-09-28 15:47:34 UTC by root via cli3 2007-09-28 15:47:16 UTC by root via cli4 2007-09-28 15:46:44 UTC by root via cli5 2007-09-28 00:54:45 UTC by root via other| Pipe through a commandedit查看当前版本:rootstim show versionHostname: stimModel: oliveJUNOS Base OS boot 7.2R4.2JUNOS Base OS Software Suite 7.2R4.2JUNOS Ker

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论