对快速以太网和千兆以太网接口执行环路测试
为快速以太网和千兆以太网接口使用环路测试的检查清单
目的
使用环路测试来隔离快速以太网和千兆以太网接口问题。
行动
表 1 提供用于对快速以太网和千兆以太网接口进行环路测试的链接和命令。
任务 |
命令或操作 |
---|---|
通过快速以太网或千兆以太网接口诊断可疑硬件问题 | |
将传输端口连接到接收端口。 |
|
交叉针脚 1 (TX+) 和针脚 3 (RX+) 以及针脚 2 (TX-) 和针脚 6 (RX-) 组合在一起。 |
|
|
|
|
|
|
|
|
|
|
|
|
|
诊断可疑电路问题 | 使用快速以太网或千兆以太网接口诊断可疑硬件问题,执行步骤 2 到 8。 |
通过快速以太网或千兆以太网接口诊断可疑硬件问题
问题
说明
怀疑硬件问题时,请按照以下步骤帮助验证是否存在问题。
解决方案
要诊断以太网接口的可疑硬件问题,请执行以下步骤:
创建环路
您可以创建物理环路或配置本地环路,以帮助诊断可疑硬件问题。建议创建物理环路,因为它允许您测试和验证传输和接收端口。如果现场工程师无法创建物理环路,则可以为接口配置本地环路。本地环路在物理接口卡 (PIC) 内部创建环路。
为光纤接口创建物理环路
行动
要创建端口的物理环路,请使用已知良好的光纤电缆将传输端口连接到接收端口。
请确保对单模端口使用单模光纤,对多模端口使用多模光纤。
含义
创建并测试物理环路时,需要测试 PIC 的传输和接收端口。如果现场工程师可以创建物理环路,则建议执行此操作,因为它提供了对 PIC 的更完整的测试。
另请参阅
为 RJ-45 以太网接口创建环路插头
行动
要创建环路插头,请将交叉针 1 (TX+) 和针脚 3 (RX+) 连接在一起,并将交叉针 2 (TX-) 和针脚 6 (RX-) 组合在一起。您需要以下设备才能创建环路:
-
6 英寸长的 CAT5 电缆
-
RJ-45 连接器
-
压接工具
图 1 展示了如何为 RJ-45 以太网接口创建环路插头。

