MX960运维命令汇总手册V2 下载本文

Juniper MX960 运维管理命令汇总手册

(Version 2)

2017

目录

一、系统操作类 ....................................................................................................................... 4 1. 查看设备的启动时间 .................................................................................................... 5 2. 查看硬件信息 ................................................................................................................ 5 3. 查看系统和硬件告警信息 ............................................................................................ 7 4. 查看设备环境信息 ........................................................................................................ 7 5. 查看机箱温度临界值 .................................................................................................. 10 6. 查看路由引擎状态 ...................................................................................................... 10 7. 查看交换控制板SCB环境状态 .................................................................................. 11 8. 查看矩阵平面工作状态 .............................................................................................. 13 9. 查看机箱风扇工作状态 .............................................................................................. 15 10. 11. 12. 13. 14. 15. 16.

查看PIC卡状态 ...................................................................................................... 16 查看机箱指示灯状态 .............................................................................................. 16 查看PFE状态 .......................................................................................................... 17 查看PFE报文转发状态 .......................................................................................... 18 查看设备的存储系统状态 ...................................................................................... 19 查看电源模块状态 .................................................................................................. 19 查看软件版本信息 .................................................................................................. 20

二、接口相关 ......................................................................................................................... 21 2. 查看接口的概要信息 .................................................................................................. 24 3. 实时监控接口报文转发状态 ...................................................................................... 24 4. 清除动态生成的vlan接口 ........................................................................................ 25 三、用户相关 ......................................................................................................................... 25 2. 查看用户汇总信息 ...................................................................................................... 26 3. 查询dhcpv4中继代理信息 ........................................................................................ 26 4. 查询dhcpv6 中继代理信息 ....................................................................................... 26 5. 查看用户认证信息 ...................................................................................................... 27 6. 查看dhcp中继代理信息汇总 .................................................................................... 27 7. 查看dhcpv6中继代理信息 ........................................................................................ 28 8. 查看ipoe用户信息 .................................................................................................... 29 9. 查看pppoe用户信息 .................................................................................................. 29

10. 11. 12. 13. 14. 15.

查找用户的demux0/pp0接口 ................................................................................ 30 查看某一个IPoE用户信息 .................................................................................... 30 查看某一个pppoe用户的信息 .............................................................................. 31 清除动态生成的vlan接口 .................................................................................... 32 强制pppoe用户下线 .............................................................................................. 33 强制ipoe用户下线 ................................................................................................ 33

四、路由相关 ......................................................................................................................... 33 1. 查看所有路由 .............................................................................................................. 33 2. 查看ospf路由 ............................................................................................................ 34 3. 指定路由表做路由查询 .............................................................................................. 34 4. 查看ospf 邻居 ........................................................................................................... 35 5. 查看ospfv3邻居 ........................................................................................................ 35 6. Windows系统主机Pathping命令 ............................................................................. 35 五、调试跟踪 ......................................................................................................................... 36 1. 查看接口光功率 .......................................................................................................... 36 2. 抓接口流量包 .............................................................................................................. 37 六、升级系统 ......................................................................................................................... 39 1. 文件位置...................................................................................................................... 39 2. 双RE升级步骤 ............................................................................................................ 39

一、系统操作类

1. 查看设备的启动时间

root@MX960_weihai> show system uptime Current time: 2013-03-23 10:41:03 CST

System booted: 2013-03-22 21:13:15 CST (13:27:48 ago) Protocols started: 2013-03-22 21:14:14 CST (13:26:49 ago)

Last configured: 2013-03-23 10:09:02 CST (00:32:01 ago) by root 10:41AM up 13:28, 1 user, load averages: 0.00, 0.01, 0.00

root@MX960_weihai>

【说明】

本命令可以检测设备当前运行时钟是否准确,以及设备持续运行时长等。

2. 查看硬件信息

root@MX960_weihai> show chassis hardware Hardware inventory:

Item Version Part number Serial number Description Chassis JN1145ED3AFA MX960 Midplane REV 03 710-013698 ABAA2575 MX960 Backplane

FPM Board REV 03 710-014974 XE4393 Front Panel Display

PDM Rev 03 740-013110 QCS1330501Y Power Distribution Module

PEM 0 Rev 04 740-013682 QCS1239405H PS 1.7kW; 200-240VAC in

PEM 1 Rev 04 740-013682 QCS1247404F PS 1.7kW; 200-240VAC in

PEM 2 Rev 04 740-013682 QCS1247404K PS 1.7kW; 200-240VAC in

Routing Engine 0 REV 05 740-031118 9009065561 RE-S-1800x4 CB 0 REV 12 710-021523 CAAA7848 MX SCB CB 1 REV 05 710-021523 XT5801 MX SCB

FPC 2 REV 25 750-031089 CAAC3032 MPC Type 2 3D CPU REV 08 711-030884 CAAB7298 MPC PMB 2G MIC 0 REV 26 750-028392 CAAC8065 3D 20x 1GE(LAN) SFP

PIC 0 BUILTIN BUILTIN 10x 1GE(LAN) SFP Xcvr 0 25774A NON-JNPR WHTDCN13043270 SFP-LX10 Xcvr 1 NON-JNPR MTD11012682 PIC 1 BUILTIN BUILTIN Xcvr 0 NON-JNPR 37A8020 MIC 1 REV 27 750-028387 CAAB8096 XFP

PIC 2 BUILTIN BUILTIN Xcvr 0 NON-JNPR KBS00LF Xcvr 1 NON-JNPR KBQ02AQ PIC 3 BUILTIN BUILTIN Xcvr 0 NON-JNPR KCJ0022 Xcvr 1 NON-JNPR KBR02D4 Fan Tray 0 REV 05 740-014971 VS6983 Fan Tray 1 REV 05 740-014971 VS6488 【说明】

本命令可以检测设备硬件的详细信息: PEM:电源模块

Routing Engine:路由引擎板 CB:SCB板,交换控制板 FPC:Flexible PIC Concentrator PIC:Physical Interface Card 物理接口卡

MPC:Modular Port Concentrator模块化端口集中器 MIC:Modular Interface Card模块化接口卡 SFP-SX:多模SFP光模块 SFP-T:SFP电口模块

SFP-LH:单模70Km SFP光模块 SFP-LX10:单模10Km SFP光模块 XFP-10G-ER:单模40Km10GE光模块

SFP-T 10x 1GE(LAN) SFP UNSUPPORTED 3D 4x 10GE 2x 10GE XFP XFP-10G-LR XFP-10G-LR 2x 10GE XFP XFP-10G-LR XFP-10G-LR Fan Tray Fan Tray XFP-10G-LR:单模10Km 10GE光模块 Fan Tray:风扇

3. 查看系统和硬件告警信息

root@MX960_weihai> show system alarms 4 alarms currently active

Alarm time Class Description

2012-08-02 21:43:39 CST Minor Require a Fan Tray upgrade 2012-08-02 21:42:44 CST Major PEM 2 Input Failure 2012-08-02 21:42:44 CST Major PEM 2 Not OK

2012-08-02 21:42:34 CST Major Host 0 fxp0 : Ethernet Link Down

root@MX960_weihai> show chassis alarms 4 alarms currently active

Alarm time Class Description

2012-08-02 21:43:39 CST Minor Require a Fan Tray upgrade 2012-08-02 21:42:44 CST Major PEM 2 Input Failure 2012-08-02 21:42:44 CST Major PEM 2 Not OK

2012-08-02 21:42:34 CST Major Host 0 fxp0 : Ethernet Link Down

【说明】

上述命令可以检测设备硬件和系统告警信息。

4. 查看设备环境信息

root@MX960_weihai> show chassis environment

Class Item Status Measurement

Temp PEM 0 OK 40 degrees C / 104 degrees F

PEM 1 OK 40 degrees C / 104 degrees F

PEM 2 Check PEM 3 Absent

Routing Engine 0 OK 28 degrees C / 82 degrees F Routing Engine 0 CPU OK 25 degrees C / 77 degrees F Routing Engine 1 Absent

CB 0 Intake OK 25 degrees C / 77 degrees F

CB 0 Exhaust A OK 26 degrees C / 78 degrees F CB 0 Exhaust B OK 28 degrees C / 82 degrees F CB 0 ACBC OK 26 degrees C / 78 degrees F

CB 0 SF A OK 38 degrees C / 100 degrees F

CB 0 SF B CB 1 Intake CB 1 Exhaust A CB 1 Exhaust B CB 1 ACBC F

CB 1 SF A F

CB 1 SF B CB 2 Intake CB 2 Exhaust A CB 2 Exhaust B CB 2 ACBC CB 2 XF A CB 2 XF B FPC 2 Intake FPC 2 Exhaust A FPC 2 Exhaust B FPC 2 LU 0 TCAM TSen F

