juniper路由器配置手册_第1页
juniper路由器配置手册_第2页
juniper路由器配置手册_第3页
juniper路由器配置手册_第4页
juniper路由器配置手册_第5页
已阅读5页,还剩17页未读 继续免费阅读

下载本文档

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

文档简介

浙江电力信息数据网浙江电力信息数据网 Juniper 路由器配置手册路由器配置手册 Juniper Networks, Inc. 2009-4-13 第 2 页 共 22 页 目目 录录 路由器开箱启动软硬件检测路由器开箱启动软硬件检测.3 SYSTEM 基本配置基本配置.3 设置系统名称及时区 .3 设置帐号密码 .4 用户级别定义 .4 设置系统登录 .5 SYSLOG设置.6 GROUP配置.6 CHASSIS配置.7 SYSTEM下的应用配置.7 INTERFACE 配置配置.7 路由协议配置配置路由协议配置配置.9 OSPF 协议配置 .9 Ospf基本配置.9 OSPF邻居间认证配置.10 路由重发布.10 OSPF配置示例.11 IBGP 协议配置 .12 EBGP 协议配置 .13 RR 配置 .14 MPLS 协议配置 .15 采用LDP信令建LSP.15 采用RSVP信令建LSP.17 VPN 配置配置 .19 INSTANCE配置 .19 MBGP 的配置 .20 CLASS OF SERVICE 配置配置 .20 第 3 页 共 22 页 路由器开箱启动软硬件检测路由器开箱启动软硬件检测 确认设备电源连接正确,加点启动,使用 Console 线连接路由器 Console 接口,首次登 陆用户名:root,无密码。进入根模式: cli 进入 Operating Mode Root Show chassis hardware 查看硬件信息,检测是否所有板卡在线,对应配置清单确认机箱、板卡配置信息是否正确, Root Show chassis environment 查看机箱温度,正常温度不应超过 40 摄氏度。 Root Show chassis alarms 查看告警信息,联调阶段应该有电源模块(因为没有连接冗余电源)和带外管理接口 fxp0(没有连 接带外网管接口)告警,属正常。 Root Show version 查看 JUNOS 软件版本信息。 第 4 页 共 22 页 System 基本配置基本配置 System 配置是路由器基本信息的配置,包括路由器名称、管理员名称和口令、管理协议、Log 等相 关信息, 设置系统名称及时区设置系统名称及时区 Root#Set system hostname 设置系统的主机名称 Root# Set time-zone Asia/Shanghai 配置路由器的时区 Root# Set ntp server 配置 NTP Server, Root# Set system root-authentication plain-text-password 设备初次启动只有 root 用户,root 用户为最高权限用户,缺省没有密码,配置 root 管理员口令,日 常运维不使用 root 用户。 Root# Set system login user class super-user authentication plain-text-password 设置帐号密码设置帐号密码 增加一个用户,此用户为管理员(Super-user)级别, Root# Set system login user class read-only authentication plain-text-password 增加一个用户,此用户为 ReadOnly (read-only)级别,用来查看配置信息、机箱状况和 log 信息。 用户级别定义用户级别定义 terry# set system login class testclass permissions all 增加一个用户类别名称为 testcalss,其权限为所有权限,根据不同的权限组合,可以定义不同级别的 管理员用户 第 5 页 共 22 页 可以定义的权限有: access 可以查看访问配置 access-control 可以改变访问控制 admin 可以查看用户帐号 admin-control 可以改变用户帐号 all 所有的要限均打开 clear 可以清除学习到的路由信息 configure 可以进入配置模式 control 可以改变任何配置 field 可以用 DEBUG 工具 firewall 可以查看防火墙(ACL)配置 firewall-control 可以改变防火墙(ACL)配置 flow-tap 可以查看 flow-tap 配置 flow-tap-control 可以改变 flow-tap 配置 flow-tap-operation 能够 tap flows interface 可以查看 interface 配置 interface-control 可以改变 interface 配置 maintenance 可以变成超级用户 network 可以访问网络信息 reset 可以 reset/restart 接口和进程 rollback 可以回退到以前保存下来的配置 s routing 可以查看 routing 配置 routing-control 可以改变 routing 配置 secret 可以查看加密信息 secret-control 可以改变 secret 加密信息 security 可以查看安全配置 security-control 可以改变安全配置 shell 进以进入 shell 界面 snmp 可以查看 SNMP 配置 snmp-control 可以改变 SNMP 配置 system 可以查看 system 配置 system-control 可以改变 system 配置 trace 可以查看 trace file 设置 trace-control 可以改变 trace file 设置 view 可以查看当前的运行状态信息 view-configuration 可以查看所有配置(不包括加密部分) 设置系统登录设置系统登录 terry# set system services ssh 设置系统允许 SSH 登录 第 6 页 共 22 页 terry# set system services ssh protocol-version v2 设置登录使用的 SSH 版本为 V2 版本 terry# set system services ssh protocol-version v2 rate-limit 5 设置通过 SSH 方式每分钟最多登录进来的人数为 5 人 terry# set system services ssh rate-limit 5 connection-limit 4 设置通过 SSH 方式能够同时登录进来 4 人 SyslogSyslog 设置设置 Root# Set system syslog file archive size 2m files 10 设置 SYSLog 文件容量为 2m 和数量为 10 个。 Root# Set system syslog file any info 设置 SYSLog 文件中 log 下来的内容 terry# set system syslog file interactive-commands any 为方便审计,将管理员操作时输入的所有命令 LOG 下来,syslog 文件名为 log-com 例: # show system syslog syslog user * any emergency; file messages any notice; authorization info; file log-com interactive-commands any; 第 7 页 共 22 页 GroupGroup 配置配置 Group 配置的目的是清晰的显示目前连接的 RE 信息。此配置仅对配置冗余 RE 的路由器有用。 Set groups re0 system hostname -RE0 Set groups re1 system hostname -RE1 Set apply-group re0 re1 Chassis 配置配置 Username# Edit chassis; 进入 Chassis 配置子层 Username# Set redundancy routing-engine 0 master 配置 RE0 为主 RE Username# Set redundancy failover on-loss-of-keepalive Username# Set redundancy failover on-disk-failure 配置冗余 RE 的切换条件:丢失 Keepalive 或者硬盘故障 Username# Set redundancy graceful-switchover enable 启动 RE 的平滑切换功能 Username# Set alarm management-ethernet link-down ignore 关闭带外网管接口 link down 的告警。注:本次项目不使用带外网管。 SystemSystem 下的应用配置下的应用配置 Juniper 路由器在缺省情况下不打开任何服务,要开启服务,均需要管理员去开启, Set system service ftp 打开 FTP 服务 Set system service telnet 打开 FTP 服务 Set interface fe-0/0/0 proxy-arp 第 8 页 共 22 页 在接口上打开 ARP PROXY 服务 Interface 配置配置 此项配置内容最为烦杂,在配置时需特便仔细。为了维护方便,所有端口均配置 Description,标识 连接的对端设备端口。 Edit Interface 进入端口配置子层。 浙江电力共有以下几种端口类型:浙江电力共有以下几种端口类型: GE:; POS 155M/622M:核心和骨干设备配置大量的 POS 端口;POS 端口需要配置描述、 时钟、封装 PPP、Sonet Option 等信息;所有的 POS 接口均配置 IP 地址信息,打开 MPLS 功能。 E1/CE1:部分路由器的互联端口,所有 E1/CE1 均配置 Unframe 格式;所有的 POS 接 口均配置 IP 地址信息,打开 MPLS 功能。 FE: GE 端口配置实例:端口配置实例: Set ge-0/0/0 description “ConnectToWZ-M20-GE-0/0/0” Set ge-0/0/0 mtu 1600 Set ge-0/0/0 unit 0 family inet address /30 Set ge-0/0/0 unit 0 family mpls POS 端口配置实例:端口配置实例: Set so-0/1/0 description “ConnectToWZ-M20-SO-0/0/0” Set so-0/1/0 clock internal Set so-0/1/0 encapsulation ppp Set so-0/1/0 sonet-option fcs 32 Set so-0/1/0 sonet-option payload-scrambler Set so-0/1/0 sonet-option rfc-2615 第 9 页 共 22 页 Set so-0/1/0 unit 0 family inet address /30 Set so-0/1/0 unit 0 family inet mpls E1 端口配置实例:端口配置实例: Set ce1-0/3/0 no-partition interface-type e1 Set so-0/1/0 description “ConnectToNingbo-M20-E1-0/0/0” Set e1-0/3/0 e1-option fcs 16 Set e1-0/3/0 e1-option framing g704 Set e1-0/3/0 encapsulation ppp Set e1-0/3/0 family inet address 69/30 Set e1-0/3/0 family inet mpls FE 端口配置实例:端口配置实例: Set fe-1/3/0 description connect to vpn-rt switch Set fe-1/3/0 vlan-tagging Set fe-1/3/0 unit 1 vlan-id 1 family inet address /30 Set fe-1/3/0 unit 3 vlan-id 3 family inet address 54/24 Set fe-1/3/0 unit 1 vlan-id 4 family inet address 10.10. 10.254/24 Set fe-1/3/0 unit 1 vlan-id 5 family inet address 10.10. 8.254/24 Set fe-1/3/0 unit 1 vlan-id 6 family inet address 10.10. 9.254/24 LoopBack 端口配置端口配置:loopback 端口是路由器的一个虚端口,往往用来标识路由器,作为端口是路由器的一个虚端口,往往用来标识路由器,作为 Route ID 使用。使用。 Set lo.0 unit 0 family inet address /32 第 10 页 共 22 页 路由协议配置路由协议配置 OSPFOSPF 协议配置协议配置 Ospf 基本配置基本配置 Terry# edit protocols ospf 进入 OSPF 协议配置 Terry# set ospf area 0 interface 设置路由器接口属于 ospf area 0 Terry# set ospf area 0 interface lo0.0 passive 设置路由器 loopback 接口属于 ospf area 0 Terry# set ospf area 1 interface metric 设置路由器接口属于 ospf area 1 并设置其 metric 值 Terry# set ospf area 1 nssa / stub 区域设置类似区域设置类似,只需将只需将 nssa 改为改为 stub 设置 ospf area 1 为 NSSA 类型 Terry# set ospf area 1 nssa default-lsa default-metric 10 设置 ospf area 1 为 NSSA 类型,并且为 AREA 1 产生一个缺省路由 Terry# set ospf area 1 nssa default-lsa type-7 设置 ospf area 1 为 NSSA 类型,并且不向该区发送 type-3 的 LSA Terry# set ospf area 1 nssa no-summaries 设置 ospf area 1 为 totally NSSA 类型, Terry# set ospf area 1 area-range /22 将 AREA 1 的路由归纳后,传到 AREA 0 OSPF 邻居间认证配置邻居间认证配置 Terry# set ospf area 0 authentication-type md5 在 OSPF 协议 AREA 0 启用 MD5 认证方式 Terry# set ospf area 0 interface interface-name authentication md5 10 key 第 11 页 共 22 页 $9$FJwU6CK 在接口上设置认证密码 Terry# set area 1 authentication-type simple 在 OSPF 协议 AREA 1 启用明文认证方式 Terry# set area 1 interface interface-name authentication simple-password $9$bUY4ZQO 在接口上设置认证密码 路由重发布路由重发布 # 以一个路由器把从 RIP 学来的路由重发布到 OSPF 中为例来说明# 1,配置重发布的策略 Terry# edit policy-options policy-statement rip-ospf 编辑一个策略,名字为 rip-ospf,目的是把从 RIP 学来的路由,发布到 OSPF 中去 terry# set term 1 from protocol rip /来自于 RIP 协议的路由 terry# set term 1 then accept /发布到 OSPF terry# set term 2 from route-filter /24 exact /来自路由表中的一个确定的路由 terry# set term 2 then accept /重发布到 OSPF 中去 terry# set term 3 then reject /其他的路由不做重发布 2,应用重发布的策略 terry# set protocols ospf export rip-ospf OSPF 配置示例配置示例: protocols ospf reference-bandwidth 1g; area authentication-type md5; # Warning: authentication-type is deprecated interface fxp3.1 authentication md5 10 key $9$FJwU6CuKvLX-w; # SECRET-DATA 第 12 页 共 22 页 interface fxp3.2 interface-type nbma; authentication md5 10 key $9$fQ39SyKvLN; # SECRET-DATA interface lo0.3 passive; area nssa default-lsa default-metric 10; metric-type 2; type-7; no-summaries; area-range /22; interface fxp3.3 metric 20; interface fxp3.4 metric 20; se protocols ospf reference-bandwidth 1g se protocols ospf area authentication-type md5 set protocols ospf area interface fxp3.1 authentication md5 10 key $9$FJwU6CuKvLX se protocols ospf area interface fxp3.2 interface-type nbma se protocols ospf area interface fxp3.2 authentication md5 10 key $9$fQ39SyKvLN set protocols ospf area interface lo0.3 passive set protocols ospf area nssa default-lsa default-metric 10 set protocols ospf area nssa default-lsa metric-type 2 set protocols ospf area nssa default-lsa type-7 set protocols ospf area nssa no-summaries set protocols ospf area area-range /22 set protocols ospf area interface fxp3.3 metric 20 set protocols ospf area interface fxp3.4 metric 20 第 13 页 共 22 页 IBGPIBGP 协议配置协议配置 terry# set protocols bgp group type internal 设置一个 IBGP GROUP,类型为 internal terry# set protocols bgp group local-address 设置本地地址,一般为本机 LOOPBACK 地址 terry# set protocols bgp group export 设置路由重发布,把特定的路由发布到 BGP 中去,policy 的写法见 OSPF 中的路由重发布 terry# set protocols bgp group neighbor 设置邻居地址。一般是邻居的 Loopback 地址。 terry# set routing-options autonomous-system 65412 设置本机的 AS 号 案例: terry# set protocols bgp group internal type internal terry# set protocols bgp group internal local-address terry# set protocols bgp group internal export ibgp terry# set protocols bgp group internal neighbor terry# set protocols bgp group internal neighbor terry# set protocols bgp group internal neighbor terry# set protocols bgp group internal neighbor terry# set protocols bgp group internal neighbor terry# set protocols bgp group internal neighbor protocols bgp group internal type internal; local-address ; 第 14 页 共 22 页 export ibgp; neighbor ; neighbor ; neighbor ; neighbor ; neighbor ; neighbor ; EBGPEBGP 协议配置协议配置 terry# set protocols bgp group type external 设置一个 IBGP GROUP,类型为 external terry# set protocols bgp group neighbor peer-as 设置邻居的地址和 AS 号 例:例: terry# set protocols bgp group ext type external terry# set protocols bgp group ext neighbor 4 peer-as 65222 RRRR 配置配置 Terry# set protocols bgp group cluster 通过 Cluster 命令在 BGP 协议中启用 RR 功能, 例:例: set protocols bgp group internal type internal set protocols bgp group internal local-address set protocols bgp group internal cluster set protocols bgp group internal neighbor set protocols bgp group internal neighbor set protocols bgp group internal neighbor set protocols bgp group internal neighbor 第 15 页 共 22 页 set protocols bgp group internal neighbor set protocols bgp group internal neighbor group internal type internal; local-address ; cluster ; neighbor ; neighbor ; neighbor ; neighbor ; neighbor ; neighbor ; * BGP 协议的路由重分发与协议的路由重分发与 OSPF 的路由重分发配置相同的路由重分发配置相同* MPLSMPLS 协议配置协议配置 采用采用 LDP 信令建信令建 LSP terry# set interfaces unit family mpls 首先在接口上配置支持 MPLS 协议 terry# set protocols mpls interface 启用 MPLS 协议,并且指定 MPLS 协议所作用的接口,若为 all 参数时,则所有支持 MPLS 协议的接 口均参与 MPLS 的运行 terry# set protocols ldp interface 启用 LDP 信令协议, 例: terry# set interfaces em7 unit 1 vlan-id 57 terry# set interfaces em7 unit 1 family inet address 0/30 terry# set interfaces em7 unit 1 family iso terry# set interfaces em7 unit 1 family mpls terry# set interfaces em7 unit 2 vlan-id 47 terry# set interfaces em7 unit 2 family inet address 7/30 terry# set interfaces em7 unit 2 family iso 第 16 页 共 22 页 terry# set interfaces em7 unit 2 family mpls terry# set interfaces em7 unit 3 vlan-id 71 terry# set interfaces em7 unit 3 family inet address /30 terry# set interfaces em7 unit 4 vlan-id 404 terry# set interfaces em7 unit 4 family inet address 4/30 terry# set interfaces em7 unit 4 family iso terry# set interfaces em7 unit 4 family mpls terry# set protocols mpls interface all terry# set protocols ldp interface em7.1 terry# set protocols ldp interface em7.2 interfaces em7 unit 1 vlan-id 57; family inet address 0/30; family iso; family mpls; unit 2 vlan-id 47; family inet address 7/30; family iso; family mpls; unit 3 vlan-id 71; family inet address /30; unit 4 vlan-id 404; family inet address 4/30; family iso; family mpls; 第 17 页 共 22 页 lo0 unit 7 family inet address /32; family iso address 49.0002.7777.7777.7777.00; protocols mpls interface all; ldp traffic-statistics file ldp-stats; interval 90; keepalive-interval 5; interface em7.1; interface em7.2; 采用采用 RSVP 信令建信令建 LSP terry# set interfaces unit family mpls 首先在接口上配置支持 MPLS 协议 terry# set protocols mpls interface 启用 MPLS 协议,并且指定 MPLS 协议所作用的接口,若为 all 参数时,则所有支持 MPLS 协议的接 口均参与 MPLS 的运行 terry# set protocols rsvp interface 启用 RSVP 信令协议, RSVP 与 LDP 不同的是,RSVP 不会自动建立 LSP。需要手工建立, 第 18 页 共 22 页 terry# set protocols mpls label-switched-path to 建立并命名一个到另一路由器的 LSP 通道 例:例: terry# set interfaces em7 unit 1 vlan-id 57 terry# set interfaces em7 unit 1 family inet address 0/30 terry# set interfaces em7 unit 1 family iso terry# set interfaces em7 unit 1 family mpls terry# set interfaces em7 unit 2 vlan-id 47 terry# set interfaces em7 unit 2 family inet address 7/30 terry# set interfaces em7 unit 2 family iso terry# set interfaces em7 unit 2 fam

温馨提示

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

评论

0/150

提交评论