含义
创建并测试物理环路时,您需要测试 PIC 的 RJ-45 接口。如果现场工程师可以创建物理环路,则建议执行此操作,因为它提供了对 PIC 的更完整的测试。
另请参阅
配置本地环路
行动
要配置本地环路而不以物理方式将传输端口连接到接收端口,请执行以下步骤:
在配置模式下,转到以下层级:
[edit] user@host# edit interfaces
interface-name
(fastether-options | gigether-options)配置本地环路:
[edit interfaces
interface-name
(fastether-options | gigether-options)] user@host# set loopback验证配置:
user@host# show
例如:
[edit interfaces fe-1/0/0 fastether-options] user@host# show loopback;
提交更改:
user@host# commit
例如:
[edit interfaces fe-1/0/0 fastether-options] user@host# commit commit complete
创建本地环路时,在要测试的接口上创建内部环路。本地环路对该 PIC 上的流量进行内部环路。本地环路测试 PIC 的互连,但不测试传输和接收端口。在以太网接口上,您无法创建远程环路,因此无法选择使用 local
或 remote
语句。只需在loopback
[edit interfaces interface-name
(fastether-options | gigether-options]
层次结构级别包括语句,即可将接口置于本地环路模式。
记得在完成测试后删除环路语句。
另请参阅
验证快速以太网接口或千兆以太网接口是否已启动
目的
显示快速以太网接口或千兆以太网接口的状态,提供确定物理链路开启还是关闭所需的信息。
行动
要验证快速以太网或千兆以太网接口的状态是否处于运行状态,请使用以下 Junos OS 命令行界面 (CLI) 操作模式命令:
user@host> show interfaces (fe-fpc
/port
| ge-fpc
/pic
/port
)
示例输出
user@host# show interfaces ge-4/0/6 extensivePhysical interface: ge-4/0/6, Enabled, Physical link is Up
Interface index: 144, SNMP ifIndex: 516, Generation: 147 Link-level type: Ethernet, MTU: 1514, Speed: 1000mbps, BPDU Error: None, MAC-REWRITE Error: None,Loopback: Enabled
, Source filtering: Disabled, Flow control: Enabled, Auto-negotiation: Enabled, Remote fault: Online Device flags : Present Running Loop-Detected Interface flags: SNMP-Traps Internal: 0x4000 Link flags : None CoS queues : 8 supported, 4 maximum usable queues Schedulers : 0 Hold-times : Up 0 ms, Down 0 ms Current address: 00:1f:12:fe:c5:2e, Hardware address: 00:1f:12:fe:c5:2e Last flapped : 2015-01-20 23:40:04 PST (00:02:12 ago) Statistics last cleared: Never Traffic statistics: Input bytes : 0 0 bps Output bytes : 0 0 bps Input packets: 0 0 pps Output packets: 0 0 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 : 0 Output bytes : 0 Input packets: 0 Output packets: 0 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: 1, 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 0 0 0 1 expedited-fo 0 0 0 2 assured-forw 0 0 0 3 network-cont 0 0 0 Queue number: Mapped forwarding classes 0 best-effort 1 expedited-forwarding 2 assured-forwarding 3 network-controlActive alarms : None
Active defects : None MAC statistics: Receive Transmit Total octets 0 0 Total packets 0 0 Unicast packets 0 0 Broadcast packets 0 0 Multicast packets 0 0 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 0 Input packet rejects 0 Input DA rejects 0 Input SA rejects 0 Output packet count 0 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/Asymmetric, Remote fault: OK Local resolution: Flow control: Symmetric, Remote fault: Link OK Packet Forwarding Engine configuration: Destination slot: 4 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
含义
示例输出显示链路已开启,此环路配置中没有告警。配置内部环路时,物理环路应该不会出现告警。
示例输出
当您看到物理链路关闭时,端口可能存在问题。以下输出是物理链路关闭时的 show interfaces fe-fpc/pic/port 命令的示例:
user@router> show interfaces fe-1/3/0 Physical interface: fe-1/3/0, Enabled, Physical link is Down Interface index: 44, SNMP ifIndex: 35 Link-level type: Ethernet, MTU: 1514, Source filtering: Disabled Speed: 100mbps, Loopback: Disabled, Flow control: Enabled Device flags : Present Running Down Interface flags: Hardware-Down SNMP-Traps Link flags : None Current address: 00:90:69:8d:2c:db, Hardware address: 00:90:69:8d:2c:db Input rate : 0 bps (0 pps), Output rate: 0 bps (0 pps) Active alarms : LINK Active defects : LINK MAC statistics: Input octets: 0, Input packets: 0, Output octets: 0, Output packets: 0 Filter statistics: Filtered packets: 0, Padded packets: 0, Output packet errors: 0 Autonegotiation information: Negotiation status: Incomplete, Link partner status: Down Reason: Link partner autonegotiation failure Link partner: Half-duplex, Flow control: None
含义
示例输出显示物理链路关闭,存在活动告警和缺陷。
表 2 显示问题情况,以及物理链路已关闭的操作。
问题 |
行动 |
---|---|
电缆不匹配 |
验证光纤连接是否正确。 |
电缆损坏和/或脏 |
验证光纤是否可以成功环路相同类型的已知良好端口。 |
光衰减过大或过小 |
根据 PIC 光学规格验证衰减是否正确。 |
传输端口不会根据规格在 dBm 光学范围内传输 |
验证光纤的 Tx 功率是否在 PIC 光学规格的范围内。 |
电缆类型和端口不匹配 |
验证单模光纤电缆是否已连接到单模接口,以及多模光纤电缆是否已连接到多模接口。(此问题并不总是导致物理链路中断;有时还会导致错误和丢包。) |
配置静态地址解析协议表条目
目的
配置静态地址解析协议 (ARP) 条目,以允许从环路以太网接口发送数据包。
完成测试并监控接口流量后,在环路测试结束时删除静态 ARP 条目。
行动
要为千兆以太网接口配置静态 ARP 表条目,请执行以下步骤。您可以按照相同的过程为快速以太网接口配置静态 ARP 条目。
查找千兆以太网接口的媒体接入控制 (MAC) 地址:
user@host>
show interfaces ge-fpc/pic/port
Physical interface: ge-4/0/6, Enabled, Physical link is Up Interface index: 144, SNMP ifIndex: 516, Generation: 147 Link-level type: Ethernet, MTU: 1514, Speed: 1000mbps, BPDU Error: None, MAC-REWRITE Error: None, Loopback: Enabled, Source filtering: Disabled, Flow control: Enabled, Auto-negotiation: Enabled, Remote fault: Online Device flags : Present Running Loop-Detected Interface flags: SNMP-Traps Internal: 0x4000 Link flags : None CoS queues : 8 supported, 4 maximum usable queues Schedulers : 0 Hold-times : Up 0 ms, Down 0 ms
Current address: 00:1f:12:fe:c5:2e, Hardware address: 00:1f:12:fe:c5:2e
Last flapped : 2015-01-20 23:40:04 PST (00:13:49 ago) Statistics last cleared: 2015-01-20 23:46:15 PST (00:07:38 ago) Traffic statistics: Input bytes : 125500 0 bps Output bytes : 125482 0 bps Input packets: 1281 0 pps Output packets: 1281 0 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 : 0 Output bytes : 0 Input packets: 0 Output packets: 0 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: 0, 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 1260 1260 0 1 expedited-fo 0 0 0 2 assured-forw 0 0 0 3 network-cont 0 0 0 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 130624 130624 Total packets 1281 1281 Unicast packets 1280 1280 Broadcast packets 1 1 Multicast packets 0 0 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 1281 Input packet rejects 0 Input DA rejects 0 Input SA rejects 0 Output packet count 1281 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/Asymmetric, Remote fault: OK Local resolution: Flow control: Symmetric, Remote fault: Link OK Packet Forwarding Engine configuration: Destination slot: 4 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 Logical interface ge-4/0/6.0 (Index 72) (SNMP ifIndex 573) (Generation 137) Flags: SNMP-Traps 0x4004000 Encapsulation: ENET2 Traffic statistics: Input bytes : 125500 Output bytes : 123480 Input packets: 1281 Output packets: 1260 Local statistics: Input bytes : 60 Output bytes : 2002 Input packets: 1 Output packets: 21 Transit statistics: Input bytes : 0 0 bps Output bytes : 0 0 bps Input packets: 0 0 pps Output packets: 0 0 pps Security: Zone: HOST Allowed host-inbound traffic : any-service bfd bgp dvmrp igmp ldp msdp nhrp ospf pgm pim rip router-discovery rsvp sap vrrp Flow Statistics : Flow Input statistics : Self packets : 0 ICMP packets : 40 VPN packets : 0 Multicast packets : 0 Bytes permitted by policy : 107520 Connections established : 20 Flow Output statistics: Multicast packets : 0 Bytes permitted by policy : 107520 Flow error statistics (Packets dropped due to): Address spoofing: 0 Authentication failed: 0 Incoming NAT errors: 0 Invalid zone received packet: 0 Multiple user authentications: 0 Multiple incoming NAT: 0 No parent for a gate: 0 No one interested in self packets: 0 No minor session: 0 No more sessions: 0 No NAT gate: 0 No route present: 11 No SA for incoming SPI: 0 No tunnel found: 0 No session for a gate: 0 No zone or NULL zone binding 0 Policy denied: 0 Security association not active: 0 TCP sequence number out of window: 0 Syn-attack protection: 0 User authentication errors: 0 Protocol inet, MTU: 1500, Generation: 158, Route table: 0 Flags: Sendbcast-pkt-to-re Addresses, Flags: Is-Preferred Is-Primary Destination: 10.108.120.0/30, Local: 10.108.120.1, Broadcast: 10.108.120.3, Generation: 158 Protocol multiservice, MTU: Unlimited, Generation: 159, Route table: 0 Policer: Input: __default_arp_policer__在配置模式下,转到以下层级:
[edit] user@host# edit interfaces
interface-name
unitlogical-unit-number
family inet addressaddress
配置静态 ARP 条目:
user@host# set arp
ip-address
macmac-address
提交配置:
user@host# commit
验证静态 ARP 条目已安装:
[edit interfaces ge-4/0/6 unit 0 family inet address 10.108.120.1/30] user@host# run show arp no-resolve
MAC Address Address Interface Flags 00:1f:12:fe:c5:2e 10.108.120.2 ge-4/0/6.0 permanent 52:54:00:7d:33:4c 10.204.128.35 fxp0.0 none 52:54:00:65:11:50 10.204.128.36 fxp0.0 none 52:54:00:da:30:82 10.204.128.37 fxp0.0 none 52:54:00:3a:cf:4b 10.204.128.38 fxp0.0 none 52:54:00:de:88:5f 10.204.128.45 fxp0.0 none 52:54:00:48:03:b7 10.204.128.46 fxp0.0 none
含义
示例输出适用于步骤 1 到步骤 6,并显示已在千兆以太网接口 ge-4/0/6
上配置了静态 ARP 条目。
清除快速以太网或千兆以太网接口统计信息
目的
您可以重置快速以太网和千兆以太网接口统计信息。重置统计信息可以彻底开始,使之前的输入/输出错误和数据包统计信息不会干扰当前诊断程序。
行动
要清除接口的所有统计信息,请使用以下 Junos OS CLI 操作模式命令:
user@host> clear interfaces statistics (fe-fpc
/pic
/port
| ge-fpc
/pic
/port
)
示例输出
user@host> clear interfaces statistics ge-4/0/6 user@host>
含义
此命令仅清除千兆以太网接口的接口统计信息计数器。
对快速以太网或千兆以太网接口执行 Ping 操作
目的
使用 ping 命令验证环路连接。
行动
要从以太网接口发送 ping 数据包,请使用以下 Junos OS CLI 操作模式命令:
user@host> pingremote-IP-address
bypass-routing interface (fe-fpc
/pic
/port
| ge-fpc
/pic
/port
) count 100 rapid
示例输出
user@router> ping 10.108.120.2 bypass-routing interface ge-7/2/1 count 100 rapid PING 10.108.120.2 (10.108.120.2): 56 data bytes 36 bytes from 10.108.120.1: Time to live exceeded Vr HL TOS Len ID Flg off TTL Pro cks Src Dst 4 5 00 0054 e871 0 0000 01 01 cc5c 10.108.120.1 10.108.120.2 .36 bytes from 10.108.120.1: Time to live exceeded Vr HL TOS Len ID Flg off TTL Pro cks Src Dst 4 5 00 0054 e874 0 0000 01 01 cc59 10.108.120.1 10.108.120.2 .36 bytes from 10.108.120.1: Time to live exceeded Vr HL TOS Len ID Flg off TTL Pro cks Src Dst 4 5 00 0054 e878 0 0000 01 01 cc55 10.108.120.1 10.108.120.2 .36 bytes from 10.108.120.1: Time to live exceeded Vr HL TOS Len ID Flg off TTL Pro cks Src Dst 4 5 00 0054 e87c 0 0000 01 01 cc51 10.108.120.1 10.108.120.2 .36 bytes from 10.108.120.1: Time to live exceeded Vr HL TOS Len ID Flg off TTL Pro cks Src Dst 4 5 00 0054 e880 0 0000 01 01 cc4d 10.108.120.1 10.108.120.2 .36 bytes from 10.108.120.1: Time to live exceeded Vr HL TOS Len ID Flg off TTL Pro cks Src Dst 4 5 00 0054 e884 0 0000 01 01 cc49 10.108.120.1 10.108.120.2 .36 bytes from 10.108.120.1: Time to live exceeded
含义
示例输出显示生存时间 (TTL) 已过期,表示链路正在从 ping 测试接收帧。使用的 MAC 地址与被测端口的物理地址相同,因为这允许端口接受 ping 测试中的帧。当数据包在链路上循环时,每次发送的 ping 都会收到一条 TLL 超过 TLL 的消息。生成这些消息是因为 ping 数据包在路由器和物理环路之间重复循环。当数据包发送至不存在的链路另一端时,环路会将数据包返回到同一接口,在该接口中,数据包再次受数据包转发引擎交换矩阵的约束,以便进行路由。路由查找后,TTL 会减去,数据包再次从环路接口发出。此过程会重复,直到打包丢失,或者 TLL 到期,并显示后续 TTL 过期消息。如果发生任何错误,数据包将被丢弃并显示超时错误,而不是预期的 TTL 过期消息。请注意,Junos OS 中 ICMP 回显数据包的默认 TTL 为 64。这意味着,给定测试数据包必须成功发送和接收 63 次,才能生成 TTL 过期消息。您可以更改 TTL 值来调整丢失容差,例如,值 255 是最苛刻的测试,因为现在数据包的发送和接收错误必须无 254 次。
检查快速以太网或千兆以太网接口错误统计信息
目的
持续的接口错误统计信息表示您需要向瞻博网络技术援助中心 (JTAC) 创建案例。
行动
要检查本地接口中的错误统计信息,请使用以下 Junos OS CLI 操作模式命令:
user@host> show interfaces (fe-fpc
/pic
/port
| ge-fpc
/pic
/port
) extensive
示例输出
user@router> show interfaces ge-4/0/6 extensivePhysical interface: ge-4/0/6, Enabled, Physical link is Up
Interface index: 144, SNMP ifIndex: 516, Generation: 147 Link-level type: Ethernet, MTU: 1514, Speed: 1000mbps, BPDU Error: None, MAC-REWRITE Error: None,Loopback: Enabled
, Source filtering: Disabled, Flow control: Enabled, Auto-negotiation: Enabled, Remote fault: Online Device flags : Present Running Loop-Detected Interface flags: SNMP-Traps Internal: 0x4000 Link flags : None CoS queues : 8 supported, 4 maximum usable queues Schedulers : 0 Hold-times : Up 0 ms, Down 0 ms Current address: 00:1f:12:fe:c5:2e, Hardware address: 00:1f:12:fe:c5:2e Last flapped : 2015-01-20 23:40:04 PST (00:02:12 ago) Statistics last cleared: Never Traffic statistics: Input bytes : 0 0 bps Output bytes : 0 0 bps Input packets: 0 0 pps Output packets: 0 0 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 : 0 Output bytes : 0 Input packets: 0 Output packets: 0 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: 1, 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 0 0 0 1 expedited-fo 0 0 0 2 assured-forw 0 0 0 3 network-cont 0 0 0 Queue number: Mapped forwarding classes 0 best-effort 1 expedited-forwarding 2 assured-forwarding 3 network-controlActive alarms : None
Active defects : None MAC statistics: Receive Transmit Total octets 0 0 Total packets 0 0 Unicast packets 0 0 Broadcast packets 0 0 Multicast packets 0 0 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 0 Input packet rejects 0 Input DA rejects 0 Input SA rejects 0 Output packet count 0 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/Asymmetric, Remote fault: OK Local resolution: Flow control: Symmetric, Remote fault: Link OK Packet Forwarding Engine configuration: Destination slot: 4 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
含义
检查是否有任何错误统计信息。不应有任何输入或输出错误。如果持续存在输入或输出错误,请通过瞻博网络技术援助中心 (JTAC) support@juniper.net
或 1-888-314-JTAC(美国境内)或 1-408-745-9500(美国境外)建立案例。
诊断可疑电路问题
目的
当您怀疑电路问题时,务必与传输层工程师一起解决问题。传输层工程师可能会从网络中的不同点创建到路由器的环路。然后,您可以执行测试以验证从路由器到网络中该环路的连接。
行动
传输层工程师创建从网络到路由器的环路后,必须验证从路由器到网络中环路的连接。按照步骤 2 到步骤 8 ,通过快速以太网或千兆以太网接口诊断可疑硬件问题。请记住,测试中遇到的任何问题都表示从路由器到网络中环路的连接出现问题。
通过在网络的各个点执行环路测试,可以隔离问题的根源。