FPC 2 LU 0 TCAM Chip F

FPC 2 LU 0 TSen F

OK OK OK OK OK OK OK Absent Absent Absent Absent Absent Absent OK OK OK OK OK OK 31 degrees C / 87 degrees F 24 degrees C / 75 degrees F 24 degrees C / 75 degrees F 27 degrees C / 80 degrees F 24 degrees C / 75 degrees 36 degrees C / 96 degrees 32 degrees C / 89 degrees F 28 degrees C / 82 degrees F 33 degrees C / 91 degrees F 29 degrees C / 84 degrees F 41 degrees C / 105 degrees 44 degrees C / 111 degrees 41 degrees C / 105 degrees

FPC 2 LU 0 Chip OK 50 degrees C / 122 degrees F

FPC 2 MQ 0 TSen OK 41 degrees C / 105 degrees F

FPC 2 MQ 0 Chip OK 46 degrees C / 114 degrees F

FPC 2 LU 1 TCAM TSen F

FPC 2 LU 1 TCAM Chip F

FPC 2 LU 1 TSen F

FPC 2 LU 1 Chip F

FPC 2 MQ 1 TSen degrees F

FPC 2 MQ 1 Chip F

Fans Top Fan Tray Temp Top Tray Fan 1 Top Tray Fan 2 Top Tray Fan 3 Top Tray Fan 4 Top Tray Fan 5 Top Tray Fan 6 Bottom Fan Tray Temp Bottom Tray Fan 1 Bottom Tray Fan 2 Bottom Tray Fan 3 Bottom Tray Fan 4 OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK 40 degrees C / 104 degrees 41 degrees C / 105 degrees 40 degrees C / 104 degrees 45 degrees C / 113 degrees 40 degrees C / 104 45 degrees C / 113 degrees 23 degrees C / 73 degrees F Spinning at normal speed Spinning at normal speed Spinning at normal speed Spinning at normal speed Spinning at normal speed Spinning at normal speed 22 degrees C / 71 degrees F Spinning at normal speed Spinning at normal speed Spinning at normal speed Spinning at normal speed

Bottom Tray Fan 5 OK Spinning at normal speed Bottom Tray Fan 6 OK Spinning at normal speed 【说明】

本命令可以检测设备硬件的在线状态、温度及风扇的工作状态。MX960可以自动根据温度情况自动调整风扇的运转速度。

5. 查看机箱温度临界值

root@MX960_weihai> show chassis temperature-thresholds Fan speed Yellow alarm Red alarm

(degrees C) (degrees C) (degrees C) Item Normal High Normal Bad fan Normal Bad fan

Chassis default 48 54 65 55 75 65

Routing Engine 0 70 80 95 95 110 110

FPC 2 55 60 75 65 90 80

【说明】

本命令提供了系统设定的以下参数:(1)风扇正常运转和高速运转所对应的温度临界值;(2)设备硬件正常情况下的黄色/红色告警所对应的温度临界值;(3)风扇故障后的黄色/红色告警对应的温度临界值。

6. 查看路由引擎状态

user@MX960> show chassis routing-engine

Routing Engine status: Slot 0:

Current state Master

Election priority Master (default)

Temperature 27 degrees C / 80 degrees F CPU temperature 25 degrees C / 77 degrees F DRAM 17152 MB Memory utilization 14 percent CPU utilization:

User 1 percent Background 0 percent Kernel 4 percent Interrupt 1 percent Idle 94 percent

Model RE-S-1800x4 Serial ID 9009104810

Start time 2012-10-19 13:02:29 CST

Uptime 3 days, 4 hours, 53 minutes, 49 seconds Last reboot reason Router rebooted after a normal shutdown. Load averages: 1 minute 5 minute 15 minute 0.07 0.09 0.04 Routing Engine status: Slot 1:

Current state Backup

Election priority Backup (default)

Temperature 27 degrees C / 80 degrees F CPU temperature 26 degrees C / 78 degrees F DRAM 17152 MB Memory utilization 12 percent CPU utilization:

User 0 percent Background 0 percent Kernel 0 percent Interrupt 1 percent Idle 99 percent

Model RE-S-1800x4 Serial ID 9009104808

Start time 2012-10-19 13:02:28 CST

Uptime 3 days, 4 hours, 53 minutes, 34 seconds Last reboot reason Router rebooted after a normal shutdown. 【说明】

本命令可以检查MX960的双引擎工作状态。通常情况下,位于slot 0的引擎工作在主用模式,slot 1的引擎工作在备用模式。当位于slot 1的引擎作为主用时,机箱告警指示灯亮(黄色告警)。如果是系统自动进行了主备引擎切换,则需要排查切换的原因。在本命令输出信息中,可以观察到路由引擎的工作模式(master/backup),内存、CPU使用率以及引擎重启的原因。 如果Interrupt进程占用CPU资源较高、CPU/内存使用率超过50%,则需要排查原因。

7. 查看交换控制板SCB环境状态

user@MX960> show chassis environment cb

CB 0 status:

State Online Master

Temperature 25 degrees C / 77 degrees F Power 1

1.2 V 1205 mV 1.25 V 1269 mV 1.5 V 1517 mV 1.8 V 1817 mV

2.5 V 2520 mV 3.3 V 3319 mV 3.3 V SM3 3300 mV 5.0 V 5046 mV 5.0 V RE 5066 mV 12.0 V 11968 mV 12.0 V RE 11833 mV Power 2

4.6 V bias MidPlane 4846 mV 11.3 V bias PEM 11.3 V bias FPD 11.3 V bias POE 0 11.3 V bias POE 1 Bus Revision FPGA Revision CB 1 status: State Temperature Power 1 1.2 V 1.25 V 1.5 V 1.8 V 2.5 V 3.3 V 3.3 V SM3 5.0 V 5.0 V RE 12.0 V 12.0 V RE Power 2 4.6 V bias MidPlane 11.3 V bias PEM 11.3 V bias FPD 11.3 V bias POE 0 11.3 V bias POE 1 Bus Revision FPGA Revision CB 2 status: State Temperature Power 1 1.2 V 1.25 V 11350 mV 11272 mV 11272 mV 11292 mV 43 9

Online Standby

25 degrees C / 77 degrees F

1208 mV 1269 mV 1517 mV 1807 mV 2520 mV 3338 mV 3306 mV 5104 mV 5104 mV 12181 mV 12046 mV

4853 mV 11253 mV 11369 mV 11369 mV 11253 mV 43 8

Online

25 degrees C / 77 degrees F

1202 mV 1260 mV

1.5 V 1514 mV 1.8 V 1811 mV 2.5 V 2520 mV 3.3 V 3345 mV 3.3 V SM3 3293 mV 5.0 V 5059 mV 5.0 V RE 5098 mV 12.0 V 12084 mV 12.0 V RE 0 mV Power 2

4.6 V bias MidPlane 4846 mV 11.3 V bias PEM 11350 mV 11.3 V bias FPD 11311 mV 11.3 V bias POE 0 11311 mV 11.3 V bias POE 1 11292 mV Bus Revision 43 FPGA Revision 0

【说明】

本命令可以检查交换控制板是否工作正常(online),温度、供电情况是否正常。

8. 查看矩阵平面工作状态

user@MX960> show chassis fabric plane

Fabric management PLANE state Plane 0

Plane state: ACTIVE FPC 0

PFE 0 :Links ok PFE 1 :Links ok FPC 1

PFE 0 :Links ok PFE 1 :Links ok Plane 1

Plane state: ACTIVE FPC 0

PFE 0 :Links ok PFE 1 :Links ok FPC 1

PFE 0 :Links ok PFE 1 :Links ok Plane 2

Plane state: ACTIVE FPC 0

PFE 0 :Links ok

PFE 1 :Links ok FPC 1

PFE 0 :Links ok PFE 1 :Links ok Plane 3

Plane state: ACTIVE FPC 0

PFE 0 :Links ok PFE 1 :Links ok FPC 1

PFE 0 :Links ok PFE 1 :Links ok Plane 4

Plane state: ACTIVE FPC 0

PFE 0 :Links ok PFE 1 :Links ok FPC 1

PFE 0 :Links ok PFE 1 :Links ok Plane 5

Plane state: ACTIVE FPC 0

PFE 0 :Links ok PFE 1 :Links ok FPC 1

PFE 0 :Links ok PFE 1 :Links ok 【说明】

本命令可以检查交换矩阵是否工作正常(ACTIVE),交换矩阵与PFE之间互联高速链路HSL工作是否正常。

MPC卡与交换矩阵互联示意图:

9. 查看机箱风扇工作状态

user@MX960> show chassis fan

Item Status RPM Measurement

Top Tray Fan 1 OK 3790 Spinning at normal speed Top Tray Fan 2 OK 3769 Spinning at normal speed Top Tray Fan 3 OK 3790 Spinning at normal speed Top Tray Fan 4 OK 3790 Spinning at normal speed Top Tray Fan 5 OK 3790 Spinning at normal speed Top Tray Fan 6 OK 3769 Spinning at normal speed Top Tray Fan 7 OK 3769 Spinning at normal speed Top Tray Fan 8 OK 3790 Spinning at normal speed Top Tray Fan 9 OK 3790 Spinning at normal speed Top Tray Fan 10 OK 3790 Spinning at normal speed Top Tray Fan 11 OK 3769 Spinning at normal speed Top Tray Fan 12 OK 3790 Spinning at normal speed Bottom Tray Fan 1 OK 3790 Spinning at normal speed Bottom Tray Fan 2 OK 3790 Spinning at normal speed Bottom Tray Fan 3 OK 3790 Spinning at normal speed Bottom Tray Fan 4 OK 3769 Spinning at normal speed Bottom Tray Fan 5 OK 3790 Spinning at normal speed Bottom Tray Fan 6 OK 3790 Spinning at normal speed Bottom Tray Fan 7 OK 3769 Spinning at normal speed

Bottom Tray Fan 8 OK 3790 Spinning at normal speed Bottom Tray Fan 9 OK 3769 Spinning at normal speed Bottom Tray Fan 10 OK 3769 Spinning at normal speed Bottom Tray Fan 11 OK 3769 Spinning at normal speed Bottom Tray Fan 12 OK 3790 Spinning at normal speed

【说明】

本命令可以检查机箱上、下两组风扇托盘(每组12个风扇)的工作状态是否正常,风扇可以根据温度情况,自动调整转速,以促进通风降温。

10. 查看PIC卡状态

user@MX960> show chassis fpc pic-status

Slot 0 Online MPC Type 2 3D PIC 0 Online 10x 1GE(LAN) SFP PIC 1 Online 10x 1GE(LAN) SFP PIC 2 Online 2x 10GE XFP PIC 3 Online 2x 10GE XFP Slot 1 Online MPC Type 2 3D PIC 0 Online 10x 1GE(LAN) SFP PIC 1 Online 10x 1GE(LAN) SFP PIC 2 Online 2x 10GE XFP PIC 3 Online 2x 10GE XFP 【说明】

本命令可以检查物理接口卡PIC的在线状态。PIC 0和PIC 1同属一张20端口GE MIC卡,PIC 2和PIC 3同属一张4端口10GE MIC卡。

11. 查看机箱指示灯状态

user@MX960> show chassis craft-interface

Front Panel System LEDs: Routing Engine 0 1 --------------------------

OK * * Fail . . Master * .

Front Panel Alarm Indicators: ----------------------------- Red LED . Yellow LED . Major relay . Minor relay .

Front Panel FPC LEDs:

FPC 0 1 2 3 4 5 6 7 8 9 10 11 ------------------------------------------------------

Red . . . . . . . . . . . . Green * * . . . . . . . . . .

CB LEDs:

CB 0 1 2

---------------- Amber . . . Green * * *

PS LEDs:

PS 0 1 2 3 --------------------

Red . . . . Green * * * *

Fan Tray LEDs: FT 0 1 ------------ Red . . Green * * 【说明】

本命令可以远程查看机箱状态指示灯的工作情况,“*”标识该指示灯亮。

12. 查看PFE状态

user@MX960> show pfe statistics error

Slot 0

HSL2 Errors: ------------

***** No errors on this PFE *****

Slot 1

HSL2 Errors: ------------

***** No errors on this PFE *****

【说明】

本命令可以检查包转发引擎PFE与交换矩阵之间通信错误计数器状态。HSL是PFE与Fabric之间内部高速互联链路。

13. 查看PFE报文转发状态

user@MX960>show pfe statistics traffic fpc 0

Packet Forwarding Engine traffic statistics:

Input packets: 229817436878 48781 pps Output packets: 215271351596 54244 pps Packet Forwarding Engine local traffic statistics: Local packets input : 342628638 Local packets output : 348251187 Software input control plane drops : 0 Software input high drops : 0 Software input medium drops : 0 Software input low drops : 0 Software output drops : 0 Hardware input drops : 0 Packet Forwarding Engine local protocol statistics:

HDLC keepalives : 0 ATM OAM : 0 Frame Relay LMI : 0 PPP LCP/NCP : 0 OSPF hello : 7467689 OSPF3 hello : 850082 RSVP hello : 0 LDP hello : 0 BFD : 0 IS-IS IIH : 0 LACP : 0 ARP : 291726 ETHER OAM : 0 Unknown : 12162 Packet Forwarding Engine hardware discard statistics:

Timeout : 0 Truncated key : 0 Bits to test : 0 Data error : 0 Stack underflow : 0 Stack overflow : 0 Normal discard : 90969866 Extended discard : 0 Invalid interface : 0 Info cell drops : 0 Fabric drops : 0

Packet Forwarding Engine Input IPv4 Header Checksum Error and Output MTU Error statistics:

Input Checksum : 0 Output MTU : 14 【说明】

本命令可以检查包转发引擎PFE对报文的转发状态。输出信息的详细解释详见:

http://www.juniper.net/techpubs/en_US/junos10.4/topics/reference/command-summary/show-pfe-statistics-traffic.html?searchid=1353662655735 14. 查看设备的存储系统状态

user@MX960> show system storage

Filesystem Size Used Avail Capacity Mounted on /dev/ad0s1a 3.3G 264M 2.8G 8% / devfs 1.0K 1.0K 0B 100% /dev

/dev/md0 40M 40M 0B 100% /packages/mnt/jbase

/dev/md1 20M 20M 0B 100% /packages/mnt/jkernel64-11.4X27.28

/dev/md2 61M 61M 0B 100% /packages/mnt/jpfe-X960-11.4X27.28

/dev/md3 5.0M 5.0M 0B 100% /packages/mnt/jdocs-11.4X27.28

/dev/md4 78M 78M 0B 100% /packages/mnt/jroute-11.4X27.28

/dev/md5 45M 45M 0B 100% /packages/mnt/jpfe-common-11.4X27.28

/dev/md6 387M 387M 0B 100% /packages/mnt/jruntime-11.4X27.28

/dev/md7 7.9G 14K 7.2G 0% /tmp /dev/md8 7.9G 20M 7.2G 0% /mfs /dev/ad0s1e 377M 70K 347M 0% /config procfs 4.0K 4.0K 0B 100% /proc /dev/ad1s1f 18G 1.2G 15G 7% /var 【说明】

本命令可以检查设备的内置flash和硬盘的使用情况,其中ad0是flash卡,ad1是硬盘。

15. 查看电源模块状态

user@MX960> show chassis power

PEM 0:

State: Online

AC input: OK (2 feed expected, 2 feed connected) Capacity: 4100 W (maximum 4100 W)

DC output: 114 W (zone 0, 2 A at 57 V, 2% of capacity)

PEM 1:

State: Online

AC input: OK (2 feed expected, 2 feed connected) Capacity: 4100 W (maximum 4100 W)

DC output: 342 W (zone 1, 6 A at 57 V, 8% of capacity)

PEM 2:

State: Online

AC input: OK (2 feed expected, 2 feed connected) Capacity: 4100 W (maximum 4100 W)

DC output: 171 W (zone 0, 3 A at 57 V, 4% of capacity)

PEM 3:

State: Online

AC input: OK (2 feed expected, 2 feed connected) Capacity: 4100 W (maximum 4100 W)

DC output: 285 W (zone 1, 5 A at 57 V, 6% of capacity)

System: Zone 0:

Capacity: 4100 W (maximum 4100 W) Allocated power: 710 W (3390 W remaining) Actual usage: 285 W Zone 1:

Capacity: 4100 W (maximum 4100 W) Allocated power: 1256 W (2844 W remaining) Actual usage: 627 W

Total system capacity: 8200 W (maximum 8200 W) Total remaining power: 6234 W

【说明】

本命令可以检查电源模块的功率,当前供电情况。在高性能供电电源配置下,MX960采用分区供电的模式。从机箱后侧从左至右,PEM 0和PEM 2位于一个供电区域,为底部风扇、机箱第6至11槽位、SCB的第1、2槽位供电;PEM 1和PEM 3位于一个供电区域,为顶部风扇、机箱第0至5槽位、SCB的第0槽位供电。 采用高性能供电电源配置,每个供电区域至少需要1个电源模块;而普通性能供电电源配置,则至少需要3个(不分区)。

16. 查看软件版本信息

user@MX960> show version

Hostname: re0-SNNU-CA-CORE-2 Model: mx960

JUNOS Base OS boot [11.4X27.35]

JUNOS Base OS Software Suite [11.4X27.35] JUNOS 64-bit Kernel Software Suite [11.4X27.35] JUNOS Crypto Software Suite [11.4X27.35]

JUNOS Packet Forwarding Engine Support (M/T Common) [11.4X27.35] JUNOS Packet Forwarding Engine Support (MX Common) [11.4X27.35] JUNOS Online Documentation [11.4X27.35]

JUNOS Voice Services Container package [11.4X27.35] JUNOS Border Gateway Function package [11.4X27.35] JUNOS Services AACL Container package [11.4X27.35] JUNOS Services LL-PDF Container package [11.4X27.35] JUNOS Services PTSP Container package [11.4X27.35] JUNOS Services Stateful Firewall [11.4X27.35] JUNOS Services NAT [11.4X27.35]

JUNOS Services Application Level Gateways [11.4X27.35]

JUNOS Services Captive Portal and Content Delivery Container package [11.4X27.35] JUNOS Services RPM [11.4X27.35]

JUNOS Services HTTP Content Management package [11.4X27.35] JUNOS AppId Services [11.4X27.35] JUNOS IDP Services [11.4X27.35] JUNOS Services Crypto [11.4X27.35] JUNOS Services SSL [11.4X27.35] JUNOS Services IPSec [11.4X27.35]

JUNOS Runtime Software Suite [11.4X27.35] JUNOS Routing Software Suite [11.4X27.35]

【说明】

本命令可以查看系统运行的软件版本号及该版本所支持的特性集。

二、接口相关

1.

查看接口的详细信息

user@MX960>show interfaces extensive

Physical interface: ge-0/0/0, Enabled, Physical link is Up Interface index: 153, SNMP ifIndex: 596, Generation: 243 Description: SNNU-CA-Jiao11Lou

Link-level type: Ethernet-Bridge, MTU: 1514, Speed: 1000mbps, BPDU Error: None, MAC-REWRITE Error: None, Loopback: Disabled,

Source filtering: Disabled, Flow control: Enabled, Auto-negotiation: Enabled, Remote fault: Online

Device flags : Present Running

Interface flags: SNMP-Traps Internal: 0x20004000

Link flags : None

CoS queues : 8 supported, 8 maximum usable queues Hold-times : Up 0 ms, Down 0 ms

Current address: a8:d0:e5:f5:a8:00, Hardware address: a8:d0:e5:f5:a8:00 Last flapped : 2012-11-03 10:37:34 CST (2w6d 05:50 ago) Statistics last cleared: Never Traffic statistics:

Input bytes : 3475908979241 6745888 bps Output bytes : 3401541976098 1378400 bps Input packets: 4412354900 783 pps Output packets: 4166125749 515 pps IPv6 transit statistics:

Input bytes : 0 Output bytes : 0 Input packets: 0 Output packets: 0 Dropped traffic statistics due to STP State: Input bytes : 2784 Output bytes : 40319 Input packets: 40 Output packets: 43 Input errors:

Errors: 0, Drops: 0, Framing errors: 0, Runts: 0, Policed discards: 0, L3 incompletes: 0, L2 channel errors: 0, L2 mismatch timeouts: 0, FIFO errors: 0, Resource errors: 0 Output errors:

Carrier transitions: 5, Errors: 0, Drops: 0, Collisions: 0, Aged packets: 0, FIFO errors: 0, HS link CRC errors: 0, MTU errors: 0, Resource errors: 0 Egress queues: 8 supported, 4 in use

Queue counters: Queued packets Transmitted packets Dropped packets 0 best-effort 4157224115 4157224115 1 expedited-fo 0 0 2 assured-forw 0 0 3 network-cont 10124427 10124427 Queue number: Mapped forwarding classes 0 best-effort

1 expedited-forwarding 2 assured-forwarding 3 network-control Active alarms : None Active defects : None

MAC statistics: Receive Transmit Total octets 3493558984138 3477772788721 Total packets 4412355387 4167348690

0 0 0 0 Unicast packets 4410292132 4160756726 Broadcast packets 8009 190 Multicast packets 2055246 6591774 CRC/Align errors 0 0 FIFO errors 0 0 MAC control frames 0 0 MAC pause frames 0 0 Oversized frames 0 Jabber frames 0 Fragment frames 0 VLAN tagged frames 0 Code violations 0 Filter statistics:

Input packet count 4412354589 Input packet rejects 0 Input DA rejects 0 Input SA rejects 0

Output packet count 4167348267 Output packet pad count 0 Output packet error count 0 CAM destination filters: 0, CAM source filters: 0 Autonegotiation information: Negotiation status: Complete Link partner:

Link mode: Full-duplex, Flow control: Symmetric, Remote fault: OK Local resolution:

Flow control: Symmetric, Remote fault: Link OK Packet Forwarding Engine configuration: Destination slot: 0 CoS information:

Direction : Output

CoS transmit queue Bandwidth Buffer Priority Limit % bps % usec

0 best-effort 95 950000000 95 0 low none

3 network-control 5 50000000 5 0 low none

Interface transmit statistics: Disabled

【说明】

本命令输出的信息很多,平时故障排查时,主要观察接口下是否有error报文,接口状态是否up,有没有载波丢失,双工、速率、MTU等信息是否正常。

2. 查看接口的概要信息

user@MX960> show interfaces terse

Interface Admin Link Proto Local Remote ge-0/0/0 up up

ge-0/0/0.0 up up bridge ge-0/0/1 up up

ge-0/0/1.0 up up bridge ge-0/0/2 up down

ge-0/0/2.0 up down multiservice ---(more 19%)---[abort]

【说明】

本命令可以检查接口的状态,以及该接口工作在二层(bridge)还是三层(inet/inet6)。

3. 实时监控接口报文转发状态

user@MX960> monitor interface ge-0/0/0

re0-SNNU-CA-CORE-2 Seconds: 18 Time: 18:22:29 Delay: 5/0/5 Interface: ge-0/0/0, Enabled, Link is Up Encapsulation: Ethernet, Speed: 1000mbps

Traffic statistics: Current delta Input bytes: 145213786382 (2605032 bps) [8202565] Output bytes: 57042305177 (167296 bps) [2271679] Input packets: 150728829 (288 pps) [7993] Output packets: 112576312 (209 pps) [6570] Error statistics:

Input errors: 0 [0] Input drops: 0 [0] Input framing errors: 0 [0] Policed discards: 0 [0] L3 incompletes: 0 [0] L2 channel errors: 0 [0] L2 mismatch timeouts: 0 [0] Carrier transitions: 5 [0] Output errors: 0 [0] Output drops: 0 [0] Aged packets: 0 [0] Active alarms : None Active defects: None

Input MAC/Filter statistics:

Unicast packets 186056424 [7750] Broadcast packets 820253 [27]

Multicast packets 774591 [41] Oversized frames 0 [0] Packet reject count 409324 [51] DA rejects 0 [0] SA rejects 0 [0] Output MAC/Filter Statistics:

Unicast packets 150677786 [6170] Broadcast packets 2457091 [82] Multicast packets 1557774 [50] Packet pad count 0 [0] Packet error count 0 [0] 【说明】

本命令可以实时查看接口的报文转发流量。

4. 清除动态生成的vlan接口

user@MX960>clear auto-configuration interfaces xe-0/2/1

【说明】

本命令可以手动清除动态生成的VLAN接口,慎用!

如接口下有分配的DHCP地址,则接口无法清除。可用如下方法清除 set interfaces ge-4/0/2 disable commit

run clear dhcp server binding interface ge-4/0/2.1073892537 run clear dhcpv6 server binding interface ge-4/0/2.1073892537 run clear auto-configuration interfaces ge-4/0/2 delete interfaces ge-4/0/2 disable commit

三、用户相关

1.

查看用户信息

user@MX960> show subscribers

Interface IP Address/VLAN ID User Name LS:RI xe-0/2/1.10737420200x8100.11590x8100.315default:default

pp0.1073749744 10.155.2.99 bigang default:default

pp0.1073749746 10.155.2.101 ttyqqq default:default demux0.10737424702001:da8:4001:3:5a2d:78ca:542f:71f8snnu default:default demux0.1073750284 10.143.0.154 Juniper default:default ---(more)--- 【说明】

本命令可以查看查看到用户的vlan接口,内外层VLAN标记,pppoe用户接口、demux0用户接口及相关ip、用户名(ipoe用户在这里看到的是DHCP配置里的公共账号)、所在的逻辑系统(LS)和路由实例(RI)。

2. 查看用户汇总信息

user@MX960> show subscribers summary

Subscribers by State Active: 830 Total: 830

Subscribers by Client Type DHCP: 331 VLAN: 366 PPPoE: 133 Total: 830 【说明】

本命令可以从用户状态和用户类型两种方式查看到所有用户的汇总信息,其中DHCP用户数包括ip4/v6的用户数,VLAN数则包括ipoe/pppoe用户的总的vlan个数。

3. 查询dhcpv4中继代理信息

user@MX960> show dhcprelay binding

IP address Session Id Hardware address Expires State Interface

10.143.2.62 113081 00:00:e2:94:e4:cc 1075 BOUND xe-0/2/1.1073771813 10.143.0.136111568 00:01:4a:9f:f2:e1 1097 BOUND xe-0/2/1.1073752335 10.143.2.106 112609 00:01:6c:57:2f:30 1080 BOUND xe-0/2/1.1073775016 ---(more)--- 【说明】

本命令可以查看用户ipv4地址的绑定信息,包括用户ipv4地址、会话id、主机MAC地址、DHCP租期超期时间及绑定的vlan接口。

4. 查询dhcpv6 中继代理信息

user@MX960> show dhcpv6 relay binding

Prefix Session Id Expires State Interface Client DUID

2001:da8:4001:3:3e8c:c1f6:92b5:3bf6/128 113188 1327 BOUND xe-0/2/1.1073772614 LL0x1-d4:85:64:40:44:5d

2001:da8:4001:3:3d38:c660:332a:7630/128 110192 1365 BOUND xe-0/2/1.1073774241 LL_TIME0x1-0x1272aace-00:25:64:d6:33:f0

2001:da8:4001:3:f330:5530:1cb:64da/128 104660 1727 BOUND xe-0/2/1.1073772599 LL_TIME0x1-0x12b66b06-00:1f:16:34:f5:96

2001:da8:4001:3:ff15:5184:e6c2:991b/128 110833 1011 BOUND xe-0/2/1.1073774439 LL_TIME0x1-0x139fab9a-c8:0a:a9:a7:1e:ed

2001:da8:4001:3:e0ae:6088:20c9:8687/128 112516 1546 BOUND xe-0/2/1.1073774976 LL_TIME0x1-0x13c5f89c-b8:ac:6f:a2:75:4e ---(more)--- 【说明】

本命令可以查看用户ipv6地址的绑定信息,包括用户ipv6地址、会话id、主机MAC地址(位于Client DUID的中横线后面部分)、DHCP租期超期时间及绑定的vlan接口。

5. 查看用户认证信息

user@MX960> show network-access aaa statistics authentication

Authentication module statistics Requests received: 22457 Multistack requests: 0 Accepts: 22188 Rejects: 269 Challenges: 0

Requests timed out: 0 【说明】

本命令查看的是authd进程的信息,在输出信息中可以检查用户发起认证的次数、认证通过accept的次数、以及被拒绝reject(认证没有通过)、Radius服务器没有响应导致超时的次数。

6. 查看dhcp中继代理信息汇总

user@MX960>show dhcp relay statistics

Packets dropped:

Total 25174 Bad hardware address 1140 Interface not configured 20076 Send error 18 Authentication 3743 Inactive VLAN 185 No binding found 11 dhcp-service total 1

Messages received:

BOOTREQUEST 114527 DHCPDECLINE 0

DHCPDISCOVER 24867 DHCPINFORM 10666

DHCPRELEASE 58 DHCPREQUEST 78936

Messages sent:

BOOTREPLY 93782 DHCPOFFER 17044 DHCPACK 76612 DHCPNAK 126 DHCPFORCERENEW 0

Packets forwarded:

Total 61 BOOTREQUEST 0 BOOTREPLY 61

【说明】

本命令可以查看到用户dhcpv4中继报文收发状态的详细信息。详细信息请查看:

http://www.juniper.net/techpubs/en_US/junos11.4/topics/reference/command-summary/show-dhcp-relay-statistics.html

7. 查看dhcpv6中继代理信息

user@MX960> show dhcpv6 relay statistics

Dhcpv6 Packets dropped:

Total 4619 Bad Send 10 Inactive VLAN 13 No binding found 4596

Messages received:

DHCPV6_DECLINE 0 DHCPV6_SOLICIT 13964 DHCPV6_INFORMATION_REQUEST 1086 DHCPV6_RELEASE 313 DHCPV6_REQUEST 3205 DHCPV6_CONFIRM 3169 DHCPV6_RENEW 13001 DHCPV6_REBIND 144 DHCPV6_RELAY_FORW 0

Messages sent:

DHCPV6_ADVERTISE 9642 DHCPV6_REPLY 16536 DHCPV6_RECONFIGURE 0 DHCPV6_RELAY_REPL 0

【说明】

本命令可以查看到用户dhcpv6中继报文收发状态的详细信息。详细信息请查看:

http://www.juniper.net/techpubs/en_US/junos11.4/topics/reference/command-summary/show-dhcpv6-relay-statistics.html?searchid=1353662655735

8. 查看ipoe用户信息

user@MX960> show subscribers client-type dhcp

Interface IP Address/VLAN ID User Name LS:RI

demux0.1073742470 2001:da8:4001:3:5a2d:78ca:542f:71f8 default:default

demux0.1073744646 2001:da8:4001:3:5715:4b84:4fb1:d55a default:default

demux0.1073750013 10.143.0.64 default:default

demux0.1073750110 10.143.0.52 default:default

demux0.1073750140 10.143.0.36 default:default

demux0.1073750233 10.143.1.163 default:default

demux0.1073750248 10.143.2.182 default:default

demux0.1073750282 10.143.1.119 default:default ---(more)--- 【说明】

本命令可以分类查看ipoe用户的接入信息。

9. 查看pppoe用户信息

user@MX960> show subscribers client-type pppoe

Interface IP Address/VLAN ID LS:RI

pp0.1073749744 10.155.2.99 default:default

pp0.1073749746 10.155.2.101 default:default

pp0.1073749748 10.155.2.100 default:default

pp0.1073749749 10.155.2.104 default:default

snnu snnu Juniper Juniper Juniper Juniper Juniper Juniper User Name bigang ttyqqq wangxiao hanxiaomang

pp0.1073749750 10.155.2.103 nitianzheng default:default ---(more)--- 【说明】

本命令可以分类查看pppoe用户的接入信息。

10. 查找用户的demux0/pp0接口

user@MX960>show subscribers |match 10.143.2.6

demux0.1073784717 10.143.2.6 Juniper default:default

user@MX960>show subscribers |match 10.155.21.40

pp0.1073768969 10.155.21.40 dongn default:default 【说明】

上述命令可以在已知用户ip地址的情况下,查找用户接入的demux0/pp0接口。

11. 查看某一个IPoE用户信息

{master}

user@MX960> show subscribers interface demux0.1073750013 extensive

Type: DHCP //类型为DHCP,表明是ipoe用户 User Name: Juniper IP Address: 10.143.0.64 Logical System: default Routing Instance: default

Interface: demux0.1073750013 Interface type: Dynamic

Dynamic Profile Name: ipoe-jiashuqu//用于动态生成demux0接口的Dynamic Profile MAC Address: e0:05:c5:a2:ad:b7 //用户终端的MAC地址 State: Active

DHCP Relay IP Address: 10.143.0.1 Radius Accounting ID: 30258 //用户的主计费session id Session ID: 30258 //用户接入的主session id Stacked VLAN Id: 1113 //用户的S-VLAN id VLAN Id: 216 //用户的C-VLAN id Agent Circuit ID: xe-0/2/1:1113-216 //用户接入的链路ID Login Time: 2012-10-20 00:01:07 CST //用户接入时间 Service Sessions: 4 //用于计费的总的业务数 DHCP Options: len 75

35 01 01 39 02 04 00 37 09 01 03 2b 2c 2e 2f 06 21 79 0c 0e 54 4c 2d 57 52 35 34 31 47 2f 35 34 32 47 3c 09 4d 53 46 54 20 39 38 00 5f 3d 07 01 e0 05 c5 a2 ad b7 52 13 01 11 78 65 2d 30 2f 32 2f 31 3a 31 31 31 33 2d 32 31 36

IPv4 Input Filter Name: O-2M-demux0.1073750013-in //用户上行2M限速 IPv4 Output Filter Name: I-4M-demux0.1073750013-out //用户下行4M限速

Service Session ID: 30259

Service Session Name: Unicom//访问联通出口的计费业务名,计费会话id为30259 State: Active

IPv4 Input Filter Name: unicom-in-demux0.1073750013-in IPv4 Output Filter Name: unicom-out-demux0.1073750013-out

Service Session ID: 30260

Service Session Name: telecom//访问电信出口的计费业务名,计费会话id为30260 State: Active

IPv4 Input Filter Name: telecom-in-demux0.1073750013-in IPv4 Output Filter Name: telecom-in-demux0.1073750013-out

Service Session ID: 30261

Service Session Name: campus//访问校园网的计费业务名,计费会话id为30261 State: Active

IPv4 Input Filter Name: campus-in-demux0.1073750013-in IPv4 Output Filter Name: campus-out-demux0.1073750013-out

Service Session ID: 30262

Service Session Name: cernet //访问教育网出口的计费业务名,计费会话id为30262 State: Active

IPv4 Input Filter Name:cernet -in-demux0.1073750013-in

IPv4 Output Filter Name:cernet -out-demux0.1073750013-out 【说明】

本命令可以查看ipoe用户的详细信息。

12. 查看某一个pppoe用户的信息

user@MX960> show subscribers interface pp0.1073749744 extensive

Type: PPPoE

User Name: bigang IP Address: 10.155.2.99 IP Netmask: 255.255.0.0

Primary DNS Address: 202.117.144.2 Logical System: default Routing Instance: default Interface: pp0.1073749744 Interface type: Dynamic

Dynamic Profile Name: pppoe-autoconfig//用于动态生成pp0接口的Dynamic Profile MAC Address: 00:23:cd:56:02:5f //用户终端的MAC地址 State: Active

Radius Accounting ID: 29395 //用户的主计费session id Session ID: 29395//用户的session id Stacked VLAN Id: 1110 //用户的S-VLAN id VLAN Id: 313 //用户的C-VLAN id Login Time: 2012-10-19 23:57:44 CST //用户拨入时间 Service Sessions: 4 //用于计费的总的业务数 IP Address Pool: pool-1 //用户地址池(直接由MX960分配) IPv4 Input Filter Name: up2m-pp0.1073749744-in//用户上行2M限速

IPv4 Output Filter Name: down4m-pp0.1073749744-out//用户下行4M限速

Service Session ID: 29501

Service Session Name: unicom-pppoe//访问联通出口的计费业务名,计费会话id为29501 State: Active

IPv4 Input Filter Name: unicom-in-pp0.1073749744-in IPv4 Output Filter Name: unicom-out-pp0.1073749744-out

Service Session ID: 29502

Service Session Name: telecom-pppoe//访问电信出口的计费业务名,计费会话id为29502 State: Active

IPv4 Input Filter Name: telecom-in-pp0.1073749744-in IPv4 Output Filter Name: telecom-in-pp0.1073749744-out

Service Session ID: 29503

Service Session Name: campus-pppoe//校园网访问计费业务名,计费会话id为29503 State: Active

IPv4 Input Filter Name: campus-in-pp0.1073749744-in

IPv4 Output Filter Name: campus-out-pp0.1073749744-out

Service Session ID: 29504

Service Session Name: cernet-pppoe//访问教育网出口的计费业务名,计费会话id为29504 State: Active

IPv4 Input Filter Name: cernet-in-pp0.1073749744-in

IPv4 Output Filter Name: cernet-out-pp0.1073749744-out ---(more)--- 【说明】

本命令可以查看pppoe用户的详细信息。

13. 清除动态生成的vlan接口

user@MX960>clear auto-configuration interfaces xe-0/2/1

【说明】

本命令可以手动清除动态生成的VLAN接口,慎用!

如接口下有分配的DHCP地址,则接口无法清除。可用如下方法清除 set interfaces ge-4/0/2 disable

commit

run clear dhcp server binding interface ge-4/0/2.1073892537 run clear dhcpv6 server binding interface ge-4/0/2.1073892537 run clear auto-configuration interfaces ge-4/0/2 delete interfaces ge-4/0/2 disable commit

14. 强制pppoe用户下线

user@MX960>clear pppoe session

【说明】

本命令可以手动清除所有pppoe用户的会话,强制用户下线重拨,慎用!

15. 强制ipoe用户下线

user@MX960>clear dhcp relay binding all

【说明】

本命令可以手动清除所有ipoe用户的dhcp relay绑定关系表,同时强制清除了用户的demux0接口。后果是用户在dhcp地址租期超期前或续租前将不能网络访问,需要用户手动ipconfig /release和renew,重新获取地址才能恢复网络接入。慎用!

四、路由相关

1.

查看所有路由

user@MX960> show route

inet.0: 911 destinations, 911 routes (911 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both

0.0.0.0/0 *[OSPF/150] 3d 00:01:01, metric 52, tag 0 to 10.196.0.25 via xe-0/2/0.0 > to 10.196.0.29 via xe-1/2/0.0

10.0.0.0/17 *[OSPF/150] 3d 02:18:07, metric 52, tag 0 to 10.196.0.25 via xe-0/2/0.0 > to 10.196.0.29 via xe-1/2/0.0

10.0.89.0/24 *[OSPF/150] 3d 02:18:07, metric 13, tag 0 to 10.196.0.25 via xe-0/2/0.0 > to 10.196.0.29 via xe-1/2/0.0

10.0.90.0/24 *[OSPF/150] 3d 02:18:07, metric 13, tag 0 > to 10.196.0.25 via xe-0/2/0.0

to 10.196.0.29 via xe-1/2/0.0

10.0.91.0/24 *[OSPF/150] 3d 02:18:07, metric 13, tag 0 > to 10.196.0.25 via xe-0/2/0.0

to 10.196.0.29 via xe-1/2/0.0 10.0.92.0/24 *[OSPF/10] 3d 02:18:07, metric 13 > to 10.196.0.25 via xe-0/2/0.0

to 10.196.0.29 via xe-1/2/0.0 ---(more)--- 【说明】

本命令可以查看MX960的所有路由表信息。

2. 查看ospf路由

user@MX960> show route protocol ospf

inet.0: 934 destinations, 935 routes (934 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both

0.0.0.0/0 *[OSPF/150] 2d 12:34:45, metric 52, tag 0 to 10.196.0.25 via xe-0/2/0.0 > to 10.196.0.29 via xe-1/2/0.0

10.0.0.0/17 *[OSPF/150] 2d 12:34:45, metric 52, tag 0 > to 10.196.0.25 via xe-0/2/0.0

to 10.196.0.29 via xe-1/2/0.0

10.0.89.0/24 *[OSPF/150] 2d 12:34:45, metric 13, tag 0 to 10.196.0.25 via xe-0/2/0.0 > to 10.196.0.29 via xe-1/2/0.0

10.0.90.0/24 *[OSPF/150] 2d 12:34:45, metric 13, tag 0 > to 10.196.0.25 via xe-0/2/0.0

to 10.196.0.29 via xe-1/2/0.0 ---(more)--- 【说明】

本命令可以查看OSPF路由表的信息。

10.0.89.0/24 *[OSPF/150] 3d 02:18:07, metric 13, tag 0 to 10.196.0.25 via xe-0/2/0.0 > to 10.196.0.29 via xe-1/2/0.0

10.0.89.0/24:目标网段

[OSPF/150]:表明该路由是从ospf学习到的,而且是外部路由([OSPF/10]表示ospf内部路由)

metric 13:是去往该目标网段总的路径开销cost值

> to 10.196.0.29 via xe-1/2/0.0:表示去往该目标网段,有两条等值路径,但优选本路径。

3. 指定路由表做路由查询

user@MX960> show route table inet.0 202.117.144.2

inet.0: 935 destinations, 936 routes (935 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both

202.117.144.0/24 *[OSPF/10] 1w0d 17:37:20, metric 11 > to 10.196.0.25 via xe-0/2/0.0

4. 查看ospf 邻居

user@MX960> show ospf neighbor

Address Interface State ID Pri Dead 10.196.0.25 xe-0/2/0.0 Full 10.196.1.3 128 33 10.196.0.29 xe-1/2/0.0 Full 10.196.1.2 128 38 【说明】

本命令可以查看ospf邻居状态。

5. 查看ospfv3邻居

user@MX960> show ospf3 neighbor

ID Interface State Pri Dead 10.196.1.3 xe-0/2/0.0 Full 128 30 Neighbor-address fe80::aad0:e5ff:fef5:a852

10.196.1.2 xe-1/2/0.0 Full 128 39 Neighbor-address fe80::aad0:e5ff:fef7:b0f7 【说明】

本命令可以查看ospf邻居状态。

6. Windows系统主机Pathping命令

提供有关在源和目标之间的中间跃点处网络滞后和网络丢失的信息。Pathping 在一段时间内将多个回响请求消息发送到源和目标之间的各个路由器,然后根据各个路由器返回的数据包计算结果。因为 pathping 显示在任何特定路由器或链接处的数据包的丢失程度,所以用户可据此确定存在网络问题的路由器或子网。

Pathping 通过识别路径上的路由器来执行与 tracert 命令相同的功能。然后,该命令在一段指定的时间内定期将 ping 命令发送到所有的路由器,并根据每个路由器的返回数值生成统计结果。

简单来说,

ping 查看你到你想去的地方通不通;

tracert 查看你到你想去的地方该怎么走; pathping 查看你要走的这条路的路况怎么样。

pathping [-n] [-h MaximumHops] [-g HostList] [-p Period] [-q NumQueries [-w Timeout] [-i IPAddress] [-4 IPv4] [-6 IPv6][TargetName]

参数 -n

阻止 pathping 试图将中间路由器的 IP 地址解析为各自的名称。这有可能加快 pathping 的结果显示。

-h Maximum_Hops

指定搜索目标(目的)的路径中存在的跃点的最大数。默认值为 30 个跃点。 -g HostList

指定回响请求消息利用 HostList 中指定的中间目标集在 IP 数据头中使用“稀疏来源路由”选项。使用稀疏来源路由时,相邻的中间目标可以由一个或多个路由器分隔开。HostList 中的地址或名称的最大数为 9。HostList 是一系列由空格分隔的 IP 地址(用带点的十进制符号表示)。 -p Period

指定两个连续的 ping 之间的时间间隔(以毫秒为单位)。默认值为 250 毫秒(1/4 秒)。 -q Num_Queries

指定发送到路径中每个路由器的回响请求消息数。默认值为 100 个查询。 -w Timeout

指定等待每个应答的时间(以毫秒为单位)。默认值为 3000 毫秒(3 秒)。 -i IPAddress 指定源地址。 -4 IPv4

强制使用IPv4。 -6 IPv6

强制使用IPv6。 TargetName

指定目的端,它既可以是 IP 地址,也可以是主机名。 /?

在命令提示符下显示帮助。

五、调试跟踪

1.

查看接口光功率

abc@MX960_4# run show interfaces diagnostics optics ge-4/0/2 Physical interface: ge-4/0/2

Laser bias current : 5.630 mA

Laser output power : 0.2310 mW / -6.36 dBm

Module temperature : 40 degrees C / 105 degrees F

Module voltage : 3.2420 V

Receiver signal average optical power : 0.0834 mW / -10.79 dBm Laser bias current high alarm : Off

Laser bias current low alarm : Off Laser bias current high warning : Off Laser bias current low warning : Off Laser output power high alarm : Off Laser output power low alarm : Off Laser output power high warning : Off Laser output power low warning : Off Module temperature high alarm : Off Module temperature low alarm : Off Module temperature high warning : Off Module temperature low warning : Off Module voltage high alarm : Off Module voltage low alarm : Off Module voltage high warning : Off Module voltage low warning : Off Laser rx power high alarm : Off Laser rx power low alarm : Off Laser rx power high warning : Off Laser rx power low warning : Off Laser bias current high alarm threshold : 60.000 mA Laser bias current low alarm threshold : 0.100 mA Laser bias current high warning threshold : 50.000 mA Laser bias current low warning threshold : 0.500 mA

Laser output power high alarm threshold : 1.0000 mW / 0.00 dBm Laser output power low alarm threshold : 0.0560 mW / -12.52 dBm Laser output power high warning threshold : 0.6300 mW / -2.01 dBm Laser output power low warning threshold : 0.0890 mW / -10.51 dBm

Module temperature high alarm threshold : 105 degrees C / 221 degrees F Module temperature low alarm threshold : -45 degrees C / -49 degrees F Module temperature high warning threshold : 80 degrees C / 176 degrees F Module temperature low warning threshold : -15 degrees C / 5 degrees F Module voltage high alarm threshold : 4.000 V Module voltage low alarm threshold : 2.800 V Module voltage high warning threshold : 3.600 V Module voltage low warning threshold : 3.000 V

Laser rx power high alarm threshold : 0.6310 mW / -2.00 dBm Laser rx power low alarm threshold : 0.0071 mW / -21.49 dBm Laser rx power high warning threshold : 0.5012 mW / -3.00 dBm Laser rx power low warning threshold : 0.0090 mW / -20.46 dBm

2. 抓接口流量包

abc@MX960_4# run monitor traffic interface ge-4/3/0 layer2-headers

verbose output suppressed, use or for full protocol decode Address resolution is ON. Use to avoid any reverse lookup delay. Address resolution timeout is 4s.

Listening on ge-4/3/0, capture size 96 bytes

15:24:08.270394 In 44:82:e5:a4:d4:00 > 01:80:c2:00:00:00, 802.3, length 60: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl 0x03: STP 802.1w, Rapid STP, Flags [Learn, Forward, Agreement], bridge-id 8000.44:82:e5:a4:d4:00.8090, length 43

Reverse lookup for 224.0.0.5 failed (check DNS reachability). Other reverse lookup failures will not be reported.

Use to avoid reverse lookups on IP addresses.

15:24:09.146843 Out a8:d0:e5:f7:d3:0f > 01:00:5e:00:00:05, ethertype IPv4 (0x0800), length 74: truncated-ip - 20 bytes missing! 10.0.1.1 > 224.0.0.5: OSPFv2, Hello, length 60

15:24:10.276573 In 44:82:e5:a4:d4:00 > 01:80:c2:00:00:00, 802.3, length 60: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl 0x03: STP 802.1w, Rapid STP, Flags [Learn, Forward, Agreement], bridge-id 8000.44:82:e5:a4:d4:00.8090, length 43 ^C

3 packets received by filter 0 packets dropped by kernel 【监控二层接口流量包】

abc@MX960_4# run monitor traffic interface ge-4/0/2 no-resolve matching \67 or 68\ Address resolution is OFF.

Listening on ge-4/0/2, capture size 1514 bytes

15:25:49.279629 In Juniper PCAP Flags [Ext, no-L2, In], PCAP Extension(s) total length 22 Device Media Type Extension TLV #3, length 1, value: Ethernet (1) Logical Interface Encapsulation Extension TLV #6, length 1, value: Ethernet (14) Device Interface Index Extension TLV #1, length 2, value: 165 Logical Interface Index Extension TLV #4, length 4, value: 355 Logical Unit Number Extension TLV #5, length 4, value: 1073878590 -----original packet----- PFE proto 2 (ipv4): (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto: UDP (17), length: 632) 213.227.15.33.68 > 213.227.15.167: [udp sum ok] BOOTP/DHCP, Request from e8:65:d4:0b:e4:a9, length 548, xid 0xec95a626, secs 10, Flags [none] (0x0000)

【监控接口DHCP流量包】

abc@MX960_4# run monitor traffic interface ge-4/0/2 no-resolve matching \546 or 547\ Address resolution is OFF.

Listening on ge-4/0/2, capture size 1514 bytes 【监控接口DHCPv6流量包】

abc@MX960_4# run show firewall log detail

Time of Log: 2017-06-03 15:31:52 CST, Filter: pfe, Filter action: accept, Name of interface: irb.202

Name of protocol: ICMP, Packet Length: 147, Source address: 192.168.202.30, Destination address: 10.1.1.4 ICMP type: 3, ICMP code: 3 【监控防火墙日志】

六、升级系统

1.

文件位置

升级后文件保存在这个目录:/var/sw/pkg

升级文件放在这个目录/var/tmp/ 或放在ftp服务器上。

file copy re1:/var/tmp/jinstall64-13.3R7.4-domestic-signed.tgz re0:/var/tmp

2. 双RE升级步骤

1.1. 升级前准备

1.1.2. 升级前的设备信息收集 1) 设备硬件状态

root@re0> show chassis alarms | no-more

root@re0> show system core-dumps | no-more root@re0> show chassis hardware detail | no-more root@re0> show chassis environment | no-more root@re0> show chassis routing-engine | no-more

root@re0> show version invoke-on all-routing-engines | no-more 2) 协议状态

root@re0> show route summary | no-more root@re0> show bgp summary | no-more root@re0> show ospf neighbor | no-more root@re0> show isis adjacency | no-more 3) 接口状态

show interfaces terse | match up

1.1.3. 升级前配置同步和备份

1) 确认设备没有未提交的配置,然后同步主备RE的配置 root@re0# show | compare root@re0> commit synchronize

2) 将主备RE的CF卡与硬盘之间的镜像信息进行同步(这个过程大约为3分钟)

root@re0> request system snapshot

登录备用:

root@re0> request routing-engine login other-routing-engine root@re1> request system snapshot root@re1> exit

3) 保存配置

保存在PC机上:

root@re0> show configuration | no-more

或保存在设备硬盘上:

root@re0# save /var/tmp/mx960.conf

1.1.4. 上传升级软件包到设备 1) 打开设备的FTP服务

root@re0# set system services ftp

2) 打开FTP客户端软件连接到设备上(使用fxp0带外网管口ip地址或者管理ip地址连接),JUNOS升级软件上传到设备/var/tmp下 本次junos升级版本为jinstall64-12.3R5.7-domestic-signed.tgz 3) 将升级软件包从主用RE拷贝到备用RE root@re0> file copy /var/tmp/jinstall64-12.3R5.7-domestic-signed.tgz re1:/var/tmp/jinstall64-12.3R5.7-domestic-signed.tgz 4) 检查/var/tmp目录存在升级软件包:

root@re0> file list /var/tmp/jinstall64-12.3R5.7-domestic-signed.tgz 5) 关闭FTP服务

root@re0# delete system service ftp root@re0# commit

1.1.5. 禁用graceful-switchover和NSR配置

root@re0># deactive chassis redundancy graceful-switchover root@re0># deactivate routing-options nonstop-routing root@re0># commit synchronize 一定要关闭GRES和NSR功能,否则升级会失败 1.2. 升级步骤

1.2.1. 升级RE1(备用引擎)

1) 使用console线直接连接到RE1,或者在主引擎上使用如下命令跳到RE1上 root@re0> request routing-engine login other-routing-engine 2) 加载升级软件包 root@re1>request system software add /var/tmp/ jinstall64-12.3R5.7-domestic-signed.tgz 出现如下信息,说明加载升级包成功,可以进行重启操作,否则根据加载错误提示信息来查看是配置不兼容问题,还是内存不足,CF卡容量不足问题等问题

lab> request system software add /var/tmp/jinstall-9.6R4.4-domestic-signed.tgz NOTICE: Validating configuration against jinstall-9.6R4.4-domestic-signed.tgz. NOTICE: Use the 'no-validate' option to skip this if desired. Checking compatibility with configuration Initializing...

Using jbase-9.2R4.4

Verified manifest signed by PackageProduction_9_2_0 Using /var/tmp/jinstall-9.6R4.4-domestic-signed.tgz

Verified jinstall-9.6R4.4-domestic.tgz signed by PackageProduction_9_6_0 Using jinstall-9.6R4.4-domestic.tgz Using jbundle-9.6R4.4-domestic.tgz Checking jbundle requirements on / Using jbase-9.6R4.4.tgz

Verified manifest signed by PackageProduction_9_6_0 Using /var/validate/chroot/tmp/jbundle/jboot-9.6R4.4.tgz Using jkernel-9.6R4.4.tgz

Verified manifest signed by PackageProduction_9_6_0 Using jcrypto-9.6R4.4.tgz

Verified manifest signed by PackageProduction_9_6_0 Using jpfe-9.6R4.4.tgz Using jdocs-9.6R4.4.tgz

Verified manifest signed by PackageProduction_9_6_0 Using jroute-9.6R4.4.tgz

Verified manifest signed by PackageProduction_9_6_0 Hardware Database regeneration succeeded Validating against /config/juniper.conf.gz mgd: commit complete

Validation succeeded //此提示出现说明有效性验证成功

Installing package '/var/tmp/jinstall-9.6R4.4-domestic-signed.tgz' ...

Verified jinstall-9.6R4.4-domestic.tgz signed by PackageProduction_9_6_0 Adding jinstall...

Verified manifest signed by PackageProduction_9_6_0

//下面这些提示出现说明,加载升级包成功,可能进行重启操作 WARNING: This package will load JUNOS 9.6R4.4 software.

WARNING: It will save JUNOS configuration files, and SSH keys WARNING: (if configured), but erase all other files and information WARNING: stored on this machine. It will attempt to preserve dumps WARNING: and log files, but this can not be guaranteed. This is the WARNING: pre-installation stage and all the software is loaded when WARNING: you reboot the system.

Saving the config files ... NOTICE: uncommitted changes have been saved in /var/db/config/juniper.conf.pre-install Installing the bootstrap installer ...

WARNING: A REBOOT IS REQUIRED TO LOAD THIS SOFTWARE CORRECTLY. Use the

WARNING: 'request system reboot' command when software installation is WARNING: complete. To abort the installation, do not reboot your system, WARNING: instead use the 'request system software delete jinstall' WARNING: command as soon as this operation completes.

Saving package file in /var/sw/pkg/jinstall-9.6R4.4-domestic-signed.tgz ... Saving state for rollback ...

3) 重启RE1

root@re1> request system reboot 4) 重启后检查基本信息是否正确 root@re1> show version detail root@re1> show configure

root@re1> show system boot-messages root@re1> show log messages 1.2.2. RE主备切换

主备切换期间,由于此时主备RE的软件版本不同,所以转发层面的板卡(FPC,PIC)会重启,大约需要3-5分钟左右时间完成重启,此时整机业务会中断。(在当前主引擎上切换)

root@re0> request chassis routing-engine master switch

1.2.3. 检查切换后设备运行在新软件版本上的各项状态信息 切换后RE1成为主用引擎,当各转发部件均重启完成系统稳定后,需要对运行在新软件版本上的设备的各项状态进行检查,以确认设备在新软件版本上硬件及业务状态是否正常。

请参照1.1.2节描述的命令再次进行收集,并与之前收集的状态信息进行对比。

1.2.4. 升级RE0(原主用引擎) 1) 登录到RE0上加载升级软件包 root@re0>request system software add /var/tmp/ jinstall64-12.3R5.7-domestic-signed.tgz

2) 重启RE0

root@re0> request system reboot 3) 重启后检查基本信息是否正确 root@re0> show version detail root@re0> show configure

root@re0> show system boot-messages root@re0> show log messages

1.2.5. 恢复graceful-switchover和NSR配置 恢复graceful-switchover和NSR配置

root@re0># active chassis redundancy graceful-switchover root@re0># activate routing-options nonstop-routing root@re0># commit synchronize 1.2.6. 确认设备引擎同步状态

1) 在主用引擎上检查GRES情况,如下图说明引擎GRES已经开启,两块RE数据已经处于同步状态。

root@re0> show database-replication summary

General:

Graceful Restart Enabled Mastership Master Connection Up

Database Synchronized Message Queue Ready

2) 在主用引擎上检查NSR情况,如下图说明各路由协议的NSR已经开启。 root@re0> show task replication Stateful Replication: Enabled RE mode: Master

Protocol Synchronization Status

OSPF Complete BGP Complete

1.2.7. RE主备切换至原始状态

因为此时两块RE的软件版本相同,并且开启了graceful-switchover,所以切换时业务正常不会中断。

root@re1> request chassis routing-engine master switch 1.2.8. 同步升级后的版本到主备RE的硬盘 root@re0># request system snapshot

root@re0> request routing-engine login other-routing-engine root@re1># request system snapshot

1.2.9. 此时升级已基本完成,需要对设备各项状态再次进行检查

请参照1.1.2节描述的命令再次进行收集,并与之前收集的状态信息进行对比。

1.3. 应急措施 建议升级操作时,带上安装好JUNOS软件的USB,以便RE出问题时重做RE的软件。如果有条件话,建议还可以带上RE备件,以防止RE出现不可恢复的硬件问题

1.3.1. RE从硬盘引导

正常情况下,RE应该从闪存卡引导系统和读取配置内容。若RE从硬盘引导是故障现象,且系统会生成一个中级告警。该告警信息会在成功登录设备后弹现,也可以通过指令“show chassis alarm”查看。尝试采取以下操作恢复:

1) 检查以下命令输出中是否有“ad0: 91MB [734/8/32] at ata0-master using PIO1”。

root@re> show system boot-massages | no-more

2) 若输出显示“ad0, not attached, missing in Boot List”,则进行如下操作 root@re> start shell % sysctl –a | grep boot

检查输出中是否有“machdep.bootdevs: pcmcia-flash,compact-flash,disk,lan”。若其中少了“compact-flash”,应继续执行以下指令 % su

password xxxxxx

root@re% sysctl –w machdep.bootdevs= pcmcia-flash,compact-flash,disk,lan root@re% exit % exit

root@re> request system reboot media compact-flash

3) 若仍不能正常重起,应立即终止升级操作,开CASE联系厂商处理。 1.3.2. RE不能启动

若RE无法启动,可以尝试使用JUNOS USB进行系统重装来恢复。 1) 建立Console连接

2) JUNOS USB插入后,拨插RE使之断电重起。系统会从JUNOS USB引导。 3) 从终端观察系统引导过程,并根据提示操作

4) 闪存卡和硬盘被格式化后,被重新安装JUNOS系统,原有文件系统丢失 5) 重装后,RE将处于默认状态,没有任何用户配置内容

6) 用root(没有密码)登录后,按照以下操作恢复用户配置(假设RE1出现故障):

root@re0> commit synchronize

boot@re1> request system snapshot

1.3.3. 退回到原先的版本

如果因为新版本工作不正常或者是在升级过程中遇到其它问题,需要退回到原先的版本,则你可以重新安装保存在/var/tmp 目录下的原先的版本。命令格式与升级操作是一样的,只是文件名不一样 root@re> request system software add /var/tmp/ jinstall64-12.3R3.4-domestic-signed.tgz

root@re> request system reboot 1.3.4. RE工作不正常

如果RE切换后主RE工作不正常,需要切回备份RE,可以在主RE本地控制口上执行以下命令:

root@re> request chassis routing-engine master release no-confirm